@mapvx/web-components 0.0.40 → 0.0.42
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-IxfHu4oh.cjs → base-floor-selector-CI6AJqe_.cjs} +2 -2
- package/dist/cjs/{class-map-Cm4I2w3c.cjs → class-map-KMSfgH43.cjs} +2 -2
- package/dist/cjs/{compact-floor-selector-CRuQn5uu.cjs → compact-floor-selector-D8x_OiE6.cjs} +2 -2
- package/dist/cjs/{consume-DS1Na2Go.cjs → consume-XCC5o-eZ.cjs} +2 -2
- package/dist/cjs/{custom-map-DMoPIh8I.cjs → custom-map-5vaHl4Sn.cjs} +3 -3
- package/dist/cjs/{floor-selector-CIDjMBE-.cjs → floor-selector-BazXyZTS.cjs} +2 -2
- package/dist/cjs/{lazy-load-BT4OdfmM.cjs → lazy-load-adpISPJL.cjs} +2 -2
- package/dist/cjs/map-view-with-modal.cjs +1 -1
- package/dist/cjs/{qr-modal-BLB8DQha.cjs → qr-modal-BkmkvvKD.cjs} +2 -2
- package/dist/cjs/{route-options-DfXapuF0.cjs → route-options-DXuN5owb.cjs} +2 -2
- package/dist/cjs/route-view-totems.cjs +3 -3
- package/dist/es/assets/{compact-floor-selector-cexi3UU4.js → compact-floor-selector-BVF9pPKo.js} +2 -2
- package/dist/es/assets/{components-BTUDqdGu.js → components-9th9lb7v.js} +5 -5
- package/dist/es/assets/{map-view-with-modal-Ce0sXJk-.js → map-view-with-modal-DmQa3IAV.js} +2 -2
- package/dist/es/assets/{route-view-totems-Bk24ng3y.js → route-view-totems-LDoUrJDW.js} +10 -10
- package/dist/es/assets/{utils-BfbEjR4m.js → utils-DPoAOsZP.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 +18 -18
- package/dist/iife/route-view-totems.js +12 -12
- package/package.json +3 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./lazy-load-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./lazy-load-adpISPJL.cjs");var t,o,r,a,i,l,s,n,c,p=Object.defineProperty,d=Object.getOwnPropertyDescriptor,h=e=>{throw TypeError(e)},m=(e,t,o,r)=>{for(var a,i=r>1?void 0:r?d(t,o):t,l=e.length-1;l>=0;l--)(a=e[l])&&(i=(r?a(t,o,i):a(i))||i);return r&&i&&p(t,o,i),i},v=(e,t,o)=>t.has(e)||h("Cannot "+o),f=(e,t,o)=>(v(e,t,"read from private field"),o?o.call(e):t.get(e)),w=(e,t,o)=>t.has(e)?h("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o),x=(e,t,o,r)=>(v(e,t,"write to private field"),t.set(e,o),o);exports.MapViewWithModal=class extends e.i{constructor(){super(...arguments),w(this,t,""),w(this,o,""),w(this,r,"es"),w(this,a,""),w(this,i,!1),w(this,l,"normal"),w(this,s,!0),w(this,n,"top-left"),w(this,c,!1),this._swPath="/mvx-tiles-sw.js",this._swScope="/",this.sdkController=new e.SDKController(this),this.analyticsController=e.AnalyticsController.getInstance(),this.currentFloorId=""}get apiKey(){return f(this,t)}set apiKey(e){x(this,t,e)}get parentPlaceId(){return f(this,o)}set parentPlaceId(e){x(this,o,e)}get locale(){return f(this,r)}set locale(e){x(this,r,e)}get placeId(){return f(this,a)}set placeId(e){x(this,a,e)}get compactMode(){return f(this,i)}set compactMode(e){x(this,i,e)}get zoomButtonSize(){return f(this,l)}set zoomButtonSize(e){x(this,l,e)}get showFloorSelector(){return f(this,s)}set showFloorSelector(e){x(this,s,e)}get floorSelectorPosition(){return f(this,n)}set floorSelectorPosition(e){x(this,n,e)}get floorSelectorDisabled(){return f(this,c)}set floorSelectorDisabled(e){x(this,c,e)}async _loadComponents(){await Promise.all([e.loadCustomMap(),e.loadCompactFloorSelector()])}_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 t=this._loadComponents(),o=e.preloadMaplibreCss();await Promise.all([t,o]),this.analyticsController.initialize("map-view-with-modal"),e.RollbarController.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 e.b`
|
|
2
2
|
<div class="route-container" style="height: 100%; width: 100%; position: relative;">
|
|
3
3
|
<custom-map
|
|
4
4
|
class="map-container"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./consume-DS1Na2Go.cjs"),e=require("./lazy-load-BT4OdfmM.cjs"),n=require("./class-map-Cm4I2w3c.cjs");var r,o,i={};function s(){return o?r:(o=1,r=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var a,u={},c={};function l(){if(a)return c;let t;a=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 c.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},c.getSymbolTotalCodewords=function(t){return e[t]},c.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},c.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');t=e},c.isKanjiModeEnabled=function(){return void 0!==t},c.toSJIS=function(e){return t(e)},c}var f,d,h,g,p,w={};function m(){return f||(f=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,n){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(r){return n}}),w;var t}var y,E={};var v,C={};var A,B={};var M,I={};function b(){if(M)return I;M=1;const t=m(),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],n=[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 I.getBlocksCount=function(n,r){switch(r){case t.L:return e[4*(n-1)+0];case t.M:return e[4*(n-1)+1];case t.Q:return e[4*(n-1)+2];case t.H:return e[4*(n-1)+3];default:return}},I.getTotalCodewordsCount=function(e,r){switch(r){case t.L:return n[4*(e-1)+0];case t.M:return n[4*(e-1)+1];case t.Q:return n[4*(e-1)+2];case t.H:return n[4*(e-1)+3];default:return}},I}var P,T,N,R,x={},k={};function L(){return T||(T=1,function(t){const e=function(){if(P)return k;P=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let n=1;for(let r=0;r<255;r++)t[r]=n,e[n]=r,n<<=1,256&n&&(n^=285);for(let e=255;e<512;e++)t[e]=t[e-255]}(),k.log=function(t){if(t<1)throw new Error("log("+t+")");return e[t]},k.exp=function(e){return t[e]},k.mul=function(n,r){return 0===n||0===r?0:t[e[n]+e[r]]},k}();t.mul=function(t,n){const r=new Uint8Array(t.length+n.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<n.length;i++)r[o+i]^=e.mul(t[o],n[i]);return r},t.mod=function(t,n){let r=new Uint8Array(t);for(;r.length-n.length>=0;){const t=r[0];for(let i=0;i<n.length;i++)r[i]^=e.mul(n[i],t);let o=0;for(;o<r.length&&0===r[o];)o++;r=r.slice(o)}return r},t.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let o=0;o<n;o++)r=t.mul(r,new Uint8Array([1,e.exp(o)]));return r}}(x)),x}var U,S={},D={},_={};function F(){return U||(U=1,_.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),_}var z,H,q,j={};function J(){if(z)return j;z=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 n="(?:(?![A-Z0-9 $%*+\\-./:]|"+e+")(?:.|[\r\n]))+";j.KANJI=new RegExp(e,"g"),j.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),j.BYTE=new RegExp(n,"g"),j.NUMERIC=new RegExp(t,"g"),j.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const r=new RegExp("^"+e+"$"),o=new RegExp("^"+t+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return j.testKanji=function(t){return r.test(t)},j.testNumeric=function(t){return o.test(t)},j.testAlphanumeric=function(t){return i.test(t)},j}function K(){return H||(H=1,function(t){const e=F(),n=J();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,n){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!e.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?t.ccBits[0]:n<27?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(e){return n.testNumeric(e)?t.NUMERIC:n.testAlphanumeric(e)?t.ALPHANUMERIC:n.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,n){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(r){return n}}}(D)),D}function Y(){return q||(q=1,function(t){const e=l(),n=b(),r=m(),o=K(),i=F(),s=e.getBCHDigit(7973);function a(t,e){return o.getCharCountIndicator(t,e)+4}function u(t,e){let n=0;return t.forEach(function(t){const r=a(t.mode,e);n+=r+t.getBitsLength()}),n}t.from=function(t,e){return i.isValid(t)?parseInt(t,10):e},t.getCapacity=function(t,r,s){if(!i.isValid(t))throw new Error("Invalid QR Code version");void 0===s&&(s=o.BYTE);const u=8*(e.getSymbolTotalCodewords(t)-n.getTotalCodewordsCount(t,r));if(s===o.MIXED)return u;const c=u-a(s,t);switch(s){case o.NUMERIC:return Math.floor(c/10*3);case o.ALPHANUMERIC:return Math.floor(c/11*2);case o.KANJI:return Math.floor(c/13);case o.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let i;const s=r.from(n,r.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(u(e,r)<=t.getCapacity(r,n,o.MIXED))return r}(e,s);if(0===e.length)return 1;i=e[0]}else i=e;return function(e,n,r){for(let o=1;o<=40;o++)if(n<=t.getCapacity(o,r,e))return o}(i.mode,i.getLength(),s)},t.getEncodedBits=function(t){if(!i.isValid(t)||t<7)throw new Error("Invalid QR Code version");let n=t<<12;for(;e.getBCHDigit(n)-s>=0;)n^=7973<<e.getBCHDigit(n)-s;return t<<12|n}}(S)),S}var O,Q={};var V,$,Z,X,W,G,tt,et,nt={};var rt,ot,it,st={exports:{}};function at(){return rt||(rt=1,function(t){var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var s,a,u,c,l,f,d,h=e.PriorityQueue.make();for(h.push(n,0);!h.empty();)for(u in a=(s=h.pop()).value,c=s.cost,l=t[a]||{})l.hasOwnProperty(u)&&(f=c+l[u],d=i[u],(void 0===i[u]||d>f)&&(i[u]=f,h.push(u,f),o[u]=a));if(void 0!==r&&void 0===i[r]){var g=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(g)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e}(st)),st.exports}function ut(){return ot||(ot=1,function(t){const e=K(),n=function(){if($)return V;$=1;const t=K();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,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},V=e}(),r=function(){if(X)return Z;X=1;const t=K(),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 n(e){this.mode=t.ALPHANUMERIC,this.data=e}return n.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let r=45*e.indexOf(this.data[n]);r+=e.indexOf(this.data[n+1]),t.put(r,11)}this.data.length%2&&t.put(e.indexOf(this.data[n]),6)},Z=n}(),o=function(){if(G)return W;G=1;const t=K();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,n=this.data.length;e<n;e++)t.put(this.data[e],8)},W=e}(),i=function(){if(et)return tt;et=1;const t=K(),e=l();function n(e){this.mode=t.KANJI,this.data=e}return n.getBitsLength=function(t){return 13*t},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n;for(n=0;n<this.data.length;n++){let r=e.toSJIS(this.data[n]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13)}},tt=n}(),s=J(),a=l(),u=at();function c(t){return unescape(encodeURIComponent(t)).length}function f(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function d(t){const n=f(s.NUMERIC,e.NUMERIC,t),r=f(s.ALPHANUMERIC,e.ALPHANUMERIC,t);let o,i;a.isKanjiModeEnabled()?(o=f(s.BYTE,e.BYTE,t),i=f(s.KANJI,e.KANJI,t)):(o=f(s.BYTE_KANJI,e.BYTE,t),i=[]);return n.concat(r,o,i).sort(function(t,e){return t.index-e.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function h(t,s){switch(s){case e.NUMERIC:return n.getBitsLength(t);case e.ALPHANUMERIC:return r.getBitsLength(t);case e.KANJI:return i.getBitsLength(t);case e.BYTE:return o.getBitsLength(t)}}function g(t,s){let u;const c=e.getBestModeForData(t);if(u=e.from(s,c),u!==e.BYTE&&u.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+e.toString(u)+".\n Suggested mode is: "+e.toString(c));switch(u!==e.KANJI||a.isKanjiModeEnabled()||(u=e.BYTE),u){case e.NUMERIC:return new n(t);case e.ALPHANUMERIC:return new r(t);case e.KANJI:return new i(t);case e.BYTE:return new o(t)}}t.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(g(e,null)):e.data&&t.push(g(e.data,e.mode)),t},[])},t.fromString=function(n,r){const o=function(t){const n=[];for(let r=0;r<t.length;r++){const o=t[r];switch(o.mode){case e.NUMERIC:n.push([o,{data:o.data,mode:e.ALPHANUMERIC,length:o.length},{data:o.data,mode:e.BYTE,length:o.length}]);break;case e.ALPHANUMERIC:n.push([o,{data:o.data,mode:e.BYTE,length:o.length}]);break;case e.KANJI:n.push([o,{data:o.data,mode:e.BYTE,length:c(o.data)}]);break;case e.BYTE:n.push([{data:o.data,mode:e.BYTE,length:c(o.data)}])}}return n}(d(n,a.isKanjiModeEnabled())),i=function(t,n){const r={},o={start:{}};let i=["start"];for(let s=0;s<t.length;s++){const a=t[s],u=[];for(let t=0;t<a.length;t++){const c=a[t],l=""+s+t;u.push(l),r[l]={node:c,lastCount:0},o[l]={};for(let t=0;t<i.length;t++){const s=i[t];r[s]&&r[s].node.mode===c.mode?(o[s][l]=h(r[s].lastCount+c.length,c.mode)-h(r[s].lastCount,c.mode),r[s].lastCount+=c.length):(r[s]&&(r[s].lastCount=c.length),o[s][l]=h(c.length,c.mode)+4+e.getCharCountIndicator(c.mode,n))}}i=u}for(let e=0;e<i.length;e++)o[i[e]].end=0;return{map:o,table:r}}(o,r),s=u.find_path(i.map,"start","end"),l=[];for(let t=1;t<s.length-1;t++)l.push(i.table[s[t]].node);return t.fromArray(function(t){return t.reduce(function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[])}(l))},t.rawSplit=function(e){return t.fromArray(d(e,a.isKanjiModeEnabled()))}}(nt)),nt}function ct(){if(it)return u;it=1;const t=l(),e=m(),n=function(){if(h)return d;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 n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},d=t}(),r=function(){if(p)return g;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 p=1,t.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(t,e){return this.data[t*this.size+e]},t.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},t.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},g=t}(),o=(y||(y=1,function(t){const e=l().getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const n=Math.floor(t/7)+2,r=e(t),o=145===r?26:2*Math.ceil((r-13)/(2*n-2)),i=[r-7];for(let e=1;e<n-1;e++)i[e]=i[e-1]-o;return i.push(6),i.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}}(E)),E),i=function(){if(v)return C;v=1;const t=l().getSymbolSize;return C.getPositions=function(e){const n=t(e);return[[0,0],[n-7,0],[0,n-7]]},C}(),s=(A||(A=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e=3,n=3,r=40,o=10;function i(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%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 n=t.size;let r=0,o=0,i=0,s=null,a=null;for(let u=0;u<n;u++){o=i=0,s=a=null;for(let c=0;c<n;c++){let n=t.get(u,c);n===s?o++:(o>=5&&(r+=e+(o-5)),s=n,o=1),n=t.get(c,u),n===a?i++:(i>=5&&(r+=e+(i-5)),a=n,i=1)}o>=5&&(r+=e+(o-5)),i>=5&&(r+=e+(i-5))}return r},t.getPenaltyN2=function(t){const e=t.size;let r=0;for(let n=0;n<e-1;n++)for(let o=0;o<e-1;o++){const e=t.get(n,o)+t.get(n,o+1)+t.get(n+1,o)+t.get(n+1,o+1);4!==e&&0!==e||r++}return r*n},t.getPenaltyN3=function(t){const e=t.size;let n=0,o=0,i=0;for(let r=0;r<e;r++){o=i=0;for(let s=0;s<e;s++)o=o<<1&2047|t.get(r,s),s>=10&&(1488===o||93===o)&&n++,i=i<<1&2047|t.get(s,r),s>=10&&(1488===i||93===i)&&n++}return n*r},t.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return Math.abs(Math.ceil(100*e/n/5)-10)*o},t.applyMask=function(t,e){const n=e.size;for(let r=0;r<n;r++)for(let o=0;o<n;o++)e.isReserved(o,r)||e.xor(o,r,i(t,o,r))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let o=0,i=1/0;for(let s=0;s<r;s++){n(s),t.applyMask(s,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(s,e),r<i&&(i=r,o=s)}return o}}(B)),B),a=b(),c=function(){if(R)return N;R=1;const t=L();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 n=new Uint8Array(e.length+this.degree);n.set(e);const r=t.mod(n,this.genPoly),o=this.degree-r.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(r,o),t}return r},N=e}(),f=Y(),w=function(){if(O)return Q;O=1;const t=l(),e=t.getBCHDigit(1335);return Q.getEncodedBits=function(n,r){const o=n.bit<<3|r;let i=o<<10;for(;t.getBCHDigit(i)-e>=0;)i^=1335<<t.getBCHDigit(i)-e;return 21522^(o<<10|i)},Q}(),M=K(),I=ut();function P(t,e,n){const r=t.size,o=w.getEncodedBits(e,n);let i,s;for(i=0;i<15;i++)s=1==(o>>i&1),i<6?t.set(i,8,s,!0):i<8?t.set(i+1,8,s,!0):t.set(r-15+i,8,s,!0),i<8?t.set(8,r-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(r-8,8,1,!0)}function T(e,r,o){const i=new n;o.forEach(function(t){i.put(t.mode.bit,4),i.put(t.getLength(),M.getCharCountIndicator(t.mode,e)),t.write(i)});const s=8*(t.getSymbolTotalCodewords(e)-a.getTotalCodewordsCount(e,r));for(i.getLengthInBits()+4<=s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const u=(s-i.getLengthInBits())/8;for(let t=0;t<u;t++)i.put(t%2?17:236,8);return function(e,n,r){const o=t.getSymbolTotalCodewords(n),i=a.getTotalCodewordsCount(n,r),s=o-i,u=a.getBlocksCount(n,r),l=o%u,f=u-l,d=Math.floor(o/u),h=Math.floor(s/u),g=h+1,p=d-h,w=new c(p);let m=0;const y=new Array(u),E=new Array(u);let v=0;const C=new Uint8Array(e.buffer);for(let t=0;t<u;t++){const e=t<f?h:g;y[t]=C.slice(m,m+e),E[t]=w.encode(y[t]),m+=e,v=Math.max(v,e)}const A=new Uint8Array(o);let B,M,I=0;for(B=0;B<v;B++)for(M=0;M<u;M++)B<y[M].length&&(A[I++]=y[M][B]);for(B=0;B<p;B++)for(M=0;M<u;M++)A[I++]=E[M][B];return A}(i,e,r)}function x(e,n,a,u){let c;if(Array.isArray(e))c=I.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let t=n;if(!t){const n=I.rawSplit(e);t=f.getBestVersionForData(n,a)}c=I.fromString(e,t||40)}}const l=f.getBestVersionForData(c,a);if(!l)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<l)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+l+".\n")}else n=l;const d=T(n,a,c),h=t.getSymbolSize(n),g=new r(h);return function(t,e){const n=t.size,r=i.getPositions(e);for(let o=0;o<r.length;o++){const e=r[o][0],i=r[o][1];for(let r=-1;r<=7;r++)if(!(e+r<=-1||n<=e+r))for(let o=-1;o<=7;o++)i+o<=-1||n<=i+o||(r>=0&&r<=6&&(0===o||6===o)||o>=0&&o<=6&&(0===r||6===r)||r>=2&&r<=4&&o>=2&&o<=4?t.set(e+r,i+o,!0,!0):t.set(e+r,i+o,!1,!0))}}(g,n),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(g),function(t,e){const n=o.getPositions(e);for(let r=0;r<n.length;r++){const e=n[r][0],o=n[r][1];for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)-2===n||2===n||-2===r||2===r||0===n&&0===r?t.set(e+n,o+r,!0,!0):t.set(e+n,o+r,!1,!0)}}(g,n),P(g,a,0),n>=7&&function(t,e){const n=t.size,r=f.getEncodedBits(e);let o,i,s;for(let a=0;a<18;a++)o=Math.floor(a/3),i=a%3+n-8-3,s=1==(r>>a&1),t.set(o,i,s,!0),t.set(i,o,s,!0)}(g,n),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,s=0;for(let a=n-1;a>0;a-=2)for(6===a&&a--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,a-n)){let r=!1;s<e.length&&(r=1==(e[s]>>>i&1)),t.set(o,a-n,r),i--,-1===i&&(s++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(g,d),isNaN(u)&&(u=s.getBestMask(g,P.bind(null,g,a))),s.applyMask(u,g),P(g,a,u),{modules:g,version:n,errorCorrectionLevel:a,maskPattern:u,segments:c}}return u.create=function(n,r){if(void 0===n||""===n)throw new Error("No input text");let o,i,a=e.M;return void 0!==r&&(a=e.from(r.errorCorrectionLevel,e.M),o=f.from(r.version),i=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),x(n,o,a,i)},u}var lt,ft,dt={},ht={};function gt(){return lt||(lt=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 n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});const n=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:n,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,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const o=n.modules.size,i=n.modules.data,s=t.getScale(o,r),a=Math.floor((o+2*r.margin)*s),u=r.margin*s,c=[r.color.light,r.color.dark];for(let t=0;t<a;t++)for(let n=0;n<a;n++){let l=4*(t*a+n),f=r.color.light;if(t>=u&&n>=u&&t<a-u&&n<a-u){f=c[i[Math.floor((t-u)/s)*o+Math.floor((n-u)/s)]?1:0]}e[l++]=f.r,e[l++]=f.g,e[l++]=f.b,e[l]=f.a}}}(ht)),ht}function pt(){return ft||(ft=1,function(t){const e=gt();t.render=function(t,n,r){let o=r,i=n;void 0!==o||n&&n.getContext||(o=n,n=void 0),n||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=e.getOptions(o);const s=e.getImageWidth(t.modules.size,o),a=i.getContext("2d"),u=a.createImageData(s,s);return e.qrToImageData(u.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(a,i,s),a.putImageData(u,0,0),i},t.renderToDataURL=function(e,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=t.render(e,n,o),s=o.type||"image/png",a=o.rendererOpts||{};return i.toDataURL(s,a.quality)}}(dt)),dt}var wt,mt,yt={};function Et(){if(wt)return yt;wt=1;const t=gt();function e(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function n(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}return yt.render=function(r,o,i){const s=t.getOptions(o),a=r.modules.size,u=r.modules.data,c=a+2*s.margin,l=s.color.light.a?"<path "+e(s.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",f="<path "+e(s.color.dark,"stroke")+' d="'+function(t,e,r){let o="",i=0,s=!1,a=0;for(let u=0;u<t.length;u++){const c=Math.floor(u%e),l=Math.floor(u/e);c||s||(s=!0),t[u]?(a++,u>0&&c>0&&t[u-1]||(o+=s?n("M",c+r,.5+l+r):n("m",i,0),i=0,s=!1),c+1<e&&t[u+1]||(o+=n("h",a),a=0)):i++}return o}(u,a,s.margin)+'"/>',d='viewBox="0 0 '+c+" "+c+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+d+' shape-rendering="crispEdges">'+l+f+"</svg>\n";return"function"==typeof i&&i(null,h),h},yt}var vt=function(){if(mt)return i;mt=1;const t=s(),e=ct(),n=pt(),r=Et();function o(n,r,o,i,s){const a=[].slice.call(arguments,1),u=a.length,c="function"==typeof a[u-1];if(!c&&!t())throw new Error("Callback required as last argument");if(!c){if(u<1)throw new Error("Too few arguments provided");return 1===u?(o=r,r=i=void 0):2!==u||r.getContext||(i=o,o=r,r=void 0),new Promise(function(t,s){try{const s=e.create(o,i);t(n(s,r,i))}catch(a){s(a)}})}if(u<2)throw new Error("Too few arguments provided");2===u?(s=o,o=r,r=i=void 0):3===u&&(r.getContext&&void 0===s?(s=i,i=void 0):(s=i,i=o,o=r,r=void 0));try{const t=e.create(o,i);s(null,n(t,r,i))}catch(l){s(l)}}return i.create=e.create,i.toCanvas=o.bind(null,n.render),i.toDataURL=o.bind(null,n.renderToDataURL),i.toString=o.bind(null,function(t,e,n){return r.render(t,n)}),i}();var Ct=Object.defineProperty,At=Object.getOwnPropertyDescriptor,Bt=(t,e,n,r)=>{for(var o,i=r>1?void 0:r?At(e,n):e,s=t.length-1;s>=0;s--)(o=t[s])&&(i=(r?o(e,n,i):o(i))||i);return r&&i&&Ct(e,n,i),i};exports.QRModal=class extends e.i{updated(){const{originId:t,destinationId:n,generalConfig:r}=this.sdkData??{};if((t!==this.lastOriginId||n!==this.lastDestinationId)&&t&&n&&r){this.lastOriginId=t,this.lastDestinationId=n;const{baseUrl:o}=r,i=`${o}/?origin=${t}&destination=${n}&utm_source=qr-totem&utm_content=route&utm_referrer=totem`,s={errorCorrectionLevel:"M",type:"image/webp",margin:1,width:150};vt.toDataURL(i,s).then(r=>{const o=this.shadowRoot?.getElementById("qr");o&&o instanceof HTMLImageElement&&(o.src=r,e.AnalyticsController.getInstance().trackEvent("qr_modal_displayed",{origin_id:t,destination_id:n,qr_url:i}))})}}render(){const{cameraInitialized:t}=this.sdkData??{};return e.b`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./consume-XCC5o-eZ.cjs"),e=require("./lazy-load-adpISPJL.cjs"),n=require("./class-map-KMSfgH43.cjs");var r,o,i={};function s(){return o?r:(o=1,r=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var a,u={},c={};function l(){if(a)return c;let t;a=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 c.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},c.getSymbolTotalCodewords=function(t){return e[t]},c.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},c.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');t=e},c.isKanjiModeEnabled=function(){return void 0!==t},c.toSJIS=function(e){return t(e)},c}var f,d,h,g,p,w={};function m(){return f||(f=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,n){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(r){return n}}),w;var t}var y,E={};var v,C={};var A,B={};var M,I={};function b(){if(M)return I;M=1;const t=m(),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],n=[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 I.getBlocksCount=function(n,r){switch(r){case t.L:return e[4*(n-1)+0];case t.M:return e[4*(n-1)+1];case t.Q:return e[4*(n-1)+2];case t.H:return e[4*(n-1)+3];default:return}},I.getTotalCodewordsCount=function(e,r){switch(r){case t.L:return n[4*(e-1)+0];case t.M:return n[4*(e-1)+1];case t.Q:return n[4*(e-1)+2];case t.H:return n[4*(e-1)+3];default:return}},I}var P,T,N,R,x={},k={};function L(){return T||(T=1,function(t){const e=function(){if(P)return k;P=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let n=1;for(let r=0;r<255;r++)t[r]=n,e[n]=r,n<<=1,256&n&&(n^=285);for(let e=255;e<512;e++)t[e]=t[e-255]}(),k.log=function(t){if(t<1)throw new Error("log("+t+")");return e[t]},k.exp=function(e){return t[e]},k.mul=function(n,r){return 0===n||0===r?0:t[e[n]+e[r]]},k}();t.mul=function(t,n){const r=new Uint8Array(t.length+n.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<n.length;i++)r[o+i]^=e.mul(t[o],n[i]);return r},t.mod=function(t,n){let r=new Uint8Array(t);for(;r.length-n.length>=0;){const t=r[0];for(let i=0;i<n.length;i++)r[i]^=e.mul(n[i],t);let o=0;for(;o<r.length&&0===r[o];)o++;r=r.slice(o)}return r},t.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let o=0;o<n;o++)r=t.mul(r,new Uint8Array([1,e.exp(o)]));return r}}(x)),x}var U,S={},D={},_={};function F(){return U||(U=1,_.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),_}var z,H,q,j={};function J(){if(z)return j;z=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 n="(?:(?![A-Z0-9 $%*+\\-./:]|"+e+")(?:.|[\r\n]))+";j.KANJI=new RegExp(e,"g"),j.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),j.BYTE=new RegExp(n,"g"),j.NUMERIC=new RegExp(t,"g"),j.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const r=new RegExp("^"+e+"$"),o=new RegExp("^"+t+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return j.testKanji=function(t){return r.test(t)},j.testNumeric=function(t){return o.test(t)},j.testAlphanumeric=function(t){return i.test(t)},j}function K(){return H||(H=1,function(t){const e=F(),n=J();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,n){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!e.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?t.ccBits[0]:n<27?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(e){return n.testNumeric(e)?t.NUMERIC:n.testAlphanumeric(e)?t.ALPHANUMERIC:n.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,n){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(r){return n}}}(D)),D}function Y(){return q||(q=1,function(t){const e=l(),n=b(),r=m(),o=K(),i=F(),s=e.getBCHDigit(7973);function a(t,e){return o.getCharCountIndicator(t,e)+4}function u(t,e){let n=0;return t.forEach(function(t){const r=a(t.mode,e);n+=r+t.getBitsLength()}),n}t.from=function(t,e){return i.isValid(t)?parseInt(t,10):e},t.getCapacity=function(t,r,s){if(!i.isValid(t))throw new Error("Invalid QR Code version");void 0===s&&(s=o.BYTE);const u=8*(e.getSymbolTotalCodewords(t)-n.getTotalCodewordsCount(t,r));if(s===o.MIXED)return u;const c=u-a(s,t);switch(s){case o.NUMERIC:return Math.floor(c/10*3);case o.ALPHANUMERIC:return Math.floor(c/11*2);case o.KANJI:return Math.floor(c/13);case o.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let i;const s=r.from(n,r.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(u(e,r)<=t.getCapacity(r,n,o.MIXED))return r}(e,s);if(0===e.length)return 1;i=e[0]}else i=e;return function(e,n,r){for(let o=1;o<=40;o++)if(n<=t.getCapacity(o,r,e))return o}(i.mode,i.getLength(),s)},t.getEncodedBits=function(t){if(!i.isValid(t)||t<7)throw new Error("Invalid QR Code version");let n=t<<12;for(;e.getBCHDigit(n)-s>=0;)n^=7973<<e.getBCHDigit(n)-s;return t<<12|n}}(S)),S}var O,Q={};var V,$,Z,X,W,G,tt,et,nt={};var rt,ot,it,st={exports:{}};function at(){return rt||(rt=1,function(t){var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var s,a,u,c,l,f,d,h=e.PriorityQueue.make();for(h.push(n,0);!h.empty();)for(u in a=(s=h.pop()).value,c=s.cost,l=t[a]||{})l.hasOwnProperty(u)&&(f=c+l[u],d=i[u],(void 0===i[u]||d>f)&&(i[u]=f,h.push(u,f),o[u]=a));if(void 0!==r&&void 0===i[r]){var g=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(g)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e}(st)),st.exports}function ut(){return ot||(ot=1,function(t){const e=K(),n=function(){if($)return V;$=1;const t=K();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,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},V=e}(),r=function(){if(X)return Z;X=1;const t=K(),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 n(e){this.mode=t.ALPHANUMERIC,this.data=e}return n.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let r=45*e.indexOf(this.data[n]);r+=e.indexOf(this.data[n+1]),t.put(r,11)}this.data.length%2&&t.put(e.indexOf(this.data[n]),6)},Z=n}(),o=function(){if(G)return W;G=1;const t=K();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,n=this.data.length;e<n;e++)t.put(this.data[e],8)},W=e}(),i=function(){if(et)return tt;et=1;const t=K(),e=l();function n(e){this.mode=t.KANJI,this.data=e}return n.getBitsLength=function(t){return 13*t},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n;for(n=0;n<this.data.length;n++){let r=e.toSJIS(this.data[n]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13)}},tt=n}(),s=J(),a=l(),u=at();function c(t){return unescape(encodeURIComponent(t)).length}function f(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function d(t){const n=f(s.NUMERIC,e.NUMERIC,t),r=f(s.ALPHANUMERIC,e.ALPHANUMERIC,t);let o,i;a.isKanjiModeEnabled()?(o=f(s.BYTE,e.BYTE,t),i=f(s.KANJI,e.KANJI,t)):(o=f(s.BYTE_KANJI,e.BYTE,t),i=[]);return n.concat(r,o,i).sort(function(t,e){return t.index-e.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function h(t,s){switch(s){case e.NUMERIC:return n.getBitsLength(t);case e.ALPHANUMERIC:return r.getBitsLength(t);case e.KANJI:return i.getBitsLength(t);case e.BYTE:return o.getBitsLength(t)}}function g(t,s){let u;const c=e.getBestModeForData(t);if(u=e.from(s,c),u!==e.BYTE&&u.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+e.toString(u)+".\n Suggested mode is: "+e.toString(c));switch(u!==e.KANJI||a.isKanjiModeEnabled()||(u=e.BYTE),u){case e.NUMERIC:return new n(t);case e.ALPHANUMERIC:return new r(t);case e.KANJI:return new i(t);case e.BYTE:return new o(t)}}t.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(g(e,null)):e.data&&t.push(g(e.data,e.mode)),t},[])},t.fromString=function(n,r){const o=function(t){const n=[];for(let r=0;r<t.length;r++){const o=t[r];switch(o.mode){case e.NUMERIC:n.push([o,{data:o.data,mode:e.ALPHANUMERIC,length:o.length},{data:o.data,mode:e.BYTE,length:o.length}]);break;case e.ALPHANUMERIC:n.push([o,{data:o.data,mode:e.BYTE,length:o.length}]);break;case e.KANJI:n.push([o,{data:o.data,mode:e.BYTE,length:c(o.data)}]);break;case e.BYTE:n.push([{data:o.data,mode:e.BYTE,length:c(o.data)}])}}return n}(d(n,a.isKanjiModeEnabled())),i=function(t,n){const r={},o={start:{}};let i=["start"];for(let s=0;s<t.length;s++){const a=t[s],u=[];for(let t=0;t<a.length;t++){const c=a[t],l=""+s+t;u.push(l),r[l]={node:c,lastCount:0},o[l]={};for(let t=0;t<i.length;t++){const s=i[t];r[s]&&r[s].node.mode===c.mode?(o[s][l]=h(r[s].lastCount+c.length,c.mode)-h(r[s].lastCount,c.mode),r[s].lastCount+=c.length):(r[s]&&(r[s].lastCount=c.length),o[s][l]=h(c.length,c.mode)+4+e.getCharCountIndicator(c.mode,n))}}i=u}for(let e=0;e<i.length;e++)o[i[e]].end=0;return{map:o,table:r}}(o,r),s=u.find_path(i.map,"start","end"),l=[];for(let t=1;t<s.length-1;t++)l.push(i.table[s[t]].node);return t.fromArray(function(t){return t.reduce(function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[])}(l))},t.rawSplit=function(e){return t.fromArray(d(e,a.isKanjiModeEnabled()))}}(nt)),nt}function ct(){if(it)return u;it=1;const t=l(),e=m(),n=function(){if(h)return d;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 n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},d=t}(),r=function(){if(p)return g;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 p=1,t.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(t,e){return this.data[t*this.size+e]},t.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},t.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},g=t}(),o=(y||(y=1,function(t){const e=l().getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const n=Math.floor(t/7)+2,r=e(t),o=145===r?26:2*Math.ceil((r-13)/(2*n-2)),i=[r-7];for(let e=1;e<n-1;e++)i[e]=i[e-1]-o;return i.push(6),i.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}}(E)),E),i=function(){if(v)return C;v=1;const t=l().getSymbolSize;return C.getPositions=function(e){const n=t(e);return[[0,0],[n-7,0],[0,n-7]]},C}(),s=(A||(A=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e=3,n=3,r=40,o=10;function i(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%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 n=t.size;let r=0,o=0,i=0,s=null,a=null;for(let u=0;u<n;u++){o=i=0,s=a=null;for(let c=0;c<n;c++){let n=t.get(u,c);n===s?o++:(o>=5&&(r+=e+(o-5)),s=n,o=1),n=t.get(c,u),n===a?i++:(i>=5&&(r+=e+(i-5)),a=n,i=1)}o>=5&&(r+=e+(o-5)),i>=5&&(r+=e+(i-5))}return r},t.getPenaltyN2=function(t){const e=t.size;let r=0;for(let n=0;n<e-1;n++)for(let o=0;o<e-1;o++){const e=t.get(n,o)+t.get(n,o+1)+t.get(n+1,o)+t.get(n+1,o+1);4!==e&&0!==e||r++}return r*n},t.getPenaltyN3=function(t){const e=t.size;let n=0,o=0,i=0;for(let r=0;r<e;r++){o=i=0;for(let s=0;s<e;s++)o=o<<1&2047|t.get(r,s),s>=10&&(1488===o||93===o)&&n++,i=i<<1&2047|t.get(s,r),s>=10&&(1488===i||93===i)&&n++}return n*r},t.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return Math.abs(Math.ceil(100*e/n/5)-10)*o},t.applyMask=function(t,e){const n=e.size;for(let r=0;r<n;r++)for(let o=0;o<n;o++)e.isReserved(o,r)||e.xor(o,r,i(t,o,r))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let o=0,i=1/0;for(let s=0;s<r;s++){n(s),t.applyMask(s,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(s,e),r<i&&(i=r,o=s)}return o}}(B)),B),a=b(),c=function(){if(R)return N;R=1;const t=L();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 n=new Uint8Array(e.length+this.degree);n.set(e);const r=t.mod(n,this.genPoly),o=this.degree-r.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(r,o),t}return r},N=e}(),f=Y(),w=function(){if(O)return Q;O=1;const t=l(),e=t.getBCHDigit(1335);return Q.getEncodedBits=function(n,r){const o=n.bit<<3|r;let i=o<<10;for(;t.getBCHDigit(i)-e>=0;)i^=1335<<t.getBCHDigit(i)-e;return 21522^(o<<10|i)},Q}(),M=K(),I=ut();function P(t,e,n){const r=t.size,o=w.getEncodedBits(e,n);let i,s;for(i=0;i<15;i++)s=1==(o>>i&1),i<6?t.set(i,8,s,!0):i<8?t.set(i+1,8,s,!0):t.set(r-15+i,8,s,!0),i<8?t.set(8,r-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(r-8,8,1,!0)}function T(e,r,o){const i=new n;o.forEach(function(t){i.put(t.mode.bit,4),i.put(t.getLength(),M.getCharCountIndicator(t.mode,e)),t.write(i)});const s=8*(t.getSymbolTotalCodewords(e)-a.getTotalCodewordsCount(e,r));for(i.getLengthInBits()+4<=s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const u=(s-i.getLengthInBits())/8;for(let t=0;t<u;t++)i.put(t%2?17:236,8);return function(e,n,r){const o=t.getSymbolTotalCodewords(n),i=a.getTotalCodewordsCount(n,r),s=o-i,u=a.getBlocksCount(n,r),l=o%u,f=u-l,d=Math.floor(o/u),h=Math.floor(s/u),g=h+1,p=d-h,w=new c(p);let m=0;const y=new Array(u),E=new Array(u);let v=0;const C=new Uint8Array(e.buffer);for(let t=0;t<u;t++){const e=t<f?h:g;y[t]=C.slice(m,m+e),E[t]=w.encode(y[t]),m+=e,v=Math.max(v,e)}const A=new Uint8Array(o);let B,M,I=0;for(B=0;B<v;B++)for(M=0;M<u;M++)B<y[M].length&&(A[I++]=y[M][B]);for(B=0;B<p;B++)for(M=0;M<u;M++)A[I++]=E[M][B];return A}(i,e,r)}function x(e,n,a,u){let c;if(Array.isArray(e))c=I.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let t=n;if(!t){const n=I.rawSplit(e);t=f.getBestVersionForData(n,a)}c=I.fromString(e,t||40)}}const l=f.getBestVersionForData(c,a);if(!l)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<l)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+l+".\n")}else n=l;const d=T(n,a,c),h=t.getSymbolSize(n),g=new r(h);return function(t,e){const n=t.size,r=i.getPositions(e);for(let o=0;o<r.length;o++){const e=r[o][0],i=r[o][1];for(let r=-1;r<=7;r++)if(!(e+r<=-1||n<=e+r))for(let o=-1;o<=7;o++)i+o<=-1||n<=i+o||(r>=0&&r<=6&&(0===o||6===o)||o>=0&&o<=6&&(0===r||6===r)||r>=2&&r<=4&&o>=2&&o<=4?t.set(e+r,i+o,!0,!0):t.set(e+r,i+o,!1,!0))}}(g,n),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(g),function(t,e){const n=o.getPositions(e);for(let r=0;r<n.length;r++){const e=n[r][0],o=n[r][1];for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)-2===n||2===n||-2===r||2===r||0===n&&0===r?t.set(e+n,o+r,!0,!0):t.set(e+n,o+r,!1,!0)}}(g,n),P(g,a,0),n>=7&&function(t,e){const n=t.size,r=f.getEncodedBits(e);let o,i,s;for(let a=0;a<18;a++)o=Math.floor(a/3),i=a%3+n-8-3,s=1==(r>>a&1),t.set(o,i,s,!0),t.set(i,o,s,!0)}(g,n),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,s=0;for(let a=n-1;a>0;a-=2)for(6===a&&a--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,a-n)){let r=!1;s<e.length&&(r=1==(e[s]>>>i&1)),t.set(o,a-n,r),i--,-1===i&&(s++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(g,d),isNaN(u)&&(u=s.getBestMask(g,P.bind(null,g,a))),s.applyMask(u,g),P(g,a,u),{modules:g,version:n,errorCorrectionLevel:a,maskPattern:u,segments:c}}return u.create=function(n,r){if(void 0===n||""===n)throw new Error("No input text");let o,i,a=e.M;return void 0!==r&&(a=e.from(r.errorCorrectionLevel,e.M),o=f.from(r.version),i=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),x(n,o,a,i)},u}var lt,ft,dt={},ht={};function gt(){return lt||(lt=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 n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});const n=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:n,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,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const o=n.modules.size,i=n.modules.data,s=t.getScale(o,r),a=Math.floor((o+2*r.margin)*s),u=r.margin*s,c=[r.color.light,r.color.dark];for(let t=0;t<a;t++)for(let n=0;n<a;n++){let l=4*(t*a+n),f=r.color.light;if(t>=u&&n>=u&&t<a-u&&n<a-u){f=c[i[Math.floor((t-u)/s)*o+Math.floor((n-u)/s)]?1:0]}e[l++]=f.r,e[l++]=f.g,e[l++]=f.b,e[l]=f.a}}}(ht)),ht}function pt(){return ft||(ft=1,function(t){const e=gt();t.render=function(t,n,r){let o=r,i=n;void 0!==o||n&&n.getContext||(o=n,n=void 0),n||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=e.getOptions(o);const s=e.getImageWidth(t.modules.size,o),a=i.getContext("2d"),u=a.createImageData(s,s);return e.qrToImageData(u.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(a,i,s),a.putImageData(u,0,0),i},t.renderToDataURL=function(e,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=t.render(e,n,o),s=o.type||"image/png",a=o.rendererOpts||{};return i.toDataURL(s,a.quality)}}(dt)),dt}var wt,mt,yt={};function Et(){if(wt)return yt;wt=1;const t=gt();function e(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function n(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}return yt.render=function(r,o,i){const s=t.getOptions(o),a=r.modules.size,u=r.modules.data,c=a+2*s.margin,l=s.color.light.a?"<path "+e(s.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",f="<path "+e(s.color.dark,"stroke")+' d="'+function(t,e,r){let o="",i=0,s=!1,a=0;for(let u=0;u<t.length;u++){const c=Math.floor(u%e),l=Math.floor(u/e);c||s||(s=!0),t[u]?(a++,u>0&&c>0&&t[u-1]||(o+=s?n("M",c+r,.5+l+r):n("m",i,0),i=0,s=!1),c+1<e&&t[u+1]||(o+=n("h",a),a=0)):i++}return o}(u,a,s.margin)+'"/>',d='viewBox="0 0 '+c+" "+c+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+d+' shape-rendering="crispEdges">'+l+f+"</svg>\n";return"function"==typeof i&&i(null,h),h},yt}var vt=function(){if(mt)return i;mt=1;const t=s(),e=ct(),n=pt(),r=Et();function o(n,r,o,i,s){const a=[].slice.call(arguments,1),u=a.length,c="function"==typeof a[u-1];if(!c&&!t())throw new Error("Callback required as last argument");if(!c){if(u<1)throw new Error("Too few arguments provided");return 1===u?(o=r,r=i=void 0):2!==u||r.getContext||(i=o,o=r,r=void 0),new Promise(function(t,s){try{const s=e.create(o,i);t(n(s,r,i))}catch(a){s(a)}})}if(u<2)throw new Error("Too few arguments provided");2===u?(s=o,o=r,r=i=void 0):3===u&&(r.getContext&&void 0===s?(s=i,i=void 0):(s=i,i=o,o=r,r=void 0));try{const t=e.create(o,i);s(null,n(t,r,i))}catch(l){s(l)}}return i.create=e.create,i.toCanvas=o.bind(null,n.render),i.toDataURL=o.bind(null,n.renderToDataURL),i.toString=o.bind(null,function(t,e,n){return r.render(t,n)}),i}();var Ct=Object.defineProperty,At=Object.getOwnPropertyDescriptor,Bt=(t,e,n,r)=>{for(var o,i=r>1?void 0:r?At(e,n):e,s=t.length-1;s>=0;s--)(o=t[s])&&(i=(r?o(e,n,i):o(i))||i);return r&&i&&Ct(e,n,i),i};exports.QRModal=class extends e.i{updated(){const{originId:t,destinationId:n,generalConfig:r}=this.sdkData??{};if((t!==this.lastOriginId||n!==this.lastDestinationId)&&t&&n&&r){this.lastOriginId=t,this.lastDestinationId=n;const{baseUrl:o}=r,i=`${o}/?origin=${t}&destination=${n}&utm_source=qr-totem&utm_content=route&utm_referrer=totem`,s={errorCorrectionLevel:"M",type:"image/webp",margin:1,width:150};vt.toDataURL(i,s).then(r=>{const o=this.shadowRoot?.getElementById("qr");o&&o instanceof HTMLImageElement&&(o.src=r,e.AnalyticsController.getInstance().trackEvent("qr_modal_displayed",{origin_id:t,destination_id:n,qr_url:i}))})}}render(){const{cameraInitialized:t}=this.sdkData??{};return e.b`
|
|
2
2
|
<div class=${n.e({card:!0,hidden:!t})}>
|
|
3
3
|
<div class="modal-content">
|
|
4
4
|
<div class="pin-container">
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
15
|
`}},exports.QRModal.styles=[e.r(":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}")],Bt([t.c({context:e.sdkContext,subscribe:!0})],exports.QRModal.prototype,"sdkData",2),exports.QRModal=Bt([e.t("qr-modal")],exports.QRModal);
|
|
16
|
-
//# sourceMappingURL=qr-modal-
|
|
16
|
+
//# sourceMappingURL=qr-modal-BkmkvvKD.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./consume-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./consume-XCC5o-eZ.cjs"),t=require("./lazy-load-adpISPJL.cjs");var i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=(e,t,s,r)=>{for(var n,a=r>1?void 0:r?o(t,s):t,c=e.length-1;c>=0;c--)(n=e[c])&&(a=(r?n(t,s,a):n(a))||a);return r&&a&&i(t,s,a),a};exports.RouteOptions=class extends t.i{constructor(){super(),this.assets=null,this._loadAssets()}async _loadAssets(){this.assets=await(async()=>{const[e,t,i,o,s,r]=await Promise.all([Promise.resolve().then(()=>require("./accessibility-DWoi6we_.cjs")),Promise.resolve().then(()=>require("./back_arrow-DNrh84z6.cjs")),Promise.resolve().then(()=>require("./icon-destination-point-C8Bl9rvO.cjs")),Promise.resolve().then(()=>require("./icon-origin-point-B0FLE42C.cjs")),Promise.resolve().then(()=>require("./repeat_icon-DBYc7GBB.cjs")),Promise.resolve().then(()=>require("./walking-CDbgxjU4.cjs"))]);return{accessibilityIcon:e.default,backIcon:t.default,destinationPoint:i.default,originPoint:o.default,repeatIcon:s.default,walkingIcon:r.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(){t.AnalyticsController.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 t.b``;const{destination:e,accessibleRoute:i,parentPlace:o,origin:s,route:r,isRouteAnimating:n,isLoading:a,loadingRoute:c,isNetworkError:l}=this.sdkData,d=i?this.assets?.accessibilityIcon:this.assets?.walkingIcon,p=e?.title??"",u=o?.innerFloors??[],f=(s&&"function"==typeof s.inFloor?s.inFloor(u):void 0)?.name??"",g=(e&&"function"==typeof e.inFloor?e.inFloor(u):void 0)?.name??"",h=n??!1;let b="";return r&&r.legs&&r.legs.length>0&&r.legs[0].distance&&(b=`• ${r.legs[0].distance.toFixed(0)} mts`),t.b`
|
|
2
2
|
<div class="route-panel">
|
|
3
3
|
<div class="flex flex-col h-full">
|
|
4
4
|
<div class="back-panel" @click=${this.handleBack}>
|
|
@@ -95,4 +95,4 @@
|
|
|
95
95
|
</div>
|
|
96
96
|
`:""}
|
|
97
97
|
`}},exports.RouteOptions.styles=[t.r(":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}")],s([e.c({context:t.sdkContext,subscribe:!0})],exports.RouteOptions.prototype,"sdkData",2),exports.RouteOptions=s([t.t("route-options")],exports.RouteOptions);
|
|
98
|
-
//# sourceMappingURL=route-options-
|
|
98
|
+
//# sourceMappingURL=route-options-DXuN5owb.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./lazy-load-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./lazy-load-adpISPJL.cjs");var e,i,n,o,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,r=t=>{throw TypeError(t)},d=(t,e,i,n)=>{for(var o,r=n>1?void 0:n?a(e,i):e,d=t.length-1;d>=0;d--)(o=t[d])&&(r=(n?o(e,i,r):o(r))||r);return n&&r&&s(e,i,r),r},l=(t,e,i)=>e.has(t)||r("Cannot "+i),h=(t,e,i)=>(l(t,e,"read from private field"),i?i.call(t):e.get(t)),c=(t,e,i)=>e.has(t)?r("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),p=(t,e,i,n)=>(l(t,e,"write to private field"),e.set(t,i),i);exports.RouteViewTotems=class extends t.i{constructor(){super(...arguments),this.styles=[t.i$1`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
height: 100%;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
background: #fff;
|
|
20
20
|
box-shadow: 0 0 24px #00000026;
|
|
21
21
|
}
|
|
22
|
-
`],
|
|
22
|
+
`],c(this,e,""),c(this,i,""),c(this,n,"es"),c(this,o,""),this._destinationId="",this._hasInitialized=!1,this._swPath="/mvx-tiles-sw.js",this._swScope="/",this.sdkController=new t.SDKController(this),this.analyticsController=t.AnalyticsController.getInstance(),this._customMapRef=null}get apiKey(){return h(this,e)}set apiKey(t){p(this,e,t)}get parentPlaceId(){return h(this,i)}set parentPlaceId(t){p(this,i,t)}get locale(){return h(this,n)}set locale(t){p(this,n,t)}get originId(){return h(this,o)}set originId(t){p(this,o,t)}get destinationId(){return this._destinationId}set destinationId(t){const e=this._destinationId;this._destinationId=t,e===t&&t&&this.originId&&this._hasInitialized&&queueMicrotask(()=>{this.sdkController.setOriginAndDestination(this.originId,t).then(()=>{this.sendEvent("destination_reloaded",{origin_id:this.originId,destination_id:t})})}),this.requestUpdate("destinationId",e)}async _loadComponents(){await Promise.all([t.loadCustomMap(),t.loadFloorSelector(),t.loadQrModal(),t.loadRouteOptions()])}_preloadApiRequests(){const t=this.apiKey||this.getAttribute("apiKey")||"",e=this.parentPlaceId||this.getAttribute("parentPlaceId")||"",i=this.locale||this.getAttribute("locale")||"es";if(!t||!e)return;const n=t=>{const e=`mvx-preload:${t}`;if(document.head.querySelector(`link[data-mvx-preload="${e}"]`))return;const i=document.createElement("link");i.rel="preload",i.as="fetch",i.href=t,i.crossOrigin="anonymous",i.setAttribute("fetchpriority","high"),i.setAttribute("data-mvx-preload",e),document.head.appendChild(i)},o="https://api.mapvx.com/sdk/",s=encodeURIComponent;n(`${o}v3/place?token=${s(t)}&place_id=${s(e)}&lang=${s(i)}`),n(`https://api.mapvx.com/api/configuration?token=${s(t)}&lang=${s(i)}&place_id=${s(e)}`),this.originId&&n(`${o}v3/place?token=${s(t)}&place_id=${s(this.originId)}&lang=${s(i)}`),this.destinationId&&n(`${o}v3/place?token=${s(t)}&place_id=${s(this.destinationId)}&lang=${s(i)}`)}async firstUpdated(){"serviceWorker"in navigator&&navigator.serviceWorker.register(this._swPath,{scope:this._swScope}).catch(()=>{});const e=this._loadComponents(),i=t.preloadMaplibreCss();await Promise.all([e,i]),this.analyticsController.initialize("route-view-totems"),t.RollbarController.initialize("route-view-totems"),this.sendEvent("initial_render"),this._hasInitialized=!0}sendEvent(t,e={}){const i=this.sdkController.getDestination(),n={...e,apiKey:this.apiKey,locale:this.locale,parentPlaceId:this.parentPlaceId,originId:this.originId,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,destinationName:i?.title,destinationId:i?.lazarilloId,destinationClientId:i?.clientId??this.destinationId,parentId:this.parentPlaceId??i?.parentId,institutionId:i?.parentInstitutionId};this.analyticsController.trackEvent(t,n)}_mapReadyHandler(){this.sendEvent("map_ready"),this.sdkController.setMapReady(!0)}_cameraInitializedHandler(){this.sdkController.setCameraInitialized(!0),this.sendEvent("view_loaded")}updated(t){if(this.apiKey&&this.locale&&this.parentPlaceId&&(t.has("apiKey")||t.has("locale")||t.has("parentPlaceId"))){const e=t.get("parentPlaceId");t.has("parentPlaceId")&&e!==this.parentPlaceId&&this.sdkController.clearParentPlace(),this._preloadApiRequests(),this.sdkController.prewarm(this.apiKey,this.locale,this.parentPlaceId,{originId:this.originId,destinationId:this.destinationId}),this.sdkController.initialize(this.apiKey,this.locale,this.parentPlaceId)}this.originId&&t.has("destinationId")&&this.sdkController.setOriginAndDestination(this.originId,this.destinationId).finally(()=>{this.sendEvent("set_origin_and_destination",{origin_id:this.originId,destination_id:this.destinationId})})}render(){return t.b`
|
|
23
23
|
<div class="route-container" data-testid="route-container" style="height: 100%; width: 100%;">
|
|
24
24
|
<custom-map
|
|
25
25
|
class="map-container"
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
<floor-selector data-testid="floor-selector" @floorChange=${this._updateFloorHandler}></floor-selector>
|
|
38
38
|
<route-options data-testid="route-options"></route-options>
|
|
39
39
|
</div>
|
|
40
|
-
`}_accessibilityChangeHandler(t){this.sdkController.setAccessibleRoute(t.detail),this.sendEvent("accessibility_change",{accessible:t.detail})}_repeatRouteHandler(){this.sdkController.repeatRoute(),this.sendEvent("route_repeat")}_generateRouteHandler(t){this.sdkController.generateRoute(),this.sendEvent("route_generate",t.detail)}_backHandler(){const t=this.sdkController.getDestination();this.sendEvent("back_navigation_triggered",{had_route:!!this.sdkController.getDestination(),from_destination_id:t?.lazarilloId,from_destination_name:t?.title}),this.destinationId="",this.originId="",this.sdkController.resetData()}_updateFloorHandler(t){const e=t.detail;this.sdkController.setFloor(e),this.sendEvent("floor_change",{floor_id:e})}_startRouteAnimationHandler(){this.sdkController.startRouteAnimation(),this.sendEvent("route_animation_start")}_routeAnimationFinishedHandler(){this.sdkController.routeAnimationFinished(),this.sendEvent("route_animation_finish")}_dismissRouteErrorHandler(){this.sdkController.clearRouteError()}async updateComponent(t){const e=this.destinationId;console.info("[MAP] updateComponent start",{params:t,previousDestinationId:e});try{const i=this._customMapRef||this.shadowRoot?.querySelector("custom-map"),
|
|
40
|
+
`}_accessibilityChangeHandler(t){this.sdkController.setAccessibleRoute(t.detail),this.sendEvent("accessibility_change",{accessible:t.detail})}_repeatRouteHandler(){this.sdkController.repeatRoute(),this.sendEvent("route_repeat")}_generateRouteHandler(t){this.sdkController.generateRoute(),this.sendEvent("route_generate",t.detail)}_backHandler(){const t=this.sdkController.getDestination();this.sendEvent("back_navigation_triggered",{had_route:!!this.sdkController.getDestination(),from_destination_id:t?.lazarilloId,from_destination_name:t?.title}),this.destinationId="",this.originId="",this.sdkController.resetData()}_updateFloorHandler(t){const e=t.detail;this.sdkController.setFloor(e),this.sendEvent("floor_change",{floor_id:e})}_startRouteAnimationHandler(){this.sdkController.startRouteAnimation(),this.sendEvent("route_animation_start")}_routeAnimationFinishedHandler(){this.sdkController.routeAnimationFinished(),this.sendEvent("route_animation_finish")}_dismissRouteErrorHandler(){this.sdkController.clearRouteError()}async updateComponent(t){const e=this.destinationId;console.info("[MAP] updateComponent start",{params:t,previousDestinationId:e});try{const i=this._customMapRef||this.shadowRoot?.querySelector("custom-map"),n=!t.originId&&!!t.destinationId;return i&&await i.clearMap(n,"Actualizando mapa..."),t.originId&&(this.originId=t.originId),void 0!==t.destinationId&&(this.destinationId=t.destinationId),t.floor&&this.sdkController.setFloor(t.floor),await this.updateComplete,this.originId&&this.destinationId&&await this.sdkController.setOriginAndDestination(this.originId,this.destinationId),console.info("[MAP] updateComponent complete",{previousDestinationId:e,newDestinationId:this.destinationId}),this.sendEvent("update_component",{previous_destination_id:e,new_destination_id:this.destinationId,new_origin_id:t.originId}),{success:!0,previousDestinationId:e,newDestinationId:this.destinationId}}catch(i){return console.error("[MAP] updateComponent error",i),{success:!1,error:i instanceof Error?i.message:"Unknown error",previousDestinationId:e,newDestinationId:this.destinationId}}}async clearMap(t=!0){const e=this._customMapRef||this.shadowRoot?.querySelector("custom-map");e&&await e.clearMap(t)}isLoading(){const t=this._customMapRef||this.shadowRoot?.querySelector("custom-map");return t?.isLoadingVisible()??!1}getMarkerVisibility(){const t=this._customMapRef||this.shadowRoot?.querySelector("custom-map");return t?.areMarkersVisible()??{originVisible:!1,destinationVisible:!1,bothVisible:!1}}connectedCallback(){super.connectedCallback(),this.addEventListener("accessibilityChange",this._accessibilityChangeHandler),this.addEventListener("repeatRoute",this._repeatRouteHandler),this.addEventListener("generateRoute",this._generateRouteHandler),this.addEventListener("back",this._backHandler),this.addEventListener("startRouteAnimation",this._startRouteAnimationHandler),this.addEventListener("routeAnimationFinished",this._routeAnimationFinishedHandler),this.addEventListener("dismissRouteError",this._dismissRouteErrorHandler)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("accessibilityChange",this._accessibilityChangeHandler),this.removeEventListener("repeatRoute",this._repeatRouteHandler),this.removeEventListener("generateRoute",this._generateRouteHandler),this.removeEventListener("back",this._backHandler),this.removeEventListener("startRouteAnimation",this._startRouteAnimationHandler),this.removeEventListener("routeAnimationFinished",this._routeAnimationFinishedHandler),this.removeEventListener("dismissRouteError",this._dismissRouteErrorHandler)}},e=new WeakMap,i=new WeakMap,n=new WeakMap,o=new WeakMap,d([t.n({type:String})],exports.RouteViewTotems.prototype,"apiKey",1),d([t.n({type:String})],exports.RouteViewTotems.prototype,"parentPlaceId",1),d([t.n({type:String})],exports.RouteViewTotems.prototype,"locale",1),d([t.n({type:String})],exports.RouteViewTotems.prototype,"originId",1),d([t.n({type:String,reflect:!0})],exports.RouteViewTotems.prototype,"destinationId",1),exports.RouteViewTotems=d([t.t("route-view-totems")],exports.RouteViewTotems);
|
|
41
41
|
//# sourceMappingURL=route-view-totems.cjs.map
|
package/dist/es/assets/{compact-floor-selector-cexi3UU4.js → compact-floor-selector-BVF9pPKo.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as o,i as r,n as e,t}from"./route-view-totems-
|
|
1
|
+
import{c as o,i as r,n as e,t}from"./route-view-totems-LDoUrJDW.js";import{B as s,e as l}from"./components-9th9lb7v.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-Bk24ng3y.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-
|
|
176
|
+
//# sourceMappingURL=compact-floor-selector-BVF9pPKo.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as t,c as e,r as o,i as n,n as i,d as r,t as s,E as a,A as l}from"./route-view-totems-
|
|
1
|
+
import{a as t,c as e,r as o,i as n,n as i,d as r,t as s,E as a,A as l}from"./route-view-totems-LDoUrJDW.js";import{R as c,M as d}from"./utils-DPoAOsZP.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2021 Google LLC
|
|
@@ -30,7 +30,7 @@ let h=class{constructor(t,e,o,n){if(this.subscribe=!1,this.provided=!1,this.valu
|
|
|
30
30
|
* Copyright 2022 Google LLC
|
|
31
31
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
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,y=Object.defineProperty,C=Object.getOwnPropertyDescriptor,k=t=>{throw TypeError(t)},E=(t,e,o,n)=>{for(var i,r=n>1?void 0:n?C(e,o):e,s=t.length-1;s>=0;s--)(i=t[s])&&(r=(n?i(e,o,r):i(r))||r);return n&&r&&y(e,o,r),r},M=(t,e,o)=>e.has(t)||k("Cannot "+o),z=(t,e,o)=>(M(t,e,"read from private field"),o?o.call(t):e.get(t)),A=(t,e,o)=>e.has(t)?k("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),I=(t,e,o,n)=>(M(t,e,"write to private field"),e.set(t,o),o);let R=class extends t{constructor(){super(),A(this,x,0),A(this,v,""),A(this,w,"Cargando..."),this.mapReady=!1,this._clearMapLock=!1,this._isCleared=!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){I(this,x,t)}get loadingIcon(){return z(this,v)}set loadingIcon(t){I(this,v,t)}get loadingText(){return z(this,w)}set loadingText(t){I(this,w,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:i,markers:r,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 g=!1;if((p||u)&&(this.showLoadingOverlay=!0,p&&this.mapReady&&(g=!0,this.markerController.clearAllMarkers(),this.routeAnimationController.removeRoute(),this._isCleared=!1)),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 i={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,i),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===r.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})}i&&i.key!==this._currentMapFloor&&this.mapReady&&this.setCurrentMapFloor(i.key);const f=this.markerController.getMarkersIds(),m=r.map(t=>t.id);(r.length!==f.length||m.some(t=>!f.includes(t))||f.some(t=>!m.includes(t)))&&!this._isCleared&&(this.mapReady?this.updateMarkers():this.pendingUpdateMarkers=!0),this.pendingUpdateMarkers&&this.mapReady&&!this._isCleared&&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&&!g?(this.routeAnimationController.removeRoute(),s&&this.routeAnimationController.startRouteAnimation(s)):!this.routeAnimationController.isAnimating()&&a&&s&&!g&&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()}async clearMap(t=!0,e){if(this._clearMapLock)console.info("[MAP] clearMap called while already in progress, skipping");else{console.info("[MAP] clearMap start",{preserveOrigin:t,loadingMessage:e}),this._clearMapLock=!0;try{if(this._clearMapLoadingText=e||"Limpiando mapa...",this.showLoadingOverlay=!0,this.requestUpdate(),await this.updateComplete,this.routeAnimationController.removeRoute(),t){const t=this.sdkData?.origin?.lazarilloId,e=this.markerController.getMarkersIds();t&&e.includes(t)?e.filter(e=>e!==t).forEach(t=>{try{this.lzMap?.removeMarker(t)}catch{}}):(this.markerController.clearAllMarkers(),this._isCleared=!0)}else this.markerController.clearAllMarkers(),this._isCleared=!0;await new Promise(t=>setTimeout(t,100)),console.info("[MAP] clearMap complete")}finally{this.showLoadingOverlay=!1,this._clearMapLoadingText=void 0,this._clearMapLock=!1,this.requestUpdate()}}}computePaddingForModal(t="route-options"){const e={top:100,bottom:100,left:100,right:200+this.paddingLeft},o=this.getRootNode(),n=o?.host;if(!n||!n.shadowRoot)return e;const i=n.shadowRoot.querySelector(t);if(!i)return e;const r=i.getBoundingClientRect(),s=this.shadowRoot?.getElementById("map"),a=s?.getBoundingClientRect();if(!a)return e;const l=r.right-a.left;return{top:e.top,bottom:e.bottom,left:Math.max(e.left,l+20),right:e.right}}getMarkerCoordinates(){return{origin:this.sdkData?.origin?.position,destination:this.sdkData?.destination?.position}}areMarkersVisible(){const t={originVisible:!1,destinationVisible:!1,bothVisible:!1};if(!this.lzMap||!this.mapReady)return t;const e=this.shadowRoot?.getElementById("map");if(!e)return t;const o=e.getBoundingClientRect(),n=this.computePaddingForModal(),i=o.left+n.left,r=o.right-n.right,s=o.top+n.top,a=o.bottom-n.bottom;return e.querySelectorAll(".maplibregl-marker").forEach(e=>{const o=e.querySelector('[data-testid^="marker-"]'),n=o?.getAttribute("data-testid");if(!n)return;const l=e.getBoundingClientRect(),c=l.left+l.width/2,d=l.top+l.height/2,u=c>=i&&c<=r&&d>=s&&d<=a;"marker-origin"===n?t.originVisible=u:"marker-destination"===n&&(t.destinationVisible=u)}),t.bothVisible=t.originVisible&&t.destinationVisible,t}isLoadingVisible(){return this.showLoadingOverlay}_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,i=this.config?.pitch??0,r=this.config?.initialZoom??20,s=this.computePaddingForModal("route-options"),a=t?.inFloors?.[0];if(a&&this.lzMap?.updateFloor(a),o){const r=e?.inFloors?.[0];if(r&&o.legs){const a=o.legs.flatMap(t=>t.steps).filter(t=>t.startInsideFloor===r||t.endInsideFloor===r).flatMap(t=>t.coordinates);if(a.length>0)this.lzMap?.fitCoordinates(a,{padding:s,bearing:n,pitch:i,animate:!1});else{const o=t?t.position:e?.position;this.lzMap?.updateCamera({bearing:n,pitch:i,center:o,animate:!1})}}else{const o=t?t.position:e?.position;this.lzMap?.updateCamera({bearing:n,pitch:i,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:s,bearing:n,pitch:i,animate:!1})},100):1===o.length&&setTimeout(()=>{this.lzMap?.updateCamera({bearing:n,pitch:i,center:o[0],zoom:r,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,n=this._clearMapLoadingText||this.loadingText;return e`
|
|
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,y=Object.defineProperty,C=Object.getOwnPropertyDescriptor,k=t=>{throw TypeError(t)},M=(t,e,o,n)=>{for(var i,r=n>1?void 0:n?C(e,o):e,s=t.length-1;s>=0;s--)(i=t[s])&&(r=(n?i(e,o,r):i(r))||r);return n&&r&&y(e,o,r),r},E=(t,e,o)=>e.has(t)||k("Cannot "+o),z=(t,e,o)=>(E(t,e,"read from private field"),o?o.call(t):e.get(t)),A=(t,e,o)=>e.has(t)?k("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),I=(t,e,o,n)=>(E(t,e,"write to private field"),e.set(t,o),o);let R=class extends t{constructor(){super(),A(this,x,0),A(this,v,""),A(this,w,"Cargando..."),this.mapReady=!1,this._clearMapLock=!1,this._isCleared=!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){I(this,x,t)}get loadingIcon(){return z(this,v)}set loadingIcon(t){I(this,v,t)}get loadingText(){return z(this,w)}set loadingText(t){I(this,w,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:i,markers:r,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 g=!1;if((p||u)&&(this.showLoadingOverlay=!0,p&&this.mapReady&&(g=!0,this.markerController.clearAllMarkers(),this.routeAnimationController.removeRoute(),this._isCleared=!1)),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 i={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,i),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===r.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})}i&&i.key!==this._currentMapFloor&&this.mapReady&&this.setCurrentMapFloor(i.key);const f=this.markerController.getMarkersIds(),m=r.map(t=>t.id);(r.length!==f.length||m.some(t=>!f.includes(t))||f.some(t=>!m.includes(t)))&&!this._isCleared&&(this.mapReady?this.updateMarkers():this.pendingUpdateMarkers=!0),this.pendingUpdateMarkers&&this.mapReady&&!this._isCleared&&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&&!g?(this.routeAnimationController.removeRoute(),s&&this.routeAnimationController.startRouteAnimation(s)):!this.routeAnimationController.isAnimating()&&a&&s&&!g&&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()}async clearMap(t=!0,e){if(this._clearMapLock)console.info("[MAP] clearMap called while already in progress, skipping");else{console.info("[MAP] clearMap start",{preserveOrigin:t,loadingMessage:e}),this._clearMapLock=!0;try{if(this._clearMapLoadingText=e||"Limpiando mapa...",this.showLoadingOverlay=!0,this.requestUpdate(),await this.updateComplete,this.routeAnimationController.removeRoute(),t){const t=this.sdkData?.origin?.lazarilloId,e=this.markerController.getMarkersIds();t&&e.includes(t)?e.filter(e=>e!==t).forEach(t=>{try{this.lzMap?.removeMarker(t)}catch{}}):(this.markerController.clearAllMarkers(),this._isCleared=!0)}else this.markerController.clearAllMarkers(),this._isCleared=!0;await new Promise(t=>setTimeout(t,100)),console.info("[MAP] clearMap complete")}finally{this.showLoadingOverlay=!1,this._clearMapLoadingText=void 0,this._clearMapLock=!1,this.requestUpdate()}}}computePaddingForModal(t="route-options"){const e={top:200,bottom:100,left:100,right:200+this.paddingLeft},o=this.getRootNode(),n=o?.host;if(!n||!n.shadowRoot)return e;const i=this.shadowRoot?.getElementById("map"),r=i?.getBoundingClientRect();if(!r)return e;const s=n.shadowRoot.querySelector(t),a=n.shadowRoot.querySelector("qr-modal");let l=0;if(s){const t=s.getBoundingClientRect();l=Math.max(l,t.right-r.left)}if(a){const t=a.getBoundingClientRect();l=Math.max(l,t.right-r.left)}return 0===l?e:{top:e.top,bottom:e.bottom,left:Math.max(e.left,l+40),right:e.right}}getMarkerCoordinates(){return{origin:this.sdkData?.origin?.position,destination:this.sdkData?.destination?.position}}areMarkersVisible(){const t={originVisible:!1,destinationVisible:!1,bothVisible:!1};if(!this.lzMap||!this.mapReady)return t;const e=this.shadowRoot?.getElementById("map");if(!e)return t;const o=e.getBoundingClientRect(),n=this.computePaddingForModal(),i=o.left+n.left,r=o.right-n.right,s=o.top+n.top,a=o.bottom-n.bottom;return e.querySelectorAll(".maplibregl-marker").forEach(e=>{const o=e.querySelector('[data-testid^="marker-"]'),n=o?.getAttribute("data-testid");if(!n)return;const l=e.getBoundingClientRect(),c=l.left+l.width/2,d=l.top+l.height/2,u=c>=i&&c<=r&&d>=s&&d<=a;"marker-origin"===n?t.originVisible=u:"marker-destination"===n&&(t.destinationVisible=u)}),t.bothVisible=t.originVisible&&t.destinationVisible,t}isLoadingVisible(){return this.showLoadingOverlay}_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,i=this.config?.pitch??0,r=this.config?.initialZoom??20,s=this.computePaddingForModal("route-options"),a=t?.inFloors?.[0];if(a&&this.lzMap?.updateFloor(a),o){const r=e?.inFloors?.[0];if(r&&o.legs){const a=o.legs.flatMap(t=>t.steps).filter(t=>t.startInsideFloor===r||t.endInsideFloor===r).flatMap(t=>t.coordinates);if(a.length>0)this.lzMap?.fitCoordinates(a,{padding:s,bearing:n,pitch:i,animate:!1});else{const o=t?t.position:e?.position;this.lzMap?.updateCamera({bearing:n,pitch:i,center:o,animate:!1})}}else{const o=t?t.position:e?.position;this.lzMap?.updateCamera({bearing:n,pitch:i,center:o,animate:!1})}}else{const o=e?.inFloors?.[0],a=t?.inFloors?.[0];if(o&&a&&o===a){const o=[];if(e?.position&&o.push(e.position),t?.position&&o.push(t.position),o.length>1){const t=this.config?.limitZoomIn??22,e=Math.min(18,t);setTimeout(()=>{this.lzMap?.fitCoordinates(o,{padding:s,bearing:n,pitch:i,animate:!1,maxZoom:e})},100)}else 1===o.length&&setTimeout(()=>{this.lzMap?.updateCamera({bearing:n,pitch:i,center:o[0],zoom:r,animate:!1})},100)}else t?.position?setTimeout(()=>{this.lzMap?.updateCamera({bearing:n,pitch:i,center:t.position,zoom:r,animate:!1})},100):e?.position&&setTimeout(()=>{this.lzMap?.updateCamera({bearing:n,pitch:i,center:e.position,zoom:r,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,n=this._clearMapLoadingText||this.loadingText;return e`
|
|
34
34
|
<div id="map" data-testid="map-container"></div>
|
|
35
35
|
<div id="modal" data-testid="floor-change-modal" style="display: ${this.modalData?"flex":"none"}">
|
|
36
36
|
<div class="modal-content">
|
|
@@ -186,7 +186,7 @@ function m({context:t,subscribe:e}){return(o,n)=>{"object"==typeof n?n.addInitia
|
|
|
186
186
|
transform: rotate(360deg);
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
`],
|
|
189
|
+
`],M([m({context:b,subscribe:!0})],R.prototype,"sdkData",2),M([i({type:Number,attribute:"padding-left"})],R.prototype,"paddingLeft",1),M([i({type:String,attribute:"loading-icon"})],R.prototype,"loadingIcon",1),M([i({type:String,attribute:"loading-text"})],R.prototype,"loadingText",1),M([r()],R.prototype,"_clearMapLoadingText",2),M([r()],R.prototype,"showLoadingOverlay",2),R=M([s("custom-map")],R);const P=/*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({__proto__:null,get CustomMap(){return R}},Symbol.toStringTag,{value:"Module"})),B=1;
|
|
190
190
|
/**
|
|
191
191
|
* @license
|
|
192
192
|
* Copyright 2017 Google LLC
|
|
@@ -209,7 +209,7 @@ function m({context:t,subscribe:e}){return(o,n)=>{"object"==typeof n?n.addInitia
|
|
|
209
209
|
</div>
|
|
210
210
|
`})}
|
|
211
211
|
</div>
|
|
212
|
-
`}};N.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}}')],N=((t,e,o,n)=>{for(var i,r=n>1?void 0:n?F(e,o):e,s=t.length-1;s>=0;s--)(i=t[s])&&(r=i(r)||r);return r})([s("floor-selector")],N);const S=/*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({__proto__:null,get FloorSelector(){return N}},Symbol.toStringTag,{value:"Module"}));var $,j,U={};function O(){return j?$:(j=1,$=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var q,H={},V={};function Y(){if(q)return V;let t;q=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 V.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},V.getSymbolTotalCodewords=function(t){return e[t]},V.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},V.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');t=e},V.isKanjiModeEnabled=function(){return void 0!==t},V.toSJIS=function(e){return t(e)},V}var J,K,Z,Q,W,G={};function X(){return J||(J=1,(t=G).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(T){return o}}),G;var t}var tt,et={};var ot,nt={};var it,rt={};var st,at={};function lt(){if(st)return at;st=1;const t=X(),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 at.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}},at.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}},at}var ct,dt,ut,ht,pt={},gt={};function ft(){return dt||(dt=1,function(t){const e=function(){if(ct)return gt;ct=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]}(),gt.log=function(t){if(t<1)throw new Error("log("+t+")");return e[t]},gt.exp=function(e){return t[e]},gt.mul=function(o,n){return 0===o||0===n?0:t[e[o]+e[n]]},gt}();t.mul=function(t,o){const n=new Uint8Array(t.length+o.length-1);for(let i=0;i<t.length;i++)for(let r=0;r<o.length;r++)n[i+r]^=e.mul(t[i],o[r]);return n},t.mod=function(t,o){let n=new Uint8Array(t);for(;n.length-o.length>=0;){const t=n[0];for(let r=0;r<o.length;r++)n[r]^=e.mul(o[r],t);let i=0;for(;i<n.length&&0===n[i];)i++;n=n.slice(i)}return n},t.generateECPolynomial=function(o){let n=new Uint8Array([1]);for(let i=0;i<o;i++)n=t.mul(n,new Uint8Array([1,e.exp(i)]));return n}}(pt)),pt}var mt,bt={},xt={},vt={};function wt(){return mt||(mt=1,vt.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),vt}var yt,Ct,kt,Et={};function Mt(){if(yt)return Et;yt=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]))+";Et.KANJI=new RegExp(e,"g"),Et.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Et.BYTE=new RegExp(o,"g"),Et.NUMERIC=new RegExp(t,"g"),Et.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const n=new RegExp("^"+e+"$"),i=new RegExp("^"+t+"$"),r=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Et.testKanji=function(t){return n.test(t)},Et.testNumeric=function(t){return i.test(t)},Et.testAlphanumeric=function(t){return r.test(t)},Et}function zt(){return Ct||(Ct=1,function(t){const e=wt(),o=Mt();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(T){return o}}}(xt)),xt}function At(){return kt||(kt=1,function(t){const e=Y(),o=lt(),n=X(),i=zt(),r=wt(),s=e.getBCHDigit(7973);function a(t,e){return i.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 r.isValid(t)?parseInt(t,10):e},t.getCapacity=function(t,n,s){if(!r.isValid(t))throw new Error("Invalid QR Code version");void 0===s&&(s=i.BYTE);const l=8*(e.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,n));if(s===i.MIXED)return l;const c=l-a(s,t);switch(s){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,o){let r;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,i.MIXED))return n}(e,s);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,o,n){for(let i=1;i<=40;i++)if(o<=t.getCapacity(i,n,e))return i}(r.mode,r.getLength(),s)},t.getEncodedBits=function(t){if(!r.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}}(bt)),bt}var It,Rt={};var Pt,Bt,Lt,Tt,Dt,_t,Ft,Nt,St={};var $t,jt,Ut,Ot={exports:{}};function qt(){return $t||($t=1,function(t){var e={single_source_shortest_paths:function(t,o,n){var i={},r={};r[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=r[l],(void 0===r[l]||h>u)&&(r[l]=u,p.push(l,u),i[l]=a));if(void 0!==n&&void 0===r[n]){var g=["Could not find a path from ",o," to ",n,"."].join("");throw new Error(g)}return i},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 i=e.single_source_shortest_paths(t,o,n);return e.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(t){var o,n=e.PriorityQueue,i={};for(o in t=t||{},n)n.hasOwnProperty(o)&&(i[o]=n[o]);return i.queue=[],i.sorter=t.sorter||n.default_sorter,i},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}(Ot)),Ot.exports}function Ht(){return jt||(jt=1,function(t){const e=zt(),o=function(){if(Bt)return Pt;Bt=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 i=this.data.length-e;i>0&&(o=this.data.substr(e),n=parseInt(o,10),t.put(n,3*i+1))},Pt=e}(),n=function(){if(Tt)return Lt;Tt=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)},Lt=o}(),i=function(){if(_t)return Dt;_t=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)},Dt=e}(),r=function(){if(Nt)return Ft;Nt=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)}},Ft=o}(),s=Mt(),a=Y(),l=qt();function c(t){return unescape(encodeURIComponent(t)).length}function d(t,e,o){const n=[];let i;for(;null!==(i=t.exec(o));)n.push({data:i[0],index:i.index,mode:e,length:i[0].length});return n}function u(t){const o=d(s.NUMERIC,e.NUMERIC,t),n=d(s.ALPHANUMERIC,e.ALPHANUMERIC,t);let i,r;a.isKanjiModeEnabled()?(i=d(s.BYTE,e.BYTE,t),r=d(s.KANJI,e.KANJI,t)):(i=d(s.BYTE_KANJI,e.BYTE,t),r=[]);return o.concat(n,i,r).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 r.getBitsLength(t);case e.BYTE:return i.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 r(t);case e.BYTE:return new i(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 i=function(t){const o=[];for(let n=0;n<t.length;n++){const i=t[n];switch(i.mode){case e.NUMERIC:o.push([i,{data:i.data,mode:e.ALPHANUMERIC,length:i.length},{data:i.data,mode:e.BYTE,length:i.length}]);break;case e.ALPHANUMERIC:o.push([i,{data:i.data,mode:e.BYTE,length:i.length}]);break;case e.KANJI:o.push([i,{data:i.data,mode:e.BYTE,length:c(i.data)}]);break;case e.BYTE:o.push([{data:i.data,mode:e.BYTE,length:c(i.data)}])}}return o}(u(o,a.isKanjiModeEnabled())),r=function(t,o){const n={},i={start:{}};let r=["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},i[d]={};for(let t=0;t<r.length;t++){const s=r[t];n[s]&&n[s].node.mode===c.mode?(i[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),i[s][d]=h(c.length,c.mode)+4+e.getCharCountIndicator(c.mode,o))}}r=l}for(let e=0;e<r.length;e++)i[r[e]].end=0;return{map:i,table:n}}(i,n),s=l.find_path(r.map,"start","end"),d=[];for(let t=1;t<s.length-1;t++)d.push(r.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()))}}(St)),St}function Vt(){if(Ut)return H;Ut=1;const t=Y(),e=X(),o=function(){if(Z)return K;function t(){this.buffer=[],this.length=0}return Z=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++}},K=t}(),n=function(){if(W)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 W=1,t.prototype.set=function(t,e,o,n){const i=t*this.size+e;this.data[i]=o,n&&(this.reservedBit[i]=!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}(),i=(tt||(tt=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),i=145===n?26:2*Math.ceil((n-13)/(2*o-2)),r=[n-7];for(let e=1;e<o-1;e++)r[e]=r[e-1]-i;return r.push(6),r.reverse()},t.getPositions=function(e){const o=[],n=t.getRowColCoords(e),i=n.length;for(let t=0;t<i;t++)for(let e=0;e<i;e++)0===t&&0===e||0===t&&e===i-1||t===i-1&&0===e||o.push([n[t],n[e]]);return o}}(et)),et),r=function(){if(ot)return nt;ot=1;const t=Y().getSymbolSize;return nt.getPositions=function(e){const o=t(e);return[[0,0],[o-7,0],[0,o-7]]},nt}(),s=(it||(it=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,i=10;function r(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,i=0,r=0,s=null,a=null;for(let l=0;l<o;l++){i=r=0,s=a=null;for(let c=0;c<o;c++){let o=t.get(l,c);o===s?i++:(i>=5&&(n+=e+(i-5)),s=o,i=1),o=t.get(c,l),o===a?r++:(r>=5&&(n+=e+(r-5)),a=o,r=1)}i>=5&&(n+=e+(i-5)),r>=5&&(n+=e+(r-5))}return n},t.getPenaltyN2=function(t){const e=t.size;let n=0;for(let o=0;o<e-1;o++)for(let i=0;i<e-1;i++){const e=t.get(o,i)+t.get(o,i+1)+t.get(o+1,i)+t.get(o+1,i+1);4!==e&&0!==e||n++}return n*o},t.getPenaltyN3=function(t){const e=t.size;let o=0,i=0,r=0;for(let n=0;n<e;n++){i=r=0;for(let s=0;s<e;s++)i=i<<1&2047|t.get(n,s),s>=10&&(1488===i||93===i)&&o++,r=r<<1&2047|t.get(s,n),s>=10&&(1488===r||93===r)&&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)*i},t.applyMask=function(t,e){const o=e.size;for(let n=0;n<o;n++)for(let i=0;i<o;i++)e.isReserved(i,n)||e.xor(i,n,r(t,i,n))},t.getBestMask=function(e,o){const n=Object.keys(t.Patterns).length;let i=0,r=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<r&&(r=n,i=s)}return i}}(rt)),rt),a=lt(),l=function(){if(ht)return ut;ht=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),i=this.degree-n.length;if(i>0){const t=new Uint8Array(this.degree);return t.set(n,i),t}return n},ut=e}(),c=At(),d=function(){if(It)return Rt;It=1;const t=Y(),e=t.getBCHDigit(1335);return Rt.getEncodedBits=function(o,n){const i=o.bit<<3|n;let r=i<<10;for(;t.getBCHDigit(r)-e>=0;)r^=1335<<t.getBCHDigit(r)-e;return 21522^(i<<10|r)},Rt}(),u=zt(),h=Ht();function p(t,e,o){const n=t.size,i=d.getEncodedBits(e,o);let r,s;for(r=0;r<15;r++)s=1==(i>>r&1),r<6?t.set(r,8,s,!0):r<8?t.set(r+1,8,s,!0):t.set(n-15+r,8,s,!0),r<8?t.set(8,n-r-1,s,!0):r<9?t.set(8,15-r-1+1,s,!0):t.set(8,15-r-1,s,!0);t.set(n-8,8,1,!0)}function g(e,n,i){const r=new o;i.forEach(function(t){r.put(t.mode.bit,4),r.put(t.getLength(),u.getCharCountIndicator(t.mode,e)),t.write(r)});const s=8*(t.getSymbolTotalCodewords(e)-a.getTotalCodewordsCount(e,n));for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);const c=(s-r.getLengthInBits())/8;for(let t=0;t<c;t++)r.put(t%2?17:236,8);return function(e,o,n){const i=t.getSymbolTotalCodewords(o),r=a.getTotalCodewordsCount(o,n),s=i-r,c=a.getBlocksCount(o,n),d=i%c,u=c-d,h=Math.floor(i/c),p=Math.floor(s/c),g=p+1,f=h-p,m=new l(f);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:g;x[t]=y.slice(b,b+e),v[t]=m.encode(x[t]),b+=e,w=Math.max(w,e)}const C=new Uint8Array(i);let k,E,M=0;for(k=0;k<w;k++)for(E=0;E<c;E++)k<x[E].length&&(C[M++]=x[E][k]);for(k=0;k<f;k++)for(E=0;E<c;E++)C[M++]=v[E][k];return C}(r,e,n)}function f(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 f=g(o,a,d),m=t.getSymbolSize(o),b=new n(m);return function(t,e){const o=t.size,n=r.getPositions(e);for(let i=0;i<n.length;i++){const e=n[i][0],r=n[i][1];for(let n=-1;n<=7;n++)if(!(e+n<=-1||o<=e+n))for(let i=-1;i<=7;i++)r+i<=-1||o<=r+i||(n>=0&&n<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===n||6===n)||n>=2&&n<=4&&i>=2&&i<=4?t.set(e+n,r+i,!0,!0):t.set(e+n,r+i,!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=i.getPositions(e);for(let n=0;n<o.length;n++){const e=o[n][0],i=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,i+n,!0,!0):t.set(e+o,i+n,!1,!0)}}(b,o),p(b,a,0),o>=7&&function(t,e){const o=t.size,n=c.getEncodedBits(e);let i,r,s;for(let a=0;a<18;a++)i=Math.floor(a/3),r=a%3+o-8-3,s=1==(n>>a&1),t.set(i,r,s,!0),t.set(r,i,s,!0)}(b,o),function(t,e){const o=t.size;let n=-1,i=o-1,r=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(i,a-o)){let n=!1;s<e.length&&(n=1==(e[s]>>>r&1)),t.set(i,a-o,n),r--,-1===r&&(s++,r=7)}if(i+=n,i<0||o<=i){i-=n,n=-n;break}}}(b,f),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 i,r,a=e.M;return void 0!==n&&(a=e.from(n.errorCorrectionLevel,e.M),i=c.from(n.version),r=s.from(n.maskPattern),n.toSJISFunc&&t.setToSJISFunction(n.toSJISFunc)),f(o,i,a,r)},H}var Yt,Jt,Kt={},Zt={};function Qt(){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,i=t.scale||4;return{width:n,scale:n?4:i,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 i=o.modules.size,r=o.modules.data,s=t.getScale(i,n),a=Math.floor((i+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[r[Math.floor((t-l)/s)*i+Math.floor((o-l)/s)]?1:0]}e[d++]=u.r,e[d++]=u.g,e[d++]=u.b,e[d]=u.a}}}(Zt)),Zt}function Wt(){return Jt||(Jt=1,function(t){const e=Qt();t.render=function(t,o,n){let i=n,r=o;void 0!==i||o&&o.getContext||(i=o,o=void 0),o||(r=function(){try{return document.createElement("canvas")}catch(T){throw new Error("You need to specify a canvas element")}}()),i=e.getOptions(i);const s=e.getImageWidth(t.modules.size,i),a=r.getContext("2d"),l=a.createImageData(s,s);return e.qrToImageData(l.data,t,i),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,r,s),a.putImageData(l,0,0),r},t.renderToDataURL=function(e,o,n){let i=n;void 0!==i||o&&o.getContext||(i=o,o=void 0),i||(i={});const r=t.render(e,o,i),s=i.type||"image/png",a=i.rendererOpts||{};return r.toDataURL(s,a.quality)}}(Kt)),Kt}var Gt,Xt,te={};function ee(){if(Gt)return te;Gt=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 te.render=function(n,i,r){const s=t.getOptions(i),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 i="",r=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]||(i+=s?o("M",c+n,.5+d+n):o("m",r,0),r=0,s=!1),c+1<e&&t[l+1]||(i+=o("h",a),a=0)):r++}return i}(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 r&&r(null,p),p},te}var oe=function(){if(Xt)return U;Xt=1;const t=O(),e=Vt(),o=Wt(),n=ee();function i(o,n,i,r,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?(i=n,n=r=void 0):2!==l||n.getContext||(r=i,i=n,n=void 0),new Promise(function(t,s){try{const s=e.create(i,r);t(o(s,n,r))}catch(T){s(T)}})}if(l<2)throw new Error("Too few arguments provided");2===l?(s=i,i=n,n=r=void 0):3===l&&(n.getContext&&void 0===s?(s=r,r=void 0):(s=r,r=i,i=n,n=void 0));try{const t=e.create(i,r);s(null,o(t,n,r))}catch(T){s(T)}}return U.create=e.create,U.toCanvas=i.bind(null,o.render),U.toDataURL=i.bind(null,o.renderToDataURL),U.toString=i.bind(null,function(t,e,o){return n.render(t,o)}),U}();var ne=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,re=(t,e,o,n)=>{for(var i,r=n>1?void 0:n?ie(e,o):e,s=t.length-1;s>=0;s--)(i=t[s])&&(r=(n?i(e,o,r):i(r))||r);return n&&r&&ne(e,o,r),r};let se=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,i=`${n}/?origin=${t}&destination=${e}&utm_source=qr-totem&utm_content=route&utm_referrer=totem`,r={errorCorrectionLevel:"M",type:"image/webp",margin:1,width:150};oe.toDataURL(i,r).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:i}))})}}render(){const{cameraInitialized:t}=this.sdkData??{};return e`
|
|
212
|
+
`}};N.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}}')],N=((t,e,o,n)=>{for(var i,r=n>1?void 0:n?F(e,o):e,s=t.length-1;s>=0;s--)(i=t[s])&&(r=i(r)||r);return r})([s("floor-selector")],N);const S=/*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({__proto__:null,get FloorSelector(){return N}},Symbol.toStringTag,{value:"Module"}));var $,j,U={};function O(){return j?$:(j=1,$=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var q,H={},V={};function Y(){if(q)return V;let t;q=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 V.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},V.getSymbolTotalCodewords=function(t){return e[t]},V.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},V.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');t=e},V.isKanjiModeEnabled=function(){return void 0!==t},V.toSJIS=function(e){return t(e)},V}var J,K,Z,Q,W,G={};function X(){return J||(J=1,(t=G).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(T){return o}}),G;var t}var tt,et={};var ot,nt={};var it,rt={};var st,at={};function lt(){if(st)return at;st=1;const t=X(),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 at.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}},at.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}},at}var ct,dt,ut,ht,pt={},gt={};function ft(){return dt||(dt=1,function(t){const e=function(){if(ct)return gt;ct=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]}(),gt.log=function(t){if(t<1)throw new Error("log("+t+")");return e[t]},gt.exp=function(e){return t[e]},gt.mul=function(o,n){return 0===o||0===n?0:t[e[o]+e[n]]},gt}();t.mul=function(t,o){const n=new Uint8Array(t.length+o.length-1);for(let i=0;i<t.length;i++)for(let r=0;r<o.length;r++)n[i+r]^=e.mul(t[i],o[r]);return n},t.mod=function(t,o){let n=new Uint8Array(t);for(;n.length-o.length>=0;){const t=n[0];for(let r=0;r<o.length;r++)n[r]^=e.mul(o[r],t);let i=0;for(;i<n.length&&0===n[i];)i++;n=n.slice(i)}return n},t.generateECPolynomial=function(o){let n=new Uint8Array([1]);for(let i=0;i<o;i++)n=t.mul(n,new Uint8Array([1,e.exp(i)]));return n}}(pt)),pt}var mt,bt={},xt={},vt={};function wt(){return mt||(mt=1,vt.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),vt}var yt,Ct,kt,Mt={};function Et(){if(yt)return Mt;yt=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]))+";Mt.KANJI=new RegExp(e,"g"),Mt.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Mt.BYTE=new RegExp(o,"g"),Mt.NUMERIC=new RegExp(t,"g"),Mt.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const n=new RegExp("^"+e+"$"),i=new RegExp("^"+t+"$"),r=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Mt.testKanji=function(t){return n.test(t)},Mt.testNumeric=function(t){return i.test(t)},Mt.testAlphanumeric=function(t){return r.test(t)},Mt}function zt(){return Ct||(Ct=1,function(t){const e=wt(),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(T){return o}}}(xt)),xt}function At(){return kt||(kt=1,function(t){const e=Y(),o=lt(),n=X(),i=zt(),r=wt(),s=e.getBCHDigit(7973);function a(t,e){return i.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 r.isValid(t)?parseInt(t,10):e},t.getCapacity=function(t,n,s){if(!r.isValid(t))throw new Error("Invalid QR Code version");void 0===s&&(s=i.BYTE);const l=8*(e.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,n));if(s===i.MIXED)return l;const c=l-a(s,t);switch(s){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,o){let r;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,i.MIXED))return n}(e,s);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,o,n){for(let i=1;i<=40;i++)if(o<=t.getCapacity(i,n,e))return i}(r.mode,r.getLength(),s)},t.getEncodedBits=function(t){if(!r.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}}(bt)),bt}var It,Rt={};var Pt,Bt,Lt,Tt,Dt,_t,Ft,Nt,St={};var $t,jt,Ut,Ot={exports:{}};function qt(){return $t||($t=1,function(t){var e={single_source_shortest_paths:function(t,o,n){var i={},r={};r[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=r[l],(void 0===r[l]||h>u)&&(r[l]=u,p.push(l,u),i[l]=a));if(void 0!==n&&void 0===r[n]){var g=["Could not find a path from ",o," to ",n,"."].join("");throw new Error(g)}return i},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 i=e.single_source_shortest_paths(t,o,n);return e.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(t){var o,n=e.PriorityQueue,i={};for(o in t=t||{},n)n.hasOwnProperty(o)&&(i[o]=n[o]);return i.queue=[],i.sorter=t.sorter||n.default_sorter,i},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}(Ot)),Ot.exports}function Ht(){return jt||(jt=1,function(t){const e=zt(),o=function(){if(Bt)return Pt;Bt=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 i=this.data.length-e;i>0&&(o=this.data.substr(e),n=parseInt(o,10),t.put(n,3*i+1))},Pt=e}(),n=function(){if(Tt)return Lt;Tt=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)},Lt=o}(),i=function(){if(_t)return Dt;_t=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)},Dt=e}(),r=function(){if(Nt)return Ft;Nt=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)}},Ft=o}(),s=Et(),a=Y(),l=qt();function c(t){return unescape(encodeURIComponent(t)).length}function d(t,e,o){const n=[];let i;for(;null!==(i=t.exec(o));)n.push({data:i[0],index:i.index,mode:e,length:i[0].length});return n}function u(t){const o=d(s.NUMERIC,e.NUMERIC,t),n=d(s.ALPHANUMERIC,e.ALPHANUMERIC,t);let i,r;a.isKanjiModeEnabled()?(i=d(s.BYTE,e.BYTE,t),r=d(s.KANJI,e.KANJI,t)):(i=d(s.BYTE_KANJI,e.BYTE,t),r=[]);return o.concat(n,i,r).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 r.getBitsLength(t);case e.BYTE:return i.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 r(t);case e.BYTE:return new i(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 i=function(t){const o=[];for(let n=0;n<t.length;n++){const i=t[n];switch(i.mode){case e.NUMERIC:o.push([i,{data:i.data,mode:e.ALPHANUMERIC,length:i.length},{data:i.data,mode:e.BYTE,length:i.length}]);break;case e.ALPHANUMERIC:o.push([i,{data:i.data,mode:e.BYTE,length:i.length}]);break;case e.KANJI:o.push([i,{data:i.data,mode:e.BYTE,length:c(i.data)}]);break;case e.BYTE:o.push([{data:i.data,mode:e.BYTE,length:c(i.data)}])}}return o}(u(o,a.isKanjiModeEnabled())),r=function(t,o){const n={},i={start:{}};let r=["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},i[d]={};for(let t=0;t<r.length;t++){const s=r[t];n[s]&&n[s].node.mode===c.mode?(i[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),i[s][d]=h(c.length,c.mode)+4+e.getCharCountIndicator(c.mode,o))}}r=l}for(let e=0;e<r.length;e++)i[r[e]].end=0;return{map:i,table:n}}(i,n),s=l.find_path(r.map,"start","end"),d=[];for(let t=1;t<s.length-1;t++)d.push(r.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()))}}(St)),St}function Vt(){if(Ut)return H;Ut=1;const t=Y(),e=X(),o=function(){if(Z)return K;function t(){this.buffer=[],this.length=0}return Z=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++}},K=t}(),n=function(){if(W)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 W=1,t.prototype.set=function(t,e,o,n){const i=t*this.size+e;this.data[i]=o,n&&(this.reservedBit[i]=!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}(),i=(tt||(tt=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),i=145===n?26:2*Math.ceil((n-13)/(2*o-2)),r=[n-7];for(let e=1;e<o-1;e++)r[e]=r[e-1]-i;return r.push(6),r.reverse()},t.getPositions=function(e){const o=[],n=t.getRowColCoords(e),i=n.length;for(let t=0;t<i;t++)for(let e=0;e<i;e++)0===t&&0===e||0===t&&e===i-1||t===i-1&&0===e||o.push([n[t],n[e]]);return o}}(et)),et),r=function(){if(ot)return nt;ot=1;const t=Y().getSymbolSize;return nt.getPositions=function(e){const o=t(e);return[[0,0],[o-7,0],[0,o-7]]},nt}(),s=(it||(it=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,i=10;function r(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,i=0,r=0,s=null,a=null;for(let l=0;l<o;l++){i=r=0,s=a=null;for(let c=0;c<o;c++){let o=t.get(l,c);o===s?i++:(i>=5&&(n+=e+(i-5)),s=o,i=1),o=t.get(c,l),o===a?r++:(r>=5&&(n+=e+(r-5)),a=o,r=1)}i>=5&&(n+=e+(i-5)),r>=5&&(n+=e+(r-5))}return n},t.getPenaltyN2=function(t){const e=t.size;let n=0;for(let o=0;o<e-1;o++)for(let i=0;i<e-1;i++){const e=t.get(o,i)+t.get(o,i+1)+t.get(o+1,i)+t.get(o+1,i+1);4!==e&&0!==e||n++}return n*o},t.getPenaltyN3=function(t){const e=t.size;let o=0,i=0,r=0;for(let n=0;n<e;n++){i=r=0;for(let s=0;s<e;s++)i=i<<1&2047|t.get(n,s),s>=10&&(1488===i||93===i)&&o++,r=r<<1&2047|t.get(s,n),s>=10&&(1488===r||93===r)&&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)*i},t.applyMask=function(t,e){const o=e.size;for(let n=0;n<o;n++)for(let i=0;i<o;i++)e.isReserved(i,n)||e.xor(i,n,r(t,i,n))},t.getBestMask=function(e,o){const n=Object.keys(t.Patterns).length;let i=0,r=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<r&&(r=n,i=s)}return i}}(rt)),rt),a=lt(),l=function(){if(ht)return ut;ht=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),i=this.degree-n.length;if(i>0){const t=new Uint8Array(this.degree);return t.set(n,i),t}return n},ut=e}(),c=At(),d=function(){if(It)return Rt;It=1;const t=Y(),e=t.getBCHDigit(1335);return Rt.getEncodedBits=function(o,n){const i=o.bit<<3|n;let r=i<<10;for(;t.getBCHDigit(r)-e>=0;)r^=1335<<t.getBCHDigit(r)-e;return 21522^(i<<10|r)},Rt}(),u=zt(),h=Ht();function p(t,e,o){const n=t.size,i=d.getEncodedBits(e,o);let r,s;for(r=0;r<15;r++)s=1==(i>>r&1),r<6?t.set(r,8,s,!0):r<8?t.set(r+1,8,s,!0):t.set(n-15+r,8,s,!0),r<8?t.set(8,n-r-1,s,!0):r<9?t.set(8,15-r-1+1,s,!0):t.set(8,15-r-1,s,!0);t.set(n-8,8,1,!0)}function g(e,n,i){const r=new o;i.forEach(function(t){r.put(t.mode.bit,4),r.put(t.getLength(),u.getCharCountIndicator(t.mode,e)),t.write(r)});const s=8*(t.getSymbolTotalCodewords(e)-a.getTotalCodewordsCount(e,n));for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);const c=(s-r.getLengthInBits())/8;for(let t=0;t<c;t++)r.put(t%2?17:236,8);return function(e,o,n){const i=t.getSymbolTotalCodewords(o),r=a.getTotalCodewordsCount(o,n),s=i-r,c=a.getBlocksCount(o,n),d=i%c,u=c-d,h=Math.floor(i/c),p=Math.floor(s/c),g=p+1,f=h-p,m=new l(f);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:g;x[t]=y.slice(b,b+e),v[t]=m.encode(x[t]),b+=e,w=Math.max(w,e)}const C=new Uint8Array(i);let k,M,E=0;for(k=0;k<w;k++)for(M=0;M<c;M++)k<x[M].length&&(C[E++]=x[M][k]);for(k=0;k<f;k++)for(M=0;M<c;M++)C[E++]=v[M][k];return C}(r,e,n)}function f(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 f=g(o,a,d),m=t.getSymbolSize(o),b=new n(m);return function(t,e){const o=t.size,n=r.getPositions(e);for(let i=0;i<n.length;i++){const e=n[i][0],r=n[i][1];for(let n=-1;n<=7;n++)if(!(e+n<=-1||o<=e+n))for(let i=-1;i<=7;i++)r+i<=-1||o<=r+i||(n>=0&&n<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===n||6===n)||n>=2&&n<=4&&i>=2&&i<=4?t.set(e+n,r+i,!0,!0):t.set(e+n,r+i,!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=i.getPositions(e);for(let n=0;n<o.length;n++){const e=o[n][0],i=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,i+n,!0,!0):t.set(e+o,i+n,!1,!0)}}(b,o),p(b,a,0),o>=7&&function(t,e){const o=t.size,n=c.getEncodedBits(e);let i,r,s;for(let a=0;a<18;a++)i=Math.floor(a/3),r=a%3+o-8-3,s=1==(n>>a&1),t.set(i,r,s,!0),t.set(r,i,s,!0)}(b,o),function(t,e){const o=t.size;let n=-1,i=o-1,r=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(i,a-o)){let n=!1;s<e.length&&(n=1==(e[s]>>>r&1)),t.set(i,a-o,n),r--,-1===r&&(s++,r=7)}if(i+=n,i<0||o<=i){i-=n,n=-n;break}}}(b,f),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 i,r,a=e.M;return void 0!==n&&(a=e.from(n.errorCorrectionLevel,e.M),i=c.from(n.version),r=s.from(n.maskPattern),n.toSJISFunc&&t.setToSJISFunction(n.toSJISFunc)),f(o,i,a,r)},H}var Yt,Jt,Kt={},Zt={};function Qt(){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,i=t.scale||4;return{width:n,scale:n?4:i,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 i=o.modules.size,r=o.modules.data,s=t.getScale(i,n),a=Math.floor((i+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[r[Math.floor((t-l)/s)*i+Math.floor((o-l)/s)]?1:0]}e[d++]=u.r,e[d++]=u.g,e[d++]=u.b,e[d]=u.a}}}(Zt)),Zt}function Wt(){return Jt||(Jt=1,function(t){const e=Qt();t.render=function(t,o,n){let i=n,r=o;void 0!==i||o&&o.getContext||(i=o,o=void 0),o||(r=function(){try{return document.createElement("canvas")}catch(T){throw new Error("You need to specify a canvas element")}}()),i=e.getOptions(i);const s=e.getImageWidth(t.modules.size,i),a=r.getContext("2d"),l=a.createImageData(s,s);return e.qrToImageData(l.data,t,i),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,r,s),a.putImageData(l,0,0),r},t.renderToDataURL=function(e,o,n){let i=n;void 0!==i||o&&o.getContext||(i=o,o=void 0),i||(i={});const r=t.render(e,o,i),s=i.type||"image/png",a=i.rendererOpts||{};return r.toDataURL(s,a.quality)}}(Kt)),Kt}var Gt,Xt,te={};function ee(){if(Gt)return te;Gt=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 te.render=function(n,i,r){const s=t.getOptions(i),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 i="",r=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]||(i+=s?o("M",c+n,.5+d+n):o("m",r,0),r=0,s=!1),c+1<e&&t[l+1]||(i+=o("h",a),a=0)):r++}return i}(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 r&&r(null,p),p},te}var oe=function(){if(Xt)return U;Xt=1;const t=O(),e=Vt(),o=Wt(),n=ee();function i(o,n,i,r,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?(i=n,n=r=void 0):2!==l||n.getContext||(r=i,i=n,n=void 0),new Promise(function(t,s){try{const s=e.create(i,r);t(o(s,n,r))}catch(T){s(T)}})}if(l<2)throw new Error("Too few arguments provided");2===l?(s=i,i=n,n=r=void 0):3===l&&(n.getContext&&void 0===s?(s=r,r=void 0):(s=r,r=i,i=n,n=void 0));try{const t=e.create(i,r);s(null,o(t,n,r))}catch(T){s(T)}}return U.create=e.create,U.toCanvas=i.bind(null,o.render),U.toDataURL=i.bind(null,o.renderToDataURL),U.toString=i.bind(null,function(t,e,o){return n.render(t,o)}),U}();var ne=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,re=(t,e,o,n)=>{for(var i,r=n>1?void 0:n?ie(e,o):e,s=t.length-1;s>=0;s--)(i=t[s])&&(r=(n?i(e,o,r):i(r))||r);return n&&r&&ne(e,o,r),r};let se=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,i=`${n}/?origin=${t}&destination=${e}&utm_source=qr-totem&utm_content=route&utm_referrer=totem`,r={errorCorrectionLevel:"M",type:"image/webp",margin:1,width:150};oe.toDataURL(i,r).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:i}))})}}render(){const{cameraInitialized:t}=this.sdkData??{};return e`
|
|
213
213
|
<div class=${T({card:!0,hidden:!t})}>
|
|
214
214
|
<div class="modal-content">
|
|
215
215
|
<div class="pin-container">
|
|
@@ -320,4 +320,4 @@ function m({context:t,subscribe:e}){return(o,n)=>{"object"==typeof n?n.addInitia
|
|
|
320
320
|
</div>
|
|
321
321
|
`:""}
|
|
322
322
|
`}};ue.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}")],de([m({context:b,subscribe:!0})],ue.prototype,"sdkData",2),ue=de([s("route-options")],ue);const he=/*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({__proto__:null,get RouteOptions(){return ue}},Symbol.toStringTag,{value:"Module"}));export{_ as B,P as c,T as e,S as f,f as i,ae as q,he as r,b as s};
|
|
323
|
-
//# sourceMappingURL=components-
|
|
323
|
+
//# sourceMappingURL=components-9th9lb7v.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-LDoUrJDW.js";import{S as p}from"./utils-DPoAOsZP.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-DmQa3IAV.js.map
|