@mapvx/web-components 0.0.38 → 0.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{base-floor-selector-_si0OaKV.cjs → base-floor-selector-BaaEIPJn.cjs} +2 -2
- package/dist/cjs/{class-map-CIFK_Nvk.cjs → class-map-CWrrDk6Q.cjs} +2 -2
- package/dist/cjs/{compact-floor-selector-CjEWEJM8.cjs → compact-floor-selector-E6k9faZO.cjs} +2 -2
- package/dist/cjs/{consume-BhigA9qa.cjs → consume-BPghnLcC.cjs} +2 -2
- package/dist/cjs/custom-map-NV_nB4sQ.cjs +160 -0
- package/dist/cjs/{floor-selector-DFyRRyAb.cjs → floor-selector-8KlKOWRd.cjs} +2 -2
- package/dist/cjs/{lazy-load-BE9-keHk.cjs → lazy-load-Db5agGyM.cjs} +2 -2
- package/dist/cjs/map-view-with-modal.cjs +1 -1
- package/dist/cjs/{qr-modal-B4BqIRX4.cjs → qr-modal-B_3Ax7pX.cjs} +2 -2
- package/dist/cjs/{route-options-DQc0dugR.cjs → route-options-Dqpa_KRL.cjs} +41 -13
- package/dist/cjs/route-view-totems.cjs +4 -3
- package/dist/es/assets/{compact-floor-selector-DNCJAHDM.js → compact-floor-selector-CFJ0KHMN.js} +2 -2
- package/dist/es/assets/components-BmwAJ-f1.js +319 -0
- package/dist/es/assets/{map-view-with-modal-D-9U3spD.js → map-view-with-modal-empaZwqw.js} +2 -2
- package/dist/es/assets/route-view-totems-BN3I5UEc.js +77 -0
- package/dist/es/assets/{utils-CIDFE1sK.js → utils-PPyTggvX.js} +2 -2
- package/dist/es/index.js +1 -1
- package/dist/es/route-view-totems.js +1 -1
- package/dist/iife/map-view-with-modal.js +75 -13
- package/dist/iife/route-view-totems.js +117 -25
- package/dist/sw/mvx-tiles-sw.js +40 -4
- package/package.json +1 -1
- package/dist/cjs/custom-map-D3dQQyOb.cjs +0 -97
- package/dist/es/assets/accessibility-D3Vyfstu.js.map +0 -1
- package/dist/es/assets/back_arrow-B3RltzaY.js.map +0 -1
- package/dist/es/assets/compact-floor-selector-DNCJAHDM.js.map +0 -1
- package/dist/es/assets/components-BeCPn1I0.js +0 -249
- package/dist/es/assets/components-BeCPn1I0.js.map +0 -1
- package/dist/es/assets/icon-destination-point-DEI58b8w.js.map +0 -1
- package/dist/es/assets/icon-origin-point-GS06gE2l.js.map +0 -1
- package/dist/es/assets/map-view-with-modal-D-9U3spD.js.map +0 -1
- package/dist/es/assets/repeat_icon-DN4_p9eh.js.map +0 -1
- package/dist/es/assets/route-view-totems-C-vpK0Jw.js +0 -72
- package/dist/es/assets/route-view-totems-C-vpK0Jw.js.map +0 -1
- package/dist/es/assets/styles-BByP6ECU.js.map +0 -1
- package/dist/es/assets/utils-CIDFE1sK.js.map +0 -1
- package/dist/es/assets/walking-BggsSG4g.js.map +0 -1
- package/dist/es/index.js.map +0 -1
- package/dist/es/route-view-totems.js.map +0 -1
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import{a as t,c as e,r as o,i as n,n as r,d as i,t as s,E as a,A as l}from"./route-view-totems-BN3I5UEc.js";import{R as c,M as d}from"./utils-PPyTggvX.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2021 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/let u=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 h=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 u(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 p{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 f=class extends Event{constructor(t,e){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=e}},g=class extends p{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 u(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 f(this.context,this.host))}};
|
|
28
|
+
/**
|
|
29
|
+
* @license
|
|
30
|
+
* Copyright 2022 Google LLC
|
|
31
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
+
*/
|
|
33
|
+
function m({context:t,subscribe:e}){return(o,n)=>{"object"==typeof n?n.addInitializer(function(){new h(this,{context:t,callback:t=>{o.set.call(this,t)},subscribe:e})}):o.constructor.addInitializer(o=>{new h(o,{context:t,callback:t=>{o[n]=t},subscribe:e})})}}const b="lazarillo-sdk";var x,v,w=Object.defineProperty,y=Object.getOwnPropertyDescriptor,C=t=>{throw TypeError(t)},k=(t,e,o,n)=>{for(var r,i=n>1?void 0:n?y(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&&w(e,o,i),i},E=(t,e,o)=>e.has(t)||C("Cannot "+o),z=(t,e,o)=>(E(t,e,"read from private field"),o?o.call(t):e.get(t)),M=(t,e,o)=>e.has(t)?C("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),A=(t,e,o,n)=>(E(t,e,"write to private field"),e.set(t,o),o);let I=class extends t{constructor(){super(),M(this,x,0),M(this,v,""),this.mapReady=!1,this.showLoadingOverlay=!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 c(this,this.routeAnimationHandlers),this.markerController=new d(this)}get paddingLeft(){return z(this,x)}set paddingLeft(t){A(this,x,t)}get loadingIcon(){return z(this,v)}set loadingIcon(t){A(this,v,t)}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,origin:c,destination:d,isLoading:u}=this.sdkData,h=d?.lazarilloId,p=void 0!==this.previousDestinationId&&this.previousDestinationId!==h&&void 0!==h;let f=!1;if((p||u)&&(this.showLoadingOverlay=!0,p&&this.mapReady&&(f=!0,this.markerController.clearAllMarkers(),this.routeAnimationController.removeRoute())),void 0!==h?this.previousDestinationId=h:d||u||(this.previousDestinationId=void 0),l&&this.showLoadingOverlay&&!u&&(this.showLoadingOverlay=!1),!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)),this.markerController&&this.routeAnimationController&&(this.markerController.setOrigin(c),this.routeAnimationController.setOrigin(c));if(!d&&!c&&!u&&0===i.length&&this.mapReady&&this.lzMap&&n?.initialCenter){const t=n?.mapRotations?.[e?.lazarilloId??""]?.angle??0,o=n?.pitch??0;this.lzMap.updateCamera({center:n.initialCenter,bearing:t,pitch:o,zoom:n?.initialZoom??18,animate:!1})}r&&r.key!==this._currentMapFloor&&this.mapReady&&this.setCurrentMapFloor(r.key);const g=this.markerController.getMarkersIds(),m=i.map(t=>t.id);(i.length!==g.length||m.some(t=>!g.includes(t))||g.some(t=>!m.includes(t)))&&(this.mapReady?this.updateMarkers():this.pendingUpdateMarkers=!0),this.pendingUpdateMarkers&&this.mapReady&&this.updateMarkers();const b=this.routeAnimationController.getCurrentRoute(),x=b?.id!==s?.id,v=x&&s;(this.pendingUpdateCamera||!l&&this.mapReady)&&d&&!v&&(this._initializeCamera(),this.pendingUpdateCamera=!1),x&&!f?(this.routeAnimationController.removeRoute(),s&&this.routeAnimationController.startRouteAnimation(s)):!this.routeAnimationController.isAnimating()&&a&&s&&!f&&this.routeAnimationController.startRouteAnimation(s)}updateMarkers(){const t=this.sdkData?.markers??[],e=this.sdkData?.destination?.inFloors?.[0]||this.sdkData?.origin?.inFloors?.[0]||this.sdkData?.currentFloor?.key;this.markerController.updateMarkers(t,e),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,n=this.config?.mapRotations?.[e?.lazarilloId??""]?.angle??0,r=this.config?.pitch??0,i=this.config?.initialZoom??20,s=t?.inFloors?.[0];if(s&&this.lzMap?.updateFloor(s),o){const i=e?.inFloors?.[0];if(i&&o.legs){const s=o.legs.flatMap(t=>t.steps).filter(t=>t.startInsideFloor===i||t.endInsideFloor===i).flatMap(t=>t.coordinates);if(s.length>0)this.lzMap?.fitCoordinates(s,{padding:{top:100,bottom:100,right:200+this.paddingLeft,left:100},bearing:n,pitch:r,animate:!1});else{const o=t?t.position:e?.position;this.lzMap?.updateCamera({bearing:n,pitch:r,center:o,animate:!1})}}else{const o=t?t.position:e?.position;this.lzMap?.updateCamera({bearing:n,pitch:r,center:o,animate:!1})}}else{const o=[];e?.position&&o.push(e.position),t?.position&&o.push(t.position),o.length>1?setTimeout(()=>{this.lzMap?.fitCoordinates(o,{padding:{top:100,bottom:100,right:200+this.paddingLeft,left:100},bearing:n,pitch:r,animate:!1})},100):1===o.length&&setTimeout(()=>{this.lzMap?.updateCamera({bearing:n,pitch:r,center:o[0],zoom:i,animate:!1})},100)}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(){const t=this.sdkData?.destination&&!this.sdkData?.cameraInitialized,o=this.showLoadingOverlay||this.sdkData?.isLoading||t;return e`
|
|
34
|
+
<div id="map"></div>
|
|
35
|
+
<div id="modal" style="display: ${this.modalData?"flex":"none"}">
|
|
36
|
+
<div class="modal-content">
|
|
37
|
+
<img class="modal-icon" .src=${this.modalData?.iconPath}></img>
|
|
38
|
+
<p class="modal-text">${this.modalData?.title}</p>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="loading-overlay ${o?"":"hidden"}">
|
|
42
|
+
${this.loadingIcon?e`<img class="loading-icon" src=${this.loadingIcon} alt="Loading..." />`:e`<div class="loading-spinner"></div>`}
|
|
43
|
+
<span class="loading-text">Cargando...</span>
|
|
44
|
+
</div>
|
|
45
|
+
`}};x=new WeakMap,v=new WeakMap,I.styles=[n`
|
|
46
|
+
:host {
|
|
47
|
+
height: 100%;
|
|
48
|
+
width: 100%;
|
|
49
|
+
}
|
|
50
|
+
`,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`
|
|
51
|
+
:host([compact-mode]) {
|
|
52
|
+
border-radius: 12px !important;
|
|
53
|
+
overflow: hidden !important;
|
|
54
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
|
|
55
|
+
border: 2px solid #e9ecef !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host([compact-mode]) #map {
|
|
59
|
+
border-radius: 12px !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host([compact-mode]) .maplibregl-canvas {
|
|
63
|
+
border-radius: 12px !important;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host([zoom-size='small']) {
|
|
67
|
+
--zoom-button-size: 32px;
|
|
68
|
+
--zoom-button-margin: 8px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:host([zoom-size='normal']) {
|
|
72
|
+
--zoom-button-size: 40px;
|
|
73
|
+
--zoom-button-margin: 12px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:host([zoom-size='large']) {
|
|
77
|
+
--zoom-button-size: 48px;
|
|
78
|
+
--zoom-button-margin: 16px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Apply CSS variables to zoom buttons */
|
|
82
|
+
:host([zoom-size='small']) .maplibregl-ctrl {
|
|
83
|
+
width: 32px !important;
|
|
84
|
+
height: 58px !important;
|
|
85
|
+
bottom: 8px !important;
|
|
86
|
+
right: 8px !important;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:host([zoom-size='normal']) .maplibregl-ctrl {
|
|
90
|
+
width: 40px !important;
|
|
91
|
+
height: 72px !important;
|
|
92
|
+
bottom: 12px !important;
|
|
93
|
+
right: 12px !important;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:host([zoom-size='large']) .maplibregl-ctrl {
|
|
97
|
+
width: 48px !important;
|
|
98
|
+
height: 86px !important;
|
|
99
|
+
bottom: 16px !important;
|
|
100
|
+
right: 16px !important;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Icon size is independent from container size */
|
|
104
|
+
.maplibregl-ctrl button {
|
|
105
|
+
font-size: var(--zoom-icon-size, 18px) !important;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.maplibregl-ctrl-group button::after {
|
|
109
|
+
font-size: var(--zoom-icon-size, 18px) !important;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Zoom button container customizable via CSS variables */
|
|
113
|
+
.maplibregl-ctrl {
|
|
114
|
+
border: var(--zoom-border-width, 0px) solid var(--zoom-border-color, transparent) !important;
|
|
115
|
+
box-shadow: var(--zoom-shadow, none) !important;
|
|
116
|
+
background: var(--zoom-background, #fff) !important;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.maplibregl-ctrl button {
|
|
120
|
+
border: none;
|
|
121
|
+
border-radius: unset;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* Divider between zoom-in and zoom-out buttons, overridable separately */
|
|
125
|
+
.maplibregl-ctrl-group button + button {
|
|
126
|
+
border-top: var(--zoom-divider-width, var(--zoom-border-width, 0px)) solid
|
|
127
|
+
var(--zoom-divider-color, var(--zoom-border-color, transparent)) !important;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.maplibregl-ctrl button:hover {
|
|
131
|
+
background-color: var(--zoom-hover-bg, var(--zoom-border-color, #251660)) !important;
|
|
132
|
+
color: var(--zoom-hover-color, #fff) !important;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Loading overlay styles */
|
|
136
|
+
.loading-overlay {
|
|
137
|
+
position: absolute;
|
|
138
|
+
top: 0;
|
|
139
|
+
left: 0;
|
|
140
|
+
right: 0;
|
|
141
|
+
bottom: 0;
|
|
142
|
+
background: var(--loading-background, rgba(255, 255, 255, 0.95));
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
align-items: center;
|
|
146
|
+
justify-content: center;
|
|
147
|
+
z-index: 1000;
|
|
148
|
+
transition: opacity 0.3s ease-in-out;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.loading-overlay.hidden {
|
|
152
|
+
opacity: 0;
|
|
153
|
+
pointer-events: none;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.loading-icon {
|
|
157
|
+
width: var(--loading-icon-size, 80px);
|
|
158
|
+
height: var(--loading-icon-size, 80px);
|
|
159
|
+
object-fit: contain;
|
|
160
|
+
margin-bottom: 16px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.loading-spinner {
|
|
164
|
+
width: var(--loading-spinner-size, 48px);
|
|
165
|
+
height: var(--loading-spinner-size, 48px);
|
|
166
|
+
border: 4px solid var(--loading-spinner-track, #e9ecef);
|
|
167
|
+
border-top-color: var(--loading-spinner-color, #251660);
|
|
168
|
+
border-radius: 50%;
|
|
169
|
+
animation: spin 1s linear infinite;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.loading-text {
|
|
173
|
+
margin-top: 16px;
|
|
174
|
+
font-family: var(--loading-font-family, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
|
|
175
|
+
font-size: var(--loading-font-size, 16px);
|
|
176
|
+
font-weight: var(--loading-font-weight, 500);
|
|
177
|
+
color: var(--loading-text-color, #251660);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@keyframes spin {
|
|
181
|
+
to {
|
|
182
|
+
transform: rotate(360deg);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
`],k([m({context:b,subscribe:!0})],I.prototype,"sdkData",2),k([r({type:Number,attribute:"padding-left"})],I.prototype,"paddingLeft",1),k([r({type:String,attribute:"loading-icon"})],I.prototype,"loadingIcon",1),k([i()],I.prototype,"showLoadingOverlay",2),I=k([s("custom-map")],I);const P=/*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({__proto__:null,get CustomMap(){return I}},Symbol.toStringTag,{value:"Module"})),R=1;
|
|
186
|
+
/**
|
|
187
|
+
* @license
|
|
188
|
+
* Copyright 2017 Google LLC
|
|
189
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
190
|
+
*/class B{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)}}
|
|
191
|
+
/**
|
|
192
|
+
* @license
|
|
193
|
+
* Copyright 2018 Google LLC
|
|
194
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
195
|
+
*/const D=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends B{constructor(t){if(super(t),t.type!==R||"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 a}});var L=Object.defineProperty;class T 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&&L(e,o,r)})([m({context:b,subscribe:!0})],T.prototype,"sdkData");var _=Object.getOwnPropertyDescriptor;let F=class extends T{render(){if(!this.sdkData)return e`<div>No data</div>`;const t=this.getFloors();return e`
|
|
196
|
+
<div class="floor-selector-container">
|
|
197
|
+
${t.map(t=>{const o=this.isFloorActive(t),n=this.isFloorEnabled(t);return e`
|
|
198
|
+
<div class="floor-btn-container">
|
|
199
|
+
<button
|
|
200
|
+
class=${D({"floor-btn":!0,active:o,disabled:!o&&!n})}
|
|
201
|
+
@click=${()=>n?this.selectFloor(t.key):null}
|
|
202
|
+
>
|
|
203
|
+
<span>${this.getFloorDisplayName(t)}</span>
|
|
204
|
+
</button>
|
|
205
|
+
</div>
|
|
206
|
+
`})}
|
|
207
|
+
</div>
|
|
208
|
+
`}};F.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}}')],F=((t,e,o,n)=>{for(var r,i=n>1?void 0:n?_(e,o):e,s=t.length-1;s>=0;s--)(r=t[s])&&(i=r(i)||i);return i})([s("floor-selector")],F);const N=/*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({__proto__:null,get FloorSelector(){return F}},Symbol.toStringTag,{value:"Module"}));var S,$,j={};function U(){return $?S:($=1,S=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var O,H={},q={};function Y(){if(O)return q;let t;O=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 q.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},q.getSymbolTotalCodewords=function(t){return e[t]},q.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},q.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');t=e},q.isKanjiModeEnabled=function(){return void 0!==t},q.toSJIS=function(e){return t(e)},q}var V,J,K,Z,Q,W={};function G(){return V||(V=1,(t=W).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(D){return o}}),W;var t}var X,tt={};var et,ot={};var nt,rt={};var it,st={};function at(){if(it)return st;it=1;const t=G(),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 st.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}},st.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}},st}var lt,ct,dt,ut,ht={},pt={};function ft(){return ct||(ct=1,function(t){const e=function(){if(lt)return pt;lt=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]}(),pt.log=function(t){if(t<1)throw new Error("log("+t+")");return e[t]},pt.exp=function(e){return t[e]},pt.mul=function(o,n){return 0===o||0===n?0:t[e[o]+e[n]]},pt}();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}}(ht)),ht}var gt,mt={},bt={},xt={};function vt(){return gt||(gt=1,xt.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),xt}var wt,yt,Ct,kt={};function Et(){if(wt)return kt;wt=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]))+";kt.KANJI=new RegExp(e,"g"),kt.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),kt.BYTE=new RegExp(o,"g"),kt.NUMERIC=new RegExp(t,"g"),kt.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const n=new RegExp("^"+e+"$"),r=new RegExp("^"+t+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return kt.testKanji=function(t){return n.test(t)},kt.testNumeric=function(t){return r.test(t)},kt.testAlphanumeric=function(t){return i.test(t)},kt}function zt(){return yt||(yt=1,function(t){const e=vt(),o=Et();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(D){return o}}}(bt)),bt}function Mt(){return Ct||(Ct=1,function(t){const e=Y(),o=at(),n=G(),r=zt(),i=vt(),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}}(mt)),mt}var At,It={};var Pt,Rt,Bt,Dt,Lt,Tt,_t,Ft,Nt={};var St,$t,jt,Ut={exports:{}};function Ot(){return St||(St=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}(Ut)),Ut.exports}function Ht(){return $t||($t=1,function(t){const e=zt(),o=function(){if(Rt)return Pt;Rt=1;const t=zt();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))},Pt=e}(),n=function(){if(Dt)return Bt;Dt=1;const t=zt(),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)},Bt=o}(),r=function(){if(Tt)return Lt;Tt=1;const t=zt();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)},Lt=e}(),i=function(){if(Ft)return _t;Ft=1;const t=zt(),e=Y();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)}},_t=o}(),s=Et(),a=Y(),l=Ot();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()))}}(Nt)),Nt}function qt(){if(jt)return H;jt=1;const t=Y(),e=G(),o=function(){if(K)return J;function t(){this.buffer=[],this.length=0}return K=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++}},J=t}(),n=function(){if(Q)return Z;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 Q=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]},Z=t}(),r=(X||(X=1,function(t){const e=Y().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}}(tt)),tt),i=function(){if(et)return ot;et=1;const t=Y().getSymbolSize;return ot.getPositions=function(e){const o=t(e);return[[0,0],[o-7,0],[0,o-7]]},ot}(),s=(nt||(nt=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}}(rt)),rt),a=at(),l=function(){if(ut)return dt;ut=1;const t=ft();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},dt=e}(),c=Mt(),d=function(){if(At)return It;At=1;const t=Y(),e=t.getBCHDigit(1335);return It.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)},It}(),u=zt(),h=Ht();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 H.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)},H}var Yt,Vt,Jt={},Kt={};function Zt(){return Yt||(Yt=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}}}(Kt)),Kt}function Qt(){return Vt||(Vt=1,function(t){const e=Zt();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(D){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)}}(Jt)),Jt}var Wt,Gt,Xt={};function te(){if(Wt)return Xt;Wt=1;const t=Zt();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 Xt.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},Xt}var ee=function(){if(Gt)return j;Gt=1;const t=U(),e=qt(),o=Qt(),n=te();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(D){s(D)}})}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(D){s(D)}}return j.create=e.create,j.toCanvas=r.bind(null,o.render),j.toDataURL=r.bind(null,o.renderToDataURL),j.toString=r.bind(null,function(t,e,o){return n.render(t,o)}),j}();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{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};ee.toDataURL(r,i).then(o=>{const n=this.shadowRoot?.getElementById("qr");n&&n instanceof HTMLImageElement&&(n.src=o,l.getInstance().trackEvent("qr_modal_displayed",{origin_id:t,destination_id:e,qr_url:r}))})}}render(){const{cameraInitialized:t}=this.sdkData??{};return e`
|
|
209
|
+
<div class=${D({card:!0,hidden:!t})}>
|
|
210
|
+
<div class="modal-content">
|
|
211
|
+
<div class="pin-container">
|
|
212
|
+
<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>
|
|
213
|
+
</div>
|
|
214
|
+
<div class="qr-text">
|
|
215
|
+
<span>Continúa la ruta en tu celular, escaneando el código QR</span>
|
|
216
|
+
</div>
|
|
217
|
+
<div class="qr-code qr-container">
|
|
218
|
+
<img id="qr" src="" alt="QR Code" />
|
|
219
|
+
</div>
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
222
|
+
`}};ie.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}")],re([m({context:b,subscribe:!0})],ie.prototype,"sdkData",2),ie=re([s("qr-modal")],ie);const se=/*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({__proto__:null,get QRModal(){return ie}},Symbol.toStringTag,{value:"Module"}));var ae=Object.defineProperty,le=Object.getOwnPropertyDescriptor,ce=(t,e,o,n)=>{for(var r,i=n>1?void 0:n?le(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&&ae(e,o,i),i};let de=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(){l.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,isLoading:a,loadingRoute:l,isNetworkError:c}=this.sdkData,d=o?this.assets?.accessibilityIcon:this.assets?.walkingIcon,u=t?.title??"",h=n?.innerFloors??[],p=(r&&"function"==typeof r.inFloor?r.inFloor(h):void 0)?.name??"",f=(t&&"function"==typeof t.inFloor?t.inFloor(h):void 0)?.name??"",g=s??!1;let m="";return i&&i.legs&&i.legs.length>0&&i.legs[0].distance&&(m=`• ${i.legs[0].distance.toFixed(0)} mts`),e`
|
|
223
|
+
<div class="route-panel">
|
|
224
|
+
<div class="flex flex-col h-full">
|
|
225
|
+
<div class="back-panel" @click=${this.handleBack}>
|
|
226
|
+
<div class="back-content">
|
|
227
|
+
<span .innerHTML=${this.assets?.backIcon}></span>
|
|
228
|
+
<span class="back-text">Volver</span>
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
<div class="route-modal">
|
|
233
|
+
<div class="entrance-name d-flex align-items-center">
|
|
234
|
+
<div class="icon_switcher_user_type">
|
|
235
|
+
<span .innerHTML=${d}></span>
|
|
236
|
+
</div>
|
|
237
|
+
<span class="justify-content-center place-name"> ${u} </span>
|
|
238
|
+
${i?e`
|
|
239
|
+
<button class="repeat-route-btn" @click=${this.handleRepeatRoute} ?disabled=${g}>
|
|
240
|
+
<span .innerHTML=${this.assets?.repeatIcon}></span>
|
|
241
|
+
<span>Repetir ruta</span>
|
|
242
|
+
</button>
|
|
243
|
+
`:""}
|
|
244
|
+
</div>
|
|
245
|
+
<div class="floor-specs">
|
|
246
|
+
<span class="floor-name">${f}</span>
|
|
247
|
+
<span class="route-distance">${m}</span>
|
|
248
|
+
</div>
|
|
249
|
+
<div class="d-flex flex-wrap container-controls">
|
|
250
|
+
<div class="flex-fill route-input-wrapper">
|
|
251
|
+
<div class="c-route-input c-route-input-from">
|
|
252
|
+
<div class="c-route-input-icon">
|
|
253
|
+
<img src=${this.assets?.originPoint} alt="" class="icon-point" />
|
|
254
|
+
</div>
|
|
255
|
+
Desde mi ubicación
|
|
256
|
+
<span>${p}</span>
|
|
257
|
+
</div>
|
|
258
|
+
<div class="c-route-input" @click=${this.handleBack}>
|
|
259
|
+
<div class="c-route-input-icon">
|
|
260
|
+
<img src=${this.assets?.destinationPoint} alt="" class="icon-point" />
|
|
261
|
+
</div>
|
|
262
|
+
${u}
|
|
263
|
+
<span>${f}</span>
|
|
264
|
+
</div>
|
|
265
|
+
</div>
|
|
266
|
+
<div
|
|
267
|
+
class="accessibility-switch ${this.sdkData?.accessibleRoute?"accessible":""}"
|
|
268
|
+
@click=${this.handleAccessibility}
|
|
269
|
+
>
|
|
270
|
+
<div class="accessibility-switch-icon ${this.sdkData?.accessibleRoute?"":"active"}">
|
|
271
|
+
<span .innerHTML=${this.assets?.walkingIcon}></span>
|
|
272
|
+
</div>
|
|
273
|
+
<div class="accessibility-switch-icon ${this.sdkData?.accessibleRoute?"active":""}">
|
|
274
|
+
<span .innerHTML=${this.assets?.accessibilityIcon}></span>
|
|
275
|
+
</div>
|
|
276
|
+
</div>
|
|
277
|
+
</div>
|
|
278
|
+
|
|
279
|
+
${i?"":e`
|
|
280
|
+
<div class="generate-route-container d-flex justify-content-center align-items-center mt-3">
|
|
281
|
+
<button class="generate-route-btn" @click=${this.handleGenerateRoute}>
|
|
282
|
+
<span> Generar ruta</span>
|
|
283
|
+
</button>
|
|
284
|
+
</div>
|
|
285
|
+
`}
|
|
286
|
+
</div>
|
|
287
|
+
</div>
|
|
288
|
+
</div>
|
|
289
|
+
<qr-modal></qr-modal>
|
|
290
|
+
${a||l?e`
|
|
291
|
+
<div class="loading-overlay">
|
|
292
|
+
<div class="loading-spinner"></div>
|
|
293
|
+
<p class="loading-text">${l?"Generando ruta...":"Cargando..."}</p>
|
|
294
|
+
</div>
|
|
295
|
+
`:""}
|
|
296
|
+
${this.sdkData?.routeError?e`
|
|
297
|
+
<div class="error-modal-overlay">
|
|
298
|
+
<div class="error-modal">
|
|
299
|
+
<div class="error-icon ${c?"network-error":""}">
|
|
300
|
+
${c?e`
|
|
301
|
+
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
302
|
+
<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"/>
|
|
303
|
+
<path d="M8 8L16 16M16 8L8 16" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
304
|
+
</svg>
|
|
305
|
+
`:e`
|
|
306
|
+
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
307
|
+
<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"/>
|
|
308
|
+
<path d="M12 8V12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
309
|
+
<circle cx="12" cy="16" r="1" fill="currentColor"/>
|
|
310
|
+
</svg>
|
|
311
|
+
`}
|
|
312
|
+
</div>
|
|
313
|
+
<p class="error-message">${this.sdkData.routeError}</p>
|
|
314
|
+
<button class="error-btn" @click=${this._dismissError}>Aceptar</button>
|
|
315
|
+
</div>
|
|
316
|
+
</div>
|
|
317
|
+
`:""}
|
|
318
|
+
`}};de.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}.loading-overlay{position:fixed;inset:0;background:#ffffffd9;backdrop-filter:blur(4px);display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:9999}.loading-spinner{width:60px;height:60px;border:4px solid #f3f3f3;border-top:4px solid #11032b;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.loading-text{margin-top:16px;font-size:18px;font-weight:600;color:#11032b}.error-icon.network-error{color:#e74c3c}")],ce([m({context:b,subscribe:!0})],de.prototype,"sdkData",2),de=ce([s("route-options")],de);const ue=/*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({__proto__:null,get RouteOptions(){return de}},Symbol.toStringTag,{value:"Module"}));export{T as B,P as c,D as e,N as f,g as i,se as q,ue as r,b as s};
|
|
319
|
+
//# sourceMappingURL=components-BmwAJ-f1.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,n as t,a as o,A as r,l as a,b as i,p as s,R as l,c as n,t as c}from"./route-view-totems-
|
|
1
|
+
import{i as e,n as t,a as o,A as r,l as a,b as i,p as s,R as l,c as n,t as c}from"./route-view-totems-BN3I5UEc.js";import{S as p}from"./utils-PPyTggvX.js";var d,h,m,v,f,w,y,x,u,g=Object.defineProperty,b=Object.getOwnPropertyDescriptor,z=e=>{throw TypeError(e)},S=(e,t,o,r)=>{for(var a,i=r>1?void 0:r?b(t,o):t,s=e.length-1;s>=0;s--)(a=e[s])&&(i=(r?a(t,o,i):a(i))||i);return r&&i&&g(t,o,i),i},I=(e,t,o)=>t.has(e)||z("Cannot "+o),k=(e,t,o)=>(I(e,t,"read from private field"),o?o.call(e):t.get(e)),P=(e,t,o)=>t.has(e)?z("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o),C=(e,t,o,r)=>(I(e,t,"write to private field"),t.set(e,o),o);let _=class extends o{constructor(){super(...arguments),P(this,d,""),P(this,h,""),P(this,m,"es"),P(this,v,""),P(this,f,!1),P(this,w,"normal"),P(this,y,!0),P(this,x,"top-left"),P(this,u,!1),this._swPath="/mvx-tiles-sw.js",this._swScope="/",this.sdkController=new p(this),this.analyticsController=r.getInstance(),this.currentFloorId=""}get apiKey(){return k(this,d)}set apiKey(e){C(this,d,e)}get parentPlaceId(){return k(this,h)}set parentPlaceId(e){C(this,h,e)}get locale(){return k(this,m)}set locale(e){C(this,m,e)}get placeId(){return k(this,v)}set placeId(e){C(this,v,e)}get compactMode(){return k(this,f)}set compactMode(e){C(this,f,e)}get zoomButtonSize(){return k(this,w)}set zoomButtonSize(e){C(this,w,e)}get showFloorSelector(){return k(this,y)}set showFloorSelector(e){C(this,y,e)}get floorSelectorPosition(){return k(this,x)}set floorSelectorPosition(e){C(this,x,e)}get floorSelectorDisabled(){return k(this,u)}set floorSelectorDisabled(e){C(this,u,e)}async _loadComponents(){await Promise.all([a(),i()])}_preloadApiRequests(){const e=this.apiKey||this.getAttribute("apiKey")||"",t=this.parentPlaceId||this.getAttribute("parentPlaceId")||"",o=this.locale||this.getAttribute("locale")||"es";if(!e||!t)return;const r=e=>{const t=`mvx-preload:${e}`;if(document.head.querySelector(`link[data-mvx-preload="${t}"]`))return;const o=document.createElement("link");o.rel="preload",o.as="fetch",o.href=e,o.crossOrigin="anonymous",o.setAttribute("fetchpriority","high"),o.setAttribute("data-mvx-preload",t),document.head.appendChild(o)},a="https://api.mapvx.com/sdk/",i=encodeURIComponent;r(`${a}v3/place?token=${i(e)}&place_id=${i(t)}&lang=${i(o)}`),r(`https://api.mapvx.com/api/configuration?token=${i(e)}&lang=${i(o)}&place_id=${i(t)}`),this.placeId&&r(`${a}v3/place?token=${i(e)}&place_id=${i(this.placeId)}&lang=${i(o)}`)}async _registerTileCacheSW(){if("serviceWorker"in navigator)try{await navigator.serviceWorker.register(this._swPath,{scope:this._swScope})}catch{}}async firstUpdated(){this._registerTileCacheSW();const e=this._loadComponents(),t=s();await Promise.all([e,t]),this.analyticsController.initialize("map-view-with-modal"),l.initialize("map-view-with-modal")}_mapReadyHandler(){this.sdkController.setMapReady(!0),this.analyticsController.trackEvent("map_ready",this.baseParams())}_cameraInitializedHandler(){this.sdkController.setCameraInitialized(!0),this.analyticsController.trackEvent("camera_initialized",this.baseParams())}_updateFloorHandler(e){const t=e.detail;if(this.currentFloorId===t)return;this.currentFloorId=t,this.sdkController.setFloor(t);const o=this.baseParams();o.floor_id=t,this.analyticsController.trackEvent("floor_change",o)}baseParams(){return{apiKey:this.apiKey,locale:this.locale,parentPlaceId:this.parentPlaceId,placeId:this.placeId,host:window.location.host,pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,referrer:document.referrer,userAgent:navigator.userAgent,screenWidth:window.innerWidth}}getFloorSelectorPositionStyles(){const e={"top-left":"top: 20px; left: 20px;","top-center":"top: 20px; left: 50%; transform: translateX(-50%);","top-right":"top: 20px; right: 20px;","center-left":"top: 50%; left: 20px; transform: translateY(-50%);","center-right":"top: 50%; right: 20px; transform: translateY(-50%);","bottom-left":"bottom: 20px; left: 20px;","bottom-center":"bottom: 20px; left: 50%; transform: translateX(-50%);","bottom-right":"bottom: 20px; right: 20px;"};return e[this.floorSelectorPosition]||e["top-left"]}updated(e){this.apiKey&&this.locale&&this.parentPlaceId&&(e.has("apiKey")||e.has("locale")||e.has("parentPlaceId"))&&(this._preloadApiRequests(),this.sdkController.prewarm(this.apiKey,this.locale,this.parentPlaceId,{destinationId:this.placeId}),this.sdkController.initialize(this.apiKey,this.locale,this.parentPlaceId)),this.placeId&&e.has("placeId")&&this.sdkController.setOriginAndDestination("",this.placeId)}render(){return n`
|
|
2
2
|
<div class="route-container" style="height: 100%; width: 100%; position: relative;">
|
|
3
3
|
<custom-map
|
|
4
4
|
class="map-container"
|
|
@@ -74,4 +74,4 @@ import{i as e,n as t,a as o,A as r,l as a,b as i,p as s,R as l,c as n,t as c}fro
|
|
|
74
74
|
overflow: hidden;
|
|
75
75
|
}
|
|
76
76
|
`],S([t({type:String})],_.prototype,"apiKey",1),S([t({type:String})],_.prototype,"parentPlaceId",1),S([t({type:String})],_.prototype,"locale",1),S([t({type:String})],_.prototype,"placeId",1),S([t({type:Boolean,attribute:"compact-mode",reflect:!0})],_.prototype,"compactMode",1),S([t({type:String,attribute:"zoom-size",reflect:!0})],_.prototype,"zoomButtonSize",1),S([t({type:Boolean})],_.prototype,"showFloorSelector",1),S([t({type:String})],_.prototype,"floorSelectorPosition",1),S([t({type:Boolean})],_.prototype,"floorSelectorDisabled",1),_=S([c("map-view-with-modal")],_);export{_ as M};
|
|
77
|
-
//# sourceMappingURL=map-view-with-modal-
|
|
77
|
+
//# sourceMappingURL=map-view-with-modal-empaZwqw.js.map
|