@mapvx/web-components 0.0.33 → 0.0.34

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessibility-D3Vyfstu.js","sources":["../../../src/assets/accessibility.svg?raw"],"sourcesContent":["export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 29 29\\\" fill=\\\"none\\\">\\n <path d=\\\"M28.9058 23.8967C28.5889 22.9479 27.573 22.4331 26.6134 22.7514L25.5156 23.1161L23.1535 17.4537C22.8788 16.7146 22.2161 16.3125 21.474 16.3125H15.9353L15.3462 13.5938H19.0343C20.0364 13.5938 20.847 12.7832 20.847 11.7812C20.847 10.7793 20.0364 9.96875 19.0343 9.96875H14.5605L14.4784 9.58359C14.2632 8.04863 12.8697 7.06875 11.3969 7.27832C9.86185 7.48789 8.87623 8.86426 9.09148 10.3539L10.4328 18.3062C10.5246 19.2352 11.3063 19.9375 12.2353 19.9375H20.2448L22.7859 26.049C23.0714 26.7514 23.7511 27.1875 24.4705 27.1875C24.66 27.1875 24.8546 27.1574 25.0438 27.0937L27.7627 26.1875C28.7132 25.8734 29.223 24.8482 28.9058 23.8967ZM9.06316 26.2812C5.56478 26.2812 2.71895 23.4356 2.71895 19.9375C2.71895 16.8647 4.91563 14.2989 7.82037 13.7184L7.36948 11.0449C3.17551 11.8379 0 15.5139 0 19.9375C0 24.9428 4.05746 29 9.06316 29C13.4475 29 17.1011 25.8865 17.9451 21.75H15.1638C14.3255 24.3611 11.9294 26.2812 9.06316 26.2812ZM10.8758 5.4375C12.3774 5.4375 13.5947 4.22029 13.5947 2.71875C13.5947 1.21721 12.3769 0 10.8758 0C9.37471 0 8.15684 1.21721 8.15684 2.71875C8.15684 4.22029 9.37471 5.4375 10.8758 5.4375Z\\\" fill=\\\"currentColor\\\"/>\\n</svg>\""],"names":["accessibility"],"mappings":"AAAA,MAAAA,EAAe"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"back_arrow-B3RltzaY.js","sources":["../../../src/assets/back_arrow.svg?raw"],"sourcesContent":["export default \"<svg width=\\\"42\\\" height=\\\"36\\\" viewBox=\\\"0 0 42 36\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n<path d=\\\"M32.4635 16.4726H8.95498L23.0255 4.25832C23.2505 4.06144 23.1139 3.69582 22.8166 3.69582H19.2608C19.1041 3.69582 18.9554 3.75207 18.8389 3.85251L3.65542 17.0271C3.51636 17.1476 3.40483 17.2966 3.3284 17.464C3.25196 17.6315 3.2124 17.8133 3.2124 17.9974C3.2124 18.1814 3.25196 18.3633 3.3284 18.5307C3.40483 18.6981 3.51636 18.8471 3.65542 18.9677L18.9273 32.2226C18.9876 32.2748 19.0599 32.303 19.1362 32.303H22.8126C23.1099 32.303 23.2465 31.9333 23.0215 31.7405L8.95498 19.5262H32.4635C32.6402 19.5262 32.7849 19.3815 32.7849 19.2047V16.794C32.7849 16.6172 32.6402 16.4726 32.4635 16.4726Z\\\" fill=\\\"white\\\"/>\\n</svg>\\n\""],"names":["back_arrow"],"mappings":"AAAA,MAAAA,EAAe"}
@@ -1,4 +1,4 @@
1
- import{c as o,i as r,n as e,t}from"./route-view-totems-B9nWTUnc.js";import{B as s,e as l}from"./components-_AwIbCu4.js";var i,a=Object.defineProperty,n=Object.getOwnPropertyDescriptor,d=o=>{throw TypeError(o)},c=(o,r,e,t)=>{for(var s,l=t>1?void 0:t?n(r,e):r,i=o.length-1;i>=0;i--)(s=o[i])&&(l=(t?s(r,e,l):s(l))||l);return t&&l&&a(r,e,l),l},f=(o,r,e)=>r.has(o)||d("Cannot "+e);let p=class extends s{constructor(){var o,r,e;super(...arguments),o=this,e=!1,(r=i).has(o)?d("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(o):r.set(o,e),this.isOpen=!1,this._handleClickOutside=o=>{this.isOpen&&!this.shadowRoot?.contains(o.target)&&(this.isOpen=!1,this.requestUpdate())}}get disabled(){return f(o=this,r=i,"read from private field"),e?e.call(o):r.get(o);var o,r,e}set disabled(o){var r,e,t;t=o,f(r=this,e=i,"write to private field"),e.set(r,t)}_toggleDropdown(o){this.disabled||(o.stopPropagation(),this.isOpen=!this.isOpen,this.requestUpdate())}_selectFloor(o){this.disabled||(this.selectFloor(o),this.isOpen=!1,this.requestUpdate())}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleClickOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutside)}render(){if(!this.sdkData)return o`<div>No data</div>`;const r=this.getFloors(),e=this.getCurrentFloor(),t=e?this.getFloorDisplayName(e):"Seleccionar piso";return o`
1
+ import{c as o,i as r,n as e,t}from"./route-view-totems-C-vpK0Jw.js";import{B as s,e as l}from"./components-BeCPn1I0.js";var i,a=Object.defineProperty,n=Object.getOwnPropertyDescriptor,d=o=>{throw TypeError(o)},c=(o,r,e,t)=>{for(var s,l=t>1?void 0:t?n(r,e):r,i=o.length-1;i>=0;i--)(s=o[i])&&(l=(t?s(r,e,l):s(l))||l);return t&&l&&a(r,e,l),l},f=(o,r,e)=>r.has(o)||d("Cannot "+e);let p=class extends s{constructor(){var o,r,e;super(...arguments),o=this,e=!1,(r=i).has(o)?d("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(o):r.set(o,e),this.isOpen=!1,this._handleClickOutside=o=>{this.isOpen&&!this.shadowRoot?.contains(o.target)&&(this.isOpen=!1,this.requestUpdate())}}get disabled(){return f(o=this,r=i,"read from private field"),e?e.call(o):r.get(o);var o,r,e}set disabled(o){var r,e,t;t=o,f(r=this,e=i,"write to private field"),e.set(r,t)}_toggleDropdown(o){this.disabled||(o.stopPropagation(),this.isOpen=!this.isOpen,this.requestUpdate())}_selectFloor(o){this.disabled||(this.selectFloor(o),this.isOpen=!1,this.requestUpdate())}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleClickOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutside)}render(){if(!this.sdkData)return o`<div>No data</div>`;const r=this.getFloors(),e=this.getCurrentFloor(),t=e?this.getFloorDisplayName(e):"Seleccionar piso";return o`
2
2
  <div class="floor-dropdown">
3
3
  <button
4
4
  class=${l({"floor-button":!0,active:!!e,open:this.isOpen})}
@@ -173,4 +173,4 @@ import{c as o,i as r,n as e,t}from"./route-view-totems-B9nWTUnc.js";import{B as
173
173
  }
174
174
  }
175
175
  `],c([e({type:Boolean})],p.prototype,"disabled",1),p=c([t("compact-floor-selector")],p);export{p as CompactFloorSelector};
176
- //# sourceMappingURL=compact-floor-selector-BTOhdipy.js.map
176
+ //# sourceMappingURL=compact-floor-selector-DNCJAHDM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compact-floor-selector-DNCJAHDM.js","sources":["../../../src/components/compact-floor-selector.ts"],"sourcesContent":["import { html, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { BaseFloorSelector } from './base-floor-selector';\n\n@customElement('compact-floor-selector')\nexport class CompactFloorSelector extends BaseFloorSelector {\n @property({ type: Boolean })\n accessor disabled: boolean = false;\n\n private isOpen = false;\n\n static override styles = [\n css`\n :host {\n display: block;\n position: relative;\n z-index: 1000;\n }\n\n .floor-dropdown {\n position: relative;\n display: inline-block;\n }\n\n .floor-button {\n font-family: var(--floor-selector-font-family, inherit);\n background: var(--floor-selector-surface, #fff);\n border-radius: var(--floor-selector-radius, 8px);\n padding: 8px 12px;\n font-size: var(--floor-selector-font-size, 14px);\n font-weight: var(--floor-selector-font-weight, 500);\n color: var(--floor-selector-color, #251660);\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 120px;\n box-shadow: var(--floor-selector-shadow, 0 2px 4px rgba(0, 0, 0, 0.1));\n transition: all 0.2s ease;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n border: var(--floor-selector-border-width, 1px) solid var(--floor-selector-border-color, #251660);\n }\n\n .floor-button:hover {\n border-color: var(--floor-selector-hover-accent, #007bff);\n box-shadow: 0 2px 8px color-mix(in srgb, var(--floor-selector-hover-accent, #007bff) 20%, transparent);\n }\n\n .floor-button.active {\n background: var(--floor-selector-surface, #fff);\n color: var(--floor-selector-color, #251660);\n border-color: var(--floor-selector-border-color, #251660);\n }\n\n .floor-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .floor-button[disabled] {\n background: var(--floor-selector-surface, #fff);\n color: var(--floor-selector-color, #251660);\n cursor: not-allowed;\n pointer-events: none;\n }\n\n .dropdown-arrow {\n width: 0;\n height: 0;\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-top: 4px solid currentColor;\n transition: transform 0.2s ease;\n }\n\n .floor-button.open .dropdown-arrow {\n transform: rotate(180deg);\n }\n\n .floor-button[disabled] .dropdown-arrow {\n display: none;\n }\n\n .floor-list {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n background: var(--floor-selector-surface, #fff);\n border: var(--floor-selector-border-width, 1px) solid\n color-mix(in srgb, var(--floor-selector-border-color, #251660) 30%, #ffffff);\n border-radius: var(--floor-selector-radius, 8px);\n box-shadow: var(--floor-selector-shadow, 0 4px 12px rgba(0, 0, 0, 0.15));\n max-height: 200px;\n overflow-y: auto;\n z-index: 1001;\n margin-top: 4px;\n display: none;\n }\n\n .floor-list.open {\n display: block;\n }\n\n .floor-option {\n font-family: var(--floor-selector-font-family, inherit);\n padding: 8px 12px;\n cursor: pointer;\n border-bottom: 1px solid color-mix(in srgb, var(--floor-selector-border-color, #251660) 20%, #ffffff);\n transition: background-color 0.2s ease;\n font-size: var(--floor-selector-font-size, 14px);\n font-weight: var(--floor-selector-font-weight, 500);\n color: var(--floor-selector-color, #251660);\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n }\n\n .floor-option:last-child {\n border-bottom: none;\n }\n\n .floor-option:hover {\n background-color: color-mix(in srgb, var(--floor-selector-hover-accent, #007bff) 8%, #ffffff);\n }\n\n .floor-option.active {\n background-color: var(--floor-selector-active-bg, #f3e7ff);\n color: var(--floor-selector-color, #251660);\n }\n\n .floor-option.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .floor-option.disabled:hover {\n background-color: transparent;\n }\n\n /* Mobile styles */\n @media (max-width: 768px) {\n .floor-button {\n font-size: 12px;\n padding: 6px 10px;\n min-width: 100px;\n }\n\n .floor-option {\n font-size: 12px;\n padding: 6px 10px;\n }\n\n .floor-list {\n max-height: 150px;\n }\n }\n `,\n ];\n\n private _toggleDropdown(event: Event) {\n if (this.disabled) return;\n event.stopPropagation();\n this.isOpen = !this.isOpen;\n this.requestUpdate();\n }\n\n private _selectFloor(floorKey: string) {\n if (this.disabled) return;\n this.selectFloor(floorKey);\n this.isOpen = false;\n this.requestUpdate();\n }\n\n private _handleClickOutside = (event: Event) => {\n // Only close if the click was outside the component and the dropdown is open\n if (this.isOpen && !this.shadowRoot?.contains(event.target as Node)) {\n this.isOpen = false;\n this.requestUpdate();\n }\n };\n\n override connectedCallback() {\n super.connectedCallback();\n document.addEventListener('click', this._handleClickOutside);\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener('click', this._handleClickOutside);\n }\n\n override render() {\n if (!this.sdkData) {\n return html`<div>No data</div>`;\n }\n\n const floors = this.getFloors();\n const currentFloor = this.getCurrentFloor();\n const currentFloorName = currentFloor ? this.getFloorDisplayName(currentFloor) : 'Seleccionar piso';\n\n return html`\n <div class=\"floor-dropdown\">\n <button\n class=${classMap({\n 'floor-button': true,\n active: !!currentFloor,\n open: this.isOpen,\n })}\n style=\"border: var(--floor-selector-border-width, 1px) solid var(--floor-selector-border-color, #251660);\"\n ?disabled=${this.disabled}\n @click=${this._toggleDropdown}\n >\n <span>${currentFloorName}</span>\n <div class=\"dropdown-arrow\"></div>\n </button>\n\n <div\n class=${classMap({\n 'floor-list': true,\n open: this.isOpen,\n })}\n >\n ${floors.map(floor => {\n const isActive = this.isFloorActive(floor);\n\n return html`\n <div\n class=${classMap({\n 'floor-option': true,\n active: isActive,\n })}\n @click=${() => this._selectFloor(floor.key)}\n >\n ${this.getFloorDisplayName(floor)}\n </div>\n `;\n })}\n </div>\n </div>\n `;\n }\n}\n"],"names":["_disabled","CompactFloorSelector","BaseFloorSelector","constructor","super","arguments","this","isOpen","_handleClickOutside","event","shadowRoot","contains","target","requestUpdate","disabled","_","_toggleDropdown","stopPropagation","_selectFloor","floorKey","selectFloor","connectedCallback","document","addEventListener","disconnectedCallback","removeEventListener","render","sdkData","html","floors","getFloors","currentFloor","getCurrentFloor","currentFloorName","getFloorDisplayName","classMap","active","open","map","floor","isActive","isFloorActive","key","WeakMap","styles","css","__decorateClass","property","type","Boolean","prototype","customElement"],"mappings":"4HAAAA,4PAMO,IAAMC,EAAN,cAAmCC,EAAnC,WAAAC,aAAAC,SAAAC,aAELC,QAA6B,KAApBN,0GAETM,KAAQC,QAAS,EAyKjBD,KAAQE,oBAAuBC,IAEzBH,KAAKC,SAAWD,KAAKI,YAAYC,SAASF,EAAMG,UAClDN,KAAKC,QAAS,EACdD,KAAKO,iBAET,CAjLA,YAASC,GAAA,WAAAR,OAAAN,2DAAA,CAAT,YAASc,CAAAC,eAAAA,MAAAT,OAAAN,sCAAA,CA6JD,eAAAgB,CAAgBP,GAClBH,KAAKQ,WACTL,EAAMQ,kBACNX,KAAKC,QAAUD,KAAKC,OACpBD,KAAKO,gBACP,CAEQ,YAAAK,CAAaC,GACfb,KAAKQ,WACTR,KAAKc,YAAYD,GACjBb,KAAKC,QAAS,EACdD,KAAKO,gBACP,CAUS,iBAAAQ,GACPjB,MAAMiB,oBACNC,SAASC,iBAAiB,QAASjB,KAAKE,oBAC1C,CAES,oBAAAgB,GACPpB,MAAMoB,uBACNF,SAASG,oBAAoB,QAASnB,KAAKE,oBAC7C,CAES,MAAAkB,GACP,IAAKpB,KAAKqB,QACR,OAAOC,CAAA,qBAGT,MAAMC,EAASvB,KAAKwB,YACdC,EAAezB,KAAK0B,kBACpBC,EAAmBF,EAAezB,KAAK4B,oBAAoBH,GAAgB,mBAEjF,OAAOH,CAAA;;;kBAGOO,EAAS,CACf,gBAAgB,EAChBC,SAAUL,EACVM,KAAM/B,KAAKC;;sBAGDD,KAAKQ;mBACRR,KAAKU;;kBAENiB;;;;;kBAKAE,EAAS,CACf,cAAc,EACdE,KAAM/B,KAAKC;;YAGXsB,EAAOS,IAAIC,IACX,MAAMC,EAAWlC,KAAKmC,cAAcF,GAEpC,OAAOX,CAAA;;wBAEKO,EAAS,CACf,gBAAgB,EAChBC,OAAQI;yBAED,IAAMlC,KAAKY,aAAaqB,EAAMG;;kBAErCpC,KAAK4B,oBAAoBK;;;;;KAOzC,GA9OSvC,EAAA,IAAA2C,QAFE1C,EAMK2C,OAAS,CACvBC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OALOC,EAAA,CADRC,EAAS,CAAEC,KAAMC,WADPhD,EAEFiD,UAAA,WAAA,GAFEjD,EAAN6C,EAAA,CADNK,EAAc,2BACFlD"}
@@ -0,0 +1,249 @@
1
+ import{a as t,c as e,r as o,i as n,n as r,t as i,E as s,A as a}from"./route-view-totems-C-vpK0Jw.js";import{R as l,M as c}from"./utils-CIDFE1sK.js";
2
+ /**
3
+ * @license
4
+ * Copyright 2021 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */let d=class extends Event{constructor(t,e,o,n){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=e,this.callback=o,this.subscribe=n??!1}};
7
+ /**
8
+ * @license
9
+ * Copyright 2021 Google LLC
10
+ * SPDX-License-Identifier: BSD-3-Clause
11
+ */
12
+ /**
13
+ * @license
14
+ * Copyright 2021 Google LLC
15
+ * SPDX-License-Identifier: BSD-3-Clause
16
+ */
17
+ let u=class{constructor(t,e,o,n){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(t,e)=>{this.unsubscribe&&(this.unsubscribe!==e&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,e)),this.unsubscribe=e},this.host=t,void 0!==e.context){const t=e;this.context=t.context,this.callback=t.callback,this.subscribe=t.subscribe??!1}else this.context=e,this.callback=o,this.subscribe=n??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new d(this.context,this.host,this.t,this.subscribe))}};
18
+ /**
19
+ * @license
20
+ * Copyright 2021 Google LLC
21
+ * SPDX-License-Identifier: BSD-3-Clause
22
+ */class h{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,e=!1){const o=e||!Object.is(t,this.o);this.o=t,o&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(const[t,{disposer:e}]of this.subscriptions)t(this.o,e)},void 0!==t&&(this.value=t)}addCallback(t,e,o){if(!o)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:e});const{disposer:n}=this.subscriptions.get(t);t(this.value,n)}clearCallbacks(){this.subscriptions.clear()}}
23
+ /**
24
+ * @license
25
+ * Copyright 2021 Google LLC
26
+ * SPDX-License-Identifier: BSD-3-Clause
27
+ */let p=class extends Event{constructor(t,e){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=e}},f=class extends h{constructor(t,e,o){super(void 0!==e.context?e.initialValue:o),this.onContextRequest=t=>{if(t.context!==this.context)return;const e=t.contextTarget??t.composedPath()[0];e!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,e,t.subscribe))},this.onProviderRequest=t=>{if(t.context!==this.context)return;if((t.contextTarget??t.composedPath()[0])===this.host)return;const e=new Set;for(const[o,{consumerHost:n}]of this.subscriptions)e.has(o)||(e.add(o),n.dispatchEvent(new d(this.context,n,o,!0)));t.stopPropagation()},this.host=t,void 0!==e.context?this.context=e.context:this.context=e,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new p(this.context,this.host))}};
28
+ /**
29
+ * @license
30
+ * Copyright 2022 Google LLC
31
+ * SPDX-License-Identifier: BSD-3-Clause
32
+ */
33
+ function g({context:t,subscribe:e}){return(o,n)=>{"object"==typeof n?n.addInitializer(function(){new u(this,{context:t,callback:t=>{o.set.call(this,t)},subscribe:e})}):o.constructor.addInitializer(o=>{new u(o,{context:t,callback:t=>{o[n]=t},subscribe:e})})}}const m="lazarillo-sdk";var b,x=Object.defineProperty,v=Object.getOwnPropertyDescriptor,w=t=>{throw TypeError(t)},y=(t,e,o,n)=>{for(var r,i=n>1?void 0:n?v(e,o):e,s=t.length-1;s>=0;s--)(r=t[s])&&(i=(n?r(e,o,i):r(i))||i);return n&&i&&x(e,o,i),i},C=(t,e,o)=>e.has(t)||w("Cannot "+o);let k=class extends t{constructor(){var t,e,o;super(),t=this,o=0,(e=b).has(t)?w("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),this.mapReady=!1,this.routeAnimationHandlers={onRouteAnimationFinished:()=>{this.dispatchEvent(new CustomEvent("routeAnimationFinished",{bubbles:!0,composed:!0}))},onFloorChange:t=>{this.dispatchEvent(new CustomEvent("floorChange",{detail:t,bubbles:!0,composed:!0}))},onStartRouteAnimation:()=>{this.dispatchEvent(new CustomEvent("startRouteAnimation",{bubbles:!0,composed:!0}))},onShowMapModal:t=>{this.modalData=t},onDismissModal:()=>{this.modalData=void 0}},this.mapContainer=null,this.pendingUpdateMarkers=!1,this.pendingUpdateCamera=!1,this.routeAnimationController=new l(this,this.routeAnimationHandlers),this.markerController=new c(this)}get paddingLeft(){return C(t=this,e=b,"read from private field"),o?o.call(t):e.get(t);var t,e,o}set paddingLeft(t){var e,o,n;n=t,C(e=this,o=b,"write to private field"),o.set(e,n)}async firstUpdated(){if(this.shadowRoot){const t=document.createElement("style");t.textContent=(await import("./styles-BByP6ECU.js")).default,this.shadowRoot.appendChild(t)}}async updated(){if(this.updateAttributes(),!this.sdkData?.sdk)return;const{sdk:t,parentPlace:e,locale:o,generalConfig:n,currentFloor:r,markers:i,route:s,isRouteAnimating:a,cameraInitialized:l}=this.sdkData;if(!this.lzMap&&t&&e&&o&&this.shadowRoot&&n){this.routeAnimationController.setParentPlace(e),this.routeAnimationController.setLocale(o),this.routeAnimationController.setConfig(n),this.mapContainer=this.shadowRoot.getElementById("map"),this.shadowRoot?.appendChild(this.mapContainer),this.config=n;const r={zoom:n.initialZoom||18,parentPlaceId:e?.lazarilloId,center:n.initialCenter||{lat:0,lng:0},minZoom:n.limitZoomOut||15,maxZoom:n.limitZoomIn||22,showCompass:!1,navigationPosition:"bottom-right",pitch:n.pitch||0,lang:o,maxBounds:n.pointsOfInterest||[],otherPotentialParentPlacesIds:n.potentialParentPlaces||[],onMapReady:()=>{this.mapReady=!0,this.markerController.setMapReady(!0),this.pendingUpdateCamera=!0,this.dispatchEvent(new CustomEvent("mapReady",{detail:{},bubbles:!0,composed:!0}))},onFloorChange:t=>{this.setCurrentMapFloor(t)}};this.lzMap=t.createMap(this.mapContainer,r),this.lzMap.setParentPlace(e,!1),this.routeAnimationController.setMap(this.lzMap),this.routeAnimationController.setExtraLeftPadding(this.paddingLeft),this.markerController.setMap(this.lzMap),this.markerController.setParentPlace(e),this.markerController.setConfig(n),this.markerController.setExtraLeftPadding(this.paddingLeft)}this.markerController&&this.routeAnimationController&&(this.markerController.setExtraLeftPadding(this.paddingLeft),this.routeAnimationController.setExtraLeftPadding(this.paddingLeft)),r&&r.key!==this._currentMapFloor&&this.mapReady&&this.setCurrentMapFloor(r.key);const c=this.markerController.getMarkersIds(),d=i.map(t=>t.id);(i.length!==c.length||d.some(t=>!c.includes(t))||c.some(t=>!d.includes(t)))&&(this.mapReady?this.updateMarkers():this.pendingUpdateMarkers=!0),this.pendingUpdateMarkers&&this.mapReady&&this.updateMarkers(),(this.pendingUpdateCamera||!l&&this.mapReady)&&this.sdkData?.destination&&(this._initializeCamera(),this.pendingUpdateCamera=!1);const u=this.routeAnimationController.getCurrentRoute();u&&u.id===s?.id||(u&&this.routeAnimationController.removeRoute(),s&&this.routeAnimationController.startRouteAnimation(s)),!this.routeAnimationController.isAnimating()&&a&&s&&this.routeAnimationController.startRouteAnimation(s)}updateMarkers(){const t=this.sdkData?.markers??[];this.markerController.updateMarkers(t),this.pendingUpdateMarkers=!1}clearAllMarkers(){this.markerController.clearAllMarkers()}_initializeCamera(){if(!this.lzMap||!this.mapReady||!this.sdkData)return;const{destination:t,origin:e,route:o}=this.sdkData;if(o){const n=e?.inFloors?.[0];if(n&&o.legs){const r=[...o.legs.flatMap(t=>t.steps).filter(t=>t.startInsideFloor===n||t.endInsideFloor===n).flatMap(t=>t.coordinates)];if(e?.position&&e?.inFloors?.[0]===n&&r.push(e.position),t?.position&&t?.inFloors?.[0]===n&&r.push(t.position),r.length>0)setTimeout(()=>{this.lzMap?.fitCoordinates(r,{padding:{top:200,bottom:200,left:200+this.paddingLeft,right:200}})},200);else{const o=t?t.position:e?.position;this.lzMap?.updateCamera({bearing:this.config?.mapRotations?.[e?.lazarilloId??""]?.angle??0,animate:!1,pitch:this.config?.pitch??0,center:o,zoom:this.config?.initialZoom??18})}}else{const o=t?t.position:e?.position;this.lzMap?.updateCamera({bearing:this.config?.mapRotations?.[e?.lazarilloId??""]?.angle??0,animate:!1,pitch:this.config?.pitch??0,center:o,zoom:this.config?.initialZoom??18})}}else{const o=e?.inFloors?.[0],n=t?.inFloors?.[0];if(e&&t&&o&&n&&o===n){const o=[e.position,t.position];setTimeout(()=>{this.lzMap?.fitCoordinates(o,{padding:{top:200,bottom:200,left:200+this.paddingLeft,right:200}})},200)}else{const o=t?t.position:e?.position;this.lzMap?.updateCamera({bearing:this.config?.mapRotations?.[e?.lazarilloId??""]?.angle??0,animate:!1,pitch:this.config?.pitch??0,center:o,zoom:this.config?.initialZoom??18})}}const n=t?.inFloors?.[0];n&&this.lzMap?.updateFloor(n),this.dispatchEvent(new CustomEvent("cameraInitialized",{detail:{},bubbles:!0,composed:!0}))}setCurrentMapFloor(t){this._currentMapFloor!==t&&this.lzMap&&(this._currentMapFloor=t,this.lzMap?.updateFloor(t),this.routeAnimationController.setCurrentFloor(t),this.dispatchEvent(new CustomEvent("floorChange",{detail:t,bubbles:!0,composed:!0})))}updateAttributes(){const t=this.closest("map-view-with-modal");if(t){const e=t.hasAttribute("compact-mode"),o=t.getAttribute("zoom-size")||"normal";e?this.setAttribute("compact-mode",""):this.removeAttribute("compact-mode"),this.setAttribute("zoom-size",o)}}render(){return e`<div id="map"></div>
34
+ <div id="modal" style="display: ${this.modalData?"flex":"none"}">
35
+ <div class="modal-content">
36
+ <img class="modal-icon" .src=${this.modalData?.iconPath}></img>
37
+ <p class="modal-text">${this.modalData?.title}</p>
38
+ </div>
39
+ </div>`}};b=new WeakMap,k.styles=[n`
40
+ :host {
41
+ height: 100%;
42
+ width: 100%;
43
+ }
44
+ `,o(':host{display:block;height:100%;width:100%}#map,.maplibregl-canvas{width:100%;height:100%}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 20px 50px 0}.maplibregl-ctrl{bottom:var(--zoom-button-margin, 80px);right:var(--zoom-button-margin, 40px);border:var(--mvx-border-width, 0px) solid var(--mvx-border-color, transparent);padding:0;border-radius:100px;background:#fff;overflow:hidden;display:flex;flex-direction:column;width:var(--zoom-button-size, 70px);height:calc(var(--zoom-button-size, 70px) * 1.8)}.maplibregl-ctrl button{font-family:var(--mvx-font-family, inherit);background-color:transparent;box-shadow:none;border-radius:0;margin:0;font-size:var(--zoom-icon-size, 18px);font-weight:400;width:100%;height:100%;color:var(--zoom-icon-color, var(--mvx-primary-color, #251660));transition:background-color .4s ease,color .4s ease}.maplibregl-ctrl button:hover{background-color:var(--mvx-primary-color, #251660)!important;color:#fff}.maplibregl-ctrl-group .maplibregl-ctrl-icon{background:none!important;display:none!important}.maplibregl-ctrl-group button.maplibregl-ctrl-zoom-in:after{content:"+";display:block;font-size:var(--zoom-icon-size, 18px);font-weight:600;line-height:1;text-align:center}.maplibregl-ctrl-group button.maplibregl-ctrl-zoom-out:after{content:"–";display:block;font-size:var(--zoom-icon-size, 18px);font-weight:600;line-height:1;text-align:center}#modal{position:absolute;width:100%;height:100%;background:#0003;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;justify-items:center;top:0;left:0;z-index:100}.modal-content{min-width:100px;min-height:100px;background-color:#fff;border:1px solid #000;border-radius:10px;padding:10px;width:fit-content;height:fit-content;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}@media(max-width:768px){#modal{align-items:flex-start;padding-top:60px}.modal-content{max-width:90%;margin:0 auto;border-radius:12px;box-shadow:0 4px 12px #00000026}}:host([compact-mode]){border-radius:12px!important;overflow:hidden!important;box-shadow:0 4px 12px #00000026!important}:host([compact-mode]) #map{border-radius:12px}:host([compact-mode]) .maplibregl-canvas{border-radius:12px}.modal-text{font-family:Poppins,sans-serif;font-size:20pt;font-weight:500;color:#000}.modal-icon{height:100px;align-self:center}.maplibregl-marker:has(.popup){z-index:10}.maplibregl-marker:not(:has(.popup)){z-index:5}.maplibregl-ctrl-compass{visibility:hidden;height:0px}'),n`
45
+ :host([compact-mode]) {
46
+ border-radius: 12px !important;
47
+ overflow: hidden !important;
48
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
49
+ border: 2px solid #e9ecef !important;
50
+ }
51
+
52
+ :host([compact-mode]) #map {
53
+ border-radius: 12px !important;
54
+ }
55
+
56
+ :host([compact-mode]) .maplibregl-canvas {
57
+ border-radius: 12px !important;
58
+ }
59
+
60
+ :host([zoom-size='small']) {
61
+ --zoom-button-size: 32px;
62
+ --zoom-button-margin: 8px;
63
+ }
64
+
65
+ :host([zoom-size='normal']) {
66
+ --zoom-button-size: 40px;
67
+ --zoom-button-margin: 12px;
68
+ }
69
+
70
+ :host([zoom-size='large']) {
71
+ --zoom-button-size: 48px;
72
+ --zoom-button-margin: 16px;
73
+ }
74
+
75
+ /* Apply CSS variables to zoom buttons */
76
+ :host([zoom-size='small']) .maplibregl-ctrl {
77
+ width: 32px !important;
78
+ height: 58px !important;
79
+ bottom: 8px !important;
80
+ right: 8px !important;
81
+ }
82
+
83
+ :host([zoom-size='normal']) .maplibregl-ctrl {
84
+ width: 40px !important;
85
+ height: 72px !important;
86
+ bottom: 12px !important;
87
+ right: 12px !important;
88
+ }
89
+
90
+ :host([zoom-size='large']) .maplibregl-ctrl {
91
+ width: 48px !important;
92
+ height: 86px !important;
93
+ bottom: 16px !important;
94
+ right: 16px !important;
95
+ }
96
+
97
+ /* Icon size is independent from container size */
98
+ .maplibregl-ctrl button {
99
+ font-size: var(--zoom-icon-size, 18px) !important;
100
+ }
101
+
102
+ .maplibregl-ctrl-group button::after {
103
+ font-size: var(--zoom-icon-size, 18px) !important;
104
+ }
105
+
106
+ /* Zoom button container customizable via CSS variables */
107
+ .maplibregl-ctrl {
108
+ border: var(--zoom-border-width, 0px) solid var(--zoom-border-color, transparent) !important;
109
+ box-shadow: var(--zoom-shadow, none) !important;
110
+ background: var(--zoom-background, #fff) !important;
111
+ }
112
+
113
+ .maplibregl-ctrl button {
114
+ border: none;
115
+ border-radius: unset;
116
+ }
117
+
118
+ /* Divider between zoom-in and zoom-out buttons, overridable separately */
119
+ .maplibregl-ctrl-group button + button {
120
+ border-top: var(--zoom-divider-width, var(--zoom-border-width, 0px)) solid
121
+ var(--zoom-divider-color, var(--zoom-border-color, transparent)) !important;
122
+ }
123
+
124
+ .maplibregl-ctrl button:hover {
125
+ background-color: var(--zoom-hover-bg, var(--zoom-border-color, #251660)) !important;
126
+ color: var(--zoom-hover-color, #fff) !important;
127
+ }
128
+ `],y([g({context:m,subscribe:!0})],k.prototype,"sdkData",2),y([r({type:Number,attribute:"padding-left"})],k.prototype,"paddingLeft",1),k=y([i("custom-map")],k);const E=/*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({__proto__:null,get CustomMap(){return k}},Symbol.toStringTag,{value:"Module"})),z=1;
129
+ /**
130
+ * @license
131
+ * Copyright 2017 Google LLC
132
+ * SPDX-License-Identifier: BSD-3-Clause
133
+ */class M{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
134
+ /**
135
+ * @license
136
+ * Copyright 2018 Google LLC
137
+ * SPDX-License-Identifier: BSD-3-Clause
138
+ */const A=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends M{constructor(t){if(super(t),t.type!==z||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const o=t.element.classList;for(const n of this.st)n in e||(o.remove(n),this.st.delete(n));for(const n in e){const t=!!e[n];t===this.st.has(n)||this.nt?.has(n)||(t?(o.add(n),this.st.add(n)):(o.remove(n),this.st.delete(n)))}return s}});var P=Object.defineProperty;class I extends t{getFloors(){if(!this.sdkData)return[];const{parentPlace:t,generalConfig:e}=this.sdkData;let o=t?.innerFloors||[];return e?.enabledFloors?.length>0&&(o=o.filter(t=>e.enabledFloors.includes(t.key))),o}getCurrentFloor(){return this.sdkData?.currentFloor}getEnabledFloors(){return this.sdkData?.enabledFloors||[]}isFloorActive(t){const e=this.getCurrentFloor();return t.key===e?.key}isFloorEnabled(t){return this.getEnabledFloors().some(e=>e.key===t.key)}selectFloor(t){this.dispatchEvent(new CustomEvent("floorChange",{detail:t,bubbles:!0,composed:!0}))}getFloorDisplayName(t){return t.name||t.title||t.key}}((t,e,o)=>{for(var n,r=void 0,i=t.length-1;i>=0;i--)(n=t[i])&&(r=n(e,o,r)||r);r&&P(e,o,r)})([g({context:m,subscribe:!0})],I.prototype,"sdkData");var R=Object.getOwnPropertyDescriptor;let B=class extends I{render(){if(!this.sdkData)return e`<div>No data</div>`;const t=this.getFloors();return e`
139
+ <div class="floor-selector-container">
140
+ ${t.map(t=>{const o=this.isFloorActive(t),n=this.isFloorEnabled(t);return e`
141
+ <div class="floor-btn-container">
142
+ <button
143
+ class=${A({"floor-btn":!0,active:o,disabled:!o&&!n})}
144
+ @click=${()=>n?this.selectFloor(t.key):null}
145
+ >
146
+ <span>${this.getFloorDisplayName(t)}</span>
147
+ </button>
148
+ </div>
149
+ `})}
150
+ </div>
151
+ `}};B.styles=[o(':host{position:absolute;top:0;right:10px}.floor-selector-container{display:flex;flex-direction:row;background:#fff;border-radius:0 0 30px 30px;box-shadow:0 0 15px #00000026;padding:0 6px;gap:8px;height:65px}.btn-floor{height:auto;width:100px;vertical-align:middle;font-size:small!important;word-wrap:break-word!important;font-family:Poppins;font-weight:600;font-size:16pt;border-radius:10px;border:0;box-shadow:0 0 15px #00000026}@media only screen and (max-width:576px){.btn-floor{padding:6px;width:70px;height:auto;font-size:small!important}}.floor-btn-container:hover .floor-btn:not(.active):not(.disabled){border-radius:0 0 999px 999px;background:#000;color:#fff}.floor-btn{transition:background .2s ease,color .2s ease,transform .2s ease,opacity .2s ease;position:relative;background:transparent;border:none;outline:none;font-family:Poppins,sans-serif;font-weight:600;font-size:13px;border-radius:0 0 30px 30px;cursor:pointer;transition:all .2s ease;height:100%;min-width:65px;display:flex;align-items:center;justify-content:center;color:#000;z-index:1;span{min-width:50px}}.floor-btn.disabled{color:#c5c3c3;background:transparent;pointer-events:none;-webkit-tap-highlight-color:transparent;user-select:none}.floor-btn.active{color:#fff;background:transparent;z-index:2}.floor-btn.active:after{content:"";position:absolute;inset:0 2px;border-radius:0 0 999px 999px;background:#000;color:#fff;z-index:1}.floor-btn.active:before{content:"";position:absolute;inset:0 -3px -3px;border-radius:0 0 999px 999px;background:linear-gradient(45.8deg,#f5a 10.03%,#b850c9 25.23%,#6572d6 48.67%,#4eaeb8 72.74%);z-index:0}.floor-btn.active span{z-index:10}@media(max-width:1100px){.floor-btn-container:hover .floor-btn:not(.active):not(.disabled){border-radius:999px 0 0 999px;background:#000;color:#fff}.floor-selector-container{right:0;position:fixed;top:50%;transform:translateY(-50%);display:flex;flex-direction:column-reverse;border-radius:30px 0 0 30px;min-width:87px;max-height:100%;height:auto;padding:0;gap:0}.floor-btn-container{padding:0;width:100%}.floor-btn{width:100%;padding:20px;border-radius:999px 0 0 999px}.floor-btn.active:after{position:absolute;inset:2px 0 2px 2px;border-radius:999px 0 0 999px}.floor-btn.active:before{inset:-3px 0 -3px -3px;border-radius:999px 0 0 999px}}')],B=((t,e,o,n)=>{for(var r,i=n>1?void 0:n?R(e,o):e,s=t.length-1;s>=0;s--)(r=t[s])&&(i=r(i)||i);return i})([i("floor-selector")],B);const T=/*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({__proto__:null,get FloorSelector(){return B}},Symbol.toStringTag,{value:"Module"}));var D,L,_={};function F(){return L?D:(L=1,D=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var N,S={},j={};function U(){if(N)return j;let t;N=1;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return j.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},j.getSymbolTotalCodewords=function(t){return e[t]},j.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},j.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');t=e},j.isKanjiModeEnabled=function(){return void 0!==t},j.toSJIS=function(e){return t(e)},j}var $,O,H,q,Y,V={};function J(){return $||($=1,(t=V).L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},t.from=function(e,o){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(A){return o}}),V;var t}var K,Z={};var Q,W={};var G,X={};var tt,et={};function ot(){if(tt)return et;tt=1;const t=J(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return et.getBlocksCount=function(o,n){switch(n){case t.L:return e[4*(o-1)+0];case t.M:return e[4*(o-1)+1];case t.Q:return e[4*(o-1)+2];case t.H:return e[4*(o-1)+3];default:return}},et.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return o[4*(e-1)+0];case t.M:return o[4*(e-1)+1];case t.Q:return o[4*(e-1)+2];case t.H:return o[4*(e-1)+3];default:return}},et}var nt,rt,it,st,at={},lt={};function ct(){return rt||(rt=1,function(t){const e=function(){if(nt)return lt;nt=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let o=1;for(let n=0;n<255;n++)t[n]=o,e[o]=n,o<<=1,256&o&&(o^=285);for(let e=255;e<512;e++)t[e]=t[e-255]}(),lt.log=function(t){if(t<1)throw new Error("log("+t+")");return e[t]},lt.exp=function(e){return t[e]},lt.mul=function(o,n){return 0===o||0===n?0:t[e[o]+e[n]]},lt}();t.mul=function(t,o){const n=new Uint8Array(t.length+o.length-1);for(let r=0;r<t.length;r++)for(let i=0;i<o.length;i++)n[r+i]^=e.mul(t[r],o[i]);return n},t.mod=function(t,o){let n=new Uint8Array(t);for(;n.length-o.length>=0;){const t=n[0];for(let i=0;i<o.length;i++)n[i]^=e.mul(o[i],t);let r=0;for(;r<n.length&&0===n[r];)r++;n=n.slice(r)}return n},t.generateECPolynomial=function(o){let n=new Uint8Array([1]);for(let r=0;r<o;r++)n=t.mul(n,new Uint8Array([1,e.exp(r)]));return n}}(at)),at}var dt,ut={},ht={},pt={};function ft(){return dt||(dt=1,pt.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),pt}var gt,mt,bt,xt={};function vt(){if(gt)return xt;gt=1;const t="[0-9]+";let e="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";e=e.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+e+")(?:.|[\r\n]))+";xt.KANJI=new RegExp(e,"g"),xt.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),xt.BYTE=new RegExp(o,"g"),xt.NUMERIC=new RegExp(t,"g"),xt.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const n=new RegExp("^"+e+"$"),r=new RegExp("^"+t+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return xt.testKanji=function(t){return n.test(t)},xt.testNumeric=function(t){return r.test(t)},xt.testAlphanumeric=function(t){return i.test(t)},xt}function wt(){return mt||(mt=1,function(t){const e=ft(),o=vt();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(t,o){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?t.ccBits[0]:o<27?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(e){return o.testNumeric(e)?t.NUMERIC:o.testAlphanumeric(e)?t.ALPHANUMERIC:o.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},t.isValid=function(t){return t&&t.bit&&t.ccBits},t.from=function(e,o){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(A){return o}}}(ht)),ht}function yt(){return bt||(bt=1,function(t){const e=U(),o=ot(),n=J(),r=wt(),i=ft(),s=e.getBCHDigit(7973);function a(t,e){return r.getCharCountIndicator(t,e)+4}function l(t,e){let o=0;return t.forEach(function(t){const n=a(t.mode,e);o+=n+t.getBitsLength()}),o}t.from=function(t,e){return i.isValid(t)?parseInt(t,10):e},t.getCapacity=function(t,n,s){if(!i.isValid(t))throw new Error("Invalid QR Code version");void 0===s&&(s=r.BYTE);const l=8*(e.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,n));if(s===r.MIXED)return l;const c=l-a(s,t);switch(s){case r.NUMERIC:return Math.floor(c/10*3);case r.ALPHANUMERIC:return Math.floor(c/11*2);case r.KANJI:return Math.floor(c/13);case r.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,o){let i;const s=n.from(o,n.M);if(Array.isArray(e)){if(e.length>1)return function(e,o){for(let n=1;n<=40;n++)if(l(e,n)<=t.getCapacity(n,o,r.MIXED))return n}(e,s);if(0===e.length)return 1;i=e[0]}else i=e;return function(e,o,n){for(let r=1;r<=40;r++)if(o<=t.getCapacity(r,n,e))return r}(i.mode,i.getLength(),s)},t.getEncodedBits=function(t){if(!i.isValid(t)||t<7)throw new Error("Invalid QR Code version");let o=t<<12;for(;e.getBCHDigit(o)-s>=0;)o^=7973<<e.getBCHDigit(o)-s;return t<<12|o}}(ut)),ut}var Ct,kt={};var Et,zt,Mt,At,Pt,It,Rt,Bt,Tt={};var Dt,Lt,_t,Ft={exports:{}};function Nt(){return Dt||(Dt=1,function(t){var e={single_source_shortest_paths:function(t,o,n){var r={},i={};i[o]=0;var s,a,l,c,d,u,h,p=e.PriorityQueue.make();for(p.push(o,0);!p.empty();)for(l in a=(s=p.pop()).value,c=s.cost,d=t[a]||{})d.hasOwnProperty(l)&&(u=c+d[l],h=i[l],(void 0===i[l]||h>u)&&(i[l]=u,p.push(l,u),r[l]=a));if(void 0!==n&&void 0===i[n]){var f=["Could not find a path from ",o," to ",n,"."].join("");throw new Error(f)}return r},extract_shortest_path_from_predecessor_list:function(t,e){for(var o=[],n=e;n;)o.push(n),t[n],n=t[n];return o.reverse(),o},find_path:function(t,o,n){var r=e.single_source_shortest_paths(t,o,n);return e.extract_shortest_path_from_predecessor_list(r,n)},PriorityQueue:{make:function(t){var o,n=e.PriorityQueue,r={};for(o in t=t||{},n)n.hasOwnProperty(o)&&(r[o]=n[o]);return r.queue=[],r.sorter=t.sorter||n.default_sorter,r},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var o={value:t,cost:e};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e}(Ft)),Ft.exports}function St(){return Lt||(Lt=1,function(t){const e=wt(),o=function(){if(zt)return Et;zt=1;const t=wt();function e(e){this.mode=t.NUMERIC,this.data=e.toString()}return e.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){let e,o,n;for(e=0;e+3<=this.data.length;e+=3)o=this.data.substr(e,3),n=parseInt(o,10),t.put(n,10);const r=this.data.length-e;r>0&&(o=this.data.substr(e),n=parseInt(o,10),t.put(n,3*r+1))},Et=e}(),n=function(){if(At)return Mt;At=1;const t=wt(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(e){this.mode=t.ALPHANUMERIC,this.data=e}return o.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let o;for(o=0;o+2<=this.data.length;o+=2){let n=45*e.indexOf(this.data[o]);n+=e.indexOf(this.data[o+1]),t.put(n,11)}this.data.length%2&&t.put(e.indexOf(this.data[o]),6)},Mt=o}(),r=function(){if(It)return Pt;It=1;const t=wt();function e(e){this.mode=t.BYTE,this.data="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}return e.getBitsLength=function(t){return 8*t},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){for(let e=0,o=this.data.length;e<o;e++)t.put(this.data[e],8)},Pt=e}(),i=function(){if(Bt)return Rt;Bt=1;const t=wt(),e=U();function o(e){this.mode=t.KANJI,this.data=e}return o.getBitsLength=function(t){return 13*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let o;for(o=0;o<this.data.length;o++){let n=e.toSJIS(this.data[o]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[o]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},Rt=o}(),s=vt(),a=U(),l=Nt();function c(t){return unescape(encodeURIComponent(t)).length}function d(t,e,o){const n=[];let r;for(;null!==(r=t.exec(o));)n.push({data:r[0],index:r.index,mode:e,length:r[0].length});return n}function u(t){const o=d(s.NUMERIC,e.NUMERIC,t),n=d(s.ALPHANUMERIC,e.ALPHANUMERIC,t);let r,i;a.isKanjiModeEnabled()?(r=d(s.BYTE,e.BYTE,t),i=d(s.KANJI,e.KANJI,t)):(r=d(s.BYTE_KANJI,e.BYTE,t),i=[]);return o.concat(n,r,i).sort(function(t,e){return t.index-e.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function h(t,s){switch(s){case e.NUMERIC:return o.getBitsLength(t);case e.ALPHANUMERIC:return n.getBitsLength(t);case e.KANJI:return i.getBitsLength(t);case e.BYTE:return r.getBitsLength(t)}}function p(t,s){let l;const c=e.getBestModeForData(t);if(l=e.from(s,c),l!==e.BYTE&&l.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+e.toString(l)+".\n Suggested mode is: "+e.toString(c));switch(l!==e.KANJI||a.isKanjiModeEnabled()||(l=e.BYTE),l){case e.NUMERIC:return new o(t);case e.ALPHANUMERIC:return new n(t);case e.KANJI:return new i(t);case e.BYTE:return new r(t)}}t.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(p(e,null)):e.data&&t.push(p(e.data,e.mode)),t},[])},t.fromString=function(o,n){const r=function(t){const o=[];for(let n=0;n<t.length;n++){const r=t[n];switch(r.mode){case e.NUMERIC:o.push([r,{data:r.data,mode:e.ALPHANUMERIC,length:r.length},{data:r.data,mode:e.BYTE,length:r.length}]);break;case e.ALPHANUMERIC:o.push([r,{data:r.data,mode:e.BYTE,length:r.length}]);break;case e.KANJI:o.push([r,{data:r.data,mode:e.BYTE,length:c(r.data)}]);break;case e.BYTE:o.push([{data:r.data,mode:e.BYTE,length:c(r.data)}])}}return o}(u(o,a.isKanjiModeEnabled())),i=function(t,o){const n={},r={start:{}};let i=["start"];for(let s=0;s<t.length;s++){const a=t[s],l=[];for(let t=0;t<a.length;t++){const c=a[t],d=""+s+t;l.push(d),n[d]={node:c,lastCount:0},r[d]={};for(let t=0;t<i.length;t++){const s=i[t];n[s]&&n[s].node.mode===c.mode?(r[s][d]=h(n[s].lastCount+c.length,c.mode)-h(n[s].lastCount,c.mode),n[s].lastCount+=c.length):(n[s]&&(n[s].lastCount=c.length),r[s][d]=h(c.length,c.mode)+4+e.getCharCountIndicator(c.mode,o))}}i=l}for(let e=0;e<i.length;e++)r[i[e]].end=0;return{map:r,table:n}}(r,n),s=l.find_path(i.map,"start","end"),d=[];for(let t=1;t<s.length-1;t++)d.push(i.table[s[t]].node);return t.fromArray(function(t){return t.reduce(function(t,e){const o=t.length-1>=0?t[t.length-1]:null;return o&&o.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[])}(d))},t.rawSplit=function(e){return t.fromArray(u(e,a.isKanjiModeEnabled()))}}(Tt)),Tt}function jt(){if(_t)return S;_t=1;const t=U(),e=J(),o=function(){if(H)return O;function t(){this.buffer=[],this.length=0}return H=1,t.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let o=0;o<e;o++)this.putBit(1==(t>>>e-o-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},O=t}(),n=function(){if(Y)return q;function t(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return Y=1,t.prototype.set=function(t,e,o,n){const r=t*this.size+e;this.data[r]=o,n&&(this.reservedBit[r]=!0)},t.prototype.get=function(t,e){return this.data[t*this.size+e]},t.prototype.xor=function(t,e,o){this.data[t*this.size+e]^=o},t.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},q=t}(),r=(K||(K=1,function(t){const e=U().getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const o=Math.floor(t/7)+2,n=e(t),r=145===n?26:2*Math.ceil((n-13)/(2*o-2)),i=[n-7];for(let e=1;e<o-1;e++)i[e]=i[e-1]-r;return i.push(6),i.reverse()},t.getPositions=function(e){const o=[],n=t.getRowColCoords(e),r=n.length;for(let t=0;t<r;t++)for(let e=0;e<r;e++)0===t&&0===e||0===t&&e===r-1||t===r-1&&0===e||o.push([n[t],n[e]]);return o}}(Z)),Z),i=function(){if(Q)return W;Q=1;const t=U().getSymbolSize;return W.getPositions=function(e){const o=t(e);return[[0,0],[o-7,0],[0,o-7]]},W}(),s=(G||(G=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e=3,o=3,n=40,r=10;function i(e,o,n){switch(e){case t.Patterns.PATTERN000:return(o+n)%2==0;case t.Patterns.PATTERN001:return o%2==0;case t.Patterns.PATTERN010:return n%3==0;case t.Patterns.PATTERN011:return(o+n)%3==0;case t.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(n/3))%2==0;case t.Patterns.PATTERN101:return o*n%2+o*n%3==0;case t.Patterns.PATTERN110:return(o*n%2+o*n%3)%2==0;case t.Patterns.PATTERN111:return(o*n%3+(o+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(t){const o=t.size;let n=0,r=0,i=0,s=null,a=null;for(let l=0;l<o;l++){r=i=0,s=a=null;for(let c=0;c<o;c++){let o=t.get(l,c);o===s?r++:(r>=5&&(n+=e+(r-5)),s=o,r=1),o=t.get(c,l),o===a?i++:(i>=5&&(n+=e+(i-5)),a=o,i=1)}r>=5&&(n+=e+(r-5)),i>=5&&(n+=e+(i-5))}return n},t.getPenaltyN2=function(t){const e=t.size;let n=0;for(let o=0;o<e-1;o++)for(let r=0;r<e-1;r++){const e=t.get(o,r)+t.get(o,r+1)+t.get(o+1,r)+t.get(o+1,r+1);4!==e&&0!==e||n++}return n*o},t.getPenaltyN3=function(t){const e=t.size;let o=0,r=0,i=0;for(let n=0;n<e;n++){r=i=0;for(let s=0;s<e;s++)r=r<<1&2047|t.get(n,s),s>=10&&(1488===r||93===r)&&o++,i=i<<1&2047|t.get(s,n),s>=10&&(1488===i||93===i)&&o++}return o*n},t.getPenaltyN4=function(t){let e=0;const o=t.data.length;for(let n=0;n<o;n++)e+=t.data[n];return Math.abs(Math.ceil(100*e/o/5)-10)*r},t.applyMask=function(t,e){const o=e.size;for(let n=0;n<o;n++)for(let r=0;r<o;r++)e.isReserved(r,n)||e.xor(r,n,i(t,r,n))},t.getBestMask=function(e,o){const n=Object.keys(t.Patterns).length;let r=0,i=1/0;for(let s=0;s<n;s++){o(s),t.applyMask(s,e);const n=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(s,e),n<i&&(i=n,r=s)}return r}}(X)),X),a=ot(),l=function(){if(st)return it;st=1;const t=ct();function e(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(e){this.degree=e,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(e.length+this.degree);o.set(e);const n=t.mod(o,this.genPoly),r=this.degree-n.length;if(r>0){const t=new Uint8Array(this.degree);return t.set(n,r),t}return n},it=e}(),c=yt(),d=function(){if(Ct)return kt;Ct=1;const t=U(),e=t.getBCHDigit(1335);return kt.getEncodedBits=function(o,n){const r=o.bit<<3|n;let i=r<<10;for(;t.getBCHDigit(i)-e>=0;)i^=1335<<t.getBCHDigit(i)-e;return 21522^(r<<10|i)},kt}(),u=wt(),h=St();function p(t,e,o){const n=t.size,r=d.getEncodedBits(e,o);let i,s;for(i=0;i<15;i++)s=1==(r>>i&1),i<6?t.set(i,8,s,!0):i<8?t.set(i+1,8,s,!0):t.set(n-15+i,8,s,!0),i<8?t.set(8,n-i-1,s,!0):i<9?t.set(8,15-i-1+1,s,!0):t.set(8,15-i-1,s,!0);t.set(n-8,8,1,!0)}function f(e,n,r){const i=new o;r.forEach(function(t){i.put(t.mode.bit,4),i.put(t.getLength(),u.getCharCountIndicator(t.mode,e)),t.write(i)});const s=8*(t.getSymbolTotalCodewords(e)-a.getTotalCodewordsCount(e,n));for(i.getLengthInBits()+4<=s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const c=(s-i.getLengthInBits())/8;for(let t=0;t<c;t++)i.put(t%2?17:236,8);return function(e,o,n){const r=t.getSymbolTotalCodewords(o),i=a.getTotalCodewordsCount(o,n),s=r-i,c=a.getBlocksCount(o,n),d=r%c,u=c-d,h=Math.floor(r/c),p=Math.floor(s/c),f=p+1,g=h-p,m=new l(g);let b=0;const x=new Array(c),v=new Array(c);let w=0;const y=new Uint8Array(e.buffer);for(let t=0;t<c;t++){const e=t<u?p:f;x[t]=y.slice(b,b+e),v[t]=m.encode(x[t]),b+=e,w=Math.max(w,e)}const C=new Uint8Array(r);let k,E,z=0;for(k=0;k<w;k++)for(E=0;E<c;E++)k<x[E].length&&(C[z++]=x[E][k]);for(k=0;k<g;k++)for(E=0;E<c;E++)C[z++]=v[E][k];return C}(i,e,n)}function g(e,o,a,l){let d;if(Array.isArray(e))d=h.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let t=o;if(!t){const o=h.rawSplit(e);t=c.getBestVersionForData(o,a)}d=h.fromString(e,t||40)}}const u=c.getBestVersionForData(d,a);if(!u)throw new Error("The amount of data is too big to be stored in a QR Code");if(o){if(o<u)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+u+".\n")}else o=u;const g=f(o,a,d),m=t.getSymbolSize(o),b=new n(m);return function(t,e){const o=t.size,n=i.getPositions(e);for(let r=0;r<n.length;r++){const e=n[r][0],i=n[r][1];for(let n=-1;n<=7;n++)if(!(e+n<=-1||o<=e+n))for(let r=-1;r<=7;r++)i+r<=-1||o<=i+r||(n>=0&&n<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===n||6===n)||n>=2&&n<=4&&r>=2&&r<=4?t.set(e+n,i+r,!0,!0):t.set(e+n,i+r,!1,!0))}}(b,o),function(t){const e=t.size;for(let o=8;o<e-8;o++){const e=o%2==0;t.set(o,6,e,!0),t.set(6,o,e,!0)}}(b),function(t,e){const o=r.getPositions(e);for(let n=0;n<o.length;n++){const e=o[n][0],r=o[n][1];for(let o=-2;o<=2;o++)for(let n=-2;n<=2;n++)-2===o||2===o||-2===n||2===n||0===o&&0===n?t.set(e+o,r+n,!0,!0):t.set(e+o,r+n,!1,!0)}}(b,o),p(b,a,0),o>=7&&function(t,e){const o=t.size,n=c.getEncodedBits(e);let r,i,s;for(let a=0;a<18;a++)r=Math.floor(a/3),i=a%3+o-8-3,s=1==(n>>a&1),t.set(r,i,s,!0),t.set(i,r,s,!0)}(b,o),function(t,e){const o=t.size;let n=-1,r=o-1,i=7,s=0;for(let a=o-1;a>0;a-=2)for(6===a&&a--;;){for(let o=0;o<2;o++)if(!t.isReserved(r,a-o)){let n=!1;s<e.length&&(n=1==(e[s]>>>i&1)),t.set(r,a-o,n),i--,-1===i&&(s++,i=7)}if(r+=n,r<0||o<=r){r-=n,n=-n;break}}}(b,g),isNaN(l)&&(l=s.getBestMask(b,p.bind(null,b,a))),s.applyMask(l,b),p(b,a,l),{modules:b,version:o,errorCorrectionLevel:a,maskPattern:l,segments:d}}return S.create=function(o,n){if(void 0===o||""===o)throw new Error("No input text");let r,i,a=e.M;return void 0!==n&&(a=e.from(n.errorCorrectionLevel,e.M),r=c.from(n.version),i=s.from(n.maskPattern),n.toSJISFunc&&t.setToSJISFunction(n.toSJISFunc)),g(o,r,a,i)},S}var Ut,$t,Ot={},Ht={};function qt(){return Ut||(Ut=1,function(t){function e(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map(function(t){return[t,t]}))),6===e.length&&e.push("F","F");const o=parseInt(e.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:255&o,hex:"#"+e.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});const o=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,n=t.width&&t.width>=21?t.width:void 0,r=t.scale||4;return{width:n,scale:n?4:r,margin:o,color:{dark:e(t.color.dark||"#000000ff"),light:e(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},t.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},t.getImageWidth=function(e,o){const n=t.getScale(e,o);return Math.floor((e+2*o.margin)*n)},t.qrToImageData=function(e,o,n){const r=o.modules.size,i=o.modules.data,s=t.getScale(r,n),a=Math.floor((r+2*n.margin)*s),l=n.margin*s,c=[n.color.light,n.color.dark];for(let t=0;t<a;t++)for(let o=0;o<a;o++){let d=4*(t*a+o),u=n.color.light;if(t>=l&&o>=l&&t<a-l&&o<a-l){u=c[i[Math.floor((t-l)/s)*r+Math.floor((o-l)/s)]?1:0]}e[d++]=u.r,e[d++]=u.g,e[d++]=u.b,e[d]=u.a}}}(Ht)),Ht}function Yt(){return $t||($t=1,function(t){const e=qt();t.render=function(t,o,n){let r=n,i=o;void 0!==r||o&&o.getContext||(r=o,o=void 0),o||(i=function(){try{return document.createElement("canvas")}catch(A){throw new Error("You need to specify a canvas element")}}()),r=e.getOptions(r);const s=e.getImageWidth(t.modules.size,r),a=i.getContext("2d"),l=a.createImageData(s,s);return e.qrToImageData(l.data,t,r),function(t,e,o){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=o,e.width=o,e.style.height=o+"px",e.style.width=o+"px"}(a,i,s),a.putImageData(l,0,0),i},t.renderToDataURL=function(e,o,n){let r=n;void 0!==r||o&&o.getContext||(r=o,o=void 0),r||(r={});const i=t.render(e,o,r),s=r.type||"image/png",a=r.rendererOpts||{};return i.toDataURL(s,a.quality)}}(Ot)),Ot}var Vt,Jt,Kt={};function Zt(){if(Vt)return Kt;Vt=1;const t=qt();function e(t,e){const o=t.a/255,n=e+'="'+t.hex+'"';return o<1?n+" "+e+'-opacity="'+o.toFixed(2).slice(1)+'"':n}function o(t,e,o){let n=t+e;return void 0!==o&&(n+=" "+o),n}return Kt.render=function(n,r,i){const s=t.getOptions(r),a=n.modules.size,l=n.modules.data,c=a+2*s.margin,d=s.color.light.a?"<path "+e(s.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",u="<path "+e(s.color.dark,"stroke")+' d="'+function(t,e,n){let r="",i=0,s=!1,a=0;for(let l=0;l<t.length;l++){const c=Math.floor(l%e),d=Math.floor(l/e);c||s||(s=!0),t[l]?(a++,l>0&&c>0&&t[l-1]||(r+=s?o("M",c+n,.5+d+n):o("m",i,0),i=0,s=!1),c+1<e&&t[l+1]||(r+=o("h",a),a=0)):i++}return r}(l,a,s.margin)+'"/>',h='viewBox="0 0 '+c+" "+c+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+h+' shape-rendering="crispEdges">'+d+u+"</svg>\n";return"function"==typeof i&&i(null,p),p},Kt}var Qt=function(){if(Jt)return _;Jt=1;const t=F(),e=jt(),o=Yt(),n=Zt();function r(o,n,r,i,s){const a=[].slice.call(arguments,1),l=a.length,c="function"==typeof a[l-1];if(!c&&!t())throw new Error("Callback required as last argument");if(!c){if(l<1)throw new Error("Too few arguments provided");return 1===l?(r=n,n=i=void 0):2!==l||n.getContext||(i=r,r=n,n=void 0),new Promise(function(t,s){try{const s=e.create(r,i);t(o(s,n,i))}catch(A){s(A)}})}if(l<2)throw new Error("Too few arguments provided");2===l?(s=r,r=n,n=i=void 0):3===l&&(n.getContext&&void 0===s?(s=i,i=void 0):(s=i,i=r,r=n,n=void 0));try{const t=e.create(r,i);s(null,o(t,n,i))}catch(A){s(A)}}return _.create=e.create,_.toCanvas=r.bind(null,o.render),_.toDataURL=r.bind(null,o.renderToDataURL),_.toString=r.bind(null,function(t,e,o){return n.render(t,o)}),_}();var Wt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,Xt=(t,e,o,n)=>{for(var r,i=n>1?void 0:n?Gt(e,o):e,s=t.length-1;s>=0;s--)(r=t[s])&&(i=(n?r(e,o,i):r(i))||i);return n&&i&&Wt(e,o,i),i};let te=class extends t{updated(){const{originId:t,destinationId:e,generalConfig:o}=this.sdkData??{};if((t!==this.lastOriginId||e!==this.lastDestinationId)&&t&&e&&o){this.lastOriginId=t,this.lastDestinationId=e;const{baseUrl:n}=o,r=`${n}/?origin=${t}&destination=${e}&utm_source=qr-totem&utm_content=route&utm_referrer=totem`,i={errorCorrectionLevel:"M",type:"image/webp",margin:1,width:150};Qt.toDataURL(r,i).then(o=>{const n=this.shadowRoot?.getElementById("qr");n&&n instanceof HTMLImageElement&&(n.src=o,a.getInstance().trackEvent("qr_modal_displayed",{origin_id:t,destination_id:e,qr_url:r}))})}}render(){const{cameraInitialized:t}=this.sdkData??{};return e`
152
+ <div class=${A({card:!0,hidden:!t})}>
153
+ <div class="modal-content">
154
+ <div class="pin-container">
155
+ <span .innerHTML=${'<svg width="63" height="63" viewBox="0 0 63 63" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g clip-path="url(#clip0_15_10760)">\n<path d="M32.8125 55.125H21C19.6076 55.125 18.2723 54.5719 17.2877 53.5873C16.3031 52.6027 15.75 51.2674 15.75 49.875V13.125C15.75 11.7326 16.3031 10.3973 17.2877 9.41269C18.2723 8.42812 19.6076 7.875 21 7.875H42C43.3924 7.875 44.7277 8.42812 45.7123 9.41269C46.6969 10.3973 47.25 11.7326 47.25 13.125V28.875" stroke="#DAEBF2" stroke-width="5.25" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M28.8758 10.4992H34.1258" stroke="#DAEBF2" stroke-width="5.25" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M55.4418 52.8193C56.5434 51.7181 57.2937 50.3149 57.5977 48.7872C57.9018 47.2595 57.746 45.676 57.15 44.2369C56.554 42.7978 55.5447 41.5678 54.2496 40.7023C52.9545 39.8369 51.4318 39.375 49.8742 39.375C48.3166 39.375 46.7939 39.8369 45.4988 40.7023C44.2038 41.5678 43.1944 42.7978 42.5984 44.2369C42.0025 45.676 41.8466 47.2595 42.1507 48.7872C42.4548 50.3149 43.205 51.7181 44.3066 52.8193C45.4038 53.9192 47.2597 55.5624 49.8742 57.7517C52.6331 55.4154 54.4916 53.7722 55.4418 52.8193Z" stroke="#DAEBF2" stroke-width="5.25" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M49.8742 47.25V47.2757" stroke="#DAEBF2" stroke-width="5.25" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M31.5 44.6258V44.6515" stroke="#DAEBF2" stroke-width="5.25" stroke-linecap="round" stroke-linejoin="round"/>\n</g>\n<defs>\n<clipPath id="clip0_15_10760">\n<rect width="63" height="63" fill="white"/>\n</clipPath>\n</defs>\n</svg>\n'}></span>
156
+ </div>
157
+ <div class="qr-text">
158
+ <span>Continúa la ruta en tu celular, escaneando el código QR</span>
159
+ </div>
160
+ <div class="qr-code qr-container">
161
+ <img id="qr" src="" alt="QR Code" />
162
+ </div>
163
+ </div>
164
+ </div>
165
+ `}};te.styles=[o(":host{display:block;height:100%;width:100%;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.card{margin-top:15px;background:#11032b;color:#fff;border-radius:24px;z-index:10;width:29.79vw;min-width:415px}.card.hidden{display:none}.modal-content{display:flex;flex-direction:row;align-items:center;gap:16px;padding:16px}.pin-container{display:flex;align-items:center;gap:8px}.qr-text{margin:0;font-size:1rem;font-weight:600;font-family:Poppins}.qr-code{display:flex;justify-content:center;align-items:center}.qr-code img{height:auto}.qr-container{background:#fff;padding:4px}")],Xt([g({context:m,subscribe:!0})],te.prototype,"sdkData",2),te=Xt([i("qr-modal")],te);const ee=/*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({__proto__:null,get QRModal(){return te}},Symbol.toStringTag,{value:"Module"}));var oe=Object.defineProperty,ne=Object.getOwnPropertyDescriptor,re=(t,e,o,n)=>{for(var r,i=n>1?void 0:n?ne(e,o):e,s=t.length-1;s>=0;s--)(r=t[s])&&(i=(n?r(e,o,i):r(i))||i);return n&&i&&oe(e,o,i),i};let ie=class extends t{constructor(){super(),this.assets=null,this._loadAssets()}async _loadAssets(){this.assets=await(async()=>{const[t,e,o,n,r,i]=await Promise.all([import("./accessibility-D3Vyfstu.js"),import("./back_arrow-B3RltzaY.js"),import("./icon-destination-point-DEI58b8w.js"),import("./icon-origin-point-GS06gE2l.js"),import("./repeat_icon-DN4_p9eh.js"),import("./walking-BggsSG4g.js")]);return{accessibilityIcon:t.default,backIcon:e.default,destinationPoint:o.default,originPoint:n.default,repeatIcon:r.default,walkingIcon:i.default}})(),this.requestUpdate()}handleBack(){this.dispatchEvent(new CustomEvent("back",{detail:{},bubbles:!0,composed:!0}))}handleAccessibility(){this.dispatchEvent(new CustomEvent("accessibilityChange",{detail:!this.sdkData?.accessibleRoute,bubbles:!0,composed:!0}))}handleRepeatRoute(){this.dispatchEvent(new CustomEvent("repeatRoute",{detail:!0,bubbles:!0,composed:!0}))}handleGenerateRoute(){this.dispatchEvent(new CustomEvent("generateRoute",{detail:{accessible:!!this.sdkData?.accessibleRoute},bubbles:!0,composed:!0}))}_dismissError(){a.getInstance().trackEvent("error_modal_dismissed",{error_message:this.sdkData?.routeError,origin_id:this.sdkData?.originId,destination_id:this.sdkData?.destinationId}),this.dispatchEvent(new CustomEvent("dismissRouteError",{bubbles:!0,composed:!0}))}render(){if(!this.sdkData)return e``;const{destination:t,accessibleRoute:o,parentPlace:n,origin:r,route:i,isRouteAnimating:s}=this.sdkData,a=o?this.assets?.accessibilityIcon:this.assets?.walkingIcon,l=t?.title??"",c=n?.innerFloors??[],d=(r&&"function"==typeof r.inFloor?r.inFloor(c):void 0)?.name??"",u=(t&&"function"==typeof t.inFloor?t.inFloor(c):void 0)?.name??"",h=s??!1;let p="";return i&&i.legs&&i.legs.length>0&&i.legs[0].distance&&(p=`• ${i.legs[0].distance.toFixed(0)} mts`),e`
166
+ <div class="route-panel">
167
+ <div class="flex flex-col h-full">
168
+ <div class="back-panel" @click=${this.handleBack}>
169
+ <div class="back-content">
170
+ <span .innerHTML=${this.assets?.backIcon}></span>
171
+ <span class="back-text">Volver</span>
172
+ </div>
173
+ </div>
174
+
175
+ <div class="route-modal">
176
+ <div class="entrance-name d-flex align-items-center">
177
+ <div class="icon_switcher_user_type">
178
+ <span .innerHTML=${a}></span>
179
+ </div>
180
+ <span class="justify-content-center place-name"> ${l} </span>
181
+ ${i?e`
182
+ <button class="repeat-route-btn" @click=${this.handleRepeatRoute} ?disabled=${h}>
183
+ <span .innerHTML=${this.assets?.repeatIcon}></span>
184
+ <span>Repetir ruta</span>
185
+ </button>
186
+ `:""}
187
+ </div>
188
+ <div class="floor-specs">
189
+ <span class="floor-name">${u}</span>
190
+ <span class="route-distance">${p}</span>
191
+ </div>
192
+ <div class="d-flex flex-wrap container-controls">
193
+ <div class="flex-fill route-input-wrapper">
194
+ <div class="c-route-input c-route-input-from">
195
+ <div class="c-route-input-icon">
196
+ <img src=${this.assets?.originPoint} alt="" class="icon-point" />
197
+ </div>
198
+ Desde mi ubicación
199
+ <span>${d}</span>
200
+ </div>
201
+ <div class="c-route-input" @click=${this.handleBack}>
202
+ <div class="c-route-input-icon">
203
+ <img src=${this.assets?.destinationPoint} alt="" class="icon-point" />
204
+ </div>
205
+ ${l}
206
+ <span>${u}</span>
207
+ </div>
208
+ </div>
209
+ <div
210
+ class="accessibility-switch ${this.sdkData?.accessibleRoute?"accessible":""}"
211
+ @click=${this.handleAccessibility}
212
+ >
213
+ <div class="accessibility-switch-icon ${this.sdkData?.accessibleRoute?"":"active"}">
214
+ <span .innerHTML=${this.assets?.walkingIcon}></span>
215
+ </div>
216
+ <div class="accessibility-switch-icon ${this.sdkData?.accessibleRoute?"active":""}">
217
+ <span .innerHTML=${this.assets?.accessibilityIcon}></span>
218
+ </div>
219
+ </div>
220
+ </div>
221
+
222
+ ${i?"":e`
223
+ <div class="generate-route-container d-flex justify-content-center align-items-center mt-3">
224
+ <button class="generate-route-btn" @click=${this.handleGenerateRoute}>
225
+ <span> Generar ruta</span>
226
+ </button>
227
+ </div>
228
+ `}
229
+ </div>
230
+ </div>
231
+ </div>
232
+ <qr-modal></qr-modal>
233
+ ${this.sdkData?.routeError?e`
234
+ <div class="error-modal-overlay">
235
+ <div class="error-modal">
236
+ <div class="error-icon">
237
+ <svg width="48" height="48" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
238
+ <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-width="2"/>
239
+ <path d="M12 8V12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
240
+ <circle cx="12" cy="16" r="1" fill="currentColor"/>
241
+ </svg>
242
+ </div>
243
+ <p class="error-message">${this.sdkData.routeError}</p>
244
+ <button class="error-btn" @click=${this._dismissError}>Aceptar</button>
245
+ </div>
246
+ </div>
247
+ `:""}
248
+ `}};ie.styles=[o(":host{position:absolute;top:0;left:0;padding:1rem;z-index:10;font-family:Poppins!important;user-select:none}svg{vertical-align:middle}.back-panel{background-color:#11032b;color:#fff;margin-bottom:5px;padding-left:1.2rem;align-items:center;height:55px;position:relative}.back-content{margin:0;position:relative;top:50%;transform:translateY(-50%);font-size:22px;color:#fff;display:flex;align-items:center;gap:8px;cursor:pointer}.route-panel{width:29.79vw;min-width:415px;max-height:75vh;overflow-y:auto;overflow-x:hidden;border-radius:24px;background:#fff;box-shadow:0 0 24px #00000026}.back-text{font-size:24px;font-weight:600}.back-content img{vertical-align:middle}.route-modal{padding:19px 13px 22px 32px}.icon_switcher_user_type{position:relative;color:#000}.d-flex{display:flex!important}.flex-fill{flex:1 1 auto!important}.place-name{font-weight:700;font-size:32px;line-height:1;letter-spacing:-1.6px;color:#333;margin-left:2px}.repeat-route-btn{display:flex;gap:10px;justify-content:center;align-items:center;text-align:center;background-color:#fff;border:2px solid #000000;border-radius:999px;margin-left:auto;margin-right:0;padding:12px 20px;font-size:20px;font-weight:700;line-height:20px;letter-spacing:-1px;color:#000;transition:background-color .3s ease,color .3s ease;cursor:pointer}.repeat-route-btn[disabled]{color:gray;border-color:gray;cursor:not-allowed;pointer-events:none}.floor-name{font-size:1rem;color:#427553}.floor-specs{font-family:Poppins;font-weight:600;line-height:14px;size:18px}.route-distance{color:#666}.container-controls{margin-top:16px;align-items:end;gap:11px}.c-route-input{color:#000;display:flex;padding:15px;font-size:16px;font-style:normal;font-weight:600;line-height:16px;letter-spacing:-.8px;align-items:center;gap:9px;border-radius:30px;background:#fff;box-shadow:0 0 10px #0000001a;position:relative;margin-top:12px}.c-route-input .c-route-input-icon svg{width:22px;height:22px}.c-route-input-from{margin-top:0}.c-route-input-from:after{content:\"\";position:absolute;bottom:-50%;left:24px;width:3.998px;height:34.5px;z-index:1;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='38' viewBox='0 0 4 38' fill='none'%3E%3Cpath d='M-0.00028944 18.9386C-0.00028944 17.8347 0.894666 16.9397 1.99864 16.9397C3.10259 16.9397 3.99756 17.8347 3.99756 18.9386C3.99756 20.0426 3.10259 20.9375 1.99864 20.9375C0.894666 20.9375 -0.00028944 20.0426 -0.00028944 18.9386ZM-0.00028944 27.2198C-0.00028944 26.1159 0.894666 25.2209 1.99864 25.2209C3.10259 25.2209 3.99756 26.1159 3.99756 27.2198C3.99756 28.3238 3.10259 29.2188 1.99864 29.2188C0.894666 29.2188 -0.00028944 28.3238 -0.00028944 27.2198ZM-0.00028944 35.5011C-0.00028944 34.3971 0.894666 33.5021 1.99864 33.5021C3.10259 33.5021 3.99756 34.3971 3.99756 35.5011C3.99756 36.605 3.10259 37.5 1.99864 37.5C0.894666 37.5 -0.00028944 36.605 -0.00028944 35.5011Z' fill='%23D0D0D0'/%3E%3Cpath d='M1.99864 8.49999C0.894666 8.49999 -0.00028944 9.39496 -0.00028944 10.4989C-0.00028944 11.6029 0.894666 12.4978 1.99864 12.4978C3.10259 12.4978 3.99756 11.6029 3.99756 10.4989C3.99756 9.39496 3.10259 8.49999 1.99864 8.49999Z' fill='%23D0D0D0'/%3E%3Cpath d='M1.99864 0C0.894666 0 -0.00028944 0.894973 -0.00028944 1.99892C-0.00028944 3.10289 0.894666 3.99784 1.99864 3.99784C3.10259 3.99784 3.99756 3.10289 3.99756 1.99892C3.99756 0.894973 3.10259 0 1.99864 0Z' fill='%23D0D0D0'/%3E%3C/svg%3E\")}.c-route-input span{padding:0 6px;border-radius:15px;color:#454545;background:#f2f2f2;font-size:10px;font-style:normal;font-weight:600;line-height:14px;letter-spacing:-.5px}.accessibility-switch{display:flex;align-items:center;justify-content:center;min-width:100px;height:50px;border-radius:48px;background-color:#fff;box-shadow:0 0 15px #0003;position:relative}.accessibility-switch:before,.accessibility-switch:after{content:\"\";border-radius:50%;width:50%;height:100%;background:#000;position:absolute;bottom:0;left:0;background:linear-gradient(45.8deg,#f5a 10.03%,#b850c9 25.23%,#6572d6 48.67%,#4eaeb8 72.74%);z-index:0;transition:transform .5s ease}.accessibility-switch:after{background:#000;clip-path:circle(22px);z-index:1}.accessibility-switch.accessible:before,.accessibility-switch.accessible:after{transform:translate(100%)}.accessibility-switch-icon{width:50px;height:100%;display:grid;place-items:center;cursor:pointer;z-index:2;transition:color .5s ease;color:#000}.accessibility-switch-icon.active{color:#fff}.generate-route-btn{border-style:solid;width:100%;border-radius:30px;height:58px;background-color:#11032b;cursor:pointer}.generate-route-btn span{font-family:Poppins;font-size:1rem;line-height:16px;font-weight:600;text-align:center;color:#fff}.generate-route-container{width:100%}.mt-3{margin-top:1rem!important}.align-items-center{align-items:center!important}.justify-content-center{justify-content:center!important}.error-modal-overlay{position:fixed;inset:0;background:#00000080;backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000}.error-modal{background:#fff;color:#11032b;border-radius:24px;padding:32px;text-align:center;max-width:350px;box-shadow:0 0 24px #0000004d;animation:fadeInScale .2s ease-out}@keyframes fadeInScale{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.error-icon{margin-bottom:16px;color:#11032b}.error-message{font-size:18px;margin:0 0 24px;line-height:1.4;font-weight:500}.error-btn{background:#11032b;color:#fff;border:none;border-radius:30px;padding:12px 40px;font-size:16px;font-weight:600;cursor:pointer;transition:background-color .2s ease}.error-btn:hover{background:#1a0540}")],re([g({context:m,subscribe:!0})],ie.prototype,"sdkData",2),ie=re([i("route-options")],ie);const se=/*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({__proto__:null,get RouteOptions(){return ie}},Symbol.toStringTag,{value:"Module"}));export{I as B,E as c,A as e,T as f,f as i,ee as q,se as r,m as s};
249
+ //# sourceMappingURL=components-BeCPn1I0.js.map