waygo-maps 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/bundle.js +1 -1
  2. package/{src/styles.css → dist/style.css} +4 -4
  3. package/package.json +10 -4
  4. package/.babelrc +0 -4
  5. package/dist/014017f831c78bc6fd64841d8678a8d1.svg +0 -1
  6. package/dist/0680802a9353dabec5dd7049f4cd6263.svg +0 -3
  7. package/dist/0d1982dbcd8e3e8fcfbede8c102ab2f6.svg +0 -3
  8. package/dist/1b7f16a1f8c7a51acb29667188b93cd4.svg +0 -3
  9. package/dist/216edfa842a5ed98698739b69479f38c.svg +0 -3
  10. package/dist/392dbb2b5523bec74bc9a88df3f43dcf.svg +0 -3
  11. package/dist/49f8ed3d44d3320ea78c5da3231d00ca.svg +0 -3
  12. package/dist/4afa21a73de906916b62dd0baefae8fa.svg +0 -3
  13. package/dist/4b9ae054d996b09c84d311ff59d62135.svg +0 -3
  14. package/dist/4fc911a49bb7b090cdeeaed8fec429d3.svg +0 -1
  15. package/dist/507fada530642f8f1084a961a554e5a5.svg +0 -3
  16. package/dist/5dddcb86c4e0b23bd0209f44fd342d98.svg +0 -3
  17. package/dist/5e7fb034cbde37bc0e6ea8d3e6e4d954.svg +0 -3
  18. package/dist/63aa91aee195b612708db336ad5020db.svg +0 -3
  19. package/dist/709b5ad35fbbdaa1c4b5222a276444fa.svg +0 -3
  20. package/dist/73b73ceab46aea8192b55d504089b7b7.svg +0 -3
  21. package/dist/7cf71b89208aed47ca8d698707c7c1a1.svg +0 -3
  22. package/dist/7d2fb7c25b2d12614aeb1b025a51b86f.svg +0 -4
  23. package/dist/95d40a1236e53e308fb691adb40560da.svg +0 -3
  24. package/dist/bf15a356e49a659ec20974a7168c76ec.svg +0 -12
  25. package/dist/bundle.js.LICENSE.txt +0 -1
  26. package/dist/d39d475496b3b4ce383f53bbf356f4f2.svg +0 -2
  27. package/dist/d8e06ee8b585e38158e77073a35d3cc1.svg +0 -3
  28. package/dist/da4aa51dbf8250628e654d4e01d44c06.svg +0 -3
  29. package/dist/e88ae66eec18595e40fc4b4bc894e4f6.svg +0 -3
  30. package/dist/f106fedfc261aa203f641adaf87ec68f.svg +0 -3
  31. package/dist/f8965838ad87362f7fd1507af2a45dfa.svg +0 -4
  32. package/index.html +0 -137
  33. package/src/Controls/CategoryBarControl.js +0 -94
  34. package/src/Controls/ContentPlacementControl.js +0 -326
  35. package/src/Controls/DirectionsControl.js +0 -198
  36. package/src/Controls/InteractionControl.js +0 -521
  37. package/src/Controls/SearchBoxControl.js +0 -123
  38. package/src/Controls/SearchResultsControl.js +0 -86
  39. package/src/WaygoMaps.js +0 -29
  40. package/src/api/ApiManager.js +0 -55
  41. package/src/api/MapApi.js +0 -15
  42. package/src/api/MapViewApi.js +0 -20
  43. package/src/api/SearchApi.js +0 -38
  44. package/src/assets/WaygoIcon.svg +0 -3
  45. package/src/assets/WaygoIconWhite.svg +0 -3
  46. package/src/assets/actionButtonIcons/missingIncorrect.svg +0 -3
  47. package/src/assets/actionButtonIcons/share.svg +0 -3
  48. package/src/assets/actionButtonIcons/signboard.svg +0 -3
  49. package/src/assets/actionButtonIcons/website.svg +0 -3
  50. package/src/assets/arrows/backArrow.svg +0 -3
  51. package/src/assets/arrows/leftArrow.svg +0 -3
  52. package/src/assets/arrows/leftBackArrow.svg +0 -3
  53. package/src/assets/arrows/rightArrow.svg +0 -3
  54. package/src/assets/cancel.svg +0 -4
  55. package/src/assets/directions.svg +0 -3
  56. package/src/assets/fonts/CircularXX-Book.woff2 +0 -0
  57. package/src/assets/fonts/CircularXX-Medium.woff2 +0 -0
  58. package/src/assets/fonts/CircularXX-Regular.woff2 +0 -0
  59. package/src/assets/location.svg +0 -3
  60. package/src/assets/locationPin.svg +0 -3
  61. package/src/assets/magnify.svg +0 -4
  62. package/src/assets/magnify_glass.svg +0 -1
  63. package/src/assets/missing.svg +0 -3
  64. package/src/assets/pin.svg +0 -3
  65. package/src/assets/pinOutlineIcon.svg +0 -3
  66. package/src/assets/search.svg +0 -3
  67. package/src/assets/volks.svg +0 -1
  68. package/src/assets/website.svg +0 -3
  69. package/src/components/ContentPlacementView/ContentChildButton.js +0 -37
  70. package/src/components/ContentPlacementView/ContentChildrenView.js +0 -55
  71. package/src/components/ContentPlacementView/ContentDetails.js +0 -159
  72. package/src/components/ContentPlacementView/ContentPlacementHeader.js +0 -44
  73. package/src/components/ContentPlacementView/ContentPlacementView.js +0 -84
  74. package/src/components/ContentPlacementView/ContextualLocationView.js +0 -33
  75. package/src/components/ContentPlacementView/DetailsView.js +0 -53
  76. package/src/components/DirectionsView/ContentStartEndCells.js +0 -48
  77. package/src/components/DirectionsView/DirectionsView.js +0 -322
  78. package/src/components/DirectionsView/StepsView.js +0 -43
  79. package/src/components/MapView/MapView.js +0 -403
  80. package/src/components/MapView/StateCoordinator.js +0 -23
  81. package/src/components/SearchBox/SearchBar.js +0 -173
  82. package/src/components/SearchBox/SearchBarSuggestionsView.js +0 -49
  83. package/src/components/SearchBox/SearchBarSuggestionsViewCell.js +0 -34
  84. package/src/components/SearchBox/SearchBox.js +0 -110
  85. package/src/components/SearchResultsView/SearchResultsView.js +0 -71
  86. package/src/components/SearchResultsView/SearchResultsViewCell.js +0 -34
  87. package/src/components/SliderBar.js +0 -161
  88. package/src/core/Component.js +0 -72
  89. package/src/core/Control.js +0 -31
  90. package/src/core/EventBus.js +0 -38
  91. package/src/core/Events.js +0 -38
  92. package/src/core/StateStore.js +0 -34
  93. package/src/index.js +0 -23
  94. package/src/utils/coordinateSystems.js +0 -48
  95. package/src/utils/debounce.js +0 -8
  96. package/src/utils/resourceLoader.js +0 -41
  97. package/test.json +0 -58
  98. package/webpack.config.js +0 -47
package/dist/bundle.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see bundle.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("mapbox-gl")):"function"==typeof define&&define.amd?define(["mapbox-gl"],e):"object"==typeof exports?exports.waygomaps=e(require("mapbox-gl")):t.waygomaps=e(t["mapbox-gl"])}(this,(t=>(()=>{"use strict";var e={253:e=>{e.exports=t}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!t||!/^http(s?):/.test(t));)t=n[o--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t})();var o={};r.d(o,{default:()=>sa});var i={};function a(t,e){return function(){return t.apply(e,arguments)}}r.r(i),r.d(i,{hasBrowserEnv:()=>ut,hasStandardBrowserEnv:()=>lt,hasStandardBrowserWebWorkerEnv:()=>ht,origin:()=>pt});const{toString:c}=Object.prototype,{getPrototypeOf:s}=Object,u=(l=Object.create(null),t=>{const e=c.call(t);return l[e]||(l[e]=e.slice(8,-1).toLowerCase())});var l;const f=t=>(t=t.toLowerCase(),e=>u(e)===t),h=t=>e=>typeof e===t,{isArray:p}=Array,d=h("undefined"),y=f("ArrayBuffer"),m=h("string"),v=h("function"),b=h("number"),g=t=>null!==t&&"object"==typeof t,w=t=>{if("object"!==u(t))return!1;const e=s(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},S=f("Date"),E=f("File"),O=f("Blob"),_=f("FileList"),P=f("URLSearchParams"),[j,x,k,L]=["ReadableStream","Request","Response","Headers"].map(f);function C(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),p(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 B(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 T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,R=t=>!d(t)&&t!==T,N=(A="undefined"!=typeof Uint8Array&&s(Uint8Array),t=>A&&t instanceof A);var A;const D=f("HTMLFormElement"),F=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),I=f("RegExp"),V=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};C(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},z="abcdefghijklmnopqrstuvwxyz",M="0123456789",H={DIGIT:M,ALPHA:z,ALPHA_DIGIT:z+z.toUpperCase()+M},U=f("AsyncFunction"),q={isArray:p,isArrayBuffer:y,isBuffer:function(t){return null!==t&&!d(t)&&null!==t.constructor&&!d(t.constructor)&&v(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||v(t.append)&&("formdata"===(e=u(t))||"object"===e&&v(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&y(t.buffer),e},isString:m,isNumber:b,isBoolean:t=>!0===t||!1===t,isObject:g,isPlainObject:w,isReadableStream:j,isRequest:x,isResponse:k,isHeaders:L,isUndefined:d,isDate:S,isFile:E,isBlob:O,isRegExp:I,isFunction:v,isStream:t=>g(t)&&v(t.pipe),isURLSearchParams:P,isTypedArray:N,isFileList:_,forEach:C,merge:function t(){const{caseless:e}=R(this)&&this||{},n={},r=(r,o)=>{const i=e&&B(n,o)||o;w(n[i])&&w(r)?n[i]=t(n[i],r):w(r)?n[i]=t({},r):p(r)?n[i]=r.slice():n[i]=r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&C(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(C(e,((e,r)=>{n&&v(e)?t[r]=a(e,n):t[r]=e}),{allOwnKeys:r}),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,a;const c={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)a=o[i],r&&!r(a,t,e)||c[a]||(e[a]=t[a],c[a]=!0);t=!1!==n&&s(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:u,kindOfTest:f,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(p(t))return t;let e=t.length;if(!b(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:D,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:V,freezeMethods:t=>{V(t,((e,n)=>{if(v(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];v(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 p(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:B,global:T,isContextDefined:R,ALPHABET:H,generateString:(t=16,e=H.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&v(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(g(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=p(t)?[]:{};return C(t,((t,e)=>{const i=n(t,r+1);!d(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:U,isThenable:t=>t&&(g(t)||v(t))&&v(t.then)&&v(t.catch)};function G(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)}q.inherits(G,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:q.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const W=G.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(G,K),Object.defineProperty(W,"isAxiosError",{value:!0}),G.from=(t,e,n,r,o,i)=>{const a=Object.create(W);return q.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),G.call(a,t.message,e,n,r,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const J=G;function Z(t){return q.isPlainObject(t)||q.isArray(t)}function Y(t){return q.endsWith(t,"[]")?t.slice(0,-2):t}function $(t,e,n){return t?t.concat(e).map((function(t,e){return t=Y(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const Q=q.toFlatObject(q,{},null,(function(t){return/^is[A-Z]/.test(t)})),X=function(t,e,n){if(!q.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!q.isUndefined(e[t])}))).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,c=(n.Blob||"undefined"!=typeof Blob&&Blob)&&q.isSpecCompliantForm(e);if(!q.isFunction(o))throw new TypeError("visitor must be a function");function s(t){if(null===t)return"";if(q.isDate(t))return t.toISOString();if(!c&&q.isBlob(t))throw new J("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(t)||q.isTypedArray(t)?c&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,n,o){let c=t;if(t&&!o&&"object"==typeof t)if(q.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(q.isArray(t)&&function(t){return q.isArray(t)&&!t.some(Z)}(t)||(q.isFileList(t)||q.endsWith(n,"[]"))&&(c=q.toArray(t)))return n=Y(n),c.forEach((function(t,r){!q.isUndefined(t)&&null!==t&&e.append(!0===a?$([n],r,i):null===a?n:n+"[]",s(t))})),!1;return!!Z(t)||(e.append($(o,n,i),s(t)),!1)}const l=[],f=Object.assign(Q,{defaultVisitor:u,convertValue:s,isVisitable:Z});if(!q.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!q.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),q.forEach(n,(function(n,i){!0===(!(q.isUndefined(n)||null===n)&&o.call(e,n,q.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e};function tt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function et(t,e){this._pairs=[],t&&X(t,this,e)}const nt=et.prototype;nt.append=function(t,e){this._pairs.push([t,e])},nt.toString=function(t){const e=t?function(e){return t.call(this,e,tt)}:tt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const rt=et;function ot(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function it(t,e,n){if(!e)return t;const r=n&&n.encode||ot,o=n&&n.serialize;let i;if(i=o?o(e,n):q.isURLSearchParams(e)?e.toString():new rt(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const at=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){q.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},ct={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},st={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:rt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ut="undefined"!=typeof window&&"undefined"!=typeof document,lt=(ft="undefined"!=typeof navigator&&navigator.product,ut&&["ReactNative","NativeScript","NS"].indexOf(ft)<0);var ft;const ht="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,pt=ut&&window.location.href||"http://localhost",dt={...i,...st},yt=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&&q.isArray(r)?r.length:i,c?(q.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&q.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&q.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(q.isFormData(t)&&q.isFunction(t.entries)){const n={};return q.forEachEntry(t,((t,r)=>{e(function(t){return q.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null},mt={transitional:ct,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=q.isObject(t);if(o&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return r?JSON.stringify(yt(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.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 X(t,new dt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return dt.isNode&&q.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=q.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return X(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(q.isString(t))try{return(0,JSON.parse)(t),q.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||mt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.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 J.from(t,J.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:dt.classes.FormData,Blob:dt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],(t=>{mt.headers[t]={}}));const vt=mt,bt=q.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"]),gt=Symbol("internals");function wt(t){return t&&String(t).trim().toLowerCase()}function St(t){return!1===t||null==t?t:q.isArray(t)?t.map(St):String(t)}function Et(t,e,n,r,o){return q.isFunction(r)?r.call(this,e,n):(o&&(e=n),q.isString(e)?q.isString(r)?-1!==e.indexOf(r):q.isRegExp(r)?r.test(e):void 0:void 0)}class Ot{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=wt(e);if(!o)throw new Error("header name must be a non-empty string");const i=q.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=St(t))}const i=(t,e)=>q.forEach(t,((t,n)=>o(t,n,e)));if(q.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(q.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]&&bt[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(q.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=wt(t)){const n=q.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(q.isFunction(e))return e.call(this,t,n);if(q.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=wt(t)){const n=q.findKey(this,t);return!(!n||void 0===this[n]||e&&!Et(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=wt(t)){const o=q.findKey(n,t);!o||e&&!Et(0,n[o],o,e)||(delete n[o],r=!0)}}return q.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&&!Et(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return q.forEach(this,((r,o)=>{const i=q.findKey(n,o);if(i)return e[i]=St(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]=St(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return q.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&q.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[gt]=this[gt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=wt(t);e[r]||(function(t,e){const n=q.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 q.isArray(t)?t.forEach(r):r(t),this}}Ot.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(Ot.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),q.freezeMethods(Ot);const _t=Ot;function Pt(t,e){const n=this||vt,r=e||n,o=_t.from(r.headers);let i=r.data;return q.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function jt(t){return!(!t||!t.__CANCEL__)}function xt(t,e,n){J.call(this,null==t?"canceled":t,J.ERR_CANCELED,e,n),this.name="CanceledError"}q.inherits(xt,J,{__CANCEL__:!0});const kt=xt;function Lt(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new J("Request failed with status code "+n.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}const Ct=(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,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),s-o<e)return;const h=u&&s-u;return h?Math.round(1e3*f/h):void 0}}(50,250);return function(t,e){let n=0;const r=1e3/e;let o=null;return function(){const e=!0===this,i=Date.now();if(e||i-n>r)return o&&(clearTimeout(o),o=null),n=i,t.apply(null,arguments);o||(o=setTimeout((()=>(o=null,n=Date.now(),t.apply(null,arguments))),r-(i-n)))}}((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,c=i-r,s=o(c);r=i;const u={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};u[e?"download":"upload"]=!0,t(u)}),n)},Bt=dt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(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=q.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0},Tt=dt.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const a=[t+"="+encodeURIComponent(e)];q.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),q.isString(r)&&a.push("path="+r),q.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 Rt(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 Nt=t=>t instanceof _t?{...t}:t;function At(t,e){e=e||{};const n={};function r(t,e,n){return q.isPlainObject(t)&&q.isPlainObject(e)?q.merge.call({caseless:n},t,e):q.isPlainObject(e)?q.merge({},e):q.isArray(e)?e.slice():e}function o(t,e,n){return q.isUndefined(e)?q.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!q.isUndefined(e))return r(void 0,e)}function a(t,e){return q.isUndefined(e)?q.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(Nt(t),Nt(e),!0)};return q.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=s[r]||o,a=i(t[r],e[r],r);q.isUndefined(a)&&i!==c||(n[r]=a)})),n}const Dt=t=>{const e=At({},t);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:c,auth:s}=e;if(e.headers=c=_t.from(c),e.url=it(Rt(e.baseURL,e.url),t.params,t.paramsSerializer),s&&c.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),q.isFormData(r))if(dt.hasStandardBrowserEnv||dt.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(dt.hasStandardBrowserEnv&&(o&&q.isFunction(o)&&(o=o(e)),o||!1!==o&&Bt(e.url))){const t=i&&a&&Tt.read(a);t&&c.set(i,t)}return e},Ft="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const r=Dt(t);let o=r.data;const i=_t.from(r.headers).normalize();let a,{responseType:c}=r;function s(){r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let u=new XMLHttpRequest;function l(){if(!u)return;const r=_t.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());Lt((function(t){e(t),s()}),(function(t){n(t),s()}),{data:c&&"text"!==c&&"json"!==c?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:r,config:t,request:u}),u=null}u.open(r.method.toUpperCase(),r.url,!0),u.timeout=r.timeout,"onloadend"in u?u.onloadend=l:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(l)},u.onabort=function(){u&&(n(new J("Request aborted",J.ECONNABORTED,r,u)),u=null)},u.onerror=function(){n(new J("Network Error",J.ERR_NETWORK,r,u)),u=null},u.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const e=r.transitional||ct;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new J(t,e.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,r,u)),u=null},void 0===o&&i.setContentType(null),"setRequestHeader"in u&&q.forEach(i.toJSON(),(function(t,e){u.setRequestHeader(e,t)})),q.isUndefined(r.withCredentials)||(u.withCredentials=!!r.withCredentials),c&&"json"!==c&&(u.responseType=r.responseType),"function"==typeof r.onDownloadProgress&&u.addEventListener("progress",Ct(r.onDownloadProgress,!0)),"function"==typeof r.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",Ct(r.onUploadProgress)),(r.cancelToken||r.signal)&&(a=e=>{u&&(n(!e||e.type?new kt(null,t,u):e),u.abort(),u=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(r.url);f&&-1===dt.protocols.indexOf(f)?n(new J("Unsupported protocol "+f+":",J.ERR_BAD_REQUEST,t)):u.send(o||null)}))},It=(t,e)=>{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 J?e:new kt(e instanceof Error?e.message:e))}};let i=e&&setTimeout((()=>{o(new J(`timeout ${e} of ms exceeded`,J.ETIMEDOUT))}),e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach((t=>{t&&(t.removeEventListener?t.removeEventListener("abort",o):t.unsubscribe(o))})),t=null)};t.forEach((t=>t&&t.addEventListener&&t.addEventListener("abort",o)));const{signal:c}=r;return c.unsubscribe=a,[c,()=>{i&&clearTimeout(i),i=null}]},Vt=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,o)=>{const i=async function*(t,e,n){for await(const r of t)yield*Vt(ArrayBuffer.isView(r)?r:await n(String(r)),e)}(t,e,o);let a=0;return new ReadableStream({type:"bytes",async pull(t){const{done:e,value:o}=await i.next();if(e)return t.close(),void r();let c=o.byteLength;n&&n(a+=c),t.enqueue(new Uint8Array(o))},cancel:t=>(r(t),i.return())},{highWaterMark:2})},Mt=(t,e)=>{const n=null!=t;return r=>setTimeout((()=>e({lengthComputable:n,total:t,loaded:r})))},Ht="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ut=Ht&&"function"==typeof ReadableStream,qt=Ht&&("function"==typeof TextEncoder?(Gt=new TextEncoder,t=>Gt.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer()));var Gt;const Wt=Ut&&(()=>{let t=!1;const e=new Request(dt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})(),Kt=Ut&&!!(()=>{try{return q.isReadableStream(new Response("").body)}catch(t){}})(),Jt={stream:Kt&&(t=>t.body)};var Zt;Ht&&(Zt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!Jt[t]&&(Jt[t]=q.isFunction(Zt[t])?e=>e[t]():(e,n)=>{throw new J(`Response type '${t}' is not supported`,J.ERR_NOT_SUPPORT,n)})})));const Yt={http:null,xhr:Ft,fetch:Ht&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:c,onUploadProgress:s,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:h}=Dt(t);u=u?(u+"").toLowerCase():"text";let p,d,[y,m]=o||i||a?It([o,i],a):[];const v=()=>{!p&&setTimeout((()=>{y&&y.unsubscribe()})),p=!0};let b;try{if(s&&Wt&&"get"!==n&&"head"!==n&&0!==(b=await(async(t,e)=>{const n=q.toFiniteNumber(t.getContentLength());return null==n?(async t=>null==t?0:q.isBlob(t)?t.size:q.isSpecCompliantForm(t)?(await new Request(t).arrayBuffer()).byteLength:q.isArrayBufferView(t)?t.byteLength:(q.isURLSearchParams(t)&&(t+=""),q.isString(t)?(await qt(t)).byteLength:void 0))(e):n})(l,r))){let t,n=new Request(e,{method:"POST",body:r,duplex:"half"});q.isFormData(r)&&(t=n.headers.get("content-type"))&&l.setContentType(t),n.body&&(r=zt(n.body,65536,Mt(b,Ct(s)),null,qt))}q.isString(f)||(f=f?"cors":"omit"),d=new Request(e,{...h,signal:y,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",withCredentials:f});let o=await fetch(d);const i=Kt&&("stream"===u||"response"===u);if(Kt&&(c||i)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=o[e]}));const e=q.toFiniteNumber(o.headers.get("content-length"));o=new Response(zt(o.body,65536,c&&Mt(e,Ct(c,!0)),i&&v,qt),t)}u=u||"text";let a=await Jt[q.findKey(Jt,u)||"text"](o,t);return!i&&v(),m&&m(),await new Promise(((e,n)=>{Lt(e,n,{data:a,headers:_t.from(o.headers),status:o.status,statusText:o.statusText,config:t,request:d})}))}catch(e){if(v(),e&&"TypeError"===e.name&&/fetch/i.test(e.message))throw Object.assign(new J("Network Error",J.ERR_NETWORK,t,d),{cause:e.cause||e});throw J.from(e,e&&e.code,t,d)}})};q.forEach(Yt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const $t=t=>`- ${t}`,Qt=t=>q.isFunction(t)||null===t||!1===t,Xt=t=>{t=q.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,!Qt(n)&&(r=Yt[(e=String(n)).toLowerCase()],void 0===r))throw new J(`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($t).join("\n"):" "+$t(t[0]):"as no adapter specified";throw new J("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function te(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new kt(null,t)}function ee(t){return te(t),t.headers=_t.from(t.headers),t.data=Pt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Xt(t.adapter||vt.adapter)(t).then((function(e){return te(t),e.data=Pt.call(t,t.transformResponse,e),e.headers=_t.from(e.headers),e}),(function(e){return jt(e)||(te(t),e&&e.response&&(e.response.data=Pt.call(t,t.transformResponse,e.response),e.response.headers=_t.from(e.response.headers))),Promise.reject(e)}))}const ne={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{ne[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const re={};ne.transitional=function(t,e,n){function r(t,e){return"[Axios v1.7.2] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new J(r(o," has been removed"+(e?" in "+e:"")),J.ERR_DEPRECATED);return e&&!re[o]&&(re[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 oe={assertOptions:function(t,e,n){if("object"!=typeof t)throw new J("options must be an object",J.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 J("option "+i+" must be "+n,J.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new J("Unknown option "+i,J.ERR_BAD_OPTION)}},validators:ne},ie=oe.validators;class ae{constructor(t){this.defaults=t,this.interceptors={request:new at,response:new at}}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=At(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&oe.assertOptions(n,{silentJSONParsing:ie.transitional(ie.boolean),forcedJSONParsing:ie.transitional(ie.boolean),clarifyTimeoutError:ie.transitional(ie.boolean)},!1),null!=r&&(q.isFunction(r)?e.paramsSerializer={serialize:r}:oe.assertOptions(r,{encode:ie.function,serialize:ie.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&q.merge(o.common,o[e.method]);o&&q.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=_t.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,f=0;if(!c){const t=[ee.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,s),l=t.length,u=Promise.resolve(e);f<l;)u=u.then(t[f++],t[f++]);return u}l=a.length;let h=e;for(f=0;f<l;){const t=a[f++],e=a[f++];try{h=t(h)}catch(t){e.call(this,t);break}}try{u=ee.call(this,h)}catch(t){return Promise.reject(t)}for(f=0,l=s.length;f<l;)u=u.then(s[f++],s[f++]);return u}getUri(t){return it(Rt((t=At(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}q.forEach(["delete","get","head","options"],(function(t){ae.prototype[t]=function(e,n){return this.request(At(n||{},{method:t,url:e,data:(n||{}).data}))}})),q.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(At(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ae.prototype[t]=e(),ae.prototype[t+"Form"]=e(!0)}));const ce=ae;class se{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)}static source(){let t;return{token:new se((function(e){t=e})),cancel:t}}}const ue=se,le={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(le).forEach((([t,e])=>{le[e]=t}));const fe=le,he=function t(e){const n=new ce(e),r=a(ce.prototype.request,n);return q.extend(r,ce.prototype,n,{allOwnKeys:!0}),q.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(At(e,n))},r}(vt);he.Axios=ce,he.CanceledError=kt,he.CancelToken=ue,he.isCancel=jt,he.VERSION="1.7.2",he.toFormData=X,he.AxiosError=J,he.Cancel=he.CanceledError,he.all=function(t){return Promise.all(t)},he.spread=function(t){return function(e){return t.apply(null,e)}},he.isAxiosError=function(t){return q.isObject(t)&&!0===t.isAxiosError},he.mergeConfig=At,he.AxiosHeaders=_t,he.formToJSON=t=>yt(q.isHTMLForm(t)?new FormData(t):t),he.getAdapter=Xt,he.HttpStatusCode=fe,he.default=he;const pe=he;function de(t){return de="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},de(t)}function ye(){ye=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 v?e:v,a=Object.create(i.prototype),c=new C(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==de(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 j(e,n,r){var o=h;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=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(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(de(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"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=B,C.prototype={constructor:C,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(L),!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,m):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),m},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),L(n),m}},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;L(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function me(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 ve(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){me(i,r,o,a,c,"next",t)}function c(t){me(i,r,o,a,c,"throw",t)}a(void 0)}))}}function be(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,ge(r.key),r)}}function ge(t){var e=function(t){if("object"!=de(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=de(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==de(e)?e:e+""}var we=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=pe.create({baseURL:e})},e=[{key:"get",value:function(){var t=ve(ye().mark((function t(e,n){var r;return ye().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.get(e,{params: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("GET ".concat(e," failed: ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,this,[[0,7]])})));return function(e,n){return t.apply(this,arguments)}}()},{key:"post",value:(o=ve(ye().mark((function t(e,n){var r;return ye().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.post(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("POST ".concat(e," failed: ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return o.apply(this,arguments)})},{key:"put",value:(r=ve(ye().mark((function t(e,n){var r;return ye().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=ve(ye().mark((function t(e,n){var r;return ye().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.delete(e,{params: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("DELETE ".concat(e," failed: ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return n.apply(this,arguments)})}],e&&be(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,o}();const Se=we;function Ee(t){return Ee="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},Ee(t)}function Oe(){Oe=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 v?e:v,a=Object.create(i.prototype),c=new C(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Ee(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 j(e,n,r){var o=h;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=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(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(Ee(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"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=B,C.prototype={constructor:C,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(L),!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,m):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),m},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),L(n),m}},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;L(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function _e(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 Pe(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"!=Ee(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ee(e)?e:e+""}const xe=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:"fetchMapStyle",value:(n=Oe().mark((function t(e,n,r){return Oe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.apiManager.get("/map-views/v1/".concat(e,"/").concat(n,"/").concat(r,"/style"));case 3:return t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),console.error("Error fetching map data:",t.t0),t.abrupt("return",null);case 10:case"end":return t.stop()}}),t,this,[[0,6]])})),r=function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function a(t){_e(i,r,o,a,c,"next",t)}function c(t){_e(i,r,o,a,c,"throw",t)}a(void 0)}))},function(t,e,n){return r.apply(this,arguments)})}],e&&Pe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();function ke(t){return ke="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},ke(t)}function Le(){Le=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 v?e:v,a=Object.create(i.prototype),c=new C(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==ke(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 j(e,n,r){var o=h;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=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(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(ke(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"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=B,C.prototype={constructor:C,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(L),!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,m):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),m},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),L(n),m}},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;L(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Ce(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 Be(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Ce(i,r,o,a,c,"next",t)}function c(t){Ce(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Te(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,Re(r.key),r)}}function Re(t){var e=function(t){if("object"!=ke(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ke(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ke(e)?e:e+""}const Ne=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=Be(Le().mark((function t(e,n,r,o){var i;return Le().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,"/").concat(n,"/").concat(r),{q:o});case 3:return i=t.sent,t.abrupt("return",i);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error searching query:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e,n,o){return r.apply(this,arguments)})},{key:"fetchContentPlacementDetails",value:(n=Be(Le().mark((function t(e){var n;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.apiManager.get("/search/v1/details/".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&&Te(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();function Ae(t){return Ae="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},Ae(t)}function De(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,Fe(r.key),r)}}function Fe(t){var e=function(t){if("object"!=Ae(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ae(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ae(e)?e:e+""}const Ie=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.apiManager=new Se("https://api.waygomaps.com"),this.mapViewApi=new xe(this.apiManager),this.SearchApi=new Ne(this.apiManager)},(e=[{key:"setApiKey",value:function(t){this.apiKey=t}},{key:"getMapViewApi",value:function(){return this.mapViewApi}},{key:"getSearchApi",value:function(){return this.SearchApi}}])&&De(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());function Ve(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 ze(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 Me(t){return Me="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},Me(t)}function He(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,Ue(r.key),r)}}function Ue(t){var e=function(t){if("object"!=Me(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Me(e)?e:e+""}const qe=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]:{};return this._listeners[t]?(e.type=t,this._listeners[t].forEach((function(t){return t(e)})),this):this}}],e&&He(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Ge(t){return Ge="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},Ge(t)}function We(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,Ke(r.key),r)}}function Ke(t){var e=function(t){if("object"!=Ge(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ge(e)?e:e+""}function Je(t,e,n){return e=Ye(e),function(t,e){if(e&&("object"==Ge(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,Ze()?Reflect.construct(e,n||[],Ye(t).constructor):e.apply(t,n))}function Ze(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ze=function(){return!!t})()}function Ye(t){return Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ye(t)}function $e(t,e){return $e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$e(t,e)}function Qe(t){return Qe="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},Qe(t)}function Xe(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,tn(r.key),r)}}function tn(t){var e=function(t){if("object"!=Qe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qe(e)?e:e+""}function en(t,e,n){return e=rn(e),function(t,e){if(e&&("object"==Qe(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,nn()?Reflect.construct(e,n||[],rn(t).constructor):e.apply(t,n))}function nn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(nn=function(){return!!t})()}function rn(t){return rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rn(t)}function on(t,e){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},on(t,e)}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),Je(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&&$e(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&&We(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(qe));const an=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=en(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&&on(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){}},{key:"render",value:function(){}},{key:"destroy",value:function(){this.removeAllGlobalHandlers(),this.unsubscribeAllState()}}])&&Xe(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(qe);function cn(t){return cn="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},cn(t)}function sn(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,un(r.key),r)}}function un(t){var e=function(t){if("object"!=cn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=cn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==cn(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"]},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),console.log("STATE LENGTH PROPER",this.stateHistory.length,this.stateHistory),this.mapView.fire("state:".concat(t),e)}}],e&&sn(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 hn(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,pn(r.key),r)}}function pn(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 dn(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,yn()?Reflect.construct(e,n||[],mn(t).constructor):e.apply(t,n))}function yn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(yn=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 bn=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=dn(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&&vn(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})}))}},{key:"render",value:function(){this.element.innerHTML='\n <div class="result-title">'.concat(this.result.name,'</div>\n <div class="result-subtitle">').concat(this.result.contextual_location,"</div>\n ")}},{key:"getElement",value:function(){return this.element}}])&&hn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(an);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 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,Sn(r.key),r)}}function Sn(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+""}function En(t,e,n){return e=_n(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,On()?Reflect.construct(e,n||[],_n(t).constructor):e.apply(t,n))}function On(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(On=function(){return!!t})()}function _n(t){return _n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_n(t)}function Pn(t,e){return Pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pn(t,e)}const jn=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=En(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&&Pn(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.results=[],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:"updateView",value:function(t,e){this.results=t,t.length>1&&this.setTitle("".concat(t.length," results found for '").concat(e,"'")),1===t.length&&this.setTitle("".concat(t.length," result found for '").concat(e,"'")),0===t.length&&this.setTitle("No matching results for '".concat(e,"'")),this.render()}},{key:"updateResults",value:function(t){this.results=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 bn(e);n.on("click",(function(){return t.fire("selectCell",{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}}])&&wn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(an);function xn(t){return xn="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},xn(t)}function kn(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"!=xn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xn(e)?e:e+""}const Cn=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},(e=[{key:"onAdd",value:function(t){this.map=t}},{key:"onRemove",value:function(){this.container.parentNode.removeChild(this.container),this.map=void 0}}])&&kn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();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 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,Rn(r.key),r)}}function Rn(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=Fn(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,An()?Reflect.construct(e,n||[],Fn(t).constructor):e.apply(t,n))}function An(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(An=function(){return!!t})()}function Dn(){return Dn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Fn(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}},Dn.apply(null,arguments)}function Fn(t){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fn(t)}function In(t,e){return In=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},In(t,e)}const Vn=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,[n])).searchResultsView=new jn,t.searchedQuery=null,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&&In(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.initializeEventListeners(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=Dn(Fn(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.searchResultsView.on("closeView",this._handleCloseSearchResultsView.bind(this)),this.searchResultsView.on("selectCell",this._handleSearchResultSelect.bind(this))}},{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.hide()}},{key:"_handleSearchState",value:function(t){var e=t.query,n=t.results;this.searchedQuery=e,this.searchResultsView.updateResults([]),this.searchResultsView.updateView(n,e),this.show()}},{key:"_handleSelectedContentState",value:function(t){this.searchResultsView.updateResults([]),this.hide()}},{key:"_handleDirectionsState",value:function(t){console.log("handling directions state in search results control")}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&Tn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Cn);var zn=r(253),Mn=r.n(zn);function Hn(t){return Hn="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},Hn(t)}function Un(){Un=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 v?e:v,a=Object.create(i.prototype),c=new C(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Hn(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 j(e,n,r){var o=h;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=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(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(Hn(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"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=B,C.prototype={constructor:C,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(L),!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,m):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),m},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),L(n),m}},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;L(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function qn(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 Gn(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){qn(i,r,o,a,c,"next",t)}function c(t){qn(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Wn(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 Kn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wn(Object(n),!0).forEach((function(e){Jn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Jn(t,e,n){return(e=Yn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Zn(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,Yn(r.key),r)}}function Yn(t){var e=function(t){if("object"!=Hn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Hn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hn(e)?e:e+""}function $n(t,e,n){return e=Xn(e),function(t,e){if(e&&("object"==Hn(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,Qn()?Reflect.construct(e,n||[],Xn(t).constructor):e.apply(t,n))}function Qn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Qn=function(){return!!t})()}function Xn(t){return Xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xn(t)}function tr(t,e){return tr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tr(t,e)}var er={"c66d7e2c3ebd4a8fa60efa5bf3b5b301:2d4911eda2ef4950b307e51cd0ccf35e":{steps:["Leave Roundtable and make a left","Turn right after walking 177 feet","Turn left after walking 203 feet","Turn right after walking 100 feet","Continue straight in 242 feet","Arrive at Stage 4, on your left"],path:[[-81.55730801074388,-195.68687504906683],[-66.79352848318483,-195.68687504906688],[-66.79352848318483,-136.30367294932935],[-6.7541584044446665,-136.30367294932955],[-6.7541584044446195,-106.92078820451393],[81.82851876090972,-106.92078820451393],[81.82851876090972,-47.20950211527508],[140.88363687114594,-47.20950211527508]]}},nr={container:"map",sourceId:"collision-conference.2024.2xw_YUXYS8GoDTB2AQgN3A",center:[0,0],zoom:12,bearing:0,pitch:0,minPitch:0,maxPitch:75,minZoom:0,maxZoom:22,bounds:null,doubleClickZoom:!0,dragPan:!0,dragRotate:!0,scrollZoom:!0,touchPitch:!0,touchZoomRotate:!0,interactive:!0,trackResize:!0,keyboard:!0},rr=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=$n(this,e,[Kn(Kn({},nr),n)])).mapViewApi=Ie.getMapViewApi(),t.searchApi=Ie.getSearchApi(),t.mapContainer=document.createElement("div"),t.mapContainer.className="inner-map-container",t.ready=t._initialize(n),t._stateCoordinator=new ln(t),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&&tr(t,e)}(e,t),n=e,r=[{key:"_initialize",value:(f=Gn(Un().mark((function t(){var e,n=this;return Un().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("Initializing map view component.."),t.prev=1,t.next=4,this._loadMapLibraries();case 4:return this.render(),t.next=7,this._fetchMapStyle();case 7:e=t.sent,void 0!==Mn()&&e?(Mn().accessToken="pk.eyJ1Ijoid2F5Z28tbWFwcyIsImEiOiJjbGtxYzZ1N3QxdG43M210bXFuYmJ4a3gxIn0.tlbznj_fRJ8La6s2UUMO6A",this.map=new(Mn().Map)({container:this.mapContainer,style:"mapbox://styles/waygo-maps/".concat(e),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("load",(function(){return n.fire("load")})),this._initializeEventListeners()):console.error("Mapbox GL JS is not loaded."),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),console.error("Failed to initialize the map:",t.t0);case 14:case"end":return t.stop()}}),t,this,[[1,11]])}))),function(){return f.apply(this,arguments)})},{key:"_initializeEventListeners",value:function(){var t=this;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})})),this.mapContainer.addEventListener("touchend",(function(e){return t.fire("touchend",{originalEvent:e})})),this.mapContainer.addEventListener("touchmove",(function(e){return t.fire("touchmove",{originalEvent:e})})),this.mapContainer.addEventListener("touchcancel",(function(e){return t.fire("touchcancel",{originalEvent: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})}))}))}},{key:"_fetchMapStyle",value:(l=Gn(Un().mark((function t(){var e,n,r,o,i;return Un().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(3===(e=this.options.sourceId.split(".")).length){t.next=4;break}return console.error('The mapViewId format is incorrect. It should be in the format "businessId.mapId.mapViewId".'),t.abrupt("return");case 4:return n=e[0]||"",r=e[1]||"",o=e[2]||"",t.prev=7,t.next=10,this.mapViewApi.fetchMapStyle(n,r,o);case 10:return i=t.sent,console.log("Fetched map style:",i.style_id),t.abrupt("return",i.style_id);case 15:t.prev=15,t.t0=t.catch(7),console.error("Error fetching map style:",t.t0);case 18:case"end":return t.stop()}}),t,this,[[7,15]])}))),function(){return l.apply(this,arguments)})},{key:"_loadMapLibraries",value:(u=Gn(Un().mark((function t(){return Un().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("Loading map libraries"),t.next=3,ze("https://api.mapbox.com/mapbox-gl-js/v3.5.1/mapbox-gl.css");case 3:return t.next=5,Ve("https://api.mapbox.com/mapbox-gl-js/v3.5.1/mapbox-gl.js");case 5:console.log("Map libraries loaded");case 6:case"end":return t.stop()}}),t)}))),function(){return u.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:"addControl",value:function(t){var e=t.onAdd(this);this.mapContainer.appendChild(e)}},{key:"removeControl",value:function(t){this.map.removeControl(t)}},{key:"setToDefaultState",value:function(){this._stateCoordinator.transitionTo("default")}},{key:"setToSearchState",value:(s=Gn(Un().mark((function t(e){var n;return Un().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.search(e);case 2:n=t.sent,this._stateCoordinator.transitionTo("search",{query:e,results:n});case 4:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"setToSelectedContentState",value:(c=Gn(Un().mark((function t(e){var n,r;return Un().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e[e.length-1],t.next=3,this.getContentPlacementDetails(n);case 3:r=t.sent,this._stateCoordinator.transitionTo("selectedContent",{contentPlacementIds:e,selectedContentPlacement:r});case 5:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"setToDirectionsState",value:(a=Gn(Un().mark((function t(){var e,n,r,o,i=arguments;return Un().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=i.length>1&&void 0!==i[1]?i[1]:null,r=null,!(e=i.length>0&&void 0!==i[0]?i[0]:null)){t.next=7;break}return t.next=6,this.getContentPlacementDetails(e);case 6:r=t.sent;case 7:if(o=null,!n){t.next=12;break}return t.next=11,this.getContentPlacementDetails(n);case 11:o=t.sent;case 12:this._stateCoordinator.transitionTo("directions",{startContentPlacement:r,endContentPlacement:o});case 13:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"initiateBack",value:function(){this.fire("initiate:back")}},{key:"initiateSetToSearchState",value:function(){this.fire("initiate:search")}},{key:"findPath",value:function(t,e){console.log("finding path",t,e);var n=er["".concat(t,":").concat(e)];console.log("DATA",n);var r=function(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]),console.log("CHECK1",e);var r=[],o=function(t){console.log("CHECK3");var e=t*Math.PI/180,n=6378137,r=6356752.314;console.log("CHECK4",e,n,r);var o=(Math.pow(n,.5)-Math.pow(r,.5))/Math.pow(n,.5);console.log("CHECK5",o);var i=1/(111132.954-559.822*Math.cos(2*e)+1.175*Math.cos(4*e));console.log("CHECK6",i);var a=1/(Math.PI*n*Math.cos(e)/(180*Math.pow(1-Math.pow(o,2)*Math.pow(Math.sin(e),2),.5)));return console.log("CHECK7",a),{meterToLat:i,meterToLon:a}}(e[1]),i=o.meterToLat,a=o.meterToLon;return console.log("CHECK2",i,a),t.forEach((function(t){var o=function(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,i=t[0],a=t[1],c=e[0];return{lat:e[1]+a*o*n,lon:c+i*o*r}}(t,e,i,a,n),c=o.lat,s=o.lon;r.push([s,c])})),r}(n.path,null,10);return console.log("COORDINATES:",r),{coordinates:r,steps:n.steps}}},{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:(i=Gn(Un().mark((function t(e){return Un().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(""!==e){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,t.next=5,this.searchApi.search("e9df990cbd084934973a87fc2f3b0e74","move-america-2024","FTdsy9btTs6qumoZ6E8Z2Q",e);case 5:return t.abrupt("return",t.sent);case 8:t.prev=8,t.t0=t.catch(2),pe.isCancel(t.t0)?console.log("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 11:case"end":return t.stop()}}),t,this,[[2,8]])}))),function(t){return i.apply(this,arguments)})},{key:"getContentPlacementDetails",value:(o=Gn(Un().mark((function t(e){return Un().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 t.abrupt("return",t.sent);case 6:t.prev=6,t.t0=t.catch(0),pe.isCancel(t.t0)?console.log("Request canceled:",t.t0.message):console.error("Fetching content placement details error:",t.t0);case 9:case"end":return t.stop()}}),t,this,[[0,6]])}))),function(t){return o.apply(this,arguments)})}],r&&Zn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a,c,s,u,l,f}(an);const or=r.p+"f8965838ad87362f7fd1507af2a45dfa.svg",ir=r.p+"7d2fb7c25b2d12614aeb1b025a51b86f.svg",ar=r.p+"709b5ad35fbbdaa1c4b5222a276444fa.svg",cr=r.p+"507fada530642f8f1084a961a554e5a5.svg";function sr(t){return sr="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},sr(t)}function ur(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,lr(r.key),r)}}function lr(t){var e=function(t){if("object"!=sr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=sr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==sr(e)?e:e+""}function fr(t,e,n){return e=pr(e),function(t,e){if(e&&("object"==sr(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,hr()?Reflect.construct(e,n||[],pr(t).constructor):e.apply(t,n))}function hr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(hr=function(){return!!t})()}function pr(t){return pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pr(t)}function dr(t,e){return dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},dr(t,e)}const yr=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=fr(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&&dr(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="Search MOVE America 2024",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.element.appendChild(this.leftButton),this.element.appendChild(this.input),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(){this.fire("focus")}},{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(or,'" alt="Search" />'),this.rightButton.style.display="flex"):"cancel"===t?(this.rightButton.innerHTML='<img src="'.concat(ir,'" 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(cr,'" 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(ar,'" 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:"getText",value:function(){return this.input.value}},{key:"setText",value:function(t){this.input.value=t}},{key:"setPlaceholderText",value:function(t){this.input.placeholder=t}},{key:"getElement",value:function(){return this.element}}],r&&ur(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(an);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,br(r.key),r)}}function br(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 gr(t,e,n){return e=Sr(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||[],Sr(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 Sr(t){return Sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Sr(t)}function Er(t,e){return Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Er(t,e)}const Or=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=gr(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&&Er(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.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(){this.element.innerHTML='\n <div class="suggestion-title">'.concat(this.result.name,'</div>\n <div class="suggestion-subtitle">').concat(this.result.contextual_location,"</div>\n ")}},{key:"getElement",value:function(){return this.element}}])&&vr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(an);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 Pr(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,jr(r.key),r)}}function jr(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+""}function xr(t,e,n){return e=Lr(e),function(t,e){if(e&&("object"==_r(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,kr()?Reflect.construct(e,n||[],Lr(t).constructor):e.apply(t,n))}function kr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(kr=function(){return!!t})()}function Lr(t){return Lr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lr(t)}function Cr(t,e){return Cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Cr(t,e)}const Br=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=xr(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&&Cr(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.results=[],this.element=document.createElement("div"),this.element.className="search-bar-suggestions-view"}},{key:"updateResults",value:function(t){this.results=t,this.render()}},{key:"render",value:function(){var t=this;this.element.innerHTML="",this.results.forEach((function(e){var n=new Or(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}}])&&Pr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(an);function Tr(t){return Tr="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},Tr(t)}function Rr(){Rr=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 v?e:v,a=Object.create(i.prototype),c=new C(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Tr(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 j(e,n,r){var o=h;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=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(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(Tr(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"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=B,C.prototype={constructor:C,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(L),!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,m):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),m},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),L(n),m}},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;L(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Nr(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 Ar(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Nr(i,r,o,a,c,"next",t)}function c(t){Nr(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Dr(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,Fr(r.key),r)}}function Fr(t){var e=function(t){if("object"!=Tr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Tr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tr(e)?e:e+""}function Ir(t,e,n){return e=zr(e),function(t,e){if(e&&("object"==Tr(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,Vr()?Reflect.construct(e,n||[],zr(t).constructor):e.apply(t,n))}function Vr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vr=function(){return!!t})()}function zr(t){return zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zr(t)}function Mr(t,e){return Mr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Mr(t,e)}const Hr=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=Ir(this,e,[n])).searchApi=Ie.getSearchApi(),t.element=document.createElement("div"),t.element.className="search-box",t.searchBar=new yr,t.searchBarSuggestionsView=new Br,t.searchCount=0,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&&Mr(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))}},{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=Ar(Rr().mark((function t(){var e;return Rr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((e=this.searchBar.getText()).length>0)){t.next=5;break}return t.next=4,this.getSearchBarSuggestions(e);case 4:this.openSuggestionsView();case 5:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"_handleSearchBarBlur",value:function(){this.searchBarSuggestionsView.hide()}},{key:"_handleSearchBarInput",value:(i=Ar(Rr().mark((function t(e){var n;return Rr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.query,this.openSuggestionsView(),t.next=4,this.getSearchBarSuggestions(n);case 4: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:"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:"getSearchBarSuggestions",value:(o=Ar(Rr().mark((function t(e){var n,r;return Rr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=++this.searchCount,""!==e){t.next=5;break}return this.searchBarSuggestionsView.updateResults([]),this.closeSuggestionsView(),t.abrupt("return");case 5:return t.prev=5,t.next=8,this.searchApi.search("e9df990cbd084934973a87fc2f3b0e74","move-america-2024","FTdsy9btTs6qumoZ6E8Z2Q",e);case 8:r=t.sent,n===this.searchCount&&this.searchBarSuggestionsView.updateResults(r),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(5),pe.isCancel(t.t0)?console.log("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 15:case"end":return t.stop()}}),t,this,[[5,12]])}))),function(t){return o.apply(this,arguments)})}],r&&Dr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a}(an);function Ur(t){return Ur="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},Ur(t)}function qr(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"!=Ur(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ur(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ur(e)?e:e+""}function Wr(t,e,n){return e=Zr(e),function(t,e){if(e&&("object"==Ur(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,Kr()?Reflect.construct(e,n||[],Zr(t).constructor):e.apply(t,n))}function Kr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Kr=function(){return!!t})()}function Jr(){return Jr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Zr(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}},Jr.apply(null,arguments)}function Zr(t){return Zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zr(t)}function Yr(t,e){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yr(t,e)}const $r=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=Wr(this,e,[n])).searchBox=new Hr,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&&Yr(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.show(),this.initializeEventListeners(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=Jr(Zr(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.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))}},{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.input.focus(),this.searchBox.searchBar.updateRightButtonIcon("search"),this.searchBox.searchBar.updateLeftButtonIcon("none"),this.show()}},{key:"_handleSearchState",value:function(t){var e=t.query,n=t.results;console.log("SEARC",e,n),this.searchBox.searchBar.setText(e),this.searchBox.searchBar.updateRightButtonIcon("cancel"),this.searchBox.searchBar.updateLeftButtonIcon("none"),this.show()}},{key:"_handleSelectedContentState",value:function(t){var e=t.contentPlacementIds,n=t.selectedContentPlacement;this.show();var r=n.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){console.log("handling directions state in search box control"),this.map._stateCoordinator.stateHistory.length>2?this.searchBox.searchBar.updateLeftButtonIcon("back"):this.searchBox.searchBar.updateLeftButtonIcon("none")}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&qr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Cn);function Qr(t){return Qr="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},Qr(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"!=Qr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qr(e)?e:e+""}function eo(t,e,n){return e=ro(e),function(t,e){if(e&&("object"==Qr(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,no()?Reflect.construct(e,n||[],ro(t).constructor):e.apply(t,n))}function no(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(no=function(){return!!t})()}function ro(t){return ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ro(t)}function oo(t,e){return oo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},oo(t,e)}const io=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],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),(t=eo(this,e,[r])).items=n,t.containerClass=r.container,t.element=document.createElement("div"),t.element.className="slider-bar-container ".concat(t.containerClass),t.sliderBar=document.createElement("div"),t.sliderBar.className="slider-bar ".concat(t.containerClass,"-bar"),t.leftButton=document.createElement("button"),t.leftButton.className="scroll-button left ".concat(t.containerClass,"-scroll-button"),t.leftButton.addEventListener("click",(function(){return t._scrollSliderBar("left")})),t.rightButton=document.createElement("button"),t.rightButton.className="scroll-button right ".concat(t.containerClass,"-scroll-button"),t.rightButton.addEventListener("click",(function(){return t._scrollSliderBar("right")})),t.buttonElements=[],t._render(),t.sliderBar.addEventListener("scroll",(function(){return t._updateScrollButtons()})),setTimeout((function(){return t._updateScrollButtons()}),.8),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:"_render",value:function(){var t=this;this.items.forEach((function(e){var n=e.title,r=e.imageUrl,o=document.createElement("button");if(o.addEventListener("click",t._handleSliderButtonSelect.bind(t)),o.className="slider-bar-button ".concat(t.containerClass,"-button"),r){var i=document.createElement("img");i.src=r,i.alt=n,i.className="slider-bar-button-image ".concat(t.containerClass,"-button-image"),o.appendChild(i)}else console.log("No image found for slider bar button.");var a=document.createElement("span");a.textContent=n,o.appendChild(a),t.buttonElements.push(o),t.sliderBar.appendChild(o)})),this.element.appendChild(this.leftButton),this.element.appendChild(this.sliderBar),this.element.appendChild(this.rightButton)}},{key:"_handleSliderButtonSelect",value:function(t){var e=t.currentTarget,n=e.querySelector("span").textContent;if(e.classList.contains("selected"))e.classList.remove("selected"),this.fire("deselect");else{var r=document.querySelector(".slider-bar-button.selected");r&&r.classList.remove("selected"),e.classList.add("selected"),this.fire("selectNew",{query:n})}}},{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(){this.sliderBar.querySelectorAll(".slider-bar-button.selected").forEach((function(t){return t.classList.remove("selected")}))}},{key:"deselectAllNotMatchingQuery",value:function(t){this.sliderBar.querySelectorAll(".slider-bar-button.selected").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:"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&&Xr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(an);function ao(t){return ao="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},ao(t)}function co(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,so(r.key),r)}}function so(t){var e=function(t){if("object"!=ao(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ao(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ao(e)?e:e+""}function uo(t,e,n){return e=ho(e),function(t,e){if(e&&("object"==ao(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,lo()?Reflect.construct(e,n||[],ho(t).constructor):e.apply(t,n))}function lo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(lo=function(){return!!t})()}function fo(){return fo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ho(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}},fo.apply(null,arguments)}function ho(t){return ho=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ho(t)}function po(t,e){return po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},po(t,e)}const yo=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=uo(this,e,[n])).categoryBar=new io([{title:"Energy & charging"},{title:"Mobility"},{title:"Automotive"},{title:"Indoor mapping"},{title:"Supply chain"},{title:"Tech data"},{title:"Insurance"},{title:"Rideshare"},{title:"Manufacturing"},{title:"Autonomous vehicles"},{title:"Human resources"},{title:"Battery tech"},{title:"Renewable energy"}],{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&&po(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.show(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=fo(ho(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.categoryBar.on("selectNew",this._handleNewCategoryButtonSelect.bind(this)),this.categoryBar.on("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))}},{key:"_handleDefaultState",value:function(){this.show(),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;this.map.setToSearchState(e)}},{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:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&co(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Cn),mo=(r.p,r.p+"1b7f16a1f8c7a51acb29667188b93cd4.svg");function vo(t){return vo="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},vo(t)}function bo(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"!=vo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=vo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vo(e)?e:e+""}function wo(t,e,n){return e=Eo(e),function(t,e){if(e&&("object"==vo(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||[],Eo(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 Eo(t){return Eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Eo(t)}function Oo(t,e){return Oo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Oo(t,e)}const _o=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=wo(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&&Oo(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.nameElement=document.createElement("div"),this.nameElement.className="header-content-name",this.nameElement.textContent=t.data[t.title_key],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),this.imageViewElement=document.createElement("div"),this.imageViewElement.className="header-image-view",this.element.appendChild(this.imageViewElement),this.element.appendChild(this.textContainer)}},{key:"getElement",value:function(){return this.element}}])&&bo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(an);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 jo(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,xo(r.key),r)}}function xo(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 ko(t,e,n){return e=Co(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,Lo()?Reflect.construct(e,n||[],Co(t).constructor):e.apply(t,n))}function Lo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Lo=function(){return!!t})()}function Co(t){return Co=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Co(t)}function Bo(t,e){return Bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bo(t,e)}const To=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=ko(this,e,[o])).icon=t,r.text=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&&Bo(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){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}}])&&jo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(an);function Ro(t){return Ro="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},Ro(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,Ao(r.key),r)}}function Ao(t){var e=function(t){if("object"!=Ro(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ro(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ro(e)?e:e+""}function Do(t,e,n){return e=Io(e),function(t,e){if(e&&("object"==Ro(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||[],Io(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 Io(t){return Io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Io(t)}function Vo(t,e){return Vo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vo(t,e)}const zo=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=Do(this,e,[r])).data=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&&Vo(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.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}}])&&No(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(an);function Mo(t){return Mo="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},Mo(t)}function Ho(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,Uo(r.key),r)}}function Uo(t){var e=function(t){if("object"!=Mo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Mo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mo(e)?e:e+""}function qo(t,e,n){return e=Wo(e),function(t,e){if(e&&("object"==Mo(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,Go()?Reflect.construct(e,n||[],Wo(t).constructor):e.apply(t,n))}function Go(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Go=function(){return!!t})()}function Wo(t){return Wo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wo(t)}function Ko(t,e){return Ko=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ko(t,e)}const Jo=function(t){function e(t,n,r){var o,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),(o=qo(this,e,[i])).title=t,o.subtitle=n,o.placementId=r,o._initialize(),o}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&&Ko(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",this.titleElement.textContent=this.title+" --\x3e",this.subtitleElement=document.createElement("div"),this.subtitleElement.className="content-details-child-view-subtitle",this.subtitleElement.textContent=this.subtitle,this._render()}},{key:"_render",value:function(){this.element.appendChild(this.titleElement),this.element.appendChild(this.subtitleElement)}},{key:"getElement",value:function(){return this.element}}])&&Ho(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(an);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 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,$o(r.key),r)}}function $o(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 Qo(t,e,n){return e=ti(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,Xo()?Reflect.construct(e,n||[],ti(t).constructor):e.apply(t,n))}function Xo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xo=function(){return!!t})()}function ti(t){return ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ti(t)}function ei(t,e){return ei=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ei(t,e)}const ni=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=Qo(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&&ei(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 Jo(e.name,e.contextual_location,e.placement_id);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.placementId})}},{key:"getElement",value:function(){return this.element}}],r&&Yo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(an),ri=r.p+"4b9ae054d996b09c84d311ff59d62135.svg";function oi(t){return oi="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},oi(t)}function ii(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 ai(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)?ai(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 ai(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 ci(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,si(r.key),r)}}function si(t){var e=function(t){if("object"!=oi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=oi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==oi(e)?e:e+""}function ui(t,e,n){return e=fi(e),function(t,e){if(e&&("object"==oi(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,li()?Reflect.construct(e,n||[],fi(t).constructor):e.apply(t,n))}function li(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(li=function(){return!!t})()}function fi(t){return fi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fi(t)}function hi(t,e){return hi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},hi(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=ui(this,e,[n])).contentPlacement=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.directionsButton=document.createElement("button"),t.directionsButton.className="content-details-directions-button",t.directionsButton.textContent="Directions",t.shareButton=document.createElement("button"),t.shareButton.className="content-details-share-button",t.shareButton.textContent="Share",t.locationButton=null,t.websiteButton=null,t.detailsView=null,t.childrenComponents=[],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&&hi(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))}},{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.appendChild(this.directionsButton),this.actionButtons.appendChild(this.shareButton),this.header.appendChild(this.actionButtons),this.locationButton&&this.actionsView.appendChild(this.locationButton.getElement()),this.websiteButton&&this.actionsView.appendChild(this.websiteButton.getElement()),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:"_handleDirectionsButtonSelect",value:function(){this.fire("selectDirectionsButton",{placementId:this.contentPlacement.placement_id})}},{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){var e=t.content.data,n=Object.keys(e),r=[t.content.title_key,"Feature","Features","Feature ID","feature_id","Website","Website URL","LinkedIn","Files & media"],o={};return n.forEach((function(t){var n=e[t];r.includes(t)||null==n||""===n||(o[t]=n)})),o}},{key:"updateView",value:function(t){this.contentPlacement=t,this.contentPlacementHeader=new _o(t),this.locationButton=new To(mo,t.contextual_location);var e=t.content.data.Website||t.content.data.LinkedIn||t.content.data["Website URL"];this.websiteButton=e?new To(ri,e):null;var n=this.findViableAdditionalData(t),r=Object.keys(n);this.detailsView=r.length>0?new zo(n):null,this.childrenComponents=[];for(var o=0,i=Object.entries(t.children);o<i.length;o++){var a=ii(i[o],2),c=a[0],s=a[1],u=new ni(c,s);this.childrenComponents.push(u)}this._setupEventListeners(),this._render()}},{key:"getElement",value:function(){return this.element}}])&&ci(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(an);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(){yi=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 v?e:v,a=Object.create(i.prototype),c=new C(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==di(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 j(e,n,r){var o=h;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=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(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(di(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"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=B,C.prototype={constructor:C,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(L),!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,m):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),m},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),L(n),m}},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;L(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function mi(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 vi(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,bi(r.key),r)}}function bi(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 gi(t,e,n){return e=Ei(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,wi()?Reflect.construct(e,n||[],Ei(t).constructor):e.apply(t,n))}function wi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wi=function(){return!!t})()}function Si(){return Si="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ei(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}},Si.apply(null,arguments)}function Ei(t){return Ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ei(t)}function Oi(t,e){return Oi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Oi(t,e)}const _i=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=gi(this,e,[n])).map=null,t.contentPlacementIds=[],t.currentContentPlacement=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&&Oi(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.hide(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=Si(Ei(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("state:directions",this._handleDirectionsState.bind(this)),this.map.on("initiate:back",this._handleMapInitiateBack.bind(this))}},{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&&(console.log("THIS IS BACK IN DIRECTIONS STATE:",this.contentPlacementIds.length),this.map.setToSelectedContentState(this.contentPlacementIds))}},{key:"_handleSelectChildContentPlacement",value:function(t){var e=t.placementId;this.contentPlacementIds.push(e),this.map.setToSelectedContentState(this.contentPlacementIds)}},{key:"_handleDefaultState",value:function(){this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews()}},{key:"_handleSearchState",value:function(t){this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews()}},{key:"_handleSelectedContentState",value:function(t){var e=t.contentPlacementIds,n=t.selectedContentPlacement;this.contentPlacementIds=e,this.currentContentPlacement=n,console.log("SELECTED",n),this._updateContentViews(),this.show()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleSelectDirectionsButton",value:(o=yi().mark((function t(e){var n;return yi().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)})),i=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){mi(i,n,r,a,c,"next",t)}function c(t){mi(i,n,r,a,c,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})},{key:"_updateContentViews",value:function(){this._clearViews(),this._render()}},{key:"_render",value:function(){if(0!==this.contentPlacementIds.length&&null!==this.currentContentPlacement){var t=new pi;t.updateView(this.currentContentPlacement),t.on("selectChildContentPlacement",this._handleSelectChildContentPlacement.bind(this)),t.on("selectDirectionsButton",this._handleSelectDirectionsButton.bind(this)),this.container.appendChild(t.getElement())}}},{key:"_clearViews",value:function(){for(;this.container.firstChild;)this.container.removeChild(this.container.firstChild)}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&vi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}(Cn);function Pi(t){return Pi="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},Pi(t)}function ji(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,xi(r.key),r)}}function xi(t){var e=function(t){if("object"!=Pi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pi(e)?e:e+""}function ki(t,e,n){return e=Bi(e),function(t,e){if(e&&("object"==Pi(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,Li()?Reflect.construct(e,n||[],Bi(t).constructor):e.apply(t,n))}function Li(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Li=function(){return!!t})()}function Ci(){return Ci="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Bi(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}},Ci.apply(null,arguments)}function Bi(t){return Bi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Bi(t)}function Ti(t,e){return Ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ti(t,e)}const Ri=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=ki(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}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:"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.applyHoverEffectToAllSymbolLayers(),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=Ci(Bi(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"_attachResizeListener",value:function(){var t=this;window.addEventListener("resize",(function(){var e=t.map.mapContainer.offsetWidth;t._configureView(e)}))}},{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))}},{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:"createSelectedContentLayer",value:function(){this.map.map.getSource("selected-content")||this.map.map.addSource("selected-content",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.map.getLayer("selected-content-layer")||this.map.map.addLayer({id:"selected-content-layer",type:"symbol",source:"selected-content",layout:{"text-field":["get","title"],"text-font":["Inter Medium"],"text-size":14,"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:{"text-color":"#BE2E28","text-halo-color":"#ffffff","text-halo-width":1}})}},{key:"createHighlightedContentLayer",value:function(){this.map.map.getSource("highlighted-content")||this.map.map.addSource("highlighted-content",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.map.getLayer("highlighted-content-layer")||this.map.map.addLayer({id:"highlighted-content-layer",type:"symbol",source:"highlighted-content",layout:{"text-field":["get","title"],"text-font":["Inter Medium"],"text-size":14,"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:{"text-color":"#1E1E1E","text-halo-color":"#ffffff","text-halo-width":1}})}},{key:"clearSelectedContentLayer",value:function(){this.map.map.getSource("selected-content").setData({type:"FeatureCollection",features:[]})}},{key:"clearHighlightedContentLayer",value:function(){this.map.map.getSource("highlighted-content").setData({type:"FeatureCollection",features:[]})}},{key:"addSelectedFeature",value:function(t,e){var n=this.map.map.getSource("selected-content"),r=n._data,o={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};r.features.push(o),n.setData(r)}},{key:"addHighlightedFeature",value:function(t,e){var n=this.map.map.getSource("highlighted-content"),r=n._data,o={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};r.features.push(o),n.setData(r)}},{key:"_handleDefaultState",value:function(){this.clearHighlightedContentLayer(),this.clearSelectedContentLayer(),this.showSymbolLayers()}},{key:"_handleSearchState",value:function(t){t.query;var e=t.results;this.hideSymbolLayers(),this.clearSelectedContentLayer(),this.updateLabelsForSearchResults(e)}},{key:"_handleSelectedContentState",value:function(t){t.contentPlacementIds;var e=t.selectedContentPlacement;this.updateLabelForSelectedContentPlacement(e)}},{key:"_handleDirectionsState",value:function(t){console.log("handling directions state in interaction control")}},{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=this;this.clearHighlightedContentLayer();var n=[];if(t.forEach((function(t){var r=t.placement_id,o=e.map._findFeatureByPlacementId(r);if(o){var i=o.geometry.coordinates,a=o.properties;e.addHighlightedFeature(i,a),n.push(o)}})),n.length){var r=new(Mn().LngLatBounds);if(n.forEach((function(t){r.extend(t.geometry.coordinates)})),"desktop"===this.currentView)this.map.map.fitBounds(r,{padding:{top:200,bottom:200,left:550,right:200},maxZoom:15,duration:1e3});else if("mobile"===this.currentView){var o=.55*this.map.mapContainer.offsetHeight,i=.2*this.map.mapContainer.offsetWidth;this.map.map.fitBounds(r,{padding:{top:200,bottom:o,left:i,right:i},maxZoom:15,duration:1e3})}}}},{key:"updateLabelForSelectedContentPlacement",value:function(t){var e=t.placement_id;this.clearSelectedContentLayer();var n=this.map.map.queryRenderedFeatures({filter:["==",["get","placement_id"],e]});if(0!==n.length){var r=n[0],o=r.geometry.coordinates,i=r.properties;if(this.addSelectedFeature(o,i),"desktop"===this.currentView)this.map.map.easeTo({center:o,padding:{top:0,bottom:0,left:330,right:0},duration:1e3});else if("mobile"===this.currentView){var a=.35*this.map.mapContainer.offsetHeight;this.map.map.easeTo({center:o,padding:{top:0,bottom:a,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:"_handleClick",value:function(t){var e=this.map.map.queryRenderedFeatures(t.point).filter((function(t){return"symbol"===t.layer.type}));if(e.length>0){var n=e[0].properties.placement_id;this.map.setToSelectedContentState([n])}}}],r&&ji(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Cn);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 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,Di(r.key),r)}}function Di(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 Fi(t,e,n){return e=Vi(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,Ii()?Reflect.construct(e,n||[],Vi(t).constructor):e.apply(t,n))}function Ii(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ii=function(){return!!t})()}function Vi(t){return Vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vi(t)}function zi(t,e){return zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zi(t,e)}const Mi=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])).steps=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&&zi(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="steps-view",this._render(this.steps)}},{key:"_render",value:function(t){console.log("HERE ARE STEPSSS",t);var e=document.createElement("h2");e.textContent="Steps",this.element.appendChild(e);var n=document.createElement("ul");t.forEach((function(t){var e=document.createElement("li");e.textContent=t,n.appendChild(e)})),this.element.appendChild(n)}},{key:"getElement",value:function(){return this.element}}])&&Ai(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(an);function Hi(t){return Hi="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},Hi(t)}function Ui(){Ui=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 v?e:v,a=Object.create(i.prototype),c=new C(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Hi(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 j(e,n,r){var o=h;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=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(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(Hi(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"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=B,C.prototype={constructor:C,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(L),!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,m):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),m},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),L(n),m}},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;L(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function qi(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 Gi(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){qi(i,r,o,a,c,"next",t)}function c(t){qi(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Wi(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,Ki(r.key),r)}}function Ki(t){var e=function(t){if("object"!=Hi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Hi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hi(e)?e:e+""}function Ji(t,e,n){return e=Yi(e),function(t,e){if(e&&("object"==Hi(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,Zi()?Reflect.construct(e,n||[],Yi(t).constructor):e.apply(t,n))}function Zi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zi=function(){return!!t})()}function Yi(t){return Yi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Yi(t)}function $i(t,e){return $i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$i(t,e)}r.p;const Qi=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=Ji(this,e,[n])).startSearchBox=new Hr,t.endSearchBox=new Hr,t.startContentPlacement=null,t.endContentPlacement=null,t.steps=null,t.searchApi=Ie.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&&$i(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(){if(this.element.appendChild(this.directionsViewHeader),this.steps){var t=new Mi(this.steps);this.element.appendChild(t.getElement())}}},{key:"_setupEventListeners",value:function(){this.startSearchBox.searchBar.on("focus",this._handleStartSearchBarFocus.bind(this)),this.startSearchBox.searchBar.on("blur",this._handleStartSearchBarBlur.bind(this)),this.endSearchBox.searchBar.on("focus",this._handleEndSearchBarFocus.bind(this)),this.endSearchBox.searchBar.on("blur",this._handleEndSearchBarBlur.bind(this)),this.startSearchBox.searchBarSuggestionsView.on("selectCell",this._handleStartContentPlacementSelect.bind(this)),this.endSearchBox.searchBarSuggestionsView.on("selectCell",this._handleEndContentPlacementSelect.bind(this))}},{key:"_handleStartContentPlacementSelect",value:(i=Gi(Ui().mark((function t(e){var n,r,o;return Ui().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.result,r=n.placement_id,this.startSearchBox.searchBar.setText(n.name),t.next=5,this.searchApi.fetchContentPlacementDetails(r);case 5:o=t.sent,this.updateView(o,this.endContentPlacement);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_handleEndContentPlacementSelect",value:(o=Gi(Ui().mark((function t(e){var n,r,o;return Ui().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.result,r=n.placement_id,this.endSearchBox.searchBar.setText(n.name),t.next=5,this.searchApi.fetchContentPlacementDetails(r);case 5:o=t.sent,this.updateView(this.startContentPlacement,o);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"_handleStartSearchBarFocus",value:function(){this.startSearchBox.searchBar.updateRightButtonIcon("search")}},{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)console.log("BOTH ARE THERE, LETS FIRE PATH"),this.fire("initiate:findPath",{startContentPlacementId:t.placement_id,endContentPlacementId:e.placement_id});else if(t){var n=t.content.data[t.content.title_key];this.startSearchBox.searchBar.setText(n),this.endSearchBox.searchBar.setText(""),this.endSearchBox.searchBar.input.focus(),this.clearSteps()}else if(e){var r=e.content.data[e.content.title_key];this.endSearchBox.searchBar.setText(r),this.startSearchBox.searchBar.setText(""),this.startSearchBox.searchBar.input.focus(),this.clearSteps()}}},{key:"setSteps",value:function(t){this.steps=t,this._render()}},{key:"clearSteps",value:function(){var t=this.element.querySelector(".steps-view");t&&t.remove()}},{key:"getElement",value:function(){return this.element}}],r&&Wi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}(an);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 ta(t,e,n){return(e=na(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ea(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,na(r.key),r)}}function na(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 ra(t,e,n){return e=aa(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,oa()?Reflect.construct(e,n||[],aa(t).constructor):e.apply(t,n))}function oa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(oa=function(){return!!t})()}function ia(){return ia="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=aa(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}},ia.apply(null,arguments)}function aa(t){return aa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},aa(t)}function ca(t,e){return ca=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ca(t,e)}const sa={MapView:rr,SearchBox:Hr,SearchBoxControl:$r,CategoryBarControl:yo,SearchResultsControl:Vn,ContentPlacementControl:_i,InteractionControl:Ri,DirectionsControl: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=ra(this,e,[n])).directionsView=null,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&&ca(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="directions-control-container",this.directionsView=new Qi,this.container.appendChild(this.directionsView.getElement()),this.initializeEventListeners(),this.createDirectionsLineLayer(),this.hide(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=ia(aa(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("state:directions",this._handleDirectionsState.bind(this)),this.directionsView.on("initiate:findPath",this._handleIntiateFindPath.bind(this))}},{key:"createDirectionsLineLayer",value:function(){this.map.map.getSource("directionsLineSource")||this.map.map.addSource("directionsLineSource",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"LineString",coordinates:[]}}}),this.map.map.getLayer("directionsLineLayer")||(this.map.map.addLayer({id:"directionsLineLayer",type:"line",source:"directionsLineSource",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#1e1e1e","line-width":8}}),this.map.map.moveLayer("directionsLineLayer","special-areas"))}},{key:"updateLineData",value:function(t){this.map.map.getSource("directionsLineSource").setData({type:"Feature",properties:{},geometry:{type:"LineString",coordinates:t}});var e=new(Mn().LngLatBounds);t.forEach((function(t){e.extend(t)})),this.map.map.fitBounds(e,ta(ta(ta({padding:200},"padding",{top:200,bottom:200,left:500,right:150}),"maxZoom",15),"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()}},{key:"_handleSearchState",value:function(t){t.query,t.results,this.hide()}},{key:"_handleSelectedContentState",value:function(t){t.contentPlacementIds,t.selectedContentPlacement,this.hide(),this.directionsView.updateView(null,null),this.clearLineData()}},{key:"_handleDirectionsState",value:function(t){var e=t.startContentPlacement,n=t.endContentPlacement;console.log("handling directions state in directions control",t),this.show(),this.clearLineData(),this.directionsView.updateView(e,n)}},{key:"_handleIntiateFindPath",value:function(t){var e=t.startContentPlacementId,n=t.endContentPlacementId;this.clearLineData();var r=this.map.findPath(e,n);console.log("HERE IS PATH RESPONSEEE",r);var o=r.coordinates,i=r.steps;this.updateLineData(o),this.directionsView.setSteps(i)}},{key:"_handleSelectDirectionsButton",value:function(t){t.placementId}},{key:"_render",value:function(){console.log("render")}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&ea(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Cn),setApiKey:Ie.setApiKey.bind(Ie)};return o.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,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var e;t.g.importScripts&&(e=t.g.location+"");var n=t.g.document;if(!e&&n&&(n.currentScript&&"SCRIPT"===n.currentScript.tagName.toUpperCase()&&(e=n.currentScript.src),!e)){var r=n.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t.p=e})();var e={};t.d(e,{default:()=>da});var n={};function r(t,e){return function(){return t.apply(e,arguments)}}t.r(n),t.d(n,{hasBrowserEnv:()=>ht,hasStandardBrowserEnv:()=>dt,hasStandardBrowserWebWorkerEnv:()=>yt,navigator:()=>pt,origin:()=>mt});const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,a=(c=Object.create(null),t=>{const e=o.call(t);return c[e]||(c[e]=e.slice(8,-1).toLowerCase())});var c;const s=t=>(t=t.toLowerCase(),e=>a(e)===t),u=t=>e=>typeof e===t,{isArray:l}=Array,f=u("undefined"),h=s("ArrayBuffer"),p=u("string"),d=u("function"),y=u("number"),m=t=>null!==t&&"object"==typeof t,v=t=>{if("object"!==a(t))return!1;const e=i(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},b=s("Date"),g=s("File"),w=s("Blob"),S=s("FileList"),E=s("URLSearchParams"),[O,_,P,j]=["ReadableStream","Request","Response","Headers"].map(s);function x(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),l(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 k(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 C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,L=t=>!f(t)&&t!==C,B=(T="undefined"!=typeof Uint8Array&&i(Uint8Array),t=>T&&t instanceof T);var T;const R=s("HTMLFormElement"),N=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),A=s("RegExp"),D=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};x(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},F="abcdefghijklmnopqrstuvwxyz",I="0123456789",V={DIGIT:I,ALPHA:F,ALPHA_DIGIT:F+F.toUpperCase()+I},z=s("AsyncFunction"),H=(M="function"==typeof setImmediate,U=d(C.postMessage),M?setImmediate:U?(q=`axios@${Math.random()}`,G=[],C.addEventListener("message",(({source:t,data:e})=>{t===C&&e===q&&G.length&&G.shift()()}),!1),t=>{G.push(t),C.postMessage(q,"*")}):t=>setTimeout(t));var M,U,q,G;const W="undefined"!=typeof queueMicrotask?queueMicrotask.bind(C):"undefined"!=typeof process&&process.nextTick||H,K={isArray:l,isArrayBuffer:h,isBuffer:function(t){return null!==t&&!f(t)&&null!==t.constructor&&!f(t.constructor)&&d(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||d(t.append)&&("formdata"===(e=a(t))||"object"===e&&d(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&h(t.buffer),e},isString:p,isNumber:y,isBoolean:t=>!0===t||!1===t,isObject:m,isPlainObject:v,isReadableStream:O,isRequest:_,isResponse:P,isHeaders:j,isUndefined:f,isDate:b,isFile:g,isBlob:w,isRegExp:A,isFunction:d,isStream:t=>m(t)&&d(t.pipe),isURLSearchParams:E,isTypedArray:B,isFileList:S,forEach:x,merge:function t(){const{caseless:e}=L(this)&&this||{},n={},r=(r,o)=>{const i=e&&k(n,o)||o;v(n[i])&&v(r)?n[i]=t(n[i],r):v(r)?n[i]=t({},r):l(r)?n[i]=r.slice():n[i]=r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&x(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:o}={})=>(x(e,((e,o)=>{n&&d(e)?t[o]=r(e,n):t[o]=e}),{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,a,c;const s={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),a=o.length;a-- >0;)c=o[a],r&&!r(c,t,e)||s[c]||(e[c]=t[c],s[c]=!0);t=!1!==n&&i(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:a,kindOfTest:s,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(l(t))return t;let e=t.length;if(!y(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:R,hasOwnProperty:N,hasOwnProp:N,reduceDescriptors:D,freezeMethods:t=>{D(t,((e,n)=>{if(d(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];d(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 l(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:k,global:C,isContextDefined:L,ALPHABET:V,generateString:(t=16,e=V.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&d(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=l(t)?[]:{};return x(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:z,isThenable:t=>t&&(m(t)||d(t))&&d(t.then)&&d(t.catch),setImmediate:H,asap:W};function J(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)}K.inherits(J,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:K.toJSONObject(this.config),code:this.code,status:this.status}}});const Z=J.prototype,Y={};["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=>{Y[t]={value:t}})),Object.defineProperties(J,Y),Object.defineProperty(Z,"isAxiosError",{value:!0}),J.from=(t,e,n,r,o,i)=>{const a=Object.create(Z);return K.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),J.call(a,t.message,e,n,r,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const $=J;function Q(t){return K.isPlainObject(t)||K.isArray(t)}function X(t){return K.endsWith(t,"[]")?t.slice(0,-2):t}function tt(t,e,n){return t?t.concat(e).map((function(t,e){return t=X(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const et=K.toFlatObject(K,{},null,(function(t){return/^is[A-Z]/.test(t)})),nt=function(t,e,n){if(!K.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!K.isUndefined(e[t])}))).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,c=(n.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(e);if(!K.isFunction(o))throw new TypeError("visitor must be a function");function s(t){if(null===t)return"";if(K.isDate(t))return t.toISOString();if(!c&&K.isBlob(t))throw new $("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(t)||K.isTypedArray(t)?c&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,n,o){let c=t;if(t&&!o&&"object"==typeof t)if(K.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(K.isArray(t)&&function(t){return K.isArray(t)&&!t.some(Q)}(t)||(K.isFileList(t)||K.endsWith(n,"[]"))&&(c=K.toArray(t)))return n=X(n),c.forEach((function(t,r){!K.isUndefined(t)&&null!==t&&e.append(!0===a?tt([n],r,i):null===a?n:n+"[]",s(t))})),!1;return!!Q(t)||(e.append(tt(o,n,i),s(t)),!1)}const l=[],f=Object.assign(et,{defaultVisitor:u,convertValue:s,isVisitable:Q});if(!K.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!K.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),K.forEach(n,(function(n,i){!0===(!(K.isUndefined(n)||null===n)&&o.call(e,n,K.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e};function rt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function ot(t,e){this._pairs=[],t&&nt(t,this,e)}const it=ot.prototype;it.append=function(t,e){this._pairs.push([t,e])},it.toString=function(t){const e=t?function(e){return t.call(this,e,rt)}:rt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const at=ot;function ct(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function st(t,e,n){if(!e)return t;const r=n&&n.encode||ct,o=n&&n.serialize;let i;if(i=o?o(e,n):K.isURLSearchParams(e)?e.toString():new at(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const ut=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){K.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},lt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ft={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:at,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ht="undefined"!=typeof window&&"undefined"!=typeof document,pt="object"==typeof navigator&&navigator||void 0,dt=ht&&(!pt||["ReactNative","NativeScript","NS"].indexOf(pt.product)<0),yt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,mt=ht&&window.location.href||"http://localhost",vt={...n,...ft},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&&K.isArray(r)?r.length:i,c?(K.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&K.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&K.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(K.isFormData(t)&&K.isFunction(t.entries)){const n={};return K.forEachEntry(t,((t,r)=>{e(function(t){return K.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null},gt={transitional:lt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=K.isObject(t);if(o&&K.isHTMLForm(t)&&(t=new FormData(t)),K.isFormData(t))return r?JSON.stringify(bt(t)):t;if(K.isArrayBuffer(t)||K.isBuffer(t)||K.isStream(t)||K.isFile(t)||K.isBlob(t)||K.isReadableStream(t))return t;if(K.isArrayBufferView(t))return t.buffer;if(K.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 nt(t,new vt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return vt.isNode&&K.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=K.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return nt(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(K.isString(t))try{return(0,JSON.parse)(t),K.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||gt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(K.isResponse(t)||K.isReadableStream(t))return t;if(t&&K.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:vt.classes.FormData,Blob:vt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],(t=>{gt.headers[t]={}}));const wt=gt,St=K.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"]),Et=Symbol("internals");function Ot(t){return t&&String(t).trim().toLowerCase()}function _t(t){return!1===t||null==t?t:K.isArray(t)?t.map(_t):String(t)}function Pt(t,e,n,r,o){return K.isFunction(r)?r.call(this,e,n):(o&&(e=n),K.isString(e)?K.isString(r)?-1!==e.indexOf(r):K.isRegExp(r)?r.test(e):void 0:void 0)}class jt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=Ot(e);if(!o)throw new Error("header name must be a non-empty string");const i=K.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=_t(t))}const i=(t,e)=>K.forEach(t,((t,n)=>o(t,n,e)));if(K.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(K.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]&&St[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(K.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=Ot(t)){const n=K.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(K.isFunction(e))return e.call(this,t,n);if(K.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ot(t)){const n=K.findKey(this,t);return!(!n||void 0===this[n]||e&&!Pt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=Ot(t)){const o=K.findKey(n,t);!o||e&&!Pt(0,n[o],o,e)||(delete n[o],r=!0)}}return K.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&&!Pt(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return K.forEach(this,((r,o)=>{const i=K.findKey(n,o);if(i)return e[i]=_t(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]=_t(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return K.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&K.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[Et]=this[Et]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=Ot(t);e[r]||(function(t,e){const n=K.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 K.isArray(t)?t.forEach(r):r(t),this}}jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(jt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),K.freezeMethods(jt);const xt=jt;function kt(t,e){const n=this||wt,r=e||n,o=xt.from(r.headers);let i=r.data;return K.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Ct(t){return!(!t||!t.__CANCEL__)}function Lt(t,e,n){$.call(this,null==t?"canceled":t,$.ERR_CANCELED,e,n),this.name="CanceledError"}K.inherits(Lt,$,{__CANCEL__:!0});const Bt=Lt;function Tt(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 Rt=(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,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),s-o<e)return;const h=u&&s-u;return h?Math.round(1e3*f/h):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)},Nt=(t,e)=>{const n=null!=t;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},At=t=>(...e)=>K.asap((()=>t(...e))),Dt=vt.hasStandardBrowserEnv?function(){const t=vt.navigator&&/(msie|trident)/i.test(vt.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=K.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0},Ft=vt.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const a=[t+"="+encodeURIComponent(e)];K.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),K.isString(r)&&a.push("path="+r),K.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 It(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 Vt=t=>t instanceof xt?{...t}:t;function zt(t,e){e=e||{};const n={};function r(t,e,n){return K.isPlainObject(t)&&K.isPlainObject(e)?K.merge.call({caseless:n},t,e):K.isPlainObject(e)?K.merge({},e):K.isArray(e)?e.slice():e}function o(t,e,n){return K.isUndefined(e)?K.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!K.isUndefined(e))return r(void 0,e)}function a(t,e){return K.isUndefined(e)?K.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(Vt(t),Vt(e),!0)};return K.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=s[r]||o,a=i(t[r],e[r],r);K.isUndefined(a)&&i!==c||(n[r]=a)})),n}const Ht=t=>{const e=zt({},t);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:c,auth:s}=e;if(e.headers=c=xt.from(c),e.url=st(It(e.baseURL,e.url),t.params,t.paramsSerializer),s&&c.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),K.isFormData(r))if(vt.hasStandardBrowserEnv||vt.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(vt.hasStandardBrowserEnv&&(o&&K.isFunction(o)&&(o=o(e)),o||!1!==o&&Dt(e.url))){const t=i&&a&&Ft.read(a);t&&c.set(i,t)}return e},Mt="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const r=Ht(t);let o=r.data;const i=xt.from(r.headers).normalize();let a,c,s,u,l,{responseType:f,onUploadProgress:h,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 m(){if(!y)return;const r=xt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());Tt((function(t){e(t),d()}),(function(t){n(t),d()}),{data:f&&"text"!==f&&"json"!==f?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=m:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(m)},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||lt;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&&K.forEach(i.toJSON(),(function(t,e){y.setRequestHeader(e,t)})),K.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),f&&"json"!==f&&(y.responseType=r.responseType),p&&([s,l]=Rt(p,!0),y.addEventListener("progress",s)),h&&y.upload&&([c,u]=Rt(h),y.upload.addEventListener("progress",c),y.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(a=e=>{y&&(n(!e||e.type?new Bt(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 v=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(r.url);v&&-1===vt.protocols.indexOf(v)?n(new $("Unsupported protocol "+v+":",$.ERR_BAD_REQUEST,t)):y.send(o||null)}))},Ut=(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 Bt(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=()=>K.asap(a),c}},qt=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},Gt=(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*qt(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,Kt=Wt&&"function"==typeof ReadableStream,Jt=Wt&&("function"==typeof TextEncoder?(Zt=new TextEncoder,t=>Zt.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer()));var Zt;const Yt=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},$t=Kt&&Yt((()=>{let t=!1;const e=new Request(vt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),Qt=Kt&&Yt((()=>K.isReadableStream(new Response("").body))),Xt={stream:Qt&&(t=>t.body)};var te;Wt&&(te=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!Xt[t]&&(Xt[t]=K.isFunction(te[t])?e=>e[t]():(e,n)=>{throw new $(`Response type '${t}' is not supported`,$.ERR_NOT_SUPPORT,n)})})));const ee={http:null,xhr:Mt,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:f="same-origin",fetchOptions:h}=Ht(t);u=u?(u+"").toLowerCase():"text";let p,d=Ut([o,i&&i.toAbortSignal()],a);const y=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let m;try{if(s&&$t&&"get"!==n&&"head"!==n&&0!==(m=await(async(t,e)=>{const n=K.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(K.isBlob(t))return t.size;if(K.isSpecCompliantForm(t)){const e=new Request(vt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return K.isArrayBufferView(t)||K.isArrayBuffer(t)?t.byteLength:(K.isURLSearchParams(t)&&(t+=""),K.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(K.isFormData(r)&&(t=n.headers.get("content-type"))&&l.setContentType(t),n.body){const[t,e]=Nt(m,Rt(At(s)));r=Gt(n.body,65536,t,e)}}K.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;p=new Request(e,{...h,signal:d,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:o?f:void 0});let i=await fetch(p);const a=Qt&&("stream"===u||"response"===u);if(Qt&&(c||a&&y)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=i[e]}));const e=K.toFiniteNumber(i.headers.get("content-length")),[n,r]=c&&Nt(e,Rt(At(c),!0))||[];i=new Response(Gt(i.body,65536,n,(()=>{r&&r(),y&&y()})),t)}u=u||"text";let v=await Xt[K.findKey(Xt,u)||"text"](i,t);return!a&&y&&y(),await new Promise(((e,n)=>{Tt(e,n,{data:v,headers:xt.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)}})};K.forEach(ee,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const ne=t=>`- ${t}`,re=t=>K.isFunction(t)||null===t||!1===t,oe=t=>{t=K.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,!re(n)&&(r=ee[(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(ne).join("\n"):" "+ne(t[0]):"as no adapter specified";throw new $("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function ie(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Bt(null,t)}function ae(t){return ie(t),t.headers=xt.from(t.headers),t.data=kt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),oe(t.adapter||wt.adapter)(t).then((function(e){return ie(t),e.data=kt.call(t,t.transformResponse,e),e.headers=xt.from(e.headers),e}),(function(e){return Ct(e)||(ie(t),e&&e.response&&(e.response.data=kt.call(t,t.transformResponse,e.response),e.response.headers=xt.from(e.response.headers))),Promise.reject(e)}))}const ce={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{ce[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const se={};ce.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&&!se[o]&&(se[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 ue={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:ce},le=ue.validators;class fe{constructor(t){this.defaults=t,this.interceptors={request:new ut,response:new ut}}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=zt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&ue.assertOptions(n,{silentJSONParsing:le.transitional(le.boolean),forcedJSONParsing:le.transitional(le.boolean),clarifyTimeoutError:le.transitional(le.boolean)},!1),null!=r&&(K.isFunction(r)?e.paramsSerializer={serialize:r}:ue.assertOptions(r,{encode:le.function,serialize:le.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&K.merge(o.common,o[e.method]);o&&K.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=xt.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,f=0;if(!c){const t=[ae.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,s),l=t.length,u=Promise.resolve(e);f<l;)u=u.then(t[f++],t[f++]);return u}l=a.length;let h=e;for(f=0;f<l;){const t=a[f++],e=a[f++];try{h=t(h)}catch(t){e.call(this,t);break}}try{u=ae.call(this,h)}catch(t){return Promise.reject(t)}for(f=0,l=s.length;f<l;)u=u.then(s[f++],s[f++]);return u}getUri(t){return st(It((t=zt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}K.forEach(["delete","get","head","options"],(function(t){fe.prototype[t]=function(e,n){return this.request(zt(n||{},{method:t,url:e,data:(n||{}).data}))}})),K.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(zt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}fe.prototype[t]=e(),fe.prototype[t+"Form"]=e(!0)}));const he=fe;class pe{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 Bt(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 pe((function(e){t=e})),cancel:t}}}const de=pe,ye={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(ye).forEach((([t,e])=>{ye[e]=t}));const me=ye,ve=function t(e){const n=new he(e),o=r(he.prototype.request,n);return K.extend(o,he.prototype,n,{allOwnKeys:!0}),K.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return t(zt(e,n))},o}(wt);ve.Axios=he,ve.CanceledError=Bt,ve.CancelToken=de,ve.isCancel=Ct,ve.VERSION="1.7.7",ve.toFormData=nt,ve.AxiosError=$,ve.Cancel=ve.CanceledError,ve.all=function(t){return Promise.all(t)},ve.spread=function(t){return function(e){return t.apply(null,e)}},ve.isAxiosError=function(t){return K.isObject(t)&&!0===t.isAxiosError},ve.mergeConfig=zt,ve.AxiosHeaders=xt,ve.formToJSON=t=>bt(K.isHTMLForm(t)?new FormData(t):t),ve.getAdapter=oe,ve.HttpStatusCode=me,ve.default=ve;const be=ve;function ge(t){return ge="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},ge(t)}function we(){we=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 v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==ge(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 j(e,n,r){var o=h;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=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(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(ge(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"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=B,L.prototype={constructor:L,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(C),!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,m):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),m},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),C(n),m}},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;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Se(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 Ee(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Se(i,r,o,a,c,"next",t)}function c(t){Se(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Oe(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,_e(r.key),r)}}function _e(t){var e=function(t){if("object"!=ge(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ge(e)?e:e+""}var Pe=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})},e=[{key:"get",value:function(){var t=Ee(we().mark((function t(e,n){var r;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.get(e,{params: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("GET ".concat(e," failed: ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,this,[[0,7]])})));return function(e,n){return t.apply(this,arguments)}}()},{key:"post",value:(o=Ee(we().mark((function t(e,n){var r;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.post(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("POST ".concat(e," failed: ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return o.apply(this,arguments)})},{key:"put",value:(r=Ee(we().mark((function t(e,n){var r;return we().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=Ee(we().mark((function t(e,n){var r;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.delete(e,{params: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("DELETE ".concat(e," failed: ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return n.apply(this,arguments)})}],e&&Oe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,o}();const je=Pe;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 ke(){ke=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 v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==xe(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 j(e,n,r){var o=h;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=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(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(xe(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"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=B,L.prototype={constructor:L,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(C),!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,m):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),m},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),C(n),m}},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;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Ce(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 Le(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,Be(r.key),r)}}function Be(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+""}var Te=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:"fetchMapStyle",value:(n=ke().mark((function t(e,n,r){return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.apiManager.get("/map-views/v1/".concat(e,"/").concat(n,"/").concat(r,"/style"));case 3:return t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),console.error("Error fetching map data:",t.t0),t.abrupt("return",null);case 10:case"end":return t.stop()}}),t,this,[[0,6]])})),r=function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function a(t){Ce(i,r,o,a,c,"next",t)}function c(t){Ce(i,r,o,a,c,"throw",t)}a(void 0)}))},function(t,e,n){return r.apply(this,arguments)})}],e&&Le(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();const Re=Te;function Ne(t){return Ne="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},Ne(t)}function Ae(){Ae=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 v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Ne(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 j(e,n,r){var o=h;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=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(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(Ne(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"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=B,L.prototype={constructor:L,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(C),!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,m):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),m},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),C(n),m}},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;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function De(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 Fe(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){De(i,r,o,a,c,"next",t)}function c(t){De(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,Ve(r.key),r)}}function Ve(t){var e=function(t){if("object"!=Ne(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ne(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:"search",value:(r=Fe(Ae().mark((function t(e,n,r,o){var i;return Ae().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,"/").concat(n,"/").concat(r),{q:o});case 3:return i=t.sent,t.abrupt("return",i);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error searching query:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e,n,o){return r.apply(this,arguments)})},{key:"fetchContentPlacementDetails",value:(n=Fe(Ae().mark((function t(e){var n;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.apiManager.get("/search/v1/details/".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&&Ie(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();const He=ze;function Me(t){return Me="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},Me(t)}function Ue(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,qe(r.key),r)}}function qe(t){var e=function(t){if("object"!=Me(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Me(e)?e:e+""}const Ge=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.apiManager=new je("https://api.waygomaps.com"),this.mapViewApi=new Re(this.apiManager),this.SearchApi=new He(this.apiManager)},(e=[{key:"setApiKey",value:function(t){this.apiKey=t}},{key:"getMapViewApi",value:function(){return this.mapViewApi}},{key:"getSearchApi",value:function(){return this.SearchApi}}])&&Ue(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());function We(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 Ke(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 Je(t){return Je="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},Je(t)}function Ze(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"!=Je(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Je(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Je(e)?e:e+""}const $e=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]:{};return this._listeners[t]?(e.type=t,this._listeners[t].forEach((function(t){return t(e)})),this):this}}],e&&Ze(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Qe(t){return Qe="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},Qe(t)}function Xe(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,tn(r.key),r)}}function tn(t){var e=function(t){if("object"!=Qe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qe(e)?e:e+""}function en(t,e,n){return e=rn(e),function(t,e){if(e&&("object"==Qe(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,nn()?Reflect.construct(e,n||[],rn(t).constructor):e.apply(t,n))}function nn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(nn=function(){return!!t})()}function rn(t){return rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rn(t)}function on(t,e){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},on(t,e)}const an=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),en(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&&on(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&&Xe(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}($e));function cn(t){return cn="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},cn(t)}function sn(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,un(r.key),r)}}function un(t){var e=function(t){if("object"!=cn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=cn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==cn(e)?e:e+""}function ln(t,e,n){return e=hn(e),function(t,e){if(e&&("object"==cn(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,fn()?Reflect.construct(e,n||[],hn(t).constructor):e.apply(t,n))}function fn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(fn=function(){return!!t})()}function hn(t){return hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hn(t)}function pn(t,e){return pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pn(t,e)}const dn=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=ln(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&&pn(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),an.on(t,e)}},{key:"removeGlobalHandler",value:function(t,e){this.globalHandlers[t]&&(this.globalHandlers[t]=this.globalHandlers[t].filter((function(t){return t!==e})),an.off(t,e))}},{key:"removeAllGlobalHandlers",value:function(){var t=this,e=function(e){t.globalHandlers[e].forEach((function(t){return an.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=[]}}])&&sn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}($e);function yn(t){return yn="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},yn(t)}function mn(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,vn(r.key),r)}}function vn(t){var e=function(t){if("object"!=yn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=yn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yn(e)?e:e+""}const bn=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"]},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),console.log("STATE LENGTH PROPER",this.stateHistory.length,this.stateHistory),this.mapView.fire("state:".concat(t),e)}}],e&&mn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();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 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,Sn(r.key),r)}}function Sn(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+""}function En(t,e,n){return e=_n(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,On()?Reflect.construct(e,n||[],_n(t).constructor):e.apply(t,n))}function On(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(On=function(){return!!t})()}function _n(t){return _n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_n(t)}function Pn(t,e){return Pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pn(t,e)}const jn=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=En(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&&Pn(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})}))}},{key:"render",value:function(){this.element.innerHTML='\n <div class="result-title">'.concat(this.result.name,'</div>\n <div class="result-subtitle">').concat(this.result.contextual_location,"</div>\n ")}},{key:"getElement",value:function(){return this.element}}])&&wn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function xn(t){return xn="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},xn(t)}function kn(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,Cn(r.key),r)}}function Cn(t){var e=function(t){if("object"!=xn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xn(e)?e:e+""}function Ln(t,e,n){return e=Tn(e),function(t,e){if(e&&("object"==xn(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,Bn()?Reflect.construct(e,n||[],Tn(t).constructor):e.apply(t,n))}function Bn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Bn=function(){return!!t})()}function Tn(t){return Tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Tn(t)}function Rn(t,e){return Rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Rn(t,e)}const Nn=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=Ln(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&&Rn(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.results=[],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:"updateView",value:function(t,e){this.results=t,t.length>1&&this.setTitle("".concat(t.length," results found for '").concat(e,"'")),1===t.length&&this.setTitle("".concat(t.length," result found for '").concat(e,"'")),0===t.length&&this.setTitle("No matching results for '".concat(e,"'")),this.render()}},{key:"updateResults",value:function(t){this.results=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 jn(e);n.on("click",(function(){return t.fire("selectCell",{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}}])&&kn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);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 Dn(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,Fn(r.key),r)}}function Fn(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 In=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},(e=[{key:"onAdd",value:function(t){this.map=t}},{key:"onRemove",value:function(){this.container.parentNode.removeChild(this.container),this.map=void 0}}])&&Dn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Vn(t){return Vn="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},Vn(t)}function zn(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,Hn(r.key),r)}}function Hn(t){var e=function(t){if("object"!=Vn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Vn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vn(e)?e:e+""}function Mn(t,e,n){return e=Gn(e),function(t,e){if(e&&("object"==Vn(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,Un()?Reflect.construct(e,n||[],Gn(t).constructor):e.apply(t,n))}function Un(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Un=function(){return!!t})()}function qn(){return qn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Gn(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}},qn.apply(null,arguments)}function Gn(t){return Gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gn(t)}function Wn(t,e){return Wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Wn(t,e)}const Kn=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=Mn(this,e,[n])).searchResultsView=new Nn,t.searchedQuery=null,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&&Wn(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.initializeEventListeners(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=qn(Gn(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.searchResultsView.on("closeView",this._handleCloseSearchResultsView.bind(this)),this.searchResultsView.on("selectCell",this._handleSearchResultSelect.bind(this))}},{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.hide()}},{key:"_handleSearchState",value:function(t){var e=t.query,n=t.results;this.searchedQuery=e,this.searchResultsView.updateResults([]),this.searchResultsView.updateView(n,e),this.show()}},{key:"_handleSelectedContentState",value:function(t){this.searchResultsView.updateResults([]),this.hide()}},{key:"_handleDirectionsState",value:function(t){console.log("handling directions state in search results control")}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&zn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(In);function Jn(t){return Jn="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},Jn(t)}function Zn(){Zn=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 v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Jn(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 j(e,n,r){var o=h;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=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(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(Jn(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"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=B,L.prototype={constructor:L,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(C),!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,m):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),m},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),C(n),m}},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;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Yn(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 $n(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Yn(i,r,o,a,c,"next",t)}function c(t){Yn(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Qn(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?Qn(Object(n),!0).forEach((function(e){tr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function tr(t,e,n){return(e=nr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,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,nr(r.key),r)}}function nr(t){var e=function(t){if("object"!=Jn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jn(e)?e:e+""}function rr(t,e,n){return e=ir(e),function(t,e){if(e&&("object"==Jn(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||[],ir(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 ir(t){return ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ir(t)}function ar(t,e){return ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ar(t,e)}var cr={"c66d7e2c3ebd4a8fa60efa5bf3b5b301:2d4911eda2ef4950b307e51cd0ccf35e":{steps:["Leave Roundtable and make a left","Turn right after walking 177 feet","Turn left after walking 203 feet","Turn right after walking 100 feet","Continue straight in 242 feet","Arrive at Stage 4, on your left"],path:[[-81.55730801074388,-195.68687504906683],[-66.79352848318483,-195.68687504906688],[-66.79352848318483,-136.30367294932935],[-6.7541584044446665,-136.30367294932955],[-6.7541584044446195,-106.92078820451393],[81.82851876090972,-106.92078820451393],[81.82851876090972,-47.20950211527508],[140.88363687114594,-47.20950211527508]]}},sr={container:"map",sourceId:"collision-conference.2024.2xw_YUXYS8GoDTB2AQgN3A",center:[0,0],zoom:12,bearing:0,pitch:0,minPitch:0,maxPitch:75,minZoom:0,maxZoom:22,bounds:null,doubleClickZoom:!0,dragPan:!0,dragRotate:!0,scrollZoom:!0,touchPitch:!0,touchZoomRotate:!0,interactive:!0,trackResize:!0,keyboard:!0},ur=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=rr(this,e,[Xn(Xn({},sr),n)])).mapViewApi=Ge.getMapViewApi(),t.searchApi=Ge.getSearchApi(),t.mapContainer=document.createElement("div"),t.mapContainer.className="inner-map-container",t.ready=t._initialize(n),t._stateCoordinator=new bn(t),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&&ar(t,e)}(e,t),n=e,r=[{key:"_initialize",value:(f=$n(Zn().mark((function t(){var e,n=this;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("Initializing map view component.."),t.prev=1,t.next=4,this._loadMapLibraries();case 4:return this.render(),t.next=7,this._fetchMapStyle();case 7:e=t.sent,"undefined"!=typeof mapboxgl&&e?(mapboxgl.accessToken="pk.eyJ1Ijoid2F5Z28tbWFwcyIsImEiOiJjbGtxYzZ1N3QxdG43M210bXFuYmJ4a3gxIn0.tlbznj_fRJ8La6s2UUMO6A",this.map=new mapboxgl.Map({container:this.mapContainer,style:"mapbox://styles/waygo-maps/".concat(e),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("load",(function(){return n.fire("load")})),this._initializeEventListeners()):console.error("Mapbox GL JS is not loaded."),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),console.error("Failed to initialize the map:",t.t0);case 14:case"end":return t.stop()}}),t,this,[[1,11]])}))),function(){return f.apply(this,arguments)})},{key:"_initializeEventListeners",value:function(){var t=this;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})})),this.mapContainer.addEventListener("touchend",(function(e){return t.fire("touchend",{originalEvent:e})})),this.mapContainer.addEventListener("touchmove",(function(e){return t.fire("touchmove",{originalEvent:e})})),this.mapContainer.addEventListener("touchcancel",(function(e){return t.fire("touchcancel",{originalEvent: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})}))}))}},{key:"_fetchMapStyle",value:(l=$n(Zn().mark((function t(){var e,n,r,o,i;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(3===(e=this.options.sourceId.split(".")).length){t.next=4;break}return console.error('The mapViewId format is incorrect. It should be in the format "businessId.mapId.mapViewId".'),t.abrupt("return");case 4:return n=e[0]||"",r=e[1]||"",o=e[2]||"",t.prev=7,t.next=10,this.mapViewApi.fetchMapStyle(n,r,o);case 10:return i=t.sent,console.log("Fetched map style:",i.style_id),t.abrupt("return",i.style_id);case 15:t.prev=15,t.t0=t.catch(7),console.error("Error fetching map style:",t.t0);case 18:case"end":return t.stop()}}),t,this,[[7,15]])}))),function(){return l.apply(this,arguments)})},{key:"_loadMapLibraries",value:(u=$n(Zn().mark((function t(){return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("Loading map libraries"),t.next=3,Ke("https://api.mapbox.com/mapbox-gl-js/v3.5.1/mapbox-gl.css");case 3:return t.next=5,We("https://api.mapbox.com/mapbox-gl-js/v3.5.1/mapbox-gl.js");case 5:console.log("Map libraries loaded");case 6:case"end":return t.stop()}}),t)}))),function(){return u.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:"addControl",value:function(t){var e=t.onAdd(this);this.mapContainer.appendChild(e)}},{key:"removeControl",value:function(t){this.map.removeControl(t)}},{key:"setToDefaultState",value:function(){this._stateCoordinator.transitionTo("default")}},{key:"setToSearchState",value:(s=$n(Zn().mark((function t(e){var n;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.search(e);case 2:n=t.sent,this._stateCoordinator.transitionTo("search",{query:e,results:n});case 4:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"setToSelectedContentState",value:(c=$n(Zn().mark((function t(e){var n,r;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e[e.length-1],t.next=3,this.getContentPlacementDetails(n);case 3:r=t.sent,this._stateCoordinator.transitionTo("selectedContent",{contentPlacementIds:e,selectedContentPlacement:r});case 5:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"setToDirectionsState",value:(a=$n(Zn().mark((function t(){var e,n,r,o,i=arguments;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=i.length>1&&void 0!==i[1]?i[1]:null,r=null,!(e=i.length>0&&void 0!==i[0]?i[0]:null)){t.next=7;break}return t.next=6,this.getContentPlacementDetails(e);case 6:r=t.sent;case 7:if(o=null,!n){t.next=12;break}return t.next=11,this.getContentPlacementDetails(n);case 11:o=t.sent;case 12:this._stateCoordinator.transitionTo("directions",{startContentPlacement:r,endContentPlacement:o});case 13:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"initiateBack",value:function(){this.fire("initiate:back")}},{key:"initiateSetToSearchState",value:function(){this.fire("initiate:search")}},{key:"findPath",value:function(t,e){console.log("finding path",t,e);var n=cr["".concat(t,":").concat(e)];console.log("DATA",n);var r=function(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]),console.log("CHECK1",e);var r=[],o=function(t){console.log("CHECK3");var e=t*Math.PI/180,n=6378137,r=6356752.314;console.log("CHECK4",e,n,r);var o=(Math.pow(n,.5)-Math.pow(r,.5))/Math.pow(n,.5);console.log("CHECK5",o);var i=1/(111132.954-559.822*Math.cos(2*e)+1.175*Math.cos(4*e));console.log("CHECK6",i);var a=1/(Math.PI*n*Math.cos(e)/(180*Math.pow(1-Math.pow(o,2)*Math.pow(Math.sin(e),2),.5)));return console.log("CHECK7",a),{meterToLat:i,meterToLon:a}}(e[1]),i=o.meterToLat,a=o.meterToLon;return console.log("CHECK2",i,a),t.forEach((function(t){var o=function(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,i=t[0],a=t[1],c=e[0];return{lat:e[1]+a*o*n,lon:c+i*o*r}}(t,e,i,a,n),c=o.lat,s=o.lon;r.push([s,c])})),r}(n.path,null,10);return console.log("COORDINATES:",r),{coordinates:r,steps:n.steps}}},{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:(i=$n(Zn().mark((function t(e){return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(""!==e){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,t.next=5,this.searchApi.search("e9df990cbd084934973a87fc2f3b0e74","move-america-2024","FTdsy9btTs6qumoZ6E8Z2Q",e);case 5:return t.abrupt("return",t.sent);case 8:t.prev=8,t.t0=t.catch(2),axios.isCancel(t.t0)?console.log("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 11:case"end":return t.stop()}}),t,this,[[2,8]])}))),function(t){return i.apply(this,arguments)})},{key:"getContentPlacementDetails",value:(o=$n(Zn().mark((function t(e){return Zn().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 t.abrupt("return",t.sent);case 6:t.prev=6,t.t0=t.catch(0),axios.isCancel(t.t0)?console.log("Request canceled:",t.t0.message):console.error("Fetching content placement details error:",t.t0);case 9:case"end":return t.stop()}}),t,this,[[0,6]])}))),function(t){return o.apply(this,arguments)})}],r&&er(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a,c,s,u,l,f}(dn);const lr=t.p+"f8965838ad87362f7fd1507af2a45dfa.svg",fr=t.p+"7d2fb7c25b2d12614aeb1b025a51b86f.svg",hr=t.p+"709b5ad35fbbdaa1c4b5222a276444fa.svg",pr=t.p+"507fada530642f8f1084a961a554e5a5.svg";function dr(t){return dr="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},dr(t)}function yr(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"!=dr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=dr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==dr(e)?e:e+""}function vr(t,e,n){return e=gr(e),function(t,e){if(e&&("object"==dr(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,br()?Reflect.construct(e,n||[],gr(t).constructor):e.apply(t,n))}function br(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(br=function(){return!!t})()}function gr(t){return gr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gr(t)}function wr(t,e){return wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wr(t,e)}const Sr=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=vr(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&&wr(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="Search MOVE America 2024",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.element.appendChild(this.leftButton),this.element.appendChild(this.input),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(){this.fire("focus")}},{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(lr,'" alt="Search" />'),this.rightButton.style.display="flex"):"cancel"===t?(this.rightButton.innerHTML='<img src="'.concat(fr,'" 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(pr,'" 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(hr,'" 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:"getText",value:function(){return this.input.value}},{key:"setText",value:function(t){this.input.value=t}},{key:"setPlaceholderText",value:function(t){this.input.placeholder=t}},{key:"getElement",value:function(){return this.element}}],r&&yr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Er(t){return Er="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},Er(t)}function Or(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,_r(r.key),r)}}function _r(t){var e=function(t){if("object"!=Er(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Er(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Er(e)?e:e+""}function Pr(t,e,n){return e=xr(e),function(t,e){if(e&&("object"==Er(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,jr()?Reflect.construct(e,n||[],xr(t).constructor):e.apply(t,n))}function jr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jr=function(){return!!t})()}function xr(t){return xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xr(t)}function kr(t,e){return kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},kr(t,e)}const Cr=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=Pr(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&&kr(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.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(){this.element.innerHTML='\n <div class="suggestion-title">'.concat(this.result.name,'</div>\n <div class="suggestion-subtitle">').concat(this.result.contextual_location,"</div>\n ")}},{key:"getElement",value:function(){return this.element}}])&&Or(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Lr(t){return Lr="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},Lr(t)}function Br(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,Tr(r.key),r)}}function Tr(t){var e=function(t){if("object"!=Lr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Lr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lr(e)?e:e+""}function Rr(t,e,n){return e=Ar(e),function(t,e){if(e&&("object"==Lr(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||[],Ar(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 Ar(t){return Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ar(t)}function Dr(t,e){return Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Dr(t,e)}const Fr=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=Rr(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&&Dr(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.results=[],this.element=document.createElement("div"),this.element.className="search-bar-suggestions-view"}},{key:"updateResults",value:function(t){this.results=t,this.render()}},{key:"render",value:function(){var t=this;this.element.innerHTML="",this.results.forEach((function(e){var n=new Cr(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}}])&&Br(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);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 Vr(){Vr=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 v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Ir(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 j(e,n,r){var o=h;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=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(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(Ir(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"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=B,L.prototype={constructor:L,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(C),!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,m):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),m},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),C(n),m}},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;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function zr(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 Hr(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){zr(i,r,o,a,c,"next",t)}function c(t){zr(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Mr(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,Ur(r.key),r)}}function Ur(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 qr(t,e,n){return e=Wr(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,Gr()?Reflect.construct(e,n||[],Wr(t).constructor):e.apply(t,n))}function Gr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Gr=function(){return!!t})()}function Wr(t){return Wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wr(t)}function Kr(t,e){return Kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Kr(t,e)}const Jr=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=qr(this,e,[n])).searchApi=Ge.getSearchApi(),t.element=document.createElement("div"),t.element.className="search-box",t.searchBar=new Sr,t.searchBarSuggestionsView=new Fr,t.searchCount=0,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&&Kr(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))}},{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=Hr(Vr().mark((function t(){var e;return Vr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((e=this.searchBar.getText()).length>0)){t.next=5;break}return t.next=4,this.getSearchBarSuggestions(e);case 4:this.openSuggestionsView();case 5:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"_handleSearchBarBlur",value:function(){this.searchBarSuggestionsView.hide()}},{key:"_handleSearchBarInput",value:(i=Hr(Vr().mark((function t(e){var n;return Vr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.query,this.openSuggestionsView(),t.next=4,this.getSearchBarSuggestions(n);case 4: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:"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:"getSearchBarSuggestions",value:(o=Hr(Vr().mark((function t(e){var n,r;return Vr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=++this.searchCount,""!==e){t.next=5;break}return this.searchBarSuggestionsView.updateResults([]),this.closeSuggestionsView(),t.abrupt("return");case 5:return t.prev=5,t.next=8,this.searchApi.search("e9df990cbd084934973a87fc2f3b0e74","move-america-2024","FTdsy9btTs6qumoZ6E8Z2Q",e);case 8:r=t.sent,n===this.searchCount&&this.searchBarSuggestionsView.updateResults(r),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(5),be.isCancel(t.t0)?console.log("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 15:case"end":return t.stop()}}),t,this,[[5,12]])}))),function(t){return o.apply(this,arguments)})}],r&&Mr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a}(dn);function Zr(t){return Zr="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},Zr(t)}function Yr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,$r(r.key),r)}}function $r(t){var e=function(t){if("object"!=Zr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Zr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Zr(e)?e:e+""}function Qr(t,e,n){return e=eo(e),function(t,e){if(e&&("object"==Zr(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,Xr()?Reflect.construct(e,n||[],eo(t).constructor):e.apply(t,n))}function Xr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xr=function(){return!!t})()}function to(){return to="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=eo(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}},to.apply(null,arguments)}function eo(t){return eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},eo(t)}function no(t,e){return no=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},no(t,e)}const ro=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=Qr(this,e,[n])).searchBox=new Jr,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&&no(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.show(),this.initializeEventListeners(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=to(eo(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.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))}},{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.input.focus(),this.searchBox.searchBar.updateRightButtonIcon("search"),this.searchBox.searchBar.updateLeftButtonIcon("none"),this.show()}},{key:"_handleSearchState",value:function(t){var e=t.query,n=t.results;console.log("SEARC",e,n),this.searchBox.searchBar.setText(e),this.searchBox.searchBar.updateRightButtonIcon("cancel"),this.searchBox.searchBar.updateLeftButtonIcon("none"),this.show()}},{key:"_handleSelectedContentState",value:function(t){var e=t.contentPlacementIds,n=t.selectedContentPlacement;this.show();var r=n.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){console.log("handling directions state in search box control"),this.map._stateCoordinator.stateHistory.length>2?this.searchBox.searchBar.updateLeftButtonIcon("back"):this.searchBox.searchBar.updateLeftButtonIcon("none")}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&Yr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(In);function oo(t){return oo="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},oo(t)}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"!=oo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=oo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==oo(e)?e:e+""}function co(t,e,n){return e=uo(e),function(t,e){if(e&&("object"==oo(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||[],uo(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(t){return uo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},uo(t)}function lo(t,e){return lo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},lo(t,e)}const fo=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],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),(t=co(this,e,[r])).items=n,t.containerClass=r.container,t.element=document.createElement("div"),t.element.className="slider-bar-container ".concat(t.containerClass),t.sliderBar=document.createElement("div"),t.sliderBar.className="slider-bar ".concat(t.containerClass,"-bar"),t.leftButton=document.createElement("button"),t.leftButton.className="scroll-button left ".concat(t.containerClass,"-scroll-button"),t.leftButton.addEventListener("click",(function(){return t._scrollSliderBar("left")})),t.rightButton=document.createElement("button"),t.rightButton.className="scroll-button right ".concat(t.containerClass,"-scroll-button"),t.rightButton.addEventListener("click",(function(){return t._scrollSliderBar("right")})),t.buttonElements=[],t._render(),t.sliderBar.addEventListener("scroll",(function(){return t._updateScrollButtons()})),setTimeout((function(){return t._updateScrollButtons()}),.8),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&&lo(t,e)}(e,t),n=e,r=[{key:"_render",value:function(){var t=this;this.items.forEach((function(e){var n=e.title,r=e.imageUrl,o=document.createElement("button");if(o.addEventListener("click",t._handleSliderButtonSelect.bind(t)),o.className="slider-bar-button ".concat(t.containerClass,"-button"),r){var i=document.createElement("img");i.src=r,i.alt=n,i.className="slider-bar-button-image ".concat(t.containerClass,"-button-image"),o.appendChild(i)}else console.log("No image found for slider bar button.");var a=document.createElement("span");a.textContent=n,o.appendChild(a),t.buttonElements.push(o),t.sliderBar.appendChild(o)})),this.element.appendChild(this.leftButton),this.element.appendChild(this.sliderBar),this.element.appendChild(this.rightButton)}},{key:"_handleSliderButtonSelect",value:function(t){var e=t.currentTarget,n=e.querySelector("span").textContent;if(e.classList.contains("selected"))e.classList.remove("selected"),this.fire("deselect");else{var r=document.querySelector(".slider-bar-button.selected");r&&r.classList.remove("selected"),e.classList.add("selected"),this.fire("selectNew",{query:n})}}},{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(){this.sliderBar.querySelectorAll(".slider-bar-button.selected").forEach((function(t){return t.classList.remove("selected")}))}},{key:"deselectAllNotMatchingQuery",value:function(t){this.sliderBar.querySelectorAll(".slider-bar-button.selected").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:"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&&io(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function ho(t){return ho="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},ho(t)}function po(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,yo(r.key),r)}}function yo(t){var e=function(t){if("object"!=ho(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ho(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ho(e)?e:e+""}function mo(t,e,n){return e=go(e),function(t,e){if(e&&("object"==ho(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||[],go(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 bo(){return bo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=go(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}},bo.apply(null,arguments)}function go(t){return go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},go(t)}function wo(t,e){return wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wo(t,e)}const So=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=mo(this,e,[n])).categoryBar=new fo([{title:"Energy & charging"},{title:"Mobility"},{title:"Automotive"},{title:"Indoor mapping"},{title:"Supply chain"},{title:"Tech data"},{title:"Insurance"},{title:"Rideshare"},{title:"Manufacturing"},{title:"Autonomous vehicles"},{title:"Human resources"},{title:"Battery tech"},{title:"Renewable energy"}],{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&&wo(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.show(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=bo(go(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.categoryBar.on("selectNew",this._handleNewCategoryButtonSelect.bind(this)),this.categoryBar.on("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))}},{key:"_handleDefaultState",value:function(){this.show(),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;this.map.setToSearchState(e)}},{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:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&po(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(In),Eo=(t.p,t.p+"1b7f16a1f8c7a51acb29667188b93cd4.svg");function Oo(t){return Oo="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},Oo(t)}function _o(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,Po(r.key),r)}}function Po(t){var e=function(t){if("object"!=Oo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Oo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Oo(e)?e:e+""}function jo(t,e,n){return e=ko(e),function(t,e){if(e&&("object"==Oo(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,xo()?Reflect.construct(e,n||[],ko(t).constructor):e.apply(t,n))}function xo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xo=function(){return!!t})()}function ko(t){return ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ko(t)}function Co(t,e){return Co=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Co(t,e)}const Lo=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=jo(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&&Co(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.nameElement=document.createElement("div"),this.nameElement.className="header-content-name",this.nameElement.textContent=t.data[t.title_key],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),this.imageViewElement=document.createElement("div"),this.imageViewElement.className="header-image-view",this.element.appendChild(this.imageViewElement),this.element.appendChild(this.textContainer)}},{key:"getElement",value:function(){return this.element}}])&&_o(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Bo(t){return Bo="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},Bo(t)}function To(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"!=Bo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Bo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bo(e)?e:e+""}function No(t,e,n){return e=Do(e),function(t,e){if(e&&("object"==Bo(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,Ao()?Reflect.construct(e,n||[],Do(t).constructor):e.apply(t,n))}function Ao(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ao=function(){return!!t})()}function Do(t){return Do=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Do(t)}function Fo(t,e){return Fo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fo(t,e)}const Io=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=No(this,e,[o])).icon=t,r.text=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&&Fo(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){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}}])&&To(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Vo(t){return Vo="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},Vo(t)}function zo(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,Ho(r.key),r)}}function Ho(t){var e=function(t){if("object"!=Vo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Vo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vo(e)?e:e+""}function Mo(t,e,n){return e=qo(e),function(t,e){if(e&&("object"==Vo(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,Uo()?Reflect.construct(e,n||[],qo(t).constructor):e.apply(t,n))}function Uo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Uo=function(){return!!t})()}function qo(t){return qo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qo(t)}function Go(t,e){return Go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Go(t,e)}const Wo=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=Mo(this,e,[r])).data=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&&Go(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.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}}])&&zo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Ko(t){return Ko="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},Ko(t)}function Jo(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,Zo(r.key),r)}}function Zo(t){var e=function(t){if("object"!=Ko(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ko(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ko(e)?e:e+""}function Yo(t,e,n){return e=Qo(e),function(t,e){if(e&&("object"==Ko(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||[],Qo(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 Qo(t){return Qo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qo(t)}function Xo(t,e){return Xo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xo(t,e)}const ti=function(t){function e(t,n,r){var o,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),(o=Yo(this,e,[i])).title=t,o.subtitle=n,o.placementId=r,o._initialize(),o}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&&Xo(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",this.titleElement.textContent=this.title+" --\x3e",this.subtitleElement=document.createElement("div"),this.subtitleElement.className="content-details-child-view-subtitle",this.subtitleElement.textContent=this.subtitle,this._render()}},{key:"_render",value:function(){this.element.appendChild(this.titleElement),this.element.appendChild(this.subtitleElement)}},{key:"getElement",value:function(){return this.element}}])&&Jo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function ei(t){return ei="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},ei(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,ri(r.key),r)}}function ri(t){var e=function(t){if("object"!=ei(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ei(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ei(e)?e:e+""}function oi(t,e,n){return e=ai(e),function(t,e){if(e&&("object"==ei(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,ii()?Reflect.construct(e,n||[],ai(t).constructor):e.apply(t,n))}function ii(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ii=function(){return!!t})()}function ai(t){return ai=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ai(t)}function ci(t,e){return ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ci(t,e)}const si=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=oi(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&&ci(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 ti(e.name,e.contextual_location,e.placement_id);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.placementId})}},{key:"getElement",value:function(){return this.element}}],r&&ni(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn),ui=t.p+"4b9ae054d996b09c84d311ff59d62135.svg";function li(t){return li="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},li(t)}function fi(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 hi(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)?hi(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 hi(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 pi(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"!=li(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=li(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==li(e)?e:e+""}function yi(t,e,n){return e=vi(e),function(t,e){if(e&&("object"==li(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,mi()?Reflect.construct(e,n||[],vi(t).constructor):e.apply(t,n))}function mi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mi=function(){return!!t})()}function vi(t){return vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vi(t)}function bi(t,e){return bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bi(t,e)}const gi=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=yi(this,e,[n])).contentPlacement=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.directionsButton=document.createElement("button"),t.directionsButton.className="content-details-directions-button",t.directionsButton.textContent="Directions",t.shareButton=document.createElement("button"),t.shareButton.className="content-details-share-button",t.shareButton.textContent="Share",t.locationButton=null,t.websiteButton=null,t.detailsView=null,t.childrenComponents=[],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&&bi(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))}},{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.appendChild(this.directionsButton),this.actionButtons.appendChild(this.shareButton),this.header.appendChild(this.actionButtons),this.locationButton&&this.actionsView.appendChild(this.locationButton.getElement()),this.websiteButton&&this.actionsView.appendChild(this.websiteButton.getElement()),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:"_handleDirectionsButtonSelect",value:function(){this.fire("selectDirectionsButton",{placementId:this.contentPlacement.placement_id})}},{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){var e=t.content.data,n=Object.keys(e),r=[t.content.title_key,"Feature","Features","Feature ID","feature_id","Website","Website URL","LinkedIn","Files & media"],o={};return n.forEach((function(t){var n=e[t];r.includes(t)||null==n||""===n||(o[t]=n)})),o}},{key:"updateView",value:function(t){this.contentPlacement=t,this.contentPlacementHeader=new Lo(t),this.locationButton=new Io(Eo,t.contextual_location);var e=t.content.data.Website||t.content.data.LinkedIn||t.content.data["Website URL"];this.websiteButton=e?new Io(ui,e):null;var n=this.findViableAdditionalData(t),r=Object.keys(n);this.detailsView=r.length>0?new Wo(n):null,this.childrenComponents=[];for(var o=0,i=Object.entries(t.children);o<i.length;o++){var a=fi(i[o],2),c=a[0],s=a[1],u=new si(c,s);this.childrenComponents.push(u)}this._setupEventListeners(),this._render()}},{key:"getElement",value:function(){return this.element}}])&&pi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);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 Si(){Si=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 v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==wi(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 j(e,n,r){var o=h;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=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(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(wi(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"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=B,L.prototype={constructor:L,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(C),!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,m):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),m},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),C(n),m}},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;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Ei(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 Oi(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,_i(r.key),r)}}function _i(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 Pi(t,e,n){return e=ki(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,ji()?Reflect.construct(e,n||[],ki(t).constructor):e.apply(t,n))}function ji(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ji=function(){return!!t})()}function xi(){return xi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ki(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}},xi.apply(null,arguments)}function ki(t){return ki=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ki(t)}function Ci(t,e){return Ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ci(t,e)}const Li=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=Pi(this,e,[n])).map=null,t.contentPlacementIds=[],t.currentContentPlacement=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&&Ci(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.hide(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=xi(ki(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("state:directions",this._handleDirectionsState.bind(this)),this.map.on("initiate:back",this._handleMapInitiateBack.bind(this))}},{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&&(console.log("THIS IS BACK IN DIRECTIONS STATE:",this.contentPlacementIds.length),this.map.setToSelectedContentState(this.contentPlacementIds))}},{key:"_handleSelectChildContentPlacement",value:function(t){var e=t.placementId;this.contentPlacementIds.push(e),this.map.setToSelectedContentState(this.contentPlacementIds)}},{key:"_handleDefaultState",value:function(){this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews()}},{key:"_handleSearchState",value:function(t){this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews()}},{key:"_handleSelectedContentState",value:function(t){var e=t.contentPlacementIds,n=t.selectedContentPlacement;this.contentPlacementIds=e,this.currentContentPlacement=n,console.log("SELECTED",n),this._updateContentViews(),this.show()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleSelectDirectionsButton",value:(o=Si().mark((function t(e){var n;return Si().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)})),i=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){Ei(i,n,r,a,c,"next",t)}function c(t){Ei(i,n,r,a,c,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})},{key:"_updateContentViews",value:function(){this._clearViews(),this._render()}},{key:"_render",value:function(){if(0!==this.contentPlacementIds.length&&null!==this.currentContentPlacement){var t=new gi;t.updateView(this.currentContentPlacement),t.on("selectChildContentPlacement",this._handleSelectChildContentPlacement.bind(this)),t.on("selectDirectionsButton",this._handleSelectDirectionsButton.bind(this)),this.container.appendChild(t.getElement())}}},{key:"_clearViews",value:function(){for(;this.container.firstChild;)this.container.removeChild(this.container.firstChild)}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&Oi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}(In);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 Ti(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,Ri(r.key),r)}}function Ri(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 Ni(t,e,n){return e=Fi(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,Ai()?Reflect.construct(e,n||[],Fi(t).constructor):e.apply(t,n))}function Ai(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ai=function(){return!!t})()}function Di(){return Di="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Fi(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}},Di.apply(null,arguments)}function Fi(t){return Fi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fi(t)}function Ii(t,e){return Ii=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ii(t,e)}const Vi=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=Ni(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}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&&Ii(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.applyHoverEffectToAllSymbolLayers(),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=Di(Fi(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"_attachResizeListener",value:function(){var t=this;window.addEventListener("resize",(function(){var e=t.map.mapContainer.offsetWidth;t._configureView(e)}))}},{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))}},{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:"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","title"],"text-font":["Inter Medium"],"text-size":14,"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:{"text-color":"#BE2E28","text-halo-color":"#ffffff","text-halo-width":1}})}},{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","title"],"text-font":["Inter Medium"],"text-size":14,"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:{"text-color":"#1E1E1E","text-halo-color":"#ffffff","text-halo-width":1}})}},{key:"clearSelectedContentLayer",value:function(){this.map.map.getSource("selected-content").setData({type:"FeatureCollection",features:[]})}},{key:"clearHighlightedContentLayer",value:function(){this.map.map.getSource("highlighted-content").setData({type:"FeatureCollection",features:[]})}},{key:"addSelectedFeature",value:function(t,e){var n=this.map.map.getSource("selected-content"),r=n._data,o={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};r.features.push(o),n.setData(r)}},{key:"addHighlightedFeature",value:function(t,e){var n=this.map.map.getSource("highlighted-content"),r=n._data,o={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};r.features.push(o),n.setData(r)}},{key:"_handleDefaultState",value:function(){this.clearHighlightedContentLayer(),this.clearSelectedContentLayer(),this.showSymbolLayers()}},{key:"_handleSearchState",value:function(t){t.query;var e=t.results;this.hideSymbolLayers(),this.clearSelectedContentLayer(),this.updateLabelsForSearchResults(e)}},{key:"_handleSelectedContentState",value:function(t){t.contentPlacementIds;var e=t.selectedContentPlacement;this.updateLabelForSelectedContentPlacement(e)}},{key:"_handleDirectionsState",value:function(t){console.log("handling directions state in interaction control")}},{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=this;this.clearHighlightedContentLayer();var n=[];if(t.forEach((function(t){var r=t.placement_id,o=e.map._findFeatureByPlacementId(r);if(o){var i=o.geometry.coordinates,a=o.properties;e.addHighlightedFeature(i,a),n.push(o)}})),n.length){var r=new mapboxgl.LngLatBounds;if(n.forEach((function(t){r.extend(t.geometry.coordinates)})),"desktop"===this.currentView)this.map.map.fitBounds(r,{padding:{top:200,bottom:200,left:550,right:200},maxZoom:15,duration:1e3});else if("mobile"===this.currentView){var o=.55*this.map.mapContainer.offsetHeight,i=.2*this.map.mapContainer.offsetWidth;this.map.map.fitBounds(r,{padding:{top:200,bottom:o,left:i,right:i},maxZoom:15,duration:1e3})}}}},{key:"updateLabelForSelectedContentPlacement",value:function(t){var e=t.placement_id;this.clearSelectedContentLayer();var n=this.map.map.queryRenderedFeatures({filter:["==",["get","placement_id"],e]});if(0!==n.length){var r=n[0],o=r.geometry.coordinates,i=r.properties;if(this.addSelectedFeature(o,i),"desktop"===this.currentView)this.map.map.easeTo({center:o,padding:{top:0,bottom:0,left:330,right:0},duration:1e3});else if("mobile"===this.currentView){var a=.35*this.map.mapContainer.offsetHeight;this.map.map.easeTo({center:o,padding:{top:0,bottom:a,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:"_handleClick",value:function(t){var e=this.map.map.queryRenderedFeatures(t.point).filter((function(t){return"symbol"===t.layer.type}));if(e.length>0){var n=e[0].properties.placement_id;this.map.setToSelectedContentState([n])}}}],r&&Ti(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(In);function zi(t){return zi="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},zi(t)}function Hi(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,Mi(r.key),r)}}function Mi(t){var e=function(t){if("object"!=zi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=zi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zi(e)?e:e+""}function Ui(t,e,n){return e=Gi(e),function(t,e){if(e&&("object"==zi(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,qi()?Reflect.construct(e,n||[],Gi(t).constructor):e.apply(t,n))}function qi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qi=function(){return!!t})()}function Gi(t){return Gi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gi(t)}function Wi(t,e){return Wi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Wi(t,e)}const Ki=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=Ui(this,e,[r])).steps=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&&Wi(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="steps-view",this._render(this.steps)}},{key:"_render",value:function(t){console.log("HERE ARE STEPSSS",t);var e=document.createElement("h2");e.textContent="Steps",this.element.appendChild(e);var n=document.createElement("ul");t.forEach((function(t){var e=document.createElement("li");e.textContent=t,n.appendChild(e)})),this.element.appendChild(n)}},{key:"getElement",value:function(){return this.element}}])&&Hi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);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 Zi(){Zi=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 v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Ji(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 j(e,n,r){var o=h;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=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(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(Ji(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"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=B,L.prototype={constructor:L,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(C),!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,m):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),m},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),C(n),m}},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;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Yi(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 $i(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Yi(i,r,o,a,c,"next",t)}function c(t){Yi(i,r,o,a,c,"throw",t)}a(void 0)}))}}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,Xi(r.key),r)}}function Xi(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 ta(t,e,n){return e=na(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,ea()?Reflect.construct(e,n||[],na(t).constructor):e.apply(t,n))}function ea(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ea=function(){return!!t})()}function na(t){return na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},na(t)}function ra(t,e){return ra=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ra(t,e)}t.p;const oa=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=ta(this,e,[n])).startSearchBox=new Jr,t.endSearchBox=new Jr,t.startContentPlacement=null,t.endContentPlacement=null,t.steps=null,t.searchApi=Ge.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&&ra(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(){if(this.element.appendChild(this.directionsViewHeader),this.steps){var t=new Ki(this.steps);this.element.appendChild(t.getElement())}}},{key:"_setupEventListeners",value:function(){this.startSearchBox.searchBar.on("focus",this._handleStartSearchBarFocus.bind(this)),this.startSearchBox.searchBar.on("blur",this._handleStartSearchBarBlur.bind(this)),this.endSearchBox.searchBar.on("focus",this._handleEndSearchBarFocus.bind(this)),this.endSearchBox.searchBar.on("blur",this._handleEndSearchBarBlur.bind(this)),this.startSearchBox.searchBarSuggestionsView.on("selectCell",this._handleStartContentPlacementSelect.bind(this)),this.endSearchBox.searchBarSuggestionsView.on("selectCell",this._handleEndContentPlacementSelect.bind(this))}},{key:"_handleStartContentPlacementSelect",value:(i=$i(Zi().mark((function t(e){var n,r,o;return Zi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.result,r=n.placement_id,this.startSearchBox.searchBar.setText(n.name),t.next=5,this.searchApi.fetchContentPlacementDetails(r);case 5:o=t.sent,this.updateView(o,this.endContentPlacement);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_handleEndContentPlacementSelect",value:(o=$i(Zi().mark((function t(e){var n,r,o;return Zi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.result,r=n.placement_id,this.endSearchBox.searchBar.setText(n.name),t.next=5,this.searchApi.fetchContentPlacementDetails(r);case 5:o=t.sent,this.updateView(this.startContentPlacement,o);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"_handleStartSearchBarFocus",value:function(){this.startSearchBox.searchBar.updateRightButtonIcon("search")}},{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)console.log("BOTH ARE THERE, LETS FIRE PATH"),this.fire("initiate:findPath",{startContentPlacementId:t.placement_id,endContentPlacementId:e.placement_id});else if(t){var n=t.content.data[t.content.title_key];this.startSearchBox.searchBar.setText(n),this.endSearchBox.searchBar.setText(""),this.endSearchBox.searchBar.input.focus(),this.clearSteps()}else if(e){var r=e.content.data[e.content.title_key];this.endSearchBox.searchBar.setText(r),this.startSearchBox.searchBar.setText(""),this.startSearchBox.searchBar.input.focus(),this.clearSteps()}}},{key:"setSteps",value:function(t){this.steps=t,this._render()}},{key:"clearSteps",value:function(){var t=this.element.querySelector(".steps-view");t&&t.remove()}},{key:"getElement",value:function(){return this.element}}],r&&Qi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}(dn);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 aa(t,e,n){return(e=sa(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ca(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,sa(r.key),r)}}function sa(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 ua(t,e,n){return e=ha(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||[],ha(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 fa(){return fa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ha(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}},fa.apply(null,arguments)}function ha(t){return ha=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ha(t)}function pa(t,e){return pa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pa(t,e)}const da={MapView:ur,SearchBox:Jr,SearchBoxControl:ro,CategoryBarControl:So,SearchResultsControl:Kn,ContentPlacementControl:Li,InteractionControl:Vi,DirectionsControl: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=ua(this,e,[n])).directionsView=null,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&&pa(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="directions-control-container",this.directionsView=new oa,this.container.appendChild(this.directionsView.getElement()),this.initializeEventListeners(),this.createDirectionsLineLayer(),this.hide(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=fa(ha(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("state:directions",this._handleDirectionsState.bind(this)),this.directionsView.on("initiate:findPath",this._handleIntiateFindPath.bind(this))}},{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":"#1e1e1e","line-width":8}}),this.map.map.moveLayer("directionsLineLayer","special-areas")}},{key:"updateLineData",value:function(t){this.map.map.getSource("directionsLineSource").setData({type:"Feature",properties:{},geometry:{type:"LineString",coordinates:t}});var e=new mapboxgl.LngLatBounds;t.forEach((function(t){e.extend(t)})),this.map.map.fitBounds(e,aa(aa(aa({padding:200},"padding",{top:200,bottom:200,left:500,right:150}),"maxZoom",15),"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()}},{key:"_handleSearchState",value:function(t){t.query,t.results,this.hide()}},{key:"_handleSelectedContentState",value:function(t){t.contentPlacementIds,t.selectedContentPlacement,this.hide(),this.directionsView.updateView(null,null),this.clearLineData()}},{key:"_handleDirectionsState",value:function(t){var e=t.startContentPlacement,n=t.endContentPlacement;console.log("handling directions state in directions control",t),this.show(),this.clearLineData(),this.directionsView.updateView(e,n)}},{key:"_handleIntiateFindPath",value:function(t){var e=t.startContentPlacementId,n=t.endContentPlacementId;this.clearLineData();var r=this.map.findPath(e,n);console.log("HERE IS PATH RESPONSEEE",r);var o=r.coordinates,i=r.steps;this.updateLineData(o),this.directionsView.setSteps(i)}},{key:"_handleSelectDirectionsButton",value:function(t){t.placementId}},{key:"_render",value:function(){console.log("render")}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&ca(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(In),setApiKey:Ge.setApiKey.bind(Ge)};return e.default})()));