waygo-maps 1.1.108 → 1.1.109
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/dist/bundle.js +1 -1
- package/dist/bundle.js.map +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see bundle.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.waygomaps=e():t.waygomaps=e()}(this,(()=>(()=>{var t={526:(t,e)=>{"use strict";e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,i=c(t),a=i[0],s=i[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),l=0,h=s>0?a-4:a;for(n=0;n<h;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;return 2===s&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,u[l++]=255&e),1===s&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e),u},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],a=16383,c=0,u=r-o;c<u;c+=a)i.push(s(t,c,c+a>u?u:c+a));return 1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function s(t,e,r){for(var o,i,a=[],c=e;c<r;c+=3)o=(t[c]<<16&16711680)+(t[c+1]<<8&65280)+(255&t[c+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},287:(t,e,n)=>{"use strict";const r=n(526),o=n(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=s,e.IS=50;const a=2147483647;function c(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return u(t,e,n)}function u(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|y(t,e);let r=c(n);const o=r.write(t,e);return o!==n&&(r=r.slice(0,o)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(q(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(q(t,ArrayBuffer)||t&&q(t.buffer,ArrayBuffer))return p(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(q(t,SharedArrayBuffer)||t&&q(t.buffer,SharedArrayBuffer)))return p(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return s.from(r,e,n);const o=function(t){if(s.isBuffer(t)){const e=0|d(t.length),n=c(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||J(t.length)?c(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return l(t),c(t<0?0:0|d(t))}function f(t){const e=t.length<0?0:0|d(t.length),n=c(e);for(let r=0;r<e;r+=1)n[r]=255&t[r];return n}function p(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(r,s.prototype),r}function d(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function y(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Z(t).length;default:if(o)return r?-1:G(t).length;e=(""+e).toLowerCase(),o=!0}}function g(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return O(this,e,n);case"base64":return I(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),J(n=+n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:M(t,e,n,r,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):M(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function M(t,e,n,r,o){let i,a=1,c=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,c/=2,s/=2,n/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){let r=-1;for(i=n;i<c;i++)if(u(t,i)===u(e,-1===r?0:i-r)){if(-1===r&&(r=i),i-r+1===s)return r*a}else-1!==r&&(i-=i-r),r=-1}else for(n+s>c&&(n=c-s),i=n;i>=0;i--){let n=!0;for(let r=0;r<s;r++)if(u(t,i+r)!==u(e,r)){n=!1;break}if(n)return i}return-1}function b(t,e,n,r){n=Number(n)||0;const o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=e.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(e.substr(2*a,2),16);if(J(r))return a;t[n+a]=r}return a}function w(t,e,n,r){return W(G(e,t.length-n),t,n,r)}function j(t,e,n,r){return W(function(t){const e=[];for(let n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function N(t,e,n,r){return W(Z(e),t,n,r)}function D(t,e,n,r){return W(function(t,e){let n,r,o;const i=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function I(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);const r=[];let o=e;for(;o<n;){const e=t[o];let i=null,a=e>239?4:e>223?3:e>191?2:1;if(o+a<=n){let n,r,c,s;switch(a){case 1:e<128&&(i=e);break;case 2:n=t[o+1],128==(192&n)&&(s=(31&e)<<6|63&n,s>127&&(i=s));break;case 3:n=t[o+1],r=t[o+2],128==(192&n)&&128==(192&r)&&(s=(15&e)<<12|(63&n)<<6|63&r,s>2047&&(s<55296||s>57343)&&(i=s));break;case 4:n=t[o+1],r=t[o+2],c=t[o+3],128==(192&n)&&128==(192&r)&&128==(192&c)&&(s=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&c,s>65535&&s<1114112&&(i=s))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return function(t){const e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);let n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=S));return n}(r)}s.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,n){return u(t,e,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(t,e,n){return function(t,e,n){return l(t),t<=0?c(t):void 0!==e?"string"==typeof n?c(t).fill(e,n):c(t).fill(e):c(t)}(t,e,n)},s.allocUnsafe=function(t){return h(t)},s.allocUnsafeSlow=function(t){return h(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(q(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),q(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,r=e.length;for(let o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);let n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;const r=s.allocUnsafe(e);let o=0;for(n=0;n<t.length;++n){let e=t[n];if(q(e,Uint8Array))o+e.length>r.length?(s.isBuffer(e)||(e=s.from(e)),e.copy(r,o)):Uint8Array.prototype.set.call(r,e,o);else{if(!s.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,o)}o+=e.length}return r},s.byteLength=y,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)m(this,e,e+1);return this},s.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},s.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},s.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?E(this,0,t):g.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){let t="";const n=e.IS;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(t,e,n,r,o){if(q(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;let i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0);const c=Math.min(i,a),u=this.slice(r,o),l=t.slice(e,n);for(let t=0;t<c;++t)if(u[t]!==l[t]){i=u[t],a=l[t];break}return i<a?-1:a<i?1:0},s.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},s.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},s.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},s.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":case"latin1":case"binary":return j(this,t,e,n);case"base64":return N(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function T(t,e,n){let r="";n=Math.min(t.length,n);for(let o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function O(t,e,n){let r="";n=Math.min(t.length,n);for(let o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function x(t,e,n){const r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=e;r<n;++r)o+=K[t[r]];return o}function L(t,e,n){const r=t.slice(e,n);let o="";for(let t=0;t<r.length-1;t+=2)o+=String.fromCharCode(r[t]+256*r[t+1]);return o}function A(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function k(t,e,n,r,o,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function C(t,e,n,r,o){Y(e,r,o,t,n,7);let i=Number(e&BigInt(4294967295));t[n++]=i,i>>=8,t[n++]=i,i>>=8,t[n++]=i,i>>=8,t[n++]=i;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function z(t,e,n,r,o){Y(e,r,o,t,n,7);let i=Number(e&BigInt(4294967295));t[n+7]=i,i>>=8,t[n+6]=i,i>>=8,t[n+5]=i,i>>=8,t[n+4]=i;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function _(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function P(t,e,n,r,i){return e=+e,n>>>=0,i||_(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function B(t,e,n,r,i){return e=+e,n>>>=0,i||_(t,0,n,8),o.write(t,e,n,r,52,8),n+8}s.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);const r=this.subarray(t,e);return Object.setPrototypeOf(r,s.prototype),r},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||A(t,e,this.length);let r=this[t],o=1,i=0;for(;++i<e&&(o*=256);)r+=this[t+i]*o;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||A(t,e,this.length);let r=this[t+--e],o=1;for(;e>0&&(o*=256);)r+=this[t+--e]*o;return r},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||A(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||A(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||A(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||A(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=$((function(t){F(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(o)<<BigInt(32))})),s.prototype.readBigUInt64BE=$((function(t){F(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<<BigInt(32))+BigInt(o)})),s.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||A(t,e,this.length);let r=this[t],o=1,i=0;for(;++i<e&&(o*=256);)r+=this[t+i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||A(t,e,this.length);let r=e,o=1,i=this[t+--r];for(;r>0&&(o*=256);)i+=this[t+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},s.prototype.readInt8=function(t,e){return t>>>=0,e||A(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||A(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){t>>>=0,e||A(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=$((function(t){F(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),s.prototype.readBigInt64BE=$((function(t){F(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+n)})),s.prototype.readFloatLE=function(t,e){return t>>>=0,e||A(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||A(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||A(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||A(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||k(this,t,e,n,Math.pow(2,8*n)-1,0);let o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||k(this,t,e,n,Math.pow(2,8*n)-1,0);let o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigUInt64LE=$((function(t,e=0){return C(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=$((function(t,e=0){return z(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);k(this,t,e,n,r-1,-r)}let o=0,i=1,a=0;for(this[e]=255&t;++o<n&&(i*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/i|0)-a&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);k(this,t,e,n,r-1,-r)}let o=n-1,i=1,a=0;for(this[e+o]=255&t;--o>=0&&(i*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/i|0)-a&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigInt64LE=$((function(t,e=0){return C(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=$((function(t,e=0){return z(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(t,e,n){return P(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return P(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);const o=r-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),o},s.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){const e=t.charCodeAt(0);("utf8"===r&&e<128||"latin1"===r)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;let o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{const i=s.isBuffer(t)?t:s.from(t,r),a=i.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<n-e;++o)this[o+e]=i[o%a]}return this};const U={};function Q(t,e,n){U[t]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function R(t){let e="",n=t.length;const r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function Y(t,e,n,r,o,i){if(t>n||t<e){const r="bigint"==typeof e?"n":"";let o;throw o=i>3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new U.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,n){F(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||V(e,t.length-(n+1))}(r,o,i)}function F(t,e){if("number"!=typeof t)throw new U.ERR_INVALID_ARG_TYPE(e,"number",t)}function V(t,e,n){if(Math.floor(t)!==t)throw F(t,n),new U.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}Q("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),Q("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),Q("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=R(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=R(o)),o+="n"),r+=` It must be ${e}. Received ${o}`,r}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function G(t,e){let n;e=e||1/0;const r=t.length;let o=null;const i=[];for(let a=0;a<r;++a){if(n=t.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Z(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,n,r){let o;for(o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function J(t){return t!=t}const K=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)e[r+o]=t[n]+t[o]}return e}();function $(t){return"undefined"==typeof BigInt?X:t}function X(){throw new Error("BigInt not supported")}},320:t=>{"use strict";var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var a,c,s,u,l,h,f,p=e.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(s in c=(a=p.pop()).value,u=a.cost,l=t[c]||{})l.hasOwnProperty(s)&&(h=u+l[s],f=i[s],(void 0===i[s]||f>h)&&(i[s]=h,p.push(s,h),o[s]=c));if(void 0!==r&&void 0===i[r]){var d=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(d)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e},251:(t,e)=>{e.read=function(t,e,n,r,o){var i,a,c=8*o-r-1,s=(1<<c)-1,u=s>>1,l=-7,h=n?o-1:0,f=n?-1:1,p=t[e+h];for(h+=f,i=p&(1<<-l)-1,p>>=-l,l+=c;l>0;i=256*i+t[e+h],h+=f,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+t[e+h],h+=f,l-=8);if(0===i)i=1-u;else{if(i===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=u}return(p?-1:1)*a*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var a,c,s,u=8*i-o-1,l=(1<<u)-1,h=l>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+h>=1?f/s:f*Math.pow(2,1-h))*s>=2&&(a++,s/=2),a+h>=l?(c=0,a=l):a+h>=1?(c=(e*s-1)*Math.pow(2,o),a+=h):(c=e*Math.pow(2,h-1)*Math.pow(2,o),a=0));o>=8;t[n+p]=255&c,p+=d,c/=256,o-=8);for(a=a<<o|c,u+=o;u>0;t[n+p]=255&a,p+=d,a/=256,u-=8);t[n+p-d]|=128*y}},975:(t,e,n)=>{"use strict";var r=n(606);function o(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function i(t,e){for(var n,r="",o=0,i=-1,a=0,c=0;c<=t.length;++c){if(c<t.length)n=t.charCodeAt(c);else{if(47===n)break;n=47}if(47===n){if(i===c-1||1===a);else if(i!==c-1&&2===a){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var s=r.lastIndexOf("/");if(s!==r.length-1){-1===s?(r="",o=0):o=(r=r.slice(0,s)).length-1-r.lastIndexOf("/"),i=c,a=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=c,a=0;continue}e&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+t.slice(i+1,c):r=t.slice(i+1,c),o=c-i-1;i=c,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var a={resolve:function(){for(var t,e="",n=!1,a=arguments.length-1;a>=-1&&!n;a--){var c;a>=0?c=arguments[a]:(void 0===t&&(t=r.cwd()),c=t),o(c),0!==c.length&&(e=c+"/"+e,n=47===c.charCodeAt(0))}return e=i(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(o(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=i(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return o(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];o(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":a.normalize(t)},relative:function(t,e){if(o(t),o(e),t===e)return"";if((t=a.resolve(t))===(e=a.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var r=t.length,i=r-n,c=1;c<e.length&&47===e.charCodeAt(c);++c);for(var s=e.length-c,u=i<s?i:s,l=-1,h=0;h<=u;++h){if(h===u){if(s>u){if(47===e.charCodeAt(c+h))return e.slice(c+h+1);if(0===h)return e.slice(c+h)}else i>u&&(47===t.charCodeAt(n+h)?l=h:0===h&&(l=0));break}var f=t.charCodeAt(n+h);if(f!==e.charCodeAt(c+h))break;47===f&&(l=h)}var p="";for(h=n+l+1;h<=r;++h)h!==r&&47!==t.charCodeAt(h)||(0===p.length?p+="..":p+="/..");return p.length>0?p+e.slice(c+l):(c+=l,47===e.charCodeAt(c)&&++c,e.slice(c))},_makeLong:function(t){return t},dirname:function(t){if(o(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"//":t.slice(0,r)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');o(t);var n,r=0,i=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var c=e.length-1,s=-1;for(n=t.length-1;n>=0;--n){var u=t.charCodeAt(n);if(47===u){if(!a){r=n+1;break}}else-1===s&&(a=!1,s=n+1),c>=0&&(u===e.charCodeAt(c)?-1==--c&&(i=n):(c=-1,i=s))}return r===i?i=s:-1===i&&(i=t.length),t.slice(r,i)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){r=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":t.slice(r,i)},extname:function(t){o(t);for(var e=-1,n=0,r=-1,i=!0,a=0,c=t.length-1;c>=0;--c){var s=t.charCodeAt(c);if(47!==s)-1===r&&(i=!1,r=c+1),46===s?-1===e?e=c:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){n=c+1;break}}return-1===e||-1===r||0===a||1===a&&e===r-1&&e===n+1?"":t.slice(e,r)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+"/"+r:r}(0,t)},parse:function(t){o(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,r=t.charCodeAt(0),i=47===r;i?(e.root="/",n=1):n=0;for(var a=-1,c=0,s=-1,u=!0,l=t.length-1,h=0;l>=n;--l)if(47!==(r=t.charCodeAt(l)))-1===s&&(u=!1,s=l+1),46===r?-1===a?a=l:1!==h&&(h=1):-1!==a&&(h=-1);else if(!u){c=l+1;break}return-1===a||-1===s||0===h||1===h&&a===s-1&&a===c+1?-1!==s&&(e.base=e.name=0===c&&i?t.slice(1,s):t.slice(c,s)):(0===c&&i?(e.name=t.slice(1,a),e.base=t.slice(1,s)):(e.name=t.slice(c,a),e.base=t.slice(c,s)),e.ext=t.slice(a,s)),c>0?e.dir=t.slice(0,c-1):i&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,t.exports=a},606:t=>{var e,n,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(t){n=i}}();var c,s=[],u=!1,l=-1;function h(){u&&c&&(u=!1,c.length?s=c.concat(s):l=-1,s.length&&f())}function f(){if(!u){var t=a(h);u=!0;for(var e=s.length;e;){for(c=s,s=[];++l<e;)c&&c[l].run();l=-1,e=s.length}c=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{return n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function d(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new p(t,e)),1!==s.length||u||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=d,r.addListener=d,r.once=d,r.off=d,r.removeListener=d,r.removeAllListeners=d,r.emit=d,r.prependListener=d,r.prependOnceListener=d,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},583:(t,e,n)=>{const r=n(333),o=n(157),i=n(280),a=n(375);function c(t,e,n,i,a){const c=[].slice.call(arguments,1),s=c.length,u="function"==typeof c[s-1];if(!u&&!r())throw new Error("Callback required as last argument");if(!u){if(s<1)throw new Error("Too few arguments provided");return 1===s?(n=e,e=i=void 0):2!==s||e.getContext||(i=n,n=e,e=void 0),new Promise((function(r,a){try{const a=o.create(n,i);r(t(a,e,i))}catch(t){a(t)}}))}if(s<2)throw new Error("Too few arguments provided");2===s?(a=n,n=e,e=i=void 0):3===s&&(e.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=n,n=e,e=void 0));try{const r=o.create(n,i);a(null,t(r,e,i))}catch(t){a(t)}}e.create=o.create,e.toCanvas=c.bind(null,i.render),e.toDataURL=c.bind(null,i.renderToDataURL),e.toString=c.bind(null,(function(t,e,n){return a.render(t,n)}))},333:t=>{t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},421:(t,e,n)=>{const r=n(886).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];const e=Math.floor(t/7)+2,n=r(t),o=145===n?26:2*Math.ceil((n-13)/(2*e-2)),i=[n-7];for(let t=1;t<e-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}},433:(t,e,n)=>{const r=n(208),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(t){this.mode=r.ALPHANUMERIC,this.data=t}i.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let n=45*o.indexOf(this.data[e]);n+=o.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},t.exports=i},899:t=>{function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},820:t=>{function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}e.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,e){return this.data[t*this.size+e]},e.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=e},822:(t,e,n)=>{const r=n(208);function o(t){this.mode=r.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},t.exports=o},518:(t,e,n)=>{const r=n(953),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}}},953:(t,e)=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return n}}},756:(t,e,n)=>{const r=n(886).getSymbolSize;e.getPositions=function(t){const e=r(t);return[[0,0],[e-7,0],[0,e-7]]}},565:(t,e,n)=>{const r=n(886),o=r.getBCHDigit(1335);e.getEncodedBits=function(t,e){const n=t.bit<<3|e;let i=n<<10;for(;r.getBCHDigit(i)-o>=0;)i^=1335<<r.getBCHDigit(i)-o;return 21522^(n<<10|i)}},731:(t,e)=>{const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let t=1;for(let e=0;e<255;e++)n[e]=t,r[t]=e,t<<=1,256&t&&(t^=285);for(let t=255;t<512;t++)n[t]=n[t-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return r[t]},e.exp=function(t){return n[t]},e.mul=function(t,e){return 0===t||0===e?0:n[r[t]+r[e]]}},861:(t,e,n)=>{const r=n(208),o=n(886);function i(t){this.mode=r.KANJI,this.data=t}i.getBitsLength=function(t){return 13*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=o.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},t.exports=i},332:(t,e)=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const e=t.size;let n=0,r=0,o=0,i=null,a=null;for(let c=0;c<e;c++){r=o=0,i=a=null;for(let s=0;s<e;s++){let e=t.get(c,s);e===i?r++:(r>=5&&(n+=r-5+3),i=e,r=1),e=t.get(s,c),e===a?o++:(o>=5&&(n+=o-5+3),a=e,o=1)}r>=5&&(n+=r-5+3),o>=5&&(n+=o-5+3)}return n},e.getPenaltyN2=function(t){const e=t.size;let n=0;for(let r=0;r<e-1;r++)for(let o=0;o<e-1;o++){const e=t.get(r,o)+t.get(r,o+1)+t.get(r+1,o)+t.get(r+1,o+1);4!==e&&0!==e||n++}return 3*n},e.getPenaltyN3=function(t){const e=t.size;let n=0,r=0,o=0;for(let i=0;i<e;i++){r=o=0;for(let a=0;a<e;a++)r=r<<1&2047|t.get(i,a),a>=10&&(1488===r||93===r)&&n++,o=o<<1&2047|t.get(a,i),a>=10&&(1488===o||93===o)&&n++}return 40*n},e.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return 10*Math.abs(Math.ceil(100*e/n/5)-10)},e.applyMask=function(t,e){const r=e.size;for(let o=0;o<r;o++)for(let i=0;i<r;i++)e.isReserved(i,o)||e.xor(i,o,n(t,i,o))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let o=0,i=1/0;for(let a=0;a<r;a++){n(a),e.applyMask(a,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),r<i&&(i=r,o=a)}return o}},208:(t,e,n)=>{const r=n(878),o=n(44);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return o.testNumeric(t)?e.NUMERIC:o.testAlphanumeric(t)?e.ALPHANUMERIC:o.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return n}}},357:(t,e,n)=>{const r=n(208);function o(t){this.mode=r.NUMERIC,this.data=t.toString()}o.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},t.exports=o},713:(t,e,n)=>{const r=n(731);e.mul=function(t,e){const n=new Uint8Array(t.length+e.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<e.length;i++)n[o+i]^=r.mul(t[o],e[i]);return n},e.mod=function(t,e){let n=new Uint8Array(t);for(;n.length-e.length>=0;){const t=n[0];for(let o=0;o<e.length;o++)n[o]^=r.mul(e[o],t);let o=0;for(;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},e.generateECPolynomial=function(t){let n=new Uint8Array([1]);for(let o=0;o<t;o++)n=e.mul(n,new Uint8Array([1,r.exp(o)]));return n}},157:(t,e,n)=>{const r=n(886),o=n(953),i=n(899),a=n(820),c=n(421),s=n(756),u=n(332),l=n(518),h=n(764),f=n(427),p=n(565),d=n(208),y=n(801);function g(t,e,n){const r=t.size,o=p.getEncodedBits(e,n);let i,a;for(i=0;i<15;i++)a=1==(o>>i&1),i<6?t.set(i,8,a,!0):i<8?t.set(i+1,8,a,!0):t.set(r-15+i,8,a,!0),i<8?t.set(8,r-i-1,a,!0):i<9?t.set(8,15-i-1+1,a,!0):t.set(8,15-i-1,a,!0);t.set(r-8,8,1,!0)}function m(t,e,n,o){let p;if(Array.isArray(t))p=y.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let r=e;if(!r){const e=y.rawSplit(t);r=f.getBestVersionForData(e,n)}p=y.fromString(t,r||40)}}const m=f.getBestVersionForData(p,n);if(!m)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<m)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+m+".\n")}else e=m;const v=function(t,e,n){const o=new i;n.forEach((function(e){o.put(e.mode.bit,4),o.put(e.getLength(),d.getCharCountIndicator(e.mode,t)),e.write(o)}));const a=8*(r.getSymbolTotalCodewords(t)-l.getTotalCodewordsCount(t,e));for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);const c=(a-o.getLengthInBits())/8;for(let t=0;t<c;t++)o.put(t%2?17:236,8);return function(t,e,n){const o=r.getSymbolTotalCodewords(e),i=o-l.getTotalCodewordsCount(e,n),a=l.getBlocksCount(e,n),c=a-o%a,s=Math.floor(o/a),u=Math.floor(i/a),f=u+1,p=s-u,d=new h(p);let y=0;const g=new Array(a),m=new Array(a);let v=0;const M=new Uint8Array(t.buffer);for(let t=0;t<a;t++){const e=t<c?u:f;g[t]=M.slice(y,y+e),m[t]=d.encode(g[t]),y+=e,v=Math.max(v,e)}const b=new Uint8Array(o);let w,j,N=0;for(w=0;w<v;w++)for(j=0;j<a;j++)w<g[j].length&&(b[N++]=g[j][w]);for(w=0;w<p;w++)for(j=0;j<a;j++)b[N++]=m[j][w];return b}(o,t,e)}(e,n,p),M=r.getSymbolSize(e),b=new a(M);return function(t,e){const n=t.size,r=s.getPositions(e);for(let e=0;e<r.length;e++){const o=r[e][0],i=r[e][1];for(let e=-1;e<=7;e++)if(!(o+e<=-1||n<=o+e))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+r||(e>=0&&e<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===e||6===e)||e>=2&&e<=4&&r>=2&&r<=4?t.set(o+e,i+r,!0,!0):t.set(o+e,i+r,!1,!0))}}(b,e),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(b),function(t,e){const n=c.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0],o=n[e][1];for(let e=-2;e<=2;e++)for(let n=-2;n<=2;n++)-2===e||2===e||-2===n||2===n||0===e&&0===n?t.set(r+e,o+n,!0,!0):t.set(r+e,o+n,!1,!0)}}(b,e),g(b,n,0),e>=7&&function(t,e){const n=t.size,r=f.getEncodedBits(e);let o,i,a;for(let e=0;e<18;e++)o=Math.floor(e/3),i=e%3+n-8-3,a=1==(r>>e&1),t.set(o,i,a,!0),t.set(i,o,a,!0)}(b,e),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,a=0;for(let c=n-1;c>0;c-=2)for(6===c&&c--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,c-n)){let r=!1;a<e.length&&(r=1==(e[a]>>>i&1)),t.set(o,c-n,r),i--,-1===i&&(a++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(b,v),isNaN(o)&&(o=u.getBestMask(b,g.bind(null,b,n))),u.applyMask(o,b),g(b,n,o),{modules:b,version:e,errorCorrectionLevel:n,maskPattern:o,segments:p}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");let n,i,a=o.M;return void 0!==e&&(a=o.from(e.errorCorrectionLevel,o.M),n=f.from(e.version),i=u.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),m(t,n,a,i)}},764:(t,e,n)=>{const r=n(713);function o(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const n=r.mod(e,this.genPoly),o=this.degree-n.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(n,o),t}return n},t.exports=o},44:(t,e)=>{const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";e.KANJI=new RegExp(r,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(o,"g"),e.NUMERIC=new RegExp(n,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+r+"$"),a=new RegExp("^"+n+"$"),c=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return i.test(t)},e.testNumeric=function(t){return a.test(t)},e.testAlphanumeric=function(t){return c.test(t)}},801:(t,e,n)=>{const r=n(208),o=n(357),i=n(433),a=n(822),c=n(861),s=n(44),u=n(886),l=n(320);function h(t){return unescape(encodeURIComponent(t)).length}function f(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function p(t){const e=f(s.NUMERIC,r.NUMERIC,t),n=f(s.ALPHANUMERIC,r.ALPHANUMERIC,t);let o,i;return u.isKanjiModeEnabled()?(o=f(s.BYTE,r.BYTE,t),i=f(s.KANJI,r.KANJI,t)):(o=f(s.BYTE_KANJI,r.BYTE,t),i=[]),e.concat(n,o,i).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function d(t,e){switch(e){case r.NUMERIC:return o.getBitsLength(t);case r.ALPHANUMERIC:return i.getBitsLength(t);case r.KANJI:return c.getBitsLength(t);case r.BYTE:return a.getBitsLength(t)}}function y(t,e){let n;const s=r.getBestModeForData(t);if(n=r.from(e,s),n!==r.BYTE&&n.bit<s.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(s));switch(n!==r.KANJI||u.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new o(t);case r.ALPHANUMERIC:return new i(t);case r.KANJI:return new c(t);case r.BYTE:return new a(t)}}e.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(y(e,null)):e.data&&t.push(y(e.data,e.mode)),t}),[])},e.fromString=function(t,n){const o=function(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n];switch(o.mode){case r.NUMERIC:e.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:e.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:e.push([o,{data:o.data,mode:r.BYTE,length:h(o.data)}]);break;case r.BYTE:e.push([{data:o.data,mode:r.BYTE,length:h(o.data)}])}}return e}(p(t,u.isKanjiModeEnabled())),i=function(t,e){const n={},o={start:{}};let i=["start"];for(let a=0;a<t.length;a++){const c=t[a],s=[];for(let t=0;t<c.length;t++){const u=c[t],l=""+a+t;s.push(l),n[l]={node:u,lastCount:0},o[l]={};for(let t=0;t<i.length;t++){const a=i[t];n[a]&&n[a].node.mode===u.mode?(o[a][l]=d(n[a].lastCount+u.length,u.mode)-d(n[a].lastCount,u.mode),n[a].lastCount+=u.length):(n[a]&&(n[a].lastCount=u.length),o[a][l]=d(u.length,u.mode)+4+r.getCharCountIndicator(u.mode,e))}}i=s}for(let t=0;t<i.length;t++)o[i[t]].end=0;return{map:o,table:n}}(o,n),a=l.find_path(i.map,"start","end"),c=[];for(let t=1;t<a.length-1;t++)c.push(i.table[a[t]].node);return e.fromArray(c.reduce((function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[]))},e.rawSplit=function(t){return e.fromArray(p(t,u.isKanjiModeEnabled()))}},886:(t,e)=>{let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},e.isKanjiModeEnabled=function(){return void 0!==n},e.toSJIS=function(t){return n(t)}},878:(t,e)=>{e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},427:(t,e,n)=>{const r=n(886),o=n(518),i=n(953),a=n(208),c=n(878),s=r.getBCHDigit(7973);function u(t,e){return a.getCharCountIndicator(t,e)+4}function l(t,e){let n=0;return t.forEach((function(t){const r=u(t.mode,e);n+=r+t.getBitsLength()})),n}e.from=function(t,e){return c.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!c.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);const i=8*(r.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,e));if(n===a.MIXED)return i;const s=i-u(n,t);switch(n){case a.NUMERIC:return Math.floor(s/10*3);case a.ALPHANUMERIC:return Math.floor(s/11*2);case a.KANJI:return Math.floor(s/13);case a.BYTE:default:return Math.floor(s/8)}},e.getBestVersionForData=function(t,n){let r;const o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(l(t,r)<=e.getCapacity(r,n,a.MIXED))return r}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,r){for(let o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(r.mode,r.getLength(),o)},e.getEncodedBits=function(t){if(!c.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;r.getBCHDigit(e)-s>=0;)e^=7973<<r.getBCHDigit(e)-s;return t<<12|e}},280:(t,e,n)=>{const r=n(726);e.render=function(t,e,n){let o=n,i=e;void 0!==o||e&&e.getContext||(o=e,e=void 0),e||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);const a=r.getImageWidth(t.modules.size,o),c=i.getContext("2d"),s=c.createImageData(a,a);return r.qrToImageData(s.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(c,i,a),c.putImageData(s,0,0),i},e.renderToDataURL=function(t,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=e.render(t,n,o),a=o.type||"image/png",c=o.rendererOpts||{};return i.toDataURL(a,c.quality)}},375:(t,e,n)=>{const r=n(726);function o(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}e.render=function(t,e,n){const a=r.getOptions(e),c=t.modules.size,s=t.modules.data,u=c+2*a.margin,l=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",h="<path "+o(a.color.dark,"stroke")+' d="'+function(t,e,n){let r="",o=0,a=!1,c=0;for(let s=0;s<t.length;s++){const u=Math.floor(s%e),l=Math.floor(s/e);u||a||(a=!0),t[s]?(c++,s>0&&u>0&&t[s-1]||(r+=a?i("M",u+n,.5+l+n):i("m",o,0),o=0,a=!1),u+1<e&&t[s+1]||(r+=i("h",c),c=0)):o++}return r}(s,c,a.margin)+'"/>',f='viewBox="0 0 '+u+" "+u+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+f+' shape-rendering="crispEdges">'+l+h+"</svg>\n";return"function"==typeof n&&n(null,p),p}},726:(t,e)=>{function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const o=n.modules.size,i=n.modules.data,a=e.getScale(o,r),c=Math.floor((o+2*r.margin)*a),s=r.margin*a,u=[r.color.light,r.color.dark];for(let e=0;e<c;e++)for(let n=0;n<c;n++){let l=4*(e*c+n),h=r.color.light;e>=s&&n>=s&&e<c-s&&n<c-s&&(h=u[i[Math.floor((e-s)/a)*o+Math.floor((n-s)/a)]?1:0]),t[l++]=h.r,t[l++]=h.g,t[l++]=h.b,t[l]=h.a}}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!t||!/^http(s?):/.test(t));)t=r[o--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t})();var r={};return(()=>{"use strict";n.d(r,{default:()=>Ws});var t={};function e(t,e){return function(){return t.apply(e,arguments)}}n.r(t),n.d(t,{hasBrowserEnv:()=>dt,hasStandardBrowserEnv:()=>gt,hasStandardBrowserWebWorkerEnv:()=>mt,navigator:()=>yt,origin:()=>vt});var o=n(606);const{toString:i}=Object.prototype,{getPrototypeOf:a}=Object,c=(s=Object.create(null),t=>{const e=i.call(t);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())});var s;const u=t=>(t=t.toLowerCase(),e=>c(e)===t),l=t=>e=>typeof e===t,{isArray:h}=Array,f=l("undefined"),p=u("ArrayBuffer"),d=l("string"),y=l("function"),g=l("number"),m=t=>null!==t&&"object"==typeof t,v=t=>{if("object"!==c(t))return!1;const e=a(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},M=u("Date"),b=u("File"),w=u("Blob"),j=u("FileList"),N=u("URLSearchParams"),[D,I,E,S]=["ReadableStream","Request","Response","Headers"].map(u);function T(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),h(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(r=0;r<i;r++)a=o[r],e.call(null,t[a],a,t)}}function O(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,o=n.length;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,L=t=>!f(t)&&t!==x,A=(k="undefined"!=typeof Uint8Array&&a(Uint8Array),t=>k&&t instanceof k);var k;const C=u("HTMLFormElement"),z=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),_=u("RegExp"),P=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};T(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},B="abcdefghijklmnopqrstuvwxyz",U="0123456789",Q={DIGIT:U,ALPHA:B,ALPHA_DIGIT:B+B.toUpperCase()+U},R=u("AsyncFunction"),Y=(F="function"==typeof setImmediate,V=y(x.postMessage),F?setImmediate:V?(H=`axios@${Math.random()}`,G=[],x.addEventListener("message",(({source:t,data:e})=>{t===x&&e===H&&G.length&&G.shift()()}),!1),t=>{G.push(t),x.postMessage(H,"*")}):t=>setTimeout(t));var F,V,H,G;const Z="undefined"!=typeof queueMicrotask?queueMicrotask.bind(x):void 0!==o&&o.nextTick||Y,W={isArray:h,isArrayBuffer:p,isBuffer:function(t){return null!==t&&!f(t)&&null!==t.constructor&&!f(t.constructor)&&y(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||y(t.append)&&("formdata"===(e=c(t))||"object"===e&&y(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&p(t.buffer),e},isString:d,isNumber:g,isBoolean:t=>!0===t||!1===t,isObject:m,isPlainObject:v,isReadableStream:D,isRequest:I,isResponse:E,isHeaders:S,isUndefined:f,isDate:M,isFile:b,isBlob:w,isRegExp:_,isFunction:y,isStream:t=>m(t)&&y(t.pipe),isURLSearchParams:N,isTypedArray:A,isFileList:j,forEach:T,merge:function t(){const{caseless:e}=L(this)&&this||{},n={},r=(r,o)=>{const i=e&&O(n,o)||o;v(n[i])&&v(r)?n[i]=t(n[i],r):v(r)?n[i]=t({},r):h(r)?n[i]=r.slice():n[i]=r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&T(arguments[t],r);return n},extend:(t,n,r,{allOwnKeys:o}={})=>(T(n,((n,o)=>{r&&y(n)?t[o]=e(n,r):t[o]=n}),{allOwnKeys:o}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,i,c;const s={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)c=o[i],r&&!r(c,t,e)||s[c]||(e[c]=t[c],s[c]=!0);t=!1!==n&&a(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:c,kindOfTest:u,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(h(t))return t;let e=t.length;if(!g(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:C,hasOwnProperty:z,hasOwnProp:z,reduceDescriptors:P,freezeMethods:t=>{P(t,((e,n)=>{if(y(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];y(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return h(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:O,global:x,isContextDefined:L,ALPHABET:Q,generateString:(t=16,e=Q.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&y(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(m(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=h(t)?[]:{};return T(t,((t,e)=>{const i=n(t,r+1);!f(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:R,isThenable:t=>t&&(m(t)||y(t))&&y(t.then)&&y(t.catch),setImmediate:Y,asap:Z};function q(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}W.inherits(q,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.status}}});const J=q.prototype,K={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{K[t]={value:t}})),Object.defineProperties(q,K),Object.defineProperty(J,"isAxiosError",{value:!0}),q.from=(t,e,n,r,o,i)=>{const a=Object.create(J);return W.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),q.call(a,t.message,e,n,r,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const $=q;var X=n(287).hp;function tt(t){return W.isPlainObject(t)||W.isArray(t)}function et(t){return W.endsWith(t,"[]")?t.slice(0,-2):t}function nt(t,e,n){return t?t.concat(e).map((function(t,e){return t=et(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const rt=W.toFlatObject(W,{},null,(function(t){return/^is[A-Z]/.test(t)})),ot=function(t,e,n){if(!W.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!W.isUndefined(e[t])}))).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,c=(n.Blob||"undefined"!=typeof Blob&&Blob)&&W.isSpecCompliantForm(e);if(!W.isFunction(o))throw new TypeError("visitor must be a function");function s(t){if(null===t)return"";if(W.isDate(t))return t.toISOString();if(!c&&W.isBlob(t))throw new $("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(t)||W.isTypedArray(t)?c&&"function"==typeof Blob?new Blob([t]):X.from(t):t}function u(t,n,o){let c=t;if(t&&!o&&"object"==typeof t)if(W.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(W.isArray(t)&&function(t){return W.isArray(t)&&!t.some(tt)}(t)||(W.isFileList(t)||W.endsWith(n,"[]"))&&(c=W.toArray(t)))return n=et(n),c.forEach((function(t,r){!W.isUndefined(t)&&null!==t&&e.append(!0===a?nt([n],r,i):null===a?n:n+"[]",s(t))})),!1;return!!tt(t)||(e.append(nt(o,n,i),s(t)),!1)}const l=[],h=Object.assign(rt,{defaultVisitor:u,convertValue:s,isVisitable:tt});if(!W.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!W.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),W.forEach(n,(function(n,i){!0===(!(W.isUndefined(n)||null===n)&&o.call(e,n,W.isString(i)?i.trim():i,r,h))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e};function it(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function at(t,e){this._pairs=[],t&&ot(t,this,e)}const ct=at.prototype;ct.append=function(t,e){this._pairs.push([t,e])},ct.toString=function(t){const e=t?function(e){return t.call(this,e,it)}:it;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const st=at;function ut(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function lt(t,e,n){if(!e)return t;const r=n&&n.encode||ut,o=n&&n.serialize;let i;if(i=o?o(e,n):W.isURLSearchParams(e)?e.toString():new st(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const ht=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){W.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},ft={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},pt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:st,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},dt="undefined"!=typeof window&&"undefined"!=typeof document,yt="object"==typeof navigator&&navigator||void 0,gt=dt&&(!yt||["ReactNative","NativeScript","NS"].indexOf(yt.product)<0),mt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,vt=dt&&window.location.href||"http://localhost",Mt={...t,...pt},bt=function(t){function e(t,n,r,o){let i=t[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),c=o>=t.length;return i=!i&&W.isArray(r)?r.length:i,c?(W.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&W.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&W.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}(r[i])),!a)}if(W.isFormData(t)&&W.isFunction(t.entries)){const n={};return W.forEachEntry(t,((t,r)=>{e(function(t){return W.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null},wt={transitional:ft,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=W.isObject(t);if(o&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return r?JSON.stringify(bt(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t)||W.isReadableStream(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return ot(t,new Mt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return Mt.isNode&&W.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=W.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return ot(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(W.isString(t))try{return(0,JSON.parse)(t),W.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||wt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(W.isResponse(t)||W.isReadableStream(t))return t;if(t&&W.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw $.from(t,$.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mt.classes.FormData,Blob:Mt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],(t=>{wt.headers[t]={}}));const jt=wt,Nt=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Dt=Symbol("internals");function It(t){return t&&String(t).trim().toLowerCase()}function Et(t){return!1===t||null==t?t:W.isArray(t)?t.map(Et):String(t)}function St(t,e,n,r,o){return W.isFunction(r)?r.call(this,e,n):(o&&(e=n),W.isString(e)?W.isString(r)?-1!==e.indexOf(r):W.isRegExp(r)?r.test(e):void 0:void 0)}class Tt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=It(e);if(!o)throw new Error("header name must be a non-empty string");const i=W.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=Et(t))}const i=(t,e)=>W.forEach(t,((t,n)=>o(t,n,e)));if(W.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(W.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&Nt[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e);else if(W.isHeaders(t))for(const[e,r]of t.entries())o(r,e,n);else null!=t&&o(e,t,n);return this}get(t,e){if(t=It(t)){const n=W.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(W.isFunction(e))return e.call(this,t,n);if(W.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=It(t)){const n=W.findKey(this,t);return!(!n||void 0===this[n]||e&&!St(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=It(t)){const o=W.findKey(n,t);!o||e&&!St(0,n[o],o,e)||(delete n[o],r=!0)}}return W.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!St(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return W.forEach(this,((r,o)=>{const i=W.findKey(n,o);if(i)return e[i]=Et(r),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete e[o],e[a]=Et(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return W.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&W.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[Dt]=this[Dt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=It(t);e[r]||(function(t,e){const n=W.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return W.isArray(t)?t.forEach(r):r(t),this}}Tt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),W.reduceDescriptors(Tt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),W.freezeMethods(Tt);const Ot=Tt;function xt(t,e){const n=this||jt,r=e||n,o=Ot.from(r.headers);let i=r.data;return W.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Lt(t){return!(!t||!t.__CANCEL__)}function At(t,e,n){$.call(this,null==t?"canceled":t,$.ERR_CANCELED,e,n),this.name="CanceledError"}W.inherits(At,$,{__CANCEL__:!0});const kt=At;function Ct(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new $("Request failed with status code "+n.status,[$.ERR_BAD_REQUEST,$.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}const zt=(t,e,n=3)=>{let r=0;const o=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(c){const s=Date.now(),u=r[a];o||(o=s),n[i]=c,r[i]=s;let l=a,h=0;for(;l!==i;)h+=n[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),s-o<e)return;const f=u&&s-u;return f?Math.round(1e3*h/f):void 0}}(50,250);return function(t,e){let n,r,o=0,i=1e3/e;const a=(e,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),t.apply(null,e)};return[(...t)=>{const e=Date.now(),c=e-o;c>=i?a(t,e):(n=t,r||(r=setTimeout((()=>{r=null,a(n)}),i-c)))},()=>n&&a(n)]}((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,c=i-r,s=o(c);r=i,t({loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:s||void 0,estimated:s&&a&&i<=a?(a-i)/s:void 0,event:n,lengthComputable:null!=a,[e?"download":"upload"]:!0})}),n)},_t=(t,e)=>{const n=null!=t;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Pt=t=>(...e)=>W.asap((()=>t(...e))),Bt=Mt.hasStandardBrowserEnv?function(){const t=Mt.navigator&&/(msie|trident)/i.test(Mt.navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=W.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0},Ut=Mt.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const a=[t+"="+encodeURIComponent(e)];W.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),W.isString(r)&&a.push("path="+r),W.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Qt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Rt=t=>t instanceof Ot?{...t}:t;function Yt(t,e){e=e||{};const n={};function r(t,e,n){return W.isPlainObject(t)&&W.isPlainObject(e)?W.merge.call({caseless:n},t,e):W.isPlainObject(e)?W.merge({},e):W.isArray(e)?e.slice():e}function o(t,e,n){return W.isUndefined(e)?W.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!W.isUndefined(e))return r(void 0,e)}function a(t,e){return W.isUndefined(e)?W.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function c(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const s={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(t,e)=>o(Rt(t),Rt(e),!0)};return W.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=s[r]||o,a=i(t[r],e[r],r);W.isUndefined(a)&&i!==c||(n[r]=a)})),n}const Ft=t=>{const e=Yt({},t);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:c,auth:s}=e;if(e.headers=c=Ot.from(c),e.url=lt(Qt(e.baseURL,e.url),t.params,t.paramsSerializer),s&&c.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),W.isFormData(r))if(Mt.hasStandardBrowserEnv||Mt.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if(!1!==(n=c.getContentType())){const[t,...e]=n?n.split(";").map((t=>t.trim())).filter(Boolean):[];c.setContentType([t||"multipart/form-data",...e].join("; "))}if(Mt.hasStandardBrowserEnv&&(o&&W.isFunction(o)&&(o=o(e)),o||!1!==o&&Bt(e.url))){const t=i&&a&&Ut.read(a);t&&c.set(i,t)}return e},Vt="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const r=Ft(t);let o=r.data;const i=Ot.from(r.headers).normalize();let a,c,s,u,l,{responseType:h,onUploadProgress:f,onDownloadProgress:p}=r;function d(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;function g(){if(!y)return;const r=Ot.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());Ct((function(t){e(t),d()}),(function(t){n(t),d()}),{data:h&&"text"!==h&&"json"!==h?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:t,request:y}),y=null}y.open(r.method.toUpperCase(),r.url,!0),y.timeout=r.timeout,"onloadend"in y?y.onloadend=g:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(g)},y.onabort=function(){y&&(n(new $("Request aborted",$.ECONNABORTED,t,y)),y=null)},y.onerror=function(){n(new $("Network Error",$.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let e=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ft;r.timeoutErrorMessage&&(e=r.timeoutErrorMessage),n(new $(e,o.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,t,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&W.forEach(i.toJSON(),(function(t,e){y.setRequestHeader(e,t)})),W.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),h&&"json"!==h&&(y.responseType=r.responseType),p&&([s,l]=zt(p,!0),y.addEventListener("progress",s)),f&&y.upload&&([c,u]=zt(f),y.upload.addEventListener("progress",c),y.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(a=e=>{y&&(n(!e||e.type?new kt(null,t,y):e),y.abort(),y=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const m=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(r.url);m&&-1===Mt.protocols.indexOf(m)?n(new $("Unsupported protocol "+m+":",$.ERR_BAD_REQUEST,t)):y.send(o||null)}))},Ht=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,r=new AbortController;const o=function(t){if(!n){n=!0,a();const e=t instanceof Error?t:this.reason;r.abort(e instanceof $?e:new kt(e instanceof Error?e.message:e))}};let i=e&&setTimeout((()=>{i=null,o(new $(`timeout ${e} of ms exceeded`,$.ETIMEDOUT))}),e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(o):t.removeEventListener("abort",o)})),t=null)};t.forEach((t=>t.addEventListener("abort",o)));const{signal:c}=r;return c.unsubscribe=()=>W.asap(a),c}},Gt=function*(t,e){let n=t.byteLength;if(!e||n<e)return void(yield t);let r,o=0;for(;o<n;)r=o+e,yield t.slice(o,r),o=r},Zt=(t,e,n,r)=>{const o=async function*(t,e){for await(const n of async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}}(t))yield*Gt(n,e)}(t,e);let i,a=0,c=t=>{i||(i=!0,r&&r(t))};return new ReadableStream({async pull(t){try{const{done:e,value:r}=await o.next();if(e)return c(),void t.close();let i=r.byteLength;if(n){let t=a+=i;n(t)}t.enqueue(new Uint8Array(r))}catch(t){throw c(t),t}},cancel:t=>(c(t),o.return())},{highWaterMark:2})},Wt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,qt=Wt&&"function"==typeof ReadableStream,Jt=Wt&&("function"==typeof TextEncoder?(Kt=new TextEncoder,t=>Kt.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer()));var Kt;const $t=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},Xt=qt&&$t((()=>{let t=!1;const e=new Request(Mt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),te=qt&&$t((()=>W.isReadableStream(new Response("").body))),ee={stream:te&&(t=>t.body)};var ne;Wt&&(ne=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!ee[t]&&(ee[t]=W.isFunction(ne[t])?e=>e[t]():(e,n)=>{throw new $(`Response type '${t}' is not supported`,$.ERR_NOT_SUPPORT,n)})})));const re={http:null,xhr:Vt,fetch:Wt&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:c,onUploadProgress:s,responseType:u,headers:l,withCredentials:h="same-origin",fetchOptions:f}=Ft(t);u=u?(u+"").toLowerCase():"text";let p,d=Ht([o,i&&i.toAbortSignal()],a);const y=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let g;try{if(s&&Xt&&"get"!==n&&"head"!==n&&0!==(g=await(async(t,e)=>{const n=W.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(W.isBlob(t))return t.size;if(W.isSpecCompliantForm(t)){const e=new Request(Mt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return W.isArrayBufferView(t)||W.isArrayBuffer(t)?t.byteLength:(W.isURLSearchParams(t)&&(t+=""),W.isString(t)?(await Jt(t)).byteLength:void 0)})(e):n})(l,r))){let t,n=new Request(e,{method:"POST",body:r,duplex:"half"});if(W.isFormData(r)&&(t=n.headers.get("content-type"))&&l.setContentType(t),n.body){const[t,e]=_t(g,zt(Pt(s)));r=Zt(n.body,65536,t,e)}}W.isString(h)||(h=h?"include":"omit");const o="credentials"in Request.prototype;p=new Request(e,{...f,signal:d,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:o?h:void 0});let i=await fetch(p);const a=te&&("stream"===u||"response"===u);if(te&&(c||a&&y)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=i[e]}));const e=W.toFiniteNumber(i.headers.get("content-length")),[n,r]=c&&_t(e,zt(Pt(c),!0))||[];i=new Response(Zt(i.body,65536,n,(()=>{r&&r(),y&&y()})),t)}u=u||"text";let m=await ee[W.findKey(ee,u)||"text"](i,t);return!a&&y&&y(),await new Promise(((e,n)=>{Ct(e,n,{data:m,headers:Ot.from(i.headers),status:i.status,statusText:i.statusText,config:t,request:p})}))}catch(e){if(y&&y(),e&&"TypeError"===e.name&&/fetch/i.test(e.message))throw Object.assign(new $("Network Error",$.ERR_NETWORK,t,p),{cause:e.cause||e});throw $.from(e,e&&e.code,t,p)}})};W.forEach(re,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const oe=t=>`- ${t}`,ie=t=>W.isFunction(t)||null===t||!1===t,ae=t=>{t=W.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i<e;i++){let e;if(n=t[i],r=n,!ie(n)&&(r=re[(e=String(n)).toLowerCase()],void 0===r))throw new $(`Unknown adapter '${e}'`);if(r)break;o[e||"#"+i]=r}if(!r){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map(oe).join("\n"):" "+oe(t[0]):"as no adapter specified";throw new $("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function ce(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new kt(null,t)}function se(t){return ce(t),t.headers=Ot.from(t.headers),t.data=xt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ae(t.adapter||jt.adapter)(t).then((function(e){return ce(t),e.data=xt.call(t,t.transformResponse,e),e.headers=Ot.from(e.headers),e}),(function(e){return Lt(e)||(ce(t),e&&e.response&&(e.response.data=xt.call(t,t.transformResponse,e.response),e.response.headers=Ot.from(e.response.headers))),Promise.reject(e)}))}const ue={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{ue[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const le={};ue.transitional=function(t,e,n){function r(t,e){return"[Axios v1.7.7] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new $(r(o," has been removed"+(e?" in "+e:"")),$.ERR_DEPRECATED);return e&&!le[o]&&(le[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}};const he={assertOptions:function(t,e,n){if("object"!=typeof t)throw new $("options must be an object",$.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],a=e[i];if(a){const e=t[i],n=void 0===e||a(e,i,t);if(!0!==n)throw new $("option "+i+" must be "+n,$.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new $("Unknown option "+i,$.ERR_BAD_OPTION)}},validators:ue},fe=he.validators;class pe{constructor(t){this.defaults=t,this.interceptors={request:new ht,response:new ht}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}catch(t){}}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Yt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&he.assertOptions(n,{silentJSONParsing:fe.transitional(fe.boolean),forcedJSONParsing:fe.transitional(fe.boolean),clarifyTimeoutError:fe.transitional(fe.boolean)},!1),null!=r&&(W.isFunction(r)?e.paramsSerializer={serialize:r}:he.assertOptions(r,{encode:fe.function,serialize:fe.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&W.merge(o.common,o[e.method]);o&&W.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Ot.concat(i,o);const a=[];let c=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(c=c&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const s=[];let u;this.interceptors.response.forEach((function(t){s.push(t.fulfilled,t.rejected)}));let l,h=0;if(!c){const t=[se.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,s),l=t.length,u=Promise.resolve(e);h<l;)u=u.then(t[h++],t[h++]);return u}l=a.length;let f=e;for(h=0;h<l;){const t=a[h++],e=a[h++];try{f=t(f)}catch(t){e.call(this,t);break}}try{u=se.call(this,f)}catch(t){return Promise.reject(t)}for(h=0,l=s.length;h<l;)u=u.then(s[h++],s[h++]);return u}getUri(t){return lt(Qt((t=Yt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}W.forEach(["delete","get","head","options"],(function(t){pe.prototype[t]=function(e,n){return this.request(Yt(n||{},{method:t,url:e,data:(n||{}).data}))}})),W.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(Yt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}pe.prototype[t]=e(),pe.prototype[t+"Form"]=e(!0)}));const de=pe;class ye{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new kt(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new ye((function(e){t=e})),cancel:t}}}const ge=ye,me={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(me).forEach((([t,e])=>{me[e]=t}));const ve=me,Me=function t(n){const r=new de(n),o=e(de.prototype.request,r);return W.extend(o,de.prototype,r,{allOwnKeys:!0}),W.extend(o,r,null,{allOwnKeys:!0}),o.create=function(e){return t(Yt(n,e))},o}(jt);Me.Axios=de,Me.CanceledError=kt,Me.CancelToken=ge,Me.isCancel=Lt,Me.VERSION="1.7.7",Me.toFormData=ot,Me.AxiosError=$,Me.Cancel=Me.CanceledError,Me.all=function(t){return Promise.all(t)},Me.spread=function(t){return function(e){return t.apply(null,e)}},Me.isAxiosError=function(t){return W.isObject(t)&&!0===t.isAxiosError},Me.mergeConfig=Yt,Me.AxiosHeaders=Ot,Me.formToJSON=t=>bt(W.isHTMLForm(t)?new FormData(t):t),Me.getAdapter=ae,Me.HttpStatusCode=ve,Me.default=Me;const be=Me;function we(t){return we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},we(t)}function je(){je=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==we(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(we(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Ne(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function De(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Ne(i,r,o,a,c,"next",t)}function c(t){Ne(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Ie(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ee(r.key),r)}}function Ee(t){var e=function(t){if("object"!=we(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=we(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==we(e)?e:e+""}var Se=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.client=be.create({baseURL:e}),this.client.interceptors.request.use((function(t){var e=nn.getApiKey(),n=nn.getAccountId();return e?(t.headers["Waygo-API-Key"]=e,n&&(t.headers["Waygo-Account"]=n),["post","put"].includes(t.method)?t.headers["Content-Type"]="application/json":delete t.headers["Content-Type"],t):(console.error("Must include API key using waygomaps.setApiKey('YOUR-API-KEY'):"),Promise.reject(new Error("API key is missing")))}))},e=[{key:"get",value:function(){var t=De(je().mark((function t(e){var n,r,o=arguments;return je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},t.prev=1,t.next=4,this.client.get(e,{params:n});case 4:return r=t.sent,t.abrupt("return",r.data);case 8:throw t.prev=8,t.t0=t.catch(1),new Error("GET ".concat(e," failed: ").concat(t.t0.message));case 11:case"end":return t.stop()}}),t,this,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()},{key:"post",value:(o=De(je().mark((function t(e,n){var r,o,i=arguments;return je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>2&&void 0!==i[2]?i[2]:{},t.prev=1,t.next=4,this.client.post(e,n,{params:r});case 4:return o=t.sent,t.abrupt("return",o.data);case 8:throw t.prev=8,t.t0=t.catch(1),new Error("POST ".concat(e," failed: ").concat(t.t0.message));case 11:case"end":return t.stop()}}),t,this,[[1,8]])}))),function(t,e){return o.apply(this,arguments)})},{key:"put",value:(r=De(je().mark((function t(e,n){var r;return je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.put(e,n);case 3:return r=t.sent,t.abrupt("return",r.data);case 7:throw t.prev=7,t.t0=t.catch(0),new Error("PUT ".concat(e," failed: ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return r.apply(this,arguments)})},{key:"delete",value:(n=De(je().mark((function t(e){var n,r,o=arguments;return je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},t.prev=1,t.next=4,this.client.delete(e,{params:n});case 4:return r=t.sent,t.abrupt("return",r.data);case 8:throw t.prev=8,t.t0=t.catch(1),new Error("DELETE ".concat(e," failed: ").concat(t.t0.message));case 11:case"end":return t.stop()}}),t,this,[[1,8]])}))),function(t){return n.apply(this,arguments)})}],e&&Ie(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,o}();const Te=Se;function Oe(t){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(t)}function xe(){xe=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Oe(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Oe(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Le(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Ae(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Le(i,r,o,a,c,"next",t)}function c(t){Le(i,r,o,a,c,"throw",t)}a(void 0)}))}}function ke(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ce(r.key),r)}}function Ce(t){var e=function(t){if("object"!=Oe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Oe(e)?e:e+""}var ze=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiManager=e},e=[{key:"loadMapView",value:(r=Ae(xe().mark((function t(e){var n,r,o,i=arguments;return xe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.length>1&&void 0!==i[1]?i[1]:null,t.prev=1,r="/map-views/v1/".concat(e,"/load"),o=n?{map_view_id:n}:{},t.next=6,this.apiManager.get(r,o);case 6:return t.abrupt("return",t.sent);case 9:return t.prev=9,t.t0=t.catch(1),console.error("Error fetching map data:",t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,this,[[1,9]])}))),function(t){return r.apply(this,arguments)})},{key:"loadMapViewSelectionState",value:(n=Ae(xe().mark((function t(e){var n,r,o,i,a,c=arguments;return xe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=c.length>1&&void 0!==c[1]?c[1]:null,r=c.length>2&&void 0!==c[2]?c[2]:null,o=c.length>3&&void 0!==c[3]?c[3]:null,t.prev=3,i="/map-views/v1/".concat(e,"/load/selection-state"),a={},n&&(a.map_view_id=n),null!==o&&(a.floor=o),t.next=10,this.apiManager.post(i,r,a);case 10:return t.abrupt("return",t.sent);case 13:return t.prev=13,t.t0=t.catch(3),console.error("Error loading map view selection state:",t.t0),t.abrupt("return",null);case 17:case"end":return t.stop()}}),t,this,[[3,13]])}))),function(t){return n.apply(this,arguments)})}],e&&ke(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();const _e=ze;function Pe(t){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pe(t)}function Be(){Be=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Pe(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Pe(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Ue(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Qe(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Ue(i,r,o,a,c,"next",t)}function c(t){Ue(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Re(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ye(r.key),r)}}function Ye(t){var e=function(t){if("object"!=Pe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pe(e)?e:e+""}var Fe=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiManager=e},e=[{key:"search",value:(r=Qe(Be().mark((function t(e,n,r){var o,i,a,c,s,u,l=arguments;return Be().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=l.length>3&&void 0!==l[3]?l[3]:0,i=l.length>4&&void 0!==l[4]?l[4]:30,a=l.length>5&&void 0!==l[5]?l[5]:null,c=l.length>6&&void 0!==l[6]?l[6]:"searchable_data_string",console.log("searching for",r,"on floor",a,"with skip",o,"and limit",i),t.prev=5,s={q:r,skip:o,limit:i,sort:c},console.log("params:",s),null!==a&&(s.floor=a),t.next=11,this.apiManager.get("/search/v1/".concat(e,"/").concat(n),s);case 11:return u=t.sent,t.abrupt("return",u);case 15:return t.prev=15,t.t0=t.catch(5),console.error("Error searching query:",t.t0),t.abrupt("return",null);case 19:case"end":return t.stop()}}),t,this,[[5,15]])}))),function(t,e,n){return r.apply(this,arguments)})},{key:"fetchContentPlacementDetails",value:(n=Qe(Be().mark((function t(e){var n;return Be().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.apiManager.get("/search/v1/".concat(e));case 3:return n=t.sent,t.abrupt("return",n);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error fetching content placment details:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return n.apply(this,arguments)})}],e&&Re(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();const Ve=Fe;function He(t){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},He(t)}function Ge(){Ge=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==He(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(He(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Ze(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function We(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Ze(i,r,o,a,c,"next",t)}function c(t){Ze(i,r,o,a,c,"throw",t)}a(void 0)}))}}function qe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Je(r.key),r)}}function Je(t){var e=function(t){if("object"!=He(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=He(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==He(e)?e:e+""}var Ke=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiManager=e},e=[{key:"findPath",value:(o=We(Ge().mark((function t(e,n,r){var o;return Ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,o={start_placement_id:n,end_placement_id:r,map_id:e},t.next=4,this.apiManager.post("/routes/v1/path",o);case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error fetching path data:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e,n){return o.apply(this,arguments)})},{key:"findPathFromNodeToPlacement",value:(r=We(Ge().mark((function t(e,n,r){var o;return Ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,o={start_node_id:n,end_placement_id:r,map_id:e},t.next=4,this.apiManager.post("/routes/v1/path/node_to_placement",o);case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error fetching path data:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e,n){return r.apply(this,arguments)})},{key:"findClosestNode",value:(n=We(Ge().mark((function t(e,n,r){var o;return Ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,o={map_id:e,coordinate:n,floor_num:r},t.next=4,this.apiManager.post("/routes/v1/closest",o);case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error fetching node data:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e,r){return n.apply(this,arguments)})}],e&&qe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,o}();const $e=Ke;function Xe(t){return Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xe(t)}function tn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,en(r.key),r)}}function en(t){var e=function(t){if("object"!=Xe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xe(e)?e:e+""}const nn=new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiKey=null,this.accountId=null,this.apiManager=new Te("https://api.waygomaps.com"),this.mapViewApi=new _e(this.apiManager),this.SearchApi=new Ve(this.apiManager),this.RoutesApi=new $e(this.apiManager)},(e=[{key:"setApiKey",value:function(t){this.apiKey=t}},{key:"getApiKey",value:function(){return this.apiKey}},{key:"setAccountId",value:function(t){this.accountId=t}},{key:"getAccountId",value:function(){return this.accountId}},{key:"getMapViewApi",value:function(){return this.mapViewApi}},{key:"getSearchApi",value:function(){return this.SearchApi}},{key:"getRotuesApi",value:function(){return this.RoutesApi}}])&&tn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());function rn(t){return new Promise((function(e,n){var r=document.createElement("script");r.type="text/javascript",r.src=t,r.onload=function(){return e()},r.onerror=function(){return n(new Error("Failed to load script: ".concat(t)))},document.head.appendChild(r)}))}function on(t){return new Promise((function(e,n){var r=document.createElement("link");r.rel="stylesheet",r.href=t,r.onload=function(){return e()},r.onerror=function(){return n(new Error("Failed to load CSS: ".concat(t)))},document.head.appendChild(r)}))}function an(t){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},an(t)}function cn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function sn(t,e,n){return(e=ln(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function un(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ln(r.key),r)}}function ln(t){var e=function(t){if("object"!=an(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=an(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==an(e)?e:e+""}const hn=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._listeners={}},e=[{key:"on",value:function(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}},{key:"off",value:function(t,e){if(!this._listeners[t])return this;var n=this._listeners[t].indexOf(e);return-1!==n&&this._listeners[t].splice(n,1),this}},{key:"fire",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this._listeners[t])return this;var n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?cn(Object(n),!0).forEach((function(e){sn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e);return n.hasOwnProperty("type")||(n.type=t),this._listeners[t].forEach((function(e,r){try{e(n)}catch(e){console.error(" ❌ Events: Error in listener ".concat(r+1," for event '").concat(t,"':"),e)}})),this}}],e&&un(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function fn(t){return fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fn(t)}function pn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,dn(r.key),r)}}function dn(t){var e=function(t){if("object"!=fn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=fn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fn(e)?e:e+""}function yn(t,e,n){return e=mn(e),function(t,e){if(e&&("object"==fn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,gn()?Reflect.construct(e,n||[],mn(t).constructor):e.apply(t,n))}function gn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gn=function(){return!!t})()}function mn(t){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mn(t)}function vn(t,e){return vn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vn(t,e)}const Mn=new(function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),yn(this,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vn(t,e)}(e,t),n=e,r=[{key:"emit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.fire(t,e)}}],r&&pn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(hn));function bn(t){return bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bn(t)}function wn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,jn(r.key),r)}}function jn(t){var e=function(t){if("object"!=bn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bn(e)?e:e+""}function Nn(t,e,n){return e=In(e),function(t,e){if(e&&("object"==bn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Dn()?Reflect.construct(e,n||[],In(t).constructor):e.apply(t,n))}function Dn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Dn=function(){return!!t})()}function In(t){return In=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},In(t)}function En(t,e){return En=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},En(t,e)}const Sn=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Nn(this,e)).options=n,t.globalHandlers={},t.stateSubscriptions=[],t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&En(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){}},{key:"render",value:function(){}},{key:"destroy",value:function(){this.removeAllGlobalHandlers(),this.unsubscribeAllState()}},{key:"addGlobalHandler",value:function(t,e){this.globalHandlers[t]||(this.globalHandlers[t]=[]),this.globalHandlers[t].push(e),Mn.on(t,e)}},{key:"removeGlobalHandler",value:function(t,e){this.globalHandlers[t]&&(this.globalHandlers[t]=this.globalHandlers[t].filter((function(t){return t!==e})),Mn.off(t,e))}},{key:"removeAllGlobalHandlers",value:function(){var t=this,e=function(e){t.globalHandlers[e].forEach((function(t){return Mn.off(e,t)}))};for(var n in this.globalHandlers)e(n);this.globalHandlers={}}},{key:"subscribeToState",value:function(t){this.stateSubscriptions.push(t),StateStore.subscribe(t)}},{key:"unsubscribeFromState",value:function(t){this.stateSubscriptions=this.stateSubscriptions.filter((function(e){return e!==t})),StateStore.unsubscribe(t)}},{key:"unsubscribeAllState",value:function(){this.stateSubscriptions.forEach((function(t){return StateStore.unsubscribe(t)})),this.stateSubscriptions=[]}}])&&wn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(hn);function Tn(t){return Tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tn(t)}function On(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,xn(r.key),r)}}function xn(t){var e=function(t){if("object"!=Tn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Tn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tn(e)?e:e+""}const Ln=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.mapView=e,this.state="default",this.stateHistory=["default"],this.isLoading=!1,this.loadingType=null},e=[{key:"transitionTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.state=t;var n=this.stateHistory[this.stateHistory.length-1];"default"==t?this.stateHistory=["default"]:t!==n&&this.stateHistory.push(t),this.mapView.fire("state:".concat(t),e)}},{key:"setLoading",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(this.isLoading,this.loadingType);this.isLoading=t,this.loadingType=e,t?this.mapView.fire("loading:start",{type:e}):this.mapView.fire("loading:end",{type:e||n})}},{key:"getLoadingState",value:function(){return{isLoading:this.isLoading,loadingType:this.loadingType}}}],e&&On(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();var An=["outdoor-cities-demo","johnson-controls-roadshow-2026"];function kn(t){var e=t*Math.PI/180,n=6378137,r=(Math.pow(n,.5)-Math.pow(6356752.314,.5))/Math.pow(n,.5);return{meterToLat:1/(111132.954-559.822*Math.cos(2*e)+1.175*Math.cos(4*e)),meterToLon:1/(Math.PI*n*Math.cos(e)/(180*Math.pow(1-Math.pow(r,2)*Math.pow(Math.sin(e),2),.5)))}}function Cn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null===e&&(e=[0,0]);var r=t[0],o=t[1],i=e[0],a=e[1],c=kn(a);return{lat:a+o*n*c.meterToLat,lon:i+r*n*c.meterToLon}}function zn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null===e&&(e=[0,0]);var r=[];return t.forEach((function(t){var o=Cn(t,e,n),i=o.lat,a=o.lon;r.push([a,i])})),r}function _n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null===e&&(e=[0,0]);var r=e[0],o=e[1],i=t[0],a=t[1],c=kn(o),s=c.meterToLat,u=c.meterToLon,l=(a-o)/n/s;return[Number(((i-r)/n/u).toFixed(2)),Number(l.toFixed(2))]}function Pn(t){return Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pn(t)}function Bn(){Bn=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Pn(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Pn(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Un(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}var Qn,Rn=null;function Yn(){return"undefined"!=typeof navigator&&void 0!==navigator.geolocation&&"function"==typeof navigator.geolocation.getCurrentPosition}function Fn(){return Vn.apply(this,arguments)}function Vn(){var t;return t=Bn().mark((function t(){var e;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Yn()){t.next=2;break}return t.abrupt("return","unsupported");case 2:if(void 0!==navigator.permissions&&"function"==typeof navigator.permissions.query){t.next=4;break}return t.abrupt("return","prompt");case 4:return t.prev=4,t.next=7,navigator.permissions.query({name:"geolocation"});case 7:return e=t.sent,t.abrupt("return",e.state);case 11:return t.prev=11,t.t0=t.catch(4),t.abrupt("return","prompt");case 14:case"end":return t.stop()}}),t,null,[[4,11]])})),Vn=function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Un(i,r,o,a,c,"next",t)}function c(t){Un(i,r,o,a,c,"throw",t)}a(void 0)}))},Vn.apply(this,arguments)}function Hn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.enableHighAccuracy,n=void 0===e||e,r=t.timeout,o=void 0===r?1e4:r,i=t.maximumAge,a=void 0===i?3e4:i;return new Promise((function(t,e){if(Yn()){var r=Rn?Date.now()-Rn.timestamp>3e4?(Rn=null,null):Rn:null;r?t(r):navigator.geolocation.getCurrentPosition((function(e){var n={coordinate:[e.coords.longitude,e.coords.latitude],accuracy:e.coords.accuracy,timestamp:Date.now()};Rn=n,t(n)}),(function(t){var n;switch(t.code){case 1:n="DENIED";break;case 2:default:n="UNAVAILABLE";break;case 3:n="TIMEOUT"}e({code:n,message:t.message})}),{enableHighAccuracy:n,timeout:o,maximumAge:a})}else e({code:"UNAVAILABLE",message:"Geolocation is not supported by this browser."})}))}function Gn(t){return Gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gn(t)}function Zn(t,e){if(t){if("string"==typeof t)return Wn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wn(t,e):void 0}}function Wn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function qn(){qn=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Gn(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Gn(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Jn(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Kn(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Jn(i,r,o,a,c,"next",t)}function c(t){Jn(i,r,o,a,c,"throw",t)}a(void 0)}))}}function $n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Xn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$n(Object(n),!0).forEach((function(e){ir(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$n(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function tr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ar(r.key),r)}}function er(t,e,n){return e=rr(e),function(t,e){if(e&&("object"==Gn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,nr()?Reflect.construct(e,n||[],rr(t).constructor):e.apply(t,n))}function nr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(nr=function(){return!!t})()}function rr(t){return rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rr(t)}function or(t,e){return or=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},or(t,e)}function ir(t,e,n){return(e=ar(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ar(t){var e=function(t){if("object"!=Gn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Gn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Gn(e)?e:e+""}var cr={default:"3.5.1","johnson-controls-roadshow-2026":"3.17.0","usbank-del-coronado-2026":"3.17.0"},sr={"johnson-controls-roadshow-2026":{text:"Find out more",key:"Registration"}},ur=["johnson-controls-roadshow-2026"],lr=["johnson-controls-roadshow-2026"],hr=["usbank-del-coronado-2026"];function fr(t){var e=cr[t]||cr.default;return{css:"https://api.mapbox.com/mapbox-gl-js/v".concat(e,"/mapbox-gl.css"),js:"https://api.mapbox.com/mapbox-gl-js/v".concat(e,"/mapbox-gl.js")}}var pr=(ir(ir(ir(ir(ir(ir(ir(ir(ir(ir(Qn={container:"map",sourceId:"2024.2xw_YUXYS8GoDTB2AQgN3A",center:[0,0],floor:0,zoom:13,bearing:0,pitch:46},"bearing",0),"minPitch",0),"maxPitch",60),"minZoom",0),"maxZoom",19.5),"bounds",null),"doubleClickZoom",!0),"dragPan",!0),"dragRotate",!0),"scrollZoom",!0),ir(ir(ir(ir(ir(ir(ir(ir(ir(ir(Qn,"touchPitch",!0),"touchZoomRotate",!0),"interactive",!0),"trackResize",!0),"keyboard",!0),"defaultControls",!1),"setup",!1),"selectionCriteria",null),"initialState","default"),"initialStateData",null),ir(Qn,"showQRCodeInKioskMode",!0)),dr=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=er(this,e,[Xn(Xn({},pr),n)])).mapViewApi=nn.getMapViewApi(),t.searchApi=nn.getSearchApi(),t.routesApi=nn.getRotuesApi(),t.mapContainer=document.createElement("div"),t.mapContainer.className="inner-map-container",t.initialState=n.initialState||"default",t.initialStateData=n.initialStateData||null,"selection"===t.initialState&&(t._createSelectionLoadingOverlay(),t._showSelectionLoadingOverlay()),t.ready=t._initialize(n),t.initialLoad=!1,t.originalFilters={},t._currentFloorIndex=n.floor,t._defaultFloorIndex=t.options.floor||0,t._defaultZoom=t.options.zoom||13,t._defaultBearing=t.options.bearing||0,t._defaultPitch=t.options.pitch||0,t.mapData=null,t._stateCoordinator=new Ln(t),t.defaultControls=n.defaultControls,t.setupControl=null,t.location=n.location||null,t.modalContainer=null,t.selectionCriteria=n.selectionCriteria||null,t.multiSelect=!0,t.confirmedSelection=null,t.kioskResetTimer=null,t.kioskCountdownInterval=null,t.isKioskMode=null!==t.location,t.gpsEnabled=!1,t.gpsPermissionState="prompt",t.isKioskMode?t._initializeKioskReset():console.log("📍 Not in kiosk mode - no auto-reset timer"),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&or(t,e)}(e,t),n=e,r=[{key:"showModal",value:function(t){var e=this;this.modalContainer||(this.modalContainer=document.createElement("div"),this.modalContainer.className="waygo-map-modal-container",this.mapContainer.appendChild(this.modalContainer),this.modalContainer.addEventListener("click",(function(t){t.target===e.modalContainer&&e.hideModal()})));var n=document.createElement("div");n.className="waygo-map-modal-content","string"==typeof t?n.innerHTML=t:n.appendChild(t),this.modalContainer.innerHTML="",this.modalContainer.appendChild(n),this.modalContainer.style.display="flex"}},{key:"hideModal",value:function(){this.modalContainer&&(this.modalContainer.style.display="none")}},{key:"_initialize",value:(v=Kn(qn().mark((function t(){var e,n,r=this;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e=this.options.sourceId.split(".")[0],t.next=4,this._loadMapLibraries(e);case 4:return mapboxgl.clearStorage(),this.render(),t.next=8,this._initializeMapData();case 8:if(this.mapData){t.next=11;break}return console.error("Error initializing map data."),t.abrupt("return");case 11:n=this.mapData.style_id,this.mapData.map_id,"undefined"!=typeof mapboxgl&&n?(mapboxgl.accessToken="pk.eyJ1Ijoid2F5Z28tbWFwcyIsImEiOiJjbGtxYzZ1N3QxdG43M210bXFuYmJ4a3gxIn0.tlbznj_fRJ8La6s2UUMO6A",this.map=new mapboxgl.Map({container:this.mapContainer,style:"mapbox://styles/waygo-maps/".concat(n),center:this.options.center,zoom:this.options.zoom,bearing:this.options.bearing,pitch:this.options.pitch,minPitch:this.options.minPitch,maxPitch:this.options.maxPitch,minZoom:this.options.minZoom,maxZoom:this.options.maxZoom,bounds:this.options.bounds,doubleClickZoom:this.options.doubleClickZoom,dragPan:this.options.dragPan,dragRotate:this.options.dragRotate,scrollZoom:this.options.scrollZoom,touchPitch:this.options.touchPitch,touchZoomRotate:this.options.touchZoomRotate,interactive:this.options.interactive,trackResize:this.options.trackResize,keyboard:this.options.keyboard}),this.map.on("styledata",(function(){r.initialLoad||(r._initializeOriginalFilters(),r.updateFloor(r.options.floor,!1),r.initialLoad=!0)})),this.map.on("style.load",(function(){console.log(mapboxgl.version)})),this.map.on("load",(function(){r.defaultControls&&(r._addLogoImage(),r._addDefaultControls(),r.updateFloor(r.options.floor,!1)),r._initializeState(),r.fire("load",{mapData:r.mapData})})),this._initializeEventListeners()):console.error("Mapbox GL JS is not loaded."),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(0),console.error("Failed to initialize the map:",t.t0);case 19:case"end":return t.stop()}}),t,this,[[0,16]])}))),function(){return v.apply(this,arguments)})},{key:"_addLogoImage",value:function(){if("johnson-controls-roadshow-2026"!==this.mapData.map_id){var t=document.createElement("div");t.className="logo-image-container";var e=document.createElement("img");e.className="logo-outline-element",e.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAxMCIgaGVpZ2h0PSI5NjQiIHZpZXdCb3g9IjAgMCA0MDEwIDk2NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02NTAuNzI2IDI0My40ODRDNTkzLjUyNyAyMTIuNzQ1IDU3My4wOTIgMjA5LjE4MiA1NjEuNjI3IDIwOS4xNzRDNTQ5LjYxMiAyMDkuMTY2IDUyNy42ODEgMjEzLjA2NiA0NjQuOTU0IDI0Ny4wMkwyMDkuMTkxIDQxOC4wOTNMMjA5LjE5MSA3MDIuMzkxTDQ2OS44OTQgNjA4LjY0QzUyNi4yNjcgNTg4LjM2OCA1ODcuOTQxIDU4OC4zNjggNjQ0LjMxMyA2MDguNjRMOTA1LjAxNyA3MDIuMzkxVjI2MC44Nkw5NzcuOTEyIDMxMC44NjhDOTgwLjQ2OCAzMTIuNjIxIDk4Mi45NDggMzE0LjQ1OCA5ODUuMzUxIDMxNi4zNzNDMTAxNS44OCAzNDAuNzEyIDEwMzMuODcgMzc3Ljc0NSAxMDMzLjg3IDQxNy4xMjJWNzAyLjM5MUMxMDMzLjg3IDc0NC4xMDYgMTAxNC41MyA3NzkuOTE4IDk4NS4zNTEgODAzLjE0M0M5ODEuMjk1IDgwNi4zNzEgOTc3LjA1IDgwOS4zNTYgOTcyLjY0IDgxMi4wOEM5NDAuOTEgODMxLjY3NyA5MDAuNjY2IDgzNy43NiA4NjEuNDEyIDgyMy42NDRMNjAwLjcwOSA3MjkuODkzQzU3Mi41MjIgNzE5Ljc1NyA1NDEuN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gODg0IDM0MDUuNjkgODIxLjEzMSAzNDA1LjY5IDY4Ni4xNzJWMjg2LjMyNEgzMzE2Ljg5Wk0zMTgzLjcgNjIzLjMwM0MzMTA3LjQ2IDYyMy4zMDMgMzA1MC41IDU2Ny4xMzkgMzA1MC41IDQ5MS42OTZDMzA1MC41IDQxNi4yNTMgMzEwNy40NiAzNjAuMDkgMzE4My43IDM2MC4wOUMzMjU5LjkzIDM2MC4wOSAzMzE2Ljg5IDQxNi4yNTMgMzMxNi44OSA0OTEuNjk2QzMzMTYuODkgNTY3LjEzOSAzMjU5LjkzIDYyMy4zMDMgMzE4My43IDYyMy4zMDNaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMzcwOC44NCA3MTYuMzQ5QzM4MzEuOTkgNzE2LjM0OSAzOTMwIDYxOS45NSAzOTMwIDQ5NS44ODhDMzkzMCAzNzAuOTg4IDM4MzEuOTkgMjc1LjQyNyAzNzA4Ljg0IDI3NS40MjdDMzU4Ni41NCAyNzUuNDI3IDM0ODcuNjkgMzcwLjk4OCAzNDg3LjY5IDQ5NS44ODhDMzQ4Ny42OSA2MTkuOTUgMzU4Ni41NCA3MTYuMzQ5IDM3MDguODQgNzE2LjM0OVpNMzcwOC44NCA2MjguMzMyQzM2MzUuMTIgNjI4LjMzMiAzNTc4LjE2IDU3Mi4xNjkgMzU3OC4xNiA0OTUuODg4QzM1NzguMTYgNDE5LjYwNiAzNjM1LjEyIDM2My40NDMgMzcwOC44NCAzNjMuNDQzQzM3ODIuNTYgMzYzLjQ0MyAzODM5LjUzIDQxOS42MDYgMzgzOS41MyA0OTUuODg4QzM4MzkuNTMgNTcyLjE2OSAzNzgyLjU2IDYyOC4zMzIgMzcwOC44NCA2MjguMzMyWiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",n.alt="Clickable image",t.appendChild(n),t.addEventListener("click",(function(){window.open("https://waygomaps.com","_blank")})),this.mapContainer.appendChild(t)}}},{key:"getCurrentFloor",value:function(){return this._currentFloorIndex}},{key:"_addDefaultControls",value:function(){var t=this;("selection"===this._stateCoordinator.state?[new Ws.FloorSelectorControl,new Ws.ContentPlacementControl,new Ws.InteractionControl]:[new Ws.SearchBoxControl,new Ws.FloorSelectorControl,new Ws.CategoryBarControl,new Ws.SearchResultsControl,new Ws.ContentPlacementControl,new Ws.DirectionsControl,new Ws.InteractionControl]).forEach((function(e){return t.addControl(e)}))}},{key:"_initializeOriginalFilters",value:function(){var t=this;this.map.getStyle().layers.forEach((function(e){"background"!==e.type&&"raster"!==e.type&&"heatmap"!==e.type&&(t.originalFilters[e.id]=t.map.getFilter(e.id)||null)}))}},{key:"_initializeEventListeners",value:function(){var t=this,e={passive:!0};this.mapContainer.addEventListener("mousedown",(function(e){return t.fire("mousedown",{originalEvent:e})})),this.mapContainer.addEventListener("click",(function(e){return t.fire("click",{originalEvent:e})})),this.mapContainer.addEventListener("mouseover",(function(e){return t.fire("mouseover",{originalEvent:e})})),this.mapContainer.addEventListener("mousemove",(function(e){return t.fire("mousemove",{originalEvent:e})})),this.mapContainer.addEventListener("dblclick",(function(e){return t.fire("dblclick",{originalEvent:e})})),this.mapContainer.addEventListener("mouseout",(function(e){return t.fire("mouseout",{originalEvent:e})})),this.mapContainer.addEventListener("contextmenu",(function(e){return t.fire("contextmenu",{originalEvent:e})})),this.mapContainer.addEventListener("wheel",(function(e){return t.fire("wheel",{originalEvent:e})})),this.mapContainer.addEventListener("touchstart",(function(e){return t.fire("touchstart",{originalEvent:e})}),e),this.mapContainer.addEventListener("touchend",(function(e){return t.fire("touchend",{originalEvent:e})}),e),this.mapContainer.addEventListener("touchmove",(function(e){return t.fire("touchmove",{originalEvent:e})}),e),this.mapContainer.addEventListener("touchcancel",(function(e){return t.fire("touchcancel",{originalEvent:e})}),e),this.mapContainer.addEventListener("move",(function(e){return t.fire("move",{originalEvent:e})})),["movestart","move","moveend","dragstart","drag","dragend","zoomstart","zoom","zoomend","rotatestart","rotate","rotateend","pitchstart","pitch","pitchend","boxzoomstart","boxzoomend","boxzoomcancel"].forEach((function(e){t.map.on(e,(function(n){t.fire(e,{originalEvent:n})}))})),this.on("selection:confirmed",(function(e){t.confirmedSelection=e.feature}))}},{key:"_initializeMapData",value:(m=Kn(qn().mark((function t(){var e,n,r,o;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((e=this.options.sourceId.split(".")).length<1||e.length>2)){t.next=4;break}return console.error('The sourceId format is incorrect. It should be in the format "mapId" or "mapId.mapViewId".'),t.abrupt("return");case 4:return n=e[0],r=e[1],t.prev=6,t.next=9,this.mapViewApi.loadMapView(n,r);case 9:return o=t.sent,this.mapData=o,nn.setAccountId(o.account_id),t.next=14,this._initializeGps();case 14:t.next=19;break;case 16:t.prev=16,t.t0=t.catch(6),console.error("Error fetching map style:",t.t0);case 19:case"end":return t.stop()}}),t,this,[[6,16]])}))),function(){return m.apply(this,arguments)})},{key:"_initializeGps",value:(g=Kn(qn().mark((function t(){var e,n,r;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.mapData){t.next=2;break}return t.abrupt("return");case 2:if(e=hr.includes(this.mapData.map_id),n=!!this.options.setup,r=e&&!this.isKioskMode&&!n&&Yn(),this.gpsEnabled=r,!r){t.next=10;break}return t.next=9,Fn();case 9:this.gpsPermissionState=t.sent;case 10:case"end":return t.stop()}}),t,this)}))),function(){return g.apply(this,arguments)})},{key:"shouldShowGpsCell",value:function(){return this.gpsEnabled&&"denied"!==this.gpsPermissionState}},{key:"_loadMapLibraries",value:(y=Kn(qn().mark((function t(e){var n,r,o;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=fr(e),r=n.css,o=n.js,t.next=3,on(r);case 3:return t.next=5,rn(o);case 5:mapboxgl.clearStorage();case 6:case"end":return t.stop()}}),t)}))),function(t){return y.apply(this,arguments)})},{key:"render",value:function(){var t=document.getElementById(this.options.container);t?(t.appendChild(this.mapContainer),this.mapContainer.style.width="100%",this.mapContainer.style.height="100%",this.mapContainer.style.position="relative"):console.error('Container element with id "'.concat(this.containerId,'" not found.'))}},{key:"updateFloor",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.map.getStyle().layers.forEach((function(n){if("background"!==n.type&&"raster"!==n.type&&"heatmap"!==n.type){var r=e.originalFilters[n.id];e.map.setFilter(n.id,r);var o=["==",["get","_floor"],t];if(r){var i=["all",o,r];e.map.setFilter(n.id,i)}else e.map.setFilter(n.id,o)}})),this._currentFloorIndex=t;var i=null!==o?o:this.map.getPitch(),a=null!==r?r:this.map.getBearing();if(n){var c=this.map.getStyle(),s=Object.keys(c.sources),u=[];if(s.forEach((function(n){var r="".concat(t,"-feature"),o=e.map.querySourceFeatures(n,{sourceLayer:r});u=u.concat(o)})),u.length>0){var l=new mapboxgl.LngLatBounds;u.forEach((function(t){var e=t.geometry;"Point"===e.type?l.extend(e.coordinates):"LineString"===e.type?e.coordinates.forEach((function(t){return l.extend(t)})):"Polygon"===e.type&&e.coordinates[0].forEach((function(t){return l.extend(t)}))})),this.map.fitBounds(l,{padding:{top:50,bottom:150,left:50,right:50},duration:1300,maxZoom:15.5,pitch:i,bearing:a})}else this.map.once("moveend",(function(){var n=[];if(s.forEach((function(r){var o="".concat(t,"-feature"),i=e.map.querySourceFeatures(r,{sourceLayer:o});n=n.concat(i)})),n.length>0){var r=new mapboxgl.LngLatBounds;n.forEach((function(t){var e=t.geometry;"Point"===e.type?r.extend(e.coordinates):"LineString"===e.type?e.coordinates.forEach((function(t){return r.extend(t)})):"Polygon"===e.type&&e.coordinates[0].forEach((function(t){return r.extend(t)}))})),e.map.fitBounds(r,{padding:50,duration:1300,maxZoom:15.5,pitch:i,bearing:a})}})),this.map.flyTo({zoom:this.map.getZoom()-3,duration:500,essential:!0})}this.fire("floorChanged",{floorIndex:t})}},{key:"addHighlightedFeature",value:function(t,e){var n=this.map.getSource("highlighted-content"),r=n._data,o={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};return r.features.push(o),n.setData(r),o}},{key:"addSelectedFeature",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.map.getSource("selected-content"),o=r._data,i={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};n?o.features.push(i):o.features=[i],r.setData(o)}},{key:"clearSelectedContentLayer",value:function(){this.map.getSource("selected-content").setData({type:"FeatureCollection",features:[]})}},{key:"clearHighlightedContentLayer",value:function(){this.map.getSource("highlighted-content").setData({type:"FeatureCollection",features:[]})}},{key:"addControl",value:function(t){var e=t.onAdd(this);this.mapContainer.appendChild(e)}},{key:"removeControl",value:function(t){this.map.removeControl(t)}},{key:"getCurrentState",value:function(){return this._stateCoordinator.state}},{key:"setToDefaultState",value:function(){this._stateCoordinator.transitionTo("default")}},{key:"setToSearchState",value:(d=Kn(qn().mark((function t(e){var n,r,o,i,a=arguments;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:0,r=a.length>2&&void 0!==a[2]?a[2]:30,o=a.length>3&&void 0!==a[3]?a[3]:null,this._stateCoordinator.setLoading(!0,"search"),t.prev=4,t.next=7,this.search(e,n,r,o);case 7:i=t.sent,this._stateCoordinator.transitionTo("search",{query:e,results:i}),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(4),console.error("❌ MapView: Search error occurred:",t.t0),this._stateCoordinator.setLoading(!1,"search");case 15:return t.prev=15,this._stateCoordinator.setLoading(!1,"search"),t.finish(15);case 18:case"end":return t.stop()}}),t,this,[[4,11,15,18]])}))),function(t){return d.apply(this,arguments)})},{key:"setToSelectedContentState",value:(p=Kn(qn().mark((function t(e){var n,r;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._stateCoordinator.setLoading(!0,"content"),t.prev=1,n=e[e.length-1],t.next=5,this.getContentPlacementDetails(n);case 5:r=t.sent,this.updateFloor(r.floor),this._stateCoordinator.transitionTo("selectedContent",{contentPlacementIds:e,selectedContentPlacement:r}),t.next=14;break;case 10:t.prev=10,t.t0=t.catch(1),console.error("❌ MapView: Content loading error occurred:",t.t0),this._stateCoordinator.setLoading(!1,"content");case 14:return t.prev=14,this._stateCoordinator.setLoading(!1,"content"),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,10,14,17]])}))),function(t){return p.apply(this,arguments)})},{key:"setToDirectionsState",value:(f=Kn(qn().mark((function t(){var e,n,r,o,i,a,c,s,u=arguments;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:null,n=u.length>1&&void 0!==u[1]?u[1]:null,r=u.length>2&&void 0!==u[2]?u[2]:{},t.prev=3,i=null,a=null,c=!!r.fromLocation,""!==e&&null!=e||(e=null),!r.startNodeId){t.next=13;break}a=r.startNodeId,console.log("🔵 MapView: Using startNodeId from options: ".concat(a)),t.next=33;break;case 13:if(e||null===(o=this.initialStateData)||void 0===o||!o.startNodeId){t.next=18;break}a=this.initialStateData.startNodeId,console.log("🔵 MapView: Using startNodeId from initialStateData: ".concat(a)),t.next=33;break;case 18:if(!e){t.next=33;break}return console.log("🔵 MapView: Attempting to fetch startContentPlacement for ID: ".concat(e)),t.prev=20,t.next=23,this.getContentPlacementDetails(e);case 23:i=t.sent,console.log("🔵 MapView: getContentPlacementDetails returned:",i),i&&i.placement_id?console.log("🔵 MapView: Successfully fetched startContentPlacement with placement_id: ".concat(i.placement_id)):(console.log("🔵 MapView: startContentPlacementId is a node ID (fetch returned invalid result): ".concat(e)),a=e,i=null),t.next=33;break;case 28:t.prev=28,t.t0=t.catch(20),console.log("🔵 MapView: Error fetching startContentPlacement (likely a node ID): ".concat(e),t.t0),a=e,i=null;case 33:if(s=null,!n){t.next=38;break}return t.next=37,this.getContentPlacementDetails(n);case 37:s=t.sent;case 38:console.log("🔵 MapView: Transitioning to directions state with:",{startContentPlacement:!!i,endContentPlacement:!!s,startNodeId:a}),this._stateCoordinator.transitionTo("directions",{startContentPlacement:i,endContentPlacement:s,startNodeId:a,fromLocation:c}),t.next=45;break;case 42:t.prev=42,t.t1=t.catch(3),console.error("❌ MapView: Directions state error occurred:",t.t1);case 45:case"end":return t.stop()}}),t,this,[[3,42],[20,28]])}))),function(){return f.apply(this,arguments)})},{key:"setToSetupState",value:(h=Kn(qn().mark((function t(){return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.map&&this.map.easeTo({pitch:0,bearing:0,duration:0}),this.setupControl||(this.setupControl=new Ws.SetupControl,this.addControl(this.setupControl)),this._stateCoordinator.transitionTo("setup");case 3:case"end":return t.stop()}}),t,this)}))),function(){return h.apply(this,arguments)})},{key:"setToSelectionState",value:(l=Kn(qn().mark((function t(e){var n,r,o,i,a,c,s=arguments;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=!(s.length>1&&void 0!==s[1])||s[1],this.selectionCriteria=e,this.multiSelect=n,this._stateCoordinator.setLoading(!0,"selection"),t.prev=4,t.next=7,this.mapViewApi.loadMapViewSelectionState(this.mapData.map_id,this.mapData.map_view_id,e);case 7:a=t.sent,this.selectionGeoJSON=a,console.log("✅ Selection GeoJSON loaded:",{type:null==a?void 0:a.type,featureCount:null==a||null===(r=a.features)||void 0===r?void 0:r.length,firstFeature:null==a||null===(o=a.features)||void 0===o?void 0:o[0],fullData:a}),this._stateCoordinator.transitionTo("selection",{criteria:e,geojson:a,multiSelect:n}),(null==a||null===(i=a.features)||void 0===i?void 0:i.length)>0&&(this.map.easeTo({pitch:0,bearing:0,duration:500}),c=new mapboxgl.LngLatBounds,a&&a.features&&(a.features.forEach((function(t){t.geometry&&t.geometry.coordinates&&("Point"===t.geometry.type?c.extend(t.geometry.coordinates):"LineString"===t.geometry.type?t.geometry.coordinates.forEach((function(t){return c.extend(t)})):"Polygon"===t.geometry.type&&t.geometry.coordinates[0].forEach((function(t){return c.extend(t)})))})),!1===c.isEmpty()&&this.map.fitBounds(c,{padding:80,duration:1e3,maxZoom:16}))),t.next=19;break;case 14:t.prev=14,t.t0=t.catch(4),console.error("❌ Error loading map view selection state:",t.t0),this.selectionGeoJSON=null,this._stateCoordinator.transitionTo("selection",{criteria:e,geojson:null,multiSelect:n});case 19:return t.prev=19,this._stateCoordinator.setLoading(!1,"selection"),t.finish(19);case 22:case"end":return t.stop()}}),t,this,[[4,14,19,22]])}))),function(t){return l.apply(this,arguments)})},{key:"getConfirmedSelection",value:function(){return this.confirmedSelection}},{key:"initiateBack",value:function(){this.fire("initiate:back")}},{key:"initiateSetToSearchState",value:function(){this.fire("initiate:search")}},{key:"initiateFindPath",value:function(t,e){this.fire("initiate:findPath",{startContentPlacementId:t,endContentPlacementId:e})}},{key:"initiateFindPathFromLocation",value:function(t){this.fire("initiate:findPathFromLocation",{location:this.location,endContentPlacement:t})}},{key:"findPath",value:(u=Kn(qn().mark((function t(e,n){var r;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._stateCoordinator.setLoading(!0,"directions"),t.prev=1,t.next=4,this.routesApi.findPath(this.mapData.map_id,e,n);case 4:if(!(r=t.sent)){t.next=9;break}return t.abrupt("return",r);case 9:console.error("Failed to find path.");case 10:return t.prev=10,this._stateCoordinator.setLoading(!1,"directions"),t.finish(10);case 13:case"end":return t.stop()}}),t,this,[[1,,10,13]])}))),function(t,e){return u.apply(this,arguments)})},{key:"findPathFromNodeToPlacement",value:(s=Kn(qn().mark((function t(e,n){var r;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._stateCoordinator.setLoading(!0,"directions"),t.prev=1,t.next=4,this.routesApi.findPathFromNodeToPlacement(this.mapData.map_id,e,n);case 4:if(!(r=t.sent)){t.next=9;break}return t.abrupt("return",r);case 9:console.error("Failed to find path.");case 10:return t.prev=10,this._stateCoordinator.setLoading(!1,"directions"),t.finish(10);case 13:case"end":return t.stop()}}),t,this,[[1,,10,13]])}))),function(t,e){return s.apply(this,arguments)})},{key:"useCurrentLocation",value:(c=Kn(qn().mark((function t(e){var n,r,o,i,a,c,s,u,l;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.gpsEnabled&&this.mapData){t.next=3;break}return this.fire("gps:fallback",{reason:"UNAVAILABLE"}),t.abrupt("return");case 3:return this._stateCoordinator.setLoading(!0,"directions"),t.prev=4,t.prev=5,t.next=8,Hn();case 8:n=t.sent,this.gpsPermissionState="granted",t.next=17;break;case 12:return t.prev=12,t.t0=t.catch(5),t.t0&&"DENIED"===t.t0.code&&(this.gpsPermissionState="denied"),this.fire("gps:fallback",{reason:t.t0&&t.t0.code||"UNAVAILABLE"}),t.abrupt("return");case 17:return r=this.mapData.reference_coordinate||[0,0],o=this.mapData.coordinate_scaling_multiplier||1,i=_n(n.coordinate,r,o),a=null!=this.mapData.default_floor?this.mapData.default_floor:0,t.next=23,this.routesApi.findClosestNode(this.mapData.map_id,i,a);case 23:if((c=t.sent)&&c.node_id){t.next=27;break}return this.fire("gps:fallback",{reason:"NO_NODE"}),t.abrupt("return");case 27:if(s=c.position_x-i[0],u=c.position_y-i[1],!((l=Math.sqrt(s*s+u*u))>150)){t.next=34;break}return console.log("🔵 MapView: GPS too far from nearest node (".concat(l.toFixed(1),"m > ").concat(150,"m)")),this.fire("gps:fallback",{reason:"TOO_FAR"}),t.abrupt("return");case 34:return t.next=36,this.setToDirectionsState(null,e,{startNodeId:c.node_id,fromLocation:!0});case 36:t.next=42;break;case 38:t.prev=38,t.t1=t.catch(4),console.error("❌ MapView: useCurrentLocation error:",t.t1),this.fire("gps:fallback",{reason:"UNAVAILABLE"});case 42:return t.prev=42,this._stateCoordinator.setLoading(!1,"directions"),t.finish(42);case 45:case"end":return t.stop()}}),t,this,[[4,38,42,45],[5,12]])}))),function(t){return c.apply(this,arguments)})},{key:"_findFeatureByPlacementId",value:function(t){var e=this.map.queryRenderedFeatures({filter:["==",["get","placement_id"],t]});return e.length>0?e[0]:null}},{key:"getCenter",value:function(){if(this.map)return this.map.getCenter();console.error("Map is not initialized.")}},{key:"setCenter",value:function(t){this.map?this.map.setCenter(t):console.error("Map is not initialized.")}},{key:"search",value:(a=Kn(qn().mark((function t(e){var n,r,o,i,a=arguments;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=a.length>1&&void 0!==a[1]?a[1]:0,r=a.length>2&&void 0!==a[2]?a[2]:30,o=a.length>3&&void 0!==a[3]?a[3]:null,""!==e){t.next=5;break}return t.abrupt("return");case 5:if(this.mapData){t.next=7;break}return t.abrupt("return");case 7:return i="searchable_data_string","johnson-controls-roadshow-2026"===this.mapData.map_id&&(i=null),t.prev=9,t.next=12,this.searchApi.search(this.mapData.map_id,this.mapData.map_view_id,e,n,r,o,i);case 12:return t.abrupt("return",t.sent);case 15:t.prev=15,t.t0=t.catch(9),axios.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 18:case"end":return t.stop()}}),t,this,[[9,15]])}))),function(t){return a.apply(this,arguments)})},{key:"getContentPlacementDetails",value:(i=Kn(qn().mark((function t(e){var n;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.searchApi.fetchContentPlacementDetails(e);case 3:return n=t.sent,t.abrupt("return",n);case 7:t.prev=7,t.t0=t.catch(0),axios.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Fetching content placement details error:",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})},{key:"flyTo",value:function(t){this.map.flyTo(t)}},{key:"removeMatchingFeaturesFromExistingLayers",value:function(t){var e=this;this.map.getStyle().layers.forEach((function(n){if("background"!==n.type&&"raster"!==n.type&&"heatmap"!==n.type){var r=n.id;if(r.includes("selectable-")||r.includes("booked-")||r.includes("selected-feature")||r.includes("confirmed-selection"))return;for(var o=e.map.getFilter(r),i=null,a=function(){var t,e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||Zn(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(s[c],2),n=e[0],r=e[1];if(Array.isArray(r)){var o=r.map((function(t){return["==",["get",n],t]}));t=["any"].concat(function(t){return function(t){if(Array.isArray(t))return Wn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Zn(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o))}else t=["==",["get",n],r];i=null===i?t:["all",i,t]},c=0,s=Object.entries(t);c<s.length;c++)a();var u=["!",i];if(u)if(o){var l=["all",o,u];e.map.setFilter(r,l)}else e.map.setFilter(r,u)}}))}},{key:"_getLabelGeometry",value:function(t){var e,n,r,o=(null===(e=this.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],i=(null===(n=this.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30,a=(null===(r=this.mapData)||void 0===r?void 0:r.map_id)||null;if(An.includes(a))return t.geometry;if(t.properties.label_location){var c=t.properties.label_location;if("string"==typeof c)try{c=JSON.parse(c)}catch(e){return console.warn("Failed to parse label_location JSON:",e),t.geometry}if(c&&c.coordinates&&Array.isArray(c.coordinates)&&c.coordinates.length>=2){var s=c.coordinates;if("number"==typeof s[0]&&"number"==typeof s[1]){var u=zn([s],o,i);return{type:"Point",coordinates:[Math.round(1e6*u[0][0])/1e6,Math.round(1e6*u[0][1])/1e6]}}}}return t.geometry}},{key:"_findOriginalFeature",value:function(t){return this.selectionGeoJSON&&this.selectionGeoJSON.features?this.selectionGeoJSON.features.find((function(e){return e.properties.feature_id===t})):null}},{key:"createSelectableContentLayers",value:function(){var t=this,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)||this.selectionGeoJSON;if(e&&e.features)try{var n,r;this.map.getLayer("selectable-label-layer")&&this.map.removeLayer("selectable-label-layer"),this.map.getLayer("selectable-outline-layer")&&this.map.removeLayer("selectable-outline-layer"),this.map.getLayer("selectable-fill-layer")&&this.map.removeLayer("selectable-fill-layer"),this.map.getLayer("booked-label-layer")&&this.map.removeLayer("booked-label-layer"),this.map.getLayer("booked-fill-layer")&&this.map.removeLayer("booked-fill-layer"),this.map.getSource("selectable-labels")&&this.map.removeSource("selectable-labels"),this.map.getSource("selectable-content")&&this.map.removeSource("selectable-content"),this.map.getSource("booked-labels")&&this.map.removeSource("booked-labels"),this.map.getSource("booked-content")&&this.map.removeSource("booked-content");var o=(null===(n=this.mapData)||void 0===n?void 0:n.reference_coordinate)||[0,0],i=(null===(r=this.mapData)||void 0===r?void 0:r.coordinate_scaling_multiplier)||30,a=e.features,c=a.filter((function(t){return"booked"!==t.properties.booking_status})),s=a.filter((function(t){return"booked"===t.properties.booking_status})),u={type:"FeatureCollection",features:c},l={type:"FeatureCollection",features:s};this.map.addSource("selectable-content",{type:"geojson",data:u,promoteId:"feature_id"}),this.map.addSource("booked-content",{type:"geojson",data:l,promoteId:"feature_id"});var h=c.map((function(t){return{type:"Feature",geometry:t.properties.label_location?{type:"Point",coordinates:zn([t.properties.label_location.coordinates],o,i)[0]}:t.geometry,properties:t.properties}})),f=s.map((function(t){return{type:"Feature",geometry:t.properties.label_location?{type:"Point",coordinates:zn([t.properties.label_location.coordinates],o,i)[0]}:t.geometry,properties:t.properties}}));this.map.addSource("selectable-labels",{type:"geojson",data:{type:"FeatureCollection",features:h}}),this.map.addSource("booked-labels",{type:"geojson",data:{type:"FeatureCollection",features:f}});var p=document.createElement("canvas");p.width=48,p.height=48;var d=p.getContext("2d");d.scale(1,1),d.fillStyle="white",d.beginPath(),d.arc(24,24,20,0,2*Math.PI),d.fill(),d.strokeStyle="#00C853",d.lineWidth=3,d.stroke(),d.strokeStyle="#00C853",d.lineWidth=4,d.lineCap="round",d.lineJoin="round",d.beginPath(),d.moveTo(14,24),d.lineTo(20,30),d.lineTo(34,16),d.stroke();var y=p.toDataURL("image/png");this.map.loadImage(y,(function(e,n){e?console.error("❌ Error loading canvas checkmark icon:",e):(t.map.addImage("checkmark-icon",n),t.map.getLayer("confirmed-selection-icon-layer")||t.map.addLayer({id:"confirmed-selection-icon-layer",type:"symbol",source:"confirmed-selection-labels",layout:{"icon-image":"checkmark-icon","icon-size":.6,"icon-anchor":"center","icon-allow-overlap":!0}}))})),this.map.addSource("confirmed-selection-labels",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:"confirmed-selection-label-layer",type:"symbol",source:"confirmed-selection-labels",layout:{"text-field":["get","name"],"text-font":["Inter Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",1.99],["zoom"],12,1.5,22,1e3]},paint:{"text-color":"#00C853","text-halo-color":"#ffffff","text-halo-width":1}}),this.map.addSource("confirmed-selection",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:"booked-fill-layer",type:"fill",source:"booked-content",paint:{"fill-color":"#f2f2f2","fill-opacity":1}}),this.map.addLayer({id:"booked-label-layer",type:"symbol",source:"booked-labels",layout:{"text-field":["get","name"],"text-font":["Inter Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",1.99],["zoom"],12,1.5,22,1e3]},paint:{"text-color":"#666666","text-halo-color":"#ffffff","text-halo-width":1}}),this.map.addLayer({id:"selectable-fill-layer",type:"fill",source:"selectable-content",paint:{"fill-color":"#FFFFFF","fill-opacity":.8}}),this.map.addLayer({id:"selectable-outline-layer",type:"line",source:"selectable-content",paint:{"line-color":"#1987ff","line-width":2}}),this.map.addLayer({id:"confirmed-selection-fill-layer",type:"fill",source:"confirmed-selection",paint:{"fill-color":"#d1fae2","fill-opacity":["interpolate",["linear"],["zoom"],10,.6,16,.8]}}),this.map.addLayer({id:"confirmed-selection-outline-layer",type:"line",source:"confirmed-selection",paint:{"line-color":"#00C853","line-width":2,"line-opacity":["interpolate",["linear"],["zoom"],10,.7,16,1]}}),this.map.addLayer({id:"selectable-label-layer",type:"symbol",source:"selectable-labels",layout:{"text-field":["get","name"],"text-font":["Inter Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",1.99],["zoom"],12,1.5,22,1e3]},paint:{"text-color":"#0263ca","text-halo-color":"#ffffff","text-halo-width":1}}),this.map.getStyle().layers.filter((function(t){return t.id.includes("selectable-")||t.id.includes("booked-")||t.id.includes("confirmed-selection")}))}catch(t){console.error("❌ ERROR:",t),console.error("Stack:",t.stack)}else console.error("❌ NO DATA TO CREATE LAYERS")}},{key:"removeSelectableContentLayers",value:function(){var t=this;["selectable-label-layer","selectable-outline-layer","selectable-fill-layer","booked-label-layer","booked-fill-layer","confirmed-selection-fill-layer","confirmed-selection-outline-layer","confirmed-selection-icon-layer","confirmed-selection-label-layer"].forEach((function(e){t.map.getLayer(e)&&t.map.removeLayer(e)})),this.map.getSource("selectable-content")&&this.map.removeSource("selectable-content"),this.map.getSource("selectable-labels")&&this.map.removeSource("selectable-labels"),this.map.getSource("booked-content")&&this.map.removeSource("booked-content"),this.map.getSource("booked-labels")&&this.map.removeSource("booked-labels"),this.map.getSource("confirmed-selection")&&this.map.removeSource("confirmed-selection"),this.map.getSource("confirmed-selection-labels")&&this.map.removeSource("confirmed-selection-labels"),this.map.hasImage("checkmark-icon")&&this.map.removeImage("checkmark-icon")}},{key:"clearSelectionLayers",value:function(){var t=this.map.getSource("confirmed-selection"),e=this.map.getSource("confirmed-selection-labels");t&&t.setData({type:"FeatureCollection",features:[]}),e&&e.setData({type:"FeatureCollection",features:[]})}},{key:"addConfirmedSelectionFeature",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.map.getSource("confirmed-selection"),o=this.map.getSource("confirmed-selection-labels"),i=this.map.getSource("selectable-content"),a=this.map.getSource("selectable-labels");if(r&&o&&i&&a){var c=r._data,s=o._data,u=i._data,l=a._data,h=t.properties.feature_id;if(n&&(c.features.forEach((function(t){var n=t.properties.feature_id,r=e._findOriginalFeature(n);r?(u.features.push(r),l.features.push({type:"Feature",geometry:e._getLabelGeometry(r),properties:r.properties})):(console.warn("⚠️ Original feature not found for feature:",n),u.features.push(t),l.features.push({type:"Feature",geometry:e._getLabelGeometry(t),properties:t.properties}))})),c.features=[],s.features=[]),!c.features.some((function(t){return t.properties.feature_id===h}))){c.features.push(t),r.setData(c);var f={type:"Feature",geometry:this._getLabelGeometry(t),properties:t.properties};s.features.push(f),o.setData(s),u.features=u.features.filter((function(t){return t.properties.feature_id!==h})),i.setData(u),l.features=l.features.filter((function(t){return t.properties.feature_id!==h})),a.setData(l)}}else console.error("❌ Required sources not found for confirmed selection")}},{key:"removeConfirmedSelectionFeature",value:function(t){var e=this.map.getSource("confirmed-selection"),n=this.map.getSource("confirmed-selection-labels"),r=this.map.getSource("selectable-content"),o=this.map.getSource("selectable-labels");if(e&&n&&r&&o){var i=e._data,a=n._data,c=r._data,s=o._data,u=i.features.find((function(e){return e.properties.feature_id===t}));if(u){var l=this._findOriginalFeature(t);if(l){c.features.push(l),r.setData(c);var h={type:"Feature",geometry:this._getLabelGeometry(l),properties:l.properties};s.features.push(h),o.setData(s)}else{console.warn("⚠️ Original feature not found for feature:",t);var f=u;c.features.push(f),r.setData(c);var p={type:"Feature",geometry:this._getLabelGeometry(f),properties:f.properties};s.features.push(p),o.setData(s)}i.features=i.features.filter((function(e){return e.properties.feature_id!==t})),e.setData(i),a.features=a.features.filter((function(e){return e.properties.feature_id!==t})),n.setData(a)}}else console.error("❌ Required sources not found for confirmed selection")}},{key:"getConfirmedSelectionFeatures",value:function(){var t=this.map.getSource("confirmed-selection");return t&&t._data.features||[]}},{key:"isFeatureSelected",value:function(t){return this.getConfirmedSelectionFeatures().some((function(e){return e.properties.placement_id===t||e.properties.feature_id===t}))}},{key:"_initializeState",value:(o=Kn(qn().mark((function t(){var e,n;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,t.t0=this.initialState,t.next="default"===t.t0?4:"search"===t.t0?6:"selectedContent"===t.t0?13:"directions"===t.t0?20:"selection"===t.t0?23:"setup"===t.t0?32:35;break;case 4:return this._stateCoordinator.transitionTo("default"),t.abrupt("break",38);case 6:if(!this.initialStateData||!this.initialStateData.query){t.next=11;break}return t.next=9,this.setToSearchState(this.initialStateData.query,this.initialStateData.skip||0,this.initialStateData.limit||30,this.initialStateData.floor||null);case 9:t.next=12;break;case 11:console.warn("⚠️ Search state requires initialStateData with query property");case 12:return t.abrupt("break",38);case 13:if(!this.initialStateData||!this.initialStateData.contentPlacementIds){t.next=18;break}return t.next=16,this.setToSelectedContentState(this.initialStateData.contentPlacementIds);case 16:t.next=19;break;case 18:console.warn("⚠️ SelectedContent state requires initialStateData with contentPlacementIds property");case 19:return t.abrupt("break",38);case 20:return t.next=22,this.setToDirectionsState((null===(e=this.initialStateData)||void 0===e?void 0:e.startContentPlacementId)||null,(null===(n=this.initialStateData)||void 0===n?void 0:n.endContentPlacementId)||null);case 22:return t.abrupt("break",38);case 23:if(!this.initialStateData||!this.initialStateData.criteria){t.next=29;break}return t.next=26,this.setToSelectionState(this.initialStateData.criteria,!1!==this.initialStateData.multiSelect);case 26:this._hideSelectionLoadingOverlay(),t.next=31;break;case 29:console.warn("⚠️ Selection state requires initialStateData with criteria property"),this._hideSelectionLoadingOverlay();case 31:return t.abrupt("break",38);case 32:return t.next=34,this.setToSetupState();case 34:return t.abrupt("break",38);case 35:return console.warn("⚠️ Unknown initial state:",this.initialState),this._hideSelectionLoadingOverlay(),t.abrupt("break",38);case 38:t.next=45;break;case 40:t.prev=40,t.t1=t.catch(0),console.error("❌ Error initializing state:",t.t1),this._hideSelectionLoadingOverlay(),this._stateCoordinator.transitionTo("default");case 45:case"end":return t.stop()}}),t,this,[[0,40]])}))),function(){return o.apply(this,arguments)})},{key:"_createSelectionLoadingOverlay",value:function(){this.selectionLoadingOverlay=document.createElement("div"),this.selectionLoadingOverlay.className="selection-loading-overlay";var t=document.createElement("div");t.className="selection-circular-progress";var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("viewBox","0 0 40 40");var n=document.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("class","progress-ring"),n.setAttribute("cx","20"),n.setAttribute("cy","20"),n.setAttribute("r","15");var r=document.createElementNS("http://www.w3.org/2000/svg","circle");r.setAttribute("class","progress-ring-fill"),r.setAttribute("cx","20"),r.setAttribute("cy","20"),r.setAttribute("r","15"),e.appendChild(n),e.appendChild(r),t.appendChild(e),this.selectionLoadingOverlay.appendChild(t);var o=document.getElementById(this.options.container);o?o.appendChild(this.selectionLoadingOverlay):this.mapContainer.appendChild(this.selectionLoadingOverlay)}},{key:"_showSelectionLoadingOverlay",value:function(){if(this.selectionLoadingOverlay){this.selectionLoadingOverlay.style.display="flex";var t=this.selectionLoadingOverlay.querySelector(".progress-ring-fill");t&&(t.classList.remove("animating"),t.style.strokeDashoffset="94.2",setTimeout((function(){t.classList.add("animating")}),50))}}},{key:"_hideSelectionLoadingOverlay",value:function(){if(this.selectionLoadingOverlay){this.selectionLoadingOverlay.classList.add("hidden");var t=this.selectionLoadingOverlay.querySelector(".progress-ring-fill");t&&(t.classList.remove("animating"),t.style.strokeDashoffset="188.4")}}},{key:"_initializeKioskReset",value:function(){var t=this;this.on("state:default",(function(){return t._resetKioskTimer()})),this.on("state:search",(function(){return t._resetKioskTimer()})),this.on("state:selectedContent",(function(){return t._resetKioskTimer()})),this.on("state:directions",(function(){return t._resetKioskTimer()})),this.on("state:setup",(function(){return t._resetKioskTimer()})),this.on("state:selection",(function(){return t._resetKioskTimer()})),this.on("moveend",(function(){return t._resetKioskTimer()})),this.on("zoomend",(function(){return t._resetKioskTimer()})),this.on("pitchend",(function(){return t._resetKioskTimer()})),this.on("rotateend",(function(){return t._resetKioskTimer()})),this.on("dragend",(function(){return t._resetKioskTimer()})),setTimeout((function(){t._startKioskTimer()}),100)}},{key:"_startKioskTimer",value:function(){var t=this,e=90;this.kioskCountdownInterval&&clearInterval(this.kioskCountdownInterval),this.kioskCountdownInterval=setInterval((function(){--e<=0&&clearInterval(t.kioskCountdownInterval)}),1e3),this.kioskResetTimer=setTimeout((function(){var e=t._stateCoordinator.state,n=(t._currentFloorIndex,t._defaultFloorIndex),r=t._defaultBearing,o=t._defaultPitch;t.hideModal(),t.updateFloor(n,!0,r,o),"default"!==e&&t.setToDefaultState(),t.kioskCountdownInterval&&clearInterval(t.kioskCountdownInterval)}),9e4)}},{key:"_resetKioskTimer",value:function(){this._stateCoordinator.state,this.kioskResetTimer&&clearTimeout(this.kioskResetTimer),this.kioskCountdownInterval&&clearInterval(this.kioskCountdownInterval),this._startKioskTimer()}},{key:"_destroyKioskTimer",value:function(){this.kioskResetTimer&&(clearTimeout(this.kioskResetTimer),this.kioskResetTimer=null),this.kioskCountdownInterval&&(clearInterval(this.kioskCountdownInterval),this.kioskCountdownInterval=null)}}],r&&tr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a,c,s,u,l,h,f,p,d,y,g,m,v}(Sn);const yr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE4IDZMNiAxOCIgc3Ryb2tlPSIjMTcxNzE3IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNNiA2TDE4IDE4IiBzdHJva2U9IiMxNzE3MTciIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=",gr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzI1MzFfOTIpIj4KPHBhdGggZD0iTTEyIDIyQzE3LjUyMjggMjIgMjIgMTcuNTIyOCAyMiAxMkMyMiA2LjQ3NzE1IDE3LjUyMjggMiAxMiAyQzYuNDc3MTUgMiAyIDYuNDc3MTUgMiAxMkMyIDE3LjUyMjggNi40NzcxNSAyMiAxMiAyMloiIHN0cm9rZT0iI0U1RTdFQiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPHBhdGggZD0iTTE5LjE0MjEgNS4wNzEwN0MxNS4yMzY4IDEuMTY1NzIgOC45MDUzNiAxLjE2NTcyIDUuMDAwMDEgNS4wNzEwNyIgc3Ryb2tlPSIjMTcxNzE3IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzI1MzFfOTIiPgo8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==";function mr(t){return mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mr(t)}function vr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Mr(r.key),r)}}function Mr(t){var e=function(t){if("object"!=mr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=mr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mr(e)?e:e+""}function br(t,e,n){return e=jr(e),function(t,e){if(e&&("object"==mr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,wr()?Reflect.construct(e,n||[],jr(t).constructor):e.apply(t,n))}function wr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wr=function(){return!!t})()}function jr(t){return jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jr(t)}function Nr(t,e){return Nr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Nr(t,e)}const Dr=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=br(this,e,[n]))._initialize(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nr(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="search-bar-container",this.input=document.createElement("input"),this.input.type="text",this.input.placeholder="",this.input.className="search-bar",this.rightButton=document.createElement("button"),this.rightButton.className="search-bar-button-right",this.updateRightButtonIcon("search"),this.leftButton=document.createElement("button"),this.leftButton.className="search-bar-button-left",this.updateLeftButtonIcon("none"),this.loadingIndicator=document.createElement("div"),this.loadingIndicator.className="search-bar-loading-indicator",this.loadingIndicator.innerHTML='<img src="'.concat(gr,'" alt="Loading" />'),this.loadingIndicator.style.display="none",this.element.appendChild(this.leftButton),this.element.appendChild(this.input),this.element.appendChild(this.loadingIndicator),this.element.appendChild(this.rightButton),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.input.addEventListener("input",(function(e){return t._handleInput(e)})),this.input.addEventListener("focus",this._handleFocus.bind(this)),this.input.addEventListener("blur",this._handleBlur.bind(this)),this.input.addEventListener("keydown",(function(e){"Enter"===e.key&&t._handleEnterSelect(e)})),this.rightButton.addEventListener("click",(function(e){return t._handleRightButtonSelect(e)})),this.leftButton.addEventListener("click",(function(e){return t._handleLeftButtonSelect(e)}))}},{key:"_handleInput",value:function(t){this.fire("input",{event:t,query:this.getText()})}},{key:"_handleFocus",value:function(){var t=this,e=window.innerHeight,n=0,r=function(){var o=window.innerHeight;o===e?n+=1:n=0,e=o,n>=3?t.fire("focus"):requestAnimationFrame(r)};requestAnimationFrame(r)}},{key:"_handleBlur",value:function(){var t=this;setTimeout((function(){var e=document.activeElement;e===t.rightButton?(t.updateStyleWithoutSuggestions(),t.fire("blur")):e===t.input||(t.updateStyleWithoutSuggestions(),t.fire("blur"))}),150)}},{key:"_handleEnterSelect",value:function(t){var e=this.getText();e.length>0&&(this.fire("search",{query:e,event:t}),this.input.blur())}},{key:"_handleRightButtonSelect",value:function(t){if("search"===this.rightButtonState){var e=this.getText();e.length>0&&(this.fire("search",{query:e,event:t}),this.input.blur())}else"cancel"===this.rightButtonState&&this.fire("cancel",{event:t})}},{key:"_handleLeftButtonSelect",value:function(t){"logo"===this.leftButtonState?this.input.focus():"back"===this.leftButtonState&&this.fire("back")}},{key:"updateStyleWithSuggestions",value:function(){this.element.classList.add("with-results")}},{key:"updateStyleWithoutSuggestions",value:function(){this.element.classList.remove("with-results")}},{key:"updateRightButtonIcon",value:function(t){this.rightButtonState=t,"search"===t?(this.rightButton.innerHTML='<img src="'.concat("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iNyIgc3Ryb2tlPSIjMTcxNzE3IiBzdHJva2Utd2lkdGg9IjIiLz4KPHBhdGggZD0iTTIwIDIwTDE3IDE3IiBzdHJva2U9IiMxNzE3MTciIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+Cjwvc3ZnPgo=",'" alt="Search" />'),this.rightButton.style.display="flex"):"cancel"===t?(this.rightButton.innerHTML='<img src="'.concat(yr,'" alt="Cancel" />'),this.rightButton.style.display="flex"):"none"===t&&(this.rightButton.style.display="none")}},{key:"updateLeftButtonIcon",value:function(t){if(this.leftButtonState=t,"logo"===t){this.leftButton.innerHTML='<img src="'.concat("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQ5IiBoZWlnaHQ9IjExNyIgdmlld0JveD0iMCAwIDE0OSAxMTciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0yMC41IDk2LjgwOVY1Mi42ODIxTDYwLjE5NzIgMjYuMTI5NEM2OS45MzMyIDIwLjg1OTIgNzMuMzM3MiAyMC4yNTM5IDc1LjIwMjEgMjAuMjU1MUM3Ny4wMzg2IDIwLjI1NjQgODAuMzU4MSAyMC44NDU0IDg5LjkwMzEgMjYuMDUyOEwxMDEuNSAzNC4wMDg2VjkuNzU1MTJMMTAyLjA5OCAxMC4xNjVMMTAwLjQgOC45OTk5OUM3OS4zMzc2IC0yLjYzOTk3IDcxLjE1OTUgLTIuNjc5NjYgNDkuODMzMyA4Ljk5OTk5TDkuMzgwNTIgMzYuMDU4MkMzLjgzMTI2IDM5Ljc3IDAuNSA0Ni4wMDU5IDAuNSA1Mi42ODIxVjk2LjgwOUMwLjUgMTEwLjY1OCAxNC4yMzU4IDEyMC4zMTYgMjcuMjY3OSAxMTUuNjI5TDY3LjczMiAxMDEuMDc4QzcyLjEwNjkgOTkuNTA0MyA3Ni44OTMxIDk5LjUwNDMgODEuMjY4IDEwMS4wNzhMMTIxLjczMiAxMTUuNjI5QzEzNC43NjQgMTIwLjMxNiAxNDguNSAxMTAuNjU4IDE0OC41IDk2LjgwOVY1Mi41MzE1QzE0OC41IDQ1LjkzODUgMTQ1LjI1MSAzOS43NjkxIDEzOS44MTQgMzYuMDM5NEwxMjguNSAyOC4yNzc1Vjk2LjgwOUw4OC4wMzU5IDgyLjI1NzVDNzkuMjg2MiA3OS4xMTEgNjkuNzEzOCA3OS4xMTEgNjAuOTY0MSA4Mi4yNTc1TDIwLjUgOTYuODA5WiIgZmlsbD0iIzFFMUUxRSIvPgo8L3N2Zz4K",'" alt="').concat(t,'" />');var e=this.leftButton.querySelector("img");e.style.width="16px",e.style.height="16px",this.leftButton.style.display="flex"}else if("back"===t){this.leftButton.innerHTML='<img src="'.concat("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTguNDYwMDIgMTEuMjg5NUwxNC4xMiA1LjYzOTU1QzE0LjIxMyA1LjU0NTgyIDE0LjMyMzYgNS40NzE0MyAxNC40NDU0IDUuNDIwNjZDMTQuNTY3MyA1LjM2OTg5IDE0LjY5OCA1LjM0Mzc1IDE0LjgzIDUuMzQzNzVDMTQuOTYyIDUuMzQzNzUgMTUuMDkyNyA1LjM2OTg5IDE1LjIxNDYgNS40MjA2NkMxNS4zMzY1IDUuNDcxNDMgMTUuNDQ3MSA1LjU0NTgyIDE1LjU0IDUuNjM5NTVDMTUuNzI2MyA1LjgyNjkxIDE1LjgzMDggNi4wODAzNiAxNS44MzA4IDYuMzQ0NTVDMTUuODMwOCA2LjYwODczIDE1LjcyNjMgNi44NjIxOSAxNS41NCA3LjA0OTU1TDEwLjU5IDEyLjA0OTVMMTUuNTQgMTYuOTk5NUMxNS43MjYzIDE3LjE4NjkgMTUuODMwOCAxNy40NDA0IDE1LjgzMDggMTcuNzA0NUMxNS44MzA4IDE3Ljk2ODcgMTUuNzI2MyAxOC4yMjIyIDE1LjU0IDE4LjQwOTVDMTUuNDQ3NCAxOC41MDQgMTUuMzM3IDE4LjU3OTIgMTUuMjE1MSAxOC42MzA3QzE1LjA5MzIgMTguNjgyMiAxNC45NjIzIDE4LjcwOSAxNC44MyAxOC43MDk1QzE0LjY5NzcgMTguNzA5IDE0LjU2NjggMTguNjgyMiAxNC40NDUgMTguNjMwN0MxNC4zMjMxIDE4LjU3OTIgMTQuMjEyNiAxOC41MDQgMTQuMTIgMTguNDA5NUw4LjQ2MDAyIDEyLjc1OTVDOC4zNTg1MSAxMi42NjU5IDguMjc3NSAxMi41NTIzIDguMjIyMSAxMi40MjU4QzguMTY2NjkgMTIuMjk5MyA4LjEzODA5IDEyLjE2MjYgOC4xMzgwOSAxMi4wMjQ1QzguMTM4MDkgMTEuODg2NCA4LjE2NjY5IDExLjc0OTggOC4yMjIxIDExLjYyMzNDOC4yNzc1IDExLjQ5NjggOC4zNTg1MSAxMS4zODMyIDguNDYwMDIgMTEuMjg5NVYxMS4yODk1WiIgZmlsbD0iIzFFMUUxRSIvPgo8L3N2Zz4K",'" alt="').concat(t,'" />');var n=this.leftButton.querySelector("img");n.style.width="20px",n.style.height="20px",this.leftButton.style.display="flex"}else"none"===t&&(this.leftButton.style.display="none")}},{key:"setPlaceholderText",value:function(t){this.input.placeholder=t}},{key:"getText",value:function(){return this.input.value}},{key:"setText",value:function(t){this.input.value=t}},{key:"getElement",value:function(){return this.element}},{key:"setViewForDesktop",value:function(){this.element.classList.remove("mobile-view"),this.input.classList.remove("mobile-view")}},{key:"setViewForMobile",value:function(){this.element.classList.add("mobile-view"),this.input.classList.add("mobile-view")}},{key:"showLoading",value:function(){this.loadingIndicator.style.display="flex"}},{key:"hideLoading",value:function(){this.loadingIndicator.style.display="none",this.rightButton.style.display="flex"}}],r&&vr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Ir(t){return Ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ir(t)}function Er(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Sr(r.key),r)}}function Sr(t){var e=function(t){if("object"!=Ir(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ir(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ir(e)?e:e+""}function Tr(t,e,n){return e=xr(e),function(t,e){if(e&&("object"==Ir(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Or()?Reflect.construct(e,n||[],xr(t).constructor):e.apply(t,n))}function Or(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Or=function(){return!!t})()}function xr(t){return xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xr(t)}function Lr(t,e){return Lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lr(t,e)}const Ar=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=Tr(this,e,[r])).result=t,n._initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lr(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="search-bar-suggestions-view-cell",this.result&&"gps-current-location"===this.result.type&&this.element.classList.add("search-bar-suggestions-view-cell--gps"),this.render(),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.element.addEventListener("click",(function(){return t.fire("click",{result:t.result})}))}},{key:"render",value:function(){if(this.result&&"gps-current-location"===this.result.type)this.element.innerHTML='\n <div class="suggestion-gps-icon" aria-hidden="true">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <circle cx="12" cy="12" r="3"></circle>\n <line x1="12" y1="2" x2="12" y2="5"></line>\n <line x1="12" y1="19" x2="12" y2="22"></line>\n <line x1="2" y1="12" x2="5" y2="12"></line>\n <line x1="19" y1="12" x2="22" y2="12"></line>\n </svg>\n </div>\n <div class="suggestion-title">Use current location</div>\n ';else{var t=this.result.catalog.content_title_key;this.element.innerHTML='\n <div class="suggestion-title">'.concat(this.result.content.data[t],'</div>\n <div class="suggestion-subtitle">').concat(this.result.contextual_location,"</div>\n ")}}},{key:"getElement",value:function(){return this.element}}])&&Er(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function kr(t){return kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kr(t)}function Cr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,zr(r.key),r)}}function zr(t){var e=function(t){if("object"!=kr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=kr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kr(e)?e:e+""}function _r(t,e,n){return e=Br(e),function(t,e){if(e&&("object"==kr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Pr()?Reflect.construct(e,n||[],Br(t).constructor):e.apply(t,n))}function Pr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Pr=function(){return!!t})()}function Br(t){return Br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Br(t)}function Ur(t,e){return Ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ur(t,e)}const Qr=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=_r(this,e,[n]))._initialize(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ur(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.results=[],this.pinnedResults=[],this.element=document.createElement("div"),this.element.className="search-bar-suggestions-view"}},{key:"updateResults",value:function(t){this.results=t,this.render()}},{key:"setPinnedResults",value:function(t){this.pinnedResults=t||[],this.render()}},{key:"hasPinnedResults",value:function(){return this.pinnedResults.length>0}},{key:"render",value:function(){var t=this;this.element.innerHTML="",this.pinnedResults.forEach((function(e){var n=new Ar(e);n.on("click",(function(){return t.fire("selectCell",{result:e})})),t.element.appendChild(n.getElement())})),this.results.forEach((function(e){var n=new Ar(e);n.on("click",(function(){return t.fire("selectCell",{result:e})})),t.element.appendChild(n.getElement())}))}},{key:"clearResults",value:function(){this.updateResults([])}},{key:"show",value:function(){this.element.classList.add("visible")}},{key:"hide",value:function(){this.element.classList.remove("visible")}},{key:"getElement",value:function(){return this.element}},{key:"setViewForDesktop",value:function(){}},{key:"setViewForMobile",value:function(){}}])&&Cr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Rr(t){return Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rr(t)}function Yr(){Yr=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Rr(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Rr(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Fr(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Vr(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Fr(i,r,o,a,c,"next",t)}function c(t){Fr(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Hr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Gr(r.key),r)}}function Gr(t){var e=function(t){if("object"!=Rr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Rr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Rr(e)?e:e+""}function Zr(t,e,n){return e=qr(e),function(t,e){if(e&&("object"==Rr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Wr()?Reflect.construct(e,n||[],qr(t).constructor):e.apply(t,n))}function Wr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Wr=function(){return!!t})()}function qr(t){return qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qr(t)}function Jr(t,e){return Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jr(t,e)}const Kr=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Zr(this,e,[n])).element=document.createElement("div"),t.element.className="search-box",t.searchBar=new Dr,t.searchBarSuggestionsView=new Qr,t.searchCount=0,t.showSuggestionsOnEmptyFocus=!1,t.initializeHandlers(),t._render(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jr(t,e)}(e,t),n=e,r=[{key:"initializeHandlers",value:function(){this.searchBar.on("input",this._handleSearchBarInput.bind(this)),this.searchBar.on("focus",this._handleSearchBarFocus.bind(this)),this.searchBar.on("blur",this._handleSearchBarBlur.bind(this)),this.searchBar.on("search",this._handleSearchBarSearch.bind(this)),this.searchBar.on("back",this._handleSearchBarBack.bind(this)),this.searchBarSuggestionsView.on("selectCell",this._handleSearchResultSelect.bind(this)),window.addEventListener("resize",(function(t){t.preventDefault()}))}},{key:"_handleSearchBarBack",value:function(){this.fire("selectBack")}},{key:"_handleSearchBarSearch",value:function(t){var e=t.query;t.event,this.fire("search",{query:e})}},{key:"_handleSearchResultSelect",value:function(t){t.result}},{key:"_handleSearchBarFocus",value:(a=Vr(Yr().mark((function t(){var e;return Yr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((e=this.searchBar.getText()).length>2)){t.next=7;break}return t.next=4,this.getSearchBarSuggestions(e);case 4:this.openSuggestionsView(),t.next=8;break;case 7:this.showSuggestionsOnEmptyFocus&&this.searchBarSuggestionsView.hasPinnedResults()&&this.openSuggestionsView();case 8:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"_handleSearchBarBlur",value:function(){this.closeSuggestionsView()}},{key:"_handleSearchBarInput",value:(i=Vr(Yr().mark((function t(e){var n;return Yr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0===(n=e.query).length){t.next=7;break}return this.openSuggestionsView(),t.next=5,this.getSearchBarSuggestions(n);case 5:t.next=8;break;case 7:this.showSuggestionsOnEmptyFocus&&this.searchBarSuggestionsView.hasPinnedResults()?(this.searchBarSuggestionsView.updateResults([]),this.openSuggestionsView()):this.closeSuggestionsView();case 8:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_render",value:function(){this.element.appendChild(this.searchBar.getElement()),this.element.appendChild(this.searchBarSuggestionsView.getElement())}},{key:"setViewForDesktop",value:function(){this.searchBar.setViewForDesktop(),this.searchBarSuggestionsView.setViewForDesktop()}},{key:"setViewForMobile",value:function(){this.searchBar.setViewForMobile(),this.searchBarSuggestionsView.setViewForMobile()}},{key:"getElement",value:function(){return this.element}},{key:"openSuggestionsView",value:function(){this.searchBarSuggestionsView.show(),this.searchBar.updateStyleWithSuggestions()}},{key:"closeSuggestionsView",value:function(){this.searchBarSuggestionsView.hide(),this.searchBar.updateStyleWithoutSuggestions()}},{key:"setPinnedResults",value:function(t){this.searchBarSuggestionsView.setPinnedResults(t)}},{key:"clearPinnedResults",value:function(){this.searchBarSuggestionsView.setPinnedResults([])}},{key:"setShowSuggestionsOnEmptyFocus",value:function(t){this.showSuggestionsOnEmptyFocus=!!t}},{key:"getSearchBarSuggestions",value:(o=Vr(Yr().mark((function t(e){return Yr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.fire("getSearchBarSuggestions",{query:e});case 1:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})}],r&&Hr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a}(Sn);function $r(t){return $r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$r(t)}function Xr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,to(r.key),r)}}function to(t){var e=function(t){if("object"!=$r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=$r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$r(e)?e:e+""}const eo=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.map=null,this.currentViewType=null},(e=[{key:"onAdd",value:function(t){this.map=t}},{key:"onRemove",value:function(){this.container&&(this.container.parentNode.removeChild(this.container),this.map=void 0)}},{key:"_attachResizeListener",value:function(){var t=this.map.mapContainer.offsetWidth;this._configureView(t)}},{key:"_initialize",value:function(){if(this.map){var t=this.map.mapContainer.offsetWidth;this._configureView(t)}}},{key:"_configureView",value:function(t){t>767?this._setViewForDesktop():this._setViewForMobile()}},{key:"_setViewForDesktop",value:function(){this.currentViewType="desktop",this._updateContentView()}},{key:"_setViewForMobile",value:function(){this.currentViewType="mobile",this._updateContentView()}},{key:"_updateContentView",value:function(){this._clearViews(),"desktop"===this.currentViewType?this._renderDesktopView():this._renderMobileView()}},{key:"_clearViews",value:function(){for(;this.container.firstChild;)this.container.removeChild(this.container.firstChild),this.container.classList.remove("mobile-view"),this.container.classList.remove("desktop-view")}},{key:"show",value:function(){this.container&&(this.container.style.display="block","mobile"===this.currentViewType&&(document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"))}},{key:"hide",value:function(){this.container&&(this.container.style.display="none",document.body.style.overflow="",document.documentElement.style.overflow="")}},{key:"_renderDesktopView",value:function(){}},{key:"_renderMobileView",value:function(){}}])&&Xr(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function no(t){return no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},no(t)}function ro(){ro=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==no(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(no(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function oo(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function io(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ao(r.key),r)}}function ao(t){var e=function(t){if("object"!=no(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=no(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==no(e)?e:e+""}function co(t,e,n){return e=lo(e),function(t,e){if(e&&("object"==no(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,so()?Reflect.construct(e,n||[],lo(t).constructor):e.apply(t,n))}function so(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(so=function(){return!!t})()}function uo(){return uo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=lo(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},uo.apply(null,arguments)}function lo(t){return lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lo(t)}function ho(t,e){return ho=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ho(t,e)}const fo=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=co(this,e,[n])).searchBox=new Kr,t.searchApi=nn.getSearchApi(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ho(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){this.map=t,this.container=document.createElement("div"),this.container.className="search-box-control-container";var e=this.searchBox.getElement();return this.container.appendChild(e),this._initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.show(),this.testLoadingState=this._testLoadingState.bind(this),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=uo(lo(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"_initializeEventListeners",value:function(){this.searchBox.searchBarSuggestionsView.on("selectCell",this._handleSuggestionSelect.bind(this)),this.searchBox.searchBar.on("cancel",this._handleSearchBarCancel.bind(this)),this.searchBox.on("search",this._handleSearchBoxSearch.bind(this)),this.searchBox.on("selectBack",this._handleSearchBoxSelectBack.bind(this)),this.searchBox.on("getSearchBarSuggestions",this._handleGettingSearchBarSuggestions.bind(this)),this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("load",this._handleMapLoad.bind(this)),this.map.on("loading:start",this._handleLoadingStart.bind(this)),this.map.on("loading:end",this._handleLoadingEnd.bind(this))}},{key:"_handleMapLoad",value:function(t){var e=t.mapData.map_name;e?this.searchBox.searchBar.setPlaceholderText("Search ".concat(e)):this.searchBox.searchBar.setPlaceholderText("Search")}},{key:"_handleGettingSearchBarSuggestions",value:(o=ro().mark((function t(e){var n,r,o;return ro().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.query,r=++this.searchBox.searchCount,""!==n){t.next=5;break}return this.searchBox.searchBarSuggestionsView.updateResults([]),t.abrupt("return");case 5:if(this.map.mapData){t.next=7;break}return t.abrupt("return");case 7:return t.prev=9,t.next=12,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,n,0,5);case 12:o=t.sent,r===this.searchBox.searchCount&&this.searchBox.searchBarSuggestionsView.updateResults(o),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(9),be.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 19:case"end":return t.stop()}}),t,this,[[9,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){oo(i,n,r,a,c,"next",t)}function c(t){oo(i,n,r,a,c,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})},{key:"_renderDesktopView",value:function(){var t=this.searchBox.getElement();this.container.appendChild(t),this.container.classList.add("desktop-view"),this.container.classList.remove("mobile-view"),t&&this.searchBox.setViewForDesktop()}},{key:"_renderMobileView",value:function(){var t=this.searchBox.getElement();this.container.appendChild(t),this.container.classList.add("mobile-view"),this.container.classList.remove("desktop-view"),t&&this.searchBox.setViewForMobile()}},{key:"bringToFront",value:function(){this.container.style.zIndex="10"}},{key:"bringBack",value:function(){this.container.style.zIndex=""}},{key:"_handleSearchBoxSelectBack",value:function(){this.map.initiateBack()}},{key:"_handleSearchBarCancel",value:function(t){this.map.setToDefaultState()}},{key:"_handleSearchBoxSearch",value:function(t){var e=t.query;this.map.setToSearchState(e)}},{key:"_handleSuggestionSelect",value:function(t){var e=t.result;this.map.setToSelectedContentState([e.placement_id])}},{key:"_handleDefaultState",value:function(){this.searchBox.searchBarSuggestionsView.clearResults(),this.searchBox.closeSuggestionsView(),this.searchBox.searchBar.setText(""),this.searchBox.searchBar.updateRightButtonIcon("search"),this.searchBox.searchBar.updateLeftButtonIcon("none"),this.searchBox.searchBar.hideLoading(),this.bringToFront(),this.show()}},{key:"_handleSearchState",value:function(t){var e=t.query;t.results,this.searchBox.searchBar.setText(e),this.searchBox.searchBar.updateRightButtonIcon("cancel"),this.searchBox.searchBar.updateLeftButtonIcon("none"),this.bringToFront(),this.show()}},{key:"_handleSelectedContentState",value:function(t){var e=t.contentPlacementIds,n=t.selectedContentPlacement;this.show(),this.bringToFront();var r=n.catalog.content_title_key,o=n.content.data[r];this.searchBox.searchBar.setText(o),this.searchBox.searchBar.updateRightButtonIcon("cancel"),this.map._stateCoordinator.stateHistory.length>2||e.length>1?this.searchBox.searchBar.updateLeftButtonIcon("back"):this.searchBox.searchBar.updateLeftButtonIcon("none")}},{key:"_handleDirectionsState",value:function(t){this.show(),this.bringBack();var e=this.map._stateCoordinator.stateHistory.length;this.searchBox.searchBar.updateRightButtonIcon("cancel"),e>2?this.searchBox.searchBar.updateLeftButtonIcon("back"):this.searchBox.searchBar.updateLeftButtonIcon("none")}},{key:"_handleSetupState",value:function(){this.hide()}},{key:"_handleSelectionState",value:function(t){this.hide()}},{key:"_handleLoadingStart",value:function(t){this.searchBox.searchBar.showLoading(),this.searchBox.searchBar.updateRightButtonIcon(this.searchBox.searchBar.rightButtonState),this.searchBox.searchBar.updateLeftButtonIcon(this.searchBox.searchBar.leftButtonState)}},{key:"_handleLoadingEnd",value:function(t){this.searchBox.searchBar.hideLoading()}},{key:"_testLoadingState",value:function(){var t=this;this.searchBox.searchBar.showLoading(),setTimeout((function(){t.searchBox.searchBar.hideLoading()}),2e3)}}],r&&io(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}(eo);function po(t){return po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},po(t)}function yo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,go(r.key),r)}}function go(t){var e=function(t){if("object"!=po(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=po(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==po(e)?e:e+""}function mo(t,e,n){return e=Mo(e),function(t,e){if(e&&("object"==po(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,vo()?Reflect.construct(e,n||[],Mo(t).constructor):e.apply(t,n))}function vo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(vo=function(){return!!t})()}function Mo(t){return Mo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Mo(t)}function bo(t,e){return bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bo(t,e)}const wo=function(t){function e(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=mo(this,e,[o])).items=r,n.buttonElements=[],n.allowsToggle=null===(t=o.allowsToggle)||void 0===t||t,n.containerClass=o.container,n.element=document.createElement("div"),n.element.className="slider-bar-container ".concat(n.containerClass),n.sliderBar=document.createElement("div"),n.sliderBar.className="slider-bar ".concat(n.containerClass,"-bar"),n.leftButton=document.createElement("button"),n.leftButton.className="scroll-button left ".concat(n.containerClass,"-scroll-button"),n.leftButton.style.backgroundImage="url(".concat("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTExLjI4OTkgMTEuOTk5N0wxNC44Mjk5IDguNDU5N0MxNS4wMTYyIDguMjcyMzQgMTUuMTIwNyA4LjAxODg5IDE1LjEyMDcgNy43NTQ3QzE1LjEyMDcgNy40OTA1MiAxNS4wMTYyIDcuMjM3MDcgMTQuODI5OSA3LjA0OTdDMTQuNzM3IDYuOTU1OTggMTQuNjI2NCA2Ljg4MTU4IDE0LjUwNDUgNi44MzA4MUMxNC4zODI3IDYuNzgwMDQgMTQuMjUyIDYuNzUzOTEgMTQuMTE5OSA2Ljc1MzkxQzEzLjk4NzkgNi43NTM5MSAxMy44NTcyIDYuNzgwMDQgMTMuNzM1NCA2LjgzMDgxQzEzLjYxMzUgNi44ODE1OCAxMy41MDI5IDYuOTU1OTggMTMuNDA5OSA3LjA0OTdMOS4xNjk5NCAxMS4yODk3QzkuMDc2MjIgMTEuMzgyNyA5LjAwMTgyIDExLjQ5MzMgOC45NTEwNSAxMS42MTUxQzguOTAwMjggMTEuNzM3IDguODc0MTUgMTEuODY3NyA4Ljg3NDE1IDExLjk5OTdDOC44NzQxNSAxMi4xMzE3IDguOTAwMjggMTIuMjYyNCA4Ljk1MTA1IDEyLjM4NDNDOS4wMDE4MiAxMi41MDYxIDkuMDc2MjIgMTIuNjE2NyA5LjE2OTk0IDEyLjcwOTdMMTMuNDA5OSAxNi45OTk3QzEzLjUwMzQgMTcuMDkyNCAxMy42MTQyIDE3LjE2NTcgMTMuNzM2IDE3LjIxNTVDMTMuODU3OSAxNy4yNjUyIDEzLjk4ODMgMTcuMjkwNSAxNC4xMTk5IDE3LjI4OTdDMTQuMjUxNiAxNy4yOTA1IDE0LjM4MiAxNy4yNjUyIDE0LjUwMzggMTcuMjE1NUMxNC42MjU3IDE3LjE2NTcgMTQuNzM2NSAxNy4wOTI0IDE0LjgyOTkgMTYuOTk5N0MxNS4wMTYyIDE2LjgxMjMgMTUuMTIwNyAxNi41NTg5IDE1LjEyMDcgMTYuMjk0N0MxNS4xMjA3IDE2LjAzMDUgMTUuMDE2MiAxNS43NzcxIDE0LjgyOTkgMTUuNTg5N0wxMS4yODk5IDExLjk5OTdaIiBmaWxsPSIjMTcxNzE3Ii8+Cjwvc3ZnPgo=",")"),n.leftButton.addEventListener("click",(function(){return n._scrollSliderBar("left")})),n.rightButton=document.createElement("button"),n.rightButton.className="scroll-button right ".concat(n.containerClass,"-scroll-button"),n.rightButton.style.backgroundImage="url(".concat("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMj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OTYgMTIuMjYyNCAxNS4xMjU3IDEyLjEzMTcgMTUuMTI1NyAxMS45OTk3QzE1LjEyNTcgMTEuODY3NyAxNS4wOTk2IDExLjczNyAxNS4wNDg4IDExLjYxNTFDMTQuOTk4MSAxMS40OTMzIDE0LjkyMzcgMTEuMzgyNyAxNC44Mjk5IDExLjI4OTdaIiBmaWxsPSIjMTcxNzE3Ii8+Cjwvc3ZnPgo=",")"),n.rightButton.addEventListener("click",(function(){return n._scrollSliderBar("right")})),n.buttonElements=[],n.selectedValue=null,n._render(),n.sliderBar.addEventListener("scroll",(function(){return n._updateScrollButtons()})),setTimeout((function(){return n._updateScrollButtons()}),.8),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bo(t,e)}(e,t),n=e,r=[{key:"updateItems",value:function(t){this.items=t,this.sliderBar.innerHTML="",this.buttonElements=[],this._render(),this._updateScrollButtons()}},{key:"_render",value:function(){var t=this;this.items.forEach((function(e){var n=document.createElement("button");n.addEventListener("click",t._handleSliderButtonSelect.bind(t)),n.className="slider-bar-button ".concat(t.containerClass,"-button");var r=document.createElement("span");r.textContent=e,n.appendChild(r),t.buttonElements.push(n),t.sliderBar.appendChild(n)})),this.element.appendChild(this.leftButton),this.element.appendChild(this.sliderBar),this.element.appendChild(this.rightButton)}},{key:"setViewForDesktop",value:function(){this.buttonElements.forEach((function(t){t&&t.classList.remove("mobile-view")}))}},{key:"setViewForMobile",value:function(){this.buttonElements.forEach((function(t){t&&t.classList.add("mobile-view")}))}},{key:"_handleSliderButtonSelect",value:function(t){var e=t.currentTarget,n=e.querySelector("span").textContent,r=this.buttonElements.indexOf(e);if(e.classList.contains("selected"))this.allowsToggle&&(e.classList.remove("selected"),this.fire("".concat(this.containerClass,":deselect")),this.selectedValue=null);else{var o=document.querySelector(".slider-bar-button.".concat(this.containerClass,"-button.selected"));o&&o.classList.remove("selected"),e.classList.add("selected"),this.selectedValue=n,this.fire("".concat(this.containerClass,":selectNew"),{query:n,index:r})}}},{key:"_scrollSliderBar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:275,n=this.sliderBar.scrollWidth-this.sliderBar.clientWidth,r=this.sliderBar.scrollLeft,o=e;if("right"===t){var i=n-r;i<e&&(o=i)}"left"===t?this.sliderBar.scrollBy({left:-e,behavior:"smooth"}):"right"===t&&this.sliderBar.scrollBy({left:o,behavior:"smooth"})}},{key:"_updateScrollButtons",value:function(){var t=this.sliderBar.scrollLeft,e=this.sliderBar.scrollWidth-this.sliderBar.clientWidth;this.leftButton.style.display=t<=0?"none":"block";var n=Math.abs(e-t);this.rightButton.style.display=n<=1?"none":"block"}},{key:"deselectAll",value:function(){var t=this.sliderBar.querySelectorAll(".slider-bar-button.".concat(this.containerClass,"-button.selected"));t&&t.forEach((function(t){return t.classList.remove("selected")}))}},{key:"deselectAllNotMatchingQuery",value:function(t){var e=this.sliderBar.querySelectorAll(".slider-bar-button.".concat(this.containerClass,"-button.selected"));e&&e.forEach((function(e){e.textContent!==t&&e.classList.remove("selected")}))}},{key:"invertButtonAtIndex",value:function(t){var e=this.buttonElements[t];e?e.classList.toggle("inverted"):console.error("Button at index ".concat(t," does not exist."))}},{key:"selectButtonAtIndex",value:function(t){var e=this.buttonElements[t];if(e)if(e.classList.contains("selected"))console.log("button is already selected");else{this.deselectAll();var n=e.querySelector("span").textContent;e.classList.add("selected"),this.selectedValue=n,this.fire("".concat(this.containerClass,":selectNew"),{query:n,index:t})}}},{key:"getIndexOfSelectedButton",value:function(){return this.buttonElements.findIndex((function(t){return t.classList.contains("selected")}))}},{key:"refresh",value:function(){var t=this;this.element.innerHTML="",this.sliderBar.innerHTML="",this.buttonElements=[],this._render(),setTimeout((function(){t._updateScrollButtons()}),100)}},{key:"getElement",value:function(){return this.element}},{key:"show",value:function(){this.element.classList.add("visible")}},{key:"hide",value:function(){this.element.classList.remove("visible")}}],r&&yo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function jo(t){return jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jo(t)}function No(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Do(r.key),r)}}function Do(t){var e=function(t){if("object"!=jo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=jo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jo(e)?e:e+""}function Io(t,e,n){return e=To(e),function(t,e){if(e&&("object"==jo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Eo()?Reflect.construct(e,n||[],To(t).constructor):e.apply(t,n))}function Eo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Eo=function(){return!!t})()}function So(){return So="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=To(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},So.apply(null,arguments)}function To(t){return To=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},To(t)}function Oo(t,e){return Oo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Oo(t,e)}const xo=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Io(this,e,[n])).categoryBarContainerName="category-bar",t.categoryBar=new wo([],{container:"category-bar"}),t.map=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oo(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){this.map=t,this.container=document.createElement("div"),this.container.className="category-bar-control-container";var e=this.categoryBar.getElement();return this.container.appendChild(e),this.initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.show(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=So(To(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.categoryBar.on("".concat(this.categoryBarContainerName,":selectNew"),this._handleNewCategoryButtonSelect.bind(this)),this.categoryBar.on("".concat(this.categoryBarContainerName,":deselect"),this._handleCategoryButtonDeselect.bind(this)),this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("load",this._handleMapLoad.bind(this))}},{key:"_handleMapLoad",value:function(t){var e=t.mapData.suggested_search_terms;e&&this.categoryBar.updateItems(e)}},{key:"_renderDesktopView",value:function(){var t=this.categoryBar.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view"),this.map.mapContainer.offsetWidth,this.categoryBar.setViewForDesktop()}},{key:"_renderMobileView",value:function(){var t=this.categoryBar.getElement();this.container.appendChild(t),this.map.mapContainer.offsetWidth,this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view"),this.categoryBar.setViewForMobile()}},{key:"_handleDefaultState",value:function(){this.show(),this.categoryBar.refresh(),this.categoryBar.deselectAll()}},{key:"_handleSelectedContentState",value:function(t){this.hide()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleNewCategoryButtonSelect",value:function(t){var e=t.query,n=this.map.getCurrentFloor();this.map.setToSearchState(e,0,30,n)}},{key:"_handleCategoryButtonDeselect",value:function(){this.map.setToDefaultState()}},{key:"_handleSearchState",value:function(t){var e=t.query;t.results,this.show(),this.categoryBar.deselectAllNotMatchingQuery(e)}},{key:"_handleSetupState",value:function(){this.hide()}},{key:"_handleSelectionState",value:function(){this.hide()}}],r&&No(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(eo);function Lo(t){return Lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lo(t)}function Ao(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ko(r.key),r)}}function ko(t){var e=function(t){if("object"!=Lo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Lo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lo(e)?e:e+""}function Co(t,e,n){return e=_o(e),function(t,e){if(e&&("object"==Lo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,zo()?Reflect.construct(e,n||[],_o(t).constructor):e.apply(t,n))}function zo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zo=function(){return!!t})()}function _o(t){return _o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_o(t)}function Po(t,e){return Po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Po(t,e)}const Bo=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=Co(this,e,[r])).result=t,n._initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Po(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="search-results-view-cell",this.render(),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.element.addEventListener("click",(function(){return t.fire("click",{result:t.result})})),this.element.addEventListener("mouseover",(function(){return t.fire("hover",{result:t.result})})),this.element.addEventListener("mouseout",(function(){return t.fire("hoverOut",{result:t.result})}))}},{key:"render",value:function(){var t=this.result.catalog.content_title_key;this.element.innerHTML='\n <div class="result-title">'.concat(this.result.content.data[t],'</div>\n <div class="result-subtitle">').concat(this.result.catalog.title," · ").concat(this.result.contextual_location,"</div>\n ")}},{key:"getElement",value:function(){return this.element}}])&&Ao(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Uo(t){return Uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uo(t)}function Qo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ro(r.key),r)}}function Ro(t){var e=function(t){if("object"!=Uo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Uo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Uo(e)?e:e+""}function Yo(t,e,n){return e=Vo(e),function(t,e){if(e&&("object"==Uo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Fo()?Reflect.construct(e,n||[],Vo(t).constructor):e.apply(t,n))}function Fo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Fo=function(){return!!t})()}function Vo(t){return Vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vo(t)}function Ho(t,e){return Ho=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ho(t,e)}const Go=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Yo(this,e,[n]))._initialize(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ho(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="loading-cell",this.render()}},{key:"render",value:function(){this.element.innerHTML='\n <div class="loading-spinner"></div>\n '}},{key:"getElement",value:function(){return this.element}}])&&Qo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Zo(t){return Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zo(t)}function Wo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function qo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Jo(r.key),r)}}function Jo(t){var e=function(t){if("object"!=Zo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Zo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Zo(e)?e:e+""}function Ko(t,e,n){return e=Xo(e),function(t,e){if(e&&("object"==Zo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$o()?Reflect.construct(e,n||[],Xo(t).constructor):e.apply(t,n))}function $o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($o=function(){return!!t})()}function Xo(t){return Xo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xo(t)}function ti(t,e){return ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ti(t,e)}const ei=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Ko(this,e,[n]))._initialize(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ti(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.results=[],this.loading=!1,this.element=document.createElement("div"),this.element.className="search-results-view",this.titleElement=document.createElement("h3"),this.titleElement.className="search-results-title",this.element.appendChild(this.titleElement)}},{key:"showLoadingCell",value:function(){if(!this.loading){var t=new Go;this.loading=!0,this.element.appendChild(t.getElement())}}},{key:"hideLoadingCell",value:function(){var t=this.element.querySelector(".loading-cell");t&&this.element.removeChild(t),this.loading=!1}},{key:"updateView",value:function(t,e){this.results=t,t.length>0&&this.setTitle("Results for '".concat(e,"'")),0===t.length&&this.setTitle("No matching results for '".concat(e,"'")),this.scrollToTop(),this.render()}},{key:"scrollToTop",value:function(){this.element.scrollTop=0}},{key:"updateResults",value:function(t){this.results=t,this.render()}},{key:"extendResults",value:function(t){var e;(e=this.results).push.apply(e,function(t){return function(t){if(Array.isArray(t))return Wo(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Wo(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wo(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)),this.render()}},{key:"render",value:function(){for(var t=this;this.element.children.length>1;)this.element.removeChild(this.element.lastChild);this.results.forEach((function(e){var n=new Bo(e);n.on("click",(function(){return t.fire("selectCell",{result:e})})),n.on("hover",(function(){return t.fire("hoverCell",{result:e})})),n.on("hoverOut",(function(){return t.fire("hoverOutCell",{result:e})})),t.element.appendChild(n.getElement())}))}},{key:"setTitle",value:function(t){this.titleElement.innerText=t}},{key:"show",value:function(){this.element.classList.add("visible")}},{key:"hide",value:function(){this.element.classList.remove("visible")}},{key:"getElement",value:function(){return this.element}}])&&qo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function ni(t){return ni="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ni(t)}function ri(){ri=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==ni(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(ni(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function oi(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function ii(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){oi(i,r,o,a,c,"next",t)}function c(t){oi(i,r,o,a,c,"throw",t)}a(void 0)}))}}function ai(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ci(r.key),r)}}function ci(t){var e=function(t){if("object"!=ni(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ni(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ni(e)?e:e+""}function si(t,e,n){return e=hi(e),function(t,e){if(e&&("object"==ni(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ui()?Reflect.construct(e,n||[],hi(t).constructor):e.apply(t,n))}function ui(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ui=function(){return!!t})()}function li(){return li="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=hi(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},li.apply(null,arguments)}function hi(t){return hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hi(t)}function fi(t,e){return fi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fi(t,e)}const pi=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=si(this,e,[n])).searchResultsView=new ei,t.searchApi=nn.getSearchApi(),t.searchedQuery=null,t.map=null,t.lastSearchLength=0,t.skip=0,t.limit=30,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fi(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){this.map=t,this.container=document.createElement("div"),this.container.className="search-results-control-container";var e=this.searchResultsView.getElement();return this.container.appendChild(e),this.hide(),this._initializeEventListeners(),this._attachResizeListener(),this._attachScrollListener(),this._initialize(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=li(hi(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"_initializeEventListeners",value:function(){this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("initiate:search",this._handleInitiateSearchState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.searchResultsView.on("closeView",this._handleCloseSearchResultsView.bind(this)),this.searchResultsView.on("selectCell",this._handleSearchResultSelect.bind(this)),this.searchResultsView.on("hoverCell",this._handleCellHover.bind(this)),this.searchResultsView.on("hoverOutCell",this._handleCellHoverOut.bind(this))}},{key:"_handleCellHover",value:function(t){var e=t.result;this.map.fire("hoverSearchResult",{result:e})}},{key:"_handleCellHoverOut",value:function(t){var e=t.result;this.map.fire("hoverEndSearchResult",{result:e})}},{key:"_attachScrollListener",value:function(){this.searchResultsView.getElement().addEventListener("scroll",this._handleScroll.bind(this))}},{key:"_renderDesktopView",value:function(){var t=this.searchResultsView.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view")}},{key:"_renderMobileView",value:function(){var t=this.searchResultsView.getElement();this.container.appendChild(t),this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view")}},{key:"_handleScroll",value:(i=ii(ri().mark((function t(){var e,n,r,o,i;return ri().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.searchResultsView.getElement(),n=e.scrollTop,r=e.scrollHeight,o=e.clientHeight,!(r-n-o+0<10)||this.searchResultsView.loading||this.lastSearchLength!==this.limit){t.next=14;break}return this.searchResultsView.showLoadingCell(),t.next=8,this._getAdditionalSearchResults();case 8:i=t.sent,this.lastSearchLength=i.length,this.searchResultsView.extendResults(i),this.skip+=this.limit,this.map.fire("additionalSearchResults",{results:i}),this.searchResultsView.hideLoadingCell();case 14:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"_getAdditionalSearchResults",value:(o=ii(ri().mark((function t(){var e,n,r;return ri().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.searchedQuery,n=this.map.getCurrentFloor(),""!==e){t.next=5;break}return this.searchBox.searchBarSuggestionsView.updateResults([]),t.abrupt("return");case 5:if(this.map.mapData){t.next=7;break}return t.abrupt("return");case 7:return t.prev=7,t.next=10,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,e,this.skip,this.limit,n);case 10:return r=t.sent,t.abrupt("return",r);case 14:t.prev=14,t.t0=t.catch(7),axios.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 17:case"end":return t.stop()}}),t,this,[[7,14]])}))),function(){return o.apply(this,arguments)})},{key:"_handleInitiateSearchState",value:function(){this.map.setToSearchState(this.searchedQuery)}},{key:"_handleSearchResultSelect",value:function(t){var e=t.result.placement_id;this.map.setToSelectedContentState([e])}},{key:"_handleCloseSearchResultsView",value:function(){this.map.setToDefaultState()}},{key:"_handleDefaultState",value:function(){this.searchedQuery=null,this.searchResultsView.updateResults([]),this.searchResultsView.scrollToTop(),this.hide()}},{key:"_handleSearchState",value:function(t){var e=t.query,n=t.results;this.searchedQuery=e,this.lastSearchLength=n.length,this.skip=this.limit,this.searchResultsView.updateResults([]);var r=this.map.mapData.floors;r.length>1&&this.searchResultsView.updateView(n,e,r),this.searchResultsView.updateView(n,e),this.show()}},{key:"_handleSelectedContentState",value:function(t){this.searchResultsView.updateResults([]),this.hide()}},{key:"_handleDirectionsState",value:function(t){}},{key:"_handleSetupState",value:function(){this.hide()}}],r&&ai(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}(eo);function di(t){return di="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},di(t)}function yi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,gi(r.key),r)}}function gi(t){var e=function(t){if("object"!=di(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=di(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==di(e)?e:e+""}function mi(t,e,n){return e=Mi(e),function(t,e){if(e&&("object"==di(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,vi()?Reflect.construct(e,n||[],Mi(t).constructor):e.apply(t,n))}function vi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(vi=function(){return!!t})()}function Mi(t){return Mi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Mi(t)}function bi(t,e){return bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bi(t,e)}const wi=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=mi(this,e,[r])).contentPlacement=t,n._initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bi(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){var t=this.contentPlacement.content;this.element=document.createElement("div"),this.element.className="content-placement-header",this.textContainer=document.createElement("div"),this.textContainer.className="header-text-container",this.textContainer.style.paddingLeft="10px",this.nameElement=document.createElement("div"),this.nameElement.className="header-content-name";var e=this.contentPlacement.catalog.content_title_key,n=t.data[e];this.nameElement.textContent=n,this.catalogNameElement=document.createElement("div"),this.catalogNameElement.className="header-catalog-name",this.catalogNameElement.textContent=this.contentPlacement.catalog.title,this.textContainer.appendChild(this.nameElement),this.textContainer.appendChild(this.catalogNameElement);var r=this.contentPlacement.catalog.content_display_img_key,o=t.data[r];if(o){this.imageViewElement=document.createElement("div"),this.imageViewElement.className="header-image-view";var i=document.createElement("img");i.className="header-image",i.src=o,i.style.width="100%",i.style.height="100%",i.style.objectFit="contain",i.style.background="white",this.imageViewElement.appendChild(i),this.element.appendChild(this.imageViewElement)}this.element.appendChild(this.textContainer)}},{key:"getElement",value:function(){return this.element}}])&&yi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function ji(t){return ji="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ji(t)}function Ni(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Di(r.key),r)}}function Di(t){var e=function(t){if("object"!=ji(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ji(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ji(e)?e:e+""}function Ii(t,e,n){return e=Si(e),function(t,e){if(e&&("object"==ji(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ei()?Reflect.construct(e,n||[],Si(t).constructor):e.apply(t,n))}function Ei(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ei=function(){return!!t})()}function Si(t){return Si=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Si(t)}function Ti(t,e){return Ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ti(t,e)}const Oi=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=Ii(this,e,[i])).icon=t,r.text=n,r.link=o,r._initialize(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ti(t,e)}(e,t),n=e,(r=[{key:"_formatUrl",value:function(t){return t?(t=t.trim(),/^https?:\/\//i.test(t)||(t="https://"+t),t):t}},{key:"_initialize",value:function(){this.link?(this.element=document.createElement("a"),this.element.href=this._formatUrl(this.link),this.element.target="_blank",this.element.rel="noopener noreferrer",this.element.style.textDecoration="none"):this.element=document.createElement("div"),this.element.className="contextual-location-view",this.imageViewElement=document.createElement("img"),this.imageViewElement.className="contextual-location-image",this.imageViewElement.src=this.icon,this.textElement=document.createElement("span"),this.textElement.textContent=this.text,this.textElement.className="contextual-location-text",this.element.appendChild(this.imageViewElement),this.element.appendChild(this.textElement)}},{key:"getElement",value:function(){return this.element}}])&&Ni(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function xi(t){return xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xi(t)}function Li(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ai(r.key),r)}}function Ai(t){var e=function(t){if("object"!=xi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xi(e)?e:e+""}function ki(t,e,n){return e=zi(e),function(t,e){if(e&&("object"==xi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ci()?Reflect.construct(e,n||[],zi(t).constructor):e.apply(t,n))}function Ci(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ci=function(){return!!t})()}function zi(t){return zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zi(t)}function _i(t,e){return _i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_i(t,e)}const Pi=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=ki(this,e,[r])).data=t,n.showTitle=!1!==r.showTitle,n._initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_i(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="content-placement-details-view",this.showTitle&&(this.titleView=document.createElement("div"),this.titleView.className="content-details-section-title",this.titleView.textContent="Additional details",this.element.appendChild(this.titleView));var e=Object.keys(this.data);e.forEach((function(n,r){var o=t.data[n],i=document.createElement("div");i.className="details-view-item";var a=document.createElement("div");a.className="details-view-key",a.textContent=n;var c=document.createElement("span");if(c.className="details-view-value",c.textContent=o,i.appendChild(a),i.appendChild(c),r<e.length-1){var s=document.createElement("hr");s.className="details-view-line",i.append(s)}t.element.appendChild(i)}))}},{key:"getElement",value:function(){return this.element}}])&&Li(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Bi(t){return Bi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bi(t)}function Ui(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Qi(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qi(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ri(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Yi(r.key),r)}}function Yi(t){var e=function(t){if("object"!=Bi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Bi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bi(e)?e:e+""}function Fi(t,e,n){return e=Hi(e),function(t,e){if(e&&("object"==Bi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vi()?Reflect.construct(e,n||[],Hi(t).constructor):e.apply(t,n))}function Vi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vi=function(){return!!t})()}function Hi(t){return Hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hi(t)}function Gi(t,e){return Gi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gi(t,e)}const Zi=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=Fi(this,e,[r])).childPlacement=t,n.maxValueLength=50,n.maxEntriesToShow=3,n._initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gi(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("button"),this.element.className="content-details-child-view",this.titleElement=document.createElement("div"),this.titleElement.className="content-details-child-view-title";var t=this.childPlacement.catalog.content_title_key,e=this.childPlacement.content.data[t];this.titleElement.textContent="".concat(e),this._render()}},{key:"_truncateText",value:function(t,e){return t.length>e?t.slice(0,e-3)+"...":t}},{key:"findViableDataEntriesInSchemaOrder",value:function(t){for(var e=t.content.data||{},n=t.catalog.data_schema||{},r=t.catalog.content_title_key,o=t.excluded_child_fields||[],i=[],a=0,c=Object.entries(n);a<c.length;a++){var s=Ui(c[a],2),u=s[0],l=s[1];if("image"!==l&&"url"!==l&&u!==r&&!o.includes(u)){var h=e[u];if(null!=h&&""!==h){var f=void 0;if("string"==typeof h){if(""===(f=h.trim()))continue}else f=h;i.push([u,f])}}}return i}},{key:"_render",value:function(){var t=this;this.element.appendChild(this.titleElement);var e=this.findViableDataEntriesInSchemaOrder(this.childPlacement),n=e.slice(0,this.maxEntriesToShow),r=e.length>this.maxEntriesToShow;if(0===e.length&&(this.titleElement.style.marginBottom="0px"),n.forEach((function(e){var n=Ui(e,2),r=n[0],o=n[1],i=document.createElement("div");i.className="content-details-child-view-data-row";var a=document.createElement("div");a.className="content-details-child-view-data-key",a.textContent=r.toUpperCase();var c=document.createElement("div");c.className="content-details-child-view-data-value",c.textContent=t._truncateText(String(o),t.maxValueLength),i.appendChild(a),i.appendChild(c),t.element.appendChild(i)})),r){var o=document.createElement("div");o.className="content-details-child-view-more-hint",o.setAttribute("aria-hidden","true"),o.textContent="…",this.element.appendChild(o)}}},{key:"getElement",value:function(){return this.element}}])&&Ri(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Wi(t){return Wi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wi(t)}function qi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ji(r.key),r)}}function Ji(t){var e=function(t){if("object"!=Wi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Wi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Wi(e)?e:e+""}function Ki(t,e,n){return e=Xi(e),function(t,e){if(e&&("object"==Wi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$i()?Reflect.construct(e,n||[],Xi(t).constructor):e.apply(t,n))}function $i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($i=function(){return!!t})()}function Xi(t){return Xi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xi(t)}function ta(t,e){return ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ta(t,e)}const ea=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=Ki(this,e,[o])).title=t,r.children=n,r._initialize(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ta(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="content-children-view",this.titleView=document.createElement("div"),this.titleView.className="content-details-section-title",this.titleView.textContent=this.title,this.element.appendChild(this.titleView),this.childrenElements=[],this.childrenListView=document.createElement("div"),this.childrenListView.className="content-details-children-list-view",this.children.forEach((function(e){var n=new Zi(e);t.childrenListView.appendChild(n.getElement()),t.childrenElements.push(n)})),this.element.appendChild(this.childrenListView),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.childrenElements.forEach((function(e){e.getElement().addEventListener("click",(function(n){return t._handleChildSelect(n,e)}))}))}},{key:"_handleChildSelect",value:function(t,e){this.fire("selectChildContentPlacement",{placementId:e.childPlacement.placement_id})}},{key:"getElement",value:function(){return this.element}}],r&&qi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn),na="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIxLjQxIDguNjQwMTNDMjEuNDEgOC42NDAxMyAyMS40MSA4LjY0MDEzIDIxLjQxIDguNTkwMTNDMjAuNzA1MyA2LjY2NjM1IDE5LjQyNjkgNS4wMDU0MSAxNy43NDc0IDMuODMxOTlDMTYuMDY4IDIuNjU4NTcgMTQuMDY4NyAyLjAyOTMgMTIuMDIgMi4wMjkzQzkuOTcxMiAyLjAyOTMgNy45NzE4OSAyLjY1ODU3IDYuMjkyNDYgMy44MzE5OUM0LjYxMzA0IDUuMDA1NDEg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MzcgMTcuODggMTAuMDAwMUgxOS43NEMyMC4wODY3IDExLjMxMDkgMjAuMDg2NyAxMi42ODkzIDE5Ljc0IDE0LjAwMDFaIiBmaWxsPSIjMTcxNzE3Ii8+Cjwvc3ZnPgo=";function ra(t){return ra="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ra(t)}function oa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ia(r.key),r)}}function ia(t){var e=function(t){if("object"!=ra(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ra(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ra(e)?e:e+""}function aa(t,e,n){return e=sa(e),function(t,e){if(e&&("object"==ra(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ca()?Reflect.construct(e,n||[],sa(t).constructor):e.apply(t,n))}function ca(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ca=function(){return!!t})()}function sa(t){return sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sa(t)}function ua(t,e){return ua=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ua(t,e)}function la(t){if("string"!=typeof t)return null;var e=t.trim();return""===e?null:/^https?:\/\//i.test(e)?e:"https://".concat(e)}function ha(t){var e=la(t);if(!e)return!1;try{var n=new URL(e);if("http:"!==n.protocol&&"https:"!==n.protocol)return!1;var r=n.hostname;return!(!r||!r.includes(".")&&"localhost"!==r)}catch(t){return!1}}const fa=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=aa(this,e,[n]))._kioskTimer=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ua(t,e)}(e,t),n=e,r=[{key:"show",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.isKioskMode,i=void 0!==o&&o,a=r.onConfirm,c=void 0===a?null:a,s=r.onCancel,u=void 0===s?null:s,l=la(e);if(l)if(i)this._showKioskTransient(t);else{var h=document.createElement("div");h.className="url-confirmation-popup-card";var f=document.createElement("div");f.className="url-confirmation-popup-title",f.textContent="Open external link?",h.appendChild(f);var p=document.createElement("div");p.className="url-confirmation-popup-body",p.textContent="This will open in your browser:",h.appendChild(p);var d=document.createElement("div");d.className="url-confirmation-popup-url",d.textContent=l,h.appendChild(d);var y=document.createElement("div");y.className="url-confirmation-popup-actions";var g=document.createElement("button");g.className="url-confirmation-popup-cancel",g.textContent="Cancel",g.addEventListener("click",(function(){n._dismiss(t),"function"==typeof u&&u()})),y.appendChild(g);var m=document.createElement("button");m.className="url-confirmation-popup-confirm",m.textContent="Open Link",m.addEventListener("click",(function(){n._dismiss(t),window.open(l,"_blank","noopener,noreferrer"),"function"==typeof c&&c()})),y.appendChild(m),h.appendChild(y),this._presentCard(t,h)}else console.warn("⚠️ UrlConfirmationPopup: invalid URL",e)}},{key:"_showKioskTransient",value:function(t){var e=this,n=document.createElement("div");n.className="url-confirmation-popup-card url-confirmation-popup-card--kiosk";var r=document.createElement("div");r.className="url-confirmation-popup-title",r.textContent="Links are disabled",n.appendChild(r);var o=document.createElement("div");o.className="url-confirmation-popup-body",o.textContent="External links can't be opened on this kiosk.",n.appendChild(o),this._presentCard(t,n),this._kioskTimer&&clearTimeout(this._kioskTimer),this._kioskTimer=setTimeout((function(){e._kioskTimer=null,e._dismiss(t)}),2500)}},{key:"_presentCard",value:function(t,e){if(t.showModal(e),t.modalContainer){this._previousContainerBg=t.modalContainer.style.backgroundColor,t.modalContainer.style.backgroundColor="rgba(0, 0, 0, 0.35)";var n=t.modalContainer.querySelector(".waygo-map-modal-content");n&&(n.style.backgroundColor="transparent",n.style.width="auto",n.style.height="auto",n.style.maxWidth="none",n.style.maxHeight="none",n.style.boxShadow="none",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center")}}},{key:"_dismiss",value:function(t){this._kioskTimer&&(clearTimeout(this._kioskTimer),this._kioskTimer=null),this._resetModalStyles(t),t.hideModal()}},{key:"_resetModalStyles",value:function(t){t.modalContainer&&void 0!==this._previousContainerBg&&(t.modalContainer.style.backgroundColor=this._previousContainerBg,this._previousContainerBg=void 0)}}],r&&oa(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function pa(t){return pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pa(t)}function da(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ya(t,e,n){return(e=Ma(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ga(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ma(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ma(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ma(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function va(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ma(r.key),r)}}function Ma(t){var e=function(t){if("object"!=pa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=pa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pa(e)?e:e+""}function ba(t,e,n){return e=ja(e),function(t,e){if(e&&("object"==pa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,wa()?Reflect.construct(e,n||[],ja(t).constructor):e.apply(t,n))}function wa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wa=function(){return!!t})()}function ja(t){return ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ja(t)}function Na(t,e){return Na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Na(t,e)}const Da=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=ba(this,e,[n])).contentPlacement=null,t.isSelectionMode=!1,t.isKioskMode=n.isKioskMode||!1,t.mapId=n.mapId||null,t.element=document.createElement("div"),t.element.className="content-details",t.header=document.createElement("div"),t.header.className="content-details-header",t.contentPlacementHeader=null,t.actionsView=document.createElement("div"),t.actionsView.className="content-details-section",t.actionButtons=document.createElement("div"),t.actionButtons.className="content-details-action-buttons",t.ctaButton=document.createElement("button"),t.ctaButton.className="content-details-primary-button content-details-cta-button",t.ctaButtonUrl=null,t.directionsButton=document.createElement("button"),t.directionsButton.className="content-details-primary-button",t.directionsButton.textContent="Directions",t.confirmButton=document.createElement("button"),t.confirmButton.className="content-details-primary-button",t.confirmButton.textContent="Confirm Selection",t.shareButton=document.createElement("button"),t.shareButton.className="content-details-share-button",t.shareButton.textContent="Share";var r=document.createElement("img");return r.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1IDcuM1Y3LjNDMTUgNi4wODU0IDE1IDUuNDc4MTEgMTQuNzQ1IDUuMDIyNzZDMTQuNTY0OCA0LjcwMDk0IDE0LjI5OTEgNC40MzUyMyAxMy45NzcyIDQuMjU1MDFDMTMuNTIxOSA0IDEyLjkxNDYgNCAxMS43IDRIOEM2LjExNDM4IDQgNS4xNzE1NyA0IDQuNTg1NzkgNC41ODU3OUM0IDUuMTcxNTcgNCA2LjExNDM4IDQgOFYxMS43QzQgMTIuOTE0NiA0IDEzLjUyMTkgNC4yNTUwMSAxMy45NzcyQzQuNDM1MjMgMTQuMjk5MSA0LjcwMDk0IDE0LjU2NDggNS4wMjI3NiAxNC43NDVDNS40NzgxMSAxNSA2LjA4NTQgMTUgNy4zIDE1VjE1IiBzdHJva2U9IiMxQjFCMUIiIHN0cm9rZS13aWR0aD0iMS41Ii8+CjxyZWN0IHg9IjkiIHk9IjkiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxMSIgcng9IjIiIHN0cm9rZT0iIzFCMUIxQiIgc3Ryb2tlLXdpZHRoPSIxLjUiLz4KPC9zdmc+Cg==",r.className="copy-icon",t.shareButton.appendChild(r),t.locationButton=null,t.websiteButtons=[],t.detailsView=null,t.childrenComponents=[],t.imageContainer=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Na(t,e)}(e,t),n=e,r=[{key:"_setupEventListeners",value:function(){var t=this;this.childrenComponents.forEach((function(e){e.on("selectChildContentPlacement",t._handleSelectChildContentPlacement.bind(t))})),this.directionsButton.addEventListener("click",this._handleDirectionsButtonSelect.bind(this)),this.confirmButton.addEventListener("click",this._handleConfirmButtonSelect.bind(this)),this.shareButton.addEventListener("click",this._handleShareButtonSelect.bind(this)),this.ctaButton.addEventListener("click",this._handleCtaButtonSelect.bind(this))}},{key:"_render",value:function(){var t=this;this.element.innerHTML="",this.header.innerHTML="",this.actionsView.innerHTML="",this.contentPlacementHeader&&this.header.appendChild(this.contentPlacementHeader.getElement()),this.actionButtons.replaceChildren(),this.ctaButtonUrl&&this.actionButtons.appendChild(this.ctaButton),this.isSelectionMode?this.actionButtons.appendChild(this.confirmButton):An.includes(this.mapId)||this.actionButtons.appendChild(this.directionsButton),this.isKioskMode||lr.includes(this.mapId)||this.actionButtons.appendChild(this.shareButton),this.actionButtons.childElementCount>0&&this.header.appendChild(this.actionButtons),this.locationButton&&this.actionsView.appendChild(this.locationButton.getElement()),this.websiteButtons.forEach((function(e){t.actionsView.appendChild(e.getElement())})),this.imageContainer&&this.actionsView.appendChild(this.imageContainer),this.header.appendChild(this.actionsView),this.element.appendChild(this.header),this.detailsView&&(this.detailsView.innerHTML="",this.element.appendChild(this.detailsView.getElement())),this.childrenComponents.forEach((function(e){t.element.appendChild(e.getElement())}))}},{key:"_handleShareButtonSelect",value:function(){this.fire("selectShareButton",{placementId:this.contentPlacement.placement_id})}},{key:"showCopyPopup",value:function(){var t=document.createElement("div");t.className="copy-popup",t.textContent="Copied to clipboard";var e=this.shareButton.getBoundingClientRect();t.style.position="absolute",t.style.left="".concat(e.left+e.width/2-60,"px"),t.style.top="".concat(e.bottom+window.scrollY,"px"),t.style.zIndex="9999",document.body.appendChild(t),setTimeout((function(){t.style.opacity="0",t.style.transition="opacity 0.5s",setTimeout((function(){t.remove()}),500)}),1500)}},{key:"_handleDirectionsButtonSelect",value:function(){this.fire("selectDirectionsButton",{placementId:this.contentPlacement.placement_id})}},{key:"_handleConfirmButtonSelect",value:function(){this.fire("selectConfirmButton",{placementId:this.contentPlacement.placement_id})}},{key:"_handleCtaButtonSelect",value:function(){this.ctaButtonUrl&&this.fire("selectUrlButton",{url:this.ctaButtonUrl,source:"cta"})}},{key:"_handleBackArrowClick",value:function(){this.fire("selectBackButton")}},{key:"_handleSelectChildContentPlacement",value:function(t){var e=t.placementId;this.fire("selectChildContentPlacement",{placementId:e})}},{key:"findViableAdditionalData",value:function(t){for(var e=t.catalog.data_schema,n=t.catalog.content_title_key,r=t.excluded_child_fields||[],o={},i=0,a=Object.entries(e);i<a.length;i++){var c=ga(a[i],2),s=c[0],u=c[1];if("image"!==u&&"url"!==u&&s!==n&&!r.includes(s)){var l=t.content.data[s];if(l&&""!==l.trim()){var h=l.trim();o[s]=h}}}return o}},{key:"updateView",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.contentPlacement=t,this.isSelectionMode=n,this.isKioskMode=r,this.mapId=o,console.log("TEST:",t),this.contentPlacementHeader=new wi(t);var i=t.catalog.data_schema;this.locationButton=new Oi("data:image/svg+x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new Oi(na,o,o);i.getElement().addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),e.fire("selectUrlButton",{url:o,source:"website"})})),e.websiteButtons.push(i)}}},c=0,s=Object.entries(i);c<s.length;c++)a();this.ctaButtonUrl=null;var u=this.mapId?sr[this.mapId]:null;if(u){var l,h=null===(l=t.content.data)||void 0===l?void 0:l[u.key];ha(h)&&(this.ctaButtonUrl=la(h),this.ctaButton.textContent=u.text)}for(var f=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?da(Object(n),!0).forEach((function(e){ya(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):da(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t.content.data),p=[],d=t.catalog.content_display_img_key,y=0,g=Object.entries(i);y<g.length;y++){var m=ga(g[y],2),v=m[0];if("image"===m[1]&&v!==d){var M=t.content.data[v];M&&p.push(M),delete f[v]}}var b=this.findViableAdditionalData(t),w=Object.keys(b);this.detailsView=w.length>0?new Pi(b):null,this.childrenComponents=[];for(var j=0,N=Object.entries(t.children);j<N.length;j++){var D=ga(N[j],2),I=D[0],E=D[1],S=new ea(I,E);this.childrenComponents.push(S)}if(p.length>0){this.imageContainer=document.createElement("div"),this.imageContainer.className="content-details-image-container";var T=document.createElement("img");T.src=p[0],T.className="content-details-preview-image";var O=document.createElement("div");O.className="image-hover-popup",O.textContent="See photos",this.imageContainer.appendChild(T),this.imageContainer.appendChild(O),this.imageContainer.addEventListener("click",(function(){e.fire("selectPhotos",{placementId:e.contentPlacement.placement_id,images:p})}))}else this.imageContainer=null;this._setupEventListeners(),this._render()}},{key:"getElement",value:function(){return this.element}}],r&&va(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Ia(t){return Ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ia(t)}function Ea(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Sa(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sa(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sa(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ta(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Oa(r.key),r)}}function Oa(t){var e=function(t){if("object"!=Ia(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ia(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ia(e)?e:e+""}function xa(t,e,n){return e=Aa(e),function(t,e){if(e&&("object"==Ia(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,La()?Reflect.construct(e,n||[],Aa(t).constructor):e.apply(t,n))}function La(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(La=function(){return!!t})()}function Aa(t){return Aa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Aa(t)}function ka(t,e){return ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ka(t,e)}const Ca=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=xa(this,e,[r])).contentPlacement=t,n.isOptimistic=t.isOptimistic||!1,n._initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ka(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="selection-content-item",this._render()}},{key:"_render",value:function(){var t=this;this.element.innerHTML="";var e=document.createElement("div");e.className="selection-item-selected-indicator";var n=document.createElement("canvas"),r=window.devicePixelRatio||1;n.width=24*r,n.height=24*r,n.style.width="24px",n.style.height="24px";var o=n.getContext("2d");o.scale(r,r),o.fillStyle="white",o.beginPath(),o.arc(12,12,10,0,2*Math.PI),o.fill(),o.strokeStyle="#00C853",o.lineWidth=2,o.stroke(),o.strokeStyle="#00C853",o.lineWidth=2,o.lineCap="round",o.lineJoin="round",o.beginPath(),o.moveTo(7,12),o.lineTo(10,15),o.lineTo(17,8),o.stroke(),e.appendChild(n),this.element.appendChild(e);var i=document.createElement("div");i.className="selection-item-content",this.isOptimistic?this._renderOptimisticContent(i):this._renderFullContent(i),this.element.appendChild(i);var a=document.createElement("div");a.className="selection-item-delete-button";var c=document.createElement("img");c.src=yr,c.alt="Remove selection",c.className="selection-item-delete-icon",a.appendChild(c),a.addEventListener("click",(function(e){e.stopPropagation(),t._handleDeselect()})),i.appendChild(a)}},{key:"_renderOptimisticContent",value:function(t){var e,n,r=document.createElement("div");r.className="content-placement-header";var o=document.createElement("div");o.className="header-text-container",o.style.paddingLeft="10px",o.style.display="flex",o.style.flexDirection="column",o.style.alignItems="flex-start",o.style.justifyContent="center";var i=document.createElement("div");i.className="header-content-name";var a=(null===(e=this.contentPlacement.catalog)||void 0===e?void 0:e.content_title_key)||"name",c=(null===(n=this.contentPlacement.content)||void 0===n||null===(n=n.data)||void 0===n?void 0:n[a])||this.contentPlacement.name||"Unknown Feature";i.textContent=c,o.appendChild(i),r.appendChild(o),t.appendChild(r);var s=document.createElement("div");s.style.display="flex",s.style.justifyContent="center",s.style.alignItems="center",s.style.marginTop="12px",s.style.marginBottom="8px";var u=document.createElement("img");u.src=gr,u.alt="Loading",u.style.width="20px",u.style.height="20px",u.style.animation="smoothSpin 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) infinite",s.appendChild(u),t.appendChild(s)}},{key:"_renderFullContent",value:function(t){var e,n=this.findViableAdditionalData(this.contentPlacement),r=Object.keys(n).length>0;if(this.contentPlacement.catalog){var o=new wi(this.contentPlacement).getElement();r?o.classList.add("has-additional-details"):o.classList.add("no-additional-details"),t.appendChild(o)}else{var i=document.createElement("div");i.className="content-placement-header";var a=document.createElement("div");a.className="header-text-container",a.style.paddingLeft="10px";var c=document.createElement("div");c.className="header-content-name",c.textContent=this.contentPlacement.name||"Unknown Feature",a.appendChild(c),i.appendChild(a),t.appendChild(i)}if(null!==(e=this.contentPlacement.catalog)&&void 0!==e&&e.data_schema)for(var s=this.contentPlacement.catalog.data_schema,u=0,l=Object.entries(s);u<l.length;u++){var h=Ea(l[u],2),f=h[0];if("url"===h[1]){var p,d=null===(p=this.contentPlacement.content)||void 0===p||null===(p=p.data)||void 0===p?void 0:p[f];if(d&&""!==d.trim()){var y=new ContextualLocationView(na,d,d);t.appendChild(y.getElement())}}}if(r){var g=new Pi(n,{showTitle:!1});t.appendChild(g.getElement())}var m=this._getAdditionalImages();if(m.length>0){var v=this._createImageContainer(m);t.appendChild(v)}}},{key:"updateWithFullContent",value:function(t){this.contentPlacement=t,this.isOptimistic=!1,this._render()}},{key:"findViableAdditionalData",value:function(t){if(!t.catalog||!t.catalog.data_schema)return{};for(var e=t.catalog.data_schema,n=t.catalog.content_title_key,r=t.excluded_child_fields||[],o={},i=0,a=Object.entries(e);i<a.length;i++){var c=Ea(a[i],2),s=c[0],u=c[1];if("image"!==u&&"url"!==u&&s!==n&&!r.includes(s)){var l,h=null===(l=t.content)||void 0===l||null===(l=l.data)||void 0===l?void 0:l[s];if(h&&""!==h.trim()){var f=h.trim();o[s]=f}}}return o}},{key:"_getAdditionalImages",value:function(){var t=[];if(!this.contentPlacement.catalog||!this.contentPlacement.catalog.data_schema)return t;for(var e=this.contentPlacement.catalog.data_schema,n=this.contentPlacement.catalog.content_display_img_key,r=0,o=Object.entries(e);r<o.length;r++){var i=Ea(o[r],2),a=i[0];if("image"===i[1]&&a!==n){var c,s=null===(c=this.contentPlacement.content)||void 0===c||null===(c=c.data)||void 0===c?void 0:c[a];s&&t.push(s)}}return t}},{key:"_createImageContainer",value:function(t){var e=this,n=document.createElement("div");n.className="selection-item-image-container";var r=document.createElement("img");r.src=t[0],r.className="selection-item-preview-image";var o=document.createElement("div");return o.className="image-hover-popup",o.textContent="See photos",n.appendChild(r),n.appendChild(o),n.addEventListener("click",(function(n){n.stopPropagation(),e.fire("selectPhotos",{placementId:e.contentPlacement.placement_id,images:t})})),n}},{key:"_handleDeselect",value:function(){this.fire("deselect:feature",{placementId:this.contentPlacement.placement_id||this.contentPlacement.feature_id})}},{key:"getElement",value:function(){return this.element}}],r&&Ta(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function za(t){return za="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},za(t)}function _a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Pa(r.key),r)}}function Pa(t){var e=function(t){if("object"!=za(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=za(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==za(e)?e:e+""}function Ba(t,e,n){return e=Qa(e),function(t,e){if(e&&("object"==za(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ua()?Reflect.construct(e,n||[],Qa(t).constructor):e.apply(t,n))}function Ua(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ua=function(){return!!t})()}function Qa(t){return Qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qa(t)}function Ra(t,e){return Ra=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ra(t,e)}const Ya=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Ba(this,e,[n])).selectedPlacements=[],t.contentItems=[],t.optimisticItems=new Map,t._initialize(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ra(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="selection-content-view",this._render()}},{key:"_render",value:function(){this.element.innerHTML="";var t=document.createElement("div");t.className="selection-view-header",t.textContent="Selected content",this.element.appendChild(t);var e=document.createElement("div");if(e.className="selection-items-list",this.contentItems.length>0||this.optimisticItems.size>0)this.contentItems.forEach((function(t){e.appendChild(t.getElement())})),this.optimisticItems.forEach((function(t){e.appendChild(t.getElement())}));else{var n=document.createElement("div");n.className="selection-empty-state",n.textContent="Click features on the map to select them",e.appendChild(n)}this.element.appendChild(e)}},{key:"updateSelections",value:function(t){var e=this;this.selectedPlacements=t,this.contentItems=[],this.selectedPlacements.forEach((function(t){var n=new Ca(t);n.on("deselect:feature",e._handleDeselectFeature.bind(e)),n.on("selectPhotos",e._handleSelectPhotos.bind(e)),e.contentItems.push(n)})),this._render()}},{key:"addSelection",value:function(t){this.selectedPlacements.some((function(e){return e.placement_id===t.placement_id}))||(this.selectedPlacements.push(t),this.updateSelections(this.selectedPlacements))}},{key:"removeSelection",value:function(t){this.selectedPlacements=this.selectedPlacements.filter((function(e){return e.placement_id!==t})),this.updateSelections(this.selectedPlacements)}},{key:"_handleDeselectFeature",value:function(t){var e=t.placementId;this.fire("deselect:feature",{placementId:e})}},{key:"_handleSelectPhotos",value:function(t){this.fire("selectPhotos",t)}},{key:"clearSelections",value:function(){this.selectedPlacements=[],this.contentItems=[],this._render()}},{key:"getElement",value:function(){return this.element}},{key:"addOptimisticItem",value:function(t){var e=t.properties.placement_id||t.properties.feature_id,n=t.properties.name||"Unknown Feature",r={placement_id:e,name:n,content:{data:{name:n}},catalog:{content_title_key:"name",title:t.properties.type||"Feature",data_schema:{name:"text"}},isOptimistic:!0},o=new Ca(r);o.on("deselect:feature",this._handleDeselectFeature.bind(this)),o.on("selectPhotos",this._handleSelectPhotos.bind(this)),this.contentItems.push(o),this._render()}},{key:"updateOptimisticItem",value:function(t,e){var n=this.contentItems.find((function(e){return e.contentPlacement.placement_id===t&&e.isOptimistic}));n&&(n.updateWithFullContent(e),this._render())}},{key:"removeOptimisticItem",value:function(t){var e=this.contentItems.findIndex((function(e){return e.contentPlacement.placement_id===t&&e.isOptimistic}));-1!==e&&(this.contentItems.splice(e,1),this._render())}}])&&_a(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Fa(t){return Fa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fa(t)}function Va(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ha(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Va(Object(n),!0).forEach((function(e){Ga(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Va(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ga(t,e,n){return(e=Ka(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Za(){Za=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Fa(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Fa(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Wa(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function qa(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Wa(i,r,o,a,c,"next",t)}function c(t){Wa(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Ja(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ka(r.key),r)}}function Ka(t){var e=function(t){if("object"!=Fa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Fa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fa(e)?e:e+""}function $a(t,e,n){return e=ec(e),function(t,e){if(e&&("object"==Fa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Xa()?Reflect.construct(e,n||[],ec(t).constructor):e.apply(t,n))}function Xa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xa=function(){return!!t})()}function tc(){return tc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ec(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},tc.apply(null,arguments)}function ec(t){return ec=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ec(t)}function nc(t,e){return nc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},nc(t,e)}const rc=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=$a(this,e,[n])).map=null,t.contentPlacementIds=[],t.currentContentPlacement=null,t.contentPlacementView=null,t.selectionContentView=null,t.selectedPlacements=[],t.urlConfirmationPopup=null,t.currentTop=window.innerHeight,t.startingY=0,t.scrollConfiguration={initialHeight:.5,minDistFromBottom:110},t.isDragging=!1,t.isAtTop=!1,t.velocity=0,t.decelerationFactor=.95,t.minVelocity=.1,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&nc(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="content-details-control-container",this.initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.hide(),this.container}},{key:"onRemove",value:function(){var t,n,r;this._documentTouchMoveHandler&&document.removeEventListener("touchmove",this._documentTouchMoveHandler,{capture:!0}),this._documentWheelHandler&&document.removeEventListener("wheel",this._documentWheelHandler,{capture:!0}),document.body.style.overflow="",document.documentElement.style.overflow="",(t=e,n=this,r=tc(ec(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){var t=this;this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("selection:featureSelected",this._handleSelectionFeatureSelected.bind(this)),this.map.on("selection:featureDeselected",this._handleSelectionFeatureDeselected.bind(this)),this.map.on("selection:featureSelectedOptimistic",this._handleSelectionFeatureSelectedOptimistic.bind(this)),this.map.on("selection:changed",this._handleSelectionChanged.bind(this)),this.map.on("initiate:back",this._handleMapInitiateBack.bind(this)),this.map.map.on("mousedown",this._handleMapFocus.bind(this)),this.map.map.on("touchstart",this._handleMapFocus.bind(this)),this.container.addEventListener("mousedown",(function(t){return t.stopPropagation()})),this.container.addEventListener("click",(function(t){return t.stopPropagation()})),this.container.addEventListener("dblclick",(function(t){return t.stopPropagation()})),this.container.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!1}),this.container.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!1}),this.container.addEventListener("touchend",this.handleTouchEnd.bind(this)),this.container.addEventListener("wheel",this.handleWheelScroll.bind(this),{passive:!1}),this._documentTouchMoveHandler=function(e){"mobile"===t.currentViewType&&"none"!==t.container.style.display&&t.container.contains(e.target)&&e.preventDefault()},document.addEventListener("touchmove",this._documentTouchMoveHandler,{passive:!1,capture:!0}),this._documentWheelHandler=function(e){"mobile"===t.currentViewType&&"none"!==t.container.style.display&&t.container.contains(e.target)&&e.preventDefault()},document.addEventListener("wheel",this._documentWheelHandler,{passive:!1,capture:!0})}},{key:"_handleSelectionFeatureSelectedOptimistic",value:function(t){var e=t.feature;e.properties.placement_id,this.map.multiSelect||(this.selectedPlacements=[],this.selectionContentView&&(this.selectionContentView.contentItems=[],this.selectionContentView._render())),this.selectionContentView&&this.selectionContentView.addOptimisticItem(e),this.show()}},{key:"_handleMapFocus",value:function(t){if("desktop"!==this.currentViewType&&t&&t.point){var e=[];try{e=this.map.map.queryRenderedFeatures(t.point)||[]}catch(t){return}0===e.filter((function(t){var e;return"symbol"===(null==t||null===(e=t.layer)||void 0===e?void 0:e.type)})).length&&this.scrollToMin(!0)}}},{key:"handleTouchStart",value:function(t){t.stopPropagation(),this.startingY=t.touches[0].clientY,this.isDragging=!0,this.velocity=0}},{key:"handleScrolling",value:function(t){var e=this.contentPlacementView.getElement().offsetHeight,n=this.map.mapContainer.getBoundingClientRect(),r=n.bottom,o=null;t<=0?o=Math.max(r-e-n.top,this.currentTop+t):t>0&&(o=Math.min(r-this.scrollConfiguration.minDistFromBottom-n.top,this.currentTop+t)),this.scrollTo(o)}},{key:"handleTouchMove",value:function(t){if("desktop"!==this.currentViewType&&this.isDragging){t.preventDefault();var e=t.touches[0].clientY,n=-1*(this.startingY-e);this.velocity=n,this.handleScrolling(n),this.startingY=e}}},{key:"handleTouchEnd",value:function(){this.isDragging=!1,this._applyInertia()}},{key:"_applyInertia",value:function(){var t=this,e=this.map.mapContainer.getBoundingClientRect(),n=this.contentPlacementView.getElement().offsetHeight,r=e.bottom,o=r-n-e.top,i=r-this.scrollConfiguration.minDistFromBottom-e.top,a=this.velocity,c=performance.now(),s=function(){var e=performance.now()-c;if(e>=400||Math.abs(t.velocity)<t.minVelocity)t.velocity=0;else{var n=e/400,r=1-Math.pow(1-n,2);t.velocity=a*(1-r);var u=t.currentTop+t.velocity;if(u<=o)return t.scrollTo(o),void(t.velocity=0);if(u>=i)return t.scrollTo(i),void(t.velocity=0);t.scrollTo(u),requestAnimationFrame(s)}};s()}},{key:"handleWheelScroll",value:function(t){if("desktop"!==this.currentViewType){t.preventDefault();var e=-t.deltaY;this.handleScrolling(e)}}},{key:"_renderDesktopView",value:function(){if(this.contentPlacementView){var t=this.contentPlacementView.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view")}}},{key:"_renderMobileView",value:function(){if(this.contentPlacementView){var t=this.contentPlacementView.getElement();this.container.appendChild(t),this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view")}}},{key:"_handleMapInitiateBack",value:function(){var t=this.map._stateCoordinator.state;if("selectedContent"===t){if(0===this.contentPlacementIds.length)return;if(1===this.contentPlacementIds.length){var e=this.map._stateCoordinator.stateHistory,n=e[e.length-2];e.pop(),e.pop(),"search"===n?this.map.initiateSetToSearchState():this.map.setToDefaultState()}else this.contentPlacementIds.pop(),this.map.setToSelectedContentState(this.contentPlacementIds)}else"directions"===t?this.map.setToSelectedContentState(this.contentPlacementIds):"selection"===t&&(this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews())}},{key:"_handleSelectChildContentPlacement",value:function(t){var e=t.placementId;this.contentPlacementIds.push(e),this.map.setToSelectedContentState(this.contentPlacementIds)}},{key:"_handleDefaultState",value:(a=qa(Za().mark((function t(){return Za().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.container.classList.remove("selection-mode"),"mobile"!==this.currentViewType){t.next=4;break}return t.next=4,this._scrollToBottom(!0,{duration:50});case 4:this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews();case 8:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"_handleSearchState",value:function(t){this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews(),"mobile"===this.currentViewType&&this._scrollToBottom()}},{key:"_handleSelectedContentState",value:function(t){var e=t.contentPlacementIds,n=t.selectedContentPlacement;this.contentPlacementIds=e,this.currentContentPlacement=n,this._updateContentViews(),this.show()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleSetupState",value:function(){this.hide()}},{key:"_handleSelectionState",value:function(t){this.selectedPlacements=[],this._clearViews(),this.map.clearSelectionLayers(),this._updateSelectionView(),this.show()}},{key:"_handleSelectionFeatureSelected",value:function(t){var e=t.feature,n=t.contentPlacement;if(!this.selectedPlacements.some((function(t){return t.placement_id===n.placement_id}))){var r=!this.map.multiSelect;this.map.addConfirmedSelectionFeature(e,r),this.map.multiSelect||(this.selectedPlacements=[]),this.selectedPlacements.push(n),this.selectionContentView&&this.selectionContentView.updateOptimisticItem(n.placement_id,n)}this._updateSelectionView(),this.show()}},{key:"_handleSelectionFeatureDeselected",value:function(t){t.feature;var e=t.placementId;this.map.removeConfirmedSelectionFeature(e),this.selectedPlacements=this.selectedPlacements.filter((function(t){return t.placement_id!==e})),this._updateSelectionView()}},{key:"_updateSelectionView",value:function(){var t=this;this.container.innerHTML="","desktop"===this.currentViewType?(this.container.classList.add("desktop-view"),this.container.classList.remove("mobile-view")):(this.container.classList.add("mobile-view"),this.container.classList.remove("desktop-view")),this.selectionContentView||(this.selectionContentView=new Ya,this.selectionContentView.on("deselect:feature",(function(e){t._handleDeselectFeature(e)})),this.selectionContentView.on("selectPhotos",(function(e){t._handleSelectPhotos(e)}))),this.selectionContentView.updateSelections(this.selectedPlacements),this.container.appendChild(this.selectionContentView.getElement())}},{key:"_handleDeselectFeature",value:function(t){var e=t.placementId,n=this.map.getConfirmedSelectionFeatures().find((function(t){return t.properties.placement_id===e||t.properties.feature_id===e}));if(n){var r=n.properties.feature_id;this.map.removeConfirmedSelectionFeature(r),this.map.fire("selection:featureDeselected",{feature:n,placementId:n.properties.placement_id||r}),this.selectedPlacements=this.selectedPlacements.filter((function(t){return t.placement_id!==e})),this._updateSelectionView(),this.map.fire("selection:changed",{selectedContent:this.map.getConfirmedSelectionFeatures().map((function(t){return t.properties})),selectionCount:this.map.getConfirmedSelectionFeatures().length})}else console.warn("⚠️ Feature not found in confirmed selection for deselection:",e)}},{key:"_handleSelectionChanged",value:function(t){t.selectedContent,t.selectionCount}},{key:"_handleSelectDirectionsButton",value:(i=qa(Za().mark((function t(e){var n;return Za().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.placementId,t.next=3,this.map.setToDirectionsState(null,n);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_handleSelectShareButton",value:(o=qa(Za().mark((function t(e){var n,r,o,i,a,c,s,u,l,h,f,p=this;return Za().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.placementId,r=this.map.getCurrentFloor(),this.map.mapData.account_id,o=this.map.mapData.map_id,i=this.map.mapData.map_view_id,a=this.map.map.getCenter(),c=a.lng.toFixed(6),s=a.lat.toFixed(6),u=this.map.map.getPitch().toFixed(2),l=this.map.map.getBearing().toFixed(2),h=this.map.map.getZoom().toFixed(2),f="https://maps.waygomaps.com/".concat(o,"/").concat(i,"/selected-content/").concat(n,"/f").concat(r,"@").concat(c,",").concat(s,",").concat(h,",").concat(u,",").concat(l),navigator.clipboard.writeText(f).then((function(){p.contentPlacementView.showCopyPopup()})).catch((function(t){return console.error("Failed to copy text:",t)}));case 13:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"_handleSelectUrlButton",value:function(t){var e=t.url;e&&(this.urlConfirmationPopup||(this.urlConfirmationPopup=new fa),this.urlConfirmationPopup.show(this.map,e,{isKioskMode:!0===this.map.isKioskMode}))}},{key:"_handleSelectPhotos",value:function(t){var e=this,n=(t.placementId,t.images),r=0,o=n.length;"desktop"===this.currentViewType||"mobile"===this.currentViewType?(this.map.showModal('\n <div class="waygo-map-modal-content photo-modal">\n <button class="modal-close-button">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />\n </svg>\n </button>\n \n <div class="modal-counter">\n <span id="imageCounter">'.concat(r+1," / ").concat(o,'</span>\n </div>\n \n <div class="modal-image-container">\n <button id="prevButton" class="modal-nav-button prev">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5L8.25 12l7.5-7.5" />\n </svg>\n </button>\n \n <div class="modal-image-wrapper">\n <img id="modalImage" src="').concat(n[r],'" class="modal-image">\n </div>\n \n <button id="nextButton" class="modal-nav-button next">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />\n </svg>\n </button>\n </div>\n </div>\n ')),document.querySelector(".modal-close-button").addEventListener("click",(function(){return e.map.hideModal()}))):this.map.showModal('\n <div class="waygo-map-modal-content photo-modal">\n <img src="'.concat(n[r],'" class="modal-image">\n </div>\n '));var i=document.getElementById("modalImage"),a=document.getElementById("prevButton"),c=document.getElementById("nextButton"),s=document.getElementById("imageCounter");a.onclick=function(){r=(r-1+n.length)%n.length,i.src=n[r],s.textContent="".concat(r+1," / ").concat(o)},c.onclick=function(){r=(r+1)%n.length,i.src=n[r],s.textContent="".concat(r+1," / ").concat(o)}}},{key:"_updateContentViews",value:function(){this._clearViews(),this._render()}},{key:"hide",value:function(){this.container.scrollTop=0,this.container&&(this.container.style.display="none")}},{key:"scrollTo",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=Ha(Ha({},{duration:150,easing:"easeInOut"}),r),i=this.currentTop,a=t-i,c=null,s={linear:function(t){return t},easeInOut:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeIn:function(t){return t*t},easeOut:function(t){return t*(2-t)}},u=s[o.easing]||s.easeInOut,l=o.duration;return new Promise((function(r){if(!n)return e.currentTop=t,e.container.style.top="".concat(e.currentTop,"px"),e.container.style.height="calc(100vh - ".concat(e.currentTop,"px)"),void r();var o=function(t){null===c&&(c=t);var n=t-c,s=Math.min(n/l,1),h=u(s),f=i+h*a;e.currentTop=f,e.container.style.top="".concat(e.currentTop,"px"),e.container.style.height="calc(100vh - ".concat(e.currentTop,"px)"),s<1?requestAnimationFrame(o):r()};requestAnimationFrame(o)}))}},{key:"_resetScroll",value:function(){var t=this,e=this.map.mapContainer.getBoundingClientRect(),n=this.map.mapContainer.offsetHeight;this.currentTop<e.top&&this.scrollTo(e.bottom);var r=this.contentPlacementView.findViableAdditionalData(this.currentContentPlacement),o=Object.keys(r).length,i=Object.keys(this.currentContentPlacement.children).length,a=n*(1-this.scrollConfiguration.initialHeight);0===o&&0===i?setTimeout((function(){if(t.contentPlacementView&&t.contentPlacementView.contentPlacementHeader){var e=t.contentPlacementView.header.offsetHeight;a=n-e-20}t.scrollTo(a,!0)}),50):this.scrollTo(a,!0)}},{key:"_scrollToBottom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.map.mapContainer.getBoundingClientRect();return this.scrollTo(n.bottom,t,e)}},{key:"scrollToMin",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.map.mapContainer.getBoundingClientRect();this.scrollTo(e.bottom-this.scrollConfiguration.minDistFromBottom,t)}},{key:"_render",value:function(){var t;if(0!==this.contentPlacementIds.length&&null!==this.currentContentPlacement){this.contentPlacementView=new Da;var e="selection"===this.map.getCurrentState(),n=null!==this.map.location,r=(null===(t=this.map.mapData)||void 0===t?void 0:t.map_id)||null;this.contentPlacementView.updateView(this.currentContentPlacement,e,n,r),this.contentPlacementView.on("selectChildContentPlacement",this._handleSelectChildContentPlacement.bind(this)),this.contentPlacementView.on("selectDirectionsButton",this._handleSelectDirectionsButton.bind(this)),this.contentPlacementView.on("selectShareButton",this._handleSelectShareButton.bind(this)),this.contentPlacementView.on("selectPhotos",this._handleSelectPhotos.bind(this)),this.contentPlacementView.on("selectUrlButton",this._handleSelectUrlButton.bind(this)),this._initialize(),"mobile"===this.currentViewType&&this._resetScroll()}}},{key:"_handleSelectionFeatureDeselectedOptimistic",value:function(t){var e=t.placementId;this.selectionContentView&&this.selectionContentView.removeOptimisticItem(e)}}],r&&Ja(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a}(eo);function oc(t){return oc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oc(t)}function ic(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ac(r.key),r)}}function ac(t){var e=function(t){if("object"!=oc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=oc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==oc(e)?e:e+""}function cc(t,e,n){return e=uc(e),function(t,e){if(e&&("object"==oc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,sc()?Reflect.construct(e,n||[],uc(t).constructor):e.apply(t,n))}function sc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(sc=function(){return!!t})()}function uc(t){return uc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},uc(t)}function lc(t,e){return lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},lc(t,e)}const hc=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=cc(this,e,[n]))._initialize(),t.node=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lc(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="setup-view",this.titleElement=document.createElement("h3"),this.titleElement.className="setup-title",this.setTitle("Kiosk setup");var e=document.createElement("div");e.className="setup-instructions";var n=document.createElement("p");n.innerHTML='In kiosk mode, navigation paths are set to start from the kiosk position, by default.<br><br><b>Drag the red point on the map to set your kiosk position.</b><br><br>Once you are done, click "Configure Map" to load the configured map in kiosk mode, or "Exit" to exit kiosk mode. <br><br>The kiosk URL displayed below can be copied to load this configuration at a later time.',e.appendChild(n),this.codeContainer=document.createElement("div"),this.codeContainer.className="setup-code-container",this.codeSnippet=document.createElement("pre"),this.codeSnippet.className="setup-code-snippet",this.map&&(this.codeSnippet.innerHTML="waygomaps.com/".concat(this.map.mapData.map_id,"?location=").concat(this.node.node_id)),this.copyButton=document.createElement("button"),this.copyButton.className="setup-copy-button",this.copyButton.innerText="Copy",this.copyButton.addEventListener("click",(function(){navigator.clipboard.writeText(t.codeSnippet.innerText),t.copyButton.innerText="Copied!",setTimeout((function(){copyButton.innerText="Copy"}),2e3)})),this.codeContainer.appendChild(this.codeSnippet),this.codeContainer.appendChild(this.copyButton);var r=document.createElement("div");r.className="setup-buttons-container";var o=document.createElement("button");o.className="setup-button exit",o.innerText="Exit",o.addEventListener("click",(function(){t.fire("exit")}));var i=document.createElement("button");i.className="setup-button configure",i.innerText="Configure Map",i.addEventListener("click",(function(){t.fire("configure")})),r.appendChild(o),r.appendChild(i),this.element.appendChild(this.titleElement),this.element.appendChild(e),this.element.appendChild(this.codeContainer),this.element.appendChild(r)}},{key:"setTitle",value:function(t){this.titleElement.innerText=t}},{key:"show",value:function(){this.element.classList.add("visible")}},{key:"hide",value:function(){this.element.classList.remove("visible")}},{key:"getElement",value:function(){return this.element}}])&&ic(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function fc(t){return fc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(t)}function pc(){pc=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==fc(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(fc(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function dc(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function yc(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){dc(i,r,o,a,c,"next",t)}function c(t){dc(i,r,o,a,c,"throw",t)}a(void 0)}))}}function gc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,mc(r.key),r)}}function mc(t){var e=function(t){if("object"!=fc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=fc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fc(e)?e:e+""}function vc(t,e,n){return e=wc(e),function(t,e){if(e&&("object"==fc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Mc()?Reflect.construct(e,n||[],wc(t).constructor):e.apply(t,n))}function Mc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Mc=function(){return!!t})()}function bc(){return bc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=wc(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},bc.apply(null,arguments)}function wc(t){return wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wc(t)}function jc(t,e){return jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jc(t,e)}const Nc=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=vc(this,e,[n])).setupView=new hc,t.routesApi=nn.getRotuesApi(),t.node=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jc(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="setup-control-container",this._initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.show(),this.container}},{key:"onRemove",value:function(){var t,n,r;this.removeDraggablePoint(),(t=e,n=this,r=bc(wc(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"removeDraggablePoint",value:function(){this.map&&this.map.map&&(this.map.map.getLayer("point")&&this.map.map.removeLayer("point"),this.map.map.getLayer("point-border")&&this.map.map.removeLayer("point-border"),this.map.map.getSource("point")&&this.map.map.removeSource("point"))}},{key:"initializeDraggablePoint",value:function(){var t=this,e=this.map.map.getCanvas(),n={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[0,0]},properties:{_floor:this.map.getCurrentFloor()}}]},r=function(e){var r=e.lngLat;n.features[0].geometry.coordinates=[r.lng,r.lat];var o=t.map.map.getSource("point");o&&o.setData(n)},o=function(){var o=yc(pc().mark((function o(i){var a,c,s,u,l,h,f;return pc().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return s=i.lngLat,e.style.cursor="",u=(null===(a=t.map.mapData)||void 0===a?void 0:a.reference_coordinate)||[0,0],l=(null===(c=t.map.mapData)||void 0===c?void 0:c.coordinate_scaling_multiplier)||30,h=_n([s.lng,s.lat],u,l),f=n.features[0].properties._floor,o.next=8,t.getClosestNode(h,f);case 8:t.map.map.off("mousemove",r),t.map.map.off("touchmove",r);case 10:case"end":return o.stop()}}),o)})));return function(t){return o.apply(this,arguments)}}();this.map.on("floorChanged",(function(e){var r=e.floorIndex;n.features[0].properties._floor=r;var o=t.map.map.getSource("point");o&&o.setData(n)})),this.map.map.addSource("point",{type:"geojson",data:n}),this.map.map.addLayer({id:"point-border",type:"circle",source:"point",paint:{"circle-radius":18,"circle-color":"#FFFFFF"}}),this.map.map.addLayer({id:"point",type:"circle",source:"point",paint:{"circle-radius":15,"circle-color":"#F84C4C"}}),this.map.map.on("mouseenter","point",(function(){t.map.map.setPaintProperty("point","circle-color","#FF8080"),e.style.cursor="pointer"})),this.map.map.on("mouseleave","point",(function(){t.map.map.setPaintProperty("point","circle-color","#F84C4C"),e.style.cursor="default"})),this.map.map.on("mousedown","point",(function(n){n.preventDefault(),e.style.cursor="grabbing",t.map.map.on("mousemove",r),t.map.map.once("mouseup",o)})),this.map.map.on("touchstart","point",(function(e){1===e.points.length&&(e.preventDefault(),t.map.map.on("touchmove",r),t.map.map.once("touchend",o))}))}},{key:"getVertex",value:function(){var t,e,n=this.map.map.querySourceFeatures("point"),r=(null===(t=this.map.mapData)||void 0===t?void 0:t.reference_coordinate)||[0,0],o=(null===(e=this.map.mapData)||void 0===e?void 0:e.coordinate_scaling_multiplier)||30;return n.length>0?_n(n[0].geometry.coordinates,r,o):null}},{key:"getClosestNode",value:(i=yc(pc().mark((function t(e,n){var r;return pc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.routesApi.findClosestNode(this.map.mapData.map_id,e,n);case 2:r=t.sent,this.node=r,this.map.location=r.node_id,this.setupView.codeSnippet.innerHTML="https://maps.waygomaps.com/".concat(this.map.mapData.map_id,"?location=").concat(r.node_id);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return i.apply(this,arguments)})},{key:"_initializeEventListeners",value:function(){this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("load",this._handleMapLoad.bind(this)),this.map.on("floorChanged",this._handleFloorChange.bind(this)),this.setupView.on("exit",this._handleSetupViewExitState.bind(this)),this.setupView.on("configure",this._handleSetupViewConfigureState.bind(this))}},{key:"_handleMapLoad",value:function(t){}},{key:"_renderDesktopView",value:function(){this.container.classList.add("desktop-view"),this.container.classList.remove("mobile-view")}},{key:"_renderMobileView",value:function(){this.container.classList.add("mobile-view"),this.container.classList.remove("desktop-view")}},{key:"bringToFront",value:function(){this.container.style.zIndex="1"}},{key:"bringBack",value:function(){this.container.style.zIndex=""}},{key:"_handleDefaultState",value:function(){this.hide()}},{key:"_handleSearchState",value:function(t){this.hide()}},{key:"_handleSelectedContentState",value:function(t){this.hide()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleSetupState",value:(o=yc(pc().mark((function t(){var e=this;return pc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.initializeDraggablePoint(),this.show(),setTimeout(yc(pc().mark((function t(){var n,r,o;return pc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.getVertex(),r=e.map.getCurrentFloor(),null===n||null===r){t.next=5;break}return t.next=5,e.getClosestNode(n,r);case 5:o=e.setupView.getElement(),e.container.appendChild(o);case 7:case"end":return t.stop()}}),t)}))),200);case 3:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"_handleFloorChange",value:function(t){var e=t.floorIndex,n=this.getVertex();"setup"===this.map.getCurrentState()&&this.getClosestNode(n,e)}},{key:"_handleSetupViewExitState",value:function(){this.removeDraggablePoint(),this.map.setToDefaultState()}},{key:"_handleSetupViewConfigureState",value:function(){this.removeDraggablePoint(),this.map.setToDefaultState()}}],r&&gc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}(eo);function Dc(t){return Dc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dc(t)}function Ic(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||Sc(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ec(t){return function(t){if(Array.isArray(t))return Tc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Sc(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sc(t,e){if(t){if("string"==typeof t)return Tc(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tc(t,e):void 0}}function Tc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Oc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function xc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Oc(Object(n),!0).forEach((function(e){Lc(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Oc(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Lc(t,e,n){return(e=kc(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ac(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,kc(r.key),r)}}function kc(t){var e=function(t){if("object"!=Dc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Dc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dc(e)?e:e+""}function Cc(t,e,n){return e=Pc(e),function(t,e){if(e&&("object"==Dc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,zc()?Reflect.construct(e,n||[],Pc(t).constructor):e.apply(t,n))}function zc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zc=function(){return!!t})()}function _c(){return _c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Pc(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},_c.apply(null,arguments)}function Pc(t){return Pc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pc(t)}function Bc(t,e){return Bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bc(t,e)}const Uc=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Cc(this,e,[n])).map=null,t.previouslySelectedFeature=null,t.previouslySelectedIcon=null,t.previouslySelectedTextColor=null,t.previouslySelectedTextOffset=null,t.previouslyHoveredFeature=null,t.originalTextColor=null,t.textColorReference={},t.currentView=null,t.selectedTextColor="#BE2E28",t.interactionEnabled=!0,t.selectionCriteria=null,t.originalPaintProperties={},t.selectionModeExpressions={},t.selectionHoverColor="#4A90E2",t.currentHoveredLayerId=null,t.currentHoveredFeatureId=null,t.selectionHoverHandler=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bc(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="interaction-control-container",this.initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.createHighlightedContentLayer(),this.createSelectedContentLayer(),this.storeTextColorReferences(),this.container}},{key:"_initialize",value:function(){var t=this.map.mapContainer.offsetWidth;this._configureView(t)}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=_c(Pc(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"_configureView",value:function(t){t>767?this._setViewForDesktop():this._setViewForMobile()}},{key:"_setViewForDesktop",value:function(){this.currentView="desktop"}},{key:"_setViewForMobile",value:function(){this.currentView="mobile"}},{key:"initializeEventListeners",value:function(){var t=this;this.map.map.on("styleimagemissing",(function(t){var e=t.id;console.warn('Image "'.concat(e,'" could not be loaded.'))})),this.map.map.on("click",(function(e){t._handleClick(e)})),this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("additionalSearchResults",this._handleAdditionalSearch.bind(this)),this.map.on("hoverSearchResult",this._handleHoverSearchResult.bind(this)),this.map.on("hoverEndSearchResult",this._handleHoverEndSearchResult.bind(this))}},{key:"storeTextColorReferences",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){if("symbol"===e.type){var n=t.map.map.getPaintProperty(e.id,"text-color");void 0!==n&&(t.textColorReference[e.id]=n)}}))}},{key:"_getSelectedContentLayerPaint",value:function(){var t,e=null===(t=this.map)||void 0===t||null===(t=t.mapData)||void 0===t?void 0:t.map_id;return{"text-color":e&&ur.includes(e)?"#ff6661":"#BE2E28","text-halo-color":e&&ur.includes(e)?"#1c1c1c":"#ffffff","text-halo-width":e&&ur.includes(e)?2:1}}},{key:"_getHighlightedContentLayerPaint",value:function(){var t,e=null===(t=this.map)||void 0===t||null===(t=t.mapData)||void 0===t?void 0:t.map_id;return{"text-color":e&&ur.includes(e)?"#ffffff":"#1E1E1E","text-halo-color":e&&ur.includes(e)?"#1c1c1c":"#ffffff","text-halo-width":e&&ur.includes(e)?2:1}}},{key:"_getTextSize",value:function(){var t,e=null===(t=this.map)||void 0===t||null===(t=t.mapData)||void 0===t?void 0:t.map_id;return e&&ur.includes(e)?16:14}},{key:"createSelectedContentLayer",value:function(){this.map.map.addSource("selected-content",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.map.addLayer({id:"selected-content-layer",type:"symbol",source:"selected-content",layout:{"text-field":["get","name"],"text-font":["Inter Medium"],"text-size":this._getTextSize(),"text-justify":"left","text-anchor":"bottom-left","text-offset":[1.3,-1],"icon-image":"selected-pin","icon-size":.5,"icon-offset":[0,-5],"icon-anchor":"bottom","symbol-z-elevate":!0,"text-padding":10,"icon-padding":5},paint:this._getSelectedContentLayerPaint()})}},{key:"createHighlightedContentLayer",value:function(){this.map.map.addSource("highlighted-content",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.map.addLayer({id:"highlighted-content-layer",type:"symbol",source:"highlighted-content",layout:{"text-field":["get","name"],"text-font":["Inter Medium"],"text-size":this._getTextSize(),"text-justify":"left","text-anchor":"bottom-left","text-offset":[1.2,-.6],"icon-image":"highlightedPin","icon-size":.5,"icon-offset":[0,-5],"icon-anchor":"bottom","symbol-z-elevate":!0,"text-padding":5,"icon-padding":5},paint:this._getHighlightedContentLayerPaint()})}},{key:"_handleDefaultState",value:function(){this.interactionEnabled=!0,this.removeSelectionVisuals(),this.selectionCriteria=null,this.applyHoverEffectToAllSymbolLayers(),this.map.clearHighlightedContentLayer(),this.map.clearSelectedContentLayer(),this.showSymbolLayers()}},{key:"_handleSearchState",value:function(t){t.query;var e=t.results;this.interactionEnabled=!0,this.applyHoverEffectToAllSymbolLayers(),this.hideSymbolLayers(),this.map.clearSelectedContentLayer();var n=e.reduce((function(t,e){return t[e.floor]=(t[e.floor]||0)+1,t}),{}),r=Object.entries(n).reduce((function(t,e){return e[1]>t[1]?e:t}),[0,0])[0],o=this.map.getCurrentFloor(),i=e.some((function(t){return t.floor===o})),a=o;i||(a=r,this.map.updateFloor(parseInt(a))),a=parseInt(a),this.updateLabelsForSearchResults(e,!0,a)}},{key:"_handleAdditionalSearch",value:function(t){var e=t.results;this.updateLabelsForSearchResults(e,!0)}},{key:"_handleHoverSearchResult",value:function(t){var e=t.result;this.updateLabelForSelectedContentPlacement(e,!1)}},{key:"_handleHoverEndSearchResult",value:function(){"search"===this.map.getCurrentState()&&this.map.clearSelectedContentLayer()}},{key:"_handleSelectedContentState",value:function(t){t.contentPlacementIds;var e=t.selectedContentPlacement;this.interactionEnabled=!0,this.applyHoverEffectToAllSymbolLayers(),this.showSymbolLayers(),this.updateLabelForSelectedContentPlacement(e)}},{key:"_handleDirectionsState",value:function(t){t.endContentPlacement,this.interactionEnabled=!1,this.removeHoverEffects(),this.showSymbolLayers()}},{key:"_handleSetupState",value:function(){this.interactionEnabled=!1,this.removeHoverEffects()}},{key:"_handleSelectionState",value:function(t){var e=t.criteria,n=t.geojson;this.selectionCriteria=e,this.interactionEnabled=!0,this.applySelectionModeVisuals(e),this.map.removeMatchingFeaturesFromExistingLayers(e),this.map.createSelectableContentLayers(n),this.processPendingExtrusionFeatures(),this.processPendingSymbolFeatures(),this.applySelectableHoverEffects()}},{key:"hideSymbolLayers",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){"symbol"===e.type&&"selected-content-layer"!==e.id&&"highlighted-content-layer"!==e.id&&t.map.map.setLayoutProperty(e.id,"visibility","none")}))}},{key:"showSymbolLayers",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){"symbol"===e.type&&t.map.map.setLayoutProperty(e.id,"visibility","visible")}))}},{key:"updateLabelsForSearchResults",value:function(t){var e,n,r=this,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;null===i&&(i=this.map.getCurrentFloor());var a=(null===(e=this.map.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],c=(null===(n=this.map.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30;this.map.clearHighlightedContentLayer();var s=[],u=[];if(t.length,t.forEach((function(t){var e;t._floor=t.floor;var n,o=(null===(e=r.map.mapData)||void 0===e?void 0:e.map_id)||null;console.log("🔵 InteractionControl: mapId:",o),n="outdoor-cities-demo"===o?t.location:zn([t.location],a,c)[0];var l=t.catalog.content_title_key;t.name=t.content.data[l];var h=r.map.addHighlightedFeature(n,t);s.push(h),t.floor===i&&u.push(h)})),u.length&&o){var l=new mapboxgl.LngLatBounds;if(u.forEach((function(t){l.extend(t.geometry.coordinates)})),"desktop"===this.currentView)this.map.map.fitBounds(l,{padding:{top:50,bottom:50,left:350,right:50},maxZoom:17,pitch:45,bearing:-37,duration:1e3});else if("mobile"===this.currentView){var h=.45*this.map.mapContainer.offsetHeight,f=.06*this.map.mapContainer.offsetWidth;this.map.map.fitBounds(l,{padding:{top:150,bottom:h,left:f,right:f},maxZoom:17,pitch:45,bearing:-37,duration:1e3})}}}},{key:"_getSelectionFeaturesProperties",value:function(){return this.map.getConfirmedSelectionFeatures().map((function(t){return t.properties}))}},{key:"updateLabelForSelectedContentPlacement",value:function(t){var e,n,r,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.map.clearSelectedContentLayer();var i,a=(null===(e=this.map.mapData)||void 0===e?void 0:e.map_id)||null;console.log("🔵 InteractionControl: mapId:",a);var c=(null===(n=this.map.mapData)||void 0===n?void 0:n.reference_coordinate)||[0,0],s=(null===(r=this.map.mapData)||void 0===r?void 0:r.coordinate_scaling_multiplier)||30;if(i="outdoor-cities-demo"===a?t.location:zn([t.location],c,s)[0],t._floor=t.floor,!t.name&&t.content&&t.catalog){var u=t.catalog.content_title_key,l=t.content.data[u];t.name=l}if(this.map.addSelectedFeature(i,t),o)if("desktop"===this.currentView)this.map.map.easeTo({center:i,padding:{top:0,bottom:0,left:330,right:0},duration:1e3});else if("mobile"===this.currentView){var h=.35*this.map.mapContainer.offsetHeight;this.map.map.easeTo({center:i,padding:{top:0,bottom:h,left:0,right:0},duration:1e3})}}},{key:"applyHoverEffectToAllSymbolLayers",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){if("symbol"===e.type){var n=e.id,r=t.textColorReference[n];t.map.map.on("mouseenter",n,(function(e){var o=e.features[0],i=o.properties.placement_id;if(t.previouslySelectedFeature&&t.previouslySelectedFeature.layer.id===o.layer.id){t.originalTextColor=t.previouslySelectedTextColor;var a=t.previouslySelectedFeature.properties.placement_id;t.map.map.setPaintProperty(n,"text-color",["case",["==",["get","placement_id"],i],"#4B90F7",["==",["get","placement_id"],a],t.selectedTextColor,r])}else t.originalTextColor=t.map.map.getPaintProperty(n,"text-color"),t.map.map.setPaintProperty(n,"text-color",["case",["==",["get","placement_id"],i],"#4B90F7",r]);t.map.map.getCanvas().style.cursor="pointer"})),t.map.map.on("mouseleave",n,(function(){if(t.previouslySelectedFeature){var e=t.previouslySelectedFeature.properties.placement_id;t.map.map.setPaintProperty(n,"text-color",["case",["==",["get","placement_id"],e],t.selectedTextColor,r])}else t.map.map.setPaintProperty(n,"text-color",r);t.map.map.getCanvas().style.cursor="default"}))}}))}},{key:"removeHoverEffects",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){if("symbol"===e.type){var n=e.id,r=t.textColorReference[n];t.map.map.setPaintProperty(n,"text-color",r),t.map.map.off("mouseenter",n),t.map.map.off("mouseleave",n)}})),this.map.map.getCanvas().style.cursor="default"}},{key:"applySelectionModeVisuals",value:function(t){var e=this,n=this.map.map.getStyle().layers;this.originalPaintProperties={},n.forEach((function(t){if("background"===t.type){var n=t.id;return e.originalPaintProperties[n]||(e.originalPaintProperties[n]={}),e.originalPaintProperties[n]["background-color"]=e.map.map.getPaintProperty(n,"background-color"),void e.map.map.setPaintProperty(n,"background-color","#f5f5f5")}if("raster"!==t.type&&"heatmap"!==t.type){var r=t.id;if(r.includes("selectable-"))return;if(e.originalPaintProperties[r]||(e.originalPaintProperties[r]={}),"symbol"===t.type){if(r.includes("selectable-")||r.includes("booked-")||r.includes("confirmed-selection"))return;var o=e.map.map.getLayer(r),i=o.source,a=o.sourceLayer,c=o.filter,s=[];try{var u=e.map.map.getSource(i);u&&"vector"===u.type&&a?s=e.map.map.querySourceFeatures(i,{sourceLayer:a,filter:c}):u&&"geojson"===u.type&&(s=u._data.features||[])}catch(t){console.error("❌ Error getting symbol features before layer hiding:",t)}e.originalPaintProperties[r]={"text-opacity":e.map.map.getPaintProperty(r,"text-opacity"),"icon-opacity":e.map.map.getPaintProperty(r,"icon-opacity"),"text-color":e.map.map.getPaintProperty(r,"text-color"),source:i,"source-layer":a,filter:c,features:s},e.map.map.setLayoutProperty(r,"visibility","none"),e.pendingSymbolFeatures||(e.pendingSymbolFeatures=[]),e.pendingSymbolFeatures.push({layerId:r,features:s})}else if("fill"===t.type){e.originalPaintProperties[r]["fill-opacity"]=e.map.map.getPaintProperty(r,"fill-opacity"),e.originalPaintProperties[r]["fill-color"]=e.map.map.getPaintProperty(r,"fill-color");var l=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["fill-opacity"],.5],h=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["fill-color"],"#f7f7f8"];e.map.map.setPaintProperty(r,"fill-color",h),e.map.map.setPaintProperty(r,"fill-opacity",l)}else if("line"===t.type){e.originalPaintProperties[r]["line-opacity"]=e.map.map.getPaintProperty(r,"line-opacity"),e.originalPaintProperties[r]["line-color"]=e.map.map.getPaintProperty(r,"line-color");var f=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["line-opacity"],.6],p=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["line-color"],"#AAAAAA"];e.map.map.setPaintProperty(r,"line-color",p),e.map.map.setPaintProperty(r,"line-opacity",f)}else if("circle"===t.type){e.originalPaintProperties[r]["circle-opacity"]=e.map.map.getPaintProperty(r,"circle-opacity"),e.originalPaintProperties[r]["circle-color"]=e.map.map.getPaintProperty(r,"circle-color");var d=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["circle-opacity"]||1,.5],y=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["circle-color"],"#CCCCCC"];e.map.map.setPaintProperty(r,"circle-color",y),e.map.map.setPaintProperty(r,"circle-opacity",d)}else if("fill-extrusion"===t.type){var g=e.map.map.getLayer(r),m=g.source,v=g.sourceLayer,M=g.filter,b=[];try{var w=e.map.map.getSource(m);w&&"vector"===w.type&&v?b=e.map.map.querySourceFeatures(m,{sourceLayer:v,filter:M}):w&&"geojson"===w.type&&(b=w._data.features||[])}catch(t){console.error("❌ Error getting features before layer removal:",t)}e.originalPaintProperties[r]={"fill-extrusion-color":e.map.map.getPaintProperty(r,"fill-extrusion-color"),"fill-extrusion-height":e.map.map.getPaintProperty(r,"fill-extrusion-height"),"fill-extrusion-opacity":e.map.map.getPaintProperty(r,"fill-extrusion-opacity"),source:m,"source-layer":v,filter:M,features:b},e.map.map.removeLayer(r),e.pendingExtrusionFeatures||(e.pendingExtrusionFeatures=[]),e.pendingExtrusionFeatures.push({layerId:r,features:b})}}}))}},{key:"processPendingSymbolFeatures",value:function(){var t=this;this.pendingSymbolFeatures&&0!==this.pendingSymbolFeatures.length&&(this.pendingSymbolFeatures.forEach((function(e){var n=e.layerId,r=e.features;t.addSymbolFeaturesToBookedLabels(r,n)})),this.pendingSymbolFeatures=[])}},{key:"addSymbolFeaturesToBookedLabels",value:function(t,e){if(0!==t.length)try{var n=this.map.map.getSource("booked-labels");if(!n)return void console.error("❌ booked-labels source not found");var r=n._data.features||[],o=t.map((function(t){var e=t.properties.title||t.properties.name||"Untitled";return{type:"Feature",geometry:t.geometry,properties:xc(xc({},t.properties),{},{name:e})}})),i=[].concat(Ec(r),Ec(o));n.setData({type:"FeatureCollection",features:i}),this.map.map.getSource("booked-labels")._data.features}catch(t){console.error("❌ Error adding symbol features to booked-labels:",t)}}},{key:"addFeaturesToBookedContent",value:function(t,e){if(0!==t.length)try{var n=this.map.map.getSource("booked-content");if(!n)return void console.error("❌ booked-content source not found");var r=n._data.features||[],o=[].concat(Ec(r),Ec(t));n.setData({type:"FeatureCollection",features:o}),this.map.map.getSource("booked-content")._data.features}catch(t){console.error("❌ Error adding features to booked-content:",t)}}},{key:"processPendingExtrusionFeatures",value:function(){var t=this;this.pendingExtrusionFeatures&&0!==this.pendingExtrusionFeatures.length&&(this.pendingExtrusionFeatures.forEach((function(e){var n=e.layerId,r=e.features;t.addFeaturesToBookedContent(r,n)})),this.pendingExtrusionFeatures=[])}},{key:"getHighPrecisionFeatures",value:function(t,e){var n=this.originalPaintProperties[e];if(!n)return console.warn("⚠️ No layer info found, using original features"),t;var r=n.source,o=n["source-layer"],i=n.filter;try{if(!this.map.map.getSource(r))return console.error("❌ Source not found:",r),t;var a=this.map.map.querySourceFeatures(r,{sourceLayer:o,filter:i});return a.length>=t.length?a:t}catch(e){return console.error("❌ Error getting high-precision features:",e),t}}},{key:"removeGreyFillLayers",value:function(){var t=this;this.greyFillLayers&&(this.greyFillLayers.forEach((function(e){t.map.map.getLayer(e)&&t.map.map.removeLayer(e)})),this.greyFillLayers=[])}},{key:"applySelectableHoverEffects",value:function(){var t=this;this.selectionHoverHandler&&this.map.map.off("mousemove",this.selectionHoverHandler),this.selectionHoverHandler=function(e){if(t.interactionEnabled&&t.selectionCriteria){var n=t.map.map.queryRenderedFeatures(e.point,{layers:["selectable-fill-layer"]});if(t.currentHoveredFeatureId&&t.map.map.setFeatureState({source:"selectable-content",id:t.currentHoveredFeatureId},{hover:!1}),n.length>0){var r=n[0];t.currentHoveredFeatureId=r.properties.feature_id,t.map.map.setFeatureState({source:"selectable-content",id:t.currentHoveredFeatureId},{hover:!0}),t.map.map.getCanvas().style.cursor="pointer"}else t.currentHoveredFeatureId=null,t.map.map.getCanvas().style.cursor="default"}},this.map.map.on("mousemove",this.selectionHoverHandler),this.map.map.setPaintProperty("selectable-fill-layer","fill-color",["case",["boolean",["feature-state","hover"],!1],this.selectionHoverColor,"#FFFFFF"])}},{key:"createSelectionOpacityExpression",value:function(t){var e=.1;e=["case",["==",["get","type"],"floor"],1,e];for(var n=function(){var t=Ic(o[r],2),n=t[0],i=t[1];if(Array.isArray(i)){var a=i.map((function(t){return["==",["get",n],t]})),c=["any"].concat(Ec(a));e=["case",c,1,e]}else e=["case",["==",["get",n],i],1,e]},r=0,o=Object.entries(t);r<o.length;r++)n();return e}},{key:"createSelectionColorOpacityExpression",value:function(t,e){var n=this.map.map.getPaintProperty(e,"fill-extrusion-color");if(!n)return null;for(var r=["case",["==",["get","type"],"floor"],n],o=function(){var t=Ic(a[i],2),e=t[0],o=t[1];if(Array.isArray(o)){var c=o.map((function(t){return["==",["get",e],t]})),s=["any"].concat(Ec(c));r.push(s,n)}else r.push(["==",["get",e],o],n)},i=0,a=Object.entries(t);i<a.length;i++)o();return r.push("#2A2A2A"),r}},{key:"restoreLayerToSelectionMode",value:function(t){var e=this.map.map.getStyle().layers.find((function(e){return e.id===t}));if(e)if("fill"===e.type){var n=this.originalPaintProperties[t]["fill-color"];n&&this.map.map.setPaintProperty(t,"fill-color",n)}else if("fill-extrusion"===e.type){var r=this.selectionModeExpressions[t]||this.originalPaintProperties[t]["fill-extrusion-color"];r&&this.map.map.setPaintProperty(t,"fill-extrusion-color",r)}}},{key:"applyHoverToFeature",value:function(t,e,n){"fill"===n?this.map.map.setPaintProperty(t,"fill-color",["case",["==",["id"],e],this.selectionHoverColor,this.originalPaintProperties[t]["fill-color"]||["get","color"]||0]):"fill-extrusion"===n&&this.map.map.setPaintProperty(t,"fill-extrusion-color",["case",["==",["id"],e],this.selectionHoverColor,this.selectionModeExpressions[t]||this.originalPaintProperties[t]["fill-extrusion-color"]||["get","color"]||0])}},{key:"applySelectionHoverEffects",value:function(t){var e=this;this.selectionHoverHandler=function(t){if(e.interactionEnabled&&e.selectionCriteria){var n=e.map.map.queryRenderedFeatures(t.point).find((function(t){return"fill"===t.layer.type||"fill-extrusion"===t.layer.type}));if(n){var r=n.layer.id,o=n.id;e.currentHoveredLayerId===r&&e.currentHoveredFeatureId===o||(e.currentHoveredLayerId&&e.restoreLayerToSelectionMode(e.currentHoveredLayerId),e.featureMatchesCriteria(n.properties,e.selectionCriteria)?(e.currentHoveredLayerId=r,e.currentHoveredFeatureId=o,e.applyHoverToFeature(r,o,n.layer.type),e.map.map.getCanvas().style.cursor="pointer"):(e.currentHoveredLayerId=null,e.currentHoveredFeatureId=null,e.map.map.getCanvas().style.cursor="default"))}else e.currentHoveredLayerId&&(e.restoreLayerToSelectionMode(e.currentHoveredLayerId),e.currentHoveredLayerId=null,e.currentHoveredFeatureId=null),e.map.map.getCanvas().style.cursor="default"}},this.map.map.on("mousemove",this.selectionHoverHandler)}},{key:"removeSelectionVisuals",value:function(){for(var t=this,e=0,n=Object.entries(this.originalPaintProperties);e<n.length;e++){for(var r=Ic(n[e],2),o=r[0],i=r[1],a=0,c=Object.entries(i);a<c.length;a++){var s=Ic(c[a],2),u=s[0],l=s[1];"source"!==u&&"source-layer"!==u&&"filter"!==u&&"features"!==u&&void 0!==l&&this.map.map.setPaintProperty(o,u,l)}i.source&&this.map.map.setLayoutProperty(o,"visibility","visible")}var h=this.map.map.getStyle().layers,f=this.map.getCurrentFloor();h.forEach((function(e){if("background"!==e.type&&"raster"!==e.type&&"heatmap"!==e.type){var n=e.id;if(n.includes("selectable-"))return;if(t.map.map.getFilter(n)){var r=t.map.originalFilters[n];if(void 0!==r){t.map.map.setFilter(n,r);var o=["==",["get","_floor"],f];if(r){var i=["all",o,r];t.map.map.setFilter(n,i)}else t.map.map.setFilter(n,o)}}else{var a=["==",["get","_floor"],f];t.map.map.setFilter(n,a)}}})),this.originalPaintProperties={},this.selectionModeExpressions={},this.map.removeSelectableContentLayers(),this.removeGreyFillLayers(),this.currentHoveredLayerId=null,this.currentHoveredFeatureId=null,this.selectionHoverHandler&&(this.map.map.off("mousemove",this.selectionHoverHandler),this.selectionHoverHandler=null),this.pendingSymbolFeatures=[],this.pendingExtrusionFeatures=[],this.map.map.getCanvas().style.cursor="default"}},{key:"_handleClick",value:function(t){var e=this;if(this.interactionEnabled)if("selection"===this.map.getCurrentState()){var n=this.map.map.queryRenderedFeatures(t.point,{layers:["confirmed-selection-fill-layer","confirmed-selection-outline-layer","confirmed-selection-icon-layer"]});if(n.length>0){var r=n[0],o=r.properties.feature_id;return this.map.removeConfirmedSelectionFeature(o),this.map.fire("selection:featureDeselected",{feature:r,placementId:r.properties.placement_id||o}),void this.map.fire("selection:changed",{selectedContent:this._getSelectionFeaturesProperties(),selectionCount:this.map.getConfirmedSelectionFeatures().length})}var i=this.map.map.queryRenderedFeatures(t.point,{layers:["selectable-fill-layer"]});if(i.length>0){var a=i[0],c=a.properties.placement_id,s=a.properties.feature_id;if(!this.map.multiSelect){var u=this.map.getConfirmedSelectionFeatures();if(u.length>0){var l=u[0],h=l.properties.feature_id;this.map.fire("selection:featureDeselectedOptimistic",{placementId:l.properties.placement_id||h})}}if(this.map.addConfirmedSelectionFeature(a,!this.map.multiSelect),this.map.fire("selection:featureSelectedOptimistic",{feature:a}),c&&"unknown"!==c&&""!==c)this.map._stateCoordinator.setLoading(!0,"content"),this.map.getContentPlacementDetails(c).then((function(t){e.map.fire("selection:featureSelected",{feature:a,contentPlacement:t}),e.map.fire("selection:changed",{selectedContent:e._getSelectionFeaturesProperties(),selectionCount:e.map.getConfirmedSelectionFeatures().length})})).catch((function(t){console.error("❌ Error fetching content placement details:",t),e.map.removeConfirmedSelectionFeature(s),e.map.fire("selection:featureDeselectedOptimistic",{placementId:c||s})})).finally((function(){e.map._stateCoordinator.setLoading(!1,"content")}));else{var f=xc({placement_id:s,name:a.properties.name||"Unknown Feature",type:a.properties.type||"unknown"},a.properties);this.map.fire("selection:featureSelected",{feature:a,contentPlacement:f}),this.map.fire("selection:changed",{selectedContent:this._getSelectionFeaturesProperties(),selectionCount:this.map.getConfirmedSelectionFeatures().length})}return}}else{var p=(this.map.map.queryRenderedFeatures(t.point)||[]).filter((function(t){var e;return"symbol"===(null==t||null===(e=t.layer)||void 0===e?void 0:e.type)}));if(p.length>0){var d=p[0].properties.placement_id;d&&"unknown"!==d&&""!==d&&this.map.setToSelectedContentState([d])}}}},{key:"featureMatchesCriteria",value:function(t,e){for(var n=0,r=Object.entries(e);n<r.length;n++){var o=Ic(r[n],2),i=o[0],a=o[1],c=t[i];if(Array.isArray(a)){if(!a.includes(c))return!1}else if(c!==a)return!1}return!0}},{key:"_setupCursorHandling",value:function(){var t=this;this.map.map.on("mouseenter","confirmed-selection-fill-layer",(function(){t.map.map.getCanvas().style.cursor="pointer"})),this.map.map.on("mouseleave","confirmed-selection-fill-layer",(function(){t.map.map.getCanvas().style.cursor=""})),this.map.map.on("mouseenter","confirmed-selection-outline-layer",(function(){t.map.map.getCanvas().style.cursor="pointer"})),this.map.map.on("mouseleave","confirmed-selection-outline-layer",(function(){t.map.map.getCanvas().style.cursor=""})),this.map.map.on("mouseenter","confirmed-selection-icon-layer",(function(){t.map.map.getCanvas().style.cursor="pointer"})),this.map.map.on("mouseleave","confirmed-selection-icon-layer",(function(){t.map.map.getCanvas().style.cursor=""}))}}],r&&Ac(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(eo);function Qc(t){return Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qc(t)}function Rc(){Rc=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Qc(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Qc(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Yc(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Fc(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Yc(i,r,o,a,c,"next",t)}function c(t){Yc(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Vc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Hc(r.key),r)}}function Hc(t){var e=function(t){if("object"!=Qc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qc(e)?e:e+""}function Gc(t,e,n){return e=Wc(e),function(t,e){if(e&&("object"==Qc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zc()?Reflect.construct(e,n||[],Wc(t).constructor):e.apply(t,n))}function Zc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zc=function(){return!!t})()}function Wc(t){return Wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wc(t)}function qc(t,e){return qc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qc(t,e)}const Jc=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Gc(this,e,[n])).startSearchBox=new Kr,t.endSearchBox=new Kr,t.startContentPlacement=null,t.endContentPlacement=null,t.pathData=null,t.fromLocation=!1,t.searchApi=nn.getSearchApi(),t._initialize(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qc(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="directions-view",this.directionsViewHeader=document.createElement("div"),this.directionsViewHeader.className="directions-view-header",this.searchBoxesContainer=document.createElement("div"),this.searchBoxesContainer.className="directions-search-boxes-container",this.circlesAndSearchWrapper=document.createElement("div"),this.circlesAndSearchWrapper.className="directions-circles-search-wrapper";var t=this._createCirclesContainer();this.circlesAndSearchWrapper.appendChild(t),this.startSearchBox.searchBar.updateLeftButtonIcon("none"),this.startSearchBox.searchBar.updateRightButtonIcon("none"),this.endSearchBox.searchBar.updateLeftButtonIcon("none"),this.endSearchBox.searchBar.updateRightButtonIcon("none"),this.startSearchBox.searchBar.setPlaceholderText("Choose starting point"),this.endSearchBox.searchBar.setPlaceholderText("Choose destination"),this.searchBoxesContainer.appendChild(this.startSearchBox.getElement()),this.searchBoxesContainer.appendChild(this.endSearchBox.getElement()),this.circlesAndSearchWrapper.appendChild(this.searchBoxesContainer),this.directionsViewHeader.appendChild(this.circlesAndSearchWrapper),this._render(),this._setupEventListeners()}},{key:"_createCirclesContainer",value:function(){var t=document.createElement("div");t.className="directions-circles-container";var e=document.createElement("div");e.className="large-circle";var n=document.createElement("div");n.className="end-circle";var r=document.createElement("div");r.className="small-circle";var o=document.createElement("div");o.className="small-circle";var i=document.createElement("div");return i.className="small-circle",t.appendChild(e),t.appendChild(r),t.appendChild(o),t.appendChild(i),t.appendChild(n),t}},{key:"_render",value:function(){this.element.innerHTML="",this.element.appendChild(this.directionsViewHeader)}},{key:"_setupEventListeners",value:function(){this.startSearchBox.searchBar.on("focus",this._handleStartSearchBarFocus.bind(this)),this.startSearchBox.searchBar.on("blur",this._handleStartSearchBarBlur.bind(this)),this.startSearchBox.on("getSearchBarSuggestions",this._handleGettingStartSearchBarSuggestions.bind(this)),this.endSearchBox.searchBar.on("focus",this._handleEndSearchBarFocus.bind(this)),this.endSearchBox.searchBar.on("blur",this._handleEndSearchBarBlur.bind(this)),this.endSearchBox.on("getSearchBarSuggestions",this._handleGettingEndSearchBarSuggestions.bind(this)),this.startSearchBox.searchBarSuggestionsView.on("selectCell",this._handleStartContentPlacementSelect.bind(this)),this.endSearchBox.searchBarSuggestionsView.on("selectCell",this._handleEndContentPlacementSelect.bind(this))}},{key:"_handleGettingStartSearchBarSuggestions",value:(c=Fc(Rc().mark((function t(e){var n;return Rc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.query,this.fire("getStartSuggestions",{query:n});case 2:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"_handleGettingEndSearchBarSuggestions",value:(a=Fc(Rc().mark((function t(e){var n;return Rc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.query,this.fire("getEndSuggestions",{query:n});case 2:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"_handleStartContentPlacementSelect",value:(i=Fc(Rc().mark((function t(e){var n,r,o,i;return Rc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=e.result)||"gps-current-location"!==n.type){t.next=4;break}return this.fire("selectGpsCurrentLocation"),t.abrupt("return");case 4:return r=n.placement_id,o=n.catalog.content_title_key,this.startSearchBox.searchBar.setText(n.content.data[o]),t.next=9,this.searchApi.fetchContentPlacementDetails(r);case 9:i=t.sent,this.fire("selectedStartContentPlacement",{startContentPlacement:i}),this.updateView(i,this.endContentPlacement);case 12:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"enableGpsStartCell",value:function(){this.startSearchBox.setShowSuggestionsOnEmptyFocus(!0),this.startSearchBox.setPinnedResults([{type:"gps-current-location"}])}},{key:"disableGpsStartCell",value:function(){this.startSearchBox.setShowSuggestionsOnEmptyFocus(!1),this.startSearchBox.clearPinnedResults()}},{key:"focusStartInput",value:function(){var t=this.startSearchBox.searchBar.input;t&&t.focus(),this.startSearchBox.openSuggestionsView()}},{key:"_handleEndContentPlacementSelect",value:(o=Fc(Rc().mark((function t(e){var n,r,o,i;return Rc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.result,r=n.placement_id,o=n.catalog.content_title_key,this.endSearchBox.searchBar.setText(n.content.data[o]),t.next=6,this.searchApi.fetchContentPlacementDetails(r);case 6:i=t.sent,this.fire("selectedEndContentPlacement",{endContentPlacement:i}),this.updateView(this.startContentPlacement,i);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"_handleStartSearchBarFocus",value:function(){this.startSearchBox.searchBar.updateRightButtonIcon("search"),this.startSearchBox.searchBar.setPlaceholderText("Choose starting point")}},{key:"_handleEndSearchBarFocus",value:function(){this.endSearchBox.searchBar.updateRightButtonIcon("search")}},{key:"_handleStartSearchBarBlur",value:function(){this.startSearchBox.searchBar.updateRightButtonIcon("none")}},{key:"_handleEndSearchBarBlur",value:function(){this.endSearchBox.searchBar.updateRightButtonIcon("none")}},{key:"updateView",value:function(t,e){if(this.startContentPlacement=t,this.endContentPlacement=e,t&&e){var n=t.content.data[t.catalog.content_title_key];this.startSearchBox.searchBar.setText(n);var r=e.content.data[e.catalog.content_title_key];this.endSearchBox.searchBar.setText(r),this.fire("initiate:findPath",{startContentPlacementId:t.placement_id,endContentPlacementId:e.placement_id})}else if(t){var o=t.content.data[t.catalog.content_title_key];this.startSearchBox.searchBar.setText(o),this.endSearchBox.searchBar.setText(""),this.endSearchBox.searchBar.input.focus()}else if(e){var i=e.content.data[e.catalog.content_title_key];this.endSearchBox.searchBar.setText(i),this.startSearchBox.searchBar.setText(""),this.fromLocation&&this.fire("initiate:findPathFromLocation",{endContentPlacement:e})}}},{key:"setNewPath",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.fromLocation=e;var n=t.legs[0].steps[0];n.path,n.path,n.path,e&&this.startSearchBox.searchBar.setPlaceholderText("Your location"),this.pathData=t,this._render()}},{key:"getElement",value:function(){return this.element}},{key:"showLoading",value:function(){this.loadingElement&&(this.loadingElement.style.display="flex")}},{key:"hideLoading",value:function(){this.loadingElement&&(this.loadingElement.style.display="none")}}],r&&Vc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a,c}(Sn);n(975);function Kc(t){return Kc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kc(t)}function $c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Xc(r.key),r)}}function Xc(t){var e=function(t){if("object"!=Kc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Kc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Kc(e)?e:e+""}function ts(t,e,n){return e=ns(e),function(t,e){if(e&&("object"==Kc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,es()?Reflect.construct(e,n||[],ns(t).constructor):e.apply(t,n))}function es(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(es=function(){return!!t})()}function ns(t){return ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ns(t)}function rs(t,e){return rs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},rs(t,e)}const os=function(t){function e(){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=ts(this,e,[n])).pathData=null,t.legSelector=null,t.legSelectorContainerName="leg-selector",t.selectedLegIndex=0,t.stepsVisible=!0,t.toggleButton=null,t.floorData=n.floorData||[],t._initialize(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rs(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="steps-view",this._render()}},{key:"_createToggleButton",value:function(){var t=document.createElement("button");return t.className="toggle-steps-button",t.textContent=this.stepsVisible?"Hide Steps":"Show Steps",t.addEventListener("click",this._toggleStepsVisibility.bind(this)),t}},{key:"_toggleStepsVisibility",value:function(){this.stepsVisible=!this.stepsVisible,this._render()}},{key:"_createLegSelector",value:function(t){var e=this,n=[];t.forEach((function(t){var r,o=(null===(r=e.floorData[t.floor])||void 0===r?void 0:r.name)||"Floor ".concat(t.floor);n.push(o)}));var r=new wo(n,{container:this.legSelectorContainerName});return r.on("".concat(this.legSelectorContainerName,":selectNew"),this._handleLegSelectorSelect.bind(this)),r}},{key:"_handleLegSelectorSelect",value:function(t){var e=t.index;e!==this.selectedLegIndex&&(this.selectedLegIndex=e,this.fire("legSelect",t),this._render())}},{key:"_render",value:function(){var t=this;if(this.element.innerHTML="",this.pathData){this.element.style.display="",this.pathData.legs.length>1&&(this.legSelector=this._createLegSelector(this.pathData.legs),this.legSelector.selectButtonAtIndex(this.selectedLegIndex),this.element.appendChild(this.legSelector.getElement()));var e=document.createElement("div");if(e.className="steps-container",this.stepsVisible){var n=document.createElement("ul"),r=this.pathData.legs[this.selectedLegIndex];r.steps.forEach((function(e,o){var i=document.createElement("li");0!==t.selectedLegIndex&&t.pathData.legs.slice(0,t.selectedLegIndex).reduce((function(t,e){return t+e.steps.length}),0);var a=document.createElement("div");a.className="step-container";var c=document.createElement("img");c.className="step-icon","left"===e.instruction?c.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTI2IDRINkM1LjQ2OTU3IDQgNC45NjA4NiA0LjIxMDcxIDQuNTg1NzkgNC41ODU3OUM0LjIxMDcxIDQuOTYwODYgNCA1LjQ2OTU3IDQgNlYyNkM0IDI2LjUzMDQgNC4yMTA3MSAyNy4wMzkxIDQuNTg1NzkgMjcuNDE0MkM0Ljk2MDg2IDI3Ljc4OTMgNS40Njk1NyAyOCA2IDI4SDI2QzI2LjUzMDQgMjggMjcuMDM5MSAyNy43ODkzIDI3LjQxNDIgMjcuNDE0MkMyNy43ODkzIDI3LjAzOTEgMjggMjYuNTMwNCAyOCAyNlY2QzI4IDUuNDY5NTcgMjcuNzg5MyA0Ljk2MDg2IDI3LjQxNDIgNC41ODU3OUMyNy4wMzkxIDQuMjEwNzEgMjYuNTMwNCA0IDI2IDRaTTI2IDI2SDZWNkgyNlYyNlpNMTAuMjkyNSAxNi43MDc1QzEwLjE5OTUgMTYuNjE0NiAxMC4xMjU4IDE2LjUwNDMgMTAuMDc1NCAxNi4zODI5QzEwLjAyNTEgMTYuMjYxNSA5Ljk5OTIxIDE2LjEzMTQgOS45OTkyMSA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Q2IDE1LjgwMDUgMTIuNTA0MyAxNS44NzQyIDEyLjM4MjkgMTUuOTI0NkMxMi4yNjE1IDE1Ljk3NDkgMTIuMTMxNCAxNi4wMDA4IDEyIDE2LjAwMDhDMTEuODY4NiAxNi4wMDA4IDExLjczODUgMTUuOTc0OSAxMS42MTcxIDE1LjkyNDZDMTEuNDk1NyAxNS44NzQyIDExLjM4NTQgMTUuODAwNSAxMS4yOTI1IDE1LjcwNzVaIiBmaWxsPSIjODA4MDgwIi8+Cjwvc3ZnPgo="),a.appendChild(c);var s=document.createElement("div");s.className="step-details";var u=document.createElement("div");if(u.className="step-instruction",u.textContent=e.text,s.appendChild(u),o!==r.steps.length-1){var l=document.createElement("div");l.className="step-distance";var h=parseFloat(e.distance.toFixed(0));"Feet"===t.pathData.unit?h+=" ft":"Meters"===t.pathData.unit&&(h+=" m"),l.textContent=h,s.appendChild(l)}a.appendChild(s),i.appendChild(a),n.appendChild(i)})),e.appendChild(n),this.element.appendChild(e)}this.toggleButton=this._createToggleButton(),this.element.appendChild(this.toggleButton)}else this.element.style.display="none"}},{key:"clearSteps",value:function(){var t=this.element.querySelector(".steps-view");t&&t.remove()}},{key:"clear",value:function(){this.pathData=null,this._render()}},{key:"setNewPath",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.pathData=t,n&&(this.floorData=n),null!==e&&(this.stepsVisible=e),this.selectedLegIndex=0,this._render()}},{key:"getElement",value:function(){return this.element}}],r&&$c(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);var is=n(583);function as(t){return as="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},as(t)}function cs(){cs=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==as(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(as(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function ss(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function us(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ls(r.key),r)}}function ls(t){var e=function(t){if("object"!=as(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=as(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==as(e)?e:e+""}function hs(t,e,n){return e=ps(e),function(t,e){if(e&&("object"==as(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,fs()?Reflect.construct(e,n||[],ps(t).constructor):e.apply(t,n))}function fs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(fs=function(){return!!t})()}function ps(t){return ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ps(t)}function ds(t,e){return ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ds(t,e)}const ys=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=hs(this,e,[n]))._initialize(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ds(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="qr-code-view",this.textElement=document.createElement("p"),this.textElement.className="qr-code-text",this.textElement.innerText="Scan to continue on your phone",this.qrCodeContainer=document.createElement("div"),this.qrCodeContainer.className="qr-code-container",this.qrCodeCanvas=null,this.element.appendChild(this.textElement),this.element.appendChild(this.qrCodeContainer)}},{key:"updateQRCode",value:(o=cs().mark((function t(e){var n,r=arguments;return cs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:200,this.qrCodeCanvas&&(this.qrCodeContainer.removeChild(this.qrCodeCanvas),this.qrCodeCanvas=null),t.prev=2,this.qrCodeCanvas=document.createElement("canvas"),this.qrCodeCanvas.className="qr-code-canvas",t.next=7,is.toCanvas(this.qrCodeCanvas,e,{width:n,margin:2});case 7:this.qrCodeContainer.appendChild(this.qrCodeCanvas),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(2),console.error("Error generating QR code:",t.t0);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){ss(i,n,r,a,c,"next",t)}function c(t){ss(i,n,r,a,c,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})},{key:"show",value:function(){this.element.classList.add("visible")}},{key:"hide",value:function(){this.element.classList.remove("visible")}},{key:"getElement",value:function(){return this.element}}],r&&us(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}(Sn);function gs(t){return gs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gs(t)}function ms(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,vs(r.key),r)}}function vs(t){var e=function(t){if("object"!=gs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=gs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gs(e)?e:e+""}function Ms(t,e,n){return e=ws(e),function(t,e){if(e&&("object"==gs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,bs()?Reflect.construct(e,n||[],ws(t).constructor):e.apply(t,n))}function bs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(bs=function(){return!!t})()}function ws(t){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ws(t)}function js(t,e){return js=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},js(t,e)}var Ns={DENIED:{title:"Location access is off",body:"We couldn't use your location. Search for a starting point instead."},TIMEOUT:{title:"Couldn't get your location",body:"We couldn't read your location in time. Search for a starting point instead."},UNAVAILABLE:{title:"Couldn't get your location",body:"Your device didn't share a location. Search for a starting point instead."},NO_NODE:{title:"You're too far from this map",body:"We couldn't find a path near your location. Search for a starting point instead."},TOO_FAR:{title:"You're too far from this map",body:"You're not close enough to this map to start from your location. Search for a starting point instead."}};const Ds=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Ms(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&js(t,e)}(e,t),n=e,(r=[{key:"show",value:function(t,e,n){var r=this,o=Ns[e]||Ns.UNAVAILABLE,i=document.createElement("div");i.className="gps-fallback-popup-card";var a=document.createElement("div");a.className="gps-fallback-popup-title",a.textContent=o.title,i.appendChild(a);var c=document.createElement("div");c.className="gps-fallback-popup-body",c.textContent=o.body,i.appendChild(c);var s=document.createElement("button");if(s.className="gps-fallback-popup-ok",s.textContent="OK",s.addEventListener("click",(function(){r._resetModalStyles(t),t.hideModal(),"function"==typeof n&&n()})),i.appendChild(s),t.showModal(i),t.modalContainer){this._previousContainerBg=t.modalContainer.style.backgroundColor,t.modalContainer.style.backgroundColor="rgba(0, 0, 0, 0.35)";var u=t.modalContainer.querySelector(".waygo-map-modal-content");u&&(u.style.backgroundColor="transparent",u.style.width="auto",u.style.height="auto",u.style.maxWidth="none",u.style.maxHeight="none",u.style.boxShadow="none",u.style.display="flex",u.style.alignItems="center",u.style.justifyContent="center")}}},{key:"_resetModalStyles",value:function(t){t.modalContainer&&void 0!==this._previousContainerBg&&(t.modalContainer.style.backgroundColor=this._previousContainerBg,this._previousContainerBg=void 0)}}])&&ms(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Is(t){return Is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Is(t)}function Es(t,e,n){return(e=As(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ss(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ts(){Ts=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Is(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Is(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Os(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function xs(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Os(i,r,o,a,c,"next",t)}function c(t){Os(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Ls(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,As(r.key),r)}}function As(t){var e=function(t){if("object"!=Is(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Is(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Is(e)?e:e+""}function ks(t,e,n){return e=_s(e),function(t,e){if(e&&("object"==Is(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Cs()?Reflect.construct(e,n||[],_s(t).constructor):e.apply(t,n))}function Cs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Cs=function(){return!!t})()}function zs(){return zs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=_s(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},zs.apply(null,arguments)}function _s(t){return _s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_s(t)}function Ps(t,e){return Ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ps(t,e)}const Bs=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=ks(this,e,[n])).directionsView=null,t.stepsView=null,t.map=null,t.searchApi=nn.getSearchApi(),t.startContentPlacement=null,t.endContentPlacement=null,t.fromLocation=!1,t.qrCodeView=null,t.qrCodeButton=null,t.pathData=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ps(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){var e;return this.map=t,this.container=document.createElement("div"),this.container.className="directions-control-container",this.directionsView=new Jc,this.stepsView=new os([],{floorData:(null===(e=this.map.mapData)||void 0===e?void 0:e.floors)||[]}),this.qrCodeView=new ys,this.container.appendChild(this.directionsView.getElement()),this.initializeEventListeners(),this.createDirectionsLineLayer(),this._attachResizeListener(),this._initialize(),this.hide(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=zs(_s(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){var t=this;this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("initiate:findPath",this._handleIntiateFindPath.bind(this)),this.map.on("initiate:findPathFromLocation",this._handleInitiateFindPathFromLocation.bind(this)),this.map.on("gps:fallback",this._handleGpsFallback.bind(this)),this.directionsView.on("getStartSuggestions",this._handleGettingStartSearchBarSuggestions.bind(this)),this.directionsView.on("getEndSuggestions",this._handleGettingEndSearchBarSuggestions.bind(this)),this.directionsView.on("initiate:findPath",(function(e){return t.map.initiateFindPath(e.startContentPlacementId,e.endContentPlacementId)})),this.directionsView.on("initiate:findPathFromLocation",(function(e){return t.map.initiateFindPathFromLocation(e.endContentPlacement)})),this.directionsView.on("selectedStartContentPlacement",this._handleStartContentPlacementSelected.bind(this)),this.directionsView.on("selectedEndContentPlacement",this._handleEndContentPlacementSelected.bind(this)),this.directionsView.on("selectGpsCurrentLocation",this._handleSelectGpsCurrentLocation.bind(this)),this.stepsView.on("legSelect",this._handleLegChange.bind(this))}},{key:"_handleEndContentPlacementSelected",value:function(t){var e,n,r=t.endContentPlacement;this.endContentPlacement=r;var o=(null===(e=this.map.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],i=(null===(n=this.map.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30,a=Cn(r.location,o,i),c=a.lat,s=[a.lon,c];if(!r.name&&r.catalog&&r.content){var u=r.catalog.content_title_key;if(u){var l=r.content.data[u];r.name=l}}r._floor=r.floor,this.map.addSelectedFeature(s,r)}},{key:"_handleStartContentPlacementSelected",value:function(t){var e,n,r=t.startContentPlacement;this.startContentPlacement=r;var o=(null===(e=this.map.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],i=(null===(n=this.map.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30,a=Cn(r.location,o,i),c=a.lat,s=[a.lon,c];if(!r.name&&r.catalog&&r.content){var u=r.catalog.content_title_key;if(u){var l=r.content.data[u];r.name=l}}r._floor=r.floor,this.map.clearHighlightedContentLayer(),this.map.addHighlightedFeature(s,r)}},{key:"_handleLegChange",value:function(t){var e=t.index;this.directionsView&&this.pathData&&this.updateMapForPathLeg(this.pathData.legs[e])}},{key:"_handleGettingStartSearchBarSuggestions",value:(l=xs(Ts().mark((function t(e){var n,r,o;return Ts().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.directionsView){t.next=2;break}return t.abrupt("return");case 2:if(n=e.query,r=++this.directionsView.startSearchBox.searchCount,""!==n){t.next=7;break}return this.directionsView.startSearchBox.searchBarSuggestionsView.updateResults([]),t.abrupt("return");case 7:if(this.map.mapData){t.next=9;break}return t.abrupt("return");case 9:return t.prev=11,t.next=14,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,n,0,5);case 14:o=t.sent,r===this.directionsView.startSearchBox.searchCount&&this.directionsView.startSearchBox.searchBarSuggestionsView.updateResults(o),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(11),be.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 21:case"end":return t.stop()}}),t,this,[[11,18]])}))),function(t){return l.apply(this,arguments)})},{key:"_handleGettingEndSearchBarSuggestions",value:(u=xs(Ts().mark((function t(e){var n,r,o;return Ts().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.directionsView){t.next=2;break}return t.abrupt("return");case 2:if(n=e.query,r=++this.directionsView.endSearchBox.searchCount,""!==n){t.next=7;break}return this.directionsView.endSearchBox.searchBarSuggestionsView.updateResults([]),t.abrupt("return");case 7:if(this.map.mapData){t.next=9;break}return t.abrupt("return");case 9:return t.prev=11,t.next=14,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,n,0,5);case 14:o=t.sent,r===this.directionsView.endSearchBox.searchCount&&this.directionsView.endSearchBox.searchBarSuggestionsView.updateResults(o),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(11),be.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 21:case"end":return t.stop()}}),t,this,[[11,18]])}))),function(t){return u.apply(this,arguments)})},{key:"_renderDesktopView",value:function(){if(this.directionsView){this.container.innerHTML="";var t=this.directionsView.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view"),this._shouldShowQRCodeButton()?(this.qrCodeButton&&this.qrCodeButton.parentNode||this._createQRCodeButton(),this.container.appendChild(this.qrCodeButton)):this.qrCodeButton&&this.qrCodeButton.parentNode&&this.qrCodeButton.parentNode.removeChild(this.qrCodeButton),this.container.appendChild(this.stepsView.getElement())}else console.warn("⚠️ DirectionsControl: directionsView is null")}},{key:"_renderMobileView",value:function(){if(this.directionsView){this.container.innerHTML="";var t=this.directionsView.getElement();this.container.appendChild(t),this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view"),this._shouldShowQRCodeButton()?(this.qrCodeButton&&this.qrCodeButton.parentNode||this._createQRCodeButton(),this.container.appendChild(this.qrCodeButton)):this.qrCodeButton&&this.qrCodeButton.parentNode&&this.qrCodeButton.parentNode.removeChild(this.qrCodeButton),this.container.appendChild(this.stepsView.getElement())}else console.warn("⚠️ DirectionsControl: directionsView is null")}},{key:"createDirectionsLineLayer",value:function(){this.map.map.addSource("directionsLineSource",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"LineString",coordinates:[]}}}),this.map.map.addLayer({id:"directionsLineLayer",type:"line",source:"directionsLineSource",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#333333","line-width":8}}),this.map.map.moveLayer("directionsLineLayer","FIRST_ELEVATED_FEATURE")}},{key:"updateMapForPathLeg",value:function(t){var e,n;this.clearLineData();var r=[];t.steps.forEach((function(t,e){r.push.apply(r,function(t){return function(t){if(Array.isArray(t))return Ss(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ss(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ss(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(0===e?t.path:t.path.slice(1)))}));var o=(null===(e=this.map.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],i=(null===(n=this.map.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30,a=zn(r,o,i);this._updateMapLineData(a,t.floor),this.map.getCurrentFloor()!==t.floor&&this.map.updateFloor(t.floor,!1)}},{key:"_updateMapLineData",value:function(t,e){this.map.map.getSource("directionsLineSource").setData({type:"Feature",properties:{_floor:e},geometry:{type:"LineString",coordinates:t}});var n=new mapboxgl.LngLatBounds;t.forEach((function(t){n.extend(t)})),"desktop"===this.currentViewType?this.map.map.fitBounds(n,Es(Es(Es({padding:200},"padding",{top:200,bottom:200,left:500,right:150}),"maxZoom",18),"duration",1e3)):this.map.map.fitBounds(n,{padding:{top:350,bottom:60,left:80,right:100},maxZoom:18,duration:1e3})}},{key:"clearLineData",value:function(){this.map.map.getSource("directionsLineSource").setData({type:"Feature",properties:{},geometry:{type:"LineString",coordinates:[]}})}},{key:"_handleDefaultState",value:function(){this.hide(),this.clearData()}},{key:"_handleSearchState",value:function(t){t.query,t.results,this.hide(),this.clearData()}},{key:"_handleSelectedContentState",value:function(t){t.contentPlacementIds,t.selectedContentPlacement,this.hide(),this.directionsView.updateView(null,null),this.clearData(),this.map.clearHighlightedContentLayer()}},{key:"_handleSetupState",value:function(){this.hide()}},{key:"clearData",value:function(){this.pathData=null,this.clearLineData(),this.stepsView.clear(),this.qrCodeButton&&this.qrCodeButton.parentNode&&this.qrCodeButton.parentNode.removeChild(this.qrCodeButton)}},{key:"_handleDirectionsState",value:(s=xs(Ts().mark((function t(e){var n,r,o,i,a,c,s,u,l,h,f,p,d,y,g,m,v,M,b,w,j,N,D,I,E,S=this;return Ts().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.startContentPlacement,i=e.endContentPlacement,a=e.startNodeId,this.clearData(),"desktop"===this.currentViewType?this._renderDesktopView():this._renderMobileView(),this.show(),this.startContentPlacement=o,this.endContentPlacement=i,this.directionsView.updateView(o,i),this.map.shouldShowGpsCell&&this.map.shouldShowGpsCell()&&!o&&!a&&i?(this.directionsView.enableGpsStartCell(),setTimeout((function(){return S.directionsView.focusStartInput()}),50)):this.directionsView.disableGpsStartCell(),c=(null===(n=this.map.mapData)||void 0===n?void 0:n.reference_coordinate)||[0,0],s=(null===(r=this.map.mapData)||void 0===r?void 0:r.coordinate_scaling_multiplier)||30,o&&(u=Cn(o.location,c,s),l=u.lat,h=u.lon,f=[h,l],o.name||o.catalog&&o.content&&(p=o.catalog.content_title_key)&&(d=o.content.data[p],o.name=d),o._floor=o.floor,this.map.clearHighlightedContentLayer(),this.map.addHighlightedFeature(f,o)),!i){t.next=27;break}if(y=Cn(i.location,c,s),g=y.lat,m=y.lon,v=[m,g],i.name||i.catalog&&i.content&&(M=i.catalog.content_title_key)&&(b=i.content.data[M],i.name=b),i._floor=i.floor,this.map.addSelectedFeature(v,i),w=null,null!=a&&""!==a?(w=a,console.log("�� DirectionsControl: Using provided startNodeId:",a)):this.map.location&&!o&&(w=this.map.location,console.log("�� DirectionsControl: Using map.location:",this.map.location)),!w){t.next=27;break}return console.log("�� DirectionsControl: Finding path from node to end placement, nodeId:",w),t.next=24,this.map.findPathFromNodeToPlacement(w,i.placement_id);case 24:this.pathData=t.sent,console.log("�� DirectionsControl: Path data received:",!!this.pathData),this.pathData?(this.fromLocation=!0,this.directionsView.setNewPath(this.pathData,!0),j=this.pathData.legs[0].steps[0].path[0],N=Cn(j,c,s),D=N.lat,I=N.lon,E=[I,D],this.map.addHighlightedFeature(E,{_floor:this.pathData.legs[0].floor,name:"Start"}),"mobile"===this.currentViewType?this.stepsView.setNewPath(this.pathData,!1,this.map.mapData.floors):this.stepsView.setNewPath(this.pathData,!0,this.map.mapData.floors),this.updateMapForPathLeg(this.pathData.legs[0]),"desktop"===this.currentViewType?this._renderDesktopView():this._renderMobileView()):console.warn("⚠️ DirectionsControl: No path data returned");case 27:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"_handleInitiateFindPathFromLocation",value:(c=xs(Ts().mark((function t(e){var n;return Ts().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log("�� DirectionsControl: _handleInitiateFindPathFromLocation called",e),n=e.endContentPlacement,!this.map.location||!n){t.next=7;break}return t.next=5,this.map.findPathFromNodeToPlacement(this.map.location,n.placement_id);case 5:this.pathData=t.sent,this.pathData&&(this.fromLocation=!0,this.directionsView.setNewPath(this.pathData,!0),"mobile"===this.currentViewType?this.stepsView.setNewPath(this.pathData,!1,this.map.mapData.floors):this.stepsView.setNewPath(this.pathData,!0,this.map.mapData.floors),this.updateMapForPathLeg(this.pathData.legs[0]),"desktop"===this.currentViewType?this._renderDesktopView():this._renderMobileView());case 7:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"_handleIntiateFindPath",value:(a=xs(Ts().mark((function t(e){var n,r;return Ts().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.startContentPlacementId,r=e.endContentPlacementId,t.next=3,this.map.findPath(n,r);case 3:this.pathData=t.sent,this.fromLocation=!1,this.directionsView.setNewPath(this.pathData),"mobile"===this.currentViewType?this.stepsView.setNewPath(this.pathData,!1,this.map.mapData.floors):this.stepsView.setNewPath(this.pathData,!0,this.map.mapData.floors),this.updateMapForPathLeg(this.pathData.legs[0]),"desktop"===this.currentViewType?this._renderDesktopView():this._renderMobileView();case 9:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"_handleSelectDirectionsButton",value:function(t){t.placementId}},{key:"_handleSelectGpsCurrentLocation",value:(i=xs(Ts().mark((function t(){return Ts().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.endContentPlacement){t.next=3;break}return console.warn("⚠️ DirectionsControl: GPS cell selected but no end placement set"),t.abrupt("return");case 3:return t.next=5,this.map.useCurrentLocation(this.endContentPlacement.placement_id);case 5:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"_handleGpsFallback",value:function(t){var e=this,n=t.reason;this.gpsFallbackPopup||(this.gpsFallbackPopup=new Ds),this.gpsFallbackPopup.show(this.map,n,(function(){e.map.shouldShowGpsCell&&e.map.shouldShowGpsCell()?setTimeout((function(){return e.directionsView.focusStartInput()}),50):e.directionsView.disableGpsStartCell()}))}},{key:"_render",value:function(){}},{key:"_shouldShowQRCodeButton",value:function(){return!!this.map.location&&!1!==this.map.options.showQRCodeInKioskMode&&!!this.pathData&&!!this.endContentPlacement}},{key:"_createQRCodeButton",value:function(){this.qrCodeButton=document.createElement("button"),this.qrCodeButton.className="qr-code-button";var t=document.createElement("div");t.className="qr-code-button-icon";var e=document.createElement("img");e.src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0ic2l6ZS02Ij4KICA8cGF0aCBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Ik0zLjc1IDQuODc1YzAtLjYyMS41MDQtMS4xMjUgMS4xMjUtMS4xMjVoNC41Yy42MjEgMCAxLjEyNS41MDQgMS4xMjUgMS4xMjV2NC41YzAgLjYyMS0uNTA0IDEuMTI1LTEuMTI1IDEuMTI1aC00LjVBMS4xMjUgMS4xMjUgMCAwIDEgMy43NSA5LjM3NXYtNC41Wk0zLjc1IDE0LjYyNWMwLS42MjEuNTA0LTEuMTI1IDEuMTI1LTEuMTI1aDQuNWMuNjIxIDAgMS4xMjUuNTA0IDEuMTI1IDEuMTI1djQuNWMwIC42MjEtLjUwNCAxLjEyNS0xLjEyNSAxLjEyNWgtNC41YTEuMTI1IDEuMTI1IDAgMCAxLTEuMTI1LTEuMTI1di00LjVaTTEzLjUgNC44NzVjMC0uNjIxLjUwNC0xLjEyNSAxLjEyNS0xLjEyNWg0LjVjLjYyMSAwIDEuMTI1LjUwNCAxLjEyNSAxLjEyNXY0LjVjMCAuNjIxLS41MDQgMS4xMjUtMS4xMjUgMS4xMjVoLTQuNUExLjEyNSAxLjEyNSAwIDAgMSAxMy41IDkuMzc1di00LjVaIiAvPgogIDxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTYuNzUgNi43NWguNzV2Ljc1aC0uNzV2LS43NVpNNi43NSAxNi41aC43NXYuNzVoLS43NXYtLjc1Wk0xNi41IDYuNzVoLjc1di43NWgtLjc1di0uNzVaTTEzLjUgMTMuNWguNzV2Ljc1aC0uNzV2LS43NVpNMTMuNSAxOS41aC43NXYuNzVoLS43NXYtLjc1Wk0xOS41IDEzLjVoLjc1di43NWgtLjc1di0uNzVaTTE5LjUgMTkuNWguNzV2Ljc1aC0uNzV2LS43NVpNMTYuNSAxNi41aC43NXYuNzVoLS43NXYtLjc1WiIgLz4KPC9zdmc+Cg==",e.alt="QR Code",t.appendChild(e);var n=document.createElement("div");n.className="qr-code-button-text",n.textContent="Continue on your phone ->",this.qrCodeButton.appendChild(t),this.qrCodeButton.appendChild(n),this.qrCodeButton.addEventListener("click",this._showQRCodeModal.bind(this))}},{key:"_generateQRCodeURL",value:function(){if(!this.map.mapData||!this.endContentPlacement)return null;var t,e=this.map.mapData.map_id,n=this.map.mapData.map_view_id,r=this.endContentPlacement.placement_id;if(this.fromLocation)t=this.map.location;else{if(!this.startContentPlacement)return null;t=this.startContentPlacement.placement_id}return"https://maps.waygomaps.com/".concat(e,"/").concat(n,"/directions/").concat(t,"/").concat(r)}},{key:"_showQRCodeModal",value:(o=xs(Ts().mark((function t(){var e,n,r,o,i,a,c=this;return Ts().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this._generateQRCodeURL()){t.next=4;break}return console.warn("⚠️ DirectionsControl: No URL generated for QR code"),t.abrupt("return");case 4:return(r=document.createElement("div")).className="qr-code-modal-card",(o=document.createElement("button")).className="qr-code-modal-close",(i=document.createElement("img")).src=yr,i.alt="Close",o.appendChild(i),o.addEventListener("click",(function(){c.map.hideModal()})),r.appendChild(o),t.next=16,this.qrCodeView.updateQRCode(n,250);case 16:r.appendChild(this.qrCodeView.getElement()),this.map.showModal(r),(a=null===(e=this.map.modalContainer)||void 0===e?void 0:e.querySelector(".waygo-map-modal-content"))&&(a.style.backgroundColor="transparent",a.style.width="auto",a.style.height="auto",a.style.maxWidth="none",a.style.maxHeight="none");case 20:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})}],r&&Ls(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a,c,s,u,l}(eo);function Us(t){return Us="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Us(t)}function Qs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Rs(r.key),r)}}function Rs(t){var e=function(t){if("object"!=Us(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Us(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Us(e)?e:e+""}function Ys(t,e,n){return e=Hs(e),function(t,e){if(e&&("object"==Us(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Fs()?Reflect.construct(e,n||[],Hs(t).constructor):e.apply(t,n))}function Fs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Fs=function(){return!!t})()}function Vs(){return Vs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Hs(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Vs.apply(null,arguments)}function Hs(t){return Hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hs(t)}function Gs(t,e){return Gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gs(t,e)}const Zs=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Ys(this,e,[n])).floorSelectorContainerName="floor-selector",t.floorSelector=new wo([],{container:"floor-selector",allowsToggle:!1}),t.map=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gs(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){this.map=t,this.container=document.createElement("div"),this.container.className="floor-selector-control-container";var e=this.floorSelector.getElement();return this.container.appendChild(e),this.initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=Vs(Hs(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.floorSelector.on("".concat(this.floorSelectorContainerName,":selectNew"),this._handleFloorSelectorSelect.bind(this)),this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("load",this._handleMapLoad.bind(this)),this.map.on("floorChanged",this._handleFloorChange.bind(this))}},{key:"_handleMapLoad",value:function(t){var e=t.mapData.floors,n=[];e.forEach((function(t){n.push(t.indicator)})),n.length<2||(this.floorSelector.updateItems(n),this.floorSelector.selectButtonAtIndex(this.map.options.floor))}},{key:"_handleFloorChange",value:function(t){var e=t.floorIndex;this.floorSelector.getIndexOfSelectedButton()!==e&&this.floorSelector.selectButtonAtIndex(e)}},{key:"_renderDesktopView",value:function(){var t=this.floorSelector.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view"),this.map.mapContainer.offsetWidth,this.floorSelector.setViewForDesktop()}},{key:"_renderMobileView",value:function(){var t=this.floorSelector.getElement();this.container.appendChild(t),this.map.mapContainer.offsetWidth,this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view"),this.floorSelector.setViewForMobile()}},{key:"_handleDefaultState",value:function(){this.show()}},{key:"_handleSelectedContentState",value:function(t){"mobile"===this.currentViewType?this.hide():this.show()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleFloorSelectorSelect",value:function(t){t.query;var e=t.index;e!==this.map.getCurrentFloor()&&this.map.updateFloor(e)}},{key:"_handleSearchState",value:function(t){t.query,t.results,this.show()}},{key:"_handleSetupState",value:function(){this.show()}}],r&&Qs(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(eo);"undefined"!=typeof window&&(n.p=window.location.origin+"/");const Ws={MapView:dr,SearchBox:Kr,SearchBoxControl:fo,CategoryBarControl:xo,SearchResultsControl:pi,ContentPlacementControl:rc,InteractionControl:Uc,SetupControl:Nc,DirectionsControl:Bs,FloorSelectorControl:Zs,setApiKey:nn.setApiKey.bind(nn)}})(),r.default})()));
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.waygomaps=e():t.waygomaps=e()}(this,(()=>(()=>{var t={526:(t,e)=>{"use strict";e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,i=c(t),a=i[0],s=i[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),l=0,h=s>0?a-4:a;for(n=0;n<h;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;return 2===s&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,u[l++]=255&e),1===s&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e),u},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],a=16383,c=0,u=r-o;c<u;c+=a)i.push(s(t,c,c+a>u?u:c+a));return 1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function s(t,e,r){for(var o,i,a=[],c=e;c<r;c+=3)o=(t[c]<<16&16711680)+(t[c+1]<<8&65280)+(255&t[c+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},287:(t,e,n)=>{"use strict";const r=n(526),o=n(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=s,e.IS=50;const a=2147483647;function c(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return u(t,e,n)}function u(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|y(t,e);let r=c(n);const o=r.write(t,e);return o!==n&&(r=r.slice(0,o)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(q(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(q(t,ArrayBuffer)||t&&q(t.buffer,ArrayBuffer))return p(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(q(t,SharedArrayBuffer)||t&&q(t.buffer,SharedArrayBuffer)))return p(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return s.from(r,e,n);const o=function(t){if(s.isBuffer(t)){const e=0|d(t.length),n=c(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||J(t.length)?c(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return l(t),c(t<0?0:0|d(t))}function f(t){const e=t.length<0?0:0|d(t.length),n=c(e);for(let r=0;r<e;r+=1)n[r]=255&t[r];return n}function p(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(r,s.prototype),r}function d(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function y(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Z(t).length;default:if(o)return r?-1:G(t).length;e=(""+e).toLowerCase(),o=!0}}function g(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return O(this,e,n);case"base64":return I(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),J(n=+n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:M(t,e,n,r,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):M(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function M(t,e,n,r,o){let i,a=1,c=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,c/=2,s/=2,n/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){let r=-1;for(i=n;i<c;i++)if(u(t,i)===u(e,-1===r?0:i-r)){if(-1===r&&(r=i),i-r+1===s)return r*a}else-1!==r&&(i-=i-r),r=-1}else for(n+s>c&&(n=c-s),i=n;i>=0;i--){let n=!0;for(let r=0;r<s;r++)if(u(t,i+r)!==u(e,r)){n=!1;break}if(n)return i}return-1}function b(t,e,n,r){n=Number(n)||0;const o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=e.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(e.substr(2*a,2),16);if(J(r))return a;t[n+a]=r}return a}function w(t,e,n,r){return W(G(e,t.length-n),t,n,r)}function j(t,e,n,r){return W(function(t){const e=[];for(let n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function N(t,e,n,r){return W(Z(e),t,n,r)}function D(t,e,n,r){return W(function(t,e){let n,r,o;const i=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function I(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);const r=[];let o=e;for(;o<n;){const e=t[o];let i=null,a=e>239?4:e>223?3:e>191?2:1;if(o+a<=n){let n,r,c,s;switch(a){case 1:e<128&&(i=e);break;case 2:n=t[o+1],128==(192&n)&&(s=(31&e)<<6|63&n,s>127&&(i=s));break;case 3:n=t[o+1],r=t[o+2],128==(192&n)&&128==(192&r)&&(s=(15&e)<<12|(63&n)<<6|63&r,s>2047&&(s<55296||s>57343)&&(i=s));break;case 4:n=t[o+1],r=t[o+2],c=t[o+3],128==(192&n)&&128==(192&r)&&128==(192&c)&&(s=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&c,s>65535&&s<1114112&&(i=s))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return function(t){const e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);let n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=S));return n}(r)}s.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,n){return u(t,e,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(t,e,n){return function(t,e,n){return l(t),t<=0?c(t):void 0!==e?"string"==typeof n?c(t).fill(e,n):c(t).fill(e):c(t)}(t,e,n)},s.allocUnsafe=function(t){return h(t)},s.allocUnsafeSlow=function(t){return h(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(q(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),q(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,r=e.length;for(let o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);let n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;const r=s.allocUnsafe(e);let o=0;for(n=0;n<t.length;++n){let e=t[n];if(q(e,Uint8Array))o+e.length>r.length?(s.isBuffer(e)||(e=s.from(e)),e.copy(r,o)):Uint8Array.prototype.set.call(r,e,o);else{if(!s.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,o)}o+=e.length}return r},s.byteLength=y,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)m(this,e,e+1);return this},s.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},s.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},s.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?E(this,0,t):g.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){let t="";const n=e.IS;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(t,e,n,r,o){if(q(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;let i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0);const c=Math.min(i,a),u=this.slice(r,o),l=t.slice(e,n);for(let t=0;t<c;++t)if(u[t]!==l[t]){i=u[t],a=l[t];break}return i<a?-1:a<i?1:0},s.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},s.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},s.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},s.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":case"latin1":case"binary":return j(this,t,e,n);case"base64":return N(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function T(t,e,n){let r="";n=Math.min(t.length,n);for(let o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function O(t,e,n){let r="";n=Math.min(t.length,n);for(let o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function x(t,e,n){const r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=e;r<n;++r)o+=K[t[r]];return o}function L(t,e,n){const r=t.slice(e,n);let o="";for(let t=0;t<r.length-1;t+=2)o+=String.fromCharCode(r[t]+256*r[t+1]);return o}function A(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function k(t,e,n,r,o,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function C(t,e,n,r,o){Y(e,r,o,t,n,7);let i=Number(e&BigInt(4294967295));t[n++]=i,i>>=8,t[n++]=i,i>>=8,t[n++]=i,i>>=8,t[n++]=i;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function z(t,e,n,r,o){Y(e,r,o,t,n,7);let i=Number(e&BigInt(4294967295));t[n+7]=i,i>>=8,t[n+6]=i,i>>=8,t[n+5]=i,i>>=8,t[n+4]=i;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function _(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function P(t,e,n,r,i){return e=+e,n>>>=0,i||_(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function B(t,e,n,r,i){return e=+e,n>>>=0,i||_(t,0,n,8),o.write(t,e,n,r,52,8),n+8}s.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);const r=this.subarray(t,e);return Object.setPrototypeOf(r,s.prototype),r},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||A(t,e,this.length);let r=this[t],o=1,i=0;for(;++i<e&&(o*=256);)r+=this[t+i]*o;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||A(t,e,this.length);let r=this[t+--e],o=1;for(;e>0&&(o*=256);)r+=this[t+--e]*o;return r},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||A(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||A(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||A(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||A(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=$((function(t){F(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(o)<<BigInt(32))})),s.prototype.readBigUInt64BE=$((function(t){F(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<<BigInt(32))+BigInt(o)})),s.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||A(t,e,this.length);let r=this[t],o=1,i=0;for(;++i<e&&(o*=256);)r+=this[t+i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||A(t,e,this.length);let r=e,o=1,i=this[t+--r];for(;r>0&&(o*=256);)i+=this[t+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},s.prototype.readInt8=function(t,e){return t>>>=0,e||A(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||A(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){t>>>=0,e||A(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=$((function(t){F(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),s.prototype.readBigInt64BE=$((function(t){F(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+n)})),s.prototype.readFloatLE=function(t,e){return t>>>=0,e||A(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||A(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||A(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||A(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||k(this,t,e,n,Math.pow(2,8*n)-1,0);let o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||k(this,t,e,n,Math.pow(2,8*n)-1,0);let o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigUInt64LE=$((function(t,e=0){return C(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=$((function(t,e=0){return z(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);k(this,t,e,n,r-1,-r)}let o=0,i=1,a=0;for(this[e]=255&t;++o<n&&(i*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/i|0)-a&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);k(this,t,e,n,r-1,-r)}let o=n-1,i=1,a=0;for(this[e+o]=255&t;--o>=0&&(i*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/i|0)-a&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigInt64LE=$((function(t,e=0){return C(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=$((function(t,e=0){return z(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(t,e,n){return P(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return P(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);const o=r-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),o},s.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){const e=t.charCodeAt(0);("utf8"===r&&e<128||"latin1"===r)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;let o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{const i=s.isBuffer(t)?t:s.from(t,r),a=i.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<n-e;++o)this[o+e]=i[o%a]}return this};const U={};function Q(t,e,n){U[t]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function R(t){let e="",n=t.length;const r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function Y(t,e,n,r,o,i){if(t>n||t<e){const r="bigint"==typeof e?"n":"";let o;throw o=i>3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new U.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,n){F(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||V(e,t.length-(n+1))}(r,o,i)}function F(t,e){if("number"!=typeof t)throw new U.ERR_INVALID_ARG_TYPE(e,"number",t)}function V(t,e,n){if(Math.floor(t)!==t)throw F(t,n),new U.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}Q("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),Q("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),Q("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=R(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=R(o)),o+="n"),r+=` It must be ${e}. Received ${o}`,r}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function G(t,e){let n;e=e||1/0;const r=t.length;let o=null;const i=[];for(let a=0;a<r;++a){if(n=t.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Z(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,n,r){let o;for(o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function J(t){return t!=t}const K=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)e[r+o]=t[n]+t[o]}return e}();function $(t){return"undefined"==typeof BigInt?X:t}function X(){throw new Error("BigInt not supported")}},320:t=>{"use strict";var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var a,c,s,u,l,h,f,p=e.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(s in c=(a=p.pop()).value,u=a.cost,l=t[c]||{})l.hasOwnProperty(s)&&(h=u+l[s],f=i[s],(void 0===i[s]||f>h)&&(i[s]=h,p.push(s,h),o[s]=c));if(void 0!==r&&void 0===i[r]){var d=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(d)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e},251:(t,e)=>{e.read=function(t,e,n,r,o){var i,a,c=8*o-r-1,s=(1<<c)-1,u=s>>1,l=-7,h=n?o-1:0,f=n?-1:1,p=t[e+h];for(h+=f,i=p&(1<<-l)-1,p>>=-l,l+=c;l>0;i=256*i+t[e+h],h+=f,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+t[e+h],h+=f,l-=8);if(0===i)i=1-u;else{if(i===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=u}return(p?-1:1)*a*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var a,c,s,u=8*i-o-1,l=(1<<u)-1,h=l>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+h>=1?f/s:f*Math.pow(2,1-h))*s>=2&&(a++,s/=2),a+h>=l?(c=0,a=l):a+h>=1?(c=(e*s-1)*Math.pow(2,o),a+=h):(c=e*Math.pow(2,h-1)*Math.pow(2,o),a=0));o>=8;t[n+p]=255&c,p+=d,c/=256,o-=8);for(a=a<<o|c,u+=o;u>0;t[n+p]=255&a,p+=d,a/=256,u-=8);t[n+p-d]|=128*y}},975:(t,e,n)=>{"use strict";var r=n(606);function o(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function i(t,e){for(var n,r="",o=0,i=-1,a=0,c=0;c<=t.length;++c){if(c<t.length)n=t.charCodeAt(c);else{if(47===n)break;n=47}if(47===n){if(i===c-1||1===a);else if(i!==c-1&&2===a){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var s=r.lastIndexOf("/");if(s!==r.length-1){-1===s?(r="",o=0):o=(r=r.slice(0,s)).length-1-r.lastIndexOf("/"),i=c,a=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=c,a=0;continue}e&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+t.slice(i+1,c):r=t.slice(i+1,c),o=c-i-1;i=c,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var a={resolve:function(){for(var t,e="",n=!1,a=arguments.length-1;a>=-1&&!n;a--){var c;a>=0?c=arguments[a]:(void 0===t&&(t=r.cwd()),c=t),o(c),0!==c.length&&(e=c+"/"+e,n=47===c.charCodeAt(0))}return e=i(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(o(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=i(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return o(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];o(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":a.normalize(t)},relative:function(t,e){if(o(t),o(e),t===e)return"";if((t=a.resolve(t))===(e=a.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var r=t.length,i=r-n,c=1;c<e.length&&47===e.charCodeAt(c);++c);for(var s=e.length-c,u=i<s?i:s,l=-1,h=0;h<=u;++h){if(h===u){if(s>u){if(47===e.charCodeAt(c+h))return e.slice(c+h+1);if(0===h)return e.slice(c+h)}else i>u&&(47===t.charCodeAt(n+h)?l=h:0===h&&(l=0));break}var f=t.charCodeAt(n+h);if(f!==e.charCodeAt(c+h))break;47===f&&(l=h)}var p="";for(h=n+l+1;h<=r;++h)h!==r&&47!==t.charCodeAt(h)||(0===p.length?p+="..":p+="/..");return p.length>0?p+e.slice(c+l):(c+=l,47===e.charCodeAt(c)&&++c,e.slice(c))},_makeLong:function(t){return t},dirname:function(t){if(o(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"//":t.slice(0,r)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');o(t);var n,r=0,i=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var c=e.length-1,s=-1;for(n=t.length-1;n>=0;--n){var u=t.charCodeAt(n);if(47===u){if(!a){r=n+1;break}}else-1===s&&(a=!1,s=n+1),c>=0&&(u===e.charCodeAt(c)?-1==--c&&(i=n):(c=-1,i=s))}return r===i?i=s:-1===i&&(i=t.length),t.slice(r,i)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){r=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":t.slice(r,i)},extname:function(t){o(t);for(var e=-1,n=0,r=-1,i=!0,a=0,c=t.length-1;c>=0;--c){var s=t.charCodeAt(c);if(47!==s)-1===r&&(i=!1,r=c+1),46===s?-1===e?e=c:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){n=c+1;break}}return-1===e||-1===r||0===a||1===a&&e===r-1&&e===n+1?"":t.slice(e,r)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+"/"+r:r}(0,t)},parse:function(t){o(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,r=t.charCodeAt(0),i=47===r;i?(e.root="/",n=1):n=0;for(var a=-1,c=0,s=-1,u=!0,l=t.length-1,h=0;l>=n;--l)if(47!==(r=t.charCodeAt(l)))-1===s&&(u=!1,s=l+1),46===r?-1===a?a=l:1!==h&&(h=1):-1!==a&&(h=-1);else if(!u){c=l+1;break}return-1===a||-1===s||0===h||1===h&&a===s-1&&a===c+1?-1!==s&&(e.base=e.name=0===c&&i?t.slice(1,s):t.slice(c,s)):(0===c&&i?(e.name=t.slice(1,a),e.base=t.slice(1,s)):(e.name=t.slice(c,a),e.base=t.slice(c,s)),e.ext=t.slice(a,s)),c>0?e.dir=t.slice(0,c-1):i&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,t.exports=a},606:t=>{var e,n,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(t){n=i}}();var c,s=[],u=!1,l=-1;function h(){u&&c&&(u=!1,c.length?s=c.concat(s):l=-1,s.length&&f())}function f(){if(!u){var t=a(h);u=!0;for(var e=s.length;e;){for(c=s,s=[];++l<e;)c&&c[l].run();l=-1,e=s.length}c=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{return n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function d(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new p(t,e)),1!==s.length||u||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=d,r.addListener=d,r.once=d,r.off=d,r.removeListener=d,r.removeAllListeners=d,r.emit=d,r.prependListener=d,r.prependOnceListener=d,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},583:(t,e,n)=>{const r=n(333),o=n(157),i=n(280),a=n(375);function c(t,e,n,i,a){const c=[].slice.call(arguments,1),s=c.length,u="function"==typeof c[s-1];if(!u&&!r())throw new Error("Callback required as last argument");if(!u){if(s<1)throw new Error("Too few arguments provided");return 1===s?(n=e,e=i=void 0):2!==s||e.getContext||(i=n,n=e,e=void 0),new Promise((function(r,a){try{const a=o.create(n,i);r(t(a,e,i))}catch(t){a(t)}}))}if(s<2)throw new Error("Too few arguments provided");2===s?(a=n,n=e,e=i=void 0):3===s&&(e.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=n,n=e,e=void 0));try{const r=o.create(n,i);a(null,t(r,e,i))}catch(t){a(t)}}e.create=o.create,e.toCanvas=c.bind(null,i.render),e.toDataURL=c.bind(null,i.renderToDataURL),e.toString=c.bind(null,(function(t,e,n){return a.render(t,n)}))},333:t=>{t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},421:(t,e,n)=>{const r=n(886).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];const e=Math.floor(t/7)+2,n=r(t),o=145===n?26:2*Math.ceil((n-13)/(2*e-2)),i=[n-7];for(let t=1;t<e-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}},433:(t,e,n)=>{const r=n(208),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(t){this.mode=r.ALPHANUMERIC,this.data=t}i.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let n=45*o.indexOf(this.data[e]);n+=o.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},t.exports=i},899:t=>{function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},820:t=>{function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}e.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,e){return this.data[t*this.size+e]},e.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=e},822:(t,e,n)=>{const r=n(208);function o(t){this.mode=r.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},t.exports=o},518:(t,e,n)=>{const r=n(953),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}}},953:(t,e)=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return n}}},756:(t,e,n)=>{const r=n(886).getSymbolSize;e.getPositions=function(t){const e=r(t);return[[0,0],[e-7,0],[0,e-7]]}},565:(t,e,n)=>{const r=n(886),o=r.getBCHDigit(1335);e.getEncodedBits=function(t,e){const n=t.bit<<3|e;let i=n<<10;for(;r.getBCHDigit(i)-o>=0;)i^=1335<<r.getBCHDigit(i)-o;return 21522^(n<<10|i)}},731:(t,e)=>{const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let t=1;for(let e=0;e<255;e++)n[e]=t,r[t]=e,t<<=1,256&t&&(t^=285);for(let t=255;t<512;t++)n[t]=n[t-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return r[t]},e.exp=function(t){return n[t]},e.mul=function(t,e){return 0===t||0===e?0:n[r[t]+r[e]]}},861:(t,e,n)=>{const r=n(208),o=n(886);function i(t){this.mode=r.KANJI,this.data=t}i.getBitsLength=function(t){return 13*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=o.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},t.exports=i},332:(t,e)=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const e=t.size;let n=0,r=0,o=0,i=null,a=null;for(let c=0;c<e;c++){r=o=0,i=a=null;for(let s=0;s<e;s++){let e=t.get(c,s);e===i?r++:(r>=5&&(n+=r-5+3),i=e,r=1),e=t.get(s,c),e===a?o++:(o>=5&&(n+=o-5+3),a=e,o=1)}r>=5&&(n+=r-5+3),o>=5&&(n+=o-5+3)}return n},e.getPenaltyN2=function(t){const e=t.size;let n=0;for(let r=0;r<e-1;r++)for(let o=0;o<e-1;o++){const e=t.get(r,o)+t.get(r,o+1)+t.get(r+1,o)+t.get(r+1,o+1);4!==e&&0!==e||n++}return 3*n},e.getPenaltyN3=function(t){const e=t.size;let n=0,r=0,o=0;for(let i=0;i<e;i++){r=o=0;for(let a=0;a<e;a++)r=r<<1&2047|t.get(i,a),a>=10&&(1488===r||93===r)&&n++,o=o<<1&2047|t.get(a,i),a>=10&&(1488===o||93===o)&&n++}return 40*n},e.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return 10*Math.abs(Math.ceil(100*e/n/5)-10)},e.applyMask=function(t,e){const r=e.size;for(let o=0;o<r;o++)for(let i=0;i<r;i++)e.isReserved(i,o)||e.xor(i,o,n(t,i,o))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let o=0,i=1/0;for(let a=0;a<r;a++){n(a),e.applyMask(a,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),r<i&&(i=r,o=a)}return o}},208:(t,e,n)=>{const r=n(878),o=n(44);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return o.testNumeric(t)?e.NUMERIC:o.testAlphanumeric(t)?e.ALPHANUMERIC:o.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return n}}},357:(t,e,n)=>{const r=n(208);function o(t){this.mode=r.NUMERIC,this.data=t.toString()}o.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},t.exports=o},713:(t,e,n)=>{const r=n(731);e.mul=function(t,e){const n=new Uint8Array(t.length+e.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<e.length;i++)n[o+i]^=r.mul(t[o],e[i]);return n},e.mod=function(t,e){let n=new Uint8Array(t);for(;n.length-e.length>=0;){const t=n[0];for(let o=0;o<e.length;o++)n[o]^=r.mul(e[o],t);let o=0;for(;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},e.generateECPolynomial=function(t){let n=new Uint8Array([1]);for(let o=0;o<t;o++)n=e.mul(n,new Uint8Array([1,r.exp(o)]));return n}},157:(t,e,n)=>{const r=n(886),o=n(953),i=n(899),a=n(820),c=n(421),s=n(756),u=n(332),l=n(518),h=n(764),f=n(427),p=n(565),d=n(208),y=n(801);function g(t,e,n){const r=t.size,o=p.getEncodedBits(e,n);let i,a;for(i=0;i<15;i++)a=1==(o>>i&1),i<6?t.set(i,8,a,!0):i<8?t.set(i+1,8,a,!0):t.set(r-15+i,8,a,!0),i<8?t.set(8,r-i-1,a,!0):i<9?t.set(8,15-i-1+1,a,!0):t.set(8,15-i-1,a,!0);t.set(r-8,8,1,!0)}function m(t,e,n,o){let p;if(Array.isArray(t))p=y.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let r=e;if(!r){const e=y.rawSplit(t);r=f.getBestVersionForData(e,n)}p=y.fromString(t,r||40)}}const m=f.getBestVersionForData(p,n);if(!m)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<m)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+m+".\n")}else e=m;const v=function(t,e,n){const o=new i;n.forEach((function(e){o.put(e.mode.bit,4),o.put(e.getLength(),d.getCharCountIndicator(e.mode,t)),e.write(o)}));const a=8*(r.getSymbolTotalCodewords(t)-l.getTotalCodewordsCount(t,e));for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);const c=(a-o.getLengthInBits())/8;for(let t=0;t<c;t++)o.put(t%2?17:236,8);return function(t,e,n){const o=r.getSymbolTotalCodewords(e),i=o-l.getTotalCodewordsCount(e,n),a=l.getBlocksCount(e,n),c=a-o%a,s=Math.floor(o/a),u=Math.floor(i/a),f=u+1,p=s-u,d=new h(p);let y=0;const g=new Array(a),m=new Array(a);let v=0;const M=new Uint8Array(t.buffer);for(let t=0;t<a;t++){const e=t<c?u:f;g[t]=M.slice(y,y+e),m[t]=d.encode(g[t]),y+=e,v=Math.max(v,e)}const b=new Uint8Array(o);let w,j,N=0;for(w=0;w<v;w++)for(j=0;j<a;j++)w<g[j].length&&(b[N++]=g[j][w]);for(w=0;w<p;w++)for(j=0;j<a;j++)b[N++]=m[j][w];return b}(o,t,e)}(e,n,p),M=r.getSymbolSize(e),b=new a(M);return function(t,e){const n=t.size,r=s.getPositions(e);for(let e=0;e<r.length;e++){const o=r[e][0],i=r[e][1];for(let e=-1;e<=7;e++)if(!(o+e<=-1||n<=o+e))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+r||(e>=0&&e<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===e||6===e)||e>=2&&e<=4&&r>=2&&r<=4?t.set(o+e,i+r,!0,!0):t.set(o+e,i+r,!1,!0))}}(b,e),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(b),function(t,e){const n=c.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0],o=n[e][1];for(let e=-2;e<=2;e++)for(let n=-2;n<=2;n++)-2===e||2===e||-2===n||2===n||0===e&&0===n?t.set(r+e,o+n,!0,!0):t.set(r+e,o+n,!1,!0)}}(b,e),g(b,n,0),e>=7&&function(t,e){const n=t.size,r=f.getEncodedBits(e);let o,i,a;for(let e=0;e<18;e++)o=Math.floor(e/3),i=e%3+n-8-3,a=1==(r>>e&1),t.set(o,i,a,!0),t.set(i,o,a,!0)}(b,e),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,a=0;for(let c=n-1;c>0;c-=2)for(6===c&&c--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,c-n)){let r=!1;a<e.length&&(r=1==(e[a]>>>i&1)),t.set(o,c-n,r),i--,-1===i&&(a++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(b,v),isNaN(o)&&(o=u.getBestMask(b,g.bind(null,b,n))),u.applyMask(o,b),g(b,n,o),{modules:b,version:e,errorCorrectionLevel:n,maskPattern:o,segments:p}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");let n,i,a=o.M;return void 0!==e&&(a=o.from(e.errorCorrectionLevel,o.M),n=f.from(e.version),i=u.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),m(t,n,a,i)}},764:(t,e,n)=>{const r=n(713);function o(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const n=r.mod(e,this.genPoly),o=this.degree-n.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(n,o),t}return n},t.exports=o},44:(t,e)=>{const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";e.KANJI=new RegExp(r,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(o,"g"),e.NUMERIC=new RegExp(n,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+r+"$"),a=new RegExp("^"+n+"$"),c=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return i.test(t)},e.testNumeric=function(t){return a.test(t)},e.testAlphanumeric=function(t){return c.test(t)}},801:(t,e,n)=>{const r=n(208),o=n(357),i=n(433),a=n(822),c=n(861),s=n(44),u=n(886),l=n(320);function h(t){return unescape(encodeURIComponent(t)).length}function f(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function p(t){const e=f(s.NUMERIC,r.NUMERIC,t),n=f(s.ALPHANUMERIC,r.ALPHANUMERIC,t);let o,i;return u.isKanjiModeEnabled()?(o=f(s.BYTE,r.BYTE,t),i=f(s.KANJI,r.KANJI,t)):(o=f(s.BYTE_KANJI,r.BYTE,t),i=[]),e.concat(n,o,i).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function d(t,e){switch(e){case r.NUMERIC:return o.getBitsLength(t);case r.ALPHANUMERIC:return i.getBitsLength(t);case r.KANJI:return c.getBitsLength(t);case r.BYTE:return a.getBitsLength(t)}}function y(t,e){let n;const s=r.getBestModeForData(t);if(n=r.from(e,s),n!==r.BYTE&&n.bit<s.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(s));switch(n!==r.KANJI||u.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new o(t);case r.ALPHANUMERIC:return new i(t);case r.KANJI:return new c(t);case r.BYTE:return new a(t)}}e.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(y(e,null)):e.data&&t.push(y(e.data,e.mode)),t}),[])},e.fromString=function(t,n){const o=function(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n];switch(o.mode){case r.NUMERIC:e.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:e.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:e.push([o,{data:o.data,mode:r.BYTE,length:h(o.data)}]);break;case r.BYTE:e.push([{data:o.data,mode:r.BYTE,length:h(o.data)}])}}return e}(p(t,u.isKanjiModeEnabled())),i=function(t,e){const n={},o={start:{}};let i=["start"];for(let a=0;a<t.length;a++){const c=t[a],s=[];for(let t=0;t<c.length;t++){const u=c[t],l=""+a+t;s.push(l),n[l]={node:u,lastCount:0},o[l]={};for(let t=0;t<i.length;t++){const a=i[t];n[a]&&n[a].node.mode===u.mode?(o[a][l]=d(n[a].lastCount+u.length,u.mode)-d(n[a].lastCount,u.mode),n[a].lastCount+=u.length):(n[a]&&(n[a].lastCount=u.length),o[a][l]=d(u.length,u.mode)+4+r.getCharCountIndicator(u.mode,e))}}i=s}for(let t=0;t<i.length;t++)o[i[t]].end=0;return{map:o,table:n}}(o,n),a=l.find_path(i.map,"start","end"),c=[];for(let t=1;t<a.length-1;t++)c.push(i.table[a[t]].node);return e.fromArray(c.reduce((function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[]))},e.rawSplit=function(t){return e.fromArray(p(t,u.isKanjiModeEnabled()))}},886:(t,e)=>{let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},e.isKanjiModeEnabled=function(){return void 0!==n},e.toSJIS=function(t){return n(t)}},878:(t,e)=>{e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},427:(t,e,n)=>{const r=n(886),o=n(518),i=n(953),a=n(208),c=n(878),s=r.getBCHDigit(7973);function u(t,e){return a.getCharCountIndicator(t,e)+4}function l(t,e){let n=0;return t.forEach((function(t){const r=u(t.mode,e);n+=r+t.getBitsLength()})),n}e.from=function(t,e){return c.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!c.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);const i=8*(r.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,e));if(n===a.MIXED)return i;const s=i-u(n,t);switch(n){case a.NUMERIC:return Math.floor(s/10*3);case a.ALPHANUMERIC:return Math.floor(s/11*2);case a.KANJI:return Math.floor(s/13);case a.BYTE:default:return Math.floor(s/8)}},e.getBestVersionForData=function(t,n){let r;const o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(l(t,r)<=e.getCapacity(r,n,a.MIXED))return r}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,r){for(let o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(r.mode,r.getLength(),o)},e.getEncodedBits=function(t){if(!c.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;r.getBCHDigit(e)-s>=0;)e^=7973<<r.getBCHDigit(e)-s;return t<<12|e}},280:(t,e,n)=>{const r=n(726);e.render=function(t,e,n){let o=n,i=e;void 0!==o||e&&e.getContext||(o=e,e=void 0),e||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);const a=r.getImageWidth(t.modules.size,o),c=i.getContext("2d"),s=c.createImageData(a,a);return r.qrToImageData(s.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(c,i,a),c.putImageData(s,0,0),i},e.renderToDataURL=function(t,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=e.render(t,n,o),a=o.type||"image/png",c=o.rendererOpts||{};return i.toDataURL(a,c.quality)}},375:(t,e,n)=>{const r=n(726);function o(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}e.render=function(t,e,n){const a=r.getOptions(e),c=t.modules.size,s=t.modules.data,u=c+2*a.margin,l=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",h="<path "+o(a.color.dark,"stroke")+' d="'+function(t,e,n){let r="",o=0,a=!1,c=0;for(let s=0;s<t.length;s++){const u=Math.floor(s%e),l=Math.floor(s/e);u||a||(a=!0),t[s]?(c++,s>0&&u>0&&t[s-1]||(r+=a?i("M",u+n,.5+l+n):i("m",o,0),o=0,a=!1),u+1<e&&t[s+1]||(r+=i("h",c),c=0)):o++}return r}(s,c,a.margin)+'"/>',f='viewBox="0 0 '+u+" "+u+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+f+' shape-rendering="crispEdges">'+l+h+"</svg>\n";return"function"==typeof n&&n(null,p),p}},726:(t,e)=>{function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const o=n.modules.size,i=n.modules.data,a=e.getScale(o,r),c=Math.floor((o+2*r.margin)*a),s=r.margin*a,u=[r.color.light,r.color.dark];for(let e=0;e<c;e++)for(let n=0;n<c;n++){let l=4*(e*c+n),h=r.color.light;e>=s&&n>=s&&e<c-s&&n<c-s&&(h=u[i[Math.floor((e-s)/a)*o+Math.floor((n-s)/a)]?1:0]),t[l++]=h.r,t[l++]=h.g,t[l++]=h.b,t[l]=h.a}}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!t||!/^http(s?):/.test(t));)t=r[o--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t})();var r={};return(()=>{"use strict";n.d(r,{default:()=>Ws});var t={};function e(t,e){return function(){return t.apply(e,arguments)}}n.r(t),n.d(t,{hasBrowserEnv:()=>dt,hasStandardBrowserEnv:()=>gt,hasStandardBrowserWebWorkerEnv:()=>mt,navigator:()=>yt,origin:()=>vt});var o=n(606);const{toString:i}=Object.prototype,{getPrototypeOf:a}=Object,c=(s=Object.create(null),t=>{const e=i.call(t);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())});var s;const u=t=>(t=t.toLowerCase(),e=>c(e)===t),l=t=>e=>typeof e===t,{isArray:h}=Array,f=l("undefined"),p=u("ArrayBuffer"),d=l("string"),y=l("function"),g=l("number"),m=t=>null!==t&&"object"==typeof t,v=t=>{if("object"!==c(t))return!1;const e=a(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},M=u("Date"),b=u("File"),w=u("Blob"),j=u("FileList"),N=u("URLSearchParams"),[D,I,E,S]=["ReadableStream","Request","Response","Headers"].map(u);function T(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),h(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(r=0;r<i;r++)a=o[r],e.call(null,t[a],a,t)}}function O(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,o=n.length;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,L=t=>!f(t)&&t!==x,A=(k="undefined"!=typeof Uint8Array&&a(Uint8Array),t=>k&&t instanceof k);var k;const C=u("HTMLFormElement"),z=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),_=u("RegExp"),P=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};T(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},B="abcdefghijklmnopqrstuvwxyz",U="0123456789",Q={DIGIT:U,ALPHA:B,ALPHA_DIGIT:B+B.toUpperCase()+U},R=u("AsyncFunction"),Y=(F="function"==typeof setImmediate,V=y(x.postMessage),F?setImmediate:V?(H=`axios@${Math.random()}`,G=[],x.addEventListener("message",(({source:t,data:e})=>{t===x&&e===H&&G.length&&G.shift()()}),!1),t=>{G.push(t),x.postMessage(H,"*")}):t=>setTimeout(t));var F,V,H,G;const Z="undefined"!=typeof queueMicrotask?queueMicrotask.bind(x):void 0!==o&&o.nextTick||Y,W={isArray:h,isArrayBuffer:p,isBuffer:function(t){return null!==t&&!f(t)&&null!==t.constructor&&!f(t.constructor)&&y(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||y(t.append)&&("formdata"===(e=c(t))||"object"===e&&y(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&p(t.buffer),e},isString:d,isNumber:g,isBoolean:t=>!0===t||!1===t,isObject:m,isPlainObject:v,isReadableStream:D,isRequest:I,isResponse:E,isHeaders:S,isUndefined:f,isDate:M,isFile:b,isBlob:w,isRegExp:_,isFunction:y,isStream:t=>m(t)&&y(t.pipe),isURLSearchParams:N,isTypedArray:A,isFileList:j,forEach:T,merge:function t(){const{caseless:e}=L(this)&&this||{},n={},r=(r,o)=>{const i=e&&O(n,o)||o;v(n[i])&&v(r)?n[i]=t(n[i],r):v(r)?n[i]=t({},r):h(r)?n[i]=r.slice():n[i]=r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&T(arguments[t],r);return n},extend:(t,n,r,{allOwnKeys:o}={})=>(T(n,((n,o)=>{r&&y(n)?t[o]=e(n,r):t[o]=n}),{allOwnKeys:o}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,i,c;const s={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)c=o[i],r&&!r(c,t,e)||s[c]||(e[c]=t[c],s[c]=!0);t=!1!==n&&a(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:c,kindOfTest:u,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(h(t))return t;let e=t.length;if(!g(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:C,hasOwnProperty:z,hasOwnProp:z,reduceDescriptors:P,freezeMethods:t=>{P(t,((e,n)=>{if(y(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];y(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return h(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:O,global:x,isContextDefined:L,ALPHABET:Q,generateString:(t=16,e=Q.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&y(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(m(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=h(t)?[]:{};return T(t,((t,e)=>{const i=n(t,r+1);!f(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:R,isThenable:t=>t&&(m(t)||y(t))&&y(t.then)&&y(t.catch),setImmediate:Y,asap:Z};function q(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}W.inherits(q,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.status}}});const J=q.prototype,K={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{K[t]={value:t}})),Object.defineProperties(q,K),Object.defineProperty(J,"isAxiosError",{value:!0}),q.from=(t,e,n,r,o,i)=>{const a=Object.create(J);return W.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),q.call(a,t.message,e,n,r,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const $=q;var X=n(287).hp;function tt(t){return W.isPlainObject(t)||W.isArray(t)}function et(t){return W.endsWith(t,"[]")?t.slice(0,-2):t}function nt(t,e,n){return t?t.concat(e).map((function(t,e){return t=et(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const rt=W.toFlatObject(W,{},null,(function(t){return/^is[A-Z]/.test(t)})),ot=function(t,e,n){if(!W.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!W.isUndefined(e[t])}))).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,c=(n.Blob||"undefined"!=typeof Blob&&Blob)&&W.isSpecCompliantForm(e);if(!W.isFunction(o))throw new TypeError("visitor must be a function");function s(t){if(null===t)return"";if(W.isDate(t))return t.toISOString();if(!c&&W.isBlob(t))throw new $("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(t)||W.isTypedArray(t)?c&&"function"==typeof Blob?new Blob([t]):X.from(t):t}function u(t,n,o){let c=t;if(t&&!o&&"object"==typeof t)if(W.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(W.isArray(t)&&function(t){return W.isArray(t)&&!t.some(tt)}(t)||(W.isFileList(t)||W.endsWith(n,"[]"))&&(c=W.toArray(t)))return n=et(n),c.forEach((function(t,r){!W.isUndefined(t)&&null!==t&&e.append(!0===a?nt([n],r,i):null===a?n:n+"[]",s(t))})),!1;return!!tt(t)||(e.append(nt(o,n,i),s(t)),!1)}const l=[],h=Object.assign(rt,{defaultVisitor:u,convertValue:s,isVisitable:tt});if(!W.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!W.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),W.forEach(n,(function(n,i){!0===(!(W.isUndefined(n)||null===n)&&o.call(e,n,W.isString(i)?i.trim():i,r,h))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e};function it(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function at(t,e){this._pairs=[],t&&ot(t,this,e)}const ct=at.prototype;ct.append=function(t,e){this._pairs.push([t,e])},ct.toString=function(t){const e=t?function(e){return t.call(this,e,it)}:it;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const st=at;function ut(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function lt(t,e,n){if(!e)return t;const r=n&&n.encode||ut,o=n&&n.serialize;let i;if(i=o?o(e,n):W.isURLSearchParams(e)?e.toString():new st(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const ht=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){W.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},ft={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},pt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:st,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},dt="undefined"!=typeof window&&"undefined"!=typeof document,yt="object"==typeof navigator&&navigator||void 0,gt=dt&&(!yt||["ReactNative","NativeScript","NS"].indexOf(yt.product)<0),mt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,vt=dt&&window.location.href||"http://localhost",Mt={...t,...pt},bt=function(t){function e(t,n,r,o){let i=t[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),c=o>=t.length;return i=!i&&W.isArray(r)?r.length:i,c?(W.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&W.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&W.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}(r[i])),!a)}if(W.isFormData(t)&&W.isFunction(t.entries)){const n={};return W.forEachEntry(t,((t,r)=>{e(function(t){return W.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null},wt={transitional:ft,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=W.isObject(t);if(o&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return r?JSON.stringify(bt(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t)||W.isReadableStream(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return ot(t,new Mt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return Mt.isNode&&W.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=W.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return ot(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(W.isString(t))try{return(0,JSON.parse)(t),W.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||wt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(W.isResponse(t)||W.isReadableStream(t))return t;if(t&&W.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw $.from(t,$.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mt.classes.FormData,Blob:Mt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],(t=>{wt.headers[t]={}}));const jt=wt,Nt=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Dt=Symbol("internals");function It(t){return t&&String(t).trim().toLowerCase()}function Et(t){return!1===t||null==t?t:W.isArray(t)?t.map(Et):String(t)}function St(t,e,n,r,o){return W.isFunction(r)?r.call(this,e,n):(o&&(e=n),W.isString(e)?W.isString(r)?-1!==e.indexOf(r):W.isRegExp(r)?r.test(e):void 0:void 0)}class Tt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=It(e);if(!o)throw new Error("header name must be a non-empty string");const i=W.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=Et(t))}const i=(t,e)=>W.forEach(t,((t,n)=>o(t,n,e)));if(W.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(W.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&Nt[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e);else if(W.isHeaders(t))for(const[e,r]of t.entries())o(r,e,n);else null!=t&&o(e,t,n);return this}get(t,e){if(t=It(t)){const n=W.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(W.isFunction(e))return e.call(this,t,n);if(W.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=It(t)){const n=W.findKey(this,t);return!(!n||void 0===this[n]||e&&!St(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=It(t)){const o=W.findKey(n,t);!o||e&&!St(0,n[o],o,e)||(delete n[o],r=!0)}}return W.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!St(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return W.forEach(this,((r,o)=>{const i=W.findKey(n,o);if(i)return e[i]=Et(r),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete e[o],e[a]=Et(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return W.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&W.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[Dt]=this[Dt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=It(t);e[r]||(function(t,e){const n=W.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return W.isArray(t)?t.forEach(r):r(t),this}}Tt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),W.reduceDescriptors(Tt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),W.freezeMethods(Tt);const Ot=Tt;function xt(t,e){const n=this||jt,r=e||n,o=Ot.from(r.headers);let i=r.data;return W.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Lt(t){return!(!t||!t.__CANCEL__)}function At(t,e,n){$.call(this,null==t?"canceled":t,$.ERR_CANCELED,e,n),this.name="CanceledError"}W.inherits(At,$,{__CANCEL__:!0});const kt=At;function Ct(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new $("Request failed with status code "+n.status,[$.ERR_BAD_REQUEST,$.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}const zt=(t,e,n=3)=>{let r=0;const o=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(c){const s=Date.now(),u=r[a];o||(o=s),n[i]=c,r[i]=s;let l=a,h=0;for(;l!==i;)h+=n[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),s-o<e)return;const f=u&&s-u;return f?Math.round(1e3*h/f):void 0}}(50,250);return function(t,e){let n,r,o=0,i=1e3/e;const a=(e,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),t.apply(null,e)};return[(...t)=>{const e=Date.now(),c=e-o;c>=i?a(t,e):(n=t,r||(r=setTimeout((()=>{r=null,a(n)}),i-c)))},()=>n&&a(n)]}((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,c=i-r,s=o(c);r=i,t({loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:s||void 0,estimated:s&&a&&i<=a?(a-i)/s:void 0,event:n,lengthComputable:null!=a,[e?"download":"upload"]:!0})}),n)},_t=(t,e)=>{const n=null!=t;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Pt=t=>(...e)=>W.asap((()=>t(...e))),Bt=Mt.hasStandardBrowserEnv?function(){const t=Mt.navigator&&/(msie|trident)/i.test(Mt.navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=W.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0},Ut=Mt.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const a=[t+"="+encodeURIComponent(e)];W.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),W.isString(r)&&a.push("path="+r),W.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Qt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Rt=t=>t instanceof Ot?{...t}:t;function Yt(t,e){e=e||{};const n={};function r(t,e,n){return W.isPlainObject(t)&&W.isPlainObject(e)?W.merge.call({caseless:n},t,e):W.isPlainObject(e)?W.merge({},e):W.isArray(e)?e.slice():e}function o(t,e,n){return W.isUndefined(e)?W.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!W.isUndefined(e))return r(void 0,e)}function a(t,e){return W.isUndefined(e)?W.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function c(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const s={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(t,e)=>o(Rt(t),Rt(e),!0)};return W.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=s[r]||o,a=i(t[r],e[r],r);W.isUndefined(a)&&i!==c||(n[r]=a)})),n}const Ft=t=>{const e=Yt({},t);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:c,auth:s}=e;if(e.headers=c=Ot.from(c),e.url=lt(Qt(e.baseURL,e.url),t.params,t.paramsSerializer),s&&c.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),W.isFormData(r))if(Mt.hasStandardBrowserEnv||Mt.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if(!1!==(n=c.getContentType())){const[t,...e]=n?n.split(";").map((t=>t.trim())).filter(Boolean):[];c.setContentType([t||"multipart/form-data",...e].join("; "))}if(Mt.hasStandardBrowserEnv&&(o&&W.isFunction(o)&&(o=o(e)),o||!1!==o&&Bt(e.url))){const t=i&&a&&Ut.read(a);t&&c.set(i,t)}return e},Vt="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const r=Ft(t);let o=r.data;const i=Ot.from(r.headers).normalize();let a,c,s,u,l,{responseType:h,onUploadProgress:f,onDownloadProgress:p}=r;function d(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;function g(){if(!y)return;const r=Ot.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());Ct((function(t){e(t),d()}),(function(t){n(t),d()}),{data:h&&"text"!==h&&"json"!==h?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:t,request:y}),y=null}y.open(r.method.toUpperCase(),r.url,!0),y.timeout=r.timeout,"onloadend"in y?y.onloadend=g:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(g)},y.onabort=function(){y&&(n(new $("Request aborted",$.ECONNABORTED,t,y)),y=null)},y.onerror=function(){n(new $("Network Error",$.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let e=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ft;r.timeoutErrorMessage&&(e=r.timeoutErrorMessage),n(new $(e,o.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,t,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&W.forEach(i.toJSON(),(function(t,e){y.setRequestHeader(e,t)})),W.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),h&&"json"!==h&&(y.responseType=r.responseType),p&&([s,l]=zt(p,!0),y.addEventListener("progress",s)),f&&y.upload&&([c,u]=zt(f),y.upload.addEventListener("progress",c),y.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(a=e=>{y&&(n(!e||e.type?new kt(null,t,y):e),y.abort(),y=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const m=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(r.url);m&&-1===Mt.protocols.indexOf(m)?n(new $("Unsupported protocol "+m+":",$.ERR_BAD_REQUEST,t)):y.send(o||null)}))},Ht=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,r=new AbortController;const o=function(t){if(!n){n=!0,a();const e=t instanceof Error?t:this.reason;r.abort(e instanceof $?e:new kt(e instanceof Error?e.message:e))}};let i=e&&setTimeout((()=>{i=null,o(new $(`timeout ${e} of ms exceeded`,$.ETIMEDOUT))}),e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(o):t.removeEventListener("abort",o)})),t=null)};t.forEach((t=>t.addEventListener("abort",o)));const{signal:c}=r;return c.unsubscribe=()=>W.asap(a),c}},Gt=function*(t,e){let n=t.byteLength;if(!e||n<e)return void(yield t);let r,o=0;for(;o<n;)r=o+e,yield t.slice(o,r),o=r},Zt=(t,e,n,r)=>{const o=async function*(t,e){for await(const n of async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}}(t))yield*Gt(n,e)}(t,e);let i,a=0,c=t=>{i||(i=!0,r&&r(t))};return new ReadableStream({async pull(t){try{const{done:e,value:r}=await o.next();if(e)return c(),void t.close();let i=r.byteLength;if(n){let t=a+=i;n(t)}t.enqueue(new Uint8Array(r))}catch(t){throw c(t),t}},cancel:t=>(c(t),o.return())},{highWaterMark:2})},Wt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,qt=Wt&&"function"==typeof ReadableStream,Jt=Wt&&("function"==typeof TextEncoder?(Kt=new TextEncoder,t=>Kt.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer()));var Kt;const $t=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},Xt=qt&&$t((()=>{let t=!1;const e=new Request(Mt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),te=qt&&$t((()=>W.isReadableStream(new Response("").body))),ee={stream:te&&(t=>t.body)};var ne;Wt&&(ne=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!ee[t]&&(ee[t]=W.isFunction(ne[t])?e=>e[t]():(e,n)=>{throw new $(`Response type '${t}' is not supported`,$.ERR_NOT_SUPPORT,n)})})));const re={http:null,xhr:Vt,fetch:Wt&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:c,onUploadProgress:s,responseType:u,headers:l,withCredentials:h="same-origin",fetchOptions:f}=Ft(t);u=u?(u+"").toLowerCase():"text";let p,d=Ht([o,i&&i.toAbortSignal()],a);const y=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let g;try{if(s&&Xt&&"get"!==n&&"head"!==n&&0!==(g=await(async(t,e)=>{const n=W.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(W.isBlob(t))return t.size;if(W.isSpecCompliantForm(t)){const e=new Request(Mt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return W.isArrayBufferView(t)||W.isArrayBuffer(t)?t.byteLength:(W.isURLSearchParams(t)&&(t+=""),W.isString(t)?(await Jt(t)).byteLength:void 0)})(e):n})(l,r))){let t,n=new Request(e,{method:"POST",body:r,duplex:"half"});if(W.isFormData(r)&&(t=n.headers.get("content-type"))&&l.setContentType(t),n.body){const[t,e]=_t(g,zt(Pt(s)));r=Zt(n.body,65536,t,e)}}W.isString(h)||(h=h?"include":"omit");const o="credentials"in Request.prototype;p=new Request(e,{...f,signal:d,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:o?h:void 0});let i=await fetch(p);const a=te&&("stream"===u||"response"===u);if(te&&(c||a&&y)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=i[e]}));const e=W.toFiniteNumber(i.headers.get("content-length")),[n,r]=c&&_t(e,zt(Pt(c),!0))||[];i=new Response(Zt(i.body,65536,n,(()=>{r&&r(),y&&y()})),t)}u=u||"text";let m=await ee[W.findKey(ee,u)||"text"](i,t);return!a&&y&&y(),await new Promise(((e,n)=>{Ct(e,n,{data:m,headers:Ot.from(i.headers),status:i.status,statusText:i.statusText,config:t,request:p})}))}catch(e){if(y&&y(),e&&"TypeError"===e.name&&/fetch/i.test(e.message))throw Object.assign(new $("Network Error",$.ERR_NETWORK,t,p),{cause:e.cause||e});throw $.from(e,e&&e.code,t,p)}})};W.forEach(re,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const oe=t=>`- ${t}`,ie=t=>W.isFunction(t)||null===t||!1===t,ae=t=>{t=W.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i<e;i++){let e;if(n=t[i],r=n,!ie(n)&&(r=re[(e=String(n)).toLowerCase()],void 0===r))throw new $(`Unknown adapter '${e}'`);if(r)break;o[e||"#"+i]=r}if(!r){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map(oe).join("\n"):" "+oe(t[0]):"as no adapter specified";throw new $("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function ce(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new kt(null,t)}function se(t){return ce(t),t.headers=Ot.from(t.headers),t.data=xt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ae(t.adapter||jt.adapter)(t).then((function(e){return ce(t),e.data=xt.call(t,t.transformResponse,e),e.headers=Ot.from(e.headers),e}),(function(e){return Lt(e)||(ce(t),e&&e.response&&(e.response.data=xt.call(t,t.transformResponse,e.response),e.response.headers=Ot.from(e.response.headers))),Promise.reject(e)}))}const ue={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{ue[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const le={};ue.transitional=function(t,e,n){function r(t,e){return"[Axios v1.7.7] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new $(r(o," has been removed"+(e?" in "+e:"")),$.ERR_DEPRECATED);return e&&!le[o]&&(le[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}};const he={assertOptions:function(t,e,n){if("object"!=typeof t)throw new $("options must be an object",$.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],a=e[i];if(a){const e=t[i],n=void 0===e||a(e,i,t);if(!0!==n)throw new $("option "+i+" must be "+n,$.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new $("Unknown option "+i,$.ERR_BAD_OPTION)}},validators:ue},fe=he.validators;class pe{constructor(t){this.defaults=t,this.interceptors={request:new ht,response:new ht}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}catch(t){}}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Yt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&he.assertOptions(n,{silentJSONParsing:fe.transitional(fe.boolean),forcedJSONParsing:fe.transitional(fe.boolean),clarifyTimeoutError:fe.transitional(fe.boolean)},!1),null!=r&&(W.isFunction(r)?e.paramsSerializer={serialize:r}:he.assertOptions(r,{encode:fe.function,serialize:fe.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&W.merge(o.common,o[e.method]);o&&W.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Ot.concat(i,o);const a=[];let c=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(c=c&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const s=[];let u;this.interceptors.response.forEach((function(t){s.push(t.fulfilled,t.rejected)}));let l,h=0;if(!c){const t=[se.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,s),l=t.length,u=Promise.resolve(e);h<l;)u=u.then(t[h++],t[h++]);return u}l=a.length;let f=e;for(h=0;h<l;){const t=a[h++],e=a[h++];try{f=t(f)}catch(t){e.call(this,t);break}}try{u=se.call(this,f)}catch(t){return Promise.reject(t)}for(h=0,l=s.length;h<l;)u=u.then(s[h++],s[h++]);return u}getUri(t){return lt(Qt((t=Yt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}W.forEach(["delete","get","head","options"],(function(t){pe.prototype[t]=function(e,n){return this.request(Yt(n||{},{method:t,url:e,data:(n||{}).data}))}})),W.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(Yt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}pe.prototype[t]=e(),pe.prototype[t+"Form"]=e(!0)}));const de=pe;class ye{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new kt(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new ye((function(e){t=e})),cancel:t}}}const ge=ye,me={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(me).forEach((([t,e])=>{me[e]=t}));const ve=me,Me=function t(n){const r=new de(n),o=e(de.prototype.request,r);return W.extend(o,de.prototype,r,{allOwnKeys:!0}),W.extend(o,r,null,{allOwnKeys:!0}),o.create=function(e){return t(Yt(n,e))},o}(jt);Me.Axios=de,Me.CanceledError=kt,Me.CancelToken=ge,Me.isCancel=Lt,Me.VERSION="1.7.7",Me.toFormData=ot,Me.AxiosError=$,Me.Cancel=Me.CanceledError,Me.all=function(t){return Promise.all(t)},Me.spread=function(t){return function(e){return t.apply(null,e)}},Me.isAxiosError=function(t){return W.isObject(t)&&!0===t.isAxiosError},Me.mergeConfig=Yt,Me.AxiosHeaders=Ot,Me.formToJSON=t=>bt(W.isHTMLForm(t)?new FormData(t):t),Me.getAdapter=ae,Me.HttpStatusCode=ve,Me.default=Me;const be=Me;function we(t){return we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},we(t)}function je(){je=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==we(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(we(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Ne(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function De(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Ne(i,r,o,a,c,"next",t)}function c(t){Ne(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Ie(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ee(r.key),r)}}function Ee(t){var e=function(t){if("object"!=we(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=we(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==we(e)?e:e+""}var Se=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.client=be.create({baseURL:e}),this.client.interceptors.request.use((function(t){var e=nn.getApiKey(),n=nn.getAccountId();return e?(t.headers["Waygo-API-Key"]=e,n&&(t.headers["Waygo-Account"]=n),["post","put"].includes(t.method)?t.headers["Content-Type"]="application/json":delete t.headers["Content-Type"],t):(console.error("Must include API key using waygomaps.setApiKey('YOUR-API-KEY'):"),Promise.reject(new Error("API key is missing")))}))},e=[{key:"get",value:function(){var t=De(je().mark((function t(e){var n,r,o=arguments;return je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},t.prev=1,t.next=4,this.client.get(e,{params:n});case 4:return r=t.sent,t.abrupt("return",r.data);case 8:throw t.prev=8,t.t0=t.catch(1),new Error("GET ".concat(e," failed: ").concat(t.t0.message));case 11:case"end":return t.stop()}}),t,this,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()},{key:"post",value:(o=De(je().mark((function t(e,n){var r,o,i=arguments;return je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>2&&void 0!==i[2]?i[2]:{},t.prev=1,t.next=4,this.client.post(e,n,{params:r});case 4:return o=t.sent,t.abrupt("return",o.data);case 8:throw t.prev=8,t.t0=t.catch(1),new Error("POST ".concat(e," failed: ").concat(t.t0.message));case 11:case"end":return t.stop()}}),t,this,[[1,8]])}))),function(t,e){return o.apply(this,arguments)})},{key:"put",value:(r=De(je().mark((function t(e,n){var r;return je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.put(e,n);case 3:return r=t.sent,t.abrupt("return",r.data);case 7:throw t.prev=7,t.t0=t.catch(0),new Error("PUT ".concat(e," failed: ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return r.apply(this,arguments)})},{key:"delete",value:(n=De(je().mark((function t(e){var n,r,o=arguments;return je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},t.prev=1,t.next=4,this.client.delete(e,{params:n});case 4:return r=t.sent,t.abrupt("return",r.data);case 8:throw t.prev=8,t.t0=t.catch(1),new Error("DELETE ".concat(e," failed: ").concat(t.t0.message));case 11:case"end":return t.stop()}}),t,this,[[1,8]])}))),function(t){return n.apply(this,arguments)})}],e&&Ie(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,o}();const Te=Se;function Oe(t){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(t)}function xe(){xe=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Oe(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Oe(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Le(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Ae(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Le(i,r,o,a,c,"next",t)}function c(t){Le(i,r,o,a,c,"throw",t)}a(void 0)}))}}function ke(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ce(r.key),r)}}function Ce(t){var e=function(t){if("object"!=Oe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Oe(e)?e:e+""}var ze=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiManager=e},e=[{key:"loadMapView",value:(r=Ae(xe().mark((function t(e){var n,r,o,i=arguments;return xe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.length>1&&void 0!==i[1]?i[1]:null,t.prev=1,r="/map-views/v1/".concat(e,"/load"),o=n?{map_view_id:n}:{},t.next=6,this.apiManager.get(r,o);case 6:return t.abrupt("return",t.sent);case 9:return t.prev=9,t.t0=t.catch(1),console.error("Error fetching map data:",t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,this,[[1,9]])}))),function(t){return r.apply(this,arguments)})},{key:"loadMapViewSelectionState",value:(n=Ae(xe().mark((function t(e){var n,r,o,i,a,c=arguments;return xe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=c.length>1&&void 0!==c[1]?c[1]:null,r=c.length>2&&void 0!==c[2]?c[2]:null,o=c.length>3&&void 0!==c[3]?c[3]:null,t.prev=3,i="/map-views/v1/".concat(e,"/load/selection-state"),a={},n&&(a.map_view_id=n),null!==o&&(a.floor=o),t.next=10,this.apiManager.post(i,r,a);case 10:return t.abrupt("return",t.sent);case 13:return t.prev=13,t.t0=t.catch(3),console.error("Error loading map view selection state:",t.t0),t.abrupt("return",null);case 17:case"end":return t.stop()}}),t,this,[[3,13]])}))),function(t){return n.apply(this,arguments)})}],e&&ke(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();const _e=ze;function Pe(t){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pe(t)}function Be(){Be=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Pe(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Pe(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Ue(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Qe(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Ue(i,r,o,a,c,"next",t)}function c(t){Ue(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Re(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ye(r.key),r)}}function Ye(t){var e=function(t){if("object"!=Pe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pe(e)?e:e+""}var Fe=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiManager=e},e=[{key:"search",value:(r=Qe(Be().mark((function t(e,n,r){var o,i,a,c,s,u,l=arguments;return Be().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=l.length>3&&void 0!==l[3]?l[3]:0,i=l.length>4&&void 0!==l[4]?l[4]:30,a=l.length>5&&void 0!==l[5]?l[5]:null,c=l.length>6&&void 0!==l[6]?l[6]:"searchable_data_string",console.log("searching for",r,"on floor",a,"with skip",o,"and limit",i),t.prev=5,s={q:r,skip:o,limit:i,sort:c},console.log("params:",s),null!==a&&(s.floor=a),t.next=11,this.apiManager.get("/search/v1/".concat(e,"/").concat(n),s);case 11:return u=t.sent,t.abrupt("return",u);case 15:return t.prev=15,t.t0=t.catch(5),console.error("Error searching query:",t.t0),t.abrupt("return",null);case 19:case"end":return t.stop()}}),t,this,[[5,15]])}))),function(t,e,n){return r.apply(this,arguments)})},{key:"fetchContentPlacementDetails",value:(n=Qe(Be().mark((function t(e){var n;return Be().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.apiManager.get("/search/v1/".concat(e));case 3:return n=t.sent,t.abrupt("return",n);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error fetching content placment details:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return n.apply(this,arguments)})}],e&&Re(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();const Ve=Fe;function He(t){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},He(t)}function Ge(){Ge=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==He(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(He(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Ze(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function We(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Ze(i,r,o,a,c,"next",t)}function c(t){Ze(i,r,o,a,c,"throw",t)}a(void 0)}))}}function qe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Je(r.key),r)}}function Je(t){var e=function(t){if("object"!=He(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=He(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==He(e)?e:e+""}var Ke=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiManager=e},e=[{key:"findPath",value:(o=We(Ge().mark((function t(e,n,r){var o;return Ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,o={start_placement_id:n,end_placement_id:r,map_id:e},t.next=4,this.apiManager.post("/routes/v1/path",o);case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error fetching path data:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e,n){return o.apply(this,arguments)})},{key:"findPathFromNodeToPlacement",value:(r=We(Ge().mark((function t(e,n,r){var o;return Ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,o={start_node_id:n,end_placement_id:r,map_id:e},t.next=4,this.apiManager.post("/routes/v1/path/node_to_placement",o);case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error fetching path data:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e,n){return r.apply(this,arguments)})},{key:"findClosestNode",value:(n=We(Ge().mark((function t(e,n,r){var o;return Ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,o={map_id:e,coordinate:n,floor_num:r},t.next=4,this.apiManager.post("/routes/v1/closest",o);case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error fetching node data:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e,r){return n.apply(this,arguments)})}],e&&qe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,o}();const $e=Ke;function Xe(t){return Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xe(t)}function tn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,en(r.key),r)}}function en(t){var e=function(t){if("object"!=Xe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xe(e)?e:e+""}const nn=new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiKey=null,this.accountId=null,this.apiManager=new Te("https://api.waygomaps.com"),this.mapViewApi=new _e(this.apiManager),this.SearchApi=new Ve(this.apiManager),this.RoutesApi=new $e(this.apiManager)},(e=[{key:"setApiKey",value:function(t){this.apiKey=t}},{key:"getApiKey",value:function(){return this.apiKey}},{key:"setAccountId",value:function(t){this.accountId=t}},{key:"getAccountId",value:function(){return this.accountId}},{key:"getMapViewApi",value:function(){return this.mapViewApi}},{key:"getSearchApi",value:function(){return this.SearchApi}},{key:"getRotuesApi",value:function(){return this.RoutesApi}}])&&tn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());function rn(t){return new Promise((function(e,n){var r=document.createElement("script");r.type="text/javascript",r.src=t,r.onload=function(){return e()},r.onerror=function(){return n(new Error("Failed to load script: ".concat(t)))},document.head.appendChild(r)}))}function on(t){return new Promise((function(e,n){var r=document.createElement("link");r.rel="stylesheet",r.href=t,r.onload=function(){return e()},r.onerror=function(){return n(new Error("Failed to load CSS: ".concat(t)))},document.head.appendChild(r)}))}function an(t){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},an(t)}function cn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function sn(t,e,n){return(e=ln(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function un(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ln(r.key),r)}}function ln(t){var e=function(t){if("object"!=an(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=an(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==an(e)?e:e+""}const hn=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._listeners={}},e=[{key:"on",value:function(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}},{key:"off",value:function(t,e){if(!this._listeners[t])return this;var n=this._listeners[t].indexOf(e);return-1!==n&&this._listeners[t].splice(n,1),this}},{key:"fire",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this._listeners[t])return this;var n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?cn(Object(n),!0).forEach((function(e){sn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e);return n.hasOwnProperty("type")||(n.type=t),this._listeners[t].forEach((function(e,r){try{e(n)}catch(e){console.error(" ❌ Events: Error in listener ".concat(r+1," for event '").concat(t,"':"),e)}})),this}}],e&&un(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function fn(t){return fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fn(t)}function pn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,dn(r.key),r)}}function dn(t){var e=function(t){if("object"!=fn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=fn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fn(e)?e:e+""}function yn(t,e,n){return e=mn(e),function(t,e){if(e&&("object"==fn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,gn()?Reflect.construct(e,n||[],mn(t).constructor):e.apply(t,n))}function gn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gn=function(){return!!t})()}function mn(t){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mn(t)}function vn(t,e){return vn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vn(t,e)}const Mn=new(function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),yn(this,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vn(t,e)}(e,t),n=e,r=[{key:"emit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.fire(t,e)}}],r&&pn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(hn));function bn(t){return bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bn(t)}function wn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,jn(r.key),r)}}function jn(t){var e=function(t){if("object"!=bn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bn(e)?e:e+""}function Nn(t,e,n){return e=In(e),function(t,e){if(e&&("object"==bn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Dn()?Reflect.construct(e,n||[],In(t).constructor):e.apply(t,n))}function Dn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Dn=function(){return!!t})()}function In(t){return In=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},In(t)}function En(t,e){return En=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},En(t,e)}const Sn=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Nn(this,e)).options=n,t.globalHandlers={},t.stateSubscriptions=[],t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&En(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){}},{key:"render",value:function(){}},{key:"destroy",value:function(){this.removeAllGlobalHandlers(),this.unsubscribeAllState()}},{key:"addGlobalHandler",value:function(t,e){this.globalHandlers[t]||(this.globalHandlers[t]=[]),this.globalHandlers[t].push(e),Mn.on(t,e)}},{key:"removeGlobalHandler",value:function(t,e){this.globalHandlers[t]&&(this.globalHandlers[t]=this.globalHandlers[t].filter((function(t){return t!==e})),Mn.off(t,e))}},{key:"removeAllGlobalHandlers",value:function(){var t=this,e=function(e){t.globalHandlers[e].forEach((function(t){return Mn.off(e,t)}))};for(var n in this.globalHandlers)e(n);this.globalHandlers={}}},{key:"subscribeToState",value:function(t){this.stateSubscriptions.push(t),StateStore.subscribe(t)}},{key:"unsubscribeFromState",value:function(t){this.stateSubscriptions=this.stateSubscriptions.filter((function(e){return e!==t})),StateStore.unsubscribe(t)}},{key:"unsubscribeAllState",value:function(){this.stateSubscriptions.forEach((function(t){return StateStore.unsubscribe(t)})),this.stateSubscriptions=[]}}])&&wn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(hn);function Tn(t){return Tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tn(t)}function On(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,xn(r.key),r)}}function xn(t){var e=function(t){if("object"!=Tn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Tn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tn(e)?e:e+""}const Ln=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.mapView=e,this.state="default",this.stateHistory=["default"],this.isLoading=!1,this.loadingType=null},e=[{key:"transitionTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.state=t;var n=this.stateHistory[this.stateHistory.length-1];"default"==t?this.stateHistory=["default"]:t!==n&&this.stateHistory.push(t),this.mapView.fire("state:".concat(t),e)}},{key:"setLoading",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(this.isLoading,this.loadingType);this.isLoading=t,this.loadingType=e,t?this.mapView.fire("loading:start",{type:e}):this.mapView.fire("loading:end",{type:e||n})}},{key:"getLoadingState",value:function(){return{isLoading:this.isLoading,loadingType:this.loadingType}}}],e&&On(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();var An=["outdoor-cities-demo","johnson-controls-roadshow-2026"];function kn(t){var e=t*Math.PI/180,n=6378137,r=(Math.pow(n,.5)-Math.pow(6356752.314,.5))/Math.pow(n,.5);return{meterToLat:1/(111132.954-559.822*Math.cos(2*e)+1.175*Math.cos(4*e)),meterToLon:1/(Math.PI*n*Math.cos(e)/(180*Math.pow(1-Math.pow(r,2)*Math.pow(Math.sin(e),2),.5)))}}function Cn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null===e&&(e=[0,0]);var r=t[0],o=t[1],i=e[0],a=e[1],c=kn(a);return{lat:a+o*n*c.meterToLat,lon:i+r*n*c.meterToLon}}function zn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null===e&&(e=[0,0]);var r=[];return t.forEach((function(t){var o=Cn(t,e,n),i=o.lat,a=o.lon;r.push([a,i])})),r}function _n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null===e&&(e=[0,0]);var r=e[0],o=e[1],i=t[0],a=t[1],c=kn(o),s=c.meterToLat,u=c.meterToLon,l=(a-o)/n/s;return[Number(((i-r)/n/u).toFixed(2)),Number(l.toFixed(2))]}function Pn(t){return Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pn(t)}function Bn(){Bn=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Pn(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Pn(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Un(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}var Qn,Rn=null;function Yn(){return"undefined"!=typeof navigator&&void 0!==navigator.geolocation&&"function"==typeof navigator.geolocation.getCurrentPosition}function Fn(){return Vn.apply(this,arguments)}function Vn(){var t;return t=Bn().mark((function t(){var e;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Yn()){t.next=2;break}return t.abrupt("return","unsupported");case 2:if(void 0!==navigator.permissions&&"function"==typeof navigator.permissions.query){t.next=4;break}return t.abrupt("return","prompt");case 4:return t.prev=4,t.next=7,navigator.permissions.query({name:"geolocation"});case 7:return e=t.sent,t.abrupt("return",e.state);case 11:return t.prev=11,t.t0=t.catch(4),t.abrupt("return","prompt");case 14:case"end":return t.stop()}}),t,null,[[4,11]])})),Vn=function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Un(i,r,o,a,c,"next",t)}function c(t){Un(i,r,o,a,c,"throw",t)}a(void 0)}))},Vn.apply(this,arguments)}function Hn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.enableHighAccuracy,n=void 0===e||e,r=t.timeout,o=void 0===r?1e4:r,i=t.maximumAge,a=void 0===i?3e4:i;return new Promise((function(t,e){if(Yn()){var r=Rn?Date.now()-Rn.timestamp>3e4?(Rn=null,null):Rn:null;r?t(r):navigator.geolocation.getCurrentPosition((function(e){var n={coordinate:[e.coords.longitude,e.coords.latitude],accuracy:e.coords.accuracy,timestamp:Date.now()};Rn=n,t(n)}),(function(t){var n;switch(t.code){case 1:n="DENIED";break;case 2:default:n="UNAVAILABLE";break;case 3:n="TIMEOUT"}e({code:n,message:t.message})}),{enableHighAccuracy:n,timeout:o,maximumAge:a})}else e({code:"UNAVAILABLE",message:"Geolocation is not supported by this browser."})}))}function Gn(t){return Gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gn(t)}function Zn(t,e){if(t){if("string"==typeof t)return Wn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wn(t,e):void 0}}function Wn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function qn(){qn=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Gn(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Gn(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Jn(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Kn(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Jn(i,r,o,a,c,"next",t)}function c(t){Jn(i,r,o,a,c,"throw",t)}a(void 0)}))}}function $n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Xn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$n(Object(n),!0).forEach((function(e){ir(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$n(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function tr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ar(r.key),r)}}function er(t,e,n){return e=rr(e),function(t,e){if(e&&("object"==Gn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,nr()?Reflect.construct(e,n||[],rr(t).constructor):e.apply(t,n))}function nr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(nr=function(){return!!t})()}function rr(t){return rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rr(t)}function or(t,e){return or=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},or(t,e)}function ir(t,e,n){return(e=ar(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ar(t){var e=function(t){if("object"!=Gn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Gn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Gn(e)?e:e+""}var cr={default:"3.5.1","johnson-controls-roadshow-2026":"3.17.0","usbank-del-coronado-2026":"3.17.0"},sr={"johnson-controls-roadshow-2026":{text:"Find out more",key:"Registration"}},ur=["johnson-controls-roadshow-2026"],lr=["johnson-controls-roadshow-2026"],hr=["usbank-del-coronado-2026"];function fr(t){var e=cr[t]||cr.default;return{css:"https://api.mapbox.com/mapbox-gl-js/v".concat(e,"/mapbox-gl.css"),js:"https://api.mapbox.com/mapbox-gl-js/v".concat(e,"/mapbox-gl.js")}}var pr=(ir(ir(ir(ir(ir(ir(ir(ir(ir(ir(Qn={container:"map",sourceId:"2024.2xw_YUXYS8GoDTB2AQgN3A",center:[0,0],floor:0,zoom:13,bearing:0,pitch:46},"bearing",0),"minPitch",0),"maxPitch",60),"minZoom",0),"maxZoom",19.5),"bounds",null),"doubleClickZoom",!0),"dragPan",!0),"dragRotate",!0),"scrollZoom",!0),ir(ir(ir(ir(ir(ir(ir(ir(ir(ir(Qn,"touchPitch",!0),"touchZoomRotate",!0),"interactive",!0),"trackResize",!0),"keyboard",!0),"defaultControls",!1),"setup",!1),"selectionCriteria",null),"initialState","default"),"initialStateData",null),ir(Qn,"showQRCodeInKioskMode",!0)),dr=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=er(this,e,[Xn(Xn({},pr),n)])).mapViewApi=nn.getMapViewApi(),t.searchApi=nn.getSearchApi(),t.routesApi=nn.getRotuesApi(),t.mapContainer=document.createElement("div"),t.mapContainer.className="inner-map-container",t.initialState=n.initialState||"default",t.initialStateData=n.initialStateData||null,"selection"===t.initialState&&(t._createSelectionLoadingOverlay(),t._showSelectionLoadingOverlay()),t.ready=t._initialize(n),t.initialLoad=!1,t.originalFilters={},t._currentFloorIndex=n.floor,t._defaultFloorIndex=t.options.floor||0,t._defaultZoom=t.options.zoom||13,t._defaultBearing=t.options.bearing||0,t._defaultPitch=t.options.pitch||0,t.mapData=null,t._stateCoordinator=new Ln(t),t.defaultControls=n.defaultControls,t.setupControl=null,t.location=n.location||null,t.modalContainer=null,t.selectionCriteria=n.selectionCriteria||null,t.multiSelect=!0,t.confirmedSelection=null,t.kioskResetTimer=null,t.kioskCountdownInterval=null,t.isKioskMode=null!==t.location,t.gpsEnabled=!1,t.gpsPermissionState="prompt",t.isKioskMode?t._initializeKioskReset():console.log("📍 Not in kiosk mode - no auto-reset timer"),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&or(t,e)}(e,t),n=e,r=[{key:"showModal",value:function(t){var e=this;this.modalContainer||(this.modalContainer=document.createElement("div"),this.modalContainer.className="waygo-map-modal-container",this.mapContainer.appendChild(this.modalContainer),this.modalContainer.addEventListener("click",(function(t){t.target===e.modalContainer&&e.hideModal()})));var n=document.createElement("div");n.className="waygo-map-modal-content","string"==typeof t?n.innerHTML=t:n.appendChild(t),this.modalContainer.innerHTML="",this.modalContainer.appendChild(n),this.modalContainer.style.display="flex"}},{key:"hideModal",value:function(){this.modalContainer&&(this.modalContainer.style.display="none")}},{key:"_initialize",value:(v=Kn(qn().mark((function t(){var e,n,r=this;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e=this.options.sourceId.split(".")[0],t.next=4,this._loadMapLibraries(e);case 4:return mapboxgl.clearStorage(),this.render(),t.next=8,this._initializeMapData();case 8:if(this.mapData){t.next=11;break}return console.error("Error initializing map data."),t.abrupt("return");case 11:n=this.mapData.style_id,this.mapData.map_id,"undefined"!=typeof mapboxgl&&n?(mapboxgl.accessToken="pk.eyJ1Ijoid2F5Z28tbWFwcyIsImEiOiJjbGtxYzZ1N3QxdG43M210bXFuYmJ4a3gxIn0.tlbznj_fRJ8La6s2UUMO6A",this.map=new mapboxgl.Map({container:this.mapContainer,style:"mapbox://styles/waygo-maps/".concat(n),center:this.options.center,zoom:this.options.zoom,bearing:this.options.bearing,pitch:this.options.pitch,minPitch:this.options.minPitch,maxPitch:this.options.maxPitch,minZoom:this.options.minZoom,maxZoom:this.options.maxZoom,bounds:this.options.bounds,doubleClickZoom:this.options.doubleClickZoom,dragPan:this.options.dragPan,dragRotate:this.options.dragRotate,scrollZoom:this.options.scrollZoom,touchPitch:this.options.touchPitch,touchZoomRotate:this.options.touchZoomRotate,interactive:this.options.interactive,trackResize:this.options.trackResize,keyboard:this.options.keyboard}),this.map.on("styledata",(function(){r.initialLoad||(r._initializeOriginalFilters(),r.updateFloor(r.options.floor,!1),r.initialLoad=!0)})),this.map.on("style.load",(function(){console.log(mapboxgl.version)})),this.map.on("load",(function(){r.defaultControls&&(r._addLogoImage(),r._addDefaultControls(),r.updateFloor(r.options.floor,!1)),r._initializeState(),r.fire("load",{mapData:r.mapData})})),this._initializeEventListeners()):console.error("Mapbox GL JS is not loaded."),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(0),console.error("Failed to initialize the map:",t.t0);case 19:case"end":return t.stop()}}),t,this,[[0,16]])}))),function(){return v.apply(this,arguments)})},{key:"_addLogoImage",value:function(){if("johnson-controls-roadshow-2026"!==this.mapData.map_id){var t=document.createElement("div");t.className="logo-image-container";var e=document.createElement("img");e.className="logo-outline-element",e.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAxMCIgaGVpZ2h0PSI5NjQiIHZpZXdCb3g9IjAgMCA0MDEwIDk2NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2Z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o=",e.alt="Clickable image",t.appendChild(e);var n=document.createElement("img");n.className="logo-fill-element",n.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAxMCIgaGVpZ2h0PSI5NjQiIHZpZXdCb3g9IjAgMCA0MDEwIDk2NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwOC44NzkgNzAyLjU3NUwyMDguODc5IDQxOC4wNEw0NjQuNjg2IDI0Ni44MjRDNTI3LjQyNCAyMTIuODQyIDU0OS4zNiAyMDguOTM4IDU2MS4zNzYgMjA4Ljk0NkM1NzMuMjExIDIwOC45NTQgNTk0LjYwMiAyMTIuNzUzIDY1Ni4xMDkgMjQ2LjMzTDczMC44MzkgMjk3LjYzMVYxNDEuMjQxTDcyNy40MTcgMTM4LjcyMUw3MjMuODI4IDEzNi40MDRDNTg4LjEwMyA2MS4zNDc5IDUzNS4zMjYgNjEuMDYwMyAzOTcuOTAyIDEzNi4zNzJMMTM3LjIyNiAzMTAuODQ2QzEwMS40NjYgMzM0Ljc4IDgwIDM3NC45OTEgODAgNDE4LjA0VjcwMi41NzVDODAgNzkxLjg3NiAxNjguNTEzIDg1NC4xNDggMjUyLjQ5MSA4MjMuOTI5TDUxMy4yNCA3MzAuMDk5QzU0MS40MzEgNzE5Ljk1NSA1NzIuMjc0IDcxOS45NTUgNjAwLjQ2NSA3MzAuMDk5TDg2MS4yMTMgODIzLjkyOUM5NDUuMTkyIDg1NC4xNDggMTAzMy43IDc5MS44NzYgMTAzMy43IDcwMi41NzVWNDE3LjA2OEMxMDMzLjcgMzc0LjU1NiAxMDEyLjc3IDMzNC43NzUgOTc3LjczNCAzMTAuNzI1TDkwNC44MjYgMjYwLjY3NlY3MDIuNTc1TDY0NC4wNzcgNjA4Ljc0NUM1ODcuNjk1IDU4OC40NTYgNTI2LjAxIDU4OC40NTYgNDY5LjYyOCA2MDguNzQ1TDIwOC44NzkgNzAyLj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IDYyMy4zMDNaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMzcwOC44NCA3MTYuMzQ5QzM4MzEuOTkgNzE2LjM0OSAzOTMwIDYxOS45NSAzOTMwIDQ5NS44ODhDMzkzMCAzNzAuOTg4IDM4MzEuOTkgMjc1LjQyNyAzNzA4Ljg0IDI3NS40MjdDMzU4Ni41NCAyNzUuNDI3IDM0ODcuNjkgMzcwLjk4OCAzNDg3LjY5IDQ5NS44ODhDMzQ4Ny42OSA2MTkuOTUgMzU4Ni41NCA3MTYuMzQ5IDM3MDguODQgNzE2LjM0OVpNMzcwOC44NCA2MjguMzMyQzM2MzUuMTIgNjI4LjMzMiAzNTc4LjE2IDU3Mi4xNjkgMzU3OC4xNiA0OTUuODg4QzM1NzguMTYgNDE5LjYwNiAzNjM1LjEyIDM2My40NDMgMzcwOC44NCAzNjMuNDQzQzM3ODIuNTYgMzYzLjQ0MyAzODM5LjUzIDQxOS42MDYgMzgzOS41MyA0OTUuODg4QzM4MzkuNTMgNTcyLjE2OSAzNzgyLjU2IDYyOC4zMzIgMzcwOC44NCA2MjguMzMyWiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",n.alt="Clickable image",t.appendChild(n),t.addEventListener("click",(function(){window.open("https://waygomaps.com","_blank")})),this.mapContainer.appendChild(t)}}},{key:"getCurrentFloor",value:function(){return this._currentFloorIndex}},{key:"_addDefaultControls",value:function(){var t=this;("selection"===this._stateCoordinator.state?[new Ws.FloorSelectorControl,new Ws.ContentPlacementControl,new Ws.InteractionControl]:[new Ws.SearchBoxControl,new Ws.FloorSelectorControl,new Ws.CategoryBarControl,new Ws.SearchResultsControl,new Ws.ContentPlacementControl,new Ws.DirectionsControl,new Ws.InteractionControl]).forEach((function(e){return t.addControl(e)}))}},{key:"_initializeOriginalFilters",value:function(){var t=this;this.map.getStyle().layers.forEach((function(e){"background"!==e.type&&"raster"!==e.type&&"heatmap"!==e.type&&(t.originalFilters[e.id]=t.map.getFilter(e.id)||null)}))}},{key:"_initializeEventListeners",value:function(){var t=this,e={passive:!0};this.mapContainer.addEventListener("mousedown",(function(e){return t.fire("mousedown",{originalEvent:e})})),this.mapContainer.addEventListener("click",(function(e){return t.fire("click",{originalEvent:e})})),this.mapContainer.addEventListener("mouseover",(function(e){return t.fire("mouseover",{originalEvent:e})})),this.mapContainer.addEventListener("mousemove",(function(e){return t.fire("mousemove",{originalEvent:e})})),this.mapContainer.addEventListener("dblclick",(function(e){return t.fire("dblclick",{originalEvent:e})})),this.mapContainer.addEventListener("mouseout",(function(e){return t.fire("mouseout",{originalEvent:e})})),this.mapContainer.addEventListener("contextmenu",(function(e){return t.fire("contextmenu",{originalEvent:e})})),this.mapContainer.addEventListener("wheel",(function(e){return t.fire("wheel",{originalEvent:e})})),this.mapContainer.addEventListener("touchstart",(function(e){return t.fire("touchstart",{originalEvent:e})}),e),this.mapContainer.addEventListener("touchend",(function(e){return t.fire("touchend",{originalEvent:e})}),e),this.mapContainer.addEventListener("touchmove",(function(e){return t.fire("touchmove",{originalEvent:e})}),e),this.mapContainer.addEventListener("touchcancel",(function(e){return t.fire("touchcancel",{originalEvent:e})}),e),this.mapContainer.addEventListener("move",(function(e){return t.fire("move",{originalEvent:e})})),["movestart","move","moveend","dragstart","drag","dragend","zoomstart","zoom","zoomend","rotatestart","rotate","rotateend","pitchstart","pitch","pitchend","boxzoomstart","boxzoomend","boxzoomcancel"].forEach((function(e){t.map.on(e,(function(n){t.fire(e,{originalEvent:n})}))})),this.on("selection:confirmed",(function(e){t.confirmedSelection=e.feature}))}},{key:"_initializeMapData",value:(m=Kn(qn().mark((function t(){var e,n,r,o;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((e=this.options.sourceId.split(".")).length<1||e.length>2)){t.next=4;break}return console.error('The sourceId format is incorrect. It should be in the format "mapId" or "mapId.mapViewId".'),t.abrupt("return");case 4:return n=e[0],r=e[1],t.prev=6,t.next=9,this.mapViewApi.loadMapView(n,r);case 9:return o=t.sent,this.mapData=o,nn.setAccountId(o.account_id),t.next=14,this._initializeGps();case 14:t.next=19;break;case 16:t.prev=16,t.t0=t.catch(6),console.error("Error fetching map style:",t.t0);case 19:case"end":return t.stop()}}),t,this,[[6,16]])}))),function(){return m.apply(this,arguments)})},{key:"_initializeGps",value:(g=Kn(qn().mark((function t(){var e,n,r;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.mapData){t.next=2;break}return t.abrupt("return");case 2:if(e=hr.includes(this.mapData.map_id),n=!!this.options.setup,r=e&&!this.isKioskMode&&!n&&Yn(),this.gpsEnabled=r,!r){t.next=10;break}return t.next=9,Fn();case 9:this.gpsPermissionState=t.sent;case 10:case"end":return t.stop()}}),t,this)}))),function(){return g.apply(this,arguments)})},{key:"shouldShowGpsCell",value:function(){return this.gpsEnabled&&"denied"!==this.gpsPermissionState&&!this.location}},{key:"_loadMapLibraries",value:(y=Kn(qn().mark((function t(e){var n,r,o;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=fr(e),r=n.css,o=n.js,t.next=3,on(r);case 3:return t.next=5,rn(o);case 5:mapboxgl.clearStorage();case 6:case"end":return t.stop()}}),t)}))),function(t){return y.apply(this,arguments)})},{key:"render",value:function(){var t=document.getElementById(this.options.container);t?(t.appendChild(this.mapContainer),this.mapContainer.style.width="100%",this.mapContainer.style.height="100%",this.mapContainer.style.position="relative"):console.error('Container element with id "'.concat(this.containerId,'" not found.'))}},{key:"updateFloor",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.map.getStyle().layers.forEach((function(n){if("background"!==n.type&&"raster"!==n.type&&"heatmap"!==n.type){var r=e.originalFilters[n.id];e.map.setFilter(n.id,r);var o=["==",["get","_floor"],t];if(r){var i=["all",o,r];e.map.setFilter(n.id,i)}else e.map.setFilter(n.id,o)}})),this._currentFloorIndex=t;var i=null!==o?o:this.map.getPitch(),a=null!==r?r:this.map.getBearing();if(n){var c=this.map.getStyle(),s=Object.keys(c.sources),u=[];if(s.forEach((function(n){var r="".concat(t,"-feature"),o=e.map.querySourceFeatures(n,{sourceLayer:r});u=u.concat(o)})),u.length>0){var l=new mapboxgl.LngLatBounds;u.forEach((function(t){var e=t.geometry;"Point"===e.type?l.extend(e.coordinates):"LineString"===e.type?e.coordinates.forEach((function(t){return l.extend(t)})):"Polygon"===e.type&&e.coordinates[0].forEach((function(t){return l.extend(t)}))})),this.map.fitBounds(l,{padding:{top:50,bottom:150,left:50,right:50},duration:1300,maxZoom:15.5,pitch:i,bearing:a})}else this.map.once("moveend",(function(){var n=[];if(s.forEach((function(r){var o="".concat(t,"-feature"),i=e.map.querySourceFeatures(r,{sourceLayer:o});n=n.concat(i)})),n.length>0){var r=new mapboxgl.LngLatBounds;n.forEach((function(t){var e=t.geometry;"Point"===e.type?r.extend(e.coordinates):"LineString"===e.type?e.coordinates.forEach((function(t){return r.extend(t)})):"Polygon"===e.type&&e.coordinates[0].forEach((function(t){return r.extend(t)}))})),e.map.fitBounds(r,{padding:50,duration:1300,maxZoom:15.5,pitch:i,bearing:a})}})),this.map.flyTo({zoom:this.map.getZoom()-3,duration:500,essential:!0})}this.fire("floorChanged",{floorIndex:t})}},{key:"addHighlightedFeature",value:function(t,e){var n=this.map.getSource("highlighted-content"),r=n._data,o={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};return r.features.push(o),n.setData(r),o}},{key:"addSelectedFeature",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.map.getSource("selected-content"),o=r._data,i={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};n?o.features.push(i):o.features=[i],r.setData(o)}},{key:"clearSelectedContentLayer",value:function(){this.map.getSource("selected-content").setData({type:"FeatureCollection",features:[]})}},{key:"clearHighlightedContentLayer",value:function(){this.map.getSource("highlighted-content").setData({type:"FeatureCollection",features:[]})}},{key:"addControl",value:function(t){var e=t.onAdd(this);this.mapContainer.appendChild(e)}},{key:"removeControl",value:function(t){this.map.removeControl(t)}},{key:"getCurrentState",value:function(){return this._stateCoordinator.state}},{key:"setToDefaultState",value:function(){this._stateCoordinator.transitionTo("default")}},{key:"setToSearchState",value:(d=Kn(qn().mark((function t(e){var n,r,o,i,a=arguments;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:0,r=a.length>2&&void 0!==a[2]?a[2]:30,o=a.length>3&&void 0!==a[3]?a[3]:null,this._stateCoordinator.setLoading(!0,"search"),t.prev=4,t.next=7,this.search(e,n,r,o);case 7:i=t.sent,this._stateCoordinator.transitionTo("search",{query:e,results:i}),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(4),console.error("❌ MapView: Search error occurred:",t.t0),this._stateCoordinator.setLoading(!1,"search");case 15:return t.prev=15,this._stateCoordinator.setLoading(!1,"search"),t.finish(15);case 18:case"end":return t.stop()}}),t,this,[[4,11,15,18]])}))),function(t){return d.apply(this,arguments)})},{key:"setToSelectedContentState",value:(p=Kn(qn().mark((function t(e){var n,r;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._stateCoordinator.setLoading(!0,"content"),t.prev=1,n=e[e.length-1],t.next=5,this.getContentPlacementDetails(n);case 5:r=t.sent,this.updateFloor(r.floor),this._stateCoordinator.transitionTo("selectedContent",{contentPlacementIds:e,selectedContentPlacement:r}),t.next=14;break;case 10:t.prev=10,t.t0=t.catch(1),console.error("❌ MapView: Content loading error occurred:",t.t0),this._stateCoordinator.setLoading(!1,"content");case 14:return t.prev=14,this._stateCoordinator.setLoading(!1,"content"),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,10,14,17]])}))),function(t){return p.apply(this,arguments)})},{key:"setToDirectionsState",value:(f=Kn(qn().mark((function t(){var e,n,r,o,i,a,c,s,u=arguments;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:null,n=u.length>1&&void 0!==u[1]?u[1]:null,r=u.length>2&&void 0!==u[2]?u[2]:{},t.prev=3,i=null,a=null,c=!!r.fromLocation,""!==e&&null!=e||(e=null),!r.startNodeId){t.next=13;break}a=r.startNodeId,console.log("🔵 MapView: Using startNodeId from options: ".concat(a)),t.next=33;break;case 13:if(e||null===(o=this.initialStateData)||void 0===o||!o.startNodeId){t.next=18;break}a=this.initialStateData.startNodeId,console.log("🔵 MapView: Using startNodeId from initialStateData: ".concat(a)),t.next=33;break;case 18:if(!e){t.next=33;break}return console.log("🔵 MapView: Attempting to fetch startContentPlacement for ID: ".concat(e)),t.prev=20,t.next=23,this.getContentPlacementDetails(e);case 23:i=t.sent,console.log("🔵 MapView: getContentPlacementDetails returned:",i),i&&i.placement_id?console.log("🔵 MapView: Successfully fetched startContentPlacement with placement_id: ".concat(i.placement_id)):(console.log("🔵 MapView: startContentPlacementId is a node ID (fetch returned invalid result): ".concat(e)),a=e,i=null),t.next=33;break;case 28:t.prev=28,t.t0=t.catch(20),console.log("🔵 MapView: Error fetching startContentPlacement (likely a node ID): ".concat(e),t.t0),a=e,i=null;case 33:if(s=null,!n){t.next=38;break}return t.next=37,this.getContentPlacementDetails(n);case 37:s=t.sent;case 38:console.log("🔵 MapView: Transitioning to directions state with:",{startContentPlacement:!!i,endContentPlacement:!!s,startNodeId:a}),this._stateCoordinator.transitionTo("directions",{startContentPlacement:i,endContentPlacement:s,startNodeId:a,fromLocation:c}),t.next=45;break;case 42:t.prev=42,t.t1=t.catch(3),console.error("❌ MapView: Directions state error occurred:",t.t1);case 45:case"end":return t.stop()}}),t,this,[[3,42],[20,28]])}))),function(){return f.apply(this,arguments)})},{key:"setToSetupState",value:(h=Kn(qn().mark((function t(){return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.map&&this.map.easeTo({pitch:0,bearing:0,duration:0}),this.setupControl||(this.setupControl=new Ws.SetupControl,this.addControl(this.setupControl)),this._stateCoordinator.transitionTo("setup");case 3:case"end":return t.stop()}}),t,this)}))),function(){return h.apply(this,arguments)})},{key:"setToSelectionState",value:(l=Kn(qn().mark((function t(e){var n,r,o,i,a,c,s=arguments;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=!(s.length>1&&void 0!==s[1])||s[1],this.selectionCriteria=e,this.multiSelect=n,this._stateCoordinator.setLoading(!0,"selection"),t.prev=4,t.next=7,this.mapViewApi.loadMapViewSelectionState(this.mapData.map_id,this.mapData.map_view_id,e);case 7:a=t.sent,this.selectionGeoJSON=a,console.log("✅ Selection GeoJSON loaded:",{type:null==a?void 0:a.type,featureCount:null==a||null===(r=a.features)||void 0===r?void 0:r.length,firstFeature:null==a||null===(o=a.features)||void 0===o?void 0:o[0],fullData:a}),this._stateCoordinator.transitionTo("selection",{criteria:e,geojson:a,multiSelect:n}),(null==a||null===(i=a.features)||void 0===i?void 0:i.length)>0&&(this.map.easeTo({pitch:0,bearing:0,duration:500}),c=new mapboxgl.LngLatBounds,a&&a.features&&(a.features.forEach((function(t){t.geometry&&t.geometry.coordinates&&("Point"===t.geometry.type?c.extend(t.geometry.coordinates):"LineString"===t.geometry.type?t.geometry.coordinates.forEach((function(t){return c.extend(t)})):"Polygon"===t.geometry.type&&t.geometry.coordinates[0].forEach((function(t){return c.extend(t)})))})),!1===c.isEmpty()&&this.map.fitBounds(c,{padding:80,duration:1e3,maxZoom:16}))),t.next=19;break;case 14:t.prev=14,t.t0=t.catch(4),console.error("❌ Error loading map view selection state:",t.t0),this.selectionGeoJSON=null,this._stateCoordinator.transitionTo("selection",{criteria:e,geojson:null,multiSelect:n});case 19:return t.prev=19,this._stateCoordinator.setLoading(!1,"selection"),t.finish(19);case 22:case"end":return t.stop()}}),t,this,[[4,14,19,22]])}))),function(t){return l.apply(this,arguments)})},{key:"getConfirmedSelection",value:function(){return this.confirmedSelection}},{key:"initiateBack",value:function(){this.fire("initiate:back")}},{key:"initiateSetToSearchState",value:function(){this.fire("initiate:search")}},{key:"initiateFindPath",value:function(t,e){this.fire("initiate:findPath",{startContentPlacementId:t,endContentPlacementId:e})}},{key:"initiateFindPathFromLocation",value:function(t){this.fire("initiate:findPathFromLocation",{location:this.location,endContentPlacement:t})}},{key:"findPath",value:(u=Kn(qn().mark((function t(e,n){var r;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._stateCoordinator.setLoading(!0,"directions"),t.prev=1,t.next=4,this.routesApi.findPath(this.mapData.map_id,e,n);case 4:if(!(r=t.sent)){t.next=9;break}return t.abrupt("return",r);case 9:console.error("Failed to find path.");case 10:return t.prev=10,this._stateCoordinator.setLoading(!1,"directions"),t.finish(10);case 13:case"end":return t.stop()}}),t,this,[[1,,10,13]])}))),function(t,e){return u.apply(this,arguments)})},{key:"findPathFromNodeToPlacement",value:(s=Kn(qn().mark((function t(e,n){var r;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._stateCoordinator.setLoading(!0,"directions"),t.prev=1,t.next=4,this.routesApi.findPathFromNodeToPlacement(this.mapData.map_id,e,n);case 4:if(!(r=t.sent)){t.next=9;break}return t.abrupt("return",r);case 9:console.error("Failed to find path.");case 10:return t.prev=10,this._stateCoordinator.setLoading(!1,"directions"),t.finish(10);case 13:case"end":return t.stop()}}),t,this,[[1,,10,13]])}))),function(t,e){return s.apply(this,arguments)})},{key:"useCurrentLocation",value:(c=Kn(qn().mark((function t(e){var n,r,o,i,a,c,s,u,l;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.location){t.next=2;break}return t.abrupt("return");case 2:if(this.gpsEnabled&&this.mapData){t.next=5;break}return this.fire("gps:fallback",{reason:"UNAVAILABLE"}),t.abrupt("return");case 5:return this._stateCoordinator.setLoading(!0,"directions"),t.prev=6,t.prev=7,t.next=10,Hn();case 10:n=t.sent,this.gpsPermissionState="granted",t.next=19;break;case 14:return t.prev=14,t.t0=t.catch(7),t.t0&&"DENIED"===t.t0.code&&(this.gpsPermissionState="denied"),this.fire("gps:fallback",{reason:t.t0&&t.t0.code||"UNAVAILABLE"}),t.abrupt("return");case 19:return r=this.mapData.reference_coordinate||[0,0],o=this.mapData.coordinate_scaling_multiplier||1,i=_n(n.coordinate,r,o),a=null!=this.mapData.default_floor?this.mapData.default_floor:0,t.next=25,this.routesApi.findClosestNode(this.mapData.map_id,i,a);case 25:if((c=t.sent)&&c.node_id){t.next=29;break}return this.fire("gps:fallback",{reason:"NO_NODE"}),t.abrupt("return");case 29:if(s=c.position_x-i[0],u=c.position_y-i[1],!((l=Math.sqrt(s*s+u*u))>150)){t.next=36;break}return console.log("🔵 MapView: GPS too far from nearest node (".concat(l.toFixed(1),"m > ").concat(150,"m)")),this.fire("gps:fallback",{reason:"TOO_FAR"}),t.abrupt("return");case 36:return t.next=38,this.setToDirectionsState(null,e,{startNodeId:c.node_id,fromLocation:!0});case 38:t.next=44;break;case 40:t.prev=40,t.t1=t.catch(6),console.error("❌ MapView: useCurrentLocation error:",t.t1),this.fire("gps:fallback",{reason:"UNAVAILABLE"});case 44:return t.prev=44,this._stateCoordinator.setLoading(!1,"directions"),t.finish(44);case 47:case"end":return t.stop()}}),t,this,[[6,40,44,47],[7,14]])}))),function(t){return c.apply(this,arguments)})},{key:"_findFeatureByPlacementId",value:function(t){var e=this.map.queryRenderedFeatures({filter:["==",["get","placement_id"],t]});return e.length>0?e[0]:null}},{key:"getCenter",value:function(){if(this.map)return this.map.getCenter();console.error("Map is not initialized.")}},{key:"setCenter",value:function(t){this.map?this.map.setCenter(t):console.error("Map is not initialized.")}},{key:"search",value:(a=Kn(qn().mark((function t(e){var n,r,o,i,a=arguments;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=a.length>1&&void 0!==a[1]?a[1]:0,r=a.length>2&&void 0!==a[2]?a[2]:30,o=a.length>3&&void 0!==a[3]?a[3]:null,""!==e){t.next=5;break}return t.abrupt("return");case 5:if(this.mapData){t.next=7;break}return t.abrupt("return");case 7:return i="searchable_data_string","johnson-controls-roadshow-2026"===this.mapData.map_id&&(i=null),t.prev=9,t.next=12,this.searchApi.search(this.mapData.map_id,this.mapData.map_view_id,e,n,r,o,i);case 12:return t.abrupt("return",t.sent);case 15:t.prev=15,t.t0=t.catch(9),axios.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 18:case"end":return t.stop()}}),t,this,[[9,15]])}))),function(t){return a.apply(this,arguments)})},{key:"getContentPlacementDetails",value:(i=Kn(qn().mark((function t(e){var n;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.searchApi.fetchContentPlacementDetails(e);case 3:return n=t.sent,t.abrupt("return",n);case 7:t.prev=7,t.t0=t.catch(0),axios.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Fetching content placement details error:",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})},{key:"flyTo",value:function(t){this.map.flyTo(t)}},{key:"removeMatchingFeaturesFromExistingLayers",value:function(t){var e=this;this.map.getStyle().layers.forEach((function(n){if("background"!==n.type&&"raster"!==n.type&&"heatmap"!==n.type){var r=n.id;if(r.includes("selectable-")||r.includes("booked-")||r.includes("selected-feature")||r.includes("confirmed-selection"))return;for(var o=e.map.getFilter(r),i=null,a=function(){var t,e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||Zn(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(s[c],2),n=e[0],r=e[1];if(Array.isArray(r)){var o=r.map((function(t){return["==",["get",n],t]}));t=["any"].concat(function(t){return function(t){if(Array.isArray(t))return Wn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Zn(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o))}else t=["==",["get",n],r];i=null===i?t:["all",i,t]},c=0,s=Object.entries(t);c<s.length;c++)a();var u=["!",i];if(u)if(o){var l=["all",o,u];e.map.setFilter(r,l)}else e.map.setFilter(r,u)}}))}},{key:"_getLabelGeometry",value:function(t){var e,n,r,o=(null===(e=this.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],i=(null===(n=this.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30,a=(null===(r=this.mapData)||void 0===r?void 0:r.map_id)||null;if(An.includes(a))return t.geometry;if(t.properties.label_location){var c=t.properties.label_location;if("string"==typeof c)try{c=JSON.parse(c)}catch(e){return console.warn("Failed to parse label_location JSON:",e),t.geometry}if(c&&c.coordinates&&Array.isArray(c.coordinates)&&c.coordinates.length>=2){var s=c.coordinates;if("number"==typeof s[0]&&"number"==typeof s[1]){var u=zn([s],o,i);return{type:"Point",coordinates:[Math.round(1e6*u[0][0])/1e6,Math.round(1e6*u[0][1])/1e6]}}}}return t.geometry}},{key:"_findOriginalFeature",value:function(t){return this.selectionGeoJSON&&this.selectionGeoJSON.features?this.selectionGeoJSON.features.find((function(e){return e.properties.feature_id===t})):null}},{key:"createSelectableContentLayers",value:function(){var t=this,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)||this.selectionGeoJSON;if(e&&e.features)try{var n,r;this.map.getLayer("selectable-label-layer")&&this.map.removeLayer("selectable-label-layer"),this.map.getLayer("selectable-outline-layer")&&this.map.removeLayer("selectable-outline-layer"),this.map.getLayer("selectable-fill-layer")&&this.map.removeLayer("selectable-fill-layer"),this.map.getLayer("booked-label-layer")&&this.map.removeLayer("booked-label-layer"),this.map.getLayer("booked-fill-layer")&&this.map.removeLayer("booked-fill-layer"),this.map.getSource("selectable-labels")&&this.map.removeSource("selectable-labels"),this.map.getSource("selectable-content")&&this.map.removeSource("selectable-content"),this.map.getSource("booked-labels")&&this.map.removeSource("booked-labels"),this.map.getSource("booked-content")&&this.map.removeSource("booked-content");var o=(null===(n=this.mapData)||void 0===n?void 0:n.reference_coordinate)||[0,0],i=(null===(r=this.mapData)||void 0===r?void 0:r.coordinate_scaling_multiplier)||30,a=e.features,c=a.filter((function(t){return"booked"!==t.properties.booking_status})),s=a.filter((function(t){return"booked"===t.properties.booking_status})),u={type:"FeatureCollection",features:c},l={type:"FeatureCollection",features:s};this.map.addSource("selectable-content",{type:"geojson",data:u,promoteId:"feature_id"}),this.map.addSource("booked-content",{type:"geojson",data:l,promoteId:"feature_id"});var h=c.map((function(t){return{type:"Feature",geometry:t.properties.label_location?{type:"Point",coordinates:zn([t.properties.label_location.coordinates],o,i)[0]}:t.geometry,properties:t.properties}})),f=s.map((function(t){return{type:"Feature",geometry:t.properties.label_location?{type:"Point",coordinates:zn([t.properties.label_location.coordinates],o,i)[0]}:t.geometry,properties:t.properties}}));this.map.addSource("selectable-labels",{type:"geojson",data:{type:"FeatureCollection",features:h}}),this.map.addSource("booked-labels",{type:"geojson",data:{type:"FeatureCollection",features:f}});var p=document.createElement("canvas");p.width=48,p.height=48;var d=p.getContext("2d");d.scale(1,1),d.fillStyle="white",d.beginPath(),d.arc(24,24,20,0,2*Math.PI),d.fill(),d.strokeStyle="#00C853",d.lineWidth=3,d.stroke(),d.strokeStyle="#00C853",d.lineWidth=4,d.lineCap="round",d.lineJoin="round",d.beginPath(),d.moveTo(14,24),d.lineTo(20,30),d.lineTo(34,16),d.stroke();var y=p.toDataURL("image/png");this.map.loadImage(y,(function(e,n){e?console.error("❌ Error loading canvas checkmark icon:",e):(t.map.addImage("checkmark-icon",n),t.map.getLayer("confirmed-selection-icon-layer")||t.map.addLayer({id:"confirmed-selection-icon-layer",type:"symbol",source:"confirmed-selection-labels",layout:{"icon-image":"checkmark-icon","icon-size":.6,"icon-anchor":"center","icon-allow-overlap":!0}}))})),this.map.addSource("confirmed-selection-labels",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:"confirmed-selection-label-layer",type:"symbol",source:"confirmed-selection-labels",layout:{"text-field":["get","name"],"text-font":["Inter Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",1.99],["zoom"],12,1.5,22,1e3]},paint:{"text-color":"#00C853","text-halo-color":"#ffffff","text-halo-width":1}}),this.map.addSource("confirmed-selection",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:"booked-fill-layer",type:"fill",source:"booked-content",paint:{"fill-color":"#f2f2f2","fill-opacity":1}}),this.map.addLayer({id:"booked-label-layer",type:"symbol",source:"booked-labels",layout:{"text-field":["get","name"],"text-font":["Inter Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",1.99],["zoom"],12,1.5,22,1e3]},paint:{"text-color":"#666666","text-halo-color":"#ffffff","text-halo-width":1}}),this.map.addLayer({id:"selectable-fill-layer",type:"fill",source:"selectable-content",paint:{"fill-color":"#FFFFFF","fill-opacity":.8}}),this.map.addLayer({id:"selectable-outline-layer",type:"line",source:"selectable-content",paint:{"line-color":"#1987ff","line-width":2}}),this.map.addLayer({id:"confirmed-selection-fill-layer",type:"fill",source:"confirmed-selection",paint:{"fill-color":"#d1fae2","fill-opacity":["interpolate",["linear"],["zoom"],10,.6,16,.8]}}),this.map.addLayer({id:"confirmed-selection-outline-layer",type:"line",source:"confirmed-selection",paint:{"line-color":"#00C853","line-width":2,"line-opacity":["interpolate",["linear"],["zoom"],10,.7,16,1]}}),this.map.addLayer({id:"selectable-label-layer",type:"symbol",source:"selectable-labels",layout:{"text-field":["get","name"],"text-font":["Inter Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",1.99],["zoom"],12,1.5,22,1e3]},paint:{"text-color":"#0263ca","text-halo-color":"#ffffff","text-halo-width":1}}),this.map.getStyle().layers.filter((function(t){return t.id.includes("selectable-")||t.id.includes("booked-")||t.id.includes("confirmed-selection")}))}catch(t){console.error("❌ ERROR:",t),console.error("Stack:",t.stack)}else console.error("❌ NO DATA TO CREATE LAYERS")}},{key:"removeSelectableContentLayers",value:function(){var t=this;["selectable-label-layer","selectable-outline-layer","selectable-fill-layer","booked-label-layer","booked-fill-layer","confirmed-selection-fill-layer","confirmed-selection-outline-layer","confirmed-selection-icon-layer","confirmed-selection-label-layer"].forEach((function(e){t.map.getLayer(e)&&t.map.removeLayer(e)})),this.map.getSource("selectable-content")&&this.map.removeSource("selectable-content"),this.map.getSource("selectable-labels")&&this.map.removeSource("selectable-labels"),this.map.getSource("booked-content")&&this.map.removeSource("booked-content"),this.map.getSource("booked-labels")&&this.map.removeSource("booked-labels"),this.map.getSource("confirmed-selection")&&this.map.removeSource("confirmed-selection"),this.map.getSource("confirmed-selection-labels")&&this.map.removeSource("confirmed-selection-labels"),this.map.hasImage("checkmark-icon")&&this.map.removeImage("checkmark-icon")}},{key:"clearSelectionLayers",value:function(){var t=this.map.getSource("confirmed-selection"),e=this.map.getSource("confirmed-selection-labels");t&&t.setData({type:"FeatureCollection",features:[]}),e&&e.setData({type:"FeatureCollection",features:[]})}},{key:"addConfirmedSelectionFeature",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.map.getSource("confirmed-selection"),o=this.map.getSource("confirmed-selection-labels"),i=this.map.getSource("selectable-content"),a=this.map.getSource("selectable-labels");if(r&&o&&i&&a){var c=r._data,s=o._data,u=i._data,l=a._data,h=t.properties.feature_id;if(n&&(c.features.forEach((function(t){var n=t.properties.feature_id,r=e._findOriginalFeature(n);r?(u.features.push(r),l.features.push({type:"Feature",geometry:e._getLabelGeometry(r),properties:r.properties})):(console.warn("⚠️ Original feature not found for feature:",n),u.features.push(t),l.features.push({type:"Feature",geometry:e._getLabelGeometry(t),properties:t.properties}))})),c.features=[],s.features=[]),!c.features.some((function(t){return t.properties.feature_id===h}))){c.features.push(t),r.setData(c);var f={type:"Feature",geometry:this._getLabelGeometry(t),properties:t.properties};s.features.push(f),o.setData(s),u.features=u.features.filter((function(t){return t.properties.feature_id!==h})),i.setData(u),l.features=l.features.filter((function(t){return t.properties.feature_id!==h})),a.setData(l)}}else console.error("❌ Required sources not found for confirmed selection")}},{key:"removeConfirmedSelectionFeature",value:function(t){var e=this.map.getSource("confirmed-selection"),n=this.map.getSource("confirmed-selection-labels"),r=this.map.getSource("selectable-content"),o=this.map.getSource("selectable-labels");if(e&&n&&r&&o){var i=e._data,a=n._data,c=r._data,s=o._data,u=i.features.find((function(e){return e.properties.feature_id===t}));if(u){var l=this._findOriginalFeature(t);if(l){c.features.push(l),r.setData(c);var h={type:"Feature",geometry:this._getLabelGeometry(l),properties:l.properties};s.features.push(h),o.setData(s)}else{console.warn("⚠️ Original feature not found for feature:",t);var f=u;c.features.push(f),r.setData(c);var p={type:"Feature",geometry:this._getLabelGeometry(f),properties:f.properties};s.features.push(p),o.setData(s)}i.features=i.features.filter((function(e){return e.properties.feature_id!==t})),e.setData(i),a.features=a.features.filter((function(e){return e.properties.feature_id!==t})),n.setData(a)}}else console.error("❌ Required sources not found for confirmed selection")}},{key:"getConfirmedSelectionFeatures",value:function(){var t=this.map.getSource("confirmed-selection");return t&&t._data.features||[]}},{key:"isFeatureSelected",value:function(t){return this.getConfirmedSelectionFeatures().some((function(e){return e.properties.placement_id===t||e.properties.feature_id===t}))}},{key:"_initializeState",value:(o=Kn(qn().mark((function t(){var e,n;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,t.t0=this.initialState,t.next="default"===t.t0?4:"search"===t.t0?6:"selectedContent"===t.t0?13:"directions"===t.t0?20:"selection"===t.t0?23:"setup"===t.t0?32:35;break;case 4:return this._stateCoordinator.transitionTo("default"),t.abrupt("break",38);case 6:if(!this.initialStateData||!this.initialStateData.query){t.next=11;break}return t.next=9,this.setToSearchState(this.initialStateData.query,this.initialStateData.skip||0,this.initialStateData.limit||30,this.initialStateData.floor||null);case 9:t.next=12;break;case 11:console.warn("⚠️ Search state requires initialStateData with query property");case 12:return t.abrupt("break",38);case 13:if(!this.initialStateData||!this.initialStateData.contentPlacementIds){t.next=18;break}return t.next=16,this.setToSelectedContentState(this.initialStateData.contentPlacementIds);case 16:t.next=19;break;case 18:console.warn("⚠️ SelectedContent state requires initialStateData with contentPlacementIds property");case 19:return t.abrupt("break",38);case 20:return t.next=22,this.setToDirectionsState((null===(e=this.initialStateData)||void 0===e?void 0:e.startContentPlacementId)||null,(null===(n=this.initialStateData)||void 0===n?void 0:n.endContentPlacementId)||null);case 22:return t.abrupt("break",38);case 23:if(!this.initialStateData||!this.initialStateData.criteria){t.next=29;break}return t.next=26,this.setToSelectionState(this.initialStateData.criteria,!1!==this.initialStateData.multiSelect);case 26:this._hideSelectionLoadingOverlay(),t.next=31;break;case 29:console.warn("⚠️ Selection state requires initialStateData with criteria property"),this._hideSelectionLoadingOverlay();case 31:return t.abrupt("break",38);case 32:return t.next=34,this.setToSetupState();case 34:return t.abrupt("break",38);case 35:return console.warn("⚠️ Unknown initial state:",this.initialState),this._hideSelectionLoadingOverlay(),t.abrupt("break",38);case 38:t.next=45;break;case 40:t.prev=40,t.t1=t.catch(0),console.error("❌ Error initializing state:",t.t1),this._hideSelectionLoadingOverlay(),this._stateCoordinator.transitionTo("default");case 45:case"end":return t.stop()}}),t,this,[[0,40]])}))),function(){return o.apply(this,arguments)})},{key:"_createSelectionLoadingOverlay",value:function(){this.selectionLoadingOverlay=document.createElement("div"),this.selectionLoadingOverlay.className="selection-loading-overlay";var t=document.createElement("div");t.className="selection-circular-progress";var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("viewBox","0 0 40 40");var n=document.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("class","progress-ring"),n.setAttribute("cx","20"),n.setAttribute("cy","20"),n.setAttribute("r","15");var r=document.createElementNS("http://www.w3.org/2000/svg","circle");r.setAttribute("class","progress-ring-fill"),r.setAttribute("cx","20"),r.setAttribute("cy","20"),r.setAttribute("r","15"),e.appendChild(n),e.appendChild(r),t.appendChild(e),this.selectionLoadingOverlay.appendChild(t);var o=document.getElementById(this.options.container);o?o.appendChild(this.selectionLoadingOverlay):this.mapContainer.appendChild(this.selectionLoadingOverlay)}},{key:"_showSelectionLoadingOverlay",value:function(){if(this.selectionLoadingOverlay){this.selectionLoadingOverlay.style.display="flex";var t=this.selectionLoadingOverlay.querySelector(".progress-ring-fill");t&&(t.classList.remove("animating"),t.style.strokeDashoffset="94.2",setTimeout((function(){t.classList.add("animating")}),50))}}},{key:"_hideSelectionLoadingOverlay",value:function(){if(this.selectionLoadingOverlay){this.selectionLoadingOverlay.classList.add("hidden");var t=this.selectionLoadingOverlay.querySelector(".progress-ring-fill");t&&(t.classList.remove("animating"),t.style.strokeDashoffset="188.4")}}},{key:"_initializeKioskReset",value:function(){var t=this;this.on("state:default",(function(){return t._resetKioskTimer()})),this.on("state:search",(function(){return t._resetKioskTimer()})),this.on("state:selectedContent",(function(){return t._resetKioskTimer()})),this.on("state:directions",(function(){return t._resetKioskTimer()})),this.on("state:setup",(function(){return t._resetKioskTimer()})),this.on("state:selection",(function(){return t._resetKioskTimer()})),this.on("moveend",(function(){return t._resetKioskTimer()})),this.on("zoomend",(function(){return t._resetKioskTimer()})),this.on("pitchend",(function(){return t._resetKioskTimer()})),this.on("rotateend",(function(){return t._resetKioskTimer()})),this.on("dragend",(function(){return t._resetKioskTimer()})),setTimeout((function(){t._startKioskTimer()}),100)}},{key:"_startKioskTimer",value:function(){var t=this,e=90;this.kioskCountdownInterval&&clearInterval(this.kioskCountdownInterval),this.kioskCountdownInterval=setInterval((function(){--e<=0&&clearInterval(t.kioskCountdownInterval)}),1e3),this.kioskResetTimer=setTimeout((function(){var e=t._stateCoordinator.state,n=(t._currentFloorIndex,t._defaultFloorIndex),r=t._defaultBearing,o=t._defaultPitch;t.hideModal(),t.updateFloor(n,!0,r,o),"default"!==e&&t.setToDefaultState(),t.kioskCountdownInterval&&clearInterval(t.kioskCountdownInterval)}),9e4)}},{key:"_resetKioskTimer",value:function(){this._stateCoordinator.state,this.kioskResetTimer&&clearTimeout(this.kioskResetTimer),this.kioskCountdownInterval&&clearInterval(this.kioskCountdownInterval),this._startKioskTimer()}},{key:"_destroyKioskTimer",value:function(){this.kioskResetTimer&&(clearTimeout(this.kioskResetTimer),this.kioskResetTimer=null),this.kioskCountdownInterval&&(clearInterval(this.kioskCountdownInterval),this.kioskCountdownInterval=null)}}],r&&tr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a,c,s,u,l,h,f,p,d,y,g,m,v}(Sn);const yr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE4IDZMNiAxOCIgc3Ryb2tlPSIjMTcxNzE3IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNNiA2TDE4IDE4IiBzdHJva2U9IiMxNzE3MTciIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=",gr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzI1MzFfOTIpIj4KPHBhdGggZD0iTTEyIDIyQzE3LjUyMjggMjIgMjIgMTcuNTIyOCAyMiAxMkMyMiA2LjQ3NzE1IDE3LjUyMjggMiAxMiAyQzYuNDc3MTUgMiAyIDYuNDc3MTUgMiAxMkMyIDE3LjUyMjggNi40NzcxNSAyMiAxMiAyMloiIHN0cm9rZT0iI0U1RTdFQiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPHBhdGggZD0iTTE5LjE0MjEgNS4wNzEwN0MxNS4yMzY4IDEuMTY1NzIgOC45MDUzNiAxLjE2NTcyIDUuMDAwMDEgNS4wNzEwNyIgc3Ryb2tlPSIjMTcxNzE3IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzI1MzFfOTIiPgo8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==";function mr(t){return mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mr(t)}function vr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Mr(r.key),r)}}function Mr(t){var e=function(t){if("object"!=mr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=mr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mr(e)?e:e+""}function br(t,e,n){return e=jr(e),function(t,e){if(e&&("object"==mr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,wr()?Reflect.construct(e,n||[],jr(t).constructor):e.apply(t,n))}function wr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wr=function(){return!!t})()}function jr(t){return jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jr(t)}function Nr(t,e){return Nr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Nr(t,e)}const Dr=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=br(this,e,[n]))._initialize(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nr(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="search-bar-container",this.input=document.createElement("input"),this.input.type="text",this.input.placeholder="",this.input.className="search-bar",this.rightButton=document.createElement("button"),this.rightButton.className="search-bar-button-right",this.updateRightButtonIcon("search"),this.leftButton=document.createElement("button"),this.leftButton.className="search-bar-button-left",this.updateLeftButtonIcon("none"),this.loadingIndicator=document.createElement("div"),this.loadingIndicator.className="search-bar-loading-indicator",this.loadingIndicator.innerHTML='<img src="'.concat(gr,'" alt="Loading" />'),this.loadingIndicator.style.display="none",this.element.appendChild(this.leftButton),this.element.appendChild(this.input),this.element.appendChild(this.loadingIndicator),this.element.appendChild(this.rightButton),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.input.addEventListener("input",(function(e){return t._handleInput(e)})),this.input.addEventListener("focus",this._handleFocus.bind(this)),this.input.addEventListener("blur",this._handleBlur.bind(this)),this.input.addEventListener("keydown",(function(e){"Enter"===e.key&&t._handleEnterSelect(e)})),this.rightButton.addEventListener("click",(function(e){return t._handleRightButtonSelect(e)})),this.leftButton.addEventListener("click",(function(e){return t._handleLeftButtonSelect(e)}))}},{key:"_handleInput",value:function(t){this.fire("input",{event:t,query:this.getText()})}},{key:"_handleFocus",value:function(){var t=this,e=window.innerHeight,n=0,r=function(){var o=window.innerHeight;o===e?n+=1:n=0,e=o,n>=3?t.fire("focus"):requestAnimationFrame(r)};requestAnimationFrame(r)}},{key:"_handleBlur",value:function(){var t=this;setTimeout((function(){var e=document.activeElement;e===t.rightButton?(t.updateStyleWithoutSuggestions(),t.fire("blur")):e===t.input||(t.updateStyleWithoutSuggestions(),t.fire("blur"))}),150)}},{key:"_handleEnterSelect",value:function(t){var e=this.getText();e.length>0&&(this.fire("search",{query:e,event:t}),this.input.blur())}},{key:"_handleRightButtonSelect",value:function(t){if("search"===this.rightButtonState){var e=this.getText();e.length>0&&(this.fire("search",{query:e,event:t}),this.input.blur())}else"cancel"===this.rightButtonState&&this.fire("cancel",{event:t})}},{key:"_handleLeftButtonSelect",value:function(t){"logo"===this.leftButtonState?this.input.focus():"back"===this.leftButtonState&&this.fire("back")}},{key:"updateStyleWithSuggestions",value:function(){this.element.classList.add("with-results")}},{key:"updateStyleWithoutSuggestions",value:function(){this.element.classList.remove("with-results")}},{key:"updateRightButtonIcon",value:function(t){this.rightButtonState=t,"search"===t?(this.rightButton.innerHTML='<img src="'.concat("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iNyIgc3Ryb2tlPSIjMTcxNzE3IiBzdHJva2Utd2lkdGg9IjIiLz4KPHBhdGggZD0iTTIwIDIwTDE3IDE3IiBzdHJva2U9IiMxNzE3MTciIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+Cjwvc3ZnPgo=",'" alt="Search" />'),this.rightButton.style.display="flex"):"cancel"===t?(this.rightButton.innerHTML='<img src="'.concat(yr,'" alt="Cancel" />'),this.rightButton.style.display="flex"):"none"===t&&(this.rightButton.style.display="none")}},{key:"updateLeftButtonIcon",value:function(t){if(this.leftButtonState=t,"logo"===t){this.leftButton.innerHTML='<img src="'.concat("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQ5IiBoZWlnaHQ9IjExNyIgdmlld0JveD0iMCAwIDE0OSAxMTciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0yMC41IDk2LjgwOVY1Mi42ODIxTDYwLjE5NzIgMjYuMTI5NEM2OS45MzMyIDIwLjg1OTIgNzMuMzM3MiAyMC4yNTM5IDc1LjIwMjEgMjAuMjU1MUM3Ny4wMzg2IDIwLjI1NjQgODAuMzU4MSAyMC44NDU0IDg5LjkwMzEgMjYuMDUyOEwxMDEuNSAzNC4wMDg2VjkuNzU1MTJMMTAyLjA5OCAxMC4xNjVMMTAwLjQgOC45OTk5OUM3OS4zMzc2IC0yLjYzOTk3IDcxLjE1OTUgLTIuNjc5NjYgNDkuODMzMyA4Ljk5OTk5TDkuMzgwNTIgMzYuMDU4MkMzLjgzMTI2IDM5Ljc3IDAuNSA0Ni4wMDU5IDAuNSA1Mi42ODIxVjk2LjgwOUMwLjUgMTEwLjY1OCAxNC4yMzU4IDEyMC4zMTYgMjcuMjY3OSAxMTUuNjI5TDY3LjczMiAxMDEuMDc4QzcyLjEwNjkgOTkuNTA0MyA3Ni44OTMxIDk5LjUwNDMgODEuMjY4IDEwMS4wNzhMMTIxLjczMiAxMTUuNjI5QzEzNC43NjQgMTIwLjMxNiAxNDguNSAxMTAuNjU4IDE0OC41IDk2LjgwOVY1Mi41MzE1QzE0OC41IDQ1LjkzODUgMTQ1LjI1MSAzOS43NjkxIDEzOS44MTQgMzYuMDM5NEwxMjguNSAyOC4yNzc1Vjk2LjgwOUw4OC4wMzU5IDgyLjI1NzVDNzkuMjg2MiA3OS4xMTEgNjkuNzEzOCA3OS4xMTEgNjAuOTY0MSA4Mi4yNTc1TDIwLjUgOTYuODA5WiIgZmlsbD0iIzFFMUUxRSIvPgo8L3N2Zz4K",'" alt="').concat(t,'" />');var e=this.leftButton.querySelector("img");e.style.width="16px",e.style.height="16px",this.leftButton.style.display="flex"}else if("back"===t){this.leftButton.innerHTML='<img src="'.concat("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTguNDYwMDIgMTEuMjg5NUwxNC4xMiA1LjYzOTU1QzE0LjIxMyA1LjU0NTgyIDE0LjMyMzYgNS40NzE0MyAxNC40NDU0IDUuNDIwNjZDMTQuNTY3MyA1LjM2OTg5IDE0LjY5OCA1LjM0Mzc1IDE0LjgzIDUuMzQzNzVDMTQuOTYyIDUuMzQzNzUgMTUuMDkyNyA1LjM2OTg5IDE1LjIxNDYgNS40MjA2NkMxNS4zMzY1IDUuNDcxNDMgMTUuNDQ3MSA1LjU0NTgyIDE1LjU0IDUuNjM5NTVDMTUuNzI2MyA1LjgyNjkxIDE1LjgzMDggNi4wODAzNiAxNS44MzA4IDYuMzQ0NTVDMTUuODMwOCA2LjYwODczIDE1LjcyNjMgNi44NjIxOSAxNS41NCA3LjA0OTU1TDEwLjU5IDEyLjA0OTVMMTUuNTQgMTYuOTk5NUMxNS43MjYzIDE3LjE4NjkgMTUuODMwOCAxNy40NDA0IDE1LjgzMDggMTcuNzA0NUMxNS44MzA4IDE3Ljk2ODcgMTUuNzI2MyAxOC4yMjIyIDE1LjU0IDE4LjQwOTVDMTUuNDQ3NCAxOC41MDQgMTUuMzM3IDE4LjU3OTIgMTUuMjE1MSAxOC42MzA3QzE1LjA5MzIgMTguNjgyMiAxNC45NjIzIDE4LjcwOSAxNC44MyAxOC43MDk1QzE0LjY5NzcgMTguNzA5IDE0LjU2NjggMTguNjgyMiAxNC40NDUgMTguNjMwN0MxNC4zMjMxIDE4LjU3OTIgMTQuMjEyNiAxOC41MDQgMTQuMTIgMTguNDA5NUw4LjQ2MDAyIDEyLjc1OTVDOC4zNTg1MSAxMi42NjU5IDguMjc3NSAxMi41NTIzIDguMjIyMSAxMi40MjU4QzguMTY2NjkgMTIuMjk5MyA4LjEzODA5IDEyLjE2MjYgOC4xMzgwOSAxMi4wMjQ1QzguMTM4MDkgMTEuODg2NCA4LjE2NjY5IDExLjc0OTggOC4yMjIxIDExLjYyMzNDOC4yNzc1IDExLjQ5NjggOC4zNTg1MSAxMS4zODMyIDguNDYwMDIgMTEuMjg5NVYxMS4yODk1WiIgZmlsbD0iIzFFMUUxRSIvPgo8L3N2Zz4K",'" alt="').concat(t,'" />');var n=this.leftButton.querySelector("img");n.style.width="20px",n.style.height="20px",this.leftButton.style.display="flex"}else"none"===t&&(this.leftButton.style.display="none")}},{key:"setPlaceholderText",value:function(t){this.input.placeholder=t}},{key:"getText",value:function(){return this.input.value}},{key:"setText",value:function(t){this.input.value=t}},{key:"getElement",value:function(){return this.element}},{key:"setViewForDesktop",value:function(){this.element.classList.remove("mobile-view"),this.input.classList.remove("mobile-view")}},{key:"setViewForMobile",value:function(){this.element.classList.add("mobile-view"),this.input.classList.add("mobile-view")}},{key:"showLoading",value:function(){this.loadingIndicator.style.display="flex"}},{key:"hideLoading",value:function(){this.loadingIndicator.style.display="none",this.rightButton.style.display="flex"}}],r&&vr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Ir(t){return Ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ir(t)}function Er(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Sr(r.key),r)}}function Sr(t){var e=function(t){if("object"!=Ir(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ir(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ir(e)?e:e+""}function Tr(t,e,n){return e=xr(e),function(t,e){if(e&&("object"==Ir(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Or()?Reflect.construct(e,n||[],xr(t).constructor):e.apply(t,n))}function Or(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Or=function(){return!!t})()}function xr(t){return xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xr(t)}function Lr(t,e){return Lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lr(t,e)}const Ar=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=Tr(this,e,[r])).result=t,n._initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lr(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="search-bar-suggestions-view-cell",this.result&&"gps-current-location"===this.result.type&&this.element.classList.add("search-bar-suggestions-view-cell--gps"),this.render(),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.element.addEventListener("click",(function(){return t.fire("click",{result:t.result})}))}},{key:"render",value:function(){if(this.result&&"gps-current-location"===this.result.type)this.element.innerHTML='\n <div class="suggestion-gps-icon" aria-hidden="true">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <circle cx="12" cy="12" r="3"></circle>\n <line x1="12" y1="2" x2="12" y2="5"></line>\n <line x1="12" y1="19" x2="12" y2="22"></line>\n <line x1="2" y1="12" x2="5" y2="12"></line>\n <line x1="19" y1="12" x2="22" y2="12"></line>\n </svg>\n </div>\n <div class="suggestion-title">Use current location</div>\n ';else{var t=this.result.catalog.content_title_key;this.element.innerHTML='\n <div class="suggestion-title">'.concat(this.result.content.data[t],'</div>\n <div class="suggestion-subtitle">').concat(this.result.contextual_location,"</div>\n ")}}},{key:"getElement",value:function(){return this.element}}])&&Er(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function kr(t){return kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kr(t)}function Cr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,zr(r.key),r)}}function zr(t){var e=function(t){if("object"!=kr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=kr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kr(e)?e:e+""}function _r(t,e,n){return e=Br(e),function(t,e){if(e&&("object"==kr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Pr()?Reflect.construct(e,n||[],Br(t).constructor):e.apply(t,n))}function Pr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Pr=function(){return!!t})()}function Br(t){return Br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Br(t)}function Ur(t,e){return Ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ur(t,e)}const Qr=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=_r(this,e,[n]))._initialize(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ur(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.results=[],this.pinnedResults=[],this.element=document.createElement("div"),this.element.className="search-bar-suggestions-view"}},{key:"updateResults",value:function(t){this.results=t,this.render()}},{key:"setPinnedResults",value:function(t){this.pinnedResults=t||[],this.render()}},{key:"hasPinnedResults",value:function(){return this.pinnedResults.length>0}},{key:"render",value:function(){var t=this;this.element.innerHTML="",this.pinnedResults.forEach((function(e){var n=new Ar(e);n.on("click",(function(){return t.fire("selectCell",{result:e})})),t.element.appendChild(n.getElement())})),this.results.forEach((function(e){var n=new Ar(e);n.on("click",(function(){return t.fire("selectCell",{result:e})})),t.element.appendChild(n.getElement())}))}},{key:"clearResults",value:function(){this.updateResults([])}},{key:"show",value:function(){this.element.classList.add("visible")}},{key:"hide",value:function(){this.element.classList.remove("visible")}},{key:"getElement",value:function(){return this.element}},{key:"setViewForDesktop",value:function(){}},{key:"setViewForMobile",value:function(){}}])&&Cr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Rr(t){return Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rr(t)}function Yr(){Yr=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Rr(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Rr(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Fr(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Vr(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Fr(i,r,o,a,c,"next",t)}function c(t){Fr(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Hr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Gr(r.key),r)}}function Gr(t){var e=function(t){if("object"!=Rr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Rr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Rr(e)?e:e+""}function Zr(t,e,n){return e=qr(e),function(t,e){if(e&&("object"==Rr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Wr()?Reflect.construct(e,n||[],qr(t).constructor):e.apply(t,n))}function Wr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Wr=function(){return!!t})()}function qr(t){return qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qr(t)}function Jr(t,e){return Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jr(t,e)}const Kr=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Zr(this,e,[n])).element=document.createElement("div"),t.element.className="search-box",t.searchBar=new Dr,t.searchBarSuggestionsView=new Qr,t.searchCount=0,t.showSuggestionsOnEmptyFocus=!1,t.initializeHandlers(),t._render(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jr(t,e)}(e,t),n=e,r=[{key:"initializeHandlers",value:function(){this.searchBar.on("input",this._handleSearchBarInput.bind(this)),this.searchBar.on("focus",this._handleSearchBarFocus.bind(this)),this.searchBar.on("blur",this._handleSearchBarBlur.bind(this)),this.searchBar.on("search",this._handleSearchBarSearch.bind(this)),this.searchBar.on("back",this._handleSearchBarBack.bind(this)),this.searchBarSuggestionsView.on("selectCell",this._handleSearchResultSelect.bind(this)),window.addEventListener("resize",(function(t){t.preventDefault()}))}},{key:"_handleSearchBarBack",value:function(){this.fire("selectBack")}},{key:"_handleSearchBarSearch",value:function(t){var e=t.query;t.event,this.fire("search",{query:e})}},{key:"_handleSearchResultSelect",value:function(t){t.result}},{key:"_handleSearchBarFocus",value:(a=Vr(Yr().mark((function t(){var e;return Yr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((e=this.searchBar.getText()).length>2)){t.next=7;break}return t.next=4,this.getSearchBarSuggestions(e);case 4:this.openSuggestionsView(),t.next=8;break;case 7:this.showSuggestionsOnEmptyFocus&&this.searchBarSuggestionsView.hasPinnedResults()&&this.openSuggestionsView();case 8:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"_handleSearchBarBlur",value:function(){this.closeSuggestionsView()}},{key:"_handleSearchBarInput",value:(i=Vr(Yr().mark((function t(e){var n;return Yr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0===(n=e.query).length){t.next=7;break}return this.openSuggestionsView(),t.next=5,this.getSearchBarSuggestions(n);case 5:t.next=8;break;case 7:this.showSuggestionsOnEmptyFocus&&this.searchBarSuggestionsView.hasPinnedResults()?(this.searchBarSuggestionsView.updateResults([]),this.openSuggestionsView()):this.closeSuggestionsView();case 8:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_render",value:function(){this.element.appendChild(this.searchBar.getElement()),this.element.appendChild(this.searchBarSuggestionsView.getElement())}},{key:"setViewForDesktop",value:function(){this.searchBar.setViewForDesktop(),this.searchBarSuggestionsView.setViewForDesktop()}},{key:"setViewForMobile",value:function(){this.searchBar.setViewForMobile(),this.searchBarSuggestionsView.setViewForMobile()}},{key:"getElement",value:function(){return this.element}},{key:"openSuggestionsView",value:function(){this.searchBarSuggestionsView.show(),this.searchBar.updateStyleWithSuggestions()}},{key:"closeSuggestionsView",value:function(){this.searchBarSuggestionsView.hide(),this.searchBar.updateStyleWithoutSuggestions()}},{key:"setPinnedResults",value:function(t){this.searchBarSuggestionsView.setPinnedResults(t)}},{key:"clearPinnedResults",value:function(){this.searchBarSuggestionsView.setPinnedResults([])}},{key:"setShowSuggestionsOnEmptyFocus",value:function(t){this.showSuggestionsOnEmptyFocus=!!t}},{key:"getSearchBarSuggestions",value:(o=Vr(Yr().mark((function t(e){return Yr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.fire("getSearchBarSuggestions",{query:e});case 1:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})}],r&&Hr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a}(Sn);function $r(t){return $r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$r(t)}function Xr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,to(r.key),r)}}function to(t){var e=function(t){if("object"!=$r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=$r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$r(e)?e:e+""}const eo=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.map=null,this.currentViewType=null},(e=[{key:"onAdd",value:function(t){this.map=t}},{key:"onRemove",value:function(){this.container&&(this.container.parentNode.removeChild(this.container),this.map=void 0)}},{key:"_attachResizeListener",value:function(){var t=this.map.mapContainer.offsetWidth;this._configureView(t)}},{key:"_initialize",value:function(){if(this.map){var t=this.map.mapContainer.offsetWidth;this._configureView(t)}}},{key:"_configureView",value:function(t){t>767?this._setViewForDesktop():this._setViewForMobile()}},{key:"_setViewForDesktop",value:function(){this.currentViewType="desktop",this._updateContentView()}},{key:"_setViewForMobile",value:function(){this.currentViewType="mobile",this._updateContentView()}},{key:"_updateContentView",value:function(){this._clearViews(),"desktop"===this.currentViewType?this._renderDesktopView():this._renderMobileView()}},{key:"_clearViews",value:function(){for(;this.container.firstChild;)this.container.removeChild(this.container.firstChild),this.container.classList.remove("mobile-view"),this.container.classList.remove("desktop-view")}},{key:"show",value:function(){this.container&&(this.container.style.display="block","mobile"===this.currentViewType&&(document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"))}},{key:"hide",value:function(){this.container&&(this.container.style.display="none",document.body.style.overflow="",document.documentElement.style.overflow="")}},{key:"_renderDesktopView",value:function(){}},{key:"_renderMobileView",value:function(){}}])&&Xr(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function no(t){return no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},no(t)}function ro(){ro=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==no(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(no(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function oo(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function io(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ao(r.key),r)}}function ao(t){var e=function(t){if("object"!=no(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=no(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==no(e)?e:e+""}function co(t,e,n){return e=lo(e),function(t,e){if(e&&("object"==no(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,so()?Reflect.construct(e,n||[],lo(t).constructor):e.apply(t,n))}function so(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(so=function(){return!!t})()}function uo(){return uo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=lo(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},uo.apply(null,arguments)}function lo(t){return lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lo(t)}function ho(t,e){return ho=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ho(t,e)}const fo=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=co(this,e,[n])).searchBox=new Kr,t.searchApi=nn.getSearchApi(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ho(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){this.map=t,this.container=document.createElement("div"),this.container.className="search-box-control-container";var e=this.searchBox.getElement();return this.container.appendChild(e),this._initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.show(),this.testLoadingState=this._testLoadingState.bind(this),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=uo(lo(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"_initializeEventListeners",value:function(){this.searchBox.searchBarSuggestionsView.on("selectCell",this._handleSuggestionSelect.bind(this)),this.searchBox.searchBar.on("cancel",this._handleSearchBarCancel.bind(this)),this.searchBox.on("search",this._handleSearchBoxSearch.bind(this)),this.searchBox.on("selectBack",this._handleSearchBoxSelectBack.bind(this)),this.searchBox.on("getSearchBarSuggestions",this._handleGettingSearchBarSuggestions.bind(this)),this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("load",this._handleMapLoad.bind(this)),this.map.on("loading:start",this._handleLoadingStart.bind(this)),this.map.on("loading:end",this._handleLoadingEnd.bind(this))}},{key:"_handleMapLoad",value:function(t){var e=t.mapData.map_name;e?this.searchBox.searchBar.setPlaceholderText("Search ".concat(e)):this.searchBox.searchBar.setPlaceholderText("Search")}},{key:"_handleGettingSearchBarSuggestions",value:(o=ro().mark((function t(e){var n,r,o;return ro().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.query,r=++this.searchBox.searchCount,""!==n){t.next=5;break}return this.searchBox.searchBarSuggestionsView.updateResults([]),t.abrupt("return");case 5:if(this.map.mapData){t.next=7;break}return t.abrupt("return");case 7:return t.prev=9,t.next=12,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,n,0,5);case 12:o=t.sent,r===this.searchBox.searchCount&&this.searchBox.searchBarSuggestionsView.updateResults(o),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(9),be.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 19:case"end":return t.stop()}}),t,this,[[9,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){oo(i,n,r,a,c,"next",t)}function c(t){oo(i,n,r,a,c,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})},{key:"_renderDesktopView",value:function(){var t=this.searchBox.getElement();this.container.appendChild(t),this.container.classList.add("desktop-view"),this.container.classList.remove("mobile-view"),t&&this.searchBox.setViewForDesktop()}},{key:"_renderMobileView",value:function(){var t=this.searchBox.getElement();this.container.appendChild(t),this.container.classList.add("mobile-view"),this.container.classList.remove("desktop-view"),t&&this.searchBox.setViewForMobile()}},{key:"bringToFront",value:function(){this.container.style.zIndex="10"}},{key:"bringBack",value:function(){this.container.style.zIndex=""}},{key:"_handleSearchBoxSelectBack",value:function(){this.map.initiateBack()}},{key:"_handleSearchBarCancel",value:function(t){this.map.setToDefaultState()}},{key:"_handleSearchBoxSearch",value:function(t){var e=t.query;this.map.setToSearchState(e)}},{key:"_handleSuggestionSelect",value:function(t){var e=t.result;this.map.setToSelectedContentState([e.placement_id])}},{key:"_handleDefaultState",value:function(){this.searchBox.searchBarSuggestionsView.clearResults(),this.searchBox.closeSuggestionsView(),this.searchBox.searchBar.setText(""),this.searchBox.searchBar.updateRightButtonIcon("search"),this.searchBox.searchBar.updateLeftButtonIcon("none"),this.searchBox.searchBar.hideLoading(),this.bringToFront(),this.show()}},{key:"_handleSearchState",value:function(t){var e=t.query;t.results,this.searchBox.searchBar.setText(e),this.searchBox.searchBar.updateRightButtonIcon("cancel"),this.searchBox.searchBar.updateLeftButtonIcon("none"),this.bringToFront(),this.show()}},{key:"_handleSelectedContentState",value:function(t){var e=t.contentPlacementIds,n=t.selectedContentPlacement;this.show(),this.bringToFront();var r=n.catalog.content_title_key,o=n.content.data[r];this.searchBox.searchBar.setText(o),this.searchBox.searchBar.updateRightButtonIcon("cancel"),this.map._stateCoordinator.stateHistory.length>2||e.length>1?this.searchBox.searchBar.updateLeftButtonIcon("back"):this.searchBox.searchBar.updateLeftButtonIcon("none")}},{key:"_handleDirectionsState",value:function(t){this.show(),this.bringBack();var e=this.map._stateCoordinator.stateHistory.length;this.searchBox.searchBar.updateRightButtonIcon("cancel"),e>2?this.searchBox.searchBar.updateLeftButtonIcon("back"):this.searchBox.searchBar.updateLeftButtonIcon("none")}},{key:"_handleSetupState",value:function(){this.hide()}},{key:"_handleSelectionState",value:function(t){this.hide()}},{key:"_handleLoadingStart",value:function(t){this.searchBox.searchBar.showLoading(),this.searchBox.searchBar.updateRightButtonIcon(this.searchBox.searchBar.rightButtonState),this.searchBox.searchBar.updateLeftButtonIcon(this.searchBox.searchBar.leftButtonState)}},{key:"_handleLoadingEnd",value:function(t){this.searchBox.searchBar.hideLoading()}},{key:"_testLoadingState",value:function(){var t=this;this.searchBox.searchBar.showLoading(),setTimeout((function(){t.searchBox.searchBar.hideLoading()}),2e3)}}],r&&io(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}(eo);function po(t){return po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},po(t)}function yo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,go(r.key),r)}}function go(t){var e=function(t){if("object"!=po(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=po(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==po(e)?e:e+""}function mo(t,e,n){return e=Mo(e),function(t,e){if(e&&("object"==po(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,vo()?Reflect.construct(e,n||[],Mo(t).constructor):e.apply(t,n))}function vo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(vo=function(){return!!t})()}function Mo(t){return Mo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Mo(t)}function bo(t,e){return bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bo(t,e)}const wo=function(t){function e(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=mo(this,e,[o])).items=r,n.buttonElements=[],n.allowsToggle=null===(t=o.allowsToggle)||void 0===t||t,n.containerClass=o.container,n.element=document.createElement("div"),n.element.className="slider-bar-container ".concat(n.containerClass),n.sliderBar=document.createElement("div"),n.sliderBar.className="slider-bar ".concat(n.containerClass,"-bar"),n.leftButton=document.createElement("button"),n.leftButton.className="scroll-button left ".concat(n.containerClass,"-scroll-button"),n.leftButton.style.backgroundImage="url(".concat("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTExLjI4OTkgMTEuOTk5N0wxNC44Mjk5IDguNDU5N0MxNS4wMTYyIDguMjcyMzQgMTUuMTIwNyA4LjAxODg5IDE1LjEyMDcgNy43NTQ3QzE1LjEyMDcgNy40OTA1MiAxNS4wMTYyIDcuMjM3MDcgMTQuODI5OSA3LjA0OTdDMTQuNzM3IDYuOTU1OTggMTQuNjI2NCA2Ljg4MTU4IDE0LjUwNDUgNi44MzA4MUMxNC4zODI3IDYuNzgwMDQgMTQuMjUyIDYuNzUzOTEgMTQuMTE5OSA2Ljc1MzkxQzEzLjk4NzkgNi43NTM5MSAxMy44NTcyIDYuNzgwMDQgMTMuNzM1NCA2LjgzMDgxQzEzLjYxMzUgNi44ODE1OCAxMy41MDI5IDYuOTU1OTggMTMuNDA5OSA3LjA0OTdMOS4xNjk5NCAxMS4yODk3QzkuMDc2MjIgMTEuMzgyNyA5LjAwMTgyIDExLjQ5MzMgOC45NTEwNSAxMS42MTUxQzguOTAwMjggMTEuNzM3IDguODc0MTUgMTEuODY3NyA4Ljg3NDE1IDExLjk5OTdDOC44NzQxNSAxMi4xMzE3IDguOTAwMjggMTIuMjYyNCA4Ljk1MTA1IDEyLjM4NDNDOS4wMDE4MiAxMi41MDYxIDkuMDc2MjIgMTIuNjE2NyA5LjE2OTk0IDEyLjcwOTdMMTMuNDA5OSAxNi45OTk3QzEzLjUwMzQgMTcuMDkyNCAxMy42MTQyIDE3LjE2NTcgMTMuNzM2IDE3LjIxNTVDMTMuODU3OSAxNy4yNjUyIDEzLjk4ODMgMTcuMjkwNSAxNC4xMTk5IDE3LjI4OTdDMTQuMjUxNiAxNy4yOTA1IDE0LjM4MiAxNy4yNjUyIDE0LjUwMzggMTcuMjE1NUMxNC42MjU3IDE3LjE2NTcgMTQuNzM2NSAxNy4wOTI0IDE0LjgyOTkgMTYuOTk5N0MxNS4wMTYyIDE2LjgxMjMgMTUuMTIwNyAxNi41NTg5IDE1LjEyMDcgMTYuMjk0N0MxNS4xMjA3IDE2LjAzMDUgMTUuMDE2MiAxNS43NzcxIDE0LjgyOTkgMTUuNTg5N0wxMS4yODk5IDExLjk5OTdaIiBmaWxsPSIjMTcxNzE3Ii8+Cjwvc3ZnPgo=",")"),n.leftButton.addEventListener("click",(function(){return n._scrollSliderBar("left")})),n.rightButton=document.createElement("button"),n.rightButton.className="scroll-button right ".concat(n.containerClass,"-scroll-button"),n.rightButton.style.backgroundImage="url(".concat("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE0LjgyOTkgMTEuMjg5N0wxMC41ODk5IDcuMDQ5N0MxMC40OTcgNi45NTU5OCAxMC4zODY0IDYuODgxNTggMTAuMjY0NSA2LjgzMDgxQzEwLjE0MjcgNi43ODAwNCAxMC4wMTIgNi43NTM5MSA5Ljg3OTk0IDYuNzUzOTFDOS43NDc5MyA2Ljc1Mz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derBar.addEventListener("scroll",(function(){return n._updateScrollButtons()})),setTimeout((function(){return n._updateScrollButtons()}),.8),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bo(t,e)}(e,t),n=e,r=[{key:"updateItems",value:function(t){this.items=t,this.sliderBar.innerHTML="",this.buttonElements=[],this._render(),this._updateScrollButtons()}},{key:"_render",value:function(){var t=this;this.items.forEach((function(e){var n=document.createElement("button");n.addEventListener("click",t._handleSliderButtonSelect.bind(t)),n.className="slider-bar-button ".concat(t.containerClass,"-button");var r=document.createElement("span");r.textContent=e,n.appendChild(r),t.buttonElements.push(n),t.sliderBar.appendChild(n)})),this.element.appendChild(this.leftButton),this.element.appendChild(this.sliderBar),this.element.appendChild(this.rightButton)}},{key:"setViewForDesktop",value:function(){this.buttonElements.forEach((function(t){t&&t.classList.remove("mobile-view")}))}},{key:"setViewForMobile",value:function(){this.buttonElements.forEach((function(t){t&&t.classList.add("mobile-view")}))}},{key:"_handleSliderButtonSelect",value:function(t){var e=t.currentTarget,n=e.querySelector("span").textContent,r=this.buttonElements.indexOf(e);if(e.classList.contains("selected"))this.allowsToggle&&(e.classList.remove("selected"),this.fire("".concat(this.containerClass,":deselect")),this.selectedValue=null);else{var o=document.querySelector(".slider-bar-button.".concat(this.containerClass,"-button.selected"));o&&o.classList.remove("selected"),e.classList.add("selected"),this.selectedValue=n,this.fire("".concat(this.containerClass,":selectNew"),{query:n,index:r})}}},{key:"_scrollSliderBar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:275,n=this.sliderBar.scrollWidth-this.sliderBar.clientWidth,r=this.sliderBar.scrollLeft,o=e;if("right"===t){var i=n-r;i<e&&(o=i)}"left"===t?this.sliderBar.scrollBy({left:-e,behavior:"smooth"}):"right"===t&&this.sliderBar.scrollBy({left:o,behavior:"smooth"})}},{key:"_updateScrollButtons",value:function(){var t=this.sliderBar.scrollLeft,e=this.sliderBar.scrollWidth-this.sliderBar.clientWidth;this.leftButton.style.display=t<=0?"none":"block";var n=Math.abs(e-t);this.rightButton.style.display=n<=1?"none":"block"}},{key:"deselectAll",value:function(){var t=this.sliderBar.querySelectorAll(".slider-bar-button.".concat(this.containerClass,"-button.selected"));t&&t.forEach((function(t){return t.classList.remove("selected")}))}},{key:"deselectAllNotMatchingQuery",value:function(t){var e=this.sliderBar.querySelectorAll(".slider-bar-button.".concat(this.containerClass,"-button.selected"));e&&e.forEach((function(e){e.textContent!==t&&e.classList.remove("selected")}))}},{key:"invertButtonAtIndex",value:function(t){var e=this.buttonElements[t];e?e.classList.toggle("inverted"):console.error("Button at index ".concat(t," does not exist."))}},{key:"selectButtonAtIndex",value:function(t){var e=this.buttonElements[t];if(e)if(e.classList.contains("selected"))console.log("button is already selected");else{this.deselectAll();var n=e.querySelector("span").textContent;e.classList.add("selected"),this.selectedValue=n,this.fire("".concat(this.containerClass,":selectNew"),{query:n,index:t})}}},{key:"getIndexOfSelectedButton",value:function(){return this.buttonElements.findIndex((function(t){return t.classList.contains("selected")}))}},{key:"refresh",value:function(){var t=this;this.element.innerHTML="",this.sliderBar.innerHTML="",this.buttonElements=[],this._render(),setTimeout((function(){t._updateScrollButtons()}),100)}},{key:"getElement",value:function(){return this.element}},{key:"show",value:function(){this.element.classList.add("visible")}},{key:"hide",value:function(){this.element.classList.remove("visible")}}],r&&yo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function jo(t){return jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jo(t)}function No(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Do(r.key),r)}}function Do(t){var e=function(t){if("object"!=jo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=jo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jo(e)?e:e+""}function Io(t,e,n){return e=To(e),function(t,e){if(e&&("object"==jo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Eo()?Reflect.construct(e,n||[],To(t).constructor):e.apply(t,n))}function Eo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Eo=function(){return!!t})()}function So(){return So="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=To(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},So.apply(null,arguments)}function To(t){return To=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},To(t)}function Oo(t,e){return Oo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Oo(t,e)}const xo=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Io(this,e,[n])).categoryBarContainerName="category-bar",t.categoryBar=new wo([],{container:"category-bar"}),t.map=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oo(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){this.map=t,this.container=document.createElement("div"),this.container.className="category-bar-control-container";var e=this.categoryBar.getElement();return this.container.appendChild(e),this.initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.show(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=So(To(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.categoryBar.on("".concat(this.categoryBarContainerName,":selectNew"),this._handleNewCategoryButtonSelect.bind(this)),this.categoryBar.on("".concat(this.categoryBarContainerName,":deselect"),this._handleCategoryButtonDeselect.bind(this)),this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("load",this._handleMapLoad.bind(this))}},{key:"_handleMapLoad",value:function(t){var e=t.mapData.suggested_search_terms;e&&this.categoryBar.updateItems(e)}},{key:"_renderDesktopView",value:function(){var t=this.categoryBar.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view"),this.map.mapContainer.offsetWidth,this.categoryBar.setViewForDesktop()}},{key:"_renderMobileView",value:function(){var t=this.categoryBar.getElement();this.container.appendChild(t),this.map.mapContainer.offsetWidth,this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view"),this.categoryBar.setViewForMobile()}},{key:"_handleDefaultState",value:function(){this.show(),this.categoryBar.refresh(),this.categoryBar.deselectAll()}},{key:"_handleSelectedContentState",value:function(t){this.hide()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleNewCategoryButtonSelect",value:function(t){var e=t.query,n=this.map.getCurrentFloor();this.map.setToSearchState(e,0,30,n)}},{key:"_handleCategoryButtonDeselect",value:function(){this.map.setToDefaultState()}},{key:"_handleSearchState",value:function(t){var e=t.query;t.results,this.show(),this.categoryBar.deselectAllNotMatchingQuery(e)}},{key:"_handleSetupState",value:function(){this.hide()}},{key:"_handleSelectionState",value:function(){this.hide()}}],r&&No(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(eo);function Lo(t){return Lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lo(t)}function Ao(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ko(r.key),r)}}function ko(t){var e=function(t){if("object"!=Lo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Lo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lo(e)?e:e+""}function Co(t,e,n){return e=_o(e),function(t,e){if(e&&("object"==Lo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,zo()?Reflect.construct(e,n||[],_o(t).constructor):e.apply(t,n))}function zo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zo=function(){return!!t})()}function _o(t){return _o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_o(t)}function Po(t,e){return Po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Po(t,e)}const Bo=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=Co(this,e,[r])).result=t,n._initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Po(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="search-results-view-cell",this.render(),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.element.addEventListener("click",(function(){return t.fire("click",{result:t.result})})),this.element.addEventListener("mouseover",(function(){return t.fire("hover",{result:t.result})})),this.element.addEventListener("mouseout",(function(){return t.fire("hoverOut",{result:t.result})}))}},{key:"render",value:function(){var t=this.result.catalog.content_title_key;this.element.innerHTML='\n <div class="result-title">'.concat(this.result.content.data[t],'</div>\n <div class="result-subtitle">').concat(this.result.catalog.title," · ").concat(this.result.contextual_location,"</div>\n ")}},{key:"getElement",value:function(){return this.element}}])&&Ao(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Uo(t){return Uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uo(t)}function Qo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ro(r.key),r)}}function Ro(t){var e=function(t){if("object"!=Uo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Uo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Uo(e)?e:e+""}function Yo(t,e,n){return e=Vo(e),function(t,e){if(e&&("object"==Uo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Fo()?Reflect.construct(e,n||[],Vo(t).constructor):e.apply(t,n))}function Fo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Fo=function(){return!!t})()}function Vo(t){return Vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vo(t)}function Ho(t,e){return Ho=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ho(t,e)}const Go=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Yo(this,e,[n]))._initialize(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ho(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="loading-cell",this.render()}},{key:"render",value:function(){this.element.innerHTML='\n <div class="loading-spinner"></div>\n '}},{key:"getElement",value:function(){return this.element}}])&&Qo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Zo(t){return Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zo(t)}function Wo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function qo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Jo(r.key),r)}}function Jo(t){var e=function(t){if("object"!=Zo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Zo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Zo(e)?e:e+""}function Ko(t,e,n){return e=Xo(e),function(t,e){if(e&&("object"==Zo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$o()?Reflect.construct(e,n||[],Xo(t).constructor):e.apply(t,n))}function $o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($o=function(){return!!t})()}function Xo(t){return Xo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xo(t)}function ti(t,e){return ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ti(t,e)}const ei=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Ko(this,e,[n]))._initialize(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ti(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.results=[],this.loading=!1,this.element=document.createElement("div"),this.element.className="search-results-view",this.titleElement=document.createElement("h3"),this.titleElement.className="search-results-title",this.element.appendChild(this.titleElement)}},{key:"showLoadingCell",value:function(){if(!this.loading){var t=new Go;this.loading=!0,this.element.appendChild(t.getElement())}}},{key:"hideLoadingCell",value:function(){var t=this.element.querySelector(".loading-cell");t&&this.element.removeChild(t),this.loading=!1}},{key:"updateView",value:function(t,e){this.results=t,t.length>0&&this.setTitle("Results for '".concat(e,"'")),0===t.length&&this.setTitle("No matching results for '".concat(e,"'")),this.scrollToTop(),this.render()}},{key:"scrollToTop",value:function(){this.element.scrollTop=0}},{key:"updateResults",value:function(t){this.results=t,this.render()}},{key:"extendResults",value:function(t){var e;(e=this.results).push.apply(e,function(t){return function(t){if(Array.isArray(t))return Wo(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Wo(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wo(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)),this.render()}},{key:"render",value:function(){for(var t=this;this.element.children.length>1;)this.element.removeChild(this.element.lastChild);this.results.forEach((function(e){var n=new Bo(e);n.on("click",(function(){return t.fire("selectCell",{result:e})})),n.on("hover",(function(){return t.fire("hoverCell",{result:e})})),n.on("hoverOut",(function(){return t.fire("hoverOutCell",{result:e})})),t.element.appendChild(n.getElement())}))}},{key:"setTitle",value:function(t){this.titleElement.innerText=t}},{key:"show",value:function(){this.element.classList.add("visible")}},{key:"hide",value:function(){this.element.classList.remove("visible")}},{key:"getElement",value:function(){return this.element}}])&&qo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function ni(t){return ni="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ni(t)}function ri(){ri=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==ni(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(ni(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function oi(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function ii(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){oi(i,r,o,a,c,"next",t)}function c(t){oi(i,r,o,a,c,"throw",t)}a(void 0)}))}}function ai(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ci(r.key),r)}}function ci(t){var e=function(t){if("object"!=ni(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ni(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ni(e)?e:e+""}function si(t,e,n){return e=hi(e),function(t,e){if(e&&("object"==ni(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ui()?Reflect.construct(e,n||[],hi(t).constructor):e.apply(t,n))}function ui(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ui=function(){return!!t})()}function li(){return li="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=hi(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},li.apply(null,arguments)}function hi(t){return hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hi(t)}function fi(t,e){return fi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fi(t,e)}const pi=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=si(this,e,[n])).searchResultsView=new ei,t.searchApi=nn.getSearchApi(),t.searchedQuery=null,t.map=null,t.lastSearchLength=0,t.skip=0,t.limit=30,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fi(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){this.map=t,this.container=document.createElement("div"),this.container.className="search-results-control-container";var e=this.searchResultsView.getElement();return this.container.appendChild(e),this.hide(),this._initializeEventListeners(),this._attachResizeListener(),this._attachScrollListener(),this._initialize(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=li(hi(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"_initializeEventListeners",value:function(){this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("initiate:search",this._handleInitiateSearchState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.searchResultsView.on("closeView",this._handleCloseSearchResultsView.bind(this)),this.searchResultsView.on("selectCell",this._handleSearchResultSelect.bind(this)),this.searchResultsView.on("hoverCell",this._handleCellHover.bind(this)),this.searchResultsView.on("hoverOutCell",this._handleCellHoverOut.bind(this))}},{key:"_handleCellHover",value:function(t){var e=t.result;this.map.fire("hoverSearchResult",{result:e})}},{key:"_handleCellHoverOut",value:function(t){var e=t.result;this.map.fire("hoverEndSearchResult",{result:e})}},{key:"_attachScrollListener",value:function(){this.searchResultsView.getElement().addEventListener("scroll",this._handleScroll.bind(this))}},{key:"_renderDesktopView",value:function(){var t=this.searchResultsView.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view")}},{key:"_renderMobileView",value:function(){var t=this.searchResultsView.getElement();this.container.appendChild(t),this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view")}},{key:"_handleScroll",value:(i=ii(ri().mark((function t(){var e,n,r,o,i;return ri().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.searchResultsView.getElement(),n=e.scrollTop,r=e.scrollHeight,o=e.clientHeight,!(r-n-o+0<10)||this.searchResultsView.loading||this.lastSearchLength!==this.limit){t.next=14;break}return this.searchResultsView.showLoadingCell(),t.next=8,this._getAdditionalSearchResults();case 8:i=t.sent,this.lastSearchLength=i.length,this.searchResultsView.extendResults(i),this.skip+=this.limit,this.map.fire("additionalSearchResults",{results:i}),this.searchResultsView.hideLoadingCell();case 14:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"_getAdditionalSearchResults",value:(o=ii(ri().mark((function t(){var e,n,r;return ri().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.searchedQuery,n=this.map.getCurrentFloor(),""!==e){t.next=5;break}return this.searchBox.searchBarSuggestionsView.updateResults([]),t.abrupt("return");case 5:if(this.map.mapData){t.next=7;break}return t.abrupt("return");case 7:return t.prev=7,t.next=10,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,e,this.skip,this.limit,n);case 10:return r=t.sent,t.abrupt("return",r);case 14:t.prev=14,t.t0=t.catch(7),axios.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 17:case"end":return t.stop()}}),t,this,[[7,14]])}))),function(){return o.apply(this,arguments)})},{key:"_handleInitiateSearchState",value:function(){this.map.setToSearchState(this.searchedQuery)}},{key:"_handleSearchResultSelect",value:function(t){var e=t.result.placement_id;this.map.setToSelectedContentState([e])}},{key:"_handleCloseSearchResultsView",value:function(){this.map.setToDefaultState()}},{key:"_handleDefaultState",value:function(){this.searchedQuery=null,this.searchResultsView.updateResults([]),this.searchResultsView.scrollToTop(),this.hide()}},{key:"_handleSearchState",value:function(t){var e=t.query,n=t.results;this.searchedQuery=e,this.lastSearchLength=n.length,this.skip=this.limit,this.searchResultsView.updateResults([]);var r=this.map.mapData.floors;r.length>1&&this.searchResultsView.updateView(n,e,r),this.searchResultsView.updateView(n,e),this.show()}},{key:"_handleSelectedContentState",value:function(t){this.searchResultsView.updateResults([]),this.hide()}},{key:"_handleDirectionsState",value:function(t){}},{key:"_handleSetupState",value:function(){this.hide()}}],r&&ai(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}(eo);function di(t){return di="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},di(t)}function yi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,gi(r.key),r)}}function gi(t){var e=function(t){if("object"!=di(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=di(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==di(e)?e:e+""}function mi(t,e,n){return e=Mi(e),function(t,e){if(e&&("object"==di(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,vi()?Reflect.construct(e,n||[],Mi(t).constructor):e.apply(t,n))}function vi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(vi=function(){return!!t})()}function Mi(t){return Mi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Mi(t)}function bi(t,e){return bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bi(t,e)}const wi=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=mi(this,e,[r])).contentPlacement=t,n._initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bi(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){var t=this.contentPlacement.content;this.element=document.createElement("div"),this.element.className="content-placement-header",this.textContainer=document.createElement("div"),this.textContainer.className="header-text-container",this.textContainer.style.paddingLeft="10px",this.nameElement=document.createElement("div"),this.nameElement.className="header-content-name";var e=this.contentPlacement.catalog.content_title_key,n=t.data[e];this.nameElement.textContent=n,this.catalogNameElement=document.createElement("div"),this.catalogNameElement.className="header-catalog-name",this.catalogNameElement.textContent=this.contentPlacement.catalog.title,this.textContainer.appendChild(this.nameElement),this.textContainer.appendChild(this.catalogNameElement);var r=this.contentPlacement.catalog.content_display_img_key,o=t.data[r];if(o){this.imageViewElement=document.createElement("div"),this.imageViewElement.className="header-image-view";var i=document.createElement("img");i.className="header-image",i.src=o,i.style.width="100%",i.style.height="100%",i.style.objectFit="contain",i.style.background="white",this.imageViewElement.appendChild(i),this.element.appendChild(this.imageViewElement)}this.element.appendChild(this.textContainer)}},{key:"getElement",value:function(){return this.element}}])&&yi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function ji(t){return ji="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ji(t)}function Ni(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Di(r.key),r)}}function Di(t){var e=function(t){if("object"!=ji(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ji(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ji(e)?e:e+""}function Ii(t,e,n){return e=Si(e),function(t,e){if(e&&("object"==ji(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ei()?Reflect.construct(e,n||[],Si(t).constructor):e.apply(t,n))}function Ei(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ei=function(){return!!t})()}function Si(t){return Si=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Si(t)}function Ti(t,e){return Ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ti(t,e)}const Oi=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=Ii(this,e,[i])).icon=t,r.text=n,r.link=o,r._initialize(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ti(t,e)}(e,t),n=e,(r=[{key:"_formatUrl",value:function(t){return t?(t=t.trim(),/^https?:\/\//i.test(t)||(t="https://"+t),t):t}},{key:"_initialize",value:function(){this.link?(this.element=document.createElement("a"),this.element.href=this._formatUrl(this.link),this.element.target="_blank",this.element.rel="noopener noreferrer",this.element.style.textDecoration="none"):this.element=document.createElement("div"),this.element.className="contextual-location-view",this.imageViewElement=document.createElement("img"),this.imageViewElement.className="contextual-location-image",this.imageViewElement.src=this.icon,this.textElement=document.createElement("span"),this.textElement.textContent=this.text,this.textElement.className="contextual-location-text",this.element.appendChild(this.imageViewElement),this.element.appendChild(this.textElement)}},{key:"getElement",value:function(){return this.element}}])&&Ni(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function xi(t){return xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xi(t)}function Li(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ai(r.key),r)}}function Ai(t){var e=function(t){if("object"!=xi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xi(e)?e:e+""}function ki(t,e,n){return e=zi(e),function(t,e){if(e&&("object"==xi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ci()?Reflect.construct(e,n||[],zi(t).constructor):e.apply(t,n))}function Ci(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ci=function(){return!!t})()}function zi(t){return zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zi(t)}function _i(t,e){return _i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_i(t,e)}const Pi=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=ki(this,e,[r])).data=t,n.showTitle=!1!==r.showTitle,n._initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_i(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="content-placement-details-view",this.showTitle&&(this.titleView=document.createElement("div"),this.titleView.className="content-details-section-title",this.titleView.textContent="Additional details",this.element.appendChild(this.titleView));var e=Object.keys(this.data);e.forEach((function(n,r){var o=t.data[n],i=document.createElement("div");i.className="details-view-item";var a=document.createElement("div");a.className="details-view-key",a.textContent=n;var c=document.createElement("span");if(c.className="details-view-value",c.textContent=o,i.appendChild(a),i.appendChild(c),r<e.length-1){var s=document.createElement("hr");s.className="details-view-line",i.append(s)}t.element.appendChild(i)}))}},{key:"getElement",value:function(){return this.element}}])&&Li(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Bi(t){return Bi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bi(t)}function Ui(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Qi(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qi(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ri(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Yi(r.key),r)}}function Yi(t){var e=function(t){if("object"!=Bi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Bi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bi(e)?e:e+""}function Fi(t,e,n){return e=Hi(e),function(t,e){if(e&&("object"==Bi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vi()?Reflect.construct(e,n||[],Hi(t).constructor):e.apply(t,n))}function Vi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vi=function(){return!!t})()}function Hi(t){return Hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hi(t)}function Gi(t,e){return Gi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gi(t,e)}const Zi=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=Fi(this,e,[r])).childPlacement=t,n.maxValueLength=50,n.maxEntriesToShow=3,n._initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gi(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("button"),this.element.className="content-details-child-view",this.titleElement=document.createElement("div"),this.titleElement.className="content-details-child-view-title";var t=this.childPlacement.catalog.content_title_key,e=this.childPlacement.content.data[t];this.titleElement.textContent="".concat(e),this._render()}},{key:"_truncateText",value:function(t,e){return t.length>e?t.slice(0,e-3)+"...":t}},{key:"findViableDataEntriesInSchemaOrder",value:function(t){for(var e=t.content.data||{},n=t.catalog.data_schema||{},r=t.catalog.content_title_key,o=t.excluded_child_fields||[],i=[],a=0,c=Object.entries(n);a<c.length;a++){var s=Ui(c[a],2),u=s[0],l=s[1];if("image"!==l&&"url"!==l&&u!==r&&!o.includes(u)){var h=e[u];if(null!=h&&""!==h){var f=void 0;if("string"==typeof h){if(""===(f=h.trim()))continue}else f=h;i.push([u,f])}}}return i}},{key:"_render",value:function(){var t=this;this.element.appendChild(this.titleElement);var e=this.findViableDataEntriesInSchemaOrder(this.childPlacement),n=e.slice(0,this.maxEntriesToShow),r=e.length>this.maxEntriesToShow;if(0===e.length&&(this.titleElement.style.marginBottom="0px"),n.forEach((function(e){var n=Ui(e,2),r=n[0],o=n[1],i=document.createElement("div");i.className="content-details-child-view-data-row";var a=document.createElement("div");a.className="content-details-child-view-data-key",a.textContent=r.toUpperCase();var c=document.createElement("div");c.className="content-details-child-view-data-value",c.textContent=t._truncateText(String(o),t.maxValueLength),i.appendChild(a),i.appendChild(c),t.element.appendChild(i)})),r){var o=document.createElement("div");o.className="content-details-child-view-more-hint",o.setAttribute("aria-hidden","true"),o.textContent="…",this.element.appendChild(o)}}},{key:"getElement",value:function(){return this.element}}])&&Ri(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Wi(t){return Wi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wi(t)}function qi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ji(r.key),r)}}function Ji(t){var e=function(t){if("object"!=Wi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Wi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Wi(e)?e:e+""}function Ki(t,e,n){return e=Xi(e),function(t,e){if(e&&("object"==Wi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$i()?Reflect.construct(e,n||[],Xi(t).constructor):e.apply(t,n))}function $i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($i=function(){return!!t})()}function Xi(t){return Xi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xi(t)}function ta(t,e){return ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ta(t,e)}const ea=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=Ki(this,e,[o])).title=t,r.children=n,r._initialize(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ta(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="content-children-view",this.titleView=document.createElement("div"),this.titleView.className="content-details-section-title",this.titleView.textContent=this.title,this.element.appendChild(this.titleView),this.childrenElements=[],this.childrenListView=document.createElement("div"),this.childrenListView.className="content-details-children-list-view",this.children.forEach((function(e){var n=new Zi(e);t.childrenListView.appendChild(n.getElement()),t.childrenElements.push(n)})),this.element.appendChild(this.childrenListView),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.childrenElements.forEach((function(e){e.getElement().addEventListener("click",(function(n){return t._handleChildSelect(n,e)}))}))}},{key:"_handleChildSelect",value:function(t,e){this.fire("selectChildContentPlacement",{placementId:e.childPlacement.placement_id})}},{key:"getElement",value:function(){return this.element}}],r&&qi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn),na="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIxLjQxIDguNjQwMTNDMjEuNDEgOC42NDAxMyAyMS40MSA4LjY0MDEzIDIxLjQxIDguNTkwMTNDMjAuNzA1MyA2LjY2NjM1IDE5LjQyNjkgNS4wMDU0MSAxNy43NDc0IDMuODMxOTlDMTYuMDY4IDIuNjU4NTcgMTQuMDY4NyAyLjAyOTMgMTIuMDIgMi4wMjkzQzkuOTcxMiAyLjAyOTMgNy45NzE4OSAyLjY1ODU3IDYuMjkyNDYgMy44MzE5OUM0LjYxMzA0IDUuMDA1NDEgMy4zMzQ1NSA2LjY2NjM1IDIuNjI5OTUgOC41OTAxM0MyLjYyOTk1IDguNTkwMTMgMi42Mjk5NSA4LjU5MDEzIDIuNjI5OTUgOC42NDAxM0MxLjg0MzA4IDEwLjgxMSAxLjg0MzA4IDEzLjE4OTIgMi42Mjk5NSAxNS4zNjAxQzIuNjI5OTUgMTUuMzYwMSAyLjYyOTk1IDE1LjM2MDEgMi42Mjk5NSAxNS40MTAxQzMuMzM0NTUgMTcuMzMzOSA0LjYxMzA0IDE4Ljk5NDggNi4yOTI0NiA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S43NzE3MiA1LjIwMTQ0IDExIDQuMzAwMTNWOC4wMDAxM1pNMTguOTIgOC4wMDAxM0gxNy41MkMxNy4yODUyIDcuMTA4MjggMTYuOTQ5NyA2LjI0NjA2IDE2LjUyIDUuNDMwMTNDMTcuNTAwNyA2LjA5ODIgMTguMzIwNSA2Ljk3NjA3IDE4LjkyIDguMDAwMTNaTTEzIDQuMzAwMTNDMTQuMjI4MiA1LjIwMTQ0IDE1LjA5MDggNi41MTQ4OSAxNS40MyA4LjAwMDEzSDEzVjQuMzAwMTNaTTEzIDE5LjcwMDFWMTYuMDAwMUgxNS40M0MxNS4wOTA4IDE3LjQ4NTQgMTQuMjI4MiAxOC43OTg4IDEzIDE5LjcwMDFaTTE1Ljg2IDE0LjAwMDFIMTNWMTAuMDAwMUgxNS44NkMxNi4wNDY2IDExLjMyNjkgMTYuMDQ2NiAxMi42NzMzIDE1Ljg2IDE0LjAwMDFaTTE2LjU1IDE4LjU3MDFDMTYuOTc5NyAxNy43NTQyIDE3LjMxNTIgMTYuODkyIDE3LjU1IDE2LjAwMDFIMTguOTVDMTguMzUwNSAxNy4wMjQyIDE3LjUzMDcgMTcuOTAyMSAxNi41NSAxOC41NzAxWk0xOS43NCAxNC4wMDAxSDE3Ljg4QzE3Ljk2MTMgMTMuMzM2NiAxOC4wMDE0IDEyLjY2ODYgMTggMTIuMDAwMUMxOC4wMDExIDExLjMzMTYgMTcuOTYxIDEwLjY2MzcgMTcuODggMTAuMDAwMUgxOS43NEMyMC4wODY3IDExLjMxMDkgMjAuMDg2NyAxMi42ODkzIDE5Ljc0IDE0LjAwMDFaIiBmaWxsPSIjMTcxNzE3Ii8+Cjwvc3ZnPgo=";function ra(t){return ra="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ra(t)}function oa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ia(r.key),r)}}function ia(t){var e=function(t){if("object"!=ra(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ra(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ra(e)?e:e+""}function aa(t,e,n){return e=sa(e),function(t,e){if(e&&("object"==ra(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ca()?Reflect.construct(e,n||[],sa(t).constructor):e.apply(t,n))}function ca(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ca=function(){return!!t})()}function sa(t){return sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sa(t)}function ua(t,e){return ua=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ua(t,e)}function la(t){if("string"!=typeof t)return null;var e=t.trim();return""===e?null:/^https?:\/\//i.test(e)?e:"https://".concat(e)}function ha(t){var e=la(t);if(!e)return!1;try{var n=new URL(e);if("http:"!==n.protocol&&"https:"!==n.protocol)return!1;var r=n.hostname;return!(!r||!r.includes(".")&&"localhost"!==r)}catch(t){return!1}}const fa=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=aa(this,e,[n]))._kioskTimer=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ua(t,e)}(e,t),n=e,r=[{key:"show",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.isKioskMode,i=void 0!==o&&o,a=r.onConfirm,c=void 0===a?null:a,s=r.onCancel,u=void 0===s?null:s,l=la(e);if(l)if(i)this._showKioskTransient(t);else{var h=document.createElement("div");h.className="url-confirmation-popup-card";var f=document.createElement("div");f.className="url-confirmation-popup-title",f.textContent="Open external link?",h.appendChild(f);var p=document.createElement("div");p.className="url-confirmation-popup-body",p.textContent="This will open in your browser:",h.appendChild(p);var d=document.createElement("div");d.className="url-confirmation-popup-url",d.textContent=l,h.appendChild(d);var y=document.createElement("div");y.className="url-confirmation-popup-actions";var g=document.createElement("button");g.className="url-confirmation-popup-cancel",g.textContent="Cancel",g.addEventListener("click",(function(){n._dismiss(t),"function"==typeof u&&u()})),y.appendChild(g);var m=document.createElement("button");m.className="url-confirmation-popup-confirm",m.textContent="Open Link",m.addEventListener("click",(function(){n._dismiss(t),window.open(l,"_blank","noopener,noreferrer"),"function"==typeof c&&c()})),y.appendChild(m),h.appendChild(y),this._presentCard(t,h)}else console.warn("⚠️ UrlConfirmationPopup: invalid URL",e)}},{key:"_showKioskTransient",value:function(t){var e=this,n=document.createElement("div");n.className="url-confirmation-popup-card url-confirmation-popup-card--kiosk";var r=document.createElement("div");r.className="url-confirmation-popup-title",r.textContent="Links are disabled",n.appendChild(r);var o=document.createElement("div");o.className="url-confirmation-popup-body",o.textContent="External links can't be opened on this kiosk.",n.appendChild(o),this._presentCard(t,n),this._kioskTimer&&clearTimeout(this._kioskTimer),this._kioskTimer=setTimeout((function(){e._kioskTimer=null,e._dismiss(t)}),2500)}},{key:"_presentCard",value:function(t,e){if(t.showModal(e),t.modalContainer){this._previousContainerBg=t.modalContainer.style.backgroundColor,t.modalContainer.style.backgroundColor="rgba(0, 0, 0, 0.35)";var n=t.modalContainer.querySelector(".waygo-map-modal-content");n&&(n.style.backgroundColor="transparent",n.style.width="auto",n.style.height="auto",n.style.maxWidth="none",n.style.maxHeight="none",n.style.boxShadow="none",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center")}}},{key:"_dismiss",value:function(t){this._kioskTimer&&(clearTimeout(this._kioskTimer),this._kioskTimer=null),this._resetModalStyles(t),t.hideModal()}},{key:"_resetModalStyles",value:function(t){t.modalContainer&&void 0!==this._previousContainerBg&&(t.modalContainer.style.backgroundColor=this._previousContainerBg,this._previousContainerBg=void 0)}}],r&&oa(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function pa(t){return pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pa(t)}function da(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ya(t,e,n){return(e=Ma(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ga(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ma(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ma(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ma(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function va(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ma(r.key),r)}}function Ma(t){var e=function(t){if("object"!=pa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=pa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pa(e)?e:e+""}function ba(t,e,n){return e=ja(e),function(t,e){if(e&&("object"==pa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,wa()?Reflect.construct(e,n||[],ja(t).constructor):e.apply(t,n))}function wa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wa=function(){return!!t})()}function ja(t){return ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ja(t)}function Na(t,e){return Na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Na(t,e)}const Da=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=ba(this,e,[n])).contentPlacement=null,t.isSelectionMode=!1,t.isKioskMode=n.isKioskMode||!1,t.mapId=n.mapId||null,t.element=document.createElement("div"),t.element.className="content-details",t.header=document.createElement("div"),t.header.className="content-details-header",t.contentPlacementHeader=null,t.actionsView=document.createElement("div"),t.actionsView.className="content-details-section",t.actionButtons=document.createElement("div"),t.actionButtons.className="content-details-action-buttons",t.ctaButton=document.createElement("button"),t.ctaButton.className="content-details-primary-button content-details-cta-button",t.ctaButtonUrl=null,t.directionsButton=document.createElement("button"),t.directionsButton.className="content-details-primary-button",t.directionsButton.textContent="Directions",t.confirmButton=document.createElement("button"),t.confirmButton.className="content-details-primary-button",t.confirmButton.textContent="Confirm Selection",t.shareButton=document.createElement("button"),t.shareButton.className="content-details-share-button",t.shareButton.textContent="Share";var r=document.createElement("img");return r.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1IDcuM1Y3LjNDMTUgNi4wODU0IDE1IDUuNDc4MTEgMTQuNzQ1IDUuMDIyNzZDMTQuNTY0OCA0LjcwMDk0IDE0LjI5OTEgNC40MzUyMyAxMy45NzcyIDQuMjU1MDFDMTMuNTIxOSA0IDEyLjkxNDYgNCAxMS43IDRIOEM2LjExNDM4IDQgNS4xNzE1NyA0IDQuNTg1NzkgNC41ODU3OUM0IDUuMTcxNTcgNCA2LjExNDM4IDQgOFYxMS43QzQgMTIuOTE0NiA0IDEzLjUyMTkgNC4yNTUwMSAxMy45NzcyQzQuNDM1MjMgMTQuMjk5MSA0LjcwMDk0IDE0LjU2NDggNS4wMjI3NiAxNC43NDVDNS40NzgxMSAxNSA2LjA4NTQgMTUgNy4zIDE1VjE1IiBzdHJva2U9IiMxQjFCMUIiIHN0cm9rZS13aWR0aD0iMS41Ii8+CjxyZWN0IHg9IjkiIHk9IjkiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxMSIgcng9IjIiIHN0cm9rZT0iIzFCMUIxQiIgc3Ryb2tlLXdpZHRoPSIxLjUiLz4KPC9zdmc+Cg==",r.className="copy-icon",t.shareButton.appendChild(r),t.locationButton=null,t.websiteButtons=[],t.detailsView=null,t.childrenComponents=[],t.imageContainer=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Na(t,e)}(e,t),n=e,r=[{key:"_setupEventListeners",value:function(){var t=this;this.childrenComponents.forEach((function(e){e.on("selectChildContentPlacement",t._handleSelectChildContentPlacement.bind(t))})),this.directionsButton.addEventListener("click",this._handleDirectionsButtonSelect.bind(this)),this.confirmButton.addEventListener("click",this._handleConfirmButtonSelect.bind(this)),this.shareButton.addEventListener("click",this._handleShareButtonSelect.bind(this)),this.ctaButton.addEventListener("click",this._handleCtaButtonSelect.bind(this))}},{key:"_render",value:function(){var t=this;this.element.innerHTML="",this.header.innerHTML="",this.actionsView.innerHTML="",this.contentPlacementHeader&&this.header.appendChild(this.contentPlacementHeader.getElement()),this.actionButtons.replaceChildren(),this.ctaButtonUrl&&this.actionButtons.appendChild(this.ctaButton),this.isSelectionMode?this.actionButtons.appendChild(this.confirmButton):An.includes(this.mapId)||this.actionButtons.appendChild(this.directionsButton),this.isKioskMode||lr.includes(this.mapId)||this.actionButtons.appendChild(this.shareButton),this.actionButtons.childElementCount>0&&this.header.appendChild(this.actionButtons),this.locationButton&&this.actionsView.appendChild(this.locationButton.getElement()),this.websiteButtons.forEach((function(e){t.actionsView.appendChild(e.getElement())})),this.imageContainer&&this.actionsView.appendChild(this.imageContainer),this.header.appendChild(this.actionsView),this.element.appendChild(this.header),this.detailsView&&(this.detailsView.innerHTML="",this.element.appendChild(this.detailsView.getElement())),this.childrenComponents.forEach((function(e){t.element.appendChild(e.getElement())}))}},{key:"_handleShareButtonSelect",value:function(){this.fire("selectShareButton",{placementId:this.contentPlacement.placement_id})}},{key:"showCopyPopup",value:function(){var t=document.createElement("div");t.className="copy-popup",t.textContent="Copied to clipboard";var e=this.shareButton.getBoundingClientRect();t.style.position="absolute",t.style.left="".concat(e.left+e.width/2-60,"px"),t.style.top="".concat(e.bottom+window.scrollY,"px"),t.style.zIndex="9999",document.body.appendChild(t),setTimeout((function(){t.style.opacity="0",t.style.transition="opacity 0.5s",setTimeout((function(){t.remove()}),500)}),1500)}},{key:"_handleDirectionsButtonSelect",value:function(){this.fire("selectDirectionsButton",{placementId:this.contentPlacement.placement_id})}},{key:"_handleConfirmButtonSelect",value:function(){this.fire("selectConfirmButton",{placementId:this.contentPlacement.placement_id})}},{key:"_handleCtaButtonSelect",value:function(){this.ctaButtonUrl&&this.fire("selectUrlButton",{url:this.ctaButtonUrl,source:"cta"})}},{key:"_handleBackArrowClick",value:function(){this.fire("selectBackButton")}},{key:"_handleSelectChildContentPlacement",value:function(t){var e=t.placementId;this.fire("selectChildContentPlacement",{placementId:e})}},{key:"findViableAdditionalData",value:function(t){for(var e=t.catalog.data_schema,n=t.catalog.content_title_key,r=t.excluded_child_fields||[],o={},i=0,a=Object.entries(e);i<a.length;i++){var c=ga(a[i],2),s=c[0],u=c[1];if("image"!==u&&"url"!==u&&s!==n&&!r.includes(s)){var l=t.content.data[s];if(l&&""!==l.trim()){var h=l.trim();o[s]=h}}}return o}},{key:"updateView",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.contentPlacement=t,this.isSelectionMode=n,this.isKioskMode=r,this.mapId=o,console.log("TEST:",t),this.contentPlacementHeader=new wi(t);var i=t.catalog.data_schema;this.locationButton=new Oi("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDJDOS44NzgyNyAyIDcuODQzNDQgMi44NDI4NSA2LjM0MzE1IDQuMzQzMTVDNC44NDI4NSA1Ljg0MzQ0IDQgNy44NzgyNyA0IDEwQzQgMTUuNCAxMS4wNSAyMS41IDExLjM1IDIxLjc2Qz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y4xNzE1N0MxNC4wNzgzIDYuNDIxNDMgMTMuMDYwOSA2IDEyIDZaTTEyIDEyQzExLjYwNDQgMTIgMTEuMjE3OCAxMS44ODI3IDEwLjg4ODkgMTEuNjYyOUMxMC41NiAxMS40NDMyIDEwLjMwMzYgMTEuMTMwOCAxMC4xNTIyIDEwLjc2NTRDMTAuMDAwOSAxMC4zOTk5IDkuOTYxMjYgOS45OTc3OCAxMC4wMzg0IDkuNjA5ODJDMTAuMTE1NiA5LjIyMTg2IDEwLjMwNjEgOC44NjU0OSAxMC41ODU4IDguNTg1NzlDMTAuODY1NSA4LjMwNjA4IDExLjIyMTkgOC4xMTU2IDExLjYwOTggOC4wMzg0M0MxMS45OTc4IDcuOTYxMjYgMTIuMzk5OSA4LjAwMDg3IDEyLjc2NTQgOC4xNTIyNEMxMy4xMzA4IDguMzAzNjIgMTMuNDQzMiA4LjU1OTk2IDEzLjY2MjkgOC44ODg4NkMxMy44ODI3IDkuMjE3NzYgMTQgOS42MDQ0NCAxNCAxMEMxNCAxMC41MzA0IDEzLjc4OTMgMTEuMDM5MSAxMy40MTQyIDExLjQxNDJDMTMuMDM5MSAxMS43ODkzIDEyLjUzMDQgMTIgMTIgMTJaIiBmaWxsPSIjMTcxNzE3Ii8+Cjwvc3ZnPgo=",t.contextual_location),this.websiteButtons=[];for(var a=function(){var n=ga(s[c],2),r=n[0];if("url"===n[1]){var o=t.content.data[r];if(ha(o)){var i=new Oi(na,o,o);i.getElement().addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),e.fire("selectUrlButton",{url:o,source:"website"})})),e.websiteButtons.push(i)}}},c=0,s=Object.entries(i);c<s.length;c++)a();this.ctaButtonUrl=null;var u=this.mapId?sr[this.mapId]:null;if(u){var l,h=null===(l=t.content.data)||void 0===l?void 0:l[u.key];ha(h)&&(this.ctaButtonUrl=la(h),this.ctaButton.textContent=u.text)}for(var f=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?da(Object(n),!0).forEach((function(e){ya(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):da(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t.content.data),p=[],d=t.catalog.content_display_img_key,y=0,g=Object.entries(i);y<g.length;y++){var m=ga(g[y],2),v=m[0];if("image"===m[1]&&v!==d){var M=t.content.data[v];M&&p.push(M),delete f[v]}}var b=this.findViableAdditionalData(t),w=Object.keys(b);this.detailsView=w.length>0?new Pi(b):null,this.childrenComponents=[];for(var j=0,N=Object.entries(t.children);j<N.length;j++){var D=ga(N[j],2),I=D[0],E=D[1],S=new ea(I,E);this.childrenComponents.push(S)}if(p.length>0){this.imageContainer=document.createElement("div"),this.imageContainer.className="content-details-image-container";var T=document.createElement("img");T.src=p[0],T.className="content-details-preview-image";var O=document.createElement("div");O.className="image-hover-popup",O.textContent="See photos",this.imageContainer.appendChild(T),this.imageContainer.appendChild(O),this.imageContainer.addEventListener("click",(function(){e.fire("selectPhotos",{placementId:e.contentPlacement.placement_id,images:p})}))}else this.imageContainer=null;this._setupEventListeners(),this._render()}},{key:"getElement",value:function(){return this.element}}],r&&va(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Ia(t){return Ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ia(t)}function Ea(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Sa(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sa(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sa(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ta(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Oa(r.key),r)}}function Oa(t){var e=function(t){if("object"!=Ia(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ia(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ia(e)?e:e+""}function xa(t,e,n){return e=Aa(e),function(t,e){if(e&&("object"==Ia(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,La()?Reflect.construct(e,n||[],Aa(t).constructor):e.apply(t,n))}function La(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(La=function(){return!!t})()}function Aa(t){return Aa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Aa(t)}function ka(t,e){return ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ka(t,e)}const Ca=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=xa(this,e,[r])).contentPlacement=t,n.isOptimistic=t.isOptimistic||!1,n._initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ka(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="selection-content-item",this._render()}},{key:"_render",value:function(){var t=this;this.element.innerHTML="";var e=document.createElement("div");e.className="selection-item-selected-indicator";var n=document.createElement("canvas"),r=window.devicePixelRatio||1;n.width=24*r,n.height=24*r,n.style.width="24px",n.style.height="24px";var o=n.getContext("2d");o.scale(r,r),o.fillStyle="white",o.beginPath(),o.arc(12,12,10,0,2*Math.PI),o.fill(),o.strokeStyle="#00C853",o.lineWidth=2,o.stroke(),o.strokeStyle="#00C853",o.lineWidth=2,o.lineCap="round",o.lineJoin="round",o.beginPath(),o.moveTo(7,12),o.lineTo(10,15),o.lineTo(17,8),o.stroke(),e.appendChild(n),this.element.appendChild(e);var i=document.createElement("div");i.className="selection-item-content",this.isOptimistic?this._renderOptimisticContent(i):this._renderFullContent(i),this.element.appendChild(i);var a=document.createElement("div");a.className="selection-item-delete-button";var c=document.createElement("img");c.src=yr,c.alt="Remove selection",c.className="selection-item-delete-icon",a.appendChild(c),a.addEventListener("click",(function(e){e.stopPropagation(),t._handleDeselect()})),i.appendChild(a)}},{key:"_renderOptimisticContent",value:function(t){var e,n,r=document.createElement("div");r.className="content-placement-header";var o=document.createElement("div");o.className="header-text-container",o.style.paddingLeft="10px",o.style.display="flex",o.style.flexDirection="column",o.style.alignItems="flex-start",o.style.justifyContent="center";var i=document.createElement("div");i.className="header-content-name";var a=(null===(e=this.contentPlacement.catalog)||void 0===e?void 0:e.content_title_key)||"name",c=(null===(n=this.contentPlacement.content)||void 0===n||null===(n=n.data)||void 0===n?void 0:n[a])||this.contentPlacement.name||"Unknown Feature";i.textContent=c,o.appendChild(i),r.appendChild(o),t.appendChild(r);var s=document.createElement("div");s.style.display="flex",s.style.justifyContent="center",s.style.alignItems="center",s.style.marginTop="12px",s.style.marginBottom="8px";var u=document.createElement("img");u.src=gr,u.alt="Loading",u.style.width="20px",u.style.height="20px",u.style.animation="smoothSpin 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) infinite",s.appendChild(u),t.appendChild(s)}},{key:"_renderFullContent",value:function(t){var e,n=this.findViableAdditionalData(this.contentPlacement),r=Object.keys(n).length>0;if(this.contentPlacement.catalog){var o=new wi(this.contentPlacement).getElement();r?o.classList.add("has-additional-details"):o.classList.add("no-additional-details"),t.appendChild(o)}else{var i=document.createElement("div");i.className="content-placement-header";var a=document.createElement("div");a.className="header-text-container",a.style.paddingLeft="10px";var c=document.createElement("div");c.className="header-content-name",c.textContent=this.contentPlacement.name||"Unknown Feature",a.appendChild(c),i.appendChild(a),t.appendChild(i)}if(null!==(e=this.contentPlacement.catalog)&&void 0!==e&&e.data_schema)for(var s=this.contentPlacement.catalog.data_schema,u=0,l=Object.entries(s);u<l.length;u++){var h=Ea(l[u],2),f=h[0];if("url"===h[1]){var p,d=null===(p=this.contentPlacement.content)||void 0===p||null===(p=p.data)||void 0===p?void 0:p[f];if(d&&""!==d.trim()){var y=new ContextualLocationView(na,d,d);t.appendChild(y.getElement())}}}if(r){var g=new Pi(n,{showTitle:!1});t.appendChild(g.getElement())}var m=this._getAdditionalImages();if(m.length>0){var v=this._createImageContainer(m);t.appendChild(v)}}},{key:"updateWithFullContent",value:function(t){this.contentPlacement=t,this.isOptimistic=!1,this._render()}},{key:"findViableAdditionalData",value:function(t){if(!t.catalog||!t.catalog.data_schema)return{};for(var e=t.catalog.data_schema,n=t.catalog.content_title_key,r=t.excluded_child_fields||[],o={},i=0,a=Object.entries(e);i<a.length;i++){var c=Ea(a[i],2),s=c[0],u=c[1];if("image"!==u&&"url"!==u&&s!==n&&!r.includes(s)){var l,h=null===(l=t.content)||void 0===l||null===(l=l.data)||void 0===l?void 0:l[s];if(h&&""!==h.trim()){var f=h.trim();o[s]=f}}}return o}},{key:"_getAdditionalImages",value:function(){var t=[];if(!this.contentPlacement.catalog||!this.contentPlacement.catalog.data_schema)return t;for(var e=this.contentPlacement.catalog.data_schema,n=this.contentPlacement.catalog.content_display_img_key,r=0,o=Object.entries(e);r<o.length;r++){var i=Ea(o[r],2),a=i[0];if("image"===i[1]&&a!==n){var c,s=null===(c=this.contentPlacement.content)||void 0===c||null===(c=c.data)||void 0===c?void 0:c[a];s&&t.push(s)}}return t}},{key:"_createImageContainer",value:function(t){var e=this,n=document.createElement("div");n.className="selection-item-image-container";var r=document.createElement("img");r.src=t[0],r.className="selection-item-preview-image";var o=document.createElement("div");return o.className="image-hover-popup",o.textContent="See photos",n.appendChild(r),n.appendChild(o),n.addEventListener("click",(function(n){n.stopPropagation(),e.fire("selectPhotos",{placementId:e.contentPlacement.placement_id,images:t})})),n}},{key:"_handleDeselect",value:function(){this.fire("deselect:feature",{placementId:this.contentPlacement.placement_id||this.contentPlacement.feature_id})}},{key:"getElement",value:function(){return this.element}}],r&&Ta(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function za(t){return za="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},za(t)}function _a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Pa(r.key),r)}}function Pa(t){var e=function(t){if("object"!=za(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=za(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==za(e)?e:e+""}function Ba(t,e,n){return e=Qa(e),function(t,e){if(e&&("object"==za(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ua()?Reflect.construct(e,n||[],Qa(t).constructor):e.apply(t,n))}function Ua(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ua=function(){return!!t})()}function Qa(t){return Qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qa(t)}function Ra(t,e){return Ra=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ra(t,e)}const Ya=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Ba(this,e,[n])).selectedPlacements=[],t.contentItems=[],t.optimisticItems=new Map,t._initialize(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ra(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="selection-content-view",this._render()}},{key:"_render",value:function(){this.element.innerHTML="";var t=document.createElement("div");t.className="selection-view-header",t.textContent="Selected content",this.element.appendChild(t);var e=document.createElement("div");if(e.className="selection-items-list",this.contentItems.length>0||this.optimisticItems.size>0)this.contentItems.forEach((function(t){e.appendChild(t.getElement())})),this.optimisticItems.forEach((function(t){e.appendChild(t.getElement())}));else{var n=document.createElement("div");n.className="selection-empty-state",n.textContent="Click features on the map to select them",e.appendChild(n)}this.element.appendChild(e)}},{key:"updateSelections",value:function(t){var e=this;this.selectedPlacements=t,this.contentItems=[],this.selectedPlacements.forEach((function(t){var n=new Ca(t);n.on("deselect:feature",e._handleDeselectFeature.bind(e)),n.on("selectPhotos",e._handleSelectPhotos.bind(e)),e.contentItems.push(n)})),this._render()}},{key:"addSelection",value:function(t){this.selectedPlacements.some((function(e){return e.placement_id===t.placement_id}))||(this.selectedPlacements.push(t),this.updateSelections(this.selectedPlacements))}},{key:"removeSelection",value:function(t){this.selectedPlacements=this.selectedPlacements.filter((function(e){return e.placement_id!==t})),this.updateSelections(this.selectedPlacements)}},{key:"_handleDeselectFeature",value:function(t){var e=t.placementId;this.fire("deselect:feature",{placementId:e})}},{key:"_handleSelectPhotos",value:function(t){this.fire("selectPhotos",t)}},{key:"clearSelections",value:function(){this.selectedPlacements=[],this.contentItems=[],this._render()}},{key:"getElement",value:function(){return this.element}},{key:"addOptimisticItem",value:function(t){var e=t.properties.placement_id||t.properties.feature_id,n=t.properties.name||"Unknown Feature",r={placement_id:e,name:n,content:{data:{name:n}},catalog:{content_title_key:"name",title:t.properties.type||"Feature",data_schema:{name:"text"}},isOptimistic:!0},o=new Ca(r);o.on("deselect:feature",this._handleDeselectFeature.bind(this)),o.on("selectPhotos",this._handleSelectPhotos.bind(this)),this.contentItems.push(o),this._render()}},{key:"updateOptimisticItem",value:function(t,e){var n=this.contentItems.find((function(e){return e.contentPlacement.placement_id===t&&e.isOptimistic}));n&&(n.updateWithFullContent(e),this._render())}},{key:"removeOptimisticItem",value:function(t){var e=this.contentItems.findIndex((function(e){return e.contentPlacement.placement_id===t&&e.isOptimistic}));-1!==e&&(this.contentItems.splice(e,1),this._render())}}])&&_a(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Fa(t){return Fa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fa(t)}function Va(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ha(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Va(Object(n),!0).forEach((function(e){Ga(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Va(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ga(t,e,n){return(e=Ka(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Za(){Za=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Fa(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Fa(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Wa(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function qa(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Wa(i,r,o,a,c,"next",t)}function c(t){Wa(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Ja(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ka(r.key),r)}}function Ka(t){var e=function(t){if("object"!=Fa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Fa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fa(e)?e:e+""}function $a(t,e,n){return e=ec(e),function(t,e){if(e&&("object"==Fa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Xa()?Reflect.construct(e,n||[],ec(t).constructor):e.apply(t,n))}function Xa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xa=function(){return!!t})()}function tc(){return tc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ec(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},tc.apply(null,arguments)}function ec(t){return ec=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ec(t)}function nc(t,e){return nc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},nc(t,e)}const rc=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=$a(this,e,[n])).map=null,t.contentPlacementIds=[],t.currentContentPlacement=null,t.contentPlacementView=null,t.selectionContentView=null,t.selectedPlacements=[],t.urlConfirmationPopup=null,t.currentTop=window.innerHeight,t.startingY=0,t.scrollConfiguration={initialHeight:.5,minDistFromBottom:110},t.isDragging=!1,t.isAtTop=!1,t.velocity=0,t.decelerationFactor=.95,t.minVelocity=.1,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&nc(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="content-details-control-container",this.initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.hide(),this.container}},{key:"onRemove",value:function(){var t,n,r;this._documentTouchMoveHandler&&document.removeEventListener("touchmove",this._documentTouchMoveHandler,{capture:!0}),this._documentWheelHandler&&document.removeEventListener("wheel",this._documentWheelHandler,{capture:!0}),document.body.style.overflow="",document.documentElement.style.overflow="",(t=e,n=this,r=tc(ec(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){var t=this;this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("selection:featureSelected",this._handleSelectionFeatureSelected.bind(this)),this.map.on("selection:featureDeselected",this._handleSelectionFeatureDeselected.bind(this)),this.map.on("selection:featureSelectedOptimistic",this._handleSelectionFeatureSelectedOptimistic.bind(this)),this.map.on("selection:changed",this._handleSelectionChanged.bind(this)),this.map.on("initiate:back",this._handleMapInitiateBack.bind(this)),this.map.map.on("mousedown",this._handleMapFocus.bind(this)),this.map.map.on("touchstart",this._handleMapFocus.bind(this)),this.container.addEventListener("mousedown",(function(t){return t.stopPropagation()})),this.container.addEventListener("click",(function(t){return t.stopPropagation()})),this.container.addEventListener("dblclick",(function(t){return t.stopPropagation()})),this.container.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!1}),this.container.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!1}),this.container.addEventListener("touchend",this.handleTouchEnd.bind(this)),this.container.addEventListener("wheel",this.handleWheelScroll.bind(this),{passive:!1}),this._documentTouchMoveHandler=function(e){"mobile"===t.currentViewType&&"none"!==t.container.style.display&&t.container.contains(e.target)&&e.preventDefault()},document.addEventListener("touchmove",this._documentTouchMoveHandler,{passive:!1,capture:!0}),this._documentWheelHandler=function(e){"mobile"===t.currentViewType&&"none"!==t.container.style.display&&t.container.contains(e.target)&&e.preventDefault()},document.addEventListener("wheel",this._documentWheelHandler,{passive:!1,capture:!0})}},{key:"_handleSelectionFeatureSelectedOptimistic",value:function(t){var e=t.feature;e.properties.placement_id,this.map.multiSelect||(this.selectedPlacements=[],this.selectionContentView&&(this.selectionContentView.contentItems=[],this.selectionContentView._render())),this.selectionContentView&&this.selectionContentView.addOptimisticItem(e),this.show()}},{key:"_handleMapFocus",value:function(t){if("desktop"!==this.currentViewType&&t&&t.point){var e=[];try{e=this.map.map.queryRenderedFeatures(t.point)||[]}catch(t){return}0===e.filter((function(t){var e;return"symbol"===(null==t||null===(e=t.layer)||void 0===e?void 0:e.type)})).length&&this.scrollToMin(!0)}}},{key:"handleTouchStart",value:function(t){t.stopPropagation(),this.startingY=t.touches[0].clientY,this.isDragging=!0,this.velocity=0}},{key:"handleScrolling",value:function(t){var e=this.contentPlacementView.getElement().offsetHeight,n=this.map.mapContainer.getBoundingClientRect(),r=n.bottom,o=null;t<=0?o=Math.max(r-e-n.top,this.currentTop+t):t>0&&(o=Math.min(r-this.scrollConfiguration.minDistFromBottom-n.top,this.currentTop+t)),this.scrollTo(o)}},{key:"handleTouchMove",value:function(t){if("desktop"!==this.currentViewType&&this.isDragging){t.preventDefault();var e=t.touches[0].clientY,n=-1*(this.startingY-e);this.velocity=n,this.handleScrolling(n),this.startingY=e}}},{key:"handleTouchEnd",value:function(){this.isDragging=!1,this._applyInertia()}},{key:"_applyInertia",value:function(){var t=this,e=this.map.mapContainer.getBoundingClientRect(),n=this.contentPlacementView.getElement().offsetHeight,r=e.bottom,o=r-n-e.top,i=r-this.scrollConfiguration.minDistFromBottom-e.top,a=this.velocity,c=performance.now(),s=function(){var e=performance.now()-c;if(e>=400||Math.abs(t.velocity)<t.minVelocity)t.velocity=0;else{var n=e/400,r=1-Math.pow(1-n,2);t.velocity=a*(1-r);var u=t.currentTop+t.velocity;if(u<=o)return t.scrollTo(o),void(t.velocity=0);if(u>=i)return t.scrollTo(i),void(t.velocity=0);t.scrollTo(u),requestAnimationFrame(s)}};s()}},{key:"handleWheelScroll",value:function(t){if("desktop"!==this.currentViewType){t.preventDefault();var e=-t.deltaY;this.handleScrolling(e)}}},{key:"_renderDesktopView",value:function(){if(this.contentPlacementView){var t=this.contentPlacementView.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view")}}},{key:"_renderMobileView",value:function(){if(this.contentPlacementView){var t=this.contentPlacementView.getElement();this.container.appendChild(t),this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view")}}},{key:"_handleMapInitiateBack",value:function(){var t=this.map._stateCoordinator.state;if("selectedContent"===t){if(0===this.contentPlacementIds.length)return;if(1===this.contentPlacementIds.length){var e=this.map._stateCoordinator.stateHistory,n=e[e.length-2];e.pop(),e.pop(),"search"===n?this.map.initiateSetToSearchState():this.map.setToDefaultState()}else this.contentPlacementIds.pop(),this.map.setToSelectedContentState(this.contentPlacementIds)}else"directions"===t?this.map.setToSelectedContentState(this.contentPlacementIds):"selection"===t&&(this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews())}},{key:"_handleSelectChildContentPlacement",value:function(t){var e=t.placementId;this.contentPlacementIds.push(e),this.map.setToSelectedContentState(this.contentPlacementIds)}},{key:"_handleDefaultState",value:(a=qa(Za().mark((function t(){return Za().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.container.classList.remove("selection-mode"),"mobile"!==this.currentViewType){t.next=4;break}return t.next=4,this._scrollToBottom(!0,{duration:50});case 4:this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews();case 8:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"_handleSearchState",value:function(t){this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews(),"mobile"===this.currentViewType&&this._scrollToBottom()}},{key:"_handleSelectedContentState",value:function(t){var e=t.contentPlacementIds,n=t.selectedContentPlacement;this.contentPlacementIds=e,this.currentContentPlacement=n,this._updateContentViews(),this.show()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleSetupState",value:function(){this.hide()}},{key:"_handleSelectionState",value:function(t){this.selectedPlacements=[],this._clearViews(),this.map.clearSelectionLayers(),this._updateSelectionView(),this.show()}},{key:"_handleSelectionFeatureSelected",value:function(t){var e=t.feature,n=t.contentPlacement;if(!this.selectedPlacements.some((function(t){return t.placement_id===n.placement_id}))){var r=!this.map.multiSelect;this.map.addConfirmedSelectionFeature(e,r),this.map.multiSelect||(this.selectedPlacements=[]),this.selectedPlacements.push(n),this.selectionContentView&&this.selectionContentView.updateOptimisticItem(n.placement_id,n)}this._updateSelectionView(),this.show()}},{key:"_handleSelectionFeatureDeselected",value:function(t){t.feature;var e=t.placementId;this.map.removeConfirmedSelectionFeature(e),this.selectedPlacements=this.selectedPlacements.filter((function(t){return t.placement_id!==e})),this._updateSelectionView()}},{key:"_updateSelectionView",value:function(){var t=this;this.container.innerHTML="","desktop"===this.currentViewType?(this.container.classList.add("desktop-view"),this.container.classList.remove("mobile-view")):(this.container.classList.add("mobile-view"),this.container.classList.remove("desktop-view")),this.selectionContentView||(this.selectionContentView=new Ya,this.selectionContentView.on("deselect:feature",(function(e){t._handleDeselectFeature(e)})),this.selectionContentView.on("selectPhotos",(function(e){t._handleSelectPhotos(e)}))),this.selectionContentView.updateSelections(this.selectedPlacements),this.container.appendChild(this.selectionContentView.getElement())}},{key:"_handleDeselectFeature",value:function(t){var e=t.placementId,n=this.map.getConfirmedSelectionFeatures().find((function(t){return t.properties.placement_id===e||t.properties.feature_id===e}));if(n){var r=n.properties.feature_id;this.map.removeConfirmedSelectionFeature(r),this.map.fire("selection:featureDeselected",{feature:n,placementId:n.properties.placement_id||r}),this.selectedPlacements=this.selectedPlacements.filter((function(t){return t.placement_id!==e})),this._updateSelectionView(),this.map.fire("selection:changed",{selectedContent:this.map.getConfirmedSelectionFeatures().map((function(t){return t.properties})),selectionCount:this.map.getConfirmedSelectionFeatures().length})}else console.warn("⚠️ Feature not found in confirmed selection for deselection:",e)}},{key:"_handleSelectionChanged",value:function(t){t.selectedContent,t.selectionCount}},{key:"_handleSelectDirectionsButton",value:(i=qa(Za().mark((function t(e){var n;return Za().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.placementId,t.next=3,this.map.setToDirectionsState(null,n);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_handleSelectShareButton",value:(o=qa(Za().mark((function t(e){var n,r,o,i,a,c,s,u,l,h,f,p=this;return Za().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.placementId,r=this.map.getCurrentFloor(),this.map.mapData.account_id,o=this.map.mapData.map_id,i=this.map.mapData.map_view_id,a=this.map.map.getCenter(),c=a.lng.toFixed(6),s=a.lat.toFixed(6),u=this.map.map.getPitch().toFixed(2),l=this.map.map.getBearing().toFixed(2),h=this.map.map.getZoom().toFixed(2),f="https://maps.waygomaps.com/".concat(o,"/").concat(i,"/selected-content/").concat(n,"/f").concat(r,"@").concat(c,",").concat(s,",").concat(h,",").concat(u,",").concat(l),navigator.clipboard.writeText(f).then((function(){p.contentPlacementView.showCopyPopup()})).catch((function(t){return console.error("Failed to copy text:",t)}));case 13:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"_handleSelectUrlButton",value:function(t){var e=t.url;e&&(this.urlConfirmationPopup||(this.urlConfirmationPopup=new fa),this.urlConfirmationPopup.show(this.map,e,{isKioskMode:!0===this.map.isKioskMode}))}},{key:"_handleSelectPhotos",value:function(t){var e=this,n=(t.placementId,t.images),r=0,o=n.length;"desktop"===this.currentViewType||"mobile"===this.currentViewType?(this.map.showModal('\n <div class="waygo-map-modal-content photo-modal">\n <button class="modal-close-button">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />\n </svg>\n </button>\n \n <div class="modal-counter">\n <span id="imageCounter">'.concat(r+1," / ").concat(o,'</span>\n </div>\n \n <div class="modal-image-container">\n <button id="prevButton" class="modal-nav-button prev">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5L8.25 12l7.5-7.5" />\n </svg>\n </button>\n \n <div class="modal-image-wrapper">\n <img id="modalImage" src="').concat(n[r],'" class="modal-image">\n </div>\n \n <button id="nextButton" class="modal-nav-button next">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />\n </svg>\n </button>\n </div>\n </div>\n ')),document.querySelector(".modal-close-button").addEventListener("click",(function(){return e.map.hideModal()}))):this.map.showModal('\n <div class="waygo-map-modal-content photo-modal">\n <img src="'.concat(n[r],'" class="modal-image">\n </div>\n '));var i=document.getElementById("modalImage"),a=document.getElementById("prevButton"),c=document.getElementById("nextButton"),s=document.getElementById("imageCounter");a.onclick=function(){r=(r-1+n.length)%n.length,i.src=n[r],s.textContent="".concat(r+1," / ").concat(o)},c.onclick=function(){r=(r+1)%n.length,i.src=n[r],s.textContent="".concat(r+1," / ").concat(o)}}},{key:"_updateContentViews",value:function(){this._clearViews(),this._render()}},{key:"hide",value:function(){this.container.scrollTop=0,this.container&&(this.container.style.display="none")}},{key:"scrollTo",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=Ha(Ha({},{duration:150,easing:"easeInOut"}),r),i=this.currentTop,a=t-i,c=null,s={linear:function(t){return t},easeInOut:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeIn:function(t){return t*t},easeOut:function(t){return t*(2-t)}},u=s[o.easing]||s.easeInOut,l=o.duration;return new Promise((function(r){if(!n)return e.currentTop=t,e.container.style.top="".concat(e.currentTop,"px"),e.container.style.height="calc(100vh - ".concat(e.currentTop,"px)"),void r();var o=function(t){null===c&&(c=t);var n=t-c,s=Math.min(n/l,1),h=u(s),f=i+h*a;e.currentTop=f,e.container.style.top="".concat(e.currentTop,"px"),e.container.style.height="calc(100vh - ".concat(e.currentTop,"px)"),s<1?requestAnimationFrame(o):r()};requestAnimationFrame(o)}))}},{key:"_resetScroll",value:function(){var t=this,e=this.map.mapContainer.getBoundingClientRect(),n=this.map.mapContainer.offsetHeight;this.currentTop<e.top&&this.scrollTo(e.bottom);var r=this.contentPlacementView.findViableAdditionalData(this.currentContentPlacement),o=Object.keys(r).length,i=Object.keys(this.currentContentPlacement.children).length,a=n*(1-this.scrollConfiguration.initialHeight);0===o&&0===i?setTimeout((function(){if(t.contentPlacementView&&t.contentPlacementView.contentPlacementHeader){var e=t.contentPlacementView.header.offsetHeight;a=n-e-20}t.scrollTo(a,!0)}),50):this.scrollTo(a,!0)}},{key:"_scrollToBottom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.map.mapContainer.getBoundingClientRect();return this.scrollTo(n.bottom,t,e)}},{key:"scrollToMin",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.map.mapContainer.getBoundingClientRect();this.scrollTo(e.bottom-this.scrollConfiguration.minDistFromBottom,t)}},{key:"_render",value:function(){var t;if(0!==this.contentPlacementIds.length&&null!==this.currentContentPlacement){this.contentPlacementView=new Da;var e="selection"===this.map.getCurrentState(),n=null!==this.map.location,r=(null===(t=this.map.mapData)||void 0===t?void 0:t.map_id)||null;this.contentPlacementView.updateView(this.currentContentPlacement,e,n,r),this.contentPlacementView.on("selectChildContentPlacement",this._handleSelectChildContentPlacement.bind(this)),this.contentPlacementView.on("selectDirectionsButton",this._handleSelectDirectionsButton.bind(this)),this.contentPlacementView.on("selectShareButton",this._handleSelectShareButton.bind(this)),this.contentPlacementView.on("selectPhotos",this._handleSelectPhotos.bind(this)),this.contentPlacementView.on("selectUrlButton",this._handleSelectUrlButton.bind(this)),this._initialize(),"mobile"===this.currentViewType&&this._resetScroll()}}},{key:"_handleSelectionFeatureDeselectedOptimistic",value:function(t){var e=t.placementId;this.selectionContentView&&this.selectionContentView.removeOptimisticItem(e)}}],r&&Ja(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a}(eo);function oc(t){return oc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oc(t)}function ic(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ac(r.key),r)}}function ac(t){var e=function(t){if("object"!=oc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=oc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==oc(e)?e:e+""}function cc(t,e,n){return e=uc(e),function(t,e){if(e&&("object"==oc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,sc()?Reflect.construct(e,n||[],uc(t).constructor):e.apply(t,n))}function sc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(sc=function(){return!!t})()}function uc(t){return uc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},uc(t)}function lc(t,e){return lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},lc(t,e)}const hc=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=cc(this,e,[n]))._initialize(),t.node=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lc(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="setup-view",this.titleElement=document.createElement("h3"),this.titleElement.className="setup-title",this.setTitle("Kiosk setup");var e=document.createElement("div");e.className="setup-instructions";var n=document.createElement("p");n.innerHTML='In kiosk mode, navigation paths are set to start from the kiosk position, by default.<br><br><b>Drag the red point on the map to set your kiosk position.</b><br><br>Once you are done, click "Configure Map" to load the configured map in kiosk mode, or "Exit" to exit kiosk mode. <br><br>The kiosk URL displayed below can be copied to load this configuration at a later time.',e.appendChild(n),this.codeContainer=document.createElement("div"),this.codeContainer.className="setup-code-container",this.codeSnippet=document.createElement("pre"),this.codeSnippet.className="setup-code-snippet",this.map&&(this.codeSnippet.innerHTML="waygomaps.com/".concat(this.map.mapData.map_id,"?location=").concat(this.node.node_id)),this.copyButton=document.createElement("button"),this.copyButton.className="setup-copy-button",this.copyButton.innerText="Copy",this.copyButton.addEventListener("click",(function(){navigator.clipboard.writeText(t.codeSnippet.innerText),t.copyButton.innerText="Copied!",setTimeout((function(){copyButton.innerText="Copy"}),2e3)})),this.codeContainer.appendChild(this.codeSnippet),this.codeContainer.appendChild(this.copyButton);var r=document.createElement("div");r.className="setup-buttons-container";var o=document.createElement("button");o.className="setup-button exit",o.innerText="Exit",o.addEventListener("click",(function(){t.fire("exit")}));var i=document.createElement("button");i.className="setup-button configure",i.innerText="Configure Map",i.addEventListener("click",(function(){t.fire("configure")})),r.appendChild(o),r.appendChild(i),this.element.appendChild(this.titleElement),this.element.appendChild(e),this.element.appendChild(this.codeContainer),this.element.appendChild(r)}},{key:"setTitle",value:function(t){this.titleElement.innerText=t}},{key:"show",value:function(){this.element.classList.add("visible")}},{key:"hide",value:function(){this.element.classList.remove("visible")}},{key:"getElement",value:function(){return this.element}}])&&ic(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function fc(t){return fc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(t)}function pc(){pc=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==fc(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(fc(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function dc(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function yc(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){dc(i,r,o,a,c,"next",t)}function c(t){dc(i,r,o,a,c,"throw",t)}a(void 0)}))}}function gc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,mc(r.key),r)}}function mc(t){var e=function(t){if("object"!=fc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=fc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fc(e)?e:e+""}function vc(t,e,n){return e=wc(e),function(t,e){if(e&&("object"==fc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Mc()?Reflect.construct(e,n||[],wc(t).constructor):e.apply(t,n))}function Mc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Mc=function(){return!!t})()}function bc(){return bc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=wc(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},bc.apply(null,arguments)}function wc(t){return wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wc(t)}function jc(t,e){return jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jc(t,e)}const Nc=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=vc(this,e,[n])).setupView=new hc,t.routesApi=nn.getRotuesApi(),t.node=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jc(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="setup-control-container",this._initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.show(),this.container}},{key:"onRemove",value:function(){var t,n,r;this.removeDraggablePoint(),(t=e,n=this,r=bc(wc(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"removeDraggablePoint",value:function(){this.map&&this.map.map&&(this.map.map.getLayer("point")&&this.map.map.removeLayer("point"),this.map.map.getLayer("point-border")&&this.map.map.removeLayer("point-border"),this.map.map.getSource("point")&&this.map.map.removeSource("point"))}},{key:"initializeDraggablePoint",value:function(){var t,e=this,n=this.map.map.getCanvas(),r=(null===(t=this.map.mapData)||void 0===t?void 0:t.reference_coordinate)||[0,0],o={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[r[0],r[1]]},properties:{_floor:this.map.getCurrentFloor()}}]},i=function(t){var n=t.lngLat;o.features[0].geometry.coordinates=[n.lng,n.lat];var r=e.map.map.getSource("point");r&&r.setData(o)},a=function(){var t=yc(pc().mark((function t(r){var a,c,s,u,l,h,f;return pc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=r.lngLat,n.style.cursor="",u=(null===(a=e.map.mapData)||void 0===a?void 0:a.reference_coordinate)||[0,0],l=(null===(c=e.map.mapData)||void 0===c?void 0:c.coordinate_scaling_multiplier)||30,h=_n([s.lng,s.lat],u,l),f=o.features[0].properties._floor,t.next=8,e.getClosestNode(h,f);case 8:e.map.map.off("mousemove",i),e.map.map.off("touchmove",i);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();this.map.on("floorChanged",(function(t){var n=t.floorIndex;o.features[0].properties._floor=n;var r=e.map.map.getSource("point");r&&r.setData(o)})),this.map.map.addSource("point",{type:"geojson",data:o}),this.map.map.addLayer({id:"point-border",type:"circle",source:"point",paint:{"circle-radius":18,"circle-color":"#FFFFFF"}}),this.map.map.addLayer({id:"point",type:"circle",source:"point",paint:{"circle-radius":15,"circle-color":"#F84C4C"}}),this.map.map.on("mouseenter","point",(function(){e.map.map.setPaintProperty("point","circle-color","#FF8080"),n.style.cursor="pointer"})),this.map.map.on("mouseleave","point",(function(){e.map.map.setPaintProperty("point","circle-color","#F84C4C"),n.style.cursor="default"})),this.map.map.on("mousedown","point",(function(t){t.preventDefault(),n.style.cursor="grabbing",e.map.map.on("mousemove",i),e.map.map.once("mouseup",a)})),this.map.map.on("touchstart","point",(function(t){1===t.points.length&&(t.preventDefault(),e.map.map.on("touchmove",i),e.map.map.once("touchend",a))}))}},{key:"getVertex",value:function(){var t,e,n=this.map.map.querySourceFeatures("point"),r=(null===(t=this.map.mapData)||void 0===t?void 0:t.reference_coordinate)||[0,0],o=(null===(e=this.map.mapData)||void 0===e?void 0:e.coordinate_scaling_multiplier)||30;return n.length>0?_n(n[0].geometry.coordinates,r,o):null}},{key:"getClosestNode",value:(i=yc(pc().mark((function t(e,n){var r;return pc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.routesApi.findClosestNode(this.map.mapData.map_id,e,n);case 2:r=t.sent,this.node=r,this.map.location=r.node_id,this.setupView.codeSnippet.innerHTML="https://maps.waygomaps.com/".concat(this.map.mapData.map_id,"?location=").concat(r.node_id);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return i.apply(this,arguments)})},{key:"_initializeEventListeners",value:function(){this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("load",this._handleMapLoad.bind(this)),this.map.on("floorChanged",this._handleFloorChange.bind(this)),this.setupView.on("exit",this._handleSetupViewExitState.bind(this)),this.setupView.on("configure",this._handleSetupViewConfigureState.bind(this))}},{key:"_handleMapLoad",value:function(t){}},{key:"_renderDesktopView",value:function(){this.container.classList.add("desktop-view"),this.container.classList.remove("mobile-view")}},{key:"_renderMobileView",value:function(){this.container.classList.add("mobile-view"),this.container.classList.remove("desktop-view")}},{key:"bringToFront",value:function(){this.container.style.zIndex="1"}},{key:"bringBack",value:function(){this.container.style.zIndex=""}},{key:"_handleDefaultState",value:function(){this.hide()}},{key:"_handleSearchState",value:function(t){this.hide()}},{key:"_handleSelectedContentState",value:function(t){this.hide()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleSetupState",value:(o=yc(pc().mark((function t(){var e=this;return pc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.initializeDraggablePoint(),this.show(),setTimeout(yc(pc().mark((function t(){var n,r,o;return pc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.getVertex(),r=e.map.getCurrentFloor(),null===n||null===r){t.next=5;break}return t.next=5,e.getClosestNode(n,r);case 5:o=e.setupView.getElement(),e.container.appendChild(o);case 7:case"end":return t.stop()}}),t)}))),200);case 3:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"_handleFloorChange",value:function(t){var e=t.floorIndex,n=this.getVertex();"setup"===this.map.getCurrentState()&&this.getClosestNode(n,e)}},{key:"_handleSetupViewExitState",value:function(){this.removeDraggablePoint(),this.map.setToDefaultState()}},{key:"_handleSetupViewConfigureState",value:function(){this.removeDraggablePoint(),this.map.setToDefaultState()}}],r&&gc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}(eo);function Dc(t){return Dc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dc(t)}function Ic(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||Sc(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ec(t){return function(t){if(Array.isArray(t))return Tc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Sc(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sc(t,e){if(t){if("string"==typeof t)return Tc(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tc(t,e):void 0}}function Tc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Oc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function xc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Oc(Object(n),!0).forEach((function(e){Lc(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Oc(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Lc(t,e,n){return(e=kc(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ac(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,kc(r.key),r)}}function kc(t){var e=function(t){if("object"!=Dc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Dc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dc(e)?e:e+""}function Cc(t,e,n){return e=Pc(e),function(t,e){if(e&&("object"==Dc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,zc()?Reflect.construct(e,n||[],Pc(t).constructor):e.apply(t,n))}function zc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zc=function(){return!!t})()}function _c(){return _c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Pc(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},_c.apply(null,arguments)}function Pc(t){return Pc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pc(t)}function Bc(t,e){return Bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bc(t,e)}const Uc=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Cc(this,e,[n])).map=null,t.previouslySelectedFeature=null,t.previouslySelectedIcon=null,t.previouslySelectedTextColor=null,t.previouslySelectedTextOffset=null,t.previouslyHoveredFeature=null,t.originalTextColor=null,t.textColorReference={},t.currentView=null,t.selectedTextColor="#BE2E28",t.interactionEnabled=!0,t.selectionCriteria=null,t.originalPaintProperties={},t.selectionModeExpressions={},t.selectionHoverColor="#4A90E2",t.currentHoveredLayerId=null,t.currentHoveredFeatureId=null,t.selectionHoverHandler=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bc(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="interaction-control-container",this.initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.createHighlightedContentLayer(),this.createSelectedContentLayer(),this.storeTextColorReferences(),this.container}},{key:"_initialize",value:function(){var t=this.map.mapContainer.offsetWidth;this._configureView(t)}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=_c(Pc(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"_configureView",value:function(t){t>767?this._setViewForDesktop():this._setViewForMobile()}},{key:"_setViewForDesktop",value:function(){this.currentView="desktop"}},{key:"_setViewForMobile",value:function(){this.currentView="mobile"}},{key:"initializeEventListeners",value:function(){var t=this;this.map.map.on("styleimagemissing",(function(t){var e=t.id;console.warn('Image "'.concat(e,'" could not be loaded.'))})),this.map.map.on("click",(function(e){t._handleClick(e)})),this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("additionalSearchResults",this._handleAdditionalSearch.bind(this)),this.map.on("hoverSearchResult",this._handleHoverSearchResult.bind(this)),this.map.on("hoverEndSearchResult",this._handleHoverEndSearchResult.bind(this))}},{key:"storeTextColorReferences",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){if("symbol"===e.type){var n=t.map.map.getPaintProperty(e.id,"text-color");void 0!==n&&(t.textColorReference[e.id]=n)}}))}},{key:"_getSelectedContentLayerPaint",value:function(){var t,e=null===(t=this.map)||void 0===t||null===(t=t.mapData)||void 0===t?void 0:t.map_id;return{"text-color":e&&ur.includes(e)?"#ff6661":"#BE2E28","text-halo-color":e&&ur.includes(e)?"#1c1c1c":"#ffffff","text-halo-width":e&&ur.includes(e)?2:1}}},{key:"_getHighlightedContentLayerPaint",value:function(){var t,e=null===(t=this.map)||void 0===t||null===(t=t.mapData)||void 0===t?void 0:t.map_id;return{"text-color":e&&ur.includes(e)?"#ffffff":"#1E1E1E","text-halo-color":e&&ur.includes(e)?"#1c1c1c":"#ffffff","text-halo-width":e&&ur.includes(e)?2:1}}},{key:"_getTextSize",value:function(){var t,e=null===(t=this.map)||void 0===t||null===(t=t.mapData)||void 0===t?void 0:t.map_id;return e&&ur.includes(e)?16:14}},{key:"createSelectedContentLayer",value:function(){this.map.map.addSource("selected-content",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.map.addLayer({id:"selected-content-layer",type:"symbol",source:"selected-content",layout:{"text-field":["get","name"],"text-font":["Inter Medium"],"text-size":this._getTextSize(),"text-justify":"left","text-anchor":"bottom-left","text-offset":[1.3,-1],"icon-image":"selected-pin","icon-size":.5,"icon-offset":[0,-5],"icon-anchor":"bottom","symbol-z-elevate":!0,"text-padding":10,"icon-padding":5},paint:this._getSelectedContentLayerPaint()})}},{key:"createHighlightedContentLayer",value:function(){this.map.map.addSource("highlighted-content",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.map.addLayer({id:"highlighted-content-layer",type:"symbol",source:"highlighted-content",layout:{"text-field":["get","name"],"text-font":["Inter Medium"],"text-size":this._getTextSize(),"text-justify":"left","text-anchor":"bottom-left","text-offset":[1.2,-.6],"icon-image":"highlightedPin","icon-size":.5,"icon-offset":[0,-5],"icon-anchor":"bottom","symbol-z-elevate":!0,"text-padding":5,"icon-padding":5},paint:this._getHighlightedContentLayerPaint()})}},{key:"_handleDefaultState",value:function(){this.interactionEnabled=!0,this.removeSelectionVisuals(),this.selectionCriteria=null,this.applyHoverEffectToAllSymbolLayers(),this.map.clearHighlightedContentLayer(),this.map.clearSelectedContentLayer(),this.showSymbolLayers()}},{key:"_handleSearchState",value:function(t){t.query;var e=t.results;this.interactionEnabled=!0,this.applyHoverEffectToAllSymbolLayers(),this.hideSymbolLayers(),this.map.clearSelectedContentLayer();var n=e.reduce((function(t,e){return t[e.floor]=(t[e.floor]||0)+1,t}),{}),r=Object.entries(n).reduce((function(t,e){return e[1]>t[1]?e:t}),[0,0])[0],o=this.map.getCurrentFloor(),i=e.some((function(t){return t.floor===o})),a=o;i||(a=r,this.map.updateFloor(parseInt(a))),a=parseInt(a),this.updateLabelsForSearchResults(e,!0,a)}},{key:"_handleAdditionalSearch",value:function(t){var e=t.results;this.updateLabelsForSearchResults(e,!0)}},{key:"_handleHoverSearchResult",value:function(t){var e=t.result;this.updateLabelForSelectedContentPlacement(e,!1)}},{key:"_handleHoverEndSearchResult",value:function(){"search"===this.map.getCurrentState()&&this.map.clearSelectedContentLayer()}},{key:"_handleSelectedContentState",value:function(t){t.contentPlacementIds;var e=t.selectedContentPlacement;this.interactionEnabled=!0,this.applyHoverEffectToAllSymbolLayers(),this.showSymbolLayers(),this.updateLabelForSelectedContentPlacement(e)}},{key:"_handleDirectionsState",value:function(t){t.endContentPlacement,this.interactionEnabled=!1,this.removeHoverEffects(),this.showSymbolLayers()}},{key:"_handleSetupState",value:function(){this.interactionEnabled=!1,this.removeHoverEffects()}},{key:"_handleSelectionState",value:function(t){var e=t.criteria,n=t.geojson;this.selectionCriteria=e,this.interactionEnabled=!0,this.applySelectionModeVisuals(e),this.map.removeMatchingFeaturesFromExistingLayers(e),this.map.createSelectableContentLayers(n),this.processPendingExtrusionFeatures(),this.processPendingSymbolFeatures(),this.applySelectableHoverEffects()}},{key:"hideSymbolLayers",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){"symbol"===e.type&&"selected-content-layer"!==e.id&&"highlighted-content-layer"!==e.id&&t.map.map.setLayoutProperty(e.id,"visibility","none")}))}},{key:"showSymbolLayers",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){"symbol"===e.type&&t.map.map.setLayoutProperty(e.id,"visibility","visible")}))}},{key:"updateLabelsForSearchResults",value:function(t){var e,n,r=this,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;null===i&&(i=this.map.getCurrentFloor());var a=(null===(e=this.map.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],c=(null===(n=this.map.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30;this.map.clearHighlightedContentLayer();var s=[],u=[];if(t.length,t.forEach((function(t){var e;t._floor=t.floor;var n,o=(null===(e=r.map.mapData)||void 0===e?void 0:e.map_id)||null;console.log("🔵 InteractionControl: mapId:",o),n="outdoor-cities-demo"===o?t.location:zn([t.location],a,c)[0];var l=t.catalog.content_title_key;t.name=t.content.data[l];var h=r.map.addHighlightedFeature(n,t);s.push(h),t.floor===i&&u.push(h)})),u.length&&o){var l=new mapboxgl.LngLatBounds;if(u.forEach((function(t){l.extend(t.geometry.coordinates)})),"desktop"===this.currentView)this.map.map.fitBounds(l,{padding:{top:50,bottom:50,left:350,right:50},maxZoom:17,pitch:45,bearing:-37,duration:1e3});else if("mobile"===this.currentView){var h=.45*this.map.mapContainer.offsetHeight,f=.06*this.map.mapContainer.offsetWidth;this.map.map.fitBounds(l,{padding:{top:150,bottom:h,left:f,right:f},maxZoom:17,pitch:45,bearing:-37,duration:1e3})}}}},{key:"_getSelectionFeaturesProperties",value:function(){return this.map.getConfirmedSelectionFeatures().map((function(t){return t.properties}))}},{key:"updateLabelForSelectedContentPlacement",value:function(t){var e,n,r,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.map.clearSelectedContentLayer();var i,a=(null===(e=this.map.mapData)||void 0===e?void 0:e.map_id)||null;console.log("🔵 InteractionControl: mapId:",a);var c=(null===(n=this.map.mapData)||void 0===n?void 0:n.reference_coordinate)||[0,0],s=(null===(r=this.map.mapData)||void 0===r?void 0:r.coordinate_scaling_multiplier)||30;if(i="outdoor-cities-demo"===a?t.location:zn([t.location],c,s)[0],t._floor=t.floor,!t.name&&t.content&&t.catalog){var u=t.catalog.content_title_key,l=t.content.data[u];t.name=l}if(this.map.addSelectedFeature(i,t),o)if("desktop"===this.currentView)this.map.map.easeTo({center:i,padding:{top:0,bottom:0,left:330,right:0},duration:1e3});else if("mobile"===this.currentView){var h=.35*this.map.mapContainer.offsetHeight;this.map.map.easeTo({center:i,padding:{top:0,bottom:h,left:0,right:0},duration:1e3})}}},{key:"applyHoverEffectToAllSymbolLayers",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){if("symbol"===e.type){var n=e.id,r=t.textColorReference[n];t.map.map.on("mouseenter",n,(function(e){var o=e.features[0],i=o.properties.placement_id;if(t.previouslySelectedFeature&&t.previouslySelectedFeature.layer.id===o.layer.id){t.originalTextColor=t.previouslySelectedTextColor;var a=t.previouslySelectedFeature.properties.placement_id;t.map.map.setPaintProperty(n,"text-color",["case",["==",["get","placement_id"],i],"#4B90F7",["==",["get","placement_id"],a],t.selectedTextColor,r])}else t.originalTextColor=t.map.map.getPaintProperty(n,"text-color"),t.map.map.setPaintProperty(n,"text-color",["case",["==",["get","placement_id"],i],"#4B90F7",r]);t.map.map.getCanvas().style.cursor="pointer"})),t.map.map.on("mouseleave",n,(function(){if(t.previouslySelectedFeature){var e=t.previouslySelectedFeature.properties.placement_id;t.map.map.setPaintProperty(n,"text-color",["case",["==",["get","placement_id"],e],t.selectedTextColor,r])}else t.map.map.setPaintProperty(n,"text-color",r);t.map.map.getCanvas().style.cursor="default"}))}}))}},{key:"removeHoverEffects",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){if("symbol"===e.type){var n=e.id,r=t.textColorReference[n];t.map.map.setPaintProperty(n,"text-color",r),t.map.map.off("mouseenter",n),t.map.map.off("mouseleave",n)}})),this.map.map.getCanvas().style.cursor="default"}},{key:"applySelectionModeVisuals",value:function(t){var e=this,n=this.map.map.getStyle().layers;this.originalPaintProperties={},n.forEach((function(t){if("background"===t.type){var n=t.id;return e.originalPaintProperties[n]||(e.originalPaintProperties[n]={}),e.originalPaintProperties[n]["background-color"]=e.map.map.getPaintProperty(n,"background-color"),void e.map.map.setPaintProperty(n,"background-color","#f5f5f5")}if("raster"!==t.type&&"heatmap"!==t.type){var r=t.id;if(r.includes("selectable-"))return;if(e.originalPaintProperties[r]||(e.originalPaintProperties[r]={}),"symbol"===t.type){if(r.includes("selectable-")||r.includes("booked-")||r.includes("confirmed-selection"))return;var o=e.map.map.getLayer(r),i=o.source,a=o.sourceLayer,c=o.filter,s=[];try{var u=e.map.map.getSource(i);u&&"vector"===u.type&&a?s=e.map.map.querySourceFeatures(i,{sourceLayer:a,filter:c}):u&&"geojson"===u.type&&(s=u._data.features||[])}catch(t){console.error("❌ Error getting symbol features before layer hiding:",t)}e.originalPaintProperties[r]={"text-opacity":e.map.map.getPaintProperty(r,"text-opacity"),"icon-opacity":e.map.map.getPaintProperty(r,"icon-opacity"),"text-color":e.map.map.getPaintProperty(r,"text-color"),source:i,"source-layer":a,filter:c,features:s},e.map.map.setLayoutProperty(r,"visibility","none"),e.pendingSymbolFeatures||(e.pendingSymbolFeatures=[]),e.pendingSymbolFeatures.push({layerId:r,features:s})}else if("fill"===t.type){e.originalPaintProperties[r]["fill-opacity"]=e.map.map.getPaintProperty(r,"fill-opacity"),e.originalPaintProperties[r]["fill-color"]=e.map.map.getPaintProperty(r,"fill-color");var l=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["fill-opacity"],.5],h=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["fill-color"],"#f7f7f8"];e.map.map.setPaintProperty(r,"fill-color",h),e.map.map.setPaintProperty(r,"fill-opacity",l)}else if("line"===t.type){e.originalPaintProperties[r]["line-opacity"]=e.map.map.getPaintProperty(r,"line-opacity"),e.originalPaintProperties[r]["line-color"]=e.map.map.getPaintProperty(r,"line-color");var f=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["line-opacity"],.6],p=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["line-color"],"#AAAAAA"];e.map.map.setPaintProperty(r,"line-color",p),e.map.map.setPaintProperty(r,"line-opacity",f)}else if("circle"===t.type){e.originalPaintProperties[r]["circle-opacity"]=e.map.map.getPaintProperty(r,"circle-opacity"),e.originalPaintProperties[r]["circle-color"]=e.map.map.getPaintProperty(r,"circle-color");var d=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["circle-opacity"]||1,.5],y=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["circle-color"],"#CCCCCC"];e.map.map.setPaintProperty(r,"circle-color",y),e.map.map.setPaintProperty(r,"circle-opacity",d)}else if("fill-extrusion"===t.type){var g=e.map.map.getLayer(r),m=g.source,v=g.sourceLayer,M=g.filter,b=[];try{var w=e.map.map.getSource(m);w&&"vector"===w.type&&v?b=e.map.map.querySourceFeatures(m,{sourceLayer:v,filter:M}):w&&"geojson"===w.type&&(b=w._data.features||[])}catch(t){console.error("❌ Error getting features before layer removal:",t)}e.originalPaintProperties[r]={"fill-extrusion-color":e.map.map.getPaintProperty(r,"fill-extrusion-color"),"fill-extrusion-height":e.map.map.getPaintProperty(r,"fill-extrusion-height"),"fill-extrusion-opacity":e.map.map.getPaintProperty(r,"fill-extrusion-opacity"),source:m,"source-layer":v,filter:M,features:b},e.map.map.removeLayer(r),e.pendingExtrusionFeatures||(e.pendingExtrusionFeatures=[]),e.pendingExtrusionFeatures.push({layerId:r,features:b})}}}))}},{key:"processPendingSymbolFeatures",value:function(){var t=this;this.pendingSymbolFeatures&&0!==this.pendingSymbolFeatures.length&&(this.pendingSymbolFeatures.forEach((function(e){var n=e.layerId,r=e.features;t.addSymbolFeaturesToBookedLabels(r,n)})),this.pendingSymbolFeatures=[])}},{key:"addSymbolFeaturesToBookedLabels",value:function(t,e){if(0!==t.length)try{var n=this.map.map.getSource("booked-labels");if(!n)return void console.error("❌ booked-labels source not found");var r=n._data.features||[],o=t.map((function(t){var e=t.properties.title||t.properties.name||"Untitled";return{type:"Feature",geometry:t.geometry,properties:xc(xc({},t.properties),{},{name:e})}})),i=[].concat(Ec(r),Ec(o));n.setData({type:"FeatureCollection",features:i}),this.map.map.getSource("booked-labels")._data.features}catch(t){console.error("❌ Error adding symbol features to booked-labels:",t)}}},{key:"addFeaturesToBookedContent",value:function(t,e){if(0!==t.length)try{var n=this.map.map.getSource("booked-content");if(!n)return void console.error("❌ booked-content source not found");var r=n._data.features||[],o=[].concat(Ec(r),Ec(t));n.setData({type:"FeatureCollection",features:o}),this.map.map.getSource("booked-content")._data.features}catch(t){console.error("❌ Error adding features to booked-content:",t)}}},{key:"processPendingExtrusionFeatures",value:function(){var t=this;this.pendingExtrusionFeatures&&0!==this.pendingExtrusionFeatures.length&&(this.pendingExtrusionFeatures.forEach((function(e){var n=e.layerId,r=e.features;t.addFeaturesToBookedContent(r,n)})),this.pendingExtrusionFeatures=[])}},{key:"getHighPrecisionFeatures",value:function(t,e){var n=this.originalPaintProperties[e];if(!n)return console.warn("⚠️ No layer info found, using original features"),t;var r=n.source,o=n["source-layer"],i=n.filter;try{if(!this.map.map.getSource(r))return console.error("❌ Source not found:",r),t;var a=this.map.map.querySourceFeatures(r,{sourceLayer:o,filter:i});return a.length>=t.length?a:t}catch(e){return console.error("❌ Error getting high-precision features:",e),t}}},{key:"removeGreyFillLayers",value:function(){var t=this;this.greyFillLayers&&(this.greyFillLayers.forEach((function(e){t.map.map.getLayer(e)&&t.map.map.removeLayer(e)})),this.greyFillLayers=[])}},{key:"applySelectableHoverEffects",value:function(){var t=this;this.selectionHoverHandler&&this.map.map.off("mousemove",this.selectionHoverHandler),this.selectionHoverHandler=function(e){if(t.interactionEnabled&&t.selectionCriteria){var n=t.map.map.queryRenderedFeatures(e.point,{layers:["selectable-fill-layer"]});if(t.currentHoveredFeatureId&&t.map.map.setFeatureState({source:"selectable-content",id:t.currentHoveredFeatureId},{hover:!1}),n.length>0){var r=n[0];t.currentHoveredFeatureId=r.properties.feature_id,t.map.map.setFeatureState({source:"selectable-content",id:t.currentHoveredFeatureId},{hover:!0}),t.map.map.getCanvas().style.cursor="pointer"}else t.currentHoveredFeatureId=null,t.map.map.getCanvas().style.cursor="default"}},this.map.map.on("mousemove",this.selectionHoverHandler),this.map.map.setPaintProperty("selectable-fill-layer","fill-color",["case",["boolean",["feature-state","hover"],!1],this.selectionHoverColor,"#FFFFFF"])}},{key:"createSelectionOpacityExpression",value:function(t){var e=.1;e=["case",["==",["get","type"],"floor"],1,e];for(var n=function(){var t=Ic(o[r],2),n=t[0],i=t[1];if(Array.isArray(i)){var a=i.map((function(t){return["==",["get",n],t]})),c=["any"].concat(Ec(a));e=["case",c,1,e]}else e=["case",["==",["get",n],i],1,e]},r=0,o=Object.entries(t);r<o.length;r++)n();return e}},{key:"createSelectionColorOpacityExpression",value:function(t,e){var n=this.map.map.getPaintProperty(e,"fill-extrusion-color");if(!n)return null;for(var r=["case",["==",["get","type"],"floor"],n],o=function(){var t=Ic(a[i],2),e=t[0],o=t[1];if(Array.isArray(o)){var c=o.map((function(t){return["==",["get",e],t]})),s=["any"].concat(Ec(c));r.push(s,n)}else r.push(["==",["get",e],o],n)},i=0,a=Object.entries(t);i<a.length;i++)o();return r.push("#2A2A2A"),r}},{key:"restoreLayerToSelectionMode",value:function(t){var e=this.map.map.getStyle().layers.find((function(e){return e.id===t}));if(e)if("fill"===e.type){var n=this.originalPaintProperties[t]["fill-color"];n&&this.map.map.setPaintProperty(t,"fill-color",n)}else if("fill-extrusion"===e.type){var r=this.selectionModeExpressions[t]||this.originalPaintProperties[t]["fill-extrusion-color"];r&&this.map.map.setPaintProperty(t,"fill-extrusion-color",r)}}},{key:"applyHoverToFeature",value:function(t,e,n){"fill"===n?this.map.map.setPaintProperty(t,"fill-color",["case",["==",["id"],e],this.selectionHoverColor,this.originalPaintProperties[t]["fill-color"]||["get","color"]||0]):"fill-extrusion"===n&&this.map.map.setPaintProperty(t,"fill-extrusion-color",["case",["==",["id"],e],this.selectionHoverColor,this.selectionModeExpressions[t]||this.originalPaintProperties[t]["fill-extrusion-color"]||["get","color"]||0])}},{key:"applySelectionHoverEffects",value:function(t){var e=this;this.selectionHoverHandler=function(t){if(e.interactionEnabled&&e.selectionCriteria){var n=e.map.map.queryRenderedFeatures(t.point).find((function(t){return"fill"===t.layer.type||"fill-extrusion"===t.layer.type}));if(n){var r=n.layer.id,o=n.id;e.currentHoveredLayerId===r&&e.currentHoveredFeatureId===o||(e.currentHoveredLayerId&&e.restoreLayerToSelectionMode(e.currentHoveredLayerId),e.featureMatchesCriteria(n.properties,e.selectionCriteria)?(e.currentHoveredLayerId=r,e.currentHoveredFeatureId=o,e.applyHoverToFeature(r,o,n.layer.type),e.map.map.getCanvas().style.cursor="pointer"):(e.currentHoveredLayerId=null,e.currentHoveredFeatureId=null,e.map.map.getCanvas().style.cursor="default"))}else e.currentHoveredLayerId&&(e.restoreLayerToSelectionMode(e.currentHoveredLayerId),e.currentHoveredLayerId=null,e.currentHoveredFeatureId=null),e.map.map.getCanvas().style.cursor="default"}},this.map.map.on("mousemove",this.selectionHoverHandler)}},{key:"removeSelectionVisuals",value:function(){for(var t=this,e=0,n=Object.entries(this.originalPaintProperties);e<n.length;e++){for(var r=Ic(n[e],2),o=r[0],i=r[1],a=0,c=Object.entries(i);a<c.length;a++){var s=Ic(c[a],2),u=s[0],l=s[1];"source"!==u&&"source-layer"!==u&&"filter"!==u&&"features"!==u&&void 0!==l&&this.map.map.setPaintProperty(o,u,l)}i.source&&this.map.map.setLayoutProperty(o,"visibility","visible")}var h=this.map.map.getStyle().layers,f=this.map.getCurrentFloor();h.forEach((function(e){if("background"!==e.type&&"raster"!==e.type&&"heatmap"!==e.type){var n=e.id;if(n.includes("selectable-"))return;if(t.map.map.getFilter(n)){var r=t.map.originalFilters[n];if(void 0!==r){t.map.map.setFilter(n,r);var o=["==",["get","_floor"],f];if(r){var i=["all",o,r];t.map.map.setFilter(n,i)}else t.map.map.setFilter(n,o)}}else{var a=["==",["get","_floor"],f];t.map.map.setFilter(n,a)}}})),this.originalPaintProperties={},this.selectionModeExpressions={},this.map.removeSelectableContentLayers(),this.removeGreyFillLayers(),this.currentHoveredLayerId=null,this.currentHoveredFeatureId=null,this.selectionHoverHandler&&(this.map.map.off("mousemove",this.selectionHoverHandler),this.selectionHoverHandler=null),this.pendingSymbolFeatures=[],this.pendingExtrusionFeatures=[],this.map.map.getCanvas().style.cursor="default"}},{key:"_handleClick",value:function(t){var e=this;if(this.interactionEnabled)if("selection"===this.map.getCurrentState()){var n=this.map.map.queryRenderedFeatures(t.point,{layers:["confirmed-selection-fill-layer","confirmed-selection-outline-layer","confirmed-selection-icon-layer"]});if(n.length>0){var r=n[0],o=r.properties.feature_id;return this.map.removeConfirmedSelectionFeature(o),this.map.fire("selection:featureDeselected",{feature:r,placementId:r.properties.placement_id||o}),void this.map.fire("selection:changed",{selectedContent:this._getSelectionFeaturesProperties(),selectionCount:this.map.getConfirmedSelectionFeatures().length})}var i=this.map.map.queryRenderedFeatures(t.point,{layers:["selectable-fill-layer"]});if(i.length>0){var a=i[0],c=a.properties.placement_id,s=a.properties.feature_id;if(!this.map.multiSelect){var u=this.map.getConfirmedSelectionFeatures();if(u.length>0){var l=u[0],h=l.properties.feature_id;this.map.fire("selection:featureDeselectedOptimistic",{placementId:l.properties.placement_id||h})}}if(this.map.addConfirmedSelectionFeature(a,!this.map.multiSelect),this.map.fire("selection:featureSelectedOptimistic",{feature:a}),c&&"unknown"!==c&&""!==c)this.map._stateCoordinator.setLoading(!0,"content"),this.map.getContentPlacementDetails(c).then((function(t){e.map.fire("selection:featureSelected",{feature:a,contentPlacement:t}),e.map.fire("selection:changed",{selectedContent:e._getSelectionFeaturesProperties(),selectionCount:e.map.getConfirmedSelectionFeatures().length})})).catch((function(t){console.error("❌ Error fetching content placement details:",t),e.map.removeConfirmedSelectionFeature(s),e.map.fire("selection:featureDeselectedOptimistic",{placementId:c||s})})).finally((function(){e.map._stateCoordinator.setLoading(!1,"content")}));else{var f=xc({placement_id:s,name:a.properties.name||"Unknown Feature",type:a.properties.type||"unknown"},a.properties);this.map.fire("selection:featureSelected",{feature:a,contentPlacement:f}),this.map.fire("selection:changed",{selectedContent:this._getSelectionFeaturesProperties(),selectionCount:this.map.getConfirmedSelectionFeatures().length})}return}}else{var p=(this.map.map.queryRenderedFeatures(t.point)||[]).filter((function(t){var e;return"symbol"===(null==t||null===(e=t.layer)||void 0===e?void 0:e.type)}));if(p.length>0){var d=p[0].properties.placement_id;d&&"unknown"!==d&&""!==d&&this.map.setToSelectedContentState([d])}}}},{key:"featureMatchesCriteria",value:function(t,e){for(var n=0,r=Object.entries(e);n<r.length;n++){var o=Ic(r[n],2),i=o[0],a=o[1],c=t[i];if(Array.isArray(a)){if(!a.includes(c))return!1}else if(c!==a)return!1}return!0}},{key:"_setupCursorHandling",value:function(){var t=this;this.map.map.on("mouseenter","confirmed-selection-fill-layer",(function(){t.map.map.getCanvas().style.cursor="pointer"})),this.map.map.on("mouseleave","confirmed-selection-fill-layer",(function(){t.map.map.getCanvas().style.cursor=""})),this.map.map.on("mouseenter","confirmed-selection-outline-layer",(function(){t.map.map.getCanvas().style.cursor="pointer"})),this.map.map.on("mouseleave","confirmed-selection-outline-layer",(function(){t.map.map.getCanvas().style.cursor=""})),this.map.map.on("mouseenter","confirmed-selection-icon-layer",(function(){t.map.map.getCanvas().style.cursor="pointer"})),this.map.map.on("mouseleave","confirmed-selection-icon-layer",(function(){t.map.map.getCanvas().style.cursor=""}))}}],r&&Ac(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(eo);function Qc(t){return Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qc(t)}function Rc(){Rc=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Qc(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Qc(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Yc(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Fc(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Yc(i,r,o,a,c,"next",t)}function c(t){Yc(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Vc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Hc(r.key),r)}}function Hc(t){var e=function(t){if("object"!=Qc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qc(e)?e:e+""}function Gc(t,e,n){return e=Wc(e),function(t,e){if(e&&("object"==Qc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zc()?Reflect.construct(e,n||[],Wc(t).constructor):e.apply(t,n))}function Zc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zc=function(){return!!t})()}function Wc(t){return Wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wc(t)}function qc(t,e){return qc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qc(t,e)}const Jc=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Gc(this,e,[n])).startSearchBox=new Kr,t.endSearchBox=new Kr,t.startContentPlacement=null,t.endContentPlacement=null,t.pathData=null,t.fromLocation=!1,t.searchApi=nn.getSearchApi(),t._initialize(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qc(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="directions-view",this.directionsViewHeader=document.createElement("div"),this.directionsViewHeader.className="directions-view-header",this.searchBoxesContainer=document.createElement("div"),this.searchBoxesContainer.className="directions-search-boxes-container",this.circlesAndSearchWrapper=document.createElement("div"),this.circlesAndSearchWrapper.className="directions-circles-search-wrapper";var t=this._createCirclesContainer();this.circlesAndSearchWrapper.appendChild(t),this.startSearchBox.searchBar.updateLeftButtonIcon("none"),this.startSearchBox.searchBar.updateRightButtonIcon("none"),this.endSearchBox.searchBar.updateLeftButtonIcon("none"),this.endSearchBox.searchBar.updateRightButtonIcon("none"),this.startSearchBox.searchBar.setPlaceholderText("Choose starting point"),this.endSearchBox.searchBar.setPlaceholderText("Choose destination"),this.searchBoxesContainer.appendChild(this.startSearchBox.getElement()),this.searchBoxesContainer.appendChild(this.endSearchBox.getElement()),this.circlesAndSearchWrapper.appendChild(this.searchBoxesContainer),this.directionsViewHeader.appendChild(this.circlesAndSearchWrapper),this._render(),this._setupEventListeners()}},{key:"_createCirclesContainer",value:function(){var t=document.createElement("div");t.className="directions-circles-container";var e=document.createElement("div");e.className="large-circle";var n=document.createElement("div");n.className="end-circle";var r=document.createElement("div");r.className="small-circle";var o=document.createElement("div");o.className="small-circle";var i=document.createElement("div");return i.className="small-circle",t.appendChild(e),t.appendChild(r),t.appendChild(o),t.appendChild(i),t.appendChild(n),t}},{key:"_render",value:function(){this.element.innerHTML="",this.element.appendChild(this.directionsViewHeader)}},{key:"_setupEventListeners",value:function(){this.startSearchBox.searchBar.on("focus",this._handleStartSearchBarFocus.bind(this)),this.startSearchBox.searchBar.on("blur",this._handleStartSearchBarBlur.bind(this)),this.startSearchBox.on("getSearchBarSuggestions",this._handleGettingStartSearchBarSuggestions.bind(this)),this.endSearchBox.searchBar.on("focus",this._handleEndSearchBarFocus.bind(this)),this.endSearchBox.searchBar.on("blur",this._handleEndSearchBarBlur.bind(this)),this.endSearchBox.on("getSearchBarSuggestions",this._handleGettingEndSearchBarSuggestions.bind(this)),this.startSearchBox.searchBarSuggestionsView.on("selectCell",this._handleStartContentPlacementSelect.bind(this)),this.endSearchBox.searchBarSuggestionsView.on("selectCell",this._handleEndContentPlacementSelect.bind(this))}},{key:"_handleGettingStartSearchBarSuggestions",value:(c=Fc(Rc().mark((function t(e){var n;return Rc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.query,this.fire("getStartSuggestions",{query:n});case 2:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"_handleGettingEndSearchBarSuggestions",value:(a=Fc(Rc().mark((function t(e){var n;return Rc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.query,this.fire("getEndSuggestions",{query:n});case 2:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"_handleStartContentPlacementSelect",value:(i=Fc(Rc().mark((function t(e){var n,r,o,i;return Rc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=e.result)||"gps-current-location"!==n.type){t.next=4;break}return this.fire("selectGpsCurrentLocation"),t.abrupt("return");case 4:return r=n.placement_id,o=n.catalog.content_title_key,this.startSearchBox.searchBar.setText(n.content.data[o]),t.next=9,this.searchApi.fetchContentPlacementDetails(r);case 9:i=t.sent,this.fire("selectedStartContentPlacement",{startContentPlacement:i}),this.updateView(i,this.endContentPlacement);case 12:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"enableGpsStartCell",value:function(){this.startSearchBox.setShowSuggestionsOnEmptyFocus(!0),this.startSearchBox.setPinnedResults([{type:"gps-current-location"}])}},{key:"disableGpsStartCell",value:function(){this.startSearchBox.setShowSuggestionsOnEmptyFocus(!1),this.startSearchBox.clearPinnedResults()}},{key:"focusStartInput",value:function(){var t=this.startSearchBox.searchBar.input;t&&t.focus(),this.startSearchBox.openSuggestionsView()}},{key:"_handleEndContentPlacementSelect",value:(o=Fc(Rc().mark((function t(e){var n,r,o,i;return Rc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.result,r=n.placement_id,o=n.catalog.content_title_key,this.endSearchBox.searchBar.setText(n.content.data[o]),t.next=6,this.searchApi.fetchContentPlacementDetails(r);case 6:i=t.sent,this.fire("selectedEndContentPlacement",{endContentPlacement:i}),this.updateView(this.startContentPlacement,i);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"_handleStartSearchBarFocus",value:function(){this.startSearchBox.searchBar.updateRightButtonIcon("search"),this.startSearchBox.searchBar.setPlaceholderText("Choose starting point")}},{key:"_handleEndSearchBarFocus",value:function(){this.endSearchBox.searchBar.updateRightButtonIcon("search")}},{key:"_handleStartSearchBarBlur",value:function(){this.startSearchBox.searchBar.updateRightButtonIcon("none")}},{key:"_handleEndSearchBarBlur",value:function(){this.endSearchBox.searchBar.updateRightButtonIcon("none")}},{key:"updateView",value:function(t,e){if(this.startContentPlacement=t,this.endContentPlacement=e,t&&e){var n=t.content.data[t.catalog.content_title_key];this.startSearchBox.searchBar.setText(n);var r=e.content.data[e.catalog.content_title_key];this.endSearchBox.searchBar.setText(r),this.fire("initiate:findPath",{startContentPlacementId:t.placement_id,endContentPlacementId:e.placement_id})}else if(t){var o=t.content.data[t.catalog.content_title_key];this.startSearchBox.searchBar.setText(o),this.endSearchBox.searchBar.setText(""),this.endSearchBox.searchBar.input.focus()}else if(e){var i=e.content.data[e.catalog.content_title_key];this.endSearchBox.searchBar.setText(i),this.startSearchBox.searchBar.setText(""),this.fromLocation&&this.fire("initiate:findPathFromLocation",{endContentPlacement:e})}}},{key:"setNewPath",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.fromLocation=e;var n=t.legs[0].steps[0];n.path,n.path,n.path,e&&this.startSearchBox.searchBar.setPlaceholderText("Your location"),this.pathData=t,this._render()}},{key:"getElement",value:function(){return this.element}},{key:"showLoading",value:function(){this.loadingElement&&(this.loadingElement.style.display="flex")}},{key:"hideLoading",value:function(){this.loadingElement&&(this.loadingElement.style.display="none")}}],r&&Vc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a,c}(Sn);n(975);function Kc(t){return Kc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kc(t)}function $c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Xc(r.key),r)}}function Xc(t){var e=function(t){if("object"!=Kc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Kc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Kc(e)?e:e+""}function ts(t,e,n){return e=ns(e),function(t,e){if(e&&("object"==Kc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,es()?Reflect.construct(e,n||[],ns(t).constructor):e.apply(t,n))}function es(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(es=function(){return!!t})()}function ns(t){return ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ns(t)}function rs(t,e){return rs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},rs(t,e)}const os=function(t){function e(){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=ts(this,e,[n])).pathData=null,t.legSelector=null,t.legSelectorContainerName="leg-selector",t.selectedLegIndex=0,t.stepsVisible=!0,t.toggleButton=null,t.floorData=n.floorData||[],t._initialize(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rs(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="steps-view",this._render()}},{key:"_createToggleButton",value:function(){var t=document.createElement("button");return t.className="toggle-steps-button",t.textContent=this.stepsVisible?"Hide Steps":"Show Steps",t.addEventListener("click",this._toggleStepsVisibility.bind(this)),t}},{key:"_toggleStepsVisibility",value:function(){this.stepsVisible=!this.stepsVisible,this._render()}},{key:"_createLegSelector",value:function(t){var e=this,n=[];t.forEach((function(t){var r,o=(null===(r=e.floorData[t.floor])||void 0===r?void 0:r.name)||"Floor ".concat(t.floor);n.push(o)}));var r=new wo(n,{container:this.legSelectorContainerName});return r.on("".concat(this.legSelectorContainerName,":selectNew"),this._handleLegSelectorSelect.bind(this)),r}},{key:"_handleLegSelectorSelect",value:function(t){var e=t.index;e!==this.selectedLegIndex&&(this.selectedLegIndex=e,this.fire("legSelect",t),this._render())}},{key:"_render",value:function(){var t=this;if(this.element.innerHTML="",this.pathData){this.element.style.display="",this.pathData.legs.length>1&&(this.legSelector=this._createLegSelector(this.pathData.legs),this.legSelector.selectButtonAtIndex(this.selectedLegIndex),this.element.appendChild(this.legSelector.getElement()));var e=document.createElement("div");if(e.className="steps-container",this.stepsVisible){var n=document.createElement("ul"),r=this.pathData.legs[this.selectedLegIndex];r.steps.forEach((function(e,o){var i=document.createElement("li");0!==t.selectedLegIndex&&t.pathData.legs.slice(0,t.selectedLegIndex).reduce((function(t,e){return t+e.steps.length}),0);var a=document.createElement("div");a.className="step-container";var c=document.createElement("img");c.className="step-icon","left"===e.instruction?c.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTI2IDRINkM1LjQ2OTU3IDQgNC45NjA4NiA0LjIxMDcxIDQuNTg1NzkgNC41ODU3OUM0LjIxMDcxIDQuOTYwODYgNCA1LjQ2OTU3IDQgNlYyNkM0IDI2LjUzMDQgNC4yMTA3MSAyNy4wMzkxIDQuNTg1NzkgMjcuNDE0MkM0Ljk2MDg2IDI3Ljc4OTMgNS40Njk1NyAyOCA2IDI4SDI2QzI2LjUzMDQgMjggMjcuMDM5MSAyNy43ODkzIDI3LjQxNDIgMjcuNDE0MkMyNy43ODkzIDI3LjAzOTEgMjggMjYuNTMwNCAyOCAyNlY2QzI4IDUuNDY5NTcgMjcuNzg5MyA0Ljk2MDg2IDI3LjQxNDIgNC41ODU3OUMyNy4wMzkxIDQuMjEwNzEgMjYuNTMwNCA0IDI2IDRaTTI2IDI2SDZWNkgyNlYyNlpNMTAuMjkyNSAxNi43MDc1QzEwLjE5OTUgMTYuNjE0NiAxMC4xMjU4IDE2LjUwNDMgMTAuMDc1NCAxNi4zODI5QzEwLjAyNTEgMTYuMjYxNSA5Ljk5OTIxIDE2LjEzMTQgOS45OTkyMSAxNkM5Ljk5OTIxIDE1Ljg2ODYgMTAuMDI1MSAxNS43Mzg1IDEwLjA3NTQgMTUuNjE3MUMxMC4xMjU4IDE1LjQ5NTcgMTAuMTk5NSAxNS4zODU0IDEwLjI5MjUgMTUuMjkyNUwxNC4yOTI1IDExLjI5MjVDMTQuNDgwMSAxMS4xMDQ5IDE0LjczNDYgMTAuOTk5NCAxNSAxMC45OTk0QzE1LjI2NTQgMTAuOTk5NCAxN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aIiBmaWxsPSIjODA4MDgwIi8+Cjwvc3ZnPgo="),a.appendChild(c);var s=document.createElement("div");s.className="step-details";var u=document.createElement("div");if(u.className="step-instruction",u.textContent=e.text,s.appendChild(u),o!==r.steps.length-1){var l=document.createElement("div");l.className="step-distance";var h=parseFloat(e.distance.toFixed(0));"Feet"===t.pathData.unit?h+=" ft":"Meters"===t.pathData.unit&&(h+=" m"),l.textContent=h,s.appendChild(l)}a.appendChild(s),i.appendChild(a),n.appendChild(i)})),e.appendChild(n),this.element.appendChild(e)}this.toggleButton=this._createToggleButton(),this.element.appendChild(this.toggleButton)}else this.element.style.display="none"}},{key:"clearSteps",value:function(){var t=this.element.querySelector(".steps-view");t&&t.remove()}},{key:"clear",value:function(){this.pathData=null,this._render()}},{key:"setNewPath",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.pathData=t,n&&(this.floorData=n),null!==e&&(this.stepsVisible=e),this.selectedLegIndex=0,this._render()}},{key:"getElement",value:function(){return this.element}}],r&&$c(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);var is=n(583);function as(t){return as="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},as(t)}function cs(){cs=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==as(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(as(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function ss(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function us(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ls(r.key),r)}}function ls(t){var e=function(t){if("object"!=as(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=as(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==as(e)?e:e+""}function hs(t,e,n){return e=ps(e),function(t,e){if(e&&("object"==as(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,fs()?Reflect.construct(e,n||[],ps(t).constructor):e.apply(t,n))}function fs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(fs=function(){return!!t})()}function ps(t){return ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ps(t)}function ds(t,e){return ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ds(t,e)}const ys=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=hs(this,e,[n]))._initialize(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ds(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="qr-code-view",this.textElement=document.createElement("p"),this.textElement.className="qr-code-text",this.textElement.innerText="Scan to continue on your phone",this.qrCodeContainer=document.createElement("div"),this.qrCodeContainer.className="qr-code-container",this.qrCodeCanvas=null,this.element.appendChild(this.textElement),this.element.appendChild(this.qrCodeContainer)}},{key:"updateQRCode",value:(o=cs().mark((function t(e){var n,r=arguments;return cs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:200,this.qrCodeCanvas&&(this.qrCodeContainer.removeChild(this.qrCodeCanvas),this.qrCodeCanvas=null),t.prev=2,this.qrCodeCanvas=document.createElement("canvas"),this.qrCodeCanvas.className="qr-code-canvas",t.next=7,is.toCanvas(this.qrCodeCanvas,e,{width:n,margin:2});case 7:this.qrCodeContainer.appendChild(this.qrCodeCanvas),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(2),console.error("Error generating QR code:",t.t0);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){ss(i,n,r,a,c,"next",t)}function c(t){ss(i,n,r,a,c,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})},{key:"show",value:function(){this.element.classList.add("visible")}},{key:"hide",value:function(){this.element.classList.remove("visible")}},{key:"getElement",value:function(){return this.element}}],r&&us(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}(Sn);function gs(t){return gs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gs(t)}function ms(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,vs(r.key),r)}}function vs(t){var e=function(t){if("object"!=gs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=gs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gs(e)?e:e+""}function Ms(t,e,n){return e=ws(e),function(t,e){if(e&&("object"==gs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,bs()?Reflect.construct(e,n||[],ws(t).constructor):e.apply(t,n))}function bs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(bs=function(){return!!t})()}function ws(t){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ws(t)}function js(t,e){return js=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},js(t,e)}var Ns={DENIED:{title:"Location access is off",body:"We couldn't use your location. Search for a starting point instead."},TIMEOUT:{title:"Couldn't get your location",body:"We couldn't read your location in time. Search for a starting point instead."},UNAVAILABLE:{title:"Couldn't get your location",body:"Your device didn't share a location. Search for a starting point instead."},NO_NODE:{title:"You're too far from this map",body:"We couldn't find a path near your location. Search for a starting point instead."},TOO_FAR:{title:"You're too far from this map",body:"You're not close enough to this map to start from your location. Search for a starting point instead."}};const Ds=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Ms(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&js(t,e)}(e,t),n=e,(r=[{key:"show",value:function(t,e,n){var r=this,o=Ns[e]||Ns.UNAVAILABLE,i=document.createElement("div");i.className="gps-fallback-popup-card";var a=document.createElement("div");a.className="gps-fallback-popup-title",a.textContent=o.title,i.appendChild(a);var c=document.createElement("div");c.className="gps-fallback-popup-body",c.textContent=o.body,i.appendChild(c);var s=document.createElement("button");if(s.className="gps-fallback-popup-ok",s.textContent="OK",s.addEventListener("click",(function(){r._resetModalStyles(t),t.hideModal(),"function"==typeof n&&n()})),i.appendChild(s),t.showModal(i),t.modalContainer){this._previousContainerBg=t.modalContainer.style.backgroundColor,t.modalContainer.style.backgroundColor="rgba(0, 0, 0, 0.35)";var u=t.modalContainer.querySelector(".waygo-map-modal-content");u&&(u.style.backgroundColor="transparent",u.style.width="auto",u.style.height="auto",u.style.maxWidth="none",u.style.maxHeight="none",u.style.boxShadow="none",u.style.display="flex",u.style.alignItems="center",u.style.justifyContent="center")}}},{key:"_resetModalStyles",value:function(t){t.modalContainer&&void 0!==this._previousContainerBg&&(t.modalContainer.style.backgroundColor=this._previousContainerBg,this._previousContainerBg=void 0)}}])&&ms(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sn);function Is(t){return Is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Is(t)}function Es(t,e,n){return(e=As(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ss(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ts(){Ts=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new x(r||[]);return o(a,"_invoke",{value:E(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function v(){}function M(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(L([])));j&&j!==n&&r.call(j,a)&&(b=j);var N=M.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Is(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=S(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Is(e)+" is not iterable")}return v.prototype=M,o(N,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:v,configurable:!0}),v.displayName=u(M,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,M):(t.__proto__=M,u(t,s,"GeneratorFunction")),t.prototype=Object.create(N),t},e.awrap=function(t){return{__await:t}},D(I.prototype),u(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new I(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(N),u(N,s,"Generator"),u(N,a,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Os(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function xs(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Os(i,r,o,a,c,"next",t)}function c(t){Os(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Ls(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,As(r.key),r)}}function As(t){var e=function(t){if("object"!=Is(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Is(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Is(e)?e:e+""}function ks(t,e,n){return e=_s(e),function(t,e){if(e&&("object"==Is(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Cs()?Reflect.construct(e,n||[],_s(t).constructor):e.apply(t,n))}function Cs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Cs=function(){return!!t})()}function zs(){return zs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=_s(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},zs.apply(null,arguments)}function _s(t){return _s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_s(t)}function Ps(t,e){return Ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ps(t,e)}const Bs=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=ks(this,e,[n])).directionsView=null,t.stepsView=null,t.map=null,t.searchApi=nn.getSearchApi(),t.startContentPlacement=null,t.endContentPlacement=null,t.fromLocation=!1,t.qrCodeView=null,t.qrCodeButton=null,t.pathData=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ps(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){var e;return this.map=t,this.container=document.createElement("div"),this.container.className="directions-control-container",this.directionsView=new Jc,this.stepsView=new os([],{floorData:(null===(e=this.map.mapData)||void 0===e?void 0:e.floors)||[]}),this.qrCodeView=new ys,this.container.appendChild(this.directionsView.getElement()),this.initializeEventListeners(),this.createDirectionsLineLayer(),this._attachResizeListener(),this._initialize(),this.hide(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=zs(_s(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){var t=this;this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("initiate:findPath",this._handleIntiateFindPath.bind(this)),this.map.on("initiate:findPathFromLocation",this._handleInitiateFindPathFromLocation.bind(this)),this.map.on("gps:fallback",this._handleGpsFallback.bind(this)),this.directionsView.on("getStartSuggestions",this._handleGettingStartSearchBarSuggestions.bind(this)),this.directionsView.on("getEndSuggestions",this._handleGettingEndSearchBarSuggestions.bind(this)),this.directionsView.on("initiate:findPath",(function(e){return t.map.initiateFindPath(e.startContentPlacementId,e.endContentPlacementId)})),this.directionsView.on("initiate:findPathFromLocation",(function(e){return t.map.initiateFindPathFromLocation(e.endContentPlacement)})),this.directionsView.on("selectedStartContentPlacement",this._handleStartContentPlacementSelected.bind(this)),this.directionsView.on("selectedEndContentPlacement",this._handleEndContentPlacementSelected.bind(this)),this.directionsView.on("selectGpsCurrentLocation",this._handleSelectGpsCurrentLocation.bind(this)),this.stepsView.on("legSelect",this._handleLegChange.bind(this))}},{key:"_handleEndContentPlacementSelected",value:function(t){var e,n,r=t.endContentPlacement;this.endContentPlacement=r;var o=(null===(e=this.map.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],i=(null===(n=this.map.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30,a=Cn(r.location,o,i),c=a.lat,s=[a.lon,c];if(!r.name&&r.catalog&&r.content){var u=r.catalog.content_title_key;if(u){var l=r.content.data[u];r.name=l}}r._floor=r.floor,this.map.addSelectedFeature(s,r)}},{key:"_handleStartContentPlacementSelected",value:function(t){var e,n,r=t.startContentPlacement;this.startContentPlacement=r;var o=(null===(e=this.map.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],i=(null===(n=this.map.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30,a=Cn(r.location,o,i),c=a.lat,s=[a.lon,c];if(!r.name&&r.catalog&&r.content){var u=r.catalog.content_title_key;if(u){var l=r.content.data[u];r.name=l}}r._floor=r.floor,this.map.clearHighlightedContentLayer(),this.map.addHighlightedFeature(s,r)}},{key:"_handleLegChange",value:function(t){var e=t.index;this.directionsView&&this.pathData&&this.updateMapForPathLeg(this.pathData.legs[e])}},{key:"_handleGettingStartSearchBarSuggestions",value:(l=xs(Ts().mark((function t(e){var n,r,o;return Ts().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.directionsView){t.next=2;break}return t.abrupt("return");case 2:if(n=e.query,r=++this.directionsView.startSearchBox.searchCount,""!==n){t.next=7;break}return this.directionsView.startSearchBox.searchBarSuggestionsView.updateResults([]),t.abrupt("return");case 7:if(this.map.mapData){t.next=9;break}return t.abrupt("return");case 9:return t.prev=11,t.next=14,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,n,0,5);case 14:o=t.sent,r===this.directionsView.startSearchBox.searchCount&&this.directionsView.startSearchBox.searchBarSuggestionsView.updateResults(o),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(11),be.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 21:case"end":return t.stop()}}),t,this,[[11,18]])}))),function(t){return l.apply(this,arguments)})},{key:"_handleGettingEndSearchBarSuggestions",value:(u=xs(Ts().mark((function t(e){var n,r,o;return Ts().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.directionsView){t.next=2;break}return t.abrupt("return");case 2:if(n=e.query,r=++this.directionsView.endSearchBox.searchCount,""!==n){t.next=7;break}return this.directionsView.endSearchBox.searchBarSuggestionsView.updateResults([]),t.abrupt("return");case 7:if(this.map.mapData){t.next=9;break}return t.abrupt("return");case 9:return t.prev=11,t.next=14,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,n,0,5);case 14:o=t.sent,r===this.directionsView.endSearchBox.searchCount&&this.directionsView.endSearchBox.searchBarSuggestionsView.updateResults(o),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(11),be.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 21:case"end":return t.stop()}}),t,this,[[11,18]])}))),function(t){return u.apply(this,arguments)})},{key:"_renderDesktopView",value:function(){if(this.directionsView){this.container.innerHTML="";var t=this.directionsView.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view"),this._shouldShowQRCodeButton()?(this.qrCodeButton&&this.qrCodeButton.parentNode||this._createQRCodeButton(),this.container.appendChild(this.qrCodeButton)):this.qrCodeButton&&this.qrCodeButton.parentNode&&this.qrCodeButton.parentNode.removeChild(this.qrCodeButton),this.container.appendChild(this.stepsView.getElement())}else console.warn("⚠️ DirectionsControl: directionsView is null")}},{key:"_renderMobileView",value:function(){if(this.directionsView){this.container.innerHTML="";var t=this.directionsView.getElement();this.container.appendChild(t),this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view"),this._shouldShowQRCodeButton()?(this.qrCodeButton&&this.qrCodeButton.parentNode||this._createQRCodeButton(),this.container.appendChild(this.qrCodeButton)):this.qrCodeButton&&this.qrCodeButton.parentNode&&this.qrCodeButton.parentNode.removeChild(this.qrCodeButton),this.container.appendChild(this.stepsView.getElement())}else console.warn("⚠️ DirectionsControl: directionsView is null")}},{key:"createDirectionsLineLayer",value:function(){this.map.map.addSource("directionsLineSource",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"LineString",coordinates:[]}}}),this.map.map.addLayer({id:"directionsLineLayer",type:"line",source:"directionsLineSource",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#333333","line-width":8}}),this.map.map.moveLayer("directionsLineLayer","FIRST_ELEVATED_FEATURE")}},{key:"updateMapForPathLeg",value:function(t){var e,n;this.clearLineData();var r=[];t.steps.forEach((function(t,e){r.push.apply(r,function(t){return function(t){if(Array.isArray(t))return Ss(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ss(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ss(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(0===e?t.path:t.path.slice(1)))}));var o=(null===(e=this.map.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],i=(null===(n=this.map.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30,a=zn(r,o,i);this._updateMapLineData(a,t.floor),this.map.getCurrentFloor()!==t.floor&&this.map.updateFloor(t.floor,!1)}},{key:"_updateMapLineData",value:function(t,e){this.map.map.getSource("directionsLineSource").setData({type:"Feature",properties:{_floor:e},geometry:{type:"LineString",coordinates:t}});var n=new mapboxgl.LngLatBounds;t.forEach((function(t){n.extend(t)})),"desktop"===this.currentViewType?this.map.map.fitBounds(n,Es(Es(Es({padding:200},"padding",{top:200,bottom:200,left:500,right:150}),"maxZoom",18),"duration",1e3)):this.map.map.fitBounds(n,{padding:{top:350,bottom:60,left:80,right:100},maxZoom:18,duration:1e3})}},{key:"clearLineData",value:function(){this.map.map.getSource("directionsLineSource").setData({type:"Feature",properties:{},geometry:{type:"LineString",coordinates:[]}})}},{key:"_handleDefaultState",value:function(){this.hide(),this.clearData()}},{key:"_handleSearchState",value:function(t){t.query,t.results,this.hide(),this.clearData()}},{key:"_handleSelectedContentState",value:function(t){t.contentPlacementIds,t.selectedContentPlacement,this.hide(),this.directionsView.updateView(null,null),this.clearData(),this.map.clearHighlightedContentLayer()}},{key:"_handleSetupState",value:function(){this.hide()}},{key:"clearData",value:function(){this.pathData=null,this.clearLineData(),this.stepsView.clear(),this.qrCodeButton&&this.qrCodeButton.parentNode&&this.qrCodeButton.parentNode.removeChild(this.qrCodeButton)}},{key:"_handleDirectionsState",value:(s=xs(Ts().mark((function t(e){var n,r,o,i,a,c,s,u,l,h,f,p,d,y,g,m,v,M,b,w,j,N,D,I,E,S=this;return Ts().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.startContentPlacement,i=e.endContentPlacement,a=e.startNodeId,this.clearData(),"desktop"===this.currentViewType?this._renderDesktopView():this._renderMobileView(),this.show(),this.startContentPlacement=o,this.endContentPlacement=i,this.directionsView.updateView(o,i),this.map.shouldShowGpsCell&&this.map.shouldShowGpsCell()&&!o&&!a&&i?(this.directionsView.enableGpsStartCell(),setTimeout((function(){return S.directionsView.focusStartInput()}),50)):this.directionsView.disableGpsStartCell(),c=(null===(n=this.map.mapData)||void 0===n?void 0:n.reference_coordinate)||[0,0],s=(null===(r=this.map.mapData)||void 0===r?void 0:r.coordinate_scaling_multiplier)||30,o&&(u=Cn(o.location,c,s),l=u.lat,h=u.lon,f=[h,l],o.name||o.catalog&&o.content&&(p=o.catalog.content_title_key)&&(d=o.content.data[p],o.name=d),o._floor=o.floor,this.map.clearHighlightedContentLayer(),this.map.addHighlightedFeature(f,o)),!i){t.next=27;break}if(y=Cn(i.location,c,s),g=y.lat,m=y.lon,v=[m,g],i.name||i.catalog&&i.content&&(M=i.catalog.content_title_key)&&(b=i.content.data[M],i.name=b),i._floor=i.floor,this.map.addSelectedFeature(v,i),w=null,null!=a&&""!==a?(w=a,console.log("�� DirectionsControl: Using provided startNodeId:",a)):this.map.location&&!o&&(w=this.map.location,console.log("�� DirectionsControl: Using map.location:",this.map.location)),!w){t.next=27;break}return console.log("�� DirectionsControl: Finding path from node to end placement, nodeId:",w),t.next=24,this.map.findPathFromNodeToPlacement(w,i.placement_id);case 24:this.pathData=t.sent,console.log("�� DirectionsControl: Path data received:",!!this.pathData),this.pathData?(this.fromLocation=!0,this.directionsView.setNewPath(this.pathData,!0),j=this.pathData.legs[0].steps[0].path[0],N=Cn(j,c,s),D=N.lat,I=N.lon,E=[I,D],this.map.addHighlightedFeature(E,{_floor:this.pathData.legs[0].floor,name:"Start"}),"mobile"===this.currentViewType?this.stepsView.setNewPath(this.pathData,!1,this.map.mapData.floors):this.stepsView.setNewPath(this.pathData,!0,this.map.mapData.floors),this.updateMapForPathLeg(this.pathData.legs[0]),"desktop"===this.currentViewType?this._renderDesktopView():this._renderMobileView()):console.warn("⚠️ DirectionsControl: No path data returned");case 27:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"_handleInitiateFindPathFromLocation",value:(c=xs(Ts().mark((function t(e){var n;return Ts().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log("�� DirectionsControl: _handleInitiateFindPathFromLocation called",e),n=e.endContentPlacement,!this.map.location||!n){t.next=7;break}return t.next=5,this.map.findPathFromNodeToPlacement(this.map.location,n.placement_id);case 5:this.pathData=t.sent,this.pathData&&(this.fromLocation=!0,this.directionsView.setNewPath(this.pathData,!0),"mobile"===this.currentViewType?this.stepsView.setNewPath(this.pathData,!1,this.map.mapData.floors):this.stepsView.setNewPath(this.pathData,!0,this.map.mapData.floors),this.updateMapForPathLeg(this.pathData.legs[0]),"desktop"===this.currentViewType?this._renderDesktopView():this._renderMobileView());case 7:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"_handleIntiateFindPath",value:(a=xs(Ts().mark((function t(e){var n,r;return Ts().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.startContentPlacementId,r=e.endContentPlacementId,t.next=3,this.map.findPath(n,r);case 3:this.pathData=t.sent,this.fromLocation=!1,this.directionsView.setNewPath(this.pathData),"mobile"===this.currentViewType?this.stepsView.setNewPath(this.pathData,!1,this.map.mapData.floors):this.stepsView.setNewPath(this.pathData,!0,this.map.mapData.floors),this.updateMapForPathLeg(this.pathData.legs[0]),"desktop"===this.currentViewType?this._renderDesktopView():this._renderMobileView();case 9:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"_handleSelectDirectionsButton",value:function(t){t.placementId}},{key:"_handleSelectGpsCurrentLocation",value:(i=xs(Ts().mark((function t(){return Ts().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.endContentPlacement){t.next=3;break}return console.warn("⚠️ DirectionsControl: GPS cell selected but no end placement set"),t.abrupt("return");case 3:return t.next=5,this.map.useCurrentLocation(this.endContentPlacement.placement_id);case 5:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"_handleGpsFallback",value:function(t){var e=this,n=t.reason;this.gpsFallbackPopup||(this.gpsFallbackPopup=new Ds),this.gpsFallbackPopup.show(this.map,n,(function(){e.map.shouldShowGpsCell&&e.map.shouldShowGpsCell()?setTimeout((function(){return e.directionsView.focusStartInput()}),50):e.directionsView.disableGpsStartCell()}))}},{key:"_render",value:function(){}},{key:"_shouldShowQRCodeButton",value:function(){return!!this.map.location&&!1!==this.map.options.showQRCodeInKioskMode&&!!this.pathData&&!!this.endContentPlacement}},{key:"_createQRCodeButton",value:function(){this.qrCodeButton=document.createElement("button"),this.qrCodeButton.className="qr-code-button";var t=document.createElement("div");t.className="qr-code-button-icon";var e=document.createElement("img");e.src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0ic2l6ZS02Ij4KICA8cGF0aCBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Ik0zLjc1IDQuODc1YzAtLjYyMS41MDQtMS4xMjUgMS4xMjUtMS4xMjVoNC41Yy42MjEgMCAxLjEyNS41MDQgMS4xMjUgMS4xMjV2NC41YzAgLjYyMS0uNTA0IDEuMTI1LTEuMTI1IDEuMTI1aC00LjVBMS4xMjUgMS4xMjUgMCAwIDEgMy43NSA5LjM3NXYtNC41Wk0zLjc1IDE0LjYyNWMwLS42MjEuNTA0LTEuMTI1IDEuMTI1LTEuMTI1aDQuNWMuNjIxIDAgMS4xMjUuNTA0IDEuMTI1IDEuMTI1djQuNWMwIC42MjEtLjUwNCAxLjEyNS0xLjEyNSAxLjEyNWgtNC41YTEuMTI1IDEuMTI1IDAgMCAxLTEuMTI1LTEuMTI1di00LjVaTTEzLjUgNC44NzVjMC0uNjIxLjUwNC0xLjEyNSAxLjEyNS0xLjEyNWg0LjVjLjYyMSAwIDEuMTI1LjUwNCAxLjEyNSAxLjEyNXY0LjVjMCAuNjIxLS41MDQgMS4xMjUtMS4xMjUgMS4xMjVoLTQuNUExLjEyNSAxLjEyNSAwIDAgMSAxMy41IDkuMzc1di00LjVaIiAvPgogIDxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTYuNzUgNi43NWguNzV2Ljc1aC0uNzV2LS43NVpNNi43NSAxNi41aC43NXYuNzVoLS43NXYtLjc1Wk0xNi41IDYuNzVoLjc1di43NWgtLjc1di0uNzVaTTEzLjUgMTMuNWguNzV2Ljc1aC0uNzV2LS43NVpNMTMuNSAxOS41aC43NXYuNzVoLS43NXYtLjc1Wk0xOS41IDEzLjVoLjc1di43NWgtLjc1di0uNzVaTTE5LjUgMTkuNWguNzV2Ljc1aC0uNzV2LS43NVpNMTYuNSAxNi41aC43NXYuNzVoLS43NXYtLjc1WiIgLz4KPC9zdmc+Cg==",e.alt="QR Code",t.appendChild(e);var n=document.createElement("div");n.className="qr-code-button-text",n.textContent="Continue on your phone ->",this.qrCodeButton.appendChild(t),this.qrCodeButton.appendChild(n),this.qrCodeButton.addEventListener("click",this._showQRCodeModal.bind(this))}},{key:"_generateQRCodeURL",value:function(){if(!this.map.mapData||!this.endContentPlacement)return null;var t,e=this.map.mapData.map_id,n=this.map.mapData.map_view_id,r=this.endContentPlacement.placement_id;if(this.fromLocation)t=this.map.location;else{if(!this.startContentPlacement)return null;t=this.startContentPlacement.placement_id}return"https://maps.waygomaps.com/".concat(e,"/").concat(n,"/directions/").concat(t,"/").concat(r)}},{key:"_showQRCodeModal",value:(o=xs(Ts().mark((function t(){var e,n,r,o,i,a,c=this;return Ts().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this._generateQRCodeURL()){t.next=4;break}return console.warn("⚠️ DirectionsControl: No URL generated for QR code"),t.abrupt("return");case 4:return(r=document.createElement("div")).className="qr-code-modal-card",(o=document.createElement("button")).className="qr-code-modal-close",(i=document.createElement("img")).src=yr,i.alt="Close",o.appendChild(i),o.addEventListener("click",(function(){c.map.hideModal()})),r.appendChild(o),t.next=16,this.qrCodeView.updateQRCode(n,250);case 16:r.appendChild(this.qrCodeView.getElement()),this.map.showModal(r),(a=null===(e=this.map.modalContainer)||void 0===e?void 0:e.querySelector(".waygo-map-modal-content"))&&(a.style.backgroundColor="transparent",a.style.width="auto",a.style.height="auto",a.style.maxWidth="none",a.style.maxHeight="none");case 20:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})}],r&&Ls(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a,c,s,u,l}(eo);function Us(t){return Us="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Us(t)}function Qs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Rs(r.key),r)}}function Rs(t){var e=function(t){if("object"!=Us(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Us(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Us(e)?e:e+""}function Ys(t,e,n){return e=Hs(e),function(t,e){if(e&&("object"==Us(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Fs()?Reflect.construct(e,n||[],Hs(t).constructor):e.apply(t,n))}function Fs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Fs=function(){return!!t})()}function Vs(){return Vs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Hs(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Vs.apply(null,arguments)}function Hs(t){return Hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hs(t)}function Gs(t,e){return Gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gs(t,e)}const Zs=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Ys(this,e,[n])).floorSelectorContainerName="floor-selector",t.floorSelector=new wo([],{container:"floor-selector",allowsToggle:!1}),t.map=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gs(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){this.map=t,this.container=document.createElement("div"),this.container.className="floor-selector-control-container";var e=this.floorSelector.getElement();return this.container.appendChild(e),this.initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=Vs(Hs(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.floorSelector.on("".concat(this.floorSelectorContainerName,":selectNew"),this._handleFloorSelectorSelect.bind(this)),this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("load",this._handleMapLoad.bind(this)),this.map.on("floorChanged",this._handleFloorChange.bind(this))}},{key:"_handleMapLoad",value:function(t){var e=t.mapData.floors,n=[];e.forEach((function(t){n.push(t.indicator)})),n.length<2||(this.floorSelector.updateItems(n),this.floorSelector.selectButtonAtIndex(this.map.options.floor))}},{key:"_handleFloorChange",value:function(t){var e=t.floorIndex;this.floorSelector.getIndexOfSelectedButton()!==e&&this.floorSelector.selectButtonAtIndex(e)}},{key:"_renderDesktopView",value:function(){var t=this.floorSelector.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view"),this.map.mapContainer.offsetWidth,this.floorSelector.setViewForDesktop()}},{key:"_renderMobileView",value:function(){var t=this.floorSelector.getElement();this.container.appendChild(t),this.map.mapContainer.offsetWidth,this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view"),this.floorSelector.setViewForMobile()}},{key:"_handleDefaultState",value:function(){this.show()}},{key:"_handleSelectedContentState",value:function(t){"mobile"===this.currentViewType?this.hide():this.show()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleFloorSelectorSelect",value:function(t){t.query;var e=t.index;e!==this.map.getCurrentFloor()&&this.map.updateFloor(e)}},{key:"_handleSearchState",value:function(t){t.query,t.results,this.show()}},{key:"_handleSetupState",value:function(){this.show()}}],r&&Qs(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(eo);"undefined"!=typeof window&&(n.p=window.location.origin+"/");const Ws={MapView:dr,SearchBox:Kr,SearchBoxControl:fo,CategoryBarControl:xo,SearchResultsControl:pi,ContentPlacementControl:rc,InteractionControl:Uc,SetupControl:Nc,DirectionsControl:Bs,FloorSelectorControl:Zs,setApiKey:nn.setApiKey.bind(nn)}})(),r.default})()));
|
|
3
3
|
//# sourceMappingURL=bundle.js.map
|