@mapvx/web-kit 1.2.0-develop.12 → 1.2.0-develop.14
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/chunks/{DRACOLoader-B7myelzS.cjs → DRACOLoader-B1Y7vbrj.cjs} +2 -2
- package/dist/cjs/chunks/{GLTFLoader-Bhlg-PN9.cjs → GLTFLoader-DrrfQ0_F.cjs} +2 -2
- package/dist/cjs/chunks/{KTX2Loader-8oVInPCY.cjs → KTX2Loader-BoLi8knA.cjs} +2 -2
- package/dist/cjs/chunks/{accessibility-DQMGPqEF.cjs → accessibility-Djzp33ox.cjs} +2 -2
- package/dist/cjs/chunks/{back_arrow-BT38PaNs.cjs → back_arrow-BPoJQerl.cjs} +2 -2
- package/dist/cjs/chunks/{debug-hooks-DDHLlDXD.cjs → debug-hooks-CMF1BR-2.cjs} +2 -2
- package/dist/cjs/chunks/{dist-Dqt88Zla.cjs → dist-B06OgE5W.cjs} +2 -2
- package/dist/cjs/chunks/{dist-BsZPOLf6.cjs → dist-DII2Jcfe.cjs} +2 -2
- package/dist/cjs/chunks/{dist-CdHuaZdF.cjs → dist-_3MDeFq6.cjs} +2 -2
- package/dist/cjs/chunks/{expression-DOSBosTT.cjs → expression-Dq2zVyIz.cjs} +2 -2
- package/dist/cjs/chunks/{globe-viewport-CTph-zTi.cjs → globe-viewport-s9VMxxMl.cjs} +2 -2
- package/dist/cjs/chunks/{icon-origin-point-BQq_v8fl.cjs → icon-origin-point-B07J_RrC.cjs} +2 -2
- package/dist/cjs/chunks/{meshopt_decoder.module-Xc0iTpWr.cjs → meshopt_decoder.module-CedN2Fs4.cjs} +2 -2
- package/dist/cjs/chunks/{repeat_icon-DgZwJHQn.cjs → repeat_icon-BwwtBUqw.cjs} +2 -2
- package/dist/cjs/chunks/{rolldown-runtime-DCHM1mdG.cjs → rolldown-runtime-S4XI6pHy.cjs} +2 -2
- package/dist/cjs/chunks/{shader-type-decoder-ClUxS2uC.cjs → shader-type-decoder-CplMa6Zn.cjs} +2 -2
- package/dist/cjs/chunks/{styles-ap7q_oUC.cjs → styles-eVk3as0O.cjs} +2 -2
- package/dist/cjs/chunks/{three.module-CZrl_ZUv.cjs → three.module-TyjyfRuV.cjs} +2 -2
- package/dist/cjs/chunks/{walking-zHHQi5LZ.cjs → walking-BXmnNjav.cjs} +2 -2
- package/dist/cjs/chunks/{webgl-CmboLkDs.cjs → webgl-C3A9O7UB.cjs} +2 -2
- package/dist/cjs/chunks/{webgl-device-BXkaCOiH.cjs → webgl-device-CR_IOS1K.cjs} +2 -2
- package/dist/cjs/web-kit.cjs +5 -5
- package/dist/es/chunks/{DRACOLoader-CNpxxqVh.js → DRACOLoader-D0vU8-Oo.js} +2 -2
- package/dist/es/chunks/{GLTFLoader-CbnWtZLU.js → GLTFLoader-DQ80Aq6X.js} +2 -2
- package/dist/es/chunks/{KTX2Loader-DA7PMnUh.js → KTX2Loader-Dh9k32r5.js} +2 -2
- package/dist/es/chunks/{accessibility-D1G0e3jm.js → accessibility-BG8JCwcH.js} +2 -2
- package/dist/es/chunks/{back_arrow-DOtCNdHS.js → back_arrow-CF2VEGV0.js} +2 -2
- package/dist/es/chunks/{debug-hooks-Cd_b4Bki.js → debug-hooks-D_XQuFlb.js} +2 -2
- package/dist/es/chunks/{dist-DXAjwVD1.js → dist-B7VX6I_c.js} +2 -2
- package/dist/es/chunks/{dist-DXRF-lm8.js → dist-CQzG76mh.js} +2 -2
- package/dist/es/chunks/{dist-CrKfguaO.js → dist-CcWEArpE.js} +2 -2
- package/dist/es/chunks/{expression-6f6kc1i6.js → expression-C7yC7-03.js} +2 -2
- package/dist/es/chunks/{globe-viewport-Brth2aT0.js → globe-viewport-D0Ev9_5m.js} +2 -2
- package/dist/es/chunks/{icon-origin-point-DWIRQVPT.js → icon-origin-point-C23InZ8B.js} +2 -2
- package/dist/es/chunks/{meshopt_decoder.module-Ch7mmZHA.js → meshopt_decoder.module-CrrPmGGq.js} +2 -2
- package/dist/es/chunks/{repeat_icon-D5mfHUaL.js → repeat_icon-BIa50JSA.js} +2 -2
- package/dist/es/chunks/{rolldown-runtime-BptZgroH.js → rolldown-runtime-CDBfnOLQ.js} +2 -2
- package/dist/es/chunks/{shader-type-decoder-CQKC8yW9.js → shader-type-decoder-CmsRL_mF.js} +2 -2
- package/dist/es/chunks/{styles-Be_VFWZ4.js → styles-CU6-Ggto.js} +2 -2
- package/dist/es/chunks/{three.module-CrfgWCl8.js → three.module-Df6wkceO.js} +2 -2
- package/dist/es/chunks/{walking-BRSMxmlG.js → walking-BY9QNI9o.js} +2 -2
- package/dist/es/chunks/{webgl-device-6J3R62SY.js → webgl-device-CjfmtXLr.js} +2 -2
- package/dist/es/chunks/{webgl-ClUuONJn.js → webgl-y_Wz0lFW.js} +2 -2
- package/dist/es/web-kit.mjs +5 -5
- package/dist/iife/web-kit.iife.js +3 -3
- package/dist/sw/mvx-tiles-sw.js +82 -49
- package/dist/types/index.d.ts +22 -22
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! Web-kit v1.2.0-develop.
|
|
2
|
-
!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"1.2.0-develop.12"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cd1c4ab9-e823-4b48-9d97-4e6f7e7fee2e",e._sentryDebugIdIdentifier="sentry-dbid-cd1c4ab9-e823-4b48-9d97-4e6f7e7fee2e")}catch(e){}}();var WebKit=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t=Object.create,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,s=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,a=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(i){throw n=[i],i}},l=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),c=(e,t)=>{let i={};for(var r in e)n(i,r,{get:e[r],enumerable:!0});return t||n(i,Symbol.toStringTag,{value:"Module"}),i},u=(e,a,l)=>(l=null!=e?t(s(e)):{},((e,t,s,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var l,c=r(t),u=0,h=c.length;u<h;u++)l=c[u],o.call(e,l)||l===s||n(e,l,{get:(e=>t[e]).bind(null,l),enumerable:!(a=i(t,l))||a.enumerable});return e})(!a&&e&&e.__esModule&&o.call(e,"default")?l:n(l,"default",{value:e,enumerable:!0}),e)),h=globalThis,d=h.ShadowRoot&&(void 0===h.ShadyCSS||h.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,p=Symbol(),f=new WeakMap,g=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==p)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(d&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=f.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&f.set(t,e))}return e}toString(){return this.cssText}},m=e=>new g("string"==typeof e?e:e+"",void 0,p),A=(e,...t)=>{const n=1===e.length?e[0]:t.reduce((t,n,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[i+1],e[0]);return new g(n,e,p)},y=d?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return m(t)})(e):e,{is:v,defineProperty:b,getOwnPropertyDescriptor:x,getOwnPropertyNames:_,getOwnPropertySymbols:w,getPrototypeOf:E}=Object,S=globalThis,C=S.trustedTypes,I=C?C.emptyScript:"",M=S.reactiveElementPolyfillSupport,T=(e,t)=>e,P={toAttribute(e,t){switch(t){case Boolean:e=e?I:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},R=(e,t)=>!v(e,t),D={attribute:!0,type:String,converter:P,reflect:!1,useDefault:!1,hasChanged:R};Symbol.metadata??=Symbol("metadata"),S.litPropertyMetadata??=new WeakMap;var L=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=D){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),i=this.getPropertyDescriptor(e,n,t);void 0!==i&&b(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){const{get:i,set:r}=x(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:i,set(t){const s=i?.call(this);r?.call(this,t),this.requestUpdate(e,s,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??D}static _$Ei(){if(this.hasOwnProperty(T("elementProperties")))return;const e=E(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(T("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(T("properties"))){const e=this.properties,t=[..._(e),...w(e)];for(const n of t)this.createProperty(n,e[n])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(const[t,n]of this.elementProperties){const e=this._$Eu(t,n);void 0!==e&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(y(e))}else void 0!==e&&t.push(y(e));return t}static _$Eu(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(d)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const n of t){const t=document.createElement("style"),i=h.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=n.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(void 0!==i&&!0===n.reflect){const r=(void 0!==n.converter?.toAttribute?n.converter:P).toAttribute(t,n.type);this._$Em=e,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(e,t){const n=this.constructor,i=n._$Eh.get(e);if(void 0!==i&&this._$Em!==i){const e=n.getPropertyOptions(i),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:P;this._$Em=i;const s=r.fromAttribute(t,e.type);this[i]=s??this._$Ej?.get(i)??s,this._$Em=null}}requestUpdate(e,t,n,i=!1,r){if(void 0!==e){const s=this.constructor;if(!1===i&&(r=this[e]),n??=s.getPropertyOptions(e),!((n.hasChanged??R)(r,t)||n.useDefault&&n.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:i,wrapped:r},s){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),!0!==r||void 0!==s)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===i&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,n]of e){const{wrapped:e}=n,i=this[t];!0!==e||this._$AL.has(t)||void 0===i||this.C(t,void 0,n,i)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};L.elementStyles=[],L.shadowRootOptions={mode:"open"},L[T("elementProperties")]=new Map,L[T("finalized")]=new Map,M?.({ReactiveElement:L}),(S.reactiveElementVersions??=[]).push("2.1.2");var B=globalThis,k=e=>e,F=B.trustedTypes,O=F?F.createPolicy("lit-html",{createHTML:e=>e}):void 0,z="$lit$",N=`lit$${Math.random().toFixed(9).slice(2)}$`,U="?"+N,G=`<${U}>`,j=document,V=()=>j.createComment(""),q=e=>null===e||"object"!=typeof e&&"function"!=typeof e,H=Array.isArray,Q=e=>H(e)||"function"==typeof e?.[Symbol.iterator],W="[ \t\n\f\r]",K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,Y=/>/g,X=RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),J=/'/g,$=/"/g,ee=/^(?:script|style|textarea|title)$/i,te=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),ne=te(1),ie=(te(2),te(3),Symbol.for("lit-noChange")),re=Symbol.for("lit-nothing"),se=new WeakMap,oe=j.createTreeWalker(j,129);function ae(e,t){if(!H(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==O?O.createHTML(t):t}var le=(e,t)=>{const n=e.length-1,i=[];let r,s=2===t?"<svg>":3===t?"<math>":"",o=K;for(let a=0;a<n;a++){const t=e[a];let n,l,c=-1,u=0;for(;u<t.length&&(o.lastIndex=u,l=o.exec(t),null!==l);)u=o.lastIndex,o===K?"!--"===l[1]?o=Z:void 0!==l[1]?o=Y:void 0!==l[2]?(ee.test(l[2])&&(r=RegExp("</"+l[2],"g")),o=X):void 0!==l[3]&&(o=X):o===X?">"===l[0]?(o=r??K,c=-1):void 0===l[1]?c=-2:(c=o.lastIndex-l[2].length,n=l[1],o=void 0===l[3]?X:'"'===l[3]?$:J):o===$||o===J?o=X:o===Z||o===Y?o=K:(o=X,r=void 0);const h=o===X&&e[a+1].startsWith("/>")?" ":"";s+=o===K?t+G:c>=0?(i.push(n),t.slice(0,c)+z+t.slice(c)+N+h):t+N+(-2===c?a:h)}return[ae(e,s+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]},ce=class e{constructor({strings:t,_$litType$:n},i){let r;this.parts=[];let s=0,o=0;const a=t.length-1,l=this.parts,[c,u]=le(t,n);if(this.el=e.createElement(c,i),oe.currentNode=this.el.content,2===n||3===n){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(r=oe.nextNode())&&l.length<a;){if(1===r.nodeType){if(r.hasAttributes())for(const e of r.getAttributeNames())if(e.endsWith(z)){const t=u[o++],n=r.getAttribute(e).split(N),i=/([.?@])?(.*)/.exec(t);l.push({type:1,index:s,name:i[2],strings:n,ctor:"."===i[1]?fe:"?"===i[1]?ge:"@"===i[1]?me:pe}),r.removeAttribute(e)}else e.startsWith(N)&&(l.push({type:6,index:s}),r.removeAttribute(e));if(ee.test(r.tagName)){const e=r.textContent.split(N),t=e.length-1;if(t>0){r.textContent=F?F.emptyScript:"";for(let n=0;n<t;n++)r.append(e[n],V()),oe.nextNode(),l.push({type:2,index:++s});r.append(e[t],V())}}}else if(8===r.nodeType)if(r.data===U)l.push({type:2,index:s});else{let e=-1;for(;-1!==(e=r.data.indexOf(N,e+1));)l.push({type:7,index:s}),e+=N.length-1}s++}}static createElement(e,t){const n=j.createElement("template");return n.innerHTML=e,n}};function ue(e,t,n=e,i){if(t===ie)return t;let r=void 0!==i?n._$Co?.[i]:n._$Cl;const s=q(t)?void 0:t._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),void 0===s?r=void 0:(r=new s(e),r._$AT(e,n,i)),void 0!==i?(n._$Co??=[])[i]=r:n._$Cl=r),void 0!==r&&(t=ue(e,r._$AS(e,t.values),r,i)),t}var he=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,i=(e?.creationScope??j).importNode(t,!0);oe.currentNode=i;let r=oe.nextNode(),s=0,o=0,a=n[0];for(;void 0!==a;){if(s===a.index){let t;2===a.type?t=new de(r,r.nextSibling,this,e):1===a.type?t=new a.ctor(r,a.name,a.strings,this,e):6===a.type&&(t=new Ae(r,this,e)),this._$AV.push(t),a=n[++o]}s!==a?.index&&(r=oe.nextNode(),s++)}return oe.currentNode=j,i}p(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}},de=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,i){this.type=2,this._$AH=re,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=ue(this,e,t),q(e)?e===re||null==e||""===e?(this._$AH!==re&&this._$AR(),this._$AH=re):e!==this._$AH&&e!==ie&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):Q(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==re&&q(this._$AH)?this._$AA.nextSibling.data=e:this.T(j.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:n}=e,i="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=ce.createElement(ae(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(t);else{const e=new he(i,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=se.get(e.strings);return void 0===t&&se.set(e.strings,t=new ce(e)),t}k(t){H(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,r=0;for(const s of t)r===n.length?n.push(i=new e(this.O(V()),this.O(V()),this,this.options)):i=n[r],i._$AI(s),r++;r<n.length&&(this._$AR(i&&i._$AB.nextSibling,r),n.length=r)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=k(e).nextSibling;k(e).remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}},pe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,i,r){this.type=1,this._$AH=re,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=re}_$AI(e,t=this,n,i){const r=this.strings;let s=!1;if(void 0===r)e=ue(this,e,t,0),s=!q(e)||e!==this._$AH&&e!==ie,s&&(this._$AH=e);else{const i=e;let o,a;for(e=r[0],o=0;o<r.length-1;o++)a=ue(this,i[n+o],t,o),a===ie&&(a=this._$AH[o]),s||=!q(a)||a!==this._$AH[o],a===re?e=re:e!==re&&(e+=(a??"")+r[o+1]),this._$AH[o]=a}s&&!i&&this.j(e)}j(e){e===re?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},fe=class extends pe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===re?void 0:e}},ge=class extends pe{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==re)}},me=class extends pe{constructor(e,t,n,i,r){super(e,t,n,i,r),this.type=5}_$AI(e,t=this){if((e=ue(this,e,t,0)??re)===ie)return;const n=this._$AH,i=e===re&&n!==re||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,r=e!==re&&(n===re||i);i&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ae=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){ue(this,e)}},ye={M:z,P:N,A:U,C:1,L:le,R:he,D:Q,V:ue,I:de,H:pe,N:ge,U:me,B:fe,F:Ae},ve=B.litHtmlPolyfillSupport;ve?.(ce,de),(B.litHtmlVersions??=[]).push("3.3.3");var be=(e,t,n)=>{const i=n?.renderBefore??t;let r=i._$litPart$;if(void 0===r){const e=n?.renderBefore??null;i._$litPart$=r=new de(t.insertBefore(V(),e),e,void 0,n??{})}return r._$AI(e),r},xe=globalThis,_e=class extends L{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=be(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ie}};_e._$litElement$=!0,_e.finalized=!0,xe.litElementHydrateSupport?.({LitElement:_e});var we=xe.litElementPolyfillSupport;we?.({LitElement:_e}),(xe.litElementVersions??=[]).push("4.2.2");var Ee=e=>(t,n)=>{void 0!==n?n.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},Se={attribute:!0,type:String,converter:P,reflect:!1,hasChanged:R},Ce=(e=Se,t,n)=>{const{kind:i,metadata:r}=n;let s=globalThis.litPropertyMetadata.get(r);if(void 0===s&&globalThis.litPropertyMetadata.set(r,s=new Map),"setter"===i&&((e=Object.create(e)).wrapped=!0),s.set(n.name,e),"accessor"===i){const{name:i}=n;return{set(n){const r=t.get.call(this);t.set.call(this,n),this.requestUpdate(i,r,e,!0,n)},init(t){return void 0!==t&&this.C(i,void 0,e,t),t}}}if("setter"===i){const{name:i}=n;return function(n){const r=this[i];t.call(this,n),this.requestUpdate(i,r,e,!0,n)}}throw Error("Unsupported decorator location: "+i)};function Ie(e){return(t,n)=>"object"==typeof n?Ce(e,t,n):((e,t,n)=>{const i=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),i?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function Me(e){return Ie({...e,state:!0,attribute:!1})}var Te=e=>e??re,Pe=class extends Event{constructor(e,t,n,i){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t,this.callback=n,this.subscribe=i??!1}};var Re=class{constructor(e,t,n,i){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(e,t)=>{this.unsubscribe&&(this.unsubscribe!==t&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=e,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(e,t)),this.unsubscribe=t},this.host=e,void 0!==t.context){const e=t;this.context=e.context,this.callback=e.callback,this.subscribe=e.subscribe??!1}else this.context=t,this.callback=n,this.subscribe=i??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Pe(this.context,this.host,this.t,this.subscribe))}},De=class{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,t=!1){const n=t||!Object.is(e,this.o);this.o=e,n&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(const[e,{disposer:t}]of this.subscriptions)e(this.o,t)},void 0!==e&&(this.value=e)}addCallback(e,t,n){if(!n)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:t});const{disposer:i}=this.subscriptions.get(e);e(this.value,i)}clearCallbacks(){this.subscriptions.clear()}},Le=class extends Event{constructor(e,t){super("context-provider",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t}},Be=class extends De{constructor(e,t,n){super(void 0!==t.context?t.initialValue:n),this.onContextRequest=e=>{if(e.context!==this.context)return;const t=e.contextTarget??e.composedPath()[0];t!==this.host&&(e.stopPropagation(),this.addCallback(e.callback,t,e.subscribe))},this.onProviderRequest=e=>{if(e.context!==this.context)return;if((e.contextTarget??e.composedPath()[0])===this.host)return;const t=new Set;for(const[n,{consumerHost:i}]of this.subscriptions)t.has(n)||(t.add(n),i.dispatchEvent(new Pe(this.context,i,n,!0)));e.stopPropagation()},this.host=e,void 0!==t.context?this.context=t.context:this.context=t,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new Le(this.context,this.host))}};function ke({context:e,subscribe:t}){return(n,i)=>{"object"==typeof i?i.addInitializer(function(){new Re(this,{context:e,callback:e=>{n.set.call(this,e)},subscribe:t})}):n.constructor.addInitializer(n=>{new Re(n,{context:e,callback:e=>{n[i]=e},subscribe:t})})}}var Fe={fromAttribute:e=>"false"!==e,toAttribute:String},Oe={fromAttribute:e=>null!==e&&"false"!==e,toAttribute:e=>e?"":null};function ze(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}var Ne=class extends _e{constructor(...e){super(...e),this.phase="idle",this.hideLoading=!1,this.loadingIcon="",this.loadingText="Cargando...",this.routeLoadingText="Generando ruta...",this.overrideText=void 0,this.lastChange={loading:!1,phase:"idle"}}static{this.styles=[m(":host{z-index:1000;pointer-events:none;display:block;position:absolute;inset:0}.loading-overlay{background:var(--loading-background,#fffffff2);opacity:0;flex-direction:column;justify-content:center;align-items:center;transition:opacity .3s ease-in-out;display:flex;position:absolute;inset:0}.loading-overlay:not(.hidden){opacity:1;pointer-events:auto}.loading-icon{width:var(--loading-icon-size,80px);height:var(--loading-icon-size,80px);object-fit:contain;margin-bottom:16px}.loading-spinner{width:var(--loading-spinner-size,48px);height:var(--loading-spinner-size,48px);border:4px solid var(--loading-spinner-track,#e9ecef);border-top-color:var(--loading-spinner-color,var(--mvx-primary-color,#212121));border-radius:50%;animation:1s linear infinite spin}.loading-text{font-family:var(--loading-font-family,var(--mvx-font-family,system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif));font-size:var(--loading-font-size,16px);font-weight:var(--loading-font-weight,500);color:var(--loading-text-color,var(--mvx-primary-color,#212121));margin-top:16px}@keyframes spin{to{transform:rotate(360deg)}}")]}get visible(){return!this.hideLoading&&"idle"!==this.phase}updated(e){super.updated(e),this.emitLoadingChange()}emitLoadingChange(){const e={loading:"idle"!==this.phase,phase:this.phase};this.lastChange.loading===e.loading&&this.lastChange.phase===e.phase||(this.lastChange=e,this.dispatchEvent(new CustomEvent("mvxLoadingChange",{detail:e,bubbles:!0,composed:!0})))}render(){const e=this.visible,t=this.overrideText??("route"===this.phase?this.routeLoadingText:this.loadingText);return ne`
|
|
1
|
+
/*! Web-kit v1.2.0-develop.14 | (c) 2026 MapVX */
|
|
2
|
+
!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"1.2.0-develop.14"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fabf278e-e0d3-474b-9894-33ec2c9dd255",e._sentryDebugIdIdentifier="sentry-dbid-fabf278e-e0d3-474b-9894-33ec2c9dd255")}catch(e){}}();var WebKit=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t=Object.create,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,s=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,a=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(i){throw n=[i],i}},l=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),c=(e,t)=>{let i={};for(var r in e)n(i,r,{get:e[r],enumerable:!0});return t||n(i,Symbol.toStringTag,{value:"Module"}),i},u=(e,a,l)=>(l=null!=e?t(s(e)):{},((e,t,s,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var l,c=r(t),u=0,h=c.length;u<h;u++)l=c[u],o.call(e,l)||l===s||n(e,l,{get:(e=>t[e]).bind(null,l),enumerable:!(a=i(t,l))||a.enumerable});return e})(!a&&e&&e.__esModule&&o.call(e,"default")?l:n(l,"default",{value:e,enumerable:!0}),e)),h=globalThis,d=h.ShadowRoot&&(void 0===h.ShadyCSS||h.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,p=Symbol(),f=new WeakMap,g=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==p)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(d&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=f.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&f.set(t,e))}return e}toString(){return this.cssText}},m=e=>new g("string"==typeof e?e:e+"",void 0,p),A=(e,...t)=>{const n=1===e.length?e[0]:t.reduce((t,n,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[i+1],e[0]);return new g(n,e,p)},y=d?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return m(t)})(e):e,{is:v,defineProperty:b,getOwnPropertyDescriptor:x,getOwnPropertyNames:_,getOwnPropertySymbols:w,getPrototypeOf:E}=Object,S=globalThis,C=S.trustedTypes,I=C?C.emptyScript:"",M=S.reactiveElementPolyfillSupport,T=(e,t)=>e,P={toAttribute(e,t){switch(t){case Boolean:e=e?I:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},R=(e,t)=>!v(e,t),D={attribute:!0,type:String,converter:P,reflect:!1,useDefault:!1,hasChanged:R};Symbol.metadata??=Symbol("metadata"),S.litPropertyMetadata??=new WeakMap;var L=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=D){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),i=this.getPropertyDescriptor(e,n,t);void 0!==i&&b(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){const{get:i,set:r}=x(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:i,set(t){const s=i?.call(this);r?.call(this,t),this.requestUpdate(e,s,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??D}static _$Ei(){if(this.hasOwnProperty(T("elementProperties")))return;const e=E(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(T("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(T("properties"))){const e=this.properties,t=[..._(e),...w(e)];for(const n of t)this.createProperty(n,e[n])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(const[t,n]of this.elementProperties){const e=this._$Eu(t,n);void 0!==e&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(y(e))}else void 0!==e&&t.push(y(e));return t}static _$Eu(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(d)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const n of t){const t=document.createElement("style"),i=h.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=n.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(void 0!==i&&!0===n.reflect){const r=(void 0!==n.converter?.toAttribute?n.converter:P).toAttribute(t,n.type);this._$Em=e,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(e,t){const n=this.constructor,i=n._$Eh.get(e);if(void 0!==i&&this._$Em!==i){const e=n.getPropertyOptions(i),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:P;this._$Em=i;const s=r.fromAttribute(t,e.type);this[i]=s??this._$Ej?.get(i)??s,this._$Em=null}}requestUpdate(e,t,n,i=!1,r){if(void 0!==e){const s=this.constructor;if(!1===i&&(r=this[e]),n??=s.getPropertyOptions(e),!((n.hasChanged??R)(r,t)||n.useDefault&&n.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:i,wrapped:r},s){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),!0!==r||void 0!==s)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===i&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,n]of e){const{wrapped:e}=n,i=this[t];!0!==e||this._$AL.has(t)||void 0===i||this.C(t,void 0,n,i)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};L.elementStyles=[],L.shadowRootOptions={mode:"open"},L[T("elementProperties")]=new Map,L[T("finalized")]=new Map,M?.({ReactiveElement:L}),(S.reactiveElementVersions??=[]).push("2.1.2");var B=globalThis,k=e=>e,F=B.trustedTypes,O=F?F.createPolicy("lit-html",{createHTML:e=>e}):void 0,z="$lit$",N=`lit$${Math.random().toFixed(9).slice(2)}$`,U="?"+N,G=`<${U}>`,j=document,V=()=>j.createComment(""),q=e=>null===e||"object"!=typeof e&&"function"!=typeof e,H=Array.isArray,Q=e=>H(e)||"function"==typeof e?.[Symbol.iterator],W="[ \t\n\f\r]",K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,Y=/>/g,X=RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),J=/'/g,$=/"/g,ee=/^(?:script|style|textarea|title)$/i,te=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),ne=te(1),ie=(te(2),te(3),Symbol.for("lit-noChange")),re=Symbol.for("lit-nothing"),se=new WeakMap,oe=j.createTreeWalker(j,129);function ae(e,t){if(!H(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==O?O.createHTML(t):t}var le=(e,t)=>{const n=e.length-1,i=[];let r,s=2===t?"<svg>":3===t?"<math>":"",o=K;for(let a=0;a<n;a++){const t=e[a];let n,l,c=-1,u=0;for(;u<t.length&&(o.lastIndex=u,l=o.exec(t),null!==l);)u=o.lastIndex,o===K?"!--"===l[1]?o=Z:void 0!==l[1]?o=Y:void 0!==l[2]?(ee.test(l[2])&&(r=RegExp("</"+l[2],"g")),o=X):void 0!==l[3]&&(o=X):o===X?">"===l[0]?(o=r??K,c=-1):void 0===l[1]?c=-2:(c=o.lastIndex-l[2].length,n=l[1],o=void 0===l[3]?X:'"'===l[3]?$:J):o===$||o===J?o=X:o===Z||o===Y?o=K:(o=X,r=void 0);const h=o===X&&e[a+1].startsWith("/>")?" ":"";s+=o===K?t+G:c>=0?(i.push(n),t.slice(0,c)+z+t.slice(c)+N+h):t+N+(-2===c?a:h)}return[ae(e,s+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]},ce=class e{constructor({strings:t,_$litType$:n},i){let r;this.parts=[];let s=0,o=0;const a=t.length-1,l=this.parts,[c,u]=le(t,n);if(this.el=e.createElement(c,i),oe.currentNode=this.el.content,2===n||3===n){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(r=oe.nextNode())&&l.length<a;){if(1===r.nodeType){if(r.hasAttributes())for(const e of r.getAttributeNames())if(e.endsWith(z)){const t=u[o++],n=r.getAttribute(e).split(N),i=/([.?@])?(.*)/.exec(t);l.push({type:1,index:s,name:i[2],strings:n,ctor:"."===i[1]?fe:"?"===i[1]?ge:"@"===i[1]?me:pe}),r.removeAttribute(e)}else e.startsWith(N)&&(l.push({type:6,index:s}),r.removeAttribute(e));if(ee.test(r.tagName)){const e=r.textContent.split(N),t=e.length-1;if(t>0){r.textContent=F?F.emptyScript:"";for(let n=0;n<t;n++)r.append(e[n],V()),oe.nextNode(),l.push({type:2,index:++s});r.append(e[t],V())}}}else if(8===r.nodeType)if(r.data===U)l.push({type:2,index:s});else{let e=-1;for(;-1!==(e=r.data.indexOf(N,e+1));)l.push({type:7,index:s}),e+=N.length-1}s++}}static createElement(e,t){const n=j.createElement("template");return n.innerHTML=e,n}};function ue(e,t,n=e,i){if(t===ie)return t;let r=void 0!==i?n._$Co?.[i]:n._$Cl;const s=q(t)?void 0:t._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),void 0===s?r=void 0:(r=new s(e),r._$AT(e,n,i)),void 0!==i?(n._$Co??=[])[i]=r:n._$Cl=r),void 0!==r&&(t=ue(e,r._$AS(e,t.values),r,i)),t}var he=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,i=(e?.creationScope??j).importNode(t,!0);oe.currentNode=i;let r=oe.nextNode(),s=0,o=0,a=n[0];for(;void 0!==a;){if(s===a.index){let t;2===a.type?t=new de(r,r.nextSibling,this,e):1===a.type?t=new a.ctor(r,a.name,a.strings,this,e):6===a.type&&(t=new Ae(r,this,e)),this._$AV.push(t),a=n[++o]}s!==a?.index&&(r=oe.nextNode(),s++)}return oe.currentNode=j,i}p(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}},de=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,i){this.type=2,this._$AH=re,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=ue(this,e,t),q(e)?e===re||null==e||""===e?(this._$AH!==re&&this._$AR(),this._$AH=re):e!==this._$AH&&e!==ie&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):Q(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==re&&q(this._$AH)?this._$AA.nextSibling.data=e:this.T(j.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:n}=e,i="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=ce.createElement(ae(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(t);else{const e=new he(i,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=se.get(e.strings);return void 0===t&&se.set(e.strings,t=new ce(e)),t}k(t){H(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,r=0;for(const s of t)r===n.length?n.push(i=new e(this.O(V()),this.O(V()),this,this.options)):i=n[r],i._$AI(s),r++;r<n.length&&(this._$AR(i&&i._$AB.nextSibling,r),n.length=r)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=k(e).nextSibling;k(e).remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}},pe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,i,r){this.type=1,this._$AH=re,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=re}_$AI(e,t=this,n,i){const r=this.strings;let s=!1;if(void 0===r)e=ue(this,e,t,0),s=!q(e)||e!==this._$AH&&e!==ie,s&&(this._$AH=e);else{const i=e;let o,a;for(e=r[0],o=0;o<r.length-1;o++)a=ue(this,i[n+o],t,o),a===ie&&(a=this._$AH[o]),s||=!q(a)||a!==this._$AH[o],a===re?e=re:e!==re&&(e+=(a??"")+r[o+1]),this._$AH[o]=a}s&&!i&&this.j(e)}j(e){e===re?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},fe=class extends pe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===re?void 0:e}},ge=class extends pe{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==re)}},me=class extends pe{constructor(e,t,n,i,r){super(e,t,n,i,r),this.type=5}_$AI(e,t=this){if((e=ue(this,e,t,0)??re)===ie)return;const n=this._$AH,i=e===re&&n!==re||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,r=e!==re&&(n===re||i);i&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ae=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){ue(this,e)}},ye={M:z,P:N,A:U,C:1,L:le,R:he,D:Q,V:ue,I:de,H:pe,N:ge,U:me,B:fe,F:Ae},ve=B.litHtmlPolyfillSupport;ve?.(ce,de),(B.litHtmlVersions??=[]).push("3.3.3");var be=(e,t,n)=>{const i=n?.renderBefore??t;let r=i._$litPart$;if(void 0===r){const e=n?.renderBefore??null;i._$litPart$=r=new de(t.insertBefore(V(),e),e,void 0,n??{})}return r._$AI(e),r},xe=globalThis,_e=class extends L{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=be(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ie}};_e._$litElement$=!0,_e.finalized=!0,xe.litElementHydrateSupport?.({LitElement:_e});var we=xe.litElementPolyfillSupport;we?.({LitElement:_e}),(xe.litElementVersions??=[]).push("4.2.2");var Ee=e=>(t,n)=>{void 0!==n?n.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},Se={attribute:!0,type:String,converter:P,reflect:!1,hasChanged:R},Ce=(e=Se,t,n)=>{const{kind:i,metadata:r}=n;let s=globalThis.litPropertyMetadata.get(r);if(void 0===s&&globalThis.litPropertyMetadata.set(r,s=new Map),"setter"===i&&((e=Object.create(e)).wrapped=!0),s.set(n.name,e),"accessor"===i){const{name:i}=n;return{set(n){const r=t.get.call(this);t.set.call(this,n),this.requestUpdate(i,r,e,!0,n)},init(t){return void 0!==t&&this.C(i,void 0,e,t),t}}}if("setter"===i){const{name:i}=n;return function(n){const r=this[i];t.call(this,n),this.requestUpdate(i,r,e,!0,n)}}throw Error("Unsupported decorator location: "+i)};function Ie(e){return(t,n)=>"object"==typeof n?Ce(e,t,n):((e,t,n)=>{const i=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),i?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function Me(e){return Ie({...e,state:!0,attribute:!1})}var Te=e=>e??re,Pe=class extends Event{constructor(e,t,n,i){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t,this.callback=n,this.subscribe=i??!1}};var Re=class{constructor(e,t,n,i){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(e,t)=>{this.unsubscribe&&(this.unsubscribe!==t&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=e,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(e,t)),this.unsubscribe=t},this.host=e,void 0!==t.context){const e=t;this.context=e.context,this.callback=e.callback,this.subscribe=e.subscribe??!1}else this.context=t,this.callback=n,this.subscribe=i??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Pe(this.context,this.host,this.t,this.subscribe))}},De=class{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,t=!1){const n=t||!Object.is(e,this.o);this.o=e,n&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(const[e,{disposer:t}]of this.subscriptions)e(this.o,t)},void 0!==e&&(this.value=e)}addCallback(e,t,n){if(!n)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:t});const{disposer:i}=this.subscriptions.get(e);e(this.value,i)}clearCallbacks(){this.subscriptions.clear()}},Le=class extends Event{constructor(e,t){super("context-provider",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t}},Be=class extends De{constructor(e,t,n){super(void 0!==t.context?t.initialValue:n),this.onContextRequest=e=>{if(e.context!==this.context)return;const t=e.contextTarget??e.composedPath()[0];t!==this.host&&(e.stopPropagation(),this.addCallback(e.callback,t,e.subscribe))},this.onProviderRequest=e=>{if(e.context!==this.context)return;if((e.contextTarget??e.composedPath()[0])===this.host)return;const t=new Set;for(const[n,{consumerHost:i}]of this.subscriptions)t.has(n)||(t.add(n),i.dispatchEvent(new Pe(this.context,i,n,!0)));e.stopPropagation()},this.host=e,void 0!==t.context?this.context=t.context:this.context=t,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new Le(this.context,this.host))}};function ke({context:e,subscribe:t}){return(n,i)=>{"object"==typeof i?i.addInitializer(function(){new Re(this,{context:e,callback:e=>{n.set.call(this,e)},subscribe:t})}):n.constructor.addInitializer(n=>{new Re(n,{context:e,callback:e=>{n[i]=e},subscribe:t})})}}var Fe={fromAttribute:e=>"false"!==e,toAttribute:String},Oe={fromAttribute:e=>null!==e&&"false"!==e,toAttribute:e=>e?"":null};function ze(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}var Ne=class extends _e{constructor(...e){super(...e),this.phase="idle",this.hideLoading=!1,this.loadingIcon="",this.loadingText="Cargando...",this.routeLoadingText="Generando ruta...",this.overrideText=void 0,this.lastChange={loading:!1,phase:"idle"}}static{this.styles=[m(":host{z-index:1000;pointer-events:none;display:block;position:absolute;inset:0}.loading-overlay{background:var(--loading-background,#fffffff2);opacity:0;flex-direction:column;justify-content:center;align-items:center;transition:opacity .3s ease-in-out;display:flex;position:absolute;inset:0}.loading-overlay:not(.hidden){opacity:1;pointer-events:auto}.loading-icon{width:var(--loading-icon-size,80px);height:var(--loading-icon-size,80px);object-fit:contain;margin-bottom:16px}.loading-spinner{width:var(--loading-spinner-size,48px);height:var(--loading-spinner-size,48px);border:4px solid var(--loading-spinner-track,#e9ecef);border-top-color:var(--loading-spinner-color,var(--mvx-primary-color,#212121));border-radius:50%;animation:1s linear infinite spin}.loading-text{font-family:var(--loading-font-family,var(--mvx-font-family,system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif));font-size:var(--loading-font-size,16px);font-weight:var(--loading-font-weight,500);color:var(--loading-text-color,var(--mvx-primary-color,#212121));margin-top:16px}@keyframes spin{to{transform:rotate(360deg)}}")]}get visible(){return!this.hideLoading&&"idle"!==this.phase}updated(e){super.updated(e),this.emitLoadingChange()}emitLoadingChange(){const e={loading:"idle"!==this.phase,phase:this.phase};this.lastChange.loading===e.loading&&this.lastChange.phase===e.phase||(this.lastChange=e,this.dispatchEvent(new CustomEvent("mvxLoadingChange",{detail:e,bubbles:!0,composed:!0})))}render(){const e=this.visible,t=this.overrideText??("route"===this.phase?this.routeLoadingText:this.loadingText);return ne`
|
|
3
3
|
<div
|
|
4
4
|
class="loading-overlay ${e?"":"hidden"}"
|
|
5
5
|
data-testid="map-loading"
|
|
@@ -410,4 +410,4 @@
|
|
|
410
410
|
</div>
|
|
411
411
|
`:""}
|
|
412
412
|
</div>
|
|
413
|
-
`}reloadMap(){this._customMap()?.reloadMap()}};return ze([Ie({type:String})],ytt.prototype,"apiKey",void 0),ze([Ie({type:String})],ytt.prototype,"parentPlaceId",void 0),ze([Ie({type:String})],ytt.prototype,"locale",void 0),ze([Ie({attribute:"enable-3d",converter:Fe})],ytt.prototype,"enable3D",void 0),ze([Ie({attribute:"scene-3d-place-ids",converter:{fromAttribute:e=>e?e.split(",").map(e=>e.trim()).filter(Boolean):[]}})],ytt.prototype,"scene3dPlaceIds",void 0),ze([Ie({type:String,attribute:"marker-variant"})],ytt.prototype,"markerVariant",void 0),ze([Ie({type:String})],ytt.prototype,"placeId",void 0),ze([Ie({type:String,attribute:"institution-id"})],ytt.prototype,"institutionId",void 0),ze([Ie({type:String,attribute:"institution-name"})],ytt.prototype,"institutionName",void 0),ze([Ie({type:Boolean,attribute:"compact-mode",reflect:!0})],ytt.prototype,"compactMode",void 0),ze([Ie({type:String,attribute:"zoom-size",reflect:!0})],ytt.prototype,"zoomButtonSize",void 0),ze([Ie({type:Number,attribute:"fit-max-zoom"})],ytt.prototype,"fitMaxZoom",void 0),ze([Ie({type:Number,attribute:"single-point-max-zoom"})],ytt.prototype,"singlePointMaxZoom",void 0),ze([Ie({type:Number,attribute:"route-fit-max-zoom"})],ytt.prototype,"routeFitMaxZoom",void 0),ze([Ie({type:Number,attribute:"camera-padding-top"})],ytt.prototype,"cameraPaddingTop",void 0),ze([Ie({type:Number,attribute:"camera-padding-right"})],ytt.prototype,"cameraPaddingRight",void 0),ze([Ie({type:Number,attribute:"camera-padding-bottom"})],ytt.prototype,"cameraPaddingBottom",void 0),ze([Ie({type:Number,attribute:"camera-padding-left"})],ytt.prototype,"cameraPaddingLeft",void 0),ze([Ie({type:String,attribute:"overlay-padding-mode"})],ytt.prototype,"overlayPaddingMode",void 0),ze([Ie({attribute:!1})],ytt.prototype,"cacheConfig",void 0),ze([Ie({attribute:"show-floor-selector",converter:Fe})],ytt.prototype,"showFloorSelector",void 0),ze([Ie({type:String,attribute:"floor-selector-position"})],ytt.prototype,"floorSelectorPosition",void 0),ze([Ie({attribute:"floor-selector-disabled",converter:Oe})],ytt.prototype,"floorSelectorDisabled",void 0),ze([Ie({attribute:"hide-loading",converter:Oe})],ytt.prototype,"hideLoading",void 0),ytt=ze([Ee("map-view-with-modal")],ytt),function(e="https://6bd40b60de94015425fdc35791d9eaff@sentry.mapvx.app/17"){if(!e||Fo)return Fo;const t=new ao({dsn:e,release:"web-kit@1.2.0-develop.
|
|
413
|
+
`}reloadMap(){this._customMap()?.reloadMap()}};return ze([Ie({type:String})],ytt.prototype,"apiKey",void 0),ze([Ie({type:String})],ytt.prototype,"parentPlaceId",void 0),ze([Ie({type:String})],ytt.prototype,"locale",void 0),ze([Ie({attribute:"enable-3d",converter:Fe})],ytt.prototype,"enable3D",void 0),ze([Ie({attribute:"scene-3d-place-ids",converter:{fromAttribute:e=>e?e.split(",").map(e=>e.trim()).filter(Boolean):[]}})],ytt.prototype,"scene3dPlaceIds",void 0),ze([Ie({type:String,attribute:"marker-variant"})],ytt.prototype,"markerVariant",void 0),ze([Ie({type:String})],ytt.prototype,"placeId",void 0),ze([Ie({type:String,attribute:"institution-id"})],ytt.prototype,"institutionId",void 0),ze([Ie({type:String,attribute:"institution-name"})],ytt.prototype,"institutionName",void 0),ze([Ie({type:Boolean,attribute:"compact-mode",reflect:!0})],ytt.prototype,"compactMode",void 0),ze([Ie({type:String,attribute:"zoom-size",reflect:!0})],ytt.prototype,"zoomButtonSize",void 0),ze([Ie({type:Number,attribute:"fit-max-zoom"})],ytt.prototype,"fitMaxZoom",void 0),ze([Ie({type:Number,attribute:"single-point-max-zoom"})],ytt.prototype,"singlePointMaxZoom",void 0),ze([Ie({type:Number,attribute:"route-fit-max-zoom"})],ytt.prototype,"routeFitMaxZoom",void 0),ze([Ie({type:Number,attribute:"camera-padding-top"})],ytt.prototype,"cameraPaddingTop",void 0),ze([Ie({type:Number,attribute:"camera-padding-right"})],ytt.prototype,"cameraPaddingRight",void 0),ze([Ie({type:Number,attribute:"camera-padding-bottom"})],ytt.prototype,"cameraPaddingBottom",void 0),ze([Ie({type:Number,attribute:"camera-padding-left"})],ytt.prototype,"cameraPaddingLeft",void 0),ze([Ie({type:String,attribute:"overlay-padding-mode"})],ytt.prototype,"overlayPaddingMode",void 0),ze([Ie({attribute:!1})],ytt.prototype,"cacheConfig",void 0),ze([Ie({attribute:"show-floor-selector",converter:Fe})],ytt.prototype,"showFloorSelector",void 0),ze([Ie({type:String,attribute:"floor-selector-position"})],ytt.prototype,"floorSelectorPosition",void 0),ze([Ie({attribute:"floor-selector-disabled",converter:Oe})],ytt.prototype,"floorSelectorDisabled",void 0),ze([Ie({attribute:"hide-loading",converter:Oe})],ytt.prototype,"hideLoading",void 0),ytt=ze([Ee("map-view-with-modal")],ytt),function(e="https://6bd40b60de94015425fdc35791d9eaff@sentry.mapvx.app/17"){if(!e||Fo)return Fo;const t=new ao({dsn:e,release:"web-kit@1.2.0-develop.14",transport:lo,stackParser:bo,integrations:[Zr(),Wr(),fs(),So(),wo(),ds(),Do(),zo(),ls(),Oo(),Po(),To()].filter(e=>"GlobalHandlers"!==e.name)});(Fo=new un).setClient(t),t.init()}(),e.CACHE_STORAGE_KEYS=F9e,e.DEFAULT_CACHE_CONFIG=D9e,e.DEFAULT_VECTOR_TILES_BASE_URL="https://tiles.mapvx.com/tiles",e.MVX_ERROR_EVENT=x9e,e.MVX_TILES_SW_PATH=ctt,e.MVX_TILES_SW_SCOPE="/",Object.defineProperty(e,"MapViewWithModal",{enumerable:!0,get:function(){return ytt}}),Object.defineProperty(e,"RouteViewTotems",{enumerable:!0,get:function(){return gtt}}),e.STORAGE_BYTES=T9e,e.TIME_MS=M9e,e.TOTEM_CACHE_CONFIG=P9e,e.WEB_CACHE_CONFIG=R9e,e.clearAllCacheStorage=function(){F9e.forEach(e=>{try{localStorage.removeItem(e)}catch{}})},e.mergeCacheConfig=L9e,e.registerAndTriggerTilePrefetch=async function(e){const t=await htt(e.swPath,e.swScope);return await utt(t),dtt(t,e),{registration:t,stopPeriodicRefresh:e.enablePeriodicRefresh?ptt(t,e):()=>{}}},e.registerMvxTileServiceWorker=htt,e.schedulePeriodicTileRefresh=ptt,e.triggerInitialTileLoad=dtt,e.waitForServiceWorkerReady=utt,e}({});
|
package/dist/sw/mvx-tiles-sw.js
CHANGED
|
@@ -51,7 +51,7 @@ const TILE_PREFETCH = {
|
|
|
51
51
|
|
|
52
52
|
function delay(ms) {
|
|
53
53
|
return new Promise((resolve) => {
|
|
54
|
-
|
|
54
|
+
globalThis.setTimeout(resolve, ms)
|
|
55
55
|
})
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -177,6 +177,64 @@ async function prefetchUrlsInBatches(cache, urls, signal) {
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
+
/** Fetches the tiles around `center` at `initialZoom`. Returns the budget left after phase 1. */
|
|
181
|
+
async function prefetchInitialZoomTiles(
|
|
182
|
+
cache,
|
|
183
|
+
center,
|
|
184
|
+
initialZoom,
|
|
185
|
+
trimmedKey,
|
|
186
|
+
vectorTilesBase,
|
|
187
|
+
budget,
|
|
188
|
+
signal,
|
|
189
|
+
) {
|
|
190
|
+
const phaseOne = tilesAroundCenter(center, initialZoom, TILE_PREFETCH.initialRadiusTiles)
|
|
191
|
+
const urlsPhaseOne = phaseOne
|
|
192
|
+
.slice(0, budget)
|
|
193
|
+
.map(({ z, x, y }) => buildVectorTileUrl(vectorTilesBase, z, x, y, trimmedKey))
|
|
194
|
+
|
|
195
|
+
console.log('[MVX-SW] Tile prefetch phase 1 (initial zoom only)', {
|
|
196
|
+
initialZoom,
|
|
197
|
+
tiles: urlsPhaseOne.length,
|
|
198
|
+
})
|
|
199
|
+
await prefetchUrlsInBatches(cache, urlsPhaseOne, signal)
|
|
200
|
+
return budget - urlsPhaseOne.length
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/** Progressively widens the prefetch to every other zoom level, closest to `initialZoom` first. */
|
|
204
|
+
async function prefetchRemainingZoomLevels(runContext, budget) {
|
|
205
|
+
const { cache, center, initialZoom, minZoom, maxZoom, trimmedKey, vectorTilesBase, signal } =
|
|
206
|
+
runContext
|
|
207
|
+
const otherZoomLevels = []
|
|
208
|
+
for (let z = minZoom; z <= maxZoom; z++) {
|
|
209
|
+
if (z !== initialZoom) {
|
|
210
|
+
otherZoomLevels.push(z)
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
otherZoomLevels.sort((a, b) => Math.abs(a - initialZoom) - Math.abs(b - initialZoom))
|
|
214
|
+
|
|
215
|
+
for (const zoom of otherZoomLevels) {
|
|
216
|
+
if (signal.aborted || budget <= 0) {
|
|
217
|
+
break
|
|
218
|
+
}
|
|
219
|
+
await delay(TILE_PREFETCH.zoomLevelGapMs)
|
|
220
|
+
if (signal.aborted) {
|
|
221
|
+
break
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const ring = tilesAroundCenter(center, zoom, TILE_PREFETCH.progressiveRadiusTiles)
|
|
225
|
+
const urls = ring
|
|
226
|
+
.slice(0, budget)
|
|
227
|
+
.map(({ z: zz, x, y }) => buildVectorTileUrl(vectorTilesBase, zz, x, y, trimmedKey))
|
|
228
|
+
budget -= urls.length
|
|
229
|
+
|
|
230
|
+
console.log('[MVX-SW] Tile prefetch background zoom', {
|
|
231
|
+
zoom,
|
|
232
|
+
tiles: urls.length,
|
|
233
|
+
})
|
|
234
|
+
await prefetchUrlsInBatches(cache, urls, signal)
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
180
238
|
async function progressivePrefetchTiles(apiKey, placeId, tilesBaseUrl) {
|
|
181
239
|
const trimmedKey = typeof apiKey === 'string' ? apiKey.trim() : ''
|
|
182
240
|
if (trimmedKey === '') {
|
|
@@ -221,54 +279,25 @@ async function progressivePrefetchTiles(apiKey, placeId, tilesBaseUrl) {
|
|
|
221
279
|
const maxZoom = Math.ceil(configuration.limitZoomIn ?? initialZoom + 2)
|
|
222
280
|
|
|
223
281
|
const cache = await caches.open(CACHE_TILES)
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
const urlsPhaseOne = phaseOne
|
|
228
|
-
.slice(0, budget)
|
|
229
|
-
.map(({ z, x, y }) => buildVectorTileUrl(vectorTilesBase, z, x, y, trimmedKey))
|
|
230
|
-
budget -= urlsPhaseOne.length
|
|
231
|
-
|
|
232
|
-
console.log('[MVX-SW] Tile prefetch phase 1 (initial zoom only)', {
|
|
282
|
+
const budgetAfterPhaseOne = await prefetchInitialZoomTiles(
|
|
283
|
+
cache,
|
|
284
|
+
center,
|
|
233
285
|
initialZoom,
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
286
|
+
trimmedKey,
|
|
287
|
+
vectorTilesBase,
|
|
288
|
+
TILE_PREFETCH.maxTilesPerRun,
|
|
289
|
+
signal,
|
|
290
|
+
)
|
|
237
291
|
|
|
238
|
-
if (signal.aborted ||
|
|
292
|
+
if (signal.aborted || budgetAfterPhaseOne <= 0) {
|
|
239
293
|
console.log('[MVX-SW] Tile prefetch stopped after phase 1')
|
|
240
294
|
return
|
|
241
295
|
}
|
|
242
296
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
otherZoomLevels.sort((a, b) => Math.abs(a - initialZoom) - Math.abs(b - initialZoom))
|
|
250
|
-
|
|
251
|
-
for (const zoom of otherZoomLevels) {
|
|
252
|
-
if (signal.aborted || budget <= 0) {
|
|
253
|
-
break
|
|
254
|
-
}
|
|
255
|
-
await delay(TILE_PREFETCH.zoomLevelGapMs)
|
|
256
|
-
if (signal.aborted) {
|
|
257
|
-
break
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
const ring = tilesAroundCenter(center, zoom, TILE_PREFETCH.progressiveRadiusTiles)
|
|
261
|
-
const urls = ring
|
|
262
|
-
.slice(0, budget)
|
|
263
|
-
.map(({ z: zz, x, y }) => buildVectorTileUrl(vectorTilesBase, zz, x, y, trimmedKey))
|
|
264
|
-
budget -= urls.length
|
|
265
|
-
|
|
266
|
-
console.log('[MVX-SW] Tile prefetch background zoom', {
|
|
267
|
-
zoom,
|
|
268
|
-
tiles: urls.length,
|
|
269
|
-
})
|
|
270
|
-
await prefetchUrlsInBatches(cache, urls, signal)
|
|
271
|
-
}
|
|
297
|
+
await prefetchRemainingZoomLevels(
|
|
298
|
+
{ cache, center, initialZoom, minZoom, maxZoom, trimmedKey, vectorTilesBase, signal },
|
|
299
|
+
budgetAfterPhaseOne,
|
|
300
|
+
)
|
|
272
301
|
|
|
273
302
|
console.log('[MVX-SW] Progressive tile prefetch finished')
|
|
274
303
|
} catch (err) {
|
|
@@ -300,12 +329,12 @@ async function resetAndUnregister() {
|
|
|
300
329
|
console.warn('[MVX-SW] resetAndUnregister: clear caches failed', err)
|
|
301
330
|
}
|
|
302
331
|
try {
|
|
303
|
-
await
|
|
332
|
+
await globalThis.registration.unregister()
|
|
304
333
|
} catch (err) {
|
|
305
334
|
console.warn('[MVX-SW] resetAndUnregister: unregister failed', err)
|
|
306
335
|
}
|
|
307
336
|
try {
|
|
308
|
-
const clients = await
|
|
337
|
+
const clients = await globalThis.clients.matchAll({ type: 'window' })
|
|
309
338
|
for (const client of clients) {
|
|
310
339
|
try {
|
|
311
340
|
client.postMessage({ type: 'SW_RESET_DONE' })
|
|
@@ -319,7 +348,7 @@ async function resetAndUnregister() {
|
|
|
319
348
|
}
|
|
320
349
|
|
|
321
350
|
function notifyClients(message) {
|
|
322
|
-
|
|
351
|
+
globalThis.clients
|
|
323
352
|
.matchAll({ includeUncontrolled: true })
|
|
324
353
|
.then((clients) => {
|
|
325
354
|
clients.forEach((client) => {
|
|
@@ -343,7 +372,7 @@ const ALLOWED_HOSTS = [
|
|
|
343
372
|
]
|
|
344
373
|
const isAllowedHost = (hostname) => ALLOWED_HOSTS.some((host) => hostname.endsWith(host))
|
|
345
374
|
|
|
346
|
-
|
|
375
|
+
globalThis.skipWaiting()
|
|
347
376
|
workbox.core.clientsClaim()
|
|
348
377
|
workbox.core.setCacheNameDetails({ prefix: 'mvx' })
|
|
349
378
|
workbox.precaching.cleanupOutdatedCaches()
|
|
@@ -504,7 +533,7 @@ registerRoute(
|
|
|
504
533
|
}),
|
|
505
534
|
)
|
|
506
535
|
|
|
507
|
-
|
|
536
|
+
globalThis.addEventListener('activate', (event) => {
|
|
508
537
|
event.waitUntil(
|
|
509
538
|
(async () => {
|
|
510
539
|
try {
|
|
@@ -530,7 +559,11 @@ self.addEventListener('activate', (event) => {
|
|
|
530
559
|
)
|
|
531
560
|
})
|
|
532
561
|
|
|
533
|
-
|
|
562
|
+
globalThis.addEventListener('message', (event) => {
|
|
563
|
+
// A controlled client can only ever be same-origin with its service worker, but Workbox's own
|
|
564
|
+
// message listeners don't check this, and neither did this file until now -- check it anyway,
|
|
565
|
+
// defense in depth against whatever reaches this handler.
|
|
566
|
+
if (event.origin !== globalThis.location.origin) return
|
|
534
567
|
if (!isValidMessage(event.data)) return
|
|
535
568
|
|
|
536
569
|
switch (event.data.type) {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -417,7 +417,7 @@ declare class FloorSelectorSizeController implements ReactiveController {
|
|
|
417
417
|
}
|
|
418
418
|
|
|
419
419
|
export declare class MapViewWithModal extends LitElement {
|
|
420
|
-
static styles: CSSResult[];
|
|
420
|
+
static readonly styles: CSSResult[];
|
|
421
421
|
apiKey: string;
|
|
422
422
|
parentPlaceId: string;
|
|
423
423
|
locale: string;
|
|
@@ -527,8 +527,8 @@ export declare class MapViewWithModal extends LitElement {
|
|
|
527
527
|
firstUpdated(): void;
|
|
528
528
|
/** Same shape as the reference's own `baseParams()`: no route, so no destination/origin fields. */
|
|
529
529
|
private baseParams;
|
|
530
|
-
private _mapReadyHandler;
|
|
531
|
-
private _cameraInitializedHandler;
|
|
530
|
+
private readonly _mapReadyHandler;
|
|
531
|
+
private readonly _cameraInitializedHandler;
|
|
532
532
|
/**
|
|
533
533
|
* The floor id this handler last reported `floor_change` analytics for — this element's own
|
|
534
534
|
* dedupe, independent of `FloorController.setFloor()`'s return value (review round 1, finding 1).
|
|
@@ -1110,7 +1110,7 @@ declare class RouteController implements ReactiveController {
|
|
|
1110
1110
|
export declare type RoutePanelVariant = 'full' | 'compact';
|
|
1111
1111
|
|
|
1112
1112
|
export declare class RouteViewTotems extends LitElement {
|
|
1113
|
-
static styles: CSSResult[];
|
|
1113
|
+
static readonly styles: CSSResult[];
|
|
1114
1114
|
apiKey: string;
|
|
1115
1115
|
parentPlaceId: string;
|
|
1116
1116
|
/**
|
|
@@ -1348,16 +1348,16 @@ export declare class RouteViewTotems extends LitElement {
|
|
|
1348
1348
|
private _customMap;
|
|
1349
1349
|
firstUpdated(): void;
|
|
1350
1350
|
private sendEvent;
|
|
1351
|
-
private _mapReadyHandler;
|
|
1352
|
-
private _cameraInitializedHandler;
|
|
1351
|
+
private readonly _mapReadyHandler;
|
|
1352
|
+
private readonly _cameraInitializedHandler;
|
|
1353
1353
|
willUpdate(changedProperties: PropertyValues): void;
|
|
1354
1354
|
updated(changedProperties: PropertyValues): void;
|
|
1355
1355
|
render(): TemplateResult<1>;
|
|
1356
|
-
private _floorChangeHandler;
|
|
1357
|
-
private _accessibilityChangeHandler;
|
|
1358
|
-
private _repeatRouteHandler;
|
|
1359
|
-
private _generateRouteHandler;
|
|
1360
|
-
private _backHandler;
|
|
1356
|
+
private readonly _floorChangeHandler;
|
|
1357
|
+
private readonly _accessibilityChangeHandler;
|
|
1358
|
+
private readonly _repeatRouteHandler;
|
|
1359
|
+
private readonly _generateRouteHandler;
|
|
1360
|
+
private readonly _backHandler;
|
|
1361
1361
|
/**
|
|
1362
1362
|
* Turns `<custom-map>`'s `startRouteAnimation`/`routeAnimationFinished` events, and
|
|
1363
1363
|
* `<route-options>`'s `repeatRoute` event, into the matching `RouteController` call. This is the
|
|
@@ -1367,9 +1367,9 @@ export declare class RouteViewTotems extends LitElement {
|
|
|
1367
1367
|
* `route-view-totems.test.ts`'s "route animation wiring" suite for the regression test proving a
|
|
1368
1368
|
* natural finish does not trigger a restart.
|
|
1369
1369
|
*/
|
|
1370
|
-
private _startRouteAnimationHandler;
|
|
1371
|
-
private _routeAnimationFinishedHandler;
|
|
1372
|
-
private _dismissRouteErrorHandler;
|
|
1370
|
+
private readonly _startRouteAnimationHandler;
|
|
1371
|
+
private readonly _routeAnimationFinishedHandler;
|
|
1372
|
+
private readonly _dismissRouteErrorHandler;
|
|
1373
1373
|
/**
|
|
1374
1374
|
* Updates the component's origin/destination/floor/route-type without requiring a "back" event.
|
|
1375
1375
|
* Delegates to the inner `<custom-map>`'s own `updateComponent()` (see this class's doc comment for
|
|
@@ -1669,13 +1669,6 @@ declare global {
|
|
|
1669
1669
|
}
|
|
1670
1670
|
|
|
1671
1671
|
|
|
1672
|
-
declare global {
|
|
1673
|
-
interface HTMLElementTagNameMap {
|
|
1674
|
-
'map-view-with-modal': MapViewWithModal;
|
|
1675
|
-
}
|
|
1676
|
-
}
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
1672
|
declare global {
|
|
1680
1673
|
interface HTMLElementEventMap {
|
|
1681
1674
|
mvxError: CustomEvent<MvxErrorDetail>;
|
|
@@ -1712,7 +1705,7 @@ declare global {
|
|
|
1712
1705
|
|
|
1713
1706
|
declare global {
|
|
1714
1707
|
interface HTMLElementTagNameMap {
|
|
1715
|
-
'
|
|
1708
|
+
'map-view-with-modal': MapViewWithModal;
|
|
1716
1709
|
}
|
|
1717
1710
|
}
|
|
1718
1711
|
|
|
@@ -1731,6 +1724,13 @@ declare global {
|
|
|
1731
1724
|
}
|
|
1732
1725
|
|
|
1733
1726
|
|
|
1727
|
+
declare global {
|
|
1728
|
+
interface HTMLElementTagNameMap {
|
|
1729
|
+
'compact-floor-selector': CompactFloorSelector;
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
|
|
1734
1734
|
declare global {
|
|
1735
1735
|
interface HTMLElementTagNameMap {
|
|
1736
1736
|
'qr-modal': QRModal;
|
package/package.json
CHANGED