PageSourceSearch

https://sushi-friday.ru/_nuxt/Nj3vMYvN.js

js sushi-friday.ru collected 2026-10-07 02:00:44 UTC 1,753,516 bytes, 834 lines download raw bytes

vendor: 1,787 bytes, lines 1-5
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./D3Ziv3Ng.js","./BVgotEKn.js","./ZW6MiWoW.js","./DE36_pCZ.js","./Dz24XT1Q.js","./Cpw1pHZ0.js","./Dsadi8BM.js","./DK3od3NY.js","./Dhd9dOlY.js","./JO6gYhjY.js","./DzE7u7Ga.js","./nuxt-icon.BdpeBhx2.css","./Q0-43ZJG.js","./C4n8VPvI.js","./DPlXM9rm.js","./U7962lAc.js","./CSaMKaqb.js","./index.Yz957h8x.css","./DxK6vHE0.js","./Dwgtv_78.js","./CizyrcmU.js","./D8z_QsYl.js","./Buk3vGe4.js","./DxiugkuS.js","./default.MMLiCstr.css","./CGXdhSm_.js","./maptiler-sdk.ByrYCltZ.css"])))=>i.map(i=>d[i]);
2var p3=Object.defineProperty;var oC=e=>{throw TypeError(e)};var m3=(e,t,r)=>t in e?p3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var oa=(e,t,r)=>m3(e,typeof t!="symbol"?t+"":t,r),g3=(e,t,r)=>t.has(e)||oC("Cannot "+r);var Tp=(e,t,r)=>(g3(e,t,"read from private field"),r?r.call(e):t.get(e)),aC=(e,t,r)=>t.has(e)?oC("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const h of a)if(h.type==="childList")for(const d of h.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function r(a){const h={};return a.integrity&&(h.integrity=a.integrity),a.referrerPolicy&&(h.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?h.credentials="include":a.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function i(a){if(a.ep)return;a.ep=!0;const h=r(a);fetch(a.href,h)}})();/**
3* @vue/shared v3.5.17
4* (c) 2018-present Yuxi (Evan) You and Vue contributors
5* @license MIT
6**//*! #__NO_SIDE_EFFECTS__ */function wv(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}const Gr={},pd=[],io=()=>{},y3=()=>!1,Bm=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Mw=e=>e.startsWith("onUpdate:"),mn=Object.assign,Rw=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},_3=Object.prototype.hasOwnProperty,Qr=(e,t)=>_3.call(e,t),$t=Array.isArray,md=e=>Ud(e)==="[object Map]",Hu=e=>Ud(e)==="[object Set]",lC=e=>Ud(e)==="[object Date]",v3=e=>Ud(e)==="[object RegExp]",sr=e=>typeof e=="function",In=e=>typeof e=="string",Fo=e=>typeof e=="symbol",fn=e=>e!==null&&typeof e=="object",Lw=e=>(fn(e)||sr(e))&&sr(e.then)&&sr(e.catch),wP=Object.prototype.toString,Ud=e=>wP.call(e),b3=e=>Ud(e).slice(8,-1),Sv=e=>Ud(e)==="[object Object]",zw=e=>In(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,gd=wv(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Tv=e=>{const t=Object.create(null);return r=>t[r]||(t[r]=e(r))},x3=/-(\w)/g,Ai=Tv(e=>e.replace(x3,(t,r)=>r?r.toUpperCase():"")),w3=/\B([A-Z])/g,Cs=Tv(e=>e.replace(w3,"-$1").toLowerCase()),Cv=Tv(e=>e.charAt(0).toUpperCase()+e.slice(1)),Up=Tv(e=>e?`on${Cv(e)}`:""),hs=(e,t)=>!Object.is(e,t),yd=(e,...t)=>{for(let r=0;r<e.length;r++)e[r](...t)},$x=(e,t,r,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:r})},S_=e=>{const t=parseFloat(e);return isNaN(t)?e:t},T_=e=>{const t=In(e)?Number(e):NaN;return isNaN(t)?e:t};let cC;const Ev=()=>cC||(cC=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),S3="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",T3=wv(S3);function fl(e){if($t(e)){const t={};for(let r=0;r<e.length;r++){const i=e[r],a=In(i)?I3(i):fl(i);if(a)for(const h in a)t[h]=a[h]}return t}else if(In(e)||fn(e))return e}const C3=/;(?![^(]*\))/g,E3=/:([^]+)/,k3=/\/\*[^]*?\*\//g;function I3(e){const t={};return e.replace(k3,"").split(C3).forEach(r=>{if(r){const i=r.split(E3);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function bi(e){let t="";if(In(e))t=e;else if($t(e))for(let r=0;r<e.length;r++){const i=bi(e[r]);i&&(t+=i+" ")}else if(fn(e))for(const r in e)e[r]&&(t+=r+" ");return t.trim()}function xa(e){if(!e)return null;let{class:t,style:r}=e;return t&&!In(t)&&(e.class=bi(t)),r&&(e.style=fl(r)),e}const P3="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",A3=wv(P3);function SP(e){return!!e||e===""}function M3(e,t){if(e.length!==t.length)return!1;let r=!0;for(let i=0;r&&i<e.length;i++)r=dc(e[i],t[i]);return r}function dc(e,t){if(e===t)return!0;let r=lC(e),i=lC(t);if(r||i)return r&&i?e.getTime()===t.getTime():!1;if(r=Fo(e),i=Fo(t),r||i)return e===t;if(r=$t(e),i=$t(t),r||i)return r&&i?M3(e,t):!1;if(r=fn(e),i=fn(t),r||i){if(!r||!i)return!1;const a=Object.keys(e).length,h=Object.keys(t).length;if(a!==h)return!1;for(const d in e){const o=e.hasOwnProperty(d),y=t.hasOwnProperty(d);if(o&&!y||!o&&y||!dc(e[d],t[d]))return!1}}return String(e)===String(t)}function kv(e,t){return e.findIndex(r=>dc(r,t))}const TP=e=>!!(e&&e.__v_isRef===!0),Mo=e=>In(e)?e:e==null?"":$t(e)||fn(e)&&(e.toString===wP||!sr(e.toString))?TP(e)?Mo(e.value):JSON.stringify(e,CP,2):String(e),CP=(e,t)=>TP(t)?CP(e,t.value):md(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[i,a],h)=>(r[Fb(i,h)+" =>"]=a,r),{})}:Hu(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>Fb(r))}:Fo(t)?Fb(t):fn(t)&&!$t(t)&&!Sv(t)?String(t):t,Fb=(e,t="")=>{var r;return Fo(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};/**
7* @vue/reactivity v3.5.17
8* (c) 2018-present Yuxi (Evan) You and Vue contributors
9* @license MIT
vendor: 17,355 bytes, lines 10-13
10**/let Wi;class EP{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Wi,!t&&Wi&&(this.index=(Wi.scopes||(Wi.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,r;if(this.scopes)for(t=0,r=this.scopes.length;t<r;t++)this.scopes[t].pause();for(t=0,r=this.effects.length;t<r;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,r;if(this.scopes)for(t=0,r=this.scopes.length;t<r;t++)this.scopes[t].resume();for(t=0,r=this.effects.length;t<r;t++)this.effects[t].resume()}}run(t){if(this._active){const r=Wi;try{return Wi=this,t()}finally{Wi=r}}}on(){++this._on===1&&(this.prevScope=Wi,Wi=this)}off(){this._on>0&&--this._on===0&&(Wi=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let r,i;for(r=0,i=this.effects.length;r<i;r++)this.effects[r].stop();for(this.effects.length=0,r=0,i=this.cleanups.length;r<i;r++)this.cleanups[r]();if(this.cleanups.length=0,this.scopes){for(r=0,i=this.scopes.length;r<i;r++)this.scopes[r].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const a=this.parent.scopes.pop();a&&a!==this&&(this.parent.scopes[this.index]=a,a.index=this.index)}this.parent=void 0}}}function Vd(e){return new EP(e)}function Zu(){return Wi}function kd(e,t=!1){Wi&&Wi.cleanups.push(e)}let Tn;const Bb=new WeakSet;class C_{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Wi&&Wi.active&&Wi.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Bb.has(this)&&(Bb.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||IP(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,uC(this),PP(this);const t=Tn,r=Do;Tn=this,Do=!0;try{return this.fn()}finally{AP(this),Tn=t,Do=r,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Fw(t);this.deps=this.depsTail=void 0,uC(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Bb.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ux(this)&&this.run()}get dirty(){return Ux(this)}}let kP=0,Vp,qp;function IP(e,t=!1){if(e.flags|=8,t){e.next=qp,qp=e;return}e.next=Vp,Vp=e}function Dw(){kP++}function Ow(){if(--kP>0)return;if(qp){let t=qp;for(qp=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;Vp;){let t=Vp;for(Vp=void 0;t;){const r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=r}}if(e)throw e}function PP(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function AP(e){let t,r=e.depsTail,i=r;for(;i;){const a=i.prevDep;i.version===-1?(i===r&&(r=a),Fw(i),R3(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=a}e.deps=t,e.depsTail=r}function Ux(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(MP(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function MP(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===cm)||(e.globalVersion=cm,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ux(e))))return;e.flags|=2;const t=e.dep,r=Tn,i=Do;Tn=e,Do=!0;try{PP(e);const a=e.fn(e._value);(t.version===0||hs(a,e._value))&&(e.flags|=128,e._value=a,t.version++)}catch(a){throw t.version++,a}finally{Tn=r,Do=i,AP(e),e.flags&=-3}}function Fw(e,t=!1){const{dep:r,prevSub:i,nextSub:a}=e;if(i&&(i.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=i,e.nextSub=void 0),r.subs===e&&(r.subs=i,!i&&r.computed)){r.computed.flags&=-5;for(let h=r.computed.deps;h;h=h.nextDep)Fw(h,!0)}!t&&!--r.sc&&r.map&&r.map.delete(r.key)}function R3(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}function xte(e,t){e.effect instanceof C_&&(e=e.effect.fn);const r=new C_(e);t&&mn(r,t);try{r.run()}catch(a){throw r.stop(),a}const i=r.run.bind(r);return i.effect=r,i}function wte(e){e.effect.stop()}let Do=!0;const RP=[];function ol(){RP.push(Do),Do=!1}function al(){const e=RP.pop();Do=e===void 0?!0:e}function uC(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=Tn;Tn=void 0;try{t()}finally{Tn=r}}}let cm=0;class L3{constructor(t,r){this.sub=t,this.dep=r,this.version=r.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Iv{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Tn||!Do||Tn===this.computed)return;let r=this.activeLink;if(r===void 0||r.sub!==Tn)r=this.activeLink=new L3(Tn,this),Tn.deps?(r.prevDep=Tn.depsTail,Tn.depsTail.nextDep=r,Tn.depsTail=r):Tn.deps=Tn.depsTail=r,LP(r);else if(r.version===-1&&(r.version=this.version,r.nextDep)){const i=r.nextDep;i.prevDep=r.prevDep,r.prevDep&&(r.prevDep.nextDep=i),r.prevDep=Tn.depsTail,r.nextDep=void 0,Tn.depsTail.nextDep=r,Tn.depsTail=r,Tn.deps===r&&(Tn.deps=i)}return r}trigger(t){this.version++,cm++,this.notify(t)}notify(t){Dw();try{for(let r=this.subs;r;r=r.prevSub)r.sub.notify()&&r.sub.dep.notify()}finally{Ow()}}}function LP(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)LP(i)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}const E_=new WeakMap,Eu=Symbol(""),Vx=Symbol(""),um=Symbol("");function Xi(e,t,r){if(Do&&Tn){let i=E_.get(e);i||E_.set(e,i=new Map);let a=i.get(r);a||(i.set(r,a=new Iv),a.map=i,a.key=r),a.track()}}function Xa(e,t,r,i,a,h){const d=E_.get(e);if(!d){cm++;return}const o=y=>{y&&y.trigger()};if(Dw(),t==="clear")d.forEach(o);else{const y=$t(e),w=y&&zw(r);if(y&&r==="length"){const T=Number(i);d.forEach((k,M)=>{(M==="length"||M===um||!Fo(M)&&M>=T)&&o(k)})}else switch((r!==void 0||d.has(void 0))&&o(d.get(r)),w&&o(d.get(um)),t){case"add":y?w&&o(d.get("length")):(o(d.get(Eu)),md(e)&&o(d.get(Vx)));break;case"delete":y||(o(d.get(Eu)),md(e)&&o(d.get(Vx)));break;case"set":md(e)&&o(d.get(Eu));break}}Ow()}function z3(e,t){const r=E_.get(e);return r&&r.get(t)}function Jh(e){const t=qr(e);return t===e?t:(Xi(t,"iterate",um),so(e)?t:t.map($i))}function Pv(e){return Xi(e=qr(e),"iterate",um),e}const D3={__proto__:null,[Symbol.iterator](){return Nb(this,Symbol.iterator,$i)},concat(...e){return Jh(this).concat(...e.map(t=>$t(t)?Jh(t):t))},entries(){return Nb(this,"entries",e=>(e[1]=$i(e[1]),e))},every(e,t){return Va(this,"every",e,t,void 0,arguments)},filter(e,t){return Va(this,"filter",e,t,r=>r.map($i),arguments)},find(e,t){return Va(this,"find",e,t,$i,arguments)},findIndex(e,t){return Va(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Va(this,"findLast",e,t,$i,arguments)},findLastIndex(e,t){return Va(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Va(this,"forEach",e,t,void 0,arguments)},includes(...e){return jb(this,"includes",e)},indexOf(...e){return jb(this,"indexOf",e)},join(e){return Jh(this).join(e)},lastIndexOf(...e){return jb(this,"lastIndexOf",e)},map(e,t){return Va(this,"map",e,t,void 0,arguments)},pop(){return Cp(this,"pop")},push(...e){return Cp(this,"push",e)},reduce(e,...t){return hC(this,"reduce",e,t)},reduceRight(e,...t){return hC(this,"reduceRight",e,t)},shift(){return Cp(this,"shift")},some(e,t){return Va(this,"some",e,t,void 0,arguments)},splice(...e){return Cp(this,"splice",e)},toReversed(){return Jh(this).toReversed()},toSorted(e){return Jh(this).toSorted(e)},toSpliced(...e){return Jh(this).toSpliced(...e)},unshift(...e){return Cp(this,"unshift",e)},values(){return Nb(this,"values",$i)}};function Nb(e,t,r){const i=Pv(e),a=i[t]();return i!==e&&!so(e)&&(a._next=a.next,a.next=()=>{const h=a._next();return h.value&&(h.value=r(h.value)),h}),a}const O3=Array.prototype;function Va(e,t,r,i,a,h){const d=Pv(e),o=d!==e&&!so(e),y=d[t];if(y!==O3[t]){const k=y.apply(e,h);return o?$i(k):k}let w=r;d!==e&&(o?w=function(k,M){return r.call(this,$i(k),M,e)}:r.length>2&&(w=function(k,M){return r.call(this,k,M,e)}));const T=y.call(d,w,i);return o&&a?a(T):T}function hC(e,t,r,i){const a=Pv(e);let h=r;return a!==e&&(so(e)?r.length>3&&(h=function(d,o,y){return r.call(this,d,o,y,e)}):h=function(d,o,y){return r.call(this,d,$i(o),y,e)}),a[t](h,...i)}function jb(e,t,r){const i=qr(e);Xi(i,"iterate",um);const a=i[t](...r);return(a===-1||a===!1)&&Bw(r[0])?(r[0]=qr(r[0]),i[t](...r)):a}function Cp(e,t,r=[]){ol(),Dw();const i=qr(e)[t].apply(e,r);return Ow(),al(),i}const F3=wv("__proto__,__v_isRef,__isVue"),zP=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Fo));function B3(e){Fo(e)||(e=String(e));const t=qr(this);return Xi(t,"has",e),t.hasOwnProperty(e)}class DP{constructor(t=!1,r=!1){this._isReadonly=t,this._isShallow=r}get(t,r,i){if(r==="__v_skip")return t.__v_skip;const a=this._isReadonly,h=this._isShallow;if(r==="__v_isReactive")return!a;if(r==="__v_isReadonly")return a;if(r==="__v_isShallow")return h;if(r==="__v_raw")return i===(a?h?$P:jP:h?NP:BP).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const d=$t(t);if(!a){let y;if(d&&(y=D3[r]))return y;if(r==="hasOwnProperty")return B3}const o=Reflect.get(t,r,Xr(t)?t:i);return(Fo(r)?zP.has(r):F3(r))||(a||Xi(t,"get",r),h)?o:Xr(o)?d&&zw(r)?o:o.value:fn(o)?a?Ca(o):Mi(o):o}}class OP extends DP{constructor(t=!1){super(!1,t)}set(t,r,i,a){let h=t[r];if(!this._isShallow){const y=ll(h);if(!so(i)&&!ll(i)&&(h=qr(h),i=qr(i)),!$t(t)&&Xr(h)&&!Xr(i))return y?!1:(h.value=i,!0)}const d=$t(t)&&zw(r)?Number(r)<t.length:Qr(t,r),o=Reflect.set(t,r,i,Xr(t)?t:a);return t===qr(a)&&(d?hs(i,h)&&Xa(t,"set",r,i):Xa(t,"add",r,i)),o}deleteProperty(t,r){const i=Qr(t,r);t[r];const a=Reflect.deleteProperty(t,r);return a&&i&&Xa(t,"delete",r,void 0),a}has(t,r){const i=Reflect.has(t,r);return(!Fo(r)||!zP.has(r))&&Xi(t,"has",r),i}ownKeys(t){return Xi(t,"iterate",$t(t)?"length":Eu),Reflect.ownKeys(t)}}class FP extends DP{constructor(t=!1){super(!0,t)}set(t,r){return!0}deleteProperty(t,r){return!0}}const N3=new OP,j3=new FP,$3=new OP(!0),U3=new FP(!0),qx=e=>e,Cy=e=>Reflect.getPrototypeOf(e);function V3(e,t,r){return function(...i){const a=this.__v_raw,h=qr(a),d=md(h),o=e==="entries"||e===Symbol.iterator&&d,y=e==="keys"&&d,w=a[e](...i),T=r?qx:t?k_:$i;return!t&&Xi(h,"iterate",y?Vx:Eu),{next(){const{value:k,done:M}=w.next();return M?{value:k,done:M}:{value:o?[T(k[0]),T(k[1])]:T(k),done:M}},[Symbol.iterator](){return this}}}}function Ey(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function q3(e,t){const r={get(a){const h=this.__v_raw,d=qr(h),o=qr(a);e||(hs(a,o)&&Xi(d,"get",a),Xi(d,"get",o));const{has:y}=Cy(d),w=t?qx:e?k_:$i;if(y.call(d,a))return w(h.get(a));if(y.call(d,o))return w(h.get(o));h!==d&&h.get(a)},get size(){const a=this.__v_raw;return!e&&Xi(qr(a),"iterate",Eu),Reflect.get(a,"size",a)},has(a){const h=this.__v_raw,d=qr(h),o=qr(a);return e||(hs(a,o)&&Xi(d,"has",a),Xi(d,"has",o)),a===o?h.has(a):h.has(a)||h.has(o)},forEach(a,h){const d=this,o=d.__v_raw,y=qr(o),w=t?qx:e?k_:$i;return!e&&Xi(y,"iterate",Eu),o.forEach((T,k)=>a.call(h,w(T),w(k),d))}};return mn(r,e?{add:Ey("add"),set:Ey("set"),delete:Ey("delete"),clear:Ey("clear")}:{add(a){!t&&!so(a)&&!ll(a)&&(a=qr(a));const h=qr(this);return Cy(h).has.call(h,a)||(h.add(a),Xa(h,"add",a,a)),this},set(a,h){!t&&!so(h)&&!ll(h)&&(h=qr(h));const d=qr(this),{has:o,get:y}=Cy(d);let w=o.call(d,a);w||(a=qr(a),w=o.call(d,a));const T=y.call(d,a);return d.set(a,h),w?hs(h,T)&&Xa(d,"set",a,h):Xa(d,"add",a,h),this},delete(a){const h=qr(this),{has:d,get:o}=Cy(h);let y=d.call(h,a);y||(a=qr(a),y=d.call(h,a)),o&&o.call(h,a);const w=h.delete(a);return y&&Xa(h,"delete",a,void 0),w},clear(){const a=qr(this),h=a.size!==0,d=a.clear();return h&&Xa(a,"clear",void 0,void 0),d}}),["keys","values","entries",Symbol.iterator].forEach(a=>{r[a]=V3(a,e,t)}),r}function Av(e,t){const r=q3(e,t);return(i,a,h)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?i:Reflect.get(Qr(r,a)&&a in i?r:i,a,h)}const G3={get:Av(!1,!1)},H3={get:Av(!1,!0)},Z3={get:Av(!0,!1)},W3={get:Av(!0,!0)},BP=new WeakMap,NP=new WeakMap,jP=new WeakMap,$P=new WeakMap;function K3(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function X3(e){return e.__v_skip||!Object.isExtensible(e)?0:K3(b3(e))}function Mi(e){return ll(e)?e:Mv(e,!1,N3,G3,BP)}function da(e){return Mv(e,!1,$3,H3,NP)}function Ca(e){return Mv(e,!0,j3,Z3,jP)}function Ste(e){return Mv(e,!0,U3,W3,$P)}function Mv(e,t,r,i,a){if(!fn(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const h=X3(e);if(h===0)return e;const d=a.get(e);if(d)return d;const o=new Proxy(e,h===2?i:r);return a.set(e,o),o}function pa(e){return ll(e)?pa(e.__v_raw):!!(e&&e.__v_isReactive)}function ll(e){return!!(e&&e.__v_isReadonly)}function so(e){return!!(e&&e.__v_isShallow)}function Bw(e){return e?!!e.__v_raw:!1}function qr(e){const t=e&&e.__v_raw;return t?qr(t):e}function Nm(e){return!Qr(e,"__v_skip")&&Object.isExtensible(e)&&$x(e,"__v_skip",!0),e}const $i=e=>fn(e)?Mi(e):e,k_=e=>fn(e)?Ca(e):e;function Xr(e){return e?e.__v_isRef===!0:!1}function It(e){return UP(e,!1)}function wa(e){return UP(e,!0)}function UP(e,t){return Xr(e)?e:new Y3(e,t)}class Y3{constructor(t,r){this.dep=new Iv,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=r?t:qr(t),this._value=r?t:$i(t),this.__v_isShallow=r}get value(){return this.dep.track(),this._value}set value(t){const r=this._rawValue,i=this.__v_isShallow||so(t)||ll(t);t=i?t:qr(t),hs(t,r)&&(this._rawValue=t,this._value=i?t:$i(t),this.dep.trigger())}}function Tte(e){e.dep&&e.dep.trigger()}function ot(e){return Xr(e)?e.value:e}function En(e){return sr(e)?e():ot(e)}const J3={get:(e,t,r)=>t==="__v_raw"?e:ot(Reflect.get(e,t,r)),set:(e,t,r,i)=>{const a=e[t];return Xr(a)&&!Xr(r)?(a.value=r,!0):Reflect.set(e,t,r,i)}};function VP(e){return pa(e)?e:new Proxy(e,J3)}class Q3{constructor(t){this.__v_isRef=!0,this._value=void 0;const r=this.dep=new Iv,{get:i,set:a}=t(r.track.bind(r),r.trigger.bind(r));this._get=i,this._set=a}get value(){return this._value=this._get()}set value(t){this._set(t)}}function jm(e){return new Q3(e)}function Bo(e){const t=$t(e)?new Array(e.length):{};for(const r in e)t[r]=qP(e,r);return t}class eF{constructor(t,r,i){this._object=t,this._key=r,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return z3(qr(this._object),this._key)}}class tF{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Fs(e,t,r){return Xr(e)?e:sr(e)?new tF(e):fn(e)&&arguments.length>1?qP(e,t,r):It(e)}function qP(e,t,r){const i=e[t];return Xr(i)?i:new eF(e,t,r)}class rF{constructor(t,r,i){this.fn=t,this.setter=r,this._value=void 0,this.dep=new Iv(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=cm-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!r,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Tn!==this)return IP(this,!0),!0}get value(){const t=this.dep.track();return MP(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function nF(e,t,r=!1){let i,a;return sr(e)?i=e:(i=e.get,a=e.set),new rF(i,a,r)}const Cte={GET:"get",HAS:"has",ITERATE:"iterate"},Ete={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},ky={},I_=new WeakMap;let Ql;function kte(){return Ql}function iF(e,t=!1,r=Ql){if(r){let i=I_.get(r);i||I_.set(r,i=[]),i.push(e)}}function sF(e,t,r=Gr){const{immediate:i,deep:a,once:h,scheduler:d,augmentJob:o,call:y}=r,w=U=>a?U:so(U)||a===!1||a===0?Ya(U,1):Ya(U);let T,k,M,P,L=!1,O=!1;if(Xr(e)?(k=()=>e.value,L=so(e)):pa(e)?(k=()=>w(e),L=!0):$t(e)?(O=!0,L=e.some(U=>pa(U)||so(U)),k=()=>e.map(U=>{if(Xr(U))return U.value;if(pa(U))return w(U);if(sr(U))return y?y(U,2):U()})):sr(e)?t?k=y?()=>y(e,2):e:k=()=>{if(M){ol();try{M()}finally{al()}}const U=Ql;Ql=T;try{return y?y(e,3,[P]):e(P)}finally{Ql=U}}:k=io,t&&a){const U=k,V=a===!0?1/0:a;k=()=>Ya(U(),V)}const $=Zu(),Z=()=>{T.stop(),$&&$.active&&Rw($.effects,T)};if(h&&t){const U=t;t=(...V)=>{U(...V),Z()}}let J=O?new Array(e.length).fill(ky):ky;const H=U=>{if(!(!(T.flags&1)||!T.dirty&&!U))if(t){const V=T.run();if(a||L||(O?V.some((te,ce)=>hs(te,J[ce])):hs(V,J))){M&&M();const te=Ql;Ql=T;try{const ce=[V,J===ky?void 0:O&&J[0]===ky?[]:J,P];J=V,y?y(t,3,ce):t(...ce)}finally{Ql=te}}}else T.run()};return o&&o(H),T=new C_(k),T.scheduler=d?()=>d(H,!1):H,P=U=>iF(U,!1,T),M=T.onStop=()=>{const U=I_.get(T);if(U){if(y)y(U,4);else for(const V of U)V();I_.delete(T)}},t?i?H(!0):J=T.run():d?d(H.bind(null,!0),!0):T.run(),Z.pause=T.pause.bind(T),Z.resume=T.resume.bind(T),Z.stop=Z,Z}function Ya(e,t=1/0,r){if(t<=0||!fn(e)||e.__v_skip||(r=r||new Set,r.has(e)))return e;if(r.add(e),t--,Xr(e))Ya(e.value,t,r);else if($t(e))for(let i=0;i<e.length;i++)Ya(e[i],t,r);else if(Hu(e)||md(e))e.forEach(i=>{Ya(i,t,r)});else if(Sv(e)){for(const i in e)Ya(e[i],t,r);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&Ya(e[i],t,r)}return e}/**
11* @vue/runtime-core v3.5.17
12* (c) 2018-present Yuxi (Evan) You and Vue contributors
13* @license MIT
14**/const GP=[];function oF(e){GP.push(e)}function aF(){GP.pop()}function Ite(e,t){}const Pte={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},lF={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function $m(e,t,r,i){try{return i?e(...i):e()}catch(a){qd(a,t,r)}}function No(e,t,r,i){if(sr(e)){const a=$m(e,t,r,i);return a&&Lw(a)&&a.catch(h=>{qd(h,t,r)}),a}if($t(e)){const a=[];for(let h=0;h<e.length;h++)a.push(No(e[h],t,r,i));return a}}function qd(e,t,r,i=!0){const a=t?t.vnode:null,{errorHandler:h,throwUnhandledErrorInProduction:d}=t&&t.appContext.config||Gr;if(t){let o=t.parent;const y=t.proxy,w=`https://vuejs.org/error-reference/#runtime-${r}`;for(;o;){const T=o.ec;if(T){for(let k=0;k<T.length;k++)if(T[k](e,y,w)===!1)return}o=o.parent}if(h){ol(),$m(h,null,10,[e,y,w]),al();return}}cF(e,r,a,i,d)}function cF(e,t,r,i=!0,a=!1){if(a)throw e;console.error(e)}const ds=[];let la=-1;const _d=[];let ec=null,id=0;const HP=Promise.resolve();let P_=null;function Ri(e){const t=P_||HP;return e?t.then(this?e.bind(this):e):t}function uF(e){let t=la+1,r=ds.length;for(;t<r;){const i=t+r>>>1,a=ds[i],h=hm(a);h<e||h===e&&a.flags&2?t=i+1:r=i}return t}function Nw(e){if(!(e.flags&1)){const t=hm(e),r=ds[ds.length-1];!r||!(e.flags&2)&&t>=hm(r)?ds.push(e):ds.splice(uF(t),0,e),e.flags|=1,ZP()}}function ZP(){P_||(P_=HP.then(WP))}function A_(e){$t(e)?_d.push(...e):ec&&e.id===-1?ec.splice(id+1,0,e):e.flags&1||(_d.push(e),e.flags|=1),ZP()}function dC(e,t,r=la+1){for(;r<ds.length;r++){const i=ds[r];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;ds.splice(r,1),r--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function M_(e){if(_d.length){const t=[...new Set(_d)].sort((r,i)=>hm(r)-hm(i));if(_d.length=0,ec){ec.push(...t);return}for(ec=t,id=0;id<ec.length;id++){const r=ec[id];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}ec=null,id=0}}const hm=e=>e.id==null?e.flags&2?-1:1/0:e.id;function WP(e){try{for(la=0;la<ds.length;la++){const t=ds[la];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),$m(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;la<ds.length;la++){const t=ds[la];t&&(t.flags&=-2)}la=-1,ds.length=0,M_(),P_=null,(ds.length||_d.length)&&WP()}}let sd,Iy=[];function KP(e,t){var r,i;sd=e,sd?(sd.enabled=!0,Iy.forEach(({event:a,args:h})=>sd.emit(a,...h)),Iy=[]):typeof window<"u"&&window.HTMLElement&&!((i=(r=window.navigator)==null?void 0:r.userAgent)!=null&&i.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(h=>{KP(h,t)}),setTimeout(()=>{sd||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Iy=[])},3e3)):Iy=[]}let wi=null,Rv=null;function dm(e){const t=wi;return wi=e,Rv=e&&e.type.__scopeId||null,t}function Ate(e){Rv=e}function Mte(){Rv=null}const Rte=e=>dr;function dr(e,t=wi,r){if(!t||e._n)return e;const i=(...a)=>{i._d&&kC(-1);const h=dm(t);let d;try{d=e(...a)}finally{dm(h),i._d&&kC(1)}return d};return i._n=!0,i._c=!0,i._d=!0,i}function Lte(e,t){if(wi===null)return e;const r=Gm(wi),i=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[h,d,o,y=Gr]=t[a];h&&(sr(h)&&(h={mounted:h,updated:h}),h.deep&&Ya(d),i.push({dir:h,instance:r,value:d,oldValue:void 0,arg:o,modifiers:y}))}return e}function ua(e,t,r,i){const a=e.dirs,h=t&&t.dirs;for(let d=0;d<a.length;d++){const o=a[d];h&&(o.oldValue=h[d].value);let y=o.dir[i];y&&(ol(),No(y,r,8,[e.el,o,e,t]),al())}}const XP=Symbol("_vte"),YP=e=>e.__isTeleport,Gp=e=>e&&(e.disabled||e.disabled===""),fC=e=>e&&(e.defer||e.defer===""),pC=e=>typeof SVGElement<"u"&&e instanceof SVGElement,mC=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Gx=(e,t)=>{const r=e&&e.to;return In(r)?t?t(r):null:r},JP={name:"Teleport",__isTeleport:!0,process(e,t,r,i,a,h,d,o,y,w){const{mc:T,pc:k,pbc:M,o:{insert:P,querySelector:L,createText:O,createComment:$}}=w,Z=Gp(t.props);let{shapeFlag:J,children:H,dynamicChildren:U}=t;if(e==null){const V=t.el=O(""),te=t.anchor=O("");P(V,r,i),P(te,r,i);const ce=(Se,xe)=>{J&16&&(a&&a.isCE&&(a.ce._teleportTarget=Se),T(H,Se,xe,a,h,d,o,y))},fe=()=>{const Se=t.target=Gx(t.props,L),xe=eA(Se,t,O,P);Se&&(d!=="svg"&&pC(Se)?d="svg":d!=="mathml"&&mC(Se)&&(d="mathml"),Z||(ce(Se,xe),n_(t,!1)))};Z&&(ce(r,te),n_(t,!0)),fC(t.props)?(t.el.__isMounted=!1,_i(()=>{fe(),delete t.el.__isMounted},h)):fe()}else{if(fC(t.props)&&e.el.__isMounted===!1){_i(()=>{JP.process(e,t,r,i,a,h,d,o,y,w)},h);return}t.el=e.el,t.targetStart=e.targetStart;const V=t.anchor=e.anchor,te=t.target=e.target,ce=t.targetAnchor=e.targetAnchor,fe=Gp(e.props),Se=fe?r:te,xe=fe?V:ce;if(d==="svg"||pC(te)?d="svg":(d==="mathml"||mC(te))&&(d="mathml"),U?(M(e.dynamicChildren,U,Se,a,h,d,o),Xw(e,t,!0)):y||k(e,t,Se,xe,a,h,d,o,!1),Z)fe?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Py(t,r,V,w,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const et=t.target=Gx(t.props,L);et&&Py(t,et,null,w,0)}else fe&&Py(t,te,ce,w,1);n_(t,Z)}},remove(e,t,r,{um:i,o:{remove:a}},h){const{shapeFlag:d,children:o,anchor:y,targetStart:w,targetAnchor:T,target:k,props:M}=e;if(k&&(a(w),a(T)),h&&a(y),d&16){const P=h||!Gp(M);for(let L=0;L<o.length;L++){const O=o[L];i(O,t,r,P,!!O.dynamicChildren)}}},move:Py,hydrate:hF};function Py(e,t,r,{o:{insert:i},m:a},h=2){h===0&&i(e.targetAnchor,t,r);const{el:d,anchor:o,shapeFlag:y,children:w,props:T}=e,k=h===2;if(k&&i(d,t,r),(!k||Gp(T))&&y&16)for(let M=0;M<w.length;M++)a(w[M],t,r,2);k&&i(o,t,r)}function hF(e,t,r,i,a,h,{o:{nextSibling:d,parentNode:o,querySelector:y,insert:w,createText:T}},k){const M=t.target=Gx(t.props,y);if(M){const P=Gp(t.props),L=M._lpa||M.firstChild;if(t.shapeFlag&16)if(P)t.anchor=k(d(e),t,o(e),r,i,a,h),t.targetStart=L,t.targetAnchor=L&&d(L);else{t.anchor=d(e);let O=L;for(;O;
vendor: 28,547 bytes, lines 14-15
14){if(O&&O.nodeType===8){if(O.data==="teleport start anchor")t.targetStart=O;else if(O.data==="teleport anchor"){t.targetAnchor=O,M._lpa=t.targetAnchor&&d(t.targetAnchor);break}}O=d(O)}t.targetAnchor||eA(M,t,T,w),k(L&&d(L),t,M,r,i,a,h)}n_(t,P)}return t.anchor&&d(t.anchor)}const QP=JP;function n_(e,t){const r=e.ctx;if(r&&r.ut){let i,a;for(t?(i=e.el,a=e.anchor):(i=e.targetStart,a=e.targetAnchor);i&&i!==a;)i.nodeType===1&&i.setAttribute("data-v-owner",r.uid),i=i.nextSibling;r.ut()}}function eA(e,t,r,i){const a=t.targetStart=r(""),h=t.targetAnchor=r("");return a[XP]=h,e&&(i(a,e),i(h,e)),h}const tc=Symbol("_leaveCb"),Ay=Symbol("_enterCb");function tA(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return js(()=>{e.isMounted=!0}),bc(()=>{e.isUnmounting=!0}),e}const Ys=[Function,Array],rA={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ys,onEnter:Ys,onAfterEnter:Ys,onEnterCancelled:Ys,onBeforeLeave:Ys,onLeave:Ys,onAfterLeave:Ys,onLeaveCancelled:Ys,onBeforeAppear:Ys,onAppear:Ys,onAfterAppear:Ys,onAppearCancelled:Ys},nA=e=>{const t=e.subTree;return t.component?nA(t.component):t},dF={name:"BaseTransition",props:rA,setup(e,{slots:t}){const r=ci(),i=tA();return()=>{const a=t.default&&jw(t.default(),!0);if(!a||!a.length)return;const h=iA(a),d=qr(e),{mode:o}=d;if(i.isLeaving)return $b(h);const y=gC(h);if(!y)return $b(h);let w=fm(y,d,i,r,k=>w=k);y.type!==Yn&&fc(y,w);let T=r.subTree&&gC(r.subTree);if(T&&T.type!==Yn&&!Io(y,T)&&nA(r).type!==Yn){let k=fm(T,d,i,r);if(fc(T,k),o==="out-in"&&y.type!==Yn)return i.isLeaving=!0,k.afterLeave=()=>{i.isLeaving=!1,r.job.flags&8||r.update(),delete k.afterLeave,T=void 0},$b(h);o==="in-out"&&y.type!==Yn?k.delayLeave=(M,P,L)=>{const O=sA(i,T);O[String(T.key)]=T,M[tc]=()=>{P(),M[tc]=void 0,delete w.delayedLeave,T=void 0},w.delayedLeave=()=>{L(),delete w.delayedLeave,T=void 0}}:T=void 0}else T&&(T=void 0);return h}}};function iA(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==Yn){t=r;break}}return t}const fF=dF;function sA(e,t){const{leavingVNodes:r}=e;let i=r.get(t.type);return i||(i=Object.create(null),r.set(t.type,i)),i}function fm(e,t,r,i,a){const{appear:h,mode:d,persisted:o=!1,onBeforeEnter:y,onEnter:w,onAfterEnter:T,onEnterCancelled:k,onBeforeLeave:M,onLeave:P,onAfterLeave:L,onLeaveCancelled:O,onBeforeAppear:$,onAppear:Z,onAfterAppear:J,onAppearCancelled:H}=t,U=String(e.key),V=sA(r,e),te=(Se,xe)=>{Se&&No(Se,i,9,xe)},ce=(Se,xe)=>{const et=xe[1];te(Se,xe),$t(Se)?Se.every(ze=>ze.length<=1)&&et():Se.length<=1&&et()},fe={mode:d,persisted:o,beforeEnter(Se){let xe=y;if(!r.isMounted)if(h)xe=$||y;else return;Se[tc]&&Se[tc](!0);const et=V[U];et&&Io(e,et)&&et.el[tc]&&et.el[tc](),te(xe,[Se])},enter(Se){let xe=w,et=T,ze=k;if(!r.isMounted)if(h)xe=Z||w,et=J||T,ze=H||k;else return;let Ze=!1;const tt=Se[Ay]=at=>{Ze||(Ze=!0,at?te(ze,[Se]):te(et,[Se]),fe.delayedLeave&&fe.delayedLeave(),Se[Ay]=void 0)};xe?ce(xe,[Se,tt]):tt()},leave(Se,xe){const et=String(e.key);if(Se[Ay]&&Se[Ay](!0),r.isUnmounting)return xe();te(M,[Se]);let ze=!1;const Ze=Se[tc]=tt=>{ze||(ze=!0,xe(),tt?te(O,[Se]):te(L,[Se]),Se[tc]=void 0,V[et]===e&&delete V[et])};V[et]=e,P?ce(P,[Se,Ze]):Ze()},clone(Se){const xe=fm(Se,t,r,i,a);return a&&a(xe),xe}};return fe}function $b(e){if(Um(e))return e=Sa(e),e.children=null,e}function gC(e){if(!Um(e))return YP(e.type)&&e.children?iA(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:r}=e;if(r){if(t&16)return r[0];if(t&32&&sr(r.default))return r.default()}}function fc(e,t){e.shapeFlag&6&&e.component?(e.transition=t,fc(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function jw(e,t=!1,r){let i=[],a=0;for(let h=0;h<e.length;h++){let d=e[h];const o=r==null?d.key:String(r)+String(d.key!=null?d.key:h);d.type===Cn?(d.patchFlag&128&&a++,i=i.concat(jw(d.children,t,o))):(t||d.type!==Yn)&&i.push(o!=null?Sa(d,{key:o}):d)}if(a>1)for(let h=0;h<i.length;h++)i[h].patchFlag=-2;return i}/*! #__NO_SIDE_EFFECTS__ */function Rr(e,t){return sr(e)?mn({name:e.name},t,{setup:e}):e}function pF(){const e=ci();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function $w(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function zte(e){const t=ci(),r=wa(null);if(t){const a=t.refs===Gr?t.refs={}:t.refs;Object.defineProperty(a,e,{enumerable:!0,get:()=>r.value,set:h=>r.value=h})}return r}function vd(e,t,r,i,a=!1){if($t(e)){e.forEach((L,O)=>vd(L,t&&($t(t)?t[O]:t),r,i,a));return}if(lc(i)&&!a){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&vd(e,t,r,i.component.subTree);return}const h=i.shapeFlag&4?Gm(i.component):i.el,d=a?null:h,{i:o,r:y}=e,w=t&&t.r,T=o.refs===Gr?o.refs={}:o.refs,k=o.setupState,M=qr(k),P=k===Gr?()=>!1:L=>Qr(M,L);if(w!=null&&w!==y&&(In(w)?(T[w]=null,P(w)&&(k[w]=null)):Xr(w)&&(w.value=null)),sr(y))$m(y,o,12,[d,T]);else{const L=In(y),O=Xr(y);if(L||O){const $=()=>{if(e.f){const Z=L?P(y)?k[y]:T[y]:y.value;a?$t(Z)&&Rw(Z,h):$t(Z)?Z.includes(h)||Z.push(h):L?(T[y]=[h],P(y)&&(k[y]=T[y])):(y.value=[h],e.k&&(T[e.k]=y.value))}else L?(T[y]=d,P(y)&&(k[y]=d)):O&&(y.value=d,e.k&&(T[e.k]=d))};d?($.id=-1,_i($,r)):$()}}}let yC=!1;const Qh=()=>{yC||(console.error("Hydration completed but contains mismatches."),yC=!0)},mF=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",gF=e=>e.namespaceURI.includes("MathML"),My=e=>{if(e.nodeType===1){if(mF(e))return"svg";if(gF(e))return"mathml"}},dd=e=>e.nodeType===8;function yF(e){const{mt:t,p:r,o:{patchProp:i,createText:a,nextSibling:h,parentNode:d,remove:o,insert:y,createComment:w}}=e,T=(H,U)=>{if(!U.hasChildNodes()){r(null,H,U),M_(),U._vnode=H;return}k(U.firstChild,H,null,null,null),M_(),U._vnode=H},k=(H,U,V,te,ce,fe=!1)=>{fe=fe||!!U.dynamicChildren;const Se=dd(H)&&H.data==="[",xe=()=>O(H,U,V,te,ce,Se),{type:et,ref:ze,shapeFlag:Ze,patchFlag:tt}=U;let at=H.nodeType;U.el=H,tt===-2&&(fe=!1,U.dynamicChildren=null);let Pe=null;switch(et){case Iu:at!==3?U.children===""?(y(U.el=a(""),d(H),H),Pe=H):Pe=xe():(H.data!==U.children&&(Qh(),H.data=U.children),Pe=h(H));break;case Yn:J(H)?(Pe=h(H),Z(U.el=H.content.firstChild,H,V)):at!==8||Se?Pe=xe():Pe=h(H);break;case xd:if(Se&&(H=h(H),at=H.nodeType),at===1||at===3){Pe=H;const He=!U.children.length;for(let Oe=0;Oe<U.staticCount;Oe++)He&&(U.children+=Pe.nodeType===1?Pe.outerHTML:Pe.data),Oe===U.staticCount-1&&(U.anchor=Pe),Pe=h(Pe);return Se?h(Pe):Pe}else xe();break;case Cn:Se?Pe=L(H,U,V,te,ce,fe):Pe=xe();break;default:if(Ze&1)(at!==1||U.type.toLowerCase()!==H.tagName.toLowerCase())&&!J(H)?Pe=xe():Pe=M(H,U,V,te,ce,fe);else if(Ze&6){U.slotScopeIds=ce;const He=d(H);if(Se?Pe=$(H):dd(H)&&H.data==="teleport start"?Pe=$(H,H.data,"teleport end"):Pe=h(H),t(U,He,null,V,te,My(He),fe),lc(U)&&!U.type.__asyncResolved){let Oe;Se?(Oe=Sr(Cn),Oe.anchor=Pe?Pe.previousSibling:He.lastChild):Oe=H.nodeType===3?Id(""):Sr("div"),Oe.el=H,U.component.subTree=Oe}}else Ze&64?at!==8?Pe=xe():Pe=U.type.hydrate(H,U,V,te,ce,fe,e,P):Ze&128&&(Pe=U.type.hydrate(H,U,V,te,My(d(H)),ce,fe,e,k))}return ze!=null&&vd(ze,null,te,U),Pe},M=(H,U,V,te,ce,fe)=>{fe=fe||!!U.dynamicChildren;const{type:Se,props:xe,patchFlag:et,shapeFlag:ze,dirs:Ze,transition:tt}=U,at=Se==="input"||Se==="option";if(at||et!==-1){Ze&&ua(U,null,V,"created");let Pe=!1;if(J(H)){Pe=CA(null,tt)&&V&&V.vnode.props&&V.vnode.props.appear;const Oe=H.content.firstChild;if(Pe){const lt=Oe.getAttribute("class");lt&&(Oe.$cls=lt),tt.beforeEnter(Oe)}Z(Oe,H,V),U.el=H=Oe}if(ze&16&&!(xe&&(xe.innerHTML||xe.textContent))){let Oe=P(H.firstChild,U,H,V,te,ce,fe);for(;Oe;){Ry(H,1)||Qh();const lt=Oe;Oe=Oe.nextSibling,o(lt)}}else if(ze&8){let Oe=U.children;Oe[0]===`
15`&&(H.tagName==="PRE"||H.tagName==="TEXTAREA")&&(Oe=Oe.slice(1)),H.textContent!==Oe&&(Ry(H,0)||Qh(),H.textContent=U.children)}if(xe){if(at||!fe||et&48){const Oe=H.tagName.includes("-");for(const lt in xe)(at&&(lt.endsWith("value")||lt==="indeterminate")||Bm(lt)&&!gd(lt)||lt[0]==="."||Oe)&&i(H,lt,null,xe[lt],void 0,V)}else if(xe.onClick)i(H,"onClick",null,xe.onClick,void 0,V);else if(et&4&&pa(xe.style))for(const Oe in xe.style)xe.style[Oe]}let He;(He=xe&&xe.onVnodeBeforeMount)&&Ss(He,V,U),Ze&&ua(U,null,V,"beforeMount"),((He=xe&&xe.onVnodeMounted)||Ze||Pe)&&MA(()=>{He&&Ss(He,V,U),Pe&&tt.enter(H),Ze&&ua(U,null,V,"mounted")},te)}return H.nextSibling},P=(H,U,V,te,ce,fe,Se)=>{Se=Se||!!U.dynamicChildren;const xe=U.children,et=xe.length;for(let ze=0;ze<et;ze++){const Ze=Se?xe[ze]:xe[ze]=Ts(xe[ze]),tt=Ze.type===Iu;H?(tt&&!Se&&ze+1<et&&Ts(xe[ze+1]).type===Iu&&(y(a(H.data.slice(Ze.children.length)),V,h(H)),H.data=Ze.children),H=k(H,Ze,te,ce,fe,Se)):tt&&!Ze.children?y(Ze.el=a(""),V):(Ry(V,1)||Qh(),r(null,Ze,V,null,te,ce,My(V),fe))}return H},L=(H,U,V,te,ce,fe)=>{const{slotScopeIds:Se}=U;Se&&(ce=ce?ce.concat(Se):Se);const xe=d(H),et=P(h(H),U,xe,V,te,ce,fe);return et&&dd(et)&&et.data==="]"?h(U.anchor=et):(Qh(),y(U.anchor=w("]"),xe,et),et)},O=(H,U,V,te,ce,fe)=>{if(Ry(H.parentElement,1)||Qh(),U.el=null,fe){const et=$(H);for(;;){const ze=h(H);if(ze&&ze!==et)o(ze);else break}}const Se=h(H),xe=d(H);return o(H),r(null,U,xe,Se,V,te,My(xe),ce),V&&(V.vnode.el=U.el,Dv(V,U.el)),Se},$=(H,U="[",V="]")=>{let te=0;for(;H;)if(H=h(H),H&&dd(H)&&(H.data===U&&te++,H.data===V)){if(te===0)return h(H);te--}return H},Z=(H,U,V)=>{const te=U.parentNode;te&&te.replaceChild(H,U);let ce=V;for(;ce;)ce.vnode.el===U&&(ce.vnode.el=ce.subTree.el=H),ce=ce.parent},J=H=>H.nodeType===1&&H.tagName==="TEMPLATE";return[T,k]}const _C="data-allow-mismatch",_F={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Ry(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(_C);)e=e.parentElement;const r=e&&e.getAttribute(_C);if(r==null)return!1;if(r==="")return!0;{const i=r.split(",");return t===0&&i.includes("children")?!0:i.includes(_F[t])}}const vF=Ev().requestIdleCallback||(e=>setTimeout(e,1)),bF=Ev().cancelIdleCallback||(e=>clearTimeout(e)),Dte=(e=1e4)=>t=>{const r=vF(t,{timeout:e});return()=>bF(r)};function xF(e){const{top:t,left:r,bottom:i,right:a}=e.getBoundingClientRect(),{innerHeight:h,innerWidth:d}=window;return(t>0&&t<h||i>0&&i<h)&&(r>0&&r<d||a>0&&a<d)}const Ote=e=>(t,r)=>{const i=new IntersectionObserver(a=>{for(const h of a)if(h.isIntersecting){i.disconnect(),t();break}},e);return r(a=>{if(a instanceof Element){if(xF(a))return t(),i.disconnect(),!1;i.observe(a)}}),()=>i.disconnect()},Fte=e=>t=>{if(e){const r=matchMedia(e);if(r.matches)t();else return r.addEventListener("change",t,{once:!0}),()=>r.removeEventListener("change",t)}},Bte=(e=[])=>(t,r)=>{In(e)&&(e=[e]);let i=!1;const a=d=>{i||(i=!0,h(),t(),d.target.dispatchEvent(new d.constructor(d.type,d)))},h=()=>{r(d=>{for(const o of e)d.removeEventListener(o,a)})};return r(d=>{for(const o of e)d.addEventListener(o,a,{once:!0})}),h};function wF(e,t){if(dd(e)&&e.data==="["){let r=1,i=e.nextSibling;for(;i;){if(i.nodeType===1){if(t(i)===!1)break}else if(dd(i))if(i.data==="]"){if(--r===0)break}else i.data==="["&&r++;i=i.nextSibling}}else t(e)}const lc=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Uw(e){sr(e)&&(e={loader:e});const{loader:t,loadingComponent:r,errorComponent:i,delay:a=200,hydrate:h,timeout:d,suspensible:o=!0,onError:y}=e;let w=null,T,k=0;const M=()=>(k++,w=null,P()),P=()=>{let L;return w||(L=w=t().catch(O=>{if(O=O instanceof Error?O:new Error(String(O)),y)return new Promise(($,Z)=>{y(O,()=>$(M()),()=>Z(O),k+1)});throw O}).then(O=>L!==w&&w?w:(O&&(O.__esModule||O[Symbol.toStringTag]==="Module")&&(O=O.default),T=O,O)))};return Rr({name:"AsyncComponentWrapper",__asyncLoader:P,__asyncHydrate(L,O,$){const Z=h?()=>{const H=h(()=>{$()},U=>wF(L,U));H&&(O.bum||(O.bum=[])).push(H),(O.u||(O.u=[])).push(()=>!0)}:$;T?Z():P().then(()=>!O.isUnmounted&&Z())},get __asyncResolved(){return T},setup(){const L=xi;if($w(L),T)return()=>Ub(T,L);const O=H=>{w=null,qd(H,L,13,!i)};if(o&&L.suspense||Pd)return P().then(H=>()=>Ub(H,L)).catch(H=>(O(H),()=>i?Sr(i,{error:H}):null));const $=It(!1),Z=It(),J=It(!!a);return a&&setTimeout(()=>{J.value=!1},a),d!=null&&setTimeout(()=>{if(!$.value&&!Z.value){const H=new Error(`Async component timed out after ${d}ms.`);O(H),Z.value=H}},d),P().then(()=>{$.value=!0,L.parent&&Um(L.parent.vnode)&&L.parent.update()}).catch(H=>{O(H),Z.value=H}),()=>{if($.value&&T)return Ub(T,L);if(Z.value&&i)return Sr(i,{error:Z.value});if(r&&!J.value)return Sr(r)}}})}function Ub(e,t){const{ref:r,props:i,children:a,ce:h}=t.vnode,d=Sr(e,i,a);return d.ref=r,d.ce=h,delete t.vnode.ce,d}const Um=e=>e.type.__isKeepAlive,SF={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const r=ci(),i=r.ctx;if(!i.renderer)return()=>{const J=t.default&&t.default();return J&&J.length===1?J[0]:J};const a=new Map,h=new Set;let d=null;const o=r.suspense,{renderer:{p:y,m:w,um:T,o:{createElement:k}}}=i,M=k("div");i.activate=(J,H,U,V,te)=>{const ce=J.component;w(J,H,U,0,o),y(ce.vnode,J,H,U,ce,o,V,J.slotScopeIds,te),_i(()=>{ce.isDeactivated=!1,ce.a&&yd(ce.a);const fe=J.props&&J.props.onVnodeMounted;fe&&Ss(fe,ce.parent,J)},o)},i.deactivate=J=>{const H=J.component;z_(H.m),z_(H.a),w(J,M,null,1,o),_i(()=>{H.da&&yd(H.da);const U=J.props&&J.props.onVnodeUnmounted;U&&Ss(U,H.parent,J),H.isDeactivated=!0},o)};function P(J){Vb(J),T(J,r,o,!0)}function L(J){a.forEach((H,U)=>{const V=r1(H.type);V&&!J(V)&&O(U)})}function O(J){const H=a.get(J);H&&(!d||!Io(H,d))?P(H):d&&Vb(d),a.delete(J),h.delete(J)}Mr(()=>[e.include,e.exclude],([J,H])=>{J&&L(U=>Dp(J,U)),H&&L(U=>!Dp(H,U))},{flush:"post",deep:!0});let $=null;const Z=()=>{$!=null&&(D_(r.subTree.type)?_i(()=>{a.set($,Ly(r.subTree))},r.subTree.suspense):a.set($,Ly(r.subTree)))};return js(Z),Vw(Z),bc(()=>{a.forEach(J=>{const{subTree:H,suspense:U}=r,V=Ly(H);if(J.type===V.type&&J.key===V.key){Vb(V);const te=V.component.da;te&&_i(te,U);return}P(J)})}),()=>{if($=null,!t.default)return d=null;const J=t.default(),H=J[0];if(J.length>1)return d=null,J;if(!pc(H)||!(H.shapeFlag&4)&&!(H.shapeFlag&128))return d=null,H;let U=Ly(H);if(U.type===Yn)return d=null,U;const V=U.type,te=r1(lc(U)?U.type.__asyncResolved||{}:V),{include:ce,exclude:fe,max:Se}=e;if(ce&&(!te||!Dp(ce,te))||fe&&te&&Dp(fe,te))return U.shapeFlag&=-257,d=U,H;const xe=U.key==null?V:U.key,et=a.get(xe);return U.el&&(U=Sa(U),H.shapeFlag&128&&(H.ssContent=U)),$=xe,et?(U.el=et.el,U.component=et.component,U.transition&&fc(U,U.transition),U.shapeFlag|=512,h.delete(xe),h.add(xe)):(h.add(xe),Se&&h.size>parseInt(Se,10)&&O(h.values().next().value)),U.shapeFlag|=256,d=U,D_(H.type)?H:U}}},TF=SF;function Dp(e,t){return $t(e)?e.some(r=>Dp(r,t)):In(e)?e.split(",").includes(t):v3(e)?(e.lastIndex=0,e.test(t)):!1}function oA(e,t){lA(e,"a",t)}function aA(e,t){lA(e,"da",t)}function lA(e,t,r=xi){const i=e.__wdc||(e.__wdc=()=>{let a=r;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(Lv(t,i,r),r){let a=r.parent;for(;a&&a.parent;)Um(a.parent.vnode)&&CF(i,t,r,a),a=a.parent}}function CF(e,t,r,i){const a=Lv(t,e,i,!0);Wu(()=>{Rw(i[t],a)},r)}function Vb(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Ly(e){return e.shapeFlag&128?e.ssContent:e}function Lv(e,t,r=xi,i=!1){if(r){const a=r[e]||(r[e]=[]),h=t.__weh||(t.__weh=(...d)=>{ol();const o=Nu(r),y=No(t,r,e,d);return o(),al(),y});return i?a.unshift(h):a.push(h),h}}const pl=e=>(t,r=xi)=>{(!Pd||e==="sp")&&Lv(e,(...i)=>t(...i),r)},EF=pl("bm"),js=pl("m"),cA=pl("bu"),Vw=pl("u"),bc=pl("bum"),Wu=pl("um"),kF=pl("sp"),IF=pl("rtg"),PF=pl("rtc");function uA(e,t=xi){Lv("ec",e,t)}const qw="components",AF="directives";function vC(e,t){return Gw(qw,e,!0,t)||e}const hA=Symbol.for("v-ndc");function Tu(e){return In(e)?Gw(qw,e,!1)||e:e||hA}function Nte(e){return Gw(AF,e)}function Gw(e,t,r=!0,i=!1){const a=wi||xi;if(a){const h=a.type;if(e===qw){const o=r1(h,!1);if(o&&(o===t||o===Ai(t)||o===Cv(Ai(t))))return h}const d=bC(a[e]||h[e],t)||bC(a.appContext[e],t);return!d&&i?h:d}}function bC(e,t){return e&&(e[t]||e[Ai(t)]||e[Cv(Ai(t))])}function R_(e,t,r,i){let a;const h=r&&r[i],d=$t(e);if(d||In(e)){const o=d&&pa(e);let y=!1,w=!1;o&&(y=!so(e),w=ll(e),e=Pv(e)),a=new Array(e.length);for(let T=0,k=e.length;T<k;T++)a[T]=t(y?w?k_($i(e[T])):$i(e[T]):e[T],T,void 0,h&&h[T])}else if(typeof e=="number"){a=new Array(e);for(let o=0;o<e;o++)a[o]=t(o+1,o,void 0,h&&h[o])}else if(fn(e))if(e[Symbol.iterator])a=Array.from(e,(o,y)=>t(o,y,void 0,h&&h[y]));else{const o=Object.keys(e);a=new Array(o.length);for(let y=0,w=o.length;y<w;y++){const T=o[y];a[y]=t(e[T],T,y,h&&h[y])}}else a=[];return r&&(r[i]=a),a}function jte(e,t){for(let r=0;r<t.length;r++){const i=t[r];if($t(i))for(let a=0;a<i.length;a++)e[i[a].name]=i[a].fn;else i&&(e[i.name]=i.key?(...a)=>{const h=i.fn(...a);return h&&(h.key=i.key),h}:i.fn)}return e}function Nr(e,t,r={},i,a){if(wi.ce||wi.parent&&lc(wi.parent)&&wi.parent.ce)return t!=="default"&&(r.name=t),Ft(),Kt(Cn,null,[Sr("slot",r,i&&i())],64);let h=e[t];h&&h._c&&(h._d=!1),Ft();const d=h&&Hw(h(r)),o=r.key||d&&d.key,y=Kt(Cn,{key:(o&&!Fo(o)?o:`_${t}`)+(!d&&i?"_fb":"")},d||(i?i():[]),d&&e._===1?64:-2);return!a&&y.scopeId&&(y.slotScopeIds=[y.scopeId+"-s"]),h&&h._c&&(h._d=!0),y}function Hw(e){return e.some(t=>pc(t)?!(t.type===Yn||t.type===Cn&&!Hw(t.children)):!0)?e:null}function $te(e,t){const r={};for(const i in e)r[t&&/[A-Z]/.test(i)?`on:${i}`:Up(i)]=e[i];return r}const Hx=e=>e?OA(e)?Gm(e):Hx(e.parent):null,Hp=mn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Hx(e.parent),$root:e=>Hx(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Zw(e),$forceUpdate:e=>e.f||(e.f=()=>{Nw(e.update)}),$nextTick:e=>e.n||(e.n=Ri.bind(e.proxy)),$watch:e=>JF.bind(e)}),qb=(e,t)=>e!==Gr&&!e.__isScriptSetup&&Qr(e,t),Zx={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:r,setupState:i,data:a,props:h,accessCache:d,type:o,appContext:y}=e;let w;if(t[0]!=="$"){const P=d[t];if(P!==void 0)switch(P){case 1:return i[t];case 2:return a[t];case 4:return r[t];case 3:return h[t]}else{if(qb(i,t))return d[t]=1,i[t];if(a!==Gr&&Qr(a,t))return d[t]=2,a[t];if((w=e.propsOptions[0])&&Qr(w,t))return d[t]=3,h[t];if(r!==Gr&&Qr(r,t))return d[t]=4,r[t];Wx&&(d[t]=0)}}const T=Hp[t];let k,M;if(T)return t==="$attrs"&&Xi(e.attrs,"get",""),T(e);if((k=o.__cssModules)&&(k=k[t]))return k;if(r!==Gr&&Qr(r,t))return d[t]=4,r[t];if(M=y.config.globalProperties,Qr(M,t))return M[t]},set({_:e},t,r){const{data:i,setupState:a,ctx:h}=e;return qb(a,t)?(a[t]=r,!0):i!==Gr&&Qr(i,t)?(i[t]=r,!0):Qr(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(h[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:i,appContext:a,propsOptions:h}},d){let o;return!!r[d]||e!==Gr&&Qr(e,d)||qb(t,d)||(o=h[0])&&Qr(o,d)||Qr(i,d)||Qr(Hp,d)||Qr(a.config.globalProperties,d)},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:Qr(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}},MF=mn({},Zx,{get(e,t){if(t!==Symbol.unscopables)return Zx.get(e,t,e)},has(e,t){return t[0]!=="_"&&!T3(t)}});function Ute(){return null}function Vte(){return null}function qte(e){}function Gte(e){}function Hte(){return null}function Zte(){}function Wte(e,t){return null}function dA(){return fA().slots}function RF(){return fA().attrs}function fA(){const e=ci();return e.setupContext||(e.setupContext=NA(e))}function pm(e){return $t(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}function Kte(e,t){const r=pm(e);for(const i in t){if(i.startsWith("__skip"))continue;let a=r[i];a?$t(a)||sr(a)?a=r[i]={type:a,default:t[i]}:a.default=t[i]:a===null&&(a=r[i]={default:t[i]}),a&&t[`__skip_${i}`]&&(a.skipFactory=!0)}return r}function Xte(e,t){return!e||!t?e||t:$t(e)&&$t(t)?e.concat(t):mn({},pm(e),pm(t))}function Yte(e,t){const r={};for(const i in e)t.includes(i)||Object.defineProperty(r,i,{enumerable:!0,get:()=>e[i]});return r}function Jte(e){const t=ci();let r=e();return Qx(),Lw(r)&&(r=r.catch(i=>{throw Nu(t),i})),[r,()=>Nu(t)]}let Wx=!0;function LF(e){const t=Zw(e),r=e.proxy,i=e.ctx;Wx=!1,t.beforeCreate&&xC(t.beforeCreate,e,"bc");const{data:a,computed:h,methods:d,watch:o,provide:y,inject:w,created:T,beforeMount:k,mounted:M,beforeUpdate:P,updated:L,activated:O,deactivated:$,beforeDestroy:Z,beforeUnmount:J,destroyed:H,unmounted:U,render:V,renderTracked:te,renderTriggered:ce,errorCaptured:fe,serverPrefetch:Se,expose:xe,inheritAttrs:et,components:ze,directives:Ze,filters:tt}=t;if(w&&zF(w,i,null),d)for(const He in d){const Oe=d[He];sr(Oe)&&(i[He]=Oe.bind(r))}if(a){const He=a.call(r,r);fn(He)&&(e.data=Mi(He))}if(Wx=!0,h)for(const He in h){const Oe=h[He],lt=sr(Oe)?Oe.bind(r,r):sr(Oe.get)?Oe.get.bind(r,r):io,Pt=!sr(Oe)&&sr(Oe.set)?Oe.set.bind(r):io,Yt=it({get:lt,set:Pt});Object.defineProperty(i,He,{enumerable:!0,configurable:!0,get:()=>Yt.value,set:xt=>Yt.value=xt})}if(o)for(const He in o)pA(o[He],i,r,He);if(y){const He=sr(y)?y.call(r):y;Reflect.ownKeys(He).forEach(Oe=>{Ns(Oe,He[Oe])})}T&&xC(T,e,"c");function Pe(He,Oe){$t(Oe)?Oe.forEach(lt=>He(lt.bind(r))):Oe&&He(Oe.bind(r))}if(Pe(EF,k),Pe(js,M),Pe(cA,P),Pe(Vw,L),Pe(oA,O),Pe(aA,$),Pe(uA,fe),Pe(PF,te),Pe(IF,ce),Pe(bc,J),Pe(Wu,U),Pe(kF,Se),$t(xe))if(xe.length){const He=e.exposed||(e.exposed={});xe.forEach(Oe=>{Object.defineProperty(He,Oe,{get:()=>r[Oe],set:lt=>r[Oe]=lt})})}else e.exposed||(e.exposed={});V&&e.render===io&&(e.render=V),et!=null&&(e.inheritAttrs=et),ze&&(e.components=ze),Ze&&(e.directives=Ze),Se&&$w(e)}function zF(e,t,r=io){$t(e)&&(e=Kx(e));for(const i in e){const a=e[i];let h;fn(a)?"default"in a?h=an(a.from||i,a.default,!0):h=an(a.from||i):h=an(a),Xr(h)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>h.value,set:d=>h.value=d}):t[i]=h}}function xC(e,t,r){No($t(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,r)}function pA(e,t,r,i){let a=i.includes(".")?kA(r,i):()=>r[i];if(In(e)){const h=t[e];sr(h)&&Mr(a,h)}else if(sr(e))Mr(a,e.bind(r));else if(fn(e))if($t(e))e.forEach(h=>pA(h,t,r,i));else{const h=sr(e.handler)?e.handler.bind(r):t[e.handler];sr(h)&&Mr(a,h,e)}}function Zw(e){const t=e.type,{mixins:r,extends:i}=t,{mixins:a,optionsCache:h,config:{optionMergeStrategies:d}}=e.appContext,o=h.get(t);let y;return o?y=o:!a.length&&!r&&!i?y=t:(y={},a.length&&a.forEach(w=>L_(y,w,d,!0)),L_(y,t,d)),fn(t)&&h.set(t,y),y}function L_(e,t,r,i=!1){const{mixins:a,extends:h}=t;h&&L_(e,h,r,!0),a&&a.forEach(d=>L_(e,d,r,!0));for(const d in t)if(!(i&&d==="expose")){const o=DF[d]||r&&r[d];e[d]=o?o(e[d],t[d]):t[d]}return e}const DF={data:wC,props:SC,emits:SC,methods:Op,computed:Op,beforeCreate:as,created:as,beforeMount:as,mounted:as,beforeUpdate:as,updated:as,beforeDestroy:as,beforeUnmount:as,destroyed:as,unmounted:as,activated:as,deactivated:as,errorCaptured:as,serverPrefetch:as,components:Op,directives:Op,watch:FF,provide:wC,inject:OF};function wC(e,t){return t?e?function(){return mn(sr(e)?e.call(this,this):e,sr(t)?t.call(this,this):t)}:t:e}function OF(e,t){return Op(Kx(e),Kx(t))}function Kx(e){if($t(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function as(e,t){return e?[...new Set([].concat(e,t))]:t}function Op(e,t){return e?mn(Object.create(null),e,t):t}function SC(e,t){return e?$t(e)&&$t(t)?[...new Set([...e,...t])]:mn(Object.create(null),pm(e),pm(t??{})):t}function FF(e,t){if(!e)return t;if(!t)return e;const r=mn(Object.create(null),e);for(const i in t)r[i]=as(e[i],t[i]);return r}function mA(){return{app:null,config:{isNativeTag:y3,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let BF=0;function NF(e,t){return function(i,a=null){sr(i)||(i=mn({},i)),a!=null&&!fn(a)&&(a=null);const h=mA(),d=new WeakSet,o=[];let y=!1;const w=h.app={_uid:BF++,_component:i,_props:a,_container:null,_context:h,_instance:null,version:y4,get config(){return h.config},set config(T){},use(T,...k){return d.has(T)||(T&&sr(T.install)?(d.add(T),T.install(w,...k)):sr(T)&&(d.add(T),T(w,...k))),w},mixin(T){return h.mixins.includes(T)||h.mixins.push(T),w},component(T,k){return k?(h.components[T]=k,w):h.components[T]},directive(T,k){return k?(h.directives[T]=k,w):h.directives[T]},mount(T,k,M){if(!y){const P=w._ceVNode||Sr(i,a);return P.appContext=h,M===!0?M="svg":M===!1&&(M=void 0),k&&t?t(P,T):e(P,T,M),y=!0,w._container=T,T.__vue_app__=w,Gm(P.component)}},onUnmount(T){o.push(T)},unmount(){y&&(No(o,w._instance,16),e(null,w._container),delete w._container.__vue_app__)},provide(T,k){return h.provides[T]=k,w},runWithContext(T){const k=ku;ku=w;try{return T()}finally{ku=k}}};return w}}let ku=null;function Ns(e,t){if(xi){let r=xi.provides;const i=xi.parent&&xi.parent.provides;i===r&&(r=xi.provides=Object.create(i)),r[e]=t}}function an(e,t,r=!1){const i=xi||wi;if(i||ku){let a=ku?ku._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(a&&e in a)return a[e];if(arguments.length>1)return r&&sr(t)?t.call(i&&i.proxy):t}}function Vm(){return!!(xi||wi||ku)}const gA={},yA=()=>Object.create(gA),_A=e=>Object.getPrototypeOf(e)===gA;function jF(e,t,r,i=!1){const a={},h=yA();e.propsDefaults=Object.create(null),vA(e,t,a,h);for(const d in e.propsOptions[0])d in a||(a[d]=void 0);r?e.props=i?a:da(a):e.type.props?e.props=a:e.props=h,e.attrs=h}function $F(e,t,r,i){const{props:a,attrs:h,vnode:{patchFlag:d}}=e,o=qr(a),[y]=e.propsOptions;let w=!1;if((i||d>0)&&!(d&16)){if(d&8){const T=e.vnode.dynamicProps;for(let k=0;k<T.length;k++){let M=T[k];if(zv(e.emitsOptions,M))continue;const P=t[M];if(y)if(Qr(h,M))P!==h[M]&&(h[M]=P,w=!0);else{const L=Ai(M);a[L]=Xx(y,o,L,P,e,!1)}else P!==h[M]&&(h[M]=P,w=!0)}}}else{vA(e,t,a,h)&&(w=!0);let T;for(const k in o)(!t||!Qr(t,k)&&((T=Cs(k))===k||!Qr(t,T)))&&(y?r&&(r[k]!==void 0||r[T]!==void 0)&&(a[k]=Xx(y,o,k,void 0,e,!0)):delete a[k]);if(h!==o)for(const k in h)(!t||!Qr(t,k))&&(delete h[k],w=!0)}w&&Xa(e.attrs,"set","")}function vA(e,t,r,i){const[a,h]=e.propsOptions;let d=!1,o;if(t)for(let y in t){if(gd(y))continue;const w=t[y];let T;a&&Qr(a,T=Ai(y))?!h||!h.includes(T)?r[T]=w:(o||(o={}))[T]=w:zv(e.emitsOptions,y)||(!(y in i)||w!==i[y])&&(i[y]=w,d=!0)}if(h){const y=qr(r),w=o||Gr;for(let T=0;T<h.length;T++){const k=h[T];r[k]=Xx(a,y,k,w[k],e,!Qr(w,k))}}return d}function Xx(e,t,r,i,a,h){const d=e[r];if(d!=null){const o=Qr(d,"default");if(o&&i===void 0){const y=d.default;if(d.type!==Function&&!d.skipFactory&&sr(y)){const{propsDefaults:w}=a;if(r in w)i=w[r];else{const T=Nu(a);i=w[r]=y.call(null,t),T()}}else i=y;a.ce&&a.ce._setProp(r,i)}d[0]&&(h&&!o?i=!1:d[1]&&(i===""||i===Cs(r))&&(i=!0))}return i}const UF=new WeakMap;function bA(e,t,r=!1){const i=r?UF:t.propsCache,a=i.get(e);if(a)return a;const h=e.props,d={},o=[];let y=!1;if(!sr(e)){const T=k=>{y=!0;const[M,P]=bA(k,t,!0);mn(d,M),P&&o.push(...P)};!r&&t.mixins.length&&t.mixins.forEach(T),e.extends&&T(e.extends),e.mixins&&e.mixins.forEach(T)}if(!h&&!y)return fn(e)&&i.set(e,pd),pd;if($t(h))for(let T=0;T<h.length;T++){const k=Ai(h[T]);TC(k)&&(d[k]=Gr)}else if(h)for(const T in h){const k=Ai(T);if(TC(k)){const M=h[T],P=d[k]=$t(M)||sr(M)?{type:M}:mn({},M),L=P.type;let O=!1,$=!0;if($t(L))for(let Z=0;Z<L.length;++Z){const J=L[Z],H=sr(J)&&J.name;if(H==="Boolean"){O=!0;break}else H==="String"&&($=!1)}else O=sr(L)&&L.name==="Boolean";P[0]=O,P[1]=$,(O||Qr(P,"default"))&&o.push(k)}}const w=[d,o];return fn(e)&&i.set(e,w),w}function TC(e){return e[0]!=="$"&&!gd(e)}const Ww=e=>e[0]==="_"||e==="$stable",Kw=e=>$t(e)?e.map(Ts):[Ts(e)],VF=(e,t,r)=>{if(t._n)return t;const i=dr((...a)=>Kw(t(...a)),r);return i._c=!1,i},xA=(e,t,r)=>{const i=e._ctx;for(const a in e){if(Ww(a))continue;const h=e[a];if(sr(h))t[a]=VF(a,h,i);else if(h!=null){const d=Kw(h);t[a]=()=>d}}},wA=(e,t)=>{const r=Kw(t);e.slots.default=()=>r},SA=(e,t,r)=>{for(const i in t)(r||!Ww(i))&&(e[i]=t[i])},qF=(e,t,r)=>{const i=e.slots=yA();if(e.vnode.shapeFlag&32){const a=t.__;a&&$x(i,"__",a,!0);const h=t._;h?(SA(i,t,r),r&&$x(i,"_",h,!0)):xA(t,i)}else t&&wA(e,t)},GF=(e,t,r)=>{const{vnode:i,slots:a}=e;let h=!0,d=Gr;if(i.shapeFlag&32){const o=t._;o?r&&o===1?h=!1:SA(a,t,r):(h=!t.$stable,xA(t,a)),d=t}else t&&(wA(e,t),d={default:1});if(h)for(const o in a)!Ww(o)&&d[o]==null&&delete a[o]},_i=MA;function HF(e){return TA(e)}function ZF(e){return TA(e,yF)}function TA(e,t){const r=Ev();r.__VUE__=!0;const{insert:i,remove:a,patchProp:h,createElement:d,createText:o,createComment:y,setText:w,setElementText:T,parentNode:k,nextSibling:M,setScopeId:P=io,insertStaticContent:L}=e,O=(ue,me,je,ft=null,Xe=null,dt=null,Ee=void 0,Fe=null,Ke=!!me.dynamicChildren)=>{if(ue===me)return;
vendor: 4,125 bytes, line 15
15ue&&!Io(ue,me)&&(ft=Je(ue),xt(ue,Xe,dt,!0),ue=null),me.patchFlag===-2&&(Ke=!1,me.dynamicChildren=null);const{type:nt,ref:St,shapeFlag:mt}=me;switch(nt){case Iu:$(ue,me,je,ft);break;case Yn:Z(ue,me,je,ft);break;case xd:ue==null&&J(me,je,ft,Ee);break;case Cn:ze(ue,me,je,ft,Xe,dt,Ee,Fe,Ke);break;default:mt&1?V(ue,me,je,ft,Xe,dt,Ee,Fe,Ke):mt&6?Ze(ue,me,je,ft,Xe,dt,Ee,Fe,Ke):(mt&64||mt&128)&&nt.process(ue,me,je,ft,Xe,dt,Ee,Fe,Ke,pt)}St!=null&&Xe?vd(St,ue&&ue.ref,dt,me||ue,!me):St==null&&ue&&ue.ref!=null&&vd(ue.ref,null,dt,ue,!0)},$=(ue,me,je,ft)=>{if(ue==null)i(me.el=o(me.children),je,ft);else{const Xe=me.el=ue.el;me.children!==ue.children&&w(Xe,me.children)}},Z=(ue,me,je,ft)=>{ue==null?i(me.el=y(me.children||""),je,ft):me.el=ue.el},J=(ue,me,je,ft)=>{[ue.el,ue.anchor]=L(ue.children,me,je,ft,ue.el,ue.anchor)},H=({el:ue,anchor:me},je,ft)=>{let Xe;for(;ue&&ue!==me;)Xe=M(ue),i(ue,je,ft),ue=Xe;i(me,je,ft)},U=({el:ue,anchor:me})=>{let je;for(;ue&&ue!==me;)je=M(ue),a(ue),ue=je;a(me)},V=(ue,me,je,ft,Xe,dt,Ee,Fe,Ke)=>{me.type==="svg"?Ee="svg":me.type==="math"&&(Ee="mathml"),ue==null?te(me,je,ft,Xe,dt,Ee,Fe,Ke):Se(ue,me,Xe,dt,Ee,Fe,Ke)},te=(ue,me,je,ft,Xe,dt,Ee,Fe)=>{let Ke,nt;const{props:St,shapeFlag:mt,transition:Lt,dirs:Gt}=ue;if(Ke=ue.el=d(ue.type,dt,St&&St.is,St),mt&8?T(Ke,ue.children):mt&16&&fe(ue.children,Ke,null,ft,Xe,Gb(ue,dt),Ee,Fe),Gt&&ua(ue,null,ft,"created"),ce(Ke,ue,ue.scopeId,Ee,ft),St){for(const cr in St)cr!=="value"&&!gd(cr)&&h(Ke,cr,null,St[cr],dt,ft);"value"in St&&h(Ke,"value",null,St.value,dt),(nt=St.onVnodeBeforeMount)&&Ss(nt,ft,ue)}Gt&&ua(ue,null,ft,"beforeMount");const Qt=CA(Xe,Lt);Qt&&Lt.beforeEnter(Ke),i(Ke,me,je),((nt=St&&St.onVnodeMounted)||Qt||Gt)&&_i(()=>{nt&&Ss(nt,ft,ue),Qt&&Lt.enter(Ke),Gt&&ua(ue,null,ft,"mounted")},Xe)},ce=(ue,me,je,ft,Xe)=>{if(je&&P(ue,je),ft)for(let dt=0;dt<ft.length;dt++)P(ue,ft[dt]);if(Xe){let dt=Xe.subTree;if(me===dt||D_(dt.type)&&(dt.ssContent===me||dt.ssFallback===me)){const Ee=Xe.vnode;ce(ue,Ee,Ee.scopeId,Ee.slotScopeIds,Xe.parent)}}},fe=(ue,me,je,ft,Xe,dt,Ee,Fe,Ke=0)=>{for(let nt=Ke;nt<ue.length;nt++){const St=ue[nt]=Fe?rc(ue[nt]):Ts(ue[nt]);O(null,St,me,je,ft,Xe,dt,Ee,Fe)}},Se=(ue,me,je,ft,Xe,dt,Ee)=>{const Fe=me.el=ue.el;let{patchFlag:Ke,dynamicChildren:nt,dirs:St}=me;Ke|=ue.patchFlag&16;const mt=ue.props||Gr,Lt=me.props||Gr;let Gt;if(je&&pu(je,!1),(Gt=Lt.onVnodeBeforeUpdate)&&Ss(Gt,je,me,ue),St&&ua(me,ue,je,"beforeUpdate"),je&&pu(je,!0),(mt.innerHTML&&Lt.innerHTML==null||mt.textContent&&Lt.textContent==null)&&T(Fe,""),nt?xe(ue.dynamicChildren,nt,Fe,je,ft,Gb(me,Xe),dt):Ee||Oe(ue,me,Fe,null,je,ft,Gb(me,Xe),dt,!1),Ke>0){if(Ke&16)et(Fe,mt,Lt,je,Xe);else if(Ke&2&&mt.class!==Lt.class&&h(Fe,"class",null,Lt.class,Xe),Ke&4&&h(Fe,"style",mt.style,Lt.style,Xe),Ke&8){const Qt=me.dynamicProps;for(let cr=0;cr<Qt.length;cr++){const Ir=Qt[cr],Ln=mt[Ir],un=Lt[Ir];(un!==Ln||Ir==="value")&&h(Fe,Ir,Ln,un,Xe,je)}}Ke&1&&ue.children!==me.children&&T(Fe,me.children)}else!Ee&&nt==null&&et(Fe,mt,Lt,je,Xe);((Gt=Lt.onVnodeUpdated)||St)&&_i(()=>{Gt&&Ss(Gt,je,me,ue),St&&ua(me,ue,je,"updated")},ft)},xe=(ue,me,je,ft,Xe,dt,Ee)=>{for(let Fe=0;Fe<me.length;Fe++){const Ke=ue[Fe],nt=me[Fe],St=Ke.el&&(Ke.type===Cn||!Io(Ke,nt)||Ke.shapeFlag&198)?k(Ke.el):je;O(Ke,nt,St,null,ft,Xe,dt,Ee,!0)}},et=(ue,me,je,ft,Xe)=>{if(me!==je){if(me!==Gr)for(const dt in me)!gd(dt)&&!(dt in je)&&h(ue,dt,me[dt],null,Xe,ft);for(const dt in je){if(gd(dt))continue;const Ee=je[dt],Fe=me[dt];Ee!==Fe&&dt!=="value"&&h(ue,dt,Fe,Ee,Xe,ft)}"value"in je&&h(ue,"value",me.value,je.value,Xe)}},ze=(ue,me,je,ft,Xe,dt,Ee,Fe,Ke)=>{const nt=me.el=ue?ue.el:o(""),St=me.anchor=ue?ue.anchor:o("");let{patchFlag:mt,dynamicChildren:Lt,slotScopeIds:Gt}=me;Gt&&(Fe=Fe?Fe.concat(Gt):Gt),ue==null?(i(nt,je,ft),i(St,je,ft),fe(me.children||[],je,St,Xe,dt,Ee,Fe,Ke)):mt>0&&mt&64&&Lt&&ue.dynamicChildren?(xe(ue.dynamicChildren,Lt,je,Xe,dt,Ee,Fe),(me.key!=null||Xe&&me===Xe.subTree)&&Xw(ue,me,!0)):Oe(ue,me,je,St,Xe,dt,Ee,Fe,Ke)},Ze=(ue,me,je,ft,Xe,dt,Ee,Fe,Ke)=>{me.slotScopeIds=Fe,ue==null?me.shapeFlag&512?Xe.ctx.activate(me,je,ft,Ee,Ke):tt(me,je,ft,Xe,dt,Ee,Ke):at(ue,me,Ke)},tt=(ue,me,je,ft,Xe,dt,Ee)=>
vendor: 11,309 bytes, line 15
15{const Fe=ue.component=DA(ue,ft,Xe);if(Um(ue)&&(Fe.ctx.renderer=pt),FA(Fe,!1,Ee),Fe.asyncDep){if(Xe&&Xe.registerDep(Fe,Pe,Ee),!ue.el){const Ke=Fe.subTree=Sr(Yn);Z(null,Ke,me,je)}}else Pe(Fe,ue,me,je,Xe,dt,Ee)},at=(ue,me,je)=>{const ft=me.component=ue.component;if(n4(ue,me,je))if(ft.asyncDep&&!ft.asyncResolved){He(ft,me,je);return}else ft.next=me,ft.update();else me.el=ue.el,ft.vnode=me},Pe=(ue,me,je,ft,Xe,dt,Ee)=>{const Fe=()=>{if(ue.isMounted){let{next:mt,bu:Lt,u:Gt,parent:Qt,vnode:cr}=ue;{const Q=EA(ue);if(Q){mt&&(mt.el=cr.el,He(ue,mt,Ee)),Q.asyncDep.then(()=>{ue.isUnmounted||Fe()});return}}let Ir=mt,Ln;pu(ue,!1),mt?(mt.el=cr.el,He(ue,mt,Ee)):mt=cr,Lt&&yd(Lt),(Ln=mt.props&&mt.props.onVnodeBeforeUpdate)&&Ss(Ln,Qt,mt,cr),pu(ue,!0);const un=i_(ue),Me=ue.subTree;ue.subTree=un,O(Me,un,k(Me.el),Je(Me),ue,Xe,dt),mt.el=un.el,Ir===null&&Dv(ue,un.el),Gt&&_i(Gt,Xe),(Ln=mt.props&&mt.props.onVnodeUpdated)&&_i(()=>Ss(Ln,Qt,mt,cr),Xe)}else{let mt;const{el:Lt,props:Gt}=me,{bm:Qt,m:cr,parent:Ir,root:Ln,type:un}=ue,Me=lc(me);if(pu(ue,!1),Qt&&yd(Qt),!Me&&(mt=Gt&&Gt.onVnodeBeforeMount)&&Ss(mt,Ir,me),pu(ue,!0),Lt&&rr){const Q=()=>{ue.subTree=i_(ue),rr(Lt,ue.subTree,ue,Xe,null)};Me&&un.__asyncHydrate?un.__asyncHydrate(Lt,ue,Q):Q()}else{Ln.ce&&Ln.ce._def.shadowRoot!==!1&&Ln.ce._injectChildStyle(un);const Q=ue.subTree=i_(ue);O(null,Q,je,ft,ue,Xe,dt),me.el=Q.el}if(cr&&_i(cr,Xe),!Me&&(mt=Gt&&Gt.onVnodeMounted)){const Q=me;_i(()=>Ss(mt,Ir,Q),Xe)}(me.shapeFlag&256||Ir&&lc(Ir.vnode)&&Ir.vnode.shapeFlag&256)&&ue.a&&_i(ue.a,Xe),ue.isMounted=!0,me=je=ft=null}};ue.scope.on();const Ke=ue.effect=new C_(Fe);ue.scope.off();const nt=ue.update=Ke.run.bind(Ke),St=ue.job=Ke.runIfDirty.bind(Ke);St.i=ue,St.id=ue.uid,Ke.scheduler=()=>Nw(St),pu(ue,!0),nt()},He=(ue,me,je)=>{me.component=ue;const ft=ue.vnode.props;ue.vnode=me,ue.next=null,$F(ue,me.props,ft,je),GF(ue,me.children,je),ol(),dC(ue),al()},Oe=(ue,me,je,ft,Xe,dt,Ee,Fe,Ke=!1)=>{const nt=ue&&ue.children,St=ue?ue.shapeFlag:0,mt=me.children,{patchFlag:Lt,shapeFlag:Gt}=me;if(Lt>0){if(Lt&128){Pt(nt,mt,je,ft,Xe,dt,Ee,Fe,Ke);return}else if(Lt&256){lt(nt,mt,je,ft,Xe,dt,Ee,Fe,Ke);return}}Gt&8?(St&16&&zr(nt,Xe,dt),mt!==nt&&T(je,mt)):St&16?Gt&16?Pt(nt,mt,je,ft,Xe,dt,Ee,Fe,Ke):zr(nt,Xe,dt,!0):(St&8&&T(je,""),Gt&16&&fe(mt,je,ft,Xe,dt,Ee,Fe,Ke))},lt=(ue,me,je,ft,Xe,dt,Ee,Fe,Ke)=>{ue=ue||pd,me=me||pd;const nt=ue.length,St=me.length,mt=Math.min(nt,St);let Lt;for(Lt=0;Lt<mt;Lt++){const Gt=me[Lt]=Ke?rc(me[Lt]):Ts(me[Lt]);O(ue[Lt],Gt,je,null,Xe,dt,Ee,Fe,Ke)}nt>St?zr(ue,Xe,dt,!0,!1,mt):fe(me,je,ft,Xe,dt,Ee,Fe,Ke,mt)},Pt=(ue,me,je,ft,Xe,dt,Ee,Fe,Ke)=>{let nt=0;const St=me.length;let mt=ue.length-1,Lt=St-1;for(;nt<=mt&&nt<=Lt;){const Gt=ue[nt],Qt=me[nt]=Ke?rc(me[nt]):Ts(me[nt]);if(Io(Gt,Qt))O(Gt,Qt,je,null,Xe,dt,Ee,Fe,Ke);else break;nt++}for(;nt<=mt&&nt<=Lt;){const Gt=ue[mt],Qt=me[Lt]=Ke?rc(me[Lt]):Ts(me[Lt]);if(Io(Gt,Qt))O(Gt,Qt,je,null,Xe,dt,Ee,Fe,Ke);else break;mt--,Lt--}if(nt>mt){if(nt<=Lt){const Gt=Lt+1,Qt=Gt<St?me[Gt].el:ft;for(;nt<=Lt;)O(null,me[nt]=Ke?rc(me[nt]):Ts(me[nt]),je,Qt,Xe,dt,Ee,Fe,Ke),nt++}}else if(nt>Lt)for(;nt<=mt;)xt(ue[nt],Xe,dt,!0),nt++;else{const Gt=nt,Qt=nt,cr=new Map;for(nt=Qt;nt<=Lt;nt++){const pe=me[nt]=Ke?rc(me[nt]):Ts(me[nt]);pe.key!=null&&cr.set(pe.key,nt)}let Ir,Ln=0;const un=Lt-Qt+1;let Me=!1,Q=0;const re=new Array(un);for(nt=0;nt<un;nt++)re[nt]=0;for(nt=Gt;nt<=mt;nt++){const pe=ue[nt];if(Ln>=un){xt(pe,Xe,dt,!0);continue}let Te;if(pe.key!=null)Te=cr.get(pe.key);else for(Ir=Qt;Ir<=Lt;Ir++)if(re[Ir-Qt]===0&&Io(pe,me[Ir])){Te=Ir;break}Te===void 0?xt(pe,Xe,dt,!0):(re[Te-Qt]=nt+1,Te>=Q?Q=Te:Me=!0,O(pe,me[Te],je,null,Xe,dt,Ee,Fe,Ke),Ln++)}const se=Me?WF(re):pd;for(Ir=se.length-1,nt=un-1;nt>=0;nt--){const pe=Qt+nt,Te=me[pe],Le=pe+1<St?me[pe+1].el:ft;re[nt]===0?O(null,Te,je,Le,Xe,dt,Ee,Fe,Ke):Me&&(Ir<0||nt!==se[Ir]?Yt(Te,je,Le,2):Ir--)}}},Yt=(ue,me,je,ft,Xe=null)=>{const{el:dt,type:Ee,transition:Fe,children:Ke,shapeFlag:nt}=ue;if(nt&6){Yt(ue.component.subTree,me,je,ft);return}if(nt&128){ue.suspense.move(me,je,ft);return}if(nt&64){Ee.move(ue,me,je,pt);return}if(Ee===Cn){i(dt,me,je);for(let mt=0;mt<Ke.length;mt++)Yt(Ke[mt],me,je,ft);i(ue.anchor,me,je);return}if(Ee===xd){H(ue,me,je);return}if(ft!==2&&nt&1&&Fe)if(ft===0)Fe.beforeEnter(dt),i(dt,me,je),_i(()=>Fe.enter(dt),Xe);else{const{leave:mt,delayLeave:Lt,afterLeave:Gt}=Fe,Qt=()=>{ue.ctx.isUnmounted?a(dt):i(dt,me,je)},cr=()=>{mt(dt,()=>{Qt(),Gt&&Gt()})};Lt?Lt(dt,Qt,cr):cr()}else i(dt,me,je)},xt=(ue,me,je,ft=!1,Xe=!1)=>{const{type:dt,props:Ee,ref:Fe,children:Ke,dynamicChildren:nt,shapeFlag:St,patchFlag:mt,dirs:Lt,cacheIndex:Gt}=ue;if(mt===-2&&(Xe=!1),Fe!=null&&(ol(),vd(Fe,null,je,ue,!0),al()),Gt!=null&&(me.renderCache[Gt]=void 0),St&256){me.ctx.deactivate(ue);return}const Qt=St&1&&Lt,cr=!lc(ue);let Ir;if(cr&&(Ir=Ee&&Ee.onVnodeBeforeUnmount)&&Ss(Ir,me,ue),St&6)Or(ue.component,je,ft);else{if(St&128){ue.suspense.unmount(je,ft);return}Qt&&ua(ue,null,me,"beforeUnmount"),St&64?ue.type.remove(ue,me,je,pt,ft):nt&&!nt.hasOnce&&(dt!==Cn||mt>0&&mt&64)?zr(nt,me,je,!1,!0):(dt===Cn&&mt&384||!Xe&&St&16)&&zr(Ke,me,je),ft&&tr(ue)}(cr&&(Ir=Ee&&Ee.onVnodeUnmounted)||Qt)&&_i(()=>{Ir&&Ss(Ir,me,ue),Qt&&ua(ue,null,me,"unmounted")},je)},tr=ue=>{const{type:me,el:je,anchor:ft,transition:Xe}=ue;if(me===Cn){lr(je,ft);return}if(me===xd){U(ue);return}const dt=()=>{a(je),Xe&&!Xe.persisted&&Xe.afterLeave&&Xe.afterLeave()};if(ue.shapeFlag&1&&Xe&&!Xe.persisted){const{leave:Ee,delayLeave:Fe}=Xe,Ke=()=>Ee(je,dt);Fe?Fe(ue.el,dt,Ke):Ke()}else dt()},lr=(ue,me)=>{let je;for(;ue!==me;)je=M(ue),a(ue),ue=je;a(me)},Or=(ue,me,je)=>{const{bum:ft,scope:Xe,job:dt,subTree:Ee,um:Fe,m:Ke,a:nt,parent:St,slots:{__:mt}}=ue;z_(Ke),z_(nt),ft&&yd(ft),St&&$t(mt)&&mt.forEach(Lt=>{St.renderCache[Lt]=void 0}),Xe.stop(),dt&&(dt.flags|=8,xt(Ee,ue,me,je)),Fe&&_i(Fe,me),_i(()=>{ue.isUnmounted=!0},me),me&&me.pendingBranch&&!me.isUnmounted&&ue.asyncDep&&!ue.asyncResolved&&ue.suspenseId===me.pendingId&&(me.deps--,me.deps===0&&me.resolve())},zr=(ue,me,je,ft=!1,Xe=!1,dt=0)=>{for(let Ee=dt;Ee<ue.length;Ee++)xt(ue[Ee],me,je,ft,Xe)},Je=ue=>{if(ue.shapeFlag&6)return Je(ue.component.subTree);if(ue.shapeFlag&128)return ue.suspense.next();const me=M(ue.anchor||ue.el),je=me&&me[XP];return je?M(je):me};let At=!1;const _t=(ue,me,je)=>{ue==null?me._vnode&&xt(me._vnode,null,null,!0):O(me._vnode||null,ue,me,null,null,null,je),me._vnode=ue,At||(At=!0,dC(),M_(),At=!1)},pt={p:O,um:xt,m:Yt,r:tr,mt:tt,mc:fe,pc:Oe,pbc:xe,n:Je,o:e};let Nt,rr;return t&&([Nt,rr]=t(pt)),{render:_t,hydrate:Nt,createApp:NF(_t,Nt)}}function Gb({type:e,props:t},r){return r==="svg"&&e==="foreignObject"||r==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:r}function pu({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function CA(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Xw(e,t,r=!1){const i=e.children,a=t.children;if($t(i)&&$t(a))for(let h=0;h<i.length;h++){const d=i[h];let o=a[h];o.shapeFlag&1&&!o.dynamicChildren&&((o.patchFlag<=0||o.patchFlag===32)&&(o=a[h]=rc(a[h]),o.el=d.el),!r&&o.patchFlag!==-2&&Xw(d,o)),o.type===Iu&&(o.el=d.el),o.type===Yn&&!o.el&&(o.el=d.el)}}function WF(e){const t=e.slice(),r=[0];let i,a,h,d,o;const y=e.length;for(i=0;i<y;i++){const w=e[i];if(w!==0){if(a=r[r.length-1],e[a]<w){t[i]=a,r.push(i);continue}for(h=0,d=r.length-1;h<d;)o=h+d>>1,e[r[o]]<w?h=o+1:d=o;w<e[r[h]]&&(h>0&&(t[i]=r[h-1]),r[h]=i)}}for(h=r.length,d=r[h-1];h-- >0;)r[h]=d,d=t[d];return r}function EA(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:EA(t)}function z_(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const KF=Symbol.for("v-scx"),XF=()=>an(KF);function jo(e,t){return qm(e,null,t)}function Qte(e,t){return qm(e,null,{flush:"post"})}function YF(e,t){return qm(e,null,{flush:"sync"})}function Mr(e,t,r){return qm(e,t,r)}function qm(e,t,r=Gr){const{immediate:i,deep:a,flush:h,once:d}=r,o=mn({},r),y=t&&i||!t&&h!=="post";let w;if(Pd){if(h==="sync"){const P=XF();w=P.__watcherHandles||(P.__watcherHandles=[])}else if(!y){const P=()=>{};return P.stop=io,P.resume=io,P.pause=io,P}}const T=xi;o.call=(P,L,O)=>No(P,T,L,O);let k=!1;h==="post"?o.scheduler=P=>{_i(P,T&&T.suspense)}:h!=="sync"&&(k=!0,o.scheduler=(P,L)=>{L?P():Nw(P)}),o.augmentJob=P=>{t&&(P.flags|=4),k&&(P.flags|=2,T&&(P.id=T.uid,P.i=T))};const M=sF(e,t,o);return Pd&&(w?w.push(M):y&&M()),M}function JF(e,t,r){const i=this.proxy,a=In(e)?e.includes(".")?kA(i,e):()=>i[e]:e.bind(i,i);let h;sr(t)?h=t:(h=t.handler,r=t);const d=Nu(this),o=qm(a,h.bind(i),r);return d(),o}function kA(e,t){const r=t.split(".");return()=>{let i=e;for(let a=0;a<r.length&&i;a++)i=i[r[a]];return i}}function ere(e,t,r=Gr){const i=ci(),a=Ai(t),h=Cs(t),d=IA(e,a),o=jm((y,w)=>{let T,k=Gr,M;return YF(()=>{const P=e[a];hs(T,P)&&(T=P,w())}),{get(){return y(),r.get?r.get(T):T},set(P){const L=r.set?r.set(P):P;if(!hs(L,T)&&!(k!==Gr&&hs(P,k)))return;const O=i.vnode.props;O&&(t in O||a in O||h in O)&&(`onUpdate:${t}`in O||`onUpdate:${a}`in O||`onUpdate:${h}`in O)||(T=P,w()),i.emit(`update:${t}`,L),hs(P,L)&&hs(P,k)&&!hs(L,M)&&w(),k=P,M=L}}});return o[Symbol.iterator]=()=>{let y=0;return{next(){return y<2?{value:y++?d||Gr:o,done:!1}:{done:!0}}}},o}const IA=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ai(t)}Modifiers`]||e[`${Cs(t)}Modifiers`];function QF(e,t,...r){if(e.isUnmounted)return;const i=e.vnode.props||Gr;let a=r;const h=t.startsWith("update:"),d=h&&IA(i,t.slice(7));d&&(d.trim&&(a=r.map(T=>In(T)?T.trim():T)),d.number&&(a=r.map(S_)));let o,y=i[o=Up(t)]||i[o=Up(Ai(t))];!y&&h&&(y=i[o=Up(Cs(t))]),y&&No(y,e,6,a);const w=i[o+"Once"];if(w){if(!e.emitted)e.emitted={};else if(e.emitted[o])return;e.emitted[o]=!0,No(w,e,6,a)}}function PA(e,t,r=!1){const i=t.emitsCache,a=i.get(e);if(a!==void 0)return a;const h=e.emits;let d={},o=!1;if(!sr(e)){const y=w=>{const T=PA(w,t,!0);T&&(o=!0,mn(d,T))};!r&&t.mixins.length&&t.mixins.forEach(y),e.extends&&y(e.extends),e.mixins&&e.mixins.forEach(y)}return!h&&!o?(fn(e)&&i.set(e,null),null):($t(h)?h.forEach(y=>d[y]=null):mn(d,h),fn(e)&&i.set(e,d),d)}function zv(e,t){return!e||!Bm(t)?!1:(t=t.slice(2).replace(/Once$/,""),Qr(e,t[0].toLowerCase()+t.slice(1))||Qr(e,Cs(t))||Qr(e,t))}function i_(e){const{type:t,vnode:r,proxy:i,withProxy:a,propsOptions:[h],slots:d,attrs:o,emit:y,render:w,renderCache:T,props:k,data:M,setupState:P,ctx:L,inheritAttrs:O}=e,$=dm(e);let Z,J;try{if(r.shapeFlag&4){const U=a||i,V=U;Z=Ts(w.call(V,U,T,k,P,M,L)),J=o}else{const U=t;Z=Ts(U.length>1?U(k,{attrs:o,slots:d,emit:y}):U(k,null)),J=t.props?o:t4(o)}}catch(U){Zp.length=0,qd(U,e,1),Z=Sr(Yn)}let H=Z;if(J&&O!==!1){const U=Object.keys(J),{shapeFlag:V}=H;U.length&&V&7&&(h&&U.some(Mw)&&(J=r4(J,h)),H=Sa(H,J,!1,!0))}return r.dirs&&(H=Sa(H,null,!1,!0),H.dirs=H.dirs?H.dirs.concat(r.dirs):r.dirs),r.transition&&fc(H,r.transition),Z=H,dm($),Z}function e4(e,t=!0){let r;for(let i=0;i<e.length;i++){const a=e[i];if(pc(a)){if(a.type!==Yn||a.children==="v-if"){if(r)return;r=a}}else return}return r}const t4=e=>{let t;for(const r in e)(r==="class"||r==="style"||Bm(r))&&((t||(t={}))[r]=e[r]);return t},r4=(e,t)=>{const r={};for(const i in e)(!Mw(i)||!(i.slice(9)in t))&&(r[i]=e[i]);return r};function n4(e,t,r){const{props:i,children:a,component:h}=e,{props:d,children:o,patchFlag:y}=t,w=h.emitsOptions;if(t.dirs||t.transition)return!0;
vendor: 4,345 bytes, line 15
15if(r&&y>=0){if(y&1024)return!0;if(y&16)return i?CC(i,d,w):!!d;if(y&8){const T=t.dynamicProps;for(let k=0;k<T.length;k++){const M=T[k];if(d[M]!==i[M]&&!zv(w,M))return!0}}}else return(a||o)&&(!o||!o.$stable)?!0:i===d?!1:i?d?CC(i,d,w):!0:!!d;return!1}function CC(e,t,r){const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let a=0;a<i.length;a++){const h=i[a];if(t[h]!==e[h]&&!zv(r,h))return!0}return!1}function Dv({vnode:e,parent:t},r){for(;t;){const i=t.subTree;if(i.suspense&&i.suspense.activeBranch===e&&(i.el=e.el),i===e)(e=t.vnode).el=r,t=t.parent;else break}}const D_=e=>e.__isSuspense;let Yx=0;const i4={name:"Suspense",__isSuspense:!0,process(e,t,r,i,a,h,d,o,y,w){if(e==null)s4(t,r,i,a,h,d,o,y,w);else{if(h&&h.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}o4(e,t,r,i,a,d,o,y,w)}},hydrate:a4,normalize:l4},Yw=i4;function mm(e,t){const r=e.props&&e.props[t];sr(r)&&r()}function s4(e,t,r,i,a,h,d,o,y){const{p:w,o:{createElement:T}}=y,k=T("div"),M=e.suspense=AA(e,a,i,t,k,r,h,d,o,y);w(null,M.pendingBranch=e.ssContent,k,null,i,M,h,d),M.deps>0?(mm(e,"onPending"),mm(e,"onFallback"),w(null,e.ssFallback,t,r,i,null,h,d),bd(M,e.ssFallback)):M.resolve(!1,!0)}function o4(e,t,r,i,a,h,d,o,{p:y,um:w,o:{createElement:T}}){const k=t.suspense=e.suspense;k.vnode=t,t.el=e.el;const M=t.ssContent,P=t.ssFallback,{activeBranch:L,pendingBranch:O,isInFallback:$,isHydrating:Z}=k;if(O)k.pendingBranch=M,Io(M,O)?(y(O,M,k.hiddenContainer,null,a,k,h,d,o),k.deps<=0?k.resolve():$&&(Z||(y(L,P,r,i,a,null,h,d,o),bd(k,P)))):(k.pendingId=Yx++,Z?(k.isHydrating=!1,k.activeBranch=O):w(O,a,k),k.deps=0,k.effects.length=0,k.hiddenContainer=T("div"),$?(y(null,M,k.hiddenContainer,null,a,k,h,d,o),k.deps<=0?k.resolve():(y(L,P,r,i,a,null,h,d,o),bd(k,P))):L&&Io(M,L)?(y(L,M,r,i,a,k,h,d,o),k.resolve(!0)):(y(null,M,k.hiddenContainer,null,a,k,h,d,o),k.deps<=0&&k.resolve()));else if(L&&Io(M,L))y(L,M,r,i,a,k,h,d,o),bd(k,M);else if(mm(t,"onPending"),k.pendingBranch=M,M.shapeFlag&512?k.pendingId=M.component.suspenseId:k.pendingId=Yx++,y(null,M,k.hiddenContainer,null,a,k,h,d,o),k.deps<=0)k.resolve();else{const{timeout:J,pendingId:H}=k;J>0?setTimeout(()=>{k.pendingId===H&&k.fallback(P)},J):J===0&&k.fallback(P)}}function AA(e,t,r,i,a,h,d,o,y,w,T=!1){const{p:k,m:M,um:P,n:L,o:{parentNode:O,remove:$}}=w;let Z;const J=c4(e);J&&t&&t.pendingBranch&&(Z=t.pendingId,t.deps++);const H=e.props?T_(e.props.timeout):void 0,U=h,V={vnode:e,parent:t,parentComponent:r,namespace:d,container:i,hiddenContainer:a,deps:0,pendingId:Yx++,timeout:typeof H=="number"?H:-1,activeBranch:null,pendingBranch:null,isInFallback:!T,isHydrating:T,isUnmounted:!1,effects:[],resolve(te=!1,ce=!1){const{vnode:fe,activeBranch:Se,pendingBranch:xe,pendingId:et,effects:ze,parentComponent:Ze,container:tt}=V;let at=!1;V.isHydrating?V.isHydrating=!1:te||(at=Se&&xe.transition&&xe.transition.mode==="out-in",at&&(Se.transition.afterLeave=()=>{et===V.pendingId&&(M(xe,tt,h===U?L(Se):h,0),A_(ze))}),Se&&(O(Se.el)===tt&&(h=L(Se)),P(Se,Ze,V,!0)),at||M(xe,tt,h,0)),bd(V,xe),V.pendingBranch=null,V.isInFallback=!1;let Pe=V.parent,He=!1;for(;Pe;){if(Pe.pendingBranch){Pe.effects.push(...ze),He=!0;break}Pe=Pe.parent}!He&&!at&&A_(ze),V.effects=[],J&&t&&t.pendingBranch&&Z===t.pendingId&&(t.deps--,t.deps===0&&!ce&&t.resolve()),mm(fe,"onResolve")},fallback(te){if(!V.pendingBranch)return;const{vnode:ce,activeBranch:fe,parentComponent:Se,container:xe,namespace:et}=V;mm(ce,"onFallback");const ze=L(fe),Ze=()=>{V.isInFallback&&(k(null,te,xe,ze,Se,null,et,o,y),bd(V,te))},tt=te.transition&&te.transition.mode==="out-in";tt&&(fe.transition.afterLeave=Ze),V.isInFallback=!0,P(fe,Se,null,!0),tt||Ze()},move(te,ce,fe){V.activeBranch&&M(V.activeBranch,te,ce,fe),V.container=te},next(){return V.activeBranch&&L(V.activeBranch)},registerDep(te,ce,fe){const Se=!!V.pendingBranch;Se&&V.deps++;const xe=te.vnode.el;te.asyncDep.catch(et=>{qd(et,te,0)}).then(et=>{if(te.isUnmounted||V.isUnmounted||V.pendingId!==te.suspenseId)return;te.asyncResolved=!0;const{vnode:ze}=te;e1(te,et,!1),xe&&(ze.el=xe);const Ze=!xe&&te.subTree.el;ce(te,ze,O(xe||te.subTree.el),xe?null:L(te.subTree),V,d,fe),Ze&&$(Ze),Dv(te,ze.el),Se&&--V.deps===0&&V.resolve()})},unmount(te,ce){V.isUnmounted=!0,V.activeBranch&&P(V.activeBranch,r,te,ce),V.pendingBranch&&P(V.pendingBranch,r,te,ce)}};return V}
vendor: 8,291 bytes, lines 15-18
15function a4(e,t,r,i,a,h,d,o,y){const w=t.suspense=AA(t,i,r,e.parentNode,document.createElement("div"),null,a,h,d,o,!0),T=y(e,w.pendingBranch=t.ssContent,r,w,h,d);return w.deps===0&&w.resolve(!1,!0),T}function l4(e){const{shapeFlag:t,children:r}=e,i=t&32;e.ssContent=EC(i?r.default:r),e.ssFallback=i?EC(r.fallback):Sr(Yn)}function EC(e){let t;if(sr(e)){const r=Bu&&e._c;r&&(e._d=!1,Ft()),e=e(),r&&(e._d=!0,t=Yi,RA())}return $t(e)&&(e=e4(e)),e=Ts(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(r=>r!==e)),e}function MA(e,t){t&&t.pendingBranch?$t(e)?t.effects.push(...e):t.effects.push(e):A_(e)}function bd(e,t){e.activeBranch=t;const{vnode:r,parentComponent:i}=e;let a=t.el;for(;!a&&t.component;)t=t.component.subTree,a=t.el;r.el=a,i&&i.subTree===r&&(i.vnode.el=a,Dv(i,a))}function c4(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Cn=Symbol.for("v-fgt"),Iu=Symbol.for("v-txt"),Yn=Symbol.for("v-cmt"),xd=Symbol.for("v-stc"),Zp=[];let Yi=null;function Ft(e=!1){Zp.push(Yi=e?null:[])}function RA(){Zp.pop(),Yi=Zp[Zp.length-1]||null}let Bu=1;function kC(e,t=!1){Bu+=e,e<0&&Yi&&t&&(Yi.hasOnce=!0)}function LA(e){return e.dynamicChildren=Bu>0?Yi||pd:null,RA(),Bu>0&&Yi&&Yi.push(e),e}function Ki(e,t,r,i,a,h){return LA(Co(e,t,r,i,a,h,!0))}function Kt(e,t,r,i,a){return LA(Sr(e,t,r,i,a,!0))}function pc(e){return e?e.__v_isVNode===!0:!1}function Io(e,t){return e.type===t.type&&e.key===t.key}function tre(e){}const zA=({key:e})=>e??null,s_=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?In(e)||Xr(e)||sr(e)?{i:wi,r:e,k:t,f:!!r}:e:null);function Co(e,t=null,r=null,i=0,a=null,h=e===Cn?0:1,d=!1,o=!1){const y={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&zA(t),ref:t&&s_(t),scopeId:Rv,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:h,patchFlag:i,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:wi};return o?(Jw(y,r),h&128&&e.normalize(y)):r&&(y.shapeFlag|=In(r)?8:16),Bu>0&&!d&&Yi&&(y.patchFlag>0||h&6)&&y.patchFlag!==32&&Yi.push(y),y}const Sr=u4;function u4(e,t=null,r=null,i=0,a=null,h=!1){if((!e||e===hA)&&(e=Yn),pc(e)){const o=Sa(e,t,!0);return r&&Jw(o,r),Bu>0&&!h&&Yi&&(o.shapeFlag&6?Yi[Yi.indexOf(e)]=o:Yi.push(o)),o.patchFlag=-2,o}if(m4(e)&&(e=e.__vccOpts),t){t=Ku(t);let{class:o,style:y}=t;o&&!In(o)&&(t.class=bi(o)),fn(y)&&(Bw(y)&&!$t(y)&&(y=mn({},y)),t.style=fl(y))}const d=In(e)?1:D_(e)?128:YP(e)?64:fn(e)?4:sr(e)?2:0;return Co(e,t,r,i,a,d,h,!0)}function Ku(e){return e?Bw(e)||_A(e)?mn({},e):e:null}function Sa(e,t,r=!1,i=!1){const{props:a,ref:h,patchFlag:d,children:o,transition:y}=e,w=t?ln(a||{},t):a,T={__v_isVNode:!0,__v_skip:!0,type:e.type,props:w,key:w&&zA(w),ref:t&&t.ref?r&&h?$t(h)?h.concat(s_(t)):[h,s_(t)]:s_(t):h,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Cn?d===-1?16:d|16:d,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:y,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Sa(e.ssContent),ssFallback:e.ssFallback&&Sa(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return y&&i&&fc(T,y.clone(T)),T}function Id(e=" ",t=0){return Sr(Iu,null,e,t)}function rre(e,t){const r=Sr(xd,null,e);return r.staticCount=t,r}function ai(e="",t=!1){return t?(Ft(),Kt(Yn,null,e)):Sr(Yn,null,e)}function Ts(e){return e==null||typeof e=="boolean"?Sr(Yn):$t(e)?Sr(Cn,null,e.slice()):pc(e)?rc(e):Sr(Iu,null,String(e))}function rc(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Sa(e)}function Jw(e,t){let r=0;const{shapeFlag:i}=e;if(t==null)t=null;else if($t(t))r=16;else if(typeof t=="object")if(i&65){const a=t.default;a&&(a._c&&(a._d=!1),Jw(e,a()),a._c&&(a._d=!0));return}else{r=32;const a=t._;!a&&!_A(t)?t._ctx=wi:a===3&&wi&&(wi.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else sr(t)?(t={default:t,_ctx:wi},r=32):(t=String(t),i&64?(r=16,t=[Id(t)]):r=8);e.children=t,e.shapeFlag|=r}function ln(...e){const t={};for(let r=0;r<e.length;r++){const i=e[r];for(const a in i)if(a==="class")t.class!==i.class&&(t.class=bi([t.class,i.class]));else if(a==="style")t.style=fl([t.style,i.style]);else if(Bm(a)){const h=t[a],d=i[a];d&&h!==d&&!($t(h)&&h.includes(d))&&(t[a]=h?[].concat(h,d):d)}else a!==""&&(t[a]=i[a])}return t}function Ss(e,t,r,i=null){No(e,t,7,[r,i])}const h4=mA();let d4=0;function DA(e,t,r){const i=e.type,a=(t?t.appContext:e.appContext)||h4,h={uid:d4++,vnode:e,type:i,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new EP(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:bA(i,a),emitsOptions:PA(i,a),emit:null,emitted:null,propsDefaults:Gr,inheritAttrs:i.inheritAttrs,ctx:Gr,data:Gr,props:Gr,attrs:Gr,slots:Gr,refs:Gr,setupState:Gr,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return h.ctx={_:h},h.root=t?t.root:h,h.emit=QF.bind(null,h),e.ce&&e.ce(h),h}let xi=null;const ci=()=>xi||wi;let O_,Jx;{const e=Ev(),t=(r,i)=>{let a;return(a=e[r])||(a=e[r]=[]),a.push(i),h=>{a.length>1?a.forEach(d=>d(h)):a[0](h)}};O_=t("__VUE_INSTANCE_SETTERS__",r=>xi=r),Jx=t("__VUE_SSR_SETTERS__",r=>Pd=r)}const Nu=e=>{const t=xi;return O_(e),e.scope.on(),()=>{e.scope.off(),O_(t)}},Qx=()=>{xi&&xi.scope.off(),O_(null)};function OA(e){return e.vnode.shapeFlag&4}let Pd=!1;function FA(e,t=!1,r=!1){t&&Jx(t);const{props:i,children:a}=e.vnode,h=OA(e);jF(e,i,h,t),qF(e,a,r||t);const d=h?f4(e,t):void 0;return t&&Jx(!1),d}function f4(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Zx);const{setup:i}=r;if(i){ol();const a=e.setupContext=i.length>1?NA(e):null,h=Nu(e),d=$m(i,e,0,[e.props,a]),o=Lw(d);if(al(),h(),(o||e.sp)&&!lc(e)&&$w(e),o){if(d.then(Qx,Qx),t)return d.then(y=>{e1(e,y,t)}).catch(y=>{qd(y,e,0)});e.asyncDep=d}else e1(e,d,t)}else BA(e,t)}function e1(e,t,r){sr(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:fn(t)&&(e.setupState=VP(t)),BA(e,r)}let F_,t1;function nre(e){F_=e,t1=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,MF))}}const ire=()=>!F_;function BA(e,t,r){const i=e.type;if(!e.render){if(!t&&F_&&!i.render){const a=i.template||Zw(e).template;if(a){const{isCustomElement:h,compilerOptions:d}=e.appContext.config,{delimiters:o,compilerOptions:y}=i,w=mn(mn({isCustomElement:h,delimiters:o},d),y);i.render=F_(a,w)}}e.render=i.render||io,t1&&t1(e)}{const a=Nu(e);ol();try{LF(e)}finally{al(),a()}}}const p4={get(e,t){return Xi(e,"get",""),e[t]}};function NA(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,p4),slots:e.slots,emit:e.emit,expose:t}}function Gm(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(VP(Nm(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in Hp)return Hp[r](e)},has(t,r){return r in t||r in Hp}})):e.proxy}function r1(e,t=!0){return sr(e)?e.displayName||e.name:e.name||t&&e.__name}function m4(e){return sr(e)&&"__vccOpts"in e}const it=(e,t)=>nF(e,t,Pd);function cn(e,t,r){const i=arguments.length;return i===2?fn(t)&&!$t(t)?pc(t)?Sr(e,null,[t]):Sr(e,t):Sr(e,null,t):(i>3?r=Array.prototype.slice.call(arguments,2):i===3&&pc(r)&&(r=[r]),Sr(e,t,r))}function sre(){}function ore(e,t,r,i){const a=r[i];if(a&&g4(a,e))return a;const h=t();return h.memo=e.slice(),h.cacheIndex=i,r[i]=h}function g4(e,t){const r=e.memo;if(r.length!=t.length)return!1;for(let i=0;i<r.length;i++)if(hs(r[i],t[i]))return!1;return Bu>0&&Yi&&Yi.push(e),!0}const y4="3.5.17",are=io,lre=lF,cre=sd,ure=KP,_4={createComponentInstance:DA,setupComponent:FA,renderComponentRoot:i_,setCurrentRenderingInstance:dm,isVNode:pc,normalizeVNode:Ts,getComponentPublicInstance:Gm,ensureValidVNode:Hw,pushWarningContext:oF,popWarningContext:aF},hre=_4,dre=null,fre=null,pre=null;/**
16* @vue/runtime-dom v3.5.17
17* (c) 2018-present Yuxi (Evan) You and Vue contributors
18* @license MIT
19**/let n1;const IC=typeof window<"u"&&window.trustedTypes;if(IC)try{n1=IC.createPolicy("vue",{createHTML:e=>e})}catch{}const jA=n1?e=>n1.createHTML(e):e=>e,v4="http://www.w3.org/2000/svg",b4="http://www.w3.org/1998/Math/MathML",Za=typeof document<"u"?document:null,PC=Za&&Za.createElement("template"),x4={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,i)=>{const a=t==="svg"?Za.createElementNS(v4,e):t==="mathml"?Za.createElementNS(b4,e):r?Za.createElement(e,{is:r}):Za.createElement(e);return e==="select"&&i&&i.multiple!=null&&a.setAttribute("multiple",i.multiple),a},createText:e=>Za.createTextNode(e),createComment:e=>Za.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Za.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,r,i,a,h){const d=r?r.previousSibling:t.lastChild;if(a&&(a===h||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),r),!(a===h||!(a=a.nextSibling)););else{PC.innerHTML=jA(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const o=PC.content;if(i==="svg"||i==="mathml"){const y=o.firstChild;for(;y.firstChild;)o.appendChild(y.firstChild);o.removeChild(y)}t.insertBefore(o,r)}return[d?d.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}},Zl="transition",Ep="animation",Ad=Symbol("_vtc"),$A={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},UA=mn({},rA,$A),w4=e=>(e.displayName="Transition",e.props=UA,e),S4=w4((e,{slots:t})=>cn(fF,VA(e),t)),mu=(e,t=[])=>{$t(e)?e.forEach(r=>r(...t)):e&&e(...t)},AC=e=>e?$t(e)?e.some(t=>t.length>1):e.length>1:!1;function VA(e){const t={};for(const ze in e)ze in $A||(t[ze]=e[ze]);if(e.css===!1)return t;const{name:r="v",type:i,duration:a,enterFromClass:h=`${r}-enter-from`,enterActiveClass:d=`${r}-enter-active`,enterToClass:o=`${r}-enter-to`,appearFromClass:y=h,appearActiveClass:w=d,appearToClass:T=o,leaveFromClass:k=`${r}-leave-from`,leaveActiveClass:M=`${r}-leave-active`,leaveToClass:P=`${r}-leave-to`}=e,L=T4(a),O=L&&L[0],$=L&&L[1],{onBeforeEnter:Z,onEnter:J,onEnterCancelled:H,onLeave:U,onLeaveCancelled:V,onBeforeAppear:te=Z,onAppear:ce=J,onAppearCancelled:fe=H}=t,Se=(ze,Ze,tt,at)=>{ze._enterCancelled=at,Yl(ze,Ze?T:o),Yl(ze,Ze?w:d),tt&&tt()},xe=(ze,Ze)=>{ze._isLeaving=!1,Yl(ze,k),Yl(ze,P),Yl(ze,M),Ze&&Ze()},et=ze=>(Ze,tt)=>{const at=ze?ce:J,Pe=()=>Se(Ze,ze,tt);mu(at,[Ze,Pe]),MC(()=>{Yl(Ze,ze?y:h),aa(Ze,ze?T:o),AC(at)||RC(Ze,i,O,Pe)})};return mn(t,{onBeforeEnter(ze){mu(Z,[ze]),aa(ze,h),aa(ze,d)},onBeforeAppear(ze){mu(te,[ze]),aa(ze,y),aa(ze,w)},onEnter:et(!1),onAppear:et(!0),onLeave(ze,Ze){ze._isLeaving=!0;const tt=()=>xe(ze,Ze);aa(ze,k),ze._enterCancelled?(aa(ze,M),i1()):(i1(),aa(ze,M)),MC(()=>{ze._isLeaving&&(Yl(ze,k),aa(ze,P),AC(U)||RC(ze,i,$,tt))}),mu(U,[ze,tt])},onEnterCancelled(ze){Se(ze,!1,void 0,!0),mu(H,[ze])},onAppearCancelled(ze){Se(ze,!0,void 0,!0),mu(fe,[ze])},onLeaveCancelled(ze){xe(ze),mu(V,[ze])}})}function T4(e){if(e==null)return null;if(fn(e))return[Hb(e.enter),Hb(e.leave)];{const t=Hb(e);return[t,t]}}function Hb(e){return T_(e)}function aa(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e[Ad]||(e[Ad]=new Set)).add(t)}function Yl(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const r=e[Ad];r&&(r.delete(t),r.size||(e[Ad]=void 0))}function MC(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let C4=0;function RC(e,t,r,i){const a=e._endId=++C4,h=()=>{a===e._endId&&i()};if(r!=null)return setTimeout(h,r);const{type:d,timeout:o,propCount:y}=qA(e,t);if(!d)return i();const w=d+"end";let T=0;const k=()=>{e.removeEventListener(w,M),h()},M=P=>{P.target===e&&++T>=y&&k()};setTimeout(()=>{T<y&&k()},o+1),e.addEventListener(w,M)}function qA(e,t){const r=window.getComputedStyle(e),i=L=>(r[L]||"").split(", "),a=i(`${Zl}Delay`),h=i(`${Zl}Duration`),d=LC(a,h),o=i(`${Ep}Delay`),y=i(`${Ep}Duration`),w=LC(o,y);let T=null,k=0,M=0;t===Zl?d>0&&(T=Zl,k=d,M=h.length):t===Ep?w>0&&(T=Ep,k=w,M=y.length):(k=Math.max(d,w),T=k>0?d>w?Zl:Ep:null,M=T?T===Zl?h.length:y.length:0);const P=T===Zl&&/\b(transform|all)(,|$)/.test(i(`${Zl}Property`).toString());return{type:T,timeout:k,propCount:M,hasTransform:P}}function LC(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,i)=>
vendor: 14,304 bytes, line 19
19zC(r)+zC(e[i])))}function zC(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function i1(){return document.body.offsetHeight}function E4(e,t,r){const i=e[Ad];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}const B_=Symbol("_vod"),GA=Symbol("_vsh"),k4={beforeMount(e,{value:t},{transition:r}){e[B_]=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):kp(e,t)},mounted(e,{value:t},{transition:r}){r&&t&&r.enter(e)},updated(e,{value:t,oldValue:r},{transition:i}){!t!=!r&&(i?t?(i.beforeEnter(e),kp(e,!0),i.enter(e)):i.leave(e,()=>{kp(e,!1)}):kp(e,t))},beforeUnmount(e,{value:t}){kp(e,t)}};function kp(e,t){e.style.display=t?e[B_]:"none",e[GA]=!t}function I4(){k4.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const HA=Symbol("");function mre(e){const t=ci();if(!t)return;const r=t.ut=(a=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(h=>N_(h,a))},i=()=>{const a=e(t.proxy);t.ce?N_(t.ce,a):s1(t.subTree,a),r(a)};cA(()=>{A_(i)}),js(()=>{Mr(i,io,{flush:"post"});const a=new MutationObserver(i);a.observe(t.subTree.el.parentNode,{childList:!0}),Wu(()=>a.disconnect())})}function s1(e,t){if(e.shapeFlag&128){const r=e.suspense;e=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{s1(r.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)N_(e.el,t);else if(e.type===Cn)e.children.forEach(r=>s1(r,t));else if(e.type===xd){let{el:r,anchor:i}=e;for(;r&&(N_(r,t),r!==i);)r=r.nextSibling}}function N_(e,t){if(e.nodeType===1){const r=e.style;let i="";for(const a in t)r.setProperty(`--${a}`,t[a]),i+=`--${a}: ${t[a]};`;r[HA]=i}}const P4=/(^|;)\s*display\s*:/;function A4(e,t,r){const i=e.style,a=In(r);let h=!1;if(r&&!a){if(t)if(In(t))for(const d of t.split(";")){const o=d.slice(0,d.indexOf(":")).trim();r[o]==null&&o_(i,o,"")}else for(const d in t)r[d]==null&&o_(i,d,"");for(const d in r)d==="display"&&(h=!0),o_(i,d,r[d])}else if(a){if(t!==r){const d=i[HA];d&&(r+=";"+d),i.cssText=r,h=P4.test(r)}}else t&&e.removeAttribute("style");B_ in e&&(e[B_]=h?i.display:"",e[GA]&&(i.display="none"))}const DC=/\s*!important$/;function o_(e,t,r){if($t(r))r.forEach(i=>o_(e,t,i));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const i=M4(e,t);DC.test(r)?e.setProperty(Cs(i),r.replace(DC,""),"important"):e[i]=r}}const OC=["Webkit","Moz","ms"],Zb={};function M4(e,t){const r=Zb[t];if(r)return r;let i=Ai(t);if(i!=="filter"&&i in e)return Zb[t]=i;i=Cv(i);for(let a=0;a<OC.length;a++){const h=OC[a]+i;if(h in e)return Zb[t]=h}return t}const FC="http://www.w3.org/1999/xlink";function BC(e,t,r,i,a,h=A3(t)){i&&t.startsWith("xlink:")?r==null?e.removeAttributeNS(FC,t.slice(6,t.length)):e.setAttributeNS(FC,t,r):r==null||h&&!SP(r)?e.removeAttribute(t):e.setAttribute(t,h?"":Fo(r)?String(r):r)}function NC(e,t,r,i,a){if(t==="innerHTML"||t==="textContent"){r!=null&&(e[t]=t==="innerHTML"?jA(r):r);return}const h=e.tagName;if(t==="value"&&h!=="PROGRESS"&&!h.includes("-")){const o=h==="OPTION"?e.getAttribute("value")||"":e.value,y=r==null?e.type==="checkbox"?"on":"":String(r);(o!==y||!("_value"in e))&&(e.value=y),r==null&&e.removeAttribute(t),e._value=r;return}let d=!1;if(r===""||r==null){const o=typeof e[t];o==="boolean"?r=SP(r):r==null&&o==="string"?(r="",d=!0):o==="number"&&(r=0,d=!0)}try{e[t]=r}catch{}d&&e.removeAttribute(a||t)}function Ja(e,t,r,i){e.addEventListener(t,r,i)}function R4(e,t,r,i){e.removeEventListener(t,r,i)}const jC=Symbol("_vei");function L4(e,t,r,i,a=null){const h=e[jC]||(e[jC]={}),d=h[t];if(i&&d)d.value=i;else{const[o,y]=z4(t);if(i){const w=h[t]=F4(i,a);Ja(e,o,w,y)}else d&&(R4(e,o,d,y),h[t]=void 0)}}const $C=/(?:Once|Passive|Capture)$/;function z4(e){let t;if($C.test(e)){t={};let i;for(;i=e.match($C);)e=e.slice(0,e.length-i[0].length),t[i[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Cs(e.slice(2)),t]}let Wb=0;const D4=Promise.resolve(),O4=()=>Wb||(D4.then(()=>Wb=0),Wb=Date.now());function F4(e,t){const r=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=r.attached)return;No(B4(i,r.value),t,5,[i])};return r.value=e,r.attached=O4(),r}function B4(e,t){if($t(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(i=>a=>!a._stopped&&i&&i(a))}else return t}const UC=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,N4=(e,t,r,i,a,h)=>{const d=a==="svg";t==="class"?E4(e,i,d):t==="style"?A4(e,r,i):Bm(t)?Mw(t)||L4(e,t,r,i,h):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):j4(e,t,i,d))?(NC(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&BC(e,t,i,d,h,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!In(i))?NC(e,Ai(t),i,h,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),BC(e,t,i,d))};function j4(e,t,r,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&UC(t)&&sr(r));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return UC(t)&&In(r)?!1:t in e}const VC={};/*! #__NO_SIDE_EFFECTS__ */function $4(e,t,r){const i=Rr(e,t);Sv(i)&&mn(i,t);class a extends Qw{constructor(d){super(i,d,r)}}return a.def=i,a}/*! #__NO_SIDE_EFFECTS__ */const gre=(e,t)=>$4(e,t,rM),U4=typeof HTMLElement<"u"?HTMLElement:class{};class Qw extends U4{constructor(t,r={},i=a1){super(),this._def=t,this._props=r,this._createApp=i,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&i!==a1?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Qw){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,Ri(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let i=0;i<this.attributes.length;i++)this._setAttr(this.attributes[i].name);this._ob=new MutationObserver(i=>{for(const a of i)this._setAttr(a.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(i,a=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:h,styles:d}=i;let o;if(h&&!$t(h))for(const y in h){const w=h[y];(w===Number||w&&w.type===Number)&&(y in this._props&&(this._props[y]=T_(this._props[y])),(o||(o=Object.create(null)))[Ai(y)]=!0)}this._numberProps=o,this._resolveProps(i),this.shadowRoot&&this._applyStyles(d),this._mount(i)},r=this._def.__asyncLoader;r?this._pendingResolve=r().then(i=>{i.configureApp=this._def.configureApp,t(this._def=i,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const r=this._instance&&this._instance.exposed;if(r)for(const i in r)Qr(this,i)||Object.defineProperty(this,i,{get:()=>ot(r[i])})}_resolveProps(t){const{props:r}=t,i=$t(r)?r:Object.keys(r||{});for(const a of Object.keys(this))a[0]!=="_"&&i.includes(a)&&this._setProp(a,this[a]);for(const a of i.map(Ai))Object.defineProperty(this,a,{get(){return this._getProp(a)},set(h){this._setProp(a,h,!0,!0)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const r=this.hasAttribute(t);let i=r?this.getAttribute(t):VC;const a=Ai(t);r&&this._numberProps&&this._numberProps[a]&&(i=T_(i)),this._setProp(a,i,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,r,i=!0,a=!1){if(r!==this._props[t]&&(r===VC?delete this._props[t]:(this._props[t]=r,t==="key"&&this._app&&(this._app._ceVNode.key=r)),a&&this._instance&&this._update(),i)){const h=this._ob;h&&h.disconnect(),r===!0?this.setAttribute(Cs(t),""):typeof r=="string"||typeof r=="number"?this.setAttribute(Cs(t),r+""):r||this.removeAttribute(Cs(t)),h&&h.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),nB(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const r=Sr(this._def,mn(t,this._props));return this._instance||(r.ce=i=>{this._instance=i,i.ce=this,i.isCE=!0;const a=(h,d)=>{this.dispatchEvent(new CustomEvent(h,Sv(d[0])?mn({detail:d},d[0]):{detail:d}))};i.emit=(h,...d)=>{a(h,d),Cs(h)!==h&&a(Cs(h),d)},this._setParent()}),r}_applyStyles(t,r){if(!t)return;if(r){if(r===this._def||this._styleChildren.has(r))return;this._styleChildren.add(r)}const i=this._nonce;for(let a=t.length-1;a>=0;a--){const h=document.createElement("style");i&&h.setAttribute("nonce",i),h.textContent=t[a],this.shadowRoot.prepend(h)}}_parseSlots(){const t=this._slots={};let r;for(;r=this.firstChild;){const i=r.nodeType===1&&r.getAttribute("slot")||"default";(t[i]||(t[i]=[])).push(r),this.removeChild(r)}}_renderSlots(){const t=(this._teleportTarget||this).querySelectorAll("slot"),r=this._instance.type.__scopeId;for(let i=0;i<t.length;i++){const a=t[i],h=a.getAttribute("name")||"default",d=this._slots[h],o=a.parentNode;if(d)for(const y of d){if(r&&y.nodeType===1){const w=r+"-s",T=document.createTreeWalker(y,1);y.setAttribute(w,"");let k;for(;k=T.nextNode();)k.setAttribute(w,"")}o.insertBefore(y,a)}else for(;a.firstChild;)o.insertBefore(a.firstChild,a);o.removeChild(a)}}_injectChildStyle(t){this._applyStyles(t.styles,t)}_removeChildStyle(t){}}function V4(e){const t=ci(),r=t&&t.ce;return r||null}function yre(){const e=V4();return e&&e.shadowRoot}function _re(e="$style"){{const t=ci();if(!t)return Gr;const r=t.type.__cssModules;if(!r)return Gr;const i=r[e];return i||Gr}}const ZA=new WeakMap,WA=new WeakMap,j_=Symbol("_moveCb"),qC=Symbol("_enterCb"),q4=e=>(delete e.props.mode,e),G4=q4({name:"TransitionGroup",props:mn({},UA,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=ci(),i=tA();let a,h;return Vw(()=>{if(!a.length)return;const d=e.moveClass||`${e.name||"v"}-move`;if(!K4(a[0].el,r.vnode.el,d)){a=[];return}a.forEach(H4),a.forEach(Z4);const o=a.filter(W4);i1(),o.forEach(y=>{const w=y.el,T=w.style;aa(w,d),T.transform=T.webkitTransform=T.transitionDuration="";const k=w[j_]=M=>{M&&M.target!==w||(!M||/transform$/.test(M.propertyName))&&(w.removeEventListener("transitionend",k),w[j_]=null,Yl(w,d))};w.addEventListener("transitionend",k)}),a=[]}),()=>{const d=qr(e),o=VA(d);let y=d.tag||Cn;if(a=[],h)for(let w=0;w<h.length;w++){const T=h[w];T.el&&T.el instanceof Element&&(a.push(T),fc(T,fm(T,o,i,r)),ZA.set(T,T.el.getBoundingClientRect()))}h=t.default?jw(t.default()):[];for(let w=0;w<h.length;w++){const T=h[w];T.key!=null&&fc(T,fm(T,o,i,r))}return Sr(y,null,h)}}}),vre=G4;function H4(e){const t=e.el;t[j_]&&t[j_](),t[qC]&&t[qC]()}function Z4(e){WA.set(e,e.el.getBoundingClientRect())}function W4(e){const t=ZA.get(e),r=WA.get(e),i=t.left-r.left,a=t.top-r.top;if(i||a){const h=e.el.style;return h.transform=h.webkitTransform=`translate(${i}px,${a}px)`,h.transitionDuration="0s",e}}function K4(e,t,r){const i=e.cloneNode(),a=e[Ad];a&&a.forEach(o=>{o.split(/\s+/).forEach(y=>y&&i.classList.remove(y))}),r.split(/\s+/).forEach(o=>o&&i.classList.add(o)),i.style.display="none";const h=t.nodeType===1?t:t.parentNode;h.appendChild(i);const{hasTransform:d}=qA(i);return h.removeChild(i),d}const mc=e=>{const t=e.props["onUpdate:modelValue"]||!1;return $t(t)?r=>yd(t,r):t};function X4(e){e.target.composing=!0}function GC(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const oo=Symbol("_assign"),o1={created(e,{modifiers:{lazy:t,trim:r,number:i}},a){e[oo]=mc(a);const h=i||a.props&&a.props.type==="number";Ja(e,t?"change":"input",d=>{if(d.target.composing)return;let o=e.value;r&&(o=o.trim()),h&&(o=S_(o)),e[oo](o)}),r&&Ja(e,"change",()=>{e.value=e.value.trim()}),t||(Ja(e,"compositionstart",X4),Ja(e,"compositionend",GC),Ja(e,"change",GC))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:i,trim:a,number:h}},d){if(e[oo]=mc(d),e.composing)return;const o=(h||e.type==="number")&&!/^0\d/.test(e.value)?S_(e.value):e.value,y=t??"";o!==y&&(document.activeElement===e&&e.type!=="range"&&(i&&t===r||a&&e.value.trim()===y)||(e.value=y))}},KA={deep:!0,created(e,t,r){e[oo]=mc(r),Ja(e,"change",()=>{const i=e._modelValue,a=Md(e),h=e.checked,d=e[oo];if($t(i)){const o=kv(i,a),y=o!==-1;if(h&&!y)d(i.concat(a));else if(!h&&y){const w=[...i];w.splice(o,1),d(w)}}else if(Hu(i)){const o=new Set(i);h?o.add(a):o.delete(a),d(o)}else d(YA(e,h))})},mounted:HC,beforeUpdate(e,t,r){e[oo]=mc(r),HC(e,t,r)}};function HC(e,{value:t,oldValue:r},i){e._modelValue=t;let a;if($t(t))a=kv(t,i.props.value)>-1;else if(Hu(t))a=t.has(i.props.value);else{if(t===r)return;a=dc(t,YA(e,!0))}e.checked!==a&&(e.checked=a)}const XA={created(e,{value:t},r){e.checked=dc(t,r.props.value),e[oo]=mc(r),Ja(e,"change",()=>{e[oo](Md(e))})},beforeUpdate(e,{value:t,oldValue:r},i){e[oo]=mc(i),t!==r&&(e.checked=dc(t,i.props.value))}},Y4={deep:!0,created(e,{value:t,modifiers:{number:r}},i){const a=Hu(t);Ja(e,"change",()=>{const h=Array.prototype.filter.call(e.options,d=>d.selected).map(d=>r?S_(Md(d)):Md(d));e[oo](e.multiple?a?new Set(h):h:h[0]),e._assigning=!0,Ri(()=>{e._assigning=!1})}),e[oo]=mc(i)},mounted(e,{value:t}){ZC(e,t)},beforeUpdate(e,t,r){e[oo]=mc(r)},updated(e,{value:t}){e._assigning||ZC(e,t)}};function ZC(e,t){const r=e.multiple,i=$t(t);if(!(r&&!i&&!Hu(t))){for(let a=0,h=e.options.length;a<h;a++){const d=e.options[a],o=Md(d);if(r)if(i){const y=typeof o;
19y==="string"||y==="number"?d.selected=t.some(w=>String(w)===String(o)):d.selected=kv(t,o)>-1}else d.selected=t.has(o);else if(dc(Md(d),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Md(e){return"_value"in e?e._value:e.value}function YA(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}const J4={created(e,t,r){zy(e,t,r,null,"created")},mounted(e,t,r){zy(e,t,r,null,"mounted")},beforeUpdate(e,t,r,i){zy(e,t,r,i,"beforeUpdate")},updated(e,t,r,i){zy(e,t,r,i,"updated")}};function JA(e,t){switch(e){case"SELECT":return Y4;case"TEXTAREA":return o1;default:switch(t){case"checkbox":return KA;case"radio":return XA;default:return o1}}}function zy(e,t,r,i,a){const d=JA(e.tagName,r.props&&r.props.type)[a];d&&d(e,t,r,i)}function Q4(){o1.getSSRProps=({value:e})=>({value:e}),XA.getSSRProps=({value:e},t)=>{if(t.props&&dc(t.props.value,e))return{checked:!0}},KA.getSSRProps=({value:e},t)=>{if($t(e)){if(t.props&&kv(e,t.props.value)>-1)return{checked:!0}}else if(Hu(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},J4.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const r=JA(t.type.toUpperCase(),t.props&&t.props.type);if(r.getSSRProps)return r.getSSRProps(e,t)}}const eB=["ctrl","shift","alt","meta"],tB={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>eB.some(r=>e[`${r}Key`]&&!t.includes(r))},a_=(e,t)=>{const r=e._withMods||(e._withMods={}),i=t.join(".");return r[i]||(r[i]=(a,...h)=>{for(let d=0;d<t.length;d++){const o=tB[t[d]];if(o&&o(a,t))return}return e(a,...h)})},rB={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},bre=(e,t)=>{const r=e._withKeys||(e._withKeys={}),i=t.join(".");return r[i]||(r[i]=a=>{if(!("key"in a))return;const h=Cs(a.key);if(t.some(d=>d===h||rB[d]===h))return e(a)})},QA=mn({patchProp:N4},x4);let Wp,WC=!1;function eM(){return Wp||(Wp=HF(QA))}function tM(){return Wp=WC?Wp:ZF(QA),WC=!0,Wp}const nB=(...e)=>{eM().render(...e)},xre=(...e)=>{tM().hydrate(...e)},a1=(...e)=>{const t=eM().createApp(...e),{mount:r}=t;return t.mount=i=>{const a=iM(i);if(!a)return;const h=t._component;!sr(h)&&!h.render&&!h.template&&(h.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const d=r(a,!1,nM(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),d},t},rM=(...e)=>{const t=tM().createApp(...e),{mount:r}=t;return t.mount=i=>{const a=iM(i);if(a)return r(a,!0,nM(a))},t};function nM(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function iM(e){return In(e)?document.querySelector(e):e}let KC=!1;const wre=()=>{KC||(KC=!0,Q4(),I4())},iB=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,sB=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,oB=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function aB(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){lB(e);return}return t}function lB(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function Rd(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);const r=e.trim();if(r.length<=9)switch(r.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!oB.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(iB.test(e)||sB.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,aB)}return JSON.parse(e)}catch(i){if(t.strict)throw i;return e}}const sM=/#/g,oM=/&/g,aM=/\//g,cB=/=/g,uB=/\?/g,Ov=/\+/g,hB=/%5e/gi,dB=/%60/gi,fB=/%7c/gi,pB=/%20/gi,mB=/%252f/gi;function lM(e){return encodeURI(""+e).replace(fB,"|")}function l1(e){return lM(typeof e=="string"?e:JSON.stringify(e)).replace(Ov,"%2B").replace(pB,"+").replace(sM,"%23").replace(oM,"%26").replace(dB,"`").replace(hB,"^").replace(aM,"%2F")}function Kb(e){return l1(e).replace(cB,"%3D")}function cM(e){return lM(e).replace(sM,"%23").replace(uB,"%3F").replace(mB,"%2F").replace(oM,"%26").replace(Ov,"%2B")}function XC(e){return cM(e).replace(aM,"%2F")}function $_(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function gB(e){return $_(e.replace(Ov," "))}function yB(e){return $_(e.replace(Ov," "))}function eS(e=""){const t=Object.create(null);e[0]==="?"&&(e=e.slice(1));for(const r of e.split("&")){const i=r.match(/([^=]+)=?(.*)/)||[];if(i.length<2)continue;const a=gB(i[1]);if(a==="__proto__"||a==="constructor")continue;const h=yB(i[2]||"");t[a]===void 0?t[a]=h:Array.isArray(t[a])?t[a].push(h):t[a]=[t[a],h]}return t}function _B(e,t){return(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),t?Array.isArray(t)?t.map(r=>`${Kb(e)}=${l1(r)}`).join("&"):`${Kb(e)}=${l1(t)}`:Kb(e)}function vB(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>
19_B(t,e[t])).filter(Boolean).join("&")}const bB=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,uM=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,xB=/^([/\\]\s*){2,}[^/\\]/,wB=/^[\s\0]*(blob|data|javascript|vbscript):$/i,SB=/\/$|\/\?|\/#/,TB=/^\.?\//;function $o(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?bB.test(e):uM.test(e)||(t.acceptRelative?xB.test(e):!1)}function CB(e){return!!e&&wB.test(e)}function c1(e="",t){return t?SB.test(e):e.endsWith("/")}function tS(e="",t){if(!t)return(c1(e)?e.slice(0,-1):e)||"/";if(!c1(e,!0))return e||"/";let r=e,i="";const a=e.indexOf("#");a!==-1&&(r=e.slice(0,a),i=e.slice(a));const[h,...d]=r.split("?");return((h.endsWith("/")?h.slice(0,-1):h)||"/")+(d.length>0?`?${d.join("?")}`:"")+i}function U_(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(c1(e,!0))return e||"/";let r=e,i="";const a=e.indexOf("#");if(a!==-1&&(r=e.slice(0,a),i=e.slice(a),!r))return i;const[h,...d]=r.split("?");return h+"/"+(d.length>0?`?${d.join("?")}`:"")+i}function EB(e=""){return e.startsWith("/")}function u1(e=""){return EB(e)?e:"/"+e}function kB(e,t){if(dM(t)||$o(e))return e;const r=tS(t);return e.startsWith(r)?e:ju(r,e)}function YC(e,t){if(dM(t))return e;const r=tS(t);if(!e.startsWith(r))return e;const i=e.slice(r.length);return i[0]==="/"?i:"/"+i}function hM(e,t){const r=rS(e),i={...eS(r.search),...t};return r.search=vB(i),RB(r)}function dM(e){return!e||e==="/"}function IB(e){return e&&e!=="/"}function ju(e,...t){let r=e||"";for(const i of t.filter(a=>IB(a)))if(r){const a=i.replace(TB,"");r=U_(r)+a}else r=i;return r}function fM(...e){var d,o,y,w;const t=/\/(?!\/)/,r=e.filter(Boolean),i=[];let a=0;for(const T of r)if(!(!T||T==="/")){for(const[k,M]of T.split(t).entries())if(!(!M||M===".")){if(M===".."){if(i.length===1&&$o(i[0]))continue;i.pop(),a--;continue}if(k===1&&((d=i[i.length-1])!=null&&d.endsWith(":/"))){i[i.length-1]+="/"+M;continue}i.push(M),a++}}let h=i.join("/");return a>=0?(o=r[0])!=null&&o.startsWith("/")&&!h.startsWith("/")?h="/"+h:(y=r[0])!=null&&y.startsWith("./")&&!h.startsWith("./")&&(h="./"+h):h="../".repeat(-1*a)+h,(w=r[r.length-1])!=null&&w.endsWith("/")&&!h.endsWith("/")&&(h+="/"),h}function PB(e){return AB(e,"https://")}function AB(e,t){let r=e.match(uM);return r||(r=e.match(/^\/{2,}/)),r?t+e.slice(r[0].length):t+e}function MB(e,t,r={}){return r.trailingSlash||(e=U_(e),t=U_(t)),r.leadingSlash||(e=u1(e),t=u1(t)),r.encoding||(e=$_(e),t=$_(t)),e===t}const pM=Symbol.for("ufo:protocolRelative");function rS(e="",t){const r=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(r){const[,k,M=""]=r;return{protocol:k.toLowerCase(),pathname:M,href:k+M,auth:"",host:"",search:"",hash:""}}if(!$o(e,{acceptRelative:!0}))return JC(e);const[,i="",a,h=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,d="",o=""]=h.match(/([^#/?]*)(.*)?/)||[];i==="file:"&&(o=o.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:y,search:w,hash:T}=JC(o);return{protocol:i.toLowerCase(),auth:a?a.slice(0,Math.max(0,a.length-1)):"",host:d,pathname:y,search:w,hash:T,[pM]:!i}}function JC(e=""){const[t="",r="",i=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:r,hash:i}}function RB(e){const t=e.pathname||"",r=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",i=e.hash||"",a=e.auth?e.auth+"@":"",h=e.host||"";return(e.protocol||e[pM]?(e.protocol||"")+"//":"")+a+h+t+r+i}class LB extends Error{constructor(t,r){super(t,r),this.name="FetchError",r!=null&&r.cause&&!this.cause&&(this.cause=r.cause)}}function zB(e){var y,w,T,k,M;const t=((y=e.error)==null?void 0:y.message)||((w=e.error)==null?void 0:w.toString())||"",r=((T=e.request)==null?void 0:T.method)||((k=e.options)==null?void 0:k.method)||"GET",i=((M=e.request)==null?void 0:M.url)||String(e.request)||"/",a=`[${r}] ${JSON.stringify(i)}`,h=e.response?`${e.response.status} ${e.response.statusText}`:"<no response>",d=`${a}: ${h}${t?` ${t}`:""}`,o=new LB(d,e.error?{cause:e.error}:void 0);for(const P of["request","options","response"])Object.defineProperty(o,P,{get(){return e[P]}});for(const[P,L]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(o,P,{get(){return e.response&&e.response[L]}});return o}const DB=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function QC(e="GET"){return DB.has(e.toUpperCase())}function OB(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}const FB=new Set(["image/svg","application/xml","application/xhtml","application/html"]),BB=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function NB(e=""){if(!e)return"json";const t=e.split(";").shift()||"";return BB.test(t)?"json":FB.has(t)||t.startsWith("text/")?"text":"blob"}function jB(e,t,r,i){const a=$B((t==null?void 0:t.headers)??(e==null?void 0:e.headers),r==null?void 0:r.headers,i);let h;return(r!=null&&r.query||r!=null&&r.params||t!=null&&t.params||t!=null&&t.query)&&(h={...r==null?void 0:r.params,...r==null?void 0:r.query,...t==null?void 0:t.params,...t==null?void 0:t.query}),{...r,...t,query:h,params:h,headers:a}}function $B(e,t,r){if(!t)return new r(e);const i=new r(t);if(e)for(const[a,h]of Symbol.iterator in e||Array.isArray(e)?e:new r(e))i.set(a,h);return i}async function Dy(e,t){if(t)if(Array.isArray(t))for(const r of t)await r(e);else await t(e)}const UB=new Set([408,409,425,429,500,502,503,504]),VB=new Set([101,204,205,304]);function mM(e={}){const{fetch:t=globalThis.fetch,Headers:r=globalThis.Headers,AbortController:i=globalThis.AbortController}=e;async function a(o){const y=o.error&&o.error.name==="AbortError"&&!o.options.timeout||!1;if(o.options.retry!==!1&&!y){let T;typeof o.options.retry=="number"?T=o.options.retry:T=QC(o.options.method)?0:1;const k=o.response&&o.response.status||500;if(T>0&&(Array.isArray(o.options.retryStatusCodes)?o.options.retryStatusCodes.includes(k):UB.has(k))){const M=typeof o.options.retryDelay=="function"?o.options.retryDelay(o):o.options.retryDelay||0;return M>0&&await new Promise(P=>setTimeout(P,M)),h(o.request,{...o.options,retry:T-1})}}const w=zB(o);throw Error.captureStackTrace&&Error.captureStackTrace(w,h),w}const h=async function(y,w={}){const T={request:y,options:jB(y,w,e.defaults,r),response:void 0,error:void 0};T.options.method&&(T.options.method=T.options.method.toUpperCase()),T.options.onRequest&&await Dy(T,T.options.onRequest),typeof T.request=="string"&&(T.options.baseURL&&(T.request=kB(T.request,T.options.baseURL)),T.options.query&&(T.request=hM(T.request,T.options.query),delete T.options.query),"query"in T.options&&delete T.options.query,"params"in T.options&&delete T.options.params),T.options.body&&QC(T.options.method)&&(OB(T.options.body)?(T.options.body=typeof T.options.body=="str
19ing"?T.options.body:JSON.stringify(T.options.body),T.options.headers=new r(T.options.headers||{}),T.options.headers.has("content-type")||T.options.headers.set("content-type","application/json"),T.options.headers.has("accept")||T.options.headers.set("accept","application/json")):("pipeTo"in T.options.body&&typeof T.options.body.pipeTo=="function"||typeof T.options.body.pipe=="function")&&("duplex"in T.options||(T.options.duplex="half")));let k;if(!T.options.signal&&T.options.timeout){const P=new i;k=setTimeout(()=>{const L=new Error("[TimeoutError]: The operation was aborted due to timeout");L.name="TimeoutError",L.code=23,P.abort(L)},T.options.timeout),T.options.signal=P.signal}try{T.response=await t(T.request,T.options)}catch(P){return T.error=P,T.options.onRequestError&&await Dy(T,T.options.onRequestError),await a(T)}finally{k&&clearTimeout(k)}if((T.response.body||T.response._bodyInit)&&!VB.has(T.response.status)&&T.options.method!=="HEAD"){const P=(T.options.parseResponse?"json":T.options.responseType)||NB(T.response.headers.get("content-type")||"");switch(P){case"json":{const L=await T.response.text(),O=T.options.parseResponse||Rd;T.response._data=O(L);break}case"stream":{T.response._data=T.response.body||T.response._bodyInit;break}default:T.response._data=await T.response[P]()}}return T.options.onResponse&&await Dy(T,T.options.onResponse),!T.options.ignoreResponseError&&T.response.status>=400&&T.response.status<600?(T.options.onResponseError&&await Dy(T,T.options.onResponseError),await a(T)):T.response},d=async function(y,w){return(await h(y,w))._data};return d.raw=h,d.native=(...o)=>t(...o),d.create=(o={},y={})=>mM({...e,...y,defaults:{...e.defaults,...y.defaults,...o}}),d}const V_=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),qB=V_.fetch?(...e)=>V_.fetch(...e):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),GB=V_.Headers,HB=V_.AbortController,ZB=mM({fetch:qB,Headers:GB,AbortController:HB}),WB=ZB,KB=()=>{var e;return((e=window==null?void 0:window.__NUXT__)==null?void 0:e.config)||{}},q_=KB().app,XB=()=>q_.baseURL,YB=()=>q_.buildAssetsDir,JB=(...e)=>fM(gM(),YB(),...e),gM=(...e)=>{const t=q_.cdnURL||q_.baseURL;return e.length?fM(t,...e):t};globalThis.__buildAssetsURL=JB,globalThis.__publicAssetsURL=gM;globalThis.$fetch||(globalThis.$fetch=WB.create({baseURL:XB()}));function h1(e,t={},r){for(const i in e){const a=e[i],h=r?`${r}:${i}`:i;typeof a=="object"&&a!==null?h1(a,t,h):typeof a=="function"&&(t[h]=a)}return t}const QB={run:e=>e()},eN=()=>QB,yM=typeof console.createTask<"u"?console.createTask:eN;function tN(e,t){const r=t.shift(),i=yM(r);return e.reduce((a,h)=>a.then(()=>i.run(()=>h(...t))),Promise.resolve())}function rN(e,t){const r=t.shift(),i=yM(r);return Promise.all(e.map(a=>i.run(()=>a(...t))))}function Xb(e,t){for(const r of[...e])r(t)}class nN{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,r,i={}){if(!t||typeof r!="function")return()=>{};const a=t;let h;for(;this._deprecatedHooks[t];)h=this._deprecatedHooks[t],t=h.to;if(h&&!i.allowDeprecated){let d=h.message;d||(d=`${a} hook has been deprecated`+(h.to?`, please use ${h.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(d)||(console.warn(d),this._deprecatedMessages.add(d))}if(!r.name)try{Object.defineProperty(r,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(r),()=>{r&&(this.removeHook(t,r),r=void 0)}}hookOnce(t,r){let i,a=(...h)=>(typeof i=="function"&&i(),i=void 0,a=void 0,r(...h));return i=this.hook(t,a),i}removeHook(t,r){if(this._hooks[t]){const i=this._hooks[t].indexOf(r);i!==-1&&this._hooks[t].splice(i,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,r){this._deprecatedHooks[t]=typeof r=="string"?{to:r}:r;const i=this._hooks[t]||[];delete this._hooks[t];for(const a of i)this.hook(t,a)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const r in t)this.deprecateHook(r,t[r])}addHooks(t){const r=h1(t),i=Object.keys(r).map(a=>this.hook(a,r[a]));return()=>{for(const a of i.splice(0,i.length))a()}}removeHooks(t){const r=h1(t);for(const i in r)this.removeHook(i,r[i])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...r){return r.unshift(t),this.callHookWith(tN,t,...r)}callHookParallel(t,...r){return r.unshift(t),this.callHookWith(rN,t,...r)}callHookWith(t,r,...i){const a=this._before||this._after?{name:r,args:i,context:{}}:void 0;this._before&&Xb(this._before,a);const h=t(r in this._hooks?[...this._hooks[r]]:[],i);return h instanceof Promise?h.finally(()=>{this._after&&a&&Xb(this._after,a)}):(this._after&&a&&Xb(this._after,a),h)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const r=this._before.indexOf(t);r!==-1&&this._before.splice(r,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const r=this._after.indexOf(t);r!==-1&&this._after.splice(r,1)}}}}function _M(){return new nN}function iN(e={}){let t,r=!1;const i=d=>
19{if(t&&t!==d)throw new Error("Context conflict")};let a;if(e.asyncContext){const d=e.AsyncLocalStorage||globalThis.AsyncLocalStorage;d?a=new d:console.warn("[unctx] `AsyncLocalStorage` is not provided.")}const h=()=>{if(a){const d=a.getStore();if(d!==void 0)return d}return t};return{use:()=>{const d=h();if(d===void 0)throw new Error("Context is not available");return d},tryUse:()=>h(),set:(d,o)=>{o||i(d),t=d,r=!0},unset:()=>{t=void 0,r=!1},call:(d,o)=>{i(d),t=d;try{return a?a.run(d,o):o()}finally{r||(t=void 0)}},async callAsync(d,o){t=d;const y=()=>{t=d},w=()=>t===d?y:void 0;d1.add(w);try{const T=a?a.run(d,o):o();return r||(t=void 0),await T}finally{d1.delete(w)}}}}function sN(e={}){const t={};return{get(r,i={}){return t[r]||(t[r]=iN({...e,...i})),t[r]}}}const G_=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:typeof window<"u"?window:{},eE="__unctx__",oN=G_[eE]||(G_[eE]=sN()),aN=(e,t={})=>oN.get(e,t),tE="__unctx_async_handlers__",d1=G_[tE]||(G_[tE]=new Set);function el(e){const t=[];for(const a of d1){const h=a();h&&t.push(h)}const r=()=>{for(const a of t)a()};let i=e();return i&&typeof i=="object"&&"catch"in i&&(i=i.catch(a=>{throw r(),a})),[i,r]}const lN=!1,f1=!1,cN=!1,uN={componentName:"NuxtLink",prefetch:!0,prefetchOn:{visibility:!0}},Sre={value:null,errorValue:null,deep:!0},hN=null,dN="#__nuxt",vM="nuxt-app",fN="vite:preloadError";function bM(e=vM){return aN(e,{asyncContext:!1})}const pN="__nuxt_plugin";function mN(e){var a;let t=0;const r={_id:e.id||vM||"nuxt-app",_scope:Vd(),provide:void 0,globalName:"nuxt",versions:{get nuxt(){return"3.16.2"},get vue(){return r.vueApp.version}},payload:da({...((a=e.ssrContext)==null?void 0:a.payload)||{},data:da({}),state:Mi({}),once:new Set,_errors:da({})}),static:{data:{}},runWithContext(h){return r._scope.active&&!Zu()?r._scope.run(()=>rE(r,h)):rE(r,h)},isHydrating:!0,deferHydration(){if(!r.isHydrating)return()=>{};t++;let h=!1;return()=>{if(!h&&(h=!0,t--,t===0))return r.isHydrating=!1,r.callHook("app:suspense:resolve")}},_asyncDataPromises:{},_asyncData:da({}),_payloadRevivers:{},...e};{const h=window.__NUXT__;if(h)for(const d in h)switch(d){case"data":case"state":case"_errors":Object.assign(r.payload[d],h[d]);break;default:r.payload[d]=h[d]}}r.hooks=_M(),r.hook=r.hooks.hook,r.callHook=r.hooks.callHook,r.provide=(h,d)=>{const o="$"+h;Oy(r,o,d),Oy(r.vueApp.config.globalProperties,o,d)},Oy(r.vueApp,"$nuxt",r),Oy(r.vueApp.config.globalProperties,"$nuxt",r);{window.addEventListener(fN,d=>{r.callHook("app:chunkError",{error:d.payload}),(r.isHydrating||d.payload.message.includes("Unable to preload CSS"))&&d.preventDefault()}),window.useNuxtApp||(window.useNuxtApp=Lr);const h=r.hook("app:error",(...d)=>{console.error("[nuxt] error caught during app initialization",...d)});r.hook("app:mounted",h)}const i=r.payload.config;return r.provide("config",i),r}function gN(e,t){t.hooks&&e.hooks.addHooks(t.hooks)}async function yN(e,t){if(typeof t=="function"){const{provide:r}=await e.runWithContext(()=>t(e))||{};if(r&&typeof r=="object")for(const i in r)e.provide(i,r[i])}}async function _N(e,t){const r=[],i=[],a=[],h=[];let d=0;async function o(y){var T;const w=((T=y.dependsOn)==null?void 0:T.filter(k=>t.some(M=>M._name===k)&&!r.includes(k)))??[];if(w.length>0)i.push([new Set(w),y]);
19else{const k=yN(e,y).then(async()=>{y._name&&(r.push(y._name),await Promise.all(i.map(async([M,P])=>{M.has(y._name)&&(M.delete(y._name),M.size===0&&(d++,await o(P)))})))});y.parallel?a.push(k.catch(M=>h.push(M))):await k}}for(const y of t)gN(e,y);for(const y of t)await o(y);if(await Promise.all(a),d)for(let y=0;y<d;y++)await Promise.all(a);if(h.length)throw h[0]}function Zr(e){if(typeof e=="function")return e;const t=e._name||e.name;return delete e.name,Object.assign(e.setup||(()=>{}),e,{[pN]:!0,_name:t})}const vN=Zr;function rE(e,t,r){const i=()=>t();return bM(e._id).set(e),e.vueApp.runWithContext(i)}function xM(e){var r;let t;return Vm()&&(t=(r=ci())==null?void 0:r.appContext.app.$nuxt),t||(t=bM(e).tryUse()),t||null}function Lr(e){const t=xM(e);if(!t)throw new Error("[nuxt] instance unavailable");return t}function Si(e){return Lr().$config}function Oy(e,t,r){Object.defineProperty(e,t,{get:()=>r})}function Yb(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function p1(e,t,r=".",i){if(!Yb(t))return p1(e,{},r,i);const a=Object.assign({},t);for(const h in e){if(h==="__proto__"||h==="constructor")continue;const d=e[h];d!=null&&(i&&i(a,h,d,r)||(Array.isArray(d)&&Array.isArray(a[h])?a[h]=[...d,...a[h]]:Yb(d)&&Yb(a[h])?a[h]=p1(d,a[h],(r?`${r}.`:"")+h.toString(),i):a[h]=d))}return a}function wM(e){return(...t)=>t.reduce((r,i)=>p1(r,i,"",e),{})}const Gd=wM(),bN=wM((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0});function xN(e,t){try{return t in e}catch{return!1}}class m1 extends Error{constructor(r,i={}){super(r,i);oa(this,"statusCode",500);oa(this,"fatal",!1);oa(this,"unhandled",!1);oa(this,"statusMessage");oa(this,"data");oa(this,"cause");i.cause&&!this.cause&&(this.cause=i.cause)}toJSON(){const r={message:this.message,statusCode:g1(this.statusCode,500)};return this.statusMessage&&(r.statusMessage=SM(this.statusMessage)),this.data!==void 0&&(r.data=this.data),r}}oa(m1,"__h3_error__",!0);function l_(e){if(typeof e=="string")return new m1(e);if(wN(e))return e;const t=new m1(e.message??e.statusMessage??"",{cause:e.cause||e});if(xN(e,"stack"))try{Object.defineProperty(t,"stack",{get(){return e.stack}})}catch{try{t.stack=e.stack}catch{}}if(e.data&&(t.data=e.data),e.statusCode?t.statusCode=g1(e.statusCode,t.statusCode):e.status&&(t.statusCode=g1(e.status,t.statusCode)),e.statusMessage?t.statusMessage=e.statusMessage:e.statusText&&(t.statusMessage=e.statusText),t.statusMessage){const r=t.statusMessage;SM(t.statusMessage)!==r&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return e.fatal!==void 0&&(t.fatal=e.fatal),e.unhandled!==void 0&&(t.unhandled=e.unhandled),t}function wN(e){var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.__h3_error__)===!0}const SN=/[^\u0009\u0020-\u007E]/g;function SM(e=""){return e.replace(SN,"")}function g1(e,t=200){return!e||(typeof e=="string"&&(e=Number.parseInt(e,10)),e<100||e>999)?t:e}const TM=Symbol("layout-meta"),Hm=Symbol("route"),gn=()=>{var e;return(e=Lr())==null?void 0:e.$router},$s=()=>Vm()?an(Hm,Lr()._route):Lr()._route;const TN=()=>{try{if(Lr()._processingMiddleware)return!0}catch{return!1}return!1},Fv=(e,t)=>{e||(e="/");const r=typeof e=="string"?e:"path"in e?y1(e):gn().resolve(e).href;if(t!=null&&t.open){const{target:y="_blank",windowFeatures:w={}}=t.open,T=Object.entries(w).filter(([k,M])=>M!==void 0).map(([k,M])=>`${k.toLowerCase()}=${M}`).join(", ");return open(r,y,T),Promise.resolve()}const i=$o(r,{acceptRelative:!0}),a=(t==null?void 0:t.external)||i;if(a){if(!(t!=null&&t.external))throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");const{protocol:y}=new URL(r,window.location.href);if(y&&CB(y))throw new Error(`Cannot navigate to a URL with '${y}' protocol.`)}const h=TN();if(!a&&h){if(t!=null&&t.replace){if(typeof e=="string"){const{pathname:y,search:w,hash:T}=rS(e);return{path:y,...w&&{query:eS(w)},...T&&{hash:T},replace:!0}}return{...e,replace:!0}}return e}const d=gn(),o=Lr();return a?(o._scope.stop(),t!=null&&t.replace?location.replace(r):location.href=r,h?o.isHydrating?new Promise(()=>{}
vendor: 4,720 bytes, lines 19-23
19):!1:Promise.resolve()):t!=null&&t.replace?d.replace(e):d.push(e)};function y1(e){return hM(e.path||"",e.query||{})+(e.hash||"")}const CM="__nuxt_error",Bv=()=>Fs(Lr().payload,"error"),nc=e=>{const t=Hd(e);try{const r=Lr(),i=Bv();r.hooks.callHook("app:error",t),i.value||(i.value=t)}catch{throw t}return t},CN=async(e={})=>{const t=Lr(),r=Bv();t.callHook("app:error:cleared",e),e.redirect&&await gn().replace(e.redirect),r.value=hN},nS=e=>!!e&&typeof e=="object"&&CM in e,Hd=e=>{const t=l_(e);return Object.defineProperty(t,CM,{value:!0,configurable:!1,writable:!1}),t};/*!
20 * pinia v3.0.3
21 * (c) 2025 Eduardo San Martin Morote
22 * @license MIT
23 */let EM;const Zm=e=>EM=e,kM=Symbol();function _1(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Kp;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Kp||(Kp={}));function EN(){const e=Vd(!0),t=e.run(()=>It({}));let r=[],i=[];const a=Nm({install(h){Zm(a),a._a=h,h.provide(kM,a),h.config.globalProperties.$pinia=a,i.forEach(d=>r.push(d)),i=[]},use(h){return this._a?r.push(h):i.push(h),this},_p:r,_a:null,_e:e,_s:new Map,state:t});return a}const IM=()=>{};function nE(e,t,r,i=IM){e.push(t);const a=()=>{const h=e.indexOf(t);h>-1&&(e.splice(h,1),i())};return!r&&Zu()&&kd(a),a}function ed(e,...t){e.slice().forEach(r=>{r(...t)})}const kN=e=>e(),iE=Symbol(),Jb=Symbol();function v1(e,t){e instanceof Map&&t instanceof Map?t.forEach((r,i)=>e.set(i,r)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const r in t){if(!t.hasOwnProperty(r))continue;const i=t[r],a=e[r];_1(a)&&_1(i)&&e.hasOwnProperty(r)&&!Xr(i)&&!pa(i)?e[r]=v1(a,i):e[r]=i}return e}const PM=Symbol();function IN(e){return Object.defineProperty(e,PM,{})}function PN(e){return!_1(e)||!Object.prototype.hasOwnProperty.call(e,PM)}const{assign:Jl}=Object;function AN(e){return!!(Xr(e)&&e.effect)}function MN(e,t,r,i){const{state:a,actions:h,getters:d}=t,o=r.state.value[e];let y;function w(){o||(r.state.value[e]=a?a():{});const T=Bo(r.state.value[e]);return Jl(T,h,Object.keys(d||{}).reduce((k,M)=>(k[M]=Nm(it(()=>{Zm(r);const P=r._s.get(e);return d[M].call(P,P)})),k),{}))}return y=AM(e,w,t,r,i,!0),y}function AM(e,t,r={},i,a,h){let d;const o=Jl({actions:{}},r),y={deep:!0};let w,T,k=[],M=[],P;const L=i.state.value[e];!h&&!L&&(i.state.value[e]={}),It({});let O;function $(fe){let Se;w=T=!1,typeof fe=="function"?(fe(i.state.value[e]),Se={type:Kp.patchFunction,storeId:e,events:P}):(v1(i.state.value[e],fe),Se={type:Kp.patchObject,payload:fe,storeId:e,events:P});const xe=O=Symbol();Ri().then(()=>{O===xe&&(w=!0)}),T=!0,ed(k,Se,i.state.value[e])}const Z=h?function(){const{state:Se}=r,xe=Se?Se():{};this.$patch(et=>{Jl(et,xe)})}:IM;function J(){d.stop(),k=[],M=[],i._s.delete(e)}const H=(fe,Se="")=>{if(iE in fe)return fe[Jb]=Se,fe;const xe=function(){Zm(i);const et=Array.from(arguments),ze=[],Ze=[];function tt(He){ze.push(He)}function at(He){Ze.push(He)}ed(M,{args:et,name:xe[Jb],store:V,after:tt,onError:at});let Pe;try{Pe=fe.apply(this&&this.$id===e?this:V,et)}catch(He){throw ed(Ze,He),He}return Pe instanceof Promise?Pe.then(He=>(ed(ze,He),He)).catch(He=>(ed(Ze,He),Promise.reject(He))):(ed(ze,Pe),Pe)};return xe[iE]=!0,xe[Jb]=Se,xe},U={_p:i,$id:e,$onAction:nE.bind(null,M),$patch:$,$reset:Z,$subscribe(fe,Se={}){const xe=nE(k,fe,Se.detached,()=>et()),et=d.run(()=>Mr(()=>i.state.value[e],ze=>{(Se.flush==="sync"?T:w)&&fe({storeId:e,type:Kp.direct,events:P},ze)},Jl({},y,Se)));return xe},$dispose:J},V=Mi(U);i._s.set(e,V);const ce=(i._a&&i._a.runWithContext||kN)(()=>i._e.run(()=>(d=Vd()).run(()=>t({action:H}))));for(const fe in ce){const Se=ce[fe];if(Xr(Se)&&!AN(Se)||pa(Se))h||(L&&PN(Se)&&(Xr(Se)?Se.value=L[fe]:v1(Se,L[fe])),i.state.value[e][fe]=Se);else if(typeof Se=="function"){const xe=H(Se,fe);ce[fe]=xe,o.actions[fe]=Se}}return Jl(V,ce),Jl(qr(V),ce),Object.defineProperty(V,"$state",{get:()=>i.state.value[e],set:fe=>{$(Se=>{Jl(Se,fe)})}}),i._p.forEach(fe=>{Jl(V,d.run(()=>fe({store:V,app:i._a,pinia:i,options:o})))}),L&&h&&r.hydrate&&r.hydrate(V.$state,L),w=!0,T=!0,V}/*! #__NO_SIDE_EFFECTS__ */function Xu(e,t,r){let i;const a=typeof t=="function";i=a?r:t;function h(d,o){const y=Vm();return d=d||(y?an(kM,null):null),d&&Zm(d),d=EM,d._s.has(e)||(a?AM(e,t,i,d):MN(e,i,d)),d._s.get(e)}return h.$id=e,h}function Tre(e){const t=qr(e),r={};for(const i in t){const a=t[i];a.effect?r[i]=it({get:()=>e[i],set(h){e[i]=h}}):(Xr(a)||pa(a))&&(r[i]=Fs(e,i))}return r}function sE(e){const t=LN(e),r=new ArrayBuffer(t.length),i=new DataView(r);for(let a=0;a<r.byteLength;a++)i.setUint8(a,t.charCodeAt(a));return r}const RN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
23+/";function LN(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",r=0,i=0;for(let a=0;a<e.length;a++)r<<=6,r|=RN.indexOf(e[a]),i+=6,i===24&&(t+=String.fromCharCode((r&16711680)>>16),t+=String.fromCharCode((r&65280)>>8),t+=String.fromCharCode(r&255),r=i=0);return i===12?(r>>=4,t+=String.fromCharCode(r)):i===18&&(r>>=2,t+=String.fromCharCode((r&65280)>>8),t+=String.fromCharCode(r&255)),t}const zN=-1,DN=-2,ON=-3,FN=-4,BN=-5,NN=-6;function jN(e,t){return $N(JSON.parse(e),t)}function $N(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const r=e,i=Array(r.length);function a(h,d=!1){if(h===zN)return;if(h===ON)return NaN;if(h===FN)return 1/0;if(h===BN)return-1/0;if(h===NN)return-0;if(d)throw new Error("Invalid input");if(h in i)return i[h];const o=r[h];if(!o||typeof o!="object")i[h]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const y=o[0],w=t==null?void 0:t[y];if(w)return i[h]=w(a(o[1]));switch(y){case"Date":i[h]=new Date(o[1]);break;case"Set":const T=new Set;i[h]=T;for(let P=1;P<o.length;P+=1)T.add(a(o[P]));break;case"Map":const k=new Map;i[h]=k;for(let P=1;P<o.length;P+=2)k.set(a(o[P]),a(o[P+1]));break;case"RegExp":i[h]=new RegExp(o[1],o[2]);break;case"Object":i[h]=Object(o[1]);break;case"BigInt":i[h]=BigInt(o[1]);break;case"null":const M=Object.create(null);i[h]=M;for(let P=1;P<o.length;P+=2)M[o[P]]=a(o[P+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const P=globalThis[y],L=o[1],O=sE(L),$=new P(O);i[h]=$;break}case"ArrayBuffer":{const P=o[1],L=sE(P);i[h]=L;break}default:throw new Error(`Unknown type ${y}`)}}else{const y=new Array(o.length);i[h]=y;for(let w=0;w<o.length;w+=1){const T=o[w];T!==DN&&(y[w]=a(T))}}else{const y={};i[h]=y;for(const w in o){const T=o[w];y[w]=a(T)}}return i[h]}return a(0)}const UN=new Set(["link","style","script","noscript"]),VN=new Set(["title","titleTemplate","script","style","noscript"]),oE=new Set(["base","meta","link","style","script","noscript"]),qN=new Set(["title","base","htmlAttrs","bodyAttrs","meta","link","style","script","noscript"]),GN=new Set(["base","title","titleTemplate","bodyAttrs","htmlAttrs","templateParams"]),HN=new Set(["key","tagPosition","tagPriority","tagDuplicateStrategy","innerHTML","textContent","processTemplateParams"]),ZN=new Set(["templateParams","htmlAttrs","bodyAttrs"]),iS=new Set(["theme-color","google-site-verification","og","article","book","profile","twitter","author"]),gm={META:new Set(["twitter"]),OG:new Set(["og","book","article","profile","fb"]),MEDIA:new Set(["ogImage","ogVideo","ogAudio","twitterImage"]),HTTP_EQUIV:new Set(["contentType","defaultStyle","xUaCompatible"])},WN={articleExpirationTime:"article:expiration_time",articleModifiedTime:"article:modified_time",articlePublishedTime:"article:published_time",bookReleaseDate:"book:release_date",fbAppId:"fb:app_id",ogAudioSecureUrl:"og:audio:secure_url",ogAudioUrl:"og:audio",ogImageSecureUrl:"og:image:secure_url",ogImageUrl:"og:image",ogSiteName:"og:site_name",ogVideoSecureUrl:"og:video:secure_url",ogVideoUrl:"og:video",profileFirstName:"profile:first_name",profileLastName:"profile:last_name",profileUsername:"profile:username",msapplicationConfig:"msapplication-Config",msapplicationTileColor:"msapplication-TileColor",msapplicationTileImage:"msapplication-TileImage"},MM={appleItunesApp:{unpack:{entrySeparator:", ",resolve:({key:e,value:t})=>`${Qa(e)}=${t}`}},refresh:{metaKey:"http-equiv",unpack:{entrySeparator:";",resolve:({key:e,value:t})=>e==="seconds"?`${t}`:void 0}},robots:{unpack:{entrySeparator:", ",resolve:({key:e,value:t})=>typeof t=="boolean"?Qa(e):`${Qa(e)}:${t}`}},contentSecurityPolicy:{metaKey:"http-equiv",unpack:{entrySeparator:"; ",resolve:({key:e,value:t})=>`${Qa(e)} ${t}`}},charset:{}};function Qa(e){const t=e.replace(/([A-Z])/g,"-$1").toLowerCase(),r=t.indexOf("-");return r===-1?t:gm.META.has(t.slice(0,r))||gm.OG.has(t.slice(0,r))?e.replace(/([A-Z])/g,":$1").toLowerCase():t}function RM(e){return Object.fromEntries(Object.entries(e).filter(([t,r])=>String(r)!=="false"&&t))}function b1(e){return Array.isArray(e)?e.map(b1):!e||typeof e!="object"?e:Object.fromEntries(Object.entries(e).map(([t,r])=>[Qa(t),b1(r)]))}function LM(e,t={}){const{entrySeparator:r="",keyValueSeparator:i="",wrapValue:a,resolve:h}=t;return Object.entries(e).map(([d,o])=>{if(h){const w=h({key:d,value:o});if(w!==void 0)return w}const y=typeof o=="object"?LM(o,t):typeof o=="number"?o.toString():typeof o=="str
23ing"&&a?`${a}${o.replace(new RegExp(a,"g"),`\\${a}`)}${a}`:o;return`${d}${i}${y}`}).join(r)}function aE(e,t){const r=RM(t),i=Qa(e),a=zM(i);if(!iS.has(i))return[{[a]:i,...r}];const h=Object.fromEntries(Object.entries(r).map(([d,o])=>[`${e}${d==="url"?"":`${d[0].toUpperCase()}${d.slice(1)}`}`,o]));return H_(h||{}).sort((d,o)=>{var y,w;return(((y=d[a])==null?void 0:y.length)||0)-(((w=o[a])==null?void 0:w.length)||0)})}function zM(e){var i;if(((i=MM[e])==null?void 0:i.metaKey)==="http-equiv"||gm.HTTP_EQUIV.has(e))return"http-equiv";const t=Qa(e),r=t.indexOf(":");return r===-1?"name":gm.OG.has(t.slice(0,r))?"property":"name"}function KN(e){return WN[e]||Qa(e)}function XN(e,t){var r;return t==="refresh"?`${e.seconds};url=${e.url}`:LM(b1(e),{keyValueSeparator:"=",entrySeparator:", ",resolve:({value:i,key:a})=>i===null?"":typeof i=="boolean"?a:void 0,...(r=MM[t])==null?void 0:r.unpack})}function H_(e){const t=[],r={};for(const[a,h]of Object.entries(e)){if(Array.isArray(h)){if(a==="themeColor"){h.forEach(d=>{typeof d=="object"&&d!==null&&t.push({name:"theme-color",...d})});continue}for(const d of h)if(typeof d=="object"&&d!==null){const o=[],y=[];for(const[w,T]of Object.entries(d)){const k=`${a}${w==="url"?"":`:${w}`}`,M=H_({[k]:T});(w==="url"?o:y).push(...M)}t.push(...o,...y)}else t.push(...typeof d=="string"?H_({[a]:d}):aE(a,d));continue}if(typeof h=="object"&&h)if(gm.MEDIA.has(a)){const d=a.startsWith("twitter")?"twitter":"og",o=a.replace(/^(og|twitter)/,"").toLowerCase(),y=d==="twitter"?"name":"property";h.url&&t.push({[y]:`${d}:${o}`,content:h.url}),h.secureUrl&&t.push({[y]:`${d}:${o}:secure_url`,content:h.secureUrl});for(const[w,T]of Object.entries(h))w!=="url"&&w!=="secureUrl"&&t.push({[y]:`${d}:${o}:${w}`,content:T})}else iS.has(Qa(a))?t.push(...aE(a,h)):r[a]=RM(h);else r[a]=h}const i=Object.entries(r).map(([a,h])=>{if(a==="charset")return{charset:h===null?"_null":h};const d=zM(a),o=KN(a),y=h===null?"_null":typeof h=="object"?XN(h,a):typeof h=="number"?h.toString():h;return d==="http-equiv"?{"http-equiv":o,content:y}:{[d]:o,content:y}});return[...t,...i].map(a=>"content"in a&&a.content==="_null"?{...a,content:null}:a)}const YN={key:"flatMeta",hooks:{"entries:normalize":e=>{const t=[];e.tags=e.tags.map(r=>r.tag!=="_flatMeta"?r:(t.push(H_(r.props).map(i=>({...r,tag:"meta",props:i}))),!1)).filter(Boolean).concat(...t)}}},JN=["name","property","http-equiv"],QN=new Set(["viewport","description","keywords","robots"]);function DM(e){const t=e.split(":");return t.length?iS.has(t[1]):!1}function x1(e){const{props:t,tag:r}=e;if(GN.has(r))return r;if(r==="link"&&t.rel==="canonical")return"canonical";if(t.charset)return"charset";if(e.tag==="meta"){for(const i of JN)if(t[i]!==void 0){const a=t[i],h=a.includes(":"),d=QN.has(a),y=!(h||d)&&e.key?`:key:${e.key}`:"";return`${r}:${a}${y}`}}if(e.key)return`${r}:key:${e.key}`;if(t.id)return`${r}:id:${t.id}`;if(VN.has(r)){const i=e.textContent||e.innerHTML;if(i)return`${r}:content:${i}`}}function lE(e){const t=e._h||e._d;if(t)return t;const r=e.textContent||e.innerHTML;return r||`${e.tag}:${Object.entries(e.props).map(([i,a])=>`${i}:${String(a)}`).join(",")}`}function Z_(e,t,r){typeof e==="function"&&(!r||r!=="titleTemplate"&&!(r[0]==="o"&&r[1]==="n"))&&(e=e());let a;if(t&&(a=t(r,e)),Array.isArray(a))return a.map(h=>Z_(h,t));if((a==null?void 0:a.constructor)===Object){const h={};for(const d of Object.keys(a))h[d]=Z_(a[d],t,d);return h}return a}function e6(e,t){const r=e==="style"?new Map:new Set;function i(a){const h=a.trim();if(h)if(e==="style"){const[d,...o]=h.split(":").map(y=>y.trim());d&&o.length&&r.set(d,o.join(":"))}else h.split(" ").filter(Boolean).forEach(d=>r.add(d))}return typeof t=="string"?e==="style"?t.split(";").forEach(i):i(t):Array.isArray(t)?t.forEach(a=>i(a)):t&&typeof t=="object"&&Object.entries(t).forEach(([a,h])=>{h&&h!=="false"&&(e==="style"?r.set(a.trim(),h):i(a))}),r}function OM(e,t){return e.props=e.props||{},t&&Object.entries(t).forEach(([r,i])=>{if(i===null){e.props[r]=null;return}if(r==="class"||r==="style"){e.props[r]=e6(r,i);return}if(HN.has(r)){if(["textContent","innerHTML"].includes(r)&&typeof i=="object"){let d=t.type;if(t.type||(d="application/json"),!(d!=null&&d.endsWith("json"))&&d!=="speculationrules")return;t.type=d,e.props.type=d,e[r]=JSON.stringify(i)}else e[r]=i;return}
23const a=String(i),h=r.startsWith("data-");a==="true"||a===""?e.props[r]=h?a:!0:!i&&h&&a==="false"?e.props[r]="false":i!==void 0&&(e.props[r]=i)}),e}function t6(e,t){const r=typeof t=="object"&&typeof t!="function"?t:{[e==="script"||e==="noscript"||e==="style"?"innerHTML":"textContent"]:t},i=OM({tag:e,props:{}},r);return i.key&&UN.has(i.tag)&&(i.props["data-hid"]=i._h=i.key),i.tag==="script"&&typeof i.innerHTML=="object"&&(i.innerHTML=JSON.stringify(i.innerHTML),i.props.type=i.props.type||"application/json"),Array.isArray(i.props.content)?i.props.content.map(a=>({...i,props:{...i.props,content:a}})):i}function r6(e,t){if(!e)return[];typeof e=="function"&&(e=e());const r=(a,h)=>{for(let d=0;d<t.length;d++)h=t[d](a,h);return h};e=r(void 0,e);const i=[];return e=Z_(e,r),Object.entries(e||{}).forEach(([a,h])=>{if(h!==void 0)for(const d of Array.isArray(h)?h:[h])i.push(t6(a,d))}),i.flat()}const w1=(e,t)=>e._w===t._w?e._p-t._p:e._w-t._w,cE={base:-10,title:10},n6={critical:-8,high:-1,low:2},uE={meta:{"content-security-policy":-30,charset:-20,viewport:-15},link:{preconnect:20,stylesheet:60,preload:70,modulepreload:70,prefetch:90,"dns-prefetch":90,prerender:90},script:{async:30,defer:80,sync:50},style:{imported:40,sync:60}},i6=/@import/,Ip=e=>e===""||e===!0;function s6(e,t){var h;if(typeof t.tagPriority=="number")return t.tagPriority;let r=100;const i=n6[t.tagPriority]||0,a=e.resolvedOptions.disableCapoSorting?{link:{},script:{},style:{}}:uE;if(t.tag in cE)r=cE[t.tag];else if(t.tag==="meta"){const d=t.props["http-equiv"]==="content-security-policy"?"content-security-policy":t.props.charset?"charset":t.props.name==="viewport"?"viewport":null;d&&(r=uE.meta[d])}else t.tag==="link"&&t.props.rel?r=a.link[t.props.rel]:t.tag==="script"?Ip(t.props.async)?r=a.script.async:t.props.src&&!Ip(t.props.defer)&&!Ip(t.props.async)&&t.props.type!=="module"&&!((h=t.props.type)!=null&&h.endsWith("json"))?r=a.script.sync:Ip(t.props.defer)&&t.props.src&&!Ip(t.props.async)&&(r=a.script.defer):t.tag==="style"&&(r=t.innerHTML&&i6.test(t.innerHTML)?a.style.imported:a.style.sync);return(r||100)+i}function hE(e,t){const r=typeof t=="function"?t(e):t,i=r.key||String(e.plugins.size+1);e.plugins.get(i)||(e.plugins.set(i,r),e.hooks.addHooks(r.hooks||{}))}function o6(e={}){var o;const t=_M();t.addHooks(e.hooks||{});const r=!e.document,i=new Map,a=new Map,h=[],d={_entryCount:1,plugins:a,dirty:!1,resolvedOptions:e,hooks:t,ssr:r,entries:i,headEntries(){return[...i.values()]},use:y=>hE(d,y),push(y,w){const T={...w||{}};delete T.head;const k=T._index??d._entryCount++,M={_i:k,input:y,options:T},P={_poll(L=!1){d.dirty=!0,!L&&h.push(k),t.callHook("entries:updated",d)},dispose(){i.delete(k)&&P._poll(!0)},patch(L){(!T.mode||T.mode==="server"&&r||T.mode==="client"&&!r)&&(M.input=L,i.set(k,M),P._poll())}};return P.patch(y),P},async resolveTags(){var P;const y={tagMap:new Map,tags:[],entries:[...d.entries.values()]};for(await t.callHook("entries:resolve",y);h.length;){const L=h.shift(),O=i.get(L);if(O){const $={tags:r6(O.input,e.propResolvers||[]).map(Z=>Object.assign(Z,O.options)),entry:O};await t.callHook("entries:normalize",$),O._tags=$.tags.map((Z,J)=>(Z._w=s6(d,Z),Z._p=(O._i<<10)+J,Z._d=x1(Z),Z))}}let w=!1;y.entries.flatMap(L=>(L._tags||[]).map(O=>({...O,props:{...O.props}}))).sort(w1).reduce((L,O)=>{const $=String(O._d||O._p);if(!L.has($))return L.set($,O);const Z=L.get($);if(((O==null?void 0:O.tagDuplicateStrategy)||(ZN.has(O.tag)?"merge":null)||(O.key&&O.key===Z.key?"merge":null))==="merge"){const H={...Z.props};Object.entries(O.props).forEach(([U,V])=>H[U]=U==="style"?new Map([...Z.props.style||new Map,...V]):U==="class"?new Set([...Z.props.class||new Set,...V]):V),L.set($,{...O,props:H})}else O._p>>10===Z._p>>10&&O.tag==="meta"&&DM($)?(L.set($,Object.assign([...Array.isArray(Z)?Z:[Z],O],O)),w=!0):(O._w===Z._w?O._p>Z._p:(O==null?void 0:O._w)<(Z==null?void 0:Z._w))&&L.set($,O);return L},y.tagMap);const T=y.tagMap.get("title"),k=y.tagMap.get("titleTemplate");if(d._title=T==null?void 0:T.textContent,k){const L=k==null?void 0:k.textContent;if(d._titleTemplate=L,L){let O=typeof L=="function"?L(T==null?void 0:T.textContent):L;typeof O=="string"&&!d.plugins.has("template-params")&&(O=O.replace("%s",(T==null?void 0:T.textContent)||"")),T?O===null?y.tagMap.delete("title"):y.tagMap.set("title",{...T,textContent:O}):(k.tag="title",k.textContent=O)}}y.tags=Array.from(y.tagMap.values()),w&&(y.tags=y.tags.flat().sort(w1)),await t.callHook("tags:beforeResolve",y),await t.callHook("tags:resolve",y),await t.callHook("tags:afterResolve",y);const M=[];for(const L of y.tags){const{innerHTML:O,tag:$,props:Z}=L;
23if(qN.has($)&&!(Object.keys(Z).length===0&&!L.innerHTML&&!L.textContent)&&!($==="meta"&&!Z.content&&!Z["http-equiv"]&&!Z.charset)){if($==="script"&&O){if((P=Z.type)!=null&&P.endsWith("json")){const J=typeof O=="string"?O:JSON.stringify(O);L.innerHTML=J.replace(/</g,"\\u003C")}else typeof O=="string"&&(L.innerHTML=O.replace(new RegExp(`</${$}`,"g"),`<\\/${$}`));L._d=x1(L)}M.push(L)}}return M}};return((e==null?void 0:e.plugins)||[]).forEach(y=>hE(d,y)),d.hooks.callHook("init",d),(o=e.init)==null||o.forEach(y=>y&&d.push(y)),d}const ic="%separator",a6=new RegExp(`${ic}(?:\\s*${ic})*`,"g");function l6(e,t,r=!1){var a;let i;if(t==="s"||t==="pageTitle")i=e.pageTitle;else if(t.includes(".")){const h=t.indexOf(".");i=(a=e[t.substring(0,h)])==null?void 0:a[t.substring(h+1)]}else i=e[t];if(i!==void 0)return r?(i||"").replace(/\\/g,"\\\\").replace(/</g,"\\u003C").replace(/"/g,'\\"'):i||""}function Fy(e,t,r,i=!1){if(typeof e!="string"||!e.includes("%"))return e;let a=e;try{a=decodeURI(e)}catch{}const h=a.match(/%\w+(?:\.\w+)?/g);if(!h)return e;const d=e.includes(ic);return e=e.replace(/%\w+(?:\.\w+)?/g,o=>{if(o===ic||!h.includes(o))return o;const y=l6(t,o.slice(1),i);return y!==void 0?y:o}).trim(),d&&(e.endsWith(ic)&&(e=e.slice(0,-ic.length)),e.startsWith(ic)&&(e=e.slice(ic.length)),e=e.replace(a6,r||"").trim()),e}const dE=e=>e.includes(":key")?e:e.split(":").join(":key:"),c6={key:"aliasSorting",hooks:{"tags:resolve":e=>{let t=!1;for(const r of e.tags){const i=r.tagPriority;if(!i)continue;const a=String(i);if(a.startsWith("before:")){const h=dE(a.slice(7)),d=e.tagMap.get(h);d&&(typeof d.tagPriority=="number"&&(r.tagPriority=d.tagPriority),r._p=d._p-1,t=!0)}else if(a.startsWith("after:")){const h=dE(a.slice(6)),d=e.tagMap.get(h);d&&(typeof d.tagPriority=="number"&&(r.tagPriority=d.tagPriority),r._p=d._p+1,t=!0)}}t&&(e.tags=e.tags.sort(w1))}}},u6={key:"deprecations",hooks:{"entries:normalize":({tags:e})=>{for(const t of e)t.props.children&&(t.innerHTML=t.props.children,delete t.props.children),t.props.hid&&(t.key=t.props.hid,delete t.props.hid),t.props.vmid&&(t.key=t.props.vmid,delete t.props.vmid),t.props.body&&(t.tagPosition="bodyClose",delete t.props.body)}}};async function S1(e){if(typeof e==="function")return e;if(e instanceof Promise)return await e;if(Array.isArray(e))return await Promise.all(e.map(r=>S1(r)));if((e==null?void 0:e.constructor)===Object){const r={};for(const i of Object.keys(e))r[i]=await S1(e[i]);return r}return e}const h6={key:"promises",hooks:{"entries:resolve":async e=>{const t=[];for(const r in e.entries)e.entries[r]._promisesProcessed||t.push(S1(e.entries[r].input).then(i=>{e.entries[r].input=i,e.entries[r]._promisesProcessed=!0}));await Promise.all(t)}}},d6={meta:"content",link:"href",htmlAttrs:"lang"},f6=["innerHTML","textContent"],p6=e=>({key:"template-params",hooks:{"entries:normalize":t=>{var i,a,h;const r=((a=(i=t.tags.filter(d=>d.tag==="templateParams"&&d.mode==="server"))==null?void 0:i[0])==null?void 0:a.props)||{};Object.keys(r).length&&(e._ssrPayload={templateParams:{...((h=e._ssrPayload)==null?void 0:h.templateParams)||{},...r}})},"tags:resolve":({tagMap:t,tags:r})=>{var h;const i=((h=t.get("templateParams"))==null?void 0:h.props)||{},a=i.separator||"|";delete i.separator,i.pageTitle=Fy(i.pageTitle||e._title||"",i,a);for(const d of r){if(d.processTemplateParams===!1)continue;const o=d6[d.tag];if(o&&typeof d.props[o]=="string")d.props[o]=Fy(d.props[o],i,a);else if(d.processTemplateParams||d.tag==="titleTemplate"||d.tag==="title")for(const y of f6)typeof d[y]=="string"&&(d[y]=Fy(d[y],i,a,d.tag==="script"&&d.props.type.endsWith("json")))}e._templateParams=i,e._separator=a},"tags:afterResolve":({tagMap:t})=>{const r=t.get("title");r!=null&&r.textContent&&r.processTemplateParams!==!1&&(r.textContent=Fy(r.textContent,e._templateParams,e._separator))}}}),m6=(e,t)=>Xr(t)?En(t):t,sS="usehead";function g6(e){return{install(r){r.config.globalProperties.$unhead=e,r.config.globalProperties.$head=e,r.provide(sS,e)}}.install}function FM(){if(Vm()){const e=an(sS);if(!e)throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");return e}throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.")}function BM(e,t={}){const r=t.head||FM();return r.ssr?r.push(e||{},t):y6(r,e,t)}function y6(e,t,r={}){const i=It(!1);let a;return jo(()=>{const d=i.value?{}:Z_(t,m6);a?a.patch(d):a=e.push(d,r)}),ci()&&(bc(()=>{a.dispose()}),aA(()=>{i.value=!0}),oA(()=>{i.value=!1})),a}
23function _6(e={},t={}){(t.head||FM()).use(YN);const{title:i,titleTemplate:a,...h}=e;return BM({title:i,titleTemplate:a,_flatMeta:h},t)}function NM(e){var r;const t=e||xM();return((r=t==null?void 0:t.ssrContext)==null?void 0:r.head)||(t==null?void 0:t.runWithContext(()=>{if(Vm())return an(sS)}))}function Zd(e,t={}){const r=NM(t.nuxt);if(r)return BM(e,{head:r,...t})}function v6(e,t={}){const r=NM(t.nuxt);if(r)return _6(e,{head:r,...t})}const b6="modulepreload",x6=function(e,t){return new URL(e,t).href},fE={},Dn=function(t,r,i){let a=Promise.resolve();if(r&&r.length>0){let d=function(T){return Promise.all(T.map(k=>Promise.resolve(k).then(M=>({status:"fulfilled",value:M}),M=>({status:"rejected",reason:M}))))};const o=document.getElementsByTagName("link"),y=document.querySelector("meta[property=csp-nonce]"),w=(y==null?void 0:y.nonce)||(y==null?void 0:y.getAttribute("nonce"));a=d(r.map(T=>{if(T=x6(T,i),T in fE)return;fE[T]=!0;const k=T.endsWith(".css"),M=k?'[rel="stylesheet"]':"";if(!!i)for(let O=o.length-1;O>=0;O--){const $=o[O];if($.href===T&&(!k||$.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${T}"]${M}`))return;const L=document.createElement("link");if(L.rel=k?"stylesheet":b6,k||(L.as="script"),L.crossOrigin="",L.href=T,w&&L.setAttribute("nonce",w),document.head.appendChild(L),k)return new Promise((O,$)=>{L.addEventListener("load",O),L.addEventListener("error",()=>$(new Error(`Unable to preload CSS for ${T}`)))})}))}function h(d){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=d,window.dispatchEvent(o),!o.defaultPrevented)throw d}return a.then(d=>{for(const o of d||[])o.status==="rejected"&&h(o.reason);return t().catch(h)})};async function pE(e,t={}){if(!await $M(e))return null;const i=await S6(e,t);return await jM(i)||null}const w6="_payload.json";async function S6(e,t={}){const r=new URL(e,"http://localhost");if(r.host!=="localhost"||$o(r.pathname,{acceptRelative:!0}))throw new Error("Payload URL must not include hostname: "+e);const i=Si(),a=t.hash||(t.fresh?Date.now():i.app.buildId),h=i.app.cdnURL,d=h&&await $M(e)?h:i.app.baseURL;return ju(d,r.pathname,w6+(a?`?${a}`:""))}async function jM(e){const t=fetch(e,{cache:"force-cache"}).then(r=>r.text().then(UM));try{return await t}catch(r){console.warn("[nuxt] Cannot load payload ",e,r)}return null}async function $M(e=$s().path){return!!Lr().payload.prerenderedAt}let gu=null;async function T6(){var i;if(gu)return gu;const e=document.getElementById("__NUXT_DATA__");if(!e)return{};const t=await UM(e.textContent||""),r=e.dataset.src?await jM(e.dataset.src):void 0;return gu={...t,...r,...window.__NUXT__},(i=gu.config)!=null&&i.public&&(gu.config.public=Mi(gu.config.public)),gu}async function UM(e){return await jN(e,Lr()._payloadRevivers)}function VM(e,t){Lr()._payloadRevivers[e]=t}const C6=vN(()=>{VM("skipHydrate",e=>{})}),E6=[["NuxtError",e=>Hd(e)],["EmptyShallowRef",e=>wa(e==="_"?void 0:e==="0n"?BigInt(0):Rd(e))],["EmptyRef",e=>It(e==="_"?void 0:e==="0n"?BigInt(0):Rd(e))],["ShallowRef",e=>wa(e)],["ShallowReactive",e=>da(e)],["Ref",e=>It(e)],["Reactive",e=>Mi(e)]],k6=Zr({name:"nuxt:revive-payload:client",order:-30,async setup(e){let t,r;for(const[i,a]of E6)VM(i,a);Object.assign(e.payload,([t,r]=el(()=>e.runWithContext(T6)),t=await t,r(),t)),window.__NUXT__=e.payload}});async function oS(e,t={}){const r=t.document||e.resolvedOptions.document;if(!r||!e.dirty)return;const i={shouldRender:!0,tags:[]};if(await e.hooks.callHook("dom:beforeRender",i),!!i.shouldRender)return e._domUpdatePromise||(e._domUpdatePromise=new Promise(async a=>{var P;const h=new Map,d=new Promise(L=>{e.resolveTags().then(O=>{L(O.map($=>{const Z=h.get($._d)||0,J={tag:$,id:(Z?`${$._d}:${Z}`:$._d)||lE($),shouldRender:!0};return $._d&&DM($._d)&&h.set($._d,Z+1),J}))})});let o=e._dom;if(!o){o={title:r.title,elMap:new Map().set("htmlAttrs",r.documentElement).set("bodyAttrs",r.body)};for(const L of["body","head"]){const O=(P=r[L])==null?void 0:P.children;for(const $ of O){const Z=$.tagName.toLowerCase();if(!oE.has(Z))continue;const J=OM({tag:Z,props:{}},{innerHTML:$.innerHTML,...$.getAttributeNames().reduce((H,U)=>(H[U]=$.getAttribute(U),H),{})||{}});if(J.key=$.getAttribute("data-hid")||void 0,J._d=x1(J)||lE(J),o.elMap.has(J._d)){let H=1,U=J._d;for(;o.elMap.has(U);)U=`${J._d}:${H++}`;o.elMap.set(U,$)}else o.elMap.set(J._d,$)}}}o.pendingSideEffects={...o.sideEffects},o.sideEffects={};function y(L,O,$){const Z=`${L}:${O}`;o.sideEffects[Z]=$,delete o.pendingSideEffects[Z]}function w({id:L,$el:O,tag:$}){const Z=$.tag.endsWith("Attrs");o.elMap.set(L,O),Z||($.textContent&&$.textContent!==O.textContent&&(O.textContent=$.textContent),$.innerHTML&&$.innerHTML!==O.innerHTML&&(O.innerHTML=$.innerHTML),y(L,"el",()=>{O==null||O.remove(),o.elMap.delete(L)}));for(const J in $.props){if(!Object.prototype.hasOwnProperty.call($.props,J))continue;const H=$.props[J];if(J.startsWith("on")&&typeof H=="function"){const V=O==null?void 0:O.dataset;if(V&&V[`${J}fired`]){const te=J.slice(0,-5);H.call(O,new Event(te.substring(2)))}O.getAttribute(`data-${J}`)!==""&&(($.tag==="bodyAttrs"?r.defaultView:O).addEventListener(J.substring(2),H.bind(O)),O.setAttribute(`data-${J}`,""));continue}const U=`attr:${J}`;if(J==="class"){if(!H)continue;for(const V of H)Z&&y(L,`${U}:${V}`,()=>O.classList.remove(V)),!O.classList.contains(V)&&O.classList.add(V)}else if(J==="style"){if(!H)continue;for(const[V,te]of H)y(L,`${U}:${V}`,()=>{O.style.removeProperty(V)}),O.style.setProperty(V,te)}else H!==!1&&H!==null&&(O.getAttribute(J)!==H&&O.setAttribute(J,H===!0?"":String(H)),Z&&y(L,U,()=>O.removeAttribute(J)))}}const T=[],k={bodyClose:void 0,bodyOpen:void 0,head:void 0},M=await d;for(const L of M){const{tag:O,shouldRender:$,id:Z}=L;
23if($){if(O.tag==="title"){r.title=O.textContent,y("title","",()=>r.title=o.title);continue}L.$el=L.$el||o.elMap.get(Z),L.$el?w(L):oE.has(O.tag)&&T.push(L)}}for(const L of T){const O=L.tag.tagPosition||"head";L.$el=r.createElement(L.tag.tag),w(L),k[O]=k[O]||r.createDocumentFragment(),k[O].appendChild(L.$el)}for(const L of M)await e.hooks.callHook("dom:renderTag",L,r,y);k.head&&r.head.appendChild(k.head),k.bodyOpen&&r.body.insertBefore(k.bodyOpen,r.body.firstChild),k.bodyClose&&r.body.appendChild(k.bodyClose);for(const L in o.pendingSideEffects)o.pendingSideEffects[L]();e._dom=o,await e.hooks.callHook("dom:rendered",{renders:M}),a()}).finally(()=>{e._domUpdatePromise=void 0,e.dirty=!1})),e._domUpdatePromise}function I6(e={}){var i,a,h;const t=((i=e.domOptions)==null?void 0:i.render)||oS;e.document=e.document||(typeof window<"u"?document:void 0);const r=((h=(a=e.document)==null?void 0:a.head.querySelector('script[id="unhead:payload"]'))==null?void 0:h.innerHTML)||!1;return o6({...e,plugins:[...e.plugins||[],{key:"client",hooks:{"entries:updated":t}}],init:[r?JSON.parse(r):!1,...e.init||[]]})}function P6(e,t){let r=0;return()=>{const i=++r;t(()=>{r===i&&e()})}}function A6(e={}){const t=I6({domOptions:{render:P6(()=>oS(t),r=>setTimeout(r,0))},...e});return t.install=g6(t),t}const M6={disableDefaults:!0,disableCapoSorting:!1,plugins:[u6,h6,p6,c6]},R6=Zr({name:"nuxt:head",enforce:"pre",setup(e){const t=A6(M6);e.vueApp.use(t);{let r=!0;const i=async()=>{r=!1,await oS(t)};t.hooks.hook("dom:beforeRender",a=>{a.shouldRender=!r}),e.hooks.hook("page:start",()=>{r=!0}),e.hooks.hook("page:finish",()=>{e.isHydrating||i()}),e.hooks.hook("app:error",i),e.hooks.hook("app:suspense:resolve",i)}}});/*!
24  * vue-router v4.5.1
25  * (c) 2025 Eduardo San Martin Morote
26  * @license MIT
27  */const od=typeof document<"u";function qM(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function L6(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&qM(e.default)}const sn=Object.assign;function Qb(e,t){const r={};for(const i in t){const a=t[i];r[i]=Uo(a)?a.map(e):e(a)}return r}const Xp=()=>{},Uo=Array.isArray,GM=/#/g,z6=/&/g,D6=/\//g,O6=/=/g,F6=/\?/g,HM=/\+/g,B6=/%5B/g,N6=/%5D/g,ZM=/%5E/g,j6=/%60/g,WM=/%7B/g,$6=/%7C/g,KM=/%7D/g,U6=/%20/g;function aS(e){return encodeURI(""+e).replace($6,"|").replace(B6,"[").replace(N6,"]")}function V6(e){return aS(e).replace(WM,"{").replace(KM,"}").replace(ZM,"^")}function T1(e){return aS(e).replace(HM,"%2B").replace(U6,"+").replace(GM,"%23").replace(z6,"%26").replace(j6,"`").replace(WM,"{").replace(KM,"}").replace(ZM,"^")}function q6(e){return T1(e).replace(O6,"%3D")}function G6(e){return aS(e).replace(GM,"%23").replace(F6,"%3F")}function H6(e){return e==null?"":G6(e).replace(D6,"%2F")}function ym(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const Z6=/\/$/,W6=e=>e.replace(Z6,"");function ex(e,t,r="/"){let i,a={},h="",d="";const o=t.indexOf("#");let y=t.indexOf("?");return o<y&&o>=0&&(y=-1),y>-1&&(i=t.slice(0,y),h=t.slice(y+1,o>-1?o:t.length),a=e(h)),o>-1&&(i=i||t.slice(0,o),d=t.slice(o,t.length)),i=J6(i??t,r),{fullPath:i+(h&&"?")+h+d,path:i,query:a,hash:ym(d)}}function K6(e,t){const r=t.query?e(t.query):"";return t.path+(r&&"?")+r+(t.hash||"")}function mE(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function X6(e,t,r){const i=t.matched.length-1,a=r.matched.length-1;return i>-1&&i===a&&Ld(t.matched[i],r.matched[a])&&XM(t.params,r.params)&&e(t.query)===e(r.query)&&t.hash===r.hash}function Ld(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function XM(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(!Y6(e[r],t[r]))return!1;return!0}function Y6(e,t){return Uo(e)?gE(e,t):Uo(t)?gE(t,e):e===t}function gE(e,t){return Uo(t)?e.length===t.length&&e.every((r,i)=>r===t[i]):e.length===1&&e[0]===t}function J6(e,t){if(e.startsWith("/"))return e;if(!e)return t;const r=t.split("/"),i=e.split("/"),a=i[i.length-1];(a===".."||a===".")&&i.push("");let h=r.length-1,d,o;for(d=0;d<i.length;d++)if(o=i[d],o!==".")if(o==="..")h>1&&h--;else break;return r.slice(0,h).join("/")+"/"+i.slice(d).join("/")}const Eo={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var _m;(function(e){e.pop="pop",e.push="push"})(_m||(_m={}));var Yp;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Yp||(Yp={}));function Q6(e){if(!e)if(od){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),W6(e)}const ej=/^[^#]+#/;function tj(e,t){return e.replace(ej,"#")+t}function rj(e,t){const r=document.documentElement.getBoundingClientRect(),i=e.getBoundingClientRect();return{behavior:t.behavior,left:i.left-r.left-(t.left||0),top:i.top-r.top-(t.top||0)}}const Nv=()=>({left:window.scrollX,top:window.scrollY});function nj(e){let t;if("el"in e){const r=e.el,i=typeof r=="string"&&r.startsWith("#"),a=typeof r=="string"?i?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!a)return;t=rj(a,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}
vendor: 10,704 bytes, line 27
27function yE(e,t){return(history.state?history.state.position-t:-1)+e}const C1=new Map;function ij(e,t){C1.set(e,t)}function sj(e){const t=C1.get(e);return C1.delete(e),t}let oj=()=>location.protocol+"//"+location.host;function YM(e,t){const{pathname:r,search:i,hash:a}=t,h=e.indexOf("#");if(h>-1){let o=a.includes(e.slice(h))?e.slice(h).length:1,y=a.slice(o);return y[0]!=="/"&&(y="/"+y),mE(y,"")}return mE(r,e)+i+a}function aj(e,t,r,i){let a=[],h=[],d=null;const o=({state:M})=>{const P=YM(e,location),L=r.value,O=t.value;let $=0;if(M){if(r.value=P,t.value=M,d&&d===L){d=null;return}$=O?M.position-O.position:0}else i(P);a.forEach(Z=>{Z(r.value,L,{delta:$,type:_m.pop,direction:$?$>0?Yp.forward:Yp.back:Yp.unknown})})};function y(){d=r.value}function w(M){a.push(M);const P=()=>{const L=a.indexOf(M);L>-1&&a.splice(L,1)};return h.push(P),P}function T(){const{history:M}=window;M.state&&M.replaceState(sn({},M.state,{scroll:Nv()}),"")}function k(){for(const M of h)M();h=[],window.removeEventListener("popstate",o),window.removeEventListener("beforeunload",T)}return window.addEventListener("popstate",o),window.addEventListener("beforeunload",T,{passive:!0}),{pauseListeners:y,listen:w,destroy:k}}function _E(e,t,r,i=!1,a=!1){return{back:e,current:t,forward:r,replaced:i,position:window.history.length,scroll:a?Nv():null}}function lj(e){const{history:t,location:r}=window,i={value:YM(e,r)},a={value:t.state};a.value||h(i.value,{back:null,current:i.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function h(y,w,T){const k=e.indexOf("#"),M=k>-1?(r.host&&document.querySelector("base")?e:e.slice(k))+y:oj()+e+y;try{t[T?"replaceState":"pushState"](w,"",M),a.value=w}catch(P){console.error(P),r[T?"replace":"assign"](M)}}function d(y,w){const T=sn({},t.state,_E(a.value.back,y,a.value.forward,!0),w,{position:a.value.position});h(y,T,!0),i.value=y}function o(y,w){const T=sn({},a.value,t.state,{forward:y,scroll:Nv()});h(T.current,T,!0);const k=sn({},_E(i.value,y,null),{position:T.position+1},w);h(y,k,!1),i.value=y}return{location:i,state:a,push:o,replace:d}}function JM(e){e=Q6(e);const t=lj(e),r=aj(e,t.state,t.location,t.replace);function i(h,d=!0){d||r.pauseListeners(),history.go(h)}const a=sn({location:"",base:e,go:i,createHref:tj.bind(null,e)},t,r);return Object.defineProperty(a,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(a,"state",{enumerable:!0,get:()=>t.state.value}),a}function cj(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),JM(e)}function uj(e){return typeof e=="string"||e&&typeof e=="object"}function QM(e){return typeof e=="string"||typeof e=="symbol"}const eR=Symbol("");var vE;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(vE||(vE={}));function zd(e,t){return sn(new Error,{type:e,[eR]:!0},t)}function qa(e,t){return e instanceof Error&&eR in e&&(t==null||!!(e.type&t))}const bE="[^/]+?",hj={sensitive:!1,strict:!1,start:!0,end:!0},dj=/[.+*?^${}()[\]/\\]/g;function fj(e,t){const r=sn({},hj,t),i=[];let a=r.start?"^":"";const h=[];for(const w of e){const T=w.length?[]:[90];r.strict&&!w.length&&(a+="/");for(let k=0;k<w.length;k++){const M=w[k];let P=40+(r.sensitive?.25:0);if(M.type===0)k||(a+="/"),a+=M.value.replace(dj,"\\$&"),P+=40;else if(M.type===1){const{value:L,repeatable:O,optional:$,regexp:Z}=M;h.push({name:L,repeatable:O,optional:$});const J=Z||bE;if(J!==bE){P+=10;try{new RegExp(`(${J})`)}catch(U){throw new Error(`Invalid custom RegExp for param "${L}" (${J}): `+U.message)}}let H=O?`((?:${J})(?:/(?:${J}))*)`:`(${J})`;k||(H=$&&w.length<2?`(?:/${H})`:"/"+H),$&&(H+="?"),a+=H,P+=20,$&&(P+=-8),O&&(P+=-20),J===".*"&&(P+=-50)}T.push(P)}i.push(T)}if(r.strict&&r.end){const w=i.length-1;i[w][i[w].length-1]+=.7000000000000001}r.strict||(a+="/?"),r.end?a+="$":r.strict&&!a.endsWith("/")&&(a+="(?:/|$)");const d=new RegExp(a,r.sensitive?"":"i");function o(w){const T=w.match(d),k={};if(!T)return null;for(let M=1;M<T.length;M++){const P=T[M]||"",L=h[M-1];k[L.name]=P&&L.repeatable?P.split("/"):P}return k}function y(w){let T="",k=!1;for(const M of e){(!k||!T.endsWith("/"))&&(T+="/"),k=!1;for(const P of M)if(P.type===0)T+=P.value;else if(P.type===1){const{value:L,repeatable:O,optional:$}=P,Z=L in w?w[L]:"";if(Uo(Z)&&!O)throw new Error(`Provided param "${L}" is an array but it is not repeatable (* or + modifiers)`);const J=Uo(Z)?Z.join("/"):Z;if(!J)if($)M.length<2&&(T.endsWith("/")?T=T.slice(0,-1):k=!0);else throw new Error(`Missing required param "${L}"`);T+=J}}return T||"/"}return{re:d,score:i,keys:h,parse:o,stringify:y}}function pj(e,t){let r=0;for(;r<e.length&&r<t.length;){const i=t[r]-e[r];if(i)return i;r++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function tR(e,t){let r=0;const i=e.score,a=t.score;for(;r<i.length&&r<a.length;){const h=pj(i[r],a[r]);if(h)return h;r++}if(Math.abs(a.length-i.length)===1){if(xE(i))return 1;if(xE(a))return-1}return a.length-i.length}function xE(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const mj={type:0,value:""},gj=/[a-zA-Z0-9_]/;function yj(e){if(!e)return[[]];if(e==="/")return[[mj]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(P){throw new Error(`ERR (${r})/"${w}": ${P}`)}let r=0,i=r;const a=[];let h;function d(){h&&a.push(h),h=[]}let o=0,y,w="",T="";function k(){w&&(r===0?h.push({type:0,value:w}):r===1||r===2||r===3?(h.length>1&&(y==="*"||y==="+")&&t(`A repeatable param (${w}) must be alone in its segment. eg: '/:ids+.`),h.push({type:1,value:w,regexp:T,repeatable:y==="*"||y==="+",optional:y==="*"||y==="?"})):t("Invalid state to consume buffer"),w="")}function M(){w+=y}for(;o<e.length;){if(y=e[o++],y==="\\"&&r!==2){i=r,r=4;continue}switch(r){case 0:y==="/"?(w&&k(),d()):y===":"?(k(),r=1):M();break;case 4:M(),r=i;break;case 1:y==="("?r=2:gj.test(y)?M():(k(),r=0,y!=="*"&&y!=="?"&&y!=="+"&&o--);break;case 2:y===")"?T[T.length-1]=="\\"?T=T.slice(0,-1)+y:r=3:T+=y;break;case 3:k(),r=0,y!=="*"&&y!=="?"&&y!=="+"&&o--,T="";break;default:t("Unknown state");break}}return r===2&&t(`Unfinished custom RegExp for param "${w}"`),k(),d(),a}function _j(e,t,r){const i=fj(yj(e.path),r),a=sn(i,{record:e,parent:t,children:[],alias:[]});return t&&!a.record.aliasOf==!t.record.aliasOf&&t.children.push(a),a}function vj(e,t){const r=[],i=new Map;t=CE({strict:!1,end:!0,sensitive:!1},t);function a(k){return i.get(k)}function h(k,M,P){const L=!P,O=SE(k);O.aliasOf=P&&P.record;const $=CE(t,k),Z=[O];if("alias"in k){const U=typeof k.alias=="string"?[k.alias]:k.alias;for(const V of U)Z.push(SE(sn({},O,{components:P?P.record.components:O.components,path:V,aliasOf:P?P.record:O})))}let J,H;for(const U of Z){const{path:V}=U;if(M&&V[0]!=="/"){const te=M.record.path,ce=te[te.length-1]==="/"?"":"/";U.path=M.record.path+(V&&ce+V)}if(J=_j(U,M,$),P?P.alias.push(J):(H=H||J,H!==J&&H.alias.push(J),L&&k.name&&!TE(J)&&d(k.name)),rR(J)&&y(J),O.children){const te=O.children;for(let ce=0;ce<te.length;ce++)h(te[ce],J,P&&P.children[ce])}P=P||J}return H?()=>{d(H)}:Xp}function d(k){if(QM(k)){const M=i.get(k);M&&(i.delete(k),r.splice(r.indexOf(M),1),M.children.forEach(d),M.alias.forEach(d))}else{const M=r.indexOf(k);M>-1&&(r.splice(M,1),k.record.name&&i.delete(k.record.name),k.children.forEach(d),k.alias.forEach(d))}}function o(){return r}function y(k){const M=wj(k,r);r.splice(M,0,k),k.record.name&&!TE(k)&&i.set(k.record.name,k)}function w(k,M){let P,L={},O,$;if("name"in k&&k.name){if(P=i.get(k.name),!P)throw zd(1,{location:k});$=P.record.name,L=sn(wE(M.params,P.keys.filter(H=>!H.optional).concat(P.parent?P.parent.keys.filter(H=>H.optional):[]).map(H=>H.name)),k.params&&wE(k.params,P.keys.map(H=>H.name))),O=P.stringify(L)}else if(k.path!=null)O=k.path,P=r.find(H=>H.re.test(O)),P&&(L=P.parse(O),$=P.record.name);else{if(P=M.name?i.get(M.name):r.find(H=>H.re.test(M.path)),!P)throw zd(1,{location:k,currentLocation:M});$=P.record.name,L=sn({},M.params,k.params),O=P.stringify(L)}const Z=[];let J=P;for(;J;)Z.unshift(J.record),J=J.parent;return{name:$,path:O,params:L,matched:Z,meta:xj(Z)}}e.forEach(k=>h(k));function T(){r.length=0,i.clear()}return{addRoute:h,resolve:w,removeRoute:d,clearRoutes:T,getRoutes:o,getRecordMatcher:a}}function wE(e,t){const r={};for(const i of t)i in e&&(r[i]=e[i]);return r}function SE(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:bj(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function bj(e){const t={},r=e.props||!1;if("component"in e)t.default=r;else for(const i in e.components)t[i]=typeof r=="object"?r[i]:r;return t}function TE(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function xj(e){return e.reduce((t,r)=>sn(t,r.meta),{})}function CE(e,t){const r={};for(const i in e)r[i]=i in t?t[i]:e[i];return r}function wj(e,t){let r=0,i=t.length;for(;r!==i;){const h=r+i>>1;tR(e,t[h])<0?i=h:r=h+1}const a=Sj(e);return a&&(i=t.lastIndexOf(a,i-1)),i}function Sj(e){let t=e;for(;t=t.parent;)if(rR(t)&&tR(e,t)===0)return t}function rR({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Tj(e){const t={};if(e===""||e==="?")return t;const i=(e[0]==="?"?e.slice(1):e).split("&");for(let a=0;a<i.length;++a){const h=i[a].replace(HM," "),d=h.indexOf("="),o=ym(d<0?h:h.slice(0,d)),y=d<0?null:ym(h.slice(d+1));if(o in t){let w=t[o];Uo(w)||(w=t[o]=[w]),w.push(y)}else t[o]=y}return t}function EE(e){let t="";for(let r in e){const i=e[r];if(r=q6(r),i==null){i!==void 0&&(t+=(t.length?"&":"")+r);continue}(Uo(i)?i.map(h=>h&&T1(h)):[i&&T1(i)]).forEach(h=>{h!==void 0&&(t+=(t.length?"&":"")+r,h!=null&&(t+="="+h))})}return t}function Cj(e){const t={};for(const r in e){const i=e[r];i!==void 0&&(t[r]=Uo(i)?i.map(a=>a==null?null:""+a):i==null?i:""+i)}return t}const Ej=Symbol(""),kE=Symbol(""),lS=Symbol(""),cS=Symbol(""),E1=Symbol("");function Pp(){let e=[];function t(i){return e.push(i),()=>{const a=e.indexOf(i);a>-1&&e.splice(a,1)}}function r(){e=[]}return{add:t,list:()=>e.slice(),reset:r}}function sc(e,t,r,i,a,h=d=>d()){const d=i&&(i.enterCallbacks[a]=i.enterCallbacks[a]||[]);return()=>new Promise((o,y)=>{const w=M=>{M===!1?y(zd(4,{from:r,to:t})):M instanceof Error?y(M):uj(M)?y(zd(2,{from:t,to:M})):(d&&i.enterCallbacks[a]===d&&typeof M=="function"&&d.push(M),o())},T=h(()=>e.call(i&&i.instances[a],t,r,w));let k=Promise.resolve(T);e.length<3&&(k=k.then(w)),k.catch(M=>y(M))})}function tx(e,t,r,i,a=h=>h()){const h=[];
vendor: 7,024 bytes, line 27
27for(const d of e)for(const o in d.components){let y=d.components[o];if(!(t!=="beforeRouteEnter"&&!d.instances[o]))if(qM(y)){const T=(y.__vccOpts||y)[t];T&&h.push(sc(T,r,i,d,o,a))}else{let w=y();h.push(()=>w.then(T=>{if(!T)throw new Error(`Couldn't resolve component "${o}" at "${d.path}"`);const k=L6(T)?T.default:T;d.mods[o]=T,d.components[o]=k;const P=(k.__vccOpts||k)[t];return P&&sc(P,r,i,d,o,a)()}))}}return h}function IE(e){const t=an(lS),r=an(cS),i=it(()=>{const y=ot(e.to);return t.resolve(y)}),a=it(()=>{const{matched:y}=i.value,{length:w}=y,T=y[w-1],k=r.matched;if(!T||!k.length)return-1;const M=k.findIndex(Ld.bind(null,T));if(M>-1)return M;const P=PE(y[w-2]);return w>1&&PE(T)===P&&k[k.length-1].path!==P?k.findIndex(Ld.bind(null,y[w-2])):M}),h=it(()=>a.value>-1&&Mj(r.params,i.value.params)),d=it(()=>a.value>-1&&a.value===r.matched.length-1&&XM(r.params,i.value.params));function o(y={}){if(Aj(y)){const w=t[ot(e.replace)?"replace":"push"](ot(e.to)).catch(Xp);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>w),w}return Promise.resolve()}return{route:i,href:it(()=>i.value.href),isActive:h,isExactActive:d,navigate:o}}function kj(e){return e.length===1?e[0]:e}const Ij=Rr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:IE,setup(e,{slots:t}){const r=Mi(IE(e)),{options:i}=an(lS),a=it(()=>({[AE(e.activeClass,i.linkActiveClass,"router-link-active")]:r.isActive,[AE(e.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const h=t.default&&kj(t.default(r));return e.custom?h:cn("a",{"aria-current":r.isExactActive?e.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:a.value},h)}}}),Pj=Ij;function Aj(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Mj(e,t){for(const r in t){const i=t[r],a=e[r];if(typeof i=="string"){if(i!==a)return!1}else if(!Uo(a)||a.length!==i.length||i.some((h,d)=>h!==a[d]))return!1}return!0}function PE(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const AE=(e,t,r)=>e??t??r,Rj=Rr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:r}){const i=an(E1),a=it(()=>e.route||i.value),h=an(kE,0),d=it(()=>{let w=ot(h);const{matched:T}=a.value;let k;for(;(k=T[w])&&!k.components;)w++;return w}),o=it(()=>a.value.matched[d.value]);Ns(kE,it(()=>d.value+1)),Ns(Ej,o),Ns(E1,a);const y=It();return Mr(()=>[y.value,o.value,e.name],([w,T,k],[M,P,L])=>{T&&(T.instances[k]=w,P&&P!==T&&w&&w===M&&(T.leaveGuards.size||(T.leaveGuards=P.leaveGuards),T.updateGuards.size||(T.updateGuards=P.updateGuards))),w&&T&&(!P||!Ld(T,P)||!M)&&(T.enterCallbacks[k]||[]).forEach(O=>O(w))},{flush:"post"}),()=>{const w=a.value,T=e.name,k=o.value,M=k&&k.components[T];if(!M)return ME(r.default,{Component:M,route:w});const P=k.props[T],L=P?P===!0?w.params:typeof P=="function"?P(w):P:null,$=cn(M,sn({},L,t,{onVnodeUnmounted:Z=>{Z.component.isUnmounted&&(k.instances[T]=null)},ref:y}));return ME(r.default,{Component:$,route:w})||$}}});function ME(e,t){if(!e)return null;const r=e(t);return r.length===1?r[0]:r}const nR=Rj;function Lj(e){const t=vj(e.routes,e),r=e.parseQuery||Tj,i=e.stringifyQuery||EE,a=e.history,h=Pp(),d=Pp(),o=Pp(),y=wa(Eo);let w=Eo;od&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const T=Qb.bind(null,Je=>""+Je),k=Qb.bind(null,H6),M=Qb.bind(null,ym);function P(Je,At){let _t,pt;return QM(Je)?(_t=t.getRecordMatcher(Je),pt=At):pt=Je,t.addRoute(pt,_t)}function L(Je){const At=t.getRecordMatcher(Je);At&&t.removeRoute(At)}function O(){return t.getRoutes().map(Je=>Je.record)}function $(Je){return!!t.getRecordMatcher(Je)}function Z(Je,At){if(At=sn({},At||y.value),typeof Je=="string"){const me=ex(r,Je,At.path),je=t.resolve({path:me.path},At),ft=a.createHref(me.fullPath);return sn(me,je,{params:M(je.params),hash:ym(me.hash),redirectedFrom:void 0,href:ft})}let _t;if(Je.path!=null)_t=sn({},Je,{path:ex(r,Je.path,At.path).path});else{const me=sn({},Je.params);for(const je in me)me[je]==null&&delete me[je];_t=sn({},Je,{params:k(me)}),At.params=k(At.params)}const pt=t.resolve(_t,At),Nt=Je.hash||"";pt.params=T(M(pt.params));const rr=K6(i,sn({},Je,{hash:V6(Nt),path:pt.path})),ue=a.createHref(rr);return sn({fullPath:rr,hash:Nt,query:i===EE?Cj(Je.query):Je.query||{}},pt,{redirectedFrom:void 0,href:ue})}function J(Je){return typeof Je=="string"?ex(r,Je,y.value.path):sn({},Je)}function H(Je,At){if(w!==Je)return zd(8,{from:At,to:Je})}function U(Je){return ce(Je)}function V(Je){return U(sn(J(Je),{replace:!0}))}function te(Je){const At=Je.matched[Je.matched.length-1];if(At&&At.redirect){const{redirect:_t}=At;let pt=typeof _t=="function"?_t(Je):_t;return typeof pt=="string"&&(pt=pt.includes("?")||pt.includes("#")?pt=J(pt):{path:pt},pt.params={}),sn({query:Je.query,hash:Je.hash,params:pt.path!=null?{}:Je.params},pt)}}function ce(Je,At){const _t=w=Z(Je),pt=y.value,Nt=Je.state,rr=Je.force,ue=Je.replace===!0,me=te(_t);if(me)return ce(sn(J(me),{state:typeof me=="object"?sn({},Nt,me.state):Nt,force:rr,replace:ue}),At||_t);const je=_t;je.redirectedFrom=At;let ft;return!rr&&X6(i,pt,_t)&&(ft=zd(16,{to:je,from:pt}),Yt(pt,pt,!0,!1)),(ft?Promise.resolve(ft):xe(je,pt)).catch(Xe=>qa(Xe)?qa(Xe,2)?Xe:Pt(Xe):Oe(Xe,je,pt)).then(Xe=>{if(Xe){if(qa(Xe,2))return ce(sn({replace:ue},J(Xe.to),{state:typeof Xe.to=="object"?sn({},Nt,Xe.to.state):Nt,force:rr}),At||je)}else Xe=ze(je,pt,!0,ue,Nt);return et(je,pt,Xe),Xe})}function fe(Je,At){const _t=H(Je,At);return _t?Promise.reject(_t):Promise.resolve()}function Se(Je){const At=lr.values().next().value;return At&&typeof At.runWithContext=="function"?At.runWithContext(Je):Je()}function xe(Je,At){let _t;const[pt,Nt,rr]=zj(Je,At);_t=tx(pt.reverse(),"beforeRouteLeave",Je,At);for(const me of pt)me.leaveGuards.forEach(je=>{_t.push(sc(je,Je,At))});const ue=fe.bind(null,Je,At);return _t.push(ue),zr(_t).then(()=>{_t=[];for(const me of h.list())_t.push(sc(me,Je,At));return _t.push(ue),zr(_t)}).then(()=>{_t=tx(Nt,"beforeRouteUpdate",Je,At);for(const me of Nt)me.updateGuards.forEach(je=>{_t.push(sc(je,Je,At))});return _t.push(ue),zr(_t)}).then(()=>{_t=[];for(const me of rr)if(me.beforeEnter)if(Uo(me.beforeEnter))for(const je of me.beforeEnter)_t.push(sc(je,Je,At));else _t.push(sc(me.beforeEnter,Je,At));return _t.push(ue),zr(_t)}).then(()=>(Je.matched.forEach(me=>me.enterCallbacks={}),_t=tx(rr,"beforeRouteEnter",Je,At,Se),_t.push(ue),zr(_t))).then(()=>{_t=[];for(const me of d.list())_t.push(sc(me,Je,At));return _t.push(ue),zr(_t)}).catch(me=>qa(me,8)?me:Promise.reject(me))}
27function et(Je,At,_t){o.list().forEach(pt=>Se(()=>pt(Je,At,_t)))}function ze(Je,At,_t,pt,Nt){const rr=H(Je,At);if(rr)return rr;const ue=At===Eo,me=od?history.state:{};_t&&(pt||ue?a.replace(Je.fullPath,sn({scroll:ue&&me&&me.scroll},Nt)):a.push(Je.fullPath,Nt)),y.value=Je,Yt(Je,At,_t,ue),Pt()}let Ze;function tt(){Ze||(Ze=a.listen((Je,At,_t)=>{if(!Or.listening)return;const pt=Z(Je),Nt=te(pt);if(Nt){ce(sn(Nt,{replace:!0,force:!0}),pt).catch(Xp);return}w=pt;const rr=y.value;od&&ij(yE(rr.fullPath,_t.delta),Nv()),xe(pt,rr).catch(ue=>qa(ue,12)?ue:qa(ue,2)?(ce(sn(J(ue.to),{force:!0}),pt).then(me=>{qa(me,20)&&!_t.delta&&_t.type===_m.pop&&a.go(-1,!1)}).catch(Xp),Promise.reject()):(_t.delta&&a.go(-_t.delta,!1),Oe(ue,pt,rr))).then(ue=>{ue=ue||ze(pt,rr,!1),ue&&(_t.delta&&!qa(ue,8)?a.go(-_t.delta,!1):_t.type===_m.pop&&qa(ue,20)&&a.go(-1,!1)),et(pt,rr,ue)}).catch(Xp)}))}let at=Pp(),Pe=Pp(),He;function Oe(Je,At,_t){Pt(Je);const pt=Pe.list();return pt.length?pt.forEach(Nt=>Nt(Je,At,_t)):console.error(Je),Promise.reject(Je)}function lt(){return He&&y.value!==Eo?Promise.resolve():new Promise((Je,At)=>{at.add([Je,At])})}function Pt(Je){return He||(He=!Je,tt(),at.list().forEach(([At,_t])=>Je?_t(Je):At()),at.reset()),Je}function Yt(Je,At,_t,pt){const{scrollBehavior:Nt}=e;if(!od||!Nt)return Promise.resolve();const rr=!_t&&sj(yE(Je.fullPath,0))||(pt||!_t)&&history.state&&history.state.scroll||null;return Ri().then(()=>Nt(Je,At,rr)).then(ue=>ue&&nj(ue)).catch(ue=>Oe(ue,Je,At))}const xt=Je=>a.go(Je);let tr;const lr=new Set,Or={currentRoute:y,listening:!0,addRoute:P,removeRoute:L,clearRoutes:t.clearRoutes,hasRoute:$,getRoutes:O,resolve:Z,options:e,push:U,replace:V,go:xt,back:()=>xt(-1),forward:()=>xt(1),beforeEach:h.add,beforeResolve:d.add,afterEach:o.add,onError:Pe.add,isReady:lt,install(Je){const At=this;Je.component("RouterLink",Pj),Je.component("RouterView",nR),Je.config.globalProperties.$router=At,Object.defineProperty(Je.config.globalProperties,"$route",{enumerable:!0,get:()=>ot(y)}),od&&!tr&&y.value===Eo&&(tr=!0,U(a.location).catch(Nt=>{}));const _t={};for(const Nt in Eo)Object.defineProperty(_t,Nt,{get:()=>y.value[Nt],enumerable:!0});Je.provide(lS,At),Je.provide(cS,da(_t)),Je.provide(E1,y);const pt=Je.unmount;lr.add(Je),Je.unmount=function(){lr.delete(Je),lr.size<1&&(w=Eo,Ze&&Ze(),Ze=null,y.value=Eo,tr=!1,He=!1),pt()}}};function zr(Je){return Je.reduce((At,_t)=>At.then(()=>Se(_t)),Promise.resolve())}return Or}function zj(e,t){const r=[],i=[],a=[],h=Math.max(t.matched.length,e.matched.length);for(let d=0;d<h;d++){const o=t.matched[d];o&&(e.matched.find(w=>Ld(w,o))?i.push(o):r.push(o));const y=e.matched[d];y&&(t.matched.find(w=>Ld(w,y))||a.push(y))}return[r,i,a]}function Dj(e){return an(cS)}const Oj=/(:\w+)\([^)]+\)/g,Fj=/(:\w+)[?+*]/g,Bj=/:\w+/g,Nj=(e,t)=>t.path.replace(Oj,"$1").replace(Fj,"$1").replace(Bj,r=>{var i;return((i=e.params[r.slice(1)])==null?void 0:i.toString())||""}),k1=(e,t)=>{const r=e.route.matched.find(a=>{var h;return((h=a.components)==null?void 0:h.default)===e.Component.type}),i=t??(r==null?void 0:r.meta.key)??(r&&Nj(e.route,r));return typeof i=="function"?i(e.route):i},jj=(e,t)=>({default:()=>e?cn(TF,e===!0?{}:e,t):t});function uS(e){return Array.isArray(e)?e:[e]}const $j={layout:!1,name:"index"},Uj={layout:!1},Vj={layout:!1},qj={layout:!1,name:"app"},Gj={layout:!1},Hj={layout:!1},Zj={name:"city"},Wj={layout:!1},Kj={layout:!1,title:"Угощаем офисы"},Xj={name:"city-category"},Yj={name:"city-category-product"};const rx=[{name:"index",path:"/",meta:$j||{},component:()=>Dn(()=>import("./D3Ziv3Ng.js"),__vite__mapDeps([0,1,2]),import.meta.url)},{name:"offer",path:"/offer",meta:Uj||{},component:()=>Dn(()=>import("./DE36_pCZ.js"),__vite__mapDeps([3,4]),import.meta.url)},{name:"privacy",path:"/privacy",meta:Vj||{},component:()=>Dn(()=>import("./Cpw1pHZ0.js"),__vite__mapDeps([5,4]),import.meta.url)},{name:"app",path:"/app",meta:qj||{},component:()=>Dn(()=>import("./Dsadi8BM.js"),__vite__mapDeps([6,7]),import.meta.url)},{name:"marketing",path:"/marketing",meta:Gj||{},component:()=>Dn(()=>import("./BS-l6Ojj.js"),[],import.meta.url)},{name:"sentry-test",path:"/sentry-test",meta:Hj||{},component:()=>Dn(()=>import("./BrV4VmkU.js"),[],import.meta.url)},{name:"city",path:"/:city()",meta:Zj||{},component:()=>Dn(()=>import("./Dhd9dOlY.js"),__vite__mapDeps([8,9,10,11,12,1,2]),import.meta.url)},{name:"auth-sberid-callback",path:"/auth/sberid/callback",meta:Wj||{},component:()=>Dn(()=>import("./C4n8VPvI.js"),__vite__mapDeps([13,14]),import.meta.url)},{name:"ugoschaem-ofisy",path:"/ugoschaem-ofisy",meta:Kj||{},component:()=>Dn(()=>import("./U7962lAc.js"),__vite__mapDeps([15,10,11,12,16,17]),import.meta.url)},{name:"city-category",path:"/:city()/:category()",meta:Xj||{},component:()=>Dn(()=>import("./DxK6vHE0.js"),__vite__mapDeps([18,19,9,10,11,12,1,2]),import.meta.url)},{name:"city-category-product",path:"/:city()/:category()/:product()",meta:Yj||{},component:()=>Dn(()=>import("./CizyrcmU.js"),__vite__mapDeps([20,19,9,10,11,12,1,2]),import.meta.url)}],iR=(e,t)=>({default:()=>{var r;return e?cn(S4,e===!0?{}:e,t):(r=t.default)==null?void 0:r.call(t)}}),Jj=/(:\w+)\([^)]+\)/g,Qj=/(:\w+)[?+*]/g,e$=/:\w+/g;function RE(e){const t=(e==null?void 0:e.meta.key)??e.path.replace(Jj,"$1").replace(Qj,"$1").replace(e$,r=>{var i;return((i=e.params[r.slice(1)])==null?void 0:i.toString())||""});return typeof t=="function"?t(e):t}function t$(e,t){return e===t||t===Eo?!1:RE(e)!==RE(t)?!0:!e.matched.every((i,a)=>{var h,d;return i.components&&i.components.default===((d=(h=t.matched[a])==null?void 0:h.components)==null?void 0:d.default)})}const sR={scrollBehavior(e,t,r){var w;const i=Lr(),a=((w=gn().options)==null?void 0:w.scrollBehaviorType)??"auto";let h=r||void 0;const d=typeof e.meta.scrollToTop=="function"?e.meta.scrollToTop(e,t):e.meta.scrollToTop;if(!h&&t&&e&&d!==!1&&t$(e,t)&&(h={left:0,top:0}),e.path===t.path)return t.hash&&!e.hash?{left:0,top:0}:e.hash?{el:e.hash,top:oR(e.hash),behavior:a}:!1;const o=T=>!!(T.meta.pageTransition??f1),y=o(t)&&o(e)?"page:transition:finish":"page:loading:end";return new Promise(T=>{i.hooks.hookOnce(y,()=>{requestAnimationFrame(()=>T(r$(e,"instant",h)))})})}};function oR(e){try{const t=document.querySelector(e);
27if(t)return(Number.parseFloat(getComputedStyle(t).scrollMarginTop)||0)+(Number.parseFloat(getComputedStyle(document.documentElement).scrollPaddingTop)||0)}catch{}return 0}function r$(e,t,r){return r||(e.hash?{el:e.hash,top:oR(e.hash),behavior:t}:{left:0,top:0,behavior:t})}const n$={routes:e=>[...e,{name:"chrome-devtools",path:"/.well-known/:path*",redirect:()=>"/"}]},i$={hashMode:!1,scrollBehaviorType:"auto"},I1=sR.hashMode??!1,Js={...i$,...sR,...n$},s$=async e=>{var y;let t,r;if(!((y=e.meta)!=null&&y.validate))return;const i=Lr(),a=gn(),h=([t,r]=el(()=>Promise.resolve(e.meta.validate(e))),t=await t,r(),t);if(h===!0)return;const d=Hd({statusCode:h&&h.statusCode||404,statusMessage:h&&h.statusMessage||`Page Not Found: ${e.fullPath}`,data:{path:e.fullPath}}),o=a.beforeResolve(w=>{if(o(),w===e){const T=a.afterEach(async()=>{T(),await i.runWithContext(()=>nc(d)),window==null||window.history.pushState({},"",e.fullPath)});return!1}})},o$=e=>{if(e.path.startsWith("/.well-known/")||e.path==="/favicon.ico"||e.path==="/robots.txt"||e.path==="/sitemap.xml")return Fv("/")},a$=e=>{if(!(e.matched.length>0))throw Hd({statusCode:404,message:`Такой страницы не существует: ${e.fullPath}`,fatal:!1})},aR={cart:["address","confirmAddr","pay","time","payment","cartDeliveryInfo","promoInfo","deliveryInfo","wish","promo"],menu:["view","editName","editBirth","editAddr"],map:["pickupSearch","deliverySearch","restaurantInfo"],informer:["replacement","optionPreview"],informerPreview:["deskRowPreview","deskReplacement","deskPreview"]},Wm=["payment"];function $u(e){const t=aR[e];if(!t)return[];const r=[];for(const i of t)r.push(i),r.push(...$u(i));return r}let P1=0;function hS(){P1++}const W_=new Map;function Cre(e,t){t?W_.set(e,t):W_.delete(e)}function l$(e,t,r){for(const i of Wm)if(e[i]!=null&&t[i]==null)return r.bypassAvailable?{action:"consume-bypass",param:i}:r.hasHandler?{action:"block",param:i}:{action:"allow"};return{action:"allow"}}function c$(){gn().beforeEach((t,r)=>{var o;const i=Wm.find(y=>r.query[y]!=null&&t.query[y]==null),a=l$(r.query,t.query,{bypassAvailable:P1>0,hasHandler:i!=null&&W_.has(i)});if(a.action==="consume-bypass")P1--;else if(a.action==="block")return(o=W_.get(a.param))==null||o(),!1;let h=!1;const d={...t.query};for(const y of Object.keys(aR))if(r.query[y]!=null&&t.query[y]==null)for(const w of $u(y))d[w]!=null&&(delete d[w],h=!0);if(h)return{path:t.path,query:d,replace:!0}})}const u$=365,h$={breakpoints:{desktop:1024,desktopMedium:1280,desktopWide:1600,mobile:320,mobileMedium:375,mobileWide:425,tablet:768},cookie:{expires:u$,name:"viewport",path:"/",sameSite:"Strict",secure:!0},defaultBreakpoints:{desktop:"desktop",mobile:"mobile",tablet:"tablet"},fallbackBreakpoint:"desktop",feature:"minWidth"};function d$(e={},t=h$){return{...t,...e,cookie:{...t.cookie,...e.cookie}}}const f$={breakpoints:{xs:320,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},cookie:{expires:365,name:"viewport",path:"/",sameSite:"Strict",secure:!0},defaultBreakpoints:{desktop:"xl",mobile:"xs",tablet:"md"},fallbackBreakpoint:"lg",feature:"minWidth"};function dS(){return Lr().$viewport}function p$(){const e=$s();return it(()=>d$(e.meta.viewport,f$))}let A1=!1,LE=!1;const M1=[];function m$(e,t,r,i){const a=Wm.includes(r),h=$u(r);if(e&&typeof e=="string"){let o=null;try{o=new URL(e,i).searchParams}catch{o=null}return{type:"back",sanitizeParam:!!o&&(o.get(r)!=null||h.some(w=>o.get(w)!=null))?r:null,replaceQuery:null,bypassBlockBackCount:a?1:0,sanitizeBypassBlockBackCount:0}}const d={...t};delete d[r];for(const o of h)delete d[o];return{type:"replace",sanitizeParam:null,replaceQuery:d,bypassBlockBackCount:a?1:0,sanitizeBypassBlockBackCount:0}}function g$(e){LE||(LE=!0,e.afterEach(t=>{if(A1=!1,M1.length===0)return;const i=M1.shift().param;if(t.query[i]==null&&!$u(i).some(o=>t.query[o]!=null))return;const a={...t.query};delete a[i];for(const h of $u(i))delete a[h];for(const h of Wm)t.query[h]!=null&&a[h]==null&&hS();e.replace({path:t.path,query:a})}))}function zE(e,t,r){var h;if(A1)return;g$(e);const i=(h=window.history.state)==null?void 0:h.back,a=m$(i,t.query,r,window.location.origin);for(let d=0;d<a.bypassBlockBackCount;d++)hS();if(a.type==="back"){A1=!0,a.sanitizeParam&&M1.push({param:a.sanitizeParam}),e.back();return}e.replace({path:t.path,query:a.replaceQuery??{}})}function Dd(e,t){const r=gn(),i=$s(),a=(t==null?void 0:t.dynamic)===!0,h=(t==null?void 0:t.desktopStatic)===!0,d=h?dS():null;
27return it({get(){if(h&&!d.isLessThan("xl"))return a?"1":!0;const o=i.query[e];return a?typeof o=="string"?o:null:o!=null},set(o){if(h&&!d.isLessThan("xl"))return;const y=i.query[e];a?typeof o=="string"&&o?y!==o&&r.push({query:{...i.query,[e]:o}}):y!=null&&zE(r,i,e):o?y==null&&r.push({query:{...i.query,[e]:"1"}}):y!=null&&zE(r,i,e)}})}function lR(e,t,r,i="1"){const a={...e};delete a[t];for(const h of $u(t))delete a[h];return a[r]=i,a}function DE(e,t,r="1"){const i=gn(),a=$s();i.replace({path:a.path,query:lR(a.query,e,t,r)})}function Ere(e,t,r="1"){const i=gn(),a=$s();i.push({path:a.path,query:lR(a.query,e,t,r)})}function cR(e){var d;const t=gn(),r=$s(),i={...r.query};delete i[e];for(const o of $u(e))delete i[o];const a=Object.keys(r.query),h=Object.keys(i);if(!(a.length===h.length&&a.every(o=>r.query[o]===i[o]))){Wm.includes(e)&&hS();{const o=(d=window.history.state)==null?void 0:d.back;if(o&&o.startsWith("/")){const y=Object.entries(i).map(([T,k])=>`${encodeURIComponent(T)}=${encodeURIComponent(String(k))}`).join("&"),w=y?`${r.path}?${y}`:r.path;if(o===w){t.back();return}}}t.replace({path:r.path,query:i})}}const y$={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)},_$=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:i,responseValidator:a,sseDefaultRetryDelay:h,sseMaxRetryAttempts:d,sseMaxRetryDelay:o,sseSleepFn:y,url:w,...T})=>{let k;const M=y??(O=>new Promise($=>setTimeout($,O)));return{stream:async function*(){let O=h??3e3,$=0;const Z=T.signal??new AbortController().signal;for(;!Z.aborted;){$++;const J=T.headers instanceof Headers?T.headers:new Headers(T.headers);k!==void 0&&J.set("Last-Event-ID",k);try{const H={redirect:"follow",...T,body:T.serializedBody,headers:J,signal:Z};let U=new Request(w,H);e&&(U=await e(w,H));const te=await(T.fetch??globalThis.fetch)(U);if(!te.ok)throw new Error(`SSE failed: ${te.status} ${te.statusText}`);if(!te.body)throw new Error("No body in SSE response");const ce=te.body.pipeThrough(new TextDecoderStream).getReader();let fe="";const Se=()=>{try{ce.cancel()}catch{}};Z.addEventListener("abort",Se);try{for(;;){const{done:xe,value:et}=await ce.read();if(xe)break;fe+=et;const ze=fe.split(`
28
29`);fe=ze.pop()??"";for(const Ze of ze){const tt=Ze.split(`
30`),at=[];let Pe;for(const lt of tt)if(lt.startsWith("data:"))at.push(lt.replace(/^data:\s*/,""));else if(lt.startsWith("event:"))Pe=lt.replace(/^event:\s*/,"");else if(lt.startsWith("id:"))k=lt.replace(/^id:\s*/,"");else if(lt.startsWith("retry:")){const Pt=Number.parseInt(lt.replace(/^retry:\s*/,""),10);Number.isNaN(Pt)||(O=Pt)}let He,Oe=!1;if(at.length){const lt=at.join(`
31`);try{He=JSON.parse(lt),Oe=!0}catch{He=lt}}Oe&&(a&&await a(He),i&&(He=await i(He))),r==null||r({data:He,event:Pe,id:k,retry:O}),at.length&&(yield He)}}}finally{Z.removeEventListener("abort",Se),ce.releaseLock()}break}catch(H){if(t==null||t(H),d!==void 0&&$>=d)break;const U=Math.min(O*2**($-1),o??3e4);await M(U)}}}()}},v$=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},b$=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},x$=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},uR=({allowReserved:e,explode:t,name:r,style:i,value:a})=>{if(!t){const o=(e?a:a.map(y=>encodeURIComponent(y))).join(b$(i));switch(i){case"label":return`.${o}`;case"matrix":return`;${r}=${o}`;case"simple":return o;default:return`${r}=${o}`}}const h=v$(i),d=a.map(o=>i==="label"||i==="simple"?e?o:encodeURIComponent(o):jv({allowReserved:e,name:r,value:o})).join(h);return i==="label"||i==="matrix"?h+d:d},jv=({allowReserved:e,name:t,value:r})=>{if(r==null)return"";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?r:encodeURIComponent(r)}`},hR=({allowReserved:e,explode:t,name:r,style:i,value:a,valueOnly:h})=>{if(a instanceof Date)return h?a.toISOString():`${r}=${a.toISOString()}`;if(i!=="deepObject"&&!t){let y=[];
31Object.entries(a).forEach(([T,k])=>{y=[...y,T,e?k:encodeURIComponent(k)]});const w=y.join(",");switch(i){case"form":return`${r}=${w}`;case"label":return`.${w}`;case"matrix":return`;${r}=${w}`;default:return w}}const d=x$(i),o=Object.entries(a).map(([y,w])=>jv({allowReserved:e,name:i==="deepObject"?`${r}[${y}]`:y,value:w})).join(d);return i==="label"||i==="matrix"?d+o:o},w$=/\{[^{}]+\}/g,S$=({path:e,url:t})=>{let r=t;const i=t.match(w$);if(i)for(const a of i){let h=!1,d=a.substring(1,a.length-1),o="simple";d.endsWith("*")&&(h=!0,d=d.substring(0,d.length-1)),d.startsWith(".")?(d=d.substring(1),o="label"):d.startsWith(";")&&(d=d.substring(1),o="matrix");const y=e[d];if(y==null)continue;if(Array.isArray(y)){r=r.replace(a,uR({explode:h,name:d,style:o,value:y}));continue}if(typeof y=="object"){r=r.replace(a,hR({explode:h,name:d,style:o,value:y,valueOnly:!0}));continue}if(o==="matrix"){r=r.replace(a,`;${jv({name:d,value:y})}`);continue}const w=encodeURIComponent(o==="label"?`.${y}`:y);r=r.replace(a,w)}return r},T$=({baseUrl:e,path:t,query:r,querySerializer:i,url:a})=>{const h=a.startsWith("/")?a:`/${a}`;let d=(e??"")+h;t&&(d=S$({path:t,url:d}));let o=r?i(r):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(d+=`?${o}`),d};function C$(e){const t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}const E$=async(e,t)=>{const r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r},dR=({allowReserved:e,array:t,object:r}={})=>a=>{const h=[];if(a&&typeof a=="object")for(const d in a){const o=a[d];if(o!=null)if(Array.isArray(o)){const y=uR({allowReserved:e,explode:!0,name:d,style:"form",value:o,...t});y&&h.push(y)}else if(typeof o=="object"){const y=hR({allowReserved:e,explode:!0,name:d,style:"deepObject",value:o,...r});y&&h.push(y)}else{const y=jv({allowReserved:e,name:d,value:o});y&&h.push(y)}}return h.join("&")},k$=e=>{var r;if(!e)return"stream";const t=(r=e.split(";")[0])==null?void 0:r.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(i=>t.startsWith(i)))return"blob";if(t.startsWith("text/"))return"text"}},I$=(e,t)=>{var r,i;return t?!!(e.headers.has(t)||(r=e.query)!=null&&r[t]||(i=e.headers.get("Cookie"))!=null&&i.includes(`${t}=`)):!1},P$=async({security:e,...t})=>{for(const r of e){if(I$(t,r.name))continue;const i=await E$(r,t.auth);if(!i)continue;const a=r.name??"Authorization";switch(r.in){case"query":t.query||(t.query={}),t.query[a]=i;break;case"cookie":t.headers.append("Cookie",`${a}=${i}`);break;case"header":default:t.headers.set(a,i);break}}},OE=e=>T$({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:dR(e.querySerializer),url:e.url}),FE=(e,t)=>{var i;const r={...e,...t};return(i=r.baseUrl)!=null&&i.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=fR(e.headers,t.headers),r},A$=e=>{const t=[];return e.forEach((r,i)=>{t.push([i,r])}),t},fR=(...e)=>{const t=new Headers;for(const r of e){if(!r)continue;const i=r instanceof Headers?A$(r):Object.entries(r);for(const[a,h]of i)if(h===null)t.delete(a);else if(Array.isArray(h))for(const d of h)t.append(a,d);else h!==void 0&&t.set(a,typeof h=="object"?JSON.stringify(h):h)}return t};class nx{constructor(){oa(this,"fns",[])}clear(){this.fns=[]}eject(t){const r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null)}exists(t){const r=this.getInterceptorIndex(t);return!!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){const i=this.getInterceptorIndex(t);return this.fns[i]?(this.fns[i]=r,t):!1}use(t){return this.fns.push(t),this.fns.length-1}}const M$=()=>({error:new nx,request:new nx,response:new nx}),R$=dR({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),L$={"Content-Type":"application/json"},fS=(e={})=>({...y$,headers:L$,parseAs:"auto",querySerializer:R$,...e}),pR=(e={})=>{let t=FE(fS(),e);const r=()=>({...t}),i=w=>(t=FE(t,w),r()),a=M$(),h=async w=>{const T={...t,...w,fetch:w.fetch??t.fetch??globalThis.fetch,headers:fR(t.headers,w.headers),serializedBody:void 0};T.security&&await P$({...T,security:T.security}),T.requestValidator&&await T.requestValidator(T),T.body!==void 0&&T.bodySerializer&&(T.serializedBody=T.bodySerializer(T.body)),(T.body===void 0||T.serializedBody==="")&&T.headers.delete("Content-Type");const k=OE(T);return{opts:T,url:k}},d=async w=>{const{opts:T,url:k}=await h(w),M={redirect:"follow",...T,body:C$(T)};
31let P=new Request(k,M);for(const V of a.request.fns)V&&(P=await V(P,T));const L=T.fetch;let O=await L(P);for(const V of a.response.fns)V&&(O=await V(O,P,T));const $={request:P,response:O};if(O.ok){const V=(T.parseAs==="auto"?k$(O.headers.get("Content-Type")):T.parseAs)??"json";if(O.status===204||O.headers.get("Content-Length")==="0"){let ce;switch(V){case"arrayBuffer":case"blob":case"text":ce=await O[V]();break;case"formData":ce=new FormData;break;case"stream":ce=O.body;break;case"json":default:ce={};break}return T.responseStyle==="data"?ce:{data:ce,...$}}let te;switch(V){case"arrayBuffer":case"blob":case"formData":case"json":case"text":te=await O[V]();break;case"stream":return T.responseStyle==="data"?O.body:{data:O.body,...$}}return V==="json"&&(T.responseValidator&&await T.responseValidator(te),T.responseTransformer&&(te=await T.responseTransformer(te))),T.responseStyle==="data"?te:{data:te,...$}}const Z=await O.text();let J;try{J=JSON.parse(Z)}catch{}const H=J??Z;let U=H;for(const V of a.error.fns)V&&(U=await V(H,O,P,T));if(U=U||{},T.throwOnError)throw U;return T.responseStyle==="data"?void 0:{error:U,...$}},o=w=>T=>d({...T,method:w}),y=w=>async T=>{const{opts:k,url:M}=await h(T);return _$({...k,body:k.body,headers:k.headers,method:w,onRequest:async(P,L)=>{let O=new Request(P,L);for(const $ of a.request.fns)$&&(O=await $(O,k));return O},url:M})};return{buildUrl:OE,connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:r,head:o("HEAD"),interceptors:a,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:d,setConfig:i,sse:{connect:y("CONNECT"),delete:y("DELETE"),get:y("GET"),head:y("HEAD"),options:y("OPTIONS"),patch:y("PATCH"),post:y("POST"),put:y("PUT"),trace:y("TRACE")},trace:o("TRACE")}},jr=pR(fS({baseUrl:"http://127.0.0.31:8080"})),mR=e=>((e==null?void 0:e.client)??jr).post({url:"/v1/get-keys",...e}),z$=e=>((e==null?void 0:e.client)??jr).post({url:"/v1/login-confirm",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),D$=e=>((e==null?void 0:e.client)??jr).post({url:"/v1/login-identity",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),O$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/register",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),F$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/logout",...e}),R1=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/get-profile",...e}),B$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/update-profile",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),N$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/delete-profile",...e}),gR=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/get-restaurants",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),j$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/get-stories",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),$$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/get-addresses",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),yR=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/add-address",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),U$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/update-address",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),V$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/delete-address",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),q$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/get-categories",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),G$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v3/get-products",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),H$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v2/check-promo-code",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),pS=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v2/get-delivery-periods",...e}),_R=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/get-promo-codes",...e}),vR=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v3/get-cart",...e}),bR=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v3/update-cart",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),xR=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v2/create-order",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),wR=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/status-order",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),SR=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/update-order-address",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),mS=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/cancel-order",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),gS=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/get-active-orders",...e}),Z$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/get-orders",...e}),W$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v2/create-payment",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),K$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v2/get-payment",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),X$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/create-payment-method",...e}),Y$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/get-payment-methods",...e}),J$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/delete-payment-method",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),Q$=e=>((e==null?void 0:e.client)??jr).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/delete-unfinished-orders",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),TR=e=>((e==null?void 0:e.client)??jr).post({url:"/v2/get-session",...e}),e8=e=>((e==null?void 0:e.client)??jr).post({url:"/v3/login",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),t8=e=>((e==null?void 0:e.client)??jr).post({url:"/v2/login-identity",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),r8=Object.freeze(Object.defineProperty({__proto__:null,addAddress:yR,cancelCurrentOrder:mS,checkPromoCodeV2:H$,createOrder:xR,createPayment:W$,createPaymentMethod:X$,deleteAddress:V$,deletePaymentMethod:J$,deleteProfile:N$,deleteUnfinishedOrders:
31Q$,getActiveOrders:gS,getAddresses:$$,getCart:vR,getCategories:q$,getCurrentOrder:wR,getDeliveryPeriodsV2:pS,getKeys:mR,getOrders:Z$,getPaymentMethods:Y$,getPaymentStatus:K$,getProductsV3:G$,getProfile:R1,getPromoCodes:_R,getRestaurants:gR,getSessionV2:TR,getStories:j$,loginConfirm:z$,loginIdentity:D$,loginIdentityV2:t8,logout:F$,register:O$,signInV3:e8,updateAddress:U$,updateCart:bR,updateOrderAddress:SR,updateProfile:B$},Symbol.toStringTag,{value:"Module"}));function L1(e){return typeof e=="string"?`'${e}'`:new n8().serialize(e)}const n8=function(){var t;class e{constructor(){aC(this,t,new Map)}compare(i,a){const h=typeof i,d=typeof a;return h==="string"&&d==="string"?i.localeCompare(a):h==="number"&&d==="number"?i-a:String.prototype.localeCompare.call(this.serialize(i,!0),this.serialize(a,!0))}serialize(i,a){if(i===null)return"null";switch(typeof i){case"string":return a?i:`'${i}'`;case"bigint":return`${i}n`;case"object":return this.$object(i);case"function":return this.$function(i)}return String(i)}serializeObject(i){const a=Object.prototype.toString.call(i);if(a!=="[object Object]")return this.serializeBuiltInType(a.length<10?`unknown:${a}`:a.slice(8,-1),i);const h=i.constructor,d=h===Object||h===void 0?"":h.name;if(d!==""&&globalThis[d]===h)return this.serializeBuiltInType(d,i);if(typeof i.toJSON=="function"){const o=i.toJSON();return d+(o!==null&&typeof o=="object"?this.$object(o):`(${this.serialize(o)})`)}return this.serializeObjectEntries(d,Object.entries(i))}serializeBuiltInType(i,a){const h=this["$"+i];if(h)return h.call(this,a);if(typeof(a==null?void 0:a.entries)=="function")return this.serializeObjectEntries(i,a.entries());throw new Error(`Cannot serialize ${i}`)}serializeObjectEntries(i,a){const h=Array.from(a).sort((o,y)=>this.compare(o[0],y[0]));let d=`${i}{`;for(let o=0;o<h.length;o++){const[y,w]=h[o];d+=`${this.serialize(y,!0)}:${this.serialize(w)}`,o<h.length-1&&(d+=",")}return d+"}"}$object(i){let a=Tp(this,t).get(i);return a===void 0&&(Tp(this,t).set(i,`#${Tp(this,t).size}`),a=this.serializeObject(i),Tp(this,t).set(i,a)),a}$function(i){const a=Function.prototype.toString.call(i);return a.slice(-15)==="[native code] }"?`${i.name||""}()[native]`:`${i.name}(${i.length})${a.replace(/\s*\n\s*/g,"")}`}$Array(i){let a="[";for(let h=0;h<i.length;h++)a+=this.serialize(i[h]),h<i.length-1&&(a+=",");return a+"]"}$Date(i){try{return`Date(${i.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(i){return`ArrayBuffer[${new Uint8Array(i).join(",")}]`}$Set(i){return`Set${this.$Array(Array.from(i).sort((a,h)=>this.compare(a,h)))}`}$Map(i){return this.serializeObjectEntries("Map",i.entries())}}t=new WeakMap;for(const r of["Error","RegExp","URL"])e.prototype["$"+r]=function(i){return`${r}(${i})`};for(const r of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])e.prototype["$"+r]=function(i){return`${r}[${i.join(",")}]`};for(const r of["BigInt64Array","BigUint64Array"])e.prototype["$"+r]=function(i){return`${r}[${i.join("n,")}${i.length>0?"n":""}]`};return e}();function z1(e,t){return e===t||L1(e)===L1(t)}const D1=globalThis.requestIdleCallback||(e=>{const t=Date.now(),r={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))};return setTimeout(()=>{e(r)},1)}),i8=globalThis.cancelIdleCallback||(e=>{clearTimeout(e)}),Wd=e=>{const t=Lr();t.isHydrating?t.hooks.hookOnce("app:suspense:resolve",()=>{D1(()=>e())}):D1(()=>e())},s8="$s";function cl(...e){const t=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(t);const[r,i]=e;if(!r||typeof r!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+r);if(i!==void 0&&typeof i!="function")throw new Error("[nuxt] [useState] init must be a function: "+i);const a=s8+r,h=Lr(),d=Fs(h.payload.state,a);if(d.value===void 0&&i){const o=i();if(Xr(o))return h.payload.state[a]=o,o;d.value=o}return d}function o8(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");const r={},i=t||{},a=i.decode||a8;let h=0;for(;h<e.length;){const d=e.indexOf("=",h);if(d===-1)break;let o=e.indexOf(";",h);if(o===-1)o=e.length;else if(o<d){h=e.lastIndexOf(";",d-1)+1;continue}const y=e.slice(h,d).trim();if(i!=null&&i.filter&&!(i!=null&&i.filter(y))){h=o+1;continue}if(r[y]===void 0){let w=e.slice(d+1,o).trim();w.codePointAt(0)===34&&(w=w.slice(1,-1)),r[y]=l8(w,a)}h=o+1}return r}
31function a8(e){return e.includes("%")?decodeURIComponent(e):e}function l8(e,t){try{return t(e)}catch{return e}}const By=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function BE(e,t,r){const i=r||{},a=i.encode||encodeURIComponent;if(typeof a!="function")throw new TypeError("option encode is invalid");if(!By.test(e))throw new TypeError("argument name is invalid");const h=a(t);if(h&&!By.test(h))throw new TypeError("argument val is invalid");let d=e+"="+h;if(i.maxAge!==void 0&&i.maxAge!==null){const o=i.maxAge-0;if(Number.isNaN(o)||!Number.isFinite(o))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(o)}if(i.domain){if(!By.test(i.domain))throw new TypeError("option domain is invalid");d+="; Domain="+i.domain}if(i.path){if(!By.test(i.path))throw new TypeError("option path is invalid");d+="; Path="+i.path}if(i.expires){if(!c8(i.expires)||Number.isNaN(i.expires.valueOf()))throw new TypeError("option expires is invalid");d+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(d+="; HttpOnly"),i.secure&&(d+="; Secure"),i.priority)switch(typeof i.priority=="string"?i.priority.toLowerCase():i.priority){case"low":{d+="; Priority=Low";break}case"medium":{d+="; Priority=Medium";break}case"high":{d+="; Priority=High";break}
31default:throw new TypeError("option priority is invalid")}if(i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:{d+="; SameSite=Strict";break}case"lax":{d+="; SameSite=Lax";break}case"strict":{d+="; SameSite=Strict";break}case"none":{d+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return i.partitioned&&(d+="; Partitioned"),d}function c8(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function ko(e){if(typeof e!="object")return e;var t,r,i=Object.prototype.toString.call(e);if(i==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){r=new e.constructor;for(t in e)e.hasOwnProperty(t)&&r[t]!==e[t]&&(r[t]=ko(e[t]))}else{r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:ko(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=ko(e[t])}return r}if(i==="[object Array]"){for(t=e.length,r=Array(t);t--;)r[t]=ko(e[t]);return r}return i==="[object Set]"?(r=new Set,e.forEach(function(a){r.add(ko(a))}),r):i==="[object Map]"?(r=new Map,e.forEach(function(a,h){r.set(ko(h),ko(a))}),r):i==="[object Date]"?new Date(+e):i==="[object RegExp]"?(r=new RegExp(e.source,e.flags),r.lastIndex=e.lastIndex,r):i==="[object DataView]"?new e.constructor(ko(e.buffer)):i==="[object ArrayBuffer]"?e.slice(0):i.slice(-6)==="Array]"?new e.constructor(e):e}const u8={path:"/",watch:!0,decode:e=>Rd(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},Fp=window.cookieStore;function ps(e,t){var w;const r={...u8,...t};r.filter??(r.filter=T=>T===e);const i=NE(r)||{};let a;r.maxAge!==void 0?a=r.maxAge*1e3:r.expires&&(a=r.expires.getTime()-Date.now());const h=a!==void 0&&a<=0,d=h||i[e]===void 0||i[e]===null,o=ko(h?void 0:i[e]??((w=r.default)==null?void 0:w.call(r))),y=a&&!h?p8(o,a,r.watch&&r.watch!=="shallow"):It(o);{let T=null;try{!Fp&&typeof BroadcastChannel<"u"&&(T=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const k=(O=!1)=>{!O&&(r.readonly||z1(y.value,i[e]))||(f8(e,y.value,r),i[e]=ko(y.value),T==null||T.postMessage({value:r.encode(y.value)}))},M=O=>{var Z;const $=O.refresh?(Z=NE(r))==null?void 0:Z[e]:r.decode(O.value);P=!0,y.value=$,i[e]=ko($),Ri(()=>{P=!1})};let P=!1;const L=!!Zu();if(L&&kd(()=>{P=!0,k(),T==null||T.close()}),Fp){const O=$=>{const Z=$.changed.find(H=>H.name===e),J=$.deleted.find(H=>H.name===e);Z&&M({value:Z.value}),J&&M({value:null})};Fp.addEventListener("change",O),L&&kd(()=>Fp.removeEventListener("change",O))}else T&&(T.onmessage=({data:O})=>M(O));r.watch&&Mr(y,()=>{P||k()},{deep:r.watch!=="shallow"}),d&&k(d)}return y}function h8(e){var t;Fp||typeof BroadcastChannel>"u"||(t=new BroadcastChannel(`nuxt:cookies:${e}`))==null||t.postMessage({refresh:!0})}function NE(e={}){return o8(document.cookie,e)}function d8(e,t,r={}){return t==null?BE(e,t,{...r,maxAge:-1}):BE(e,t,r)}function f8(e,t,r={}){document.cookie=d8(e,t,r)}const jE=2147483647;function p8(e,t,r){let i,a,h=0;const d=r?It(e):{value:e};return Zu()&&kd(()=>{a==null||a(),clearTimeout(i)}),jm((o,y)=>{r&&(a=Mr(d,y));function w(){h=0,clearTimeout(i);const T=t-h,k=T<jE?T:jE;i=setTimeout(()=>{if(h+=k,h<t)return w();d.value=void 0,y()},k)}return{get(){return o(),d.value},set(T){w(),d.value=T,y()}}})}async function CR(e,t=gn()){const{path:r,matched:i}=t.resolve(e);if(!i.length||(t._routePreloaded||(t._routePreloaded=new Set),t._routePreloaded.has(r)))return;const a=t._preloadPromises||(t._preloadPromises=[]);if(a.length>4)return Promise.all(a).then(()=>CR(e,t));t._routePreloaded.add(r);const h=i.map(d=>{var o;return(o=d.components)==null?void 0:o.default}).filter(d=>typeof d=="function");for(const d of h){const o=Promise.resolve(d()).catch(()=>{}).finally(()=>a.splice(a.indexOf(o)));a.push(o)}await Promise.all(a)}function ER(e={}){const t=e.path||window.location.pathname;let r={};
31try{r=Rd(sessionStorage.getItem("nuxt:reload")||"{}")}catch{}if(e.force||(r==null?void 0:r.path)!==t||(r==null?void 0:r.expires)<Date.now()){try{sessionStorage.setItem("nuxt:reload",JSON.stringify({path:t,expires:Date.now()+(e.ttl??1e4)}))}catch{}if(e.persistState)try{sessionStorage.setItem("nuxt:reload:state",JSON.stringify({state:Lr().payload.state}))}catch{}window.location.pathname!==t?window.location.href=t:window.location.reload()}}const m8=(...e)=>e.find(t=>t!==void 0);function g8(e){const t=e.componentName||"NuxtLink";function r(h){return!I1&&typeof h=="string"&&h.startsWith("#")}function i(h,d){if(!h||e.trailingSlash!=="append"&&e.trailingSlash!=="remove")return h;if(typeof h=="string")return $E(h,e.trailingSlash);const o="path"in h&&h.path!==void 0?h.path:d(h).path;return{...h,name:void 0,path:$E(o,e.trailingSlash)}}function a(h){const d=gn(),o=Si(),y=it(()=>!!h.target&&h.target!=="_self"),w=it(()=>{const $=h.to||h.href||"";return typeof $=="string"&&$o($,{acceptRelative:!0})}),T=vC("RouterLink"),k=T&&typeof T!="string"?T.useLink:void 0,M=it(()=>{if(h.external)return!0;const $=h.to||h.href||"";return typeof $=="object"?!1:$===""||w.value}),P=it(()=>{const $=h.to||h.href||"";return M.value?$:i($,d.resolve)}),L=M.value||k==null?void 0:k({...h,to:P}),O=it(()=>{var $;if(!P.value||w.value||r(P.value))return P.value;if(M.value){const Z=typeof P.value=="object"&&"path"in P.value?y1(P.value):P.value,J=typeof Z=="object"?d.resolve(Z).href:Z;return i(J,d.resolve)}return typeof P.value=="object"?(($=d.resolve(P.value))==null?void 0:$.href)??null:i(ju(o.app.baseURL,P.value),d.resolve)});return{to:P,hasTarget:y,isAbsoluteUrl:w,isExternal:M,href:O,isActive:(L==null?void 0:L.isActive)??it(()=>P.value===d.currentRoute.value.path),isExactActive:(L==null?void 0:L.isExactActive)??it(()=>P.value===d.currentRoute.value.path),route:(L==null?void 0:L.route)??it(()=>d.resolve(P.value)),async navigate($){await Fv(O.value,{replace:h.replace,external:M.value||y.value})}}}return Rr({name:t,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1}},useLink:a,setup(h,{slots:d}){const o=gn(),{to:y,href:w,navigate:T,isExternal:k,hasTarget:M,isAbsoluteUrl:P}=a(h),L=It(!1),O=It(null),$=H=>{var U;O.value=h.custom?(U=H==null?void 0:H.$el)==null?void 0:U.nextElementSibling:H==null?void 0:H.$el};function Z(H){var U,V;return!L.value&&(typeof h.prefetchOn=="string"?h.prefetchOn===H:((U=h.prefetchOn)==null?void 0:U[H])??((V=e.prefetchOn)==null?void 0:V[H]))&&(h.prefetch??e.prefetch)!==!1&&h.noPrefetch!==!0&&h.target!=="_blank"&&!b8()}async function J(H=Lr()){if(L.value)return;L.value=!0;const U=typeof y.value=="string"?y.value:k.value?y1(y.value):o.resolve(y.value).fullPath,V=k.value?new URL(U,window.location.href).href:U;await Promise.all([H.hooks.callHook("link:prefetch",V).catch(()=>{}),!k.value&&!M.value&&CR(y.value,o).catch(()=>{})])}if(Z("visibility")){const H=Lr();let U,V=null;js(()=>{const te=_8();Wd(()=>{U=D1(()=>{var ce;(ce=O==null?void 0:O.value)!=null&&ce.tagName&&(V=te.observe(O.value,async()=>{V==null||V(),V=null,await J(H)}))})})}),bc(()=>{U&&i8(U),V==null||V(),V=null})}return()=>{var V;if(!k.value&&!M.value&&!r(y.value)){const te={ref:$,to:y.value,activeClass:h.activeClass||e.activeClass,exactActiveClass:h.exactActiveClass||e.exactActiveClass,replace:h.replace,ariaCurrentValue:h.ariaCurrentValue,custom:h.custom};
31return h.custom||(Z("interaction")&&(te.onPointerenter=J.bind(null,void 0),te.onFocus=J.bind(null,void 0)),L.value&&(te.class=h.prefetchedClass||e.prefetchedClass),te.rel=h.rel||void 0),cn(vC("RouterLink"),te,d.default)}const H=h.target||null,U=m8(h.noRel?"":h.rel,e.externalRelAttribute,P.value||M.value?"noopener noreferrer":"")||null;return h.custom?d.default?d.default({href:w.value,navigate:T,prefetch:J,get route(){if(!w.value)return;const te=new URL(w.value,window.location.href);return{path:te.pathname,fullPath:te.pathname,get query(){return eS(te.search)},hash:te.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:w.value}},rel:U,target:H,isExternal:k.value||M.value,isActive:!1,isExactActive:!1}):null:cn("a",{ref:O,href:w.value||null,rel:U,target:H},(V=d.default)==null?void 0:V.call(d))}}})}const y8=g8(uN);function $E(e,t){const r=t==="append"?U_:tS;return $o(e)&&!e.startsWith("http")?e:r(e,!0)}function _8(){const e=Lr();if(e._observer)return e._observer;let t=null;const r=new Map,i=(h,d)=>(t||(t=new IntersectionObserver(o=>{for(const y of o){const w=r.get(y.target);(y.isIntersecting||y.intersectionRatio>0)&&w&&w()}})),r.set(h,d),t.observe(h),()=>{r.delete(h),t==null||t.unobserve(h),r.size===0&&(t==null||t.disconnect(),t=null)});return e._observer={observe:i}}const v8=/2g/;function b8(){const e=navigator.connection;return!!(e&&(e.saveData||v8.test(e.effectiveType)))}const x8={ui:{colorMode:!1,colors:{primary:"primary"},icons:{loading:"mingcute:loading-fill",calendar:"lucide:calendar",arrowRight:"iconamoon:arrow-right-2"},tabs:{trigger:["rounded-2xl"],slots:{trigger:"data-[state=inactive]:text-black-60 hover:data-[state=inactive]:not-disabled:text-black "},variants:{variant:{pill:{list:"rounded-3xl bg-white",trigger:"grow cursor-pointer rounded-2xl",indicator:"rounded-2xl"}}},compoundVariants:[{color:"primary",variant:"pill",class:{indicator:"bg-primary",trigger:"data-[state=active]:text-black focus-visible:outline-0 focus-visible:outline-offset-2 focus-visible:outline-primary"}},{color:"primary",variant:"link",class:{indicator:"bg-primary",trigger:"data-[state=active]:text-primary focus-visible:ring-0 focus-visible:ring-inset focus-visible:ring-primary"}}],defaultVariants:{color:"primary",variant:"pill",size:"md"}},drawer:{slots:{title:"!text-center fon-bold text-xl text-black",overlay:"fixed inset-0 bg-(--color-black-90)/50",handle:"shrink-0 !bg-(--color-black-10)",container:"w-full flex flex-col gap-4 px-0 overflow-y-auto"},compoundVariants:[{direction:"bottom",inset:!1,class:{content:"inset-x-0 bottom-0 rounded-t-3xl"}},{direction:"right",inset:!0,class:{content:"h-[80%] w-[480px] right-10 top-[10%] rounded-3xl"}}]},button:{base:"cursor-pointer transition-all rounded-full font-semibold ",variants:{size:{md:{base:"px-8 h-10 py-(--ui-button-base-padding-y) text-base gap-2 h-10",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6"},xl:{base:"h-13 px-8 py-(--ui-button-xl-padding-y) text-xl gap-2"},xxl:{base:"h-13 px-8 py-(--ui-button-xl-padding-y) text-xl gap-2"}}},compoundVariants:[{color:"primary",variant:"solid",class:"text-[var(--color-on-primary)] disabled:bg-(--color-black-10) focus:outline-none disabled:opacity-100 disabled:text-black-40 hover:bg-primary active:bg-primary/85"},{color:"neutral",variant:"soft",class:"text-black-80 !font-semibold focus:outline-none disabled:bg-(--color-light-gray) disabled:opacity-100 disabled:text-black-40 bg-(--color-light-gray) hover:bg-(--color-gray-200)/70"},{color:"neutral",variant:"outline",class:"text-black-60 focus:outline-none hover:bg-(--color-gray-200)/70 ring-1 ring-black-20"},{color:"neutral",variant:"ghost",class:"text-black focus:outline-none disabled:opacity-100 disabled:text-black-40"},{color:"error",variant:"ghost",class:"text-(--color-danger) focus:outline-none disabled:opacity-100 disabled:text-black-40"}],defaultVariants:{size:"md"}},inputNumber:{slots:{root:"relative inline-flex items-center",base:"w-full cursor-default rounded-full border-0 focus:outline-none disabled:cursor-not-allowed disabled:opacity-75",increment:"absolute flex items-center [&>button>span]:text-black-80 [&>button>span]:w-4",decrement:"absolute flex items-center [&>button>span]:text-black-80 [&>button>span]:w-4"},variants:{size:{md:"px-2.5 py-1.5 h-8 text-base gap-1.5"},variant:{soft:"text-(--color-black) font-medium bg-(--color-white) hover:bg-(--color-white) focus:bg-(--color-white) disabled:bg-(--color-white)/50"}
31,disabled:{true:{increment:"opacity-75 cursor-not-allowed",decrement:"opacity-75 cursor-not-allowed"}},highlight:{true:""},orientation:{vertical:{base:"w-full rounded-2xl border-0 placeholder:font-semibold placeholder:text-(--color-black-40) focus:outline-none font-semibold",increment:"top-0 end-0 pe-1 [&>button]:py-0 scale-80",decrement:"bottom-0 end-0 pe-1 [&>button]:py-0 scale-80"}}},compoundVariants:[{color:"neutral",class:"focus-visible:ring-1 focus-visible:ring-inset transition focus-visible:ring-(--ui-primary)"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-(--ui-border-inverted)"}],defaultVariants:{size:"md",color:"neutral",variant:"soft"}},formField:{slots:{label:"block font-semibold",container:"mt-1 relative",error:"mt-0.5 text-error text-xs"}},input:{slots:{base:"w-full rounded-2xl border-0 placeholder:font-semibold placeholder:text-(--color-black-40) focus:outline-none font-semibold"},variants:{size:{md:{base:"px-4 py-2.5 h-10 text-base font-semibold gap-1.5"},lg:{base:"px-3 py-2 text-sm gap-2"},xl:{base:"px-3 py-2 h-12 ps-4 text-base gap-2"},xxl:{base:"px-3 py-2 h-13 ps-4 text-sm gap-2"}},variant:{soft:"text-(--color-black-80) transition bg-(--color-light-gray) hover:bg-(--color-light-gray) focus:bg-(--color-white) disabled:bg-(--color-light-gray)/50 ",outline:"text-(--color-black-80) ring-1 ring-black-20 transition bg-(--color-white) hover:bg-(--color-white) focus:bg-(--color-white) disabled:bg-(--color-white)/50"},color:{error:"ring-1 ring-inset ring-(--color-danger)"}},compoundVariants:[{color:"neutral",variant:"soft",class:"focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-(--ui-primary)"},{color:"neutral",variant:"outline",class:"focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-(--ui-primary)"},{leading:!0,size:"xl",class:"ps-10"}],defaultVariants:{size:"md",color:"neutral",variant:"soft"}},select:{slots:{base:"rounded-3xl focus:outline-none",placeholder:"truncate text-(--color-black-40)",item:"before:rounded-2xl text-(--color-black-60)",content:"rounded-3xl pt-1"},variants:{size:{md:{base:"px-5 py-3 h-10 text-base font-semibold",item:"p-3 text-md gap-1.5"}},variant:{soft:"text-(--color-black-80) bg-(--color-light-gray) hover:bg-(--color-light-gray) focus:bg-(--color-light-gray) disabled:bg-(--color-light-gray)/50"}},compoundVariants:[{color:"neutral",variant:"soft",class:"focus-visible:ring-0"}],defaultVariants:{size:"md",color:"neutral",variant:"soft"}},selectMenu:{slots:{base:"rounded-3xl focus:outline-none",placeholder:"truncate text-(--color-black-40)",arrow:"fill-(--ui-border)",content:"rounded-3xl",item:"before:rounded-xl text-(--color-black-60)"},variants:{size:{md:{base:"px-5 py-3 h-10 text-base font-semibold",item:"p-3 text-md gap-1.5"}},variant:{soft:"text-(--color-black-80)"}},compoundVariants:[{color:"neutral",variant:"soft",class:"focus-visible:ring-0"}],defaultVariants:{size:"md",color:"neutral",variant:"soft"}},switch:{slots:{base:"data-[state=unchecked]:bg-(--color-light-gray) curs
31or-pointer touch-none"}},toast:{slots:{root:"rounded-xl bg-(--color-black) ring-0",title:"text-sm font-medium text-white text-center",description:"text-sm text-white/60 text-center",progress:"hidden",close:"text-white/60 hover:text-white hover:bg-white/10"}},pinInput:{variants:{variant:{outline:"text-black font-bold  text-base bg-light-gray ring-0"}},compoundVariants:[{color:"primary",variant:"outline",class:"focus-visible:ring-0 focus-visible:ring-inset focus-visible:ring-primary"}]},radioGroup:{slots:{base:"rounded-3xl focus:outline-none ring-(--color-black-20)",label:"block font-semibold leading-[20px] text-black-80"}},popover:{slots:{content:"bg-default shadow-lg rounded-2xl ring ring-default data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-popover-content-transform-origin) focus:outline-none pointer-events-auto",arrow:"fill-default"}}}},w8={nuxt:{},ui:{colors:{primary:"green",secondary:"blue",success:"green",info:"blue",warning:"yellow",error:"red",neutral:"slate"},icons:{arrowLeft:"i-lucide-arrow-left",arrowRight:"i-lucide-arrow-right",check:"i-lucide-check",chevronDoubleLeft:"i-lucide-chevrons-left",chevronDoubleRight:"i-lucide-chevrons-right",chevronDown:"i-lucide-chevron-down",chevronLeft:"i-lucide-chevron-left",chevronRight:"i-lucide-chevron-right",chevronUp:"i-lucide-chevron-up",close:"i-lucide-x",ellipsis:"i-lucide-ellipsis",external:"i-lucide-arrow-up-right",folder:"i-lucide-folder",folderOpen:"i-lucide-folder-open",loading:"i-lucide-refresh-cw",minus:"i-lucide-minus",plus:"i-lucide-plus",search:"i-lucide-search"}},icon:{provider:"server",class:"",aliases:{},iconifyApiEndpoint:"https://api.iconify.design",localApiEndpoint:"/api/_nuxt_icon",fallbackToApi:!0,cssSelectorPrefix:"i-",cssWherePseudo:!0,cssLayer:"components",mode:"css",attrs:{"aria-hidden":!0},collections:["academicons","akar-icons","ant-design","arcticons","basil","bi","bitcoin-icons","bpmn","brandico","bx","bxl","bxs","bytesize","carbon","catppuccin","cbi","charm","ci","cib","cif","cil","circle-flags","circum","clarity","codicon","covid","cryptocurrency","cryptocurrency-color","dashicons","devicon","devicon-plain","ei","el","emojione","emojione-monotone","emojione-v1","entypo","entypo-social","eos-icons","ep","et","eva","f7","fa","fa-brands","fa-regular","fa-solid","fa6-brands","fa6-regular","fa6-solid","fad","fe","feather","file-icons","flag","flagpack","flat-color-icons","flat-ui","flowbite","fluent","fluent-emoji","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-mdl2","fontelico","fontisto","formkit","foundation","fxemoji","gala","game-icons","geo","gg","gis","gravity-ui","gridicons","grommet-icons","guidance","healthicons","heroicons","heroicons-outline","heroicons-solid","hugeicons","humbleicons","ic","icomoon-free","icon-park","icon-park-outline","icon-park-solid","icon-park-twotone","iconamoon","iconoir","icons8","il","ion","iwwa","jam","la","lets-icons","line-md","logos","ls","lucide","lucide-lab","mage","majesticons","maki","map","marketeq","material-symbols","material-symbols-light","mdi","mdi-light","medical-icon","memory","meteocons","mi","mingcute","mono-icons","mynaui","nimbus","nonicons","noto","noto-v1","octicon","oi","ooui","openmoji","oui","pajamas","pepicons","pepicons-pencil","pepicons-pop","pepicons-print","ph","pixelarticons","prime","ps","quill","radix-icons","raphael","ri","rivet-icons","si-glyph","simple-icons","simple-line-icons","skill-icons","solar","streamline","streamline-emojis","subway","svg-spinners","system-uicons","tabler","tdesign","teenyicons","token","token-branded","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","unjs","vaadin","vs","vscode-icons","websymbol","weui","whh","wi","wpf","zmdi","zondicons"],fetchTimeout:15e3}},kR=bN(x8,w8);function Us(){const e=Lr();return e._appConfig||(e._appConfig=Mi(kR)),e._appConfig}const IR=Xu("userProfile",()=>{const e=dS(),t=Oo(),r=Dd("menu"),i=Dd("view",{dynamic:!0}),a=It(null),h=Mi({isOpen:it({get:()=>e.isLessThan("xl")&&!!r.value,set:w=>{r.value=w}}),isOpenDesktop:it({get:()=>!e.isLessThan("xl")&&!!r.value,set:w=>{r.value=w}}),state:it({get:()=>{const w=i.value;return r.value&&w&&typeof w=="string"&&["history","addresses","edit"].includes(w)?w:a.value&&!t.isAuthorized?a.value:t.isAuthorized?"profile":"unauthorized"},set:w=>{["history","addresses","edit"].includes(w)?(i.value=w,a.value=null):["login","loginConfirm","registration"].includes(w)?(i.value&&(i.value=null),a.value=w):(i.value&&(i.value=null),a.value=null,w==="profile"&&(h.sberHintFailed=!1))}}),phone:"",timerActive:!1,timerTimeLeft:0,codeSentVia:"",codeFallbacks:[],loginBackTarget:"unauthorized",sberHintFailed:!1}),d=w=>{h.state=w},o=w=>{h.phone=w},y=w=>{h.loginBackTarget=w};return Mr(()=>h.isOpenDesktop,async w=>{if(!w){a.value=null;const T=h.loginBackTarget==="cart";h.loginBackTarget="unauthorized",T&&t.isAuthorized&&(await Ri(),DE("menu","cart"))}}),Mr(()=>h.isOpen,async w=>{if(!w){a.value=null;const T=h.loginBackTarget==="cart";h.loginBackTarget="unauthorized",T&&(await Ri(),DE("menu","cart"))}}),{menu:IN(h),setState:d,setPhone:o,setLoginBackTarget:y}}),K_="accessToken",S8="__Host-accessToken";function PR(e){return e?S8:K_}const T8=60*60*24*365,fs=(e,t={})=>{},C8=["phone_code","vkid","sberid"],E8={type:"phone_code"},k8=["sberid"];function I8(e){var i;if(!e||typeof e!="object")return{methods:[E8],hintProviders:[],deadlock:!1};const t=UE(e.methods,C8),r=UE((i=e.hint)==null?void 0:i.providers,k8).filter(a=>!!a.clientId);return{methods:t,hintProviders:r,deadlock:t.length===0&&r.length===0}}function UE(e,t){return Array.isArray(e)?e.filter(r=>!!r&&typeof r=="object"&&typeof r.type=="string"&&t.includes(r.type)):[]}function P8(e){const t=e??{},r=typeof t.captchaSitekey=="string"?t.captchaSitekey:"",i=r.length>0;return{loginEnabled:t.captchaEnabled===!0&&i,promoEnabled:t.captchaPromoEnabled===!0&&i,sitekey:r}}const Kr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,tn=globalThis,Jp="10.51.0";function Yu(){return $v(tn),tn}function $v(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Jp,t[Jp]=t[Jp]||{}}function Uv(e,t,r=tn){const i=r.__SENTRY__=r.__SENTRY__||{},a=i[Jp]=i[Jp]||{};return a[e]||(a[e]=t())}const kre=["debug","info","warn","error","log","assert","trace"],A8="Sentry Logger ",VE={};function Kd(e){if(!("console"in tn))return e();const t=tn.console,r={},i=Object.keys(VE);
31i.forEach(a=>{const h=VE[a];r[a]=t[a],t[a]=h});try{return e()}finally{i.forEach(a=>{t[a]=r[a]})}}function M8(){_S().enabled=!0}function R8(){_S().enabled=!1}function AR(){return _S().enabled}function L8(...e){yS("log",...e)}function z8(...e){yS("warn",...e)}function D8(...e){yS("error",...e)}function yS(e,...t){Kr&&AR()&&Kd(()=>{tn.console[e](`${A8}[${e}]:`,...t)})}function _S(){return Kr?Uv("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const ir={enable:M8,disable:R8,isEnabled:AR,log:L8,warn:z8,error:D8},MR=50,O8="?",qE=/\(error: (.*)\)/,GE=/captureMessage|captureException/;function F8(...e){const t=e.sort((r,i)=>r[0]-i[0]).map(r=>r[1]);return(r,i=0,a=0)=>{const h=[],d=r.split(`
32`);for(let o=i;o<d.length;o++){let y=d[o];y.length>1024&&(y=y.slice(0,1024));const w=qE.test(y)?y.replace(qE,"$1"):y;if(!w.includes("Error: ")){for(const T of t){const k=T(w);if(k){h.push(k);break}}if(h.length>=MR+a)break}}return B8(h.slice(a))}}function Ire(e){return Array.isArray(e)?F8(...e):e}function B8(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Ny(t).function||"")&&t.pop(),t.reverse(),GE.test(Ny(t).function||"")&&(t.pop(),GE.test(Ny(t).function||"")&&t.pop()),t.slice(0,MR).map(r=>({...r,filename:r.filename||Ny(t).filename,function:r.function||O8}))}function Ny(e){return e[e.length-1]||{}}const ix="<anonymous>";function vS(e){try{return!e||typeof e!="function"?ix:e.name||ix}catch{return ix}}function Pre(e){const t=e.exception;if(t){const r=[];try{return t.values.forEach(i=>{i.stacktrace.frames&&r.push(...i.stacktrace.frames)}),r}catch{return}}}function RR(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}const Bp={},HE={};function Xd(e,t){return Bp[e]=Bp[e]||[],Bp[e].push(t),()=>{const r=Bp[e];if(r){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}}function Yd(e,t){if(!HE[e]){HE[e]=!0;try{t()}catch(r){Kr&&ir.error(`Error while instrumenting ${e}`,r)}}}function ma(e,t){const r=e&&Bp[e];if(r)for(const i of r)try{i(t)}catch(a){Kr&&ir.error(`Error while triggering instrumentation handler.
33Type: ${e}
34Name: ${vS(i)}
35Error:`,a)}}let sx=null;function N8(e){const t="error";Xd(t,e),Yd(t,j8)}function j8(){sx=tn.onerror,tn.onerror=function(e,t,r,i,a){return ma("error",{column:i,error:a,line:r,msg:e,url:t}),sx?sx.apply(this,arguments):!1},tn.onerror.__SENTRY_INSTRUMENTED__=!0}let ox=null;function $8(e){const t="unhandledrejection";Xd(t,e),Yd(t,U8)}function U8(){ox=tn.onunhandledrejection,tn.onunhandledrejection=function(e){return ma("unhandledrejection",e),ox?ox.apply(this,arguments):!0},tn.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const LR=Object.prototype.toString;function zR(e){switch(LR.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Qd(e,Error)}}function Jd(e,t){return LR.call(e)===`[object ${t}]`}function Are(e){return Jd(e,"ErrorEvent")}function Mre(e){return Jd(e,"DOMError")}function Rre(e){return Jd(e,"DOMException")}function cc(e){return Jd(e,"String")}function V8(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ZE(e){return e===null||V8(e)||typeof e!="object"&&typeof e!="function"}function DR(e){return Jd(e,"Object")}function q8(e){return typeof Event<"u"&&Qd(e,Event)}function G8(e){return typeof Element<"u"&&Qd(e,Element)}function H8(e){return Jd(e,"RegExp")}function Vv(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function Z8(e){return DR(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Qd(e,t){try{return e instanceof t}catch{return!1}}function OR(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function bS(e){return typeof Request<"u"&&Qd(e,Request)}const xS=tn,W8=80;function Qi(e,t={}){if(!e)return"<unknown>";try{let r=e;const i=5,a=[];let h=0,d=0;const o=" > ",y=o.length;let w;const T=Array.isArray(t)?t:t.keyAttrs,k=!Array.isArray(t)&&t.maxStringLength||W8;for(;r&&h++<i&&(w=K8(r,T),!(w==="html"||h>1&&d+a.length*y+w.length>=k));)a.push(w),d+=w.length,r=r.parentNode;return a.reverse().join(o)}catch{return"<unknown>"}}function K8(e,t){const r=e,i=[];if(!(r!=null&&r.tagName))return"";if(xS.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}i.push(r.tagName.toLowerCase());const a=t!=null&&t.length?t.filter(h=>r.getAttribute(h)).map(h=>[h,r.getAttribute(h)]):null;
35if(a!=null&&a.length)a.forEach(h=>{i.push(`[${h[0]}="${h[1]}"]`)});else{r.id&&i.push(`#${r.id}`);const h=r.className;if(h&&cc(h)){const d=h.split(/\s+/);for(const o of d)i.push(`.${o}`)}}for(const h of["aria-label","type","name","title","alt"]){const d=r.getAttribute(h);d&&i.push(`[${h}="${d}"]`)}return i.join("")}function wS(){try{return xS.document.location.href}catch{return""}}function X8(e,t=5){if(!xS.HTMLElement)return null;let r=e;for(let i=0;i<t;i++){if(!r)return null;if(r instanceof HTMLElement){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}r=r.parentNode}return null}function O1(e,t,r){if(!(t in e))return;const i=e[t];if(typeof i!="function")return;const a=r(i);typeof a=="function"&&FR(a,i);try{e[t]=a}catch{Kr&&ir.log(`Failed to replace method "${t}" in object`,e)}}function lo(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{Kr&&ir.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function FR(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,lo(e,"__sentry_original__",t)}catch{}}function Y8(e){return e.__sentry_original__}function BR(e){if(zR(e))return{message:e.message,name:e.name,stack:e.stack,...KE(e)};if(q8(e)){const t={type:e.type,target:WE(e.target),currentTarget:WE(e.currentTarget),...KE(e)};return typeof CustomEvent<"u"&&Qd(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function WE(e){try{return G8(e)?Qi(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function KE(e){return typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e)):{}}function Lre(e){const t=Object.keys(BR(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let td;function Km(e){if(td!==void 0)return td?td(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),r=tn;return t in r&&typeof r[t]=="function"?(td=r[t],td(e)):(td=null,e())}function Pu(){return Km(()=>Math.random())}function NR(){return Km(()=>Date.now())}function F1(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function zre(e,t){if(!Array.isArray(e))return"";const r=[];for(let i=0;i<e.length;i++){const a=e[i];try{OR(a)?r.push(RR(a)):r.push(String(a))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function Qp(e,t,r=!1){return cc(e)?H8(t)?t.test(e):cc(t)?r?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function c_(e,t=[],r=!1){return t.some(i=>Qp(e,i,r))}function J8(){const e=tn;return e.crypto||e.msCrypto}let ax;function Q8(){return Pu()*16}function uc(e=J8()){try{if(e!=null&&e.randomUUID)return Km(()=>e.randomUUID()).replace(/-/g,"")}catch{}return ax||(ax="10000000100040008000"+1e11),ax.replace(/[018]/g,t=>(t^(Q8()&15)>>t/4).toString(16))}function jR(e){var t,r;return(r=(t=e.exception)==null?void 0:t.values)==null?void 0:r[0]}function Dre(e){const{message:t,event_id:r}=e;if(t)return t;const i=jR(e);return i?i.type&&i.value?`${i.type}: ${i.value}`:i.type||i.value||r||"<unknown>":r||"<unknown>"}function eU(e,t,r){const i=e.exception=e.exception||{},a=i.values=i.values||[],h=a[0]=a[0]||{};h.value||(h.value=t||""),h.type||(h.type="Error")}function $R(e,t){const r=jR(e);if(!r)return;const i={type:"generic",handled:!0},a=r.mechanism;if(r.mechanism={...i,...a,...t},t&&"data"in t){const h={...a==null?void 0:a.data,...t.data};r.mechanism.data=h}}function Ore(e){if(tU(e))return!0;try{lo(e,"__sentry_captured__",!0)}catch{}return!1}function tU(e){try{return e.__sentry_captured__}catch{}}const UR=1e3;function Xm(){return NR()/UR}function rU(){const{performance:e}=tn;if(!(e!=null&&e.now)||!e.timeOrigin)return Xm;const t=e.timeOrigin;return()=>(t+Km(()=>e.now()))/UR}let XE;function Hn(){return(XE??(XE=rU()))()}let lx=null;function nU(){var d;const{performance:e}=tn;if(!(e!=null&&e.now))return;const t=3e5,r=Km(()=>e.now()),i=NR(),a=e.timeOrigin;if(typeof a=="number"&&Math.abs(a+r-i)<t)return a;const h=(d=e.timing)==null?void 0:d.navigationStart;return typeof h=="number"&&Math.abs(h+r-i)<t?h:i-r}function es(){return lx===null&&(lx=nU()),lx}function iU(e){const t=Hn(),r={sid:uc(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>oU(r)};return e&&qv(r,e),r}function qv(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Hn(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:uc()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),t
vendor: 6,421 bytes, line 35
35ypeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function sU(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),qv(e,r)}function oU(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function Gv(e,t,r=2){if(!t||typeof t!="object"||r<=0)return t;if(e&&Object.keys(t).length===0)return e;const i={...e};for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(i[a]=Gv(i[a],t[a],r-1));return i}function ul(){return uc()}function tl(){return uc().substring(16)}const B1="_sentrySpan";function vm(e,t){t?lo(e,B1,t):delete e[B1]}function X_(e){return e[B1]}const aU=100;class Ta{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:ul(),sampleRand:Pu()}}clone(){const t=new Ta;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,vm(t,X_(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&qv(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this.setTags({[t]:r})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,r){return this.setAttributes({[t]:r})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const r=typeof t=="function"?t(this):t,i=r instanceof Ta?r.getScopeData():DR(r)?t:void 0,{tags:a,attributes:h,extra:d,user:o,contexts:y,level:w,fingerprint:T=[],propagationContext:k,conversationId:M}=i||{};return this._tags={...this._tags,...a},this._attributes={...this._attributes,...h},this._extra={...this._extra,...d},this._contexts={...this._contexts,...y},o&&Object.keys(o).length&&(this._user=o),w&&(this._level=w),T.length&&(this._fingerprint=T),k&&(this._propagationContext=k),M&&(this._conversationId=M),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,vm(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ul(),sampleRand:Pu()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){var h;const i=typeof r=="number"?r:aU;if(i<=0)return this;const a={timestamp:Xm(),...t,message:t.message?F1(t.message,2048):t.message};return this._breadcrumbs.push(a),this._breadcrumbs.length>i&&(this._breadcrumbs=this._breadcrumbs.slice(-i),(h=this._client)==null||h.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:X_(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Gv(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,r){const i=(r==null?void 0:r.event_id)||uc();if(!this._client)return Kr&&ir.warn("No client configured on scope - will not capture exception!"),i;const a=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:a,...r,event_id:i},this),i}captureMessage(t,r,i){const a=(i==null?void 0:i.event_id)||uc();if(!this._client)return Kr&&ir.warn("No client configured on scope - will not capture message!"),a;const h=(i==null?void 0:i.syntheticException)??new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:h,...i,event_id:a},this),a}
35captureEvent(t,r){const i=t.event_id||(r==null?void 0:r.event_id)||uc();return this._client?(this._client.captureEvent(t,{...r,event_id:i},this),i):(Kr&&ir.warn("No client configured on scope - will not capture event!"),i)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function lU(){return Uv("defaultCurrentScope",()=>new Ta)}function cU(){return Uv("defaultIsolationScope",()=>new Ta)}const YE=e=>e instanceof Promise&&!e[VR],VR=Symbol("chained PromiseLike"),uU=(e,t,r)=>{const i=e.then(a=>(t(a),a),a=>{throw r(a),a});return YE(i)&&YE(e)?i:hU(e,i)},hU=(e,t)=>{let r=!1;for(const i in e){if(i in t)continue;r=!0;const a=e[i];typeof a=="function"?Object.defineProperty(t,i,{value:(...h)=>a.apply(e,h),enumerable:!0,configurable:!0,writable:!0}):t[i]=a}return r&&Object.assign(t,{[VR]:!0}),t};class dU{constructor(t,r){let i;t?i=t:i=new Ta;let a;r?a=r:a=new Ta,this._stack=[{scope:i}],this._isolationScope=a}withScope(t){const r=this._pushScope();let i;try{i=t(r)}catch(a){throw this._popScope(),a}return Vv(i)?uU(i,()=>this._popScope(),()=>this._popScope()):(this._popScope(),i)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Od(){const e=Yu(),t=$v(e);return t.stack=t.stack||new dU(lU(),cU())}function fU(e){return Od().withScope(e)}function pU(e,t){const r=Od();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function JE(e){return Od().withScope(()=>e(Od().getIsolationScope()))}function mU(){return{withIsolationScope:JE,withScope:fU,withSetScope:pU,withSetIsolationScope:(e,t)=>JE(t),getCurrentScope:()=>Od().getScope(),getIsolationScope:()=>Od().getIsolationScope()}}function ef(e){const t=$v(e);return t.acs?t.acs:mU()}function kn(){const e=Yu();return ef(e).getCurrentScope()}function Ju(){const e=Yu();return ef(e).getIsolationScope()}function gU(){return Uv("globalScope",()=>new Ta)}function SS(...e){const t=Yu(),r=ef(t);if(e.length===2){const[i,a]=e;return i?r.withSetScope(i,a):r.withScope(a)}return r.withScope(e[0])}function Zn(){return kn().getClient()}function Fre(e){const t=e.getPropagationContext(),{traceId:r,parentSpanId:i,propagationSpanId:a}=t,h={trace_id:r,span_id:a||tl()};return i&&(h.parent_span_id=i),h}const ro="sentry.source",TS="sentry.sample_rate",qR="sentry.previous_trace_sample_rate",Vo="sentry.op",$n="sentry.origin",bm="sentry.idle_span_finish_reason",Ym="sentry.measurement_unit",Jm="sentry.measurement_value",QE="sentry.custom_span_name",yU="sentry.profile_id",tf="sentry.exclusive_time",_U="sentry.link.type",Bre="gen_ai.conversation.id",GR=0,Hv=1,Pi=2;function vU(e){if(e<400&&e>=100)return{code:Hv};if(e>=400&&e<500)switch(e){case 401:return{code:Pi,message:"unauthenticated"};case 403:return{code:Pi,message:"permission_denied"};case 404:return{code:Pi,message:"not_found"};case 409:return{code:Pi,message:"already_exists"};case 413:return{code:Pi,message:"failed_precondition"};case 429:return{code:Pi,message:"resource_exhausted"};case 499:return{code:Pi,message:"cancelled"};default:return{code:Pi,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:Pi,message:"unimplemented"};case 503:return{code:Pi,message:"unavailable"};case 504:return{code:Pi,message:"deadline_exceeded"};default:return{code:Pi,message:"internal_error"}}return{code:Pi,message:"internal_error"}}function HR(e,t){e.setAttribute("http.response.status_code",t);const r=vU(t);r.message!=="unknown_error"&&e.setStatus(r)}function bU(e){try{const t=tn.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function xU(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}const ZR="_sentryScope",WR="_sentryIsolationScope";function wU(e,t,r){e&&(lo(e,WR,bU(r)),lo(e,ZR,t))}function Y_(e){const t=e;return{scope:t[ZR],isolationScope:xU(t[WR])}}const J_="sentry-",SU=8192;function KR(e){const t=CU(e);if(!t)return;const r=Object.entries(t).reduce((i,[a,h])=>{if(a.startsWith(J_)){const d=a.slice(J_.length);i[d]=h}return i},{});if(Object.keys(r).length>0)return r}function TU(e){if(!e)return;const t=Object.entries(e).reduce((r,[i,a])=>(a&&(r[`${J_}${i}`]=a),r),{});return EU(t)}function CU(e){if(!(!e||!cc(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,r)=>{const i=ek(r);
35return Object.entries(i).forEach(([a,h])=>{t[a]=h}),t},{}):ek(e)}function ek(e){return e.split(",").map(t=>{const r=t.indexOf("=");if(r===-1)return[];const i=t.slice(0,r),a=t.slice(r+1);return[i,a].map(h=>{try{return decodeURIComponent(h.trim())}catch{return}})}).reduce((t,[r,i])=>(r&&i&&(t[r]=i),t),{})}function EU(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[r,i],a)=>{const h=`${encodeURIComponent(r)}=${encodeURIComponent(i)}`,d=a===0?h:`${t},${h}`;return d.length>SU?(Kr&&ir.warn(`Not adding key: ${r} with val: ${i} to baggage header due to exceeding baggage size limits.`),t):d},"")}const kU=/^o(\d+)\./,IU=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function PU(e){return e==="http"||e==="https"}function CS(e,t=!1){const{host:r,path:i,pass:a,port:h,projectId:d,protocol:o,publicKey:y}=e;return`${o}://${y}${t&&a?`:${a}`:""}@${r}${h?`:${h}`:""}/${i&&`${i}/`}${d}`}function AU(e){const t=IU.exec(e);if(!t){Kd(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,i,a="",h="",d="",o=""]=t.slice(1);let y="",w=o;const T=w.split("/");if(T.length>1&&(y=T.slice(0,-1).join("/"),w=T.pop()),w){const k=w.match(/^\d+/);k&&(w=k[0])}return XR({host:h,pass:a,path:y,projectId:w,port:d,protocol:r,publicKey:i})}function XR(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function MU(e){if(!Kr)return!0;const{port:t,projectId:r,protocol:i}=e;return["protocol","publicKey","host","projectId"].find(d=>e[d]?!1:(ir.error(`Invalid Sentry Dsn: ${d} missing`),!0))?!1:r.match(/^\d+$/)?PU(i)?t&&isNaN(parseInt(t,10))?(ir.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(ir.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(ir.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function RU(e){const t=e.match(kU);return t==null?void 0:t[1]}function LU(e){const t=e.getOptions(),{host:r}=e.getDsn()||{};let i;return t.orgId?i=String(t.orgId):r&&(i=RU(r)),i}function Nre(e){const t=typeof e=="string"?AU(e):XR(e);if(!(!t||!MU(t)))return t}function Q_(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const YR=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function zU(e){if(!e)return;const t=e.match(YR);if(!t)return;let r;return t[3]==="1"?r=!0:t[3]==="0"&&(r=!1),{traceId:t[1],parentSampled:r,parentSpanId:t[2]}}function DU(e,t){const r=zU(e),i=KR(t);if(!(r!=null&&r.traceId))return{traceId:ul(),sampleRand:Pu()};const a=OU(r,i);i&&(i.sample_rand=a.toString());const{traceId:h,parentSpanId:d,parentSampled:o}=r;return{traceId:h,parentSpanId:d,sampled:o,dsc:i||{},sampleRand:a}}function JR(e=ul(),t=tl(),r){let i="";return r!==void 0&&(i=r?"-1":"-0"),`${e}-${t}${i}`}function QR(e=ul(),t=tl(),r){return`00-${e}-${t}-${r?"01":"00"}`}function OU(e,t){const r=Q_(t==null?void 0:t.sample_rand);if(r!==void 0)return r;const i=Q_(t==null?void 0:t.sample_rate);return i&&(e==null?void 0:e.parentSampled)!==void 0?e.parentSampled?Pu()*i:i+Pu()*(1-i):Pu()}const eL=0,Zv=1;let tk=!1;function FU(e){const{spanId:t,traceId:r}=e.spanContext(),{data:i,op:a,parent_span_id:h,status:d,origin:o,links:y}=en(e);return{parent_span_id:h,span_id:t,trace_id:r,data:i,op:a,status:d,origin:o,links:y}}function BU(e){const{spanId:t,traceId:r,isRemote:i}=e.spanContext(),a=i?t:en(e).parent_span_id,h=Y_(e).scope,d=i?(h==null?void 0:h.getPropagationContext().propagationSpanId)||tl():t;return{parent_span_id:a,span_id:d,trace_id:r}}function NU(e){const{traceId:t,spanId:r}=e.spanContext(),i=xc(e);return JR(t,r,i)}function jU(e){const{traceId:t,spanId:r}=e.spanContext(),i=xc(e);return QR(t,r,i)}function tL(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:r,traceFlags:i,...a},attributes:h})=>({span_id:t,trace_id:r,sampled:i===Zv,attributes:h,...a}))}function rL(e){if(e!=null&&e.length)return e.map(({context:{spanId:t,traceId:r,traceFlags:i},attributes:a})=>({span_id:t,trace_id:r,sampled:i===Zv,attributes:a}))}function rl(e){return typeof e=="number"?rk(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?rk(e.getTime()):Hn()}function rk(e){return e>9999999999?e/1e3:e}function en(e){if(oL(e))return e.getSpanJSON();const{spanId:t,traceId:r}=e.spanContext();if(sL(e)){const{attributes:i,startTime:a,name:h,endTime:d,status:o,links:y}=e;return{span_id:t,trace_id:r,data:i,description:h,parent_span_id:iL(e),start_timestamp:rl(a),timestamp:rl(d)||void 0,status:aL(o),op:i[Vo],origin:i[$n],links:tL(y)}}return{span_id:t,trace_id:r,start_timestamp:0,data:{}}}function nL(e){if(oL(e))return e.getStreamedSpanJSON();const{spanId:t,traceId:r}=e.spanContext();if(sL(e)){const{attributes:i,startTime:a,name:h,endTime:d,status:o,links:y}=e;return{name:h,span_id:t,trace_id:r,parent_span_id:iL(e),start_timestamp:rl(a),end_timestamp:rl(d),is_segment:e===j1(e),status:lL(o),attributes:i,links:rL(y)}}return{span_id:t,trace_id:r,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===j1(e)}}function iL(e){var t;return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?(t=e.parentSpanContext)==null?void 0:t.spanId:void 0}function sL(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function oL(e){return typeof e.getSpanJSON=="function"}function xc(e){const{traceFlags:t}=e.spanContext();return t===Zv}function aL(e){if(!(!e||e.code===GR))return e.code===Hv?"ok":e.message||"internal_error"}function lL(e){return!e||e.code===Hv||e.code===GR||e.message==="cancelled"?"ok":"error"}const Au="_sentryChildSpans",N1="_sentryRootSpan";function cL(e,t){const r=e[N1]||e;lo(t,N1,r),e[Au]?e[Au].add(t):lo(e,Au,new Set([t]))}function $U(e,t){e[Au]&&e[Au].delete(t)}function u_(e){const t=new Set;function r(i){if(!t.has(i)&&xc(i)){t.add(i);const a=i[Au]?Array.from(i[Au]):[];for(const h of a)r(h)}}return r(e),Array.from(t)}const Ui=j1;function j1(e){return e[N1]||e}function ms(){const e=Yu(),t=ef(e);return t.getActiveSpan?t.getActiveSpan():X_(kn())}function UU(){tk||(Kd(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),tk=!0)}let nk=!1;function VU(){if(nk)return;function e(){const t=ms(),r=t&&Ui(t);if(r){const i="internal_error";Kr&&ir.log(`[Tracing] Root span: ${i} -> Global error occurred`),r.setStatus({code:Pi,message:i})}}e.tag="sentry_tracingErrorCallback",nk=!0,N8(e),$8(e)}function ao(e){var r;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||((r=Zn())==null?void 0:r.getOptions());return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function ik(e){ir.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function ES(e,t){if(!(t!=null&&t.length))return!1;for(const r of t){if(GU(r)){if(e.description&&Qp(e.description,r))return Kr&&ik(e),!0;continue}const i=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!i)continue;const a=r.name?e.description&&Qp(e.description,r.name):!0,h=r.op?e.op&&Qp(e.op,r.op):!0,d=r.attributes?Object.entries(r.attributes).every(([o,y])=>{var w;return qU((w=e.attributes)==null?void 0:w[o],y)}):!0;if(a&&h&&d)return Kr&&ik(e),!0}return!1}function qU(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?Qp(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((r,i)=>r===t[i]):e===t}function jre(e,t){const r=t.parent_span_id,i=t.span_id;if(r)for(const a of e)a.parent_span_id===i&&(a.parent_span_id=r)}
35function GU(e){return typeof e=="string"||e instanceof RegExp}const uL="production",hL="_frozenDsc";function h_(e,t){lo(e,hL,t)}function dL(e,t){const r=t.getOptions(),{publicKey:i}=t.getDsn()||{},a={environment:r.environment||uL,release:r.release,public_key:i,trace_id:e,org_id:LU(t)};return t.emit("createDsc",a),a}function HU(e,t){const r=t.getPropagationContext();return r.dsc||dL(r.traceId,e)}function gc(e){var L;const t=Zn();if(!t)return{};const r=Ui(e),i=en(r),a=i.data,h=r.spanContext().traceState,d=(h==null?void 0:h.get("sentry.sample_rate"))??a[TS]??a[qR];function o(O){return(typeof d=="number"||typeof d=="string")&&(O.sample_rate=`${d}`),O}const y=r[hL];if(y)return o(y);const w=h==null?void 0:h.get("sentry.dsc"),T=w&&KR(w);if(T)return o(T);const k=dL(e.spanContext().traceId,t),M=a[ro]??a["sentry.span.source"],P=i.description;return M!=="url"&&P&&(k.transaction=P),ao()&&(k.sampled=String(xc(r)),k.sample_rand=(h==null?void 0:h.get("sentry.sample_rand"))??((L=Y_(r).scope)==null?void 0:L.getPropagationContext().sampleRand.toString())),o(k),t.emit("createDsc",k,r),k}class ga{constructor(t={}){this._traceId=t.traceId||ul(),this._spanId=t.spanId||tl(),this.dropReason=t.dropReason}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:eL}}end(t){}setAttribute(t,r){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,r,i){return this}addLink(t){return this}addLinks(t){return this}recordException(t,r){}}function ZU(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}const WU=Symbol.for("sentry.skipNormalization"),KU=Symbol.for("sentry.overrideNormalizationDepth");function XU(e){return!!e[WU]}function YU(e){const t=e[KU];return typeof t=="number"?t:void 0}function Wa(e,t=100,r=1/0){try{return $1("",e,t,r)}catch(i){return{ERROR:`**non-serializable** (${i})`}}}function JU(e,t=3,r=100*1024){const i=Wa(e,t);return rV(i)>r?JU(e,t-1,r):i}function $1(e,t,r=1/0,i=1/0,a=nV()){const[h,d]=a;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const o=QU(e,t);if(!o.startsWith("[object "))return o;if(XU(t))return t;const y=YU(t),w=y!==void 0?y:r;if(w===0)return o.replace("object ","");if(h(t))return"[Circular ~]";const T=t;if(T&&typeof T.toJSON=="function")try{const L=T.toJSON();return $1("",L,w-1,i,a)}catch{}const k=Array.isArray(t)?[]:{};let M=0;const P=BR(t);for(const L in P){if(!Object.prototype.hasOwnProperty.call(P,L))continue;if(M>=i){k[L]="[MaxProperties ~]";break}const O=P[L];k[L]=$1(L,O,w-1,i,a),M++}return d(t),k}function QU(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(OR(t))return RR(t);if(Z8(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${vS(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const r=eV(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function eV(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function tV(e){return~-encodeURI(e).split(/%..|./).length}function rV(e){return tV(JSON.stringify(e))}function nV(){const e=new WeakSet;function t(i){return e.has(i)?!0:(e.add(i),!1)}function r(i){e.delete(i)}return[t,r]}function kS(e,t=[]){return[e,t]}function $re(e,t){const[r,i]=e;return[r,[...i,t]]}function iV(e,t){const r=e[1];for(const i of r){const a=i[0].type;if(t(i,a))return!0}return!1}function Ure(e,t){return iV(e,(r,i)=>t.includes(i))}function U1(e){const t=$v(tn);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Vre(e){const[t,r]=e;let i=JSON.stringify(t);function a(h){typeof i=="string"?i=typeof h=="string"?i+h:[U1(i),h]:i.push(typeof h=="string"?U1(h):h)}for(const h of r){const[d,o]=h;if(a(`
36${JSON.stringify(d)}
37`),typeof o=="string"||o instanceof Uint8Array)a(o);else{let y;try{y=JSON.stringify(o)}catch{y=JSON.stringify(Wa(o))}a(y)}}return typeof i=="string"?i:sV(i)}function sV(e){const t=e.reduce((a,h)=>a+h.length,0),r=new Uint8Array(t);let i=0;for(const a of e)r.set(a,i),i+=a.length;return r}function oV(e){return[{type:"span"},e]}function qre(e){const t=typeof e.data=="string"?U1(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const fL={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function aV(e){return e in fL}function Gre(e){return aV(e)?fL[e]:e}function pL(e){if(!(e!=null&&e.sdk))return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function lV(e,t,r,i){var h;const a=(h=e.sdkProcessingMetadata)==null?void 0:h.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!r&&i&&{dsn:CS(i)},...a&&{trace:a}}}function cV(e,t){var i,a,h,d;if(!t)return e;const r=e.sdk||{};return e.sdk={...r,name:r.name||t.name,version:r.version||t.version,integrations:[...((i=e.sdk)==null?void 0:i.integrations)||[],...t.integrations||[]],packages:[...((a=e.sdk)==null?void 0:a.packages)||[],...t.packages||[]],settings:(h=e.sdk)!=null&&h.settings||t.settings?{...(d=e.sdk)==null?void 0:d.settings,...t.settings}:void 0},e}function Hre(e,t,r,i){const a=pL(r),h={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!i&&t&&{dsn:CS(t)}},d="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return kS(h,[d])}function Zre(e,t,r,i){const a=pL(r),h=e.type&&e.type!=="replay_event"?e.type:"event";cV(e,r==null?void 0:r.sdk);const d=lV(e,a,i,t);return delete e.sdkProcessingMetadata,kS(d,[[{type:h},e]])}function uV(e,t){function r(P){return!!P.trace_id&&!!P.public_key}const i=gc(e[0]),a=t==null?void 0:t.getDsn(),h=t==null?void 0:t.getOptions().tunnel,d={sent_at:new Date().toISOString(),...r(i)&&{trace:i},...!!h&&a&&{dsn:CS(a)}},{beforeSendSpan:o,ignoreSpans:y}=(t==null?void 0:t.getOptions())||{},w=y!=null&&y.length?e.filter(P=>{const L=en(P);return!ES({description:L.description,op:L.op,attributes:L.data},y)}):e,T=e.length-w.length;T&&(t==null||t.recordDroppedEvent("before_send","span",T));const k=o?P=>{const L=en(P),O=ZU(o)?L:o(L);return O||(UU(),L)}:en,M=[];for(const P of w){const L=k(P);L&&M.push(oV(L))}return kS(d,M)}function hV(e){if(!Kr)return;const{description:t="< unknown name >",op:r="< unknown op >",parent_span_id:i}=en(e),{spanId:a}=e.spanContext(),h=xc(e),d=Ui(e),o=d===e,y=`[Tracing] Starting ${h?"sampled":"unsampled"} ${o?"root ":""}span`,w=[`op: ${r}`,`name: ${t}`,`ID: ${a}`];if(i&&w.push(`parent ID: ${i}`),!o){const{op:T,description:k}=en(d);w.push(`root ID: ${d.spanContext().spanId}`),T&&w.push(`root op: ${T}`),k&&w.push(`root description: ${k}`)}ir.log(`${y}
38  ${w.join(`
39  `)}`)}function dV(e){if(!Kr)return;const{description:t="< unknown name >",op:r="< unknown op >"}=en(e),{spanId:i}=e.spanContext(),h=Ui(e)===e,d=`[Tracing] Finishing "${r}" ${h?"root ":""}span "${t}" with ID ${i}`;ir.log(d)}function fV(e,t,r,i=ms()){const a=i&&Ui(i);a&&(Kr&&ir.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${r}`),a.addEvent(e,{[Jm]:t,[Ym]:r}))}function sk(e){if(!e||e.length===0)return;const t={};return e.forEach(r=>{const i=r.attributes||{},a=i[Ym],h=i[Jm];typeof a=="string"&&typeof h=="number"&&(t[r.name]={value:h,unit:a})}),t}function Uu(e){return e.getOptions().traceLifecycle==="stream"}const ok=1e3;class Wv{constructor(t={}){this._traceId=t.traceId||ul(),this._spanId=t.spanId||tl(),this._startTime=t.startTimestamp||Hn(),this._links=t.links,this._attributes={},this.setAttributes({[$n]:"manual",[Vo]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}
39addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,r){}spanContext(){const{_spanId:t,_traceId:r,_sampled:i}=this;return{spanId:t,traceId:r,traceFlags:i?Zv:eL}}setAttribute(t,r){return r===void 0?delete this._attributes[t]:this._attributes[t]=r,this}setAttributes(t){return Object.keys(t).forEach(r=>this.setAttribute(r,t[r])),this}updateStartTime(t){this._startTime=rl(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(ro,"custom"),this}end(t){this._endTime||(this._endTime=rl(t),dV(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Vo],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:aL(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[$n],profile_id:this._attributes[yU],exclusive_time:this._attributes[tf],measurements:sk(this._events),is_segment:this._isStandaloneSpan&&Ui(this)===this||void 0,segment_id:this._isStandaloneSpan?Ui(this).spanContext().spanId:void 0,links:tL(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===Ui(this),status:lL(this._status),attributes:this._attributes,links:rL(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,r,i){Kr&&ir.log("[Tracing] Adding an event to span:",t);const a=ak(r)?r:i||Hn(),h=ak(r)?{}:r||{},d={name:t,time:rl(a),attributes:h};return this._events.push(d),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=Zn();if(t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this)),!(this._isStandaloneSpan||this===Ui(this)))return;if(this._isStandaloneSpan){this._sampled?mV(uV([this],t)):(Kr&&ir.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}else if(t&&Uu(t)){t.emit("afterSegmentSpanEnd",this);return}const i=this._convertSpanToTransaction();i&&(Y_(this).scope||kn()).captureEvent(i)}_convertSpanToTransaction(){var T;if(!lk(en(this)))return;this._name||(Kr&&ir.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:r}=Y_(this),i=(T=t==null?void 0:t.getScopeData().sdkProcessingMetadata)==null?void 0:T.normalizedRequest;if(this._sampled!==!0)return;const h=u_(this).filter(k=>k!==this&&!pV(k)).map(k=>en(k)).filter(lk),d=this._attributes[ro];delete this._attributes[QE],h.forEach(k=>{delete k.data[QE]});const o={contexts:{trace:FU(this)},spans:h.length>ok?h.sort((k,M)=>k.start_timestamp-M.start_timestamp).slice(0,ok):h,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:r,dynamicSamplingContext:gc(this)},request:i,...d&&{transaction_info:{source:d}}},y=sk(this._events);return y&&Object.keys(y).length&&(Kr&&ir.log("[Measurements] Adding measurements to transaction event",JSON.stringify(y,void 0,2)),o.measurements=y),o}}function ak(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function lk(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function pV(e){return e instanceof Wv&&e.isStandaloneSpan()}function mV(e){const t=Zn();if(!t)return;const r=e[1];if(!r||r.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function gV(e,t,r){if(!ao(e))return[!1];let i,a;typeof e.tracesSampler=="function"?(a=e.tracesSampler({...t,inheritOrSampleWith:o=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):o}),i=!0):t.parentSampled!==void 0?a=t.parentSampled:typeof e.tracesSampleRate<"u"&&(a=e.tracesSampleRate,i=!0);const h=Q_(a);if(h===void 0)return Kr&&ir.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(a)} of type ${JSON.stringify(typeof a)}.`),[!1];if(!h)return Kr&&ir.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,h,i];const d=r<h;return d||Kr&&ir.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(a)})`),[d,h,i]}const yV="__SENTRY_SUPPRESS_TRACING__";function hl(e){const t=gL();if(t.startInactiveSpan)return t.startInactiveSpan(e);const r=vV(e),{forceTransaction:i,parentSpan:a}=e;return(e.scope?d=>SS(e.scope,d):a!==void 0?d=>mL(a,d):d=>d())(()=>{const d=kn(),o=xV(d,a),y=Zn();return e.onlyIfParent&&!o?(y==null||y.recordDroppedEvent("no_parent_span","span"),new ga):_V({parentSpan:o,spanArguments:r,forceTransaction:i,scope:d})})}function mL(e,t){const r=gL();return r.withActiveSpan?r.withActiveSpan(e,t):SS(i=>(vm(i,e||void 0),t(i)))}function _V({parentSpan:e,spanArguments:t,forceTransaction:r,scope:i}){if(!ao()){const o=new ga;if(r||!e){const y={sampled:"false",sample_rate:"0",transaction:t.name,...gc(o)};h_(o,y)}return o}const a=Zn();if(wV(a,t))return IS(i)||a==null||a.recordDroppedEvent("ignored","span"),new ga({dropReason:"ignored",traceId:(e==null?void 0:e.spanContext().traceId)??i.getPropagationContext().traceId});const h=Ju();let d;if(e&&!r)d=bV(e,i,t),cL(e,d);else if(e){const o=gc(e),{traceId:y,spanId:w}=e.spanContext(),T=xc(e);d=ck({traceId:y,parentSpanId:w,...t},i,T),h_(d,o)}else{const{traceId:o,dsc:y,parentSpanId:w,sampled:T}={...h.getPropagationContext(),...i.getPropagationContext()};d=ck({traceId:o,parentSpanId:w,...t},i,T),y&&h_(d,y)}return hV(d),wU(d,i,h),d}function vV(e){const r={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const i={...r};return i.startTimestamp=rl(e.startTime),delete i.startTime,i}return r}function gL(){const e=Yu();return ef(e)}function ck(e,t,r){var O;const i=Zn(),a=(i==null?void 0:i.getOptions())||{},{name:h=""}=e,d={spanAttributes:{...e.attributes},spanName:h,parentSampled:r};i==null||i.emit("beforeSampling",d,{decision:!1});const o=d.parentSampled??r,y=d.spanAttributes,w=t.getPropagationContext(),T=IS(t),[k,M,P]=T?[!1]:gV(a,{name:h,parentSampled:o,attributes:y,parentSampleRate:Q_((O=w.dsc)==null?void 0:O.sample_rate)},w.sampleRand),L=new Wv({...e,attributes:{[ro]:"custom",[TS]:M!==void 0&&P?M:void 0,...y},sampled:k});return!k&&i&&!T&&(Kr&&ir.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),i.recordDroppedEvent("sample_rate",Uu(i)?"span":"transaction")),i&&i.emit("spanStart",L),L}function bV(e,t,r){const{spanId:i,traceId:a}=e.spanContext(),h=IS(t),d=h?!1:xc(e),o=d?new Wv({...r,parentSpanId:i,traceId:a,sampled:d}):new ga({traceId:a});cL(e,o);const y=Zn();return y&&(Uu(y)&&o instanceof ga&&(e instanceof ga&&e.dropReason?(o.dropReason=e.dropReason,y.recordDroppedEvent(e.dropReason,"span")):h||(o.dropReason="sample_rate",y.recordDroppedEvent("sample_rate","span"))),y.emit("spanStart",o),r.endTimestamp&&(y.emit("spanEnd",o),y.emit("afterSpanEnd",o))),o}function xV(e,t){if(t)return t;if(t===null)return;const r=X_(e);if(!r)return;const i=Zn();return(i?i.getOptions():{}).parentSpanIsAlwaysRootSpan?Ui(r):r}function wV(e,t){var i;const r=e==null?void 0:e.getOptions().ignoreSpans;return!e||!Uu(e)||!(r!=null&&r.length)?!1:ES({description:t.name||"",op:((i=t.attributes)==null?void 0:i[Vo])||t.op,attributes:t.attributes},r)}function IS(e){return e.getScopeData().sdkProcessingMetadata[yV]===!0}const d_={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},SV="heartbeatFailed",TV="idleTimeout",CV="finalTimeout",EV="externalFinish";function yL(e,t={}){const r=new Map;let i=!1,a,h=EV,d=!t.disableAutoFinish;const o=[],{idleTimeout:y=d_.idleTimeout,finalTimeout:w=d_.finalTimeout,childSpanTimeout:T=d_.childSpanTimeout,beforeSpanEnd:k,trimIdleSpanEndTimestamp:M=!0}=t,P=Zn();if(!P||!ao()){const ce=new ga,fe={sample_rate:"0",sampled:"false",...gc(ce)};return h_(ce,fe),ce}const L=kn(),O=ms(),$=kV(e);$.end=new Proxy($.end,{apply(ce,fe,Se){if(k&&k($),fe instanceof ga)return;const[xe,...et]=Se,ze=xe||Hn(),Ze=rl(ze),tt=u_($).filter(Pt=>Pt!==$),at=en($);if(!tt.length||!M)return te(Ze),Reflect.apply(ce,fe,[Ze,...et]);const Pe=P.getOptions().ignoreSpans,He=tt==null?void 0:tt.reduce((Pt,Yt)=>{const xt=en(Yt);return!xt.timestamp||Pe&&ES({description:xt.description,op:xt.op,attributes:xt.data},Pe)?Pt:Pt?Math.max(Pt,xt.timestamp):xt.timestamp},void 0),Oe=at.start_timestamp,lt=Math.min(Oe?Oe+w/1e3:1/0,Math.max(Oe||-1/0,Math.min(Ze,He||1/0)));return te(lt),Reflect.apply(ce,fe,[lt,...et])}});function Z(){a&&(clearTimeout(a),a=void 0)}function J(ce){Z(),a=setTimeout(()=>{!i&&r.size===0&&d&&(h=TV,$.end(ce))},y)}function H(ce){a=setTimeout(()=>{!i&&d&&(h=SV,$.end(ce))},T)}function U(ce){Z(),r.set(ce,!0);const fe=Hn();H(fe+T/1e3)}function V(ce){if(r.has(ce)&&r.delete(ce),r.size===0){const fe=Hn();J(fe+y/1e3)}}function te(ce){i=!0,r.clear(),o.forEach(tt=>tt()),vm(L,O);const fe=en($),{start_timestamp:Se}=fe;if(!Se)return;fe.data[bm]||$.setAttribute(bm,h);const et=fe.status;(!et||et==="unknown")&&$.setStatus({code:Hv}),ir.log(`[Tracing] Idle span "${fe.op}" finished`);const ze=u_($).filter(tt=>tt!==$);let Ze=0;ze.forEach(tt=>{tt.isRecording()&&(tt.setStatus({code:Pi,message:"cancelled"}),tt.end(ce),Kr&&ir.log("[Tracing] Cancelling span since span ended early",JSON.stringify(tt,void 0,2)));const at=en(tt),{timestamp:Pe=0,start_timestamp:He=0}=at,Oe=He<=ce,lt=(w+y)/1e3,Pt=Pe-He<=lt;if(Kr){const Yt=JSON.stringify(tt,void 0,2);Oe?Pt||ir.log("[Tracing] Discarding span since it finished after idle span final timeout",Yt):ir.log("[Tracing] Discarding span since it happened after idle span was finished",Yt)}(!Pt||!Oe)&&($U($,tt),Ze++)}),Ze>0&&$.setAttribute("sentry.idle_span_discarded_spans",Ze)}return o.push(P.on("spanStart",ce=>{if(i||ce===$||en(ce).timestamp||ce instanceof Wv&&ce.isStandaloneSpan())return;u_($).includes(ce)&&U(ce.spanContext().spanId)})),o.push(P.on("spanEnd",ce=>{i||V(ce.spanContext().spanId)})),o.push(P.on("idleSpanEnableAutoFinish",ce=>{ce===$&&(d=!0,J(),r.size&&H())})),t.disableAutoFinish||J(),setTimeout(()=>{i||($.setStatus({code:Pi,message:"deadline_exceeded"}),h=CV,$.end())},w),$}function kV(e){const t=hl(e);
39return vm(kn(),t),Kr&&ir.log("[Tracing] Started span is an idle span"),t}function IV(e,t){const{fingerprint:r,span:i,breadcrumbs:a,sdkProcessingMetadata:h}=t;PV(e,t),i&&RV(e,i),LV(e,r),AV(e,a),MV(e,h)}function uk(e,t){const{extra:r,tags:i,attributes:a,user:h,contexts:d,level:o,sdkProcessingMetadata:y,breadcrumbs:w,fingerprint:T,eventProcessors:k,attachments:M,propagationContext:P,transactionName:L,span:O}=t;Ap(e,"extra",r),Ap(e,"tags",i),Ap(e,"attributes",a),Ap(e,"user",h),Ap(e,"contexts",d),e.sdkProcessingMetadata=Gv(e.sdkProcessingMetadata,y,2),o&&(e.level=o),L&&(e.transactionName=L),O&&(e.span=O),w.length&&(e.breadcrumbs=[...e.breadcrumbs,...w]),T.length&&(e.fingerprint=[...e.fingerprint,...T]),k.length&&(e.eventProcessors=[...e.eventProcessors,...k]),M.length&&(e.attachments=[...e.attachments,...M]),e.propagationContext={...e.propagationContext,...P}}function Ap(e,t,r){e[t]=Gv(e[t],r,1)}function _L(e,t){const r=gU().getScopeData();return e&&uk(r,e.getScopeData()),t&&uk(r,t.getScopeData()),r}function PV(e,t){const{extra:r,tags:i,user:a,contexts:h,level:d,transactionName:o}=t;Object.keys(r).length&&(e.extra={...r,...e.extra}),Object.keys(i).length&&(e.tags={...i,...e.tags}),Object.keys(a).length&&(e.user={...a,...e.user}),Object.keys(h).length&&(e.contexts={...h,...e.contexts}),d&&(e.level=d),o&&e.type!=="transaction"&&(e.transaction=o)}function AV(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function MV(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function RV(e,t){e.contexts={trace:BU(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:gc(t),...e.sdkProcessingMetadata};const r=Ui(t),i=en(r).description;i&&!e.transaction&&e.type==="transaction"&&(e.transaction=i)}function LV(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}const cx=0,hk=1,dk=2;function vL(e){return new xm(t=>{t(e)})}function zV(e){return new xm((t,r)=>{r(e)})}class xm{constructor(t){this._state=cx,this._handlers=[],this._runExecutor(t)}then(t,r){return new xm((i,a)=>{this._handlers.push([!1,h=>{if(!t)i(h);else try{i(t(h))}catch(d){a(d)}},h=>{if(!r)a(h);else try{i(r(h))}catch(d){a(d)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new xm((r,i)=>{let a,h;return this.then(d=>{h=!1,a=d,t&&t()},d=>{h=!0,a=d,t&&t()}).then(()=>{if(h){i(a);return}r(a)})})}_executeHandlers(){if(this._state===cx)return;const t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===hk&&r[1](this._value),this._state===dk&&r[2](this._value),r[0]=!0)})}_runExecutor(t){const r=(h,d)=>{if(this._state===cx){if(Vv(d)){d.then(i,a);return}this._state=h,this._value=d,this._executeHandlers()}},i=h=>{r(hk,h)},a=h=>{r(dk,h)};try{t(i,a)}catch(h){a(h)}}}function DV(e,t,r,i=0){try{const a=V1(t,r,e,i);return Vv(a)?a:vL(a)}catch(a){return zV(a)}}function V1(e,t,r,i){const a=r[i];if(!e||!a)return e;const h=a({...e},t);return Kr&&h===null&&ir.log(`Event processor "${a.id||"?"}" dropped event`),Vv(h)?h.then(d=>V1(d,t,r,i+1)):V1(h,t,r,i+1)}let Ga,fk,pk,Wl;function OV(e){const t=tn._sentryDebugIds,r=tn._debugIds;if(!t&&!r)return{};const i=t?Object.keys(t):[],a=r?Object.keys(r):[];if(Wl&&i.length===fk&&a.length===pk)return Wl;fk=i.length,pk=a.length,Wl={},Ga||(Ga={});const h=(d,o)=>{for(const y of d){const w=o[y],T=Ga==null?void 0:Ga[y];if(T&&Wl&&w)Wl[T[0]]=w,Ga&&(Ga[y]=[T[0],w]);else if(w){const k=e(y);for(let M=k.length-1;M>=0;M--){const P=k[M],L=P==null?void 0:P.filename;if(L&&Wl&&Ga){Wl[L]=w,Ga[y]=[L,w];break}}}}};return t&&h(i,t),r&&h(a,r),Wl}function Wre(e,t,r,i,a,h){const{normalizeDepth:d=3,normalizeMaxBreadth:o=1e3}=e,y={...t,event_id:t.event_id||r.event_id||uc(),timestamp:t.timestamp||Xm()},w=r.integrations||e.integrations.map(Z=>Z.name);FV(y,e),jV(y,w),a&&a.emit("applyFrameMetadata",t),t.type===void 0&&BV(y,e.stackParser);const T=UV(i,r.captureContext);r.mechanism&&$R(y,r.mechanism);const k=a?a.getEventProcessors():[],M=_L(h,T),P=[...r.attachments||[],...M.attachments];P.length&&(r.attachments=P),IV(y,M);const L=[...k,...M.eventProcessors];return(r.data&&r.data.__sentry__===!0?vL(y):DV(L,y,r)).then(Z=>(Z&&NV(Z),typeof d=="number"&&d>0?$V(Z,d,o):Z))}function FV(e,t){var o,y;const{environment:r,release:i,dist:a,maxValueLength:h}=t;e.environment=e.environment||r||uL,!e.release&&i&&(e.release=i),!e.dist&&a&&(e.dist=a);const d=e.request;d!=null&&d.url&&h&&(d.url=F1(d.url,h)),h&&((y=(o=e.exception)==null?void 0:o.values)==null||y.forEac
39h(w=>{w.value&&(w.value=F1(w.value,h))}))}function BV(e,t){var i,a;const r=OV(t);(a=(i=e.exception)==null?void 0:i.values)==null||a.forEach(h=>{var d,o;(o=(d=h.stacktrace)==null?void 0:d.frames)==null||o.forEach(y=>{y.filename&&(y.debug_id=r[y.filename])})})}function NV(e){var i,a;const t={};if((a=(i=e.exception)==null?void 0:i.values)==null||a.forEach(h=>{var d,o;(o=(d=h.stacktrace)==null?void 0:d.frames)==null||o.forEach(y=>{y.debug_id&&(y.abs_path?t[y.abs_path]=y.debug_id:y.filename&&(t[y.filename]=y.debug_id),delete y.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const r=e.debug_meta.images;Object.entries(t).forEach(([h,d])=>{r.push({type:"sourcemap",code_file:h,debug_id:d})})}function jV(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function $V(e,t,r){var a,h;if(!e)return null;const i={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(d=>({...d,...d.data&&{data:Wa(d.data,t,r)}}))},...e.user&&{user:Wa(e.user,t,r)},...e.contexts&&{contexts:Wa(e.contexts,t,r)},...e.extra&&{extra:Wa(e.extra,t,r)}};return(a=e.contexts)!=null&&a.trace&&i.contexts&&(i.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(i.contexts.trace.data=Wa(e.contexts.trace.data,t,r))),e.spans&&(i.spans=e.spans.map(d=>({...d,...d.data&&{data:Wa(d.data,t,r)}}))),(h=e.contexts)!=null&&h.flags&&i.contexts&&(i.contexts.flags=Wa(e.contexts.flags,3,r)),i}function UV(e,t){if(!t)return e;const r=e?e.clone():new Ta;return r.update(t),r}function VV(e){if(e)return qV(e)?{captureContext:e}:HV(e)?{captureContext:e}:e}function qV(e){return e instanceof Ta||typeof e=="function"}const GV=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function HV(e){return Object.keys(e).some(t=>GV.includes(t))}function Qm(e,t){return kn().captureException(e,VV(t))}function wm(e,t){const r=typeof t=="string"?t:void 0,i=typeof t!="string"?{captureContext:t}:void 0;return kn().captureMessage(e,r,i)}function Kre(e,t){return kn().captureEvent(e,t)}function ZV(e,t){Ju().setTag(e,t)}function mk(e){Ju().setUser(e)}function WV(){const e=Zn();return(e==null?void 0:e.getOptions().enabled)!==!1&&!!(e!=null&&e.getTransport())}function Xre(e){const t=Ju(),{user:r}=_L(t,kn()),{userAgent:i}=tn.navigator||{},a=iU({user:r,...i&&{userAgent:i},...e}),h=t.getSession();return(h==null?void 0:h.status)==="ok"&&qv(h,{status:"exited"}),bL(),t.setSession(a),a}function bL(){const e=Ju(),r=kn().getSession()||e.getSession();r&&sU(r),xL(),e.setSession()}function xL(){const e=Ju(),t=Zn(),r=e.getSession();r&&t&&t.captureSession(r)}function Yre(e=!1){if(e){bL();return}xL()}const gk=[];function KV(e){const t={};return e.forEach(r=>{const{name:i}=r,a=t[i];a&&!a.isDefaultInstance&&r.isDefaultInstance||(t[i]=r)}),Object.values(t)}function Jre(e){const t=e.defaultIntegrations||[],r=e.integrations;t.forEach(a=>{a.isDefaultInstance=!0});let i;if(Array.isArray(r))i=[...t,...r];else if(typeof r=="function"){const a=r(t);i=Array.isArray(a)?a:[a]}else i=t;return KV(i)}function Qre(e,t){const r={};return t.forEach(i=>{i!=null&&i.beforeSetup&&i.beforeSetup(e)}),t.forEach(i=>{i&&XV(e,i,r)}),r}function ene(e,t){for(const r of t)r!=null&&r.afterAllSetup&&r.afterAllSetup(e)}function XV(e,t,r){if(r[t.name]){Kr&&ir.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,!gk.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),gk.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const i=t.preprocessEvent.bind(t);e.on("preprocessEvent",(a,h)=>i(a,h,e))}if(typeof t.processEvent=="function"){const i=t.processEvent.bind(t),a=Object.assign((h,d)=>i(h,d,e),{id:t.name});e.addEventProcessor(a)}["processSpan","processSegmentSpan"].forEach(i=>{const a=t[i];typeof a=="function"&&e.on(i,h=>a.call(t,h,e))}),Kr&&ir.log(`Integration installed: ${t.name}`)}function tne(e){return e}const YV="thismessage:/";function wL(e){return"isRelative"in e}function SL(e,t){const r=e.indexOf("://")<=0&&e.indexOf("//")!==0,i=r?YV:void 0;try{if("canParse"in URL&&!URL.canParse(e,i))return;const a=new URL(e,i);return r?{isRelative:r,pathname:a.pathname,search:a.search,hash:a.hash}:a}catch{}}function JV(e){if(wL(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function ev(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const r=t[6]||"",i=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:i,relative:t[5]+r+i}}function QV(e){return e.split(/[?#]/,1)[0]}function Mu(e,t=!0){if(e.startsWith("data:")){const r=e.match(/^data:([^;,]+)/),i=r?r[1]:"text/plain",a=e.includes(";base64,"),h=e.indexOf(",");let d="";if(t&&h!==-1){const o=e.slice(h+1);d=o.length>10?`${o.slice(0,10)}... [truncated]`:o}return`data:${i}${a?",base64":""}${d?`,${d}`:""}`}return e}function TL(e={}){const t=e.client||Zn();if(!WV()||!t)return{};const r=Yu(),i=ef(r);if(i.getTraceData)return i.getTraceData(e);const a=e.scope||kn(),h=e.span||ms(),d=h?NU(h):eq(a),o=h?gc(h):HU(t,a),y=TU(o);if(!YR.test(d))return ir.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const T={"sentry-trace":d,baggage:y};
39return e.propagateTraceparent&&(T.traceparent=h?jU(h):tq(a)),T}function eq(e){const{traceId:t,sampled:r,propagationSpanId:i}=e.getPropagationContext();return JR(t,i,r)}function tq(e){const{traceId:t,sampled:r,propagationSpanId:i}=e.getPropagationContext();return QR(t,i,r)}function rq(e,t,r,i,a){if(!e.fetchData)return;const{method:h,url:d}=e.fetchData,o=ao()&&t(d);if(e.endTimestamp){const P=e.fetchData.__span;if(!P)return;const L=i[P];L&&(o&&(sq(L,e),nq(L,e,a)),delete i[P]);return}const{spanOrigin:y="auto.http.browser",propagateTraceparent:w=!1}=typeof a=="object"?a:{spanOrigin:a},T=Zn(),k=!!ms(),M=o&&k?hl(lq(d,h,y)):new ga;if(o&&!k&&(T==null||T.recordDroppedEvent("no_parent_span","span")),e.fetchData.__span=M.spanContext().spanId,i[M.spanContext().spanId]=M,r(e.fetchData.url)){const P=e.args[0],L={...e.args[1]||{}},O=iq(P,L,ao()&&k?M:void 0,w);O&&(e.args[1]=L,L.headers=O)}if(T){const P={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};T.emit("beforeOutgoingRequestSpan",M,P)}return M}function nq(e,t,r){var a;const i=typeof r=="object"&&r!==null?r.onRequestSpanEnd:void 0;i==null||i(e,{headers:(a=t.response)==null?void 0:a.headers,error:t.error})}function iq(e,t,r,i){const a=TL({span:r,propagateTraceparent:i}),h=a["sentry-trace"],d=a.baggage,o=a.traceparent;if(!h)return;const y=t.headers||(bS(e)?e.headers:void 0);if(y)if(oq(y)){const w=new Headers(y);if(w.get("sentry-trace")||w.set("sentry-trace",h),i&&o&&!w.get("traceparent")&&w.set("traceparent",o),d){const T=w.get("baggage");T?jy(T)||w.set("baggage",`${T},${d}`):w.set("baggage",d)}return w}else if(aq(y)){const w=[...y];w.find(k=>k[0]==="sentry-trace")||w.push(["sentry-trace",h]),i&&o&&!w.find(k=>k[0]==="traceparent")&&w.push(["traceparent",o]);const T=y.find(k=>k[0]==="baggage"&&typeof k[1]=="string"&&jy(k[1]));return d&&!T&&w.push(["baggage",d]),w}else{const w="sentry-trace"in y?y["sentry-trace"]:void 0,T="traceparent"in y?y.traceparent:void 0,k="baggage"in y?y.baggage:void 0,M=k?Array.isArray(k)?[...k]:[k]:[],P=k&&(Array.isArray(k)?k.find(O=>jy(O)):jy(k));d&&!P&&M.push(d);const L=Object.assign({},y,{"sentry-trace":w??h,baggage:M.length>0?M.join(","):void 0});return i&&o&&!T&&(L.traceparent=o),L}else return{...a}}function sq(e,t){var r,i;if(t.response){HR(e,t.response.status);const a=(i=(r=t.response)==null?void 0:r.headers)==null?void 0:i.get("content-length");if(a){const h=parseInt(a);h>0&&e.setAttribute("http.response_content_length",h)}}else t.error&&e.setStatus({code:Pi,message:"internal_error"});e.end()}function jy(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(J_))}function oq(e){return typeof Headers<"u"&&Qd(e,Headers)}function aq(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function lq(e,t,r){if(e.startsWith("data:")){const h=Mu(e);return{name:`${t} ${h}`,attributes:yk(e,void 0,t,r)}}const i=SL(e),a=i?JV(i):e;return{name:`${t} ${a}`,attributes:yk(e,i,t,r)}}function yk(e,t,r,i){const a={url:Mu(e),type:"fetch","http.method":r,[$n]:i,[Vo]:"http.client"};return t&&(wL(t)||(a["http.url"]=Mu(t.href),a["server.address"]=t.host),t.search&&(a["http.query"]=t.search),t.hash&&(a["http.fragment"]=t.hash)),a}function cq(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function rne(){return"npm"}function uq(){return!cq()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function hq(){return typeof window<"u"&&(!uq()||dq())}function dq(){const e=tn.process;return(e==null?void 0:e.type)==="renderer"}const Sm=tn;function fq(){return"history"in Sm&&!!Sm.history}function pq(){if(!("fetch"in Sm))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function _k(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function mq(){var r;if(typeof EdgeRuntime=="string")return!0;if(!pq())return!1;if(_k(Sm.fetch))return!0;let e=!1;const t=Sm.document;if(t&&typeof t.createElement=="function")try{const i=t.createElement("iframe");i.hidden=!0,t.head.appendChild(i),(r=i.contentWindow)!=null&&r.fetch&&(e=_k(i.contentWindow.fetch)),t.head.removeChild(i)}catch(i){Kr&&ir.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return e}function gq(e,t){const r="fetch",i=Xd(r,e);return Yd(r,()=>CL(void 0,t)),i}function yq(e){const t="fetch-body-resolved",r=Xd(t,e);return Yd(t,()=>CL(vq)),r}function CL(e,t=!1){t&&!mq()||O1(tn,"fetch",function(r){return function(...i){const a=new Error,{method:h,url:d}=bq(i),o={args:i,fetchData:{method:h,url:d},startTimestamp:Hn()*1e3,virtualError:a,headers:xq(i)};return e||ma("fetch",{...o}),r.apply(tn,i).then(async y=>(e?e(y):ma("fetch",{...o,endTimestamp:Hn()*1e3,response:y}),y),y=>{ma("fetch",{...o,endTimestamp:Hn()*1e3,error:y}),zR(y)&&y.stack===void 0&&(y.stack=a.stack,lo(y,"framesToPop",1));const w=Zn(),T=(w==null?void 0:w.getOptions().enhanceFetchErrorMessages)??"always";if(T!==!1&&y instanceof TypeError&&(y.message==="Failed to fetch"||y.message==="Load failed"||y.message==="NetworkError when attempting to fetch resource."))try{const P=new URL(o.fetchData.url).host;T==="always"?y.message=`${y.message} (${P})`:lo(y,"__sentry_fetch_url_host__",P)}catch{}throw y})}})}async function _q(e,t){if(e!=null&&e.body){const r=e.body,i=r.getReader(),a=setTimeout(()=>{r.cancel().then(null,()=>{})},90*1e3);let h=!0;for(;h;){let d;try{d=setTimeout(()=>{r.cancel().then(null,()=>{})},5e3);const{done:o}=await i.read();clearTimeout(d),o&&(t(),h=!1)}catch{h=!1}finally{clearTimeout(d)}}clearTimeout(a),i.releaseLock(),r.cancel().then(null,()=>{})}}function vq(e){let t;try{t=e.clone()}catch{return}_q(t,()=>{ma("fetch-body-resolved",{endTimestamp:Hn()*1e3,response:e})})}function f_(e,t){return!!e&&typeof e=="object"&&!!e[t]}function vk(e){return typeof e=="string"?e:e?f_(e,"url")?e.url:e.toString?e.toString():"":""}function bq(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[r,i]=e;return{url:vk(r),method:f_(i,"method")?String(i.method).toUpperCase():bS(r)&&f_(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:vk(t),method:f_(t,"method")?String(t.method).toUpperCase():"GET"}}function xq(e){const[t,r]=e;try{if(typeof r=="object"&&r!==null&&"headers"in r&&r.headers)return new Headers(r.headers);if(bS(t))return new Headers(t.headers)}catch{}}const Ji=tn;let q1=0;function nne(){return q1>0}function wq(){q1++,setTimeout(()=>{q1--})}function Sq(e,t={}){function r(a){return typeof a=="function"}if(!r(e))return e;try{const a=e.__sentry_wrapped__;if(a)return typeof a=="function"?a:e;if(Y8(e))return e}catch{return e}const i=function(...a){try{const h=a.map(d=>Sq(d,t));return e.apply(this,h)}catch(h){throw wq(),SS(d=>{d.addEventProcessor(o=>(t.mechanism&&(eU(o,void 0),$R(o,t.mechanism)),o.extra={...o.extra,arguments:a},o)),Qm(h)}),h}};try{for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(i[a]=e[a])}catch{}FR(i,e),lo(e,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get(){return e.name}})}catch{}return i}function EL(){const e=wS(),{referrer:t}=Ji.document||{},{userAgent:r}=Ji.navigator||{},i={...t&&{Referer:t},...r&&{"User-Agent":r}};return{url:e,headers:i}}const wc=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ar=tn,Tq=(e,t)=>
39e>t[1]?"poor":e>t[0]?"needs-improvement":"good",eg=(e,t,r,i)=>{let a,h;return d=>{t.value>=0&&(d||i)&&(h=t.value-(a??0),(h||a===void 0)&&(a=t.value,t.delta=h,t.rating=Tq(t.value,r),e(t)))}},tg=(e=!0)=>{var r,i;const t=(i=(r=Ar.performance)==null?void 0:r.getEntriesByType)==null?void 0:i.call(r,"navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},rf=()=>{const e=tg();return(e==null?void 0:e.activationStart)??0};function hc(e,t,r){Ar.document&&Ar.addEventListener(e,t,r)}function tv(e,t,r){Ar.document&&Ar.removeEventListener(e,t,r)}let wd=-1;const kL=new Set,Cq=()=>{var e,t;return((e=Ar.document)==null?void 0:e.visibilityState)==="hidden"&&!((t=Ar.document)!=null&&t.prerendering)?0:1/0},p_=e=>{if(Eq(e)&&wd>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of kL)t();isFinite(wd)||(wd=e.type==="visibilitychange"?e.timeStamp:0,tv("prerenderingchange",p_,!0))}},rg=()=>{var e;if(Ar.document&&wd<0){const t=rf();wd=(Ar.document.prerendering||(e=globalThis.performance.getEntriesByType("visibility-state").filter(i=>i.name==="hidden"&&i.startTime>t)[0])==null?void 0:e.startTime)??Cq(),hc("visibilitychange",p_,!0),hc("pagehide",p_,!0),hc("prerenderingchange",p_,!0)}return{get firstHiddenTime(){return wd},onHidden(t){kL.add(t)}}};function Eq(e){var t;return e.type==="pagehide"||((t=Ar.document)==null?void 0:t.visibilityState)==="hidden"}const kq=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,ng=(e,t=-1)=>{var h,d;const r=tg();let i="navigate";return r&&((h=Ar.document)!=null&&h.prerendering||rf()>0?i="prerender":(d=Ar.document)!=null&&d.wasDiscarded?i="restore":r.type&&(i=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:kq(),navigationType:i}},ux=new WeakMap;function PS(e,t){try{return ux.get(e)||ux.set(e,new t),ux.get(e)}catch{return new t}}class rv{constructor(){rv.prototype.__init.call(this),rv.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){var a;if(t.hadRecentInput)return;const r=this._sessionEntries[0],i=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&r&&i&&t.startTime-i.startTime<1e3&&t.startTime-r.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),(a=this._onAfterProcessingUnexpectedShift)==null||a.call(this,t)}}const nf=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const i=new PerformanceObserver(a=>{Promise.resolve().then(()=>{t(a.getEntries())})});return i.observe({type:e,buffered:!0,...r}),i}}catch{}},AS=e=>{let t=!1;return()=>{t||(e(),t=!0)}},Kv=e=>{var t;(t=Ar.document)!=null&&t.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Iq=[1800,3e3],Pq=(e,t={})=>{Kv(()=>{const r=rg(),i=ng("FCP");let a;const d=nf("paint",o=>{for(const y of o)y.name==="first-contentful-paint"&&(d.disconnect(),y.startTime<r.firstHiddenTime&&(i.value=Math.max(y.startTime-rf(),0),i.entries.push(y),a(!0)))});d&&(a=eg(e,i,Iq,t.reportAllChanges))})},Aq=[.1,.25],Mq=(e,t={})=>{Pq(AS(()=>{var y;const r=ng("CLS",0);let i;const a=rg(),h=PS(t,rv),d=w=>{for(const T of w)h._processEntry(T);h._sessionValue>r.value&&(r.value=h._sessionValue,r.entries=h._sessionEntries,i())},o=nf("layout-shift",d);o&&(i=eg(e,r,Aq,t.reportAllChanges),a.onHidden(()=>{d(o.takeRecords()),i(!0)}),(y=Ar==null?void 0:Ar.setTimeout)==null||y.call(Ar,i))}))};let IL=0,hx=1/0,$y=0;const Rq=e=>{e.forEach(t=>{t.interactionId&&(hx=Math.min(hx,t.interactionId),$y=Math.max($y,t.interactionId),IL=$y?($y-hx)/7+1:0)})};let G1;const PL=()=>G1?IL:performance.interactionCount||0,Lq=()=>{"interactionCount"in performance||G1||(G1=nf("event",Rq,{type:"event",buffered:!0,durationThreshold:0}))},dx=10;let AL=0;const zq=()=>PL()-AL;class nv{constructor(){nv.prototype.__init.call(this),nv.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){AL=PL(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(zq()/50));return this._longestInteractionList[t]}_processEntry(t){var a,h;
39if((a=this._onBeforeProcessingEntry)==null||a.call(this,t),!(t.interactionId||t.entryType==="first-input"))return;const r=this._longestInteractionList.at(-1);let i=this._longestInteractionMap.get(t.interactionId);if(i||this._longestInteractionList.length<dx||t.duration>r._latency){if(i?t.duration>i._latency?(i.entries=[t],i._latency=t.duration):t.duration===i._latency&&t.startTime===i.entries[0].startTime&&i.entries.push(t):(i={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(i.id,i),this._longestInteractionList.push(i)),this._longestInteractionList.sort((d,o)=>o._latency-d._latency),this._longestInteractionList.length>dx){const d=this._longestInteractionList.splice(dx);for(const o of d)this._longestInteractionMap.delete(o.id)}(h=this._onAfterProcessingINPCandidate)==null||h.call(this,i)}}}const ML=e=>{var r;const t=Ar.requestIdleCallback||Ar.setTimeout;((r=Ar.document)==null?void 0:r.visibilityState)==="hidden"?e():(e=AS(e),hc("visibilitychange",e,{once:!0,capture:!0}),hc("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),tv("visibilitychange",e,{capture:!0}),tv("pagehide",e,{capture:!0})}))},Dq=[200,500],Oq=40,Fq=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const r=rg();Kv(()=>{Lq();const i=ng("INP");let a;const h=PS(t,nv),d=y=>{ML(()=>{for(const T of y)h._processEntry(T);const w=h._estimateP98LongestInteraction();w&&w._latency!==i.value&&(i.value=w._latency,i.entries=w.entries,a())})},o=nf("event",d,{durationThreshold:t.durationThreshold??Oq});a=eg(e,i,Dq,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),r.onHidden(()=>{d(o.takeRecords()),a(!0)}))})};class Bq{_processEntry(t){var r;(r=this._onBeforeProcessingEntry)==null||r.call(this,t)}}const Nq=[2500,4e3],jq=(e,t={})=>{Kv(()=>{const r=rg(),i=ng("LCP");let a;const h=PS(t,Bq),d=y=>{t.reportAllChanges||(y=y.slice(-1));for(const w of y)h._processEntry(w),w.startTime<r.firstHiddenTime&&(i.value=Math.max(w.startTime-rf(),0),i.entries=[w],a())},o=nf("largest-contentful-paint",d);if(o){a=eg(e,i,Nq,t.reportAllChanges);const y=AS(()=>{d(o.takeRecords()),o.disconnect(),a(!0)}),w=T=>{T.isTrusted&&(ML(y),tv(T.type,w,{capture:!0}))};for(const T of["keydown","click","visibilitychange"])hc(T,w,{capture:!0})}})},$q=[800,1800],H1=e=>{var t,r;(t=Ar.document)!=null&&t.prerendering?Kv(()=>H1(e)):((r=Ar.document)==null?void 0:r.readyState)!=="complete"?addEventListener("load",()=>H1(e),!0):setTimeout(e)},Uq=(e,t={})=>{const r=ng("TTFB"),i=eg(e,r,$q,t.reportAllChanges);H1(()=>{const a=tg();a&&(r.value=Math.max(a.responseStart-rf(),0),r.entries=[a],i(!0))})},em={},iv={};let RL,LL,zL,DL;function MS(e,t=!1){return Xv("cls",e,qq,RL,t)}function RS(e,t=!1){return Xv("lcp",e,Gq,LL,t)}function Vq(e){return Xv("ttfb",e,Hq,zL)}function OL(e){return Xv("inp",e,Zq,DL)}function Tm(e,t){return FL(e,t),iv[e]||(Wq(e),iv[e]=!0),BL(e,t)}function ig(e,t){const r=em[e];if(r!=null&&r.length)for(const i of r)try{i(t)}catch(a){wc&&ir.error(`Error while triggering instrumentation handler.
40Type: ${e}
41Name: ${vS(i)}
42Error:`,a)}}function qq(){return Mq(e=>{ig("cls",{metric:e}),RL=e},{reportAllChanges:!0})}function Gq(){return jq(e=>{ig("lcp",{metric:e}),LL=e},{reportAllChanges:!0})}function Hq(){return Uq(e=>{ig("ttfb",{metric:e}),zL=e})}function Zq(){return Fq(e=>{ig("inp",{metric:e}),DL=e})}function Xv(e,t,r,i,a=!1){FL(e,t);let h;return iv[e]||(h=r(),iv[e]=!0),i&&t({metric:i}),BL(e,t,a?h:void 0)}function Wq(e){const t={};e==="event"&&(t.durationThreshold=0),nf(e,r=>{ig(e,{entries:r})},t)}function FL(e,t){em[e]=em[e]||[],em[e].push(t)}function BL(e,t,r){return()=>{r&&r();const i=em[e];if(!i)return;const a=i.indexOf(t);a!==-1&&i.splice(a,1)}}function Kq(e){return"duration"in e}const Xq=e=>{const t=r=>{var i;(r.type==="pagehide"||((i=Ar.document)==null?void 0:i.visibilityState)==="hidden")&&e(r)};hc("visibilitychange",t,{capture:!0,once:!0}),hc("pagehide",t,{capture:!0,once:!0})};function fx(e){return typeof e=="number"&&isFinite(e)}function yc(e,t,r,{...i}){const a=en(e).start_timestamp;return a&&a>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),mL(e,()=>{const h=hl({startTime:t,...i});return h&&h.end(r),h})}function LS(e){var $;const t=Zn();if(!t)return;const{name:r,transaction:i,attributes:a,startTime:h}=e,{release:d,environment:o,sendDefaultPii:y}=t.getOptions(),w=t.getIntegrationByName("Replay"),T=w==null?void 0:w.getReplayId(),k=kn(),M=k.getUser(),P=M!==void 0?M.email||M.id||M.ip_address:void 0;let L;try{L=k.getScopeData().contexts.profile.profile_id}catch{}const O={release:d,environment:o,user:P||void 0,profile_id:L||void 0,replay_id:T||void 0,transaction:i,"user_agent.original":($=Ar.navigator)==null?void 0:$.userAgent,"client.address":y?"{{auto}}":void 0,...a};return hl({name:r,attributes:O,startTime:h,experimental:{standalone:!0}})}function sg(){return Ar.addEventListener&&Ar.performance}function Rn(e){return e/1e3}function Yq(e){let t="unknown",r="unknown",i="";for(const a of e){if(a==="/"){[t,r]=e.split("/");break}if(!isNaN(Number(a))){t=i==="h"?"http":i,r=e.split(i)[1];break}i+=a}
42return i===e&&(t=i),{name:t,version:r}}function Yv(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Jv(e,t){let r,i=!1;function a(o){!i&&r&&t(o,r.spanContext().spanId,r),i=!0}Xq(()=>{a("pagehide")});const h=e.on("beforeStartNavigationSpan",(o,y)=>{y!=null&&y.isRedirect||(a("navigation"),h(),d())}),d=e.on("afterStartPageLoadSpan",o=>{r=o,d()})}function Jq(e){let t=0,r;if(!Yv("layout-shift"))return;const i=MS(({metric:a})=>{const h=a.entries[a.entries.length-1];h&&(t=a.value,r=h)},!0);Jv(e,(a,h)=>{Qq(t,r,h,a),i()})}function Qq(e,t,r,i){var w;wc&&ir.log(`Sending CLS span (${e})`);const a=t?Rn((es()||0)+t.startTime):Hn(),h=kn().getScopeData().transactionName,d=t?Qi((w=t.sources[0])==null?void 0:w.node):"Layout shift",o={[$n]:"auto.http.browser.cls",[Vo]:"ui.webvital.cls",[tf]:0,"sentry.pageload.span_id":r,"sentry.report_event":i};t!=null&&t.sources&&t.sources.forEach((T,k)=>{o[`cls.source.${k+1}`]=Qi(T.node)});const y=LS({name:d,transaction:h,attributes:o,startTime:a});y&&(y.addEvent("cls",{[Ym]:"",[Jm]:e}),y.end(a))}const e7=6e4;function og(e){return e!=null&&e>0&&e<=e7}function t7(e){let t=0,r;if(!Yv("largest-contentful-paint"))return;const i=RS(({metric:a})=>{const h=a.entries[a.entries.length-1];!h||!og(a.value)||(t=a.value,r=h)},!0);Jv(e,(a,h)=>{r7(t,r,h,a),i()})}function r7(e,t,r,i){if(!og(e))return;wc&&ir.log(`Sending LCP span (${e})`);const a=Rn((es()||0)+((t==null?void 0:t.startTime)||0)),h=kn().getScopeData().transactionName,d=t?Qi(t.element):"Largest contentful paint",o={[$n]:"auto.http.browser.lcp",[Vo]:"ui.webvital.lcp",[tf]:0,"sentry.pageload.span_id":r,"sentry.report_event":i};t&&(t.element&&(o["lcp.element"]=Qi(t.element)),t.id&&(o["lcp.id"]=t.id),t.url&&(o["lcp.url"]=t.url),t.loadTime!=null&&(o["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(o["lcp.renderTime"]=t.renderTime),t.size!=null&&(o["lcp.size"]=t.size));const y=LS({name:d,transaction:h,attributes:o,startTime:a});y&&(y.addEvent("lcp",{[Ym]:"millisecond",[Jm]:e}),y.end(a))}function Qs(e){return e&&((es()||performance.timeOrigin)+e)/1e3}function NL(e){var r;const t={};if(e.nextHopProtocol!=null){const{name:i,version:a}=Yq(e.nextHopProtocol);t["network.protocol.version"]=a,t["network.protocol.name"]=i}return es()||(r=sg())!=null&&r.timeOrigin?n7({...t,"http.request.redirect_start":Qs(e.redirectStart),"http.request.redirect_end":Qs(e.redirectEnd),"http.request.worker_start":Qs(e.workerStart),"http.request.fetch_start":Qs(e.fetchStart),"http.request.domain_lookup_start":Qs(e.domainLookupStart),"http.request.domain_lookup_end":Qs(e.domainLookupEnd),"http.request.connect_start":Qs(e.connectStart),"http.request.secure_connection_start":Qs(e.secureConnectionStart),"http.request.connection_end":Qs(e.connectEnd),"http.request.request_start":Qs(e.requestStart),"http.request.response_start":Qs(e.responseStart),"http.request.response_end":Qs(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function n7(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const i7=2147483647;let bk=0,cs={},ws,fd;function s7({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:r}){const i=sg();if(i&&es()){i.mark&&Ar.performance.mark("sentry-tracing-init");const a=t?t7(r):t===!1?u7():void 0,h=e?Jq(r):e===!1?c7():void 0,d=h7();return()=>{d(),a==null||a(),h==null||h()}}return()=>{}}function o7(){Tm("longtask",({entries:e})=>{const t=ms();if(!t)return;const{op:r,start_timestamp:i}=en(t);for(const a of e){const h=Rn(es()+a.startTime),d=Rn(a.duration);r==="navigation"&&i&&h<i||yc(t,h,h+d,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[$n]:"auto.ui.browser.metrics"}})}})}function a7(){new PerformanceObserver(t=>{const r=ms();if(r)for(const i of t.getEntries()){if(!i.scripts[0])continue;const a=Rn(es()+i.startTime),{start_timestamp:h,op:d}=en(r);if(d==="navigation"&&h&&a<h)continue;const o=Rn(i.duration),y={[$n]:"auto.ui.browser.metrics"},w=i.scripts[0],{invoker:T,invokerType:k,sourceURL:M,sourceFunctionName:P,sourceCharPosition:L}=w;y["browser.script.invoker"]=T,y["browser.script.invoker_type"]=k,M&&(y["code.filepath"]=M),P&&(y["code.function"]=P),L!==-1&&(y["browser.script.source_char_position"]=L),yc(r,a,a+o,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:y})}}).observe({type:"long-animation-frame",buffered:!0})}function l7(){Tm("event",({entries:e})=>{const t=ms();if(t){for(const r of e)if(r.name==="click"){const i=Rn(es()+r.startTime),a=Rn(r.duration),h={name:Qi(r.target),op:`ui.interaction.${r.name}`,startTime:i,attributes:{[$n]:"auto.ui.browser.metrics"}},d=X8(r.target);d&&(h.attributes["ui.component_name"]=d),yc(t,i,i+a,h)}}})}function c7(){return MS(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(cs.cls={value:e.value,unit:""},fd=t)},!0)}function u7(){return RS(({metric:e})=>{const t=e.entries[e.entries.length-1];!t||!og(e.value)||(cs.lcp={value:e.value,unit:"millisecond"},ws=t)},!0)}function h7(){return Vq(({metric:e})=>{e.entries[e.entries.length-1]&&(cs.ttfb={value:e.value,unit:"millisecond"})})}function d7(e,t){const r=sg(),i=es();if(!(r!=null&&r.getEntries)||!i)return;const{spanStreamingEnabled:a,ignorePerformanceApiSpans:h,ignoreResourceSpans:d,recordClsOnPageloadSpan:o,recordLcpOnPageloadSpan:y}=t,w=Rn(i),T=r.getEntries(),{op:k,start_timestamp:M}=en(e);
42if(T.slice(bk).forEach(P=>{const L=Rn(P.startTime),O=Rn(Math.max(0,P.duration));if(!(k==="navigation"&&M&&w+L<M))switch(P.entryType){case"navigation":{g7(e,P,w);break}case"mark":case"paint":case"measure":{p7(e,P,L,O,w,h);const $=rg(),Z=P.startTime<$.firstHiddenTime;P.name==="first-paint"&&Z&&(cs.fp={value:P.startTime,unit:"millisecond"}),P.name==="first-contentful-paint"&&Z&&(cs.fcp={value:P.startTime,unit:"millisecond"});break}case"resource":{v7(e,P,P.name,L,O,w,d);break}}}),bk=Math.max(T.length-1,0),b7(e,a),k==="pageload"){if(S7(cs),a){const P=(L,O,$)=>{const Z=$??`browser.web_vital.${L}.value`;e.setAttribute(Z,O),wc&&ir.log("Setting web vital attribute",{[Z]:O},"on pageload span")};["ttfb","fp","fcp"].forEach(L=>{cs[L]&&P(L,cs[L].value)}),cs["ttfb.requestTime"]&&P("ttfb.requestTime",cs["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else o||delete cs.cls,y||delete cs.lcp,Object.entries(cs).forEach(([P,L])=>{fV(P,L.value,L.unit)}),x7(e,t);e.setAttribute(a?"browser.performance.time_origin":"performance.timeOrigin",w),e.setAttribute(a?"browser.performance.navigation.activation_start":"performance.activationStart",rf())}ws=void 0,fd=void 0,cs={}}function f7(e){if((e==null?void 0:e.entryType)==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function p7(e,t,r,i,a,h){if(f7(t)||["mark","measure"].includes(t.entryType)&&c_(t.name,h))return;const d=tg(!1),o=Rn(d?d.requestStart:0),y=a+Math.max(r,o),w=a+r,T=w+i,k={[$n]:"auto.resource.browser.metrics"};y!==w&&(k["sentry.browser.measure_happened_before_request"]=!0,k["sentry.browser.measure_start_time"]=y),m7(k,t),y<=T&&yc(e,y,T,{name:t.name,op:t.entryType,attributes:k})}function m7(e,t){try{const r=t.detail;if(!r)return;if(typeof r=="object"){for(const[i,a]of Object.entries(r))if(a&&ZE(a))e[`sentry.browser.measure.detail.${i}`]=a;else if(a!==void 0)try{e[`sentry.browser.measure.detail.${i}`]=JSON.stringify(a)}catch{}return}if(ZE(r)){e["sentry.browser.measure.detail"]=r;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(r)}catch{}}catch{}}function g7(e,t,r){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(i=>{Uy(e,t,i,r)}),Uy(e,t,"secureConnection",r,"TLS/SSL"),Uy(e,t,"fetch",r,"cache"),Uy(e,t,"domainLookup",r,"DNS"),_7(e,t,r)}function Uy(e,t,r,i,a=r){const h=y7(r),d=t[h],o=t[`${r}Start`];!o||!d||yc(e,i+Rn(o),i+Rn(d),{op:`browser.${a}`,name:t.name,attributes:{[$n]:"auto.ui.browser.metrics",...r==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function y7(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function _7(e,t,r){const i=r+Rn(t.requestStart),a=r+Rn(t.responseEnd),h=r+Rn(t.responseStart);t.responseEnd&&(yc(e,i,a,{op:"browser.request",name:t.name,attributes:{[$n]:"auto.ui.browser.metrics"}}),yc(e,h,a,{op:"browser.response",name:t.name,attributes:{[$n]:"auto.ui.browser.metrics"}}))}function v7(e,t,r,i,a,h,d){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(d!=null&&d.includes(o))return;const y={[$n]:"auto.resource.browser.metrics"},w=ev(r);w.protocol&&(y["url.scheme"]=w.protocol.split(":").pop()),w.host&&(y["server.address"]=w.host),y["url.same_origin"]=r.includes(Ar.location.origin),w7(t,y,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const T={...y,...NL(t)},k=h+i,M=k+a;yc(e,k,M,{name:r.replace(Ar.location.origin,""),op:o,attributes:T})}function b7(e,t){const r=Ar.navigator;if(!r)return;const i=r.connection;i&&(i.effectiveType&&e.setAttribute(t?"network.connection.effective_type":"effectiveConnectionType",i.effectiveType),i.type&&e.setAttribute(t?"network.connection.type":"connectionType",i.type),fx(i.rtt)&&(cs["connection.rtt"]={value:i.rtt,unit:"millisecond"},t&&e.setAttribute("network.connection.rtt",i.rtt))),fx(r.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",r.deviceMemory):e.setAttribute("deviceMemory",`${r.deviceMemory} GB`)),fx(r.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",r.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(r.hardwareConcurrency)))}function x7(e,t){ws&&t.recordLcpOnPageloadSpan&&(ws.element&&e.setAttribute("lcp.element",Qi(ws.element)),ws.id&&e.setAttribute("lcp.id",ws.id),ws.url&&e.setAttribute("lcp.url",ws.url.trim().slice(0,200)),ws.loadTime!=null&&e.setAttribute("lcp.loadTime",ws.loadTime),ws.renderTime!=null&&e.setAttribute("lcp.renderTime",ws.renderTime),e.setAttribute("lcp.size",ws.size)),fd!=null&&fd.sources&&t.recordClsOnPageloadSpan&&fd.sources.forEac
42h((r,i)=>e.setAttribute(`cls.source.${i+1}`,Qi(r.node)))}function w7(e,t,r){r.forEach(([i,a])=>{const h=e[i];h!=null&&(typeof h=="number"&&h<i7||typeof h=="string")&&(t[a]=h)})}function S7(e){const t=tg(!1);if(!t)return;const{responseStart:r,requestStart:i}=t;i<=r&&(e["ttfb.requestTime"]={value:r-i,unit:"millisecond"})}const px=[],tm=new Map,rd=new Map,jL=60;function T7(){if(sg()&&es()){const t=C7();return()=>{t()}}return()=>{}}const Cm={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function C7(){return OL(E7)}const E7=({metric:e})=>{if(e.value==null)return;const t=Rn(e.value);if(t>jL)return;const r=e.entries.find(L=>L.duration===e.value&&Cm[L.name]);if(!r)return;const{interactionId:i}=r,a=Cm[r.name],h=Rn(es()+r.startTime),d=ms(),o=d?Ui(d):void 0,y=i!=null?tm.get(i):void 0,w=(y==null?void 0:y.span)||o,T=w?en(w).description:kn().getScopeData().transactionName,k=(y==null?void 0:y.elementName)||Qi(r.target),M={[$n]:"auto.http.browser.inp",[Vo]:`ui.interaction.${a}`,[tf]:r.duration},P=LS({name:k,transaction:T,attributes:M,startTime:h});P&&(P.addEvent("inp",{[Ym]:"millisecond",[Jm]:e.value}),P.end(h+t))};function k7(e){return e!=null?tm.get(e):void 0}function I7(){const e=Object.keys(Cm);hq()&&e.forEach(a=>{Ar.addEventListener(a,t,{capture:!0,passive:!0})});function t(a){const h=a.target;if(!h)return;const d=Qi(h),o=Math.round(a.timeStamp);if(rd.set(o,d),rd.size>50){const y=rd.keys().next().value;y!==void 0&&rd.delete(y)}}function r(a){const h=Math.round(a.startTime);let d=rd.get(h);if(!d)for(let o=-5;o<=5;o++){const y=rd.get(h+o);if(y){d=y;break}}return d||"<unknown>"}const i=({entries:a})=>{const h=ms(),d=h&&Ui(h);a.forEach(o=>{if(!Kq(o))return;const y=o.interactionId;if(y==null||tm.has(y))return;const w=o.target?Qi(o.target):r(o);if(px.length>10){const T=px.shift();tm.delete(T)}px.push(y),tm.set(y,{span:d,elementName:w})})};Tm("event",i),Tm("first-input",i)}function zS(e){var L,O;const{name:t,op:r,origin:i,metricName:a,value:h,attributes:d,parentSpan:o,reportEvent:y,startTime:w,endTime:T}=e,k=kn().getScopeData().transactionName,M={[$n]:i,[Vo]:r,[tf]:0,[`browser.web_vital.${a}.value`]:h,"sentry.transaction":k,"user_agent.original":(L=Ar.navigator)==null?void 0:L.userAgent,...d};o&&((O=nL(o).attributes)==null?void 0:O[Vo])==="pageload"&&(M["sentry.pageload.span_id"]=o.spanContext().spanId),y&&(M[`browser.web_vital.${a}.report_event`]=y);const P=hl({name:t,attributes:M,startTime:w,parentSpan:o});P&&P.end(T??w)}function P7(e){let t=0,r;if(!Yv("largest-contentful-paint"))return;const i=RS(({metric:a})=>{const h=a.entries[a.entries.length-1];!h||!og(a.value)||(t=a.value,r=h)},!0);Jv(e,(a,h,d)=>{A7(t,r,d,a),i()})}function A7(e,t,r,i){if(!og(e))return;wc&&ir.log(`Sending LCP span (${e})`);const a=es()||0,h=Rn(a),d=Rn(a+((t==null?void 0:t.startTime)||0)),o=t?Qi(t.element):"Largest contentful paint",y={};t!=null&&t.element&&(y["browser.web_vital.lcp.element"]=Qi(t.element)),t!=null&&t.id&&(y["browser.web_vital.lcp.id"]=t.id),t!=null&&t.url&&(y["browser.web_vital.lcp.url"]=t.url),(t==null?void 0:t.loadTime)!=null&&(y["browser.web_vital.lcp.load_time"]=t.loadTime),(t==null?void 0:t.renderTime)!=null&&(y["browser.web_vital.lcp.render_time"]=t.renderTime),(t==null?void 0:t.size)!=null&&(y["browser.web_vital.lcp.size"]=t.size),zS({name:o,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:y,parentSpan:r,reportEvent:i,startTime:h,endTime:d})}function M7(e){let t=0,r;if(!Yv("layout-shift"))return;const i=MS(({metric:a})=>{const h=a.entries[a.entries.length-1];h&&(t=a.value,r=h)},!0);Jv(e,(a,h,d)=>{R7(t,r,d,a),i()})}function R7(e,t,r,i){var o;wc&&ir.log(`Sending CLS span (${e})`);const a=t?Rn((es()||0)+t.startTime):Hn(),h=t?Qi((o=t.sources[0])==null?void 0:o.node):"Layout shift",d={};
42t!=null&&t.sources&&t.sources.forEach((y,w)=>{d[`browser.web_vital.cls.source.${w+1}`]=Qi(y.node)}),zS({name:h,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:d,parentSpan:r,reportEvent:i,startTime:a})}function L7(){if(!sg()||!es())return;OL(({metric:r})=>{if(r.value==null||Rn(r.value)>jL)return;const a=r.entries.find(h=>h.duration===r.value&&Cm[h.name]);a&&z7(r.value,a)})}function z7(e,t){wc&&ir.log(`Sending INP span (${e})`);const r=Rn(es()+t.startTime),i=Rn(e),a=Cm[t.name],h=k7(t.interactionId),d=ms(),o=d?Ui(d):void 0,y=(h==null?void 0:h.span)||o,w=y?nL(y).name:kn().getScopeData().transactionName,T=(h==null?void 0:h.elementName)||Qi(t.target);zS({name:T,op:`ui.interaction.${a}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[tf]:t.duration,"sentry.transaction":w},startTime:r,endTime:r+i,parentSpan:y})}let Vy;function D7(e){const t="history";Xd(t,e),Yd(t,O7)}function O7(){if(Ar.addEventListener("popstate",()=>{const t=Ar.location.href,r=Vy;if(Vy=t,r===t)return;ma("history",{from:r,to:t})}),!fq())return;function e(t){return function(...r){const i=r.length>2?r[2]:void 0;if(i){const a=Vy,h=F7(String(i));if(Vy=h,a===h)return t.apply(this,r);ma("history",{from:a,to:h})}return t.apply(this,r)}}O1(Ar.history,"pushState",e),O1(Ar.history,"replaceState",e)}function F7(e){try{return new URL(e,Ar.location.origin).toString()}catch{return e}}const Np="__sentry_xhr_v3__";function B7(e){const t="xhr";Xd(t,e),Yd(t,N7)}function N7(){if(!Ar.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,r,i){const a=new Error,h=Hn()*1e3,d=cc(i[0])?i[0].toUpperCase():void 0,o=j7(i[1]);if(!d||!o)return t.apply(r,i);r[Np]={method:d,url:o,request_headers:{}},d==="POST"&&o.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const y=()=>{const w=r[Np];if(w&&r.readyState===4){try{w.status_code=r.status}catch{}const T={endTimestamp:Hn()*1e3,startTimestamp:h,xhr:r,virtualError:a};ma("xhr",T)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(w,T,k){return y(),w.apply(T,k)}}):r.addEventListener("readystatechange",y),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(w,T,k){const[M,P]=k,L=T[Np];return L&&cc(M)&&cc(P)&&(L.request_headers[M.toLowerCase()]=P),w.apply(T,k)}}),t.apply(r,i)}}),e.send=new Proxy(e.send,{apply(t,r,i){const a=r[Np];if(!a)return t.apply(r,i);i[0]!==void 0&&(a.body=i[0]);const h={startTimestamp:Hn()*1e3,xhr:r};return ma("xhr",h),t.apply(r,i)}})}function j7(e){if(cc(e))return e;try{return e.toString()}catch{}}function $7(e){let t;try{t=e.getAllResponseHeaders()}catch(r){return wc&&ir.error(r,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
43`).reduce((r,i)=>{const[a,h]=i.split(": ");return h&&(r[a.toLowerCase()]=h),r},{}):{}}const nl=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function U7(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function $L(e){try{return new URL(e,Ji.location.origin).href}catch{return}}function V7(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function UL(e){try{return new Headers(e)}catch{return}}const xk=new WeakMap,mx=new Map,VL={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function q7(e,t){const{traceFetch:r,traceXHR:i,trackFetchStreamPerformance:a,shouldCreateSpanForRequest:h,enableHTTPTimings:d,tracePropagationTargets:o,onRequestSpanStart:y,onRequestSpanEnd:w}={...VL,...t},T=typeof h=="function"?h:L=>!0,k=L=>H7(L,o),M={},P=e.getOptions().propagateTraceparent;r&&(e.addEventProcessor(L=>(L.type==="transaction"&&L.spans&&L.spans.forEach(O=>{if(O.op==="http.client"){const $=mx.get(O.span_id);$&&(O.timestamp=$/1e3,mx.delete(O.span_id))}}),L)),a&&yq(L=>{if(L.response){const O=xk.get(L.response);O&&L.endTimestamp&&mx.set(O,L.endTimestamp)}}),gq(L=>{const O=rq(L,T,k,M,{propagateTraceparent:P,onRequestSpanEnd:w});if(L.response&&L.fetchData.__span&&xk.set(L.response,L.fetchData.__span),O){const $=$L(L.fetchData.url),Z=$?ev($).host:void 0;O.setAttributes({"http.url":$?Mu($):void 0,"server.address":Z}),d&&wk(O,e),y==null||y(O,{headers:L.headers})}})),i&&B7(L=>{var $;const O=Z7(L,T,k,M,P,w);O&&(d&&wk(O,e),y==null||y(O,{headers:UL(($=L.xhr.__sentry_xhr_v3__)==null?void 0:$.request_headers)}))})}const G7=300;function wk(e,t){const{url:r}
43=en(e).data;if(!r||typeof r!="string")return;let i=()=>void setTimeout(a);if(Uu(t)){const h=e.end.bind(e);e.end=d=>{const o=d??Hn();let y=!1;const w=()=>{y||(y=!0,setTimeout(a),h(o),clearTimeout(T))};i=w;const T=setTimeout(w,G7)}}const a=Tm("resource",({entries:h})=>{h.forEach(d=>{V7(d)&&d.name.endsWith(r)&&(e.setAttributes(NL(d)),i())})})}function H7(e,t){const r=wS();if(r){let i,a;try{i=new URL(e,r),a=new URL(r).origin}catch{return!1}const h=i.origin===a;return t?c_(i.toString(),t)||h&&c_(i.pathname,t):h}else{const i=!!e.match(/^\/(?!\/)/);return t?c_(e,t):i}}function Z7(e,t,r,i,a,h){const d=e.xhr,o=d==null?void 0:d[Np];if(!d||d.__sentry_own_request__||!o)return;const{url:y,method:w}=o,T=ao()&&t(y);if(e.endTimestamp){const Z=d.__sentry_xhr_span_id__;if(!Z)return;const J=i[Z];J&&(T&&o.status_code!==void 0&&(HR(J,o.status_code),J.end(),h==null||h(J,{headers:UL($7(d)),error:e.error})),delete i[Z]);return}const k=$L(y),M=ev(k||y),P=Mu(QV(y)),L=Zn(),O=!!ms(),$=T&&O?hl({name:`${w} ${P}`,attributes:{url:Mu(y),type:"xhr","http.method":w,"http.url":k?Mu(k):void 0,"server.address":M==null?void 0:M.host,[$n]:"auto.http.browser",[Vo]:"http.client",...(M==null?void 0:M.search)&&{"http.query":M==null?void 0:M.search},...(M==null?void 0:M.hash)&&{"http.fragment":M==null?void 0:M.hash}}}):new ga;return T&&!O&&(L==null||L.recordDroppedEvent("no_parent_span","span")),d.__sentry_xhr_span_id__=$.spanContext().spanId,i[d.__sentry_xhr_span_id__]=$,r(y)&&W7(d,ao()&&O?$:void 0,a),L&&L.emit("beforeOutgoingRequestSpan",$,e),$}function W7(e,t,r){const{"sentry-trace":i,baggage:a,traceparent:h}=TL({span:t,propagateTraceparent:r});i&&K7(e,i,a,h)}function K7(e,t,r,i){var h;const a=(h=e.__sentry_xhr_v3__)==null?void 0:h.request_headers;if(!(a!=null&&a["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),i&&!(a!=null&&a.traceparent)&&e.setRequestHeader("traceparent",i),r){const d=a==null?void 0:a.baggage;(!d||!U7(d))&&e.setRequestHeader("baggage",r)}}catch{}}function X7(){Ji.document?Ji.document.addEventListener("visibilitychange",()=>{const e=ms();if(!e)return;const t=Ui(e);if(Ji.document.hidden&&t){const r="cancelled",{op:i,status:a}=en(t);nl&&ir.log(`[Tracing] Transaction: ${r} -> since tab moved to the background, op: ${i}`),a||t.setStatus({code:Pi,message:r}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):nl&&ir.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Y7=3600,qL="sentry_previous_trace",J7="sentry.previous_trace";function Q7(e,{linkPreviousTrace:t,consistentTraceSampling:r}){const i=t==="session-storage";let a=i?r9():void 0;e.on("spanStart",d=>{if(Ui(d)!==d)return;const o=kn().getPropagationContext();a=e9(a,d,o),i&&t9(a)});let h=!0;r&&e.on("beforeSampling",d=>{if(!a)return;const o=kn(),y=o.getPropagationContext();if(h&&y.parentSpanId){h=!1;return}o.setPropagationContext({...y,dsc:{...y.dsc,sample_rate:String(a.sampleRate),sampled:String(Z1(a.spanContext))},sampleRand:a.sampleRand}),d.parentSampled=Z1(a.spanContext),d.parentSampleRate=a.sampleRate,d.spanAttributes={...d.spanAttributes,[qR]:a.sampleRate}})}function e9(e,t,r){const i=en(t);function a(){var o,y;try{return Number((o=r.dsc)==null?void 0:o.sample_rate)??Number((y=i.data)==null?void 0:y[TS])}catch{return 0}}const h={spanContext:t.spanContext(),startTimestamp:i.start_timestamp,sampleRate:a(),sampleRand:r.sampleRand};if(!e)return h;const d=e.spanContext;return d.traceId===i.trace_id?e:(Date.now()/1e3-e.startTimestamp<=Y7&&(nl&&ir.log(`Adding previous_trace \`${JSON.stringify(d)}\` link to span \`${JSON.stringify({op:i.op,...t.spanContext()})}\``),t.addLink({context:d,attributes:{[_U]:"previous_trace"}}),t.setAttribute(J7,`${d.traceId}-${d.spanId}-${Z1(d)?1:0}`)),h)}function t9(e){try{Ji.sessionStorage.setItem(qL,JSON.stringify(e))}catch(t){nl&&ir.warn("Could not store previous trace in sessionStorage",t)}}function r9(){var e;try{const t=(e=Ji.sessionStorage)==null?void 0:e.getItem(qL);return JSON.parse(t)}catch{return}}function Z1(e){return e.traceFlags===1}const n9="BrowserTracing",i9=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function s9(){const e=Ji.navigator;return e!=null&&e.userAgent?i9.test(e.userAgent):!1}const o9={...d_,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroun
43dSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...VL},Sk=(e={})=>{"enableElementTiming"in e&&Kd(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});const t={name:void 0,source:void 0},r=Ji.document,{enableInp:i,enableLongTask:a,enableLongAnimationFrame:h,_experiments:{enableInteractions:d,enableStandaloneClsSpans:o,enableStandaloneLcpSpans:y},beforeStartSpan:w,idleTimeout:T,finalTimeout:k,childSpanTimeout:M,markBackgroundSpan:P,traceFetch:L,traceXHR:O,trackFetchStreamPerformance:$,shouldCreateSpanForRequest:Z,enableHTTPTimings:J,ignoreResourceSpans:H,ignorePerformanceApiSpans:U,instrumentPageLoad:V,instrumentNavigation:te,detectRedirects:ce,linkPreviousTrace:fe,consistentTraceSampling:Se,enableReportPageLoaded:xe,onRequestSpanStart:et,onRequestSpanEnd:ze}={...o9,...e},Ze=s9();let tt,at,Pe;function He(Oe,lt,Pt=!0){const Yt=lt.op==="pageload",xt=lt.name,tr=w?w(lt):lt,lr=tr.attributes||{};if(xt!==tr.name&&(lr[ro]="custom",tr.attributes=lr),!Pt){const Je=Xm();hl({...tr,startTime:Je}).end(Je);return}t.name=tr.name,t.source=lr[ro];const Or=yL(tr,{idleTimeout:T,finalTimeout:k,childSpanTimeout:M,disableAutoFinish:Yt,beforeSpanEnd:Je=>{tt==null||tt();const At=Uu(Oe);d7(Je,{recordClsOnPageloadSpan:!At&&!o,recordLcpOnPageloadSpan:!At&&!y,ignoreResourceSpans:H,ignorePerformanceApiSpans:U,spanStreamingEnabled:At}),Ek(Oe,void 0);const _t=kn(),pt=_t.getPropagationContext();_t.setPropagationContext({...pt,traceId:Or.spanContext().traceId,sampled:xc(Or),dsc:gc(Je)}),Yt&&(Pe=void 0)},trimIdleSpanEndTimestamp:!xe});Yt&&xe&&(Pe=Or),Ek(Oe,Or);function zr(){r&&["interactive","complete"].includes(r.readyState)&&Oe.emit("idleSpanEnableAutoFinish",Or)}Yt&&!xe&&r&&(r.addEventListener("readystatechange",()=>{zr()}),zr())}return{name:n9,setup(Oe){var Yt;if(Ze){nl&&ir.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}VU();const lt=Uu(Oe);if(tt=s7({recordClsStandaloneSpans:lt?void 0:o||!1,recordLcpStandaloneSpans:lt?void 0:y||!1,client:Oe}),lt?(P7(Oe),M7(Oe),i&&L7()):i&&T7(),h&&tn.PerformanceObserver&&((Yt=PerformanceObserver.supportedEntryTypes)!=null&&Yt.includes("long-animation-frame"))?a7():a&&o7(),d&&l7(),ce&&r){const xt=()=>{at=Hn()};addEventListener("click",xt,{capture:!0}),addEventListener("keydown",xt,{capture:!0,passive:!0})}function Pt(){const xt=Em(Oe);xt&&!en(xt).timestamp&&(nl&&ir.log(`[Tracing] Finishing current active span with op: ${en(xt).op}`),xt.setAttribute(bm,"cancelled"),xt.end())}Oe.on("startNavigationSpan",(xt,tr)=>{if(Zn()!==Oe)return;if(tr!=null&&tr.isRedirect){nl&&ir.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),He(Oe,{op:"navigation.redirect",...xt},!1);return}at=void 0,Pt(),Ju().setPropagationContext({traceId:ul(),sampleRand:Math.random(),propagationSpanId:ao()?void 0:tl()});const lr=kn();lr.setPropagationContext({traceId:ul(),sampleRand:Math.random(),propagationSpanId:ao()?void 0:tl()}),lr.setSDKProcessingMetadata({normalizedRequest:void 0}),He(Oe,{op:"navigation",...xt,parentSpan:null,forceTransaction:!0})}),Oe.on("startPageLoadSpan",(xt,tr={})=>{if(Zn()!==Oe)return;Pt();const lr=tr.sentryTrace||Tk("sentry-trace")||Ck("sentry-trace"),Or=tr.baggage||Tk("baggage")||Ck("baggage"),zr=DU(lr,Or),Je=kn();Je.setPropagationContext(zr),ao()||(Je.getPropagationContext().propagationSpanId=tl()),Je.setSDKProcessingMetadata({normalizedRequest:EL()}),He(Oe,{op:"pageload",...xt})}),Oe.on("endPageloadSpan",()=>{xe&&Pe&&(Pe.setAttribute(bm,"reportPageLoaded"),Pe.end())})},afterAllSetup(Oe){if(Ze)return;let lt=wS();if(fe!=="off"&&Q7(Oe,{linkPreviousTrace:fe,consistentTraceSampling:Se}),Ji.location){if(V){const Pt=es();a9(Oe,{name:Ji.location.pathname,startTime:Pt?Pt/1e3:void 0,attributes:{[ro]:"url",[$n]:"auto.pageload.browser"}})}te&&D7(({to:Pt,from:Yt})=>{if(Yt===void 0&&(lt==null?void 0:lt.indexOf(Pt))!==-1){lt=void 0;return}lt=void 0;const xt=SL(Pt),tr=Em(Oe),lr=tr&&ce&&c9(tr,at);GL(Oe,{name:(xt==null?void 0:xt.pathname)||Ji.location.pathname,attributes:{[ro]:"url",[$n]:"auto.navigation.browser"}},{url:Pt,isRedirect:lr})})}P&&X7(),d&&l9(Oe,T,k,M,t),i&&I7(),q7(Oe,{traceFetch:L,traceXHR:O,trackFetchStreamPerformance:$,tracePropagationTargets:Oe.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:Z,enableHTTPTimings:J,onRequestSpanStart:et,onRequestSpanEnd:ze})}}};function a9(e,t,r){e.emit("startPageLoadSpan",t,r),kn().setTransactionName(t.name);const i=Em(e);return i&&e.emit("afterStartPageLoadSpan",i),i}function GL(e,t,r){const{url:i,isRedirect:a}=r||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:a}),e.emit("startNavigationSpan",t,{isRedirect:a});const h=kn();return h.setTransactionName(t.name),i&&!a&&h.setSDKProcessingMetadata({normalizedRequest:{...EL(),url:i}}),Em(e)}function Tk(e){const t=Ji.document,r=t==null?void 0:t.querySelector(`meta[name=${e}]`);return(r==null?void 0:r.getAttribute("content"))||void 0}function Ck(e){var i,a,h;const t=(a=(i=Ji.performance)==null?void 0:i.getEntriesByType)==null?void 0:a.call(i,"navigation")[0],r=(h=t==null?void 0:t.serverTiming)==null?void 0:h.find(d=>d.name===e);return r==null?void 0:r.description}function l9(e,t,r,i,a){const h=Ji.document;let d;const o=()=>{const y="ui.action.click",w=Em(e);if(w){const T=en(w).op;
43if(["navigation","pageload"].includes(T)){nl&&ir.warn(`[Tracing] Did not create ${y} span because a pageload or navigation span is in progress.`);return}}if(d&&(d.setAttribute(bm,"interactionInterrupted"),d.end(),d=void 0),!a.name){nl&&ir.warn(`[Tracing] Did not create ${y} transaction because _latestRouteName is missing.`);return}d=yL({name:a.name,op:y,attributes:{[ro]:a.source||"url"}},{idleTimeout:t,finalTimeout:r,childSpanTimeout:i})};h&&addEventListener("click",o,{capture:!0})}const HL="_sentry_idleSpan";function Em(e){return e[HL]}function Ek(e,t){lo(e,HL,t)}const kk=1.5;function c9(e,t){const r=en(e),i=Xm(),a=r.start_timestamp;return!(i-a>kk||t&&i-t<=kk)}const ZL=["activate","mount"],WL=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,u9=/(?:^|[-_])(\w)/g,h9=e=>e.replace(u9,t=>t.toUpperCase()).replace(/[-_]/g,""),d9="<Root>",gx="<Anonymous>",f9=(e,t)=>e.repeat(t),rm=(e,t)=>{if(!e)return gx;if(e.$root===e)return d9;if(!e.$options)return gx;const r=e.$options;let i=r.name||r._componentTag||r.__name;const a=r.__file;if(!i&&a){const h=a.match(/([^/\\]+)\.vue$/);h&&(i=h[1])}return(i?`<${h9(i)}>`:gx)+(a&&t!==!1?` at ${a}`:"")},p9=e=>{if(e&&(e._isVue||e.__isVue)&&e.$parent){const t=[];let r=0;for(;e;){if(t.length>0){const a=t[t.length-1];if(a.constructor===e.constructor){r++,e=e.$parent;continue}else r>0&&(t[t.length-1]=[a,r],r=0)}t.push(e),e=e.$parent}return`
44
45found in
46
47${t.map((a,h)=>`${(h===0?"---> ":f9(" ",5+h*2))+(Array.isArray(a)?`${rm(a[0])}... (${a[1]} recursive calls)`:rm(a))}`).join(`
48`)}`}return`
49
50(found in ${rm(e)})`},m9=(e,t)=>{const{errorHandler:r}=e.config;e.config.errorHandler=(i,a,h)=>{var w;const d=rm(a,!1),o=a?p9(a):"",y={componentName:d,lifecycleHook:h,trace:o};if((t==null?void 0:t.attachProps)!==!1&&a&&((w=a.$options)!=null&&w.propsData?y.propsData=a.$options.propsData:a.$props&&(y.propsData=a.$props)),setTimeout(()=>{Qm(i,{captureContext:{contexts:{vue:y}},mechanism:{handled:!!r,type:"auto.function.vue.error_handler"}})}),typeof r=="function"&&e.config.errorHandler)r.call(e,i,a,h);else throw i}},Ik="ui.vue",g9={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function yx(e,t,r){e.$_sentryRootComponentSpanTimer&&clearTimeout(e.$_sentryRootComponentSpanTimer),e.$_sentryRootComponentSpanTimer=setTimeout(()=>{var i;(i=e.$root)!=null&&i.$_sentryRootComponentSpan&&(e.$root.$_sentryRootComponentSpan.end(t),e.$root.$_sentryRootComponentSpan=void 0)},r)}function y9(e,t){function r(a){return a.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return e.some(a=>r(t)===r(a))}const _9=(e={})=>{const t=(e.hooks||[]).concat(ZL).filter((a,h,d)=>d.indexOf(a)===h),r={},i=e.timeout||2e3;for(const a of t){const h=g9[a];if(!h){WL&&ir.warn(`Unknown hook: ${a}`);continue}for(const d of h)r[d]=function(){var M;const o=this.$root===this;o&&(this.$_sentryRootComponentSpan=this.$_sentryRootComponentSpan||hl({name:"Application Render",op:`${Ik}.render`,attributes:{[$n]:"auto.ui.vue"},onlyIfParent:!0}),yx(this,Hn(),i));const y=rm(this,!1);if(!(o||(Array.isArray(e.trackComponents)?y9(e.trackComponents,y):e.trackComponents))){yx(this,Hn(),i);return}this.$_sentryComponentSpans=this.$_sentryComponentSpans||{};const T=d===h[0],k=((M=this.$root)==null?void 0:M.$_sentryRootComponentSpan)||ms();if(T){if(k){const P=this.$_sentryComponentSpans[a];P&&P.end(),this.$_sentryComponentSpans[a]=hl({name:`Vue ${y}`,op:`${Ik}.${a}`,attributes:{[$n]:"auto.ui.vue"},onlyIfParent:!0})}}else{const P=this.$_sentryComponentSpans[a];if(!P)return;P.end(),yx(this,Hn(),i)}}}return r},v9=tn,b9={Vue:v9.Vue,attachProps:!0,attachErrorHandler:!0,tracingOptions:{hooks:ZL,timeout:2e3,trackComponents:!1}},x9="Vue",w9=(e={})=>({name:x9,setup(t){const r={...b9,...t.getOptions(),...e};if(!r.Vue&&!r.app){Kd(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured. Update your `Sentry.init` call with an appropriate config option: `app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).")});return}
50r.app?(Array.isArray(r.app)?r.app:[r.app]).forEach(a=>Pk(a,r)):r.Vue&&Pk(r.Vue,r)}}),Pk=(e,t)=>{var r;WL&&((r=e._instance)==null?void 0:r.isMounted)===!0&&Kd(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),t.attachErrorHandler&&m9(e,t),ao(t)&&e.mixin(_9(t.tracingOptions))};function S9(e,t,r){let i=!1;const a="mode"in e;e.onError(h=>Qm(h,{mechanism:{handled:!1}})),e.beforeEach((h,d,...o)=>{const y=i?void 0:T9(),w={};for(const M of Object.keys(h.params))w[`url.path.parameter.${M}`]=h.params[M],w[`params.${M}`]=h.params[M];for(const M of Object.keys(h.query)){const P=h.query[M];P&&(w[`query.${M}`]=P)}let T=h.path,k="url";if(h.name&&t.routeLabel!=="path")T=h.name.toString(),k="custom";else if(h.matched.length>0){const M=h.matched.length-1;T=h.matched[M].path,k="route"}if(kn().setTransactionName(T),t.instrumentPageLoad&&y&&(en(y).data[ro]!=="custom"&&(y.updateName(T),y.setAttribute(ro,k)),y.setAttributes({...w,[$n]:"auto.pageload.vue"}),i=!0),t.instrumentNavigation&&!y&&r({name:T,op:"navigation",attributes:{...w,[$n]:"auto.navigation.vue",[ro]:k}}),a){const M=o[0];typeof M=="function"&&M()}})}function T9(){const e=ms(),t=e&&Ui(e);return t&&en(t).op==="pageload"?t:void 0}function C9(e={}){if(!e.router)return Sk(e);const t=Sk({...e,instrumentNavigation:!1}),{router:r,instrumentNavigation:i=!0,instrumentPageLoad:a=!0,routeLabel:h="name"}=e;return{...t,afterAllSetup(d){t.afterAllSetup(d),S9(r,{routeLabel:h,instrumentNavigation:i,instrumentPageLoad:a},y=>{GL(d,y)})}}}function DS(e){const t=e==null?void 0:e.error,r=e==null?void 0:e.data,i=t??r;if(!i||typeof i!="object")return{ok:!1,status:0,message:"",data:null};const a="success"in i,h=t===void 0&&(a?i.success===!0:!0),d=Number(i.status??0)||0,o=typeof i.message=="string"?i.message:"",y=(a?i.data:i)??null;return{ok:h,status:d,message:o,data:y}}const Ak=[2e3,8e3],E9=[0,50];function KL(){const e=globalThis.crypto;return e!=null&&e.randomUUID?e.randomUUID():`${Date.now().toString(16)}-${Math.random().toString(16).slice(2,10)}`}const k9=e=>new Promise(t=>setTimeout(t,e));let XL=0;function YL(e){return e==="marketing"?++XL:0}function Mk(e,t){return e==="marketing"&&t!==XL}async function ine(e){var t,r;try{const i=await e.post({url:"/v1/get-consent-status"}),a=DS(i);if(!a.ok)return null;const h=(r=(t=a.data)==null?void 0:t.consents)==null?void 0:r.find(d=>(d==null?void 0:d.type)==="marketing");return typeof(h==null?void 0:h.accepted)=="boolean"?h.accepted:null}catch{return null}}async function sne(e,t){const r=KL();YL(t.type);try{const i=await e.post({url:"/v1/accept-consent",body:{...t,requestId:r}}),a=DS(i);return a.ok?{ok:!0,message:""}:(wm("consent_event_failed",{level:"warning",extra:{type:t.type,event:t.event,requestId:r,status:a.status,message:a.message}}),{ok:!1,message:a.message})}catch{return wm("consent_event_failed",{level:"warning",extra:{type:t.type,event:t.event,requestId:r,status:0,message:"network"}}),{ok:!1,message:""}}}async function I9(e,t){const r=KL(),i=YL(t.type);let a=0,h="";for(let d=0;;d++){let o=!0;try{const y=await e.post({url:"/v1/accept-consent",body:{...t,requestId:r}}),w=DS(y);if(w.ok)return!0;a=w.status,h=w.message,o=E9.includes(w.status)}catch{}if(!o||d>=Ak.length)break;if(await k9(Ak[d]),Mk(t.type,i))return!0}return Mk(t.type,i)?!0:(wm("consent_event_failed",{level:"warning",extra:{type:t.type,event:t.event,requestId:r,status:a,message:h}}),!1)}const Oo=Xu("user",()=>{const{$apiClient:e}=Lr(),t=window.location.protocol==="https:",r=ps(PR(t),{maxAge:T8,sameSite:"lax",secure:t});if(t&&!r.value){const fe=ps(K_);fe.value&&(r.value=fe.value,fe.value=null)}const i=IR(),a=It(),h=It(!1),d=dS(),o=It({info:null,session:null,promo:null,address:null});let y=null;async function w(){if(y)return y;y=T();try{await y}finally{y=null}}async function T(){var xe,et,ze,Ze,tt;const fe=!!r.value,Se=r.value;try{const at=await TR({client:e,body:{}});if((et=(xe=at.data)==null?void 0:xe.data)!=null&&et.token){if((r.value??null)!==(Se??null)){fs("auth_stale_session_response_discarded",{hadToken:fe});return}
50const Pe=at.data.data,He=!!Pe.clientId,Oe=!He;if(fe&&Oe&&Pe.token===Se){o.value.session=Pe;return}if(fe&&Oe){fs("auth_invalid_token_reset",{hadToken:fe,hasClientId:He}),await O(),r.value=Pe.token,o.value.session=Pe;return}if((He||!fe)&&(r.value=Pe.token,o.value.session=Pe,fs("auth_session_updated",{hasClientId:He,isNewSession:Pe.new})),Pe.clientId&&Pe.new)(ze=o.value.info)!=null&&ze.id?o.value.session={...Pe,new:!1}:(i.setState("registration"),d.isLessThan("xl")?i.menu.isOpen=!0:i.menu.isOpenDesktop=!0);else if(Pe.clientId&&!Pe.new){const lt=await R1({client:e});(Ze=lt.data)!=null&&Ze.data&&(o.value.info=lt.data.data,fs("auth_profile_loaded",{userId:lt.data.data.id}))}}}catch(at){console.error("Ошибка при получении сессии пользователя",{message:(at==null?void 0:at.message)??null,status:(at==null?void 0:at.status)??null,cause:((tt=at==null?void 0:at.cause)==null?void 0:tt.message)??null})}}async function k(){var fe,Se;try{const xe=await R1({client:e});(fe=xe.data)!=null&&fe.data&&(o.value.info=xe.data.data)}catch(xe){console.error("Ошибка при загрузке профиля пользователя",{message:(xe==null?void 0:xe.message)??null,status:(xe==null?void 0:xe.status)??null,cause:((Se=xe==null?void 0:xe.cause)==null?void 0:Se.message)??null})}}async function M(){var fe,Se,xe;if((fe=o.value.info)!=null&&fe.phone&&!h.value&&r.value){h.value=!0;try{const et=await _R({client:e});(Se=et.data)!=null&&Se.success?a.value=(xe=et.data)==null?void 0:xe.data:a.value=void 0}catch{a.value=void 0}finally{h.value=!1}}}const P=It(0);function L(fe){const{captchaEnabled:Se,captchaPromoEnabled:xe,captchaSitekey:et,login:ze}=o.value.session??{};o.value.session={captchaEnabled:Se,captchaPromoEnabled:xe,captchaSitekey:et,login:ze,token:fe.token||"",clientId:fe.clientId||"",new:!!fe.new},r.value=fe.token,P.value=Date.now(),fe.token&&Dn(async()=>{const{useCartStore:Ze}=await Promise.resolve().then(()=>hv);return{useCartStore:Ze}},void 0,import.meta.url).then(({useCartStore:Ze})=>{Ze().notifyAuthChanged()}),fe.token&&I9(e,{type:"offer",event:"accepted",collectionPoint:"login"})}async function O(){fs("auth_logout_local_cleared",{hadUserProfile:!!o.value.info,hadSession:!!o.value.session}),o.value.info=null,o.value.session=null,a.value=void 0,r.value=null;{const[{useCartStore:fe},{useOrderGeoInfo:Se}]=await Promise.all([Dn(()=>Promise.resolve().then(()=>hv),void 0,import.meta.url),Dn(()=>Promise.resolve().then(()=>R9),void 0,import.meta.url)]),xe=fe();xe.clearCart({force:!0,syncServer:!1}),xe.notifyAuthChanged(),Se().clearSessionAddressCookies()}}const $=it(()=>{var fe;return!!((fe=o.value.info)!=null&&fe.phone)}),Z=it(()=>{var fe;return I8((fe=o.value.session)==null?void 0:fe.login)}),J=it(()=>Z.value.methods),H=it(()=>Z.value.hintProviders),U=it(()=>Z.value.deadlock),V=it(()=>J.value.some(fe=>fe.type==="phone_code")||H.value.length>0),te=it(()=>P8(o.value.session));let ce=Promise.resolve();return Mr(r,fe=>{!fe&&o.value.session?(O(),w()):fe&&typeof window<"u"&&(ce=ce.then(()=>$fetch("/api/session/persist",{method:"POST"}).catch(()=>{})))}),Mr(()=>o.value.info,fe=>{fe!=null&&fe.phone&&!a.value&&!h.value&&M()}),{fetchUserInfo:k,user:o,getUserSession:w,clearUserInfo:O,fetchUserPromo:M,userPromo:a,isLoadingPromo:h,isAuthorized:$,loginMethods:J,loginHintProviders:H,loginDeadlock:U,hasPhoneCodeLogin:V,captcha:te,applyLoginSession:L,lastLoginAppliedAt:P,cookieToken:r}}),P9={apartment:"",doorphone:"",entrance:"",floor:"",comment:"",leaveAtDoor:!1,name:"",latitude:0,longitude:0,data:"",city:"",street:"",house:"",flat:""},Rk=()=>({receiptType:null,restaurantId:null,viewAddress:null,deliveryAddress:null}),one=(e,t)=>e??t??null,JL=e=>{var t;return(t=e==null?void 0:e.deliveryZones)!=null&&t.length?"DELIVERY":"TAKEAWAY"},sf=()=>{const e=Si(),r=(()=>{if(e.public.brand){const h=e.public.brand.toLowerCase();if(h==="pizza"||h==="sushi")return h}return window.location.hostname.toLowerCase().includes("pizza")?"pizza":"sushi"})(),i={sushi:{name:"sushi-friday",displayName:"Суши Пятница",copyright:`Sushi Friday © ${new Date().getFullYear()}`,qrImage:"/images/appqr-sushi.png",storeImage:"/images/store-sushi.png",courierImage:"/images/coura.png",appUrl:"https://sushi-friday.ru/app/",siteUrl:"https://sushi-friday.ru",privacyPolicyUrl:"/privacy",yandexMetrikaId:"105358127",vkPixelId:"3757306",logoIcon:"logo-sushi",logoDesktopIcon:"logo-desktop-sushi",primaryColor:"#ffcc4c",primaryForegroundColor:"#171715",primaryPaleColor:"#FFFCF4"},pizza:{name:"pizza-friday",displayName:"Пицца Пятница",copyright:`Pizza Friday © ${new Date().getFullYear()}`,qrImage:"/images/appqr-pizza.png",storeImage:"/images/store-pizza.png",courierImage:"/images/coura-pizza.png",appUrl:"https://pizza-friday.ru/app/",siteUrl:"https://pizza-friday.ru",privacyPolicyUrl:"/privacy",yandexMetrikaId:"105358066",vkPixelId:"3757307",logoIcon:"logo-pizza",logoDesktopIcon:"logo-desktop-pizza",primaryColor:"#964BBE",primaryForegroundColor:"#ffffff",primaryPaleColor:"#FAF6FC"}},a=it(()=>i[r]);return{currentBrand:Ca(a),brandType:r}},QL=()=>{const{currentBrand:e}=sf(),t=()=>Number(e.value.yandexMetrikaId);return{getMetrikaCounterId:t,getMetrikaInitParams:()=>
50({webvisor:!1,clickmap:!0,ecommerce:"dataLayer",accurateTrackBounce:!0,trackLinks:!0}),hit:(o,y)=>{if(!window.ym)return;const w=t();window.ym(w,"hit",o,{title:y})},reachGoal:(o,y)=>{if(!window.ym)return;const w=t();y?window.ym(w,"reachGoal",o,y):window.ym(w,"reachGoal",o)},ecommerce:(o,y)=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({ecommerce:{currencyCode:"RUB",[o]:y}})},userParams:o=>{if(!window.ym)return;const y=t();window.ym(y,"userParams",o)}}},e5=()=>{const{currentBrand:e}=sf(),t=()=>e.value.vkPixelId;return{getVkPixelId:t,event:(a,h)=>{if(!window._tmr)return;const o={id:t(),type:"reachGoal",goal:a};h!==void 0&&(o.value=h),window._tmr.push(o)},hit:()=>{if(!window._tmr)return;const a=t();window._tmr.push({id:a,type:"pageView",start:new Date().getTime()})}}},A9={cart_add:null,cart_remove:null,promo_applied:"PromoApplied",order_submit:"InitiateCheckout",order_success:null,order_cancel:"OrderCancel",login_start:"LoginStart",login_success:"LoginSuccess",register_success:"RegisterSuccess",account_delete:"AccountDelete",city_changed:"CityChanged",address_selected:"AddressSelected",delivery_type_changed:"DeliveryTypeChanged",cart_clear:"CartClear",app_link_click:null},M9={add:"AddToCart",remove:"RemoveFromCart",purchase:"Purchase",detail:null},Qv=()=>{const{reachGoal:e,ecommerce:t,hit:r,userParams:i}=QL(),{event:a,hit:h}=e5();return{trackEvent:(T,k)=>{var M;try{e(T,k)}catch{}try{const P=A9[T];
50if(P){const L=((M=k==null?void 0:k.order_params)==null?void 0:M.revenue)??(k==null?void 0:k.revenue)??(k==null?void 0:k.price)??void 0;a(P,L)}}catch{}},trackEcommerce:(T,k)=>{var M;try{t(T,k)}catch{}try{const P=M9[T];if(P){const L=((M=k==null?void 0:k.actionField)==null?void 0:M.revenue)??void 0;a(P,L)}}catch{}},trackHit:(T,k)=>{try{r(T,k)}catch{}try{h()}catch{}},trackUserParams:T=>{try{i(T)}catch{}}}},e0=Xu("orderGeoInfo",()=>{const e=Oo(),{trackEvent:t}=Qv();let r=null;const i=it({get:()=>(r==null?void 0:r.value)??!1,set:U=>{r&&(r.value=U)}}),a=It(!1),h=ps("confirmedAddress",{maxAge:60*60*2,default:()=>null}),d=It(h.value),o=ps("deliveryDetails",{maxAge:60*60*48,default:()=>null}),y=It(Rk());Wd(async()=>{if(!y.value.receiptType){const{useRestaurantsStore:U}=await Dn(async()=>{const{useRestaurantsStore:te}=await Promise.resolve().then(()=>z9);return{useRestaurantsStore:te}},void 0,import.meta.url),V=U();L(JL(V.currentRestaurant),"route_sync")}}),jo(()=>{y.value.viewAddress?e.user.address=y.value:e.user.address=null});const w=U=>{y.value={...y.value,viewAddress:U}},T=U=>{y.value.deliveryAddress||(y.value.deliveryAddress={...P9}),Object.assign(y.value.deliveryAddress,U)},k=()=>{y.value=Rk(),o.value=null,d.value=null,h.value=null},M=()=>{o.value=null,d.value=null,h.value=null},P=()=>(y.value.deliveryAddress||T({}),y.value.deliveryAddress),L=(U,V="unknown")=>{y.value.receiptType!==U&&(fs("order_type_changed",{before:y.value.receiptType,restaurantId:y.value.restaurantId,viewAddress:y.value.viewAddress}),V==="user_action"&&t("delivery_type_changed"),y.value={...y.value,receiptType:U})},O=U=>{a.value=U},$=U=>{d.value=U,h.value=U},Z=()=>{d.value=null,h.value=null};r=Dd("map");const J=()=>{cR("map")},H=it(()=>{const U=y.value.deliveryAddress;if(!(U!=null&&U.data))return y.value.viewAddress||"";
50try{const V=typeof U.data=="string"?JSON.parse(U.data):U.data,te=[];V.city&&te.push(V.city),V.street_with_type&&te.push(V.street_with_type);let ce=V.house||"";return ce&&V.block_type&&V.block&&(ce+=`${V.block_type}${V.block}`),ce&&te.push(ce),te.length>0?te.join(", "):y.value.viewAddress||""}catch{return y.value.viewAddress||""}});return{isOpen:i,isDeliveryContextSyncInProgress:a,address:y,confirmedAddressKey:d,shortViewAddress:H,updateDeliveryAddress:T,updateViewAddress:w,clearOrderGeoInfo:k,getOrInitDeliveryAddress:P,setReceiptType:L,setDeliveryContextSyncInProgress:O,setConfirmedAddressKey:$,clearConfirmedAddressKey:Z,clearSessionAddressCookies:M,closeMapWithoutNavigation:J}}),R9=Object.freeze(Object.defineProperty({__proto__:null,useOrderGeoInfo:e0},Symbol.toStringTag,{value:"Module"}));function L9(e){const{urlCity:t,restaurants:r,citySlugs:i,cartRestaurantId:a,cookieCityName:h,defaultCity:d,purpose:o="view",preferPickup:y=!1}=e;let w=null,T="default";if(t){const O=i.find($=>$.url===t);if(O)w=O.name,T="url";else return{restaurantId:null,cityName:null,source:"none"}}else h?(w=h,T="cookie"):(w=d,T="default");const k=r.filter(O=>O.city===w);if(k.length===0)return{restaurantId:null,cityName:w,source:T};if(a){const O=r.find($=>$.id===a);if(O&&O.city===w&&(o!=="pickup-write"||O.pickup))return{restaurantId:O.id,cityName:w,source:"cart"}}const M=k.find(O=>O.deliveryZones&&O.deliveryZones.length>0),P=k.find(O=>O.pickup);if(o==="pickup-write")return{restaurantId:(P==null?void 0:P.id)??null,cityName:w,source:T};const L=y?P??M??k[0]:M??P??k[0];return L?{restaurantId:L.id,cityName:w,source:T}:{restaurantId:null,cityName:w,source:T}}const _c=Xu("restaurants",()=>{const{$apiClient:e}=Lr(),t=$s(),r=Si(),i=ps("cityName",{default:()=>""}),a=e0(),h=It([]),d=async()=>{var M,P;try{const L=await gR({client:e});h.value=((M=L.data)==null?void 0:M.data)||[]}catch(L){console.error("Ошибка при загрузке ресторанов",{message:(L==null?void 0:L.message)??null,status:(L==null?void 0:L.status)??null,cause:((P=L==null?void 0:L.cause)==null?void 0:P.message)??null})}},o=it(()=>{const M=new Map;for(const P of h.value){const L=P.cityObject;!(L!=null&&L.id)||!L.url||!L.name||M.has(L.id)||M.set(L.id,{url:L.url,name:L.name})}return[...M.values()]}),y=it(()=>{const M=typeof t.params.city=="string"?t.params.city:null,P=a.address.receiptType;return L9({urlCity:M,restaurants:h.value,citySlugs:o.value,cartRestaurantId:a.address.restaurantId??null,cookieCityName:i.value||null,defaultCity:r.public.defaultCity,preferPickup:P==="TAKEAWAY"||P==="DINEIN"}).restaurantId}),w=it(()=>h.value.find(M=>M.id===y.value)??null);return{restaurants:h,currentRestaurantId:y,currentRestaurant:w,fetchRestaurants:d,findRestaurantById:M=>h.value.find(P=>P.id===M)??null,getRestaurantCityById:M=>{var P;return(P=h.value.find(L=>L.id===M))==null?void 0:P.city}}}),z9=Object.freeze(Object.defineProperty({__proto__:null,useRestaurantsStore:_c},Symbol.toStringTag,{value:"Module"}));function D9(e){return{getCart:()=>vR({client:e}),updateCart:t=>bR({client:e,body:t}),createOrder:t=>xR({client:e,body:t}),cancelOrder:t=>mS({client:e,body:{id:t}}),getActiveOrders:()=>gS({client:e}),addAddress:t=>yR({client:e,body:t}),getDeliveryPeriods:()=>pS({client:e})}}function t5(e){return Array.isArray(e)?e.map(t=>{var a,h;const r=typeof(t==null?void 0:t.group)=="string"?t.group:(a=t==null?void 0:t.group)==null?void 0:a.id,i=typeof(t==null?void 0:t.option)=="string"?t.option:(h=t==null?void 0:t.option)==null?void 0:h.id;return!r||!i?null:{group:r,option:i}}).filter(t=>t!==null):[]}function W1(){return{type:"clearAddress"}}function O9(e){return e.map(t=>`${t.group}-${t.option}`).sort().join("|")}function sv(e,t){return`${e}::${O9(t)}`}function nm(e){if(!e||typeof e.data!="string"||!e.data)return null;const t={data:e.data};return e.name!==void 0&&(t.name=e.name),e.latitude!==void 0&&(t.latitude=e.latitude),e.longitude!==void 0&&(t.longitude=e.longitude),t}function F9(e,t,r={}){let i=[...e];switch(t.type){case"setProductQty":{const a=sv(t.productId,t.options);i=i.filter(h=>h.type!=="setProductQty"||sv(h.productId,h.options)!==a);break}case"setAddition":i=i.filter(a=>a.type!=="setAddition"||a.additionId!==t.additionId);break;case"setPromo":i=i.filter(a=>a.type!=="setPromo"),t.code&&(i=i.filter(a=>a.type!=="setBonusMode"));break;case"setBonusMode":i=i.filter(a=>a.type!=="setBonusMode"),t.bonuses>0&&(i=i.filter(a=>a.type!=="setPromo"));break;case"setReceiptType":i=i.filter(a=>a.type!=="setReceiptType");break;
50case"setRestaurant":i=i.filter(a=>a.type!=="setRestaurant");break;case"setAddress":{const a=[...i].reverse().find(d=>d.type==="setAddress");((a==null?void 0:a.type)==="setAddress"?a.point.data:r.currentAddressData)!==t.point.data&&(i=i.filter(d=>d.type!=="setAddressDetails")),i=i.filter(d=>d.type!=="setAddress"&&d.type!=="clearAddress");break}case"setAddressDetails":{const a=i.find(h=>h.type==="setAddressDetails");(a==null?void 0:a.type)==="setAddressDetails"&&(i=i.filter(h=>h.type!=="setAddressDetails"),t={type:"setAddressDetails",details:{...a.details,...t.details}});break}case"clearAddress":i=i.filter(a=>a.type!=="setAddress"&&a.type!=="setAddressDetails"&&a.type!=="clearAddress");break}return[...i,t]}function Lk(e,t,r=null){let i=(e==null?void 0:e.receiptType)??"DELIVERY",a=(e==null?void 0:e.restaurantId)??"",h=(e==null?void 0:e.promoCode)??"",d=(e==null?void 0:e.bonuses)??0;const o=((e==null?void 0:e.products)??[]).filter(O=>!O.promo).map(O=>({id:O.id,quantity:O.quantity??0,options:t5(O.options)}));let y=((e==null?void 0:e.additions)??[]).map(O=>({id:O.id,quantity:O.quantity??0})),w=nm(e==null?void 0:e.address)??(r?nm(r):null),T=!1,k={},M=!1,P=null;for(const O of t)switch(O.type){case"setProductQty":{const $=sv(O.productId,O.options),Z=o.findIndex(J=>sv(J.id,J.options)===$);O.quantity>0?Z>=0?o[Z]={...o[Z],quantity:O.quantity}:o.push({id:O.productId,quantity:O.quantity,options:O.options}):Z>=0&&o.splice(Z,1);break}case"setAddition":{const $=y.findIndex(Z=>Z.id===O.additionId);$>=0?y[$]={...y[$],quantity:O.quantity}:y.push({id:O.additionId,quantity:O.quantity}),y=y.filter(Z=>Z.quantity>0);break}case"setPromo":h=O.code,O.code&&(P="promo");break;case"setBonusMode":d=O.bonuses,O.bonuses>0&&(P="bonuses");break;case"setReceiptType":i=O.receiptType,O.byUser&&(M=!0);break;case"setRestaurant":a=O.restaurantId,O.byUser&&(M=!0);break;case"setAddress":w=nm(O.point),T=!1,O.selectedByClient&&(M=!0);break;case"setAddressDetails":k={...k,...O.details};break;case"clearAddress":w=null,T=!0,k={};break}P==="promo"&&(d=0),P==="bonuses"&&(h="");const L={restaurantId:a,receiptType:i,promoCode:h,bonuses:d,products:o,additions:y};if(!T&&w){const O={...w};for(const[$,Z]of Object.entries(k))Z!==void 0&&(O[$]=Z);L.address=O}return M&&(L.addressSelectedByClient=!0),L}function B9(e,t){if(!t||!("address"in t))return e;const r=nm(t.address);return r||(t.receiptType==="DELIVERY"?null:e)}function N9(e,t){return t.type==="setAddress"?nm(t.point):t.type==="clearAddress"?null:e}function zk(e){var r;const t=e==null?void 0:e.data;return t&&t.success===!0?{ok:!0,cart:t.data??null}:t&&t.success===!1?{ok:!1,cart:null,bodyStatus:t.status}:{ok:!1,cart:null,httpStatus:(r=e==null?void 0:e.response)==null?void 0:r.status,error:e==null?void 0:e.error}}function j9(e){return e.some(t=>t.type==="setPromo"&&t.code!=="")}function $9(e){return e.some(t=>t.type==="setAddress"||t.type==="setReceiptType"||t.type==="setRestaurant"||t.type==="clearAddress")}function U9(e){return j9(e)?"promo":$9(e)?"context":"product"}function V9(e){const t=e.findIndex(i=>i.type==="setPromo"&&i.code!=="");if(t===-1)return{batch:e,rest:[]};const r=e.filter((i,a)=>a!==t);return r.length===0?{batch:[e[t]],rest:[]}:{batch:r,rest:[e[t]]}}function q9(e){const{cart:t,echo:r,transport:i,getEpoch:a}=e,h=e.hooks??{},d=e.productDebounceMs;let o=[],y=[],w=!1,T=a(),k=0,M=null,P=!1,L=Promise.resolve();const O=3e4;let $=new Set,Z=0;const J=5e3;let H=0;const U=It(!1),V=It(null),te=It(0);let ce=null,fe=0;const Se=It(!0);let xe=null;function et(){Se.value=o.length===0&&!w&&!P&&fe===0&&!(M&&ce!=="get")}function ze(){te.value+=1,et()}function Ze(){xe&&(clearTimeout(xe),xe=null)}function tt(pt,Nt={}){var rr;(rr=h.onTelemetry)==null||rr.call(h,pt,Nt)}function at(pt){return JSON.stringify(pt)}function Pe(pt){return pt.type==="setAddress"&&pt.selectedByClient===!0||pt.type==="setRestaurant"&&pt.byUser===!0||pt.type==="setReceiptType"&&pt.byUser===!0}function He(){return[...y,...o].some(Pe)?!0:Date.now()-H<J}function Oe(pt){return $.has(at(pt))&&Date.now()-Z<O?!0:He()}function lt(pt){o.length>0&&tt("cart_engine_queue_dropped",{reason:pt,size:o.length}),o=[],w=!1,Ze(),k+=1,T=a(),$=new Set,r.value=null,ze()}function Pt(pt){a()!==T&&lt(`epoch_changed:${pt}`)}function Yt(pt){var rr;const Nt=t.value;t.value=pt,r.value=B9(r.value,pt),(rr=h.onBaselineApplied)==null||rr.call(h,pt,Nt)}function xt(pt,Nt={}){var me,je;if(Pt("enqueue"),Nt.corrective&&$.has(at(pt))&&Date.now()-Z<O){tt("cart_engine_reconcile_loop_guard",{intent:pt.type});return}if(Nt.corrective&&He()){tt("cart_engine_corrective_deferred",{intent:pt.type});return}const rr=t.value&&((me=t.value.address)!=null&&me.data)?t.value.address.data:(je=r.value)==null?void 0:je.data;if(o=F9(o,pt,{currentAddressData:rr}),r.value=N9(r.value,pt),ze(),(pt.type==="setProductQty"||pt.type==="setAddition")&&!P){Ze(),xe=setTimeout(()=>{xe=null,lr()},d);return}Ze(),lr()}async function tr(pt){var je,ft,Xe;const Nt=U9(pt),rr=k,ue=Nt==="promo"?1:2;let me=null;for(let dt=0;dt<ue;dt+=1){const Ee=Lk(t.value,pt,r.value);try{me=await i.updateCart(Ee)}catch(Fe){me={ok:!1,cart:null,error:Fe}}if(k!==rr){tt("cart_engine_stale_response_dropped",{kind:Nt,startedGeneration:rr,generation:k});return}if(me.ok)break}if(me!=null&&me.ok){$=new Set,V.value=null,pt.some(Pe)&&(H=Date.now()),Yt(me.cart),(je=h.onCartChanged)==null||je.call(h,me.cart);return}$=new Set(pt.map(at)),Z=Date.now(),V.value=me,tt("cart_engine_batch_failed",{kind:Nt,bodyStatus:(me==null?void 0:me.bodyStatus)??null,httpStatus:(me==null?void 0:me.httpStatus)??null,generation:k}),Nt==="context"?(ft=h.onContextBatchFailed)==null||ft.call(h,{result:me}):(Xe=h.onProductBatchFailed)==null||Xe.call(h,{kind:Nt,result:me})}async function lr(){if(P||o.length===0&&!w)return L;P=!0,U.value=!0,et();let pt;L=new Promise(Nt=>{pt=Nt});try{for(await Promise.resolve();M;)await M.catch(()=>{});for(;(o.length>0||w)&&(Pt("worker"),!(o.length===0&&!w));){const{batch:Nt,rest:rr}=V9(o);o=rr,rr.length===0&&(w=!1),y=Nt;const ue=tr(Nt);M=ue,ce="update",ze();try{await ue}finally{M===ue&&(M=null,ce=null),y=[],ze()}}}finally{P=!1,U.value=!1,et(),pt()}}function Or(){Pt("echoSync"),w=!0,et(),lr()}async function zr(){for(Ze();o.length>0||w||P||M;){for(await lr();M;)await M.catch(()=>{});await L}}function Je(){return o.length===0&&!w&&!P&&!M}function At(){return Lk(t.value,[...y,...o],r.value)}async function _t(pt={}){Pt("fetchCart"),pt.corrective&&(fe+=1,et());try{for(;P||M;){for(;M;)await M.catch(()=>{});await L}}finally{pt.corrective&&(fe-=1)}const Nt=k;U.value=!0;let rr;
50const ue=(async()=>{try{rr=await i.getCart()}catch(me){rr={ok:!1,cart:null,error:me}}})();M=ue,ce=pt.corrective?"correct":"get",et();try{await ue}finally{M===ue&&(M=null,ce=null),U.value=!1,et()}return k!==Nt?(tt("cart_engine_stale_response_dropped",{kind:"get-cart",startedGeneration:Nt,generation:k}),{ok:!1,cart:null}):(rr.ok&&Yt(rr.cart),rr)}return{enqueue:xt,requestEchoSync:Or,flush:zr,fetchCart:_t,reset:lt,projectedSnapshot:At,isUserGeoPending:He,wouldSuppressCorrective:Oe,queueVersion:te,settled:Ca(Se),isBusy:U,lastError:V,isSettled:Je,queueSize:()=>o.length,_peekQueue:()=>[...o]}}const G9=/^(г\.?|город)\s+/i,Dk=e=>e&&e.replace(G9,"").replaceAll("ё","е").replaceAll("Ё","Е").trim().toLowerCase()||null,r5=e=>{var t;return e?typeof e.city=="string"&&e.city.trim()?e.city.trim():typeof((t=e.cityObject)==null?void 0:t.name)=="string"&&e.cityObject.name.trim()?e.cityObject.name.trim():null:null},n5=e=>{var r;if(!e)return null;const t=(r=e.cityObject)==null?void 0:r.url;return typeof t=="string"&&t.trim()?t.trim():null},K1=(e,t)=>{const r=Dk(e),i=Dk(t);return!r||!i?!1:r===i},ane=e=>{var a,h;const t=((a=e.restaurantCitySlug)==null?void 0:a.trim())||null,r=((h=e.routeCitySlug)==null?void 0:h.trim())||null,i={restaurantSlug:t,routeCitySlug:r};return t?r&&t!==r?{isValid:!1,reason:"city_mismatch",details:i}:{isValid:!0,details:i}:{isValid:!1,reason:"missing_restaurant_slug",details:i}},i5=(e,t)=>{const r=e==null?void 0:e.restaurantId;return r?t.find(i=>i.id===r)??null:null},s5=(e,t)=>r5(i5(e,t)),H9=(e,t)=>n5(i5(e,t)),Z9=e=>{const{cartCitySlug:t,routeCitySlug:r}=e;return!t||!r?!0:t===r};function W9(e){const{targetCityName:t,cart:r,restaurants:i}=e,a=s5(r,i);if(a&&K1(a,t))return[];const h=i.filter(M=>K1(r5(M),t));if(h.length===0)return[];const d=h.find(M=>M.pickup),y=h.find(M=>M.deliveryZones&&M.deliveryZones.length>0)??d??h[0],w=(r==null?void 0:r.receiptType)??"DELIVERY",T=w==="TAKEAWAY"||w==="DINEIN";if(T&&d)return[{type:"setRestaurant",restaurantId:d.id,byUser:!0},W1()];if(!y)return[];const k=[];return T&&k.push({type:"setReceiptType",receiptType:"DELIVERY",byUser:!0}),k.push(W1()),k.push({type:"setRestaurant",restaurantId:y.id,byUser:!0}),k}const o5=/^[a-z0-9]+(-[a-z0-9]+)*$/,ag=(e,t,r,i="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const o=a.pop(),y=a.pop(),w={provider:a.length>0?a[0]:i,prefix:y,name:o};return t&&!m_(w)?null:w}const h=a[0],d=h.split("-");if(d.length>1){const o={provider:i,prefix:d.shift(),name:d.join("-")};return t&&!m_(o)?null:o}if(r&&i===""){const o={provider:i,prefix:"",name:h};return t&&!m_(o,r)?null:o}return null},m_=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,a5=Object.freeze({left:0,top:0,width:16,height:16}),ov=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),of=Object.freeze({...a5,...ov}),X1=Object.freeze({...of,body:"",hidden:!1});function K9(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Ok(e,t){const r=K9(e,t);for(const i in X1)i in ov?i in e&&!(i in r)&&(r[i]=ov[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function X9(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function h(d){if(r[d])return a[d]=[];if(!(d in a)){a[d]=null;const o=i[d]&&i[d].parent,y=o&&h(o);y&&(a[d]=[o].concat(y))}return a[d]}return Object.keys(r).concat(Object.keys(i)).forEach(h),a}function Y9(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let h={};function d(o){h=Ok(i[o]||a[o],h)}return d(t),r.forEach(d),Ok(e,h)}function l5(e,t){const r=[];if(typeof e!="object"||typeof e.icons!="object")return r;e.not_found instanceof Array&&e.not_found.forEach(a=>{t(a,null),r.push(a)});const i=X9(e);for(const a in i){const h=i[a];h&&(t(a,Y9(e,a,h)),r.push(a))}return r}const J9={provider:"",aliases:{},not_found:{},...a5};function _x(e,t){for(const r in t)if(r in e&&typeof e[r]!=typeof t[r])return!1;return!0}function c5(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!_x(e,J9))return null;const r=t.icons;for(const a in r){const h=r[a];if(!a||typeof h.body!="string"||!_x(h,X1))return null}const i=t.aliases||Object.create(null);for(const a in i){const h=i[a],d=h.parent;if(!a||typeof d!="string"||!r[d]&&!i[d]||!_x(h,X1))return null}return t}const Fk=Object.create(null);function Q9(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Vu(e,t){const r=Fk[e]||(Fk[e]=Object.create(null));return r[t]||(r[t]=Q9(e,t))}function u5(e,t){return c5(t)?l5(t,(r,i)=>{i?e.icons[r]=i:e.missing.add(r)}):[]}
50function eG(e,t,r){try{if(typeof r.body=="string")return e.icons[t]={...r},!0}catch{}return!1}let km=!1;function h5(e){return typeof e=="boolean"&&(km=e),km}function OS(e){const t=typeof e=="string"?ag(e,!0,km):e;if(t){const r=Vu(t.provider,t.prefix),i=t.name;return r.icons[i]||(r.missing.has(i)?null:void 0)}}function Im(e,t){const r=ag(e,!0,km);if(!r)return!1;const i=Vu(r.provider,r.prefix);return t?eG(i,r.name,t):(i.missing.add(r.name),!0)}function tG(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),km&&!t&&!e.prefix){let a=!1;return c5(e)&&(e.prefix="",l5(e,(h,d)=>{Im(h,d)&&(a=!0)})),a}const r=e.prefix;if(!m_({prefix:r,name:"a"}))return!1;const i=Vu(t,r);return!!u5(i,e)}function Y1(e){const t=OS(e);return t&&{...of,...t}}const d5=Object.freeze({width:null,height:null}),f5=Object.freeze({...d5,...ov}),rG=/(-?[0-9.]*[0-9]+[0-9.]*)/g,nG=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Bk(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(rG);if(i===null||!i.length)return e;const a=[];let h=i.shift(),d=nG.test(h);for(;;){if(d){const o=parseFloat(h);isNaN(o)?a.push(h):a.push(Math.ceil(o*t*r)/r)}else a.push(h);if(h=i.shift(),h===void 0)return a.join("");d=!d}}function iG(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),h=e.indexOf("</"+t);if(a===-1||h===-1)break;const d=e.indexOf(">",h);if(d===-1)break;r+=e.slice(a+1,h).trim(),e=e.slice(0,i).trim()+e.slice(d+1)}return{defs:r,content:e}}function sG(e,t){return e?"<defs>"+e+"</defs>"+t:t}function oG(e,t,r){const i=iG(e);return sG(i.defs,t+i.content+r)}const aG=e=>e==="unset"||e==="undefined"||e==="none";function lG(e,t){const r={...of,...e},i={...f5,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let h=r.body;[r,i].forEach(O=>{const $=[],Z=O.hFlip,J=O.vFlip;let H=O.rotate;Z?J?H+=2:($.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),$.push("scale(-1 1)"),a.top=a.left=0):J&&($.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),$.push("scale(1 -1)"),a.top=a.left=0);let U;switch(H<0&&(H-=Math.floor(H/4)*4),H=H%4,H){case 1:U=a.height/2+a.top,$.unshift("rotate(90 "+U.toString()+" "+U.toString()+")");break;case 2:$.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:U=a.width/2+a.left,$.unshift("rotate(-90 "+U.toString()+" "+U.toString()+")");break}H%2===1&&(a.left!==a.top&&(U=a.left,a.left=a.top,a.top=U),a.width!==a.height&&(U=a.width,a.width=a.height,a.height=U)),$.length&&(h=oG(h,'<g transform="'+$.join(" ")+'">',"</g>"))});const d=i.width,o=i.height,y=a.width,w=a.height;let T,k;d===null?(k=o===null?"1em":o==="auto"?w:o,T=Bk(k,y/w)):(T=d==="auto"?y:d,k=o===null?Bk(T,w/y):o==="auto"?w:o);const M={},P=(O,$)=>{aG($)||(M[O]=$.toString())};P("width",T),P("height",k);const L=[a.left,a.top,y,w];return M.viewBox=L.join(" "),{attributes:M,viewBox:L,body:h}}const cG=/\sid="(\S+)"/g,uG="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let hG=0;function dG(e,t=uG){const r=[];let i;for(;i=cG.exec(e);)r.push(i[1]);if(!r.length)return e;const a="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(h=>{const d=typeof t=="function"?t(h):t+(hG++).toString(),o=h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+d+a+"$3")}),e=e.replace(new RegExp(a,"g"),""),e}const J1=Object.create(null);function p5(e,t){J1[e]=t}function Q1(e){return J1[e]||J1[""]}function FS(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const t0=Object.create(null),Mp=["https://api.simplesvg.com","https://api.unisvg.com"],g_=[];for(;Mp.length>0;)Mp.length===1||Math.random()>.5?g_.push(Mp.shift()):g_.push(Mp.pop());t0[""]=FS({resources:["https://api.iconify.design"].concat(g_)});function m5(e,t){const r=FS(t);return r===null?!1:(t0[e]=r,!0)}function r0(e){return t0[e]}function fG(){return Object.keys(t0)}const pG=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let av=pG();function mG(e){av=e}function gG(){return av}function yG(e,t){const r=r0(e);if(!r)return 0;let i;if(!r.maxURL)i=0;else{let a=0;
50r.resources.forEach(d=>{a=Math.max(a,d.length)});const h=t+".json?icons=";i=r.maxURL-a-r.path.length-h.length}return i}function _G(e){return e===404}const vG=(e,t,r)=>{const i=[],a=yG(e,t),h="icons";let d={type:h,provider:e,prefix:t,icons:[]},o=0;return r.forEach((y,w)=>{o+=y.length+1,o>=a&&w>0&&(i.push(d),d={type:h,provider:e,prefix:t,icons:[]},o=y.length),d.icons.push(y)}),i.push(d),i};function bG(e){if(typeof e=="string"){const t=r0(e);if(t)return t.path}return"/"}const xG=(e,t,r)=>{if(!av){r("abort",424);return}let i=bG(t.provider);switch(t.type){case"icons":{const h=t.prefix,o=t.icons.join(","),y=new URLSearchParams({icons:o});i+=h+".json?"+y.toString();break}case"custom":{const h=t.uri;i+=h.slice(0,1)==="/"?h.slice(1):h;break}default:r("abort",400);return}let a=503;av(e+i).then(h=>{const d=h.status;if(d!==200){setTimeout(()=>{r(_G(d)?"abort":"next",d)});return}return a=501,h.json()}).then(h=>{if(typeof h!="object"||h===null){setTimeout(()=>{h===404?r("abort",h):r("next",a)});return}setTimeout(()=>{r("success",h)})}).catch(()=>{r("next",a)})},wG={prepare:vG,send:xG};function SG(e){const t={loaded:[],missing:[],pending:[]},r=Object.create(null);e.sort((a,h)=>a.provider!==h.provider?a.provider.localeCompare(h.provider):a.prefix!==h.prefix?a.prefix.localeCompare(h.prefix):a.name.localeCompare(h.name));let i={provider:"",prefix:"",name:""};return e.forEach(a=>{if(i.name===a.name&&i.prefix===a.prefix&&i.provider===a.provider)return;i=a;const h=a.provider,d=a.prefix,o=a.name,y=r[h]||(r[h]=Object.create(null)),w=y[d]||(y[d]=Vu(h,d));let T;o in w.icons?T=t.loaded:d===""||w.missing.has(o)?T=t.missing:T=t.pending;const k={provider:h,prefix:d,name:o};T.push(k)}),t}function g5(e,t){e.forEach(r=>{const i=r.loaderCallbacks;i&&(r.loaderCallbacks=i.filter(a=>a.id!==t))})}function TG(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let r=!1;const i=e.provider,a=e.prefix;t.forEach(h=>{const d=h.icons,o=d.pending.length;d.pending=d.pending.filter(y=>{if(y.prefix!==a)return!0;const w=y.name;if(e.icons[w])d.loaded.push({provider:i,prefix:a,name:w});else if(e.missing.has(w))d.missing.push({provider:i,prefix:a,name:w});else return r=!0,!0;return!1}),d.pending.length!==o&&(r||g5([e],h.id),h.callback(d.loaded.slice(0),d.missing.slice(0),d.pending.slice(0),h.abort))})}))}let CG=0;function EG(e,t,r){const i=CG++,a=g5.bind(null,r,i);if(!t.pending.length)return a;const h={id:i,icons:t,callback:e,abort:a};return r.forEach(d=>{(d.loaderCallbacks||(d.loaderCallbacks=[])).push(h)}),a}function kG(e,t=!0,r=!1){const i=[];return e.forEach(a=>{const h=typeof a=="string"?ag(a,t,r):a;h&&i.push(h)}),i}var IG={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function PG(e,t,r,i){const a=e.resources.length,h=e.random?Math.floor(Math.random()*a):e.index;let d;if(e.random){let te=e.resources.slice(0);for(d=[];te.length>1;){const ce=Math.floor(Math.random()*te.length);d.push(te[ce]),te=te.slice(0,ce).concat(te.slice(ce+1))}d=d.concat(te)}else d=e.resources.slice(h).concat(e.resources.slice(0,h));const o=Date.now();let y="pending",w=0,T,k=null,M=[],P=[];typeof i=="function"&&P.push(i);function L(){k&&(clearTimeout(k),k=null)}function O(){y==="pending"&&(y="aborted"),L(),M.forEach(te=>{te.status==="pending"&&(te.status="aborted")}),M=[]}function $(te,ce){ce&&(P=[]),typeof te=="function"&&P.push(te)}function Z(){return{startTime:o,payload:t,status:y,queriesSent:w,queriesPending:M.length,subscribe:$,abort:O}}function J(){y="failed",P.forEach(te=>{te(void 0,T)})}function H(){M.forEach(te=>{te.status==="pending"&&(te.status="aborted")}),M=[]}function U(te,ce,fe){const Se=ce!=="success";switch(M=M.filter(xe=>xe!==te),y){case"pending":break;case"failed":if(Se||!e.dataAfterTimeout)return;break;default:return}if(ce==="abort"){T=fe,J();return}if(Se){T=fe,M.length||(d.length?V():J());return}if(L(),H(),!e.random){const xe=e.resources.indexOf(te.resource);xe!==-1&&xe!==e.index&&(e.index=xe)}y="completed",P.forEach(xe=>{xe(fe)})}function V(){if(y!=="pending")return;L();const te=d.shift();if(te===void 0){if(M.length){k=setTimeout(()=>{L(),y==="pending"&&(H(),J())},e.timeout);return}J();return}const ce={status:"pending",resource:te,callback:(fe,Se)=>{U(ce,fe,Se)}};M.push(ce),w++,k=setTimeout(V,e.rotate),r(te,t,ce.callback)}return setTimeout(V),Z}function y5(e){const t={...IG,...e};let r=[];function i(){r=r.filter(o=>o().status==="pending")}function a(o,y,w){const T=PG(t,o,y,(k,M)=>{i(),w&&w(k,M)});return r.push(T),T}function h(o){return r.find(y=>o(y))||null}return{query:a,find:h,setIndex:o=>{t.index=o},getIndex:()=>t.index,cleanup:i}}function Nk(){}const vx=Object.create(null);function AG(e){if(!vx[e]){const t=r0(e);if(!t)return;const r=y5(t),i={config:t,redundancy:r};vx[e]=i}return vx[e]}function _5(e,t,r){let i,a;if(typeof e=="string"){const h=Q1(e);if(!h)return r(void 0,424),Nk;a=h.send;const d=AG(e);d&&(i=d.redundancy)}else{const h=FS(e);if(h){i=y5(h);const d=e.resources?e.resources[0]:"",o=Q1(d);o&&(a=o.send)}}return!i||!a?(r(void 0,424),Nk):i.query(t,a,r)().abort}function jk(){}function MG(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,TG(e)}))}function RG(e){const t=[],r=[];return e.forEach(i=>
50{(i.match(o5)?t:r).push(i)}),{valid:t,invalid:r}}function Rp(e,t,r){function i(){const a=e.pendingIcons;t.forEach(h=>{a&&a.delete(h),e.icons[h]||e.missing.add(h)})}if(r&&typeof r=="object")try{if(!u5(e,r).length){i();return}}catch(a){console.error(a)}i(),MG(e)}function $k(e,t){e instanceof Promise?e.then(r=>{t(r)}).catch(()=>{t(null)}):t(e)}function LG(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:r,prefix:i}=e,a=e.iconsToLoad;if(delete e.iconsToLoad,!a||!a.length)return;const h=e.loadIcon;if(e.loadIcons&&(a.length>1||!h)){$k(e.loadIcons(a,i,r),T=>{Rp(e,a,T)});return}if(h){a.forEach(T=>{const k=h(T,i,r);$k(k,M=>{const P=M?{prefix:i,icons:{[T]:M}}:null;Rp(e,[T],P)})});return}const{valid:d,invalid:o}=RG(a);if(o.length&&Rp(e,o,null),!d.length)return;const y=i.match(o5)?Q1(r):null;if(!y){Rp(e,d,null);return}y.prepare(r,i,d).forEach(T=>{_5(r,T,k=>{Rp(e,T.icons,k)})})}))}const v5=(e,t)=>{const r=kG(e,!0,h5()),i=SG(r);if(!i.pending.length){let y=!0;return t&&setTimeout(()=>{y&&t(i.loaded,i.missing,i.pending,jk)}),()=>{y=!1}}const a=Object.create(null),h=[];let d,o;return i.pending.forEach(y=>{const{provider:w,prefix:T}=y;if(T===o&&w===d)return;d=w,o=T,h.push(Vu(w,T));const k=a[w]||(a[w]=Object.create(null));k[T]||(k[T]=[])}),i.pending.forEach(y=>{const{provider:w,prefix:T,name:k}=y,M=Vu(w,T),P=M.pendingIcons||(M.pendingIcons=new Set);P.has(k)||(P.add(k),a[w][T].push(k))}),h.forEach(y=>{const w=a[y.provider][y.prefix];w.length&&LG(y,w)}),t?EG(t,i,h):jk},zG=e=>new Promise((t,r)=>{const i=typeof e=="string"?ag(e,!0):e;if(!i){r(e);return}v5([i||e],a=>{if(a.length&&i){const h=OS(i);if(h){t({...of,...h});return}}r(e)})});function DG(e,t,r){Vu("",t).loadIcons=e}function OG(e,t){const r={...e};for(const i in t){const a=t[i],h=typeof a;i in d5?(a===null||a&&(h==="string"||h==="number"))&&(r[i]=a):h===typeof r[i]&&(r[i]=i==="rotate"?a%4:a)}return r}const FG=/[\s,]+/;function BG(e,t){t.split(FG).forEach(r=>{switch(r.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function NG(e,t=0){const r=e.replace(/^-?[0-9.]*/,"");function i(a){for(;a<0;)a+=4;return a%4}if(r===""){const a=parseInt(e);return isNaN(a)?0:i(a)}else if(r!==e){let a=0;switch(r){case"%":a=25;break;case"deg":a=90}if(a){let h=parseFloat(e.slice(0,e.length-r.length));return isNaN(h)?0:(h=h/a,h%1===0?i(h):0)}}return t}function jG(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function $G(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function UG(e){return"data:image/svg+xml,"+$G(e)}function VG(e){return'url("'+UG(e)+'")'}const Uk={...f5,inline:!1},qG={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},GG={display:"inline-block"},ew={backgroundColor:"currentColor"},b5={backgroundColor:"transparent"},Vk={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},qk={webkitMask:ew,mask:ew,background:b5};for(const e in qk){const t=qk[e];for(const r in Vk)t[e+r]=Vk[r]}const y_={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";y_[e+"-flip"]=t,y_[e.slice(0,1)+"-flip"]=t,y_[e+"Flip"]=t});function Gk(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Hk=(e,t)=>{const r=OG(Uk,t),i={...qG},a=t.mode||"svg",h={},d=t.style,o=typeof d=="object"&&!(d instanceof Array)?d:{};for(let O in t){const $=t[O];if($!==void 0)switch(O){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":r[O]=$===!0||$==="true"||$===1;break;case"flip":typeof $=="string"&&BG(r,$);break;case"color":h.color=$;break;case"rotate":typeof $=="string"?r[O]=NG($):typeof $=="number"&&(r[O]=$);break;case"ariaHidden":case"aria-hidden":$!==!0&&$!=="true"&&delete i["aria-hidden"];break;default:{const Z=y_[O];Z?($===!0||$==="true"||$===1)&&(r[Z]=!0):Uk[O]===void 0&&(i[O]=$)}}}const y=lG(e,r),w=y.attributes;if(r.inline&&(h.verticalAlign="-0.125em"),a==="svg"){i.style={...h,...o},Object.assign(i,w);let O=0,$=t.id;return typeof $=="string"&&($=$.replace(/-/g,"_")),i.innerHTML=dG(y.body,$?()=>$+"ID"+O++:"iconifyVue"),cn("svg",i)}const{body:T,width:k,height:M}=e,P=a==="mask"||(a==="bg"?!1:T.indexOf("currentColor")!==-1),L=jG(T,{...w,width:k+"",he
50ight:M+""});return i.style={...h,"--svg":VG(L),width:Gk(w.width),height:Gk(w.height),...GG,...P?ew:b5,...o},cn("span",i)};h5(!0);p5("",wG);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!tG(i))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let r in t){const i="IconifyProviders["+r+"] is invalid.";try{const a=t[r];if(typeof a!="object"||!a||a.resources===void 0)continue;m5(r,a)||console.error(i)}catch{console.error(i)}}}}const HG={...of,body:""},ZG=Rr({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,t,r){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:e};let i;if(typeof e!="string"||(i=ag(e,!1,!0))===null)return this.abortLoading(),null;let a=OS(i);if(!a)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",a!==null&&(this._loadingIcon={name:e,abort:v5([i],()=>{this.counter++})})),null;if(this.abortLoading(),this._name!==e&&(this._name=e,t&&t(e)),r){a=Object.assign({},a);const d=r(a.body,i.name,i.prefix,i.provider);typeof d=="string"&&(a.body=d)}const h=["iconify"];return i.prefix!==""&&h.push("iconify--"+i.prefix),i.provider!==""&&h.push("iconify--"+i.provider),{data:a,classes:h}}},render(){this.counter;const e=this.$attrs,t=this.iconMounted||e.ssr?this.getIcon(e.icon,e.onLoad,e.customise):null;if(!t)return Hk(HG,e);let r=e;return t.classes&&(r={...e,class:(typeof e.class=="string"?e.class+" ":"")+t.classes.join(" ")}),Hk({...of,...t.data},r)}}),Zk={getAPIConfig:r0,setAPIModule:p5,sendAPIQuery:_5,setFetch:mG,getFetch:gG,listAPIProviders:fG},WG=Object.freeze({left:0,top:0,width:16,height:16}),x5=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),BS=Object.freeze({...WG,...x5});Object.freeze({...BS,body:"",hidden:!1});function KG(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}const XG=/(-?[0-9.]*[0-9]+[0-9.]*)/g,YG=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function tw(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(XG);if(i===null||!i.length)return e;const a=[];let h=i.shift(),d=YG.test(h);for(;;){if(d){const o=parseFloat(h);isNaN(o)?a.push(h):a.push(Math.ceil(o*t*r)/r)}else a.push(h);if(h=i.shift(),h===void 0)return a.join("");d=!d}}function JG(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function QG(e){return"data:image/svg+xml,"+JG(e)}function eH(e){return'url("'+QG(e)+'")'}function tH(e){const[t,r,i,a]=e;if(i!==a){const h=Math.max(i,a);return[t-(h-i)/2,r-(h-a)/2,h,h]}return e}const rH=Object.freeze({width:null,height:null}),nH=Object.freeze({...rH,...x5});function iH(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),h=e.indexOf("</"+t);if(a===-1||h===-1)break;const d=e.indexOf(">",h);if(d===-1)break;r+=e.slice(a+1,h).trim(),e=e.slice(0,i).trim()+e.slice(d+1)}return{defs:r,content:e}}function sH(e,t){return e?"<defs>"+e+"</defs>"+t:t}function oH(e,t,r){const i=iH(e);return sH(i.defs,t+i.content+r)}const aH=e=>e==="unset"||e==="undefined"||e==="none";function lH(e,t){const r={...BS,...e},i={...nH,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let h=r.body;[r,i].forEach(O=>{const $=[],Z=O.hFlip,J=O.vFlip;let H=O.rotate;Z?J?H+=2:($.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),$.push("scale(-1 1)"),a.top=a.left=0):J&&($.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),$.push("scale(1 -1)"),a.top=a.left=0);let U;switch(H<0&&(H-=Math.floor(H/4)*4),H=H%4,H){case 1:U=a.height/2+a.top,$.unshift("rotate(90 "+U.toString()+" "+U.toString()+")");break;case 2:$.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:U=a.width/2+a.left,$.unshift("rotate(-90 "+U.toString()+" "+U.toString()+")");break}H%2===1&&(a.left!==a.top&&(U=a.left,a.left=a.top,a.top=U),a.width!==a.height&&(U=a.width,a.width=a.height,a.height=U)),$.length&&(h=oH(h,'<g transform="'+$.join(" ")+'">',"</g>"))});const d=i.width,o=i.height,y=a.width,w=a.height;let T,k;d===null?(k=o===null?"1em":o==="auto"?w:o,T=tw(k,y/w)):(T=d==="auto"?y:d,k=o===null?tw(T,w/y):o==="auto"?w:o);const M={},P=(O,$)=>{aH($)||(M[O]=$.toString())};P("width",T),P("height",k);const L=[a.left,a.top,y,w];
50return M.viewBox=L.join(" "),{attributes:M,viewBox:L,body:h}}function cH(e){const t={display:"inline-block",width:"1em",height:"1em"},r=e.varName;switch(e.pseudoSelector&&(t.content="''"),e.mode){case"background":r&&(t["background-image"]="var(--"+r+")"),t["background-repeat"]="no-repeat",t["background-size"]="100% 100%";break;case"mask":t["background-color"]="currentColor",r&&(t["mask-image"]=t["-webkit-mask-image"]="var(--"+r+")"),t["mask-repeat"]=t["-webkit-mask-repeat"]="no-repeat",t["mask-size"]=t["-webkit-mask-size"]="100% 100%";break}return t}function uH(e,t){const r={},i=t.varName,a=lH(e);let h=a.viewBox;h[2]!==h[3]&&(t.forceSquare?h=tH(h):r.width=tw("1em",h[2]/h[3]));const d=KG(a.body.replace(/currentColor/g,t.color||"black"),{viewBox:`${h[0]} ${h[1]} ${h[2]} ${h[3]}`,width:`${h[2]}`,height:`${h[3]}`}),o=eH(d);if(i)r["--"+i]=o;else switch(t.mode){case"background":r["background-image"]=o;break;case"mask":r["mask-image"]=r["-webkit-mask-image"]=o;break}return r}const bx={selectorStart:{compressed:"{",compact:" {",expanded:" {"},selectorEnd:{compressed:"}",compact:`; }
51`,expanded:`;
52}
53`},rule:{compressed:"{key}:",compact:" {key}: ",expanded:`
54  {key}: `}};function hH(e,t="expanded"){const r=[];for(let i=0;i<e.length;i++){const{selector:a,rules:h}=e[i];let o=(a instanceof Array?a.join(t==="compressed"?",":", "):a)+bx.selectorStart[t],y=!0;for(const w in h)y||(o+=";"),o+=bx.rule[t].replace("{key}",w)+h[w],y=!1;o+=bx.selectorEnd[t],r.push(o)}return r.join(t==="compressed"?"":`
55`)}function dH(e,t={}){const r=t.customise?t.customise(e.body):e.body,i=t.mode||(t.color||!r.includes("currentColor")?"background":"mask");let a=t.varName;a===void 0&&i==="mask"&&(a="svg");const h={...t,mode:i,varName:a};i==="background"&&delete h.varName;const d={...t.rules,...cH(h),...uH({...BS,...e,body:r},h)},o=t.iconSelector||".icon";return hH([{selector:o,rules:d}],h.format)}let Wk=!1;function w5(e){if(Wk)return;const t=JSON.parse('[{"prefix":"lucide","icons":{"arrow-left":{"width":24,"height":24,"body":"<path fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"2\\" d=\\"m12 19l-7-7l7-7m7 7H5\\"/>"},"message-circle":{"width":24,"height":24,"body":"<path fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"2\\" d=\\"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092a10 10 0 1 0-4.777-4.719\\"/>"},"x":{"width":24,"height":24,"body":"<path fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"2\\" d=\\"M18 6L6 18M6 6l12 12\\"/>"},"file":{"width":24,"height":24,"body":"<g fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"2\\"><path d=\\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\\"/><path d=\\"M14 2v5a1 1 0 0 0 1 1h5\\"/></g>"},"loader-2":{"width":24,"height":24,"body":"<path fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"2\\" d=\\"M21 12a9 9 0 1 1-6.219-8.56\\"/>"},"paperclip":{"width":24,"height":24,"body":"<path fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"2\\" d=\\"m16 6l-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\\"/>"},"send":{"width":24,"height":24,"body":"<path fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"2\\" d=\\"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11zm7.318-19.539l-10.94 10.939\\"/>"},"calendar":{"width":24,"height":24,"body":"<g fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"2\\"><path d=\\"M8 2v4m8-4v4\\"/><rect width=\\"18\\" height=\\"18\\" x=\\"3\\" y=\\"4\\" rx=\\"2\\"/><path d=\\"M3 10h18\\"/></g>"}}},{"prefix":"iconamoon","icons":{"arrow-right-2":{"width":24,"height":24,"body":"<path fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"2\\" d=\\"m10 17l5-5m0 0l-5-5\\"/>"}}},{"prefix":"heroicons","icons":{"x-mark-20-solid":{"width":20,"height":20,"body":"<path fill=\\"currentColor\\" d=\\"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94z\\"/>"}}},{"prefix":"mingcute","icons":{"loading-fill":{"width":24,"height":24,"body":"<defs><linearGradient id=\\"mingcuteLoadingFill0\\" x1=\\"50%\\" x2=\\"50%\\" y1=\\"5.271%\\" y2=\\"91.793%\\"><stop offset=\\"0%\\" stop-color=\\"currentColor\\"/><stop offset=\\"100%\\" stop-color=\\"currentColor\\" stop-opacity=\\".55\\"/></linearGradient><linearGradient id=\\"mingcuteLoadingFill1\\" x1=\\"50%\\" x2=\\"50%\\" y1=\\"15.24%\\" y2=\\"87.15%\\"><stop offset=\\"0%\\" stop-color=\\"currentColor\\" stop-opacity=\\"0\\"/><stop offset=\\"100%\\" stop-color=\\"currentColor\\" stop-opacity=\\".55\\"/></linearGradient></defs><g fill=\\"none\\"><path d=\\"m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.01
557.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z\\"/><path fill=\\"url(#mingcuteLoadingFill0)\\" d=\\"M8.749.021a1.5 1.5 0 0 1 .497 2.958A7.5 7.5 0 0 0 3 10.375a7.5 7.5 0 0 0 7.5 7.5v3c-5.799 0-10.5-4.7-10.5-10.5C0 5.23 3.726.865 8.749.021\\" transform=\\"translate(1.5 1.625)\\"/><path fill=\\"url(#mingcuteLoadingFill1)\\" d=\\"M15.392 2.673a1.5 1.5 0 0 1 2.119-.115A10.48 10.48 0 0 1 21 10.375c0 5.8-4.701 10.5-10.5 10.5v-3a7.5 7.5 0 0 0 5.007-13.084a1.5 1.5 0 0 1-.115-2.118\\" transform=\\"translate(1.5 1.625)\\"/></g>"}}}]');for(const r of t)for(const[i,a]of Object.entries(r.icons))e(r.prefix?r.prefix+":"+i:i,a);Wk=!0}async function fH(e,t){if(!e)return null;w5(Im);const r=Y1(e);return r||(await zG(e).catch(()=>(console.warn(`[Icon] failed to load icon \`${e}\``),null)),Y1(e))}function S5(e){const t=Us().icon,r=(t.collections||[]).sort((i,a)=>a.length-i.length);return it(()=>{var d;const i=e(),a=i.startsWith(t.cssSelectorPrefix)?i.slice(t.cssSelectorPrefix.length):i,h=((d=t.aliases)==null?void 0:d[a])||a;if(!h.includes(":")){const o=r.find(y=>h.startsWith(y+"-"));return o?o+":"+h.slice(o.length+1):h}return h})}function T5(e,t){if(e!==!1)return e===!0||e===null?t:e}let Lp;function pH(e){return e.replace(/([^\w-])/g,"\\$1")}function mH(){if(Lp)return Lp;Lp=new Set;const e=r=>{if(r=r.replace(/^:where\((.*)\)$/,"$1").trim(),r.startsWith("."))return r},t=r=>{if(r!=null&&r.length)for(const i of r){i!=null&&i.cssRules&&t(i.cssRules);const a=i==null?void 0:i.selectorText;if(typeof a=="string"){const h=e(a);h&&Lp.add(h)}}};if(typeof document<"u")for(const r of document.styleSheets)try{const i=r.cssRules||r.rules;t(i)}catch{}return Lp}const gH=Rr({name:"NuxtIconCss",props:{name:{type:String,required:!0},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e){const t=Lr(),r=Us().icon,i=it(()=>e.name?r.cssSelectorPrefix+e.name:"");function a(o){var T,k;if(!o)return;const y=Y1(o);if(y)return y;const w=(k=(T=t.payload)==null?void 0:T.data)==null?void 0:k[o];if(w)return Im(o,w),w}const h=it(()=>"."+pH(i.value));function d(o,y=!0){let w=h.value;r.cssWherePseudo&&(w=`:where(${w})`);const T=dH(o,{iconSelector:w,format:"compressed",customise:T5(e.customize,r.customize)});return r.cssLayer&&y?`@layer ${r.cssLayer} { ${T} }`:T}{const o=mH();async function y(w){if(o.has(h.value)||typeof document>"u")return;const T=document.createElement("style");T.textContent=d(w);const k=document.head.querySelector('style, link[rel="stylesheet"]');k?document.head.insertBefore(T,k):document.head.appendChild(T),o.add(h.value)}Mr(()=>e.name,()=>{if(o.has(h.value))return;const w=a(e.name);w?y(w):fH(e.name).then(T=>{T&&y(T)}).catch(()=>null)},{immediate:!0})}return()=>cn("span",{class:["iconify",i.value]})}}),yH=Rr({name:"NuxtIconSvg",props:{name:{type:String,required:!0},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e,{slots:t}){const r=Lr(),i=Us().icon,a=S5(()=>e.name),h="i-"+a.value;if(a.value){const d=r.payload.data[h];d?Im(a.value,d):w5(Im)}return()=>cn(ZG,{icon:a.value,ssr:!0,customise:T5(e.customize,i.customize)},t)}}),C5=Rr({name:"NuxtIcon",props:{name:{type:String,required:!0},mode:{type:String,required:!1,default:null},size:{type:[Number,String],required:!1,default:null},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e,{slots:t}){const r=Lr(),i=Us().icon,a=S5(()=>e.name),h=it(()=>{var o;return((o=r.vueApp)==null?void 0:o.component(a.value))||((e.mode||i.mode)==="svg"?yH:gH)}),d=it(()=>{const o=e.size||i.size;return o?{fontSize:Number.isNaN(+o)?o:o+"px"}:null});return()=>cn(h.value,{...i.attrs,name:a.value,class:i.class,style:d.value,customize:e.customize},t)}}),_H=Object.freeze(Object.defineProperty({__proto__:null,default:C5},Symbol.toStringTag,{value:"Module"}));function NS(e){return e?e.flatMap(t=>t.type===Cn?NS(t.children):[t]):[]}const lv=Rr({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:r}){return()=>{var y;if(!r.default)return null;const i=NS(r.default()),a=i.findIndex(w=>w.type!==Yn);if(a===-1)return i;const h=i[a];(y=h.props)==null||delete y.ref;const d=h.props?ln(t,h.props):t,o=Sa({...h,props:{}},d);return i.length===1?o:(i[a]=o,i)}}}),vH=["area","img","input"],uo=Rr({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:r}){const i=e.asChild?"template":e.as;return typeof i=="string"&&vH.includes(i)?()=>cn(i,t):i!=="template"?()=>cn(e.as,t,{default:r.default}):()=>cn(lv,t,{default:r.default})}}),E5=Rr({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(e){return(t,r)=>(Ft(),Kt(ot(uo),{as:t.as,"as-child":t.asChild,"aria-hidden":t.feature==="focusable"?"true":void 0,"data-hidden":t.feature==="fully-hidden"?"":void 0,tabindex:t.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:dr(()=>[Nr(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function lne(e,t){var r;const i=wa();return jo(()=>{i.value=e()},{...t,flush:(r=void 0)!=null?r:"sync"}),Ca(i)}function Qu(e){return Zu()?(kd(e),!0):!1}function cne(){const e=new Set,t=h=>{e.delete(h)};return{on:h=>{e.add(h);const d=()=>t(h);return Qu(d),{off:d}},off:t,trigger:(...h)=>Promise.all(Array.from(e).map(d=>d(...h))),clear:()=>{e.clear()}}}function une(e){let t=!1,r;const i=Vd(!0);return(...a)=>(t||(r=i.run(()=>e(...a)),t=!0),r)}function hne(e){let t=0,r,i;const a=()=>{t-=1,i&&t<=0&&(i.stop(),r=void 0,i=void 0)};return(...h)=>(t+=1,i||(i=Vd(!0),r=i.run(()=>e(...h))),Qu(a),r)}function bH(e){if(!Xr(e))return Mi(e);const t=new Proxy({},{get(r,i,a){return ot(Reflect.get(e.value,i,a))},set(r,i,a){return Xr(e.value[i])&&!Xr(a)?e.value[i].value=a:e.value[i]=a,!0},deleteProperty(r,i){return Reflect.deleteProperty(e.value,i)},has(r,i){return Reflect.has(e.value,i)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return Mi(t)}function xH(e){return bH(it(e))}function dne(e,...t){const r=t.flat(),i=r[0];return xH(()=>Object.fromEntries(typeof i=="function"?Object.entries(Bo(e)).filter(([a,h])=>!i(En(h),a)):Object.entries(Bo(e)).filter(a=>!r.includes(a[0]))))}const eh=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const wH=e=>typeof e<"u",SH=Object.prototype.toString,TH=e=>SH.call(e)==="[object Object]",k5=()=>{},fne=CH();function CH(){var e,t;return eh&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function EH(e,t){function r(...i){return new Promise((a,h)=>{Promise.resolve(e(()=>t.apply(this,i),{fn:t,thisArg:this,args:i})).then(a).catch(h)})}return r}const I5=e=>e();function kH(e=I5,t={}){const{initialState:r="active"}=t,i=PH(r==="active");function a(){i.value=!1}function h(){i.value=!0}const d=(...o)=>{i.value&&e(...o)};return{isActive:Ca(i),pause:a,resume:h,eventFilter:d}}function IH(e){return ci()}function xx(e){return Array.isArray(e)?e:[e]}function PH(...e){if(e.length!==1)return Fs(...e);const t=e[0];return typeof t=="function"?Ca(jm(()=>({get:t,set:k5}))):It(t)}function pne(e,t=1e4){return jm((r,i)=>{let a=En(e),h;const d=()=>setTimeout(()=>{a=En(e),i()},En(t));return Qu(()=>{clearTimeout(h)}),{get(){return r(),a},set(o){a=o,i(),clearTimeout(h),h=d()}}})}function AH(e,t,r={}){const{eventFilter:i=I5,...a}=r;return Mr(e,EH(i,t),a)}function Kk(e,t,r={}){const{eventFilter:i,initialState:a="active",...h}=r,{eventFilter:d,pause:o,resume:y,isActive:w}=kH(i,{initialState:a});return{stop:AH(e,t,{...h,eventFilter:d}),pause:o,resume:y,isActive:w}}function mne(e,t,...[r]){const{flush:i="sync",deep:a=!1,immediate:h=!0,direction:d="both",transform:o={}}=r||{},y=[],w="ltr"in o&&o.ltr||(M=>M),T="rtl"in o&&o.rtl||(M=>M);return(d==="both"||d==="ltr")&&y.push(Kk(e,M=>
55{y.forEach(P=>P.pause()),t.value=w(M),y.forEach(P=>P.resume())},{flush:i,deep:a,immediate:h})),(d==="both"||d==="rtl")&&y.push(Kk(t,M=>{y.forEach(P=>P.pause()),e.value=T(M),y.forEach(P=>P.resume())},{flush:i,deep:a,immediate:h})),()=>{y.forEach(M=>M.stop())}}const gne=En;function yne(e,t){IH()&&bc(e,t)}function P5(e,t,r={}){const{immediate:i=!0,immediateCallback:a=!1}=r,h=wa(!1);let d=null;function o(){d&&(clearTimeout(d),d=null)}function y(){h.value=!1,o()}function w(...T){a&&e(),o(),h.value=!0,d=setTimeout(()=>{h.value=!1,d=null,e(...T)},En(t))}return i&&(h.value=!0,eh&&w()),Qu(y),{isPending:Ca(h),start:w,stop:y}}function MH(e=1e3,t={}){const{controls:r=!1,callback:i}=t,a=P5(i??k5,e,t),h=it(()=>!a.isPending.value);return r?{ready:h,...a}:h}function RH(e,t,r){return Mr(e,t,{...r,immediate:!0})}const lg=eh?window:void 0;function vc(e){var t;const r=En(e);return(t=r==null?void 0:r.$el)!=null?t:r}function LH(...e){const t=[],r=()=>{t.forEach(o=>o()),t.length=0},i=(o,y,w,T)=>(o.addEventListener(y,w,T),()=>o.removeEventListener(y,w,T)),a=it(()=>{const o=xx(En(e[0])).filter(y=>y!=null);return o.every(y=>typeof y!="string")?o:void 0}),h=RH(()=>{var o,y;return[(y=(o=a.value)==null?void 0:o.map(w=>vc(w)))!=null?y:[lg].filter(w=>w!=null),xx(En(a.value?e[1]:e[0])),xx(ot(a.value?e[2]:e[1])),En(a.value?e[3]:e[2])]},([o,y,w,T])=>{if(r(),!(o!=null&&o.length)||!(y!=null&&y.length)||!(w!=null&&w.length))return;const k=TH(T)?{...T}:T;t.push(...o.flatMap(M=>y.flatMap(P=>w.map(L=>i(M,P,L,k)))))},{flush:"post"}),d=()=>{h(),r()};return Qu(r),d}function A5(){const e=wa(!1),t=ci();return t&&js(()=>{e.value=!0},t),e}function zH(e){const t=A5();return it(()=>(t.value,!!e()))}function DH(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function jS(...e){let t,r,i={};e.length===3?(t=e[0],r=e[1],i=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,r=e[0],i=e[1]):(t=e[0],r=e[1]):(t=!0,r=e[0]);const{target:a=lg,eventName:h="keydown",passive:d=!1,dedupe:o=!1}=i,y=DH(t);return LH(a,h,T=>{T.repeat&&En(o)||y(T)&&r(T)},d)}function M5(e,t={}){const{immediate:r=!0,fpsLimit:i=void 0,window:a=lg,once:h=!1}=t,d=wa(!1),o=it(()=>i?1e3/En(i):null);let y=0,w=null;function T(P){if(!d.value||!a)return;y||(y=P);const L=P-y;if(o.value&&L<o.value){w=a.requestAnimationFrame(T);return}if(y=P,e({delta:L,timestamp:P}),h){d.value=!1,w=null;return}w=a.requestAnimationFrame(T)}function k(){!d.value&&a&&(d.value=!0,y=0,w=a.requestAnimationFrame(T))}function M(){d.value=!1,w!=null&&a&&(a.cancelAnimationFrame(w),w=null)}return r&&k(),Qu(M),{isActive:Ca(d),pause:M,resume:k}}function OH(e){return JSON.parse(JSON.stringify(e))}function _ne(e,t,r={}){const{window:i=lg,...a}=r;let h;const d=zH(()=>i&&"ResizeObserver"in i),o=()=>{h&&(h.disconnect(),h=void 0)},y=it(()=>{const k=En(e);return Array.isArray(k)?k.map(M=>vc(M)):[vc(k)]}),w=Mr(y,k=>{if(o(),d.value&&i){h=new ResizeObserver(t);for(const M of k)M&&h.observe(M,a)}},{immediate:!0,flush:"post"}),T=()=>{o(),w()};return Qu(T),{isSupported:d,stop:T}}function FH(e,t,r,i={}){var a,h,d;const{clone:o=!1,passive:y=!1,eventName:w,deep:T=!1,defaultValue:k,shouldEmit:M}=i,P=ci(),L=r||(P==null?void 0:P.emit)||((a=P==null?void 0:P.$emit)==null?void 0:a.bind(P))||((d=(h=P==null?void 0:P.proxy)==null?void 0:h.$emit)==null?void 0:d.bind(P==null?void 0:P.proxy));let O=w;t||(t="modelValue"),O=O||`update:${t.toString()}`;const $=H=>o?typeof o=="function"?o(H):OH(H):H,Z=()=>wH(e[t])?$(e[t]):k,J=H=>{M?M(H)&&L(O,H):L(O,H)};if(y){const H=Z(),U=It(H);let V=!1;return Mr(()=>e[t],te=>{V||(V=!0,U.value=$(te),Ri(()=>V=!1))}),Mr(U,te=>{!V&&(te!==e[t]||T)&&J(te)},{deep:T}),U}else return it({get(){return Z()},set(H){J(H)}})}function n0(e,t){const r=typeof e=="string"&&!t?`${e}Context`:t,i=Symbol(r);return[d=>{const o=an(i,d);if(o||o===null)return o;throw new Error(`Injection \`${i.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},d=>(Ns(i,d),d)]}const[vne,BH]=n0("ConfigProvider"),NH=Rr({inheritAttrs:!1,__name:"ConfigProvider",props:{dir:{default:"ltr"},locale:{default:"en"},scrollBody:{type:[Boolean,Object],default:!0},nonce:{default:void 0},useId:{type:Function,default:void 0}},setup(e){const t=e,{dir:r,locale:i,scrollBody:a,nonce:h}=Bo(t);return BH({dir:r,locale:i,scrollBody:a,nonce:h,useId:t.useId}),(d,o)=>Nr(d.$slots,"default")}});function Ea(){const e=ci(),t=It(),r=it(()=>{var d,o;return["#text","#comment"].includes((d=t.value)==null?void 0:d.$el.nodeName)?(o=t.value)==null?void 0:o.$el.nextElementSibling:vc(t)}),i=Object.assign({},e.exposed),a={};for(const d in e.props)Object.defineProperty(a,d,{enumerable:!0,configurable:!0,get:()=>e.props[d]});if(Object.keys(i).length>0)for(const d in i)Object.defineProperty(a,d,{enumerable:!0,configurable:!0,get:()=>i[d]});Object.defineProperty(a,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=a;function h(d){t.value=d,d&&(Object.defineProperty(a,"$el",{enumerable:!0,configurable:!0,get:()=>d instanceof Element?d:d.$el}),e.exposed=a)}return{forwardRef:h,currentRef:t,currentElement:r}}function jH(e,t){const r=It(e);function i(h){return t[r.value][h]??r.value}return{state:r,dispatch:h=>{r.value=i(h)}}}function $H(e,t){var $;const r=It({}),i=It("none"),a=It(e),h=e.value?"mounted":"unmounted";let d;const o=(($=t.value)==null?void 0:$.ownerDocument.defaultView)??lg,{state:y,dispatch:w}=jH(h,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),T=Z=>{var J;if(eh){const H=new CustomEvent(Z,{bubbles:!1,cancelable:!1});(J=t.value)==null||J.dispatchEvent(H)}};Mr(e,async(Z,J)=>{var U;const H=J!==Z;if(await Ri(),H){const V=i.value,te=qy(t.value);Z?(w("MOUNT"),T("enter"),te==="none"&&T("after-enter")):te==="none"||te==="undefined"||((U=r.value)==null?void 0:U.display)==="none"?(w("UNMOUNT"),T("leave"),T("after-leave")):J&&V!==te?(w("ANIMATION_OUT"),T("leave")):(w("UNMOUNT"),T("after-leave"))}},{immediate:!0});const k=Z=>{const J=qy(t.value),H=J.includes(Z.animationName),U=y.value==="mounted"?"enter":"leave";if(Z.target===t.value&&H&&(T(`after-${U}`),w("ANIMATION_END"),!a.value)){const V=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",d=o==null?void 0:o.setTimeout(()=>{var te;((te=t.value)==null?void 0:te.style.animationFillMode)==="forwards"&&(t.value.style.animationFillMode=V)})}Z.target===t.value&&J==="none"&&w("ANIMATION_END")},M=Z=>{Z.target===t.value&&(i.value=qy(t.value))},P=Mr(t,(Z,J)=>{Z?(r.value=getComputedStyle(Z),Z.addEventListener("animationstart",M),Z.addEventListener("animationcancel",k),Z.addEventListener("animationend",k)):(w("ANIMATION_END"),d!==void 0&&(o==null||o.clearTimeout(d)),J==null||J.removeEventListener("animationstart",M),J==null||J.removeEventListener("animationcancel",k),J==null||J.removeEventListener("animationend",k))},{immediate:!0}),L=Mr(y,()=>{const Z=qy(t.value);i.value=y.value==="mounted"?Z:"none"});return Wu(()=>{P(),L()}),{isPresent:it(()=>["mounted","unmountSuspended"].includes(y.value))}}function qy(e){return e&&getComputedStyle(e).animationName||"none"}const UH=Rr({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:r}){var w;const{present:i,forceMount:a}=Bo(e),h=It(),{isPresent:d}=$H(i,h);r({present:d});let o=t.default({present:d.value});o=NS(o||[]);const y=ci();if(o&&(o==null?void 0:o.length)>1){const T=(w=y==null?void 0:y.parent)!=null&&w.type.name?`<${y.parent.type.name} />`:"component";
55throw new Error([`Detected an invalid children for \`${T}\` for  \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(k=>`  - ${k}`).join(`
56`)].join(`
57`))}return()=>a.value||i.value||d.value?cn(t.default({present:d.value})[0],{ref:T=>{const k=vc(T);return typeof(k==null?void 0:k.hasAttribute)>"u"||(k!=null&&k.hasAttribute("data-reka-popper-content-wrapper")?h.value=k.firstElementChild:h.value=k),k}}):null}});function VH(e){const t=ci(),r=t==null?void 0:t.type.emits,i={};return r!=null&&r.length||console.warn(`No emitted event found. Please check component: ${t==null?void 0:t.type.__name}`),r==null||r.forEach(a=>{i[Up(Ai(a))]=(...h)=>e(a,...h)}),i}function Fd(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}const bne="focusScope.autoFocusOnMount",xne="focusScope.autoFocusOnUnmount",wne={bubbles:!1,cancelable:!0};function wx(e,{select:t=!1}={}){const r=Fd();for(const i of e)if(HH(i,{select:t}),Fd()!==r)return!0}function Sne(e){const t=R5(e),r=Xk(t,e),i=Xk(t.reverse(),e);return[r,i]}function R5(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const a=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||a?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Xk(e,t){for(const r of e)if(!qH(r,{upTo:t}))return r}function qH(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function GH(e){return e instanceof HTMLInputElement&&"select"in e}function HH(e,{select:t=!1}={}){if(e&&e.focus){const r=Fd();e.focus({preventScroll:!0}),e!==r&&GH(e)&&t&&e.select()}}function L5(e,t,r){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),i.dispatchEvent(a)}const ZH="dismissableLayer.pointerDownOutside",WH="dismissableLayer.focusOutside";function z5(e,t){const r=t.closest("[data-dismissable-layer]"),i=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),a=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(r&&(i===r||a.indexOf(i)<a.indexOf(r)))}function KH(e,t,r=!0){var d;const i=((d=t==null?void 0:t.value)==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),a=It(!1),h=It(()=>{});return jo(o=>{if(!eh||!En(r))return;const y=async T=>{const k=T.target;if(!(!(t!=null&&t.value)||!k)){if(z5(t.value,k)){a.value=!1;return}if(T.target&&!a.value){let M=function(){L5(ZH,e,P)};const P={originalEvent:T};T.pointerType==="touch"?(i.removeEventListener("click",h.value),h.value=M,i.addEventListener("click",h.value,{once:!0})):M()}else i.removeEventListener("click",h.value);a.value=!1}},w=window.setTimeout(()=>{i.addEventListener("pointerdown",y)},0);o(()=>{window.clearTimeout(w),i.removeEventListener("pointerdown",y),i.removeEventListener("click",h.value)})}),{onPointerDownCapture:()=>{En(r)&&(a.value=!0)}}}function XH(e,t,r=!0){var h;const i=((h=t==null?void 0:t.value)==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),a=It(!1);return jo(d=>{if(!eh||!En(r))return;const o=async y=>{if(!(t!=null&&t.value))return;await Ri(),await Ri();const w=y.target;!t.value||!w||z5(t.value,w)||y.target&&!a.value&&L5(WH,e,{originalEvent:y})};i.addEventListener("focusin",o),d(()=>i.removeEventListener("focusin",o))}),{onFocusCapture:()=>{En(r)&&(a.value=!0)},onBlurCapture:()=>{En(r)&&(a.value=!1)}}}const To=Mi({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Tne=Rr({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const r=e,i=t,{forwardRef:a,currentElement:h}=Ea(),d=it(()=>{var L;return((L=h.value)==null?void 0:L.ownerDocument)??globalThis.document}),o=it(()=>To.layersRoot),y=it(()=>h.value?Array.from(o.value).indexOf(h.value):-1),w=it(()=>To.layersWithOutsidePointerEventsDisabled.size>0),T=it(()=>{const L=Array.from(o.value),[O]=[...To.layersWithOutsidePointerEventsDisabled].slice(-1),$=L.indexOf(O);return y.value>=$}),k=KH(async L=>{const O=[...To.branches].some($=>$==null?void 0:$.contains(L.target));!T.value||O||(i("pointerDownOutside",L),i("interactOutside",L),await Ri(),L.defaultPrevented||i("dismiss"))},h),M=XH(L=>{[...To.branches].some($=>$==null?void 0:$.contains(L.target))||(i("focusOutside",L),i("interactOutside",L),L.defaultPrevented||i("dismiss"))},h);jS("Escape",L=>{y.value===o.value.size-1&&(i("escapeKeyDown",L),L.defaultPrevented||i("dismiss"))});let P;return jo(L=>{h.value&&(r.disableOutsidePointerEvents&&(To.layersWithOutsidePointerEventsDisabled.size===0&&(P=d.value.body.style.pointerEvents,d.value.body.style.pointerEvents="none"),To.layersWithOutsidePointerEventsDisabled.add(h.value)),o.value.add(h.value),L(()=>{r.disableOutsidePointerEvents&&To.layersWithOutsidePointerEventsDisabled.size===1&&(d.value.body.style.pointerEvents=P)}))}),jo(L=>{L(()=>{h.value&&(o.value.delete(h.value),To.layersWithOutsidePointerEventsDisabled.delete(h.value))})}),(L,O)=>(Ft(),Kt(ot(uo),{ref:ot(a),"as-child":L.asChild,as:L.as,"data-dismissable-layer":"",style:fl({pointerEvents:w.value?T.value?"auto":"none":void 0}),onFocusCapture:ot(M).onFocusCapture,onBlurCapture:ot(M).onBlurCapture,onPointerdownCapture:ot(k).onPointerDownCapture},{default:dr(()=>[Nr(L.$slots,"default")]),_:3}
57,8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),YH=Rr({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=A5();return(r,i)=>ot(t)||r.forceMount?(Ft(),Kt(QP,{key:0,to:r.to,disabled:r.disabled,defer:r.defer},[Nr(r.$slots,"default")],8,["to","disabled","defer"])):ai("",!0)}});function af(e){const t=ci(),r=Object.keys((t==null?void 0:t.type.props)??{}).reduce((a,h)=>{const d=(t==null?void 0:t.type.props[h]).default;return d!==void 0&&(a[h]=d),a},{}),i=Fs(e);return it(()=>{const a={},h=(t==null?void 0:t.vnode.props)??{};return Object.keys(h).forEach(d=>{a[Ai(d)]=h[d]}),Object.keys({...r,...a}).reduce((d,o)=>(i.value[o]!==void 0&&(d[o]=i.value[o]),d),{})})}function JH(e,t){const r=af(e),i=t?VH(t):{};return it(()=>({...r.value,...i}))}function Yk(){const e=It(),t=it(()=>{var r,i;return["#text","#comment"].includes((r=e.value)==null?void 0:r.$el.nodeName)?(i=e.value)==null?void 0:i.$el.nextElementSibling:vc(e)});return{primitiveElement:e,currentElement:t}}const Jk="data-reka-collection-item";function $S(e={}){const{key:t="",isProvider:r=!1}=e,i=`${t}CollectionProvider`;let a;if(r){const T=It(new Map);a={collectionRef:It(),itemMap:T},Ns(i,a)}else a=an(i);const h=(T=!1)=>{const k=a.collectionRef.value;if(!k)return[];const M=Array.from(k.querySelectorAll(`[${Jk}]`)),L=Array.from(a.itemMap.value.values()).sort((O,$)=>M.indexOf(O.ref)-M.indexOf($.ref));return T?L:L.filter(O=>O.ref.dataset.disabled!=="")},d=Rr({name:"CollectionSlot",setup(T,{slots:k}){const{primitiveElement:M,currentElement:P}=Yk();return Mr(P,()=>{a.collectionRef.value=P.value}),()=>cn(lv,{ref:M},k)}}),o=Rr({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(T,{slots:k,attrs:M}){const{primitiveElement:P,currentElement:L}=Yk();return jo(O=>{if(L.value){const $=Nm(L.value);a.itemMap.value.set($,{ref:L.value,value:T.value}),O(()=>a.itemMap.value.delete($))}}),()=>cn(lv,{...M,[Jk]:"",ref:P},k)}}),y=it(()=>
57Array.from(a.itemMap.value.values())),w=it(()=>a.itemMap.value.size);return{getItems:h,reactiveItems:y,itemMapSize:w,CollectionSlot:d,CollectionItem:o}}const D5=Rr({__name:"ToastAnnounceExclude",props:{altText:{},asChild:{type:Boolean},as:{}},setup(e){return(t,r)=>(Ft(),Kt(ot(uo),{as:t.as,"as-child":t.asChild,"data-reka-toast-announce-exclude":"","data-reka-toast-announce-alt":t.altText||void 0},{default:dr(()=>[Nr(t.$slots,"default")]),_:3},8,["as","as-child","data-reka-toast-announce-alt"]))}}),[i0,QH]=n0("ToastProvider"),eZ=Rr({inheritAttrs:!1,__name:"ToastProvider",props:{label:{default:"Notification"},duration:{default:5e3},swipeDirection:{default:"right"},swipeThreshold:{default:50}},setup(e){const t=e,{label:r,duration:i,swipeDirection:a,swipeThreshold:h}=Bo(t);$S({isProvider:!0});const d=It(),o=It(0),y=It(!1),w=It(!1);if(t.label&&typeof t.label=="string"&&!t.label.trim()){const T="Invalid prop `label` supplied to `ToastProvider`. Expected non-empty `string`.";throw new Error(T)}return QH({label:r,duration:i,swipeDirection:a,swipeThreshold:h,toastCount:o,viewport:d,onViewportChange(T){d.value=T},onToastAdd(){o.value++},onToastRemove(){o.value--},isFocusedToastEscapeKeyDownRef:y,isClosePausedRef:w}),(T,k)=>Nr(T.$slots,"default")}}),tZ=Rr({__name:"ToastAnnounce",setup(e){const t=i0(),r=MH(1e3),i=It(!1);return M5(()=>{i.value=!0}),(a,h)=>ot(r)||i.value?(Ft(),Kt(ot(E5),{key:0},{default:dr(()=>[Id(Mo(ot(t).label.value)+" ",1),Nr(a.$slots,"default")]),_:3})):ai("",!0)}}),rZ="toast.swipeStart",nZ="toast.swipeMove",iZ="toast.swipeCancel",sZ="toast.swipeEnd",rw="toast.viewportPause",nw="toast.viewportResume";function Gy(e,t,r){const i=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),i.dispatchEvent(a)}function Qk(e,t,r=0){const i=Math.abs(e.x),a=Math.abs(e.y),h=i>a;return t==="left"||t==="right"?h&&i>r:!h&&a>r}function oZ(e){return e.nodeType===e.ELEMENT_NODE}function O5(e){const t=[];return Array.from(e.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&t.push(i.textContent),oZ(i)){const a=i.ariaHidden||i.hidden||i.style.display==="none",h=i.dataset.rekaToastAnnounceExclude==="";if(!a)if(h){const d=i.dataset.rekaToastAnnounceAlt;d&&t.push(d)}else t.push(...O5(i))}}),t}const[aZ,lZ]=n0("ToastRoot"),cZ=Rr({inheritAttrs:!1,__name:"ToastRootImpl",props:{type:{},open:{type:Boolean,default:!1},duration:{},asChild:{type:Boolean},as:{default:"li"}},emits:["close","escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd"],setup(e,{emit:t}){const r=e,i=t,{forwardRef:a,currentElement:h}=Ea(),{CollectionItem:d}=$S(),o=i0(),y=It(null),w=It(null),T=it(()=>typeof r.duration=="number"?r.duration:o.duration.value),k=It(0),M=It(T.value),P=It(0),L=It(T.value),O=M5(()=>{const H=new Date().getTime()-k.value;L.value=Math.max(M.value-H,0)},{fpsLimit:60});function $(H){H<=0||H===Number.POSITIVE_INFINITY||eh&&(window.clearTimeout(P.value),k.value=new Date().getTime(),P.value=window.setTimeout(Z,H))}function Z(H){var te,ce;const U=(H==null?void 0:H.pointerType)==="";((te=h.value)==null?void 0:te.contains(Fd()))&&U&&((ce=o.viewport.value)==null||ce.focus()),U&&(o.isClosePausedRef.value=!1),i("close")}const J=it(()=>h.value?O5(h.value):null);if(r.type&&!["foreground","background"].includes(r.type)){const H="Invalid prop `type` supplied to `Toast`. Expected `foreground | background`.";throw new Error(H)}return jo(H=>{const U=o.viewport.value;if(U){const V=()=>{$(M.value),O.resume(),i("resume")},te=()=>{const ce=new Date().getTime()-k.value;M.value=M.value-ce,window.clearTimeout(P.value),O.pause(),i("pause")};return U.addEventListener(rw,te),U.addEventListener(nw,V),()=>{U.removeEventListener(rw,te),U.removeEventListener(nw,V)}}}),Mr(()=>[r.open,T.value],()=>{M.value=T.value,r.open&&!o.isClosePausedRef.value&&$(T.value)},{immediate:!0}),jS("Escape",H=>{i("escapeKeyDown",H),H.defaultPrevented||(o.isFocusedToastEscapeKeyDownRef.value=!0,Z())}),js(()=>{o.onToastAdd()}),Wu(()=>{o.onToastRemove()}),lZ({onClose:Z}),(H,U)=>(Ft(),Ki(Cn,null,[J.value?(Ft(),Kt(tZ,{key:0,role:"alert","aria-live":H.type==="foreground"?"assertive":"polite","aria-atomic":"true"},{default:dr(()=>[Id(Mo(J.value),1)]),_:1}
57,8,["aria-live"])):ai("",!0),ot(o).viewport.value?(Ft(),Kt(QP,{key:1,to:ot(o).viewport.value},[Sr(ot(d),null,{default:dr(()=>[Sr(ot(uo),ln({ref:ot(a),role:"alert","aria-live":"off","aria-atomic":"true",tabindex:"0"},H.$attrs,{as:H.as,"as-child":H.asChild,"data-state":H.open?"open":"closed","data-swipe-direction":ot(o).swipeDirection.value,style:{userSelect:"none",touchAction:"none"},onPointerdown:U[0]||(U[0]=a_(V=>{y.value={x:V.clientX,y:V.clientY}},["left"])),onPointermove:U[1]||(U[1]=V=>{if(!y.value)return;const te=V.clientX-y.value.x,ce=V.clientY-y.value.y,fe=!!w.value,Se=["left","right"].includes(ot(o).swipeDirection.value),xe=["left","up"].includes(ot(o).swipeDirection.value)?Math.min:Math.max,et=Se?xe(0,te):0,ze=Se?0:xe(0,ce),Ze=V.pointerType==="touch"?10:2,tt={x:et,y:ze},at={originalEvent:V,delta:tt};fe?(w.value=tt,ot(Gy)(ot(nZ),Pe=>i("swipeMove",Pe),at)):ot(Qk)(tt,ot(o).swipeDirection.value,Ze)?(w.value=tt,ot(Gy)(ot(rZ),Pe=>i("swipeStart",Pe),at),V.target.setPointerCapture(V.pointerId)):(Math.abs(te)>Ze||Math.abs(ce)>Ze)&&(y.value=null)}),onPointerup:U[2]||(U[2]=V=>{const te=w.value,ce=V.target;if(ce.hasPointerCapture(V.pointerId)&&ce.releasePointerCapture(V.pointerId),w.value=null,y.value=null,te){const fe=V.currentTarget,Se={originalEvent:V,delta:te};ot(Qk)(te,ot(o).swipeDirection.value,ot(o).swipeThreshold.value)?ot(Gy)(ot(sZ),xe=>i("swipeEnd",xe),Se):ot(Gy)(ot(iZ),xe=>i("swipeCancel",xe),Se),fe==null||fe.addEventListener("click",xe=>xe.preventDefault(),{once:!0})}})}),{default:dr(()=>[Nr(H.$slots,"default",{remaining:L.value,duration:T.value})]),_:3},16,["as","as-child","data-state","data-swipe-direction"])]),_:3})],8,["to"])):ai("",!0)],64))}}),F5=Rr({__name:"ToastClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,r=aZ(),{forwardRef:i}=Ea();return(a,h)=>(Ft(),Kt(D5,{"as-child":""},{default:dr(()=>[Sr(ot(uo),ln(t,{ref:ot(i),type:a.as==="button"?"button":void 0,onClick:ot(r).onClose}),{default:dr(()=>[Nr(a.$slots,"default")]),_:3},16,["type","onClick"])]),_:3}))}}),eI=Rr({__name:"ToastAction",props:{altText:{},asChild:{type:Boolean},as:{}},setup(e){if(!e.altText)throw new Error("Missing prop `altText` expected on `ToastAction`");const{forwardRef:r}=Ea();return(i,a)=>i.altText?(Ft(),Kt(D5,{key:0,"alt-text":i.altText,"as-child":""},{default:dr(()=>[Sr(F5,{ref:ot(r),as:i.as,"as-child":i.asChild},{default:dr(()=>[Nr(i.$slots,"default")]),_:3},8,["as","as-child"])]),_:3},8,["alt-text"])):ai("",!0)}}),uZ=Rr({__name:"ToastDescription",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return Ea(),(r,i)=>(Ft(),Kt(ot(uo),xa(Ku(t)),{default:dr(()=>[Nr(r.$slots,"default")]),_:3},16))}}),hZ=Rr({__name:"ToastPortal",props:{to:{},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(r,i)=>(Ft(),Kt(ot(YH),xa(Ku(t)),{default:dr(()=>[Nr(r.$slots,"default")]),_:3},16))}}),dZ=Rr({__name:"ToastRoot",props:{defaultOpen:{type:Boolean,default:!0},forceMount:{type:Boolean},type:{default:"foreground"},open:{type:Boolean,default:void 0},duration:{},asChild:{type:Boolean},as:{default:"li"}},emits:["escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd","update:open"],setup(e,{emit:t}){const r=e,i=t,{forwardRef:a}=Ea(),h=FH(r,"open",i,{defaultValue:r.defaultOpen,passive:r.open===void 0});return(d,o)=>(Ft(),Kt(ot(UH),{present:d.forceMount||ot(h)},{default:dr(()=>[Sr(cZ,ln({ref:ot(a),open:ot(h),type:d.type,as:d.as,"as-child":d.asChild,duration:d.duration}
57,d.$attrs,{onClose:o[0]||(o[0]=y=>h.value=!1),onPause:o[1]||(o[1]=y=>i("pause")),onResume:o[2]||(o[2]=y=>i("resume")),onEscapeKeyDown:o[3]||(o[3]=y=>i("escapeKeyDown",y)),onSwipeStart:o[4]||(o[4]=y=>{i("swipeStart",y),y.defaultPrevented||y.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:o[5]||(o[5]=y=>{if(i("swipeMove",y),!y.defaultPrevented){const{x:w,y:T}=y.detail.delta,k=y.currentTarget;k.setAttribute("data-swipe","move"),k.style.setProperty("--reka-toast-swipe-move-x",`${w}px`),k.style.setProperty("--reka-toast-swipe-move-y",`${T}px`)}}),onSwipeCancel:o[6]||(o[6]=y=>{if(i("swipeCancel",y),!y.defaultPrevented){const w=y.currentTarget;w.setAttribute("data-swipe","cancel"),w.style.removeProperty("--reka-toast-swipe-move-x"),w.style.removeProperty("--reka-toast-swipe-move-y"),w.style.removeProperty("--reka-toast-swipe-end-x"),w.style.removeProperty("--reka-toast-swipe-end-y")}}),onSwipeEnd:o[7]||(o[7]=y=>{if(i("swipeEnd",y),!y.defaultPrevented){const{x:w,y:T}=y.detail.delta,k=y.currentTarget;k.setAttribute("data-swipe","end"),k.style.removeProperty("--reka-toast-swipe-move-x"),k.style.removeProperty("--reka-toast-swipe-move-y"),k.style.setProperty("--reka-toast-swipe-end-x",`${w}px`),k.style.setProperty("--reka-toast-swipe-end-y",`${T}px`),h.value=!1}})}),{default:dr(({remaining:y,duration:w})=>[Nr(d.$slots,"default",{remaining:y,duration:w,open:ot(h)})]),_:3},16,["open","type","as","as-child","duration"])]),_:3},8,["present"]))}}),fZ=Rr({__name:"ToastTitle",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return Ea(),(r,i)=>(Ft(),Kt(ot(uo),xa(Ku(t)),{default:dr(()=>[Nr(r.$slots,"default")]),_:3},16))}}),tI=Rr({__name:"FocusProxy",emits:["focusFromOutsideViewport"],setup(e,{emit:t}){const r=t,i=i0();return(a,h)=>(Ft(),Kt(ot(E5),{"aria-hidden":"true",tabindex:"0",style:{position:"fixed"},onFocus:h[0]||(h[0]=d=>{var w;const o=d.relatedTarget;!((w=ot(i).viewport.value)!=null&&w.contains(o))&&r("focusFromOutsideViewport")})},{default:dr(()=>[Nr(a.$slots,"default")]),_:3}))}}),pZ=Rr({__name:"DismissableLayerBranch",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e,{forwardRef:r,currentElement:i}=Ea();return js(()=>{To.branches.add(i.value)}),Wu(()=>{To.branches.delete(i.value)}),(a,h)=>(Ft(),Kt(ot(uo),ln({ref:ot(r)},t),{default:dr(()=>[Nr(a.$slots,"default")]),_:3},16))}}),mZ=Rr({inheritAttrs:!1,__name:"ToastViewport",props:{hotkey:{default:()=>["F8"]},label:{type:[String,Function],default:"Notifications ({hotkey})"},asChild:{type:Boolean},as:{default:"ol"}},setup(e){const t=e,{hotkey:r,label:i}=Bo(t),{forwardRef:a,currentElement:h}=Ea(),{CollectionSlot:d,getItems:o}=$S(),y=i0(),w=it(()=>y.toastCount.value>0),T=It(),k=It(),M=it(()=>r.value.join("+").replace(/Key/g,"").replace(/Digit/g,""));jS(r.value,()=>{h.value.focus()}),js(()=>{y.onViewportChange(h.value)}),jo(L=>{const O=h.value;if(w.value&&O){const $=()=>{if(!y.isClosePausedRef.value){const V=new CustomEvent(rw);O.dispatchEvent(V),y.isClosePausedRef.value=!0}},Z=()=>{if(y.isClosePausedRef.value){const V=new CustomEvent(nw);O.dispatchEvent(V),y.isClosePausedRef.value=!1}},J=V=>{!O.contains(V.relatedTarget)&&Z()},H=()=>{O.contains(Fd())||Z()},U=V=>{var fe,Se,xe;const te=V.altKey||V.ctrlKey||V.metaKey;if(V.key==="Tab"&&!te){const et=Fd(),ze=V.shiftKey;if(V.target===O&&ze){(fe=T.value)==null||fe.focus();return}const at=P({tabbingDirection:ze?"backwards":"forwards"}),Pe=at.findIndex(He=>He===et);wx(at.slice(Pe+1))?V.preventDefault():ze?(Se=T.value)==null||Se.focus():(xe=k.value)==null||xe.focus()}};O.addEventListener("focusin",$),O.addEventListener("focusout",J),O.addEventListener("pointermove",$),O.addEventListener("pointerleave",H),O.addEventListener("keydown",U),window.addEventListener("blur",$),window.addEventListener("focus",Z),L(()=>{O.removeEventListener("focusin",$),O.removeEventListener("focusout",J),O.removeEventListener("pointermove",$),O.removeEventListener("pointerleave",H),O.removeEventListener("keydown",U),window.removeEventListener("blur",$),window.removeEventListener("focus",Z)})}});function P({tabbingDirection:L}){const $=o().map(Z=>Z.ref).map(Z=>{const J=[Z,...R5(Z)];return L==="forwards"?J:J.reverse()});return(L==="forwards"?$.reverse():$).flat()}return(L,O)=>(Ft(),Kt(ot(pZ),{role:"region","aria-label":typeof ot(i)=="string"?ot(i).replace("{hotkey}",M.value):ot(i)(M.value),tabindex:"-1",style:fl({pointerEvents:w.value?void 0:"none"})},{default:dr(()=>[w.value?(Ft(),Kt(tI,{key:0,ref:$=>{T.value=ot(vc)($)},onFocusFromOutsideViewport:O[0]||(O[0]=()=>{const $=P({tabbingDirection:"forwards"});ot(wx)($)})},null,512)):ai("",!0),Sr(ot(d),null,{default:dr(()=>[Sr(ot(uo),ln({ref:ot(a),tabindex:"-1",as:L.as,"as-child":L.asChild},L.$attrs),{default:dr(()=>[Nr(L.$slots,"default")]),_:3},16,["as","as-child"])]),_:3}),w.value?(Ft(),Kt(tI,{key:1,ref:$=>{k.value=ot(vc)($)},onFocusFromOutsideViewport:O[1]||(O[1]=()=>{const $=P({tabbingDirection:"backwards"});ot(wx)($)})},null,512)):ai("",!0)]),_:3},8,["aria-label","style"]))}}),[Cne,gZ]=n0("TooltipProvider"),yZ=Rr({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean,default:!1}},setup(e){const t=e,{delayDuration:r,skipDelayDuration:i,disableHoverableContent:a,disableClosingTrigger:h,ignoreNonKeyboardFocus:d,disabled:o}=Bo(t);Ea();const y=It(!0),w=It(!1),{start:T,stop:k}=P5(()=>{y.value=!0},i,{immediate:!1});return gZ({isOpenDelayed:y,delayDuration:r,onOpen(){k(),y.value=!1},onClose(){T()},isPointerInTransitRef:w,disableHoverableContent:a,disableClosingTrigger:h,disabled:o,ignoreNonKeyboardFocus:d}),(M,P)=>Nr(M.$slots,"default")}});function _Z(e){return Zu()?(kd(e),!0):!1}function B5(e){let t=0,r,i;const a=()=>{t-=1,i&&t<=0&&(i.stop(),r=void 0,i=void 0)};return(...h)=>(t+=1,i||(i=Vd(!0),r=i.run(()=>e(...h))),_Z(a),r)}function vZ(e){if(!Xr(e))return Mi(e);const t=new Proxy({},{get(r,i,a){return ot(Reflect.get(e.value,i,a))},set(r,i,a){return Xr(e.value[i])&&!Xr(a)?e.value[i].value=a:e.value[i]=a,!0},deleteProperty(r,i){return Reflect.deleteProperty(e.value,i)},has(r,i){return Reflect.has(e.value,i)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return Mi(t)}function N5(e){return vZ(it(e))}function bZ(e,...t){const r=t.flat(),i=r[0];return N5(()=>Object.fromEntries(typeof i=="function"?Object.entries(Bo(e)).filter(([a,h])=>!i(En(h),a)):Object.entries(Bo(e)).filter(a=>!r.includes(a[0]))))}const xZ=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const wZ=Object.prototype.toString,Ene=e=>wZ.call(e)==="[object Object]",iw=()=>{},kne=SZ();function SZ(){var e,t;
57return xZ&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function TZ(...e){if(e.length!==1)return Fs(...e);const t=e[0];return typeof t=="function"?Ca(jm(()=>({get:t,set:iw}))):It(t)}function cg(e,...t){const r=t.flat(),i=r[0];return N5(()=>Object.fromEntries(typeof i=="function"?Object.entries(Bo(e)).filter(([a,h])=>i(En(h),a)):r.map(a=>[a,TZ(e,a)])))}function CZ(e,t){function r(...i){return new Promise((a,h)=>{Promise.resolve(e(()=>t.apply(this,i),{fn:t,thisArg:this,args:i})).then(a).catch(h)})}return r}function EZ(e,t={}){let r,i,a=iw;const h=y=>{clearTimeout(y),a(),a=iw};let d;return y=>{const w=En(e),T=En(t.maxWait);return r&&h(r),w<=0||T!==void 0&&T<=0?(i&&(h(i),i=void 0),Promise.resolve(y())):new Promise((k,M)=>{a=t.rejectOnCancel?M:k,d=y,T&&!i&&(i=setTimeout(()=>{r&&h(r),i=void 0,k(d())},T)),r=setTimeout(()=>{i&&h(i),i=void 0,k(y())},w)})}}function Ine(e){return Array.isArray(e)?e:[e]}function kZ(e,t=200,r={}){return CZ(EZ(t,r),e)}function Pne(e,t,r){return Mr(e,t,{...r,immediate:!0})}const cv={__name:"Icon",props:{name:{type:String,required:!0},mode:{type:String,required:!1},size:{type:[String,Number],required:!1},customize:{type:Function,required:!1}},setup(e){const r=af(cg(e,"name","mode","size","customize"));return(i,a)=>{const h=C5;return Ft(),Kt(h,xa(Ku(ot(r))),null,16)}}};function IZ(e){const t=Us(),r=it(()=>En(e)),i=it(()=>r.value.icon&&r.value.leading||r.value.icon&&!r.value.trailing||r.value.loading&&!r.value.trailing||!!r.value.leadingIcon),a=it(()=>r.value.icon&&r.value.trailing||r.value.loading&&r.value.trailing||!!r.value.trailingIcon),h=it(()=>r.value.loading?r.value.loadingIcon||t.ui.icons.loading:r.value.leadingIcon||r.value.icon),d=it(()=>r.value.loading&&!i.value?r.value.loadingIcon||t.ui.icons.loading:r.value.trailingIcon||r.value.icon);return{isLeading:i,isTrailing:a,leadingIconName:h,trailingIconName:d}}const PZ=Symbol("nuxt-ui.button-group");function AZ(e){const t=an(PZ,void 0);return{orientation:it(()=>t==null?void 0:t.value.orientation),size:it(()=>(e==null?void 0:e.size)??(t==null?void 0:t.value.size))}}const MZ=Symbol("nuxt-ui.form-options"),RZ=Symbol("nuxt-ui.form-events"),LZ=Symbol("nuxt-ui.form-field"),zZ=Symbol("nuxt-ui.input-id"),DZ=Symbol("nuxt-ui.form-inputs"),OZ=Symbol("nuxt-ui.form-loading");function Ane(e,t){const r=an(MZ,void 0),i=an(RZ,void 0),a=an(LZ,void 0),h=an(DZ,void 0),d=an(zZ,void 0);a&&d&&((t==null?void 0:t.bind)===!1?d.value=void 0:e!=null&&e.id&&(d.value=e==null?void 0:e.id),h&&a.value.name&&d.value&&(h.value[a.value.name]={id:d.value,pattern:a.value.errorPattern}));function o(M,P,L){i&&a&&P&&i.emit({type:M,name:P,eager:L})}function y(){o("blur",a==null?void 0:a.value.name)}function w(){o("focus",a==null?void 0:a.value.name)}function T(){o("change",a==null?void 0:a.value.name)}const k=kZ(()=>{o("input",a==null?void 0:a.value.name,!(t!=null&&t.deferInputValidation)||(a==null?void 0:a.value.eagerValidation))},(a==null?void 0:a.value.validateOnInputDelay)??(r==null?void 0:r.value.validateOnInputDelay)??0);return{id:it(()=>(e==null?void 0:e.id)??(d==null?void 0:d.value)),name:it(()=>(e==null?void 0:e.name)??(a==null?void 0:a.value.name)),size:it(()=>(e==null?void 0:e.size)??(a==null?void 0:a.value.size)),color:it(()=>a!=null&&a.value.error?"error":e==null?void 0:e.color),highlight:it(()=>a!=null&&a.value.error?!0:e==null?void 0:e.highlight),disabled:it(()=>(r==null?void 0:r.value.disabled)||(e==null?void 0:e.disabled)),emitFormBlur:y,emitFormInput:k,emitFormChange:T,emitFormFocus:w,ariaAttrs:it(()=>a!=null&&a.value?{"aria-describedby":(["error","hint","description","help"].filter(P=>{var L;return(L=a==null?void 0:a.value)==null?void 0:L[P]}).map(P=>`${a==null?void 0:a.value.ariaId}-${P}`)||[]).join(" "),"aria-invalid":!!(a!=null&&a.value.error)}:void 0)}}function FZ(e,t){const r=sw(e),i=sw(t);return j5(r,i)}function j5(e,t){var a,h;const r=[],i=new Set([...Object.keys(e.props||{}),...Object.keys(t.props||{})]);if(e.props&&t.props)for(const d of i){const o=e.props[d],y=t.props[d];o&&y?r.push(...j5((a=e.props)==null?void 0:a[d],(h=t.props)==null?void 0:h[d])):(o||y)&&r.push(new rI((y||o).key,o?"removed":"added",y,o))}return i.size===0&&e.hash!==t.hash&&r.push(new rI((t||e).key,"changed",t,e)),r}function sw(e,t=""){if(e&&typeof e!="object")return new nI(t,e,L1(e));const r={},i=[];for(const a in e)r[a]=sw(e[a],t?`${t}.${a}`:a),i.push(r[a].hash);return new nI(t,e,`{${i.join(":")}}`,r)}class rI{constructor(t,r,i,a){this.key=t,this.type=r,this.newValue=i,this.oldValue=a}toString(){return this.toJSON()}toJSON(){var t;switch(this.type){case"added":return`Added   \`${this.key}\``;case"removed":return`Removed \`${this.key}\``;case"changed":return`Changed \`${this.key}\` from \`${((t=this.oldValue)==null?void 0:t.toString())||"-"}\` to \`${this.newValue.toString()}\``}}}class nI{constructor(t,r,i,a){this.key=t,this.value=r,this.hash=i,this.props=a}toString(){return this.props?`{${Object.keys(this.props).join(",")}}`:JSON.stringify(this.value)}toJSON(){const t=this.key||".";return this.props?`${t}({${Object.keys(this.props).join(",")}})`:`${t}(${this.value})`}}function $5(e,t){const r={...e};for(const i of t)delete r[i];return r}function BZ(e,t,r){typeof t=="string"&&(t=t.split(".").map(a=>{const h=Number(a);return Number.isNaN(h)?a:h}));let i=e;for(const a of t){if(i==null)return r;i=i[a]}return i!==void 0?i:r}function Mne(e){const t=Number.parseFloat(e);return Number.isNaN(t)?e:t}var iI=e=>typeof e=="boolean"?`${e}
57`:e===0?"0":e,xs=e=>!e||typeof e!="object"||Object.keys(e).length===0,NZ=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function U5(e,t){e.forEach(function(r){Array.isArray(r)?U5(r,t):t.push(r)})}function V5(e){let t=[];return U5(e,t),t}var q5=(...e)=>V5(e).filter(Boolean),US=(e,t)=>{let r={},i=Object.keys(e),a=Object.keys(t);for(let h of i)if(a.includes(h)){let d=e[h],o=t[h];Array.isArray(d)||Array.isArray(o)?r[h]=q5(o,d):typeof d=="object"&&typeof o=="object"?r[h]=US(d,o):r[h]=o+" "+d}else r[h]=e[h];for(let h of a)i.includes(h)||(r[h]=t[h]);return r},sI=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const VS="-",jZ=e=>{const t=UZ(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:d=>{const o=d.split(VS);return o[0]===""&&o.length!==1&&o.shift(),G5(o,t)||$Z(d)},getConflictingClassGroupIds:(d,o)=>{const y=r[d]||[];return o&&i[d]?[...y,...i[d]]:y}}},G5=(e,t)=>{var d;if(e.length===0)return t.classGroupId;const r=e[0],i=t.nextPart.get(r),a=i?G5(e.slice(1),i):void 0;if(a)return a;if(t.validators.length===0)return;const h=e.join(VS);return(d=t.validators.find(({validator:o})=>o(h)))==null?void 0:d.classGroupId},oI=/^\[(.+)\]$/,$Z=e=>{if(oI.test(e)){const t=oI.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},UZ=e=>{const{theme:t,classGroups:r}=e,i={nextPart:new Map,validators:[]};for(const a in r)ow(r[a],i,a,t);return i},ow=(e,t,r,i)=>{e.forEach(a=>{if(typeof a=="string"){const h=a===""?t:aI(t,a);h.classGroupId=r;return}if(typeof a=="function"){if(VZ(a)){ow(a(i),t,r,i);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([h,d])=>{ow(d,aI(t,h),r,i)})})},aI=(e,t)=>{let r=e;return t.split(VS).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r},VZ=e=>e.isThemeGetter,qZ=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,i=new Map;const a=(h,d)=>{r.set(h,d),t++,t>e&&(t=0,i=r,r=new Map)};return{get(h){let d=r.get(h);if(d!==void 0)return d;if((d=i.get(h))!==void 0)return a(h,d),d},set(h,d){r.has(h)?r.set(h,d):a(h,d)}}},aw="!",lw=":",GZ=lw.length,HZ=e=>{const{prefix:t,experimentalParseClassName:r}=e;let i=a=>{const h=[];let d=0,o=0,y=0,w;for(let L=0;L<a.length;L++){let O=a[L];if(d===0&&o===0){if(O===lw){h.push(a.slice(y,L)),y=L+GZ;continue}if(O==="/"){w=L;continue}}O==="["?d++:O==="]"?d--:O==="("?o++:O===")"&&o--}const T=h.length===0?a:a.substring(y),k=ZZ(T),M=k!==T,P=w&&w>y?w-y:void 0;return{modifiers:h,hasImportantModifier:M,baseClassName:k,maybePostfixModifierPosition:P}};if(t){const a=t+lw,h=i;i=d=>d.startsWith(a)?h(d.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:d,maybePostfixModifierPosition:void 0}}if(r){const a=i;i=h=>r({className:h,parseClassName:a})}return i},ZZ=e=>e.endsWith(aw)?e.substring(0,e.length-1):e.startsWith(aw)?e.substring(1):e,WZ=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const a=[];let h=[];return i.forEach(d=>{d[0]==="["||t[d]?(a.push(...h.sort(),d),h=[]):h.push(d)}),a.push(...h.sort()),a}},KZ=e=>({cache:qZ(e.cacheSize),parseClassName:HZ(e),sortModifiers:WZ(e),...jZ(e)}),XZ=/\s+/,YZ=(e,t)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:a,sortModifiers:h}=t,d=[],o=e.trim().split(XZ);let y="";for(let w=o.length-1;w>=0;w-=1){const T=o[w],{isExternal:k,modifiers:M,hasImportantModifier:P,baseClassName:L,maybePostfixModifierPosition:O}=r(T);if(k){y=T+(y.length>0?" "+y:y);continue}let $=!!O,Z=i($?L.substring(0,O):L);if(!Z){if(!$){y=T+(y.length>0?" "+y:y);continue}if(Z=i(L),!Z){y=T+(y.length>0?" "+y:y);continue}$=!1}const J=h(M).join(":"),H=P?J+aw:J,U=H+Z;if(d.includes(U))continue;d.push(U);const V=a(Z,$);for(let te=0;te<V.length;++te){const ce=V[te];d.push(H+ce)}y=T+(y.length>0?" "+y:y)}return y};function JZ(){let e=0,t,r,i="";for(;e<arguments.length;)(t=arguments[e++])&&(r=H5(t))&&(i&&(i+=" "),i+=r);return i}const H5=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=H5(e[i]))&&(r&&(r+=" "),r+=t);return r};function cw(e,...t){let r,i,a,h=d;function d(y){const w=t.reduce((T,k)=>k(T),e());return r=KZ(w),i=r.cache.get,a=r.cache.set,h=o,o(y)}function o(y){const w=i(y);if(w)return w;const T=YZ(y,r);return a(y,T),T}return function(){return h(JZ.apply(null,arguments))}}const Ii=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Z5=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,W5=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Q
vendor: 9,065 bytes, line 57
57Z=/^\d+\/\d+$/,eW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tW=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,nW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nd=e=>QZ.test(e),Br=e=>!!e&&!Number.isNaN(Number(e)),yu=e=>!!e&&Number.isInteger(Number(e)),lI=e=>e.endsWith("%")&&Br(e.slice(0,-1)),Kl=e=>eW.test(e),sW=()=>!0,oW=e=>tW.test(e)&&!rW.test(e),qS=()=>!1,aW=e=>nW.test(e),lW=e=>iW.test(e),cW=e=>!Vt(e)&&!qt(e),uW=e=>lf(e,Y5,qS),Vt=e=>Z5.test(e),_u=e=>lf(e,J5,oW),Sx=e=>lf(e,xW,Br),hW=e=>lf(e,K5,qS),dW=e=>lf(e,X5,lW),fW=e=>lf(e,qS,aW),qt=e=>W5.test(e),Hy=e=>cf(e,J5),pW=e=>cf(e,wW),mW=e=>cf(e,K5),gW=e=>cf(e,Y5),yW=e=>cf(e,X5),_W=e=>cf(e,SW,!0),lf=(e,t,r)=>{const i=Z5.exec(e);return i?i[1]?t(i[1]):r(i[2]):!1},cf=(e,t,r=!1)=>{const i=W5.exec(e);return i?i[1]?t(i[1]):r:!1},K5=e=>e==="position",vW=new Set(["image","url"]),X5=e=>vW.has(e),bW=new Set(["length","size","percentage"]),Y5=e=>bW.has(e),J5=e=>e==="length",xW=e=>e==="number",wW=e=>e==="family-name",SW=e=>e==="shadow",uw=()=>{const e=Ii("color"),t=Ii("font"),r=Ii("text"),i=Ii("font-weight"),a=Ii("tracking"),h=Ii("leading"),d=Ii("breakpoint"),o=Ii("container"),y=Ii("spacing"),w=Ii("radius"),T=Ii("shadow"),k=Ii("inset-shadow"),M=Ii("drop-shadow"),P=Ii("blur"),L=Ii("perspective"),O=Ii("aspect"),$=Ii("ease"),Z=Ii("animate"),J=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],te=()=>[qt,Vt,y],ce=()=>[nd,"full","auto",...te()],fe=()=>[yu,"none","subgrid",qt,Vt],Se=()=>["auto",{span:["full",yu,qt,Vt]},qt,Vt],xe=()=>[yu,"auto",qt,Vt],et=()=>["auto","min","max","fr",qt,Vt],ze=()=>["start","end","center","between","around","evenly","stretch","baseline"],Ze=()=>["start","end","center","stretch"],tt=()=>["auto",...te()],at=()=>[nd,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...te()],Pe=()=>[e,qt,Vt],He=()=>[lI,_u],Oe=()=>["","none","full",w,qt,Vt],lt=()=>["",Br,Hy,_u],Pt=()=>["solid","dashed","dotted","double"],Yt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xt=()=>["","none",P,qt,Vt],tr=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qt,Vt],lr=()=>["none",Br,qt,Vt],Or=()=>["none",Br,qt,Vt],zr=()=>[Br,qt,Vt],Je=()=>[nd,"full",...te()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Kl],breakpoint:[Kl],color:[sW],container:[Kl],"drop-shadow":[Kl],ease:["in","out","in-out"],font:[cW],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Kl],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Kl],shadow:[Kl],spacing:["px",Br],text:[Kl],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nd,Vt,qt,O]}],container:["container"],columns:[{columns:[Br,Vt,qt,o]}],"break-after":[{"break-after":J()}],"break-before":[{"break-before":J()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...H(),Vt,qt]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ce()}],"inset-x":[{"inset-x":ce()}],"inset-y":[{"inset-y":ce()}],start:[{start:ce()}],end:[{end:ce()}],top:[{top:ce()}],right:[{right:ce()}],bottom:[{bottom:ce()}],left:[{left:ce()}],visibility:["visible","invisible","collapse"],z:[{z:[yu,"auto",qt,Vt]}],basis:[{basis:[nd,"full","auto",o,...te()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Br,nd,"auto","initial","none",Vt]}],grow:[{grow:["",Br,qt,Vt]}],shrink:[{shrink:["",Br,qt,Vt]}],order:[{order:[yu,"first","last","none",qt,Vt]}],"grid-cols":[{"grid-cols":fe()}],"col-start-end":[{col:Se()}],"col-start":[{"col-start":xe()}],"col-end":[{"col-end":xe()}],"grid-rows":[{"grid-rows":fe()}],"row-start-end":[{row:Se()}],"row-start":[{"row-start":xe()}],"row-end":[{"row-end":xe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":et()}],"auto-rows":[{"auto-rows":et()}],gap:[{gap:te()}],"gap-x":[{"gap-x":te()}],"gap-y":[{"gap-y":te()}],"justify-content":[{justify:[...ze(),"normal"]}],"justify-items":[{"justify-items":[...Ze(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ze()]}],"align-content":[{content:["normal",...ze()]}],"align-items":[{items:[...Ze(),"baseline"]}],"align-self":[{self:["auto",...Ze(),"baseline"]}],"place-content":[{"place-content":ze()}],"place-items":[{"place-items":[...Ze(),"baseline"]}],"place-self":[{"place-self":["auto",...Ze()]}],p:[{p:te()}],px:[{px:te()}],py:[{py:te()}],ps:[{ps:te()}],pe:[{pe:te()}],pt:[{pt:te()}],pr:[{pr:te()}],pb:[{pb:te()}],pl:[{pl:te()}],m:[{m:tt()}],mx:[{mx:tt()}],my:[{my:tt()}],ms:[{ms:tt()}],me:[{me:tt()}],mt:[{mt:tt()}],mr:[{mr:tt()}],mb:[{mb:tt()}],ml:[{ml:tt()}],"space-x":[{"space-x":te()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":te()}],"space-y-reverse":["space-y-reverse"],size:[{size:at()}],w:[{w:[o,"screen",...at()]}],"min-w":[{"min-w":[o,"screen","none",...at()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[d]},...at()]}],h:[{h:["screen",...at()]}],"min-h":[{"min-h":["screen","none",...at()]}],"max-h":[{"max-h":["screen",...at()]}],"font-size":[{text:["base",r,Hy,_u]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,qt,Sx]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",lI,Vt]}],"font-family":[{font:[pW,Vt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,qt,Vt]}],"line-clamp":[{"line-clamp":[Br,"none",qt,Sx]}],leading:[{leading:[h,...te()]}],"list-image":[{"list-image":["none",qt,Vt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",qt,Vt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Pe()}],"text-color":[{text:Pe()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Pt(),"wavy"]}],"text-decoration-thickness":[{decoration:[Br,"from-font","auto",qt,_u]}],"text-decoration-color":[{decoration:Pe()}],"underline-offset":[{"underline-offset":[Br,"auto",qt,Vt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:te()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qt,Vt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qt,Vt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),mW,hW]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",gW,uW]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},yu,qt,Vt],radial:["",qt,Vt],conic:[yu,qt,Vt]},yW,dW]}],"bg-color":[{bg:Pe()}],"gradient-from-pos":[{from:He()}
vendor: 4,577 bytes, line 57
57],"gradient-via-pos":[{via:He()}],"gradient-to-pos":[{to:He()}],"gradient-from":[{from:Pe()}],"gradient-via":[{via:Pe()}],"gradient-to":[{to:Pe()}],rounded:[{rounded:Oe()}],"rounded-s":[{"rounded-s":Oe()}],"rounded-e":[{"rounded-e":Oe()}],"rounded-t":[{"rounded-t":Oe()}],"rounded-r":[{"rounded-r":Oe()}],"rounded-b":[{"rounded-b":Oe()}],"rounded-l":[{"rounded-l":Oe()}],"rounded-ss":[{"rounded-ss":Oe()}],"rounded-se":[{"rounded-se":Oe()}],"rounded-ee":[{"rounded-ee":Oe()}],"rounded-es":[{"rounded-es":Oe()}],"rounded-tl":[{"rounded-tl":Oe()}],"rounded-tr":[{"rounded-tr":Oe()}],"rounded-br":[{"rounded-br":Oe()}],"rounded-bl":[{"rounded-bl":Oe()}],"border-w":[{border:lt()}],"border-w-x":[{"border-x":lt()}],"border-w-y":[{"border-y":lt()}],"border-w-s":[{"border-s":lt()}],"border-w-e":[{"border-e":lt()}],"border-w-t":[{"border-t":lt()}],"border-w-r":[{"border-r":lt()}],"border-w-b":[{"border-b":lt()}],"border-w-l":[{"border-l":lt()}],"divide-x":[{"divide-x":lt()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":lt()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Pt(),"hidden","none"]}],"divide-style":[{divide:[...Pt(),"hidden","none"]}],"border-color":[{border:Pe()}],"border-color-x":[{"border-x":Pe()}],"border-color-y":[{"border-y":Pe()}],"border-color-s":[{"border-s":Pe()}],"border-color-e":[{"border-e":Pe()}],"border-color-t":[{"border-t":Pe()}],"border-color-r":[{"border-r":Pe()}],"border-color-b":[{"border-b":Pe()}],"border-color-l":[{"border-l":Pe()}],"divide-color":[{divide:Pe()}],"outline-style":[{outline:[...Pt(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Br,qt,Vt]}],"outline-w":[{outline:["",Br,Hy,_u]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",T,_W,fW]}],"shadow-color":[{shadow:Pe()}],"inset-shadow":[{"inset-shadow":["none",qt,Vt,k]}],"inset-shadow-color":[{"inset-shadow":Pe()}],"ring-w":[{ring:lt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Pe()}],"ring-offset-w":[{"ring-offset":[Br,_u]}],"ring-offset-color":[{"ring-offset":Pe()}],"inset-ring-w":[{"inset-ring":lt()}],"inset-ring-color":[{"inset-ring":Pe()}],opacity:[{opacity:[Br,qt,Vt]}],"mix-blend":[{"mix-blend":[...Yt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Yt()}],filter:[{filter:["","none",qt,Vt]}],blur:[{blur:xt()}],brightness:[{brightness:[Br,qt,Vt]}],contrast:[{contrast:[Br,qt,Vt]}],"drop-shadow":[{"drop-shadow":["","none",M,qt,Vt]}],grayscale:[{grayscale:["",Br,qt,Vt]}],"hue-rotate":[{"hue-rotate":[Br,qt,Vt]}],invert:[{invert:["",Br,qt,Vt]}],saturate:[{saturate:[Br,qt,Vt]}],sepia:[{sepia:["",Br,qt,Vt]}],"backdrop-filter":[{"backdrop-filter":["","none",qt,Vt]}],"backdrop-blur":[{"backdrop-blur":xt()}],"backdrop-brightness":[{"backdrop-brightness":[Br,qt,Vt]}],"backdrop-contrast":[{"backdrop-contrast":[Br,qt,Vt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Br,qt,Vt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Br,qt,Vt]}],"backdrop-invert":[{"backdrop-invert":["",Br,qt,Vt]}],"backdrop-opacity":[{"backdrop-opacity":[Br,qt,Vt]}],"backdrop-saturate":[{"backdrop-saturate":[Br,qt,Vt]}],"backdrop-sepia":[{"backdrop-sepia":["",Br,qt,Vt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":te()}],"border-spacing-x":[{"border-spacing-x":te()}],"border-spacing-y":[{"border-spacing-y":te()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",qt,Vt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Br,"initial",qt,Vt]}],ease:[{ease:["linear","initial",$,qt,Vt]}],delay:[{delay:[Br,qt,Vt]}],animate:[{animate:["none",Z,qt,Vt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[L,qt,Vt]}],"perspective-origin":[{"perspective-origin":tr()}],rotate:[{rotate:lr()}],"rotate-x":[{"rotate-x":lr()}],"rotate-y":[{"rotate-y":lr()}],"rotate-z":[{"rotate-z":lr()}],scale:[{scale:Or()}],"scale-x":[{"scale-x":Or()}],"scale-y":[{"scale-y":Or()}],"scale-z":[{"scale-z":Or()}],"scale-3d":["scale-3d"],skew:[{skew:zr()}],"skew-x":[{"skew-x":zr()}],"skew-y":[{"skew-y":zr()}],transform:[{transform:[qt,Vt,"","none","gpu","cpu"]}],"transform-origin":[{origin:tr()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Je()}],"translate-x":[{"translate-x":Je()}],"translate-y":[{"translate-y":Je()}],"translate-z":[{"translate-z":Je()}],"translate-none":["translate-none"],accent:[{accent:Pe()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Pe()}
vendor: 5,127 bytes, line 57
57],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",qt,Vt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":te()}],"scroll-mx":[{"scroll-mx":te()}],"scroll-my":[{"scroll-my":te()}],"scroll-ms":[{"scroll-ms":te()}],"scroll-me":[{"scroll-me":te()}],"scroll-mt":[{"scroll-mt":te()}],"scroll-mr":[{"scroll-mr":te()}],"scroll-mb":[{"scroll-mb":te()}],"scroll-ml":[{"scroll-ml":te()}],"scroll-p":[{"scroll-p":te()}],"scroll-px":[{"scroll-px":te()}],"scroll-py":[{"scroll-py":te()}],"scroll-ps":[{"scroll-ps":te()}],"scroll-pe":[{"scroll-pe":te()}],"scroll-pt":[{"scroll-pt":te()}],"scroll-pr":[{"scroll-pr":te()}],"scroll-pb":[{"scroll-pb":te()}],"scroll-pl":[{"scroll-pl":te()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",qt,Vt]}],fill:[{fill:["none",...Pe()]}],"stroke-w":[{stroke:[Br,Hy,_u,Sx]}],stroke:[{stroke:["none",...Pe()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},TW=(e,{cacheSize:t,prefix:r,experimentalParseClassName:i,extend:a={},override:h={}})=>(jp(e,"cacheSize",t),jp(e,"prefix",r),jp(e,"experimentalParseClassName",i),Zy(e.theme,h.theme),Zy(e.classGroups,h.classGroups),Zy(e.conflictingClassGroups,h.conflictingClassGroups),Zy(e.conflictingClassGroupModifiers,h.conflictingClassGroupModifiers),jp(e,"orderSensitiveModifiers",h.orderSensitiveModifiers),Wy(e.theme,a.theme),Wy(e.classGroups,a.classGroups),Wy(e.conflictingClassGroups,a.conflictingClassGroups),Wy(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),Q5(e,a,"orderSensitiveModifiers"),e),jp=(e,t,r)=>{r!==void 0&&(e[t]=r)},Zy=(e,t)=>{if(t)for(const r in t)jp(e,r,t[r])},Wy=(e,t)=>{if(t)for(const r in t)Q5(e,t,r)},Q5=(e,t,r)=>{const i=t[r];
57i!==void 0&&(e[r]=e[r]?e[r].concat(i):i)},CW=(e,...t)=>typeof e=="function"?cw(uw,e,...t):cw(()=>TW(uw(),e),...t),EW=cw(uw);var kW={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},ez=e=>e||void 0,Pm=(...e)=>ez(V5(e).filter(Boolean).join(" ")),Tx=null,Ka={},hw=!1,zp=(...e)=>t=>t.twMerge?((!Tx||hw)&&(hw=!1,Tx=xs(Ka)?EW:CW({...Ka,extend:{theme:Ka.theme,classGroups:Ka.classGroups,conflictingClassGroupModifiers:Ka.conflictingClassGroupModifiers,conflictingClassGroups:Ka.conflictingClassGroups,...Ka.extend}})),ez(Tx(Pm(e)))):Pm(e),cI=(e,t)=>{for(let r in t)e.hasOwnProperty(r)?e[r]=Pm(e[r],t[r]):e[r]=t[r];return e},IW=(e,t)=>{let{extend:r=null,slots:i={},variants:a={},compoundVariants:h=[],compoundSlots:d=[],defaultVariants:o={}}=e,y={...kW,...t},w=r!=null&&r.base?Pm(r.base,e==null?void 0:e.base):e==null?void 0:e.base,T=r!=null&&r.variants&&!xs(r.variants)?US(a,r.variants):a,k=r!=null&&r.defaultVariants&&!xs(r.defaultVariants)?{...r.defaultVariants,...o}:o;!xs(y.twMergeConfig)&&!NZ(y.twMergeConfig,Ka)&&(hw=!0,Ka=y.twMergeConfig);let M=xs(r==null?void 0:r.slots),P=xs(i)?{}:{base:Pm(e==null?void 0:e.base,M&&(r==null?void 0:r.base)),...i},L=M?P:cI({...r==null?void 0:r.slots},xs(P)?{base:e==null?void 0:e.base}:P),O=xs(r==null?void 0:r.compoundVariants)?h:q5(r==null?void 0:r.compoundVariants,h),$=J=>{if(xs(T)&&xs(i)&&M)return zp(w,J==null?void 0:J.class,J==null?void 0:J.className)(y);if(O&&!Array.isArray(O))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof O}`);if(d&&!Array.isArray(d))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof d}`);let H=(ze,Ze,tt=[],at)=>{let Pe=tt;if(typeof Ze=="string")Pe=Pe.concat(sI(Ze).split(" ").map(He=>`${ze}:${He}`));else if(Array.isArray(Ze))Pe=Pe.concat(Ze.reduce((He,Oe)=>He.concat(`${ze}:${Oe}`),[]));else if(typeof Ze=="object"&&typeof at=="string"){for(let He in Ze)if(Ze.hasOwnProperty(He)&&He===at){let Oe=Ze[He];if(Oe&&typeof Oe=="string"){let lt=sI(Oe);Pe[at]?Pe[at]=Pe[at].concat(lt.split(" ").map(Pt=>`${ze}:${Pt}`)):Pe[at]=lt.split(" ").map(Pt=>`${ze}:${Pt}`)}else Array.isArray(Oe)&&Oe.length>0&&(Pe[at]=Oe.reduce((lt,Pt)=>lt.concat(`${ze}:${Pt}`),[]))}}return Pe},U=(ze,Ze=T,tt=null,at=null)=>{var Pe;let He=Ze[ze];if(!He||xs(He))return null;let Oe=(Pe=at==null?void 0:at[ze])!=null?Pe:J==null?void 0:J[ze];if(Oe===null)return null;let lt=iI(Oe),Pt=Array.isArray(y.responsiveVariants)&&y.responsiveVariants.length>0||y.responsiveVariants===!0,Yt=k==null?void 0:k[ze],xt=[];if(typeof lt=="object"&&Pt)for(let[Or,zr]of Object.entries(lt)){let Je=He[zr];if(Or==="initial"){Yt=zr;continue}Array.isArray(y.responsiveVariants)&&!y.responsiveVariants.includes(Or)||(xt=H(Or,Je,xt,tt))}let tr=lt!=null&&typeof lt!="object"?lt:iI(Yt),lr=He[tr||"false"];return typeof xt=="object"&&typeof tt=="string"&&xt[tt]?cI(xt,lr):xt.length>0?(xt.push(lr),tt==="base"?xt.join(" "):xt):lr},V=()=>T?Object.keys(T).map(ze=>U(ze,T)):null,te=(ze,Ze)=>{if(!T||typeof T!="object")return null;let tt=new Array;for(let at in T){let Pe=U(at,T,ze,Ze),He=ze==="base"&&typeof Pe=="string"?Pe:Pe&&Pe[ze];He&&(tt[tt.length]=He)}return tt},ce={};for(let ze in J)J[ze]!==void 0&&(ce[ze]=J[ze]);let fe=(ze,Ze)=>{var tt;let at=typeof(J==null?void 0:J[ze])=="object"?{[ze]:(tt=J[ze])==null?void 0:tt.initial}:{};return{...k,...ce,...at,...Ze}},Se=(ze=[],Ze)=>{let tt=[];for(let{class:at,className:Pe,...He}of ze){let Oe=!0;for(let[lt,Pt]of Object.entries(He)){let Yt=fe(lt,Ze)[lt];if(Array.isArray(Pt)){if(!Pt.includes(Yt)){Oe=!1;break}}else{let xt=tr=>tr==null||tr===!1;if(xt(Pt)&&xt(Yt))continue;if(Yt!==Pt){Oe=!1;break}}}Oe&&(at&&tt.push(at),Pe&&tt.push(Pe))}return tt},xe=ze=>{let Ze=Se(O,ze);if(!Array.isArray(Ze))return Ze;let tt={};for(let at of Ze)if(typeof at=="string"&&(tt.base=zp(tt.base,at)(y)),typeof at=="object")for(let[Pe,He]of Object.entries(at))tt[Pe]=zp(tt[Pe],He)(y);return tt},et=ze=>{if(d.length<1)return null;let Ze={};for(let{slots:tt=[],class:at,className:Pe,...He}of d){if(!xs(He)){let Oe=!0;for(let lt of Object.keys(He)){let Pt=fe(lt,ze)[lt];if(Pt===void 0||(Array.isArray(He[lt])?!He[lt].includes(Pt):He[lt]!==Pt)){Oe=!1;break}}if(!Oe)continue}for(let Oe of tt)Ze[Oe]=Ze[Oe]||[],Ze[Oe].push([at,Pe])}return Ze};if(!xs(i)||!M){let ze={};
57if(typeof L=="object"&&!xs(L))for(let Ze of Object.keys(L))ze[Ze]=tt=>{var at,Pe;return zp(L[Ze],te(Ze,tt),((at=xe(tt))!=null?at:[])[Ze],((Pe=et(tt))!=null?Pe:[])[Ze],tt==null?void 0:tt.class,tt==null?void 0:tt.className)(y)};return ze}return zp(w,V(),Se(O),J==null?void 0:J.class,J==null?void 0:J.className)(y)},Z=()=>{if(!(!T||typeof T!="object"))return Object.keys(T)};return $.variantKeys=Z(),$.extend=r,$.base=w,$.slots=L,$.variants=T,$.defaultVariants=k,$.compoundSlots=d,$.compoundVariants=O,$},PW=e=>(t,r)=>IW(t,r?US(e,r):e);const AW=kR;var xP;const co=PW((xP=AW.ui)==null?void 0:xP.tv);function MW(e){const t=Object.keys(e),r=t.filter(h=>h.startsWith("aria-")),i=t.filter(h=>h.startsWith("data-")),a=["active","activeClass","ariaCurrentValue","as","disabled","exact","exactActiveClass","exactHash","exactQuery","external","href","download","inactiveClass","noPrefetch","noRel","prefetch","prefetchedClass","rel","replace","target","to","type","title","onClick",...r,...i];return cg(e,...a)}async function RW(e,t){return await LW(t).catch(i=>(console.error("Failed to get image meta for "+t,i+""),{width:0,height:0,ratio:0}))}async function LW(e){if(typeof Image>"u")throw new TypeError("Image not supported");return new Promise((t,r)=>{const i=new Image;i.onload=()=>{const a={width:i.width,height:i.height,ratio:i.width/i.height};t(a)},i.onerror=a=>r(a),i.src=e})}function uI(e){return t=>t?e[t]||t:e.missingValue}function zW({formatter:e,keyMap:t,joinWith:r="/",valueMap:i}={}){e||(e=(h,d)=>`${h}=${d}`),t&&typeof t!="function"&&(t=uI(t));const a=i||{};return Object.keys(a).forEach(h=>{typeof a[h]!="function"&&(a[h]=uI(a[h]))}),(h={})=>Object.entries(h).filter(([o,y])=>typeof y<"u").map(([o,y])=>{const w=a[o];return typeof w=="function"&&(y=w(h[o])),o=typeof t=="function"?t(o):o,e(o,y)}).join(r)}function fa(e=""){if(typeof e=="number")return e;if(typeof e=="string"&&e.replace("px","").match(/^\d+$/g))return Number.parseInt(e,10)}function DW(e=""){if(e===void 0||!e.length)return[];const t=new Set;for(const r of e.split(" ")){const i=Number.parseInt(r.replace("x",""));i&&t.add(i)}return Array.from(t)}function OW(e){if(e.length===0)throw new Error("`densities` must not be empty, configure to `1` to render regular size only (DPR 1.0)")}function FW(e){const t={};if(typeof e=="string")for(const r of e.split(/[\s,]+/).filter(i=>i)){const i=r.split(":");i.length!==2?t["1px"]=i[0].trim():t[i[0].trim()]=i[1].trim()}else Object.assign(t,e);return t}function BW(e){const t={options:e},r=(a,h={})=>tz(t,a,h),i=(a,h={},d={})=>r(a,{...d,modifiers:Gd(h,d.modifiers||{})}).url;for(const a in e.presets)i[a]=(h,d,o)=>i(h,d,{...e.presets[a],...o});return i.options=e,i.getImage=r,i.getMeta=(a,h)=>NW(t,a,h),i.getSizes=(a,h)=>UW(t,a,h),t.$img=i,i}async function NW(e,t,r){const i=tz(e,t,{...r});return typeof i.getMeta=="function"?await i.getMeta():await RW(e,i.url)}function tz(e,t,r){var w,T;if(t&&typeof t!="string")throw new TypeError(`input must be a string (received ${typeof t}: ${JSON.stringify(t)})`);if(!t||t.startsWith("data:"))return{url:t};const{provider:i,defaults:a}=jW(e,r.provider||e.options.provider),h=$W(e,r.preset);if(t=$o(t)?t:u1(t),!i.supportsAlias){for(const k in e.options.alias)if(t.startsWith(k)){const M=e.options.alias[k];M&&(t=ju(M,t.slice(k.length)))}}if(i.validateDomains&&$o(t)){const k=rS(t).host;if(!e.options.domains.find(M=>M===k))return{url:t}}const d=Gd(r,h,a);d.modifiers={...d.modifiers};const o=d.modifiers.format;(w=d.modifiers)!=null&&w.width&&(d.modifiers.width=fa(d.modifiers.width)),(T=d.modifiers)!=null&&T.height&&(d.modifiers.height=fa(d.modifiers.height));const y=i.getImage(t,d,e);return y.format=y.format||o||"",y}function jW(e,t){const r=e.options.providers[t];if(!r)throw new Error("Unknown provider: "+t);return r}function $W(e,t){if(!t)return{};if(!e.options.presets[t])throw new Error("Unknown preset: "+t);return e.options.presets[t]}function UW(e,t,r){var L,O,$,Z,J;const i=fa((L=r.modifiers)==null?void 0:L.width),a=fa((O=r.modifiers)==null?void 0:O.height),h=FW(r.sizes),d=($=r.densities)!=null&&$.trim()?DW(r.densities.trim()):e.options.densities;OW(d);const o=i&&a?a/i:0,y=[],w=[];if(Object.keys(h).length>=1){for(const H in h){const U=hI(H,String(h[H]),a,o,e);if(U!==void 0){y.push({size:U.size,screenMaxWidth:U.screenMaxWidth,media:`(max-width: ${U.screenMaxWidth}px)`});
57for(const V of d)w.push({width:U._cWidth*V,src:dI(e,t,r,U,V)})}}VW(y)}else for(const H of d){const U=Object.keys(h)[0];let V=U?hI(U,String(h[U]),a,o,e):void 0;V===void 0&&(V={size:"",screenMaxWidth:0,_cWidth:(Z=r.modifiers)==null?void 0:Z.width,_cHeight:(J=r.modifiers)==null?void 0:J.height}),w.push({width:H,src:dI(e,t,r,V,H)})}qW(w);const T=w[w.length-1],k=y.length?y.map(H=>`${H.media?H.media+" ":""}${H.size}`).join(", "):void 0,M=k?"w":"x",P=w.map(H=>`${H.src} ${H.width}${M}`).join(", ");return{sizes:k,srcset:P,src:T==null?void 0:T.src}}function hI(e,t,r,i,a){const h=a.options.screens&&a.options.screens[e]||Number.parseInt(e),d=t.endsWith("vw");if(!d&&/^\d+$/.test(t)&&(t=t+"px"),!d&&!t.endsWith("px"))return;let o=Number.parseInt(t);if(!h||!o)return;d&&(o=Math.round(o/100*h));const y=i?Math.round(o*i):r;return{size:t,screenMaxWidth:h,_cWidth:o,_cHeight:y}}function dI(e,t,r,i,a){return e.$img(t,{...r.modifiers,width:i._cWidth?i._cWidth*a:void 0,height:i._cHeight?i._cHeight*a:void 0},r)}function VW(e){var r;e.sort((i,a)=>i.screenMaxWidth-a.screenMaxWidth);let t=null;for(let i=e.length-1;i>=0;i--){const a=e[i];a.media===t&&e.splice(i,1),t=a.media}for(let i=0;i<e.length;i++)e[i].media=((r=e[i+1])==null?void 0:r.media)||""}function qW(e){e.sort((r,i)=>r.width-i.width);let t=null;for(let r=e.length-1;r>=0;r--){const i=e[r];i.width===t&&e.splice(r,1),t=i.width}}const rz=zW({keyMap:{format:"f",fit:"fit",width:"w",height:"h",resize:"s",quality:"q",background:"b"},joinWith:"&",formatter:(e,t)=>XC(e)+"_"+XC(t)}),GW=(e,{modifiers:t={},baseURL:r}={},i)=>{t.width&&t.height&&(t.resize=`${t.width}x${t.height}`,delete t.width,delete t.height);const a=rz(t)||"_";return r||(r=ju(i.options.nuxt.baseURL,"/_ipx")),{url:ju(r,a,cM(e))}},HW=!0,ZW=!0,WW=Object.freeze(Object.defineProperty({__proto__:null,getImage:GW,operationsGenerator:rz,supportsAlias:ZW,validateDomains:HW},Symbol.toStringTag,{value:"Module"})),KW={screens:{xs:320,sm:640,md:768,lg:1024,xl:1280,xxl:1536,"2xl":1536},presets:{},provider:"ipx",domains:[],alias:{},densities:[1,2],format:["webp","webp"],quality:90,providers:{ipx:{provider:WW,defaults:{}}}},nz=e=>{var i;const t=Si(),r=Lr();return r.$img||r._img||(r._img=BW({...KW,event:(i=r.ssrContext)==null?void 0:i.event,nuxt:{baseURL:t.app.baseURL},runtimeConfig:t}))};function XW(e){var t;(t=performance==null?void 0:performance.mark)==null||t.call(performance,"mark_feature_usage",{detail:{feature:e}})}const YW={src:{type:String,required:!1},format:{type:String,required:!1},quality:{type:[Number,String],required:!1},background:{type:String,required:!1},fit:{type:String,required:!1},modifiers:{type:Object,required:!1},preset:{type:String,required:!1},provider:{type:String,required:!1},sizes:{type:[Object,String],required:!1},densities:{type:String,required:!1},preload:{type:[Boolean,Object],required:!1},width:{type:[String,Number],required:!1},height:{type:[String,Number],required:!1},alt:{type:String,required:!1},referrerpolicy:{type:String,required:!1},usemap:{type:String,required:!1},longdesc:{type:String,required:!1},ismap:{type:Boolean,required:!1},loading:{type:String,required:!1,validator:e=>["lazy","eager"].includes(e)},crossorigin:{type:[Boolean,String],required:!1,validator:e=>["anonymous","use-credentials","",!0,!1].includes(e)},decoding:{type:String,required:!1,validator:e=>["async","auto","sync"].includes(e)},nonce:{type:[String],required:!1}},JW=e=>{const t=it(()=>({provider:e.provider,preset:e.preset})),r=it(()=>({width:fa(e.width),height:fa(e.height),alt:e.alt,referrerpolicy:e.referrerpolicy,usemap:e.usemap,longdesc:e.longdesc,ismap:e.ismap,crossorigin:e.crossorigin===!0?"anonymous":e.crossorigin||void 0,loading:e.loading,decoding:e.decoding,nonce:e.nonce})),i=nz(),a=it(()=>({...e.modifiers,width:fa(e.width),height:fa(e.height),format:e.format,quality:e.quality||i.options.quality,background:e.background,fit:e.fit}));return{options:t,attrs:r,modifiers:a}},QW={...YW,placeholder:{type:[Boolean,String,Number,Array],required:!1},placeholderClass:{type:String,required:!1},custom:{type:Boolean,required:!1}},eK=["src"],tK=Rr({__name:"NuxtImg",props:QW,emits:["load","error"],setup(e,{emit:t}
57){const r=e,i=RF(),a=t,h=!1,d=nz(),o=JW(r),y=It(!1),w=It(),T=it(()=>d.getSizes(r.src,{...o.options.value,sizes:r.sizes,densities:r.densities,modifiers:{...o.modifiers.value,width:fa(r.width),height:fa(r.height)}})),k=it(()=>{const Z={...o.attrs.value,"data-nuxt-img":""};return(!r.placeholder||y.value)&&(Z.sizes=T.value.sizes,Z.srcset=T.value.srcset),Z}),M=it(()=>{let Z=r.placeholder;if(Z===""&&(Z=!0),!Z||y.value)return!1;if(typeof Z=="string")return Z;const J=Array.isArray(Z)?Z:typeof Z=="number"?[Z,Z]:[10,10];return d(r.src,{...o.modifiers.value,width:J[0],height:J[1],quality:J[2]||50,blur:J[3]||3},o.options.value)}),P=it(()=>r.sizes?T.value.src:d(r.src,o.modifiers.value,o.options.value)),L=it(()=>M.value?M.value:P.value),$=Lr().isHydrating;return js(()=>{if(M.value||r.custom){const Z=new Image;P.value&&(Z.src=P.value),r.sizes&&(Z.sizes=T.value.sizes||"",Z.srcset=T.value.srcset),Z.onload=J=>{y.value=!0,a("load",J)},Z.onerror=J=>{a("error",J)},XW("nuxt-image");return}w.value&&(w.value.complete&&$&&(w.value.getAttribute("data-error")?a("error",new Event("error")):a("load",new Event("load"))),w.value.onload=Z=>{a("load",Z)},w.value.onerror=Z=>{a("error",Z)})}),(Z,J)=>Z.custom?Nr(Z.$slots,"default",xa(ln({key:1},{...ot(h)?{onerror:"this.setAttribute('data-error', 1)"}:{},imgAttrs:{...k.value,...ot(i)},isLoaded:y.value,src:L.value}))):(Ft(),Ki("img",ln({key:0,ref_key:"imgEl",ref:w,class:M.value&&!y.value?Z.placeholderClass:void 0},{...ot(h)?{onerror:"this.setAttribute('data-error', 1)"}:{},...k.value,...ot(i)},{src:L.value}),null,16,eK))}}),fI=Symbol("nuxt-ui.avatar-group");function rK(e){const t=an(fI,void 0),r=it(()=>e.size??(t==null?void 0:t.value.size));return Ns(fI,it(()=>({size:r.value}))),{size:r}}const nK={slots:{root:"inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-elevated",image:"h-full w-full rounded-[inherit] object-cover",fallback:"font-medium leading-none text-muted truncate",icon:"text-muted shrink-0"},variants:{size:{"3xs":{root:"size-4 text-[8px]"},"2xs":{root:"size-5 text-[10px]"},xs:{root:"size-6 text-xs"},sm:{root:"size-7 text-sm"},md:{root:"size-8 text-base"},lg:{root:"size-9 text-lg"},xl:{root:"size-10 text-xl"},"2xl":{root:"size-11 text-[22px]"},"3xl":{root:"size-12 text-2xl"}}},defaultVariants:{size:"md"}},iz=Object.assign({inheritAttrs:!1},{__name:"Avatar",props:{as:{type:null,required:!1,default:"span"},src:{type:String,required:!1},alt:{type:String,required:!1},icon:{type:String,required:!1},text:{type:String,required:!1},size:{type:null,required:!1},class:{type:null,required:!1},style:{type:null,required:!1},ui:{type:null,required:!1}},setup(e){const t=e,r=it(()=>t.text||(t.alt||"").split(" ").map(w=>w.charAt(0)).join("").substring(0,2)),i=Us(),{size:a}=rK(t),h=it(()=>{var w;return co({extend:co(nK),...((w=i.ui)==null?void 0:w.avatar)||{}})({size:a.value})}),d=it(()=>({"3xs":16,"2xs":20,xs:24,sm:28,md:32,lg:36,xl:40,"2xl":44,"3xl":48})[t.size||"md"]),o=It(!1);Mr(()=>t.src,()=>{o.value&&(o.value=!1)});function y(){o.value=!0}return(w,T)=>{var k;return Ft(),Kt(ot(uo),{as:e.as,class:bi(h.value.root({class:[t.class,(k=t.ui)==null?void 0:k.root]})),style:fl(t.style)},{default:dr(()=>{var M;return[e.src&&!o.value?(Ft(),Kt(Tu(ot(tK)),ln({key:0,role:"img",src:e.src,alt:e.alt,width:d.value,height:d.value},w.$attrs,{class:h.value.image({class:(M=t.ui)==null?void 0:M.image}),onError:y}),null,16,["src","alt","width","height","class"])):(Ft(),Kt(ot(lv),xa(ln({key:1},w.$attrs)),{default:dr(()=>[Nr(w.$slots,"default",{},()=>{var P,L;return[e.icon?(Ft(),Kt(cv,{key:0,name:e.icon,class:bi(h.value.icon({class:(P=t.ui)==null?void 0:P.icon}))},null,8,["name","class"])):(Ft(),Ki("span",{key:1,class:bi(h.value.fallback({class:(L=t.ui)==null?void 0:L.fallback}))},Mo(r.value||" "),3))]})]),_:3},16))]}),_:3},8,["as","class","style"])}}}),sz={__name:"LinkBase",props:{as:{type:String,required:!1,default:"button"},type:{type:String,required:!1,default:"button"},disabled:{type:Boolean,required:!1},onClick:{type:[Function,Array],required:!1},href:{type:String,required:!1},navigate:{type:Function,required:!1},target:{type:[String,Object,null],required:!1},rel:{type:[String,Object,null],required:!1},active:{type:Boolean,required:!1},isExternal:{type:Boolean,required:!1}},setup(e){const t=e;function r(i){if(t.disabled){i.stopPropagation(),i.preventDefault();return}if(t.onClick)for(const a of Array.isArray(t.onClick)?t.onClick:[t.onClick])a(i);t.href&&t.navigate&&!t.isExternal&&t.navigate(i)}return(i,a)=>(Ft(),Kt(ot(uo),ln(e.href?{as:"a",href:e.disabled?void 0:e.href,"aria-disabled":e.disabled?"true":void 0,role:e.disabled?"link":void 0,tabindex:e.disabled?-1:void 0}:e.as==="button"?{as:e.as,type:e.type,disabled:e.disabled}:{as:e.as},{rel:e.rel,target:e.target,onClick:r}),{default:dr(()=>[Nr(i.$slots,"default")]),_:3},16,["rel","target"]))}},iK={base:"focus-visible:outline-primary",variants:{active:{true:"text-primary",false:["text-muted hover:text-default","transition-colors"]},disabled:{true:"cursor-not-allowed opacity-75"}}},sK=Object.assign({inheritAttrs:!1},{__name:"Link",props:{as:{type:null,required:!1,default:"button"},type:{type:null,required:!1,default:"button"},disabled:{type:Boolean,required:!1},active:{type:Boolean,required:!1,default:void 0},exact:{type:Boolean,required:!1},exactQuery:{type:[Boolean,String],required:!1},exactHash:{type:Boolean,required:!1},inactiveClass:{type:String,required:!1,default:""},custom:{type:Boolean,required:!1},raw:{type:Boolean,required:!1},class:{type:null,required:!1},to:{type:null,required:!1},href:{type:null,required:!1},external:{type:Boolean,required:!1},target:{type:[String,Object,null],required:!1},rel:{type:[String,Object,null],required:!1},noRel:{type:Boolean,required:!1},prefetchedClass:{type:String,required:!1},prefetch:{type:Boolean,required:!1},prefetchOn:{type:[String,Object],required:!1},noPrefetch:{type:Boolean,required:!1},activeClass:{type:String,required:!1,default:""},exactActiveClass:{type:String,required:!1},ariaCurrentValue:{type:String,required:!1,default:"page"},viewTransition:{type:Boolean,required:!1},replace:{type:Boolean,required:!1}},setup(e){const t=e,r=$s(),i=Us(),a=af(bZ(t,"as","type","disabled","active","exact","exactQuery","exactHash","activeClass","inactiveClass","raw","class")),h=it(()=>{var w;return co({extend:co(iK),...Gd({variants:{active:{true:t.activeClass,false:t.inactiveClass}}},((w=i.ui)==null?void 0:w.link)||{})})});function d(w,T){const k=FZ(w,T).reduce((L,O)=>(O.type==="added"&&L.add(O.key),L),new Set),M=Object.fromEntries(Object.entries(w).filter(([L])=>!k.has(L))),P=Object.fromEntries(Object.entries(T).filter(([L])=>!k.has(L)));return z1(M,P)}function o({route:w,isActive:T,isExactActive:k}){if(t.active!==void 0)return t.active;if(t.exactQuery==="partial"){if(!d(w.query,r.query))return!1}else if(t.exactQuery===!0&&!z1(w.query,r.query))return!1;return t.exactHash&&w.hash!==r.hash?!1:!!(t.exact&&k||!t.exact&&T)}function y({route:w,isActive:T,isExactActive:k}){const M=o({route:w,isActive:T,isExactActive:k});return t.raw?[t.class,M?t.activeClass:t.inactiveClass]:h.value({class:t.class,active:M,disabled:t.disabled})}return(w,T)=>{const k=y8;return Ft(),Kt(k,ln(ot(a),{custom:""}),{default:dr(({href:M,navigate:P,route:L,rel:O,target:$,isExternal:Z,isActive:J,isExactActive:H})=>[e.custom?Nr(w.$slots,"default",xa(ln({key:0},{...w.$attrs,...e.exact&&H?{"aria-current":t.ariaCurrentValue}:{},as:e.as,type:e.type,disabled:e.disabled,href:M,navigate:P,rel:O,target:$,isExternal:Z,active:o({route:L,isActive:J,isExactActive:H})}))):(Ft(),Kt(sz,ln({key:1},{...w.$attrs,...e.exact&&H?{"aria-current":t.ariaCurrentValue}:{},as:e.as,type:e.type,disabled:e.disabled,href:M,navigate:P,rel:O,target:$,isExternal:Z},{class:y({route:L,isActive:J,isExactActive:H})}),{default:dr(()=>[Nr(w.$slots,"default",{active:o({route:L,isActive:J,isExactActive:H})})]),_:2},1040,["class"]))]),_:3},16)}}}),oK={slots:{base:["rounded-md font-medium inline-flex items-center disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75","transition-colors"],label:"truncate",leadingIcon:"shrink-0",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailingIcon:"shrink-0"},variants:{buttonGroup:{horizontal:"not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none",vertical:"not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none"}
57,color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:"",ghost:"",link:""},size:{xs:{base:"px-2 py-1 text-xs gap-1",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},sm:{base:"px-2.5 py-1.5 text-xs gap-1.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},md:{base:"px-2.5 py-1.5 text-sm gap-1.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},lg:{base:"px-3 py-2 text-sm gap-2",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},xl:{base:"px-3 py-2 text-base gap-2",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6"}},block:{true:{base:"w-full justify-center",trailingIcon:"ms-auto"}},square:{true:""},leading:{true:""},trailing:{true:""},loading:{true:""},active:{true:{base:""},false:{base:""}}},compoundVariants:[{color:"primary",variant:"solid",class:"text-inverted bg-primary hover:bg-primary/75 disabled:bg-primary aria-disabled:bg-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"},{color:"secondary",variant:"solid",class:"text-inverted bg-secondary hover:bg-secondary/75 disabled:bg-secondary aria-disabled:bg-secondary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-secondary"},{color:"success",variant:"solid",class:"text-inverted bg-success hover:bg-success/75 disabled:bg-success aria-disabled:bg-success focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-success"},{color:"info",variant:"solid",class:"text-inverted bg-info hover:bg-info/75 disabled:bg-info aria-disabled:bg-info focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-info"},{color:"warning",variant:"solid",class:"text-inverted bg-warning hover:bg-warning/75 disabled:bg-warning aria-disabled:bg-warning focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-warning"},{color:"error",variant:"solid",class:"text-inverted bg-error hover:bg-error/75 disabled:bg-error aria-disabled:bg-error focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-error"},{color:"primary",variant:"outline",class:"ring ring-inset ring-primary/50 text-primary hover:bg-primary/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-primary"},{color:"secondary",variant:"outline",class:"ring ring-inset ring-secondary/50 text-secondary hover:bg-secondary/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-secondary"},{color:"success",variant:"outline",class:"ring ring-inset ring-success/50 text-success hover:bg-success/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-success"},{color:"info",variant:"outline",class:"ring ring-inset ring-info/50 text-info hover:bg-info/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-info"},{color:"warning",variant:"outline",class:"ring ring-inset ring-warning/50 text-warning hover:bg-warning/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-warning"},{color:"error",variant:"outline",class:"ring ring-inset ring-error/50 text-error hover:bg-error/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-error"},{color:"primary",variant:"soft",class:"text-primary bg-primary/10 hover:bg-primary/15 focus:outline-none focus-visible:bg-primary/15 disabled:bg-primary/10 aria-disabled:bg-primary/10"},{color:"secondary",variant:"soft",class:"text-secondary bg-secondary/10 hover:bg-secondary/15 focu
57s:outline-none focus-visible:bg-secondary/15 disabled:bg-secondary/10 aria-disabled:bg-secondary/10"},{color:"success",variant:"soft",class:"text-success bg-success/10 hover:bg-success/15 focus:outline-none focus-visible:bg-success/15 disabled:bg-success/10 aria-disabled:bg-success/10"},{color:"info",variant:"soft",class:"text-info bg-info/10 hover:bg-info/15 focus:outline-none focus-visible:bg-info/15 disabled:bg-info/10 aria-disabled:bg-info/10"},{color:"warning",variant:"soft",class:"text-warning bg-warning/10 hover:bg-warning/15 focus:outline-none focus-visible:bg-warning/15 disabled:bg-warning/10 aria-disabled:bg-warning/10"},{color:"error",variant:"soft",class:"text-error bg-error/10 hover:bg-error/15 focus:outline-none focus-visible:bg-error/15 disabled:bg-error/10 aria-disabled:bg-error/10"},{color:"primary",variant:"subtle",class:"text-primary ring ring-inset ring-primary/25 bg-primary/10 hover:bg-primary/15 disabled:bg-primary/10 aria-disabled:bg-primary/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary"},{color:"secondary",variant:"subtle",class:"text-secondary ring ring-inset ring-secondary/25 bg-secondary/10 hover:bg-secondary/15 disabled:bg-secondary/10 aria-disabled:bg-secondary/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-secondary"},{color:"success",variant:"subtle",class:"text-success ring ring-inset ring-success/25 bg-success/10 hover:bg-success/15 disabled:bg-success/10 aria-disabled:bg-success/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-success"},{color:"info",variant:"subtle",class:"text-info ring ring-inset ring-info/25 bg-info/10 hover:bg-info/15 disabled:bg-info/10 aria-disabled:bg-info/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-info"},{color:"warning",variant:"subtle",class:"text-warning ring ring-inset ring-warning/25 bg-warning/10 hover:bg-warning/15 disabled:bg-warning/10 aria-disabled:bg-warning/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-warning"},{color:"error",variant:"subtle",class:"text-error ring ring-inset ring-error/25 bg-error/10 hover:bg-error/15 disabled:bg-error/10 aria-disabled:bg-error/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-error"},{color:"primary",variant:"ghost",class:"text-primary hover:bg-primary/10 focus:outline-none focus-visible:bg-primary/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent"},{color:"secondary",variant:"ghost",class:"text-secondary hover:bg-secondary/10 focus:outline-none focus-visible:bg-secondary/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent"},{color:"success",variant:"ghost",class:"text-success hover:bg-success/10 focus:outline-none focus-visible:bg-success/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent"},{color:"info",variant:"ghost",class:"text-info hover:bg-info/10 focus:outline-none focus-visible:bg-info/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent"},{color:"warning",variant:"ghost",class:"text-warning hover:bg-warning/10 focus:outline-none focus-visible:bg-warning/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent"},{color:"error",variant:"ghost",class:"text-error hover:bg-error/10 focus:outline-none focus-visible:bg-error/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent"},{color:"primary",variant:"link",class:"text-primary hover:text-primary/75 disabled:text-primary aria-disabled:text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"},{color:"secondary",variant:"link",class:"text-secondary hover:text-secondary/75 disabled:text-secondary aria-disabled:text-secondary focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"},{color:"success",variant:"link",class:"text-success hover:text-success/75 disabled:text-success aria-disabled:text-success focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"},{color:"info",variant:"link",class:"text-info hover:text-info/75 disabled:text-info aria-disabled:text-info focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"},{color:"warning",variant:"link",class:"text-warning hover:text-warning/75 disabled:text-warning aria-disabled:text-warning focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"},{color:"error",variant:"link",class:"text-error hover:text-error/75 disabled:text-error aria-disabled:text-error focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"},{color:"neutral",variant:"solid",class:"text-inverted bg-inverted hover:bg-inverted/90 disabled:bg-inverted aria-disabled:bg-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-inverted"},{color:"neutral",variant:"outline",class:"ring ring-inset ring-accented text-default bg-default hover:bg-elevated disabled:bg-default aria-disabled:bg-default focus:outline-none focus-visible:ring-2 focus-visible:ring-inverted"},{color:"neutral",variant:"soft",class:"text-default bg-elevated hover:bg-accented/75 focus:outline-none focus-visible:bg-accented/75 disabled:bg-elevated aria-disabled:bg-elevated"},{color:"neutral",variant:"subtle",class:"ring ring-inset ring-accented text-default bg-elevated hover:bg-accented/75 disabled:bg-elevated aria-disabled:bg-elevated focus:outline-none focus-visible:ring-2 focus-visible:ring-inverted"},{color:"neutral",variant:"ghost",class:"text-default hover:bg-elevated focus:outline-none focus-visible:bg-elevated hover:disabled:bg-transparent dark:hover:disabled:bg-transparent hover:aria-disabled:bg-transparent dark:hover:aria-disabled:bg-transparent"},{color:"neutral",variant:"link",class:"text-muted hover:text-default disabled:text-muted aria-disabled:text-muted focus:outline-none focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-inverted"},{size:"xs",square:!0,class:"p-1"},{size:"sm",square:!0,class:"p-1.5"},{size:"md",square:!0,class:"p-1.5"},{size:"lg",square:!0,class:"p-2"},{size:"xl",square:!0,class:"p-2"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}}],defaultVariants:{color:"primary",variant:"solid",size:"md"}},__={__name:"Button",props:{label:{type:String,required:!1},color:{type:null,required:!1},activeColor:{type:null,required:!1},variant:{type:null,required:!1},activeVariant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},block:{type:Boolean,required:!1},loadingAuto:{type:Boolean,required:!1},onClick:{type:[Function,Array],required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},icon:{type:String,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:String,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:String,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:String,required:!1},as:{type:null,required:!1},type:{type:null,required:!1},disabled:{type:Boolean,required:!1},active:{type:Boolean,required:!1,default:void 0},exact:{type:Boolean,required:!1},exactQuery:{type:[Boolean,String],required:!1},exactHash:{type:Boolean,required:!1},inactiveClass:{type:String,required:!1,default:""},to:{type:null,required:!1},href:{type:null,required:!1},external:{type:Boolean,required:!1},target:{type:[String,Object,null],required:!1},rel:{type:[String,Object,null],required:!1},noRel:{type:Boolean,required:!1},prefetchedClass:{type:String,required:!1},prefetch:{type:Boolean,required:!1},prefetchOn:{type:[String,Object],required:!1},noPrefetch:{type:Boolean,required:!1},activeClass:{type:String,required:!1,default:""},exactActiveClass:{type:String,required:!1},ariaCurrentValue:{type:String,required:!1},viewTransition:{type:Boolean,required:!1},replace:{type:Boolean,required:!1}},setup(e){const t=e,r=dA(),i=Us(),{orientation:a,size:h}=AZ(t),d=af(MW(t)),o=It(!1),y=an(OZ,void 0);async function w($){o.value=!0;const Z=Array.isArray(t.onClick)?t.onClick:[t.onClick];try{await Promise.all(Z.map(J=>J==null?void 0:J($)))}finally{o.value=!1}}const T=it(()=>t.loading||t.loadingAuto&&(o.value||(y==null?void 0:y.value)&&t.type==="submit")),{isLeading:k,isTrailing:M,leadingIconName:P,trailingIconName:L}=IZ(it(()=>({...t,loading:T.value}))),O=it(()=>{var $;return co({extend:co(oK),...Gd({variants:{active:{true:{base:t.activeClass},false:{base:t.inactiveClass}}}},(($=i.ui)==null?void 0:$.button)||{})})({color:t.color,variant:t.variant,size:h.value,loading:T.value,block:t.block,square:t.square||!r.default&&!t.label,leading:k.value,trailing:M.value,buttonGroup:a.value})});return($,Z)=>{var J;return Ft(),Kt(sK,ln({type:e.type,disabled:e.disabled||T.value,class:O.value.base({class:[t.class,(J=t.ui)==null?void 0:J.base]})},ot($5)(ot(d),["type","disabled","onClick"]),{custom:""}),{default:dr(({active:H,...U})=>{var V;return[Sr(sz,ln(U,{class:O.value.base({class:[t.class,(V=t.ui)==null?void 0:V.base],active:H,...H&&e.activeVariant?{variant:e.activeVariant}:{},...H&&e.activeColor?{color:e.activeColor}:{}}),onClick:w}),{default:dr(()=>[Nr($.$slots,"leading",{},()=>{var te,ce,fe;return[ot(k)&&ot(P)?(Ft(),Kt(cv,{key:0,name:ot(P),class:bi(O.value.leadingIcon({class:(te=t.ui)==null?void 0:te.leadingIcon,active:H}))},null,8,["name","class"])):e.avatar?(Ft(),Kt(iz,ln({key:1,size:((ce=t.ui)==null?void 0:ce.leadingAvatarSize)||O.value.leadingAvatarSize()},e.avatar,{class:O.value.leadingAvatar({class:(fe=t.ui)==null?void 0:fe.leadingAvatar,active:H})}),null,16,["size","class"])):ai("",!0)]}),Nr($.$slots,"default",{},()=>{var te;return[e.label?(Ft(),Ki("span",{key:0,class:bi(O.value.label({class:(te=t.ui)==null?void 0:te.label,active:H}))},Mo(e.label),3)):ai("",!0)]}),Nr($.$slots,"trailing",{},()=>{var te;return[ot(M)&&ot(L)?(Ft(),Kt(cv,{key:0,name:ot(L),class:bi(O.value.trailingIcon({class:(te=t.ui)==null?void 0:te.trailingIcon,active:H}))},null,8,["name","class"])):ai("",!0)]})]),_:2},1040,["class"])]}),_:3},16,["type","disabled","class"])}}};function aK(e){return(t,r)=>lK(t,r,ot(e))}function lK(e,t,r){return BZ(r,`messages.${e}`,e).replace(/\{(\w+)\}/g,(a,h)=>`${(t==null?void 0:t[h])??`{${h}}`}`)}function cK(e){const t=it(()=>ot(e).name),r=it(()=>ot(e).code),i=it(()=>ot(e).dir),a=Xr(e)?e:It(e);
57return{lang:t,code:r,dir:i,locale:a,t:aK(e)}}function uK(e){return Gd(e,{dir:"ltr"})}const hK=uK({name:"English",code:"en",messages:{inputMenu:{noMatch:"No matching data",noData:"No data",create:'Create "{label}"'},calendar:{prevYear:"Previous year",nextYear:"Next year",prevMonth:"Previous month",nextMonth:"Next month"},inputNumber:{increment:"Increment",decrement:"Decrement"},commandPalette:{placeholder:"Type a command or search...",noMatch:"No matching data",noData:"No data",close:"Close"},selectMenu:{noMatch:"No matching data",noData:"No data",create:'Create "{label}"',search:"Search..."},toast:{close:"Close"},carousel:{prev:"Prev",next:"Next",goto:"Go to slide {slide}"},modal:{close:"Close"},slideover:{close:"Close"},alert:{close:"Close"},table:{noData:"No data"}}}),oz=Symbol.for("nuxt-ui.locale-context"),dK=e=>{const t=e||Fs(an(oz));return cK(it(()=>t.value||hK))},fK=B5(dK),dw=Symbol("nuxt-ui.portal-target");function pK(e){const t=an(dw,void 0),r=it(()=>typeof e.value=="boolean"||e.value===void 0?(t==null?void 0:t.value)??"body":e.value),i=it(()=>typeof e.value=="boolean"?!e.value:!1);return Ns(dw,it(()=>r.value)),it(()=>({to:r.value,disabled:i.value}))}const GS=[{name:"Москва",url:"msk",coords:[37.6173,55.7558]},{name:"Челябинск",url:"chel",coords:[61.402706,55.157389]},{name:"Миасс",url:"miass",coords:[60.10972,55.050462]},{name:"Дмитров",url:"dmitrov",coords:[37.540498,56.337987]},{name:"Дубна",url:"dbn",coords:[37.162457,56.736381]},{name:"Копейск",url:"kop",coords:[61.615105,55.113507]},{name:"Кыштым",url:"kysh",coords:[60.549841,55.716091]},{name:"Озерск",url:"ozsk",coords:[60.698455,55.764226]}],fw=window.setInterval,mK=Xu("orders",()=>{const{trackEvent:e,trackEcommerce:t}=Qv(),r=2e4,i=3e4;let a=null,h=null;const{$apiClient:d}=Lr(),o=$s(),y=It([]),w=It(!1),T=It(!1),k=It(null);let M=null;M=Dd("order",{dynamic:!0});const P=it({get:()=>(M==null?void 0:M.value)!==null&&(M==null?void 0:M.value)!==void 0,set:Pe=>{!Pe&&M&&(M.value=null)}}),L=it(()=>typeof document<"u"),O=()=>{a&&(clearInterval(a),a=null)};let $=0;const Z=async()=>{var Oe;if(!((Oe=k.value)!=null&&Oe.id)){O();return}const Pe=$,He=await Se(k.value.id,{silent:!0});He&&$===Pe&&(k.value=He)},J=()=>{var Pe;O(),!(!L.value||!P.value||!((Pe=k.value)!=null&&Pe.id)||document.hidden)&&(a=fw(Z,r))},H=()=>{h&&(clearInterval(h),h=null)},U=async()=>{if(!L.value||document.hidden)return;if(!Oo().isAuthorized){H();return}await ce({silent:!0})},V=()=>{H(),!(!L.value||document.hidden||!Oo().isAuthorized)&&(h=fw(U,i))},te=()=>{var He;if(!L.value)return;if(document.hidden){O(),H();return}P.value&&((He=k.value)!=null&&He.id)&&J(),Oo().isAuthorized&&(ce({silent:!0}),V())};async function ce(Pe){const He=(Pe==null?void 0:Pe.silent)??!1;try{He||(w.value=!0);const{data:Oe}=await gS({client:d});Oe!=null&&Oe.data&&(y.value=Oe==null?void 0:Oe.data)}catch(Oe){console.error("Error fetching active orders:",Oe)}finally{He||(w.value=!1)}}function fe(){H(),y.value=[]}async function Se(Pe,He){const Oe=(He==null?void 0:He.silent)??!1;try{Oe||(T.value=!0);const{data:lt}=await wR({client:d,body:{id:Pe}});return(lt==null?void 0:lt.data)||null}catch(lt){return console.error("Error fetching order details:",lt),null}finally{Oe||(T.value=!1)}}Mr(()=>M==null?void 0:M.value,async Pe=>{if(Pe&&typeof Pe=="string"){k.value=null;const He=await Se(Pe);He?(k.value=He,J()):M&&(M.value=null)}else O(),k.value=null},{immediate:!0});async function xe(Pe){k.value=null;const He=await Se(Pe.id);k.value=He||Pe,J(),M&&(M.value=Pe.id)}function et(){O(),k.value=null,M&&(M.value=null)}function ze(){O(),k.value=null,cR("order")}async function Ze(){var He;if(!((He=k.value)!=null&&He.id))return;const Pe=k.value.id;fs("order_cancel_requested",{routeCity:o.params.city??null});try{await mS({client:d,body:{id:Pe}}),e("order_cancel"),t("refund",{actionField:{id:Pe}}),fs("order_cancel_succeeded",{source:"order_widget",reason:"active_order_manual_cancel",paymentStatus:null,orderId:Pe,routeCity:o.params.city??null}),await ce()}catch(Oe){fs("order_cancel_failed",{routeCity:o.params.city??null,error:(Oe==null?void 0:Oe.message)??"unknown_error"}),console.error(Oe)}ze()}document.addEventListener("visibilitychange",te),Wu(()=>{document.removeEventListener("visibilitychange",te),O(),H()});async function tt(){if(!k.value)return;const{useCartStore:Pe}=await Dn(async()=>{const{useCartStore:lt}=await Promise.resolve().then(()=>hv);return{useCartStore:lt}},void 0,import.meta.url),He=Pe(),Oe=k.value.products||[];for(const lt of Oe)await He.addProductToCart({id:lt.id,name:lt.name,img:lt.img,quantity:lt.quantity||1,price:lt.price,options:lt.options});ze()}async function at(Pe){var Oe,lt;const He=(Oe=k.value)==null?void 0:Oe.id;if(!He)return{ok:!1};try{const{data:Pt}=await SR({client:d,body:{id:He,...Pe}});return Pt!=null&&Pt.data?($++,((lt=k.value)==null?void 0:lt.id)===He&&(k.value=Pt.data),{ok:!0}):{ok:!1,message:(Pt==null?void 0:Pt.success)===!1?Pt.message:void 0}}catch(Pt){return console.error("Error updating order address:",Pt),{ok:!1}}}return{activeOrders:y,isLoadingActiveOrders:w,isLoadingOrderDetails:T,fetchActiveOrders:ce,startActiveOrdersPolling:V,stopActiveOrdersPolling:H,clearOrders:fe,isVisibleOrderWidget:P,currentOrder:k,fetchOrderDetails:Se,openOrderWidget:xe,closeOrderWidget:et,removeOrder:Ze,repeatOrder:tt,updateOrderAddressDetail
57s:at}});class uv extends Error{constructor(r,i){super(`Request to ${r} timed out after ${i}ms`);oa(this,"code","HTTP_TIMEOUT");this.url=r,this.timeoutMs=i,this.name="HttpTimeoutError"}}const az=()=>1e4;function gK(e){if(typeof AbortSignal.any=="function")return AbortSignal.any(e);const t=new AbortController;for(const r of e){if(r.aborted)return t.abort(r.reason),t.signal;r.addEventListener("abort",()=>t.abort(r.reason),{once:!0})}return t.signal}function yK(e,t){return lz(e,t).signal}function lz(e,t){const r=AbortSignal.timeout(e);return{signal:t?gK([r,t]):r,timeout:r}}function Rne(e){return(e==null?void 0:e.name)==="AbortError"}async function _K(e,t={}){var o;const{timeout:r,signal:i,...a}=t,h=r??az(),d=yK(h,i);try{return await $fetch(e,{...a,signal:d})}catch(y){throw(y==null?void 0:y.name)==="AbortError"||(y==null?void 0:y.name)==="TimeoutError"||((o=y==null?void 0:y.cause)==null?void 0:o.name)==="TimeoutError"?new uv(e,h):y}}const Cx={value:"",label:"Скорее",type:"asap"};function vK(){const{$apiClient:e}=Lr(),t=_c(),r=ps("selectedDeliveryTime",{default:()=>({...Cx}),maxAge:60*60*24,sameSite:"lax"}),i=cl("deliveryDayGroups",()=>[]),a=cl("isLoadingPeriods",()=>!1);async function h(){var M;a.value=!0;try{const P=await pS({client:e});if((M=P.data)!=null&&M.data){i.value=P.data.data;const L=r.value;L.type!=="asap"&&L.value&&(i.value.some($=>$.periods.some(Z=>Z.available&&Z.deliveryTime===L.value))||(r.value={...Cx}))}}catch{i.value=[]}finally{a.value=!1}}const d=it(()=>{var M;return((M=t.currentRestaurant)==null?void 0:M.isClosed)??!1}),o=it(()=>i.value.find(M=>M.isToday)),y=it(()=>{if(d.value||!o.value)return!1;const M=o.value.periods.find(P=>P.deliveryTime==="");return M?M.available:o.value.periods.some(P=>P.available)}),w=it(()=>{if(a.value||!i.value.length)return!0;const M=r.value;return M.type==="asap"?y.value:i.value.some(P=>P.periods.some(L=>L.available&&L.deliveryTime===M.value))});function T(M){r.value=M}function k(){r.value={...Cx},i.value=[]}return{selectedDeliveryTime:r,deliveryDayGroups:i,isLoadingPeriods:a,isAsapAvailable:y,isSelectedTimeAvailable:w,fetchDeliveryPeriods:h,setDeliveryTime:T,resetDeliveryTime:k}}function bK(e){let t=5381;for(let r=0;r<e.length;r++)t=(t<<5)+t+e.charCodeAt(r)>>>0;return t.toString(36)}function cz(e){return e!=null&&e.data?bK(e.data):""}const uz=["apartment","entrance","floor","doorphone","comment","leaveAtDoor"];function hz(e){if(!e||typeof e!="object")return null;const t={};let r=!1;for(const i of uz){const a=e[i];a==null||a===""||(t[i]=a,r=!0)}return r?t:null}function pI(e,t){if(!e||typeof e!="object"||!("key"in e)||typeof e.key!="string"||!e.key)return null;const r=cz(t);return!r||r!==e.key?null:hz(e.details)}function Lne(e){const t={};for(const r of uz){const i=e[r];i==null||i===""||i===!1||(t[r]=i)}return t}function xK(e){return!e||typeof e!="object"||"key"in e&&e.key?null:hz(e)}function wK(){const e=Lr();if(e._addressDetailsChannel)return e._addressDetailsChannel;const t=ps("deliveryDetails",{maxAge:60*60*48,default:()=>null}),r={read:i=>pI(t.value,i),write:(i,a)=>{const h=cz(i);if(!h)return;const d=pI(t.value,i)??{};t.value={key:h,details:{...d,...a}}},clear:()=>{t.value=null},readLegacyPrefill:()=>xK(t.value)};return e._addressDetailsChannel=r,r}function SK(e,t={}){wm(e,{level:"warning",...t})}function pw(){const e=cl("toasts",()=>[]),t=It(!1),r=[],i=()=>`${Date.now()}-${Math.random().toString(36).slice(2,9)}`;async function a(){if(!(t.value||r.length===0)){for(t.value=!0;r.length>0;){const w=r.shift();await Ri(),e.value=[...e.value,w].slice(-5)}t.value=!1}}function h(w){const T={id:i(),open:!0,...w};return r.push(T),a(),T}function d(w,T){const k=e.value.findIndex(M=>M.id===w);k!==-1&&(e.value[k]={...e.value[k],...T})}function o(w){const T=e.value.findIndex(k=>k.id===w);T!==-1&&(e.value[T]={...e.value[T],open:!1}),setTimeout(()=>{e.value=e.value.filter(k=>k.id!==w)},200)}function y(){e.value=[]}return{toasts:e,add:h,update:d,remove:o,clear:y}}function mI(e){var r;if(!e)return"";const t=((r=e.address)==null?void 0:r.data)??"";return`${e.receiptType??""}|${e.restaurantId??""}|${t}`}const gI=e=>typeof e=="object"?e.id:e,yI=(e=[])=>e.map(t=>`${gI(t.group)}-${gI(t.option)}`).sort().join("|");function _I(e,t){return e.findIndex(r=>{var h,d;if(r.id!==t.id||t.promo!==void 0&&!!r.promo!=!!t.promo)return!1;const i=(h=r.options)!=null&&h.length?r.options:null,a=(d=t.options)!=null&&d.length?t.options:null;return!i&&!a?!0:!i||!a||i.length!==a.length?!1:yI(i)===yI(a)})}const Sd=Xu("cart",()=>{const{$apiClient:e}=Lr(),t=D9(e),r=Oo(),{trackEvent:i,trackEcommerce:a}
57=Qv(),h=It(null),d="cartAddressEcho",o=It(null),y=()=>{var Ee,Fe;return`${r.cookieToken??""}|${((Fe=(Ee=r.user)==null?void 0:Ee.session)==null?void 0:Fe.clientId)??""}`};{try{const Ee=window.localStorage.getItem(d),Fe=Ee?JSON.parse(Ee):null,Ke=(Fe==null?void 0:Fe.point)??Fe;Ke&&typeof Ke.data=="string"&&Ke.data&&(!(Fe!=null&&Fe.epoch)||Fe.epoch===y())&&(o.value=Ke)}catch{}Mr(o,Ee=>{try{Ee?window.localStorage.setItem(d,JSON.stringify({point:Ee,epoch:y()})):window.localStorage.removeItem(d)}catch{}},{deep:!0})}const w=It(!1),T=It(null),k=It(!1),M=It(!1),P=ps("orderComment",{maxAge:60*60*48,default:()=>""}),L=It(P.value||"");Mr(L,Ee=>{P.value=Ee});let O=Promise.resolve(),$=0;const Z=3e4,J=It(0);let H=null;typeof BroadcastChannel<"u"&&(H=new BroadcastChannel("friday-cart"));function U(Ee,Fe){SK(`[cart-engine] ${Ee}`,{tags:{module:"cart-engine"},extra:Fe})}const V=q9({cart:h,echo:o,transport:{updateCart:async Ee=>zk(await t.updateCart(Ee)),getCart:async()=>zk(await t.getCart())},getEpoch:()=>{var Ee,Fe;return`${r.cookieToken??""}|${((Fe=(Ee=r.user)==null?void 0:Ee.session)==null?void 0:Fe.clientId)??""}`},productDebounceMs:300,hooks:{onCartChanged:()=>{T.value=null,H==null||H.postMessage({type:"cart-changed"})},onBaselineApplied:(Ee,Fe)=>{if($=Date.now(),V.isSettled()){const Ke=s5(Ee,_c().restaurants),nt=th();Ke&&nt.cities.some(St=>St.name===Ke)&&nt.setCurrentCityCookie(Ke)}mI(Ee)!==mI(Fe)&&(O=O.then(()=>vK().fetchDeliveryPeriods()).catch(()=>{}))},onProductBatchFailed:({result:Ee})=>{T.value="Не удалось обновить корзину",pw().add({title:"Не удалось обновить корзину",description:Ee.error instanceof uv?"Долгий ответ сервера — попробуйте ещё раз":"Изменения не применились. Попробуйте ещё раз.",color:"error",duration:5e3}),V.fetchCart({corrective:!0})},onContextBatchFailed:({result:Ee})=>{at(Ee,"Попробуйте ещё раз"),J.value+=1,T.value="Не удалось применить адрес или способ получения",V.fetchCart({corrective:!0})},onTelemetry:U}}),te=it(()=>V.isBusy.value),ce=it(()=>(V.queueVersion.value,V.projectedSnapshot())),fe=it(()=>!V.settled.value);function Se(Ee={}){V.isSettled()&&(!Ee.force&&Date.now()-$<Z||V.fetchCart())}if(window.addEventListener("focus",()=>Se()),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&Se()}),H){let Ee=0;H.onmessage=Fe=>{var Ke,nt;if(((Ke=Fe.data)==null?void 0:Ke.type)==="cart-changed"&&Se({force:!0}),((nt=Fe.data)==null?void 0:nt.type)==="auth-changed"){if(Date.now()-Ee<1e3)return;Ee=Date.now(),V.reset("auth-changed-broadcast"),r.getUserSession().catch(()=>{}).then(()=>{var St,mt;if((mt=(St=r.user)==null?void 0:St.session)!=null&&mt.clientId&&!r.isAuthorized)return r.fetchUserInfo().catch(()=>{})}).then(()=>V.fetchCart({corrective:!0}))}}}function xe(){H==null||H.postMessage({type:"auth-changed"})}async function et(Ee=2500){if(V.isSettled())return;await Promise.race([V.flush().then(()=>!1),new Promise(Ke=>setTimeout(()=>Ke(!0),Ee))])&&(U("cart_login_drain_timeout",{queueSize:V.queueSize()}),V.reset("login-drain-timeout"))}window.addEventListener("pagehide",()=>{if(V.isSettled())return;const Ee=r.cookieToken;if(!Ee)return;const Fe=Si();U("cart_pagehide_flush",{queueSize:V.queueSize()}),fetch("/api/MobileAPI/v3/update-cart",{method:"POST",keepalive:!0,headers:{"Content-Type":"application/json",Authorization:`Basic ${btoa(`${Fe.public.clientId}:${Fe.public.clientToken}`)}`,token:Ee},body:JSON.stringify(V.projectedSnapshot())})});let ze=0;function Ze(Ee){var Fe,Ke;Ee==="DELIVERY"&&r.isAuthorized&&(o.value||(Ke=(Fe=h.value)==null?void 0:Fe.address)!=null&&Ke.data||(U("cart_delivery_empty_echo_authorized",{}),!(Date.now()-ze<3e4)&&(ze=Date.now(),Dn(async()=>{const{getAddresses:nt}=await Promise.resolve().then(()=>r8);return{getAddresses:nt}},void 0,import.meta.url).then(({getAddresses:nt})=>nt({client:e})).then(nt=>{var Gt,Qt,cr;if(o.value||(Qt=(Gt=h.value)==null?void 0:Gt.address)!=null&&Qt.data||V.isUserGeoPending())return;const St=nt==null?void 0:nt.data;if(!(St!=null&&St.success))return;const mt=(cr=St.data)==null?void 0:cr[0],Lt=mt==null?void 0:mt.address;Lt!=null&&Lt.data&&V.enqueue({type:"setAddress",point:{data:Lt.data,name:Lt.name,latitude:Lt.latitude,longitude:Lt.longitude}})}).catch(()=>{}))))}function tt(Ee,Fe){Ee.type==="setReceiptType"&&Ze(Ee.receiptType),V.enqueue(Ee,Fe)}function at(Ee,Fe){Ee.error instanceof uv&&pw().add({title:"Долгий ответ сервера",description:Fe,color:"error",duration:5e3})}async function Pe(){T.value=null;const Ee=await V.fetchCart();Ee.ok||(at(Ee,"Попробуйте обновить страницу"),T.value="Не удалось загрузить корзин
57у",h.value=null)}function He(Ee){var nt;(Ee.products||Ee.additions)&&(U("cart_legacy_products_patch_dropped",{patch:Object.keys(Ee)}),console.warn("[cart] updateCart({products/additions}) больше не поддерживается — используй CRUD-методы"));const Fe=Ee.addressSelectedByClient===!0,Ke=[];if(Ee.receiptType!==void 0&&(Ze(Ee.receiptType),Ke.push({type:"setReceiptType",receiptType:Ee.receiptType,byUser:Fe})),Ee.restaurantId!==void 0&&Ke.push({type:"setRestaurant",restaurantId:Ee.restaurantId,byUser:Fe}),Ee.address!==void 0)if(!((nt=Ee.address)!=null&&nt.data))Ke.push(W1());else{const{data:St,name:mt,latitude:Lt,longitude:Gt,...Qt}=Ee.address;Ke.push({type:"setAddress",point:{data:St,name:mt,latitude:Lt,longitude:Gt},selectedByClient:Fe});const cr={};for(const[Ir,Ln]of Object.entries(Qt))Ln!==void 0&&(cr[Ir]=Ln);Object.keys(cr).length>0&&Ke.push({type:"setAddressDetails",details:cr})}return Ee.promoCode!==void 0&&Ke.push({type:"setPromo",code:Ee.promoCode}),Ee.bonuses!==void 0&&Ke.push({type:"setBonusMode",bonuses:Ee.bonuses}),Ke}function Oe(Ee){for(const Fe of He(Ee))V.enqueue(Fe)}async function lt(Ee){const Fe=He(Ee),Ke=Fe.some(St=>St.type==="setAddress"||St.type==="setReceiptType"||St.type==="setRestaurant"||St.type==="clearAddress"),nt=J.value;if(Fe.length===0)V.requestEchoSync();else for(const St of Fe)V.enqueue(St);await V.flush(),Ke&&(T.value=J.value>nt?"Не удалось применить адрес или способ получения":null)}async function Pt(Ee){await t.cancelOrder(Ee),await Pe()}function Yt(){T.value=null}function xt(){return V.projectedSnapshot().products}function tr(Ee,Fe,Ke){V.enqueue({type:"setProductQty",productId:Ee,options:t5(Fe),quantity:Ke})}async function lr(Ee){var St;fs("cart_item_added",{productId:(Ee==null?void 0:Ee.id)??null,productName:(Ee==null?void 0:Ee.name)??null,productPrice:(Ee==null?void 0:Ee.price)??null,quantityAdded:(Ee==null?void 0:Ee.quantity)??1,hasOptions:!!((St=Ee==null?void 0:Ee.options)!=null&&St.length)}),a("add",{products:[{id:Ee.id,name:Ee.name,price:Ee.price,quantity:Ee.quantity||1}]}),i("cart_add"),Dn(async()=>{const{useStickyBottomStore:mt}=await import("./JO6gYhjY.js").then(Lt=>Lt.s);return{useStickyBottomStore:mt}},__vite__mapDeps([9,10,11,12]),import.meta.url).then(({useStickyBottomStore:mt})=>{mt().setComponent("checkout")});const Fe=xt(),Ke=_I(Fe,Ee),nt=Ke>=0?Fe[Ke].quantity:0;tr(Ee.id,Ee.options,nt+(Ee.quantity||1))}async function Or(Ee){_I(xt(),Ee)<0||tr(Ee.id,Ee.options,Ee.quantity)}async function zr(Ee,Fe){V.enqueue({type:"setAddition",additionId:Ee,quantity:Fe})}function Je(Ee){Ee.length&&(a("remove",{products:Ee.map(Fe=>({id:Fe.id,name:Fe.name,price:Fe.price,quantity:Fe.quantity||1}))}),i("cart_remove"))}async function At(Ee){var Fe;Je((((Fe=h.value)==null?void 0:Fe.products)??[]).filter(Ke=>Ke.id===Ee));for(const Ke of xt().filter(nt=>nt.id===Ee))tr(Ke.id,Ke.options,0)}async function _t(Ee){var Fe;Je((((Fe=h.value)==null?void 0:Fe.products)??[]).filter(Ke=>Ke.id===Ee));for(const Ke of xt().filter(nt=>nt.id===Ee))tr(Ke.id,Ke.options,0)}async function pt(Ee){fs("cart_item_removed_specific",{productId:Ee.id}),Je([{id:Ee.id,name:Ee.name||"",price:Ee.price||0,quantity:Ee.quantity||1}]),tr(Ee.id,Ee.options,0)}async function Nt(Ee){var Fe,Ke;V.enqueue({type:"setPromo",code:Ee}),await V.flush(),(Fe=h.value)!=null&&Fe.promoCode&&!((Ke=h.value)!=null&&Ke.promoCodeError)&&i("promo_applied")}async function rr(){V.enqueue({type:"setPromo",code:""}),await V.flush()}function ue(Ee){var Ke;k.value=Ee==="spend";const Fe=Ee==="accumulate"?0:((Ke=h.value)==null?void 0:Ke.bonusesMax)??0;V.enqueue({type:"setBonusMode",bonuses:Fe})}function me(Ee={}){var nt,St;const{syncServer:Fe=!0}=Ee,Ke=((nt=h.value)==null?void 0:nt.products)??[];if(Ke.length&&a("remove",{products:Ke.map(mt=>({id:mt.id,name:mt.name,price:mt.price,quantity:mt.quantity||1}))}),!Fe){V.reset("local-clear"),h.value={products:[],additions:[],receiptType:((St=h.value)==null?void 0:St.receiptType)??"DELIVERY",promoCode:"",bonuses:0};return}for(const mt of xt())tr(mt.id,mt.options,0);for(const mt of V.projectedSnapshot().additions)V.enqueue({type:"setAddition",additionId:mt.id,quantity:0});V.enqueue({type:"setPromo",code:""}),V.enqueue({type:"setBonusMode",bonuses:0})}function je(){return 0}function ft(Ee){var St;const Fe=_c(),Ke=V.projectedSnapshot(),nt=W9({targetCityName:Ee,cart:{receiptType:Ke.receiptType,restaurantId:Ke.restaurantId??null},restaurants:Fe.restaurants});if(nt.length){fs("move_cart_to_city",{restaurantId:((St=h.value)==null?void 0:St.restaurantId)??null,intents:nt.map(mt=>mt.type)});for(const mt of nt)V.enqueue(mt);V.flush()}}const Xe=e0(),dt=wK();return Mr(()=>[h.value,o.value],([Ee])=>
57{if(Ee)try{Xe.address.receiptType=Ee.receiptType??null,Xe.address.restaurantId=Ee.restaurantId??null;const Fe=Ee.address??o.value;if(Fe){const nt={apartment:"",entrance:"",floor:"",doorphone:"",comment:"",leaveAtDoor:!1,...(Fe.data?dt.read({data:Fe.data,name:Fe.name,latitude:Fe.latitude,longitude:Fe.longitude}):null)??{}},St=Xe.address.deliveryAddress;St?Object.assign(St,{data:Fe.data,name:Fe.name,latitude:Fe.latitude,longitude:Fe.longitude},nt):Xe.address.deliveryAddress={...Fe,...nt},Xe.address.viewAddress=Fe.name??null}else Xe.address.deliveryAddress=null,Xe.address.viewAddress=null}catch(Fe){console.warn("[cart] temp sync to orderGeoInfo failed",Fe)}},{deep:!0}),{cart:h,addressEcho:o,projectedCart:ce,isTotalsPending:fe,isUpdating:te,isSubmitting:w,lastError:T,isBonusSpend:k,isSubmittingOrder:M,orderComment:L,enqueue:tt,enqueuePatch:Oe,flushCart:V.flush,isSettled:V.isSettled,resetEngine:V.reset,refetchIfIdle:Se,notifyAuthChanged:xe,drainForLogin:et,isUserGeoPending:V.isUserGeoPending,wouldSuppressCorrective:V.wouldSuppressCorrective,fetchCart:Pe,updateCart:lt,cancelOrder:Pt,clearError:Yt,addProductToCart:lr,updateProductInCart:Or,setAdditionQuantity:zr,removeProductFromCart:At,removeAllProductsById:_t,removeSpecificProductFromCart:pt,applyPromoCode:Nt,removePromoCode:rr,setBonusMode:ue,clearCart:me,getMinQuantityForProduct:je,moveCartToCity:ft}}),hv=Object.freeze(Object.defineProperty({__proto__:null,useCartStore:Sd},Symbol.toStringTag,{value:"Module"})),th=Xu("cities",()=>{const e=gn(),t=$s(),r=_c(),{trackEvent:i}=Qv(),a=ps("cityName",{default:()=>"",maxAge:60*60*24*30}),h=ps("cityChoiceConfirmed_v1",{default:()=>!1,maxAge:60*60*24*30}),d=It([]),o=It(""),y=it(()=>{const fe=typeof t.params.city=="string"?t.params.city:null;if(fe)return d.value.find(Se=>Se.url===fe);if(a.value)return d.value.find(Se=>Se.name===a.value)}),w=It(!0);let T=null;const k=it({get:()=>(T==null?void 0:T.value)??!1,set:fe=>{T&&(T.value=fe)}});T=Dd("citySelect");const M=it(()=>{const fe=h.value;return fe===!0||fe==="true"}),P=fe=>!!fe&&typeof fe.id=="string"&&typeof fe.name=="string"&&typeof fe.latitude=="number"&&typeof fe.longitude=="number",L=()=>{const fe=new Map;for(const Se of r.restaurants){const xe=Se.cityObject;P(xe)&&(fe.has(xe.id)||fe.set(xe.id,{name:xe.name,url:xe.url,coords:[xe.longitude,xe.latitude]}))}d.value=[...fe.values()]},O=it(()=>d.value.map(fe=>fe.url)),$=fe=>d.value.some(Se=>Se.url===fe),Z=fe=>{var Se;return(Se=d.value.find(xe=>xe.name===fe))==null?void 0:Se.url},J=fe=>{H(fe)},H=fe=>{te(fe)},U=async fe=>{var tt,at;const Se=fe?(tt=d.value.find(Pe=>Pe.name===fe))==null?void 0:tt.url:(at=y.value)==null?void 0:at.url;if(!Se||t.params.city===Se)return;const et=(t.path||"").replace(/^\/[^/]+/,`/${Se}`),ze={};t.query.cart!=null&&(ze.cart=t.query.cart),t.query.informer!=null&&(ze.informer=t.query.informer),(t.query.map!=null||t.query.restaurantInfo!=null)&&await e.replace({path:t.path,query:ze}),await e.push({path:et,query:ze})},V=async(fe,Se={})=>{var et,ze;const{source:xe="user"}=Se;fs("city_switch_requested_ui",{beforeCity:((et=y.value)==null?void 0:et.name)??null,routeCity:t.params.city??null}),xe==="user"&&Sd().moveCartToCity(fe),J(fe),i("city_changed"),await U(fe),await Ri(),h.value=!0,fs("city_switch_applied_ui",{currentCity:((ze=y.value)==null?void 0:ze.name)??null,routeCity:t.params.city??null,restaurantId:r.currentRestaurantId??null})},te=fe=>{a.value=fe};return{cities:d,currentCity:y,currentCityName:o,isCityChoiceModalOpen:w,isCityInputModalOpen:k,isCityChoiceConfirmed:M,cityNameCookie:a,cityChoiceConfirmedCookie:h,citiesSlugs:O,fetchCities:L,selectCity:J,setCurrentCity:H,setCurrentCityCookie:te,markCityChoiceConfirmed:()=>{h.value=!0},setCitySlug:U,selectCityAndSyncRoute:V,isRouteParamCity:$,getCitySlugByName:Z}}),TK=async e=>{var a;if(e.path.match(/\.(png|jpe?g|svg|ico|json)$/i)||e.path.startsWith("/_nuxt/")||e.path.startsWith("/api/")||e.name===null)return;const t=th(),r=typeof e.params.city=="string"?e.params.city:null,i=((a=t.citiesSlugs)==null?void 0:a.filter(h=>!!h).length)>0?t.citiesSlugs.filter(h=>!!h):GS.map(h=>h.url);if(r&&!i.includes(r))throw Hd({statusCode:404,message:`Cтраницы такого города не существует: ${e.fullPath}`,fatal:!1})},CK=e=>{if(e.path.includes("//")){const t=e.path.replace(/\/+/g,"/");return Fv({path:t,query:e.query,hash:e.hash},{})}},EK=async e=>{if(e.path!=="/"&&e.path.endsWith("/")){const t=e.path.replace(/\/+$/,""),{query:r,hash:i}=e;return Fv({path:t,query:r,hash:i},{})}},kK=e=>{},IK=[s$,o$,a$,TK,CK,EK,kK],im={};function PK(e,t,r){const{pathname:i,search:a,hash:h}=t,d=e.indexOf("#");if(d>-1){const w=h.includes(e.slice(d))?e.slice(d).length:1;let T=h.slice(w);return T[0]!=="/"&&(T="/"+T),YC(T,"")}const o=YC(i,e),y=!r||MB(o,r,{trailingSlash:!0})?o:r;
57return y+(y.includes("?")?"":a)+h}const AK=Zr({name:"nuxt:router",enforce:"pre",async setup(e){var $;let t,r,i=Si().app.baseURL;I1&&!i.includes("#")&&(i+="#");const a=(($=Js.history)==null?void 0:$.call(Js,i))??(I1?cj(i):JM(i)),h=Js.routes?([t,r]=el(()=>Js.routes(rx)),t=await t,r(),t??rx):rx;let d;const o=Lj({...Js,scrollBehavior:(Z,J,H)=>{if(J===Eo){d=H;return}if(Js.scrollBehavior){if(o.options.scrollBehavior=Js.scrollBehavior,"scrollRestoration"in window.history){const U=o.beforeEach(()=>{U(),window.history.scrollRestoration="manual"})}return Js.scrollBehavior(Z,Eo,d||H)}},history:a,routes:h});Js.routes&&Js.routes,"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto"),e.vueApp.use(o);const y=wa(o.currentRoute.value);o.afterEach((Z,J)=>{y.value=J}),Object.defineProperty(e.vueApp.config.globalProperties,"previousRoute",{get:()=>y.value});const w=PK(i,window.location,e.payload.path),T=wa(o.currentRoute.value),k=()=>{T.value=o.currentRoute.value};e.hook("page:finish",k),o.afterEach((Z,J)=>{var H,U,V,te;((U=(H=Z.matched[0])==null?void 0:H.components)==null?void 0:U.default)===((te=(V=J.matched[0])==null?void 0:V.components)==null?void 0:te.default)&&k()});const M={};for(const Z in T.value)Object.defineProperty(M,Z,{get:()=>T.value[Z],enumerable:!0});e._route=da(M),e._middleware||(e._middleware={global:[],named:{}});const P=Bv();o.afterEach(async(Z,J,H)=>{delete e._processingMiddleware,!e.isHydrating&&P.value&&await e.runWithContext(CN),H&&await e.callHook("page:loading:end")});try{[t,r]=el(()=>o.isReady()),await t,r()}catch(Z){[t,r]=el(()=>e.runWithContext(()=>nc(Z))),await t,r()}const L=w!==o.currentRoute.value.fullPath?o.resolve(w):o.currentRoute.value;k();const O=e.payload.state._layout;return o.beforeEach(async(Z,J)=>{var H;await e.callHook("page:loading:start"),Z.meta=Mi(Z.meta),e.isHydrating&&O&&!ll(Z.meta.layout)&&(Z.meta.layout=O),e._processingMiddleware=!0;{const U=new Set([...IK,...e._middleware.global]);for(const V of Z.matched){const te=V.meta.middleware;if(te)for(const ce of uS(te))U.add(ce)}for(const V of U){const te=typeof V=="string"?e._middleware.named[V]||await((H=im[V])==null?void 0:H.call(im).then(ce=>ce.default||ce)):V;if(!te)throw new Error(`Unknown route middleware: '${V}'.`);try{const ce=await e.runWithContext(()=>te(Z,J));if(!e.payload.serverRendered&&e.isHydrating&&(ce===!1||ce instanceof Error)){const fe=ce||l_({statusCode:404,statusMessage:`Page Not Found: ${w}`});return await e.runWithContext(()=>nc(fe)),!1}if(ce===!0)continue;if(ce===!1)return ce;if(ce)return nS(ce)&&ce.fatal&&await e.runWithContext(()=>nc(ce)),ce}catch(ce){const fe=l_(ce);return fe.fatal&&await e.runWithContext(()=>nc(fe)),fe}}}}),o.onError(async()=>{delete e._processingMiddleware,await e.callHook("page:loading:end")}),o.afterEach(async(Z,J)=>{Z.matched.length===0&&await e.runWithContext(()=>nc(l_({statusCode:404,fatal:!1,statusMessage:`Page not found: ${Z.fullPath}`,data:{path:Z.fullPath}})))}),e.hooks.hookOnce("app:created",async()=>{try{"name"in L&&(L.name=void 0),await o.replace({...L,force:!0}),o.options.scrollBehavior=Js.scrollBehavior}catch(Z){await e.runWithContext(()=>nc(Z))}}),{provide:{router:o}}}});function MK(e){typeof e.indexable<"u"&&(e.indexable=String(e.indexable)!=="false"),typeof e.trailingSlash<"u"&&!e.trailingSlash&&(e.trailingSlash=String(e.trailingSlash)!=="false"),e.url&&!$o(String(e.url),{acceptRelative:!0,strict:!1})&&(e.url=PB(String(e.url)));const t=Object.keys(e).sort((i,a)=>i.localeCompare(a)),r={};for(const i of t)r[i]=e[i];return r}function RK(e){const r=[];function i(h){if(!h||typeof h!="object"||Object.keys(h).length===0)return()=>{};h._context;const d={};for(const y in h){const w=h[y];typeof w<"u"&&w!==""&&(d[y]=w)}let o;return Object.keys(d).filter(y=>!y.startsWith("_")).length>0&&(o=r.push(d)),()=>{typeof o<"u"&&r.splice(o-1,1)}}function a(h){var o;const d={};h!=null&&h.debug&&(d._context={}),d._priority={};for(const y in r.sort((w,T)=>(w._priority||0)-(T._priority||0)))for(const w in r[y]){const T=w,k=h!=null&&h.resolveRefs?En(r[y][w]):r[y][w];!w.startsWith("_")&&typeof k<"u"&&k!==""&&(d[w]=k,typeof r[y]._priority<"u"&&r[y]._priority!==-1&&(d._priority[T]=r[y]._priority),h!=null&&h.debug&&(d._context[T]=((o=r[y]._context)==null?void 0:o[T])||r[y]._context||"anonymous"))}return h!=null&&h.skipNormalize?d:MK(d)}return{stack:r,push:i,get:a}}const LK=Zr({name:"nuxt-site-config:init",enforce:"pre",async setup(e){var i;const t=RK(),r=cl("site-config");{const a=r.value||window.__NUXT_SITE_CONFIG__||{};for(const h in a)h[0]!=="_"&&t.push({[h]:a[h],_priority:((i=a._priority)==null?void 0:i[h])||-1})}return{provide:{nuxtSiteConfig:t}}}}),zK=Zr({name:"nuxt:payload",setup(e){const t=new Set;
57gn().beforeResolve(async(r,i)=>{if(r.path===i.path)return;const a=await pE(r.path);if(a){for(const h of t)delete e.static.data[h];for(const h in a.data)h in e.static.data||t.add(h),e.static.data[h]=a.data[h]}}),Wd(()=>{e.hooks.hook("link:prefetch",async r=>{const{hostname:i}=new URL(r,window.location.href);i===window.location.hostname&&await pE(r).catch(()=>{console.warn("[nuxt] Error preloading payload for",r)})})})}}),DK=Zr(()=>{const e=gn();Wd(()=>{e.beforeResolve(async()=>{await new Promise(t=>{setTimeout(t,100),requestAnimationFrame(()=>{setTimeout(t,0)})})})})}),OK=Zr({name:"nuxt:chunk-reload",setup(e){const t=gn(),r=Si(),i=new Set;t.beforeEach(()=>{i.clear()}),e.hook("app:chunkError",({error:h})=>{i.add(h)});function a(h){const o="href"in h&&h.href[0]==="#"?r.app.baseURL+h.href:ju(r.app.baseURL,h.fullPath);ER({path:o,persistState:!0})}e.hook("app:manifest:update",()=>{t.beforeResolve(a)}),t.onError((h,d)=>{i.has(h)&&a(d)})}}),FK=Zr({name:"pinia",setup(e){const t=EN();return e.vueApp.use(t),Zm(t),e.payload&&e.payload.pinia&&(t.state.value=e.payload.pinia),{provide:{pinia:t}}}}),BK=Uw(()=>Dn(()=>Promise.resolve().then(()=>_H),void 0,import.meta.url).then(e=>e.default||e.default||e)),NK=Uw(()=>Dn(()=>import("./D8z_QsYl.js"),__vite__mapDeps([21,10,11]),import.meta.url).then(e=>e.default||e.default||e)),jK=[["Icon",BK],["NuxtIcon",NK]],$K=Zr({name:"nuxt:global-components",setup(e){for(const[t,r]of jK)e.vueApp.component(t,r),e.vueApp.component("Lazy"+t,r)}}),oc={default:Uw(()=>Dn(()=>import("./Buk3vGe4.js"),__vite__mapDeps([22,10,11,9,12,19,7,2,16,23,14,24]),import.meta.url).then(e=>e.default||e))},UK=Zr({name:"nuxt:prefetch",setup(e){const t=gn();e.hooks.hook("app:mounted",()=>{t.beforeEach(async r=>{var a;const i=(a=r==null?void 0:r.meta)==null?void 0:a.layout;i&&typeof oc[i]=="function"&&await oc[i]()})}),e.hooks.hook("link:prefetch",r=>{if($o(r))return;const i=t.resolve(r);if(!i)return;const a=i.meta.layout;let h=uS(i.meta.middleware);h=h.filter(d=>typeof d=="string");for(const d of h)typeof im[d]=="function"&&im[d]();a&&typeof oc[a]=="function"&&oc[a]()})}}),VK=Zr({name:"sentry-client-config",async setup(){let e,t;[e,t]=el(()=>Dn(()=>import("./CGXdhSm_.js"),__vite__mapDeps([25,23]),import.meta.url)),await e,t()}});function qK(e,t){if(e==null)return;let r=e;for(let i=0;i<t.length;i++){if(r==null||r[t[i]]==null)return;r=r[t[i]]}return r}function HS(e,t,r){if(r.length===0)return t;const i=r[0];return r.length>1&&(t=HS(typeof e!="object"||e===null||!Object.prototype.hasOwnProperty.call(e,i)?Number.isInteger(Number(r[1]))?[]:{}:e[i],t,Array.prototype.slice.call(r,1))),Number.isInteger(Number(i))&&Array.isArray(e)?e.slice()[i]:Object.assign({},e,{[i]:t})}function dz(e,t){if(e==null||t.length===0)return e;if(t.length===1){if(e==null)return e;if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.slice.call(e,0).splice(t[0],1);const r={};for(const i in e)r[i]=e[i];return delete r[t[0]],r}if(e[t[0]]==null){if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.concat.call([],e);const r={};for(const i in e)r[i]=e[i];return r}return HS(e,dz(e[t[0]],Array.prototype.slice.call(t,1)),[t[0]])}function fz(e,t){return t.map(r=>r.split(".")).map(r=>[r,qK(e,r)]).filter(r=>r[1]!==void 0).reduce((r,i)=>HS(r,i[1],i[0]),{})}function pz(e,t){return t.map(r=>r.split(".")).reduce((r,i)=>dz(r,i),e)}function vI(e,{storage:t,serializer:r,key:i,debug:a,pick:h,omit:d,beforeHydrate:o,afterHydrate:y},w,T=!0){try{T&&(o==null||o(w));const k=t.getItem(i);if(k){const M=r.deserialize(k),P=h?fz(M,h):M,L=d?pz(P,d):P;e.$patch(L)}T&&(y==null||y(w))}catch(k){a&&console.error("[pinia-plugin-persistedstate]",k)}}function bI(e,{storage:t,serializer:r,key:i,debug:a,pick:h,omit:d}){try{const o=h?fz(e,h):e,y=d?pz(o,d):o,w=r.serialize(y);t.setItem(i,w)}catch(o){a&&console.error("[pinia-plugin-persistedstate]",o)}}function GK(e,t,r){const{pinia:i,store:a,options:{persist:h=r}}=e;if(!h)return;if(!(a.$id in i.state.value)){const y=i._s.get(a.$id.replace("__hot:",""));y&&Promise.resolve().then(()=>y.$persist());return}const o=(Array.isArray(h)?h:h===!0?[{}]:[h]).map(t);a.$hydrate=({runHooks:y=!0}={})=>{o.forEach(w=>{vI(a,w,e,y)})},a.$persist=()=>{o.forEach(y=>{bI(a.$state,y)})},o.forEach(y=>{vI(a,y,e),a.$subscribe((w,T)=>bI(T,y),{detached:!0})})}function HK(e){return{getItem:t=>ps(t,{...e??Si().public.piniaPluginPersistedstate.cookieOptions??{},decode:(e==null?void 0:e.decode)??decodeURIComponent,readonly:!0}).value,setItem:(t,r)=>ps(t,{...e??Si().public.piniaPluginPersistedstate.cookieOptions??{},encode:(e==null?void 0:e.encode)??encodeURIComponent}).value=r}}function ZK(){return{getItem:e=>window.localStorage.getItem(e),setItem:(e,t)=>
57window.localStorage.setItem(e,t)}}function WK(){return{getItem:e=>window.sessionStorage.getItem(e),setItem:(e,t)=>window.sessionStorage.setItem(e,t)}}const Ex={cookies:HK,localStorage:ZK,sessionStorage:WK};function KK(e){const r=Si().public.piniaPluginPersistedstate;GK(e,i=>({key:r.key?r.key.replace(/%id/g,i.key??e.store.$id):i.key??e.store.$id,debug:i.debug??r.debug??!1,serializer:i.serializer??{serialize:a=>JSON.stringify(a),deserialize:a=>Rd(a)},storage:i.storage??(r.storage?r.storage==="cookies"?Ex.cookies(r.cookieOptions):Ex[r.storage]():Ex.cookies()),beforeHydrate:i.beforeHydrate,afterHydrate:i.afterHydrate,pick:i.pick,omit:i.omit}),r.auto??!1)}const XK=Zr({name:"pinia-plugin-persistedstate",setup({$pinia:e}){e.use(KK)}});function YK(e){var t=[],r="";for(r in e)t.push(r);return t}function mw(e){return e=JSON.stringify(e),!(typeof e!="string"||!/^\{[\s\S]*\}$/.test(e))}function JK(e){return e instanceof Array}function QK(e){return Array.prototype.slice.call(e)}function Bd(){if(!(this instanceof Bd))return new Bd}Bd.prototype={get:function(e){for(var t=e+"=",r=document.cookie.split(";"),i=0;i<r.length;i++){for(var a=r[i];a.charAt(0)==" ";)a=a.substring(1,a.length);if(a.indexOf(t)==0)return decodeURI(a.substring(t.length,a.length))}return!1},set:function(e,t,r){if(mw(e))for(const i in e)this.set(i,e[i],t,r);else if(typeof e=="string"){const i=mw(r)?r:{expires:r},a=i.path!==void 0?`;path=${i.path};path=/`:";path=/",h=i.domain?`;domain=${i.domain}`:"",d=i.secure?";secure":"";let o=i.expires!==void 0?i.expires:"";typeof o=="string"&&o!==""?o=new Date(o):typeof o=="number"&&(o=new Date(+new Date+1e3*60*60*24*o)),o!==""&&"toGMTString"in o&&(o=`;expires=${o.toGMTString()}`);const y=i.sameSite?`;SameSite=${i.sameSite}`:"";document.cookie=`${e}=${encodeURI(t)+o+a+h+d+y}`}},remove:function(e){e=JK(e)?e:QK(arguments);for(var t=0,r=e.length;t<r;t++)this.set(e[t],"",-1);return e},clear:function(e){return e?this.remove(e):this.remove(YK(this.all()))},all:function(){if(document.cookie==="")return{};for(var e=document.cookie.split("; "),t={},r=0,i=e.length;r<i;r++){var a=e[r].split("=");
57t[decodeURI(a[0])]=decodeURI(a[1])}return t}};let vu=null;const mz=function(e,t,r){const i=arguments;if(vu||(vu=Bd()),i.length===0)return vu.all();if(i.length===1&&e===null)return vu.clear();if(i.length===2&&!t)return vu.clear(e);if(typeof e=="string"&&!t)return vu.get(e);if(typeof e=="string"&&t||mw(e))return vu.set(e,t,r)};for(const e in Bd.prototype)mz[e]=Bd.prototype[e];const eX="viewportState";function tX(e,t){e=Fs(e);const r=it({get(){return t.value||e.value.fallbackBreakpoint},set(M){t.value=M,typeof window<"u"&&e.value.cookie.name&&mz.set(e.value.cookie.name,t.value,e.value.cookie)}}),i=it(()=>{const P=e.value.breakpoints||{},L=Object.keys(P).sort((Z,J)=>P[Z]-P[J]),O={};let $=L.length;for(;$--;){const Z=L[$],J=P[Z],H=P[L[$+1]],U=P[L[$-1]];let V="";e.value.feature==="minWidth"?($>0?V=`(min-width: ${J}px)`:V="(min-width: 1px)",H&&(V+=` and (max-width: ${H-.1}px)`)):(V=`(max-width: ${J}px)`,U&&(V=`(min-width: ${U+.1}px) and ${V}`)),O[Z]={mediaQuery:V,size:J}}return O}),a=it(()=>Object.keys(i.value));return{breakpoint:r,breakpointValue:h,isGreaterThan:d,isGreaterOrEquals:o,isLessThan:y,isLessOrEquals:w,match:T,matches:k,queries:i};function h(M){return(En(e).breakpoints||{})[M]}function d(M){const P=a.value.indexOf(r.value),L=a.value.indexOf(M);return L===-1?!1:L>P}function o(M){return d(M)||T(M)}function y(M){const P=a.value.indexOf(r.value),L=a.value.indexOf(M);return L===-1?!1:L<P}function w(M){return y(M)||T(M)}function T(M){return r.value===M}function k(...M){return M.includes(r.value)}}const rX=Zr(e=>{const t=p$(),r=cl(eX,"$lrXx6pjKA3"),i=tX(t,r);return e.hook("app:suspense:resolve",()=>{for(const a in i.queries.value){const{mediaQuery:h}=i.queries.value[a],d=window.matchMedia(h);d.matches&&(i.breakpoint.value=a),d.onchange=o=>{o.matches&&(i.breakpoint.value=a)}}}),e.provide("viewport",i)});var Ky={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"}
57,emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};const nX=[50,100,200,300,400,500,600,700,800,900,950];function iX(e,t){return e in Ky&&typeof Ky[e]=="object"&&t in Ky[e]?Ky[e][t]:""}function sX(e,t){return`${nX.map(r=>`--ui-color-${e}-${r}: var(--color-${t==="neutral"?"old-neutral":t}-${r}, ${iX(t,r)});`).join(`
58  `)}`}function xI(e,t){return`--ui-${e}: var(--ui-color-${e}-${t});`}const oX=Zr(()=>{const e=Us(),t=Lr(),r=it(()=>{const{neutral:a,...h}=e.ui.colors;return`@layer base {
59  :root {
60  ${Object.entries(e.ui.colors).map(([d,o])=>sX(d,o)).join(`
61  `)}
62  }
63  :root, .light {
64  ${Object.keys(h).map(d=>xI(d,500)).join(`
65  `)}
66  }
67  .dark {
68  ${Object.keys(h).map(d=>xI(d,400)).join(`
69  `)}
70  }
71}`}),i={style:[{innerHTML:()=>r.value,tagPriority:-2,id:"nuxt-ui-colors"}]};if(t.isHydrating&&!t.payload.serverRendered){const a=document.createElement("style");a.innerHTML=r.value,a.setAttribute("data-nuxt-ui-colors",""),document.head.appendChild(a),i.script=[{innerHTML:"document.head.removeChild(document.querySelector('[data-nuxt-ui-colors]'))"}]}Zd(i)}),aX="__NUXT_COLOR_MODE__",kx="nuxt-color-mode",lX="localStorage",Ha=window[aX]||{},cX=Zr(e=>{const t=cl("color-mode",()=>Mi({preference:Ha.preference,value:Ha.value,unknown:!1,forced:!1})).value;gn().afterEach(h=>{const d=h.meta.colorMode;d&&d!=="system"?(t.value=d,t.forced=!0):(d==="system"&&console.warn("You cannot force the colorMode to system at the page level."),t.forced=!1,t.value=t.preference==="system"?Ha.getColorScheme():t.preference)});let r;function i(){r||!window.matchMedia||(r=window.matchMedia("(prefers-color-scheme: dark)"),r.addEventListener("change",()=>{!t.forced&&t.preference==="system"&&(t.value=Ha.getColorScheme())}))}function a(h,d){var o,y;switch(h){case"cookie":window.document.cookie=kx+"="+d;break;case"sessionStorage":(o=window.sessionStorage)==null||o.setItem(kx,d);break;case"localStorage":default:(y=window.localStorage)==null||y.setItem(kx,d)}}Mr(()=>t.preference,h=>{t.forced||(h==="system"?(t.value=Ha.getColorScheme(),i()):t.value=h,a(lX,h))},{immediate:!0}),Mr(()=>t.value,(h,d)=>{let o;o=window.document.createElement("style"),o.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),window.document.head.appendChild(o),Ha.removeColorScheme(d),Ha.addColorScheme(h),window.getComputedStyle(o).opacity,document.head.removeChild(o)}),t.preference==="system"&&i(),e.hook("app:mounted",()=>{t.unknown&&(t.preference=Ha.preference,t.value=Ha.value,t.unknown=!1)}),e.provide("colorMode",t)}),uX=Zr({name:"@nuxt/icon",setup(){var a,h;const e=Si(),t=Us().icon;Zk.setFetch($fetch.native);const r=[];if(t.provider==="server"){const d=((h=(a=e.app)==null?void 0:a.baseURL)==null?void 0:h.replace(/\/$/,""))??"";r.push(d+(t.localApiEndpoint||"/api/_nuxt_icon")),(t.fallbackToApi===!0||t.fallbackToApi==="client-only")&&r.push(t.iconifyApiEndpoint)}else t.provider==="none"?Zk.setFetch(()=>Promise.resolve(new Response)):r.push(t.iconifyApiEndpoint);async function i(d,o){try{const y=await $fetch(r[0]+"/"+o+".json",{query:{icons:d.join(",")}});if(!y||y.prefix!==o||!y.icons)throw new Error("Invalid data"+JSON.stringify(y));return y}catch(y){return console.error("Failed to load custom icons",y),null}}m5("",{resources:r});for(const d of t.customCollections||[])d&&DG(i,d)}});function hX(e){const t=e.replace("#",""),r=t.length===3?t.split("").map(d=>d+d).join(""):t,i=parseInt(r.slice(0,2),16),a=parseInt(r.slice(2,4),16),h=parseInt(r.slice(4,6),16);return`${i} ${a} ${h}`}const dX=Zr(()=>{const{currentBrand:e}=sf(),t=e.value.primaryColor,r=e.value.primaryForegroundColor,i=e.value.primaryPaleColor,a=hX(t);Zd({style:[{key:"brand-vars",innerHTML:`:root { --color-primary: ${t}; --color-on-primary: ${r}; --color-primary-pale: ${i}; --ui-primary-500: ${a}; }`}]})}),fX=Zr(()=>{const{currentBrand:e}=sf();Zd({title:e.value.displayName})}),wI="__chunk_reload_at",pX=1e4,mX=e=>/Failed to fetch dynamically imported module|Importing a module script failed|error loading dynamically imported module/i.test(e);function SI(e){const t=Number(sessionStorage.getItem(wI)||0);Date.now()-t<pX||(sessionStorage.setItem(wI,String(Date.now())),ER({path:e,persistState:!0}))}const gX=Zr(e=>{e.hook("app:chunkError",()=>{SI()}),gn().onError((r,i)=>{mX(String((r==null?void 0:r.message)??r))&&SI(typeof(i==null?void 0:i.fullPath)=="string"?i.fullPath:void 0)})}),yX=Zr(()=>{const{brandType:e}=sf(),t=`/favicon/${e}`,r=[{rel:"shortcut icon",href:`${t}/favicon.ico`},{rel:"apple-touch-icon",href:`${t}/apple-touch-icon.png`},{rel:"manifest",href:`${t}/site.webmanifest`}];e==="pizza"?r.push({rel:"icon",type:"image/png",sizes:"96x96",href:`${t}/favicon-96x96.png`},{rel:"icon",type:"image/svg+xml",href:`${t}/favicon.svg`}):r.push({rel:"icon",type:"image/png",sizes:"32x32",href:`${t}/favicon-32x32.png`},{rel:"icon",type:"image/png",sizes:"16x16",href:`${t}/favicon-16x16.png`}),Zd({link:r})}),gz="3.7.7",_X=gz,uf=typeof Buffer=="function",TI=typeof TextDecoder=="function"?new TextDecoder:void 0,CI=typeof TextEncoder=="function"?new TextEncoder:void 0,vX="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
71+/=",$p=Array.prototype.slice.call(vX),Xy=(e=>{let t={};return e.forEach((r,i)=>t[r]=i),t})($p),bX=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,ji=String.fromCharCode.bind(String),EI=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),yz=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),_z=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),vz=e=>{let t,r,i,a,h="";const d=e.length%3;for(let o=0;o<e.length;){if((r=e.charCodeAt(o++))>255||(i=e.charCodeAt(o++))>255||(a=e.charCodeAt(o++))>255)throw new TypeError("invalid character found");t=r<<16|i<<8|a,h+=$p[t>>18&63]+$p[t>>12&63]+$p[t>>6&63]+$p[t&63]}return d?h.slice(0,d-3)+"===".substring(d):h},ZS=typeof btoa=="function"?e=>btoa(e):uf?e=>Buffer.from(e,"binary").toString("base64"):vz,gw=uf?e=>Buffer.from(e).toString("base64"):e=>{let r=[];for(let i=0,a=e.length;i<a;i+=4096)r.push(ji.apply(null,e.subarray(i,i+4096)));return ZS(r.join(""))},v_=(e,t=!1)=>t?yz(gw(e)):gw(e),xX=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?ji(192|t>>>6)+ji(128|t&63):ji(224|t>>>12&15)+ji(128|t>>>6&63)+ji(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return ji(240|t>>>18&7)+ji(128|t>>>12&63)+ji(128|t>>>6&63)+ji(128|t&63)}},wX=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,bz=e=>e.replace(wX,xX),kI=uf?e=>Buffer.from(e,"utf8").toString("base64"):CI?e=>gw(CI.encode(e)):e=>ZS(bz(e)),Td=(e,t=!1)=>t?yz(kI(e)):kI(e),II=e=>Td(e,!0),SX=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,TX=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),r=t-65536;return ji((r>>>10)+55296)+ji((r&1023)+56320);case 3:return ji((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return ji((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},xz=e=>e.replace(SX,TX),wz=e=>{if(e=e.replace(/\s+/g,""),!bX.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,r="",i,a;for(let h=0;h<e.length;)t=Xy[e.charAt(h++)]<<18|Xy[e.charAt(h++)]<<12|(i=Xy[e.charAt(h++)])<<6|(a=Xy[e.charAt(h++)]),r+=i===64?ji(t>>16&255):a===64?ji(t>>16&255,t>>8&255):ji(t>>16&255,t>>8&255,t&255);return r},WS=typeof atob=="function"?e=>atob(_z(e)):uf?e=>Buffer.from(e,"base64").toString("binary"):wz,Sz=uf?e=>EI(Buffer.from(e,"base64")):e=>EI(WS(e).split("").map(t=>t.charCodeAt(0))),Tz=e=>Sz(Cz(e)),CX=uf?e=>Buffer.from(e,"base64").toString("utf8"):TI?e=>TI.decode(Sz(e)):e=>xz(WS(e)),Cz=e=>_z(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),yw=e=>CX(Cz(e)),EX=e=>{if(typeof e!="string")return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},Ez=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),kz=function(){const e=(t,r)=>Object.defineProperty(String.prototype,t,Ez(r));e("fromBase64",function(){return yw(this)}),e("toBase64",function(t){return Td(this,t)}),e("toBase64URI",function(){return Td(this,!0)}),e("toBase64URL",function(){return Td(this,!0)}),e("toUint8Array",function(){return Tz(this)})},Iz=function(){const e=(t,r)=>Object.defineProperty(Uint8Array.prototype,t,Ez(r));e("toBase64",function(t){return v_(this,t)}),e("toBase64URI",function(){return v_(this,!0)}),e("toBase64URL",function(){return v_(this,!0)})},kX=()=>{kz(),Iz()},Pz={version:gz,VERSION:_X,atob:WS,atobPolyfill:wz,btoa:ZS,btoaPolyfill:vz,fromBase64:yw,toBase64:Td,encode:Td,encodeURI:II,encodeURL:II,utob:bz,btou:xz,decode:yw,isValid:EX,fromUint8Array:v_,toUint8Array:Tz,extendString:kz,extendUint8Array:Iz,extendBuiltins:kX},IX=new Set([500,502,503,504]),PX=()=>[1e3,2e3],AX=e=>/\/get-[a-z0-9-]+\/?$/i.test(new URL(e,"http://relative").pathname),MX=e=>new Promise(t=>setTimeout(t,e)),RX=async e=>{var i,a;const t=az(),r=AX(e.url)?PX():[];for(let h=0;;h++){const{signal:d,timeout:o}=lz(t,e.signal),y=new Request(e.clone(),{signal:d});let w;try{w=await globalThis.fetch(y)}catch(T){throw o.aborted?new uv(e.url,t):T}if(!IX.has(w.status)||h>=r.length||(await MX(r[h]),(i=e.signal)!=null&&i.aborted))return w;try{await((a=w.body)==null?void 0:a.cancel())}catch{}}},LX=e=>pR(fS({baseUrl:"/api/MobileAPI/",headers:{Authorization:`Basic ${Pz.encode(`${e.clientId}:${e.clientToken}`)}`,"Content-Type":"application/json"},fetch:RX}));function PI(e,t){for(const r of e.split(";")){const i=r.indexOf("=");if(i!==-1&&r.slice(0,i).trim()===t){const a=r.slice(i+1).trim();try{return decodeURIComponent(a)}catch{return a}}}return null}function zX(e){return e.requestUrl.includes("/get-session")||e.isFreshLogin?"ignore":(e.cookieToken??null)!==(e.failedToken??null)?"sync-cookie":"reset-session"}function AI(e){var i,a;const t=e.$pinia,r=(a=(i=t==null?void 0:t._s)==null?void 0:i.get)==null?void 0:a.call(i,"user");if(r)return r;try{return e.runWithContext(()=>Oo(t))}catch{return null}}const DX=Zr(e=>{const t=Si();let r=!1;const i=5e3,a=LX({clientId:t.public.clientId,clientToken:t.public.clientToken});return a.interceptors.request.use((h,d)=>{try{const o=AI(e),y=o==null?void 0:o.cookieToken;y&&!h.headers.has("token")&&h.headers.set("token",y)}catch{}return h}),a.interceptors.response.use((h,d,o)=>
71{if(h.status===401){const y=AI(e);if(!y)return h;const w=PR(window.location.protocol==="https:"),T=PI(document.cookie,w),k=w!==K_?PI(document.cookie,K_):null,M=zX({requestUrl:d.url,failedToken:d.headers.get("token"),cookieToken:T??k,isFreshLogin:Date.now()-y.lastLoginAppliedAt<i});if(M==="sync-cookie")return!T&&k?y.cookieToken=k:e.runWithContext(()=>h8(w)),y.getUserSession(),h;M==="reset-session"&&!r&&(r=!0,e.runWithContext(()=>IR()).setState("unauthorized"),y.clearUserInfo().catch(()=>{}).then(()=>y.getUserSession()).then(()=>e.runWithContext(()=>Dn(async()=>{const{useCartStore:L}=await Promise.resolve().then(()=>hv);return{useCartStore:L}},void 0,import.meta.url).then(({useCartStore:L})=>L().fetchCart()))).catch(()=>{}).finally(()=>{r=!1}))}return h}),{provide:{apiClient:a}}}),OX=Zr(()=>{});var zne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Az(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Dne(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var a=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,a.get?a:{enumerable:!0,get:function(){return e[i]}})}),r}var b_={exports:{}};/**
72 * MapLibre GL JS
73 * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.6.0/LICENSE.txt
74 */var FX=b_.exports,MI;function BX(){return MI||(MI=1,function(e,t){(function(r,i){e.exports=i()})(FX,function(){var r={},i={};function a(d,o,y){if(i[d]=y,d==="index"){var w="var sharedModule = {}; ("+i.shared+")(sharedModule); ("+i.worker+")(sharedModule);",T={};return i.shared(T),i.index(r,T),typeof window<"u"&&r.setWorkerUrl(window.URL.createObjectURL(new Blob([w],{type:"text/javascript"}))),r}}a("shared",["exports"],function(d){function o(u,s,c,f){return new(c||(c=Promise))(function(g,b){function x(R){try{I(f.next(R))}catch(D){b(D)}}function C(R){try{I(f.throw(R))}catch(D){b(D)}}function I(R){var D;R.done?g(R.value):(D=R.value,D instanceof c?D:new c(function(B){B(D)})).then(x,C)}I((f=f.apply(u,s||[])).next())})}function y(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var w,T;function k(){if(T)return w;function u(s,c){this.x=s,this.y=c}return T=1,w=u,u.prototype={clone:function(){return new u(this.x,this.y)},add:function(s){return this.clone()._add(s)},sub:function(s){return this.clone()._sub(s)},multByPoint:function(s){return this.clone()._multByPoint(s)},divByPoint:function(s){return this.clone()._divByPoint(s)},mult:function(s){return this.clone()._mult(s)},div:function(s){return this.clone()._div(s)},rotate:function(s){return this.clone()._rotate(s)},rotateAround:function(s,c){return this.clone()._rotateAround(s,c)},matMult:function(s){return this.clone()._matMult(s)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(s){return this.x===s.x&&this.y===s.y},dist:function(s){return Math.sqrt(this.distSqr(s))},distSqr:function(s){var c=s.x-this.x,f=s.y-this.y;return c*c+f*f},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(s){return Math.atan2(this.y-s.y,this.x-s.x)},angleWith:function(s){return this.angleWithSep(s.x,s.y)},angleWithSep:function(s,c){return Math.atan2(this.x*c-this.y*s,this.x*s+this.y*c)},_matMult:function(s){var c=s[2]*this.x+s[3]*this.y;return this.x=s[0]*this.x+s[1]*this.y,this.y=c,this},_add:function(s){return this.x+=s.x,this.y+=s.y,this},_sub:function(s){return this.x-=s.x,this.y-=s.y,this},_mult:function(s){return this.x*=s,this.y*=s,this},_div:function(s){return this.x/=s,this.y/=s,this},_multByPoint:function(s){return this.x*=s.x,this.y*=s.y,this},_divByPoint:function(s){return this.x/=s.x,this.y/=s.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var s=this.y;return this.y=this.x,this.x=-s,this},_rotate:function(s){var c=Math.cos(s),f=Math.sin(s),g=f*this.x+c*this.y;return this.x=c*this.x-f*this.y,this.y=g,this}
74,_rotateAround:function(s,c){var f=Math.cos(s),g=Math.sin(s),b=c.y+g*(this.x-c.x)+f*(this.y-c.y);return this.x=c.x+f*(this.x-c.x)-g*(this.y-c.y),this.y=b,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},u.convert=function(s){return s instanceof u?s:Array.isArray(s)?new u(s[0],s[1]):s},w}typeof SuppressedError=="function"&&SuppressedError;var M,P,L=y(k()),O=function(){if(P)return M;function u(s,c,f,g){this.cx=3*s,this.bx=3*(f-s)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*c,this.by=3*(g-c)-this.cy,this.ay=1-this.cy-this.by,this.p1x=s,this.p1y=c,this.p2x=f,this.p2y=g}return P=1,M=u,u.prototype={sampleCurveX:function(s){return((this.ax*s+this.bx)*s+this.cx)*s},sampleCurveY:function(s){return((this.ay*s+this.by)*s+this.cy)*s},sampleCurveDerivativeX:function(s){return(3*this.ax*s+2*this.bx)*s+this.cx},solveCurveX:function(s,c){if(c===void 0&&(c=1e-6),s<0)return 0;if(s>1)return 1;for(var f=s,g=0;g<8;g++){var b=this.sampleCurveX(f)-s;if(Math.abs(b)<c)return f;var x=this.sampleCurveDerivativeX(f);if(Math.abs(x)<1e-6)break;f-=b/x}var C=0,I=1;for(f=s,g=0;g<20&&(b=this.sampleCurveX(f),!(Math.abs(b-s)<c));g++)s>b?C=f:I=f,f=.5*(I-C)+C;return f},solve:function(s,c){return this.sampleCurveY(this.solveCurveX(s,c))}},M}(),$=y(O);let Z,J;function H(){return Z==null&&(Z=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),Z}function U(){if(J==null&&(J=!1,H())){const s=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(s){for(let f=0;f<5*5;f++){const g=4*f;s.fillStyle=`rgb(${g},${g+1},${g+2})`,s.fillRect(f%5,Math.floor(f/5),1,1)}const c=s.getImageData(0,0,5,5).data;for(let f=0;f<5*5*4;f++)if(f%4!=3&&c[f]!==f){J=!0;break}}}return J||!1}var V=1e-6,te=typeof Float32Array<"u"?Float32Array:Array;function ce(){var u=new te(9);return te!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[5]=0,u[6]=0,u[7]=0),u[0]=1,u[4]=1,u[8]=1,u}function fe(u){return u[0]=1,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u}function Se(){var u=new te(3);return te!=Float32Array&&(u[0]=0,u[1]=0,u[2]=0),u}function xe(u){return Math.hypot(u[0],u[1],u[2])}function et(u,s,c){var f=new te(3);return f[0]=u,f[1]=s,f[2]=c,f}function ze(u,s,c){return u[0]=s[0]+c[0],u[1]=s[1]+c[1],u[2]=s[2]+c[2],u}function Ze(u,s,c){return u[0]=s[0]*c,u[1]=s[1]*c,u[2]=s[2]*c,u}function tt(u,s,c){var f=s[0],g=s[1],b=s[2],x=c[0],C=c[1],I=c[2];return u[0]=g*I-b*C,u[1]=b*x-f*I,u[2]=f*C-g*x,u}Math.hypot||(Math.hypot=function(){for(var u=0,s=arguments.length;s--;)u+=arguments[s]*arguments[s];return Math.sqrt(u)});var at,Pe=xe;function He(u,s,c){var f=s[0],g=s[1],b=s[2],x=s[3];return u[0]=c[0]*f+c[4]*g+c[8]*b+c[12]*x,u[1]=c[1]*f+c[5]*g+c[9]*b+c[13]*x,u[2]=c[2]*f+c[6]*g+c[10]*b+c[14]*x,u[3]=c[3]*f+c[7]*g+c[11]*b+c[15]*x,u}function Oe(){var u=new te(4);return te!=Float32Array&&(u[0]=0,u[1]=0,u[2]=0),u[3]=1,u}function lt(u,s,c,f){var g=.5*Math.PI/180;s*=g,c*=g,f*=g;var b=Math.sin(s),x=Math.cos(s),C=Math.sin(c),I=Math.cos(c),R=Math.sin(f),D=Math.cos(f);return u[0]=b*I*D-x*C*R,u[1]=x*C*D+b*I*R,u[2]=x*I*R-b*C*D,u[3]=x*I*D+b*C*R,u}function Pt(){var u=new te(2);return te!=Float32Array&&(u[0]=0,u[1]=0),u}function Yt(u,s){var c=new te(2);return c[0]=u,c[1]=s,c}Se(),at=new te(4),te!=Float32Array&&(at[0]=0,at[1]=0,at[2]=0,at[3]=0),Se(),et(1,0,0),et(0,1,0),Oe(),Oe(),ce(),Pt();const xt=8192;function tr(u,s,c){return s*(xt/(u.tileSize*Math.pow(2,c-u.tileID.overscaledZ)))}function lr(u,s){return(u%s+s)%s}function Or(u,s,c){return u*(1-c)+s*c}function zr(u){if(u<=0)return 0;if(u>=1)return 1;const s=u*u,c=s*u;return 4*(u<.5?c:3*(u-s)+c-.75)}function Je(u,s,c,f){const g=new $(u,s,c,f);return b=>g.solve(b)}const At=Je(.25,.1,.25,1);function _t(u,s,c){return Math.min(c,Math.max(s,u))}function pt(u,s,c){const f=c-s,g=((u-s)%f+f)%f+s;return g===s?c:g}function Nt(u,...s){for(const c of s)for(const f in c)u[f]=c[f];return u}let rr=1;function ue(u,s,c){const f={};for(const g in u)f[g]=s.call(this,u[g],g,u);return f}function me(u,s,c){const f={};for(const g in u)s.call(this,u[g],g,u)&&(f[g]=u[g]);return f}function je(u){return Array.isArray(u)?u.map(je):typeof u=="object"&&u?ue(u,je):u}const ft={};function Xe(u){ft[u]||(typeof console<"u"&&console.warn(u),ft[u]=!0)}function dt(u,s,c){return(c.y-u.y)*(s.x-u.x)>(s.y-u.y)*(c.x-u.x)}function Ee(u){return typeof WorkerGlobalScope<"u"&&u!==void 0&&u instanceof WorkerGlobalScope}let Fe=null;function Ke(u){return typeof ImageBitmap<"u"&&u instanceof ImageBitmap}const nt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function St(u,s,c,f,g){return o(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const b=new VideoFrame(u,{timestamp:0});try{const x=b==null?void 0:b.format;if(!x||!x.startsWith("BGR")&&!x.startsWith("RGB"))throw new Error(`Unrecognized format ${x}`);const C=x.startsWith("BGR"),I=new Uint8ClampedArray(f*g*4);if(yield b.copyTo(I,function(R,D,B,q,K){const X=4*Math.max(1,0),ee=(Math.max(0,B)-B)*q*4+X,ie=4*q,he=Math.max(0,D),Ie=Math.max(0,B);return{rect:{x:he,y:Ie,width:Math.min(R.width,D+q)-he,height:Math.min(R.height,B+K)-Ie},layout:[{offset:ee,stride:ie}]}}(u,s,c,f,g)),C)for(let R=0;R<I.length;R+=4){const D=I[R];I[R]=I[R+2],I[R+2]=D}return I}finally{b.close()}})}let mt,Lt;function Gt(u,s,c,f){return u.addEventListener(s,c,f),{unsubscribe:()=>{u.removeEventListener(s,c,f)}}}function Qt(u){return u*Math.PI/180}function cr(u){return u/Math.PI*180}const Ir={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0}
vendor: 4,787 bytes, line 74
74,Ln={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},un="AbortError";function Me(){return new Error(un)}const Q={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function re(u){return Q.REGISTERED_PROTOCOLS[u.substring(0,u.indexOf("://"))]}const se="global-dispatcher";class pe extends Error{constructor(s,c,f,g){super(`AJAXError: ${c} (${s}): ${f}`),this.status=s,this.statusText=c,this.url=f,this.body=g}}const Te=()=>Ee(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Le=function(u,s){if(/:\/\//.test(u.url)&&!/^https?:|^file:/.test(u.url)){const f=re(u.url);if(f)return f(u,s);if(Ee(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,targetMapId:se},s)}if(!(/^file:/.test(c=u.url)||/^file:/.test(Te())&&!/^\w+:/.test(c))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(f,g){return o(this,void 0,void 0,function*(){const b=new Request(f.url,{method:f.method||"GET",body:f.body,credentials:f.credentials,headers:f.headers,cache:f.cache,referrer:Te(),signal:g.signal});let x,C;f.type!=="json"||b.headers.has("Accept")||b.headers.set("Accept","application/json");try{x=yield fetch(b)}catch(R){throw new pe(0,R.message,f.url,new Blob)}if(!x.ok){const R=yield x.blob();throw new pe(x.status,x.statusText,f.url,R)}C=f.type==="arrayBuffer"||f.type==="image"?x.arrayBuffer():f.type==="json"?x.json():x.text();const I=yield C;if(g.signal.aborted)throw Me();return{data:I,cacheControl:x.headers.get("Cache-Control"),expires:x.headers.get("Expires")}})}(u,s);if(Ee(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,mustQueue:!0,targetMapId:se},s)}var c;return function(f,g){return new Promise((b,x)=>{var C;const I=new XMLHttpRequest;I.open(f.method||"GET",f.url,!0),f.type!=="arrayBuffer"&&f.type!=="image"||(I.responseType="arraybuffer");for(const R in f.headers)I.setRequestHeader(R,f.headers[R]);f.type==="json"&&(I.responseType="text",!((C=f.headers)===null||C===void 0)&&C.Accept||I.setRequestHeader("Accept","application/json")),I.withCredentials=f.credentials==="include",I.onerror=()=>{x(new Error(I.statusText))},I.onload=()=>{if(!g.signal.aborted)if((I.status>=200&&I.status<300||I.status===0)&&I.response!==null){let R=I.response;if(f.type==="json")try{R=JSON.parse(I.response)}catch(D){return void x(D)}b({data:R,cacheControl:I.getResponseHeader("Cache-Control"),expires:I.getResponseHeader("Expires")})}else{const R=new Blob([I.response],{type:I.getResponseHeader("Content-Type")});x(new pe(I.status,I.statusText,f.url,R))}},g.signal.addEventListener("abort",()=>{I.abort(),x(Me())}),I.send(f.body)})}(u,s)};function Ue(u){if(!u||u.indexOf("://")<=0||u.indexOf("data:image/")===0||u.indexOf("blob:")===0)return!0;const s=new URL(u),c=window.location;return s.protocol===c.protocol&&s.host===c.host}function Re(u,s,c){c[u]&&c[u].indexOf(s)!==-1||(c[u]=c[u]||[],c[u].push(s))}function Qe(u,s,c){if(c&&c[u]){const f=c[u].indexOf(s);f!==-1&&c[u].splice(f,1)}}class We{constructor(s,c={}){Nt(this,c),this.type=s}}class De extends We{constructor(s,c={}){super("error",Nt({error:s},c))}}class st{on(s,c){return this._listeners=this._listeners||{},Re(s,c,this._listeners),{unsubscribe:()=>{this.off(s,c)}}}off(s,c){return Qe(s,c,this._listeners),Qe(s,c,this._oneTimeListeners),this}once(s,c){return c?(this._oneTimeListeners=this._oneTimeListeners||{},Re(s,c,this._oneTimeListeners),this):new Promise(f=>this.once(s,f))}fire(s,c){typeof s=="string"&&(s=new We(s,c||{}));const f=s.type;if(this.listens(f)){s.target=this;const g=this._listeners&&this._listeners[f]?this._listeners[f].slice():[];for(const C of g)C.call(this,s);const b=this._oneTimeListeners&&this._oneTimeListeners[f]?this._oneTimeListeners[f].slice():[];for(const C of b)Qe(f,C,this._oneTimeListeners),C.call(this,s);const x=this._eventedParent;x&&(Nt(s,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),x.fire(s))}else s instanceof De&&console.error(s.error);return this}listens(s){return this._listeners&&this._listeners[s]&&this._listeners[s].length>0||this._oneTimeListeners&&this._oneTimeListeners[s]&&this._oneTimeListeners[s].length>0||this._eventedParent&&this._eventedParent.listens(s)}setEventedParent(s,c){return this._eventedParent=s,this._eventedParentData=c,this}}var ke={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},centerAltitude:{type:"number"},zoom:{type:"number"}
vendor: 1,010 bytes, line 74
74,bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1
vendor: 20,289 bytes, line 74
74},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}
vendor: 7,960 bytes, line 74
74,"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number
74Array",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const Et=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Xt(u,s){const c={};for(const f in u)f!=="ref"&&(c[f]=u[f]);return Et.forEach(f=>{f in s&&(c[f]=s[f])}),c}function Rt(u,s){if(Array.isArray(u)){if(!Array.isArray(s)||u.length!==s.length)return!1;for(let c=0;c<u.length;c++)if(!Rt(u[c],s[c]))return!1;return!0}if(typeof u=="object"&&u!==null&&s!==null){if(typeof s!="object"||Object.keys(u).length!==Object.keys(s).length)return!1;for(const c in u)if(!Rt(u[c],s[c]))return!1;return!0}return u===s}function jt(u,s){u.push(s)}function nr(u,s,c){jt(c,{command:"addSource",args:[u,s[u]]})}function on(u,s,c){jt(s,{command:"removeSource",args:[u]}),c[u]=!0}function Wr(u,s,c,f){on(u,c,f),nr(u,s,c)}function Fr(u,s,c){let f;for(f in u[c])if(Object.prototype.hasOwnProperty.call(u[c],f)&&f!=="data"&&!Rt(u[c][f],s[c][f]))return!1;for(f in s[c])if(Object.prototype.hasOwnProperty.call(s[c],f)&&f!=="data"&&!Rt(u[c][f],s[c][f]))return!1;return!0}function er(u,s,c,f,g,b){u=u||{},s=s||{};for(const x in u)Object.prototype.hasOwnProperty.call(u,x)&&(Rt(u[x],s[x])||c.push({command:b,args:[f,x,s[x],g]}));for(const x in s)Object.prototype.hasOwnProperty.call(s,x)&&!Object.prototype.hasOwnProperty.call(u,x)&&(Rt(u[x],s[x])||c.push({command:b,args:[f,x,s[x],g]}))}function Cr(u){return u.id}function Jn(u,s){return u[s.id]=s,u}class vt{constructor(s,c,f,g){this.message=(s?`${s}: `:"")+f,g&&(this.identifier=g),c!=null&&c.__line__&&(this.line=c.__line__)}}function ui(u,...s){for(const c of s)for(const f in c)u[f]=c[f];return u}
vendor: 36,040 bytes, line 74
74class yn extends Error{constructor(s,c){super(c),this.message=c,this.key=s}}class Ho{constructor(s,c=[]){this.parent=s,this.bindings={};for(const[f,g]of c)this.bindings[f]=g}concat(s){return new Ho(this,s)}get(s){if(this.bindings[s])return this.bindings[s];if(this.parent)return this.parent.get(s);throw new Error(`${s} not found in scope.`)}has(s){return!!this.bindings[s]||!!this.parent&&this.parent.has(s)}}const ka={kind:"null"},Tt={kind:"number"},fr={kind:"string"},pr={kind:"boolean"},ts={kind:"color"},rh={kind:"projectionDefinition"},qs={kind:"object"},mr={kind:"value"},ho={kind:"collator"},Ia={kind:"formatted"},Bn={kind:"padding"},Tc={kind:"colorArray"},Cc={kind:"numberArray"},fo={kind:"resolvedImage"},Ec={kind:"variableAnchorOffsetCollection"};function rs(u,s){return{kind:"array",itemType:u,N:s}}function _n(u){if(u.kind==="array"){const s=_n(u.itemType);return typeof u.N=="number"?`array<${s}, ${u.N}>`:u.itemType.kind==="value"?"array":`array<${s}>`}return u.kind}const pg=[ka,Tt,fr,pr,ts,rh,Ia,qs,rs(mr),Bn,Cc,Tc,fo,Ec];function kc(u,s){if(s.kind==="error")return null;if(u.kind==="array"){if(s.kind==="array"&&(s.N===0&&s.itemType.kind==="value"||!kc(u.itemType,s.itemType))&&(typeof u.N!="number"||u.N===s.N))return null}else{if(u.kind===s.kind)return null;if(u.kind==="value"){for(const c of pg)if(!kc(c,s))return null}}return`Expected ${_n(u)} but found ${_n(s)} instead.`}function nh(u,s){return s.some(c=>c.kind===u.kind)}function Pa(u,s){return s.some(c=>c==="null"?u===null:c==="array"?Array.isArray(u):c==="object"?u&&!Array.isArray(u)&&typeof u=="object":c===typeof u)}function Zo(u,s){return u.kind==="array"&&s.kind==="array"?u.itemType.kind===s.itemType.kind&&typeof u.N=="number":u.kind===s.kind}const mg=.96422,gg=.82521,yg=4/29,ml=6/29,_g=3*ml*ml,vg=ml*ml*ml,Ic=Math.PI/180,x0=180/Math.PI;function bg(u){return(u%=360)<0&&(u+=360),u}function gl([u,s,c,f]){let g,b;const x=pf((.2225045*(u=ff(u))+.7168786*(s=ff(s))+.0606169*(c=ff(c)))/1);u===s&&s===c?g=b=x:(g=pf((.4360747*u+.3850649*s+.1430804*c)/mg),b=pf((.0139322*u+.0971045*s+.7141733*c)/gg));const C=116*x-16;return[C<0?0:C,500*(g-x),200*(x-b),f]}function ff(u){return u<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function pf(u){return u>vg?Math.pow(u,1/3):u/_g+yg}function xg([u,s,c,f]){let g=(u+16)/116,b=isNaN(s)?g:g+s/500,x=isNaN(c)?g:g-c/200;return g=1*sh(g),b=mg*sh(b),x=gg*sh(x),[ih(3.1338561*b-1.6168667*g-.4906146*x),ih(-.9787684*b+1.9161415*g+.033454*x),ih(.0719453*b-.2289914*g+1.4052427*x),f]}function ih(u){return(u=u<=.00304?12.92*u:1.055*Math.pow(u,1/2.4)-.055)<0?0:u>1?1:u}function sh(u){return u>ml?u*u*u:_g*(u-yg)}const Gs=Object.hasOwn||function(u,s){return Object.prototype.hasOwnProperty.call(u,s)};function _r(u,s){return Gs(u,s)?u[s]:void 0}function po(u){return parseInt(u.padEnd(2,u),16)/255}function mo(u,s){return Aa(s?u/100:u,0,1)}function Aa(u,s,c){return Math.min(Math.max(s,u),c)}function mf(u){return!u.some(Number.isNaN)}const gf={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function gs(u,s,c){return u+c*(s-u)}function go(u,s,c){return u.map((f,g)=>gs(f,s[g],c))}class vr{constructor(s,c,f,g=1,b=!0){this.r=s,this.g=c,this.b=f,this.a=g,b||(this.r*=g,this.g*=g,this.b*=g,g||this.overwriteGetter("rgb",[s,c,f,g]))}static parse(s){if(s instanceof vr)return s;if(typeof s!="string")return;const c=function(f){if((f=f.toLowerCase().trim())==="transparent")return[0,0,0,0];const g=_r(gf,f);if(g){const[x,C,I]=g;return[x/255,C/255,I/255,1]}if(f.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(f)){const x=f.length<6?1:2;let C=1;return[po(f.slice(C,C+=x)),po(f.slice(C,C+=x)),po(f.slice(C,C+=x)),po(f.slice(C,C+x)||"ff")]}if(f.startsWith("rgb")){const x=f.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(x){const[C,I,R,D,B,q,K,X,ee,ie,he,Ie]=x,_e=[D||" ",K||" ",ie].join("");if(_e==="  "||_e==="  /"||_e===",,"||_e===",,,"){const W=[R,q,ee].join(""),ne=W==="%%%"?100:W===""?255:0;if(ne){const be=[Aa(+I/ne,0,1),Aa(+B/ne,0,1),Aa(+X/ne,0,1),he?mo(+he,Ie):1];if(mf(be))return be}}return}}const b=f.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(b){const[x,C,I,R,D,B,q,K,X]=b,ee=[I||" ",D||" ",q].join("");if(ee==="  "||ee==="  /"||ee===",,"||ee===",,,"){const ie=[+C,Aa(+R,0,100),Aa(+B,0,100),K?mo(+K,X):1];if(mf(ie))return function([he,Ie,_e,W]){function ne(be){const $e=(be+he/30)%12,ct=Ie*Math.min(_e,1-_e);return _e-ct*Math.max(-1,Math.min($e-3,9-$e,1))}return he=bg(he),Ie/=100,_e/=100,[ne(0),ne(8),ne(4),W]}(ie)}}}(s);return c?new vr(...c,!1):void 0}get rgb(){const{r:s,g:c,b:f,a:g}=this,b=g||1/0;return this.overwriteGetter("rgb",[s/b,c/b,f/b,g])}get hcl(){return this.overwriteGetter("hcl",function(s){const[c,f,g,b]=gl(s),x=Math.sqrt(f*f+g*g);return[Math.round(1e4*x)?bg(Math.atan2(g,f)*x0):NaN,x,c,b]}(this.rgb))}get lab(){return this.overwriteGetter("lab",gl(this.rgb))}overwriteGetter(s,c){return Object.defineProperty(this,s,{value:c}),c}toString(){const[s,c,f,g]=this.rgb;return`rgba(${[s,c,f].map(b=>Math.round(255*b)).join(",")},${g})`}static interpolate(s,c,f,g="rgb"){switch(g){case"rgb":{const[b,x,C,I]=go(s.rgb,c.rgb,f);return new vr(b,x,C,I,!1)}case"hcl":{const[b,x,C,I]=s.hcl,[R,D,B,q]=c.hcl;let K,X;if(isNaN(b)||isNaN(R))isNaN(b)?isNaN(R)?K=NaN:(K=R,C!==1&&C!==0||(X=D)):(K=b,B!==1&&B!==0||(X=x));else{let _e=R-b;R>b&&_e>180?_e-=360:R<b&&b-R>180&&(_e+=360),K=b+f*_e}const[ee,ie,he,Ie]=function([_e,W,ne,be]){return _e=isNaN(_e)?0:_e*Ic,xg([ne,Math.cos(_e)*W,Math.sin(_e)*W,be])}([K,X??gs(x,D,f),gs(C,B,f),gs(I,q,f)]);return new vr(ee,ie,he,Ie,!1)}case"lab":{const[b,x,C,I]=xg(go(s.lab,c.lab,f));return new vr(b,x,C,I,!1)}}}}vr.black=new vr(0,0,0,1),vr.white=new vr(1,1,1,1),vr.transparent=new vr(0,0,0,0),vr.red=new vr(1,0,0,1);class Pc{constructor(s,c,f){this.sensitivity=s?c?"variant":"case":c?"accent":"base",this.locale=f,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(s,c){return this.collator.compare(s,c)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const oh=["bottom","center","top"];class yf{constructor(s,c,f,g,b,x){this.text=s,this.image=c,this.scale=f,this.fontStack=g,this.textColor=b,this.verticalAlign=x}}class Ti{constructor(s){this.sections=s}static fromString(s){return new Ti([new yf(s,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(s=>s.text.length!==0||s.image&&s.image.name.length!==0)}static factory(s){return s instanceof Ti?s:Ti.fromString(s)}toString(){return this.sections.length===0?"":this.sections.map(s=>s.text).join("")}}class Un{constructor(s){this.values=s.slice()}static parse(s){if(s instanceof Un)return s;if(typeof s=="number")return new Un([s,s,s,s]);if(Array.isArray(s)&&!(s.length<1||s.length>4)){for(const c of s)if(typeof c!="number")return;switch(s.length){case 1:s=[s[0],s[0],s[0],s[0]];break;case 2:s=[s[0],s[1],s[0],s[1]];break;case 3:s=[s[0],s[1],s[2],s[1]]}return new Un(s)}}toString(){return JSON.stringify(this.values)}static interpolate(s,c,f){return new Un(go(s.values,c.values,f))}}class Ci{constructor(s){this.values=s.slice()}static parse(s){if(s instanceof Ci)return s;if(typeof s=="number")return new Ci([s]);if(Array.isArray(s)){for(const c of s)if(typeof c!="number")return;return new Ci(s)}}toString(){return JSON.stringify(this.values)}static interpolate(s,c,f){return new Ci(go(s.values,c.values,f))}}class Qn{constructor(s){this.values=s.slice()}static parse(s){if(s instanceof Qn)return s;if(typeof s=="string"){const f=vr.parse(s);return f?new Qn([f]):void 0}if(!Array.isArray(s))return;const c=[];for(const f of s){if(typeof f!="string")return;const g=vr.parse(f);if(!g)return;c.push(g)}return new Qn(c)}toString(){return JSON.stringify(this.values)}static interpolate(s,c,f,g="rgb"){const b=[];if(s.values.length!=c.values.length)throw new Error(`colorArray: Arrays have mismatched length (${s.values.length} vs. ${c.values.length}), cannot interpolate.`);for(let x=0;x<s.values.length;x++)b.push(vr.interpolate(s.values[x],c.values[x],f,g));return new Qn(b)}}class vn extends Error{constructor(s){super(s),this.name="RuntimeError"}toJSON(){return this.message}}const ah=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Er{constructor(s){this.values=s.slice()}static parse(s){if(s instanceof Er)return s;if(Array.isArray(s)&&!(s.length<1)&&s.length%2==0){for(let c=0;c<s.length;c+=2){const f=s[c],g=s[c+1];if(typeof f!="string"||!ah.has(f)||!Array.isArray(g)||g.length!==2||typeof g[0]!="number"||typeof g[1]!="number")return}return new Er(s)}}toString(){return JSON.stringify(this.values)}static interpolate(s,c,f){const g=s.values,b=c.values;if(g.length!==b.length)throw new vn(`Cannot interpolate values of different length. from: ${s.toString()}, to: ${c.toString()}`);const x=[];for(let C=0;C<g.length;C+=2){if(g[C]!==b[C])throw new vn(`Cannot interpolate values containing mismatched anchors. from[${C}]: ${g[C]}, to[${C}]: ${b[C]}`);x.push(g[C]);const[I,R]=g[C+1],[D,B]=b[C+1];x.push([gs(I,D,f),gs(R,B,f)])}return new Er(x)}}class Vi{constructor(s){this.name=s.name,this.available=s.available}toString(){return this.name}static fromString(s){return s?new Vi({name:s,available:!1}):null}}class or{constructor(s,c,f){this.from=s,this.to=c,this.transition=f}static interpolate(s,c,f){return new or(s,c,f)}static parse(s){return s instanceof or?s:Array.isArray(s)&&s.length===3&&typeof s[0]=="string"&&typeof s[1]=="string"&&typeof s[2]=="number"?new or(s[0],s[1],s[2]):typeof s=="object"&&typeof s.from=="string"&&typeof s.to=="string"&&typeof s.transition=="number"?new or(s.from,s.to,s.transition):typeof s=="string"?new or(s,s,1):void 0}}function ur(u,s,c,f){return typeof u=="number"&&u>=0&&u<=255&&typeof s=="number"&&s>=0&&s<=255&&typeof c=="number"&&c>=0&&c<=255?f===void 0||typeof f=="number"&&f>=0&&f<=1?null:`Invalid rgba value [${[u,s,c,f].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof f=="number"?[u,s,c,f]:[u,s,c]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Ma(u){if(u===null||typeof u=="string"||typeof u=="boolean"||typeof u=="number"||u instanceof or||u instanceof vr||u instanceof Pc||u instanceof Ti||u instanceof Un||u instanceof Ci||u instanceof Qn||u instanceof Er||u instanceof Vi)return!0;if(Array.isArray(u)){for(const s of u)if(!Ma(s))return!1;return!0}if(typeof u=="object"){for(const s in u)if(!Ma(u[s]))return!1;return!0}return!1}function Jt(u){if(u===null)return ka;if(typeof u=="string")return fr;if(typeof u=="boolean")return pr;if(typeof u=="number")return Tt;if(u instanceof vr)return ts;if(u instanceof or)return rh;if(u instanceof Pc)return ho;if(u instanceof Ti)return Ia;if(u instanceof Un)return Bn;if(u instanceof Ci)return Cc;if(u instanceof Qn)return Tc;if(u instanceof Er)return Ec;if(u instanceof Vi)return fo;if(Array.isArray(u)){const s=u.length;let c;for(const f of u){const g=Jt(f);if(c){if(c===g)continue;c=mr;break}c=g}return rs(c||mr,s)}return qs}function Ra(u){const s=typeof u;return u===null?"":s==="string"||s==="number"||s==="boolean"?String(u):u instanceof vr||u instanceof or||u instanceof Ti||u instanceof Un||u instanceof Ci||u instanceof Qn||u instanceof Er||u instanceof Vi?u.toString():JSON.stringify(u)}class Li{constructor(s,c){this.type=s,this.value=c}static parse(s,c){if(s.length!==2)return c.error(`'literal' expression requires exactly one argument, but found ${s.length-1} instead.`);if(!Ma(s[1]))return c.error("invalid value");const f=s[1];let g=Jt(f);const b=c.expectedType;return g.kind!=="array"||g.N!==0||!b||b.kind!=="array"||typeof b.N=="number"&&b.N!==0||(g=b),new Li(g,f)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const yl={string:fr,number:Tt,boolean:pr,object:qs};class ys{constructor(s,c){this.type=s,this.args=c}static parse(s,c){if(s.length<2)return c.error("Expected at least one argument.");let f,g=1;const b=s[0];if(b==="array"){let C,I;if(s.length>2){const R=s[1];if(typeof R!="string"||!(R in yl)||R==="object")return c.error('The item type argument of "array" must be one of string, number, boolean',1);C=yl[R],g++}else C=mr;if(s.length>3){if(s[2]!==null&&(typeof s[2]!="number"||s[2]<0||s[2]!==Math.floor(s[2])))return c.error('The length argument to "array" must be a positive integer literal',2);I=s[2],g++}f=rs(C,I)}else{if(!yl[b])throw new Error(`Types doesn't contain name = ${b}`);f=yl[b]}const x=[];for(;g<s.length;g++){const C=c.parse(s[g],g,mr);if(!C)return null;x.push(C)}return new ys(f,x)}evaluate(s){for(let c=0;c<this.args.length;c++){const f=this.args[c].evaluate(s);if(!kc(this.type,Jt(f)))return f;if(c===this.args.length-1)throw new vn(`Expected value to be of type ${_n(this.type)}, but found ${_n(Jt(f))} instead.`)}throw new Error}eachChild(s){this.args.forEach(s)}outputDefined(){return this.args.every(s=>s.outputDefined())}}const _f={"to-boolean":pr,"to-color":ts,"to-number":Tt,"to-string":fr};class Hs{constructor(s,c){this.type=s,this.args=c}static parse(s,c){if(s.length<2)return c.error("Expected at least one argument.");const f=s[0];if(!_f[f])throw new Error(`Can't parse ${f} as it is not part of the known types`);if((f==="to-boolean"||f==="to-string")&&s.length!==2)return c.error("Expected one argument.");const g=_f[f],b=[];for(let x=1;x<s.length;x++){const C=c.parse(s[x],x,mr);if(!C)return null;b.push(C)}return new Hs(g,b)}evaluate(s){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(s);case"color":{let c,f;for(const g of this.args){if(c=g.evaluate(s),f=null,c instanceof vr)return c;if(typeof c=="string"){const b=s.parseColor(c);if(b)return b}else if(Array.isArray(c)&&(f=c.length<3||c.length>4?`Invalid rgba value ${JSON.stringify(c)}: expected an array containing either three or four numeric values.`:ur(c[0],c[1],c[2],c[3]),!f))return new vr(c[0]/255,c[1]/255,c[2]/255,c[3])}throw new vn(f||`Could not parse color from value '${typeof c=="string"?c:JSON.stringify(c)}'`)}case"padding":{let c;for(const f of this.args){c=f.evaluate(s);const g=Un.parse(c);if(g)return g}throw new vn(`Could not parse padding from value '${typeof c=="string"?c:JSON.stringify(c)}'`)}case"numberArray":{let c;for(const f of this.args){c=f.evaluate(s);const g=Ci.parse(c);if(g)return g}throw new vn(`Could not parse numberArray from value '${typeof c=="string"?c:JSON.stringify(c)}'`)}case"colorArray":{let c;for(const f of this.args){c=f.evaluate(s);const g=Qn.parse(c);if(g)return g}throw new vn(`Could not parse colorArray from value '${typeof c=="string"?c:JSON.stringify(c)}'`)}case"variableAnchorOffsetCollection":{let c;for(const f of this.args){c=f.evaluate(s);const g=Er.parse(c);if(g)return g}throw new vn(`Could not parse variableAnchorOffsetCollection from value '${typeof c=="string"?c:JSON.stringify(c)}'`)}case"number":{let c=null;for(const f of this.args){if(c=f.evaluate(s),c===null)return 0;const g=Number(c);if(!isNaN(g))return g}throw new vn(`Could not convert ${JSON.stringify(c)} to number.`)}case"formatted":return Ti.fromString(Ra(this.args[0].evaluate(s)));case"resolvedImage":return Vi.fromString(Ra(this.args[0].evaluate(s)));case"projectionDefinition":return this.args[0].evaluate(s);default:return Ra(this.args[0].evaluate(s))}}eachChild(s){this.args.forEach(s)}outputDefined(){return this.args.every(s=>s.outputDefined())}}const wg=["Unknown","Point","LineString","Polygon"];class Sg{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?wg[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(s){let c=this._parseColorCache.get(s);return c||(c=vr.parse(s),this._parseColorCache.set(s,c)),c}}class Ac{constructor(s,c,f=[],g,b=new Ho,x=[]){this.registry=s,this.path=f,this.key=f.map(C=>`[${C}]`).join(""),this.scope=b,this.errors=x,this.expectedType=g,this._isConstant=c}parse(s,c,f,g,b={}){return c?this.concat(c,f,g)._parse(s,b):this._parse(s,b)}_parse(s,c){function f(g,b,x){return x==="assert"?new ys(b,[g]):x==="coerce"?new Hs(b,[g]):g}if(s!==null&&typeof s!="string"&&typeof s!="boolean"&&typeof s!="number"||(s=["literal",s]),Array.isArray(s)){if(s.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const g=s[0];if(typeof g!="string")return this.error(`Expression name must be a string, but found ${typeof g} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const b=this.registry[g];if(b){let x=b.parse(s,this);if(!x)return null;if(this.expectedType){const C=this.expectedType,I=x.type;if(C.kind!=="string"&&C.kind!=="number"&&C.kind!=="boolean"&&C.kind!=="object"&&C.kind!=="array"||I.kind!=="value"){if(C.kind==="projectionDefinition"&&["string","array"].includes(I.kind)||["color","formatted","resolvedImage"].includes(C.kind)&&["value","string"].includes(I.kind)||["padding","numberArray"].includes(C.kind)&&["value","number","array"].includes(I.kind)||C.kind==="colorArray"&&["value","string","array"].includes(I.kind)||C.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(I.kind))x=f(x,C,c.typeAnnotation||"coerce");else if(this.checkSubtype(C,I))return null}else x=f(x,C,c.typeAnnotation||"assert")}if(!(x instanceof Li)&&x.type.kind!=="resolvedImage"&&this._isConstant(x)){const C=new Sg;try{x=new Li(x.type,x.evaluate(C))}catch(I){return this.error(I.message),null}}return x}return this.error(`Unknown expression "${g}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(s===void 0?"'undefined' value invalid. Use null instead.":typeof s=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof s} instead.`)}concat(s,c,f){const g=typeof s=="number"?this.path.concat(s):this.path,b=f?this.scope.concat(f):this.scope;return new Ac(this.registry,this._isConstant,g,c||null,b,this.errors)}error(s,...c){const f=`${this.key}${c.map(g=>`[${g}]`).join("")}`;this.errors.push(new yn(f,s))}checkSubtype(s,c){const f=kc(s,c);return f&&this.error(f),f}}class Mc{constructor(s,c){this.type=c.type,this.bindings=[].concat(s),this.result=c}evaluate(s){return this.result.evaluate(s)}eachChild(s){for(const c of this.bindings)s(c[1]);s(this.result)}static parse(s,c){if(s.length<4)return c.error(`Expected at least 3 arguments, but found ${s.length-1} instead.`);const f=[];for(let b=1;b<s.length-1;b+=2){const x=s[b];if(typeof x!="string")return c.error(`Expected string, but found ${typeof x} instead.`,b);if(/[^a-zA-Z0-9_]/.test(x))return c.error("Variable names must contain only alphanumeric characters or '_'.",b);const C=c.parse(s[b+1],b+1);if(!C)return null;f.push([x,C])}const g=c.parse(s[s.length-1],s.length-1,c.expectedType,f);return g?new Mc(f,g):null}outputDefined(){return this.result.outputDefined()}}class Es{constructor(s,c){this.type=c.type,this.name=s,this.boundExpression=c}static parse(s,c){if(s.length!==2||typeof s[1]!="string")return c.error("'var' expression requires exactly one string literal argument.");const f=s[1];return c.scope.has(f)?new Es(f,c.scope.get(f)):c.error(`Unknown variable "${f}". Make sure "${f}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(s){return this.boundExpression.evaluate(s)}eachChild(){}outputDefined(){return!1}}class ei{constructor(s,c,f){this.type=s,this.index=c,this.input=f}static parse(s,c){if(s.length!==3)return c.error(`Expected 2 arguments, but found ${s.length-1} instead.`);const f=c.parse(s[1],1,Tt),g=c.parse(s[2],2,rs(c.expectedType||mr));return f&&g?new ei(g.type.itemType,f,g):null}evaluate(s){const c=this.index.evaluate(s),f=this.input.evaluate(s);if(c<0)throw new vn(`Array index out of bounds: ${c} < 0.`);if(c>=f.length)throw new vn(`Array index out of bounds: ${c} > ${f.length-1}.`);if(c!==Math.floor(c))throw new vn(`Array index must be an integer, but found ${c} instead.`);return f[c]}eachChild(s){s(this.index),s(this.input)}outputDefined(){return!1}}class _l{constructor(s,c){this.type=pr,this.needle=s,this.haystack=c}static parse(s,c){if(s.length!==3)return c.error(`Expected 2 arguments, but found ${s.length-1} instead.`);const f=c.parse(s[1],1,mr),g=c.parse(s[2],2,mr);return f&&g?nh(f.type,[pr,fr,Tt,ka,mr])?new _l(f,g):c.error(`Expected first argument to be of type boolean, string, number or null, but found ${_n(f.type)} instead`):null}evaluate(s){const c=this.needle.evaluate(s),f=this.haystack.evaluate(s);if(!f)return!1;if(!Pa(c,["boolean","string","number","null"]))throw new vn(`Expected first argument to be of type boolean, string, number or null, but found ${_n(Jt(c))} instead.`);if(!Pa(f,["string","array"]))throw new vn(`Expected second argument to be of type array or string, but found ${_n(Jt(f))} instead.`);return f.indexOf(c)>=0}eachChild(s){s(this.needle),s(this.haystack)}outputDefined(){return!0}}class Rc{constructor(s,c,f){this.type=Tt,this.needle=s,this.haystack=c,this.fromIndex=f}static parse(s,c){if(s.length<=2||s.length>=5)return c.error(`Expected 3 or 4 arguments, but found ${s.length-1} instead.`);const f=c.parse(s[1],1,mr),g=c.parse(s[2],2,mr);if(!f||!g)return null;if(!nh(f.type,[pr,fr,Tt,ka,mr]))return c.error(`Expected first argument to be of type boolean, string, number or null, but found ${_n(f.type)} instead`);if(s.length===4){const b=c.parse(s[3],3,Tt);return b?new Rc(f,g,b):null}return new Rc(f,g)}evaluate(s){const c=this.needle.evaluate(s),f=this.haystack.evaluate(s);if(!Pa(c,["boolean","string","number","null"]))throw new vn(`Expected first argument to be of type boolean, string, number or null, but found ${_n(Jt(c))} instead.`);let g;if(this.fromIndex&&(g=this.fromIndex.evaluate(s)),Pa(f,["string"])){const b=f.indexOf(c,g);return b===-1?-1:[...f.slice(0,b)].length}if(Pa(f,["array"]))return f.indexOf(c,g);throw new vn(`Expected second argument to be of type array or string, but found ${_n(Jt(f))} instead.`)}eachChild(s){s(this.needle),s(this.haystack),this.fromIndex&&s(this.fromIndex)}outputDefined(){return!1}}class vl{constructor(s,c,f,g,b,x){this.inputType=s,this.type=c,this.input=f,this.cases=g,this.outputs=b,this.otherwise=x}static parse(s,c){if(s.length<5)return c.error(`Expected at least 4 arguments, but found only ${s.length-1}.`);if(s.length%2!=1)return c.error("Expected an even number of arguments.");let f,g;c.expectedType&&c.expectedType.kind!=="value"&&(g=c.expectedType);const b={},x=[];for(let R=2;R<s.length-1;R+=2){let D=s[R];const B=s[R+1];Array.isArray(D)||(D=[D]);const q=c.concat(R);if(D.length===0)return q.error("Expected at least one branch label.");for(const X of D){if(typeof X!="number"&&typeof X!="string")return q.error("Branch labels must be numbers or strings.");if(typeof X=="number"&&Math.abs(X)>Number.MAX_SAFE_INTEGER)return q.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof X=="number"&&Math.floor(X)!==X)return q.error("Numeric branch labels must be integer values.");if(f){if(q.checkSubtype(f,Jt(X)))return null}else f=Jt(X);if(b[String(X)]!==void 0)return q.error("Branch labels must be unique.");b[String(X)]=x.length}const K=c.parse(B,R,g);if(!K)return null;g=g||K.type,x.push(K)}const C=c.parse(s[1],1,mr);if(!C)return null;const I=c.parse(s[s.length-1],s.length-1,g);return I?C.type.kind!=="value"&&c.concat(1).checkSubtype(f,C.type)?null:new vl(f,g,C,b,x,I):null}evaluate(s){const c=this.input.evaluate(s);return(Jt(c)===this.inputType&&this.outputs[this.cases[c]]||this.otherwise).evaluate(s)}eachChild(s){s(this.input),this.outputs.forEach(s),s(this.otherwise)}outputDefined(){return this.outputs.every(s=>s.outputDefined())&&this.otherwise.outputDefined()}}class Vn{constructor(s,c,f){this.type=s,this.branches=c,this.otherwise=f}static parse(s,c){if(s.length<4)return c.error(`Expected at least 3 arguments, but found only ${s.length-1}.`);if(s.length%2!=0)return c.error("Expected an odd number of arguments.");let f;c.expectedType&&c.expectedType.kind!=="value"&&(f=c.expectedType);const g=[];for(let x=1;x<s.length-1;x+=2){const C=c.parse(s[x],x,pr);if(!C)return null;const I=c.parse(s[x+1],x+1,f);if(!I)return null;g.push([C,I]),f=f||I.type}const b=c.parse(s[s.length-1],s.length-1,f);if(!b)return null;if(!f)throw new Error("Can't infer output type");return new Vn(f,g,b)}evaluate(s){for(const[c,f]of this.branches)if(c.evaluate(s))return f.evaluate(s);return this.otherwise.evaluate(s)}eachChild(s){for(const[c,f]of this.branches)s(c),s(f);s(this.otherwise)}outputDefined(){return this.branches.every(([s,c])=>c.outputDefined())&&this.otherwise.outputDefined()}}class Lc{constructor(s,c,f,g){this.type=s,this.input=c,this.beginIndex=f,this.endIndex=g}static parse(s,c){if(s.length<=2||s.length>=5)return c.error(`Expected 3 or 4 arguments, but found ${s.length-1} instead.`);const f=c.parse(s[1],1,mr),g=c.parse(s[2],2,Tt);if(!f||!g)return null;if(!nh(f.type,[rs(mr),fr,mr]))return c.error(`Expected first argument to be of type array or string, but found ${_n(f.type)} instead`);if(s.length===4){const b=c.parse(s[3],3,Tt);return b?new Lc(f.type,f,g,b):null}return new Lc(f.type,f,g)}evaluate(s){const c=this.input.evaluate(s),f=this.beginIndex.evaluate(s);let g;if(this.endIndex&&(g=this.endIndex.evaluate(s)),Pa(c,["string"]))return[...c].slice(f,g).join("");if(Pa(c,["array"]))return c.slice(f,g);throw new vn(`Expected first argument to be of type array or string, but found ${_n(Jt(c))} instead.`)}eachChild(s){s(this.input),s(this.beginIndex),this.endIndex&&s(this.endIndex)}outputDefined(){return!1}}function bl(u,s){const c=u.length-1;let f,g,b=0,x=c,C=0;for(;b<=x;)if(C=Math.floor((b+x)/2),f=u[C],g=u[C+1],f<=s){if(C===c||s<g)return C;b=C+1}else{if(!(f>s))throw new vn("Input is not a number.");x=C-1}return 0}class xl{constructor(s,c,f){this.type=s,this.input=c,this.labels=[],this.outputs=[];for(const[g,b]of f)this.labels.push(g),this.outputs.push(b)}static parse(s,c){if(s.length-1<4)return c.error(`Expected at least 4 arguments, but found only ${s.length-1}.`);if((s.length-1)%2!=0)return c.error("Expected an even number of arguments.");const f=c.parse(s[1],1,Tt);if(!f)return null;const g=[];let b=null;c.expectedType&&c.expectedType.kind!=="value"&&(b=c.expectedType);for(let x=1;x<s.length;x+=2){const C=x===1?-1/0:s[x],I=s[x+1],R=x,D=x+1;if(typeof C!="number")return c.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',R);if(g.length&&g[g.length-1][0]>=C)return c.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',R);const B=c.parse(I,D,b);if(!B)return null;b=b||B.type,g.push([C,B])}return new xl(b,f,g)}evaluate(s){const c=this.labels,f=this.outputs;if(c.length===1)return f[0].evaluate(s);const g=this.input.evaluate(s);if(g<=c[0])return f[0].evaluate(s);const b=c.length;return g>=c[b-1]?f[b-1].evaluate(s):f[bl(c,g)].evaluate(s)}eachChild(s){s(this.input);for(const c of this.outputs)s(c)}outputDefined(){return this.outputs.every(s=>s.outputDefined())}}function w0(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var Wo,zc,vf=function(){if(zc)return Wo;function u(s,c,f,g){this.cx=3*s,this.bx=3*(f-s)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*c,this.by=3*(g-c)-this.cy,this.ay=1-this.cy-this.by,this.p1x=s,this.p1y=c,this.p2x=f,this.p2y=g}return zc=1,Wo=u,u.prototype={sampleCurveX:function(s){return((this.ax*s+this.bx)*s+this.cx)*s},sampleCurveY:function(s){return((this.ay*s+this.by)*s+this.cy)*s},sampleCurveDerivativeX:function(s){return(3*this.ax*s+2*this.bx)*s+this.cx},solveCurveX:function(s,c){if(c===void 0&&(c=1e-6),s<0)return 0;if(s>1)return 1;for(var f=s,g=0;g<8;g++){var b=this.sampleCurveX(f)-s;if(Math.abs(b)<c)return f;var x=this.sampleCurveDerivativeX(f);if(Math.abs(x)<1e-6)break;f-=b/x}var C=0,I=1;for(f=s,g=0;g<20&&(b=this.sampleCurveX(f),!(Math.abs(b-s)<c));g++)s>b?C=f:I=f,f=.5*(I-C)+C;return f},solve:function(s,c){return this.sampleCurveY(this.solveCurveX(s,c))}},Wo}(),S0=w0(vf);class zi{constructor(s,c,f,g,b){this.type=s,this.operator=c,this.interpolation=f,this.input=g,this.labels=[],this.outputs=[];for(const[x,C]of b)this.labels.push(x),this.outputs.push(C)}static interpolationFactor(s,c,f,g){let b=0;if(s.name==="exponential")b=wl(c,s.base,f,g);else if(s.name==="linear")b=wl(c,1,f,g);else if(s.name==="cubic-bezier"){const x=s.controlPoints;b=new S0(x[0],x[1],x[2],x[3]).solve(wl(c,1,f,g))}return b}static parse(s,c){let[f,g,b,...x]=s;if(!Array.isArray(g)||g.length===0)return c.error("Expected an interpolation type expression.",1);if(g[0]==="linear")g={name:"linear"};else if(g[0]==="exponential"){const R=g[1];if(typeof R!="number")return c.error("Exponential interpolation requires a numeric base.",1,1);g={name:"exponential",base:R}}else{if(g[0]!=="cubic-bezier")return c.error(`Unknown interpolation type ${String(g[0])}`,1,0);{const R=g.slice(1);if(R.length!==4||R.some(D=>typeof D!="number"||D<0||D>1))return c.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);g={name:"cubic-bezier",controlPoints:R}}}if(s.length-1<4)return c.error(`Expected at least 4 arguments, but found only ${s.length-1}.`);if((s.length-1)%2!=0)return c.error("Expected an even number of arguments.");if(b=c.parse(b,2,Tt),!b)return null;const C=[];let I=null;f!=="interpolate-hcl"&&f!=="interpolate-lab"||c.expectedType==Tc?c.expectedType&&c.expectedType.kind!=="value"&&(I=c.expectedType):I=ts;for(let R=0;R<x.length;R+=2){const D=x[R],B=x[R+1],q=R+3,K=R+4;if(typeof D!="number")return c.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',q);if(C.length&&C[C.length-1][0]>=D)return c.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',q);const X=c.parse(B,K,I);if(!X)return null;I=I||X.type,C.push([D,X])}return Zo(I,Tt)||Zo(I,rh)||Zo(I,ts)||Zo(I,Bn)||Zo(I,Cc)||Zo(I,Tc)||Zo(I,Ec)||Zo(I,rs(Tt))?new zi(I,f,g,b,C):c.error(`Type ${_n(I)} is not interpolatable.`)}evaluate(s){const c=this.labels,f=this.outputs;if(c.length===1)return f[0].evaluate(s);const g=this.input.evaluate(s);if(g<=c[0])return f[0].evaluate(s);const b=c.length;if(g>=c[b-1])return f[b-1].evaluate(s);const x=bl(c,g),C=zi.interpolationFactor(this.interpolation,g,c[x],c[x+1]),I=f[x].evaluate(s),R=f[x+1].evaluate(s);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return gs(I,R,C);case"color":return vr.interpolate(I,R,C);case"padding":return Un.interpolate(I,R,C);case"colorArray":return Qn.interpolate(I,R,C);case"numberArray":return Ci.interpolate(I,R,C);case"variableAnchorOffsetCollection":return Er.interpolate(I,R,C);case"array":return go(I,R,C);case"projectionDefinition":return or.interpolate(I,R,C)}case"interpolate-hcl":switch(this.type.kind){case"color":return vr.interpolate(I,R,C,"hcl");case"colorArray":return Qn.interpolate(I,R,C,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return vr.interpolate(I,R,C,"lab");case"colorArray":return Qn.interpolate(I,R,C,"lab")}}}eachChild(s){s(this.input);for(const c of this.outputs)s(c)}outputDefined(){return this.outputs.every(s=>s.outputDefined())}}function wl(u,s,c,f){const g=f-c,b=u-c;return g===0?0:s===1?b/g:(Math.pow(s,b)-1)/(Math.pow(s,g)-1)}const ns={color:vr.interpolate,number:gs,padding:Un.interpolate,numberArray:Ci.interpolate,colorArray:Qn.interpolate,variableAnchorOffsetCollection:Er.interpolate,array:go};class qi{constructor(s,c){this.type=s,this.args=c}static parse(s,c){if(s.length<2)return c.error("Expected at least one argument.");let f=null;const g=c.expectedType;g&&g.kind!=="value"&&(f=g);const b=[];for(const C of s.slice(1)){const I=c.parse(C,1+b.length,f,void 0,{typeAnnotation:"omit"});if(!I)return null;f=f||I.type,b.push(I)}if(!f)throw new Error("No output type");const x=g&&b.some(C=>kc(g,C.type));return new qi(x?mr:f,b)}evaluate(s){let c,f=null,g=0;for(const b of this.args)if(g++,f=b.evaluate(s),f&&f instanceof Vi&&!f.available&&(c||(c=f.name),f=null,g===this.args.length&&(f=c)),f!==null)break;return f}
74eachChild(s){this.args.forEach(s)}outputDefined(){return this.args.every(s=>s.outputDefined())}}function bf(u,s){return u==="=="||u==="!="?s.kind==="boolean"||s.kind==="string"||s.kind==="number"||s.kind==="null"||s.kind==="value":s.kind==="string"||s.kind==="number"||s.kind==="value"}function Dc(u,s,c,f){return f.compare(s,c)===0}function Sl(u,s,c){const f=u!=="=="&&u!=="!=";return class Mz{constructor(b,x,C){this.type=pr,this.lhs=b,this.rhs=x,this.collator=C,this.hasUntypedArgument=b.type.kind==="value"||x.type.kind==="value"}static parse(b,x){if(b.length!==3&&b.length!==4)return x.error("Expected two or three arguments.");const C=b[0];let I=x.parse(b[1],1,mr);if(!I)return null;if(!bf(C,I.type))return x.concat(1).error(`"${C}" comparisons are not supported for type '${_n(I.type)}'.`);let R=x.parse(b[2],2,mr);if(!R)return null;if(!bf(C,R.type))return x.concat(2).error(`"${C}" comparisons are not supported for type '${_n(R.type)}'.`);if(I.type.kind!==R.type.kind&&I.type.kind!=="value"&&R.type.kind!=="value")return x.error(`Cannot compare types '${_n(I.type)}' and '${_n(R.type)}'.`);f&&(I.type.kind==="value"&&R.type.kind!=="value"?I=new ys(R.type,[I]):I.type.kind!=="value"&&R.type.kind==="value"&&(R=new ys(I.type,[R])));let D=null;if(b.length===4){if(I.type.kind!=="string"&&R.type.kind!=="string"&&I.type.kind!=="value"&&R.type.kind!=="value")return x.error("Cannot use collator to compare non-string types.");if(D=x.parse(b[3],3,ho),!D)return null}return new Mz(I,R,D)}evaluate(b){const x=this.lhs.evaluate(b),C=this.rhs.evaluate(b);if(f&&this.hasUntypedArgument){const I=Jt(x),R=Jt(C);if(I.kind!==R.kind||I.kind!=="string"&&I.kind!=="number")throw new vn(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${I.kind}, ${R.kind}) instead.`)}if(this.collator&&!f&&this.hasUntypedArgument){const I=Jt(x),R=Jt(C);if(I.kind!=="string"||R.kind!=="string")return s(b,x,C)}return this.collator?c(b,x,C,this.collator.evaluate(b)):s(b,x,C)}eachChild(b){b(this.lhs),b(this.rhs),this.collator&&b(this.collator)}outputDefined(){return!0}}}const xf=Sl("==",function(u,s,c){return s===c},Dc),T0=Sl("!=",function(u,s,c){return s!==c},function(u,s,c,f){return!Dc(0,s,c,f)}),C0=Sl("<",function(u,s,c){return s<c},function(u,s,c,f){return f.compare(s,c)<0}),E0=Sl(">",function(u,s,c){return s>c},function(u,s,c,f){return f.compare(s,c)>0}),k0=Sl("<=",function(u,s,c){return s<=c},function(u,s,c,f){return f.compare(s,c)<=0}),lh=Sl(">=",function(u,s,c){return s>=c},function(u,s,c,f){return f.compare(s,c)>=0});class ch{constructor(s,c,f){this.type=ho,this.locale=f,this.caseSensitive=s,this.diacriticSensitive=c}static parse(s,c){if(s.length!==2)return c.error("Expected one argument.");const f=s[1];if(typeof f!="object"||Array.isArray(f))return c.error("Collator options argument must be an object.");const g=c.parse(f["case-sensitive"]!==void 0&&f["case-sensitive"],1,pr);if(!g)return null;const b=c.parse(f["diacritic-sensitive"]!==void 0&&f["diacritic-sensitive"],1,pr);if(!b)return null;let x=null;return f.locale&&(x=c.parse(f.locale,1,fr),!x)?null:new ch(g,b,x)}evaluate(s){return new Pc(this.caseSensitive.evaluate(s),this.diacriticSensitive.evaluate(s),this.locale?this.locale.evaluate(s):null)}eachChild(s){s(this.caseSensitive),s(this.diacriticSensitive),this.locale&&s(this.locale)}outputDefined(){return!1}}class uh{constructor(s,c,f,g,b){this.type=fr,this.number=s,this.locale=c,this.currency=f,this.minFractionDigits=g,this.maxFractionDigits=b}static parse(s,c){if(s.length!==3)return c.error("Expected two arguments.");const f=c.parse(s[1],1,Tt);if(!f)return null;const g=s[2];if(typeof g!="object"||Array.isArray(g))return c.error("NumberFormat options argument must be an object.");let b=null;if(g.locale&&(b=c.parse(g.locale,1,fr),!b))return null;let x=null;if(g.currency&&(x=c.parse(g.currency,1,fr),!x))return null;let C=null;if(g["min-fraction-digits"]&&(C=c.parse(g["min-fraction-digits"],1,Tt),!C))return null;let I=null;return g["max-fraction-digits"]&&(I=c.parse(g["max-fraction-digits"],1,Tt),!I)?null:new uh(f,b,x,C,I)}evaluate(s){return new Intl.NumberFormat(this.locale?this.locale.evaluate(s):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(s):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(s):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(s):void 0}).format(this.number.evaluate(s))}eachChild(s){s(this.number),this.locale&&s(this.locale),this.currency&&s(this.currency),this.minFractionDigits&&s(this.minFractionDigits),this.maxFractionDigits&&s(this.maxFractionDigits)}outputDefined(){return!1}}class Oc{constructor(s){this.type=Ia,this.sections=s}static parse(s,c){if(s.length<2)return c.error("Expected at least one argument.");const f=s[1];if(!Array.isArray(f)&&typeof f=="object")return c.error("First argument must be an image or text section.");const g=[];let b=!1;for(let x=1;x<=s.length-1;++x){const C=s[x];if(b&&typeof C=="object"&&!Array.isArray(C)){b=!1;let I=null;if(C["font-scale"]&&(I=c.parse(C["font-scale"],1,Tt),!I))return null;let R=null;if(C["text-font"]&&(R=c.parse(C["text-font"],1,rs(fr)),!R))return null;let D=null;
vendor: 16,164 bytes, line 74
74if(C["text-color"]&&(D=c.parse(C["text-color"],1,ts),!D))return null;let B=null;if(C["vertical-align"]){if(typeof C["vertical-align"]=="string"&&!oh.includes(C["vertical-align"]))return c.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${C["vertical-align"]}' instead.`);if(B=c.parse(C["vertical-align"],1,fr),!B)return null}const q=g[g.length-1];q.scale=I,q.font=R,q.textColor=D,q.verticalAlign=B}else{const I=c.parse(s[x],1,mr);if(!I)return null;const R=I.type.kind;if(R!=="string"&&R!=="value"&&R!=="null"&&R!=="resolvedImage")return c.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");b=!0,g.push({content:I,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Oc(g)}evaluate(s){return new Ti(this.sections.map(c=>{const f=c.content.evaluate(s);return Jt(f)===fo?new yf("",f,null,null,null,c.verticalAlign?c.verticalAlign.evaluate(s):null):new yf(Ra(f),null,c.scale?c.scale.evaluate(s):null,c.font?c.font.evaluate(s).join(","):null,c.textColor?c.textColor.evaluate(s):null,c.verticalAlign?c.verticalAlign.evaluate(s):null)}))}eachChild(s){for(const c of this.sections)s(c.content),c.scale&&s(c.scale),c.font&&s(c.font),c.textColor&&s(c.textColor),c.verticalAlign&&s(c.verticalAlign)}outputDefined(){return!1}}class wf{constructor(s){this.type=fo,this.input=s}static parse(s,c){if(s.length!==2)return c.error("Expected two arguments.");const f=c.parse(s[1],1,fr);return f?new wf(f):c.error("No image name provided.")}evaluate(s){const c=this.input.evaluate(s),f=Vi.fromString(c);return f&&s.availableImages&&(f.available=s.availableImages.indexOf(c)>-1),f}eachChild(s){s(this.input)}outputDefined(){return!1}}class hh{constructor(s){this.type=Tt,this.input=s}static parse(s,c){if(s.length!==2)return c.error(`Expected 1 argument, but found ${s.length-1} instead.`);const f=c.parse(s[1],1);return f?f.type.kind!=="array"&&f.type.kind!=="string"&&f.type.kind!=="value"?c.error(`Expected argument of type string or array, but found ${_n(f.type)} instead.`):new hh(f):null}evaluate(s){const c=this.input.evaluate(s);if(typeof c=="string")return[...c].length;if(Array.isArray(c))return c.length;throw new vn(`Expected value to be of type string or array, but found ${_n(Jt(c))} instead.`)}eachChild(s){s(this.input)}outputDefined(){return!1}}const Zs=8192;function I0(u,s){const c=(180+u[0])/360,f=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u[1]*Math.PI/360)))/360,g=Math.pow(2,s.z);return[Math.round(c*g*Zs),Math.round(f*g*Zs)]}function Sf(u,s){const c=Math.pow(2,s.z);return[(g=(u[0]/Zs+s.x)/c,360*g-180),(f=(u[1]/Zs+s.y)/c,360/Math.PI*Math.atan(Math.exp((180-360*f)*Math.PI/180))-90)];var f,g}function Fc(u,s){u[0]=Math.min(u[0],s[0]),u[1]=Math.min(u[1],s[1]),u[2]=Math.max(u[2],s[0]),u[3]=Math.max(u[3],s[1])}function Bc(u,s){return!(u[0]<=s[0]||u[2]>=s[2]||u[1]<=s[1]||u[3]>=s[3])}function Tg(u,s,c){const f=u[0]-s[0],g=u[1]-s[1],b=u[0]-c[0],x=u[1]-c[1];return f*x-b*g==0&&f*b<=0&&g*x<=0}function Nc(u,s,c,f){return(g=[f[0]-c[0],f[1]-c[1]])[0]*(b=[s[0]-u[0],s[1]-u[1]])[1]-g[1]*b[0]!=0&&!(!dh(u,s,c,f)||!dh(c,f,u,s));var g,b}function Cg(u,s,c){for(const f of c)for(let g=0;g<f.length-1;++g)if(Nc(u,s,f[g],f[g+1]))return!0;return!1}function Tl(u,s,c=!1){let f=!1;for(const C of s)for(let I=0;I<C.length-1;I++){if(Tg(u,C[I],C[I+1]))return c;(b=C[I])[1]>(g=u)[1]!=(x=C[I+1])[1]>g[1]&&g[0]<(x[0]-b[0])*(g[1]-b[1])/(x[1]-b[1])+b[0]&&(f=!f)}var g,b,x;return f}function P0(u,s){for(const c of s)if(Tl(u,c))return!0;return!1}function Eg(u,s){for(const c of u)if(!Tl(c,s))return!1;for(let c=0;c<u.length-1;++c)if(Cg(u[c],u[c+1],s))return!1;return!0}function A0(u,s){for(const c of s)if(Eg(u,c))return!0;return!1}function dh(u,s,c,f){const g=f[0]-c[0],b=f[1]-c[1],x=(u[0]-c[0])*b-g*(u[1]-c[1]),C=(s[0]-c[0])*b-g*(s[1]-c[1]);return x>0&&C<0||x<0&&C>0}function Tf(u,s,c){const f=[];for(let g=0;g<u.length;g++){const b=[];for(let x=0;x<u[g].length;x++){const C=I0(u[g][x],c);Fc(s,C),b.push(C)}f.push(b)}return f}function kg(u,s,c){const f=[];for(let g=0;g<u.length;g++){const b=Tf(u[g],s,c);f.push(b)}return f}function Ig(u,s,c,f){if(u[0]<c[0]||u[0]>c[2]){const g=.5*f;let b=u[0]-c[0]>g?-f:c[0]-u[0]>g?f:0;b===0&&(b=u[0]-c[2]>g?-f:c[2]-u[0]>g?f:0),u[0]+=b}Fc(s,u)}function Cf(u,s,c,f){const g=Math.pow(2,f.z)*Zs,b=[f.x*Zs,f.y*Zs],x=[];for(const C of u)for(const I of C){const R=[I.x+b[0],I.y+b[1]];Ig(R,s,c,g),x.push(R)}return x}function Ef(u,s,c,f){const g=Math.pow(2,f.z)*Zs,b=[f.x*Zs,f.y*Zs],x=[];for(const I of u){const R=[];for(const D of I){const B=[D.x+b[0],D.y+b[1]];Fc(s,B),R.push(B)}x.push(R)}if(s[2]-s[0]<=g/2){(C=s)[0]=C[1]=1/0,C[2]=C[3]=-1/0;for(const I of x)for(const R of I)Ig(R,s,c,g)}var C;return x}class La{constructor(s,c){this.type=pr,this.geojson=s,this.geometries=c}static parse(s,c){if(s.length!==2)return c.error(`'within' expression requires exactly one argument, but found ${s.length-1} instead.`);if(Ma(s[1])){const f=s[1];if(f.type==="FeatureCollection"){const g=[];for(const b of f.features){const{type:x,coordinates:C}=b.geometry;x==="Polygon"&&g.push(C),x==="MultiPolygon"&&g.push(...C)}if(g.length)return new La(f,{type:"MultiPolygon",coordinates:g})}else if(f.type==="Feature"){const g=f.geometry.type;if(g==="Polygon"||g==="MultiPolygon")return new La(f,f.geometry)}else if(f.type==="Polygon"||f.type==="MultiPolygon")return new La(f,f)}return c.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(s){if(s.geometry()!=null&&s.canonicalID()!=null){if(s.geometryType()==="Point")return function(c,f){const g=[1/0,1/0,-1/0,-1/0],b=[1/0,1/0,-1/0,-1/0],x=c.canonicalID();if(f.type==="Polygon"){const C=Tf(f.coordinates,b,x),I=Cf(c.geometry(),g,b,x);if(!Bc(g,b))return!1;for(const R of I)if(!Tl(R,C))return!1}if(f.type==="MultiPolygon"){const C=kg(f.coordinates,b,x),I=Cf(c.geometry(),g,b,x);if(!Bc(g,b))return!1;for(const R of I)if(!P0(R,C))return!1}return!0}(s,this.geometries);if(s.geometryType()==="LineString")return function(c,f){const g=[1/0,1/0,-1/0,-1/0],b=[1/0,1/0,-1/0,-1/0],x=c.canonicalID();if(f.type==="Polygon"){const C=Tf(f.coordinates,b,x),I=Ef(c.geometry(),g,b,x);if(!Bc(g,b))return!1;for(const R of I)if(!Eg(R,C))return!1}if(f.type==="MultiPolygon"){const C=kg(f.coordinates,b,x),I=Ef(c.geometry(),g,b,x);if(!Bc(g,b))return!1;for(const R of I)if(!A0(R,C))return!1}return!0}(s,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Pg=class{constructor(u=[],s=(c,f)=>c<f?-1:c>f?1:0){if(this.data=u,this.length=this.data.length,this.compare=s,this.length>0)for(let c=(this.length>>1)-1;c>=0;c--)this._down(c)}push(u){this.data.push(u),this._up(this.length++)}pop(){if(this.length===0)return;const u=this.data[0],s=this.data.pop();return--this.length>0&&(this.data[0]=s,this._down(0)),u}peek(){return this.data[0]}_up(u){const{data:s,compare:c}=this,f=s[u];for(;u>0;){const g=u-1>>1,b=s[g];if(c(f,b)>=0)break;s[u]=b,u=g}s[u]=f}_down(u){const{data:s,compare:c}=this,f=this.length>>1,g=s[u];for(;u<f;){let b=1+(u<<1);const x=b+1;if(x<this.length&&c(s[x],s[b])<0&&(b=x),c(s[b],g)>=0)break;s[u]=s[b],u=b}s[u]=g}};function kf(u,s,c=0,f=u.length-1,g=M0){for(;f>c;){if(f-c>600){const I=f-c+1,R=s-c+1,D=Math.log(I),B=.5*Math.exp(2*D/3),q=.5*Math.sqrt(D*B*(I-B)/I)*(R-I/2<0?-1:1);kf(u,s,Math.max(c,Math.floor(s-R*B/I+q)),Math.min(f,Math.floor(s+(I-R)*B/I+q)),g)}const b=u[s];let x=c,C=f;for(Cl(u,c,s),g(u[f],b)>0&&Cl(u,c,f);x<C;){for(Cl(u,x,C),x++,C--;g(u[x],b)<0;)x++;for(;g(u[C],b)>0;)C--}g(u[c],b)===0?Cl(u,c,C):(C++,Cl(u,C,f)),C<=s&&(c=C+1),s<=C&&(f=C-1)}}function Cl(u,s,c){const f=u[s];u[s]=u[c],u[c]=f}function M0(u,s){return u<s?-1:u>s?1:0}function fh(u,s){if(u.length<=1)return[u];const c=[];let f,g;for(const b of u){const x=Ag(b);x!==0&&(b.area=Math.abs(x),g===void 0&&(g=x<0),g===x<0?(f&&c.push(f),f=[b]):f.push(b))}if(f&&c.push(f),s>1)for(let b=0;b<c.length;b++)c[b].length<=s||(kf(c[b],s,1,c[b].length-1,R0),c[b]=c[b].slice(0,s));return c}function R0(u,s){return s.area-u.area}function Ag(u){let s=0;for(let c,f,g=0,b=u.length,x=b-1;g<b;x=g++)c=u[g],f=u[x],s+=(f.x-c.x)*(c.y+f.y);return s}const Mg=1/298.257223563,Rg=Mg*(2-Mg),Lg=Math.PI/180;class If{constructor(s){const c=6378.137*Lg*1e3,f=Math.cos(s*Lg),g=1/(1-Rg*(1-f*f)),b=Math.sqrt(g);this.kx=c*b*f,this.ky=c*b*g*(1-Rg)}distance(s,c){const f=this.wrap(s[0]-c[0])*this.kx,g=(s[1]-c[1])*this.ky;return Math.sqrt(f*f+g*g)}pointOnLine(s,c){let f,g,b,x,C=1/0;for(let I=0;I<s.length-1;I++){let R=s[I][0],D=s[I][1],B=this.wrap(s[I+1][0]-R)*this.kx,q=(s[I+1][1]-D)*this.ky,K=0;B===0&&q===0||(K=(this.wrap(c[0]-R)*this.kx*B+(c[1]-D)*this.ky*q)/(B*B+q*q),K>1?(R=s[I+1][0],D=s[I+1][1]):K>0&&(R+=B/this.kx*K,D+=q/this.ky*K)),B=this.wrap(c[0]-R)*this.kx,q=(c[1]-D)*this.ky;const X=B*B+q*q;X<C&&(C=X,f=R,g=D,b=I,x=K)}return{point:[f,g],index:b,t:Math.max(0,Math.min(1,x))}}wrap(s){for(;s<-180;)s+=360;for(;s>180;)s-=360;return s}}function $r(u,s){return s[0]-u[0]}function ph(u){return u[1]-u[0]+1}function yo(u,s){return u[1]>=u[0]&&u[1]<s}function Pf(u,s){if(u[0]>u[1])return[null,null];const c=ph(u);if(s){if(c===2)return[u,null];const g=Math.floor(c/2);return[[u[0],u[0]+g],[u[0]+g,u[1]]]}if(c===1)return[u,null];const f=Math.floor(c/2)-1;return[[u[0],u[0]+f],[u[0]+f+1,u[1]]]}function Af(u,s){if(!yo(s,u.length))return[1/0,1/0,-1/0,-1/0];const c=[1/0,1/0,-1/0,-1/0];for(let f=s[0];f<=s[1];++f)Fc(c,u[f]);return c}function Mf(u){const s=[1/0,1/0,-1/0,-1/0];for(const c of u)for(const f of c)Fc(s,f);return s}function zg(u){return u[0]!==-1/0&&u[1]!==-1/0&&u[2]!==1/0&&u[3]!==1/0}function Rf(u,s,c){if(!zg(u)||!zg(s))return NaN;let f=0,g=0;return u[2]<s[0]&&(f=s[0]-u[2]),u[0]>s[2]&&(f=u[0]-s[2]),u[1]>s[3]&&(g=u[1]-s[3]),u[3]<s[1]&&(g=s[1]-u[3]),c.distance([0,0],[f,g])}function za(u,s,c){const f=c.pointOnLine(s,u);return c.distance(u,f.point)}function Lf(u,s,c,f,g){const b=Math.min(za(u,[c,f],g),za(s,[c,f],g)),x=Math.min(za(c,[u,s],g),za(f,[u,s],g));return Math.min(b,x)}function L0(u,s,c,f,g){if(!yo(s,u.length)||!yo(f,c.length))return 1/0;let b=1/0;for(let x=s[0];x<s[1];++x){const C=u[x],I=u[x+1];for(let R=f[0];R<f[1];++R){const D=c[R],B=c[R+1];if(Nc(C,I,D,B))return 0;b=Math.min(b,Lf(C,I,D,B,g))}}return b}function z0(u,s,c,f,g){if(!yo(s,u.length)||!yo(f,c.length))return NaN;let b=1/0;for(let x=s[0];x<=s[1];++x)for(let C=f[0];C<=f[1];++C)if(b=Math.min(b,g.distance(u[x],c[C])),b===0)return b;return b}function D0(u,s,c){if(Tl(u,s,!0))return 0;let f=1/0;for(const g of s){const b=g[0],x=g[g.length-1];if(b!==x&&(f=Math.min(f,za(u,[x,b],c)),f===0))return f;const C=c.pointOnLine(g,u);if(f=Math.min(f,c.distance(u,C.point)),f===0)return f}return f}function O0(u,s,c,f){if(!yo(s,u.length))return NaN;for(let b=s[0];b<=s[1];++b)if(Tl(u[b],c,!0))return 0;let g=1/0;for(let b=s[0];b<s[1];++b){const x=u[b],C=u[b+1];for(const I of c)for(let R=0,D=I.length,B=D-1;R<D;B=R++){const q=I[B],K=I[R];if(Nc(x,C,q,K))return 0;g=Math.min(g,Lf(x,C,q,K,f))}}return g}function Dg(u,s){for(const c of u)for(const f of c)if(Tl(f,s,!0))return!0;return!1}function F0(u,s,c,f=1/0){const g=Mf(u),b=Mf(s);if(f!==1/0&&Rf(g,b,c)>=f)return f;if(Bc(g,b)){if(Dg(u,s))return 0}else if(Dg(s,u))return 0;let x=1/0;for(const C of u)for(let I=0,R=C.length,D=R-1;I<R;D=I++){const B=C[D],q=C[I];for(const K of s)for(let X=0,ee=K.length,ie=ee-1;X<ee;ie=X++){const he=K[ie],Ie=K[X];if(Nc(B,q,he,Ie))return 0;x=Math.min(x,Lf(B,q,he,Ie,c))}}return x}function Og(u,s,c,f,g,b){if(!b)return;const x=Rf(Af(f,b),g,c);x<s&&u.push([x,b,[0,0]])}function mh(u,s,c,f,g,b,x){if(!b||!x)return;const C=Rf(Af(f,b),Af(g,x),c);C<s&&u.push([C,b,x])}function gh(u,s,c,f,g=1/0){let b=Math.min(f.distance(u[0],c[0][0]),g);if(b===0)return b;const x=new Pg([[0,[0,u.length-1],[0,0]]],$r),C=Mf(c);for(;x.length>0;){const I=x.pop();if(I[0]>=b)continue;const R=I[1],D=s?50:100;if(ph(R)<=D){if(!yo(R,u.length))return NaN;if(s){const B=O0(u,R,c,f);if(isNaN(B)||B===0)return B;b=Math.min(b,B)}else for(let B=R[0];B<=R[1];++B){const q=D0(u[B],c,f);if(b=Math.min(b,q),b===0)return 0}}else{const B=Pf(R,s);Og(x,b,f,u,C,B[0]),Og(x,b,f,u,C,B[1])}}return b}function yh(u,s,c,f,g,b=1/0){let x=Math.min(b,g.distance(u[0],c[0]));if(x===0)return x;const C=new Pg([[0,[0,u.length-1],[0,c.length-1]]],$r);for(;C.length>0;){const I=C.pop();if(I[0]>=x)continue;const R=I[1],D=I[2],B=s?50:100,q=f?50:100;if(ph(R)<=B&&ph(D)<=q){if(!yo(R,u.length)&&yo(D,c.length))return NaN;let K;if(s&&f)K=L0(u,R,c,D,g),x=Math.min(x,K);else if(s&&!f){const X=u.slice(R[0],R[1]+1);for(let ee=D[0];ee<=D[1];++ee)if(K=za(c[ee],X,g),x=Math.min(x,K),x===0)return x}else if(!s&&f){const X=c.slice(D[0],D[1]+1);for(let ee=R[0];ee<=R[1];++ee)if(K=za(u[ee],X,g),x=Math.min(x,K),x===0)return x}else K=z0(u,R,c,D,g),x=Math.min(x,K)}else{const K=Pf(R,s),X=Pf(D,f);mh(C,x,g,u,c,K[0],X[0]),mh(C,x,g,u,c,K[0],X[1]),mh(C,x,g,u,c,K[1],X[0]),mh(C,x,g,u,c,K[1],X[1])}}return x}function zf(u){return u.type==="MultiPolygon"?u.coordinates.map(s=>({type:"Polygon",coordinates:s})):u.type==="MultiLineString"?u.coordinates.map(s=>({type:"LineString",coordinates:s})):u.type==="MultiPoint"?u.coordinates.map(s=>({type:"Point",coordinates:s})):[u]}class Da{constructor(s,c){this.type=Tt,this.geojson=s,this.geometries=c}static parse(s,c){if(s.length!==2)return c.error(`'distance' expression requires exactly one argument, but found ${s.length-1} instead.`);if(Ma(s[1])){const f=s[1];if(f.type==="FeatureCollection")return new Da(f,f.features.map(g=>zf(g.geometry)).flat());if(f.type==="Feature")return new Da(f,zf(f.geometry));if("type"in f&&"coordinates"in f)return new Da(f,zf(f))}return c.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(s){if(s.geometry()!=null&&s.canonicalID()!=null){if(s.geometryType()==="Point")return function(c,f){const g=c.geometry(),b=g.flat().map(I=>Sf([I.x,I.y],c.canonical));if(g.length===0)return NaN;const x=new If(b[0][1]);let C=1/0;for(const I of f){switch(I.type){case"Point":C=Math.min(C,yh(b,!1,[I.coordinates],!1,x,C));break;case"LineString":C=Math.min(C,yh(b,!1,I.coordinates,!0,x,C));break;case"Polygon":C=Math.min(C,gh(b,!1,I.coordinates,x,C))}if(C===0)return C}return C}(s,this.geometries);if(s.geometryType()==="LineString")return function(c,f){const g=c.geometry(),b=g.flat().map(I=>Sf([I.x,I.y],c.canonical));if(g.length===0)return NaN;const x=new If(b[0][1]);let C=1/0;for(const I of f){switch(I.type){case"Point":C=Math.min(C,yh(b,!0,[I.coordinates],!1,x,C));break;case"LineString":C=Math.min(C,yh(b,!0,I.coordinates,!0,x,C));break;case"Polygon":C=Math.min(C,gh(b,!0,I.coordinates,x,C))}if(C===0)return C}return C}(s,this.geometries);if(s.geometryType()==="Polygon")return function(c,f){const g=c.geometry();if(g.length===0||g[0].length===0)return NaN;const b=fh(g,0).map(I=>I.map(R=>R.map(D=>Sf([D.x,D.y],c.canonical)))),x=new If(b[0][0][0][1]);let C=1/0;for(const I of f)for(const R of b){switch(I.type){case"Point":C=Math.min(C,gh([I.coordinates],!1,R,x,C));break;case"LineString":C=Math.min(C,gh(I.coordinates,!0,R,x,C));break;case"Polygon":C=Math.min(C,F0(R,I.coordinates,x,C))}if(C===0)return C}return C}(s,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class jc{constructor(s){this.type=mr,this.key=s}static parse(s,c){if(s.length!==2)return c.error(`Expected 1 argument, but found ${s.length-1} instead.`);const f=s[1];return f==null?c.error("Global state property must be defined."):typeof f!="string"?c.error(`Global state property must be string, but found ${typeof s[1]} instead.`):new jc(f)}evaluate(s){var c;const f=(c=s.globals)===null||c===void 0?void 0:c.globalState;return f&&Object.keys(f).length!==0?_r(f,this.key):null}eachChild(){}outputDefined(){return!1}}const El={"==":xf,"!=":T0,">":E0,"<":C0,">=":lh,"<=":k0,array:ys,at:ei,boolean:ys,case:Vn,coalesce:qi,collator:ch,format:Oc,image:wf,in:_l,"index-of":Rc,interpolate:zi,"interpolate-hcl":zi,"interpolate-lab":zi,length:hh,let:Mc,literal:Li,match:vl,number:ys,"number-format":uh,object:ys,slice:Lc,step:xl,string:ys,"to-boolean":Hs,"to-color":Hs,"to-number":Hs,"to-string":Hs,var:Es,within:La,distance:Da,"global-state":jc};class _s{constructor(s,c,f,g){this.name=s,this.type=c,this._evaluate=f,this.args=g}evaluate(s){return this._evaluate(s,this.args)}
74eachChild(s){this.args.forEach(s)}outputDefined(){return!1}static parse(s,c){const f=s[0],g=_s.definitions[f];if(!g)return c.error(`Unknown expression "${f}". If you wanted a literal array, use ["literal", [...]].`,0);const b=Array.isArray(g)?g[0]:g.type,x=Array.isArray(g)?[[g[1],g[2]]]:g.overloads,C=x.filter(([R])=>!Array.isArray(R)||R.length===s.length-1);let I=null;for(const[R,D]of C){I=new Ac(c.registry,_h,c.path,null,c.scope);const B=[];let q=!1;for(let K=1;K<s.length;K++){const X=s[K],ee=Array.isArray(R)?R[K-1]:R.type,ie=I.parse(X,1+B.length,ee);if(!ie){q=!0;break}B.push(ie)}if(!q)if(Array.isArray(R)&&R.length!==B.length)I.error(`Expected ${R.length} arguments, but found ${B.length} instead.`);else{for(let K=0;K<B.length;K++){const X=Array.isArray(R)?R[K]:R.type,ee=B[K];I.concat(K+1).checkSubtype(X,ee.type)}if(I.errors.length===0)return new _s(f,b,D,B)}}if(C.length===1)c.errors.push(...I.errors);else{const R=(C.length?C:x).map(([B])=>{return q=B,Array.isArray(q)?`(${q.map(_n).join(", ")})`:`(${_n(q.type)}...)`;var q}).join(" | "),D=[];for(let B=1;B<s.length;B++){const q=c.parse(s[B],1+D.length);if(!q)return null;D.push(_n(q.type))}c.error(`Expected arguments of type ${R}, but found (${D.join(", ")}) instead.`)}return null}static register(s,c){_s.definitions=c;for(const f in c)s[f]=_s}}function Fg(u,[s,c,f,g]){s=s.evaluate(u),c=c.evaluate(u),f=f.evaluate(u);const b=g?g.evaluate(u):1,x=ur(s,c,f,b);if(x)throw new vn(x);return new vr(s/255,c/255,f/255,b,!1)}function Bg(u,s){return u in s}function Df(u,s){const c=s[u];return c===void 0?null:c}function Oa(u){return{type:u}}function _h(u){if(u instanceof Es)return _h(u.boundExpression);if(u instanceof _s&&u.name==="error"||u instanceof ch||u instanceof La||u instanceof Da||u instanceof jc)return!1;const s=u instanceof Hs||u instanceof ys;let c=!0;return u.eachChild(f=>{c=s?c&&_h(f):c&&f instanceof Li}),!!c&&vh(u)&&kl(u,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function vh(u){if(u instanceof _s&&(u.name==="get"&&u.args.length===1||u.name==="feature-state"||u.name==="has"&&u.args.length===1||u.name==="properties"||u.name==="geometry-type"||u.name==="id"||/^filter-/.test(u.name))||u instanceof La||u instanceof Da)return!1;let s=!0;return u.eachChild(c=>{s&&!vh(c)&&(s=!1)}),s}function $c(u){if(u instanceof _s&&u.name==="feature-state")return!1;let s=!0;return u.eachChild(c=>{s&&!$c(c)&&(s=!1)}),s}function kl(u,s){if(u instanceof _s&&s.indexOf(u.name)>=0)return!1;let c=!0;return u.eachChild(f=>{c&&!kl(f,s)&&(c=!1)}),c}function Ng(u){return{result:"success",value:u}}function Il(u){return{result:"error",value:u}}function Pl(u){return u["property-type"]==="data-driven"||u["property-type"]==="cross-faded-data-driven"}function Of(u){return!!u.expression&&u.expression.parameters.indexOf("zoom")>-1}function Ff(u){return!!u.expression&&u.expression.interpolated}function br(u){return u instanceof Number?"number":u instanceof String?"string":u instanceof Boolean?"boolean":Array.isArray(u)?"array":u===null?"null":typeof u}function Fa(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)&&Jt(u)===qs}function jg(u){return u}function $g(u,s){const c=u.stops&&typeof u.stops[0][0]=="object",f=c||!(c||u.property!==void 0),g=u.type||(Ff(s)?"exponential":"interval"),b=function(D){switch(D.type){case"color":return vr.parse;case"padding":return Un.parse;case"numberArray":return Ci.parse;case"colorArray":return Qn.parse;default:return null}}(s);if(b&&((u=ui({},u)).stops&&(u.stops=u.stops.map(D=>[D[0],b(D[1])])),u.default=b(u.default?u.default:s.default)),u.colorSpace&&(x=u.colorSpace)!=="rgb"&&x!=="hcl"&&x!=="lab")throw new Error(`Unknown color space: "${u.colorSpace}"`);var x;const C=function(D){switch(D){case"exponential":return Ug;case"interval":return N0;case"categorical":return B0;case"identity":return Vg;default:throw new Error(`Unknown function type "${D}"`)}}(g);let I,R;if(g==="categorical"){I=Object.create(null);for(const D of u.stops)I[D[0]]=D[1];R=typeof u.stops[0][0]}if(c){const D={},B=[];for(let X=0;X<u.stops.length;X++){const ee=u.stops[X],ie=ee[0].zoom;D[ie]===void 0&&(D[ie]={zoom:ie,type:u.type,property:u.property,default:u.default,stops:[]},B.push(ie)),D[ie].stops.push([ee[0].value,ee[1]])}const q=[];for(const X of B)q.push([D[X].zoom,$g(D[X],s)]);const K={name:"linear"};return{kind:"composite",interpolationType:K,interpolationFactor:zi.interpolationFactor.bind(void 0,K),zoomStops:q.map(X=>X[0]),evaluate:({zoom:X},ee)=>Ug({stops:q,base:u.base},s,X).evaluate(X,ee)}}if(f){const D=g==="exponential"?{name:"exponential",base:u.base!==void 0?u.base:1}:null;return{kind:"camera",interpolationType:D,interpolationFactor:zi.interpolationFactor.bind(void 0,D),zoomStops:u.stops.map(B=>B[0]),evaluate:({zoom:B})=>C(u,s,B,I,R)}}return{kind:"source",evaluate(D,B){const q=B&&B.properties?B.properties[u.property]:void 0;return q===void 0?Uc(u.default,s.default):C(u,s,q,I,R)}}}function Uc(u,s,c){return u!==void 0?u:s!==void 0?s:c!==void 0?c:void 0}function B0(u,s,c,f,g){return Uc(typeof c===g?f[c]:void 0,u.default,s.default)}function N0(u,s,c){if(br(c)!=="number")return Uc(u.default,s.default);const f=u.stops.length;if(f===1||c<=u.stops[0][0])return u.stops[0][1];if(c>=u.stops[f-1][0])return u.stops[f-1][1];const g=bl(u.stops.map(b=>b[0]),c);return u.stops[g][1]}function Ug(u,s,c){const f=u.base!==void 0?u.base:1;if(br(c)!=="number")return Uc(u.default,s.default);const g=u.stops.length;if(g===1||c<=u.stops[0][0])return u.stops[0][1];if(c>=u.stops[g-1][0])return u.stops[g-1][1];const b=bl(u.stops.map(D=>D[0]),c),x=function(D,B,q,K){const X=K-q,ee=D-q;
vendor: 36,443 bytes, lines 74-75
74return X===0?0:B===1?ee/X:(Math.pow(B,ee)-1)/(Math.pow(B,X)-1)}(c,f,u.stops[b][0],u.stops[b+1][0]),C=u.stops[b][1],I=u.stops[b+1][1],R=ns[s.type]||jg;return typeof C.evaluate=="function"?{evaluate(...D){const B=C.evaluate.apply(void 0,D),q=I.evaluate.apply(void 0,D);if(B!==void 0&&q!==void 0)return R(B,q,x,u.colorSpace)}}:R(C,I,x,u.colorSpace)}function Vg(u,s,c){switch(s.type){case"color":c=vr.parse(c);break;case"formatted":c=Ti.fromString(c.toString());break;case"resolvedImage":c=Vi.fromString(c.toString());break;case"padding":c=Un.parse(c);break;case"colorArray":c=Qn.parse(c);break;case"numberArray":c=Ci.parse(c);break;default:br(c)===s.type||s.type==="enum"&&s.values[c]||(c=void 0)}return Uc(c,u.default,s.default)}_s.register(El,{error:[{kind:"error"},[fr],(u,[s])=>{throw new vn(s.evaluate(u))}],typeof:[fr,[mr],(u,[s])=>_n(Jt(s.evaluate(u)))],"to-rgba":[rs(Tt,4),[ts],(u,[s])=>{const[c,f,g,b]=s.evaluate(u).rgb;return[255*c,255*f,255*g,b]}],rgb:[ts,[Tt,Tt,Tt],Fg],rgba:[ts,[Tt,Tt,Tt,Tt],Fg],has:{type:pr,overloads:[[[fr],(u,[s])=>Bg(s.evaluate(u),u.properties())],[[fr,qs],(u,[s,c])=>Bg(s.evaluate(u),c.evaluate(u))]]},get:{type:mr,overloads:[[[fr],(u,[s])=>Df(s.evaluate(u),u.properties())],[[fr,qs],(u,[s,c])=>Df(s.evaluate(u),c.evaluate(u))]]},"feature-state":[mr,[fr],(u,[s])=>Df(s.evaluate(u),u.featureState||{})],properties:[qs,[],u=>u.properties()],"geometry-type":[fr,[],u=>u.geometryType()],id:[mr,[],u=>u.id()],zoom:[Tt,[],u=>u.globals.zoom],"heatmap-density":[Tt,[],u=>u.globals.heatmapDensity||0],elevation:[Tt,[],u=>u.globals.elevation||0],"line-progress":[Tt,[],u=>u.globals.lineProgress||0],accumulated:[mr,[],u=>u.globals.accumulated===void 0?null:u.globals.accumulated],"+":[Tt,Oa(Tt),(u,s)=>{let c=0;for(const f of s)c+=f.evaluate(u);return c}],"*":[Tt,Oa(Tt),(u,s)=>{let c=1;for(const f of s)c*=f.evaluate(u);return c}],"-":{type:Tt,overloads:[[[Tt,Tt],(u,[s,c])=>s.evaluate(u)-c.evaluate(u)],[[Tt],(u,[s])=>-s.evaluate(u)]]},"/":[Tt,[Tt,Tt],(u,[s,c])=>s.evaluate(u)/c.evaluate(u)],"%":[Tt,[Tt,Tt],(u,[s,c])=>s.evaluate(u)%c.evaluate(u)],ln2:[Tt,[],()=>Math.LN2],pi:[Tt,[],()=>Math.PI],e:[Tt,[],()=>Math.E],"^":[Tt,[Tt,Tt],(u,[s,c])=>Math.pow(s.evaluate(u),c.evaluate(u))],sqrt:[Tt,[Tt],(u,[s])=>Math.sqrt(s.evaluate(u))],log10:[Tt,[Tt],(u,[s])=>Math.log(s.evaluate(u))/Math.LN10],ln:[Tt,[Tt],(u,[s])=>Math.log(s.evaluate(u))],log2:[Tt,[Tt],(u,[s])=>Math.log(s.evaluate(u))/Math.LN2],sin:[Tt,[Tt],(u,[s])=>Math.sin(s.evaluate(u))],cos:[Tt,[Tt],(u,[s])=>Math.cos(s.evaluate(u))],tan:[Tt,[Tt],(u,[s])=>Math.tan(s.evaluate(u))],asin:[Tt,[Tt],(u,[s])=>Math.asin(s.evaluate(u))],acos:[Tt,[Tt],(u,[s])=>Math.acos(s.evaluate(u))],atan:[Tt,[Tt],(u,[s])=>Math.atan(s.evaluate(u))],min:[Tt,Oa(Tt),(u,s)=>Math.min(...s.map(c=>c.evaluate(u)))],max:[Tt,Oa(Tt),(u,s)=>Math.max(...s.map(c=>c.evaluate(u)))],abs:[Tt,[Tt],(u,[s])=>Math.abs(s.evaluate(u))],round:[Tt,[Tt],(u,[s])=>{const c=s.evaluate(u);return c<0?-Math.round(-c):Math.round(c)}],floor:[Tt,[Tt],(u,[s])=>Math.floor(s.evaluate(u))],ceil:[Tt,[Tt],(u,[s])=>Math.ceil(s.evaluate(u))],"filter-==":[pr,[fr,mr],(u,[s,c])=>u.properties()[s.value]===c.value],"filter-id-==":[pr,[mr],(u,[s])=>u.id()===s.value],"filter-type-==":[pr,[fr],(u,[s])=>u.geometryType()===s.value],"filter-<":[pr,[fr,mr],(u,[s,c])=>{const f=u.properties()[s.value],g=c.value;return typeof f==typeof g&&f<g}],"filter-id-<":[pr,[mr],(u,[s])=>{const c=u.id(),f=s.value;return typeof c==typeof f&&c<f}],"filter->":[pr,[fr,mr],(u,[s,c])=>{const f=u.properties()[s.value],g=c.value;return typeof f==typeof g&&f>g}],"filter-id->":[pr,[mr],(u,[s])=>{const c=u.id(),f=s.value;return typeof c==typeof f&&c>f}],"filter-<=":[pr,[fr,mr],(u,[s,c])=>{const f=u.properties()[s.value],g=c.value;return typeof f==typeof g&&f<=g}],"filter-id-<=":[pr,[mr],(u,[s])=>{const c=u.id(),f=s.value;return typeof c==typeof f&&c<=f}],"filter->=":[pr,[fr,mr],(u,[s,c])=>{const f=u.properties()[s.value],g=c.value;return typeof f==typeof g&&f>=g}],"filter-id->=":[pr,[mr],(u,[s])=>{const c=u.id(),f=s.value;return typeof c==typeof f&&c>=f}],"filter-has":[pr,[mr],(u,[s])=>s.value in u.properties()],"filter-has-id":[pr,[],u=>u.id()!==null&&u.id()!==void 0],"filter-type-in":[pr,[rs(fr)],(u,[s])=>s.value.indexOf(u.geometryType())>=0],"filter-id-in":[pr,[rs(mr)],(u,[s])=>s.value.indexOf(u.id())>=0],"filter-in-small":[pr,[fr,rs(mr)],(u,[s,c])=>c.value.indexOf(u.properties()[s.value])>=0],"filter-in-large":[pr,[fr,rs(mr)],(u,[s,c])=>function(f,g,b,x){for(;b<=x;){const C=b+x>>1;if(g[C]===f)return!0;g[C]>f?x=C-1:b=C+1}return!1}(u.properties()[s.value],c.value,0,c.value.length-1)],all:{type:pr,overloads:[[[pr,pr],(u,[s,c])=>s.evaluate(u)&&c.evaluate(u)],[Oa(pr),(u,s)=>{for(const c of s)if(!c.evaluate(u))return!1;return!0}]]},any:{type:pr,overloads:[[[pr,pr],(u,[s,c])=>s.evaluate(u)||c.evaluate(u)],[Oa(pr),(u,s)=>{for(const c of s)if(c.evaluate(u))return!0;return!1}]]},"!":[pr,[pr],(u,[s])=>!s.evaluate(u)],"is-supported-script":[pr,[fr],(u,[s])=>{const c=u.globals&&u.globals.isSupportedScript;return!c||c(s.evaluate(u))}],upcase:[fr,[fr],(u,[s])=>s.evaluate(u).toUpperCase()],downcase:[fr,[fr],(u,[s])=>s.evaluate(u).toLowerCase()],concat:[fr,Oa(mr),(u,s)=>s.map(c=>Ra(c.evaluate(u))).join("")],"resolved-locale":[fr,[ho],(u,[s])=>s.evaluate(u).resolvedLocale()]});class bh{constructor(s,c){this.expression=s,this._warningHistory={},this._evaluator=new Sg,this._defaultValue=c?function(f){if(f.type==="color"&&Fa(f.default))return new vr(0,0,0,0);switch(f.type){case"color":return vr.parse(f.default)||null;case"padding":return Un.parse(f.default)||null;case"numberArray":return Ci.parse(f.default)||null;case"colorArray":return Qn.parse(f.default)||null;case"variableAnchorOffsetCollection":return Er.parse(f.default)||null;case"projectionDefinition":return or.parse(f.default)||null;default:return f.default===void 0?null:f.default}}(c):null,this._enumValues=c&&c.type==="enum"?c.values:null}evaluateWithoutErrorHandling(s,c,f,g,b,x){return this._evaluator.globals=s,this._evaluator.feature=c,this._evaluator.featureState=f,this._evaluator.canonical=g,this._evaluator.availableImages=b||null,this._evaluator.formattedSection=x,this.expression.evaluate(this._evaluator)}evaluate(s,c,f,g,b,x){this._evaluator.globals=s,this._evaluator.feature=c||null,this._evaluator.featureState=f||null,this._evaluator.canonical=g,this._evaluator.availableImages=b||null,this._evaluator.formattedSection=x||null;try{const C=this.expression.evaluate(this._evaluator);if(C==null||typeof C=="number"&&C!=C)return this._defaultValue;if(this._enumValues&&!(C in this._enumValues))throw new vn(`Expected value to be one of ${Object.keys(this._enumValues).map(I=>JSON.stringify(I)).join(", ")}, but found ${JSON.stringify(C)} instead.`);return C}catch(C){return this._warningHistory[C.message]||(this._warningHistory[C.message]=!0,typeof console<"u"&&console.warn(C.message)),this._defaultValue}}}function xh(u){return Array.isArray(u)&&u.length>0&&typeof u[0]=="string"&&u[0]in El}function wh(u,s){const c=new Ac(El,_h,[],s?function(g){const b={color:ts,string:fr,number:Tt,enum:fr,boolean:pr,formatted:Ia,padding:Bn,numberArray:Cc,colorArray:Tc,projectionDefinition:rh,resolvedImage:fo,variableAnchorOffsetCollection:Ec};return g.type==="array"?rs(b[g.value]||mr,g.length):b[g.type]}(s):void 0),f=c.parse(u,void 0,void 0,void 0,s&&s.type==="string"?{typeAnnotation:"coerce"}:void 0);return f?Ng(new bh(f,s)):Il(c.errors)}class Vc{constructor(s,c){this.kind=s,this._styleExpression=c,this.isStateDependent=s!=="constant"&&!$c(c.expression),this.globalStateRefs=Ml(c.expression)}evaluateWithoutErrorHandling(s,c,f,g,b,x){return this._styleExpression.evaluateWithoutErrorHandling(s,c,f,g,b,x)}evaluate(s,c,f,g,b,x){return this._styleExpression.evaluate(s,c,f,g,b,x)}}class Sh{constructor(s,c,f,g){this.kind=s,this.zoomStops=f,this._styleExpression=c,this.isStateDependent=s!=="camera"&&!$c(c.expression),this.globalStateRefs=Ml(c.expression),this.interpolationType=g}evaluateWithoutErrorHandling(s,c,f,g,b,x){return this._styleExpression.evaluateWithoutErrorHandling(s,c,f,g,b,x)}evaluate(s,c,f,g,b,x){return this._styleExpression.evaluate(s,c,f,g,b,x)}interpolationFactor(s,c,f){return this.interpolationType?zi.interpolationFactor(this.interpolationType,s,c,f):0}}function Bf(u,s){const c=wh(u,s);if(c.result==="error")return c;const f=c.value.expression,g=vh(f);if(!g&&!Pl(s))return Il([new yn("","data expressions not supported")]);const b=kl(f,["zoom"]);if(!b&&!Of(s))return Il([new yn("","zoom expressions not supported")]);const x=Al(f);return x||b?x instanceof yn?Il([x]):x instanceof zi&&!Ff(s)?Il([new yn("",'"interpolate" expressions cannot be used with this property')]):Ng(x?new Sh(g?"camera":"composite",c.value,x.labels,x instanceof zi?x.interpolation:void 0):new Vc(g?"constant":"source",c.value)):Il([new yn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class qc{constructor(s,c){this._parameters=s,this._specification=c,ui(this,$g(this._parameters,this._specification))}static deserialize(s){return new qc(s._parameters,s._specification)}static serialize(s){return{_parameters:s._parameters,_specification:s._specification}}}function Al(u){let s=null;if(u instanceof Mc)s=Al(u.result);else if(u instanceof qi){for(const c of u.args)if(s=Al(c),s)break}else(u instanceof xl||u instanceof zi)&&u.input instanceof _s&&u.input.name==="zoom"&&(s=u);return s instanceof yn||u.eachChild(c=>{const f=Al(c);f instanceof yn?s=f:!s&&f?s=new yn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):s&&f&&s!==f&&(s=new yn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),s}function Ml(u,s=new Set){return u instanceof jc&&s.add(u.key),u.eachChild(c=>{Ml(c,s)}),s}function Gc(u){if(u===!0||u===!1)return!0;if(!Array.isArray(u)||u.length===0)return!1;switch(u[0]){case"has":return u.length>=2&&u[1]!=="$id"&&u[1]!=="$type";case"in":return u.length>=3&&(typeof u[1]!="string"||Array.isArray(u[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return u.length!==3||Array.isArray(u[1])||Array.isArray(u[2]);case"any":case"all":for(const s of u.slice(1))if(!Gc(s)&&typeof s!="boolean")return!1;return!0;default:return!0}}const Nf={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Ko(u){if(u==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Gc(u)||(u=Th(u));const s=wh(u,Nf);if(s.result==="error")throw new Error(s.value.map(c=>`${c.key}: ${c.message}`).join(", "));return{filter:(c,f,g)=>s.value.evaluate(c,f,{},g),needGeometry:qg(u),getGlobalStateRefs:()=>Ml(s.value.expression)}}function j0(u,s){return u<s?-1:u>s?1:0}function qg(u){if(!Array.isArray(u))return!1;if(u[0]==="within"||u[0]==="distance")return!0;for(let s=1;s<u.length;s++)if(qg(u[s]))return!0;return!1}function Th(u){if(!u)return!0;const s=u[0];return u.length<=1?s!=="any":s==="=="?jf(u[1],u[2],"=="):s==="!="?Hc(jf(u[1],u[2],"==")):s==="<"||s===">"||s==="<="||s===">="?jf(u[1],u[2],s):s==="any"?(c=u.slice(1),["any"].concat(c.map(Th))):s==="all"?["all"].concat(u.slice(1).map(Th)):s==="none"?["all"].concat(u.slice(1).map(Th).map(Hc)):s==="in"?Gg(u[1],u.slice(2)):s==="!in"?Hc(Gg(u[1],u.slice(2))):s==="has"?Hg(u[1]):s!=="!has"||Hc(Hg(u[1]));var c}function jf(u,s,c){switch(u){case"$type":return[`filter-type-${c}`,s];case"$id":return[`filter-id-${c}`,s];default:return[`filter-${c}`,u,s]}}function Gg(u,s){if(s.length===0)return!1;switch(u){case"$type":return["filter-type-in",["literal",s]];case"$id":return["filter-id-in",["literal",s]];default:return s.length>200&&!s.some(c=>typeof c!=typeof s[0])?["filter-in-large",u,["literal",s.sort(j0)]]:["filter-in-small",u,["literal",s]]}}function Hg(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function Hc(u){return["!",u]}function Ch(u){const s=typeof u;if(s==="number"||s==="boolean"||s==="string"||u==null)return JSON.stringify(u);if(Array.isArray(u)){let g="[";for(const b of u)g+=`${Ch(b)},`;return`${g}]`}const c=Object.keys(u).sort();let f="{";for(let g=0;g<c.length;g++)f+=`${JSON.stringify(c[g])}:${Ch(u[c[g]])},`;return`${f}}`}function Eh(u){let s="";for(const c of Et)s+=`/${Ch(u[c])}`;return s}function Zg(u){const s=u.value;return s?[new vt(u.key,s,"constants have been deprecated as of v8")]:[]}function Pn(u){return u instanceof Number||u instanceof String||u instanceof Boolean?u.valueOf():u}function Xo(u){if(Array.isArray(u))return u.map(Xo);if(u instanceof Object&&!(u instanceof Number||u instanceof String||u instanceof Boolean)){const s={};for(const c in u)s[c]=Xo(u[c]);return s}return Pn(u)}function vs(u){const s=u.key,c=u.value,f=u.valueSpec||{},g=u.objectElementValidators||{},b=u.style,x=u.styleSpec,C=u.validateSpec;let I=[];const R=br(c);if(R!=="object")return[new vt(s,c,`object expected, ${R} found`)];for(const D in c){const B=D.split(".")[0],q=_r(f,B)||f["*"];let K;if(_r(g,B))K=g[B];else if(_r(f,B))K=C;else if(g["*"])K=g["*"];else{if(!f["*"]){I.push(new vt(s,c[D],`unknown property "${D}"`));continue}K=C}I=I.concat(K({key:(s&&`${s}.`)+D,value:c[D],valueSpec:q,style:b,styleSpec:x,object:c,objectKey:D,validateSpec:C},c))}for(const D in f)g[D]||f[D].required&&f[D].default===void 0&&c[D]===void 0&&I.push(new vt(s,c,`missing required property "${D}"`));return I}function kh(u){const s=u.value,c=u.valueSpec,f=u.style,g=u.styleSpec,b=u.key,x=u.arrayElementValidator||u.validateSpec;if(br(s)!=="array")return[new vt(b,s,`array expected, ${br(s)} found`)];if(c.length&&s.length!==c.length)return[new vt(b,s,`array length ${c.length} expected, length ${s.length} found`)];if(c["min-length"]&&s.length<c["min-length"])return[new vt(b,s,`array length at least ${c["min-length"]} expected, length ${s.length} found`)];let C={type:c.value,values:c.values};g.$version<7&&(C.function=c.function),br(c.value)==="object"&&(C=c.value);let I=[];for(let R=0;R<s.length;R++)I=I.concat(x({array:s,arrayIndex:R,value:s[R],valueSpec:C,validateSpec:u.validateSpec,style:f,styleSpec:g,key:`${b}[${R}]`}));return I}function Zc(u){const s=u.key,c=u.value,f=u.valueSpec;let g=br(c);return g==="number"&&c!=c&&(g="NaN"),g!=="number"?[new vt(s,c,`number expected, ${g} found`)]:"minimum"in f&&c<f.minimum?[new vt(s,c,`${c} is less than the minimum value ${f.minimum}`)]:"maximum"in f&&c>f.maximum?[new vt(s,c,`${c} is greater than the maximum value ${f.maximum}`)]:[]}function Rl(u){const s=u.valueSpec,c=Pn(u.value.type);let f,g,b,x={};const C=c!=="categorical"&&u.value.property===void 0,I=!C,R=br(u.value.stops)==="array"&&br(u.value.stops[0])==="array"&&br(u.value.stops[0][0])==="object",D=vs({key:u.key,value:u.value,valueSpec:u.styleSpec.function,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{stops:function(K){if(c==="identity")return[new vt(K.key,K.value,'identity function may not have a "stops" property')];let X=[];const ee=K.value;return X=X.concat(kh({key:K.key,value:ee,valueSpec:K.valueSpec,validateSpec:K.validateSpec,style:K.style,styleSpec:K.styleSpec,arrayElementValidator:B})),br(ee)==="array"&&ee.length===0&&X.push(new vt(K.key,ee,"array must have at least one stop")),X},default:function(K){return K.validateSpec({key:K.key,value:K.value,valueSpec:s,validateSpec:K.validateSpec,style:K.style,styleSpec:K.styleSpec})}}});return c==="identity"&&C&&D.push(new vt(u.key,u.value,'missing required property "property"')),c==="identity"||u.value.stops||D.push(new vt(u.key,u.value,'missing required property "stops"')),c==="exponential"&&u.valueSpec.expression&&!Ff(u.valueSpec)&&D.push(new vt(u.key,u.value,"exponential functions not supported")),u.styleSpec.$version>=8&&(I&&!Pl(u.valueSpec)?D.push(new vt(u.key,u.value,"property functions not supported")):C&&!Of(u.valueSpec)&&D.push(new vt(u.key,u.value,"zoom functions not supported"))),c!=="categorical"&&!R||u.value.property!==void 0||D.push(new vt(u.key,u.value,'"property" property is required')),D;function B(K){let X=[];const ee=K.value,ie=K.key;if(br(ee)!=="array")return[new vt(ie,ee,`array expected, ${br(ee)} found`)];if(ee.length!==2)return[new vt(ie,ee,`array length 2 expected, length ${ee.length} found`)];if(R){if(br(ee[0])!=="object")return[new vt(ie,ee,`object expected, ${br(ee[0])} found`)];if(ee[0].zoom===void 0)return[new vt(ie,ee,"object stop key must have zoom")];if(ee[0].value===void 0)return[new vt(ie,ee,"object stop key must have value")];if(b&&b>Pn(ee[0].zoom))return[new vt(ie,ee[0].zoom,"stop zoom values must appear in ascending order")];Pn(ee[0].zoom)!==b&&(b=Pn(ee[0].zoom),g=void 0,x={}),X=X.concat(vs({key:`${ie}[0]`,value:ee[0],valueSpec:{zoom:{}},validateSpec:K.validateSpec,style:K.style,styleSpec:K.styleSpec,objectElementValidators:{zoom:Zc,value:q}}))}else X=X.concat(q({key:`${ie}[0]`,value:ee[0],validateSpec:K.validateSpec,style:K.style,styleSpec:K.styleSpec},ee));return xh(Xo(ee[1]))?X.concat([new vt(`${ie}[1]`,ee[1],"expressions are not allowed in function stops.")]):X.concat(K.validateSpec({key:`${ie}[1]`,value:ee[1],valueSpec:s,validateSpec:K.validateSpec,style:K.style,styleSpec:K.styleSpec}))}function q(K,X){const ee=br(K.value),ie=Pn(K.value),he=K.value!==null?K.value:X;if(f){if(ee!==f)return[new vt(K.key,he,`${ee} stop domain type must match previous stop domain type ${f}`)]}else f=ee;if(ee!=="number"&&ee!=="string"&&ee!=="boolean")return[new vt(K.key,he,"stop domain value must be a number, string, or boolean")];if(ee!=="number"&&c!=="categorical"){let Ie=`number expected, ${ee} found`;return Pl(s)&&c===void 0&&(Ie+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new vt(K.key,he,Ie)]}return c!=="categorical"||ee!=="number"||isFinite(ie)&&Math.floor(ie)===ie?c!=="categorical"&&ee==="number"&&g!==void 0&&ie<g?[new vt(K.key,he,"stop domain values must appear in ascending order")]:(g=ie,c==="categorical"&&ie in x?[new vt(K.key,he,"stop domain values must be unique")]:(x[ie]=!0,[])):[new vt(K.key,he,`integer expected, found ${ie}`)]}}function Ll(u){const s=(u.expressionContext==="property"?Bf:wh)(Xo(u.value),u.valueSpec);if(s.result==="error")return s.value.map(f=>new vt(`${u.key}${f.key}`,u.value,f.message));const c=s.value.expression||s.value._styleExpression.expression;if(u.expressionContext==="property"&&u.propertyKey==="text-font"&&!c.outputDefined())return[new vt(u.key,u.value,`Invalid data expression for "${u.propertyKey}". Output values must be contained as literals within the expression.`)];if(u.expressionContext==="property"&&u.propertyType==="layout"&&!$c(c))return[new vt(u.key,u.value,'"feature-state" data expressions are not supported with layout properties.')];if(u.expressionContext==="filter"&&!$c(c))return[new vt(u.key,u.value,'"feature-state" data expressions are not supported with filters.')];if(u.expressionContext&&u.expressionContext.indexOf("cluster")===0){if(!kl(c,["zoom","feature-state"]))return[new vt(u.key,u.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(u.expressionContext==="cluster-initial"&&!vh(c))return[new vt(u.key,u.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function $f(u){const s=u.key,c=u.value,f=br(c);return f!=="string"?[new vt(s,c,`color expected, ${f} found`)]:vr.parse(String(c))?[]:[new vt(s,c,`color expected, "${c}" found`)]}function Wc(u){const s=u.key,c=u.value,f=u.valueSpec,g=[];return Array.isArray(f.values)?f.values.indexOf(Pn(c))===-1&&g.push(new vt(s,c,`expected one of [${f.values.join(", ")}], ${JSON.stringify(c)} found`)):Object.keys(f.values).indexOf(Pn(c))===-1&&g.push(new vt(s,c,`expected one of [${Object.keys(f.values).join(", ")}], ${JSON.stringify(c)} found`)),g}function Uf(u){return Gc(Xo(u.value))?Ll(ui({},u,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Wg(u)}function Wg(u){const s=u.value,c=u.key;if(br(s)!=="array")return[new vt(c,s,`array expected, ${br(s)} found`)];const f=u.styleSpec;let g,b=[];if(s.length<1)return[new vt(c,s,"filter array must have at least 1 element")];switch(b=b.concat(Wc({key:`${c}[0]`,value:s[0],valueSpec:f.filter_operator,style:u.style,styleSpec:u.styleSpec})),Pn(s[0])){case"<":case"<=":case">":case">=":s.length>=2&&Pn(s[1])==="$type"&&b.push(new vt(c,s,`"$type" cannot be use with operator "${s[0]}"`));case"==":case"!=":s.length!==3&&b.push(new vt(c,s,`filter array for operator "${s[0]}" must have 3 elements`));case"in":case"!in":s.length>=2&&(g=br(s[1]),g!=="string"&&b.push(new vt(`${c}[1]`,s[1],`string expected, ${g} found`)));for(let x=2;x<s.length;x++)g=br(s[x]),Pn(s[1])==="$type"?b=b.concat(Wc({key:`${c}[${x}]`,value:s[x],valueSpec:f.geometry_type,style:u.style,styleSpec:u.styleSpec})):g!=="string"&&g!=="number"&&g!=="boolean"&&b.push(new vt(`${c}[${x}]`,s[x],`string, number, or boolean expected, ${g} found`));break;case"any":case"all":case"none":for(let x=1;x<s.length;x++)b=b.concat(Wg({key:`${c}[${x}]`,value:s[x],style:u.style,styleSpec:u.styleSpec}));break;case"has":case"!has":g=br(s[1]),s.length!==2?b.push(new vt(c,s,`filter array for "${s[0]}" operator must have 2 elements`)):g!=="string"&&b.push(new vt(`${c}[1]`,s[1],`string expected, ${g} found`))}return b}function Kg(u,s){const c=u.key,f=u.validateSpec,g=u.style,b=u.styleSpec,x=u.value,C=u.objectKey,I=b[`${s}_${u.layerType}`];if(!I)return[];const R=C.match(/^(.*)-transition$/);if(s==="paint"&&R&&I[R[1]]&&I[R[1]].transition)return f({key:c,value:x,valueSpec:b.transition,style:g,styleSpec:b});const D=u.valueSpec||I[C];if(!D)return[new vt(c,x,`unknown property "${C}"`)];let B;if(br(x)==="string"&&Pl(D)&&!D.tokens&&(B=/^{([^}]+)}$/.exec(x)))return[new vt(c,x,`"${C}" does not support interpolation syntax
75Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(B[1])} }\`.`)];const q=[];return u.layerType==="symbol"&&(C==="text-field"&&g&&!g.glyphs&&q.push(new vt(c,x,'use of "text-field" requires a style "glyphs" property')),C==="text-font"&&Fa(Xo(x))&&Pn(x.type)==="identity"&&q.push(new vt(c,x,'"text-font" does not support identity functions'))),q.concat(f({key:u.key,value:x,valueSpec:D,style:g,styleSpec:b,expressionContext:"property",propertyType:s,propertyKey:C}))}function zl(u){return Kg(u,"paint")}function Dl(u){return Kg(u,"layout")}function Gi(u){let s=[];const c=u.value,f=u.key,g=u.style,b=u.styleSpec;if(br(c)!=="object")return[new vt(f,c,`object expected, ${br(c)} found`)];c.type||c.ref||s.push(new vt(f,c,'either "type" or "ref" is required'));let x=Pn(c.type);const C=Pn(c.ref);if(c.id){const I=Pn(c.id);for(let R=0;R<u.arrayIndex;R++){const D=g.layers[R];Pn(D.id)===I&&s.push(new vt(f,c.id,`duplicate layer id "${c.id}", previously used at line ${D.id.__line__}`))}}if("ref"in c){let I;["type","source","source-layer","filter","layout"].forEach(R=>{R in c&&s.push(new vt(f,c[R],`"${R}" is prohibited for ref layers`))}),g.layers.forEach(R=>{Pn(R.id)===C&&(I=R)}),I?I.ref?s.push(new vt(f,c.ref,"ref cannot reference another ref layer")):x=Pn(I.type):s.push(new vt(f,c.ref,`ref layer "${C}" not found`))}else if(x!=="background")if(c.source){const I=g.sources&&g.sources[c.source],R=I&&Pn(I.type);I?R==="vector"&&x==="raster"?s.push(new vt(f,c.source,`layer "${c.id}" requires a raster source`)):R!=="raster-dem"&&x==="hillshade"||R!=="raster-dem"&&x==="color-relief"?s.push(new vt(f,c.source,`layer "${c.id}" requires a raster-dem source`)):R==="raster"&&x!=="raster"?s.push(new vt(f,c.source,`layer "${c.id}" requires a vector source`)):R!=="vector"||c["source-layer"]?R==="raster-dem"&&x!=="hillshade"&&x!=="color-relief"?s.push(new vt(f,c.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):x!=="line"||!c.paint||!c.paint["line-gradient"]||R==="geojson"&&I.lineMetrics||s.push(new vt(f,c,`layer "${c.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):s.push(new vt(f,c,`layer "${c.id}" must specify a "source-layer"`)):s.push(new vt(f,c.source,`source "${c.source}" not found`))}else s.push(new vt(f,c,'missing required property "source"'));return s=s.concat(vs({key:f,value:c,valueSpec:b.layer,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":()=>[],type:()=>u.validateSpec({key:`${f}.type`,value:c.type,valueSpec:b.layer.type,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,object:c,objectKey:"type"}),filter:Uf,layout:I=>vs({layer:c,key:I.key,value:I.value,style:I.style,styleSpec:I.styleSpec,validateSpec:I.validateSpec,objectElementValidators:{"*":R=>Dl(ui({layerType:x},R))}}),paint:I=>vs({layer:c,key:I.key,value:I.value,style:I.style,styleSpec:I.styleSpec,validateSpec:I.validateSpec,objectElementValidators:{"*":R=>zl(ui({layerType:x},R))}})}})),s}function ks(u){const s=u.value,c=u.key,f=br(s);return f!=="string"?[new vt(c,s,`string expected, ${f} found`)]:[]}const Vf={promoteId:function({key:u,value:s}){if(br(s)==="string")return ks({key:u,value:s});{const c=[];for(const f in s)c.push(...ks({key:`${u}.${f}`,value:s[f]}));return c}}};function Xg(u){const s=u.value,c=u.key,f=u.styleSpec,g=u.style,b=u.validateSpec;if(!s.type)return[new vt(c,s,'"type" is required')];const x=Pn(s.type);let C;switch(x){case"vector":case"raster":return C=vs({key:c,value:s,valueSpec:f[`source_${x.replace("-","_")}`],style:u.style,styleSpec:f,objectElementValidators:Vf,validateSpec:b}),C;case"raster-dem":return C=function(I){var R;const D=(R=I.sourceName)!==null&&R!==void 0?R:"",B=I.value,q=I.styleSpec,K=q.source_raster_dem,X=I.style;let ee=[];const ie=br(B);if(B===void 0)return ee;if(ie!=="object")return ee.push(new vt("source_raster_dem",B,`object expected, ${ie} found`)),ee;const he=Pn(B.encoding)==="custom",Ie=["redFactor","greenFactor","blueFactor","baseShift"],_e=I.value.encoding?`"${I.value.encoding}"`:"Default";for(const W in B)!he&&Ie.includes(W)?ee.push(new vt(W,B[W],`In "${D}": "${W}" is only valid when "encoding" is set to "custom". ${_e} encoding found`)):K[W]?ee=ee.concat(I.validateSpec({key:W,value:B[W],valueSpec:K[W],validateSpec:I.validateSpec,style:X,styleSpec:q})):ee.push(new vt(W,B[W],`unknown property "${W}"`));return ee}({sourceName:c,value:s,style:u.style,styleSpec:f,validateSpec:b}),C;case"geojson":if(C=vs({key:c,value:s,valueSpec:f.source_geojson,style:g,styleSpec:f,validateSpec:b,objectElementValidators:Vf}),s.cluster)for(const I in s.clusterProperties){const[R,D]=s.clusterProperties[I],B=typeof R=="string"?[R,["accumulated"],["get",I]]:R;C.push(...Ll({key:`${c}.${I}.map`,value:D,expressionContext:"cluster-map"})),C.push(...Ll({key:`${c}.${I}.reduce`,value:B,expressionContext:"cluster-reduce"}))}return C;case"video":return vs({key:c,value:s,valueSpec:f.source_video,style:g,validateSpec:b,styleSpec:f});case"image":return vs({key:c,value:s,valueSpec:f.source_image,style:g,validateSpec:b,styleSpec:f});case"canvas":return[new vt(c,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Wc({key:`${c}.type`,value:s.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Yg(u){const s=u.value,c=u.styleSpec,f=c.light,g=u.style;let b=[];const x=br(s);if(s===void 0)return b;if(x!=="object")return b=b.concat([new vt("light",s,`object expected, ${x} found`)]),b;for(const C in s){const I=C.match(/^(.*)-transition$/);b=b.concat(I&&f[I[1]]&&f[I[1]].transition?u.validateSpec({key:C,value:s[C],valueSpec:c.transition,validateSpec:u.validateSpec,style:g,styleSpec:c}):f[C]?u.validateSpec({key:C,value:s[C],valueSpec:f[C],validateSpec:u.validateSpec,style:g,styleSpec:c}):[new vt(C,s[C],`unknown property "${C}"`)])}return b}function Ol(u){const s=u.value,c=u.styleSpec,f=c.sky,g=u.style,b=br(s);if(s===void 0)return[];if(b!=="object")return[new vt("sky",s,`object expected, ${b} found`)];let x=[];for(const C in s)x=x.concat(f[C]?u.validateSpec({key:C,value:s[C],valueSpec:f[C],style:g,styleSpec:c}):[new vt(C,s[C],`unknown property "${C}"`)]);return x}function qf(u){const s=u.value,c=u.styleSpec,f=c.terrain,g=u.style;let b=[];const x=br(s);if(s===void 0)return b;if(x!=="object")return b=b.concat([new vt("terrain",s,`object expected, ${x} found`)]),b;for(const C in s)b=b.concat(f[C]?u.validateSpec({key:C,value:s[C],valueSpec:f[C],validateSpec:u.validateSpec,style:g,styleSpec:c}):[new vt(C,s[C],`unknown property "${C}"`)]);return b}function Ih(u){let s=[];const c=u.value,f=u.key;if(Array.isArray(c)){const g=[],b=[];for(const x in c)c[x].id&&g.includes(c[x].id)&&s.push(new vt(f,c,`all the sprites' ids must be unique, but ${c[x].id} is duplicated`)),g.push(c[x].id),c[x].url&&b.includes(c[x].url)&&s.push(new vt(f,c,`all the sprites' URLs must be unique, but ${c[x].url} is duplicated`)),b.push(c[x].url),s=s.concat(vs({key:`${f}[${x}]`,value:c[x],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:u.validateSpec}));return s}return ks({key:f,value:c})}function Jg(u){return s=u.value,s&&s.constructor===Object?[]:[new vt(u.key,u.value,`object expected, ${br(u.value)} found`)];var s}const Ph={"*":()=>[],array:kh,boolean:function(u){const s=u.value,c=u.key,f=br(s);return f!=="boolean"?[new vt(c,s,`boolean expected, ${f} found`)]:[]},number:Zc,color:$f,constants:Zg,enum:Wc,filter:Uf,function:Rl,layer:Gi,object:vs,source:Xg,light:Yg,sky:Ol,terrain:qf,projection:function(u){const s=u.value,c=u.styleSpec,f=c.projection,g=u.style,b=br(s);if(s===void 0)return[];if(b!=="object")return[new vt("projection",s,`object expected, ${b} found`)];let x=[];for(const C in s)x=x.concat(f[C]?u.validateSpec({key:C,value:s[C],valueSpec:f[C],style:g,styleSpec:c}):[new vt(C,s[C],`unknown property "${C}"`)]);return x},projectionDefinition:function(u){const s=u.key;let c=u.value;c=c instanceof String?c.valueOf():c;const f=br(c);return f!=="array"||function(g){return Array.isArray(g)&&g.length===3&&typeof g[0]=="string"&&typeof g[1]=="string"&&typeof g[2]=="number"}(c)||function(g){return!!["interpolate","step","literal"].includes(g[0])}(c)?["array","string"].includes(f)?[]:[new vt(s,c,`projection expected, invalid type "${f}" found`)]:[new vt(s,c,`projection expected, invalid array ${JSON.stringify(c)} found`)]},string:ks,formatted:function(u){return ks(u).length===0?[]:Ll(u)},resolvedImage:function(u){return ks(u).length===0?[]:Ll(u)},padding:function(u){const s=u.key,c=u.value;if(br(c)==="array"){if(c.length<1||c.length>4)return[new vt(s,c,`padding requires 1 to 4 values; ${c.length} values found`)];const f={type:"number"};let g=[];for(let b=0;b<c.length;b++)g=g.concat(u.validateSpec({key:`${s}[${b}]`,value:c[b],validateSpec:u.validateSpec,valueSpec:f}));return g}return Zc({key:s,value:c,valueSpec:{}})},numberArray:function(u){const s=u.key,c=u.value;if(br(c)==="array"){const f={type:"number"};if(c.length<1)return[new vt(s,c,"array length at least 1 expected, length 0 found")];let g=[];for(let b=0;b<c.length;b++)g=g.concat(u.validateSpec({key:`${s}[${b}]`,value:c[b],validateSpec:u.validateSpec,valueSpec:f}));return g}return Zc({key:s,value:c,valueSpec:{}})},colorArray:function(u){const s=u.key,c=u.value;if(br(c)==="array"){if(c.length<1)return[new vt(s,c,"array length at least 1 expected, length 0 found")];let f=[];for(let g=0;g<c.length;g++)f=f.concat($f({key:`${s}[${g}]`,value:c[g]}));return f}return $f({key:s,value:c})},variableAnchorOffsetCollection:function(u){const s=u.key,c=u.value,f=br(c),g=u.styleSpec;if(f!=="array"||c.length<1||c.length%2!=0)return[new vt(s,c,"variableAnchorOffsetCollection requires a non-empty array of even length")];let b=[];for(let x=0;x<c.length;x+=2)b=b.concat(Wc({key:`${s}[${x}]`,value:c[x],valueSpec:g.layout_symbol["text-anchor"]})),b=b.concat(kh({key:`${s}[${x+1}]`,value:c[x+1],valueSpec:{length:2,value:"number"},validateSpec:u.validateSpec,style:u.style,styleSpec:g}));return b},sprite:Ih,state:Jg};function Ah(u){const s=u.value,c=u.valueSpec,f=u.styleSpec;return u.validateSpec=Ah,c.expression&&Fa(Pn(s))?Rl(u):c.expression&&xh(Xo(s))?Ll(u):c.type&&Ph[c.type]?Ph[c.type](u):vs(ui({},u,{valueSpec:c.type?f[c.type]:c}))}function Fl(u){const s=u.value,c=u.key,f=ks(u);return f.length||(s.indexOf("{fontstack}")===-1&&f.push(new vt(c,s,'"glyphs" url must include a "{fontstack}" token')),s.indexOf("{range}")===-1&&f.push(new vt(c,s,'"glyphs" url must include a "{range}" token'))),f}function bs(u,s=ke){let c=[];return c=c.concat(Ah({key:"",value:u,valueSpec:s.$root,styleSpec:s,style:u,validateSpec:Ah,objectElementValidators:{glyphs:Fl,"*":()=>[]}})),u.constants&&(c=c.concat(Zg({key:"constants",value:u.constants}))),Qg(c)}function Is(u){return function(s){return u({...s,validateSpec:Ah})}}function Qg(u){return[].concat(u).sort((s,c)=>s.line-c.line)}function Di(u){return function(...s){return Qg(u.apply(this,s))}}bs.source=Di(Is(Xg)),bs.sprite=Di(Is(Ih)),bs.glyphs=Di(Is(Fl)),bs.light=Di(Is(Yg)),bs.sky=Di(Is(Ol)),bs.terrain=Di(Is(qf)),bs.state=Di(Is(Jg)),bs.layer=Di(Is(Gi)),bs.filter=Di(Is(Uf)),bs.paintProperty=Di(Is(zl)),bs.layoutProperty=Di(Is(Dl));const Bl=bs,$0=Bl.light,Mh=Bl.sky,U0=Bl.paintProperty,Gf=Bl.layoutProperty;function Kc(u,s){let c=!1;if(s&&s.length)for(const f of s)u.fire(new De(new Error(f.message))),c=!0;return c}class Nl{constructor(s,c,f){const g=this.cells=[];if(s instanceof ArrayBuffer){this.arrayBuffer=s;const x=new Int32Array(this.arrayBuffer);s=x[0],this.d=(c=x[1])+2*(f=x[2]);for(let I=0;I<this.d*this.d;I++){const R=x[3+I],D=x[3+I+1];g.push(R===D?null:x.subarray(R,D))}const C=x[3+g.length+1];this.keys=x.subarray(x[3+g.length],C),this.bboxes=x.subarray(C),this.insert=this._insertReadonly}else{this.d=c+2*f;for(let x=0;x<this.d*this.d;x++)g.push([]);this.keys=[],this.bboxes=[]}this.n=c,this.extent=s,this.padding=f,this.scale=c/s,this.uid=0;const b=f/c*s;this.min=-b,this.max=s+b}insert(s,c,f,g,b){this._forEachCell(c,f,g,b,this._insertCell,this.uid++,void 0,void 0),this.keys.push(s),this.bboxes.push(c),this.bboxes.push(f),this.bboxes.push(g),this.bboxes.push(b)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(s,c,f,g,b,x){this.cells[b].push(x)}query(s,c,f,g,b){const x=this.min,C=this.max;if(s<=x&&c<=x&&C<=f&&C<=g&&!b)return Array.prototype.slice.call(this.keys);{const I=[];return this._forEachCell(s,c,f,g,this._queryCell,I,{},b),I}}_queryCell(s,c,f,g,b,x,C,I){const R=this.cells[b];if(R!==null){const D=this.keys,B=this.bboxes;for(let q=0;q<R.length;q++){const K=R[q];if(C[K]===void 0){const X=4*K;(I?I(B[X+0],B[X+1],B[X+2],B[X+3]):s<=B[X+2]&&c<=B[X+3]&&f>=B[X+0]&&g>=B[X+1])?(C[K]=!0,x.push(D[K])):C[K]=!1}}}}_forEachCell(s,c,f,g,b,x,C,I){const R=this._convertToCellCoord(s),D=this._convertToCellCoord(c),B=this._convertToCellCoord(f),q=this._convertToCellCoord(g);for(let K=R;K<=B;K++)for(let X=D;X<=q;X++){const ee=this.d*X+K;if((!I||I(this._convertFromCellCoord(K),this._convertFromCellCoord(X),this._convertFromCellCoord(K+1),this._convertFromCellCoord(X+1)))&&b.call(this,s,c,f,g,ee,x,C,I))return}}_convertFromCellCoord(s){return(s-this.padding)/this.scale}_convertToCellCoord(s){return Math.max(0,Math.min(this.d-1,Math.floor(s*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const s=this.cells,c=3+this.cells.length+1+1;let f=0;for(let x=0;x<this.cells.length;x++)f+=this.cells[x].length;const g=new Int32Array(c+f+this.keys.length+this.bboxes.length);g[0]=this.extent,g[1]=this.n,g[2]=this.padding;let b=c;for(let x=0;x<s.length;x++){const C=s[x];g[3+x]=b,g.set(C,b),b+=C.length}return g[3+s.length]=b,g.set(this.keys,b),b+=this.keys.length,g[3+s.length+1]=b,g.set(this.bboxes,b),b+=this.bboxes.length,g.buffer}static serialize(s,c){const f=s.toArrayBuffer();return c&&c.push(f),{buffer:f}}static deserialize(s){return new Nl(s.buffer)}}const Ws={};function Mt(u,s,c={}){if(Ws[u])throw new Error(`${u} is already registered.`);Object.defineProperty(s,"_classRegistryKey",{value:u,writeable:!1}),Ws[u]={klass:s,omit:c.omit||[],shallow:c.shallow||[]}}Mt("Object",Object),Mt("Set",Set),Mt("TransferableGridIndex",Nl),Mt("Color",vr),Mt("Error",Error),Mt("AJAXError",pe),Mt("ResolvedImage",Vi),Mt("StylePropertyFunction",qc),Mt("StyleExpression",bh,{omit:["_evaluator"]}),Mt("ZoomDependentExpression",Sh),Mt("ZoomConstantExpression",Vc),Mt("C
75ompoundExpression",_s,{omit:["_evaluate"]});for(const u in El)El[u]._classRegistryKey||Mt(`Expression_${u}`,El[u]);function Hf(u){return u&&typeof ArrayBuffer<"u"&&(u instanceof ArrayBuffer||u.constructor&&u.constructor.name==="ArrayBuffer")}function Xc(u){return u.$name||u.constructor._classRegistryKey}function Zf(u){return!function(s){if(s===null||typeof s!="object")return!1;const c=Xc(s);return!(!c||c==="Object")}(u)&&(u==null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||u instanceof Boolean||u instanceof Number||u instanceof String||u instanceof Date||u instanceof RegExp||u instanceof Blob||u instanceof Error||Hf(u)||Ke(u)||ArrayBuffer.isView(u)||u instanceof ImageData)}function Yc(u,s){if(Zf(u))return(Hf(u)||Ke(u))&&s&&s.push(u),ArrayBuffer.isView(u)&&s&&s.push(u.buffer),u instanceof ImageData&&s&&s.push(u.data.buffer),u;if(Array.isArray(u)){const b=[];for(const x of u)b.push(Yc(x,s));return b}if(typeof u!="object")throw new Error("can't serialize object of type "+typeof u);const c=Xc(u);if(!c)throw new Error(`can't serialize object of unregistered class ${u.constructor.name}`);if(!Ws[c])throw new Error(`${c} is not registered.`);const{klass:f}=Ws[c],g=f.serialize?f.serialize(u,s):{};if(f.serialize){if(s&&g===s[s.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const b in u){if(!u.hasOwnProperty(b)||Ws[c].omit.indexOf(b)>=0)continue;const x=u[b];g[b]=Ws[c].shallow.indexOf(b)>=0?x:Yc(x,s)}u instanceof Error&&(g.message=u.message)}if(g.$name)throw new Error("$name property is reserved for worker serialization logic.");return c!=="Object"&&(g.$name=c),g}function jl(u){if(Zf(u))return u;if(Array.isArray(u))return u.map(jl);if(typeof u!="object")throw new Error("can't deserialize object of type "+typeof u);const s=Xc(u)||"Object";if(!Ws[s])throw new Error(`can't deserialize unregistered class ${s}`);const{klass:c}=Ws[s];if(!c)throw new Error(`can't deserialize unregistered class ${s}`);if(c.deserialize)return c.deserialize(u);const f=Object.create(c.prototype);for(const g of Object.keys(u)){if(g==="$name")continue;const b=u[g];f[g]=Ws[s].shallow.indexOf(g)>=0?b:jl(b)}return f}class Wf{constructor(){this.first=!0}update(s,c){const f=Math.floor(s);return this.first?(this.first=!1,this.lastIntegerZoom=f,this.lastIntegerZoomTime=0,this.lastZoom=s,this.lastFloorZoom=f,!0):(this.lastFloorZoom>f?(this.lastIntegerZoom=f+1,this.lastIntegerZoomTime=c):this.lastFloorZoom<f&&(this.lastIntegerZoom=f,this.lastIntegerZoomTime=c),s!==this.lastZoom&&(this.lastZoom=s,this.lastFloorZoom=f,!0))}}const xr={"Latin-1 Supplement":u=>u>=128&&u<=255,"Hangul Jamo":u=>u>=4352&&u<=4607,Khmer:u=>u>=6016&&u<=6143,"General Punctuation":u=>u>=8192&&u<=8303,"Letterlike Symbols":u=>u>=8448&&u<=8527,"Number Forms":u=>u>=8528&&u<=8591,"Miscellaneous Technical":u=>u>=8960&&u<=9215,"Control Pictures":u=>u>=9216&&u<=9279,"Optical Character Recognition":u=>u>=9280&&u<=9311,"Enclosed Alphanumerics":u=>u>=9312&&u<=9471,"Geometric Shapes":u=>u>=9632&&u<=9727,"Miscellaneous Symbols":u=>u>=9728&&u<=9983,"Miscellaneous Symbols and Arrows":u=>u>=11008&&u<=11263,"Ideographic Description Characters":u=>u>=12272&&u<=12287,"CJK Symbols and Punctuation":u=>u>=12288&&u<=12351,Hiragana:u=>u>=12352&&u<=12447,Katakana:u=>u>=12448&&u<=12543,Kanbun:u=>u>=12688&&u<=12703,"CJK Strokes":u=>u>=12736&&u<=12783,"Enclosed CJK Letters and Months":u=>u>=12800&&u<=13055,"CJK Compatibility":u=>u>=13056&&u<=13311,"Yijing Hexagram Symbols":u=>u>=19904&&u<=19967,"CJK Unified Ideographs":u=>u>=19968&&u<=40959,"Hangul Syllables":u=>u>=44032&&u<=55215,"Private Use Area":u=>u>=57344&&u<=63743,"Vertical Forms":u=>u>=65040&&u<=65055,"CJK Compatibility Forms":u=>u>=65072&&u<=65103,"Small Form Variants":u=>u>=65104&&u<=65135,"Halfwidth and Fullwidth Forms":u=>u>=65280&&u<=65519};function Kf(u){for(const s of u)if(Lh(s.charCodeAt(0)))return!0;return!1}function ey(u){for(const s of u)if(!q0(s.charCodeAt(0)))return!1;return!0}function Rh(u){const s=u.map(c=>{try{return new RegExp(`\\p{sc=${c}}`,"u").source}catch{return null}}).filter(c=>c);return new RegExp(s.join("|"),"u")}const V0=Rh(["Arab","Dupl","Mong","Ougr","Syrc"]);function q0(u){return!V0.test(String.fromCodePoint(u))}const Xf=Rh(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Lh(u){return!(u!==746&&u!==747&&(u<4352||!(xr["CJK Compatibility Forms"](u)&&!(u>=65097&&u<=65103)||xr["CJK Compatibility"](u)||xr["CJK Strokes"](u)||!(!xr["CJK Symbols and Punctuation"](u)||u>=12296&&u<=12305||u>=12308&&u<=12319||u===12336)||xr["Enclosed CJK Letters and Months"](u)||xr["Ideographic Description Characters"](u)||xr.Kanbun(u)||xr.Katakana(u)&&u!==12540||!(!xr["Halfwidth and Fullwidth Forms"](u)||u===65288||u===65289||u===65293||u>=65306&&u<=65310||u===65339||u===65341||u===65343||u>=65371&&u<=65503||u===65507||u>=65512&&u<=65519)||!(!xr["Small Form Variants"](u)||u>=65112&&u<=65118||u>=65123&&u<=65126)||xr["Vertical Forms"](u)||xr["Yijing Hexagram Symbols"](u)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(u))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(u))||Xf.test(String.fromCodePoint(u)))))}function Yf(u){return!(Lh(u)||function(s){return!!(xr["Latin-1 Supplement"](s)&&(s===167||s===169||s===174||s===177||s===188||s===189||s===190||s===215||s===247)||xr["General Punctuation"](s)&&(s===8214||s===8224||s===8225||s===8240||s===8241||s===8251||s===8252||s===8258||s===8263||s===8264||s===8265||s===8273)||xr["Letterlike Symbols"](s)||xr["Number Forms"](s)||xr["Miscellaneous Technical"](s)&&(s>=8960&&s<=8967||s>=8972&&s<=8991||s>=8996&&s<=9e3||s===9003||s>=9085&&s<=9114||s>=9150&&s<=9165||s===9167||s>=9169&&s<=9179||s>=9186&&s<=9215)||xr["Control Pictures"](s)&&s!==9251||xr["Optical Character Recognition"](s)||xr["Enclosed Alphanumerics"](s)||xr["Geometric Shapes"](s)||xr["Miscellaneous Symbols"](s)&&!(s>=9754&&s<=9759)||xr["Miscellaneous Symbols and Arrows"](s)&&(s>=11026&&s<=11055||s>=11088&&s<=11097||s>=11192&&s<=11243)||xr["CJK Symbols and Punctuation"](s)||xr.Katakana(s)||xr["Private Use Area"](s)||xr["CJK Compatibility Forms"](s)||xr["Small Form Variants"](s)||xr["Halfwidth and Fullwidth Forms"](s)||s===8734||s===8756||s===8757||s>=9984&&s<=10087||s>=10102&&s<=10131||s===65532||s===65533)}(u))}
vendor: 10,120 bytes, line 75
75const ty=Rh(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Jc(u){return ty.test(String.fromCodePoint(u))}function G0(u,s){return!(!s&&Jc(u)||u>=2304&&u<=3583||u>=3840&&u<=4255||xr.Khmer(u))}function Jf(u){for(const s of u)if(Jc(s.charCodeAt(0)))return!0;return!1}const Yo=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(u){this.pluginStatus=u.pluginStatus,this.pluginURL=u.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(u){if(Yo.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=u.applyArabicShaping,this.processBidirectionalText=u.processBidirectionalText,this.processStyledBidirectionalText=u.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(u,s){return o(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(u.pluginStatus!=="loading")return this.setState(u),u;const c=u.pluginURL,f=new Promise(b=>{this.loadScriptResolve=b});s(c);const g=new Promise(b=>setTimeout(()=>b(),this.TIMEOUT));if(yield Promise.race([f,g]),this.isParsed()){const b={pluginStatus:"loaded",pluginURL:c};return this.setState(b),b}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${c}`)})}};class pn{constructor(s,c){this.zoom=s,c?(this.now=c.now||0,this.fadeDuration=c.fadeDuration||0,this.zoomHistory=c.zoomHistory||new Wf,this.transition=c.transition||{},this.globalState=c.globalState||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Wf,this.transition={},this.globalState={})}isSupportedScript(s){return function(c,f){for(const g of c)if(!G0(g.charCodeAt(0),f))return!1;return!0}(s,Yo.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const s=this.zoom,c=s-Math.floor(s),f=this.crossFadingFactor();return s>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:c+(1-c)*f}:{fromScale:.5,toScale:1,t:1-(1-f)*c}}}class Qc{constructor(s,c){this.property=s,this.value=c,this.expression=function(f,g){if(Fa(f))return new qc(f,g);if(xh(f)){const b=Bf(f,g);if(b.result==="error")throw new Error(b.value.map(x=>`${x.key}: ${x.message}`).join(", "));return b.value}{let b=f;return g.type==="color"&&typeof f=="string"?b=vr.parse(f):g.type!=="padding"||typeof f!="number"&&!Array.isArray(f)?g.type!=="numberArray"||typeof f!="number"&&!Array.isArray(f)?g.type!=="colorArray"||typeof f!="string"&&!Array.isArray(f)?g.type==="variableAnchorOffsetCollection"&&Array.isArray(f)?b=Er.parse(f):g.type==="projectionDefinition"&&typeof f=="string"&&(b=or.parse(f)):b=Qn.parse(f):b=Ci.parse(f):b=Un.parse(f),{globalStateRefs:new Set,kind:"constant",evaluate:()=>b}}}(c===void 0?s.specification.default:c,s.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(s,c,f){return this.property.possiblyEvaluate(this,s,c,f)}}class zh{constructor(s){this.property=s,this.value=new Qc(s,void 0)}transitioned(s,c){return new ry(this.property,this.value,c,Nt({},s.transition,this.transition),s.now)}untransitioned(){return new ry(this.property,this.value,null,{},0)}}class Qf{constructor(s){this._properties=s,this._values=Object.create(s.defaultTransitionablePropertyValues)}getValue(s){return je(this._values[s].value.value)}setValue(s,c){Object.prototype.hasOwnProperty.call(this._values,s)||(this._values[s]=new zh(this._values[s].property)),this._values[s].value=new Qc(this._values[s].property,c===null?void 0:je(c))}getTransition(s){return je(this._values[s].transition)}setTransition(s,c){Object.prototype.hasOwnProperty.call(this._values,s)||(this._values[s]=new zh(this._values[s].property)),this._values[s].transition=je(c)||void 0}serialize(){const s={};for(const c of Object.keys(this._values)){const f=this.getValue(c);f!==void 0&&(s[c]=f);const g=this.getTransition(c);g!==void 0&&(s[`${c}-transition`]=g)}return s}transitioned(s,c){const f=new ny(this._properties);for(const g of Object.keys(this._values))f._values[g]=this._values[g].transitioned(s,c._values[g]);return f}untransitioned(){const s=new ny(this._properties);for(const c of Object.keys(this._values))s._values[c]=this._values[c].untransitioned();return s}}class ry{constructor(s,c,f,g,b){this.property=s,this.value=c,this.begin=b+g.delay||0,this.end=this.begin+g.duration||0,s.specification.transition&&(g.delay||g.duration)&&(this.prior=f)}possiblyEvaluate(s,c,f){const g=s.now||0,b=this.value.possiblyEvaluate(s,c,f),x=this.prior;if(x){if(g>this.end)return this.prior=null,b;if(this.value.isDataDriven())return this.prior=null,b;if(g<this.begin)return x.possiblyEvaluate(s,c,f);{const C=(g-this.begin)/(this.end-this.begin);return this.property.interpolate(x.possiblyEvaluate(s,c,f),b,zr(C))}}return b}}class ny{constructor(s){this._properties=s,this._values=Object.create(s.defaultTransitioningPropertyValues)}possiblyEvaluate(s,c,f){const g=new Dh(this._properties);for(const b of Object.keys(this._values))g._values[b]=this._values[b].possiblyEvaluate(s,c,f);return g}hasTransition(){for(const s of Object.keys(this._values))if(this._values[s].prior)return!0;return!1}}class H0{constructor(s){this._properties=s,this._values=Object.create(s.defaultPropertyValues)}hasValue(s){return this._values[s].value!==void 0}getValue(s){return je(this._values[s].value)}setValue(s,c){this._values[s]=new Qc(this._values[s].property,c===null?void 0:je(c))}serialize(){const s={};for(const c of Object.keys(this._values)){const f=this.getValue(c);f!==void 0&&(s[c]=f)}return s}possiblyEvaluate(s,c,f){const g=new Dh(this._properties);for(const b of Object.keys(this._values))g._values[b]=this._values[b].possiblyEvaluate(s,c,f);return g}}class Ks{constructor(s,c,f){this.property=s,this.value=c,this.parameters=f}isConstant(){return this.value.kind==="constant"}constantOr(s){return this.value.kind==="constant"?this.value.value:s}evaluate(s,c,f,g){return this.property.evaluate(this.value,this.parameters,s,c,f,g)}}class Dh{constructor(s){this._properties=s,this._values=Object.create(s.defaultPossiblyEvaluatedValues)}get(s){return this._values[s]}}class Ot{constructor(s){this.specification=s}possiblyEvaluate(s,c){if(s.isDataDriven())throw new Error("Value should not be data driven");return s.expression.evaluate(c)}interpolate(s,c,f){const g=ns[this.specification.type];return g?g(s,c,f):s}}class Wt{constructor(s,c){this.specification=s,this.overrides=c}possiblyEvaluate(s,c,f,g){return new Ks(this,s.expression.kind==="constant"||s.expression.kind==="camera"?{kind:"constant",value:s.expression.evaluate(c,null,{},f,g)}:s.expression,c)}interpolate(s,c,f){if(s.value.kind!=="constant"||c.value.kind!=="constant")return s;if(s.value.value===void 0||c.value.value===void 0)return new Ks(this,{kind:"constant",value:void 0},s.parameters);const g=ns[this.specification.type];if(g){const b=g(s.value.value,c.value.value,f);return new Ks(this,{kind:"constant",value:b},s.parameters)}return s}evaluate(s,c,f,g,b,x){return s.kind==="constant"?s.value:s.evaluate(c,f,g,b,x)}}class Oh extends Wt{possiblyEvaluate(s,c,f,g){if(s.value===void 0)return new Ks(this,{kind:"constant",value:void 0},c);if(s.expression.kind==="constant"){const b=s.expression.evaluate(c,null,{},f,g),x=s.property.specification.type==="resolvedImage"&&typeof b!="string"?b.name:b,C=this._calculate(x,x,x,c);return new Ks(this,{kind:"constant",value:C},c)}if(s.expression.kind==="camera"){const b=this._calculate(s.expression.evaluate({zoom:c.zoom-1}),s.expression.evaluate({zoom:c.zoom}),s.expression.evaluate({zoom:c.zoom+1}),c);return new Ks(this,{kind:"constant",value:b},c)}return new Ks(this,s.expression,c)}evaluate(s,c,f,g,b,x){if(s.kind==="source"){const C=s.evaluate(c,f,g,b,x);return this._calculate(C,C,C,c)}return s.kind==="composite"?this._calculate(s.evaluate({zoom:Math.floor(c.zoom)-1},f,g),s.evaluate({zoom:Math.floor(c.zoom)},f,g),s.evaluate({zoom:Math.floor(c.zoom)+1},f,g),c):s.value}_calculate(s,c,f,g){return g.zoom>g.zoomHistory.lastIntegerZoom?{from:s,to:c}:{from:f,to:c}}interpolate(s){return s}}class ep{constructor(s){this.specification=s}possiblyEvaluate(s,c,f,g){if(s.value!==void 0){if(s.expression.kind==="constant"){const b=s.expression.evaluate(c,null,{},f,g);return this._calculate(b,b,b,c)}return this._calculate(s.expression.evaluate(new pn(Math.floor(c.zoom-1),c)),s.expression.evaluate(new pn(Math.floor(c.zoom),c)),s.expression.evaluate(new pn(Math.floor(c.zoom+1),c)),c)}}_calculate(s,c,f,g){return g.zoom>g.zoomHistory.lastIntegerZoom?{from:s,to:c}:{from:f,to:c}}interpolate(s){return s}}class eu{constructor(s){this.specification=s}possiblyEvaluate(s,c,f,g){return!!s.expression.evaluate(c,null,{},f,g)}interpolate(){return!1}}class Oi{constructor(s){this.properties=s,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const c in s){const f=s[c];f.specification.overridable&&this.overridableProperties.push(c);const g=this.defaultPropertyValues[c]=new Qc(f,void 0),b=this.defaultTransitionablePropertyValues[c]=new zh(f);this.defaultTransitioningPropertyValues[c]=b.untransitioned(),this.defaultPossiblyEvaluatedValues[c]=g.possiblyEvaluate({})}}}Mt("DataDrivenProperty",Wt),Mt("DataConstantProperty",Ot),Mt("CrossFadedDataDrivenProperty",Oh),Mt("CrossFadedProperty",ep),Mt("C
75olorRampProperty",eu);const iy="-transition";class hi extends st{constructor(s,c){if(super(),this.id=s.id,this.type=s.type,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},s.type!=="custom"&&(this.metadata=s.metadata,this.minzoom=s.minzoom,this.maxzoom=s.maxzoom,s.type!=="background"&&(this.source=s.source,this.sourceLayer=s["source-layer"],this.filter=s.filter,this._featureFilter=Ko(s.filter)),c.layout&&(this._unevaluatedLayout=new H0(c.layout)),c.paint)){this._transitionablePaint=new Qf(c.paint);for(const f in s.paint)this.setPaintProperty(f,s.paint[f],{validate:!1});for(const f in s.layout)this.setLayoutProperty(f,s.layout[f],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Dh(c.paint)}}setFilter(s){this.filter=s,this._featureFilter=Ko(s)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(s){return s==="visibility"?this.visibility:this._unevaluatedLayout.getValue(s)}getLayoutAffectingGlobalStateRefs(){const s=new Set;if(this._unevaluatedLayout)for(const c in this._unevaluatedLayout._values){const f=this._unevaluatedLayout._values[c];for(const g of f.getGlobalStateRefs())s.add(g)}for(const c of this._featureFilter.getGlobalStateRefs())s.add(c);return s}setLayoutProperty(s,c,f={}){c!=null&&this._validate(Gf,`layers.${this.id}.layout.${s}`,s,c,f)||(s!=="visibility"?this._unevaluatedLayout.setValue(s,c):this.visibility=c)}getPaintProperty(s){return s.endsWith(iy)?this._transitionablePaint.getTransition(s.slice(0,-11)):this._transitionablePaint.getValue(s)}setPaintProperty(s,c,f={}){if(c!=null&&this._validate(U0,`layers.${this.id}.paint.${s}`,s,c,f))return!1;if(s.endsWith(iy))return this._transitionablePaint.setTransition(s.slice(0,-11),c||void 0),!1;{const g=this._transitionablePaint._values[s],b=g.property.specification["property-type"]==="cross-faded-data-driven",x=g.value.isDataDriven(),C=g.value;this._transitionablePaint.setValue(s,c),this._handleSpecialPaintPropertyUpdate(s);const I=this._transitionablePaint._values[s].value;return I.isDataDriven()||x||b||this._handleOverridablePaintPropertyUpdate(s,C,I)}}_handleSpecialPaintPropertyUpdate(s){}_handleOverridablePaintPropertyUpdate(s,c,f){return!1}isHidden(s){return!!(this.minzoom&&s<this.minzoom)||!!(this.maxzoom&&s>=this.maxzoom)||this.visibility==="none"}updateTransitions(s){this._transitioningPaint=this._transitionablePaint.transitioned(s,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(s,c){s.getCrossfadeParameters&&(this._crossfadeParameters=s.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(s,void 0,c)),this.paint=this._transitioningPaint.possiblyEvaluate(s,void 0,c)}
vendor: 6,001 bytes, line 75
75serialize(){const s={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(s.layout=s.layout||{},s.layout.visibility=this.visibility),me(s,(c,f)=>!(c===void 0||f==="layout"&&!Object.keys(c).length||f==="paint"&&!Object.keys(c).length))}_validate(s,c,f,g,b={}){return(!b||b.validate!==!1)&&Kc(this,s.call(Bl,{key:c,layerType:this.type,objectKey:f,value:g,styleSpec:ke,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const s in this.paint._values){const c=this.paint.get(s);if(c instanceof Ks&&Pl(c.property.specification)&&(c.value.kind==="source"||c.value.kind==="composite")&&c.value.isStateDependent)return!0}return!1}}const sy={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Ba{constructor(s,c){this._structArray=s,this._pos1=c*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class bn{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(s,c){return s._trim(),c&&(s.isTransferred=!0,c.push(s.arrayBuffer)),{length:s.length,arrayBuffer:s.arrayBuffer}}static deserialize(s){const c=Object.create(this.prototype);return c.arrayBuffer=s.arrayBuffer,c.length=s.length,c.capacity=s.arrayBuffer.byteLength/c.bytesPerElement,c._refreshViews(),c}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(s){this.reserve(s),this.length=s}reserve(s){if(s>this.capacity){this.capacity=Math.max(s,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const c=this.uint8;this._refreshViews(),c&&this.uint8.set(c)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function An(u,s=1){let c=0,f=0;return{members:u.map(g=>{const b=sy[g.type].BYTES_PER_ELEMENT,x=c=oy(c,Math.max(s,b)),C=g.components||1;return f=Math.max(f,b),c+=b*C,{name:g.name,type:g.type,components:C,offset:x}}),size:oy(c,Math.max(f,s)),alignment:s}}function oy(u,s){return Math.ceil(u/s)*s}class Jo extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,c){const f=this.length;return this.resize(f+1),this.emplace(f,s,c)}emplace(s,c,f){const g=2*s;return this.int16[g+0]=c,this.int16[g+1]=f,s}}Jo.prototype.bytesPerElement=4,Mt("StructArrayLayout2i4",Jo);class Qo extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,c,f){const g=this.length;return this.resize(g+1),this.emplace(g,s,c,f)}emplace(s,c,f,g){const b=3*s;return this.int16[b+0]=c,this.int16[b+1]=f,this.int16[b+2]=g,s}}Qo.prototype.bytesPerElement=6,Mt("StructArrayLayout3i6",Qo);class tp extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,c,f,g){const b=this.length;return this.resize(b+1),this.emplace(b,s,c,f,g)}emplace(s,c,f,g,b){const x=4*s;return this.int16[x+0]=c,this.int16[x+1]=f,this.int16[x+2]=g,this.int16[x+3]=b,s}}tp.prototype.bytesPerElement=8,Mt("StructArrayLayout4i8",tp);class Fh extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,c,f,g,b,x){const C=this.length;return this.resize(C+1),this.emplace(C,s,c,f,g,b,x)}emplace(s,c,f,g,b,x,C){const I=6*s;return this.int16[I+0]=c,this.int16[I+1]=f,this.int16[I+2]=g,this.int16[I+3]=b,this.int16[I+4]=x,this.int16[I+5]=C,s}}Fh.prototype.bytesPerElement=12,Mt("StructArrayLayout2i4i12",Fh);class Na extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,c,f,g,b,x){const C=this.length;return this.resize(C+1),this.emplace(C,s,c,f,g,b,x)}emplace(s,c,f,g,b,x,C){const I=4*s,R=8*s;return this.int16[I+0]=c,this.int16[I+1]=f,this.uint8[R+4]=g,this.uint8[R+5]=b,this.uint8[R+6]=x,this.uint8[R+7]=C,s}}Na.prototype.bytesPerElement=8,Mt("StructArrayLayout2i4ub8",Na);class tu extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c){const f=this.length;return this.resize(f+1),this.emplace(f,s,c)}emplace(s,c,f){const g=2*s;return this.float32[g+0]=c,this.float32[g+1]=f,s}}tu.prototype.bytesPerElement=8,Mt("StructArrayLayout2f8",tu);class rp extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,c,f,g,b,x,C,I,R,D){const B=this.length;return this.resize(B+1),this.emplace(B,s,c,f,g,b,x,C,I,R,D)}emplace(s,c,f,g,b,x,C,I,R,D,B){const q=10*s;return this.uint16[q+0]=c,this.uint16[q+1]=f,this.uint16[q+2]=g,this.uint16[q+3]=b,this.uint16[q+4]=x,this.uint16[q+5]=C,this.uint16[q+6]=I,this.uint16[q+7]=R,this.uint16[q+8]=D,this.uint16[q+9]=B,s}}rp.prototype.bytesPerElement=20,Mt("StructArrayLayout10ui20",rp);class Bh extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,c,f,g,b,x,C,I,R,D,B,q){const K=this.length;return this.resize(K+1),this.emplace(K,s,c,f,g,b,x,C,I,R,D,B,q)}emplace(s,c,f,g,b,x,C,I,R,D,B,q,K){const X=12*s;return this.int16[X+0]=c,this.int16[X+1]=f,this.int16[X+2]=g,this.int16[X+3]=b,this.uint16[X+4]=x,this.uint16[X+5]=C,this.uint16[X+6]=I,this.uint16[X+7]=R,this.int16[X+8]=D,this.int16[X+9]=B,this.int16[X+10]=q,this.int16[X+11]=K,s}}Bh.prototype.bytesPerElement=24,Mt("StructArrayLayout4i4ui4i24",Bh);
vendor: 11,724 bytes, line 75
75class np extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,f){const g=this.length;return this.resize(g+1),this.emplace(g,s,c,f)}emplace(s,c,f,g){const b=3*s;return this.float32[b+0]=c,this.float32[b+1]=f,this.float32[b+2]=g,s}}np.prototype.bytesPerElement=12,Mt("StructArrayLayout3f12",np);class _ extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(s){const c=this.length;return this.resize(c+1),this.emplace(c,s)}emplace(s,c){return this.uint32[1*s+0]=c,s}}_.prototype.bytesPerElement=4,Mt("StructArrayLayout1ul4",_);class n extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,c,f,g,b,x,C,I,R){const D=this.length;return this.resize(D+1),this.emplace(D,s,c,f,g,b,x,C,I,R)}emplace(s,c,f,g,b,x,C,I,R,D){const B=10*s,q=5*s;return this.int16[B+0]=c,this.int16[B+1]=f,this.int16[B+2]=g,this.int16[B+3]=b,this.int16[B+4]=x,this.int16[B+5]=C,this.uint32[q+3]=I,this.uint16[B+8]=R,this.uint16[B+9]=D,s}}n.prototype.bytesPerElement=20,Mt("StructArrayLayout6i1ul2ui20",n);class l extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,c,f,g,b,x){const C=this.length;return this.resize(C+1),this.emplace(C,s,c,f,g,b,x)}emplace(s,c,f,g,b,x,C){const I=6*s;return this.int16[I+0]=c,this.int16[I+1]=f,this.int16[I+2]=g,this.int16[I+3]=b,this.int16[I+4]=x,this.int16[I+5]=C,s}}l.prototype.bytesPerElement=12,Mt("StructArrayLayout2i2i2i12",l);class p extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,c,f,g,b){const x=this.length;return this.resize(x+1),this.emplace(x,s,c,f,g,b)}emplace(s,c,f,g,b,x){const C=4*s,I=8*s;return this.float32[C+0]=c,this.float32[C+1]=f,this.float32[C+2]=g,this.int16[I+6]=b,this.int16[I+7]=x,s}}p.prototype.bytesPerElement=16,Mt("StructArrayLayout2f1f2i16",p);class m extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,c,f,g,b,x){const C=this.length;return this.resize(C+1),this.emplace(C,s,c,f,g,b,x)}emplace(s,c,f,g,b,x,C){const I=16*s,R=4*s,D=8*s;return this.uint8[I+0]=c,this.uint8[I+1]=f,this.float32[R+1]=g,this.float32[R+2]=b,this.int16[D+6]=x,this.int16[D+7]=C,s}}m.prototype.bytesPerElement=16,Mt("StructArrayLayout2ub2f2i16",m);class v extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,c,f){const g=this.length;return this.resize(g+1),this.emplace(g,s,c,f)}emplace(s,c,f,g){const b=3*s;return this.uint16[b+0]=c,this.uint16[b+1]=f,this.uint16[b+2]=g,s}}v.prototype.bytesPerElement=6,Mt("StructArrayLayout3ui6",v);class S extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,f,g,b,x,C,I,R,D,B,q,K,X,ee,ie,he){const Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,s,c,f,g,b,x,C,I,R,D,B,q,K,X,ee,ie,he)}emplace(s,c,f,g,b,x,C,I,R,D,B,q,K,X,ee,ie,he,Ie){const _e=24*s,W=12*s,ne=48*s;return this.int16[_e+0]=c,this.int16[_e+1]=f,this.uint16[_e+2]=g,this.uint16[_e+3]=b,this.uint32[W+2]=x,this.uint32[W+3]=C,this.uint32[W+4]=I,this.uint16[_e+10]=R,this.uint16[_e+11]=D,this.uint16[_e+12]=B,this.float32[W+7]=q,this.float32[W+8]=K,this.uint8[ne+36]=X,this.uint8[ne+37]=ee,this.uint8[ne+38]=ie,this.uint32[W+10]=he,this.int16[_e+22]=Ie,s}}S.prototype.bytesPerElement=48,Mt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",S);class E extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,f,g,b,x,C,I,R,D,B,q,K,X,ee,ie,he,Ie,_e,W,ne,be,$e,ct,Ge,Ye,gt,ht){const yt=this.length;return this.resize(yt+1),this.emplace(yt,s,c,f,g,b,x,C,I,R,D,B,q,K,X,ee,ie,he,Ie,_e,W,ne,be,$e,ct,Ge,Ye,gt,ht)}emplace(s,c,f,g,b,x,C,I,R,D,B,q,K,X,ee,ie,he,Ie,_e,W,ne,be,$e,ct,Ge,Ye,gt,ht,yt){const rt=32*s,Dt=16*s;return this.int16[rt+0]=c,this.int16[rt+1]=f,this.int16[rt+2]=g,this.int16[rt+3]=b,this.int16[rt+4]=x,this.int16[rt+5]=C,this.int16[rt+6]=I,this.int16[rt+7]=R,this.uint16[rt+8]=D,this.uint16[rt+9]=B,this.uint16[rt+10]=q,this.uint16[rt+11]=K,this.uint16[rt+12]=X,this.uint16[rt+13]=ee,this.uint16[rt+14]=ie,this.uint16[rt+15]=he,this.uint16[rt+16]=Ie,this.uint16[rt+17]=_e,this.uint16[rt+18]=W,this.uint16[rt+19]=ne,this.uint16[rt+20]=be,this.uint16[rt+21]=$e,this.uint16[rt+22]=ct,this.uint32[Dt+12]=Ge,this.float32[Dt+13]=Ye,this.float32[Dt+14]=gt,this.uint16[rt+30]=ht,this.uint16[rt+31]=yt,s}}E.prototype.bytesPerElement=64,Mt("StructArrayLayout8i15ui1ul2f2ui64",E);class A extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s){const c=this.length;return this.resize(c+1),this.emplace(c,s)}emplace(s,c){return this.float32[1*s+0]=c,s}}A.prototype.bytesPerElement=4,Mt("StructArrayLayout1f4",A);class z extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,f){const g=this.length;return this.resize(g+1),this.emplace(g,s,c,f)}emplace(s,c,f,g){const b=3*s;return this.uint16[6*s+0]=c,this.float32[b+1]=f,this.float32[b+2]=g,s}}z.prototype.bytesPerElement=12,Mt("StructArrayLayout1ui2f12",z);class F extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,c,f){const g=this.length;return this.resize(g+1),this.emplace(g,s,c,f)}emplace(s,c,f,g){const b=4*s;return this.uint32[2*s+0]=c,this.uint16[b+2]=f,this.uint16[b+3]=g,s}}F.prototype.bytesPerElement=8,Mt("StructArrayLayout1ul2ui8",F);class j extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,c){const f=this.length;return this.resize(f+1),this.emplace(f,s,c)}emplace(s,c,f){const g=2*s;return this.uint16[g+0]=c,this.uint16[g+1]=f,s}}j.prototype.bytesPerElement=4,Mt("StructArrayLayout2ui4",j);class N extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s){const c=this.length;return this.resize(c+1),this.emplace(c,s)}emplace(s,c){return this.uint16[1*s+0]=c,s}}N.prototype.bytesPerElement=2,Mt("StructArrayLayout1ui2",N);class G extends bn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,f,g){const b=this.length;return this.resize(b+1),this.emplace(b,s,c,f,g)}emplace(s,c,f,g,b){const x=4*s;return this.float32[x+0]=c,this.float32[x+1]=f,this.float32[x+2]=g,this.float32[x+3]=b,s}}G.prototype.bytesPerElement=16,Mt("StructArrayLayout4f16",G);class Y extends Ba{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new L(this.anchorPointX,this.anchorPointY)}}Y.prototype.size=20;class ae extends n{get(s){return new Y(this,s)}}Mt("CollisionBoxArray",ae);class oe extends Ba{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(s){this._structArray.uint8[this._pos1+37]=s}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(s){this._structArray.uint8[this._pos1+38]=s}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(s){this._structArray.uint32[this._pos4+10]=s}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}oe.prototype.size=48;class le extends S{get(s){return new oe(this,s)}}Mt("PlacedSymbolArray",le);class de extends Ba{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(s){this._structArray.uint32[this._pos4+12]=s}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}de.prototype.size=64;
vendor: 4,222 bytes, line 75
75class ve extends E{get(s){return new de(this,s)}}Mt("SymbolInstanceArray",ve);class ge extends A{getoffsetX(s){return this.float32[1*s+0]}}Mt("GlyphOffsetArray",ge);class we extends Qo{getx(s){return this.int16[3*s+0]}gety(s){return this.int16[3*s+1]}gettileUnitDistanceFromAnchor(s){return this.int16[3*s+2]}}Mt("SymbolLineVertexArray",we);class Ce extends Ba{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Ce.prototype.size=12;class ye extends z{get(s){return new Ce(this,s)}}Mt("TextAnchorOffsetArray",ye);class Ae extends Ba{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Ae.prototype.size=8;class Ve extends F{get(s){return new Ae(this,s)}}Mt("FeatureIndexArray",Ve);class Be extends Jo{}class Ne extends Jo{}class qe extends Jo{}class wt extends Fh{}class bt extends Na{}class ut extends tu{}class zt extends rp{}class hr extends Bh{}class Ur extends np{}class xn extends _{}class Yr extends l{}class wn extends m{}class rn extends v{}class Jr extends j{}const nn=An([{name:"a_pos",components:2,type:"Int16"}],4),{members:di}=nn;class Pr{constructor(s=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=s}prepareSegment(s,c,f,g){const b=this.segments[this.segments.length-1];return s>Pr.MAX_VERTEX_ARRAY_LENGTH&&Xe(`Max vertices per segment is ${Pr.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${s}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Pr.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!b||b.vertexLength+s>Pr.MAX_VERTEX_ARRAY_LENGTH||b.sortKey!==g?this.createNewSegment(c,f,g):b}createNewSegment(s,c,f){const g={vertexOffset:s.length,primitiveOffset:c.length,vertexLength:0,primitiveLength:0,vaos:{}};return f!==void 0&&(g.sortKey=f),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(g),g}getOrCreateLatestSegment(s,c,f){return this.prepareSegment(0,s,c,f)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(const s of this.segments)for(const c in s.vaos)s.vaos[c].destroy()}static simpleSegment(s,c,f,g){return new Pr([{vertexOffset:s,primitiveOffset:c,vertexLength:f,primitiveLength:g,vaos:{},sortKey:0}])}}function ti(u,s){return 256*(u=_t(Math.floor(u),0,255))+_t(Math.floor(s),0,255)}Pr.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Mt("SegmentVector",Pr);const fi=An([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var ea,ta,ra,Xs={exports:{}},ru={exports:{}},nu={exports:{}},$l=function(){if(ra)return Xs.exports;ra=1;var u=(ea||(ea=1,ru.exports=function(c,f){var g,b,x,C,I,R,D,B;for(b=c.length-(g=3&c.length),x=f,I=3432918353,R=461845907,B=0;B<b;)D=255&c.charCodeAt(B)|(255&c.charCodeAt(++B))<<8|(255&c.charCodeAt(++B))<<16|(255&c.charCodeAt(++B))<<24,++B,x=27492+(65535&(C=5*(65535&(x=(x^=D=(65535&(D=(D=(65535&D)*I+(((D>>>16)*I&65535)<<16)&4294967295)<<15|D>>>17))*R+(((D>>>16)*R&65535)<<16)&4294967295)<<13|x>>>19))+((5*(x>>>16)&65535)<<16)&4294967295))+((58964+(C>>>16)&65535)<<16);switch(D=0,g){case 3:D^=(255&c.charCodeAt(B+2))<<16;case 2:D^=(255&c.charCodeAt(B+1))<<8;case 1:x^=D=(65535&(D=(D=(65535&(D^=255&c.charCodeAt(B)))*I+(((D>>>16)*I&65535)<<16)&4294967295)<<15|D>>>17))*R+(((D>>>16)*R&65535)<<16)&4294967295}return x^=c.length,x=2246822507*(65535&(x^=x>>>16))+((2246822507*(x>>>16)&65535)<<16)&4294967295,x=3266489909*(65535&(x^=x>>>13))+((3266489909*(x>>>16)&65535)<<16)&4294967295,(x^=x>>>16)>>>0}),ru.exports),s=(ta||(ta=1,nu.exports=function(c,f){for(var g,b=c.length,x=f^b,C=0;b>=4;)g=1540483477*(65535&(g=255&c.charCodeAt(C)|(255&c.charCodeAt(++C))<<8|(255&c.charCodeAt(++C))<<16|(255&c.charCodeAt(++C))<<24))+((1540483477*(g>>>16)&65535)<<16),x=1540483477*(65535&x)+((1540483477*(x>>>16)&65535)<<16)^(g=1540483477*(65535&(g^=g>>>24))+((1540483477*(g>>>16)&65535)<<16)),b-=4,++C;
75switch(b){case 3:x^=(255&c.charCodeAt(C+2))<<16;case 2:x^=(255&c.charCodeAt(C+1))<<8;case 1:x=1540483477*(65535&(x^=255&c.charCodeAt(C)))+((1540483477*(x>>>16)&65535)<<16)}return x=1540483477*(65535&(x^=x>>>13))+((1540483477*(x>>>16)&65535)<<16),(x^=x>>>15)>>>0}),nu.exports);return Xs.exports=u,Xs.exports.murmur3=u,Xs.exports.murmur2=s,Xs.exports}(),Hi=y($l);class Ps{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(s,c,f,g){this.ids.push(na(s)),this.positions.push(c,f,g)}getPositions(s){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const c=na(s);let f=0,g=this.ids.length-1;for(;f<g;){const x=f+g>>1;this.ids[x]>=c?g=x:f=x+1}const b=[];for(;this.ids[f]===c;)b.push({index:this.positions[3*f],start:this.positions[3*f+1],end:this.positions[3*f+2]}),f++;return b}static serialize(s,c){const f=new Float64Array(s.ids),g=new Uint32Array(s.positions);return ja(f,g,0,f.length-1),c&&c.push(f.buffer,g.buffer),{ids:f,positions:g}}static deserialize(s){const c=new Ps;return c.ids=s.ids,c.positions=s.positions,c.indexed=!0,c}}function na(u){const s=+u;return!isNaN(s)&&s<=Number.MAX_SAFE_INTEGER?s:Hi(String(u))}function ja(u,s,c,f){for(;c<f;){const g=u[c+f>>1];let b=c-1,x=f+1;for(;;){do b++;while(u[b]<g);do x--;while(u[x]>g);if(b>=x)break;zn(u,b,x),zn(s,3*b,3*x),zn(s,3*b+1,3*x+1),zn(s,3*b+2,3*x+2)}x-c<f-x?(ja(u,s,c,x),c=x+1):(ja(u,s,x+1,f),f=x)}}function zn(u,s,c){const f=u[s];u[s]=u[c],u[c]=f}Mt("FeaturePositionMap",Ps);class hn{constructor(s,c){this.gl=s.gl,this.location=c}}class Fi extends hn{constructor(s,c){super(s,c),this.current=0}set(s){this.current!==s&&(this.current=s,this.gl.uniform1f(this.location,s))}}class Wn extends hn{constructor(s,c){super(s,c),this.current=[0,0,0,0]}set(s){s[0]===this.current[0]&&s[1]===this.current[1]&&s[2]===this.current[2]&&s[3]===this.current[3]||(this.current=s,this.gl.uniform4f(this.location,s[0],s[1],s[2],s[3]))}}class ay extends hn{constructor(s,c){super(s,c),this.current=vr.transparent}set(s){s.r===this.current.r&&s.g===this.current.g&&s.b===this.current.b&&s.a===this.current.a||(this.current=s,this.gl.uniform4f(this.location,s.r,s.g,s.b,s.a))}}const Z0=new Float32Array(16);function ip(u){return[ti(255*u.r,255*u.g),ti(255*u.b,255*u.a)]}class iu{constructor(s,c,f){this.value=s,this.uniformNames=c.map(g=>`u_${g}`),this.type=f}setUniform(s,c,f){s.set(f.constantOr(this.value))}getBinding(s,c,f){return this.type==="color"?new ay(s,c):new Fi(s,c)}}class Ul{constructor(s,c){this.uniformNames=c.map(f=>`u_${f}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(s,c){this.pixelRatioFrom=c.pixelRatio,this.pixelRatioTo=s.pixelRatio,this.patternFrom=c.tlbr,this.patternTo=s.tlbr}setUniform(s,c,f,g){const b=g==="u_pattern_to"?this.patternTo:g==="u_pattern_from"?this.patternFrom:g==="u_pixel_ratio_to"?this.pixelRatioTo:g==="u_pixel_ratio_from"?this.pixelRatioFrom:null;b&&s.set(b)}getBinding(s,c,f){return f.substr(0,9)==="u_pattern"?new Wn(s,c):new Fi(s,c)}}class _o{constructor(s,c,f,g){this.expression=s,this.type=f,this.maxValue=0,this.paintVertexAttributes=c.map(b=>({name:`a_${b}`,type:"Float32",components:f==="color"?2:1,offset:0})),this.paintVertexArray=new g}populatePaintArray(s,c,f,g,b){const x=this.paintVertexArray.length,C=this.expression.evaluate(new pn(0),c,{},g,[],b);this.paintVertexArray.resize(s),this._setPaintValue(x,s,C)}updatePaintArray(s,c,f,g){const b=this.expression.evaluate({zoom:0},f,g);this._setPaintValue(s,c,b)}_setPaintValue(s,c,f){if(this.type==="color"){const g=ip(f);for(let b=s;b<c;b++)this.paintVertexArray.emplace(b,g[0],g[1])}else{for(let g=s;g<c;g++)this.paintVertexArray.emplace(g,f);this.maxValue=Math.max(this.maxValue,Math.abs(f))}}upload(s){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=s.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class pi{constructor(s,c,f,g,b,x){this.expression=s,this.uniformNames=c.map(C=>`u_${C}_t`),this.type=f,this.useIntegerZoom=g,this.zoom=b,this.maxValue=0,this.paintVertexAttributes=c.map(C=>({name:`a_${C}
75`,type:"Float32",components:f==="color"?4:2,offset:0})),this.paintVertexArray=new x}populatePaintArray(s,c,f,g,b){const x=this.expression.evaluate(new pn(this.zoom),c,{},g,[],b),C=this.expression.evaluate(new pn(this.zoom+1),c,{},g,[],b),I=this.paintVertexArray.length;this.paintVertexArray.resize(s),this._setPaintValue(I,s,x,C)}updatePaintArray(s,c,f,g){const b=this.expression.evaluate({zoom:this.zoom},f,g),x=this.expression.evaluate({zoom:this.zoom+1},f,g);this._setPaintValue(s,c,b,x)}_setPaintValue(s,c,f,g){if(this.type==="color"){const b=ip(f),x=ip(g);for(let C=s;C<c;C++)this.paintVertexArray.emplace(C,b[0],b[1],x[0],x[1])}else{for(let b=s;b<c;b++)this.paintVertexArray.emplace(b,f,g);this.maxValue=Math.max(this.maxValue,Math.abs(f),Math.abs(g))}}upload(s){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=s.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(s,c){const f=this.useIntegerZoom?Math.floor(c.zoom):c.zoom,g=_t(this.expression.interpolationFactor(f,this.zoom,this.zoom+1),0,1);s.set(g)}getBinding(s,c,f){return new Fi(s,c)}}class vo{constructor(s,c,f,g,b,x){this.expression=s,this.type=c,this.useIntegerZoom=f,this.zoom=g,this.layerId=x,this.zoomInPaintVertexArray=new b,this.zoomOutPaintVertexArray=new b}populatePaintArray(s,c,f){const g=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(s),this.zoomOutPaintVertexArray.resize(s),this._setPaintValues(g,s,c.patterns&&c.patterns[this.layerId],f)}updatePaintArray(s,c,f,g,b){this._setPaintValues(s,c,f.patterns&&f.patterns[this.layerId],b)}_setPaintValues(s,c,f,g){if(!g||!f)return;const{min:b,mid:x,max:C}=f,I=g[b],R=g[x],D=g[C];if(I&&R&&D)for(let B=s;B<c;B++)this.zoomInPaintVertexArray.emplace(B,R.tl[0],R.tl[1],R.br[0],R.br[1],I.tl[0],I.tl[1],I.br[0],I.br[1],R.pixelRatio,I.pixelRatio),this.zoomOutPaintVertexArray.emplace(B,R.tl[0],R.tl[1],R.br[0],R.br[1],D.tl[0],D.tl[1],D.br[0],D.br[1],R.pixelRatio,D.pixelRatio)}upload(s){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=s.createVertexBuffer(this.zoomInPaintVertexArray,fi.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=s.createVertexBuffer(this.zoomOutPaintVertexArray,fi.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class sp{constructor(s,c,f){this.binders={},this._buffers=[];const g=[];for(const b in s.paint._values){if(!f(b))continue;const x=s.paint.get(b);if(!(x instanceof Ks&&Pl(x.property.specification)))continue;const C=op(b,s.type),I=x.value,R=x.property.specification.type,D=x.property.useIntegerZoom,B=x.property.specification["property-type"],q=B==="cross-faded"||B==="cross-faded-data-driven";if(I.kind==="constant")this.binders[b]=q?new Ul(I.value,C):new iu(I.value,C,R),g.push(`/u_${b}`);else if(I.kind==="source"||q){const K=ap(b,R,"source");this.binders[b]=q?new vo(I,R,D,c,K,s.id):new _o(I,C,R,K),g.push(`/a_${b}`)}else{const K=ap(b,R,"composite");this.binders[b]=new pi(I,C,R,D,c,K),g.push(`/z_${b}`)}}this.cacheKey=g.sort().join("")}getMaxValue(s){const c=this.binders[s];return c instanceof _o||c instanceof pi?c.maxValue:0}populatePaintArrays(s,c,f,g,b){for(const x in this.binders){const C=this.binders[x];(C instanceof _o||C instanceof pi||C instanceof vo)&&C.populatePaintArray(s,c,f,g,b)}}setConstantPatternPositions(s,c){for(const f in this.binders){const g=this.binders[f];g instanceof Ul&&g.setConstantPatternPositions(s,c)}}updatePaintArrays(s,c,f,g,b){let x=!1;for(const C in s){const I=c.getPositions(C);for(const R of I){const D=f.feature(R.index);for(const B in this.binders){const q=this.binders[B];if((q instanceof _o||q instanceof pi||q instanceof vo)&&q.expression.isStateDependent===!0){const K=g.paint.get(B);q.expression=K.value,q.updatePaintArray(R.start,R.end,D,s[C],b),x=!0}}}}return x}defines(){const s=[];for(const c in this.binders){const f=this.binders[c];(f instanceof iu||f instanceof Ul)&&s.push(...f.uniformNames.map(g=>`#define HAS_UNIFORM_${g}`))}return s}getBinderAttributes(){const s=[];for(const c in this.binders){const f=this.binders[c];if(f instanceof _o||f instanceof pi)for(let g=0;g<f.paintVertexAttributes.length;g++)s.push(f.paintVertexAttributes[g].name);else if(f instanceof vo)for(let g=0;g<fi.members.length;g++)s.push(fi.members[g].name)}return s}getBinderUniforms(){const s=[];for(const c in this.binders){const f=this.binders[c];if(f instanceof iu||f instanceof Ul||f instanceof pi)for(const g of f.uniformNames)s.push(g)}return s}getPaintVertexBuffers(){return this._buffers}getUniforms(s,c){const f=[];for(const g in this.binders){const b=this.binders[g];if(b instanceof iu||b instanceof Ul||b instanceof pi){for(const x of b.uniformNames)if(c[x]){const C=b.getBinding(s,c[x],x);f.push({name:x,property:g,binding:C})}}}return f}setUniforms(s,c,f,g){for(const{name:b,property:x,binding:C}of c)this.binders[x].setUniform(C,g,f.get(x),b)}updatePaintBuffers(s){this._buffers=[];for(const c in this.binders){const f=this.binders[c];if(s&&f instanceof vo){const g=s.fromScale===2?f.zoomInPaintVertexBuffer:f.zoomOutPaintVertexBuffer;g&&this._buffers.push(g)}else(f instanceof _o||f instanceof pi)&&f.paintVertexBuffer&&this._buffers.push(f.paintVertexBuffer)}}upload(s){for(const c in this.binders){const f=this.binders[c];(f instanceof _o||f instanceof pi||f instanceof vo)&&f.upload(s)}this.updatePaintBuffers()}destroy(){for(const s in this.binders){const c=this.binders[s];(c instanceof _o||c instanceof pi||c instanceof vo)&&c.destroy()}}}class ia{constructor(s,c,f=()=>!0){this.programConfigurations={};for(const g of s)this.programConfigurations[g.id]=new sp(g,c,f);this.needsUpload=!1,this._featureMap=new Ps,this._bufferOffset=0}populatePaintArrays(s,c,f,g,b,x){for(const C in this.programConfigurations)this.programConfigurations[C].populatePaintArrays(s,c,g,b,x);c.id!==void 0&&this._featureMap.add(c.id,f,this._bufferOffset,s),this._bufferOffset=s,this.needsUpload=!0}updatePaintArrays(s,c,f,g){for(const b of f)this.needsUpload=this.programConfigurations[b.id].updatePaintArrays(s,this._featureMap,c,b,g)||this.needsUpload}get(s){return this.programConfigurations[s]}upload(s){if(this.needsUpload){for(const c in this.programConfigurations)this.programConfigurations[c].upload(s);this.needsUpload=!1}}destroy(){for(const s in this.programConfigurations)this.programConfigurations[s].destroy()}}function op(u,s){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["ga
75pwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[u]||[u.replace(`${s}-`,"").replace(/-/g,"_")]}function ap(u,s,c){const f={color:{source:tu,composite:G},number:{source:A,composite:tu}},g=function(b){return{"line-pattern":{source:zt,composite:zt},"fill-pattern":{source:zt,composite:zt},"fill-extrusion-pattern":{source:zt,composite:zt}}[b]}(u);return g&&g[c]||f[s][c]}Mt("ConstantBinder",iu),Mt("CrossFadedConstantBinder",Ul),Mt("SourceExpressionBinder",_o),Mt("CrossFadedCompositeBinder",vo),Mt("CompositeExpressionBinder",pi),Mt("ProgramConfiguration",sp,{omit:["_buffers"]}),Mt("ProgramConfigurationSet",ia);const su=Math.pow(2,14)-1,b2=-su-1;function ou(u){const s=xt/u.extent,c=u.loadGeometry();for(let f=0;f<c.length;f++){const g=c[f];for(let b=0;b<g.length;b++){const x=g[b],C=Math.round(x.x*s),I=Math.round(x.y*s);x.x=_t(C,b2,su),x.y=_t(I,b2,su),(C<x.x||C>x.x+1||I<x.y||I>x.y+1)&&Xe("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return c}function au(u,s){return{type:u.type,id:u.id,properties:u.properties,geometry:s?ou(u):[]}}const x2=-32768;function PD(u,s,c,f,g){u.emplaceBack(x2+8*s+f,x2+8*c+g)}class W0{constructor(s){this.zoom=s.zoom,this.globalState=s.globalState,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(c=>c.id),this.index=s.index,this.hasPattern=!1,this.layoutVertexArray=new Ne,this.indexArray=new rn,this.segments=new Pr,this.programConfigurations=new ia(s.layers,s.zoom),this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id)}populate(s,c,f){const g=this.layers[0],b=[];let x=null,C=!1,I=g.type==="heatmap";if(g.type==="circle"){const D=g;x=D.layout.get("circle-sort-key"),C=!x.isConstant(),I=I||D.paint.get("circle-pitch-alignment")==="map"}const R=I?c.subdivisionGranularity.circle:1;for(const{feature:D,id:B,index:q,sourceLayerIndex:K}of s){const X=this.layers[0]._featureFilter.needGeometry,ee=au(D,X);if(!this.layers[0]._featureFilter.filter(new pn(this.zoom,{globalState:this.globalState}),ee,f))continue;const ie=C?x.evaluate(ee,{},f):void 0,he={id:B,properties:D.properties,type:D.type,sourceLayerIndex:K,index:q,geometry:X?ee.geometry:ou(D),patterns:{},sortKey:ie};b.push(he)}C&&b.sort((D,B)=>D.sortKey-B.sortKey);for(const D of b){const{geometry:B,index:q,sourceLayerIndex:K}=D,X=s[q].feature;this.addFeature(D,B,q,f,R),c.featureIndex.insert(X,B,q,K,this.index)}}update(s,c,f){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(s,c,this.stateDependentLayers,f)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(s){this.uploaded||(this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,di),this.indexBuffer=s.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(s),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(s,c,f,g,b=1){let x;switch(b){case 1:x=[0,7];break;case 3:x=[0,2,5,7];break;case 5:x=[0,1,3,4,6,7];break;case 7:x=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${b}; valid values are 1, 3, 5, 7.`)}const C=x.length;for(const I of c)for(const R of I){const D=R.x,B=R.y;if(D<0||D>=xt||B<0||B>=xt)continue;const q=this.segments.prepareSegment(C*C,this.layoutVertexArray,this.indexArray,s.sortKey),K=q.vertexLength;for(let X=0;X<C;X++)for(let ee=0;ee<C;ee++)PD(this.layoutVertexArray,D,B,x[ee],x[X]);for(let X=0;X<C-1;X++)for(let ee=0;ee<C-1;ee++){const ie=K+X*C+ee,he=K+(X+1)*C+ee;this.indexArray.emplaceBack(ie,he+1,ie+1),this.indexArray.emplaceBack(ie,he,he+1)}q.vertexLength+=C*C,q.primitiveLength+=(C-1)*(C-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,f,{},g)}}function w2(u,s){for(let c=0;c<u.length;c++)if(Nh(s,u[c]))return!0;for(let c=0;c<s.length;c++)if(Nh(u,s[c]))return!0;return!!K0(u,s)}function AD(u,s,c){return!!Nh(u,s)||!!X0(s,u,c)}function S2(u,s){if(u.length===1)return C2(s,u[0]);for(let c=0;c<s.length;c++){const f=s[c];for(let g=0;g<f.length;g++)if(Nh(u,f[g]))return!0}for(let c=0;c<u.length;c++)if(C2(s,u[c]))return!0;for(let c=0;c<s.length;c++)if(K0(u,s[c]))return!0;return!1}function MD(u,s,c){if(u.length>1){if(K0(u,s))return!0;for(let f=0;f<s.length;f++)if(X0(s[f],u,c))return!0}for(let f=0;f<u.length;f++)if(X0(u[f],s,c))return!0;return!1}function K0(u,s){if(u.length===0||s.length===0)return!1;for(let c=0;c<u.length-1;c++){const f=u[c],g=u[c+1];for(let b=0;b<s.length-1;b++)if(RD(f,g,s[b],s[b+1]))return!0}return!1}function RD(u,s,c,f){return dt(u,c,f)!==dt(s,c,f)&&dt(u,s,c)!==dt(u,s,f)}function X0(u,s,c){const f=c*c;if(s.length===1)return u.distSqr(s[0])<f;for(let g=1;g<s.length;
75g++)if(T2(u,s[g-1],s[g])<f)return!0;return!1}function T2(u,s,c){const f=s.distSqr(c);if(f===0)return u.distSqr(s);const g=((u.x-s.x)*(c.x-s.x)+(u.y-s.y)*(c.y-s.y))/f;return u.distSqr(g<0?s:g>1?c:c.sub(s)._mult(g)._add(s))}function C2(u,s){let c,f,g,b=!1;for(let x=0;x<u.length;x++){c=u[x];for(let C=0,I=c.length-1;C<c.length;I=C++)f=c[C],g=c[I],f.y>s.y!=g.y>s.y&&s.x<(g.x-f.x)*(s.y-f.y)/(g.y-f.y)+f.x&&(b=!b)}return b}function Nh(u,s){let c=!1;for(let f=0,g=u.length-1;f<u.length;g=f++){const b=u[f],x=u[g];b.y>s.y!=x.y>s.y&&s.x<(x.x-b.x)*(s.y-b.y)/(x.y-b.y)+b.x&&(c=!c)}return c}function LD(u,s,c){const f=c[0],g=c[2];if(u.x<f.x&&s.x<f.x||u.x>g.x&&s.x>g.x||u.y<f.y&&s.y<f.y||u.y>g.y&&s.y>g.y)return!1;const b=dt(u,s,c[0]);return b!==dt(u,s,c[1])||b!==dt(u,s,c[2])||b!==dt(u,s,c[3])}function lp(u,s,c){const f=s.paint.get(u).value;return f.kind==="constant"?f.value:c.programConfigurations.get(s.id).getMaxValue(u)}function ly(u){return Math.sqrt(u[0]*u[0]+u[1]*u[1])}function cy(u,s,c,f,g){if(!s[0]&&!s[1])return u;const b=L.convert(s)._mult(g);c==="viewport"&&b._rotate(-f);const x=[];for(let C=0;C<u.length;C++)x.push(u[C].sub(b));return x}let E2,k2;Mt("CircleBucket",W0,{omit:["layers"]});var zD={get paint(){return k2=k2||new Oi({"circle-radius":new Wt(ke.paint_circle["circle-radius"]),"circle-color":new Wt(ke.paint_circle["circle-color"]),"circle-blur":new Wt(ke.paint_circle["circle-blur"]),"circle-opacity":new Wt(ke.paint_circle["circle-opacity"]),"circle-translate":new Ot(ke.paint_circle["circle-translate"]),"circle-translate-anchor":new Ot(ke.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Ot(ke.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Ot(ke.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Wt(ke.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Wt(ke.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Wt(ke.paint_circle["circle-stroke-opacity"])})},get layout(){return E2=E2||new Oi({"circle-sort-key":new Wt(ke.layout_circle["circle-sort-key"])})}};class DD extends hi{constructor(s){super(s,zD)}createBucket(s){return new W0(s)}queryRadius(s){const c=s;return lp("circle-radius",this,c)+lp("circle-stroke-width",this,c)+ly(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:s,feature:c,featureState:f,geometry:g,transform:b,pixelsToTileUnits:x,unwrappedTileID:C,getElevation:I}){const R=cy(s,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-b.bearingInRadians,x),D=this.paint.get("circle-radius").evaluate(c,f)+this.paint.get("circle-stroke-width").evaluate(c,f),B=this.paint.get("circle-pitch-alignment")==="map",q=B?R:function(X,ee,ie,he){return X.map(Ie=>I2(Ie,ee,ie,he))}(R,b,C,I),K=B?D*x:D;for(const X of g)for(const ee of X){const ie=B?ee:I2(ee,b,C,I);let he=K;const Ie=b.projectTileCoordinates(ee.x,ee.y,C,I).signedDistanceFromCamera;if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?he*=Ie/b.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(he*=b.cameraToCenterDistance/Ie),AD(q,ie,he))return!0}return!1}}function I2(u,s,c,f){const g=s.projectTileCoordinates(u.x,u.y,c,f).point;return new L((.5*g.x+.5)*s.width,(.5*-g.y+.5)*s.height)}class P2 extends W0{}let A2;Mt("HeatmapBucket",P2,{omit:["layers"]});var OD={get paint(){return A2=A2||new Oi({"heatmap-radius":new Wt(ke.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Wt(ke.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ot(ke.paint_heatmap["heatmap-intensity"]),"heatmap-color":new eu(ke.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ot(ke.paint_heatmap["heatmap-opacity"])})}};function Y0(u,{width:s,height:c},f,g){if(g){if(g instanceof Uint8ClampedArray)g=new Uint8Array(g.buffer);else if(g.length!==s*c*f)throw new RangeError(`mismatched image size. expected: ${g.length} but got: ${s*c*f}`)}else g=new Uint8Array(s*c*f);return u.width=s,u.height=c,u.data=g,u}function M2(u,{width:s,height:c},f){if(s===u.width&&c===u.height)return;const g=Y0({},{width:s,height:c},f);J0(u,g,{x:0,y:0},{x:0,y:0},{width:Math.min(u.width,s),height:Math.min(u.height,c)},f),u.width=s,u.height=c,u.data=g.data}function J0(u,s,c,f,g,b){if(g.width===0||g.height===0)return s;if(g.width>u.width||g.height>u.height||c.x>u.width-g.width||c.y>u.height-g.height)throw new RangeError("out of range source coordinates for image copy");if(g.width>s.width||g.height>s.height||f.x>s.width-g.width||f.y>s.height-g.height)throw new RangeError("out of range destination coordinates for image copy");const x=u.data,C=s.data;if(x===C)throw new Error("srcData equals dstData, so image is already copied");for(let I=0;I<g.height;I++){const R=((c.y+I)*u.width+c.x)*b,D=((f.y+I)*s.width+f.x)*b;for(let B=0;B<g.width*b;B++)C[D+B]=x[R+B]}return s}class cp{constructor(s,c){Y0(this,s,1,c)}resize(s){M2(this,s,1)}clone(){return new cp({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(s,c,f,g,b){J0(s,c,f,g,b,1)}}class is{constructor(s,c){Y0(this,s,4,c)}resize(s){M2(this,s,4)}replace(s,c){c?this.data.set(s):this.data=s instanceof Uint8ClampedArray?new Uint8Array(s.buffer):s}clone(){return new is({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(s,c,f,g,b){J0(s,c,f,g,b,4)}setPixel(s,c,f){const g=4*(s*this.width+c);this.data[g+0]=Math.round(255*f.r/f.a),this.data[g+1]=Math.round(255*f.g/f.a),this.data[g+2]=Math.round(255*f.b/f.a),this.data[g+3]=Math.round(255*f.a)}}function R2(u){const s={},c=u.resolution||256,f=u.clips?u.clips.length:1,g=u.image||new is({width:c,height:f});
vendor: 9,871 bytes, line 75
75if(Math.log(c)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${c}`);const b=(x,C,I)=>{s[u.evaluationKey]=I;const R=u.expression.evaluate(s);g.setPixel(x/4/c,C/4,R)};if(u.clips)for(let x=0,C=0;x<f;++x,C+=4*c)for(let I=0,R=0;I<c;I++,R+=4){const D=I/(c-1),{start:B,end:q}=u.clips[x];b(C,R,B*(1-D)+q*D)}else for(let x=0,C=0;x<c;x++,C+=4)b(0,C,x/(c-1));return g}Mt("AlphaImage",cp),Mt("RGBAImage",is);const Q0="big-fb";class FD extends hi{createBucket(s){return new P2(s)}constructor(s){super(s,OD),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(s){s==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=R2({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(Q0)&&this.heatmapFbos.delete(Q0)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let L2;var BD={get paint(){return L2=L2||new Oi({"hillshade-illumination-direction":new Ot(ke.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-altitude":new Ot(ke.paint_hillshade["hillshade-illumination-altitude"]),"hillshade-illumination-anchor":new Ot(ke.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Ot(ke.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Ot(ke.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Ot(ke.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Ot(ke.paint_hillshade["hillshade-accent-color"]),"hillshade-method":new Ot(ke.paint_hillshade["hillshade-method"])})}};class ND extends hi{constructor(s){super(s,BD),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let s=this.paint.get("hillshade-illumination-direction").values,c=this.paint.get("hillshade-illumination-altitude").values,f=this.paint.get("hillshade-highlight-color").values,g=this.paint.get("hillshade-shadow-color").values;const b=Math.max(s.length,c.length,f.length,g.length);s=s.concat(Array(b-s.length).fill(s.at(-1))),c=c.concat(Array(b-c.length).fill(c.at(-1))),f=f.concat(Array(b-f.length).fill(f.at(-1))),g=g.concat(Array(b-g.length).fill(g.at(-1)));const x=c.map(Qt);return{directionRadians:s.map(Qt),altitudeRadians:x,shadowColor:g,highlightColor:f}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}let z2;var jD={get paint(){return z2=z2||new Oi({"color-relief-opacity":new Ot(ke["paint_color-relief"]["color-relief-opacity"]),"color-relief-color":new eu(ke["paint_color-relief"]["color-relief-color"])})}};class eb{constructor(s,c,f,g){this.context=s,this.format=f,this.texture=s.gl.createTexture(),this.update(c,g)}update(s,c,f){const{width:g,height:b}=s,x=!(this.size&&this.size[0]===g&&this.size[1]===b||f),{context:C}=this,{gl:I}=C;if(this.useMipmap=!!(c&&c.useMipmap),I.bindTexture(I.TEXTURE_2D,this.texture),C.pixelStoreUnpackFlipY.set(!1),C.pixelStoreUnpack.set(1),C.pixelStoreUnpackPremultiplyAlpha.set(this.format===I.RGBA&&(!c||c.premultiply!==!1)),x)this.size=[g,b],s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement||s instanceof ImageData||Ke(s)?I.texImage2D(I.TEXTURE_2D,0,this.format,this.format,I.UNSIGNED_BYTE,s):I.texImage2D(I.TEXTURE_2D,0,this.format,g,b,0,this.format,I.UNSIGNED_BYTE,s.data);else{const{x:R,y:D}=f||{x:0,y:0};s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement||s instanceof ImageData||Ke(s)?I.texSubImage2D(I.TEXTURE_2D,0,R,D,I.RGBA,I.UNSIGNED_BYTE,s):I.texSubImage2D(I.TEXTURE_2D,0,R,D,g,b,I.RGBA,I.UNSIGNED_BYTE,s.data)}this.useMipmap&&this.isSizePowerOfTwo()&&I.generateMipmap(I.TEXTURE_2D),C.pixelStoreUnpackFlipY.setDefault(),C.pixelStoreUnpack.setDefault(),C.pixelStoreUnpackPremultiplyAlpha.setDefault()}bind(s,c,f){const{context:g}=this,{gl:b}=g;b.bindTexture(b.TEXTURE_2D,this.texture),f!==b.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(f=b.LINEAR),s!==this.filter&&(b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,s),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,f||s),this.filter=s),c!==this.wrap&&(b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,c),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,c),this.wrap=c)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:s}=this.context;s.deleteTexture(this.texture),this.texture=null}}class D2{constructor(s,c,f,g=1,b=1,x=1,C=0){if(this.uid=s,c.height!==c.width)throw new RangeError("DEM tiles must be square");if(f&&!["mapbox","terrarium","custom"].includes(f))return void Xe(`"${f}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=c.height;const I=this.dim=c.height-2;switch(this.data=new Uint32Array(c.data.buffer),f){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=g,this.greenFactor=b,this.blueFactor=x,this.baseShift=C;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let R=0;R<I;R++)this.data[this._idx(-1,R)]=this.data[this._idx(0,R)],this.data[this._idx(I,R)]=this.data[this._idx(I-1,R)],this.data[this._idx(R,-1)]=this.data[this._idx(R,0)],this.data[this._idx(R,I)]=this.data[this._idx(R,I-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(I,-1)]=this.data[this._idx(I-1,0)],this.data[this._idx(-1,I)]=this.data[this._idx(0,I-1)],this.data[this._idx(I,I)]=this.data[this._idx(I-1,I-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let R=0;R<I;R++)for(let D=0;D<I;D++){const B=this.get(R,D);B>this.max&&(this.max=B),B<this.min&&(this.min=B)}}get(s,c){const f=new Uint8Array(this.data.buffer),g=4*this._idx(s,c);return this.unpack(f[g],f[g+1],f[g+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(s,c){if(s<-1||s>=this.dim+1||c<-1||c>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(c+1)*this.stride+(s+1)}unpack(s,c,f){return s*this.redFactor+c*this.greenFactor+f*this.blueFactor-this.baseShift}pack(s){return O2(s,this.getUnpackVector())}getPixels(){return new is({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(s,c,f){if(this.dim!==s.dim)throw new Error("dem dimension mismatch");let g=c*this.dim,b=c*this.dim+this.dim,x=f*this.dim,C=f*this.dim+this.dim;switch(c){case-1:g=b-1;break;case 1:b=g+1}switch(f){case-1:x=C-1;break;case 1:C=x+1}const I=-c*this.dim,R=-f*this.dim;for(let D=x;D<C;D++)for(let B=g;B<b;B++)this.data[this._idx(B,D)]=s.data[this._idx(B+I,D+R)]}}function O2(u,s){const c=s[0],f=s[1],g=s[2],b=s[3],x=Math.min(c,f,g),C=Math.round((u+b)/x);return{r:Math.floor(C*x/c)%256,g:Math.floor(C*x/f)%256,b:Math.floor(C*x/g)%256}}Mt("DEMData",D2);class $D extends hi{constructor(s){super(s,jD)}_createColorRamp(s){const c={elevationStops:[],colorStops:[]},f=this._transitionablePaint._values["color-relief-color"].value.expression;if(f instanceof Vc&&f._styleExpression.expression instanceof zi){this.colorRampExpression=f;const x=f._styleExpression.expression;c.elevationStops=x.labels,c.colorStops=[];for(const C of c.elevationStops)c.colorStops.push(x.evaluate({globals:{elevation:C}}))}if(c.elevationStops.length<1&&(c.elevationStops=[0],c.colorStops=[vr.transparent]),c.elevationStops.length<2&&(c.elevationStops.push(c.elevationStops[0]+1),c.colorStops.push(c.colorStops[0])),c.elevationStops.length<=s)return c;const g={elevationStops:[],colorStops:[]},b=(c.elevationStops.length-1)/(s-1);for(let x=0;x<c.elevationStops.length-.5;x+=b)g.elevationStops.push(c.elevationStops[Math.round(x)]),g.colorStops.push(c.colorStops[Math.round(x)]);return Xe(`Too many colors in specification of ${this.id} color-relief layer, may not render properly.`),g}_colorRampChanged(){return this.colorRampExpression!=this._transitionablePaint._values["color-relief-color"].value.expression}getColorRampTextures(s,c,f){if(this.colorRampTextures&&!this._colorRampChanged())return this.colorRampTextures;const g=this._createColorRamp(c),b=new is({width:g.colorStops.length,height:1}),x=new is({width:g.colorStops.length,height:1});for(let C=0;C<g.elevationStops.length;C++){const I=O2(g.elevationStops[C],f);x.setPixel(0,C,new vr(I.r/255,I.g/255,I.b/255,1)),b.setPixel(0,C,g.colorStops[C])}return this.colorRampTextures={elevationTexture:new eb(s,x,s.gl.RGBA),colorTexture:new eb(s,b,s.gl.RGBA)},this.colorRampTextures}hasOffscreenPass(){return this.visibility!=="none"&&!!this.colorRampTextures}}const UD=An([{name:"a_pos",components:2,type:"Int16"}],4),{members:VD}=UD;function tb(u,s,c){const f=c.patternDependencies;let g=!1;for(const b of s){const x=b.paint.get(`${u}-pattern`);x.isConstant()||(g=!0);const C=x.constantOr(null);C&&(g=!0,f[C.to]=!0,f[C.from]=!0)}return g}function rb(u,s,c,f,g){const b=g.patternDependencies;for(const x of s){const C=x.paint.get(`${u}-pattern`).value;if(C.kind!=="constant"){let I=C.evaluate({zoom:f-1},c,{},g.availableImages),R=C.evaluate({zoom:f},c,{},g.availableImages),D=C.evaluate({zoom:f+1},c,{},g.availableImages);I=I&&I.name?I.name:I,R=R&&R.name?R.name:R,D=D&&D.name?D.name:D,b[I]=!0,b[R]=!0,b[D]=!0,c.patterns[x.id]={min:I,mid:R,max:D}}}return c}function F2(u,s,c,f,g){let b;if(g===function(x,C,I,R){let D=0;for(let B=C,q=I-R;B<I;B+=R)D+=(x[q]-x[B])*(x[B+1]+x[q+1]),q=B;return D}(u,s,c,f)>0)for(let x=s;x<c;x+=f)b=$2(x/f|0,u[x],u[x+1],b);else for(let x=c-f;x>=s;x-=f)b=$2(x/f|0,u[x],u[x+1],b);return b&&jh(b,b.next)&&(fp(b),b=b.next),b}function lu(u,s){if(!u)return u;s||(s=u);let c,f=u;do if(c=!1,f.steiner||!jh(f,f.next)&&Nn(f.prev,f,f.next)!==0)f=f.next;
vendor: 3,883 bytes, line 75
75else{if(fp(f),f=s=f.prev,f===f.next)break;c=!0}while(c||f!==s);return s}function up(u,s,c,f,g,b,x){if(!u)return;!x&&b&&function(I,R,D,B){let q=I;do q.z===0&&(q.z=nb(q.x,q.y,R,D,B)),q.prevZ=q.prev,q.nextZ=q.next,q=q.next;while(q!==I);q.prevZ.nextZ=null,q.prevZ=null,function(K){let X,ee=1;do{let ie,he=K;K=null;let Ie=null;for(X=0;he;){X++;let _e=he,W=0;for(let be=0;be<ee&&(W++,_e=_e.nextZ,_e);be++);let ne=ee;for(;W>0||ne>0&&_e;)W!==0&&(ne===0||!_e||he.z<=_e.z)?(ie=he,he=he.nextZ,W--):(ie=_e,_e=_e.nextZ,ne--),Ie?Ie.nextZ=ie:K=ie,ie.prevZ=Ie,Ie=ie;he=_e}Ie.nextZ=null,ee*=2}while(X>1)}(q)}(u,f,g,b);let C=u;for(;u.prev!==u.next;){const I=u.prev,R=u.next;if(b?GD(u,f,g,b):qD(u))s.push(I.i,u.i,R.i),fp(u),u=R.next,C=R.next;else if((u=R)===C){x?x===1?up(u=HD(lu(u),s),s,c,f,g,b,2):x===2&&ZD(u,s,c,f,g,b):up(lu(u),s,c,f,g,b,1);break}}}function qD(u){const s=u.prev,c=u,f=u.next;if(Nn(s,c,f)>=0)return!1;const g=s.x,b=c.x,x=f.x,C=s.y,I=c.y,R=f.y,D=Math.min(g,b,x),B=Math.min(C,I,R),q=Math.max(g,b,x),K=Math.max(C,I,R);let X=f.next;for(;X!==s;){if(X.x>=D&&X.x<=q&&X.y>=B&&X.y<=K&&hp(g,C,b,I,x,R,X.x,X.y)&&Nn(X.prev,X,X.next)>=0)return!1;X=X.next}return!0}function GD(u,s,c,f){const g=u.prev,b=u,x=u.next;if(Nn(g,b,x)>=0)return!1;const C=g.x,I=b.x,R=x.x,D=g.y,B=b.y,q=x.y,K=Math.min(C,I,R),X=Math.min(D,B,q),ee=Math.max(C,I,R),ie=Math.max(D,B,q),he=nb(K,X,s,c,f),Ie=nb(ee,ie,s,c,f);let _e=u.prevZ,W=u.nextZ;for(;_e&&_e.z>=he&&W&&W.z<=Ie;){if(_e.x>=K&&_e.x<=ee&&_e.y>=X&&_e.y<=ie&&_e!==g&&_e!==x&&hp(C,D,I,B,R,q,_e.x,_e.y)&&Nn(_e.prev,_e,_e.next)>=0||(_e=_e.prevZ,W.x>=K&&W.x<=ee&&W.y>=X&&W.y<=ie&&W!==g&&W!==x&&hp(C,D,I,B,R,q,W.x,W.y)&&Nn(W.prev,W,W.next)>=0))return!1;W=W.nextZ}for(;_e&&_e.z>=he;){if(_e.x>=K&&_e.x<=ee&&_e.y>=X&&_e.y<=ie&&_e!==g&&_e!==x&&hp(C,D,I,B,R,q,_e.x,_e.y)&&Nn(_e.prev,_e,_e.next)>=0)return!1;_e=_e.prevZ}for(;W&&W.z<=Ie;){if(W.x>=K&&W.x<=ee&&W.y>=X&&W.y<=ie&&W!==g&&W!==x&&hp(C,D,I,B,R,q,W.x,W.y)&&Nn(W.prev,W,W.next)>=0)return!1;W=W.nextZ}return!0}function HD(u,s){let c=u;do{const f=c.prev,g=c.next.next;!jh(f,g)&&N2(f,c,c.next,g)&&dp(f,g)&&dp(g,f)&&(s.push(f.i,c.i,g.i),fp(c),fp(c.next),c=u=g),c=c.next}while(c!==u);return lu(c)}function ZD(u,s,c,f,g,b){let x=u;do{let C=x.next.next;for(;C!==x.prev;){if(x.i!==C.i&&JD(x,C)){let I=j2(x,C);return x=lu(x,x.next),I=lu(I,I.next),up(x,s,c,f,g,b,0),void up(I,s,c,f,g,b,0)}C=C.next}x=x.next}while(x!==u)}function WD(u,s){let c=u.x-s.x;return c===0&&(c=u.y-s.y,c===0)&&(c=(u.next.y-u.y)/(u.next.x-u.x)-(s.next.y-s.y)/(s.next.x-s.x)),c}function KD(u,s){const c=function(g,b){let x=b;const C=g.x,I=g.y;let R,D=-1/0;if(jh(g,x))return x;do{if(jh(g,x.next))return x.next;if(I<=x.y&&I>=x.next.y&&x.next.y!==x.y){const ee=x.x+(I-x.y)*(x.next.x-x.x)/(x.next.y-x.y);if(ee<=C&&ee>D&&(D=ee,R=x.x<x.next.x?x:x.next,ee===C))return R}x=x.next}while(x!==b);if(!R)return null;const B=R,q=R.x,K=R.y;let X=1/0;x=R;do{if(C>=x.x&&x.x>=q&&C!==x.x&&B2(I<K?C:D,I,q,K,I<K?D:C,I,x.x,x.y)){const ee=Math.abs(I-x.y)/(C-x.x);dp(x,g)&&(ee<X||ee===X&&(x.x>R.x||x.x===R.x&&XD(R,x)))&&(R=x,X=ee)}x=x.next}while(x!==B);return R}(u,s);if(!c)return s;const f=j2(c,u);return lu(f,f.next),lu(c,c.next)}function XD(u,s){return Nn(u.prev,u,s.prev)<0&&Nn(s.next,u,u.next)<0}function nb(u,s,c,f,g){return(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=(u-c)*g|0)|u<<8))|u<<4))|u<<2))|u<<1))|(s=1431655765&((s=858993459&((s=252645135&((s=16711935&((s=(s-f)*g|0)|s<<8))|s<<4))|s<<2))|s<<1))<<1}function YD(u){let s=u,c=u;do(s.x<c.x||s.x===c.x&&s.y<c.y)&&(c=s),s=s.next;while(s!==u);return c}function B2(u,s,c,f,g,b,x,C){return(g-x)*(s-C)>=(u-x)*(b-C)&&(u-x)*(f-C)>=(c-x)*(s-C)&&(c-x)*(b-C)>=(g-x)*(f-C)}function hp(u,s,c,f,g,b,x,C){return!(u===x&&s===C)&&B2(u,s,c,f,g,b,x,C)}function JD(u,s){return u.next.i!==s.i&&u.prev.i!==s.i&&!function(c,f){let g=c;do{if(g.i!==c.i&&g.next.i!==c.i&&g.i!==f.i&&g.next.i!==f.i&&N2(g,g.next,c,f))return!0;g=g.next}
vendor: 16,459 bytes, line 75
75while(g!==c);return!1}(u,s)&&(dp(u,s)&&dp(s,u)&&function(c,f){let g=c,b=!1;const x=(c.x+f.x)/2,C=(c.y+f.y)/2;do g.y>C!=g.next.y>C&&g.next.y!==g.y&&x<(g.next.x-g.x)*(C-g.y)/(g.next.y-g.y)+g.x&&(b=!b),g=g.next;while(g!==c);return b}(u,s)&&(Nn(u.prev,u,s.prev)||Nn(u,s.prev,s))||jh(u,s)&&Nn(u.prev,u,u.next)>0&&Nn(s.prev,s,s.next)>0)}function Nn(u,s,c){return(s.y-u.y)*(c.x-s.x)-(s.x-u.x)*(c.y-s.y)}function jh(u,s){return u.x===s.x&&u.y===s.y}function N2(u,s,c,f){const g=hy(Nn(u,s,c)),b=hy(Nn(u,s,f)),x=hy(Nn(c,f,u)),C=hy(Nn(c,f,s));return g!==b&&x!==C||!(g!==0||!uy(u,c,s))||!(b!==0||!uy(u,f,s))||!(x!==0||!uy(c,u,f))||!(C!==0||!uy(c,s,f))}function uy(u,s,c){return s.x<=Math.max(u.x,c.x)&&s.x>=Math.min(u.x,c.x)&&s.y<=Math.max(u.y,c.y)&&s.y>=Math.min(u.y,c.y)}function hy(u){return u>0?1:u<0?-1:0}function dp(u,s){return Nn(u.prev,u,u.next)<0?Nn(u,s,u.next)>=0&&Nn(u,u.prev,s)>=0:Nn(u,s,u.prev)<0||Nn(u,u.next,s)<0}function j2(u,s){const c=ib(u.i,u.x,u.y),f=ib(s.i,s.x,s.y),g=u.next,b=s.prev;return u.next=s,s.prev=u,c.next=g,g.prev=c,f.next=c,c.prev=f,b.next=f,f.prev=b,f}function $2(u,s,c,f){const g=ib(u,s,c);return f?(g.next=f.next,g.prev=f,f.next.prev=g,f.next=g):(g.prev=g,g.next=g),g}function fp(u){u.next.prev=u.prev,u.prev.next=u.next,u.prevZ&&(u.prevZ.nextZ=u.nextZ),u.nextZ&&(u.nextZ.prevZ=u.prevZ)}function ib(u,s,c){return{i:u,x:s,y:c,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class $h{constructor(s,c){if(c>s)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=s,this._minGranularity=c}getGranularityForZoomLevel(s){return Math.max(Math.floor(this._baseZoomGranularity/(1<<s)),this._minGranularity,1)}}class dy{constructor(s){this.fill=s.fill,this.line=s.line,this.tile=s.tile,this.stencil=s.stencil,this.circle=s.circle}}dy.noSubdivision=new dy({fill:new $h(0,0),line:new $h(0,0),tile:new $h(0,0),stencil:new $h(0,0),circle:1}),Mt("SubdivisionGranularityExpression",$h),Mt("SubdivisionGranularitySetting",dy);const Uh=-32768,pp=32767;class QD{constructor(s,c){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=s,this._granularityCellSize=xt/s,this._canonical=c}_getKey(s,c){return(s+=32768)<<16|c+32768}_vertexToIndex(s,c){if(s<-32768||c<-32768||s>32767||c>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");const f=0|Math.round(s),g=0|Math.round(c),b=this._getKey(f,g);if(this._vertexDictionary.has(b))return this._vertexDictionary.get(b);const x=this._vertexBuffer.length/2;return this._vertexDictionary.set(b,x),this._vertexBuffer.push(f,g),x}_subdivideTrianglesScanline(s){if(this._granularity<2)return function(g,b){const x=[];for(let C=0;C<b.length;C+=3){const I=b[C],R=b[C+1],D=b[C+2],B=g[2*I],q=g[2*I+1];(g[2*R]-B)*(g[2*D+1]-q)-(g[2*R+1]-q)*(g[2*D]-B)>0?(x.push(I),x.push(D),x.push(R)):(x.push(I),x.push(R),x.push(D))}return x}(this._vertexBuffer,s);const c=[],f=s.length;for(let g=0;g<f;g+=3){const b=[s[g+0],s[g+1],s[g+2]],x=[this._vertexBuffer[2*s[g+0]+0],this._vertexBuffer[2*s[g+0]+1],this._vertexBuffer[2*s[g+1]+0],this._vertexBuffer[2*s[g+1]+1],this._vertexBuffer[2*s[g+2]+0],this._vertexBuffer[2*s[g+2]+1]];let C=1/0,I=1/0,R=-1/0,D=-1/0;for(let ee=0;ee<3;ee++){const ie=x[2*ee],he=x[2*ee+1];C=Math.min(C,ie),R=Math.max(R,ie),I=Math.min(I,he),D=Math.max(D,he)}if(C===R||I===D)continue;const B=Math.floor(C/this._granularityCellSize),q=Math.ceil(R/this._granularityCellSize),K=Math.floor(I/this._granularityCellSize),X=Math.ceil(D/this._granularityCellSize);if(B!==q||K!==X)for(let ee=K;ee<X;ee++){const ie=this._scanlineGenerateVertexRingForCellRow(ee,x,b);eO(this._vertexBuffer,ie,c)}else c.push(...b)}return c}_scanlineGenerateVertexRingForCellRow(s,c,f){const g=s*this._granularityCellSize,b=g+this._granularityCellSize,x=[];for(let C=0;C<3;C++){const I=c[2*C],R=c[2*C+1],D=c[2*(C+1)%6],B=c[(2*(C+1)+1)%6],q=c[2*(C+2)%6],K=c[(2*(C+2)+1)%6],X=D-I,ee=B-R,ie=X===0,he=ee===0,Ie=(g-R)/ee,_e=(b-R)/ee,W=Math.min(Ie,_e),ne=Math.max(Ie,_e);if(!he&&(W>=1||ne<=0)||he&&(R<g||R>b)){B>=g&&B<=b&&x.push(f[(C+1)%3]);continue}!he&&W>0&&x.push(this._vertexToIndex(I+X*W,R+ee*W));const be=I+X*Math.max(W,0),$e=I+X*Math.min(ne,1);ie||this._generateIntraEdgeVertices(x,I,R,D,B,be,$e),!he&&ne<1&&x.push(this._vertexToIndex(I+X*ne,R+ee*ne)),(he||B>=g&&B<=b)&&x.push(f[(C+1)%3]),!he&&(B<=g||B>=b)&&this._generateInterEdgeVertices(x,I,R,D,B,q,K,$e,g,b)}return x}_generateIntraEdgeVertices(s,c,f,g,b,x,C){const I=g-c,R=b-f,D=R===0,B=D?Math.min(c,g):Math.min(x,C),q=D?Math.max(c,g):Math.max(x,C),K=Math.floor(B/this._granularityCellSize)+1,X=Math.ceil(q/this._granularityCellSize)-1;if(D?c<g:x<C)for(let ee=K;ee<=X;ee++){const ie=ee*this._granularityCellSize;s.push(this._vertexToIndex(ie,f+R*(ie-c)/I))}else for(let ee=X;ee>=K;ee--){const ie=ee*this._granularityCellSize;s.push(this._vertexToIndex(ie,f+R*(ie-c)/I))}}_generateInterEdgeVertices(s,c,f,g,b,x,C,I,R,D){const B=b-f,q=x-g,K=C-b,X=(R-b)/K,ee=(D-b)/K,ie=Math.min(X,ee),he=Math.max(X,ee),Ie=g+q*ie;let _e=Math.floor(Math.min(Ie,I)/this._granularityCellSize)+1,W=Math.ceil(Math.max(Ie,I)/this._granularityCellSize)-1,ne=I<Ie;const be=K===0;if(be&&(C===R||C===D))return;if(be||ie>=1||he<=0){const ct=f-C,Ge=x+(c-x)*Math.min((R-C)/ct,(D-C)/ct);_e=Math.floor(Math.min(Ge,I)/this._granularityCellSize)+1,W=Math.ceil(Math.max(Ge,I)/this._granularityCellSize)-1,ne=I<Ge}const $e=B>0?D:R;if(ne)for(let ct=_e;ct<=W;ct++)s.push(this._vertexToIndex(ct*this._granularityCellSize,$e));else for(let ct=W;ct>=_e;ct--)s.push(this._vertexToIndex(ct*this._granularityCellSize,$e))}_generateOutline(s){const c=[];for(const f of s){const g=cu(f,this._granularity,!0),b=this._pointArrayToIndices(g),x=[];for(let C=1;C<b.length;C++)x.push(b[C-1]),x.push(b[C]);c.push(x)}return c}_handlePoles(s){let c=!1,f=!1;this._canonical&&(this._canonical.y===0&&(c=!0),this._canonical.y===(1<<this._canonical.z)-1&&(f=!0)),(c||f)&&this._fillPoles(s,c,f)}_ensureNoPoleVertices(){const s=this._vertexBuffer;for(let c=0;c<s.length;c+=2){const f=s[c+1];f===Uh&&(s[c+1]=-32767),f===pp&&(s[c+1]=32766)}}_generatePoleQuad(s,c,f,g,b,x){g>b!=(x===Uh)?(s.push(c),s.push(f),s.push(this._vertexToIndex(g,x)),s.push(f),s.push(this._vertexToIndex(b,x)),s.push(this._vertexToIndex(g,x))):(s.push(f),s.push(c),s.push(this._vertexToIndex(g,x)),s.push(this._vertexToIndex(b,x)),s.push(f),s.push(this._vertexToIndex(g,x)))}_fillPoles(s,c,f){const g=this._vertexBuffer,b=xt,x=s.length;for(let C=2;C<x;C+=3){const I=s[C-2],R=s[C-1],D=s[C],B=g[2*I],q=g[2*I+1],K=g[2*R],X=g[2*R+1],ee=g[2*D],ie=g[2*D+1];c&&(q===0&&X===0&&this._generatePoleQuad(s,I,R,B,K,Uh),X===0&&ie===0&&this._generatePoleQuad(s,R,D,K,ee,Uh),ie===0&&q===0&&this._generatePoleQuad(s,D,I,ee,B,Uh)),f&&(q===b&&X===b&&this._generatePoleQuad(s,I,R,B,K,pp),X===b&&ie===b&&this._generatePoleQuad(s,R,D,K,ee,pp),ie===b&&q===b&&this._generatePoleQuad(s,D,I,ee,B,pp))}}_initializeVertices(s){for(let c=0;c<s.length;c+=2)this._vertexToIndex(s[c],s[c+1])}subdividePolygonInternal(s,c){if(this._used)throw new Error("Subdivision: multiple use not allowed.");this._used=!0;const{flattened:f,holeIndices:g}=function(C){const I=[],R=[];for(const D of C)if(D.length!==0){D!==C[0]&&I.push(R.length/2);for(let B=0;B<D.length;B++)R.push(D[B].x),R.push(D[B].y)}return{flattened:R,holeIndices:I}}(s);let b;this._initializeVertices(f);try{const C=function(R,D,B=2){const q=D&&D.length,K=q?D[0]*B:R.length;let X=F2(R,0,K,B,!0);const ee=[];if(!X||X.next===X.prev)return ee;let ie,he,Ie;if(q&&(X=function(_e,W,ne,be){const $e=[];for(let ct=0,Ge=W.length;ct<Ge;ct++){const Ye=F2(_e,W[ct]*be,ct<Ge-1?W[ct+1]*be:_e.length,be,!1);Ye===Ye.next&&(Ye.steiner=!0),$e.push(YD(Ye))}$e.sort(WD);for(let ct=0;ct<$e.length;ct++)ne=KD($e[ct],ne);return ne}(R,D,X,B)),R.length>80*B){ie=1/0,he=1/0;let _e=-1/0,W=-1/0;for(let ne=B;ne<K;ne+=B){const be=R[ne],$e=R[ne+1];be<ie&&(ie=be),$e<he&&(he=$e),be>_e&&(_e=be),$e>W&&(W=$e)}Ie=Math.max(_e-ie,W-he),Ie=Ie!==0?32767/Ie:0}return up(X,ee,B,ie,he,Ie,0),ee}(f,g),I=this._convertIndices(f,C);b=this._subdivideTrianglesScanline(I)}catch(C){console.error(C)}let x=[];return c&&(x=this._generateOutline(s)),this._ensureNoPoleVertices(),this._handlePoles(b),{verticesFlattened:this._vertexBuffer,indicesTriangles:b,indicesLineList:x}}_convertIndices(s,c){const f=[];for(let g=0;g<c.length;g++)f.push(this._vertexToIndex(s[2*c[g]],s[2*c[g]+1]));return f}_pointArrayToIndices(s){const c=[];for(let f=0;f<s.length;f++){const g=s[f];c.push(this._vertexToIndex(g.x,g.y))}return c}}function U2(u,s,c,f=!0){return new QD(c,s).subdividePolygonInternal(u,f)}function cu(u,s,c=!1){if(!u||u.length<1)return[];if(u.length<2)return[];const f=u[0],g=u[u.length-1],b=c&&(f.x!==g.x||f.y!==g.y);if(s<2)return b?[...u,u[0]]:[...u];const x=Math.floor(xt/s),C=[];C.push(new L(u[0].x,u[0].y));const I=u.length,R=b?I:I-1;for(let D=0;D<R;D++){const B=u[D],q=D<I-1?u[D+1]:u[0],K=B.x,X=B.y,ee=q.x,ie=q.y,he=K!==ee,Ie=X!==ie;if(!he&&!Ie)continue;const _e=ee-K,W=ie-X,ne=Math.abs(_e),be=Math.abs(W);let $e=K,ct=X;for(;;){const Ye=_e>0?(Math.floor($e/x)+1)*x:(Math.ceil($e/x)-1)*x,gt=W>0?(Math.floor(ct/x)+1)*x:(Math.ceil(ct/x)-1)*x,ht=Math.abs($e-Ye),yt=Math.abs(ct-gt),rt=Math.abs($e-ee),Dt=Math.abs(ct-ie),Zt=he?ht/ne:Number.POSITIVE_INFINITY,Ut=Ie?yt/be:Number.POSITIVE_INFINITY;if((rt<=ht||!he)&&(Dt<=yt||!Ie))break;if(Zt<Ut&&he||!Ie){$e=Ye,ct+=W*Zt;const Bt=new L($e,Math.round(ct));C[C.length-1].x===Bt.x&&C[C.length-1].y===Bt.y||C.push(Bt)}else{$e+=_e*Ut,ct=gt;const Bt=new L(Math.round($e),ct);C[C.length-1].x===Bt.x&&C[C.length-1].y===Bt.y||C.push(Bt)}}const Ge=new L(ee,ie);C[C.length-1].x===Ge.x&&C[C.length-1].y===Ge.y||C.push(Ge)}return C}function eO(u,s,c){if(s.length===0)throw new Error("Subdivision vertex ring is empty.");let f=0,g=u[2*s[0]];for(let I=1;I<s.length;I++){const R=u[2*s[I]];R<g&&(g=R,f=I)}const b=s.length;let x=f,C=(x+1)%b;for(;;){const I=x-1>=0?x-1:b-1,R=(C+1)%b,D=u[2*s[I]],B=u[2*s[R]],q=u[2*s[x]],K=u[2*s[x]+1],X=u[2*s[C]+1];let ee=!1;if(D<B)ee=!0;else if(D>B)ee=!1;else{const ie=X-K,he=-(u[2*s[C]]-q),Ie=K<X?1:-1;((D-q)*ie+(u[2*s[I]+1]-K)*he)*Ie>((B-q)*ie+(u[2*s[R]+1]-K)*he)*Ie&&(ee=!0)}if(ee){const ie=s[I],he=s[x],Ie=s[C];ie!==he&&ie!==Ie&&he!==Ie&&c.push(Ie,he,ie),x--,x<0&&(x=b-1)}else{const ie=s[R],he=s[x],Ie=s[C];ie!==he&&ie!==Ie&&he!==Ie&&c.push(Ie,he,ie),C++,C>=b&&(C=0)}if(I===R)break}}function V2(u,s,c,f,g,b,x,C,I){const R=g.length/2,D=x&&C&&I;if(R<Pr.MAX_VERTEX_ARRAY_LENGTH){const B=s.prepareSegment(R,c,f),q=B.vertexLength;for(let ee=0;ee<b.length;ee+=3)f.emplaceBack(q+b[ee],q+b[ee+1],q+b[ee+2]);let K,X;B.vertexLength+=R,B.primitiveLength+=b.length/3,D&&(X=x.prepareSegment(R,c,C),K=X.vertexLength,X.vertexLength+=R);for(let ee=0;ee<g.length;ee+=2)u(g[ee],g[ee+1]);if(D)for(let ee=0;ee<I.length;ee++){const ie=I[ee];for(let he=1;he<ie.length;he+=2)C.emplaceBack(K+ie[he-1],K+ie[he]);X.primitiveLength+=ie.length/2}}else(function(B,q,K,X,ee,ie){const he=[];for(let be=0;be<X.length/2;be++)he.push(-1);const Ie={count:0};let _e=0,W=B.getOrCreateLatestSegment(q,K),ne=W.vertexLength;for(let be=2;be<ee.length;be+=3){const $e=ee[be-2],ct=ee[be-1],Ge=ee[be];let Ye=he[$e]<_e,gt=he[ct]<_e,ht=he[Ge]<_e;W.vertexLength+((Ye?1:0)+(gt?1:0)+(ht?1:0))>Pr.MAX_VERTEX_ARRAY_LENGTH&&(W=B.createNewSegment(q,K),_e=Ie.count,Ye=!0,gt=!0,ht=!0,ne=0);const yt=mp(he,X,ie,Ie,$e,Ye,W),rt=mp(he,X,ie,Ie,ct,gt,W),Dt=mp(he,X,ie,Ie,Ge,ht,W);K.emplaceBack(ne+yt-_e,ne+rt-_e,ne+Dt-_e),W.primitiveLength++}})(s,c,f,g,b,u),D&&function(B,q,K,X,ee,ie){const he=[];for(let be=0;be<X.length/2;be++)he.push(-1);const Ie={count:0};let _e=0,W=B.getOrCreateLatestSegment(q,K),ne=W.vertexLength;for(let be=0;be<ee.length;be++){const $e=ee[be];for(let ct=1;ct<ee[be].length;ct+=2){const Ge=$e[ct-1],Ye=$e[ct];let gt=he[Ge]<_e,ht=he[Ye]<_e;W.vertexLength+((gt?1:0)+(ht?1:0))>Pr.MAX_VERTEX_ARRAY_LENGTH&&(W=B.createNewSegment(q,K),_e=Ie.count,gt=!0,ht=!0,ne=0);const yt=mp(he,X,ie,Ie,Ge,gt,W),rt=mp(he,X,ie,Ie,Ye,ht,W);K.emplaceBack(ne+yt-_e,ne+rt-_e),W.primitiveLength++}}}(x,c,C,g,I,u),s.forceNewSegmentOnNextPrepare(),x==null||x.forceNewSegmentOnNextPrepare()}function mp(u,s,c,f,g,b,x){if(b){const C=f.count;return c(s[2*g],s[2*g+1]),u[g]=f.count,f.count++,x.vertexLength++,C}return u[g]}class sb{constructor(s){this.zoom=s.zoom,this.globalState=s.globalState,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(c=>c.id),this.index=s.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new qe,this.indexArray=new rn,this.indexArray2=new Jr,this.programConfigurations=new ia(s.layers,s.zoom),this.segments=new Pr,this.segments2=new Pr,this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id)}populate(s,c,f){this.hasPattern=tb("fill",this.layers,c);const g=this.layers[0].layout.get("fill-sort-key"),b=!g.isConstant(),x=[];for(const{feature:C,id:I,index:R,sourceLayerIndex:D}of s){const B=this.layers[0]._featureFilter.needGeometry,q=au(C,B);if(!this.layers[0]._featureFilter.filter(new pn(this.zoom,{globalState:this.globalState}),q,f))continue;const K=b?g.evaluate(q,{},f,c.availableImages):void 0,X={id:I,properties:C.properties,type:C.type,sourceLayerIndex:D,index:R,geometry:B?q.geometry:ou(C),patterns:{},sortKey:K};x.push(X)}b&&x.sort((C,I)=>C.sortKey-I.sortKey);for(const C of x){const{geometry:I,index:R,sourceLayerIndex:D}=C;if(this.hasPattern){const B=rb("fill",this.layers,C,this.zoom,c);this.patternFeatures.push(B)}else this.addFeature(C,I,R,f,{},c.subdivisionGranularity);c.featureIndex.insert(s[R].feature,I,R,D,this.index)}}update(s,c,f){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(s,c,this.stateDependentLayers,f)}addFeatures(s,c,f){for(const g of this.patternFeatures)this.addFeature(g,g.geometry,g.index,c,f,s.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(s){this.uploaded||(this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,VD),this.indexBuffer=s.createIndexBuffer(this.indexArray),this.indexBuffer2=s.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(s),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(s,c,f,g,b,x){for(const C of fh(c,500)){const I=U2(C,g,x.fill.getGranularityForZoomLevel(g.z)),R=this.layoutVertexArray;V2((D,B)=>{R.emplaceBack(D,B)},this.segments,this.layoutVertexArray,this.indexArray,I.verticesFlattened,I.indicesTriangles,this.segments2,this.indexArray2,I.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,f,b,g)}}let q2,G2;Mt("FillBucket",sb,{omit:["layers","patternFeatures"]});var tO={get paint(){return G2=G2||new Oi({"fill-antialias":new Ot(ke.paint_fill["fill-antialias"]),"fill-opacity":new Wt(ke.paint_fill["fill-opacity"]),"fill-color":new Wt(ke.paint_fill["fill-color"]),"fill-outline-color":new Wt(ke.paint_fill["fill-outline-color"]),"fill-translate":new Ot(ke.paint_fill["fill-translate"]),"fill-translate-anchor":new Ot(ke.paint_fill["fill-translate-anchor"]),"fill-pattern":new Oh(ke.paint_fill["fill-pattern"])})},get layout(){return q2=q2||new Oi({"fill-sort-key":new Wt(ke.layout_fill["fill-sort-key"])})}};class rO extends hi{constructor(s){super(s,tO)}recalculate(s,c){super.recalculate(s,c);const f=this.paint._values["fill-outline-color"];f.value.kind==="constant"&&f.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(s){return new sb(s)}queryRadius(){return ly(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:s,geometry:c,transform:f,pixelsToTileUnits:g}){return S2(cy(s,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-f.bearingInRadians,g),c)}isTileClipped(){return!0}}const nO=An([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),iO=An([{name:"a_centroid",components:2,type:"Int16"}],4),{members:sO}=nO;var ob,H2,ab,Z2,lb,W2,K2,fy={};function X2(){if(H2)return ob;H2=1;var u=k();function s(g,b,x,C,I){this.properties={},this.extent=x,this.type=0,this._pbf=g,this._geometry=-1,this._keys=C,this._values=I,g.readFields(c,this,b)}function c(g,b,x){g==1?b.id=x.readVarint():g==2?function(C,I){for(var R=C.readVarint()+C.pos;C.pos<R;
75){var D=I._keys[C.readVarint()],B=I._values[C.readVarint()];I.properties[D]=B}}(x,b):g==3?b.type=x.readVarint():g==4&&(b._geometry=x.pos)}function f(g){for(var b,x,C=0,I=0,R=g.length,D=R-1;I<R;D=I++)C+=((x=g[D]).x-(b=g[I]).x)*(b.y+x.y);return C}return ob=s,s.types=["Unknown","Point","LineString","Polygon"],s.prototype.loadGeometry=function(){var g=this._pbf;g.pos=this._geometry;for(var b,x=g.readVarint()+g.pos,C=1,I=0,R=0,D=0,B=[];g.pos<x;){if(I<=0){var q=g.readVarint();C=7&q,I=q>>3}if(I--,C===1||C===2)R+=g.readSVarint(),D+=g.readSVarint(),C===1&&(b&&B.push(b),b=[]),b.push(new u(R,D));else{if(C!==7)throw new Error("unknown command "+C);b&&b.push(b[0].clone())}}return b&&B.push(b),B},s.prototype.bbox=function(){var g=this._pbf;g.pos=this._geometry;for(var b=g.readVarint()+g.pos,x=1,C=0,I=0,R=0,D=1/0,B=-1/0,q=1/0,K=-1/0;g.pos<b;){if(C<=0){var X=g.readVarint();x=7&X,C=X>>3}if(C--,x===1||x===2)(I+=g.readSVarint())<D&&(D=I),I>B&&(B=I),(R+=g.readSVarint())<q&&(q=R),R>K&&(K=R);else if(x!==7)throw new Error("unknown command "+x)}return[D,q,B,K]},s.prototype.toGeoJSON=function(g,b,x){var C,I,R=this.extent*Math.pow(2,x),D=this.extent*g,B=this.extent*b,q=this.loadGeometry(),K=s.types[this.type];function X(he){for(var Ie=0;Ie<he.length;Ie++){var _e=he[Ie];he[Ie]=[360*(_e.x+D)/R-180,360/Math.PI*Math.atan(Math.exp((180-360*(_e.y+B)/R)*Math.PI/180))-90]}}switch(this.type){case 1:var ee=[];for(C=0;C<q.length;C++)ee[C]=q[C][0];X(q=ee);break;case 2:for(C=0;C<q.length;C++)X(q[C]);break;case 3:for(q=function(he){var Ie=he.length;if(Ie<=1)return[he];for(var _e,W,ne=[],be=0;be<Ie;be++){var $e=f(he[be]);$e!==0&&(W===void 0&&(W=$e<0),W===$e<0?(_e&&ne.push(_e),_e=[he[be]]):_e.push(he[be]))}return _e&&ne.push(_e),ne}(q),C=0;C<q.length;C++)for(I=0;I<q[C].length;I++)X(q[C][I])}q.length===1?q=q[0]:K="Multi"+K;var ie={type:"Feature",geometry:{type:K,coordinates:q},properties:this.properties};return"id"in this&&(ie.id=this.id),ie},ob}function Y2(){if(Z2)return ab;Z2=1;var u=X2();function s(f,g){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=f,this._keys=[],this._values=[],this._features=[],f.readFields(c,this,g),this.length=this._features.length}function c(f,g,b){f===15?g.version=b.readVarint():f===1?g.name=b.readString():f===5?g.extent=b.readVarint():f===2?g._features.push(b.pos):f===3?g._keys.push(b.readString()):f===4&&g._values.push(function(x){for(var C=null,I=x.readVarint()+x.pos;x.pos<I;){var R=x.readVarint()>>3;C=R===1?x.readString():R===2?x.readFloat():R===3?x.readDouble():R===4?x.readVarint64():R===5?x.readVarint():R===6?x.readSVarint():R===7?x.readBoolean():null}return C}(b))}return ab=s,s.prototype.feature=function(f){if(f<0||f>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[f];var g=this._pbf.readVarint()+this._pbf.pos;return new u(this._pbf,g,this.extent,this._keys,this._values)},ab}function J2(){return K2||(K2=1,fy.VectorTile=function(){if(W2)return lb;W2=1;var u=Y2();function s(c,f,g){if(c===3){var b=new u(g,g.readVarint()+g.pos);b.length&&(f[b.name]=b)}}return lb=function(c,f){this.layers=c.readFields(s,{},f)},lb}(),fy.VectorTileFeature=X2(),fy.VectorTileLayer=Y2()),fy}var gp=y(J2());const oO=gp.VectorTileFeature.types,cb=Math.pow(2,13);function yp(u,s,c,f,g,b,x,C){u.emplaceBack(s,c,2*Math.floor(f*cb)+x,g*cb*2,b*cb*2,Math.round(C))}class ub{constructor(s){this.zoom=s.zoom,this.globalState=s.globalState,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(c=>c.id),this.index=s.index,this.hasPattern=!1,this.layoutVertexArray=new wt,this.centroidVertexArray=new Be,this.indexArray=new rn,this.programConfigurations=new ia(s.layers,s.zoom),this.segments=new Pr,this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id)}populate(s,c,f){this.features=[],this.hasPattern=tb("fill-extrusion",this.layers,c);for(const{feature:g,id:b,index:x,sourceLayerIndex:C}of s){const I=this.layers[0]._featureFilter.needGeometry,R=au(g,I);if(!this.layers[0]._featureFilter.filter(new pn(this.zoom,{globalState:this.globalState}),R,f))continue;const D={id:b,sourceLayerIndex:C,index:x,geometry:I?R.geometry:ou(g),properties:g.properties,type:g.type,patterns:{}};this.hasPattern?this.features.push(rb("fill-extrusion",this.layers,D,this.zoom,c)):this.addFeature(D,D.geometry,x,f,{},c.subdivisionGranularity),c.featureIndex.insert(g,D.geometry,x,C,this.index,!0)}}addFeatures(s,c,f){for(const g of this.features){const{geometry:b}=g;this.addFeature(g,b,g.index,c,f,s.subdivisionGranularity)}}update(s,c,f){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(s,c,this.stateDependentLayers,f)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(s){this.uploaded||(this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,sO),this.centroidVertexBuffer=s.createVertexBuffer(this.centroidVertexArray,iO.members,!0),this.indexBuffer=s.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(s),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(s,c,f,g,b,x){for(const C of fh(c,500)){const I={x:0,y:0,sampleCount:0},R=this.layoutVertexArray.length;this.processPolygon(I,g,s,C,x);const D=this.layoutVertexArray.length-R,B=Math.floor(I.x/I.sampleCount),q=Math.floor(I.y/I.sampleCount);for(let K=0;K<D;K++)this.centroidVertexArray.emplaceBack(B,q)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,f,b,g)}processPolygon(s,c,f,g,b){if(g.length<1||Q2(g[0]))return;for(const B of g)B.length!==0&&aO(s,B);const x={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},C=b.fill.getGranularityForZoomLevel(c.z),I=oO[f.type]==="Polygon";
vendor: 4,601 bytes, line 75
75for(const B of g){if(B.length===0||Q2(B))continue;const q=cu(B,C,I);this._generateSideFaces(q,x)}if(!I)return;const R=U2(g,c,C,!1),D=this.layoutVertexArray;V2((B,q)=>{yp(D,B,q,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,R.verticesFlattened,R.indicesTriangles)}_generateSideFaces(s,c){let f=0;for(let g=1;g<s.length;g++){const b=s[g],x=s[g-1];if(lO(b,x))continue;c.segment.vertexLength+4>Pr.MAX_VERTEX_ARRAY_LENGTH&&(c.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const C=b.sub(x)._perp()._unit(),I=x.dist(b);f+I>32768&&(f=0),yp(this.layoutVertexArray,b.x,b.y,C.x,C.y,0,0,f),yp(this.layoutVertexArray,b.x,b.y,C.x,C.y,0,1,f),f+=I,yp(this.layoutVertexArray,x.x,x.y,C.x,C.y,0,0,f),yp(this.layoutVertexArray,x.x,x.y,C.x,C.y,0,1,f);const R=c.segment.vertexLength;this.indexArray.emplaceBack(R,R+2,R+1),this.indexArray.emplaceBack(R+1,R+2,R+3),c.segment.vertexLength+=4,c.segment.primitiveLength+=2}}}function aO(u,s){for(let c=0;c<s.length;c++){const f=s[c];c===s.length-1&&s[0].x===f.x&&s[0].y===f.y||(u.x+=f.x,u.y+=f.y,u.sampleCount++)}}function lO(u,s){return u.x===s.x&&(u.x<0||u.x>xt)||u.y===s.y&&(u.y<0||u.y>xt)}function Q2(u){return u.every(s=>s.x<0)||u.every(s=>s.x>xt)||u.every(s=>s.y<0)||u.every(s=>s.y>xt)}let eT;Mt("FillExtrusionBucket",ub,{omit:["layers","features"]});var cO={get paint(){return eT=eT||new Oi({"fill-extrusion-opacity":new Ot(ke["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Wt(ke["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ot(ke["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ot(ke["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Oh(ke["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Wt(ke["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Wt(ke["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ot(ke["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class uO extends hi{constructor(s){super(s,cO)}createBucket(s){return new ub(s)}queryRadius(){return ly(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:s,feature:c,featureState:f,geometry:g,transform:b,pixelsToTileUnits:x,pixelPosMatrix:C}){const I=cy(s,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-b.bearingInRadians,x),R=this.paint.get("fill-extrusion-height").evaluate(c,f),D=this.paint.get("fill-extrusion-base").evaluate(c,f),B=function(K,X){const ee=[];for(const ie of K){const he=[ie.x,ie.y,0,1];He(he,he,X),ee.push(new L(he[0]/he[3],he[1]/he[3]))}return ee}(I,C),q=function(K,X,ee,ie){const he=[],Ie=[],_e=ie[8]*X,W=ie[9]*X,ne=ie[10]*X,be=ie[11]*X,$e=ie[8]*ee,ct=ie[9]*ee,Ge=ie[10]*ee,Ye=ie[11]*ee;for(const gt of K){const ht=[],yt=[];for(const rt of gt){const Dt=rt.x,Zt=rt.y,Ut=ie[0]*Dt+ie[4]*Zt+ie[12],Bt=ie[1]*Dt+ie[5]*Zt+ie[13],Tr=ie[2]*Dt+ie[6]*Zt+ie[14],Mn=ie[3]*Dt+ie[7]*Zt+ie[15],Kn=Tr+ne,ki=Mn+be,Ms=Ut+$e,ss=Bt+ct,mi=Tr+Ge,Sn=Mn+Ye,ni=new L((Ut+_e)/ki,(Bt+W)/ki);ni.z=Kn/ki,ht.push(ni);const gi=new L(Ms/Sn,ss/Sn);gi.z=mi/Sn,yt.push(gi)}he.push(ht),Ie.push(yt)}return[he,Ie]}(g,D,R,C);return function(K,X,ee){let ie=1/0;S2(ee,X)&&(ie=tT(ee,X[0]));for(let he=0;he<X.length;he++){const Ie=X[he],_e=K[he];for(let W=0;W<Ie.length-1;W++){const ne=Ie[W],be=[ne,Ie[W+1],_e[W+1],_e[W],ne];w2(ee,be)&&(ie=Math.min(ie,tT(ee,be)))}}return ie!==1/0&&ie}(q[0],q[1],B)}}function _p(u,s){return u.x*s.x+u.y*s.y}function tT(u,s){if(u.length===1){let c=0;const f=s[c++];let g;for(;!g||f.equals(g);)if(g=s[c++],!g)return 1/0;for(;c<s.length;c++){const b=s[c],x=u[0],C=g.sub(f),I=b.sub(f),R=x.sub(f),D=_p(C,C),B=_p(C,I),q=_p(I,I),K=_p(R,C),X=_p(R,I),ee=D*q-B*B,ie=(q*K-B*X)/ee,he=(D*X-B*K)/ee,Ie=f.z*(1-ie-he)+g.z*ie+b.z*he;if(isFinite(Ie))return Ie}return 1/0}{let c=1/0;for(const f of s)c=Math.min(c,f.z);return c}}const hO=An([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:dO}=hO,fO=An([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:pO}=fO,mO=gp.VectorTileFeature.types,gO=Math.cos(Math.PI/180*37.5),rT=Math.pow(2,14)/.5;class hb{constructor(s){this.zoom=s.zoom,this.globalState=s.globalState,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(c=>c.id),this.index=s.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={}
vendor: 4,941 bytes, line 75
75,this.layers.forEach(c=>{this.gradients[c.id]={}}),this.layoutVertexArray=new bt,this.layoutVertexArray2=new ut,this.indexArray=new rn,this.programConfigurations=new ia(s.layers,s.zoom),this.segments=new Pr,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id)}populate(s,c,f){this.hasPattern=tb("line",this.layers,c);const g=this.layers[0].layout.get("line-sort-key"),b=!g.isConstant(),x=[];for(const{feature:C,id:I,index:R,sourceLayerIndex:D}of s){const B=this.layers[0]._featureFilter.needGeometry,q=au(C,B);if(!this.layers[0]._featureFilter.filter(new pn(this.zoom,{globalState:this.globalState}),q,f))continue;const K=b?g.evaluate(q,{},f):void 0,X={id:I,properties:C.properties,type:C.type,sourceLayerIndex:D,index:R,geometry:B?q.geometry:ou(C),patterns:{},sortKey:K};x.push(X)}b&&x.sort((C,I)=>C.sortKey-I.sortKey);for(const C of x){const{geometry:I,index:R,sourceLayerIndex:D}=C;if(this.hasPattern){const B=rb("line",this.layers,C,this.zoom,c);this.patternFeatures.push(B)}else this.addFeature(C,I,R,f,{},c.subdivisionGranularity);c.featureIndex.insert(s[R].feature,I,R,D,this.index)}}update(s,c,f){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(s,c,this.stateDependentLayers,f)}addFeatures(s,c,f){for(const g of this.patternFeatures)this.addFeature(g,g.geometry,g.index,c,f,s.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(s){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=s.createVertexBuffer(this.layoutVertexArray2,pO)),this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,dO),this.indexBuffer=s.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(s),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(s){if(s.properties&&Object.prototype.hasOwnProperty.call(s.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(s.properties,"mapbox_clip_end"))return{start:+s.properties.mapbox_clip_start,end:+s.properties.mapbox_clip_end}}addFeature(s,c,f,g,b,x){const C=this.layers[0].layout,I=C.get("line-join").evaluate(s,{}),R=C.get("line-cap"),D=C.get("line-miter-limit"),B=C.get("line-round-limit");this.lineClips=this.lineFeatureClips(s);for(const q of c)this.addLine(q,s,I,R,D,B,g,x);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,f,b,g)}addLine(s,c,f,g,b,x,C,I){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,s=cu(s,C?I.line.getGranularityForZoomLevel(C.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let _e=0;_e<s.length-1;_e++)this.totalDistance+=s[_e].dist(s[_e+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const R=mO[c.type]==="Polygon";let D=s.length;for(;D>=2&&s[D-1].equals(s[D-2]);)D--;let B=0;for(;B<D-1&&s[B].equals(s[B+1]);)B++;if(D<(R?3:2))return;f==="bevel"&&(b=1.05);const q=this.overscaling<=16?122880/(512*this.overscaling):0,K=this.segments.prepareSegment(10*D,this.layoutVertexArray,this.indexArray);let X,ee,ie,he,Ie;this.e1=this.e2=-1,R&&(X=s[D-2],Ie=s[B].sub(X)._unit()._perp());for(let _e=B;_e<D;_e++){if(ie=_e===D-1?R?s[B+1]:void 0:s[_e+1],ie&&s[_e].equals(ie))continue;Ie&&(he=Ie),X&&(ee=X),X=s[_e],Ie=ie?ie.sub(X)._unit()._perp():he,he=he||Ie;let W=he.add(Ie);W.x===0&&W.y===0||W._unit();const ne=he.x*Ie.x+he.y*Ie.y,be=W.x*Ie.x+W.y*Ie.y,$e=be!==0?1/be:1/0,ct=2*Math.sqrt(2-2*be),Ge=be<gO&&ee&&ie,Ye=he.x*Ie.y-he.y*Ie.x>0;if(Ge&&_e>B){const yt=X.dist(ee);if(yt>2*q){const rt=X.sub(X.sub(ee)._mult(q/yt)._round());this.updateDistance(ee,rt),this.addCurrentVertex(rt,he,0,0,K),ee=rt}}const gt=ee&&ie;let ht=gt?f:R?"butt":g;if(gt&&ht==="round"&&($e<x?ht="miter":$e<=2&&(ht="fakeround")),ht==="miter"&&$e>b&&(ht="bevel"),ht==="bevel"&&($e>2&&(ht="flipbevel"),$e<b&&(ht="miter")),ee&&this.updateDistance(ee,X),ht==="miter")W._mult($e),this.addCurrentVertex(X,W,0,0,K);else if(ht==="flipbevel"){if($e>100)W=Ie.mult(-1);else{const yt=$e*he.add(Ie).mag()/he.sub(Ie).mag();W._perp()._mult(yt*(Ye?-1:1))}this.addCurrentVertex(X,W,0,0,K),this.addCurrentVertex(X,W.mult(-1),0,0,K)}else if(ht==="bevel"||ht==="fakeround"){const yt=-Math.sqrt($e*$e-1),rt=Ye?yt:0,Dt=Ye?0:yt;if(ee&&this.addCurrentVertex(X,he,rt,Dt,K),ht==="fakeround"){const Zt=Math.round(180*ct/Math.PI/20);for(let Ut=1;Ut<Zt;Ut++){let Bt=Ut/Zt;if(Bt!==.5){const Mn=Bt-.5;Bt+=Bt*Mn*(Bt-1)*((1.0904+ne*(ne*(3.55645-1.43519*ne)-3.2452))*Mn*Mn+(.848013+ne*(.215638*ne-1.06021)))}const Tr=Ie.sub(he)._mult(Bt)._add(he)._unit()._mult(Ye?-1:1);this.addHalfVertex(X,Tr.x,Tr.y,!1,Ye,0,K)}}ie&&this.addCurrentVertex(X,Ie,-rt,-Dt,K)}else if(ht==="butt")this.addCurrentVertex(X,W,0,0,K);else if(ht==="square"){const yt=ee?1:-1;
vendor: 9,734 bytes, line 75
75this.addCurrentVertex(X,W,yt,yt,K)}else ht==="round"&&(ee&&(this.addCurrentVertex(X,he,0,0,K),this.addCurrentVertex(X,he,1,1,K,!0)),ie&&(this.addCurrentVertex(X,Ie,-1,-1,K,!0),this.addCurrentVertex(X,Ie,0,0,K)));if(Ge&&_e<D-1){const yt=X.dist(ie);if(yt>2*q){const rt=X.add(ie.sub(X)._mult(q/yt)._round());this.updateDistance(X,rt),this.addCurrentVertex(rt,Ie,0,0,K),X=rt}}}}addCurrentVertex(s,c,f,g,b,x=!1){const C=c.y*g-c.x,I=-c.y-c.x*g;this.addHalfVertex(s,c.x+c.y*f,c.y-c.x*f,x,!1,f,b),this.addHalfVertex(s,C,I,x,!0,-g,b),this.distance>rT/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(s,c,f,g,b,x))}addHalfVertex({x:s,y:c},f,g,b,x,C,I){const R=.5*(this.lineClips?this.scaledDistance*(rT-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((s<<1)+(b?1:0),(c<<1)+(x?1:0),Math.round(63*f)+128,Math.round(63*g)+128,1+(C===0?0:C<0?-1:1)|(63&R)<<2,R>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const D=I.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,D,this.e2),I.primitiveLength++),x?this.e2=D:this.e1=D}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(s,c){this.distance+=s.dist(c),this.updateScaledDistance()}}let nT,iT;Mt("LineBucket",hb,{omit:["layers","patternFeatures"]});var sT={get paint(){return iT=iT||new Oi({"line-opacity":new Wt(ke.paint_line["line-opacity"]),"line-color":new Wt(ke.paint_line["line-color"]),"line-translate":new Ot(ke.paint_line["line-translate"]),"line-translate-anchor":new Ot(ke.paint_line["line-translate-anchor"]),"line-width":new Wt(ke.paint_line["line-width"]),"line-gap-width":new Wt(ke.paint_line["line-gap-width"]),"line-offset":new Wt(ke.paint_line["line-offset"]),"line-blur":new Wt(ke.paint_line["line-blur"]),"line-dasharray":new ep(ke.paint_line["line-dasharray"]),"line-pattern":new Oh(ke.paint_line["line-pattern"]),"line-gradient":new eu(ke.paint_line["line-gradient"])})},get layout(){return nT=nT||new Oi({"line-cap":new Ot(ke.layout_line["line-cap"]),"line-join":new Wt(ke.layout_line["line-join"]),"line-miter-limit":new Ot(ke.layout_line["line-miter-limit"]),"line-round-limit":new Ot(ke.layout_line["line-round-limit"]),"line-sort-key":new Wt(ke.layout_line["line-sort-key"])})}};class yO extends Wt{possiblyEvaluate(s,c){return c=new pn(Math.floor(c.zoom),{now:c.now,fadeDuration:c.fadeDuration,zoomHistory:c.zoomHistory,transition:c.transition}),super.possiblyEvaluate(s,c)}evaluate(s,c,f,g){return c=Nt({},c,{zoom:Math.floor(c.zoom)}),super.evaluate(s,c,f,g)}}let py;class _O extends hi{constructor(s){super(s,sT),this.gradientVersion=0,py||(py=new yO(sT.paint.properties["line-width"].specification),py.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(s){if(s==="line-gradient"){const c=this.gradientExpression();this.stepInterpolant=!!function(f){return f._styleExpression!==void 0}(c)&&c._styleExpression.expression instanceof xl,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(s,c){super.recalculate(s,c),this.paint._values["line-floorwidth"]=py.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,s)}createBucket(s){return new hb(s)}queryRadius(s){const c=s,f=oT(lp("line-width",this,c),lp("line-gap-width",this,c)),g=lp("line-offset",this,c);return f/2+Math.abs(g)+ly(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:s,feature:c,featureState:f,geometry:g,transform:b,pixelsToTileUnits:x}){const C=cy(s,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-b.bearingInRadians,x),I=x/2*oT(this.paint.get("line-width").evaluate(c,f),this.paint.get("line-gap-width").evaluate(c,f)),R=this.paint.get("line-offset").evaluate(c,f);return R&&(g=function(D,B){const q=[];for(let K=0;K<D.length;K++){const X=D[K],ee=[];for(let ie=0;ie<X.length;ie++){const he=X[ie-1],Ie=X[ie],_e=X[ie+1],W=ie===0?new L(0,0):Ie.sub(he)._unit()._perp(),ne=ie===X.length-1?new L(0,0):_e.sub(Ie)._unit()._perp(),be=W._add(ne)._unit(),$e=be.x*ne.x+be.y*ne.y;$e!==0&&be._mult(1/$e),ee.push(be._mult(B)._add(Ie))}q.push(ee)}return q}(g,R*x)),function(D,B,q){for(let K=0;K<B.length;K++){const X=B[K];if(D.length>=3){for(let ee=0;ee<X.length;ee++)if(Nh(D,X[ee]))return!0}if(MD(D,X,q))return!0}return!1}(C,g,I)}isTileClipped(){return!0}}function oT(u,s){return s>0?s+2*u:u}const vO=An([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),bO=An([{name:"a_projected_pos",components:3,type:"Float32"}],4);An([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const xO=An([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);An([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const aT=An([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),wO=An([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function SO(u,s,c){return u.sections.forEach(f=>{f.text=function(g,b,x){const C=b.layout.get("text-transform").evaluate(x,{});return C==="uppercase"?g=g.toLocaleUpperCase():C==="lowercase"&&(g=g.toLocaleLowerCase()),Yo.applyArabicShaping&&(g=Yo.applyArabicShaping(g)),g}(f.text,s,c)}),u}An([{name:"triangle",components:3,type:"Uint16"}]),An([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),An([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),An([{type:"Float32",name:"offsetX"}]),An([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),An([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const vp={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var lT,db,cT,ri=24,fb={};function TO(){return lT||(lT=1,fb.read=function(u,s,c,f,g){var b,x,C=8*g-f-1,I=(1<<C)-1,R=I>>1,D=-7,B=c?g-1:0,q=c?-1:1,K=u[s+B];for(B+=q,b=K&(1<<-D)-1,K>>=-D,D+=C;D>0;b=256*b+u[s+B],B+=q,D-=8);for(x=b&(1<<-D)-1,b>>=-D,D+=f;D>0;x=256*x+u[s+B],B+=q,D-=8);if(b===0)b=1-R;else{if(b===I)return x?NaN:1/0*(K?-1:1);x+=Math.pow(2,f),b-=R}return(K?-1:1)*x*Math.pow(2,b-f)},fb.write=function(u,s,c,f,g,b){var x,C,I,R=8*b-g-1,D=(1<<R)-1,B=D>>1,q=g===23?Math.pow(2,-24)-Math.pow(2,-77):0,K=f?0:b-1,X=f?1:-1,ee=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(C=isNaN(s)?1:0,x=D):(x=Math.floor(Math.log(s)/Math.LN2),s*(I=Math.pow(2,-x))<1&&(x--,I*=2),(s+=x+B>=1?q/I:q*Math.pow(2,1-B))*I>=2&&(x++,I/=2),x+B>=D?(C=0,x=D):x+B>
75=1?(C=(s*I-1)*Math.pow(2,g),x+=B):(C=s*Math.pow(2,B-1)*Math.pow(2,g),x=0));g>=8;u[c+K]=255&C,K+=X,C/=256,g-=8);for(x=x<<g|C,R+=g;R>0;u[c+K]=255&x,K+=X,x/=256,R-=8);u[c+K-X]|=128*ee}),fb}function uT(){if(cT)return db;cT=1,db=s;var u=TO();function s(W){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(W)?W:new Uint8Array(W||0),this.pos=0,this.type=0,this.length=this.buf.length}s.Varint=0,s.Fixed64=1,s.Bytes=2,s.Fixed32=5;var c=4294967296,f=1/c,g=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function b(W){return W.type===s.Bytes?W.readVarint()+W.pos:W.pos+1}function x(W,ne,be){return be?4294967296*ne+(W>>>0):4294967296*(ne>>>0)+(W>>>0)}function C(W,ne,be){var $e=ne<=16383?1:ne<=2097151?2:ne<=268435455?3:Math.floor(Math.log(ne)/(7*Math.LN2));be.realloc($e);for(var ct=be.pos-1;ct>=W;ct--)be.buf[ct+$e]=be.buf[ct]}function I(W,ne){for(var be=0;be<W.length;be++)ne.writeVarint(W[be])}function R(W,ne){for(var be=0;be<W.length;be++)ne.writeSVarint(W[be])}function D(W,ne){for(var be=0;be<W.length;be++)ne.writeFloat(W[be])}function B(W,ne){for(var be=0;be<W.length;be++)ne.writeDouble(W[be])}function q(W,ne){for(var be=0;be<W.length;be++)ne.writeBoolean(W[be])}function K(W,ne){for(var be=0;be<W.length;be++)ne.writeFixed32(W[be])}function X(W,ne){for(var be=0;be<W.length;be++)ne.writeSFixed32(W[be])}function ee(W,ne){for(var be=0;be<W.length;be++)ne.writeFixed64(W[be])}function ie(W,ne){for(var be=0;be<W.length;be++)ne.writeSFixed64(W[be])}function he(W,ne){return(W[ne]|W[ne+1]<<8|W[ne+2]<<16)+16777216*W[ne+3]}function Ie(W,ne,be){W[be]=ne,W[be+1]=ne>>>8,W[be+2]=ne>>>16,W[be+3]=ne>>>24}function _e(W,ne){return(W[ne]|W[ne+1]<<8|W[ne+2]<<16)+(W[ne+3]<<24)}return s.prototype={destroy:function(){this.buf=null},readFields:function(W,ne,be){for(be=be||this.length;this.pos<be;){var $e=this.readVarint(),ct=$e>>3,Ge=this.pos;this.type=7&$e,W(ct,ne,this),this.pos===Ge&&this.skip($e)}return ne},readMessage:function(W,ne){return this.readFields(W,ne,this.readVarint()+this.pos)},readFixed32:function(){var W=he(this.buf,this.pos);return this.pos+=4,W},readSFixed32:function(){var W=_e(this.buf,this.pos);return this.pos+=4,W},readFixed64:function(){var W=he(this.buf,this.pos)+he(this.buf,this.pos+4)*c;return this.pos+=8,W},readSFixed64:function(){var W=he(this.buf,this.pos)+_e(this.buf,this.pos+4)*c;return this.pos+=8,W},readFloat:function(){var W=u.read(this.buf,this.pos,!0,23,4);return this.pos+=4,W},readDouble:function(){var W=u.read(this.buf,this.pos,!0,52,8);return this.pos+=8,W},readVarint:function(W){var ne,be,$e=this.buf;return ne=127&(be=$e[this.pos++]),be<128?ne:(ne|=(127&(be=$e[this.pos++]))<<7,be<128?ne:(ne|=(127&(be=$e[this.pos++]))<<14,be<128?ne:(ne|=(127&(be=$e[this.pos++]))<<21,be<128?ne:function(ct,Ge,Ye){var gt,ht,yt=Ye.buf;if(gt=(112&(ht=yt[Ye.pos++]))>>4,ht<128||(gt|=(127&(ht=yt[Ye.pos++]))<<3,ht<128)||(gt|=(127&(ht=yt[Ye.pos++]))<<10,ht<128)||(gt|=(127&(ht=yt[Ye.pos++]))<<17,ht<128)||(gt|=(127&(ht=yt[Ye.pos++]))<<24,ht<128)||(gt|=(1&(ht=yt[Ye.pos++]))<<31,ht<128))return x(ct,gt,Ge);throw new Error("Expected varint not more than 10 bytes")}(ne|=(15&(be=$e[this.pos]))<<28,W,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var W=this.readVarint();return W%2==1?(W+1)/-2:W/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var W=this.readVarint()+this.pos,ne=this.pos;return this.pos=W,W-ne>=12&&g?function(be,$e,ct){return g.decode(be.subarray($e,ct))}(this.buf,ne,W):function(be,$e,ct){for(var Ge="",Ye=$e;Ye<ct;){var gt,ht,yt,rt=be[Ye],Dt=null,Zt=rt>239?4:rt>223?3:rt>191?2:1;if(Ye+Zt>ct)break;Zt===1?rt<128&&(Dt=rt):Zt===2?(192&(gt=be[Ye+1]))==128&&(Dt=(31&rt)<<6|63&gt)<=127&&(Dt=null):Zt===3?(ht=be[Ye+2],(192&(gt=be[Ye+1]))==128&&(192&ht)==128&&((Dt=(15&rt)<<12|(63&gt)<<6|63&ht)<=2047||Dt>=55296&&Dt<=57343)&&(Dt=null)):Zt===4&&(ht=be[Ye+2],yt=be[Ye+3],(192&(gt=be[Ye+1]))==128&&(192&ht)==128&&(192&yt)==128&&((Dt=(15&rt)<<18|(63&gt)<<12|(63&ht)<<6|63&yt)<=65535||Dt>=1114112)&&(Dt=null)),Dt===null?(Dt=65533,Zt=1):Dt>65535&&(Dt-=65536,Ge+=String.fromCharCode(Dt>>>10&1023|55296),Dt=56320|1023&Dt),Ge+=String.fromCharCode(Dt),Ye+=Zt}return Ge}(this.buf,ne,W)},readBytes:function(){var W=this.readVarint()+this.pos,ne=this.buf.subarray(this.pos,W);return this.pos=W,ne}
vendor: 3,944 bytes, line 75
75,readPackedVarint:function(W,ne){if(this.type!==s.Bytes)return W.push(this.readVarint(ne));var be=b(this);for(W=W||[];this.pos<be;)W.push(this.readVarint(ne));return W},readPackedSVarint:function(W){if(this.type!==s.Bytes)return W.push(this.readSVarint());var ne=b(this);for(W=W||[];this.pos<ne;)W.push(this.readSVarint());return W},readPackedBoolean:function(W){if(this.type!==s.Bytes)return W.push(this.readBoolean());var ne=b(this);for(W=W||[];this.pos<ne;)W.push(this.readBoolean());return W},readPackedFloat:function(W){if(this.type!==s.Bytes)return W.push(this.readFloat());var ne=b(this);for(W=W||[];this.pos<ne;)W.push(this.readFloat());return W},readPackedDouble:function(W){if(this.type!==s.Bytes)return W.push(this.readDouble());var ne=b(this);for(W=W||[];this.pos<ne;)W.push(this.readDouble());return W},readPackedFixed32:function(W){if(this.type!==s.Bytes)return W.push(this.readFixed32());var ne=b(this);for(W=W||[];this.pos<ne;)W.push(this.readFixed32());return W},readPackedSFixed32:function(W){if(this.type!==s.Bytes)return W.push(this.readSFixed32());var ne=b(this);for(W=W||[];this.pos<ne;)W.push(this.readSFixed32());return W},readPackedFixed64:function(W){if(this.type!==s.Bytes)return W.push(this.readFixed64());var ne=b(this);for(W=W||[];this.pos<ne;)W.push(this.readFixed64());return W},readPackedSFixed64:function(W){if(this.type!==s.Bytes)return W.push(this.readSFixed64());var ne=b(this);for(W=W||[];this.pos<ne;)W.push(this.readSFixed64());return W},skip:function(W){var ne=7&W;if(ne===s.Varint)for(;this.buf[this.pos++]>127;);else if(ne===s.Bytes)this.pos=this.readVarint()+this.pos;else if(ne===s.Fixed32)this.pos+=4;else{if(ne!==s.Fixed64)throw new Error("Unimplemented type: "+ne);this.pos+=8}},writeTag:function(W,ne){this.writeVarint(W<<3|ne)},realloc:function(W){for(var ne=this.length||16;ne<this.pos+W;)ne*=2;if(ne!==this.length){var be=new Uint8Array(ne);be.set(this.buf),this.buf=be,this.length=ne}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(W){this.realloc(4),Ie(this.buf,W,this.pos),this.pos+=4},writeSFixed32:function(W){this.realloc(4),Ie(this.buf,W,this.pos),this.pos+=4},writeFixed64:function(W){this.realloc(8),Ie(this.buf,-1&W,this.pos),Ie(this.buf,Math.floor(W*f),this.pos+4),this.pos+=8},writeSFixed64:function(W){this.realloc(8),Ie(this.buf,-1&W,this.pos),Ie(this.buf,Math.floor(W*f),this.pos+4),this.pos+=8},writeVarint:function(W){(W=+W||0)>268435455||W<0?function(ne,be){var $e,ct;if(ne>=0?($e=ne%4294967296|0,ct=ne/4294967296|0):(ct=~(-ne/4294967296),4294967295^($e=~(-ne%4294967296))?$e=$e+1|0:($e=0,ct=ct+1|0)),ne>=18446744073709552e3||ne<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");be.realloc(10),function(Ge,Ye,gt){gt.buf[gt.pos++]=127&Ge|128,Ge>>>=7,gt.buf[gt.pos++]=127&Ge|128,Ge>>>=7,gt.buf[gt.pos++]=127&Ge|128,Ge>>>=7,gt.buf[gt.pos++]=127&Ge|128,gt.buf[gt.pos]=127&(Ge>>>=7)}($e,0,be),function(Ge,Ye){var gt=(7&Ge)<<4;Ye.buf[Ye.pos++]|=gt|((Ge>>>=3)?128:0),Ge&&(Ye.buf[Ye.pos++]=127&Ge|((Ge>>>=7)?128:0),Ge&&(Ye.buf[Ye.pos++]=127&Ge|((Ge>>>=7)?128:0),Ge&&(Ye.buf[Ye.pos++]=127&Ge|((Ge>>>=7)?128:0),Ge&&(Ye.buf[Ye.pos++]=127&Ge|((Ge>>>=7)?128:0),Ge&&(Ye.buf[Ye.pos++]=127&Ge)))))}(ct,be)}(W,this):(this.realloc(4),this.buf[this.pos++]=127&W|(W>127?128:0),W<=127||(this.buf[this.pos++]=127&(W>>>=7)|(W>127?128:0),W<=127||(this.buf[this.pos++]=127&(W>>>=7)|(W>127?128:0),W<=127||(this.buf[this.pos++]=W>>>7&127))))},writeSVarint:function(W){this.writeVarint(W<0?2*-W-1:2*W)},writeBoolean:function(W){this.writeVarint(!!W)},writeString:function(W){W=String(W),this.realloc(4*W.length),this.pos++;var ne=this.pos;this.pos=function($e,ct,Ge){for(var Ye,gt,ht=0;ht<ct.length;ht++){if((Ye=ct.charCodeAt(ht))>55295&&Ye<57344){if(!gt){Ye>56319||ht+1===ct.length?($e[Ge++]=239,$e[Ge++]=191,$e[Ge++]=189):gt=Ye;continue}if(Ye<56320){$e[Ge++]=239,$e[Ge++]=191,$e[Ge++]=189,gt=Ye;continue}
vendor: 9,155 bytes, line 75
75Ye=gt-55296<<10|Ye-56320|65536,gt=null}else gt&&($e[Ge++]=239,$e[Ge++]=191,$e[Ge++]=189,gt=null);Ye<128?$e[Ge++]=Ye:(Ye<2048?$e[Ge++]=Ye>>6|192:(Ye<65536?$e[Ge++]=Ye>>12|224:($e[Ge++]=Ye>>18|240,$e[Ge++]=Ye>>12&63|128),$e[Ge++]=Ye>>6&63|128),$e[Ge++]=63&Ye|128)}return Ge}(this.buf,W,this.pos);var be=this.pos-ne;be>=128&&C(ne,be,this),this.pos=ne-1,this.writeVarint(be),this.pos+=be},writeFloat:function(W){this.realloc(4),u.write(this.buf,W,this.pos,!0,23,4),this.pos+=4},writeDouble:function(W){this.realloc(8),u.write(this.buf,W,this.pos,!0,52,8),this.pos+=8},writeBytes:function(W){var ne=W.length;this.writeVarint(ne),this.realloc(ne);for(var be=0;be<ne;be++)this.buf[this.pos++]=W[be]},writeRawMessage:function(W,ne){this.pos++;var be=this.pos;W(ne,this);var $e=this.pos-be;$e>=128&&C(be,$e,this),this.pos=be-1,this.writeVarint($e),this.pos+=$e},writeMessage:function(W,ne,be){this.writeTag(W,s.Bytes),this.writeRawMessage(ne,be)},writePackedVarint:function(W,ne){ne.length&&this.writeMessage(W,I,ne)},writePackedSVarint:function(W,ne){ne.length&&this.writeMessage(W,R,ne)},writePackedBoolean:function(W,ne){ne.length&&this.writeMessage(W,q,ne)},writePackedFloat:function(W,ne){ne.length&&this.writeMessage(W,D,ne)},writePackedDouble:function(W,ne){ne.length&&this.writeMessage(W,B,ne)},writePackedFixed32:function(W,ne){ne.length&&this.writeMessage(W,K,ne)},writePackedSFixed32:function(W,ne){ne.length&&this.writeMessage(W,X,ne)},writePackedFixed64:function(W,ne){ne.length&&this.writeMessage(W,ee,ne)},writePackedSFixed64:function(W,ne){ne.length&&this.writeMessage(W,ie,ne)},writeBytesField:function(W,ne){this.writeTag(W,s.Bytes),this.writeBytes(ne)},writeFixed32Field:function(W,ne){this.writeTag(W,s.Fixed32),this.writeFixed32(ne)},writeSFixed32Field:function(W,ne){this.writeTag(W,s.Fixed32),this.writeSFixed32(ne)},writeFixed64Field:function(W,ne){this.writeTag(W,s.Fixed64),this.writeFixed64(ne)},writeSFixed64Field:function(W,ne){this.writeTag(W,s.Fixed64),this.writeSFixed64(ne)},writeVarintField:function(W,ne){this.writeTag(W,s.Varint),this.writeVarint(ne)},writeSVarintField:function(W,ne){this.writeTag(W,s.Varint),this.writeSVarint(ne)},writeStringField:function(W,ne){this.writeTag(W,s.Bytes),this.writeString(ne)},writeFloatField:function(W,ne){this.writeTag(W,s.Fixed32),this.writeFloat(ne)},writeDoubleField:function(W,ne){this.writeTag(W,s.Fixed64),this.writeDouble(ne)},writeBooleanField:function(W,ne){this.writeVarintField(W,!!ne)}},db}var Vl,pb=y(uT());function CO(u,s,c){u===1&&c.readMessage(EO,s)}function EO(u,s,c){if(u===3){const{id:f,bitmap:g,width:b,height:x,left:C,top:I,advance:R}=c.readMessage(kO,{});s.push({id:f,bitmap:new cp({width:b+6,height:x+6},g),metrics:{width:b,height:x,left:C,top:I,advance:R}})}}function kO(u,s,c){u===1?s.id=c.readVarint():u===2?s.bitmap=c.readBytes():u===3?s.width=c.readVarint():u===4?s.height=c.readVarint():u===5?s.left=c.readSVarint():u===6?s.top=c.readSVarint():u===7&&(s.advance=c.readVarint())}function hT(u){let s=0,c=0;for(const x of u)s+=x.w*x.h,c=Math.max(c,x.w);u.sort((x,C)=>C.h-x.h);const f=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(s/.95)),c),h:1/0}];let g=0,b=0;for(const x of u)for(let C=f.length-1;C>=0;C--){const I=f[C];if(!(x.w>I.w||x.h>I.h)){if(x.x=I.x,x.y=I.y,b=Math.max(b,x.y+x.h),g=Math.max(g,x.x+x.w),x.w===I.w&&x.h===I.h){const R=f.pop();C<f.length&&(f[C]=R)}else x.h===I.h?(I.x+=x.w,I.w-=x.w):x.w===I.w?(I.y+=x.h,I.h-=x.h):(f.push({x:I.x+x.w,y:I.y,w:I.w-x.w,h:x.h}),I.y+=x.h,I.h-=x.h);break}}return{w:g,h:b,fill:s/(g*b)||0}}class mb{constructor(s,{pixelRatio:c,version:f,stretchX:g,stretchY:b,content:x,textFitWidth:C,textFitHeight:I}){this.paddedRect=s,this.pixelRatio=c,this.stretchX=g,this.stretchY=b,this.content=x,this.version=f,this.textFitWidth=C,this.textFitHeight=I}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}}class dT{constructor(s,c){const f={},g={};this.haveRenderCallbacks=[];const b=[];this.addImages(s,f,b),this.addImages(c,g,b);const{w:x,h:C}=hT(b),I=new is({width:x||1,height:C||1});for(const R in s){const D=s[R],B=f[R].paddedRect;is.copy(D.data,I,{x:0,y:0},{x:B.x+1,y:B.y+1},D.data)}for(const R in c){const D=c[R],B=g[R].paddedRect,q=B.x+1,K=B.y+1,X=D.data.width,ee=D.data.height;is.copy(D.data,I,{x:0,y:0},{x:q,y:K},D.data),is.copy(D.data,I,{x:0,y:ee-1},{x:q,y:K-1},{width:X,height:1}),is.copy(D.data,I,{x:0,y:0},{x:q,y:K+ee},{width:X,height:1}),is.copy(D.data,I,{x:X-1,y:0},{x:q-1,y:K},{width:1,height:ee}),is.copy(D.data,I,{x:0,y:0},{x:q+X,y:K},{width:1,height:ee})}this.image=I,this.iconPositions=f,this.patternPositions=g}addImages(s,c,f){for(const g in s){const b=s[g],x={x:0,y:0,w:b.data.width+2,h:b.data.height+2};f.push(x),c[g]=new mb(x,b),b.hasRenderCallback&&this.haveRenderCallbacks.push(g)}}patchUpdatedImages(s,c){s.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const f in s.updatedImages)this.patchUpdatedImage(this.iconPositions[f],s.getImage(f),c),this.patchUpdatedImage(this.patternPositions[f],s.getImage(f),c)}patchUpdatedImage(s,c,f){if(!s||!c||s.version===c.version)return;s.version=c.version;const[g,b]=s.tl;f.update(c.data,void 0,{x:g,y:b})}}Mt("ImagePosition",mb),Mt("ImageAtlas",dT),d.an=void 0,(Vl=d.an||(d.an={}))[Vl.none=0]="none",Vl[Vl.horizontal=1]="horizontal",Vl[Vl.vertical=2]="vertical",Vl[Vl.horizontalOnly=3]="horizontalOnly";class bp{constructor(){this.scale=1,this.fontStack="",this.imageName=null,this.verticalAlign="bottom"}static forText(s,c,f){const g=new bp;return g.scale=s||1,g.fontStack=c,g.verticalAlign=f||"bottom",g}static forImage(s,c){const f=new bp;return f.imageName=s,f.verticalAlign=c||"bottom",f}}class Vh{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(s,c){const f=new Vh;for(let g=0;g<s.sections.length;g++){const b=s.sections[g];b.image?f.addImageSection(b):f.addTextSection(b,c)}return f}length(){return this.text.length}getSection(s){return this.sections[this.sectionIndex[s]]}getSectionIndex(s){return this.sectionIndex[s]}getCharCode(s){return this.text.charCodeAt(s)}verticalizePunctuation(){this.text=function(s){let c="";for(let f=0;f<s.length;f++){const g=s.charCodeAt(f+1)||null,b=s.charCodeAt(f-1)||null;c+=g&&Yf(g)&&!vp[s[f+1]]||b&&Yf(b)&&!vp[s[f-1]]||!vp[s[f]]?s[f]:vp[s[f]]}return c}(this.text)}trim(){let s=0;for(let f=0;f<this.text.length&&gy[this.text.charCodeAt(f)];f++)s++;let c=this.text.length;for(let f=this.text.length-1;f>=0&&f>=s&&gy[this.text.charCodeAt(f)];f--)c--;this.text=this.text.substring(s,c),this.sectionIndex=this.sectionIndex.slice(s,c)}substring(s,c){const f=new Vh;return f.text=this.text.substring(s,c),f.sectionIndex=this.sectionIndex.slice(s,c),f.sections=this.sections,f}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((s,c)=>Math.max(s,this.sections[c].scale),0)}getMaxImageSize(s){let c=0,f=0;for(let g=0;g<this.length();g++){const b=this.getSection(g);if(b.imageName){const x=s[b.imageName];if(!x)continue;const C=x.displaySize;c=Math.max(c,C[0]),f=Math.max(f,C[1])}}return{maxImageWidth:c,maxImageHeight:f}}addTextSection(s,c){this.text+=s.text,this.sections.push(bp.forText(s.scale,s.fontStack||c,s.verticalAlign));const f=this.sections.length-1;for(let g=0;g<s.text.length;++g)this.sectionIndex.push(f)}addImageSection(s){const c=s.image?s.image.name:"";if(c.length===0)return void Xe("Can't add FormattedSection with an empty image.");const f=this.getNextImageSectionCharCode();f?(this.text+=String.fromCharCode(f),this.sections.push(bp.forImage(c,s.verticalAlign)),this.sectionIndex.push(this.sections.length-1)):Xe("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function my(u,s,c,f,g,b,x,C,I,R,D,B,q,K,X){const ee=Vh.fromFeature(u,g);let ie;B===d.an.vertical&&ee.verticalizePunctuation();const{processBidirectionalText:he,processStyledBidirectionalText:Ie}=Yo;if(he&&ee.sections.length===1){ie=[];const ne=he(ee.toString(),gb(ee,R,b,s,f,K));for(const be of ne){const $e=new Vh;$e.text=be,$e.sections=ee.sections;for(let ct=0;ct<be.length;ct++)$e.sectionIndex.push(0);ie.push($e)}}else if(Ie){ie=[];const ne=Ie(ee.text,ee.sectionIndex,gb(ee,R,b,s,f,K));for(const be of ne){const $e=new Vh;$e.text=be[0],$e.sectionIndex=be[1],$e.sections=ee.sections,ie.push($e)}}else ie=function(ne,be){const $e=[],ct=ne.text;let Ge=0;for(const Ye of be)$e.push(ne.substring(Ge,Ye)),Ge=Ye;return Ge<ct.length&&$e.push(ne.substring(Ge,ct.length)),$e}(ee,gb(ee,R,b,s,f,K));const _e=[],W={positionedLines:_e,text:ee.toString(),top:D[1],bottom:D[1],left:D[0],right:D[0],writingMode:B,iconsInText:!1,verticalizable:!1};return function(ne,be,$e,ct,Ge,Ye,gt,ht,yt,rt,Dt,Zt){let Ut=0,Bt=0,Tr=0,Mn=0;const Kn=ht==="right"?1:ht==="left"?0:.5,ki=ri/Zt;let Ms=0;for(const Sn of Ge){Sn.trim();const ni=Sn.getMaxScale(),gi={positionedGlyphs:[],lineOffset:0};
vendor: 4,892 bytes, line 75
75ne.positionedLines[Ms]=gi;const yi=gi.positionedGlyphs;let Zi=0;if(!Sn.length()){Bt+=Ye,++Ms;continue}const Rs=MO(ct,Sn,ki);for(let os=0;os<Sn.length();os++){const Xn=Sn.getSection(os),si=Sn.getSectionIndex(os),oi=Sn.getCharCode(os),qn=RO(yt,Dt,oi);let dn;if(Xn.imageName){if(ne.iconsInText=!0,Xn.scale=Xn.scale*ki,dn=zO(Xn,qn,ni,Rs,ct),!dn)continue;Zi=Math.max(Zi,dn.imageOffset)}else if(dn=LO(Xn,oi,qn,Rs,be,$e),!dn)continue;const{rect:bo,metrics:Zh,baselineOffset:xo}=dn;yi.push({glyph:oi,imageName:Xn.imageName,x:Ut,y:Bt+xo+-17,vertical:qn,scale:Xn.scale,fontStack:Xn.fontStack,sectionIndex:si,metrics:Zh,rect:bo}),qn?(ne.verticalizable=!0,Ut+=(Xn.imageName?Zh.advance:ri)*Xn.scale+rt):Ut+=Zh.advance*Xn.scale+rt}yi.length!==0&&(Tr=Math.max(Ut-rt,Tr),DO(yi,0,yi.length-1,Kn)),Ut=0,gi.lineOffset=Math.max(Zi,(ni-1)*ri);const ii=Ye*ni+Zi;Bt+=ii,Mn=Math.max(ii,Mn),++Ms}const{horizontalAlign:ss,verticalAlign:mi}=yb(gt);(function(Sn,ni,gi,yi,Zi,Rs,ii,os,Xn){const si=(ni-gi)*Zi;let oi=0;oi=Rs!==ii?-os*yi- -17:-yi*Xn*ii+.5*ii;for(const qn of Sn)for(const dn of qn.positionedGlyphs)dn.x+=si,dn.y+=oi})(ne.positionedLines,Kn,ss,mi,Tr,Mn,Ye,Bt,Ge.length),ne.top+=-mi*Bt,ne.bottom=ne.top+Bt,ne.left+=-ss*Tr,ne.right=ne.left+Tr}(W,s,c,f,ie,x,C,I,B,R,q,X),!function(ne){for(const be of ne)if(be.positionedGlyphs.length!==0)return!1;return!0}(_e)&&W}const gy={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},IO={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},PO={40:!0};function fT(u,s,c,f,g,b){if(s.imageName){const x=f[s.imageName];return x?x.displaySize[0]*s.scale*ri/b+g:0}{const x=c[s.fontStack],C=x&&x[u];return C?C.metrics.advance*s.scale+g:0}}function pT(u,s,c,f){const g=Math.pow(u-s,2);return f?u<s?g/2:2*g:g+Math.abs(c)*c}function AO(u,s,c){let f=0;return u===10&&(f-=1e4),c&&(f+=150),u!==40&&u!==65288||(f+=50),s!==41&&s!==65289||(f+=50),f}function mT(u,s,c,f,g,b){let x=null,C=pT(s,c,g,b);for(const I of f){const R=pT(s-I.x,c,g,b)+I.badness;R<=C&&(x=I,C=R)}return{index:u,x:s,priorBreak:x,badness:C}}function gT(u){return u?gT(u.priorBreak).concat(u.index):[]}function gb(u,s,c,f,g,b){if(!u)return[];const x=[],C=function(B,q,K,X,ee,ie){let he=0;for(let Ie=0;Ie<B.length();Ie++){const _e=B.getSection(Ie);he+=fT(B.getCharCode(Ie),_e,X,ee,q,ie)}return he/Math.max(1,Math.ceil(he/K))}(u,s,c,f,g,b),I=u.text.indexOf("​")>=0;let R=0;for(let B=0;B<u.length();B++){const q=u.getSection(B),K=u.getCharCode(B);if(gy[K]||(R+=fT(K,q,f,g,s,b)),B<u.length()-1){const X=!((D=K)<11904)&&(!!xr["CJK Compatibility Forms"](D)||!!xr["CJK Compatibility"](D)||!!xr["CJK Strokes"](D)||!!xr["CJK Symbols and Punctuation"](D)||!!xr["Enclosed CJK Letters and Months"](D)||!!xr["Halfwidth and Fullwidth Forms"](D)||!!xr["Ideographic Description Characters"](D)||!!xr["Vertical Forms"](D)||Xf.test(String.fromCodePoint(D)));(IO[K]||X||q.imageName||B!==u.length()-2&&PO[u.getCharCode(B+1)])&&x.push(mT(B+1,R,C,x,AO(K,u.getCharCode(B+1),X&&I),!1))}}var D;return gT(mT(u.length(),R,C,x,0,!0))}function yb(u){let s=.5,c=.5;switch(u){case"right":case"top-right":case"bottom-right":s=1;break;case"left":case"top-left":case"bottom-left":s=0}switch(u){case"bottom":case"bottom-right":case"bottom-left":c=1;break;case"top":case"top-right":case"top-left":c=0}return{horizontalAlign:s,verticalAlign:c}}function MO(u,s,c){const f=s.getMaxScale()*ri,{maxImageWidth:g,maxImageHeight:b}=s.getMaxImageSize(u),x=Math.max(f,b*c);return{verticalLineContentWidth:Math.max(f,g*c),horizontalLineContentHeight:x}}function yT(u){switch(u){case"top":return 0;case"center":return .5;default:return 1}}function RO(u,s,c){return!(u===d.an.horizontal||!s&&!Lh(c)||s&&(gy[c]||(f=c,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(f)))));var f}function LO(u,s,c,f,g,b){const x=b[u.fontStack],C=function(R,D,B,q){if(R&&R.rect)return R;const K=D[B.fontStack],X=K&&K[q];return X?{rect:null,metrics:X.metrics}:null}(x&&x[s],g,u,s);if(C===null)return null;let I;if(c)I=f.verticalLineContentWidth-u.scale*ri;else{const R=yT(u.verticalAlign);I=(f.horizontalLineContentHeight-u.scale*ri)*R}return{rect:C.rect,metrics:C.metrics,baselineOffset:I}}function zO(u,s,c,f,g){const b=g[u.imageName];if(!b)return null;const x=b.paddedRect,C=b.displaySize,I={width:C[0],height:C[1],left:1,top:-3,advance:s?C[1]:C[0]};let R;if(s)R=f.verticalLineContentWidth-C[1]*u.scale;else{const D=yT(u.verticalAlign);R=(f.horizontalLineContentHeight-C[1]*u.scale)*D}return{rect:x,metrics:I,baselineOffset:R,imageOffset:(s?C[0]:C[1])*u.scale-ri*c}}function DO(u,s,c,f){if(f===0)return;const g=u[c],b=(u[c].x+g.metrics.advance*g.scale)*f;for(let x=s;x<=c;x++)u[x].x-=b}function OO(u,s,c){const{horizontalAlign:f,verticalAlign:g}=yb(c),b=s[0]-u.displaySize[0]*f,x=s[1]-u.displaySize[1]*g;return{image:u,top:x,bottom:x+u.displaySize[1],left:b,right:b+u.displaySize[0]}}function _T(u){var s,c;let f=u.left,g=u.top,b=u.right-f,x=u.bottom-g;
vendor: 9,672 bytes, line 75
75const C=(s=u.image.textFitWidth)!==null&&s!==void 0?s:"stretchOrShrink",I=(c=u.image.textFitHeight)!==null&&c!==void 0?c:"stretchOrShrink",R=(u.image.content[2]-u.image.content[0])/(u.image.content[3]-u.image.content[1]);if(I==="proportional"){if(C==="stretchOnly"&&b/x<R||C==="proportional"){const D=Math.ceil(x*R);f*=D/b,b=D}}else if(C==="proportional"&&I==="stretchOnly"&&R!==0&&b/x>R){const D=Math.ceil(b/R);g*=D/x,x=D}return{x1:f,y1:g,x2:f+b,y2:g+x}}function vT(u,s,c,f,g,b){const x=u.image;let C;if(x.content){const ie=x.content,he=x.pixelRatio||1;C=[ie[0]/he,ie[1]/he,x.displaySize[0]-ie[2]/he,x.displaySize[1]-ie[3]/he]}const I=s.left*b,R=s.right*b;let D,B,q,K;c==="width"||c==="both"?(K=g[0]+I-f[3],B=g[0]+R+f[1]):(K=g[0]+(I+R-x.displaySize[0])/2,B=K+x.displaySize[0]);const X=s.top*b,ee=s.bottom*b;return c==="height"||c==="both"?(D=g[1]+X-f[0],q=g[1]+ee+f[2]):(D=g[1]+(X+ee-x.displaySize[1])/2,q=D+x.displaySize[1]),{image:x,top:D,right:B,bottom:q,left:K,collisionPadding:C}}const $a=128,ql=32640;function bT(u,s){const{expression:c}=s;if(c.kind==="constant")return{kind:"constant",layoutSize:c.evaluate(new pn(u+1))};if(c.kind==="source")return{kind:"source"};{const{zoomStops:f,interpolationType:g}=c;let b=0;for(;b<f.length&&f[b]<=u;)b++;b=Math.max(0,b-1);let x=b;for(;x<f.length&&f[x]<u+1;)x++;x=Math.min(f.length-1,x);const C=f[b],I=f[x];return c.kind==="composite"?{kind:"composite",minZoom:C,maxZoom:I,interpolationType:g}:{kind:"camera",minZoom:C,maxZoom:I,minSize:c.evaluate(new pn(C)),maxSize:c.evaluate(new pn(I)),interpolationType:g}}}function _b(u,s,c){let f="never";const g=u.get(s);return g?f=g:u.get(c)&&(f="always"),f}const FO=gp.VectorTileFeature.types,BO=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function yy(u,s,c,f,g,b,x,C,I,R,D,B,q){const K=C?Math.min(ql,Math.round(C[0])):0,X=C?Math.min(ql,Math.round(C[1])):0;u.emplaceBack(s,c,Math.round(32*f),Math.round(32*g),b,x,(K<<1)+(I?1:0),X,16*R,16*D,256*B,256*q)}function vb(u,s,c){u.emplaceBack(s.x,s.y,c),u.emplaceBack(s.x,s.y,c),u.emplaceBack(s.x,s.y,c),u.emplaceBack(s.x,s.y,c)}function NO(u){for(const s of u.sections)if(Jf(s.text))return!0;return!1}class bb{constructor(s){this.layoutVertexArray=new hr,this.indexArray=new rn,this.programConfigurations=s,this.segments=new Pr,this.dynamicLayoutVertexArray=new Ur,this.opacityVertexArray=new xn,this.hasVisibleVertices=!1,this.placedSymbolArray=new le}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(s,c,f,g){this.isEmpty()||(f&&(this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,vO.members),this.indexBuffer=s.createIndexBuffer(this.indexArray,c),this.dynamicLayoutVertexBuffer=s.createVertexBuffer(this.dynamicLayoutVertexArray,bO.members,!0),this.opacityVertexBuffer=s.createVertexBuffer(this.opacityVertexArray,BO,!0),this.opacityVertexBuffer.itemSize=1),(f||g)&&this.programConfigurations.upload(s))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}Mt("SymbolBuffers",bb);class xb{constructor(s,c,f){this.layoutVertexArray=new s,this.layoutAttributes=c,this.indexArray=new f,this.segments=new Pr,this.collisionVertexArray=new wn}upload(s){this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=s.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=s.createVertexBuffer(this.collisionVertexArray,xO.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}Mt("CollisionBuffers",xb);class qh{constructor(s){this.collisionBoxArray=s.collisionBoxArray,this.zoom=s.zoom,this.globalState=s.globalState,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(x=>x.id),this.index=s.index,this.pixelRatio=s.pixelRatio,this.sourceLayerIndex=s.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];const c=this.layers[0]._unevaluatedLayout._values;this.textSizeData=bT(this.zoom,c["text-size"]),this.iconSizeData=bT(this.zoom,c["icon-size"]);const f=this.layers[0].layout,g=f.get("symbol-sort-key"),b=f.get("symbol-z-order");this.canOverlap=_b(f,"text-overlap","text-allow-overlap")!=="never"||_b(f,"icon-overlap","icon-allow-overlap")!=="never"||f.get("text-ignore-placement")||f.get("icon-ignore-placement"),this.sortFeaturesByKey=b!=="viewport-y"&&!g.isConstant(),this.sortFeaturesByY=(b==="viewport-y"||b==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,f.get("symbol-placement")==="point"&&(this.writingModes=f.get("text-writing-mode").map(x=>d.an[x])),this.stateDependentLayerIds=this.layers.filter(x=>x.isStateDependent()).map(x=>x.id),this.sourceID=s.sourceID}createArrays(){this.text=new bb(new ia(this.layers,this.zoom,s=>/^text/.test(s))),this.icon=new bb(new ia(this.layers,this.zoom,s=>/^icon/.test(s))),this.glyphOffsetArray=new ge,this.lineVertexArray=new we,this.symbolInstances=new ve,this.textAnchorOffsets=new ye}calculateGlyphDependencies(s,c,f,g,b){for(let x=0;x<s.length;x++)if(c[s.charCodeAt(x)]=!0,(f||g)&&b){const C=vp[s.charAt(x)];C&&(c[C.charCodeAt(0)]=!0)}}populate(s,c,f){const g=this.layers[0],b=g.layout,x=b.get("text-font"),C=b.get("text-field"),I=b.get("icon-image"),R=(C.value.kind!=="constant"||C.value.value instanceof Ti&&!C.value.value.isEmpty()||C.value.value.toString().length>0)&&(x.value.kind!=="constant"||x.value.value.length>0),D=I.value.kind!=="constant"||!!I.value.value||Object.keys(I.parameters).length>0,B=b.get("symbol-sort-key");if(this.features=[],!R&&!D)return;const q=c.iconDependencies,K=c.glyphDependencies,X=c.availableImages,ee=new pn(this.zoom,{globalState:this.globalState});for(const{feature:ie,id:he,index:Ie,sourceLayerIndex:_e}of s){const W=g._featureFilter.needGeometry,ne=au(ie,W);if(!g._featureFilter.filter(ee,ne,f))continue;let be,$e;if(W||(ne.geometry=ou(ie)),R){const Ge=g.getValueAndResolveTokens("text-field",ne,f,X),Ye=Ti.factory(Ge),gt=this.hasRTLText=this.hasRTLText||NO(Ye);(!gt||Yo.getRTLTextPluginStatus()==="unavailable"||gt&&Yo.isParsed())&&(be=SO(Ye,g,ne))}if(D){const Ge=g.getValueAndResolveTokens("icon-image",ne,f,X);$e=Ge instanceof Vi?Ge:Vi.fromString(Ge)}if(!be&&!$e)continue;const ct=this.sortFeaturesByKey?B.evaluate(ne,{},f):void 0;if(this.features.push({id:he,text:be,icon:$e,index:Ie,sourceLayerIndex:_e,geometry:ne.geometry,properties:ie.properties,type:FO[ie.type],sortKey:ct}),$e&&(q[$e.name]=!0),be){const Ge=x.evaluate(ne,{},f).join(","),Ye=b.get("text-rotation-alignment")!=="viewport"&&b.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(d.an.vertical)>=0;for(const gt of be.sections)if(gt.image)q[gt.image.name]=!0;else{const ht=Kf(be.toString()),yt=gt.fontStack||Ge,rt=K[yt]=K[yt]||{};this.calculateGlyphDependencies(gt.text,rt,Ye,this.allowVerticalPlacement,ht)}}}b.get("symbol-placement")==="line"&&(this.features=function(ie){const he={},Ie={},_e=[];let W=0;function ne(Ge){_e.push(ie[Ge]),W++}function be(Ge,Ye,gt){const ht=Ie[Ge];return delete Ie[Ge],Ie[Ye]=ht,_e[ht].geometry[0].pop(),_e[ht].geometry[0]=_e[ht].geometry[0].concat(gt[0]),ht}function $e(Ge,Ye,gt){const ht=he[Ye];return delete he[Ye],he[Ge]=ht,_e[ht].geometry[0].shift(),_e[ht].geometry[0]=gt[0].concat(_e[ht].geometry[0]),ht}function ct(Ge,Ye,gt){const ht=gt?Ye[0][Ye[0].length-1]:Ye[0][0];return`${Ge}:${ht.x}:${ht.y}`}for(let Ge=0;Ge<ie.length;Ge++){const Ye=ie[Ge],gt=Ye.geometry,ht=Ye.text?Ye.text.toString():null;if(!ht){ne(Ge);continue}const yt=ct(ht,gt),rt=ct(ht,gt,!0);if(yt in Ie&&rt in he&&Ie[yt]!==he[rt]){const Dt=$e(yt,rt,gt),Zt=be(yt,rt,_e[Dt].geometry);delete he[yt],delete Ie[rt],Ie[ct(ht,_e[Zt].geometry,!0)]=Zt,_e[Dt].geometry=null}else yt in Ie?be(yt,rt,gt):rt in he?$e(yt,rt,gt):(ne(Ge),he[yt]=W-1,Ie[rt]=W-1)}return _e.filter(Ge=>Ge.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ie,he)=>ie.sortKey-he.sortKey)}update(s,c,f){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(s,c,this.layers,f),this.icon.programConfigurations.updatePaintArrays(s,c,this.layers,f))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(s){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(s),this.iconCollisionBox.upload(s)),this.text.upload(s,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(s,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(s,c){const f=this.lineVertexArray.length;if(s.segment!==void 0){let g=s.dist(c[s.segment+1]),b=s.dist(c[s.segment]);const x={};for(let C=s.segment+1;C<c.length;C++)x[C]={x:c[C].x,y:c[C].y,tileUnitDistanceFromAnchor:g},C<c.length-1&&(g+=c[C+1].dist(c[C]));for(let C=s.segment||0;C>=0;C--)x[C]={x:c[C].x,y:c[C].y,tileUnitDistanceFromAnchor:b},C>0&&(b+=c[C-1].dist(c[C]));for(let C=0;C<c.length;C++){const I=x[C];this.lineVertexArray.emplaceBack(I.x,I.y,I.tileUnitDistanceFromAnchor)}}return{lineStartIndex:f,lineLength:this.lineVertexArray.length-f}}
vendor: 4,446 bytes, line 75
75addSymbols(s,c,f,g,b,x,C,I,R,D,B,q){const K=s.indexArray,X=s.layoutVertexArray,ee=s.segments.prepareSegment(4*c.length,X,K,this.canOverlap?x.sortKey:void 0),ie=this.glyphOffsetArray.length,he=ee.vertexLength,Ie=this.allowVerticalPlacement&&C===d.an.vertical?Math.PI/2:0,_e=x.text&&x.text.sections;for(let W=0;W<c.length;W++){const{tl:ne,tr:be,bl:$e,br:ct,tex:Ge,pixelOffsetTL:Ye,pixelOffsetBR:gt,minFontScaleX:ht,minFontScaleY:yt,glyphOffset:rt,isSDF:Dt,sectionIndex:Zt}=c[W],Ut=ee.vertexLength,Bt=rt[1];yy(X,I.x,I.y,ne.x,Bt+ne.y,Ge.x,Ge.y,f,Dt,Ye.x,Ye.y,ht,yt),yy(X,I.x,I.y,be.x,Bt+be.y,Ge.x+Ge.w,Ge.y,f,Dt,gt.x,Ye.y,ht,yt),yy(X,I.x,I.y,$e.x,Bt+$e.y,Ge.x,Ge.y+Ge.h,f,Dt,Ye.x,gt.y,ht,yt),yy(X,I.x,I.y,ct.x,Bt+ct.y,Ge.x+Ge.w,Ge.y+Ge.h,f,Dt,gt.x,gt.y,ht,yt),vb(s.dynamicLayoutVertexArray,I,Ie),K.emplaceBack(Ut,Ut+2,Ut+1),K.emplaceBack(Ut+1,Ut+2,Ut+3),ee.vertexLength+=4,ee.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(rt[0]),W!==c.length-1&&Zt===c[W+1].sectionIndex||s.programConfigurations.populatePaintArrays(X.length,x,x.index,{},q,_e&&_e[Zt])}s.placedSymbolArray.emplaceBack(I.x,I.y,ie,this.glyphOffsetArray.length-ie,he,R,D,I.segment,f?f[0]:0,f?f[1]:0,g[0],g[1],C,0,!1,0,B)}_addCollisionDebugVertex(s,c,f,g,b,x){return c.emplaceBack(0,0),s.emplaceBack(f.x,f.y,g,b,Math.round(x.x),Math.round(x.y))}addCollisionDebugVertices(s,c,f,g,b,x,C){const I=b.segments.prepareSegment(4,b.layoutVertexArray,b.indexArray),R=I.vertexLength,D=b.layoutVertexArray,B=b.collisionVertexArray,q=C.anchorX,K=C.anchorY;this._addCollisionDebugVertex(D,B,x,q,K,new L(s,c)),this._addCollisionDebugVertex(D,B,x,q,K,new L(f,c)),this._addCollisionDebugVertex(D,B,x,q,K,new L(f,g)),this._addCollisionDebugVertex(D,B,x,q,K,new L(s,g)),I.vertexLength+=4;const X=b.indexArray;X.emplaceBack(R,R+1),X.emplaceBack(R+1,R+2),X.emplaceBack(R+2,R+3),X.emplaceBack(R+3,R),I.primitiveLength+=4}addDebugCollisionBoxes(s,c,f,g){for(let b=s;b<c;b++){const x=this.collisionBoxArray.get(b);this.addCollisionDebugVertices(x.x1,x.y1,x.x2,x.y2,g?this.textCollisionBox:this.iconCollisionBox,x.anchorPoint,f)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new xb(Yr,aT.members,Jr),this.iconCollisionBox=new xb(Yr,aT.members,Jr);for(let s=0;s<this.symbolInstances.length;s++){const c=this.symbolInstances.get(s);this.addDebugCollisionBoxes(c.textBoxStartIndex,c.textBoxEndIndex,c,!0),this.addDebugCollisionBoxes(c.verticalTextBoxStartIndex,c.verticalTextBoxEndIndex,c,!0),this.addDebugCollisionBoxes(c.iconBoxStartIndex,c.iconBoxEndIndex,c,!1),this.addDebugCollisionBoxes(c.verticalIconBoxStartIndex,c.verticalIconBoxEndIndex,c,!1)}}_deserializeCollisionBoxesForSymbol(s,c,f,g,b,x,C,I,R){const D={};for(let B=c;B<f;B++){const q=s.get(B);D.textBox={x1:q.x1,y1:q.y1,x2:q.x2,y2:q.y2,anchorPointX:q.anchorPointX,anchorPointY:q.anchorPointY},D.textFeatureIndex=q.featureIndex;break}for(let B=g;B<b;B++){const q=s.get(B);D.verticalTextBox={x1:q.x1,y1:q.y1,x2:q.x2,y2:q.y2,anchorPointX:q.anchorPointX,anchorPointY:q.anchorPointY},D.verticalTextFeatureIndex=q.featureIndex;break}for(let B=x;B<C;B++){const q=s.get(B);D.iconBox={x1:q.x1,y1:q.y1,x2:q.x2,y2:q.y2,anchorPointX:q.anchorPointX,anchorPointY:q.anchorPointY},D.iconFeatureIndex=q.featureIndex;break}for(let B=I;B<R;B++){const q=s.get(B);D.verticalIconBox={x1:q.x1,y1:q.y1,x2:q.x2,y2:q.y2,anchorPointX:q.anchorPointX,anchorPointY:q.anchorPointY},D.verticalIconFeatureIndex=q.featureIndex;break}return D}deserializeCollisionBoxes(s){this.collisionArrays=[];for(let c=0;c<this.symbolInstances.length;c++){const f=this.symbolInstances.get(c);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(s,f.textBoxStartIndex,f.textBoxEndIndex,f.verticalTextBoxStartIndex,f.verticalTextBoxEndIndex,f.iconBoxStartIndex,f.iconBoxEndIndex,f.verticalIconBoxStartIndex,f.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(s,c){const f=s.placedSymbolArray.get(c),g=f.vertexStartIndex+4*f.numGlyphs;for(let b=f.vertexStartIndex;b<g;b+=4)s.indexArray.emplaceBack(b,b+2,b+1),s.indexArray.emplaceBack(b+1,b+2,b+3)}
vendor: 50,163 bytes, line 75
75getSortedSymbolIndexes(s){if(this.sortedAngle===s&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const c=Math.sin(s),f=Math.cos(s),g=[],b=[],x=[];for(let C=0;C<this.symbolInstances.length;++C){x.push(C);const I=this.symbolInstances.get(C);g.push(0|Math.round(c*I.anchorX+f*I.anchorY)),b.push(I.featureIndex)}return x.sort((C,I)=>g[C]-g[I]||b[I]-b[C]),x}addToSortKeyRanges(s,c){const f=this.sortKeyRanges[this.sortKeyRanges.length-1];f&&f.sortKey===c?f.symbolInstanceEnd=s+1:this.sortKeyRanges.push({sortKey:c,symbolInstanceStart:s,symbolInstanceEnd:s+1})}sortFeatures(s){if(this.sortFeaturesByY&&this.sortedAngle!==s&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(s),this.sortedAngle=s,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const c of this.symbolInstanceIndexes){const f=this.symbolInstances.get(c);this.featureSortOrder.push(f.featureIndex),[f.rightJustifiedTextSymbolIndex,f.centerJustifiedTextSymbolIndex,f.leftJustifiedTextSymbolIndex].forEach((g,b,x)=>{g>=0&&x.indexOf(g)===b&&this.addIndicesForPlacedSymbol(this.text,g)}),f.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,f.verticalPlacedTextSymbolIndex),f.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,f.placedIconSymbolIndex),f.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,f.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let xT,wT;Mt("SymbolBucket",qh,{omit:["layers","collisionBoxArray","features","compareText"]}),qh.MAX_GLYPHS=65535,qh.addDynamicAttributes=vb;var wb={get paint(){return wT=wT||new Oi({"icon-opacity":new Wt(ke.paint_symbol["icon-opacity"]),"icon-color":new Wt(ke.paint_symbol["icon-color"]),"icon-halo-color":new Wt(ke.paint_symbol["icon-halo-color"]),"icon-halo-width":new Wt(ke.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Wt(ke.paint_symbol["icon-halo-blur"]),"icon-translate":new Ot(ke.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ot(ke.paint_symbol["icon-translate-anchor"]),"text-opacity":new Wt(ke.paint_symbol["text-opacity"]),"text-color":new Wt(ke.paint_symbol["text-color"],{runtimeType:ts,getOverride:u=>u.textColor,hasOverride:u=>!!u.textColor}),"text-halo-color":new Wt(ke.paint_symbol["text-halo-color"]),"text-halo-width":new Wt(ke.paint_symbol["text-halo-width"]),"text-halo-blur":new Wt(ke.paint_symbol["text-halo-blur"]),"text-translate":new Ot(ke.paint_symbol["text-translate"]),"text-translate-anchor":new Ot(ke.paint_symbol["text-translate-anchor"])})},get layout(){return xT=xT||new Oi({"symbol-placement":new Ot(ke.layout_symbol["symbol-placement"]),"symbol-spacing":new Ot(ke.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ot(ke.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Wt(ke.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ot(ke.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ot(ke.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Ot(ke.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Ot(ke.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ot(ke.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ot(ke.layout_symbol["icon-rotation-alignment"]),"icon-size":new Wt(ke.layout_symbol["icon-size"]),"icon-text-fit":new Ot(ke.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ot(ke.layout_symbol["icon-text-fit-padding"]),"icon-image":new Wt(ke.layout_symbol["icon-image"]),"icon-rotate":new Wt(ke.layout_symbol["icon-rotate"]),"icon-padding":new Wt(ke.layout_symbol["icon-padding"]),"icon-keep-upright":new Ot(ke.layout_symbol["icon-keep-upright"]),"icon-offset":new Wt(ke.layout_symbol["icon-offset"]),"icon-anchor":new Wt(ke.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ot(ke.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ot(ke.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ot(ke.layout_symbol["text-rotation-alignment"]),"text-field":new Wt(ke.layout_symbol["text-field"]),"text-font":new Wt(ke.layout_symbol["text-font"]),"text-size":new Wt(ke.layout_symbol["text-size"]),"text-max-width":new Wt(ke.layout_symbol["text-max-width"]),"text-line-height":new Ot(ke.layout_symbol["text-line-height"]),"text-letter-spacing":new Wt(ke.layout_symbol["text-letter-spacing"]),"text-justify":new Wt(ke.layout_symbol["text-justify"]),"text-radial-offset":new Wt(ke.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ot(ke.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Wt(ke.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Wt(ke.layout_symbol["text-anchor"]),"text-max-angle":new Ot(ke.layout_symbol["text-max-angle"]),"text-writing-mode":new Ot(ke.layout_symbol["text-writing-mode"]),"text-rotate":new Wt(ke.layout_symbol["text-rotate"]),"text-padding":new Ot(ke.layout_symbol["text-padding"]),"text-keep-upright":new Ot(ke.layout_symbol["text-keep-upright"]),"text-transform":new Wt(ke.layout_symbol["text-transform"]),"text-offset":new Wt(ke.layout_symbol["text-offset"]),"text-allow-overlap":new Ot(ke.layout_symbol["text-allow-overlap"]),"text-overlap":new Ot(ke.layout_symbol["text-overlap"]),"text-ignore-placement":new Ot(ke.layout_symbol["text-ignore-placement"]),"text-optional":new Ot(ke.layout_symbol["text-optional"])})}};class ST{constructor(s){if(s.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=s.property.overrides?s.property.overrides.runtimeType:ka,this.defaultValue=s}evaluate(s){if(s.formattedSection){const c=this.defaultValue.property.overrides;if(c&&c.hasOverride(s.formattedSection))return c.getOverride(s.formattedSection)}return s.feature&&s.featureState?this.defaultValue.evaluate(s.feature,s.featureState):this.defaultValue.property.specification.default}eachChild(s){this.defaultValue.isConstant()||s(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Mt("FormatSectionOverride",ST,{omit:["defaultValue"]});class _y extends hi{constructor(s){super(s,wb)}recalculate(s,c){if(super.recalculate(s,c),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){const f=this.layout.get("text-writing-mode");if(f){const g=[];for(const b of f)g.indexOf(b)<0&&g.push(b);this.layout._values["text-writing-mode"]=g}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(s,c,f,g){const b=this.layout.get(s).evaluate(c,{},f,g),x=this._unevaluatedLayout._values[s];return x.isDataDriven()||xh(x.value)||!b?b:function(C,I){return I.replace(/{([^{}]+)}/g,(R,D)=>C&&D in C?String(C[D]):"")}(c.properties,b)}createBucket(s){return new qh(s)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const s of wb.paint.overridableProperties){if(!_y.hasPaintOverride(this.layout,s))continue;const c=this.paint.get(s),f=new ST(c),g=new bh(f,c.property.specification);let b=null;b=c.value.kind==="constant"||c.value.kind==="source"?new Vc("source",g):new Sh("composite",g,c.value.zoomStops),this.paint._values[s]=new Ks(c.property,b,c.parameters)}}_handleOverridablePaintPropertyUpdate(s,c,f){return!(!this.layout||c.isDataDriven()||f.isDataDriven())&&_y.hasPaintOverride(this.layout,s)}static hasPaintOverride(s,c){const f=s.get("text-field"),g=wb.paint.properties[c];let b=!1;const x=C=>{for(const I of C)if(g.overrides&&g.overrides.hasOverride(I))return void(b=!0)};if(f.value.kind==="constant"&&f.value.value instanceof Ti)x(f.value.value.sections);else if(f.value.kind==="source"){const C=R=>{b||(R instanceof Li&&Jt(R.value)===Ia?x(R.value.sections):R instanceof Oc?x(R.sections):R.eachChild(C))},I=f.value;I._styleExpression&&C(I._styleExpression.expression)}return b}}let TT;var jO={get paint(){return TT=TT||new Oi({"background-color":new Ot(ke.paint_background["background-color"]),"background-pattern":new ep(ke.paint_background["background-pattern"]),"background-opacity":new Ot(ke.paint_background["background-opacity"])})}};class $O extends hi{constructor(s){super(s,jO)}}let CT;var UO={get paint(){return CT=CT||new Oi({"raster-opacity":new Ot(ke.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ot(ke.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ot(ke.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ot(ke.paint_raster["raster-brightness-max"]),"raster-saturation":new Ot(ke.paint_raster["raster-saturation"]),"raster-contrast":new Ot(ke.paint_raster["raster-contrast"]),"raster-resampling":new Ot(ke.paint_raster["raster-resampling"]),"raster-fade-duration":new Ot(ke.paint_raster["raster-fade-duration"])})}};class VO extends hi{constructor(s){super(s,UO)}}class qO extends hi{constructor(s){super(s,{}),this.onAdd=c=>{this.implementation.onAdd&&this.implementation.onAdd(c,c.painter.context.gl)},this.onRemove=c=>{this.implementation.onRemove&&this.implementation.onRemove(c,c.painter.context.gl)},this.implementation=s}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class GO{constructor(s){this._methodToThrottle=s,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const HO={once:!0},Sb=63710088e-1;class Gl{constructor(s,c){if(isNaN(s)||isNaN(c))throw new Error(`Invalid LngLat object: (${s}, ${c})`);if(this.lng=+s,this.lat=+c,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Gl(pt(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(s){const c=Math.PI/180,f=this.lat*c,g=s.lat*c,b=Math.sin(f)*Math.sin(g)+Math.cos(f)*Math.cos(g)*Math.cos((s.lng-this.lng)*c);return Sb*Math.acos(Math.min(b,1))}static convert(s){if(s instanceof Gl)return s;if(Array.isArray(s)&&(s.length===2||s.length===3))return new Gl(Number(s[0]),Number(s[1]));if(!Array.isArray(s)&&typeof s=="object"&&s!==null)return new Gl(Number("lng"in s?s.lng:s.lon),Number(s.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const ET=2*Math.PI*Sb;function kT(u){return ET*Math.cos(u*Math.PI/180)}function IT(u){return(180+u)/360}function PT(u){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u*Math.PI/360)))/360}function AT(u,s){return u/kT(s)}function Tb(u){return 360/Math.PI*Math.atan(Math.exp((180-360*u)*Math.PI/180))-90}function MT(u,s){return u*kT(Tb(s))}class xp{constructor(s,c,f=0){this.x=+s,this.y=+c,this.z=+f}static fromLngLat(s,c=0){const f=Gl.convert(s);return new xp(IT(f.lng),PT(f.lat),AT(c,f.lat))}toLngLat(){return new Gl(360*this.x-180,Tb(this.y))}toAltitude(){return MT(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/ET*(s=Tb(this.y),1/Math.cos(s*Math.PI/180));var s}}function RT(u,s,c){var f=2*Math.PI*6378137/256/Math.pow(2,c);return[u*f-2*Math.PI*6378137/2,s*f-2*Math.PI*6378137/2]}class Cb{constructor(s,c,f){if(!function(g,b,x){return!(g<0||g>25||x<0||x>=Math.pow(2,g)||b<0||b>=Math.pow(2,g))}(s,c,f))throw new Error(`x=${c}, y=${f}, z=${s} outside of bounds. 0<=x<${Math.pow(2,s)}, 0<=y<${Math.pow(2,s)} 0<=z<=25 `);this.z=s,this.x=c,this.y=f,this.key=Gh(0,s,s,c,f)}equals(s){return this.z===s.z&&this.x===s.x&&this.y===s.y}url(s,c,f){const g=(x=this.y,C=this.z,I=RT(256*(b=this.x),256*(x=Math.pow(2,C)-x-1),C),R=RT(256*(b+1),256*(x+1),C),I[0]+","+I[1]+","+R[0]+","+R[1]);var b,x,C,I,R;const D=function(B,q,K){let X,ee="";for(let ie=B;ie>0;ie--)X=1<<ie-1,ee+=(q&X?1:0)+(K&X?2:0);return ee}(this.z,this.x,this.y);return s[(this.x+this.y)%s.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(f==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,c>1?"@2x":"").replace(/{quadkey}/g,D).replace(/{bbox-epsg-3857}/g,g)}isChildOf(s){const c=this.z-s.z;return c>0&&s.x===this.x>>c&&s.y===this.y>>c}getTilePoint(s){const c=Math.pow(2,this.z);return new L((s.x*c-this.x)*xt,(s.y*c-this.y)*xt)}toString(){return`${this.z}/${this.x}/${this.y}`}}class LT{constructor(s,c){this.wrap=s,this.canonical=c,this.key=Gh(s,c.z,c.z,c.x,c.y)}}class As{constructor(s,c,f,g,b){if(this.terrainRttPosMatrix32f=null,s<f)throw new Error(`overscaledZ should be >= z; overscaledZ = ${s}; z = ${f}`);this.overscaledZ=s,this.wrap=c,this.canonical=new Cb(f,+g,+b),this.key=Gh(c,s,f,g,b)}clone(){return new As(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(s){return this.overscaledZ===s.overscaledZ&&this.wrap===s.wrap&&this.canonical.equals(s.canonical)}scaledTo(s){if(s>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${s}; overscaledZ = ${this.overscaledZ}`);const c=this.canonical.z-s;return s>this.canonical.z?new As(s,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new As(s,this.wrap,s,this.canonical.x>>c,this.canonical.y>>c)}calculateScaledKey(s,c){if(s>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${s}; overscaledZ = ${this.overscaledZ}`);const f=this.canonical.z-s;return s>this.canonical.z?Gh(this.wrap*+c,s,this.canonical.z,this.canonical.x,this.canonical.y):Gh(this.wrap*+c,s,s,this.canonical.x>>f,this.canonical.y>>f)}isChildOf(s){if(s.wrap!==this.wrap)return!1;const c=this.canonical.z-s.canonical.z;return s.overscaledZ===0||s.overscaledZ<this.overscaledZ&&s.canonical.x===this.canonical.x>>c&&s.canonical.y===this.canonical.y>>c}children(s){if(this.overscaledZ>=s)return[new As(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const c=this.canonical.z+1,f=2*this.canonical.x,g=2*this.canonical.y;return[new As(c,this.wrap,c,f,g),new As(c,this.wrap,c,f+1,g),new As(c,this.wrap,c,f,g+1),new As(c,this.wrap,c,f+1,g+1)]}isLessThan(s){return this.wrap<s.wrap||!(this.wrap>s.wrap)&&(this.overscaledZ<s.overscaledZ||!(this.overscaledZ>s.overscaledZ)&&(this.canonical.x<s.canonical.x||!(this.canonical.x>s.canonical.x)&&this.canonical.y<s.canonical.y))}wrapped(){return new As(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(s){return new As(this.overscaledZ,s,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new LT(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(s){return this.canonical.getTilePoint(new xp(s.x-this.wrap,s.y))}}function Gh(u,s,c,f,g){(u*=2)<0&&(u=-1*u-1);const b=1<<c;return(b*b*u+b*g+f).toString(36)+c.toString(36)+s.toString(36)}Mt("CanonicalTileID",Cb),Mt("OverscaledTileID",As,{omit:["terrainRttPosMatrix32f"]});class uu{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(s){return this.minX=Math.min(this.minX,s.x),this.minY=Math.min(this.minY,s.y),this.maxX=Math.max(this.maxX,s.x),this.maxY=Math.max(this.maxY,s.y),this}expandBy(s){return this.minX-=s,this.minY-=s,this.maxX+=s,this.maxY+=s,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(s){return this.expandBy(-s)}map(s){const c=new uu;return c.extend(s(new L(this.minX,this.minY))),c.extend(s(new L(this.maxX,this.minY))),c.extend(s(new L(this.minX,this.maxY))),c.extend(s(new L(this.maxX,this.maxY))),c}static fromPoints(s){const c=new uu;for(const f of s)c.extend(f);return c}contains(s){return s.x>=this.minX&&s.x<=this.maxX&&s.y>=this.minY&&s.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(s){return!this.empty()&&!s.empty()&&s.minX>=this.minX&&s.maxX<=this.maxX&&s.minY>=this.minY&&s.maxY<=this.maxY}intersects(s){return!this.empty()&&!s.empty()&&s.minX<=this.maxX&&s.maxX>=this.minX&&s.minY<=this.maxY&&s.maxY>=this.minY}}class zT{constructor(s){this._stringToNumber={},this._numberToString=[];for(let c=0;c<s.length;c++){const f=s[c];this._stringToNumber[f]=c,this._numberToString[c]=f}}encode(s){return this._stringToNumber[s]}decode(s){if(s>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${s} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[s]}}class DT{constructor(s,c,f,g,b){this.type="Feature",this._vectorTileFeature=s,s._z=c,s._x=f,s._y=g,this.properties=s.properties,this.id=b}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(s){this._geometry=s}toJSON(){const s={geometry:this.geometry};for(const c in this)c!=="_geometry"&&c!=="_vectorTileFeature"&&(s[c]=this[c]);return s}}class OT{constructor(s,c){this.tileID=s,this.x=s.canonical.x,this.y=s.canonical.y,this.z=s.canonical.z,this.grid=new Nl(xt,16,0),this.grid3D=new Nl(xt,16,0),this.featureIndexArray=new Ve,this.promoteId=c}insert(s,c,f,g,b,x){const C=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(f,g,b);const I=x?this.grid3D:this.grid;for(let R=0;R<c.length;R++){const D=c[R],B=[1/0,1/0,-1/0,-1/0];for(let q=0;q<D.length;q++){const K=D[q];B[0]=Math.min(B[0],K.x),B[1]=Math.min(B[1],K.y),B[2]=Math.max(B[2],K.x),B[3]=Math.max(B[3],K.y)}B[0]<xt&&B[1]<xt&&B[2]>=0&&B[3]>=0&&I.insert(C,B[0],B[1],B[2],B[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new gp.VectorTile(new pb(this.rawTileData)).layers,this.sourceLayerCoder=new zT(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(s,c,f,g){this.loadVTLayers();const b=s.params,x=xt/s.tileSize/s.scale,C=Ko(b.filter),I=s.queryGeometry,R=s.queryPadding*x,D=uu.fromPoints(I),B=this.grid.query(D.minX-R,D.minY-R,D.maxX+R,D.maxY+R),q=uu.fromPoints(s.cameraQueryGeometry).expandBy(R),K=this.grid3D.query(q.minX,q.minY,q.maxX,q.maxY,(ie,he,Ie,_e)=>function(W,ne,be,$e,ct){for(const Ye of W)if(ne<=Ye.x&&be<=Ye.y&&$e>=Ye.x&&ct>=Ye.y)return!0;const Ge=[new L(ne,be),new L(ne,ct),new L($e,ct),new L($e,be)];if(W.length>2){for(const Ye of Ge)if(Nh(W,Ye))return!0}for(let Ye=0;Ye<W.length-1;Ye++)if(LD(W[Ye],W[Ye+1],Ge))return!0;return!1}(s.cameraQueryGeometry,ie-R,he-R,Ie+R,_e+R));for(const ie of K)B.push(ie);B.sort(ZO);const X={};let ee;for(let ie=0;ie<B.length;ie++){const he=B[ie];if(he===ee)continue;ee=he;const Ie=this.featureIndexArray.get(he);let _e=null;this.loadMatchingFeature(X,Ie.bucketIndex,Ie.sourceLayerIndex,Ie.featureIndex,C,b.layers,b.availableImages,c,f,g,(W,ne,be)=>(_e||(_e=ou(W)),ne.queryIntersectsFeature({queryGeometry:I,feature:W,featureState:be,geometry:_e,zoom:this.z,transform:s.transform,pixelsToTileUnits:x,pixelPosMatrix:s.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:s.getElevation})))}return X}loadMatchingFeature(s,c,f,g,b,x,C,I,R,D,B){const q=this.bucketLayerIDs[c];if(x&&!q.some(ie=>x.has(ie)))return;const K=this.sourceLayerCoder.decode(f),X=this.vtLayers[K].feature(g);if(b.needGeometry){const ie=au(X,!0);if(!b.filter(new pn(this.tileID.overscaledZ),ie,this.tileID.canonical))return}else if(!b.filter(new pn(this.tileID.overscaledZ),X))return;const ee=this.getId(X,K);for(let ie=0;ie<q.length;ie++){const he=q[ie];if(x&&!x.has(he))continue;const Ie=I[he];if(!Ie)continue;let _e={};ee&&D&&(_e=D.getState(Ie.sourceLayer||"_geojsonTileLayer",ee));const W=Nt({},R[he]);W.paint=FT(W.paint,Ie.paint,X,_e,C),W.layout=FT(W.layout,Ie.layout,X,_e,C);const ne=!B||B(X,Ie,_e);if(!ne)continue;const be=new DT(X,this.z,this.x,this.y,ee);be.layer=W;let $e=s[he];$e===void 0&&($e=s[he]=[]),$e.push({featureIndex:g,feature:be,intersectionZ:ne})}}lookupSymbolFeatures(s,c,f,g,b,x,C,I){const R={};this.loadVTLayers();const D=Ko(b);for(const B of s)this.loadMatchingFeature(R,f,g,B,D,x,C,I,c);return R}hasLayer(s){for(const c of this.bucketLayerIDs)for(const f of c)if(s===f)return!0;return!1}getId(s,c){var f;let g=s.id;return this.promoteId&&(g=s.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[c]],typeof g=="boolean"&&(g=Number(g)),g===void 0&&(!((f=s.properties)===null||f===void 0)&&f.cluster)&&this.promoteId&&(g=Number(s.properties.cluster_id))),g}}function FT(u,s,c,f,g){return ue(u,(b,x)=>{const C=s instanceof Dh?s.get(x):null;return C&&C.evaluate?C.evaluate(c,f,g):C})}function ZO(u,s){return s-u}function BT(u,s,c,f,g){const b=[];for(let x=0;x<u.length;x++){const C=u[x];let I;for(let R=0;R<C.length-1;R++){let D=C[R],B=C[R+1];D.x<s&&B.x<s||(D.x<s?D=new L(s,D.y+(s-D.x)/(B.x-D.x)*(B.y-D.y))._round():B.x<s&&(B=new L(s,D.y+(s-D.x)/(B.x-D.x)*(B.y-D.y))._round()),D.y<c&&B.y<c||(D.y<c?D=new L(D.x+(c-D.y)/(B.y-D.y)*(B.x-D.x),c)._round():B.y<c&&(B=new L(D.x+(c-D.y)/(B.y-D.y)*(B.x-D.x),c)._round()),D.x>=f&&B.x>=f||(D.x>=f?D=new L(f,D.y+(f-D.x)/(B.x-D.x)*(B.y-D.y))._round():B.x>=f&&(B=new L(f,D.y+(f-D.x)/(B.x-D.x)*(B.y-D.y))._round()),D.y>=g&&B.y>=g||(D.y>=g?D=new L(D.x+(g-D.y)/(B.y-D.y)*(B.x-D.x),g)._round():B.y>=g&&(B=new L(D.x+(g-D.y)/(B.y-D.y)*(B.x-D.x),g)._round()),I&&D.equals(I[I.length-1])||(I=[D],b.push(I)),I.push(B)))))}}return b}Mt("FeatureIndex",OT,{omit:["rawTileData","sourceLayerCoder"]});class Hl extends L{constructor(s,c,f,g){super(s,c),this.angle=f,g!==void 0&&(this.segment=g)}clone(){return new Hl(this.x,this.y,this.angle,this.segment)}}function NT(u,s,c,f,g){if(s.segment===void 0||c===0)return!0;let b=s,x=s.segment+1,C=0;for(;C>-c/2;){if(x--,x<0)return!1;C-=u[x].dist(b),b=u[x]}C+=u[x].dist(u[x+1]),x++;const I=[];let R=0;for(;C<c/2;){const D=u[x],B=u[x+1];if(!B)return!1;let q=u[x-1].angleTo(D)-D.angleTo(B);for(q=Math.abs((q+3*Math.PI)%(2*Math.PI)-Math.PI),I.push({distance:C,angleDelta:q}),R+=q;C-I[0].distance>f;)R-=I.shift().angleDelta;if(R>g)return!1;x++,C+=D.dist(B)}return!0}function jT(u){let s=0;for(let c=0;c<u.length-1;c++)s+=u[c].dist(u[c+1]);return s}function $T(u,s,c){return u?.6*s*c:0}function UT(u,s){return Math.max(u?u.right-u.left:0,s?s.right-s.left:0)}function WO(u,s,c,f,g,b){const x=$T(c,g,b),C=UT(c,f)*b;let I=0;const R=jT(u)/2;for(let D=0;D<u.length-1;D++){const B=u[D],q=u[D+1],K=B.dist(q);if(I+K>R){const X=(R-I)/K,ee=ns.number(B.x,q.x,X),ie=ns.number(B.y,q.y,X),he=new Hl(ee,ie,q.angleTo(B),D);return he._round(),!x||NT(u,he,C,x,s)?he:void 0}I+=K}}function KO(u,s,c,f,g,b,x,C,I){const R=$T(f,b,x),D=UT(f,g),B=D*x,q=u[0].x===0||u[0].x===I||u[0].y===0||u[0].y===I;return s-B<s/4&&(s=B+s/4),VT(u,q?s/2*C%s:(D/2+2*b)*x*C%s,s,R,c,B,q,!1,I)}function VT(u,s,c,f,g,b,x,C,I){const R=b/2,D=jT(u);let B=0,q=s-c,K=[];for(let X=0;X<u.length-1;X++){const ee=u[X],ie=u[X+1],he=ee.dist(ie),Ie=ie.angleTo(ee);for(;q+c<B+he;){q+=c;const _e=(q-B)/he,W=ns.number(ee.x,ie.x,_e),ne=ns.number(ee.y,ie.y,_e);if(W>=0&&W<I&&ne>=0&&ne<I&&q-R>=0&&q+R<=D){const be=new Hl(W,ne,Ie,X);be._round(),f&&!NT(u,be,b,f,g)||K.push(be)}}B+=he}return C||K.length||x||(K=VT(u,B/2,c,f,g,b,x,!0,I)),K}function qT(u,s,c,f){const g=[],b=u.image,x=b.pixelRatio,C=b.paddedRect.w-2,I=b.paddedRect.h-2;let R={x1:u.left,y1:u.top,x2:u.right,y2:u.bottom};const D=b.stretchX||[[0,C]],B=b.stretchY||[[0,I]],q=(rt,Dt)=>rt+Dt[1]-Dt[0],K=D.reduce(q,0),X=B.reduce(q,0),ee=C-K,ie=I-X;let he=0,Ie=K,_e=0,W=X,ne=0,be=ee,$e=0,ct=ie;if(b.content&&f){const rt=b.content,Dt=rt[2]-rt[0],Zt=rt[3]-rt[1];(b.textFitWidth||b.textFitHeight)&&(R=_T(u)),he=vy(D,0,rt[0]),_e=vy(B,0,rt[1]),Ie=vy(D,rt[0],rt[2]),W=vy(B,rt[1],rt[3]),ne=rt[0]-he,$e=rt[1]-_e,be=Dt-Ie,ct=Zt-W}const Ge=R.x1,Ye=R.y1,gt=R.x2-Ge,ht=R.y2-Ye,yt=(rt,Dt,Zt,Ut)=>{const Bt=by(rt.stretch-he,Ie,gt,Ge),Tr=xy(rt.fixed-ne,be,rt.stretch,K),Mn=by(Dt.stretch-_e,W,ht,Ye),Kn=xy(Dt.fixed-$e,ct,Dt.stretch,X),ki=by(Zt.stretch-he,Ie,gt,Ge),Ms=xy(Zt.fixed-ne,be,Zt.stretch,K),ss=by(Ut.stretch-_e,W,ht,Ye),mi=xy(Ut.fixed-$e,ct,Ut.stretch,X),Sn=new L(Bt,Mn),ni=new L(ki,Mn),gi=new L(ki,ss),yi=new L(Bt,ss),Zi=new L(Tr/x,Kn/x),Rs=new L(Ms/x,mi/x),ii=s*Math.PI/180;if(ii){const si=Math.sin(ii),oi=Math.cos(ii),qn=[oi,-si,si,oi];Sn._matMult(qn),ni._matMult(qn),yi._matMult(qn),gi._matMult(qn)}const os=rt.stretch+rt.fixed,Xn=Dt.stretch+Dt.fixed;return{tl:Sn,tr:ni,bl:yi,br:gi,tex:{x:b.paddedRect.x+1+os,y:b.paddedRect.y+1+Xn,w:Zt.stretch+Zt.fixed-os,h:Ut.stretch+Ut.fixed-Xn},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Zi,pixelOffsetBR:Rs,minFontScaleX:be/x/gt,minFontScaleY:ct/x/ht,isSDF:c}};if(f&&(b.stretchX||b.stretchY)){const rt=GT(D,ee,K),Dt=GT(B,ie,X);for(let Zt=0;Zt<rt.length-1;Zt++){const Ut=rt[Zt],Bt=rt[Zt+1];for(let Tr=0;Tr<Dt.length-1;Tr++)g.push(yt(Ut,Dt[Tr],Bt,Dt[Tr+1]))}}else g.push(yt({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:C+1},{fixed:0,stretch:I+1}));return g}function vy(u,s,c){let f=0;for(const g of u)f+=Math.max(s,Math.min(c,g[1]))-Math.max(s,Math.min(c,g[0]));return f}function GT(u,s,c){const f=[{fixed:-1,stretch:0}];for(const[g,b]of u){const x=f[f.length-1];f.push({fixed:g-x.stretch,stretch:x.stretch}),f.push({fixed:g-x.stretch,stretch:x.stretch+(b-g)})}return f.push({fixed:s+1,stretch:c}),f}function by(u,s,c,f){return u/s*c+f}function xy(u,s,c,f){return u-s*c/f}Mt("Anchor",Hl);class wy{constructor(s,c,f,g,b,x,C,I,R,D){var B;if(this.boxStartIndex=s.length,R){let q=x.top,K=x.bottom;const X=x.collisionPadding;X&&(q-=X[1],K+=X[3]);let ee=K-q;ee>0&&(ee=Math.max(10,ee),this.circleDiameter=ee)}else{const q=!((B=x.image)===null||B===void 0)&&B.content&&(x.image.textFitWidth||x.image.textFitHeight)?_T(x):{x1:x.left,y1:x.top,x2:x.right,y2:x.bottom};q.y1=q.y1*C-I[0],q.y2=q.y2*C+I[2],q.x1=q.x1*C-I[3],q.x2=q.x2*C+I[1];const K=x.collisionPadding;if(K&&(q.x1-=K[0]*C,q.y1-=K[1]*C,q.x2+=K[2]*C,q.y2+=K[3]*C),D){const X=new L(q.x1,q.y1),ee=new L(q.x2,q.y1),ie=new L(q.x1,q.y2),he=new L(q.x2,q.y2),Ie=D*Math.PI/180;X._rotate(Ie),ee._rotate(Ie),ie._rotate(Ie),he._rotate(Ie),q.x1=Math.min(X.x,ee.x,ie.x,he.x),q.x2=Math.max(X.x,ee.x,ie.x,he.x),q.y1=Math.min(X.y,ee.y,ie.y,he.y),q.y2=Math.max(X.y,ee.y,ie.y,he.y)}s.emplaceBack(c.x,c.y,q.x1,q.y1,q.x2,q.y2,f,g,b)}this.boxEndIndex=s.length}}class XO{constructor(s=[],c=(f,g)=>f<g?-1:f>g?1:0){if(this.data=s,this.length=this.data.length,this.compare=c,this.length>0)for(let f=(this.length>>1)-1;f>=0;f--)this._down(f)}push(s){this.data.push(s),this._up(this.length++)}pop(){if(this.length===0)return;const s=this.data[0],c=this.data.pop();return--this.length>0&&(this.data[0]=c,this._down(0)),s}peek(){return this.data[0]}_up(s){const{data:c,compare:f}=this,g=c[s];for(;s>0;){const b=s-1>>1,x=c[b];if(f(g,x)>=0)break;c[s]=x,s=b}c[s]=g}_down(s){const{data:c,compare:f}=this,g=this.length>>1,b=c[s];for(;s<g;){let x=1+(s<<1);const C=x+1;if(C<this.length&&f(c[C],c[x])<0&&(x=C),f(c[x],b)>=0)break;c[s]=c[x],s=x}c[s]=b}}function YO(u,s=1,c=!1){const f=uu.fromPoints(u[0]),g=Math.min(f.width(),f.height());let b=g/2;const x=new XO([],JO),{minX:C,minY:I,maxX:R,maxY:D}=f;if(g===0)return new L(C,I);for(let K=C;K<R;K+=g)for(let X=I;X<D;X+=g)x.push(new Hh(K+b,X+b,b,u));let B=function(K){let X=0,ee=0,ie=0;const he=K[0];for(let Ie=0,_e=he.length,W=_e-1;Ie<_e;W=Ie++){const ne=he[Ie],be=he[W],$e=ne.x*be.y-be.x*ne.y;ee+=(ne.x+be.x)*$e,ie+=(ne.y+be.y)*$e,X+=3*$e}return new Hh(ee/X,ie/X,0,K)}(u),q=x.length;for(;x.length;){const K=x.pop();(K.d>B.d||!B.d)&&(B=K,c&&console.log("found best %d after %d probes",Math.round(1e4*K.d)/1e4,q)),K.max-B.d<=s||(b=K.h/2,x.push(new Hh(K.p.x-b,K.p.y-b,b,u)),x.push(new Hh(K.p.x+b,K.p.y-b,b,u)),x.push(new Hh(K.p.x-b,K.p.y+b,b,u)),x.push(new Hh(K.p.x+b,K.p.y+b,b,u)),q+=4)}return c&&(console.log(`num probes: ${q}`),console.log(`best distance: ${B.d}`)),B.p}function JO(u,s){return s.max-u.max}function Hh(u,s,c,f){this.p=new L(u,s),this.h=c,this.d=function(g,b){let x=!1,C=1/0;for(let I=0;I<b.length;I++){const R=b[I];for(let D=0,B=R.length,q=B-1;D<B;q=D++){const K=R[D],X=R[q];K.y>g.y!=X.y>g.y&&g.x<(X.x-K.x)*(g.y-K.y)/(X.y-K.y)+K.x&&(x=!x),C=Math.min(C,T2(g,K,X))}}return(x?1:-1)*Math.sqrt(C)}(this.p,f),this.max=this.d+this.h*Math.SQRT2}var Ei;d.aD=void 0,(Ei=d.aD||(d.aD={}))[Ei.center=1]="center",Ei[Ei.left=2]="left",Ei[Ei.right=3]="right",Ei[Ei.top=4]="top",Ei[Ei.bottom=5]="bottom",Ei[Ei["top-left"]=6]="top-left",Ei[Ei["top-right"]=7]="top-right",Ei[Ei["bottom-left"]=8]="bottom-left",Ei[Ei["bottom-right"]=9]="bottom-right";const Eb=Number.POSITIVE_INFINITY;function HT(u,s){return s[1]!==Eb?function(c,f,g){let b=0,x=0;switch(f=Math.abs(f),g=Math.abs(g),c){case"top-right":case"top-left":case"top":x=g-7;break;case"bottom-right":case"bottom-left":case"bottom":x=7-g}switch(c){case"top-right":case"bottom-right":case"right":b=-f;break;case"top-left":case"bottom-left":case"left":b=f}return[b,x]}(u,s[0],s[1]):function(c,f){let g=0,b=0;f<0&&(f=0);const x=f/Math.SQRT2;switch(c){case"top-right":case"top-left":b=x-7;break;case"bottom-right":case"bottom-left":b=7-x;break;case"bottom":b=7-f;break;case"top":b=f-7}switch(c){case"top-right":case"bottom-right":g=-x;break;case"top-left":case"bottom-left":g=x;break;case"left":g=f;break;case"right":g=-f}return[g,b]}(u,s[0])}function ZT(u,s,c){var f;const g=u.layout,b=(f=g.get("text-variable-anchor-offset"))===null||f===void 0?void 0:f.evaluate(s,{},c);if(b){const C=b.values,I=[];for(let R=0;R<C.length;R+=2){const D=I[R]=C[R],B=C[R+1].map(q=>q*ri);D.startsWith("top")?B[1]-=7:D.startsWith("bottom")&&(B[1]+=7),I[R+1]=B}return new Er(I)}const x=g.get("text-variable-anchor");if(x){let C;C=u._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[g.get("text-radial-offset").evaluate(s,{},c)*ri,Eb]:g.get("text-offset").evaluate(s,{},c).map(R=>R*ri);const I=[];for(const R of x)I.push(R,HT(R,C));return new Er(I)}return null}function kb(u){switch(u){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function QO(u,s,c,f,g,b,x,C,I,R,D,B){let q=b.textMaxSize.evaluate(s,{});q===void 0&&(q=x);const K=u.layers[0].layout,X=K.get("icon-offset").evaluate(s,{},D),ee=KT(c.horizontal),ie=x/24,he=u.tilePixelRatio*ie,Ie=u.tilePixelRatio*q/24,_e=u.tilePixelRatio*C,W=u.tilePixelRatio*K.get("symbol-spacing"),ne=K.get("text-padding")*u.tilePixelRatio,be=function(Zt,Ut,Bt,Tr=1){const Mn=Zt.get("icon-padding").evaluate(Ut,{},Bt),Kn=Mn&&Mn.values;return[Kn[0]*Tr,Kn[1]*Tr,Kn[2]*Tr,Kn[3]*Tr]}(K,s,D,u.tilePixelRatio),$e=K.get("text-max-angle")/180*Math.PI,ct=K.get("text-rotation-alignment")!=="viewport"&&K.get("symbol-placement")!=="point",Ge=K.get("icon-rotation-alignment")==="map"&&K.get("symbol-placement")!=="point",Ye=K.get("symbol-placement"),gt=W/2,ht=K.get("icon-text-fit");let yt;f&&ht!=="none"&&(u.allowVerticalPlacement&&c.vertical&&(yt=vT(f,c.vertical,ht,K.get("icon-text-fit-padding"),X,ie)),ee&&(f=vT(f,ee,ht,K.get("icon-text-fit-padding"),X,ie)));const rt=D?B.line.getGranularityForZoomLevel(D.z):1,Dt=(Zt,Ut)=>{Ut.x<0||Ut.x>=xt||Ut.y<0||Ut.y>=xt||function(Bt,Tr,Mn,Kn,ki,Ms,ss,mi,Sn,ni,gi,yi,Zi,Rs,ii,os,Xn,si,oi,qn,dn,bo,Zh,xo,r3){const Wh=Bt.addToLineVertexArray(Tr,Mn);let hu,Kh,Xh,Yh,QT=0,eC=0,tC=0,rC=0,Db=-1,Ob=-1;const Ua={};let nC=Hi("");if(Bt.allowVerticalPlacement&&Kn.vertical){const Bi=mi.layout.get("text-rotate").evaluate(dn,{},xo)+90;Xh=new wy(Sn,Tr,ni,gi,yi,Kn.vertical,Zi,Rs,ii,Bi),ss&&(Yh=new wy(Sn,Tr,ni,gi,yi,ss,Xn,si,ii,Bi))}if(ki){const Bi=mi.layout.get("icon-rotate").evaluate(dn,{}),Ls=mi.layout.get("icon-text-fit")!=="none",du=qT(ki,Bi,Zh,Ls),So=ss?qT(ss,Bi,Zh,Ls):void 0;Kh=new wy(Sn,Tr,ni,gi,yi,ki,Xn,si,!1,Bi),QT=4*du.length;const fu=Bt.iconSizeData;let sa=null;fu.kind==="source"?(sa=[$a*mi.layout.get("icon-size").evaluate(dn,{})],sa[0]>ql&&Xe(`${Bt.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):fu.kind==="composite"&&(sa=[$a*bo.compositeIconSizes[0].evaluate(dn,{},xo),$a*bo.compositeIconSizes[1].evaluate(dn,{},xo)],(sa[0]>ql||sa[1]>ql)&&Xe(`${Bt.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),Bt.addSymbols(Bt.icon,du,sa,qn,oi,dn,d.an.none,Tr,Wh.lineStartIndex,Wh.lineLength,-1,xo),Db=Bt.icon.placedSymbolArray.length-1,So&&(eC=4*So.length,Bt.addSymbols(Bt.icon,So,sa,qn,oi,dn,d.an.vertical,Tr,Wh.lineStartIndex,Wh.lineLength,-1,xo),Ob=Bt.icon.placedSymbolArray.length-1)}const iC=Object.keys(Kn.horizontal);for(const Bi of iC){const Ls=Kn.horizontal[Bi];if(!hu){nC=Hi(Ls.text);const So=mi.layout.get("text-rotate").evaluate(dn,{},xo);hu=new wy(Sn,Tr,ni,gi,yi,Ls,Zi,Rs,ii,So)}const du=Ls.positionedLines.length===1;if(tC+=WT(Bt,Tr,Ls,Ms,mi,ii,dn,os,Wh,Kn.vertical?d.an.horizontal:d.an.horizontalOnly,du?iC:[Bi],Ua,Db,bo,xo),du)break}Kn.vertical&&(rC+=WT(Bt,Tr,Kn.vertical,Ms,mi,ii,dn,os,Wh,d.an.vertical,["vertical"],Ua,Ob,bo,xo));const n3=hu?hu.boxStartIndex:Bt.collisionBoxArray.length,i3=hu?hu.boxEndIndex:Bt.collisionBoxArray.length,s3=Xh?Xh.boxStartIndex:Bt.collisionBoxArray.length,o3=Xh?Xh.boxEndIndex:Bt.collisionBoxArray.length,a3=Kh?Kh.boxStartIndex:Bt.collisionBoxArray.length,l3=Kh?Kh.boxEndIndex:Bt.collisionBoxArray.length,c3=Yh?Yh.boxStartIndex:Bt.collisionBoxArray.length,u3=Yh?Yh.boxEndIndex:Bt.collisionBoxArray.length;let wo=-1;const Ty=(Bi,Ls)=>Bi&&Bi.circleDiameter?Math.max(Bi.circleDiameter,Ls):Ls;wo=Ty(hu,wo),wo=Ty(Xh,wo),wo=Ty(Kh,wo),wo=Ty(Yh,wo);const sC=wo>-1?1:0;sC&&(wo*=r3/ri),Bt.glyphOffsetArray.length>=qh.MAX_GLYPHS&&Xe("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),dn.sortKey!==void 0&&Bt.addToSortKeyRanges(Bt.symbolInstances.length,dn.sortKey);const h3=ZT(mi,dn,xo),[d3,f3]=function(Bi,Ls){const du=Bi.length,So=Ls==null?void 0:Ls.values;if((So==null?void 0:So.length)>0)for(let fu=0;fu<So.length;fu+=2){const sa=So[fu+1];Bi.emplaceBack(d.aD[So[fu]],sa[0],sa[1])}return[du,Bi.length]}(Bt.textAnchorOffsets,h3);Bt.symbolInstances.emplaceBack(Tr.x,Tr.y,Ua.right>=0?Ua.right:-1,Ua.center>=0?Ua.center:-1,Ua.left>=0?Ua.left:-1,Ua.vertical||-1,Db,Ob,nC,n3,i3,s3,o3,a3,l3,c3,u3,ni,tC,rC,QT,eC,sC,0,Zi,wo,d3,f3)}(u,Ut,Zt,c,f,g,yt,u.layers[0],u.collisionBoxArray,s.index,s.sourceLayerIndex,u.index,he,[ne,ne,ne,ne],ct,I,_e,be,Ge,X,s,b,R,D,x)};if(Ye==="line")for(const Zt of BT(s.geometry,0,0,xt,xt)){const Ut=cu(Zt,rt),Bt=KO(Ut,W,$e,c.vertical||ee,f,24,Ie,u.overscaling,xt);for(const Tr of Bt)ee&&e3(u,ee.text,gt,Tr)||Dt(Ut,Tr)}else if(Ye==="line-center"){for(const Zt of s.geometry)if(Zt.length>1){const Ut=cu(Zt,rt),Bt=WO(Ut,$e,c.vertical||ee,f,24,Ie);Bt&&Dt(Ut,Bt)}}else if(s.type==="Polygon")for(const Zt of fh(s.geometry,0)){const Ut=YO(Zt,16);Dt(cu(Zt[0],rt,!0),new Hl(Ut.x,Ut.y,0))}else if(s.type==="LineString")for(const Zt of s.geometry){const Ut=cu(Zt,rt);Dt(Ut,new Hl(Ut[0].x,Ut[0].y,0))}else if(s.type==="Point")for(const Zt of s.geometry)for(const Ut of Zt)Dt([Ut],new Hl(Ut.x,Ut.y,0))}function WT(u,s,c,f,g,b,x,C,I,R,D,B,q,K,X){const ee=function(Ie,_e,W,ne,be,$e,ct,Ge){const Ye=ne.layout.get("text-rotate").evaluate($e,{})*Math.PI/180,gt=[];for(const ht of _e.positionedLines)for(const yt of ht.positionedGlyphs){if(!yt.rect)continue;const rt=yt.rect||{};let Dt=4,Zt=!0,Ut=1,Bt=0;const Tr=(be||Ge)&&yt.vertical,Mn=yt.metrics.advance*yt.scale/2;if(Ge&&_e.verticalizable&&(Bt=ht.lineOffset/2-(yt.imageName?-(ri-yt.metrics.width*yt.scale)/2:(yt.scale-1)*ri)),yt.imageName){const si=ct[yt.imageName];Zt=si.sdf,Ut=si.pixelRatio,Dt=1/Ut}const Kn=be?[yt.x+Mn,yt.y]:[0,0];let ki=be?[0,0]:[yt.x+Mn+W[0],yt.y+W[1]-Bt],Ms=[0,0];Tr&&(Ms=ki,ki=[0,0]);const ss=yt.metrics.isDoubleResolution?2:1,mi=(yt.metrics.left-Dt)*yt.scale-Mn+ki[0],Sn=(-yt.metrics.top-Dt)*yt.scale+ki[1],ni=mi+rt.w/ss*yt.scale/Ut,gi=Sn+rt.h/ss*yt.scale/Ut,yi=new L(mi,Sn),Zi=new L(ni,Sn),Rs=new L(mi,gi),ii=new L(ni,gi);if(Tr){const si=new L(-Mn,Mn- -17),oi=-Math.PI/2,qn=12-Mn,dn=new L(22-qn,-(yt.imageName?qn:0)),bo=new L(...Ms);yi._rotateAround(oi,si)._add(dn)._add(bo),Zi._rotateAround(oi,si)._add(dn)._add(bo),Rs._rotateAround(oi,si)._add(dn)._add(bo),ii._rotateAround(oi,si)._add(dn)._add(bo)}if(Ye){const si=Math.sin(Ye),oi=Math.cos(Ye),qn=[oi,-si,si,oi];yi._matMult(qn),Zi._matMult(qn),Rs._matMult(qn),ii._matMult(qn)}const os=new L(0,0),Xn=new L(0,0);gt.push({tl:yi,tr:Zi,bl:Rs,br:ii,tex:rt,writingMode:_e.writingMode,glyphOffset:Kn,sectionIndex:yt.sectionIndex,isSDF:Zt,pixelOffsetTL:os,pixelOffsetBR:Xn,minFontScaleX:0,minFontScaleY:0})}return gt}(0,c,C,g,b,x,f,u.allowVerticalPlacement),ie=u.textSizeData;let he=null;ie.kind==="source"?(he=[$a*g.layout.get("text-size").evaluate(x,{})],he[0]>ql&&Xe(`${u.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):ie.kind==="composite"&&(he=[$a*K.compositeTextSizes[0].evaluate(x,{},X),$a*K.compositeTextSizes[1].evaluate(x,{},X)],(he[0]>ql||he[1]>ql)&&Xe(`${u.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),u.addSymbols(u.text,ee,he,C,b,x,R,s,I.lineStartIndex,I.lineLength,q,X);for(const Ie of D)B[Ie]=u.text.placedSymbolArray.length-1;return 4*ee.length}function KT(u){for(const s in u)return u[s];return null}function e3(u,s,c,f){const g=u.compareText;if(s in g){const b=g[s];for(let x=b.length-1;x>=0;x--)if(f.dist(b[x])<c)return!0}else g[s]=[];return g[s].push(f),!1}const XT=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class Ib{static from(s){if(!(s instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[c,f]=new Uint8Array(s,0,2);if(c!==219)throw new Error("Data does not appear to be in a KDBush format.");const g=f>>4;if(g!==1)throw new Error(`Got v${g} data when expected v1.`);const b=XT[15&f];if(!b)throw new Error("Unrecognized array type.");const[x]=new Uint16Array(s,2,1),[C]=new Uint32Array(s,4,1);return new Ib(C,x,b,s)}constructor(s,c=64,f=Float64Array,g){if(isNaN(s)||s<0)throw new Error(`Unpexpected numItems value: ${s}.`);this.numItems=+s,this.nodeSize=Math.min(Math.max(+c,2),65535),this.ArrayType=f,this.IndexArrayType=s<65536?Uint16Array:Uint32Array;const b=XT.indexOf(this.ArrayType),x=2*s*this.ArrayType.BYTES_PER_ELEMENT,C=s*this.IndexArrayType.BYTES_PER_ELEMENT,I=(8-C%8)%8;if(b<0)throw new Error(`Unexpected typed array class: ${f}.`);g&&g instanceof ArrayBuffer?(this.data=g,this.ids=new this.IndexArrayType(this.data,8,s),this.coords=new this.ArrayType(this.data,8+C+I,2*s),this._pos=2*s,this._finished=!0):(this.data=new ArrayBuffer(8+x+C+I),this.ids=new this.IndexArrayType(this.data,8,s),this.coords=new this.ArrayType(this.data,8+C+I,2*s),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+b]),new Uint16Array(this.data,2,1)[0]=c,new Uint32Array(this.data,4,1)[0]=s)}add(s,c){const f=this._pos>>1;return this.ids[f]=f,this.coords[this._pos++]=s,this.coords[this._pos++]=c,f}finish(){const s=this._pos>>1;if(s!==this.numItems)throw new Error(`Added ${s} items when expected ${this.numItems}.`);return Pb(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(s,c,f,g){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:b,coords:x,nodeSize:C}=this,I=[0,b.length-1,0],R=[];for(;I.length;){const D=I.pop()||0,B=I.pop()||0,q=I.pop()||0;if(B-q<=C){for(let ie=q;ie<=B;ie++){const he=x[2*ie],Ie=x[2*ie+1];he>=s&&he<=f&&Ie>=c&&Ie<=g&&R.push(b[ie])}continue}const K=q+B>>1,X=x[2*K],ee=x[2*K+1];X>=s&&X<=f&&ee>=c&&ee<=g&&R.push(b[K]),(D===0?s<=X:c<=ee)&&(I.push(q),I.push(K-1),I.push(1-D)),(D===0?f>=X:g>=ee)&&(I.push(K+1),I.push(B),I.push(1-D))}return R}within(s,c,f){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:g,coords:b,nodeSize:x}=this,C=[0,g.length-1,0],I=[],R=f*f;for(;C.length;){const D=C.pop()||0,B=C.pop()||0,q=C.pop()||0;if(B-q<=x){for(let ie=q;ie<=B;ie++)JT(b[2*ie],b[2*ie+1],s,c)<=R&&I.push(g[ie]);continue}const K=q+B>>1,X=b[2*K],ee=b[2*K+1];JT(X,ee,s,c)<=R&&I.push(g[K]),(D===0?s-f<=X:c-f<=ee)&&(C.push(q),C.push(K-1),C.push(1-D)),(D===0?s+f>=X:c+f>=ee)&&(C.push(K+1),C.push(B),C.push(1-D))}return I}}function Pb(u,s,c,f,g,b){if(g-f<=c)return;const x=f+g>>1;YT(u,s,x,f,g,b),Pb(u,s,c,f,x-1,1-b),Pb(u,s,c,x+1,g,1-b)}function YT(u,s,c,f,g,b){for(;g>f;){if(g-f>600){const R=g-f+1,D=c-f+1,B=Math.log(R),q=.5*Math.exp(2*B/3),K=.5*Math.sqrt(B*q*(R-q)/R)*(D-R/2<0?-1:1);YT(u,s,c,Math.max(f,Math.floor(c-D*q/R+K)),Math.min(g,Math.floor(c+(R-D)*q/R+K)),b)}const x=s[2*c+b];let C=f,I=g;for(wp(u,s,f,c),s[2*g+b]>x&&wp(u,s,f,g);C<I;){for(wp(u,s,C,I),C++,I--;s[2*C+b]<x;)C++;for(;s[2*I+b]>x;)I--}s[2*f+b]===x?wp(u,s,f,I):(I++,wp(u,s,I,g)),I<=c&&(f=I+1),c<=I&&(g=I-1)}}function wp(u,s,c,f){Ab(u,c,f),Ab(s,2*c,2*f),Ab(s,2*c+1,2*f+1)}function Ab(u,s,c){const f=u[s];u[s]=u[c],u[c]=f}function JT(u,s,c,f){const g=u-c,b=s-f;return g*g+b*b}var Mb;d.cw=void 0,(Mb=d.cw||(d.cw={})).create="create",Mb.load="load",Mb.fullLoad="fullLoad";let Sy=null,Sp=[];const Rb=1e3/60,Lb="loadTime",zb="fullLoadTime",t3={mark(u){performance.mark(u)},frame(u){const s=u;Sy!=null&&Sp.push(s-Sy),Sy=s},clearMetrics(){Sy=null,Sp=[],performance.clearMeasures(Lb),performance.clearMeasures(zb);for(const u in d.cw)performance.clearMarks(d.cw[u])},getPerformanceMetrics(){performance.measure(Lb,d.cw.create,d.cw.load),performance.measure(zb,d.cw.create,d.cw.fullLoad);const u=performance.getEntriesByName(Lb)[0].duration,s=performance.getEntriesByName(zb)[0].duration,c=Sp.length,f=1/(Sp.reduce((b,x)=>b+x,0)/c/1e3),g=Sp.filter(b=>b>Rb).reduce((b,x)=>b+(x-Rb)/Rb,0);return{loadTime:u,fullLoadTime:s,fps:f,percentDroppedFrames:g/(c+g)*100,totalFrames:c}}};d.$=xt,d.A=te,d.B=function([u,s,c]){return s+=90,s*=Math.PI/180,c*=Math.PI/180,{x:u*Math.cos(s)*Math.sin(c),y:u*Math.sin(s)*Math.sin(c),z:u*Math.cos(c)}},d.C=ns,d.D=Ot,d.E=st,d.F=pn,d.G=Mh,d.H=function(u){if(Fe==null){const s=u.navigator?u.navigator.userAgent:null;Fe=!!u.safari||!(!s||!(/\b(iPad|iPhone|iPod)\b/.test(s)||s.match("Safari")&&!s.match("Chrome")))}return Fe},d.I=mb,d.J=class{constructor(u,s){this.target=u,this.mapId=s,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new GO(()=>this.process()),this.subscription=Gt(this.target,"message",c=>this.receive(c),!1),this.globalScope=Ee(self)?u:window}registerMessageHandler(u,s){this.messageHandlers[u]=s}sendAsync(u,s){return new Promise((c,f)=>{const g=Math.round(1e18*Math.random()).toString(36).substring(0,10),b=s?Gt(s.signal,"abort",()=>{b==null||b.unsubscribe(),delete this.resolveRejects[g];const I={id:g,type:"<cancel>",origin:location.origin,targetMapId:u.targetMapId,sourceMapId:this.mapId};this.target.postMessage(I)},HO):null;this.resolveRejects[g]={resolve:I=>{b==null||b.unsubscribe(),c(I)},reject:I=>{b==null||b.unsubscribe(),f(I)}};const x=[],C=Object.assign(Object.assign({},u),{id:g,sourceMapId:this.mapId,origin:location.origin,data:Yc(u.data,x)});this.target.postMessage(C,{transfer:x})})}receive(u){const s=u.data,c=s.id;if(!(s.origin!=="file://"&&location.origin!=="file://"&&s.origin!=="resource://android"&&location.origin!=="resource://android"&&s.origin!==location.origin||s.targetMapId&&this.mapId!==s.targetMapId)){if(s.type==="<cancel>"){delete this.tasks[c];const f=this.abortControllers[c];return delete this.abortControllers[c],void(f&&f.abort())}if(Ee(self)||s.mustQueue)return this.tasks[c]=s,this.taskQueue.push(c),void this.invoker.trigger();this.processTask(c,s)}}process(){if(this.taskQueue.length===0)return;const u=this.taskQueue.shift(),s=this.tasks[u];delete this.tasks[u],this.taskQueue.length>0&&this.invoker.trigger(),s&&this.processTask(u,s)}processTask(u,s){return o(this,void 0,void 0,function*(){if(s.type==="<response>"){const g=this.resolveRejects[u];return delete this.resolveRejects[u],g?void(s.error?g.reject(jl(s.error)):g.resolve(jl(s.data))):void 0}if(!this.messageHandlers[s.type])return void this.completeTask(u,new Error(`Could not find a registered handler for ${s.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const c=jl(s.data),f=new AbortController;this.abortControllers[u]=f;try{const g=yield this.messageHandlers[s.type](s.sourceMapId,c,f);this.completeTask(u,null,g)}catch(g){this.completeTask(u,g)}})}completeTask(u,s,c){const f=[];delete this.abortControllers[u];const g={id:u,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:s?Yc(s):null,data:Yc(c,f)};this.target.postMessage(g,{transfer:f})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},d.K=se,d.L=function(){var u=new te(16);return te!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=0,u[12]=0,u[13]=0,u[14]=0),u[0]=1,u[5]=1,u[10]=1,u[15]=1,u},d.M=function(u,s,c){var f,g,b,x,C,I,R,D,B,q,K,X,ee=c[0],ie=c[1],he=c[2];return s===u?(u[12]=s[0]*ee+s[4]*ie+s[8]*he+s[12],u[13]=s[1]*ee+s[5]*ie+s[9]*he+s[13],u[14]=s[2]*ee+s[6]*ie+s[10]*he+s[14],u[15]=s[3]*ee+s[7]*ie+s[11]*he+s[15]):(g=s[1],b=s[2],x=s[3],C=s[4],I=s[5],R=s[6],D=s[7],B=s[8],q=s[9],K=s[10],X=s[11],u[0]=f=s[0],u[1]=g,u[2]=b,u[3]=x,u[4]=C,u[5]=I,u[6]=R,u[7]=D,u[8]=B,u[9]=q,u[10]=K,u[11]=X,u[12]=f*ee+C*ie+B*he+s[12],u[13]=g*ee+I*ie+q*he+s[13],u[14]=b*ee+R*ie+K*he+s[14],u[15]=x*ee+D*ie+X*he+s[15]),u},d.N=function(u,s,c){var f=c[0],g=c[1],b=c[2];return u[0]=s[0]*f,u[1]=s[1]*f,u[2]=s[2]*f,u[3]=s[3]*f,u[4]=s[4]*g,u[5]=s[5]*g,u[6]=s[6]*g,u[7]=s[7]*g,u[8]=s[8]*b,u[9]=s[9]*b,u[10]=s[10]*b,u[11]=s[11]*b,u[12]=s[12],u[13]=s[13],u[14]=s[14],u[15]=s[15],u},d.O=function(u,s,c){var f=s[0],g=s[1],b=s[2],x=s[3],C=s[4],I=s[5],R=s[6],D=s[7],B=s[8],q=s[9],K=s[10],X=s[11],ee=s[12],ie=s[13],he=s[14],Ie=s[15],_e=c[0],W=c[1],ne=c[2],be=c[3];return u[0]=_e*f+W*C+ne*B+be*ee,u[1]=_e*g+W*I+ne*q+be*ie,u[2]=_e*b+W*R+ne*K+be*he,u[3]=_e*x+W*D+ne*X+be*Ie,u[4]=(_e=c[4])*f+(W=c[5])*C+(ne=c[6])*B+(be=c[7])*ee,u[5]=_e*g+W*I+ne*q+be*ie,u[6]=_e*b+W*R+ne*K+be*he,u[7]=_e*x+W*D+ne*X+be*Ie,u[8]=(_e=c[8])*f+(W=c[9])*C+(ne=c[10])*B+(be=c[11])*ee,u[9]=_e*g+W*I+ne*q+be*ie,u[10]=_e*b+W*R+ne*K+be*he,u[11]=_e*x+W*D+ne*X+be*Ie,u[12]=(_e=c[12])*f+(W=c[13])*C+(ne=c[14])*B+(be=c[15])*ee,u[13]=_e*g+W*I+ne*q+be*ie,u[14]=_e*b+W*R+ne*K+be*he,u[15]=_e*x+W*D+ne*X+be*Ie,u},d.P=L,d.Q=function(u,s){const c={};for(let f=0;f<s.length;f++){const g=s[f];g in u&&(c[g]=u[g])}return c},d.R=is,d.S=Gl,d.T=eb,d.U=PT,d.V=IT,d.W=H,d.X=U,d.Y=St,d.Z=As,d._=o,d.a=Q,d.a$=function(u,s,c){return u[0]=s[0]*c,u[1]=s[1]*c,u[2]=s[2]*c,u[3]=s[3]*c,u},d.a0=xp,d.a1=uu,d.a2=25,d.a3=Cb,d.a4=u=>{const s=window.document.createElement("video");return s.muted=!0,new Promise(c=>{s.onloadstart=()=>{c(s)};for(const f of u){const g=window.document.createElement("source");Ue(f)||(s.crossOrigin="Anonymous"),g.src=f,s.appendChild(g)}})},d.a5=vt,d.a6=function(){return rr++},d.a7=ae,d.a8=qh,d.a9=Ko,d.aA=ri,d.aB=tr,d.aC=function(u,s,c,f,g=!1){if(!c[0]&&!c[1])return[0,0];const b=g?f==="map"?-u.bearingInRadians:0:f==="viewport"?u.bearingInRadians:0;if(b){const x=Math.sin(b),C=Math.cos(b);c=[c[0]*C-c[1]*x,c[0]*x+c[1]*C]}return[g?c[0]:tr(s,c[0],u.zoom),g?c[1]:tr(s,c[1],u.zoom)]},d.aE=_b,d.aF=kb,d.aG=yb,d.aH=Ib,d.aI=An,d.aJ=dy,d.aK=Be,d.aL=Pr,d.aM=rn,d.aN=pt,d.aO=cr,d.aP=MT,d.aQ=Ze,d.aR=ze,d.aS=function(u){var s=new te(3);return s[0]=u[0],s[1]=u[1],s[2]=u[2],s},d.aT=function(u,s,c){return u[0]=s[0]-c[0],u[1]=s[1]-c[1],u[2]=s[2]-c[2],u},d.aU=function(u,s){var c=s[0],f=s[1],g=s[2],b=c*c+f*f+g*g;return b>0&&(b=1/Math.sqrt(b)),u[0]=s[0]*b,u[1]=s[1]*b,u[2]=s[2]*b,u},d.aV=tt,d.aW=function(u,s){return u[0]*s[0]+u[1]*s[1]+u[2]*s[2]},d.aX=function(u,s,c){return u[0]=s[0]*c[0],u[1]=s[1]*c[1],u[2]=s[2]*c[2],u[3]=s[3]*c[3],u},d.aY=xe,d.aZ=function(u,s,c){const f=s[0]*c[0]+s[1]*c[1]+s[2]*c[2];return f===0?null:(-(u[0]*c[0]+u[1]*c[1]+u[2]*c[2])-c[3])/f},d.a_=Pe,d.aa=au,d.ab=DT,d.ac=function(u){const s={};if(u.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(c,f,g,b)=>{const x=g||b;return s[f]=!x||x.toLowerCase(),""}),s["max-age"]){const c=parseInt(s["max-age"],10);isNaN(c)?delete s["max-age"]:s["max-age"]=c}return s},d.ad=Qt,d.ae=function(u){return Math.pow(2,u)},d.af=fe,d.ag=_t,d.ah=85.051129,d.ai=AT,d.aj=function(u){return Math.log(u)/Math.LN2},d.ak=function(u){var s=u[0],c=u[1];return s*s+c*c},d.al=function(u,s){const c=[];for(const f in u)f in s||c.push(f);return c},d.am=function(u,s){let c=0,f=0;if(u.kind==="constant")f=u.layoutSize;else if(u.kind!=="source"){const{interpolationType:g,minZoom:b,maxZoom:x}=u,C=g?_t(zi.interpolationFactor(g,s,b,x),0,1):0;u.kind==="camera"?f=ns.number(u.minSize,u.maxSize,C):c=C}return{uSizeT:c,uSize:f}},d.ao=function(u,{uSize:s,uSizeT:c},{lowerSize:f,upperSize:g}){return u.kind==="source"?f/$a:u.kind==="composite"?ns.number(f/$a,g/$a,c):s},d.ap=function(u,s){var c=s[0],f=s[1],g=s[2],b=s[3],x=s[4],C=s[5],I=s[6],R=s[7],D=s[8],B=s[9],q=s[10],K=s[11],X=s[12],ee=s[13],ie=s[14],he=s[15],Ie=c*C-f*x,_e=c*I-g*x,W=c*R-b*x,ne=f*I-g*C,be=f*R-b*C,$e=g*R-b*I,ct=D*ee-B*X,Ge=D*ie-q*X,Ye=D*he-K*X,gt=B*ie-q*ee,ht=B*he-K*ee,yt=q*he-K*ie,rt=Ie*yt-_e*ht+W*gt+ne*Ye-be*Ge+$e*ct;
75return rt?(u[0]=(C*yt-I*ht+R*gt)*(rt=1/rt),u[1]=(g*ht-f*yt-b*gt)*rt,u[2]=(ee*$e-ie*be+he*ne)*rt,u[3]=(q*be-B*$e-K*ne)*rt,u[4]=(I*Ye-x*yt-R*Ge)*rt,u[5]=(c*yt-g*Ye+b*Ge)*rt,u[6]=(ie*W-X*$e-he*_e)*rt,u[7]=(D*$e-q*W+K*_e)*rt,u[8]=(x*ht-C*Ye+R*ct)*rt,u[9]=(f*Ye-c*ht-b*ct)*rt,u[10]=(X*be-ee*W+he*Ie)*rt,u[11]=(B*W-D*be-K*Ie)*rt,u[12]=(C*Ge-x*gt-I*ct)*rt,u[13]=(c*gt-f*Ge+g*ct)*rt,u[14]=(ee*_e-X*ne-ie*Ie)*rt,u[15]=(D*ne-B*_e+q*Ie)*rt,u):null},d.aq=Pt,d.ar=function(u){return Math.hypot(u[0],u[1])},d.as=function(u){return u[0]=0,u[1]=0,u},d.at=function(u,s,c){return u[0]=s[0]*c,u[1]=s[1]*c,u},d.au=vb,d.av=He,d.aw=function(u,s,c,f){const g=s.y-u.y,b=s.x-u.x,x=f.y-c.y,C=f.x-c.x,I=x*b-C*g;if(I===0)return null;const R=(C*(u.y-c.y)-x*(u.x-c.x))/I;return new L(u.x+R*b,u.y+R*g)},d.ax=BT,d.ay=w2,d.az=function(u){let s=1/0,c=1/0,f=-1/0,g=-1/0;for(const b of u)s=Math.min(s,b.x),c=Math.min(c,b.y),f=Math.max(f,b.x),g=Math.max(g,b.y);return[s,c,f,g]},d.b=Ke,d.b$=wO,d.b0=function(u,s){return u[0]*s[0]+u[1]*s[1]+u[2]*s[2]+u[3]},d.b1=LT,d.b2=Gh,d.b3=function(u,s,c,f,g){var b,x=1/Math.tan(s/2);return u[0]=x/c,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=x,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=-1,u[12]=0,u[13]=0,u[15]=0,g!=null&&g!==1/0?(u[10]=(g+f)*(b=1/(f-g)),u[14]=2*g*f*b):(u[10]=-1,u[14]=-2*f),u},d.b4=function(u){var s=new te(16);return s[0]=u[0],s[1]=u[1],s[2]=u[2],s[3]=u[3],s[4]=u[4],s[5]=u[5],s[6]=u[6],s[7]=u[7],s[8]=u[8],s[9]=u[9],s[10]=u[10],s[11]=u[11],s[12]=u[12],s[13]=u[13],s[14]=u[14],s[15]=u[15],s},d.b5=function(u,s,c){var f=Math.sin(c),g=Math.cos(c),b=s[0],x=s[1],C=s[2],I=s[3],R=s[4],D=s[5],B=s[6],q=s[7];return s!==u&&(u[8]=s[8],u[9]=s[9],u[10]=s[10],u[11]=s[11],u[12]=s[12],u[13]=s[13],u[14]=s[14],u[15]=s[15]),u[0]=b*g+R*f,u[1]=x*g+D*f,u[2]=C*g+B*f,u[3]=I*g+q*f,u[4]=R*g-b*f,u[5]=D*g-x*f,u[6]=B*g-C*f,u[7]=q*g-I*f,u},d.b6=function(u,s,c){var f=Math.sin(c),g=Math.cos(c),b=s[4],x=s[5],C=s[6],I=s[7],R=s[8],D=s[9],B=s[10],q=s[11];return s!==u&&(u[0]=s[0],u[1]=s[1],u[2]=s[2],u[3]=s[3],u[12]=s[12],u[13]=s[13],u[14]=s[14],u[15]=s[15]),u[4]=b*g+R*f,u[5]=x*g+D*f,u[6]=C*g+B*f,u[7]=I*g+q*f,u[8]=R*g-b*f,u[9]=D*g-x*f,u[10]=B*g-C*f,u[11]=q*g-I*f,u},d.b7=function(){const u=new Float32Array(16);return fe(u),u},d.b8=function(){const u=new Float64Array(16);return fe(u),u},d.b9=function(){return new Float64Array(16)},d.bA=function(u){return u[0]=0,u[1]=0,u[2]=0,u},d.bB=function(u,s,c,f){const g=Math.sqrt(u*u+s*s),b=Math.sqrt(c*c+f*f);u/=g,s/=g,c/=b,f/=b;const x=Math.acos(u*c+s*f);return-s*c+u*f>0?x:-x},d.bC=function(u,s){const c=lr(u,2*Math.PI),f=lr(s,2*Math.PI);return Math.min(Math.abs(c-f),Math.abs(c-f+2*Math.PI),Math.abs(c-f-2*Math.PI))},d.bD=function(){const u={},s=ke.$version;for(const c in ke.$root){const f=ke.$root[c];if(f.required){let g=null;g=c==="version"?s:f.type==="array"?[]:{},g!=null&&(u[c]=g)}}return u},d.bE=Wf,d.bF=Te,d.bG=function u(s,c){if(Array.isArray(s)){if(!Array.isArray(c)||s.length!==c.length)return!1;for(let f=0;f<s.length;f++)if(!u(s[f],c[f]))return!1;return!0}if(typeof s=="object"&&s!==null&&c!==null){if(typeof c!="object"||Object.keys(s).length!==Object.keys(c).length)return!1;for(const f in s)if(!u(s[f],c[f]))return!1;return!0}return s===c},d.bH=function(u){u=u.slice();const s=Object.create(null);for(let c=0;c<u.length;c++)s[u[c].id]=u[c];for(let c=0;c<u.length;c++)"ref"in u[c]&&(u[c]=Xt(u[c],s[u[c].ref]));return u},d.bI=function(u){if(u.type==="custom")return new qO(u);switch(u.type){case"background":return new $O(u);case"circle":return new DD(u);case"color-relief":return new $D(u);case"fill":return new rO(u);case"fill-extrusion":return new uO(u);case"heatmap":return new FD(u);case"hillshade":return new ND(u);case"line":return new _O(u);case"raster":return new VO(u);case"symbol":return new _y(u)}},d.bJ=je,d.bK=function(u,s){if(!u)return[{command:"setStyle",args:[s]}];let c=[];try{if(!Rt(u.version,s.version))return[{command:"setStyle",args:[s]}];Rt(u.center,s.center)||c.push({command:"setCenter",args:[s.center]}),Rt(u.state,s.state)||c.push({command:"setGlobalState",args:[s.state]}),Rt(u.centerAltitude,s.centerAltitude)||c.push({command:"setCenterAltitude",args:[s.centerAltitude]}),Rt(u.zoom,s.zoom)||c.push({command:"setZoom",args:[s.zoom]}),Rt(u.bearing,s.bearing)||c.push({command:"setBearing",args:[s.bearing]}),Rt(u.pitch,s.pitch)||c.push({command:"setPitch",args:[s.pitch]}
vendor: 16,623 bytes, line 75
75),Rt(u.roll,s.roll)||c.push({command:"setRoll",args:[s.roll]}),Rt(u.sprite,s.sprite)||c.push({command:"setSprite",args:[s.sprite]}),Rt(u.glyphs,s.glyphs)||c.push({command:"setGlyphs",args:[s.glyphs]}),Rt(u.transition,s.transition)||c.push({command:"setTransition",args:[s.transition]}),Rt(u.light,s.light)||c.push({command:"setLight",args:[s.light]}),Rt(u.terrain,s.terrain)||c.push({command:"setTerrain",args:[s.terrain]}),Rt(u.sky,s.sky)||c.push({command:"setSky",args:[s.sky]}),Rt(u.projection,s.projection)||c.push({command:"setProjection",args:[s.projection]});const f={},g=[];(function(x,C,I,R){let D;for(D in C=C||{},x=x||{})Object.prototype.hasOwnProperty.call(x,D)&&(Object.prototype.hasOwnProperty.call(C,D)||on(D,I,R));for(D in C)Object.prototype.hasOwnProperty.call(C,D)&&(Object.prototype.hasOwnProperty.call(x,D)?Rt(x[D],C[D])||(x[D].type==="geojson"&&C[D].type==="geojson"&&Fr(x,C,D)?jt(I,{command:"setGeoJSONSourceData",args:[D,C[D].data]}):Wr(D,C,I,R)):nr(D,C,I))})(u.sources,s.sources,g,f);const b=[];u.layers&&u.layers.forEach(x=>{"source"in x&&f[x.source]?c.push({command:"removeLayer",args:[x.id]}):b.push(x)}),c=c.concat(g),function(x,C,I){C=C||[];const R=(x=x||[]).map(Cr),D=C.map(Cr),B=x.reduce(Jn,{}),q=C.reduce(Jn,{}),K=R.slice(),X=Object.create(null);let ee,ie,he,Ie,_e;for(let W=0,ne=0;W<R.length;W++)ee=R[W],Object.prototype.hasOwnProperty.call(q,ee)?ne++:(jt(I,{command:"removeLayer",args:[ee]}),K.splice(K.indexOf(ee,ne),1));for(let W=0,ne=0;W<D.length;W++)ee=D[D.length-1-W],K[K.length-1-W]!==ee&&(Object.prototype.hasOwnProperty.call(B,ee)?(jt(I,{command:"removeLayer",args:[ee]}),K.splice(K.lastIndexOf(ee,K.length-ne),1)):ne++,Ie=K[K.length-W],jt(I,{command:"addLayer",args:[q[ee],Ie]}),K.splice(K.length-W,0,ee),X[ee]=!0);for(let W=0;W<D.length;W++)if(ee=D[W],ie=B[ee],he=q[ee],!X[ee]&&!Rt(ie,he))if(Rt(ie.source,he.source)&&Rt(ie["source-layer"],he["source-layer"])&&Rt(ie.type,he.type)){for(_e in er(ie.layout,he.layout,I,ee,null,"setLayoutProperty"),er(ie.paint,he.paint,I,ee,null,"setPaintProperty"),Rt(ie.filter,he.filter)||jt(I,{command:"setFilter",args:[ee,he.filter]}),Rt(ie.minzoom,he.minzoom)&&Rt(ie.maxzoom,he.maxzoom)||jt(I,{command:"setLayerZoomRange",args:[ee,he.minzoom,he.maxzoom]}),ie)Object.prototype.hasOwnProperty.call(ie,_e)&&_e!=="layout"&&_e!=="paint"&&_e!=="filter"&&_e!=="metadata"&&_e!=="minzoom"&&_e!=="maxzoom"&&(_e.indexOf("paint.")===0?er(ie[_e],he[_e],I,ee,_e.slice(6),"setPaintProperty"):Rt(ie[_e],he[_e])||jt(I,{command:"setLayerProperty",args:[ee,_e,he[_e]]}));for(_e in he)Object.prototype.hasOwnProperty.call(he,_e)&&!Object.prototype.hasOwnProperty.call(ie,_e)&&_e!=="layout"&&_e!=="paint"&&_e!=="filter"&&_e!=="metadata"&&_e!=="minzoom"&&_e!=="maxzoom"&&(_e.indexOf("paint.")===0?er(ie[_e],he[_e],I,ee,_e.slice(6),"setPaintProperty"):Rt(ie[_e],he[_e])||jt(I,{command:"setLayerProperty",args:[ee,_e,he[_e]]}))}else jt(I,{command:"removeLayer",args:[ee]}),Ie=K[K.lastIndexOf(ee)+1],jt(I,{command:"addLayer",args:[he,Ie]})}(b,s.layers,c)}catch(f){console.warn("Unable to compute style diff:",f),c=[{command:"setStyle",args:[s]}]}return c},d.bL=function(u){const s=[],c=u.id;return c===void 0&&s.push({message:`layers.${c}: missing required property "id"`}),u.render===void 0&&s.push({message:`layers.${c}: missing required method "render"`}),u.renderingMode&&u.renderingMode!=="2d"&&u.renderingMode!=="3d"&&s.push({message:`layers.${c}: property "renderingMode" must be either "2d" or "3d"`}),s},d.bM=ue,d.bN=me,d.bO=class extends hn{constructor(u,s){super(u,s),this.current=0}set(u){this.current!==u&&(this.current=u,this.gl.uniform1i(this.location,u))}},d.bP=ay,d.bQ=class extends hn{constructor(u,s){super(u,s),this.current=Z0}set(u){if(u[12]!==this.current[12]||u[0]!==this.current[0])return this.current=u,void this.gl.uniformMatrix4fv(this.location,!1,u);for(let s=1;s<16;s++)if(u[s]!==this.current[s]){this.current=u,this.gl.uniformMatrix4fv(this.location,!1,u);break}}},d.bR=Wn,d.bS=class extends hn{constructor(u,s){super(u,s),this.current=[0,0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]&&u[2]===this.current[2]||(this.current=u,this.gl.uniform3f(this.location,u[0],u[1],u[2]))}},d.bT=class extends hn{constructor(u,s){super(u,s),this.current=[0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]||(this.current=u,this.gl.uniform2f(this.location,u[0],u[1]))}},d.bU=ce,d.bV=function(u,s){var c=Math.sin(s),f=Math.cos(s);return u[0]=f,u[1]=c,u[2]=0,u[3]=-c,u[4]=f,u[5]=0,u[6]=0,u[7]=0,u[8]=1,u},d.bW=function(u,s,c){var f=s[0],g=s[1],b=s[2];return u[0]=f*c[0]+g*c[3]+b*c[6],u[1]=f*c[1]+g*c[4]+b*c[7],u[2]=f*c[2]+g*c[5]+b*c[8],u},d.bX=function(u,s,c,f,g,b,x){var C=1/(s-c),I=1/(f-g),R=1/(b-x);return u[0]=-2*C,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=-2*I,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=2*R,u[11]=0,u[12]=(s+c)*C,u[13]=(g+f)*I,u[14]=(x+b)*R,u[15]=1,u},d.bY=class extends hn{constructor(u,s){super(u,s),this.current=new Array}set(u){if(u!=this.current){this.current=u;const s=new Float32Array(4*u.length);for(let c=0;c<u.length;c++)s[4*c]=u[c].r,s[4*c+1]=u[c].g,s[4*c+2]=u[c].b,s[4*c+3]=u[c].a;this.gl.uniform4fv(this.location,s)}}},d.bZ=class extends hn{constructor(u,s){super(u,s),this.current=new Array}set(u){if(u!=this.current){this.current=u;const s=new Float32Array(u);this.gl.uniform1fv(this.location,s)}}},d.b_=class extends p{},d.ba=function(u,s,c){const f=new Float64Array(4);return lt(f,u,s-90,c),f},d.bb=function(u,s,c,f){var g,b,x,C,I,R=s[0],D=s[1],B=s[2],q=s[3],K=c[0],X=c[1],ee=c[2],ie=c[3];return(b=R*K+D*X+B*ee+q*ie)<0&&(b=-b,K=-K,X=-X,ee=-ee,ie=-ie),1-b>V?(g=Math.acos(b),x=Math.sin(g),C=Math.sin((1-f)*g)/x,I=Math.sin(f*g)/x):(C=1-f,I=f),u[0]=C*R+I*K,u[1]=C*D+I*X,u[2]=C*B+I*ee,u[3]=C*q+I*ie,u},d.bc=function(u){const s=new Float64Array(9);var c,f,g,b,x,C,I,R,D,B,q,K,X,ee,ie,he,Ie,_e;B=(g=(f=u)[0])*(I=g+g),q=(b=f[1])*I,X=(x=f[2])*I,ee=x*(R=b+b),he=(C=f[3])*I,Ie=C*R,_e=C*(D=x+x),(c=s)[0]=1-(K=b*R)-(ie=x*D),c[3]=q-_e,c[6]=X+Ie,c[1]=q+_e,c[4]=1-B-ie,c[7]=ee-he,c[2]=X-Ie,c[5]=ee+he,c[8]=1-B-K;const W=cr(-Math.asin(_t(s[2],-1,1)));let ne,be;return Math.hypot(s[5],s[8])<.001?(ne=0,be=-cr(Math.atan2(s[3],s[4]))):(ne=cr(s[5]===0&&s[8]===0?0:Math.atan2(s[5],s[8])),be=cr(s[1]===0&&s[0]===0?0:Math.atan2(s[1],s[0]))),{roll:ne,pitch:W+90,bearing:be}},d.bd=function(u,s){return u.roll==s.roll&&u.pitch==s.pitch&&u.bearing==s.bearing},d.be=vr,d.bf=Fi,d.bg=Uh,d.bh=pp,d.bi=$h,d.bj=Or,d.bk=zr,d.bl=or,d.bm=function(u,s,c,f,g){return Or(f,g,_t((u-s)/(c-s),0,1))},d.bn=lr,d.bo=function(){return new Float64Array(3)},d.bp=function(u,s,c,f){return u[0]=s[0]+c[0]*f,u[1]=s[1]+c[1]*f,u[2]=s[2]+c[2]*f,u},d.bq=lt,d.br=function(u,s,c){var f=c[0],g=c[1],b=c[2],x=s[0],C=s[1],I=s[2],R=g*I-b*C,D=b*x-f*I,B=f*C-g*x,q=g*B-b*D,K=b*R-f*B,X=f*D-g*R,ee=2*c[3];return D*=ee,B*=ee,K*=2,X*=2,u[0]=x+(R*=ee)+(q*=2),u[1]=C+D+K,u[2]=I+B+X,u},d.bs=function(u,s,c){const f=(g=[u[0],u[1],u[2],s[0],s[1],s[2],c[0],c[1],c[2]])[0]*((D=g[8])*(x=g[4])-(C=g[5])*(R=g[7]))+g[1]*(-D*(b=g[3])+C*(I=g[6]))+g[2]*(R*b-x*I);var g,b,x,C,I,R,D;if(f===0)return null;const B=tt([],[s[0],s[1],s[2]],[c[0],c[1],c[2]]),q=tt([],[c[0],c[1],c[2]],[u[0],u[1],u[2]]),K=tt([],[u[0],u[1],u[2]],[s[0],s[1],s[2]]),X=Ze([],B,-u[3]);return ze(X,X,Ze([],q,-s[3])),ze(X,X,Ze([],K,-c[3])),Ze(X,X,1/f),X},d.bt=Sb,d.bu=function(){return new Float64Array(4)},d.bv=function(u,s,c,f){var g=[],b=[];return g[0]=s[0]-c[0],g[1]=s[1]-c[1],g[2]=s[2]-c[2],b[0]=g[0]*Math.cos(f)-g[1]*Math.sin(f),b[1]=g[0]*Math.sin(f)+g[1]*Math.cos(f),b[2]=g[2],u[0]=b[0]+c[0],u[1]=b[1]+c[1],u[2]=b[2]+c[2],u},d.bw=function(u,s,c,f){var g=[],b=[];return g[0]=s[0]-c[0],g[1]=s[1]-c[1],g[2]=s[2]-c[2],b[0]=g[0],b[1]=g[1]*Math.cos(f)-g[2]*Math.sin(f),b[2]=g[1]*Math.sin(f)+g[2]*Math.cos(f),u[0]=b[0]+c[0],u[1]=b[1]+c[1],u[2]=b[2]+c[2],u},d.bx=function(u,s,c,f){var g=[],b=[];return g[0]=s[0]-c[0],g[1]=s[1]-c[1],g[2]=s[2]-c[2],b[0]=g[2]*Math.sin(f)+g[0]*Math.cos(f),b[1]=g[1],b[2]=g[2]*Math.cos(f)-g[0]*Math.sin(f),u[0]=b[0]+c[0],u[1]=b[1]+c[1],u[2]=b[2]+c[2],u},d.by=function(u,s,c){var f=Math.sin(c),g=Math.cos(c),b=s[0],x=s[1],C=s[2],I=s[3],R=s[8],D=s[9],B=s[10],q=s[11];return s!==u&&(u[4]=s[4],u[5]=s[5],u[6]=s[6],u[7]=s[7],u[12]=s[12],u[13]=s[13],u[14]=s[14],u[15]=s[15]),u[0]=b*g-R*f,u[1]=x*g-D*f,u[2]=C*g-B*f,u[3]=I*g-q*f,u[8]=b*f+R*g,u[9]=x*f+D*g,u[10]=C*f+B*g,u[11]=I*f+q*g,u},d.bz=function(u,s){const c=lr(u,360),f=lr(s,360),g=f-c,b=f>c?g-360:g+360;return Math.abs(g)<Math.abs(b)?g:b},d.c=Me,d.c0=class extends v{},d.c1=Q0,d.c2=function(u){return u<=1?1:Math.pow(2,Math.ceil(Math.log(u)/Math.LN2))},d.c3=R2,d.c4=function(u,s,c){var f=s[0],g=s[1],b=s[2],x=c[3]*f+c[7]*g+c[11]*b+c[15];return u[0]=(c[0]*f+c[4]*g+c[8]*b+c[12])/(x=x||1),u[1]=(c[1]*f+c[5]*g+c[9]*b+c[13])/x,u[2]=(c[2]*f+c[6]*g+c[10]*b+c[14])/x,u},d.c5=class extends tp{},d.c6=class extends N{},d.c7=function(u,s){return u[0]===s[0]&&u[1]===s[1]&&u[2]===s[2]&&u[3]===s[3]&&u[4]===s[4]&&u[5]===s[5]&&u[6]===s[6]&&u[7]===s[7]&&u[8]===s[8]&&u[9]===s[9]&&u[10]===s[10]&&u[11]===s[11]&&u[12]===s[12]&&u[13]===s[13]&&u[14]===s[14]&&u[15]===s[15]},d.c8=function(u,s){var c=u[0],f=u[1],g=u[2],b=u[3],x=u[4],C=u[5],I=u[6],R=u[7],D=u[8],B=u[9],q=u[10],K=u[11],X=u[12],ee=u[13],ie=u[14],he=u[15],Ie=s[0],_e=s[1],W=s[2],ne=s[3],be=s[4],$e=s[5],ct=s[6],Ge=s[7],Ye=s[8],gt=s[9],ht=s[10],yt=s[11],rt=s[12],Dt=s[13],Zt=s[14],Ut=s[15];return Math.abs(c-Ie)<=V*Math.max(1,Math.abs(c),Math.abs(Ie))&&Math.abs(f-_e)<=V*Math.max(1,Math.abs(f),Math.abs(_e))&&Math.abs(g-W)<=V*Math.max(1,Math.abs(g),Math.abs(W))&&Math.abs(b-ne)<=V*Math.max(1,Math.abs(b),Math.abs(ne))&&Math.abs(x-be)<=V*Math.max(1,Math.abs(x),Math.abs(be))&&Math.abs(C-$e)<=V*Math.max(1,Math.abs(C),Math.abs($e))&&Math.abs(I-ct)<=V*Math.max(1,Math.abs(I),Math.abs(ct))&&Math.abs(R-Ge)<=V*Math.max(1,Math.abs(R),Math.abs(Ge))&&Math.abs(D-Ye)<=V*Math.max(1,Math.abs(D),Math.abs(Ye))&&Math.abs(B-gt)<=V*Math.max(1,Math.abs(B),Math.abs(gt))&&Math.abs(q-ht)<=V*Math.max(1,Math.abs(q),Math.abs(ht))&&Math.abs(K-yt)<=V*Math.max(1,Math.abs(K),Math.abs(yt))&&Math.abs(X-rt)<=V*Math.max(1,Math.abs(X),Math.abs(rt))&&Math.abs(ee-Dt)<=V*Math.max(1,Math.abs(ee),Math.abs(Dt))&&Math.abs(ie-Zt)<=V*Math.max(1,Math.abs(ie),Math.abs(Zt))&&Math.abs(he-Ut)<=V*Math.max(1,Math.abs(he),Math.abs(Ut))},d.c9=function(u,s){return u[0]=s[0],u[1]=s[1],u[2]=s[2],u[3]=s[3],u[4]=s[4],u[5]=s[5],u[6]=s[6],u[7]=s[7],u[8]=s[8],u[9]=s[9],u[10]=s[10],u[11]=s[11],u[12]=s[12],u[13]=s[13],u[14]=s[14],u[15]=s[15],u},d.cA=function(u){delete Q.REGISTERED_PROTOCOLS[u]},d.cB=function(u,s){const c={};for(let g=0;g<u.length;g++){const b=s&&s[u[g].id]||Eh(u[g]);s&&(s[u[g].id]=b);let x=c[b];x||(x=c[b]=[]),x.push(u[g])}const f=[];for(const g in c)f.push(c[g]);return f},d.cC=Mt,d.cD=zT,d.cE=OT,d.cF=dT,d.cG=function(u){u.bucket.createArrays(),u.bucket.tilePixelRatio=xt/(512*u.bucket.overscaling),u.bucket.compareText={},u.bucket.iconsNeedLinear=!1;const s=u.bucket.layers[0],c=s.layout,f=s._unevaluatedLayout._values,g={layoutIconSize:f["icon-size"].possiblyEvaluate(new pn(u.bucket.zoom+1),u.canonical),layoutTextSize:f["text-size"].possiblyEvaluate(new pn(u.bucket.zoom+1),u.canonical),textMaxSize:f["text-size"].possiblyEvaluate(new pn(18))};if(u.bucket.textSizeData.kind==="composite"){const{minZoom:R,maxZoom:D}=u.bucket.textSizeData;g.compositeTextSizes=[f["text-size"].possiblyEvaluate(new pn(R),u.canonical),f["text-size"].possiblyEvaluate(new pn(D),u.canonical)]}if(u.bucket.iconSizeData.kind==="composite"){const{minZoom:R,maxZoom:D}=u.bucket.iconSizeData;g.compositeIconSizes=[f["icon-size"].possiblyEvaluate(new pn(R),u.canonical),f["icon-size"].possiblyEvaluate(new pn(D),u.canonical)]}const b=c.get("text-line-height")*ri,x=c.get("text-rotation-alignment")!=="viewport"&&c.get("symbol-placement")!=="point",C=c.get("text-keep-upright"),I=c.get("text-size");for(const R of u.bucket.features){const D=c.get("text-font").evaluate(R,{},u.canonical).join(","),B=I.evaluate(R,{},u.canonical),q=g.layoutTextSize.evaluate(R,{},u.canonical),K=g.layoutIconSize.evaluate(R,{},u.canonical),X={horizontal:{},vertical:void 0},ee=R.text;let ie,he=[0,0];if(ee){const W=ee.toString(),ne=c.get("text-letter-spacing").evaluate(R,{},u.canonical)*ri,be=ey(W)?ne:0,$e=c.get("text-anchor").evaluate(R,{},u.canonical),ct=ZT(s,R,u.canonical);if(!ct){const ht=c.get("text-radial-offset").evaluate(R,{},u.canonical);he=ht?HT($e,[ht*ri,Eb]):c.get("text-offset").evaluate(R,{},u.canonical).map(yt=>yt*ri)}let Ge=x?"center":c.get("text-justify").evaluate(R,{},u.canonical);const Ye=c.get("symbol-placement")==="point"?c.get("text-max-width").evaluate(R,{},u.canonical)*ri:1/0,gt=()=>{u.bucket.allowVerticalPlacement&&Kf(W)&&(X.vertical=my(ee,u.glyphMap,u.glyphPositions,u.imagePositions,D,Ye,b,$e,"left",be,he,d.an.vertical,!0,q,B))};if(!x&&ct){const ht=new Set;if(Ge==="auto")for(let rt=0;rt<ct.values.length;rt+=2)ht.add(kb(ct.values[rt]));else ht.add(Ge);let yt=!1;for(const rt of ht)if(!X.horizontal[rt])if(yt)X.horizontal[rt]=X.horizontal[0];else{const Dt=my(ee,u.glyphMap,u.glyphPositions,u.imagePositions,D,Ye,b,"center",rt,be,he,d.an.horizontal,!1,q,B);Dt&&(X.horizontal[rt]=Dt,yt=Dt.positionedLines.length===1)}gt()}else{Ge==="auto"&&(Ge=kb($e));const ht=my(ee,u.glyphMap,u.glyphPositions,u.imagePositions,D,Ye,b,$e,Ge,be,he,d.an.horizontal,!1,q,B);ht&&(X.horizontal[Ge]=ht),gt(),Kf(W)&&x&&C&&(X.vertical=my(ee,u.glyphMap,u.glyphPositions,u.imagePositions,D,Ye,b,$e,Ge,be,he,d.an.vertical,!1,q,B))}}let Ie=!1;if(R.icon&&R.icon.name){const W=u.imageMap[R.icon.name];W&&(ie=OO(u.imagePositions[R.icon.name],c.get("icon-offset").evaluate(R,{},u.canonical),c.get("icon-anchor").evaluate(R,{},u.canonical)),Ie=!!W.sdf,u.bucket.sdfIcons===void 0?u.bucket.sdfIcons=Ie:u.bucket.sdfIcons!==Ie&&Xe("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(W.pixelRatio!==u.bucket.pixelRatio||c.get("icon-rotate").constantOr(1)!==0)&&(u.bucket.iconsNeedLinear=!0))}const _e=KT(X.horizontal)||X.vertical;u.bucket.iconsInText=!!_e&&_e.iconsInText,(_e||ie)&&QO(u.bucket,R,X,ie,u.imageMap,g,q,K,he,Ie,u.canonical,u.subdivisionGranularity)}u.showCollisionBoxes&&u.bucket.generateCollisionDebugBuffers()},d.cH=hb,d.cI=sb,d.cJ=ub,d.cK=gp,d.cL=pb,d.cM=class{constructor(u){this._marks={start:[u.url,"start"].join("#"),end:[u.url,"end"].join("#"),measure:u.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let u=performance.getEntriesByName(this._marks.measure);return u.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),u=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),u}},d.cN=function(u,s,c,f,g){return o(this,void 0,void 0,function*(){if(U())try{return yield St(u,s,c,f,g)}catch{}return function(b,x,C,I,R){const D=b.width,B=b.height;mt&&Lt||(mt=new OffscreenCanvas(D,B),Lt=mt.getContext("2d",{willReadFrequently:!0})),mt.width=D,mt.height=B,Lt.drawImage(b,0,0,D,B);const q=Lt.getImageData(x,C,I,R);return Lt.clearRect(0,0,D,B),q.data}(u,s,c,f,g)})},d.cO=D2,d.cP=y,d.cQ=k,d.cR=J2,d.cS=uT,d.cT=wh,d.cU=Yo,d.ca=u=>u.type==="symbol",d.cb=u=>u.type==="circle",d.cc=u=>u.type==="heatmap",d.cd=u=>u.type==="line",d.ce=u=>u.type==="fill",d.cf=u=>u.type==="fill-extrusion",d.cg=u=>u.type==="hillshade",d.ch=u=>u.type==="color-relief",d.ci=u=>u.type==="raster",d.cj=u=>u.type==="background",d.ck=u=>u.type==="custom",d.cl=Je,d.cm=function(u,s,c){const f=Yt(s.x-c.x,s.y-c.y),g=Yt(u.x-c.x,u.y-c.y);var b,x;return cr(Math.atan2(f[0]*g[1]-f[1]*g[0],(b=f)[0]*(x=g)[0]+b[1]*x[1]))},d.cn=At,d.co=function(u,s){return Ln[s]&&(u instanceof MouseEvent||u instanceof WheelEvent)},d.cp=function(u,s){return Ir[s]&&"touches"in u},d.cq=function(u){return Ir[u]||Ln[u]},d.cr=function(u,s,c){var f=s[0],g=s[1];return u[0]=c[0]*f+c[4]*g+c[12],u[1]=c[1]*f+c[5]*g+c[13],u},d.cs=function(u,s){const{x:c,y:f}=xp.fromLngLat(s);return!(u<0||u>25||f<0||f>=1||c<0||c>=1)},d.ct=function(u,s){return u[0]=s[0],u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=s[1],u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=s[2],u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u},d.cu=class extends Qo{},d.cv=t3,d.cx=function(u){return u.message===un},d.cy=pe,d.cz=function(u,s){Q.REGISTERED_PROTOCOLS[u]=s},d.d=Ue,d.e=Nt,d.f=u=>o(void 0,void 0,void 0,function*(){if(u.byteLength===0)return createImageBitmap(new ImageData(1,1));const s=new Blob([new Uint8Array(u)],{type:"image/png"});try{return createImageBitmap(s)}catch(c){throw new Error(`Could not load image because of ${c.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),d.g=re,d.h=u=>
75new Promise((s,c)=>{const f=new Image;f.onload=()=>{s(f),URL.revokeObjectURL(f.src),f.onload=null,window.requestAnimationFrame(()=>{f.src=nt})},f.onerror=()=>c(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const g=new Blob([new Uint8Array(u)],{type:"image/png"});f.src=u.byteLength?URL.createObjectURL(g):nt}),d.i=Ee,d.j=(u,s)=>Le(Nt(u,{type:"json"}),s),d.k=De,d.l=We,d.m=Le,d.n=(u,s)=>Le(Nt(u,{type:"arrayBuffer"}),s),d.o=function(u){return new pb(u).readFields(CO,[])},d.p=hT,d.q=cp,d.r=Oi,d.s=Gt,d.t=Qf,d.u=xr,d.v=ke,d.w=Xe,d.x=$0,d.y=Kc,d.z=Bl}),a("worker",["./shared"],function(d){class o{constructor(Q){this.keyCache={},Q&&this.replace(Q)}replace(Q){this._layerConfigs={},this._layers={},this.update(Q,[])}update(Q,re){for(const pe of Q){this._layerConfigs[pe.id]=pe;const Te=this._layers[pe.id]=d.bI(pe);Te._featureFilter=d.a9(Te.filter),this.keyCache[pe.id]&&delete this.keyCache[pe.id]}for(const pe of re)delete this.keyCache[pe],delete this._layerConfigs[pe],delete this._layers[pe];this.familiesBySource={};const se=d.cB(Object.values(this._layerConfigs),this.keyCache);for(const pe of se){const Te=pe.map(De=>this._layers[De.id]),Le=Te[0];if(Le.visibility==="none")continue;const Ue=Le.source||"";let Re=this.familiesBySource[Ue];Re||(Re=this.familiesBySource[Ue]={});const Qe=Le.sourceLayer||"_geojsonTileLayer";let We=Re[Qe];We||(We=Re[Qe]=[]),We.push(Te)}}}class y{constructor(Q){const re={},se=[];for(const Ue in Q){const Re=Q[Ue],Qe=re[Ue]={};for(const We in Re){const De=Re[+We];if(!De||De.bitmap.width===0||De.bitmap.height===0)continue;const st={x:0,y:0,w:De.bitmap.width+2,h:De.bitmap.height+2};se.push(st),Qe[We]={rect:st,metrics:De.metrics}}}const{w:pe,h:Te}=d.p(se),Le=new d.q({width:pe||1,height:Te||1});for(const Ue in Q){const Re=Q[Ue];for(const Qe in Re){const We=Re[+Qe];if(!We||We.bitmap.width===0||We.bitmap.height===0)continue;const De=re[Ue][Qe].rect;d.q.copy(We.bitmap,Le,{x:0,y:0},{x:De.x+1,y:De.y+1},We.bitmap)}}this.image=Le,this.positions=re}}d.cC("GlyphAtlas",y);class w{constructor(Q){this.tileID=new d.Z(Q.tileID.overscaledZ,Q.tileID.wrap,Q.tileID.canonical.z,Q.tileID.canonical.x,Q.tileID.canonical.y),this.uid=Q.uid,this.zoom=Q.zoom,this.pixelRatio=Q.pixelRatio,this.tileSize=Q.tileSize,this.source=Q.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Q.showCollisionBoxes,this.collectResourceTiming=!!Q.collectResourceTiming,this.returnDependencies=!!Q.returnDependencies,this.promoteId=Q.promoteId,this.inFlightDependencies=[],this.globalState=Q.globalState}parse(Q,re,se,pe,Te){return d._(this,void 0,void 0,function*(){this.status="parsing",this.data=Q,this.collisionBoxArray=new d.a7;const Le=new d.cD(Object.keys(Q.layers).sort()),Ue=new d.cE(this.tileID,this.promoteId);Ue.bucketLayerIDs=[];const Re={},Qe={featureIndex:Ue,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:se,subdivisionGranularity:Te},We=re.familiesBySource[this.source];for(const er in We){const Cr=Q.layers[er];if(!Cr)continue;Cr.version===1&&d.w(`Vector tile source "${this.source}" layer "${er}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const Jn=Le.encode(er),vt=[];for(let ui=0;ui<Cr.length;ui++){const yn=Cr.feature(ui),Ho=Ue.getId(yn,er);vt.push({feature:yn,id:Ho,index:ui,sourceLayerIndex:Jn})}for(const ui of We[er]){const yn=ui[0];yn.source!==this.source&&d.w(`layer.source = ${yn.source} does not equal this.source = ${this.source}`),yn.minzoom&&this.zoom<Math.floor(yn.minzoom)||yn.maxzoom&&this.zoom>=yn.maxzoom||yn.visibility!=="none"&&(T(ui,this.zoom,se),(Re[yn.id]=yn.createBucket({index:Ue.bucketLayerIDs.length,layers:ui,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Jn,sourceID:this.source,globalState:this.globalState})).populate(vt,Qe,this.tileID.canonical),Ue.bucketLayerIDs.push(ui.map(Ho=>Ho.id)))}}const De=d.bM(Qe.glyphDependencies,er=>Object.keys(er).map(Number));
75this.inFlightDependencies.forEach(er=>er==null?void 0:er.abort()),this.inFlightDependencies=[];let st=Promise.resolve({});if(Object.keys(De).length){const er=new AbortController;this.inFlightDependencies.push(er),st=pe.sendAsync({type:"GG",data:{stacks:De,source:this.source,tileID:this.tileID,type:"glyphs"}},er)}const ke=Object.keys(Qe.iconDependencies);let Et=Promise.resolve({});if(ke.length){const er=new AbortController;this.inFlightDependencies.push(er),Et=pe.sendAsync({type:"GI",data:{icons:ke,source:this.source,tileID:this.tileID,type:"icons"}},er)}const Xt=Object.keys(Qe.patternDependencies);let Rt=Promise.resolve({});if(Xt.length){const er=new AbortController;this.inFlightDependencies.push(er),Rt=pe.sendAsync({type:"GI",data:{icons:Xt,source:this.source,tileID:this.tileID,type:"patterns"}},er)}const[jt,nr,on]=yield Promise.all([st,Et,Rt]),Wr=new y(jt),Fr=new d.cF(nr,on);for(const er in Re){const Cr=Re[er];Cr instanceof d.a8?(T(Cr.layers,this.zoom,se),d.cG({bucket:Cr,glyphMap:jt,glyphPositions:Wr.positions,imageMap:nr,imagePositions:Fr.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:Qe.subdivisionGranularity})):Cr.hasPattern&&(Cr instanceof d.cH||Cr instanceof d.cI||Cr instanceof d.cJ)&&(T(Cr.layers,this.zoom,se),Cr.addFeatures(Qe,this.tileID.canonical,Fr.patternPositions))}return this.status="done",{buckets:Object.values(Re).filter(er=>!er.isEmpty()),featureIndex:Ue,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Wr.image,imageAtlas:Fr,glyphMap:this.returnDependencies?jt:null,iconMap:this.returnDependencies?nr:null,glyphPositions:this.returnDependencies?Wr.positions:null}})}}function T(Me,Q,re){const se=new d.F(Q);for(const pe of Me)pe.recalculate(se,re)}class k{constructor(Q,re,se){this.actor=Q,this.layerIndex=re,this.availableImages=se,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Q,re){return d._(this,void 0,void 0,function*(){const se=yield d.n(Q.request,re);try{return{vectorTile:new d.cK.VectorTile(new d.cL(se.data)),rawData:se.data,cacheControl:se.cacheControl,expires:se.expires}}catch(pe){const Te=new Uint8Array(se.data);let Le=`Unable to parse the tile at ${Q.request.url}, `;throw Le+=Te[0]===31&&Te[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${pe.message}`,new Error(Le)}})}loadTile(Q){return d._(this,void 0,void 0,function*(){const re=Q.uid,se=!!(Q&&Q.request&&Q.request.collectResourceTiming)&&new d.cM(Q.request),pe=new w(Q);this.loading[re]=pe;const Te=new AbortController;pe.abort=Te;try{const Le=yield this.loadVectorTile(Q,Te);if(delete this.loading[re],!Le)return null;const Ue=Le.rawData,Re={};Le.expires&&(Re.expires=Le.expires),Le.cacheControl&&(Re.cacheControl=Le.cacheControl);const Qe={};if(se){const De=se.finish();De&&(Qe.resourceTiming=JSON.parse(JSON.stringify(De)))}pe.vectorTile=Le.vectorTile;const We=pe.parse(Le.vectorTile,this.layerIndex,this.availableImages,this.actor,Q.subdivisionGranularity);this.loaded[re]=pe,this.fetching[re]={rawTileData:Ue,cacheControl:Re,resourceTiming:Qe};try{const De=yield We;return d.e({rawTileData:Ue.slice(0)},De,Re,Qe)}finally{delete this.fetching[re]}}catch(Le){throw delete this.loading[re],pe.status="done",this.loaded[re]=pe,Le}})}reloadTile(Q){return d._(this,void 0,void 0,function*(){const re=Q.uid;if(!this.loaded||!this.loaded[re])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const se=this.loaded[re];if(se.showCollisionBoxes=Q.showCollisionBoxes,se.globalState=Q.globalState,se.status==="parsing"){const pe=yield se.parse(se.vectorTile,this.layerIndex,this.availableImages,this.actor,Q.subdivisionGranularity);let Te;if(this.fetching[re]){const{rawTileData:Le,cacheControl:Ue,resourceTiming:Re}=this.fetching[re];delete this.fetching[re],Te=d.e({rawTileData:Le.slice(0)},pe,Ue,Re)}else Te=pe;return Te}if(se.status==="done"&&se.vectorTile)return se.parse(se.vectorTile,this.layerIndex,this.availableImages,this.actor,Q.subdivisionGranularity)})}abortTile(Q){return d._(this,void 0,void 0,function*(){const re=this.loading,se=Q.uid;re&&re[se]&&re[se].abort&&(re[se].abort.abort(),delete re[se])})}removeTile(Q){return d._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Q.uid]&&delete this.loaded[Q.uid]})}}class M{constructor(){this.loaded={}}loadTile(Q){return d._(this,void 0,void 0,function*(){const{uid:re,encoding:se,rawImageData:pe,redFactor:Te,greenFactor:Le,blueFactor:Ue,baseShift:Re}=Q,Qe=pe.width+2,We=pe.height+2,De=d.b(pe)?new d.R({width:Qe,height:We},yield d.cN(pe,-1,-1,Qe,We)):pe,st=new d.cO(re,De,se,Te,Le,Ue,Re);return this.loaded=this.loaded||{},this.loaded[re]=st,st})}removeTile(Q){const re=this.loaded,se=Q.uid;re&&re[se]&&delete re[se]}}var P,L,O=function(){if(L)return P;function Me(re,se){if(re.length!==0){Q(re[0],se);for(var pe=1;pe<re.length;pe++)Q(re[pe],!se)}}function Q(re,se){for(var pe=0,Te=0,Le=0,Ue=re.length,Re=Ue-1;Le<Ue;Re=Le++){var Qe=(re[Le][0]-re[Re][0])*(re[Re][1]+re[Le][1]),We=pe+Qe;Te+=Math.abs(pe)>=Math.abs(Qe)?pe-We+Qe:Qe-We+pe,pe=We}pe+Te>=0!=!!se&&re.reverse()}return L=1,P=function re(se,pe){var Te,Le=se&&se.type;if(Le==="FeatureCollection")for(Te=0;Te<se.features.length;Te++)re(se.features[Te],pe);else if(Le==="GeometryCollection")for(Te=0;Te<se.geometries.length;Te++)re(se.geometries[Te],pe);else if(Le==="Feature")re(se.geometry,pe);else if(Le==="Polygon")Me(se.coordinates,pe);else if(Le==="MultiPolygon")for(Te=0;Te<se.coordinates.length;Te++)Me(se.coordinates[Te],pe);return se}}(),$=d.cP(O);const Z=d.cK.VectorTileFeature.prototype.toGeoJSON;class J{constructor(Q){this._feature=Q,this.extent=d.$,this.type=Q.type,this.properties=Q.tags,"id"in Q&&!isNaN(Q.id)&&(this.id=p
75arseInt(Q.id,10))}loadGeometry(){if(this._feature.type===1){const Q=[];for(const re of this._feature.geometry)Q.push([new d.P(re[0],re[1])]);return Q}{const Q=[];for(const re of this._feature.geometry){const se=[];for(const pe of re)se.push(new d.P(pe[0],pe[1]));Q.push(se)}return Q}}toGeoJSON(Q,re,se){return Z.call(this,Q,re,se)}}class H{constructor(Q){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=d.$,this.length=Q.length,this._features=Q}feature(Q){return new J(this._features[Q])}}var U,V,te,ce={exports:{}},fe=function(){if(te)return ce.exports;te=1;var Me=d.cS(),Q=function(){if(V)return U;V=1;var We=d.cQ(),De=d.cR().VectorTileFeature;function st(Et,Xt){this.options=Xt||{},this.features=Et,this.length=Et.length}function ke(Et,Xt){this.id=typeof Et.id=="number"?Et.id:void 0,this.type=Et.type,this.rawGeometry=Et.type===1?[Et.geometry]:Et.geometry,this.properties=Et.tags,this.extent=Xt||4096}return U=st,st.prototype.feature=function(Et){return new ke(this.features[Et],this.options.extent)},ke.prototype.loadGeometry=function(){var Et=this.rawGeometry;this.geometry=[];for(var Xt=0;Xt<Et.length;Xt++){for(var Rt=Et[Xt],jt=[],nr=0;nr<Rt.length;nr++)jt.push(new We(Rt[nr][0],Rt[nr][1]));this.geometry.push(jt)}return this.geometry},ke.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var Et=this.geometry,Xt=1/0,Rt=-1/0,jt=1/0,nr=-1/0,on=0;on<Et.length;on++)for(var Wr=Et[on],Fr=0;Fr<Wr.length;Fr++){var er=Wr[Fr];Xt=Math.min(Xt,er.x),Rt=Math.max(Rt,er.x),jt=Math.min(jt,er.y),nr=Math.max(nr,er.y)}return[Xt,jt,Rt,nr]},ke.prototype.toGeoJSON=De.prototype.toGeoJSON,U}();function re(We){var De=new Me;return function(st,ke){for(var Et in st.layers)ke.writeMessage(3,se,st.layers[Et])}(We,De),De.finish()}function se(We,De){var st;De.writeVarintField(15,We.version||1),De.writeStringField(1,We.name||""),De.writeVarintField(5,We.extent||4096);var ke={keys:[],values:[],keycache:{},valuecache:{}};for(st=0;st<We.length;st++)ke.feature=We.feature(st),De.writeMessage(2,pe,ke);var Et=ke.keys;for(st=0;st<Et.length;st++)De.writeStringField(3,Et[st]);var Xt=ke.values;for(st=0;st<Xt.length;st++)De.writeMessage(4,Qe,Xt[st])}function pe(We,De){var st=We.feature;st.id!==void 0&&De.writeVarintField(1,st.id),De.writeMessage(2,Te,We),De.writeVarintField(3,st.type),De.writeMessage(4,Re,st)}function Te(We,De){var st=We.feature,ke=We.keys,Et=We.values,Xt=We.keycache,Rt=We.valuecache;for(var jt in st.properties){var nr=st.properties[jt],on=Xt[jt];if(nr!==null){on===void 0&&(ke.push(jt),Xt[jt]=on=ke.length-1),De.writeVarint(on);var Wr=typeof nr;Wr!=="string"&&Wr!=="boolean"&&Wr!=="number"&&(nr=JSON.stringify(nr));var Fr=Wr+":"+nr,er=Rt[Fr];er===void 0&&(Et.push(nr),Rt[Fr]=er=Et.length-1),De.writeVarint(er)}}}function Le(We,De){return(De<<3)+(7&We)}function Ue(We){return We<<1^We>>31}function Re(We,De){for(var st=We.loadGeometry(),ke=We.type,Et=0,Xt=0,Rt=st.length,jt=0;jt<Rt;jt++){var nr=st[jt],on=1;ke===1&&(on=nr.length),De.writeVarint(Le(1,on));for(var Wr=ke===3?nr.length-1:nr.length,Fr=0;Fr<Wr;Fr++){Fr===1&&ke!==1&&De.writeVarint(Le(2,Wr-1));var er=nr[Fr].x-Et,Cr=nr[Fr].y-Xt;De.writeVarint(Ue(er)),De.writeVarint(Ue(Cr)),Et+=er,Xt+=Cr}ke===3&&De.writeVarint(Le(7,1))}}function Qe(We,De){var st=typeof We;st==="string"?De.writeStringField(1,We):st==="boolean"?De.writeBooleanField(7,We):st==="number"&&(We%1!=0?De.writeDoubleField(3,We):We<0?De.writeSVarintField(6,We):De.writeVarintField(5,We))}return ce.exports=re,ce.exports.fromVectorTileJs=re,ce.exports.fromGeojsonVt=function(We,De){De=De||{};var st={};for(var ke in We)st[ke]=new Q(We[ke].features,De),st[ke].name=ke,st[ke].version=De.version,st[ke].extent=De.extent;return re({layers:st})},ce.exports.GeoJSONWrapper=Q,ce.exports}(),Se=d.cP(fe);const xe={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:Me=>Me},et=Math.fround||(ze=new Float32Array(1),Me=>(ze[0]=+Me,ze[0]));var ze;class Ze{constructor(Q){this.options=Object.assign(Object.create(xe),Q),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Q){const{log:re,minZoom:se,maxZoom:pe}=this.options;re&&console.time("total time");const Te=`prepare ${Q.length} points`;re&&console.time(Te),this.points=Q;const Le=[];for(let Re=0;Re<Q.length;Re++){const Qe=Q[Re];if(!Qe.geometry)continue;const[We,De]=Qe.geometry.coordinates,st=et(Pe(We)),ke=et(He(De));Le.push(st,ke,1/0,Re,-1,1),this.options.reduce&&Le.push(0)}let Ue=this.trees[pe+1]=this._createTree(Le);re&&console.timeEnd(Te);for(let Re=pe;Re>=se;Re--){const Qe=+Date.now();Ue=this.trees[Re]=this._createTree(this._cluster(Ue,Re)),re&&console.log("z%d: %d clusters in %dms",Re,Ue.numItems,+Date.now()-Qe)}return re&&console.timeEnd("total time"),this}getClusters(Q,re){let se=((Q[0]+180)%360+360)%360-180;const pe=Math.max(-90,Math.min(90,Q[1]));let Te=Q[2]===180?180:((Q[2]+180)%360+360)%360-180;const Le=Math.max(-90,Math.min(90,Q[3]));if(Q[2]-Q[0]>=360)se=-180,Te=180;else if(se>Te){const De=this.getClusters([se,pe,180,Le],re),st=this.getClusters([-180,pe,Te,Le],re);return De.concat(st)}const Ue=this.trees[this._limitZoom(re)],Re=Ue.range(Pe(se),He(Le),Pe(Te),He(pe)),Qe=Ue.data,We=[];for(const De of Re){const st=this.stride*De;We.push(Qe[st+5]>1?tt(Qe,st,this.clusterProps):this.points[Qe[st+3]])}return We}getChildren(Q){const re=this._getOriginId(Q),se=this._getOriginZoom(Q),pe="No cluster with the specified id.",Te=this.trees[se];if(!Te)throw new Error(pe);const Le=Te.data;if(re*this.stride>=Le.length)throw new Error(pe);const Ue=this.options.radius/(this.options.extent*Math.pow(2,se-1)),Re=Te.within(Le[re*this.stride],Le[re*this.stride+1],Ue),Qe=[];for(const We of Re){const De=We*this.stride;Le[De+4]===Q&&Qe.push(Le[De+5]>1?tt(Le,De,this.clusterProps):this.points[Le[De+3]])}if(Qe.length===0)throw new Error(pe);return Qe}getLeaves(Q,re,se){const pe=[];return this._appendLeaves(pe,Q,re=re||10,se=se||0,0),pe}getTile(Q,re,se){const pe=this.trees[this._limitZoom(Q)],Te=Math.pow(2,Q),{extent:Le,radiu
vendor: 15,718 bytes, line 75
75s:Ue}=this.options,Re=Ue/Le,Qe=(se-Re)/Te,We=(se+1+Re)/Te,De={features:[]};return this._addTileFeatures(pe.range((re-Re)/Te,Qe,(re+1+Re)/Te,We),pe.data,re,se,Te,De),re===0&&this._addTileFeatures(pe.range(1-Re/Te,Qe,1,We),pe.data,Te,se,Te,De),re===Te-1&&this._addTileFeatures(pe.range(0,Qe,Re/Te,We),pe.data,-1,se,Te,De),De.features.length?De:null}getClusterExpansionZoom(Q){let re=this._getOriginZoom(Q)-1;for(;re<=this.options.maxZoom;){const se=this.getChildren(Q);if(re++,se.length!==1)break;Q=se[0].properties.cluster_id}return re}_appendLeaves(Q,re,se,pe,Te){const Le=this.getChildren(re);for(const Ue of Le){const Re=Ue.properties;if(Re&&Re.cluster?Te+Re.point_count<=pe?Te+=Re.point_count:Te=this._appendLeaves(Q,Re.cluster_id,se,pe,Te):Te<pe?Te++:Q.push(Ue),Q.length===se)break}return Te}_createTree(Q){const re=new d.aH(Q.length/this.stride|0,this.options.nodeSize,Float32Array);for(let se=0;se<Q.length;se+=this.stride)re.add(Q[se],Q[se+1]);return re.finish(),re.data=Q,re}_addTileFeatures(Q,re,se,pe,Te,Le){for(const Ue of Q){const Re=Ue*this.stride,Qe=re[Re+5]>1;let We,De,st;if(Qe)We=at(re,Re,this.clusterProps),De=re[Re],st=re[Re+1];else{const Xt=this.points[re[Re+3]];We=Xt.properties;const[Rt,jt]=Xt.geometry.coordinates;De=Pe(Rt),st=He(jt)}const ke={type:1,geometry:[[Math.round(this.options.extent*(De*Te-se)),Math.round(this.options.extent*(st*Te-pe))]],tags:We};let Et;Et=Qe||this.options.generateId?re[Re+3]:this.points[re[Re+3]].id,Et!==void 0&&(ke.id=Et),Le.features.push(ke)}}_limitZoom(Q){return Math.max(this.options.minZoom,Math.min(Math.floor(+Q),this.options.maxZoom+1))}_cluster(Q,re){const{radius:se,extent:pe,reduce:Te,minPoints:Le}=this.options,Ue=se/(pe*Math.pow(2,re)),Re=Q.data,Qe=[],We=this.stride;for(let De=0;De<Re.length;De+=We){if(Re[De+2]<=re)continue;Re[De+2]=re;const st=Re[De],ke=Re[De+1],Et=Q.within(Re[De],Re[De+1],Ue),Xt=Re[De+5];let Rt=Xt;for(const jt of Et){const nr=jt*We;Re[nr+2]>re&&(Rt+=Re[nr+5])}if(Rt>Xt&&Rt>=Le){let jt,nr=st*Xt,on=ke*Xt,Wr=-1;const Fr=(De/We<<5)+(re+1)+this.points.length;for(const er of Et){const Cr=er*We;if(Re[Cr+2]<=re)continue;Re[Cr+2]=re;const Jn=Re[Cr+5];nr+=Re[Cr]*Jn,on+=Re[Cr+1]*Jn,Re[Cr+4]=Fr,Te&&(jt||(jt=this._map(Re,De,!0),Wr=this.clusterProps.length,this.clusterProps.push(jt)),Te(jt,this._map(Re,Cr)))}Re[De+4]=Fr,Qe.push(nr/Rt,on/Rt,1/0,Fr,-1,Rt),Te&&Qe.push(Wr)}else{for(let jt=0;jt<We;jt++)Qe.push(Re[De+jt]);if(Rt>1)for(const jt of Et){const nr=jt*We;if(!(Re[nr+2]<=re)){Re[nr+2]=re;for(let on=0;on<We;on++)Qe.push(Re[nr+on])}}}}return Qe}_getOriginId(Q){return Q-this.points.length>>5}_getOriginZoom(Q){return(Q-this.points.length)%32}_map(Q,re,se){if(Q[re+5]>1){const Le=this.clusterProps[Q[re+6]];return se?Object.assign({},Le):Le}const pe=this.points[Q[re+3]].properties,Te=this.options.map(pe);return se&&Te===pe?Object.assign({},Te):Te}}function tt(Me,Q,re){return{type:"Feature",id:Me[Q+3],properties:at(Me,Q,re),geometry:{type:"Point",coordinates:[(se=Me[Q],360*(se-.5)),Oe(Me[Q+1])]}};var se}function at(Me,Q,re){const se=Me[Q+5],pe=se>=1e4?`${Math.round(se/1e3)}k`:se>=1e3?Math.round(se/100)/10+"k":se,Te=Me[Q+6],Le=Te===-1?{}:Object.assign({},re[Te]);return Object.assign(Le,{cluster:!0,cluster_id:Me[Q+3],point_count:se,point_count_abbreviated:pe})}function Pe(Me){return Me/360+.5}function He(Me){const Q=Math.sin(Me*Math.PI/180),re=.5-.25*Math.log((1+Q)/(1-Q))/Math.PI;return re<0?0:re>1?1:re}function Oe(Me){const Q=(180-360*Me)*Math.PI/180;return 360*Math.atan(Math.exp(Q))/Math.PI-90}function lt(Me,Q,re,se){let pe=se;const Te=Q+(re-Q>>1);let Le,Ue=re-Q;const Re=Me[Q],Qe=Me[Q+1],We=Me[re],De=Me[re+1];for(let st=Q+3;st<re;st+=3){const ke=Pt(Me[st],Me[st+1],Re,Qe,We,De);if(ke>pe)Le=st,pe=ke;else if(ke===pe){const Et=Math.abs(st-Te);Et<Ue&&(Le=st,Ue=Et)}}pe>se&&(Le-Q>3&&lt(Me,Q,Le,se),Me[Le+2]=pe,re-Le>3&&lt(Me,Le,re,se))}function Pt(Me,Q,re,se,pe,Te){let Le=pe-re,Ue=Te-se;if(Le!==0||Ue!==0){const Re=((Me-re)*Le+(Q-se)*Ue)/(Le*Le+Ue*Ue);Re>1?(re=pe,se=Te):Re>0&&(re+=Le*Re,se+=Ue*Re)}return Le=Me-re,Ue=Q-se,Le*Le+Ue*Ue}function Yt(Me,Q,re,se){const pe={id:Me??null,type:Q,geometry:re,tags:se,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Q==="Point"||Q==="MultiPoint"||Q==="LineString")xt(pe,re);else if(Q==="Polygon")xt(pe,re[0]);else if(Q==="MultiLineString")for(const Te of re)xt(pe,Te);else if(Q==="MultiPolygon")for(const Te of re)xt(pe,Te[0]);return pe}function xt(Me,Q){for(let re=0;re<Q.length;re+=3)Me.minX=Math.min(Me.minX,Q[re]),Me.minY=Math.min(Me.minY,Q[re+1]),Me.maxX=Math.max(Me.maxX,Q[re]),Me.maxY=Math.max(Me.maxY,Q[re+1])}function tr(Me,Q,re,se){if(!Q.geometry)return;const pe=Q.geometry.coordinates;if(pe&&pe.length===0)return;const Te=Q.geometry.type,Le=Math.pow(re.tolerance/((1<<re.maxZoom)*re.extent),2);let Ue=[],Re=Q.id;if(re.promoteId?Re=Q.properties[re.promoteId]:re.generateId&&(Re=se||0),Te==="Point")lr(pe,Ue);else if(Te==="MultiPoint")for(const Qe of pe)lr(Qe,Ue);else if(Te==="LineString")Or(pe,Ue,Le,!1);else if(Te==="MultiLineString"){if(re.lineMetrics){for(const Qe of pe)Ue=[],Or(Qe,Ue,Le,!1),Me.push(Yt(Re,"LineString",Ue,Q.properties));return}zr(pe,Ue,Le,!1)}else if(Te==="Polygon")zr(pe,Ue,Le,!0);else{if(Te!=="MultiPolygon"){if(Te==="GeometryCollection"){for(const Qe of Q.geometry.geometries)tr(Me,{id:Re,geometry:Qe,properties:Q.properties},re,se);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const Qe of pe){const We=[];zr(Qe,We,Le,!0),Ue.push(We)}}Me.push(Yt(Re,Te,Ue,Q.properties))}function lr(Me,Q){Q.push(Je(Me[0]),At(Me[1]),0)}function Or(Me,Q,re,se){let pe,Te,Le=0;for(let Re=0;Re<Me.length;Re++){const Qe=Je(Me[Re][0]),We=At(Me[Re][1]);Q.push(Qe,We,0),Re>0&&(Le+=se?(pe*We-Qe*Te)/2:Math.sqrt(Math.pow(Qe-pe,2)+Math.pow(We-Te,2))),pe=Qe,Te=We}const Ue=Q.length-3;Q[2]=1,lt(Q,0,Ue,re),Q[Ue+2]=1,Q.size=Math.abs(Le),Q.start=0,Q.end=Q.size}function zr(Me,Q,re,se){for(let pe=0;pe<Me.length;pe++){const Te=[];Or(Me[pe],Te,re,se),Q.push(Te)}}function Je(Me){return Me/360+.5}function At(Me){const Q=Math.sin(Me*Math.PI/180),re=.5-.25*Math.log((1+Q)/(1-Q))/Math.PI;return re<0?0:re>1?1:re}function _t(Me,Q,re,se,pe,Te,Le,Ue){if(se/=Q,Te>=(re/=Q)&&Le<se)return Me;if(Le<re||Te>=se)return null;const Re=[];for(const Qe of Me){const We=Qe.geometry;let De=Qe.type;const st=pe===0?Qe.minX:Qe.minY,ke=pe===0?Qe.maxX:Qe.maxY;if(st>=re&&ke<se){Re.push(Qe);continue}if(ke<re||st>=se)continue;let Et=[];if(De==="Point"||De==="MultiPoint")pt(We,Et,re,se,pe);else if(De==="LineString")Nt(We,Et,re,se,pe,!1,Ue.lineMetrics);else if(De==="MultiLineString")ue(We,Et,re,se,pe,!1);else if(De==="Polygon")ue(We,Et,re,se,pe,!0);else if(De==="MultiPolygon")for(const Xt of We){const Rt=[];ue(Xt,Rt,re,se,pe,!0),Rt.length&&Et.push(Rt)}if(Et.length){if(Ue.lineMetrics&&De==="LineString"){for(const Xt of Et)Re.push(Yt(Qe.id,De,Xt,Qe.tags));continue}De!=="LineString"&&De!=="MultiLineString"||(Et.length===1?(De="LineString",Et=Et[0]):De="MultiLineString"),De!=="Point"&&De!=="MultiPoint"||(De=Et.length===3?"Point":"MultiPoint"),Re.push(Yt(Qe.id,De,Et,Qe.tags))}}return Re.length?Re:null}function pt(Me,Q,re,se,pe){for(let Te=0;Te<Me.length;Te+=3){const Le=Me[Te+pe];Le>=re&&Le<=se&&me(Q,Me[Te],Me[Te+1],Me[Te+2])}}function Nt(Me,Q,re,se,pe,Te,Le){let Ue=rr(Me);const Re=pe===0?je:ft;let Qe,We,De=Me.start;for(let Rt=0;Rt<Me.length-3;Rt+=3){const jt=Me[Rt],nr=Me[Rt+1],on=Me[Rt+2],Wr=Me[Rt+3],Fr=Me[Rt+4],er=pe===0?jt:nr,Cr=pe===0?Wr:Fr;let Jn=!1;Le&&(Qe=Math.sqrt(Math.pow(jt-Wr,2)+Math.pow(nr-Fr,2))),er<re?Cr>re&&(We=Re(Ue,jt,nr,Wr,Fr,re),Le&&(Ue.start=De+Qe*We)):er>se?Cr<se&&(We=Re(Ue,jt,nr,Wr,Fr,se),Le&&(Ue.start=De+Qe*We)):me(Ue,jt,nr,on),Cr<re&&er>=re&&(We=Re(Ue,jt,nr,Wr,Fr,re),Jn=!0),Cr>se&&er<=se&&(We=Re(Ue,jt,nr,Wr,Fr,se),Jn=!0),!Te&&Jn&&(Le&&(Ue.end=De+Qe*We),Q.push(Ue),Ue=rr(Me)),Le&&(De+=Qe)}let st=Me.length-3;const ke=Me[st],Et=Me[st+1],Xt=pe===0?ke:Et;Xt>=re&&Xt<=se&&me(Ue,ke,Et,Me[st+2]),st=Ue.length-3,Te&&st>=3&&(Ue[st]!==Ue[0]||Ue[st+1]!==Ue[1])&&me(Ue,Ue[0],Ue[1],Ue[2]),Ue.length&&Q.push(Ue)}function rr(Me){const Q=[];return Q.size=Me.size,Q.start=Me.start,Q.end=Me.end,Q}function ue(Me,Q,re,se,pe,Te){for(const Le of Me)Nt(Le,Q,re,se,pe,Te,!1)}function me(Me,Q,re,se){Me.push(Q,re,se)}function je(Me,Q,re,se,pe,Te){const Le=(Te-Q)/(se-Q);return me(Me,Te,re+(pe-re)*Le,1),Le}function ft(Me,Q,re,se,pe,Te){const Le=(Te-re)/(pe-re);return me(Me,Q+(se-Q)*Le,Te,1),Le}function Xe(Me,Q){const re=[];for(let se=0;se<Me.length;se++){const pe=Me[se],Te=pe.type;let Le;if(Te==="Point"||Te==="MultiPoint"||Te==="LineString")Le=dt(pe.geometry,Q);else if(Te==="MultiLineString"||Te==="Polygon"){Le=[];for(const Ue of pe.geometry)Le.push(dt(Ue,Q))}else if(Te==="MultiPolygon"){Le=[];for(const Ue of pe.geometry){const Re=[];for(const Qe of Ue)Re.push(dt(Qe,Q));Le.push(Re)}}re.push(Yt(pe.id,Te,Le,pe.tags))}return re}function dt(Me,Q){const re=[];re.size=Me.size,Me.start!==void 0&&(re.start=Me.start,re.end=Me.end);for(let se=0;se<Me.length;se+=3)re.push(Me[se]+Q,Me[se+1],Me[se+2]);return re}function Ee(Me,Q){if(Me.transformed)return Me;const re=1<<Me.z,se=Me.x,pe=Me.y;for(const Te of Me.features){const Le=Te.geometry,Ue=Te.type;if(Te.geometry=[],Ue===1)for(let Re=0;Re<Le.length;Re+=2)Te.geometry.push(Fe(Le[Re],Le[Re+1],Q,re,se,pe));else for(let Re=0;Re<Le.length;Re++){const Qe=[];for(let We=0;We<Le[Re].length;We+=2)Qe.push(Fe(Le[Re][We],Le[Re][We+1],Q,re,se,pe));Te.geometry.push(Qe)}}return Me.transformed=!0,Me}function Fe(Me,Q,re,se,pe,Te){return[Math.round(re*(Me*se-pe)),Math.round(re*(Q*se-Te))]}function Ke(Me,Q,re,se,pe){const Te=Q===pe.maxZoom?0:pe.tolerance/((1<<Q)*pe.extent),Le={features:[],numPoints:0,numSimplified:0,numFeatures:Me.length,source:null,x:re,y:se,z:Q,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const Ue of Me)nt(Le,Ue,Te,pe);return Le}function nt(Me,Q,re,se){const pe=Q.geometry,Te=Q.type,Le=[];if(Me.minX=Math.min(Me.minX,Q.minX),Me.minY=Math.min(Me.minY,Q.minY),Me.maxX=Math.max(Me.maxX,Q.maxX),Me.maxY=Math.max(Me.maxY,Q.maxY),Te==="Point"||Te==="MultiPoint")for(let Ue=0;Ue<pe.length;Ue+=3)Le.push(pe[Ue],pe[Ue+1]),Me.numPoints++,Me.numSimplified++;else if(Te==="LineString")St(Le,pe,Me,re,!1,!1);else if(Te==="MultiLineString"||Te==="Polygon")for(let Ue=0;Ue<pe.length;Ue++)St(Le,pe[Ue],Me,re,Te==="Polygon",Ue===0);else if(Te==="MultiPolygon")for(let Ue=0;Ue<pe.length;Ue++){const Re=pe[Ue];for(let Qe=0;Qe<Re.length;Qe++)St(Le,Re[Qe],Me,re,!0,Qe===0)}if(Le.length){let Ue=Q.tags||null;if(Te==="LineString"&&se.lineMetrics){Ue={};for(const Qe in Q.tags)Ue[Qe]=Q.tags[Qe];Ue.mapbox_clip_start=pe.start/pe.size,Ue.mapbox_clip_end=pe.end/pe.size}const Re={geometry:Le,type:Te==="Polygon"||Te==="MultiPolygon"?3:Te==="LineString"||Te==="MultiLineString"?2:1,tags:Ue};Q.id!==null&&(Re.id=Q.id),Me.features.push(Re)}}function St(Me,Q,re,se,pe,Te){const Le=se*se;if(se>0&&Q.size<(pe?Le:se))return void(re.numPoints+=Q.length/3);const Ue=[];for(let Re=0;Re<Q.length;Re+=3)(se===0||Q[Re+2]>Le)&&(re.numSimplified++,Ue.push(Q[Re],Q[Re+1])),re.numPoints++;pe&&function(Re,Qe){let We=0;for(let De=0,st=Re.length,ke=st-2;De<st;ke=De,De+=2)We+=(Re[De]-Re[ke])*(Re[De+1]+Re[ke+1]);if(We>0===Qe)for(let De=0,st=Re.length;De<st/2;De+=2){const ke=Re[De],Et=Re[De+1];Re[De]=Re[st-2-De],Re[De+1]=Re[st-1-De],Re[st-2-De]=ke,Re[st-1-De]=Et}}(Ue,Te),Me.push(Ue)}const mt={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class Lt{constructor(Q,re){const se=(re=this.options=function(Te,Le){for(const Ue in Le)Te[Ue]=Le[Ue];return Te}(Object.create(mt),re)).debug;if(se&&console.time("preprocess data"),re.maxZoom<0||re.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(re.promoteId&&re.generateId)throw new Error("promoteId and generateId cannot be used together.");let pe=function(Te,Le){const Ue=[];if(Te.type==="FeatureCollection")for(let Re=0;Re<Te.features.length;Re++)tr(Ue,Te.features[Re],Le,Re);else tr(Ue,Te.type==="Feature"?Te:{geometry:Te},Le);return Ue}(Q,re);this.tiles={},this.tileCoords=[],se&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",re.indexMaxZoom,re.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),pe=function(Te,Le){const Ue=Le.buffer/Le.extent;let Re=Te;const Qe=_t(Te,1,-1-Ue,Ue,0,-1,2,Le),We=_t(Te,1,1-Ue,2+Ue,0,-1,2,Le);return(Qe||We)&&(Re=_t(Te,1,-Ue,1+Ue,0,-1,2,Le)||[],Qe&&(Re=Xe(Qe,1).concat(Re)),We&&(Re=Re.concat(Xe(We,-1)))),Re}(pe,re),pe.length&&this.splitTile(pe,0,0,0),se&&(pe.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}splitTile(Q,re,se,pe,Te,Le,Ue){const Re=[Q,re,se,pe],Qe=this.options,We=Qe.debug;for(;Re.length;){pe=Re.pop(),se=Re.pop(),re=Re.pop(),Q=Re.pop();const De=1<<re,st=Gt(re,se,pe);let ke=this.tiles[st];if(!ke&&(We>1&&console.time("creation"),ke=this.tiles[st]=Ke(Q,re,se,pe,Qe),this.tileCoords.push({z:re,x:se,y:pe}),We)){We>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",re,se,pe,ke.numFeatures,ke.numPoints,ke.numSimplified),console.timeEnd("creation"));const Jn=`z${re}`;this.stats[Jn]=(this.stats[Jn]||0)+1,this.total++}if(ke.source=Q,Te==null){if(re===Qe.indexMaxZoom||ke.numPoints<=Qe.indexMaxPoints)continue}else{if(re===Qe.maxZoom||re===Te)continue;if(Te!=null){const Jn=Te-re;if(se!==Le>>Jn||pe!==Ue>>Jn)continue}}if(ke.source=null,Q.length===0)continue;We>1&&console.time("clipping");const Et=.5*Qe.buffer/Qe.extent,Xt=.5-Et,Rt=.5+Et,jt=1+Et;let nr=null,on=null,Wr=null,Fr=null,er=_t(Q,De,se-Et,se+Rt,0,ke.minX,ke.maxX,Qe),Cr=_t(Q,De,se+Xt,se+jt,0,ke.minX,ke.maxX,Qe);Q=null,er&&(nr=_t(er,De,pe-Et,pe+Rt,1,ke.minY,ke.maxY,Qe),on=_t(er,De,pe+Xt,pe+jt,1,ke.minY,ke.maxY,Qe),er=null),Cr&&(Wr=_t(Cr,De,pe-Et,pe+Rt,1,ke.minY,ke.maxY,Qe),Fr=_t(Cr,De,pe+Xt,pe+jt,1,ke.minY,ke.maxY,Qe),Cr=null),We>1&&console.timeEnd("clipping"),Re.push(nr||[],re+1,2*se,2*pe),Re.push(on||[],re+1,2*se,2*pe+1),Re.push(Wr||[],re+1,2*se+1,2*pe),Re.push(Fr||[],re+1,2*se+1,2*pe+1)}}getTile(Q,re,se){Q=+Q,re=+re,se=+se;const pe=this.options,{extent:Te,debug:Le}=pe;if(Q<0||Q>24)return null;const Ue=1<<Q,Re=Gt(Q,re=re+Ue&Ue-1,se);if(this.tiles[Re])return Ee(this.tiles[Re],Te);Le>1&&console.log("drilling down to z%d-%d-%d",Q,re,se);let Qe,We=Q,De=re,st=se;for(;!Qe&&We>0;)We--,De>>=1,st>>=1,Qe=this.tiles[Gt(We,De,st)];return Qe&&Qe.source?(Le>1&&(console.log("found parent tile z%d-%d-%d",We,De,st),console.time("drilling down")),this.splitTile(Qe.source,We,De,st,Q,re,se),Le>1&&console.timeEnd("drilling down"),this.tiles[Re]?Ee(this.tiles[Re],Te):null):null}}function Gt(Me,Q,re){return 32*((1<<Me)*re+Q)+Me}function Qt(Me,Q){return Q?Me.properties[Q]:Me.id}function cr(Me,Q){if(Me==null)return!0;if(Me.type==="Feature")return Qt(Me,Q)!=null;if(Me.type==="FeatureCollection"){const re=new Set;for(const se of Me.features){const pe=Qt(se,Q);if(pe==null||re.has(pe))return!1;re.add(pe)}return!0}return!1}function Ir(Me,Q){const re=new Map;if(Me!=null)if(Me.type==="Feature")re.set(Qt(Me,Q),Me);else for(const se of Me.features)re.set(Qt(se,Q),se);return re}class Ln extends k{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(Q,re){return d._(this,void 0,void 0,function*(){const se=Q.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const pe=this._geoJSONIndex.getTile(se.z,se.x,se.y);if(!pe)return null;const Te=new H(pe.features);let Le=Se(Te);return Le.byteOffset===0&&Le.byteLength===Le.buffer.byteLength||(Le=new Uint8Array(Le)),{vectorTile:Te,rawData:Le.buffer}})}loadData(Q){return d._(this,void 0,void 0,function*(){var re;
75(re=this._pendingRequest)===null||re===void 0||re.abort();const se=!!(Q&&Q.request&&Q.request.collectResourceTiming)&&new d.cM(Q.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(Q,this._pendingRequest),this._geoJSONIndex=Q.cluster?new Ze(function({superclusterOptions:Le,clusterProperties:Ue}){if(!Ue||!Le)return Le;const Re={},Qe={},We={accumulated:null,zoom:0},De={properties:null},st=Object.keys(Ue);for(const ke of st){const[Et,Xt]=Ue[ke],Rt=d.cT(Xt),jt=d.cT(typeof Et=="string"?[Et,["accumulated"],["get",ke]]:Et);Re[ke]=Rt.value,Qe[ke]=jt.value}return Le.map=ke=>{De.properties=ke;const Et={};for(const Xt of st)Et[Xt]=Re[Xt].evaluate(We,De);return Et},Le.reduce=(ke,Et)=>{De.properties=Et;for(const Xt of st)We.accumulated=ke[Xt],ke[Xt]=Qe[Xt].evaluate(We,De)},Le}(Q)).load((yield this._pendingData).features):(pe=yield this._pendingData,new Lt(pe,Q.geojsonVtOptions)),this.loaded={};const Te={};if(se){const Le=se.finish();Le&&(Te.resourceTiming={},Te.resourceTiming[Q.source]=JSON.parse(JSON.stringify(Le)))}return Te}catch(Te){if(delete this._pendingRequest,d.cx(Te))return{abandoned:!0};throw Te}var pe})}getData(){return d._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Q){const re=this.loaded;return re&&re[Q.uid]?super.reloadTile(Q):this.loadTile(Q)}loadAndProcessGeoJSON(Q,re){return d._(this,void 0,void 0,function*(){let se=yield this.loadGeoJSON(Q,re);if(delete this._pendingRequest,typeof se!="object")throw new Error(`Input data given to '${Q.source}' is not a valid GeoJSON object.`);if($(se,!0),Q.filter){const pe=d.cT(Q.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(pe.result==="error")throw new Error(pe.value.map(Le=>`${Le.key}: ${Le.message}`).join(", "));se={type:"FeatureCollection",features:se.features.filter(Le=>pe.value.evaluate({zoom:0},Le))}}return se})}loadGeoJSON(Q,re){return d._(this,void 0,void 0,function*(){const{promoteId:se}=Q;if(Q.request){const pe=yield d.j(Q.request,re);return this._dataUpdateable=cr(pe.data,se)?Ir(pe.data,se):void 0,pe.data}if(typeof Q.data=="string")try{const pe=JSON.parse(Q.data);return this._dataUpdateable=cr(pe,se)?Ir(pe,se):void 0,pe}catch{throw new Error(`Input data given to '${Q.source}' is not a valid GeoJSON object.`)}if(!Q.dataDiff)throw new Error(`Input data given to '${Q.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Q.source}`);return function(pe,Te,Le){var Ue,Re,Qe,We;if(Te.removeAll&&pe.clear(),Te.remove)for(const De of Te.remove)pe.delete(De);if(Te.add)for(const De of Te.add){const st=Qt(De,Le);st!=null&&pe.set(st,De)}if(Te.update)for(const De of Te.update){let st=pe.get(De.id);if(st==null)continue;const ke=!De.removeAllProperties&&(((Ue=De.removeProperties)===null||Ue===void 0?void 0:Ue.length)>0||((Re=De.addOrUpdateProperties)===null||Re===void 0?void 0:Re.length)>0);if((De.newGeometry||De.removeAllProperties||ke)&&(st=Object.assign({},st),pe.set(De.id,st),ke&&(st.properties=Object.assign({},st.properties))),De.newGeometry&&(st.geometry=De.newGeometry),De.removeAllProperties)st.properties={};else if(((Qe=De.removeProperties)===null||Qe===void 0?void 0:Qe.length)>0)for(const Et of De.removeProperties)Object.prototype.hasOwnProperty.call(st.properties,Et)&&delete st.properties[Et];if(((We=De.addOrUpdateProperties)===null||We===void 0?void 0:We.length)>0)for(const{key:Et,value:Xt}of De.addOrUpdateProperties)st.properties[Et]=Xt}}(this._dataUpdateable,Q.dataDiff,se),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Q){return d._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Q){return this._geoJSONIndex.getClusterExpansionZoom(Q.clusterId)}getClusterChildren(Q){return this._geoJSONIndex.getChildren(Q.clusterId)}getClusterLeaves(Q){return this._geoJSONIndex.getLeaves(Q.clusterId,Q.limit,Q.offset)}}class un{constructor(Q){this.self=Q,this.actor=new d.J(Q),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={}
75,this.self.registerWorkerSource=(re,se)=>{if(this.externalWorkerSourceTypes[re])throw new Error(`Worker source with name "${re}" already registered.`);this.externalWorkerSourceTypes[re]=se},this.self.addProtocol=d.cz,this.self.removeProtocol=d.cA,this.self.registerRTLTextPlugin=re=>{d.cU.setMethods(re)},this.actor.registerMessageHandler("LDT",(re,se)=>this._getDEMWorkerSource(re,se.source).loadTile(se)),this.actor.registerMessageHandler("RDT",(re,se)=>d._(this,void 0,void 0,function*(){this._getDEMWorkerSource(re,se.source).removeTile(se)})),this.actor.registerMessageHandler("GCEZ",(re,se)=>d._(this,void 0,void 0,function*(){return this._getWorkerSource(re,se.type,se.source).getClusterExpansionZoom(se)})),this.actor.registerMessageHandler("GCC",(re,se)=>d._(this,void 0,void 0,function*(){return this._getWorkerSource(re,se.type,se.source).getClusterChildren(se)})),this.actor.registerMessageHandler("GCL",(re,se)=>d._(this,void 0,void 0,function*(){return this._getWorkerSource(re,se.type,se.source).getClusterLeaves(se)})),this.actor.registerMessageHandler("LD",(re,se)=>this._getWorkerSource(re,se.type,se.source).loadData(se)),this.actor.registerMessageHandler("GD",(re,se)=>this._getWorkerSource(re,se.type,se.source).getData()),this.actor.registerMessageHandler("LT",(re,se)=>this._getWorkerSource(re,se.type,se.source).loadTile(se)),this.actor.registerMessageHandler("RT",(re,se)=>this._getWorkerSource(re,se.type,se.source).reloadTile(se)),this.actor.registerMessageHandler("AT",(re,se)=>this._getWorkerSource(re,se.type,se.source).abortTile(se)),this.actor.registerMessageHandler("RMT",(re,se)=>this._getWorkerSource(re,se.type,se.source).removeTile(se)),this.actor.registerMessageHandler("RS",(re,se)=>d._(this,void 0,void 0,function*(){if(!this.workerSources[re]||!this.workerSources[re][se.type]||!this.workerSources[re][se.type][se.source])return;const pe=this.workerSources[re][se.type][se.source];delete this.workerSources[re][se.type][se.source],pe.removeSource!==void 0&&pe.removeSource(se)})),this.actor.registerMessageHandler("RM",re=>d._(this,void 0,void 0,function*(){delete this.layerIndexes[re],delete this.availableImages[re],delete this.workerSources[re],delete this.demWorkerSources[re]})),this.actor.registerMessageHandler("SR",(re,se)=>d._(this,void 0,void 0,function*(){this.referrer=se})),this.actor.registerMessageHandler("SRPS",(re,se)=>this._syncRTLPluginState(re,se)),this.actor.registerMessageHandler("IS",(re,se)=>d._(this,void 0,void 0,function*(){this.self.importScripts(se)})),this.actor.registerMessageHandler("SI",(re,se)=>this._setImages(re,se)),this.actor.registerMessageHandler("UL",(re,se)=>d._(this,void 0,void 0,function*(){this._getLayerIndex(re).update(se.layers,se.removedIds)})),this.actor.registerMessageHandler("SL",(re,se)=>d._(this,void 0,void 0,function*(){this._getLayerIndex(re).replace(se)}))}_setImages(Q,re){return d._(this,void 0,void 0,function*(){this.availableImages[Q]=re;for(const se in this.workerSources[Q]){const pe=this.workerSources[Q][se];for(const Te in pe)pe[Te].availableImages=re}})}_syncRTLPluginState(Q,re){return d._(this,void 0,void 0,function*(){return yield d.cU.syncState(re,this.self.importScripts)})}_getAvailableImages(Q){let re=this.availableImages[Q];return re||(re=[]),re}_getLayerIndex(Q){let re=this.layerIndexes[Q];return re||(re=this.layerIndexes[Q]=new o),re}_getWorkerSource(Q,re,se){if(this.workerSources[Q]||(this.workerSources[Q]={}),this.workerSources[Q][re]||(this.workerSources[Q][re]={}),!this.workerSources[Q][re][se]){const pe={sendAsync:(Te,Le)=>(Te.targetMapId=Q,this.actor.sendAsync(Te,Le))};switch(re){case"vector":this.workerSources[Q][re][se]=new k(pe,this._getLayerIndex(Q),this._getAvailableImages(Q));break;case"geojson":this.workerSources[Q][re][se]=new Ln(pe,this._getLayerIndex(Q),this._getAvailableImages(Q));break;default:this.workerSources[Q][re][se]=new this.externalWorkerSourceTypes[re](pe,this._getLayerIndex(Q),this._getAvailableImages(Q))}}return this.workerSources[Q][re][se]}_getDEMWorkerSource(Q,re){return this.demWorkerSources[Q]||(this.demWorkerSources[Q]={}),this.demWorkerSources[Q][re]||(this.demWorkerSources[Q][re]=new M),this.demWorkerSources[Q][re]}}return d.i(self)&&(self.worker=new un(self)),un}),a("index",["exports","./shared"],function(d,o){var y="5.6.0";function w(){var _=new o.A(4);return o.A!=Float32Array&&(_[1]=0,_[2]=0),_[0]=1,_[3]=1,_}let T,k;const M={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(_,n,l){const p=requestAnimationFrame(v=>{m(),n(v)}),{unsubscribe:m}=o.s(_.signal,"abort",()=>{m(),cancelAnimationFrame(p),l(o.c())},!1)},frameAsync(_){return new Promise((n,l)=>{this.frame(_,n,l)})},getImageData(_,n=0){return this.getImageCanvasContext(_).getImageData(-n,-n,_.width+2*n,_.height+2*n)},getImageCanvasContext(_){const n=window.document.createElement("canvas"),l=n.getContext("2d",{willReadFrequently:!0});if(!l)throw new Error("failed to create canvas 2d context");return n.width=_.width,n.height=_.height,l.drawImage(_,0,0,_.width,_.height),l},resolveURL:_=>(T||(T=document.createElement("a")),T.href=_,T.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(k==null&&(k=matchMedia("(prefers-reduced-motion: reduce)")),k.matches)}};
vendor: 6,965 bytes, line 75
75class P{static testProp(n){if(!P.docStyle)return n[0];for(let l=0;l<n.length;l++)if(n[l]in P.docStyle)return n[l];return n[0]}static create(n,l,p){const m=window.document.createElement(n);return l!==void 0&&(m.className=l),p&&p.appendChild(m),m}static createNS(n,l){return window.document.createElementNS(n,l)}static disableDrag(){P.docStyle&&P.selectProp&&(P.userSelect=P.docStyle[P.selectProp],P.docStyle[P.selectProp]="none")}static enableDrag(){P.docStyle&&P.selectProp&&(P.docStyle[P.selectProp]=P.userSelect)}static setTransform(n,l){n.style[P.transformProp]=l}static addEventListener(n,l,p,m={}){n.addEventListener(l,p,"passive"in m?m:m.capture)}static removeEventListener(n,l,p,m={}){n.removeEventListener(l,p,"passive"in m?m:m.capture)}static suppressClickInternal(n){n.preventDefault(),n.stopPropagation(),window.removeEventListener("click",P.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",P.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",P.suppressClickInternal,!0)},0)}static getScale(n){const l=n.getBoundingClientRect();return{x:l.width/n.offsetWidth||1,y:l.height/n.offsetHeight||1,boundingClientRect:l}}static getPoint(n,l,p){const m=l.boundingClientRect;return new o.P((p.clientX-m.left)/l.x-n.clientLeft,(p.clientY-m.top)/l.y-n.clientTop)}static mousePos(n,l){const p=P.getScale(n);return P.getPoint(n,p,l)}static touchPos(n,l){const p=[],m=P.getScale(n);for(let v=0;v<l.length;v++)p.push(P.getPoint(n,m,l[v]));return p}static mouseButton(n){return n.button}static remove(n){n.parentNode&&n.parentNode.removeChild(n)}static sanitize(n){const l=new DOMParser().parseFromString(n,"text/html").body||document.createElement("body"),p=l.querySelectorAll("script");for(const m of p)m.remove();return P.clean(l),l.innerHTML}static isPossiblyDangerous(n,l){const p=l.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(n)||!p.includes("javascript:")&&!p.includes("data:"))||!!n.startsWith("on")||void 0}static clean(n){const l=n.children;for(const p of l)P.removeAttributes(p),P.clean(p)}static removeAttributes(n){for(const{name:l,value:p}of n.attributes)P.isPossiblyDangerous(l,p)&&n.removeAttribute(l)}}P.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,P.selectProp=P.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),P.transformProp=P.testProp(["transform","WebkitTransform"]);const L={supported:!1,testSupport:function(_){!Z&&$&&(J?H(_):O=_)}};let O,$,Z=!1,J=!1;function H(_){const n=_.createTexture();_.bindTexture(_.TEXTURE_2D,n);try{if(_.texImage2D(_.TEXTURE_2D,0,_.RGBA,_.RGBA,_.UNSIGNED_BYTE,$),_.isContextLost())return;L.supported=!0}catch{}_.deleteTexture(n),Z=!0}var U;typeof document<"u"&&($=document.createElement("img"),$.onload=()=>{O&&H(O),O=null,J=!0},$.onerror=()=>{Z=!0,O=null},$.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(_){let n,l,p,m;_.resetRequestQueue=()=>{n=[],l=0,p=0,m={}},_.addThrottleControl=A=>{const z=p++;return m[z]=A,z},_.removeThrottleControl=A=>{delete m[A],S()},_.getImage=(A,z,F=!0)=>new Promise((j,N)=>{L.supported&&(A.headers||(A.headers={}),A.headers.accept="image/webp,*/*"),o.e(A,{type:"image"}),n.push({abortController:z,requestParameters:A,supportImageRefresh:F,state:"queued",onError:G=>{N(G)},onSuccess:G=>{j(G)}}),S()});const v=A=>o._(this,void 0,void 0,function*(){A.state="running";const{requestParameters:z,supportImageRefresh:F,onError:j,onSuccess:N,abortController:G}=A,Y=F===!1&&!o.i(self)&&!o.g(z.url)&&(!z.headers||Object.keys(z.headers).reduce((le,de)=>le&&de==="accept",!0));l++;const ae=Y?E(z,G):o.m(z,G);try{const le=yield ae;delete A.abortController,A.state="completed",le.data instanceof HTMLImageElement||o.b(le.data)?N(le):le.data&&N({data:yield(oe=le.data,typeof createImageBitmap=="function"?o.f(oe):o.h(oe)),cacheControl:le.cacheControl,expires:le.expires})}catch(le){delete A.abortController,j(le)}finally{l--,S()}var oe}),S=()=>{const A=(()=>{for(const z of Object.keys(m))if(m[z]())return!0;return!1})()?o.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:o.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let z=l;z<A&&n.length>0;z++){const F=n.shift();F.abortController.signal.aborted?z--:v(F)}},E=(A,z)=>new Promise((F,j)=>{const N=new Image,G=A.url,Y=A.credentials;Y&&Y==="include"?N.crossOrigin="use-credentials":(Y&&Y==="same-origin"||!o.d(G))&&(N.crossOrigin="anonymous"),z.signal.addEventListener("abort",()=>{N.src="",j(o.c())}),N.fetchPriority="high",N.onload=()=>{N.onerror=N.onload=null,F({data:N})},N.onerror=()=>{N.onerror=N.onload=null,z.signal.aborted||j(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},N.src=G})}(U||(U={})),U.resetRequestQueue();class V{constructor(n){this._transformRequestFn=n}transformRequest(n,l){return this._transformRequestFn&&this._transformRequestFn(n,l)||{url:n}}setTransformRequest(n){this._transformRequestFn=n}}function te(_){const n=[];if(typeof _=="string")n.push({id:"default",url:_});else if(_&&_.length>0){const l=[];for(const{id:p,url:m}of _){const v=`${p}${m}`;l.indexOf(v)===-1&&(l.push(v),n.push({id:p,url:m}))}}return n}function ce(_,n,l){try{const p=new URL(_);return p.pathname+=`${n}${l}`,p.toString()}catch{throw new Error(`Invalid sprite URL "${_}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function fe(_){const{userImage:n}=_;return!!(n&&n.render&&n.render())&&(_.data.replace(new Uint8Array(n.data.buffer)),!0)}class Se extends o.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new o.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(n){if(this.loaded!==n&&(this.loaded=n,n)){for(const{ids:l,promiseResolve:p}of this.requestors)p(this._getImagesForIds(l));this.requestors=[]}}getImage(n){const l=this.images[n];if(l&&!l.data&&l.spriteData){const p=l.spriteData;l.data=new o.R({width:p.width,height:p.height},p.context.getImageData(p.x,p.y,p.width,p.height).data),l.spriteData=null}return l}addImage(n,l){if(this.images[n])throw new Error(`Image id ${n} already exist, use updateImage instead`);this._validate(n,l)&&(this.images[n]=l)}_validate(n,l){let p=!0;const m=l.data||l.spriteData;return this._validateStretch(l.stretchX,m&&m.width)||(this.fire(new o.k(new Error(`Image "${n}" has invalid "stretchX" value`))),p=!1),this._validateStretch(l.stretchY,m&&m.height)||(this.fire(new o.k(new Error(`Image "${n}" has invalid "stretchY" value`))),p=!1),this._validateContent(l.content,l)||(this.fire(new o.k(new Error(`Image "${n}" has invalid "content" value`))),p=!1),p}_validateStretch(n,l){if(!n)return!0;let p=0;for(const m of n){if(m[0]<p||m[1]<m[0]||l<m[1])return!1;p=m[1]}return!0}_validateContent(n,l){if(!n)return!0;
vendor: 4,660 bytes, line 75
75if(n.length!==4)return!1;const p=l.spriteData,m=p&&p.width||l.data.width,v=p&&p.height||l.data.height;return!(n[0]<0||m<n[0]||n[1]<0||v<n[1]||n[2]<0||m<n[2]||n[3]<0||v<n[3]||n[2]<n[0]||n[3]<n[1])}updateImage(n,l,p=!0){const m=this.getImage(n);if(p&&(m.data.width!==l.data.width||m.data.height!==l.data.height))throw new Error(`size mismatch between old image (${m.data.width}x${m.data.height}) and new image (${l.data.width}x${l.data.height}).`);l.version=m.version+1,this.images[n]=l,this.updatedImages[n]=!0}removeImage(n){const l=this.images[n];delete this.images[n],delete this.patterns[n],l.userImage&&l.userImage.onRemove&&l.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(n){return new Promise((l,p)=>{let m=!0;if(!this.isLoaded())for(const v of n)this.images[v]||(m=!1);this.isLoaded()||m?l(this._getImagesForIds(n)):this.requestors.push({ids:n,promiseResolve:l})})}_getImagesForIds(n){const l={};for(const p of n){let m=this.getImage(p);m||(this.fire(new o.l("styleimagemissing",{id:p})),m=this.getImage(p)),m?l[p]={data:m.data.clone(),pixelRatio:m.pixelRatio,sdf:m.sdf,version:m.version,stretchX:m.stretchX,stretchY:m.stretchY,content:m.content,textFitWidth:m.textFitWidth,textFitHeight:m.textFitHeight,hasRenderCallback:!!(m.userImage&&m.userImage.render)}:o.w(`Image "${p}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return l}getPixelSize(){const{width:n,height:l}=this.atlasImage;return{width:n,height:l}}getPattern(n){const l=this.patterns[n],p=this.getImage(n);if(!p)return null;if(l&&l.position.version===p.version)return l.position;if(l)l.position.version=p.version;else{const m={w:p.data.width+2,h:p.data.height+2,x:0,y:0},v=new o.I(m,p);this.patterns[n]={bin:m,position:v}}return this._updatePatternAtlas(),this.patterns[n].position}bind(n){const l=n.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new o.T(n,this.atlasImage,l.RGBA),this.atlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE)}_updatePatternAtlas(){const n=[];for(const v in this.patterns)n.push(this.patterns[v].bin);const{w:l,h:p}=o.p(n),m=this.atlasImage;m.resize({width:l||1,height:p||1});for(const v in this.patterns){const{bin:S}=this.patterns[v],E=S.x+1,A=S.y+1,z=this.getImage(v).data,F=z.width,j=z.height;o.R.copy(z,m,{x:0,y:0},{x:E,y:A},{width:F,height:j}),o.R.copy(z,m,{x:0,y:j-1},{x:E,y:A-1},{width:F,height:1}),o.R.copy(z,m,{x:0,y:0},{x:E,y:A+j},{width:F,height:1}),o.R.copy(z,m,{x:F-1,y:0},{x:E-1,y:A},{width:1,height:j}),o.R.copy(z,m,{x:0,y:0},{x:E+F,y:A},{width:1,height:j})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(n){for(const l of n){if(this.callbackDispatchedThisFrame[l])continue;this.callbackDispatchedThisFrame[l]=!0;const p=this.getImage(l);p||o.w(`Image with ID: "${l}" was not found`),fe(p)&&this.updateImage(l,p)}}}const xe=1e20;function et(_,n,l,p,m,v,S,E,A){for(let z=n;z<n+p;z++)ze(_,l*v+z,v,m,S,E,A);for(let z=l;z<l+m;z++)ze(_,z*v+n,1,p,S,E,A)}function ze(_,n,l,p,m,v,S){v[0]=0,S[0]=-1e20,S[1]=xe,m[0]=_[n];for(let E=1,A=0,z=0;E<p;E++){m[E]=_[n+E*l];const F=E*E;do{const j=v[A];z=(m[E]-m[j]+F-j*j)/(E-j)/2}while(z<=S[A]&&--A>-1);A++,v[A]=E,S[A]=z,S[A+1]=xe}for(let E=0,A=0;E<p;E++){for(;S[A+1]<E;)A++;const z=v[A],F=E-z;_[n+E*l]=m[z]+F*F}}class Ze{constructor(n,l){this.requestManager=n,this.localIdeographFontFamily=l,this.entries={}}setURL(n){this.url=n}getGlyphs(n){return o._(this,void 0,void 0,function*(){const l=[];for(const v in n)for(const S of n[v])l.push(this._getAndCacheGlyphsPromise(v,S));const p=yield Promise.all(l),m={};for(const{stack:v,id:S,glyph:E}of p)m[v]||(m[v]={}),m[v][S]=E&&{id:E.id,bitmap:E.bitmap.clone(),metrics:E.metrics};return m})}_getAndCacheGlyphsPromise(n,l){return o._(this,void 0,void 0,function*(){let p=this.entries[n];p||(p=this.entries[n]={glyphs:{},requests:{},ranges:{}});let m=p.glyphs[l];if(m!==void 0)return{stack:n,id:l,glyph:m};if(m=this._tinySDF(p,n,l),m)return p.glyphs[l]=m,{stack:n,id:l,glyph:m};const v=Math.floor(l/256);if(256*v>65535)throw new Error("glyphs > 65535 not supported");if(p.ranges[v])return{stack:n,id:l,glyph:m};if(!this.url)throw new Error("glyphsUrl is not set");if(!p.requests[v]){const E=Ze.loadGlyphRange(n,v,this.url,this.requestManager);p.requests[v]=E}const S=yield p.requests[v];for(const E in S)this._doesCharSupportLocalGlyph(+E)||(p.glyphs[+E]=S[+E]);return p.ranges[v]=!0,{stack:n,id:l,glyph:S[l]||null}})}_doesCharSupportLocalGlyph(n){return!!this.localIdeographFontFamily&&
75(new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(n))||o.u["CJK Unified Ideographs"](n)||o.u["Hangul Syllables"](n)||o.u.Hiragana(n)||o.u.Katakana(n)||o.u["CJK Symbols and Punctuation"](n)||o.u["Halfwidth and Fullwidth Forms"](n))}_tinySDF(n,l,p){const m=this.localIdeographFontFamily;if(!m||!this._doesCharSupportLocalGlyph(p))return;let v=n.tinySDF;if(!v){let E="400";/bold/i.test(l)?E="900":/medium/i.test(l)?E="500":/light/i.test(l)&&(E="200"),v=n.tinySDF=new Ze.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:m,fontWeight:E})}const S=v.draw(String.fromCharCode(p));return{id:p,bitmap:new o.q({width:S.width||60,height:S.height||60},S.data),metrics:{width:S.glyphWidth/2||24,height:S.glyphHeight/2||24,left:S.glyphLeft/2+.5||0,top:S.glyphTop/2-27.5||-8,advance:S.glyphAdvance/2||24,isDoubleResolution:!0}}}}Ze.loadGlyphRange=function(_,n,l,p){return o._(this,void 0,void 0,function*(){const m=256*n,v=m+255,S=p.transformRequest(l.replace("{fontstack}",_).replace("{range}",`${m}-${v}`),"Glyphs"),E=yield o.n(S,new AbortController);if(!E||!E.data)throw new Error(`Could not load glyph range. range: ${n}, ${m}-${v}`);const A={};for(const z of o.o(E.data))A[z.id]=z;return A})},Ze.TinySDF=class{constructor({fontSize:_=24,buffer:n=3,radius:l=8,cutoff:p=.25,fontFamily:m="sans-serif",fontWeight:v="normal",fontStyle:S="normal"}={}){this.buffer=n,this.cutoff=p,this.radius=l;const E=this.size=_+4*n,A=this._createCanvas(E),z=this.ctx=A.getContext("2d",{willReadFrequently:!0});z.font=`${S} ${v} ${_}px ${m}`,z.textBaseline="alphabetic",z.textAlign="left",z.fillStyle="black",this.gridOuter=new Float64Array(E*E),this.gridInner=new Float64Array(E*E),this.f=new Float64Array(E),this.z=new Float64Array(E+1),this.v=new Uint16Array(E)}_createCanvas(_){const n=document.createElement("canvas");return n.width=n.height=_,n}draw(_){const{width:n,actualBoundingBoxAscent:l,actualBoundingBoxDescent:p,actualBoundingBoxLeft:m,actualBoundingBoxRight:v}=this.ctx.measureText(_),S=Math.ceil(l),E=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(v-m))),A=Math.min(this.size-this.buffer,S+Math.ceil(p)),z=E+2*this.buffer,F=A+2*this.buffer,j=Math.max(z*F,0),N=new Uint8ClampedArray(j),G={data:N,width:z,height:F,glyphWidth:E,glyphHeight:A,glyphTop:S,glyphLeft:0,glyphAdvance:n};if(E===0||A===0)return G;const{ctx:Y,buffer:ae,gridInner:oe,gridOuter:le}=this;Y.clearRect(ae,ae,E,A),Y.fillText(_,ae,ae+S);const de=Y.getImageData(ae,ae,E,A);le.fill(xe,0,j),oe.fill(0,0,j);for(let ve=0;ve<A;ve++)for(let ge=0;ge<E;ge++){const we=de.data[4*(ve*E+ge)+3]/255;if(we===0)continue;const Ce=(ve+ae)*z+ge+ae;if(we===1)le[Ce]=0,oe[Ce]=xe;else{const ye=.5-we;le[Ce]=ye>0?ye*ye:0,oe[Ce]=ye<0?ye*ye:0}}et(le,0,0,z,F,z,this.f,this.v,this.z),et(oe,ae,ae,E,A,z,this.f,this.v,this.z);for(let ve=0;ve<j;ve++){const ge=Math.sqrt(le[ve])-Math.sqrt(oe[ve]);N[ve]=Math.round(255-255*(ge/this.radius+this.cutoff))}return G}};class tt{constructor(){this.specification=o.v.light.position}possiblyEvaluate(n,l){return o.B(n.expression.evaluate(l))}interpolate(n,l,p){return{x:o.C.number(n.x,l.x,p),y:o.C.number(n.y,l.y,p),z:o.C.number(n.z,l.z,p)}}}let at;class Pe extends o.E{constructor(n){super(),at=at||new o.r({anchor:new o.D(o.v.light.anchor),position:new tt,color:new o.D(o.v.light.color),intensity:new o.D(o.v.light.intensity)}),this._transitionable=new o.t(at),this.setLight(n),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(n,l={}){if(!this._validate(o.x,n,l))for(const p in n){const m=n[p];p.endsWith("-transition")?this._transitionable.setTransition(p.slice(0,-11),m):this._transitionable.setValue(p,m)}}updateTransitions(n){this._transitioning=this._transitionable.transitioned(n,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(n){this.properties=this._transitioning.possiblyEvaluate(n)}_validate(n,l,p){return(!p||p.validate!==!1)&&o.y(this,n.call(o.z,{value:l,style:{glyphs:!0,sprite:!0},styleSpec:o.v}))}}const He=new o.r({"sky-color":new o.D(o.v.sky["sky-color"]),"horizon-color":new o.D(o.v.sky["horizon-color"]),"fog-color":new o.D(o.v.sky["fog-color"]),"fog-ground-blend":ne
vendor: 4,192 bytes, line 75
75w o.D(o.v.sky["fog-ground-blend"]),"horizon-fog-blend":new o.D(o.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new o.D(o.v.sky["sky-horizon-blend"]),"atmosphere-blend":new o.D(o.v.sky["atmosphere-blend"])});class Oe extends o.E{constructor(n){super(),this._transitionable=new o.t(He),this.setSky(n),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new o.F(0))}setSky(n,l={}){if(!this._validate(o.G,n,l)){n||(n={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(const p in n){const m=n[p];p.endsWith("-transition")?this._transitionable.setTransition(p.slice(0,-11),m):this._transitionable.setValue(p,m)}}}getSky(){return this._transitionable.serialize()}updateTransitions(n){this._transitioning=this._transitionable.transitioned(n,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(n){this.properties=this._transitioning.possiblyEvaluate(n)}_validate(n,l,p={}){return(p==null?void 0:p.validate)!==!1&&o.y(this,n.call(o.z,o.e({value:l,style:{glyphs:!0,sprite:!0},styleSpec:o.v})))}calculateFogBlendOpacity(n){return n<60?0:n<70?(n-60)/10:1}}class lt{constructor(n,l){this.width=n,this.height=l,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(n,l){const p=n.join(",")+String(l);return this.dashEntry[p]||(this.dashEntry[p]=this.addDash(n,l)),this.dashEntry[p]}getDashRanges(n,l,p){const m=[];let v=n.length%2==1?-n[n.length-1]*p:0,S=n[0]*p,E=!0;m.push({left:v,right:S,isDash:E,zeroLength:n[0]===0});let A=n[0];for(let z=1;z<n.length;z++){E=!E;const F=n[z];v=A*p,A+=F,S=A*p,m.push({left:v,right:S,isDash:E,zeroLength:F===0})}return m}addRoundDash(n,l,p){const m=l/2;for(let v=-p;v<=p;v++){const S=this.width*(this.nextRow+p+v);let E=0,A=n[E];for(let z=0;z<this.width;z++){z/A.right>1&&(A=n[++E]);const F=Math.abs(z-A.left),j=Math.abs(z-A.right),N=Math.min(F,j);let G;const Y=v/p*(m+1);if(A.isDash){const ae=m-Math.abs(Y);G=Math.sqrt(N*N+ae*ae)}else G=m-Math.sqrt(N*N+Y*Y);this.data[S+z]=Math.max(0,Math.min(255,G+128))}}}addRegularDash(n){for(let E=n.length-1;E>=0;--E){const A=n[E],z=n[E+1];A.zeroLength?n.splice(E,1):z&&z.isDash===A.isDash&&(z.left=A.left,n.splice(E,1))}const l=n[0],p=n[n.length-1];l.isDash===p.isDash&&(l.left=p.left-this.width,p.right=l.right+this.width);const m=this.width*this.nextRow;let v=0,S=n[v];for(let E=0;E<this.width;E++){E/S.right>1&&(S=n[++v]);const A=Math.abs(E-S.left),z=Math.abs(E-S.right),F=Math.min(A,z);this.data[m+E]=Math.max(0,Math.min(255,(S.isDash?F:-F)+128))}}addDash(n,l){const p=l?7:0,m=2*p+1;if(this.nextRow+m>this.height)return o.w("LineAtlas out of space"),null;let v=0;for(let E=0;E<n.length;E++)v+=n[E];if(v!==0){const E=this.width/v,A=this.getDashRanges(n,this.width,E);l?this.addRoundDash(A,E,p):this.addRegularDash(A)}const S={y:(this.nextRow+p+.5)/this.height,height:2*p/this.height,width:v};return this.nextRow+=m,this.dirty=!0,S}bind(n){const l=n.gl;this.texture?(l.bindTexture(l.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,l.texSubImage2D(l.TEXTURE_2D,0,0,0,this.width,this.height,l.ALPHA,l.UNSIGNED_BYTE,this.data))):(this.texture=l.createTexture(),l.bindTexture(l.TEXTURE_2D,this.texture),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.REPEAT),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.REPEAT),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,l.LINEAR),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,l.LINEAR),l.texImage2D(l.TEXTURE_2D,0,l.ALPHA,this.width,this.height,0,l.ALPHA,l.UNSIGNED_BYTE,this.data))}}const Pt="maplibre_preloaded_worker_pool";class Yt{constructor(){this.active={}}acquire(n){if(!this.workers)for(this.workers=[];this.workers.length<Yt.workerCount;)this.workers.push(new Worker(o.a.WORKER_URL));return this.active[n]=!0,this.workers.slice()}release(n){delete this.active[n],this.numActive()===0&&(this.workers.forEach(l=>{l.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Pt]}numActive(){return Object.keys(this.active).length}}const xt=Math.floor(M.hardwareConcurrency/2);let tr,lr;function Or(){return tr||(tr=new Yt),tr}Yt.workerCount=o.H(globalThis)?Math.max(Math.min(xt,3),1):1;
75class zr{constructor(n,l){this.workerPool=n,this.actors=[],this.currentActor=0,this.id=l;const p=this.workerPool.acquire(l);for(let m=0;m<p.length;m++){const v=new o.J(p[m],l);v.name=`Worker ${m}`,this.actors.push(v)}if(!this.actors.length)throw new Error("No actors found")}broadcast(n,l){const p=[];for(const m of this.actors)p.push(m.sendAsync({type:n,data:l}));return Promise.all(p)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(n=!0){this.actors.forEach(l=>{l.remove()}),this.actors=[],n&&this.workerPool.release(this.id)}registerMessageHandler(n,l){for(const p of this.actors)p.registerMessageHandler(n,l)}}function Je(){return lr||(lr=new zr(Or(),o.K),lr.registerMessageHandler("GR",(_,n,l)=>o.m(n,l))),lr}function At(_,n){const l=o.L();return o.M(l,l,[1,1,0]),o.N(l,l,[.5*_.width,.5*_.height,1]),_.calculatePosMatrix?o.O(l,l,_.calculatePosMatrix(n.toUnwrapped())):l}function _t(_,n,l,p,m,v,S){var E;const A=function(N,G,Y){if(N)for(const ae of N){const oe=G[ae];if(oe&&oe.source===Y&&oe.type==="fill-extrusion")return!0}else for(const ae in G){const oe=G[ae];if(oe.source===Y&&oe.type==="fill-extrusion")return!0}return!1}((E=m==null?void 0:m.layers)!==null&&E!==void 0?E:null,n,_.id),z=v.maxPitchScaleFactor(),F=_.tilesIn(p,z,A);F.sort(pt);const j=[];for(const N of F)j.push({wrappedTileID:N.tileID.wrapped().key,queryResults:N.tile.queryRenderedFeatures(n,l,_._state,N.queryGeometry,N.cameraQueryGeometry,N.scale,m,v,z,At(_.transform,N.tileID),S?(G,Y)=>S(N.tileID,G,Y):void 0)});return function(N,G){for(const Y in N)for(const ae of N[Y])Nt(ae,G);return N}(function(N){const G={},Y={};for(const ae of N){const oe=ae.queryResults,le=ae.wrappedTileID,de=Y[le]=Y[le]||{};for(const ve in oe){const ge=oe[ve],we=de[ve]=de[ve]||{},Ce=G[ve]=G[ve]||[];for(const ye of ge)we[ye.featureIndex]||(we[ye.featureIndex]=!0,Ce.push(ye))}}return G}(j),_)}function pt(_,n){const l=_.tileID,p=n.tileID;return l.overscaledZ-p.overscaledZ||l.canonical.y-p.canonical.y||l.wrap-p.wrap||l.canonical.x-p.canonical.x}function Nt(_,n){const l=_.feature,p=n.getFeatureState(l.layer["source-layer"],l.id);l.source=l.layer.source,l.layer["source-layer"]&&(l.sourceLayer=l.layer["source-layer"]),l.state=p}function rr(_,n,l){return o._(this,void 0,void 0,function*(){let p=_;if(_.url?p=(yield o.j(n.transformRequest(_.url,"Source"),l)).data:yield M.frameAsync(l),!p)return null;const m=o.Q(o.e(p,_),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in p&&p.vector_layers&&(m.vectorLayerIds=p.vector_layers.map(v=>v.id)),m})}class ue{constructor(n,l){n&&(l?this.setSouthWest(n).setNorthEast(l):Array.isArray(n)&&(n.length===4?this.setSouthWest([n[0],n[1]]).setNorthEast([n[2],n[3]]):this.setSouthWest(n[0]).setNorthEast(n[1])))}setNorthEast(n){return this._ne=n instanceof o.S?new o.S(n.lng,n.lat):o.S.convert(n),this}setSouthWest(n){return this._sw=n instanceof o.S?new o.S(n.lng,n.lat):o.S.convert(n),this}extend(n){const l=this._sw,p=this._ne;let m,v;if(n instanceof o.S)m=n,v=n;else{if(!(n instanceof ue))return Array.isArray(n)?n.length===4||n.every(Array.isArray)?this.extend(ue.convert(n)):this.extend(o.S.convert(n)):n&&("lng"in n||"lon"in n)&&"lat"in n?this.extend(o.S.convert(n)):this;if(m=n._sw,v=n._ne,!m||!v)return this}return l||p?(l.lng=Math.min(m.lng,l.lng),l.lat=Math.min(m.lat,l.lat),p.lng=Math.max(v.lng,p.lng),p.lat=Math.max(v.lat,p.lat)):(this._sw=new o.S(m.lng,m.lat),this._ne=new o.S(v.lng,v.lat)),this}getCenter(){return new o.S((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new o.S(this.getWest(),this.getNorth())}getSouthEast(){return new o.S(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(n){const{lng:l,lat:p}=o.S.convert(n);let m=this._sw.lng<=l&&l<=this._ne.lng;return this._sw.lng>this._ne.lng&&(m=this._sw.lng>=l&&l>=this._ne.lng),this._sw.lat<=p&&p<=this._ne.lat&&m}static convert(n){return n instanceof ue?n:n&&new ue(n)}static fromLngLat(n,l=0){const p=360*l/40075017,m=p/Math.cos(Math.PI/180*n.lat);return new ue(new o.S(n.lng-m,n.lat-p),new o.S(n.lng+m,n.lat+p))}adjustAntiMeridian(){const n=new o.S(this._sw.lng,this._sw.lat),l=new o.S(this._ne.lng,this._ne.lat);return new ue(n,n.lng>l.lng?new o.S(l.lng+360,l.lat):l)}}class me{constructor(n,l,p){this.bounds=ue.convert(this.validateBounds(n)),this.minzoom=l||0,this.maxzoom=p||24}
75validateBounds(n){return Array.isArray(n)&&n.length===4?[Math.max(-180,n[0]),Math.max(-90,n[1]),Math.min(180,n[2]),Math.min(90,n[3])]:[-180,-90,180,90]}contains(n){const l=Math.pow(2,n.z),p=Math.floor(o.V(this.bounds.getWest())*l),m=Math.floor(o.U(this.bounds.getNorth())*l),v=Math.ceil(o.V(this.bounds.getEast())*l),S=Math.ceil(o.U(this.bounds.getSouth())*l);return n.x>=p&&n.x<v&&n.y>=m&&n.y<S}}class je extends o.E{constructor(n,l,p,m){if(super(),this.id=n,this.dispatcher=p,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,o.e(this,o.Q(l,["url","scheme","tileSize","promoteId"])),this._options=o.e({type:"vector"},l),this._collectResourceTiming=l.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(m)}load(){return o._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new o.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const n=yield rr(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),n&&(o.e(this,n),n.bounds&&(this.tileBounds=new me(n.bounds,this.minzoom,this.maxzoom)),this.fire(new o.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new o.l("data",{dataType:"source",sourceDataType:"content"})))}catch(n){this._tileJSONRequest=null,this.fire(new o.k(n))}})}loaded(){return this._loaded}hasTile(n){return!this.tileBounds||this.tileBounds.contains(n.canonical)}onAdd(n){this.map=n,this.load()}setSourceProperty(n){this._tileJSONRequest&&this._tileJSONRequest.abort(),n(),this.load()}setTiles(n){return this.setSourceProperty(()=>{this._options.tiles=n}),this}setUrl(n){return this.setSourceProperty(()=>{this.url=n,this._options.url=n}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return o.e({},this._options)}loadTile(n){return o._(this,void 0,void 0,function*(){const l=n.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),p={request:this.map._requestManager.transformRequest(l,"Tile"),uid:n.uid,tileID:n.tileID,zoom:n.tileID.overscaledZ,tileSize:this.tileSize*n.tileID.overscaleFactor(),type:this.t
75ype,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,globalState:this.map.getGlobalState()};p.request.collectResourceTiming=this._collectResourceTiming;let m="RT";if(n.actor&&n.state!=="expired"){if(n.state==="loading")return new Promise((v,S)=>{n.reloadPromise={resolve:v,reject:S}})}else n.actor=this.dispatcher.getActor(),m="LT";n.abortController=new AbortController;try{const v=yield n.actor.sendAsync({type:m,data:p},n.abortController);if(delete n.abortController,n.aborted)return;this._afterTileLoadWorkerResponse(n,v)}catch(v){if(delete n.abortController,n.aborted)return;if(v&&v.status!==404)throw v;this._afterTileLoadWorkerResponse(n,null)}})}_afterTileLoadWorkerResponse(n,l){if(l&&l.resourceTiming&&(n.resourceTiming=l.resourceTiming),l&&this.map._refreshExpiredTiles&&n.setExpiryData(l),n.loadVectorData(l,this.map.painter),n.reloadPromise){const p=n.reloadPromise;n.reloadPromise=null,this.loadTile(n).then(p.resolve).catch(p.reject)}}abortTile(n){return o._(this,void 0,void 0,function*(){n.abortController&&(n.abortController.abort(),delete n.abortController),n.actor&&(yield n.actor.sendAsync({type:"AT",data:{uid:n.uid,type:this.t
75ype,source:this.id}}))})}unloadTile(n){return o._(this,void 0,void 0,function*(){n.unloadVectorData(),n.actor&&(yield n.actor.sendAsync({type:"RMT",data:{uid:n.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class ft extends o.E{constructor(n,l,p,m){super(),this.id=n,this.dispatcher=p,this.setEventedParent(m),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=o.e({type:"raster"},l),o.e(this,o.Q(l,["url","scheme","tileSize"]))}load(){return o._(this,arguments,void 0,function*(n=!1){this._loaded=!1,this.fire(new o.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const l=yield rr(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,l&&(o.e(this,l),l.bounds&&(this.tileBounds=new me(l.bounds,this.minzoom,this.maxzoom)),this.fire(new o.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new o.l("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:n})))}catch(l){this._tileJSONRequest=null,this.fire(new o.k(l))}})}loaded(){return this._loaded}onAdd(n){this.map=n,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(n){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),n(),this.load(!0)}setTiles(n){return this.setSourceProperty(()=>{this._options.tiles=n}),this}setUrl(n){return this.setSourceProperty(()=>{this.url=n,this._options.url=n}),this}serialize(){return o.e({},this._options)}hasTile(n){return!this.tileBounds||this.tileBounds.contains(n.canonical)}loadTile(n){return o._(this,void 0,void 0,function*(){const l=n.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);n.abortController=new AbortController;try{const p=yield U.getImage(this.map._requestManager.transformRequest(l,"Tile"),n.abortController,this.map._refreshExpiredTiles);if(delete n.abortController,n.aborted)return void(n.state="unloaded");if(p&&p.data){this.map._refreshExpiredTiles&&(p.cacheControl||p.expires)&&n.setExpiryData({cacheControl:p.cacheControl,expires:p.expires});const m=this.map.painter.context,v=m.gl,S=p.data;n.texture=this.map.painter.getTileTexture(S.width),n.texture?n.texture.update(S,{useMipmap:!0}):(n.texture=new o.T(m,S,v.RGBA,{useMipmap:!0}),n.texture.bind(v.LINEAR,v.CLAMP_TO_EDGE,v.LINEAR_MIPMAP_NEAREST)),n.state="loaded"}}catch(p){if(delete n.abortController,n.aborted)n.state="unloaded";else if(p)throw n.state="errored",p}})}abortTile(n){return o._(this,void 0,void 0,function*(){n.abortController&&(n.abortController.abort(),delete n.abortController)})}unloadTile(n){return o._(this,void 0,void 0,function*(){n.texture&&this.map.painter.saveTileTexture(n.texture)})}hasTransition(){return!1}}class Xe extends ft{constructor(n,l,p,m){super(n,l,p,m),this.type="raster-dem",this.maxzoom=22,this._options=o.e({type:"raster-dem"},l),this.encoding=l.encoding||"mapbox",this.redFactor=l.redFactor,this.greenFactor=l.greenFactor,this.blueFactor=l.blueFactor,this.baseShift=l.baseShift}loadTile(n){return o._(this,void 0,void 0,function*(){const l=n.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),p=this.map._requestManager.transformRequest(l,"Tile");n.neighboringTiles=this._getNeighboringTiles(n.tileID),n.abortController=new AbortController;try{const m=yield U.getImage(p,n.abortController,this.map._refreshExpiredTiles);if(delete n.abortController,n.aborted)return void(n.state="unloaded");if(m&&m.data){const v=m.data;this.map._refreshExpiredTiles&&(m.cacheControl||m.expires)&&n.setExpiryData({cacheControl:m.cacheControl,expires:m.expires});const S=o.b(v)&&o.W()?v:yield this.readImageNow(v),E={type:this.type,uid:n.uid,source:this.id,rawImageData:S,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!n.actor||n.state==="expired"){n.actor=this.dispatcher.getActor();const A=yield n.actor.sendAsync({type:"LDT",data:E});n.dem=A,n.needsHillshadePrepare=!0,n.needsTerrainPrepare=!0,n.state="loaded"}}}catch(m){if(delete n.abortController,n.aborted)n.state="unloaded";else if(m)throw n.state="errored",m}})}readImageNow(n){return o._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&o.X()){const l=n.width+2,p=n.height+2;try{return new o.R({width:l,height:p},yield o.Y(n,-1,-1,l,p))}catch{}}return M.getImageData(n,1)})}_getNeighboringTiles(n){const l=n.canonical,p=Math.pow(2,l.z),m=(l.x-1+p)%p,v=l.x===0?n.wrap-1:n.wrap,S=(l.x+1+p)%p,E=l.x+1===p?n.wrap+1:n.wrap,A={};return A[new o.Z(n.overscaledZ,v,l.z,m,l.y).key]={backfilled:!1},A[new o.Z(n.overscaledZ,E,l.z,S,l.y).key]={backfilled:!1},l.y>0&&(A[new o.Z(n.overscaledZ,v,l.z,m,l.y-1).key]={backfilled:!1},A[new o.Z(n.overscaledZ,n.wrap,l.z,l.x,l.y-1).key]={backfilled:!1},A[new o.Z(n.overscaledZ,E,l.z,S,l.y-1).key]={backfilled:!1}),l.y+1<p&&(A[new o.Z(n.overscaledZ,v,l.z,m,l.y+1).key]={backfilled:!1},A[new o.Z(n.overscaledZ,n.wrap,l.z,l.x,l.y+1).key]={backfilled:!1},A[new o.Z(n.overscaledZ,E,l.z,S,l.y+1).key]={backfilled:!1}),A}unloadTile(n){return o._(this,void 0,void 0,function*(){n.demTexture&&this.map.painter.saveTileTexture(n.demTexture),n.fbo&&(n.fbo.destroy(),delete n.fbo),n.dem&&delete n.dem,delete n.neighboringTiles,n.state="unloaded",n.actor&&(yield n.actor.sendAsync({type:"RDT",data:{type:this.t
vendor: 1,092 bytes, line 75
75ype,uid:n.uid,source:this.id}}))})}}class dt extends o.E{constructor(n,l,p,m){super(),this.id=n,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=p.getActor(),this.setEventedParent(m),this._data=l.data,this._options=o.e({},l),this._collectResourceTiming=l.collectResourceTiming,l.maxzoom!==void 0&&(this.maxzoom=l.maxzoom),l.type&&(this.type=l.type),l.attribution&&(this.attribution=l.attribution),this.promoteId=l.promoteId,l.clusterMaxZoom!==void 0&&this.maxzoom<=l.clusterMaxZoom&&o.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${l.clusterMaxZoom}".`),this.workerOptions=o.e({source:this.id,cluster:l.cluster||!1,geojsonVtOptions:{buffer:this._pixelsToTileUnits(l.buffer!==void 0?l.buffer:128),tolerance:this._pixelsToTileUnits(l.tolerance!==void 0?l.tolerance:.375),extent:o.$,maxZoom:this.maxzoom,lineMetrics:l.lineMetrics||!1,generateId:l.generateId||!1},superclusterOptions:{maxZoom:this._getClusterMaxZoom(l.clusterMa
75xZoom),minPoints:Math.max(2,l.clusterMinPoints||2),extent:o.$,radius:this._pixelsToTileUnits(l.clusterRadius||50),log:!1,generateId:l.generateId||!1},clusterProperties:l.clusterProperties,filter:l.filter},l.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}_pixelsToTileUnits(n){return n*(o.$/this.tileSize)}_getClusterMaxZoom(n){const l=n?Math.round(n):this.maxzoom-1;return Number.isInteger(n)||n===void 0||o.w(`Integer expected for option 'clusterMaxZoom': provided value "${n}" rounded to "${l}"`),l}load(){return o._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(n){this.map=n,this.load()}setData(n){return this._data=n,this._updateWorkerData(),this}updateData(n){return this._updateWorkerData(n),this}getData(){return o._(this,void 0,void 0,function*(){const n=o.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:n})})}getCoordinatesFromGeometry(n){return n.type==="GeometryCollection"?n.geometries.map(l=>l.coordinates).flat(1/0):n.coordinates.flat(1/0)}getBounds(){return o._(this,void 0,void 0,function*(){const n=new ue,l=yield this.getData();let p;switch(l.type){case"FeatureCollection":p=l.features.map(m=>this.getCoordinatesFromGeometry(m.geometry)).flat(1/0);break;case"Feature":p=this.getCoordinatesFromGeometry(l.geometry);break;default:p=this.getCoordinatesFromGeometry(l)}if(p.length==0)return n;for(let m=0;m<p.length-1;m+=2)n.extend([p[m],p[m+1]]);return n})}setClusterOptions(n){return this.workerOptions.cluster=n.cluster,n&&(n.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=this._pixelsToTileUnits(n.clusterRadius)),n.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=this._getClusterMaxZoom(n.clusterMaxZoom))),this._updateWorkerData(),this}getClusterExpansionZoom(n){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:n,source:this.id}})}getClusterChildren(n){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:n,source:this.id}})}getClusterLeaves(n,l,p){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:n,limit:l,offset:p}})}_updateWorkerData(n){return o._(this,void 0,void 0,function*(){const l=o.e({type:this.type},this.workerOptions);
75n?l.dataDiff=n:typeof this._data=="string"?(l.request=this.map._requestManager.transformRequest(M.resolveURL(this._data),"Source"),l.request.collectResourceTiming=this._collectResourceTiming):l.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new o.l("dataloading",{dataType:"source"}));try{const p=yield this.actor.sendAsync({type:"LD",data:l});if(this._pendingLoads--,this._removed||p.abandoned)return void this.fire(new o.l("dataabort",{dataType:"source"}));let m=null;p.resourceTiming&&p.resourceTiming[this.id]&&(m=p.resourceTiming[this.id].slice(0));const v={dataType:"source"};this._collectResourceTiming&&m&&m.length>0&&o.e(v,{resourceTiming:m}),this.fire(new o.l("data",Object.assign(Object.assign({},v),{sourceDataType:"metadata"}))),this.fire(new o.l("data",Object.assign(Object.assign({},v),{sourceDataType:"content"})))}catch(p){if(this._pendingLoads--,this._removed)return void this.fire(new o.l("dataabort",{dataType:"source"}));this.fire(new o.k(p))}})}loaded(){return this._pendingLoads===0}loadTile(n){return o._(this,void 0,void 0,function*(){const l=n.actor?"RT":"LT";n.actor=this.actor;const p={type:this.type,uid:n.uid,tileID:n.tileID,zoom:n.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,globalState:this.map.getGlobalState()};n.abortController=new AbortController;const m=yield this.actor.sendAsync({type:l,data:p},n.abortController);delete n.abortController,n.unloadVectorData(),n.aborted||n.loadVectorData(m,this.map.painter,l==="RT")})}abortTile(n){return o._(this,void 0,void 0,function*(){n.abortController&&(n.abortController.abort(),delete n.abortController),n.aborted=!0})}unloadTile(n){return o._(this,void 0,void 0,function*(){n.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:n.uid,type:this.t
75ype,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return o.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}class Ee extends o.E{constructor(n,l,p,m){super(),this.flippedWindingOrder=!1,this.id=n,this.dispatcher=p,this.coordinates=l.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(m),this.options=l}load(n){return o._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new o.l("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const l=yield U.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,l&&l.data&&(this.image=l.data,n&&(this.coordinates=n),this._finishLoading())}catch(l){this._request=null,this._loaded=!0,this.fire(new o.k(l))}})}loaded(){return this._loaded}updateImage(n){return n.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=n.url,this.load(n.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new o.l("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(n){this.map=n,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(n){this.coordinates=n;const l=n.map(o.a0.fromLngLat);var p;return this.tileID=function(m){const v=o.a1.fromPoints(m),S=v.width(),E=v.height(),A=Math.max(S,E),z=Math.max(0,Math.floor(-Math.log(A)/Math.LN2)),F=Math.pow(2,z);return new o.a3(z,Math.floor((v.minX+v.maxX)/2*F),Math.floor((v.minY+v.maxY)/2*F))}(l),this.terrainTileRanges=this._getOverlappingTileRanges(l),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=l.map(m=>this.tileID.getTilePoint(m)._round()),this.flippedWindingOrder=((p=this.tileCoords)[1].x-p[0].x)*(p[2].y-p[0].y)-(p[1].y-p[0].y)*(p[2].x-p[0].x)<0,this.fire(new o.l("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const n=this.map.painter.context,l=n.gl;this.texture||(this.texture=new o.T(n,this.image,l.RGBA),this.texture.bind(l.LINEAR,l.CLAMP_TO_EDGE));let p=!1;for(const m in this.tiles){const v=this.tiles[m];v.state!=="loaded"&&(v.state="loaded",v.texture=this.texture,p=!0)}p&&this.fire(new o.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(n){return o._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(n.tileID.canonical)?(this.tiles[String(n.tileID.wrap)]=n,n.buckets={}):n.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(n){const{minX:l,minY:p,maxX:m,maxY:v}=o.a1.fromPoints(n),S={};for(let E=0;E<=o.a2;E++){const A=Math.pow(2,E),z=Math.floor(l*A),F=Math.floor(p*A),j=Math.floor(m*A),N=Math.floor(v*A);S[E]={minTileX:z,minTileY:F,maxTileX:j,maxTileY:N}}return S}}class Fe extends Ee{constructor(n,l,p,m){super(n,l,p,m),this.roundZoom=!0,this.type="video",this.options=l}load(){return o._(this,void 0,void 0,function*(){this._loaded=!1;const n=this.options;this.urls=[];for(const l of n.urls)this.urls.push(this.map._requestManager.transformRequest(l,"Source").url);try{const l=yield o.a4(this.urls);if(this._loaded=!0,!l)return;this.video=l,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(l){this.fire(new o.k(l))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(n){if(this.video){const l=this.video.seekable;n<l.start(0)||n>l.end(0)?this.fire(new o.k(new o.a5(`sources.${this.id}`,null,`Playback for this video can be set only between the ${l.start(0)} and ${l.end(0)}-second mark.`))):this.video.currentTime=n}}getVideo(){return this.video}
75onAdd(n){this.map||(this.map=n,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const n=this.map.painter.context,l=n.gl;this.texture?this.video.paused||(this.texture.bind(l.LINEAR,l.CLAMP_TO_EDGE),l.texSubImage2D(l.TEXTURE_2D,0,0,0,l.RGBA,l.UNSIGNED_BYTE,this.video)):(this.texture=new o.T(n,this.video,l.RGBA),this.texture.bind(l.LINEAR,l.CLAMP_TO_EDGE));let p=!1;for(const m in this.tiles){const v=this.tiles[m];v.state!=="loaded"&&(v.state="loaded",v.texture=this.texture,p=!0)}p&&this.fire(new o.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Ke extends Ee{constructor(n,l,p,m){super(n,l,p,m),l.coordinates?Array.isArray(l.coordinates)&&l.coordinates.length===4&&!l.coordinates.some(v=>!Array.isArray(v)||v.length!==2||v.some(S=>typeof S!="number"))||this.fire(new o.k(new o.a5(`sources.${n}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new o.k(new o.a5(`sources.${n}`,null,'missing required property "coordinates"'))),l.animate&&typeof l.animate!="boolean"&&this.fire(new o.k(new o.a5(`sources.${n}`,null,'optional "animate" property must be a boolean value'))),l.canvas?typeof l.canvas=="string"||l.canvas instanceof HTMLCanvasElement||this.fire(new o.k(new o.a5(`sources.${n}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new o.k(new o.a5(`sources.${n}`,null,'missing required property "canvas"'))),this.options=l,this.animate=l.animate===void 0||l.animate}load(){return o._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new o.k(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(n){this.map=n,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let n=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,n=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,n=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const l=this.map.painter.context,p=l.gl;this.texture?(n||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new o.T(l,this.canvas,p.RGBA,{premultiply:!0});let m=!1;for(const v in this.tiles){const S=this.tiles[v];S.state!=="loaded"&&(S.state="loaded",S.texture=this.texture,m=!0)}m&&this.fire(new o.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const n of[this.canvas.width,this.canvas.height])if(isNaN(n)||n<=0)return!0;return!1}}const nt={},St=_=>{switch(_){case"geojson":return dt;case"image":return Ee;case"raster":return ft;case"raster-dem":return Xe;case"vector":return je;case"video":return Fe;case"canvas":return Ke}return nt[_]},mt="RTLPluginLoaded";class Lt extends o.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Je()}_syncState(n){return this.status=n,this.dispatcher.broadcast("SRPS",{pluginStatus:n,pluginURL:this.url}).catch(l=>{throw this.status="error",l})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(n){return o._(this,arguments,void 0,function*(l,p=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=M.resolveURL(l),!this.url)throw new Error(`requested url ${l}
75 is invalid`);if(this.status==="unavailable"){if(!p)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return o._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new o.l(mt))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Gt=null;function Qt(){return Gt||(Gt=new Lt),Gt}class cr{constructor(n,l){this.timeAdded=0,this.fadeEndTime=0,this.tileID=n,this.uid=o.a6(),this.uses=0,this.tileSize=l,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(n){const l=n+this.timeAdded;l<this.fadeEndTime||(this.fadeEndTime=l)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(n){this.demTexture&&n.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(n,l,p){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",n){n.featureIndex&&(this.latestFeatureIndex=n.featureIndex,n.rawTileData?(this.latestRawTileData=n.rawTileData,this.latestFeatureIndex.rawTileData=n.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=n.collisionBoxArray,this.buckets=function(m,v){const S={};if(!v)return S;for(const E of m){const A=E.layerIds.map(z=>v.getLayer(z)).filter(Boolean);if(A.length!==0){E.layers=A,E.stateDependentLayerIds&&(E.stateDependentLayers=E.stateDependentLayerIds.map(z=>A.filter(F=>F.id===z)[0]));for(const z of A)S[z.id]=E}}return S}(n.buckets,l==null?void 0:l.style),this.hasSymbolBuckets=!1;for(const m in this.buckets){const v=this.buckets[m];if(v instanceof o.a8){if(this.hasSymbolBuckets=!0,!p)break;v.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const m in this.buckets){const v=this.buckets[m];if(v instanceof o.a8&&v.hasRTLText){this.hasRTLText=!0,Qt().lazyLoad();break}}this.queryPadding=0;for(const m in this.buckets){const v=this.buckets[m];this.queryPadding=Math.max(this.queryPadding,l.style.getLayer(m).queryRadius(v))}n.imageAtlas&&(this.imageAtlas=n.imageAtlas),n.glyphAtlasImage&&(this.glyphAtlasImage=n.glyphAtlasImage)}else this.collisionBoxArray=new o.a7}unloadVectorData(){for(const n in this.buckets)this.buckets[n].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(n){return this.buckets[n.id]}upload(n){for(const p in this.buckets){const m=this.buckets[p];m.uploadPending()&&m.upload(n)}const l=n.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new o.T(n,this.imageAtlas.image,l.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new o.T(n,this.glyphAtlasImage,l.ALPHA),this.glyphAtlasImage=null)}prepare(n){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(n,this.imageAtlasTexture)}queryRenderedFeatures(n,l,p,m,v,S,E,A,z,F,j){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:m,cameraQueryGeometry:v,scale:S,tileSize:this.tileSize,pixelPosMatrix:F,transform:A,params:E,queryPadding:this.queryPadding*z,getElevation:j},n,l,p):{}}querySourceFeatures(n,l){const p=this.latestFeatureIndex;if(!p||!p.rawTileData)return;const m=p.loadVTLayers(),v=l&&l.sourceLayer?l.sourceLayer:"",S=m._geojsonTileLayer||m[v];if(!S)return;const E=o.a9(l&&l.filter),{z:A,x:z,y:F}=this.tileID.canonical,j={z:A,x:z,y:F};for(let N=0;N<S.length;N++){const G=S.feature(N);if(E.needGeometry){const oe=o.aa(G,!0);if(!E.filter(new o.F(this.tileID.overscaledZ),oe,this.tileID.canonical))continue}else if(!E.filter(new o.F(this.tileID.overscaledZ),G))continue;const Y=p.getId(G,v),ae=new o.ab(G,A,z,F,Y);ae.tile=j,n.push(ae)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(n){const l=this.expirationTime;if(n.cacheControl){const p=o.ac(n.cacheControl);p["max-age"]&&(this.expirationTime=Date.now()+1e3*p["max-age"])}else n.expires&&(this.expirationTime=new Date(n.expires).getTime());if(this.expirationTime){const p=Date.now();let m=!1;if(this.expirationTime>p)m=!1;else if(l)if(this.expirationTime<l)m=!0;else{const v=this.expirationTime-l;v?this.expirationTime=p+Math.max(v,3e4):m=!0}else m=!0;m?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)}setFeatureState(n,l){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(n).length===0)return;const p=this.latestFeatureIndex.loadVTLayers();for(const m in this.buckets){if(!l.style.hasLayer(m))continue;const v=this.buckets[m],S=v.layers[0].sourceLayer||"_geojsonTileLayer",E=p[S],A=n[S];if(!E||!A||Object.keys(A).length===0)continue;v.update(A,E,this.imageAtlas&&this.imageAtlas.patternPositions||{});const z=l&&l.style&&l.style.getLayer(m);z&&(this.queryPadding=Math.max(this.queryPadding,z.queryRadius(v)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<M.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(n){this.symbolFadeHoldUntil=M.now()+n}
vendor: 7,647 bytes, line 75
75setDependencies(n,l){const p={};for(const m of l)p[m]=!0;this.dependencies[n]=p}hasDependency(n,l){for(const p of n){const m=this.dependencies[p];if(m){for(const v of l)if(m[v])return!0}}return!1}}class Ir{constructor(n,l){this.max=n,this.onRemove=l,this.reset()}reset(){for(const n in this.data)for(const l of this.data[n])l.timeout&&clearTimeout(l.timeout),this.onRemove(l.value);return this.data={},this.order=[],this}add(n,l,p){const m=n.wrapped().key;this.data[m]===void 0&&(this.data[m]=[]);const v={value:l,timeout:void 0};if(p!==void 0&&(v.timeout=setTimeout(()=>{this.remove(n,v)},p)),this.data[m].push(v),this.order.push(m),this.order.length>this.max){const S=this._getAndRemoveByKey(this.order[0]);S&&this.onRemove(S)}return this}has(n){return n.wrapped().key in this.data}getAndRemove(n){return this.has(n)?this._getAndRemoveByKey(n.wrapped().key):null}_getAndRemoveByKey(n){const l=this.data[n].shift();return l.timeout&&clearTimeout(l.timeout),this.data[n].length===0&&delete this.data[n],this.order.splice(this.order.indexOf(n),1),l.value}getByKey(n){const l=this.data[n];return l?l[0].value:null}get(n){return this.has(n)?this.data[n.wrapped().key][0].value:null}remove(n,l){if(!this.has(n))return this;const p=n.wrapped().key,m=l===void 0?0:this.data[p].indexOf(l),v=this.data[p][m];return this.data[p].splice(m,1),v.timeout&&clearTimeout(v.timeout),this.data[p].length===0&&delete this.data[p],this.onRemove(v.value),this.order.splice(this.order.indexOf(p),1),this}setMaxSize(n){for(this.max=n;this.order.length>this.max;){const l=this._getAndRemoveByKey(this.order[0]);l&&this.onRemove(l)}return this}filter(n){const l=[];for(const p in this.data)for(const m of this.data[p])n(m.value)||l.push(m);for(const p of l)this.remove(p.value.tileID,p)}}class Ln{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(n,l,p){const m=String(l);if(this.stateChanges[n]=this.stateChanges[n]||{},this.stateChanges[n][m]=this.stateChanges[n][m]||{},o.e(this.stateChanges[n][m],p),this.deletedStates[n]===null){this.deletedStates[n]={};for(const v in this.state[n])v!==m&&(this.deletedStates[n][v]=null)}else if(this.deletedStates[n]&&this.deletedStates[n][m]===null){this.deletedStates[n][m]={};for(const v in this.state[n][m])p[v]||(this.deletedStates[n][m][v]=null)}else for(const v in p)this.deletedStates[n]&&this.deletedStates[n][m]&&this.deletedStates[n][m][v]===null&&delete this.deletedStates[n][m][v]}removeFeatureState(n,l,p){if(this.deletedStates[n]===null)return;const m=String(l);if(this.deletedStates[n]=this.deletedStates[n]||{},p&&l!==void 0)this.deletedStates[n][m]!==null&&(this.deletedStates[n][m]=this.deletedStates[n][m]||{},this.deletedStates[n][m][p]=null);else if(l!==void 0)if(this.stateChanges[n]&&this.stateChanges[n][m])for(p in this.deletedStates[n][m]={},this.stateChanges[n][m])this.deletedStates[n][m][p]=null;else this.deletedStates[n][m]=null;else this.deletedStates[n]=null}getState(n,l){const p=String(l),m=o.e({},(this.state[n]||{})[p],(this.stateChanges[n]||{})[p]);if(this.deletedStates[n]===null)return{};if(this.deletedStates[n]){const v=this.deletedStates[n][l];if(v===null)return{};for(const S in v)delete m[S]}return m}initializeTileState(n,l){n.setFeatureState(this.state,l)}coalesceChanges(n,l){const p={};for(const m in this.stateChanges){this.state[m]=this.state[m]||{};const v={};for(const S in this.stateChanges[m])this.state[m][S]||(this.state[m][S]={}),o.e(this.state[m][S],this.stateChanges[m][S]),v[S]=this.state[m][S];p[m]=v}for(const m in this.deletedStates){this.state[m]=this.state[m]||{};const v={};if(this.deletedStates[m]===null)for(const S in this.state[m])v[S]={},this.state[m][S]={};else for(const S in this.deletedStates[m]){if(this.deletedStates[m][S]===null)this.state[m][S]={};else for(const E of Object.keys(this.deletedStates[m][S]))delete this.state[m][S][E];v[S]=this.state[m][S]}p[m]=p[m]||{},o.e(p[m],v)}if(this.stateChanges={},this.deletedStates={},Object.keys(p).length!==0)for(const m in n)n[m].setFeatureState(p,l)}}const un=89.25;function Me(_,n){const l=o.ag(n.lat,-85.051129,o.ah);return new o.P(o.V(n.lng)*_,o.U(l)*_)}function Q(_,n){return new o.a0(n.x/_,n.y/_).toLngLat()}function re(_){return _.cameraToCenterDistance*Math.min(.85*Math.tan(o.ad(90-_.pitch)),Math.tan(o.ad(un-_.pitch)))}function se(_,n){const l=_.canonical,p=n/o.ae(l.z),m=l.x+Math.pow(2,l.z)*_.wrap,v=o.af(new Float64Array(16));return o.M(v,v,[m*p,l.y*p,0]),o.N(v,v,[p/o.$,p/o.$,1]),v}function pe(_,n,l,p,m){const v=o.a0.fromLngLat(_,n),S=m*o.ai(1,_.lat),E=S*Math.cos(o.ad(l)),A=Math.sqrt(S*S-E*E),z=A*Math.sin(o.ad(-p)),F=A*Math.cos(o.ad(-p));return new o.a0(v.x+z,v.y+F,v.z+E)}function Te(_,n,l){const p=n.intersectsFrustum(_);if(!l||p===0)return p;const m=n.intersectsPlane(l);return m===0?0:p===2&&m===2?2:1}function Le(_,n,l){let p=0;const m=(l-n)/10;for(let v=0;v<10;v++)p+=m*Math.pow(Math.cos(n+(v+.5)/10*(l-n)),_);return p}function Ue(_,n){return function(l,p,m,v,S){const E=2*((_-1)/o.aj(Math.cos(o.ad(un-S))/Math.cos(o.ad(un)))-1),A=Math.acos(m/v),z=2*Le(E-1,0,o.ad(S/2)),F=Math.min(o.ad(un),A+o.ad(S/2)),j=Le(E-1,Math.min(F,A-o.ad(S/2)),F),N=Math.atan(p/m),G=Math.hypot(p,m);let Y=l;return Y+=o.aj(v/G/Math.max(.5,Math.cos(o.ad(S/2)))),Y+=E*o.aj(Math.cos(N))/2,Y-=o.aj(Math.max(1,j/z/n))/2,Y}}const Re=Ue(9.314,3);function Qe(_,n){const l=(n.roundZoom?Math.round:Math.floor)(_.zoom+o.aj(_.tileSize/n.tileSize));return Math.max(0,l)}function We(_,n){const l=_.getCameraFrustum(),p=_.getClippingPlane(),m=_.screenPointToMercatorCoordinate(_.getCameraPoint()),v=o.a0.fromLngLat(_.center,_.elevation);m.z=v.z+Math.cos(_.pitchInRadians)*_.cameraToCenterDistance/_.worldSize;const S=_.getCoveringTilesDetailsProvider(),E=S.allowVariableZoom(_,n),A=Qe(_,n),z=n.minzoom||0,F=n.maxzoom!==void 0?n.maxzoom:_.maxZoom,j=Math.min(Math.max(0,A),F),N=Math.pow(2,j),G=[N*m.x,N*m.y,0],Y=[N*v.x,N*v.y,0],ae=Math.hypot(v.x-m.x,v.y-m.y),oe=Math.abs(v.z-m.z),le=Math.hypot(ae,oe),de=we=>({zoom:0,x:0,y:0,wrap:we,fullyVisible:!1}),ve=[],ge=[];if(_.renderWorldCopies&&S.allowWorldCopies())for(let we=1;we<=3;we++)ve.push(de(-we)),ve.push(de(we));for(ve.push(de(0));ve.length>0;){const we=ve.pop(),Ce=we.x,ye=we.y;let Ae=we.fullyVisible;const Ve={x:Ce,y:ye,z:we.zoom},Be=S.getTileBoundingVolume(Ve,we.wrap,_.elevation,n);if(!Ae){const bt=Te(l,Be,p);if(bt===0)continue;Ae=bt===2}const Ne=S.distanceToTile2d(m.x,m.y,Ve,Be);let qe=A;E&&(qe=(n.calculateTileZoom||Re)(_.zoom+o.aj(_.tileSize/n.tileSize),Ne,oe,le,_.fov)),qe=(n.roundZoom?Math.round:Math.floor)(qe),qe=Math.max(0,qe);const wt=Math.min(qe,F);if(we.wrap=S.getWrap(v,Ve,we.wrap),we.zoom>=wt){if(we.zoom<z)continue;const bt=j-we.zoom,ut=G[0]-.5-(Ce<<bt),zt=G[1]-.5-(ye<<bt),hr=n.reparseOverscaled?Math.max(we.zoom,qe):we.zoom;ge.push({tileID:new o.Z(we.zoom===F?hr:we.zoom,we.wrap,we.zoom,Ce,ye),distanceSq:o.ak([Y[0]-.5-Ce,Y[1]-.5-ye]),tileDistanceToCamera:Math.sqrt(ut*ut+zt*zt)})}else for(let bt=0;bt<4;bt++)ve.push({zoom:we.zoom+1,x:(Ce<<1)+bt%2,y:(ye<<1)+(bt>>1),wrap:we.wrap,fullyVisible:Ae})}return ge.sort((we,Ce)=>we.distanceSq-Ce.distanceSq).map(we=>we.tileID)}const De=o.a1.fromPoints([new o.P(0,0),new o.P(o.$,o.$)]);class st extends o.E{constructor(n,l,p){super(),this.id=n,this.dispatcher=p,this.on("data",m=>this._dataHandler(m)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((m,v,S,E)=>{const A=new(St(v.type))(m,v,S,E);if(A.id!==m)throw new Error(`Expected Source id to be ${m} instead of ${A.id}`);return A})(n,l,p,this),this._tiles={},this._cache=new Ir(0,m=>this._unloadTile(m)),this._timers={},this._cacheTimers={}
75,this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Ln,this._didEmitContent=!1,this._updated=!1}onAdd(n){this.map=n,this._maxTileCacheSize=n?n._maxTileCacheSize:null,this._maxTileCacheZoomLevels=n?n._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(n)}onRemove(n){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(n)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const n in this._tiles){const l=this._tiles[n];if(l.state!=="loaded"&&l.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const n=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,n&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(n,l,p){return o._(this,void 0,void 0,function*(){try{yield this._source.loadTile(n),this._tileLoaded(n,l,p)}catch(m){n.state="errored",m.status!==404?this._source.fire(new o.k(m,{tile:n})):this.update(this.transform,this.terrain)}})}_unloadTile(n){this._source.unloadTile&&this._source.unloadTile(n)}_abortTile(n){this._source.abortTile&&this._source.abortTile(n),this._source.fire(new o.l("dataabort",{tile:n,coord:n.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(n){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const l in this._tiles){const p=this._tiles[l];p.upload(n),p.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(n=>n.tileID).sort(ke).map(n=>n.key)}getRenderableIds(n){const l=[];for(const p in this._tiles)this._isIdRenderable(p,n)&&l.push(this._tiles[p]);return n?l.sort((p,m)=>{const v=p.tileID,S=m.tileID,E=new o.P(v.canonical.x,v.canonical.y)._rotate(-this.transform.bearingInRadians),A=new o.P(S.canonical.x,S.canonical.y)._rotate(-this.transform.bearingInRadians);return v.overscaledZ-S.overscaledZ||A.y-E.y||A.x-E.x}).map(p=>p.tileID.key):l.map(p=>p.tileID).sort(ke).map(p=>p.key)}hasRenderableParent(n){const l=this.findLoadedParent(n,0);return!!l&&this._isIdRenderable(l.tileID.key)}_isIdRenderable(n,l){return this._tiles[n]&&this._tiles[n].hasData()&&!this._coveredTiles[n]&&(l||!this._tiles[n].holdingForFade())}reload(n){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const l in this._tiles)n?this._reloadTile(l,"expired"):this._tiles[l].state!=="errored"&&this._reloadTile(l,"reloading")}}_reloadTile(n,l){return o._(this,void 0,void 0,function*(){const p=this._tiles[n];p&&(p.state!=="loading"&&(p.state=l),yield this._loadTile(p,n,l))})}_tileLoaded(n,l,p){n.timeAdded=M.now(),p==="expired"&&(n.refreshedUponExpiration=!0),this._setTileReloadTimer(l,n),this.getSource().type==="raster-dem"&&n.dem&&this._backfillDEM(n),this._state.initializeTileState(n,this.map?this.map.painter:null),n.aborted||this._source.fire(new o.l("data",{dataType:"source",tile:n,coord:n.tileID}))}_backfillDEM(n){const l=this.getRenderableIds();for(let m=0;m<l.length;m++){const v=l[m];if(n.neighboringTiles&&n.neighboringTiles[v]){const S=this.getTileByID(v);p(n,S),p(S,n)}}function p(m,v){m.needsHillshadePrepare=!0,m.needsTerrainPrepare=!0;let S=v.tileID.canonical.x-m.tileID.canonical.x;const E=v.tileID.canonical.y-m.tileID.canonical.y,A=Math.pow(2,m.tileID.canonical.z),z=v.tileID.key;S===0&&E===0||Math.abs(E)>1||(Math.abs(S)>1&&(Math.abs(S+A)===1?S+=A:Math.abs(S-A)===1&&(S-=A)),v.dem&&m.dem&&(m.dem.backfillBorder(v.dem,S,E),m.neighboringTiles&&m.neighboringTiles[z]&&(m.neighboringTiles[z].backfilled=!0)))}}getTile(n){return this.getTileByID(n.key)}getTileByID(n){return this._tiles[n]}_retainLoadedChildren(n,l,p,m){for(const v in this._tiles){let S=this._tiles[v];if(m[v]||!S.hasData()||S.tileID.overscaledZ<=l||S.tileID.overscaledZ>p)continue;let E=S.tileID;for(;S&&S.tileID.overscaledZ>l+1;){const z=S.tileID.scaledTo(S.tileID.overscaledZ-1);S=this._tiles[z.key],S&&S.hasData()&&(E=z)}let A=E;for(;A.overscaledZ>l;)if(A=A.scaledTo(A.overscaledZ-1),n[A.key]||n[A.canonical.key]){m[E.key]=E;break}}}findLoadedParent(n,l){if(n.key in this._loadedParentTiles){const p=this._loadedParentTiles[n.key];return p&&p.tileID.overscaledZ>=l?p:null}for(let p=n.overscaledZ-1;p>=l;p--){const m=n.scaledTo(p),v=this._getLoadedTile(m);if(v)return v}}findLoadedSibling(n){return this._getLoadedTile(n)}_getLoadedTile(n){const l=this._tiles[n.key];return l&&l.hasData()?l:this._cache.getByKey(n.wrapped().key)}updateCacheSize(n){const l=Math.ceil(n.width/this._source.tileSize)+1,p=Math.ceil(n.height/this._source.tileSize)+1,m=Math.floor(l*p*(this._maxTileC
75acheZoomLevels===null?o.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),v=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,m):m;this._cache.setMaxSize(v)}handleWrapJump(n){const l=Math.round((n-(this._prevLng===void 0?n:this._prevLng))/360);if(this._prevLng=n,l){const p={};for(const m in this._tiles){const v=this._tiles[m];v.tileID=v.tileID.unwrapTo(v.tileID.wrap+l),p[v.tileID.key]=v}this._tiles=p;for(const m in this._timers)clearTimeout(this._timers[m]),delete this._timers[m];for(const m in this._tiles)this._setTileReloadTimer(m,this._tiles[m])}}_updateCoveredAndRetainedTiles(n,l,p,m,v,S){const E={},A={},z=Object.keys(n),F=M.now();for(const j of z){const N=n[j],G=this._tiles[j];if(!G||G.fadeEndTime!==0&&G.fadeEndTime<=F)continue;const Y=this.findLoadedParent(N,l),ae=this.findLoadedSibling(N),oe=Y||ae||null;oe&&(this._addTile(oe.tileID),E[oe.tileID.key]=oe.tileID),A[j]=N}this._retainLoadedChildren(A,m,p,n);for(const j in E)n[j]||(this._coveredTiles[j]=!0,n[j]=E[j]);if(S){const j={},N={};for(const G of v)this._tiles[G.key].hasData()?j[G.key]=G:N[G.key]=G;for(const G in N){const Y=N[G].children(this._source.maxzoom);this._tiles[Y[0].key]&&this._tiles[Y[1].key]&&this._tiles[Y[2].key]&&this._tiles[Y[3].key]&&(j[Y[0].key]=n[Y[0].key]=Y[0],j[Y[1].key]=n[Y[1].key]=Y[1],j[Y[2].key]=n[Y[2].key]=Y[2],j[Y[3].key]=n[Y[3].key]=Y[3],delete N[G])}for(const G in N){const Y=N[G],ae=this.findLoadedParent(Y,this._source.minzoom),oe=this.findLoadedSibling(Y),le=ae||oe||null;if(le){j[le.tileID.key]=n[le.tileID.key]=le.tileID;for(const de in j)j[de].isChildOf(le.tileID)&&delete j[de]}}for(const G in this._tiles)j[G]||(this._coveredTiles[G]=!0)}}update(n,l){if(!this._sourceLoaded||this._paused)return;let p;this.transform=n,this.terrain=l,this.updateCacheSize(n),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?p=n.getVisibleUnwrappedCoordinates(this._source.tileID).map(F=>
75new o.Z(F.canonical.z,F.wrap,F.canonical.z,F.canonical.x,F.canonical.y)):(p=We(n,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:l,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(p=p.filter(F=>this._source.hasTile(F)))):p=[];const m=Qe(n,this._source),v=Math.max(m-st.maxOverzooming,this._source.minzoom),S=Math.max(m+st.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const F={};for(const j of p)if(j.canonical.z>this._source.minzoom){const N=j.scaledTo(j.canonical.z-1);F[N.key]=N;const G=j.scaledTo(Math.max(this._source.minzoom,Math.min(j.canonical.z,5)));F[G.key]=G}p=p.concat(Object.values(F))}const E=p.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,E&&this.fire(new o.l("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const A=this._updateRetainedTiles(p,m);Et(this._source.type)&&this._updateCoveredAndRetainedTiles(A,v,S,m,p,l);for(const F in A)this._tiles[F].clearFadeHold();const z=o.al(this._tiles,A);for(const F of z){const j=this._tiles[F];j.hasSymbolBuckets&&!j.holdingForFade()?j.setHoldDuration(this.map._fadeDuration):j.hasSymbolBuckets&&!j.symbolFadeFinished()||this._removeTile(F)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const n in this._tiles)this._tiles[n].holdingForFade()&&this._removeTile(n)}_updateRetainedTiles(n,l){var p;const m={},v={},S=Math.max(l-st.maxOverzooming,this._source.minzoom),E=Math.max(l+st.maxUnderzooming,this._source.minzoom),A={};for(const z of n){const F=this._addTile(z);m[z.key]=z,F.hasData()||l<this._source.maxzoom&&(A[z.key]=z)}this._retainLoadedChildren(A,l,E,m);for(const z of n){let F=this._tiles[z.key];if(F.hasData())continue;if(l+1>this._source.maxzoom){const N=z.children(this._source.maxzoom)[0],G=this.getTile(N);if(G&&G.hasData()){m[N.key]=N;continue}}else{const N=z.children(this._source.maxzoom);if(m[N[0].key]&&m[N[1].key]&&m[N[2].key]&&m[N[3].key])continue}let j=F.wasRequested();for(let N=z.overscaledZ-1;N>=S;--N){const G=z.scaledTo(N);if(v[G.key])break;if(v[G.key]=!0,F=this.getTile(G),!F&&j&&(F=this._addTile(G)),F){const Y=F.hasData();if((Y||!(!((p=this.map)===null||p===void 0)&&p.cancelPendingTileRequestsWhileZooming)||j)&&(m[G.key]=G),j=F.wasRequested(),Y)break}}}return m}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const n in this._tiles){const l=[];let p,m=this._tiles[n].tileID;for(;m.overscaledZ>0;){if(m.key in this._loadedParentTiles){p=this._loadedParentTiles[m.key];break}l.push(m.key);const v=m.scaledTo(m.overscaledZ-1);if(p=this._getLoadedTile(v),p)break;m=v}for(const v of l)this._loadedParentTiles[v]=p}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const n in this._tiles){const l=this._tiles[n].tileID,p=this._getLoadedTile(l);this._loadedSiblingTiles[l.key]=p}}_addTile(n){let l=this._tiles[n.key];if(l)return l;l=this._cache.getAndRemove(n),l&&(this._setTileReloadTimer(n.key,l),l.tileID=n,this._state.initializeTileState(l,this.map?this.map.painter:null),this._cacheTimers[n.key]&&(clearTimeout(this._cacheTimers[n.key]),delete this._cacheTimers[n.key],this._setTileReloadTimer(n.key,l)));const p=l;return l||(l=new cr(n,this._source.tileSize*n.overscaleFactor()),this._loadTile(l,n.key,l.state)),l.uses++,this._tiles[n.key]=l,p||this._source.fire(new o.l("dataloading",{tile:l,coord:l.tileID,dataType:"source"})),l}_setTileReloadTimer(n,l){n in this._timers&&(clearTimeout(this._timers[n]),delete this._timers[n]);const p=l.getExpiryTimeout();p&&(this._timers[n]=setTimeout(()=>{this._reloadTile(n,"expired"),delete this._timers[n]},p))}refreshTiles(n){for(const l in this._tiles)(this._isIdRenderable(l)||this._tiles[l].state=="errored")&&n.some(p=>p.equals(this._tiles[l].tileID.canonical))&&this._reloadTile(l,"expired")}_removeTile(n){const l=this._tiles[n];l&&(l.uses--,delete this._tiles[n],this._timers[n]&&(clearTimeout(this._timers[n]),delete this._timers[n]),l.uses>0||(l.hasData()&&l.state!=="reloading"?this._cache.add(l.tileID,l,l.getExpiryTimeout()):(l.aborted=!0,this._abortTile(l),this._unloadTile(l))))}_dataHandler(n){const l=n.sourceDataType;n.dataType==="source"&&l==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&n.dataType==="source"&&l==="content"&&(this.reload(n.sourceDataChanged),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const n in this._tiles)this._removeTile(n);this._cache.reset()}tilesIn(n,l,p){const m=[],v=this.transform;if(!v)return m;const S=v.getCoveringTilesDetailsProvider().allowWorldCopies(),E=p?v.getCameraQueryGeometry(n):n,A=G=>v.screenPointToMercatorCoordinate(G,this.terrain),z=this.transformBbox(n,A,!S),F=this.transformBbox(E,A,!S),j=this.getIds(),N=o.a1.fromPoints(F
vendor: 45,714 bytes, lines 75-102
75);for(let G=0;G<j.length;G++){const Y=this._tiles[j[G]];if(Y.holdingForFade())continue;const ae=S?[Y.tileID]:[Y.tileID.unwrapTo(-1),Y.tileID.unwrapTo(0)],oe=Math.pow(2,v.zoom-Y.tileID.overscaledZ),le=l*Y.queryPadding*o.$/Y.tileSize/oe;for(const de of ae){const ve=N.map(ge=>de.getTilePoint(new o.a0(ge.x,ge.y)));if(ve.expandBy(le),ve.intersects(De)){const ge=z.map(Ce=>de.getTilePoint(Ce)),we=F.map(Ce=>de.getTilePoint(Ce));m.push({tile:Y,tileID:S?de:de.unwrapTo(0),queryGeometry:ge,cameraQueryGeometry:we,scale:oe})}}}return m}transformBbox(n,l,p){let m=n.map(l);if(p){const v=o.a1.fromPoints(n);v.shrinkBy(.001*Math.min(v.width(),v.height()));const S=v.map(l);o.a1.fromPoints(m).covers(S)||(m=m.map(E=>E.x>.5?new o.a0(E.x-1,E.y,E.z):E))}return m}getVisibleCoordinates(n){const l=this.getRenderableIds(n).map(p=>this._tiles[p].tileID);return this.transform&&this.transform.populateCache(l),l}hasTransition(){if(this._source.hasTransition())return!0;if(Et(this._source.type)){const n=M.now();for(const l in this._tiles)if(this._tiles[l].fadeEndTime>=n)return!0}return!1}setFeatureState(n,l,p){this._state.updateState(n=n||"_geojsonTileLayer",l,p)}removeFeatureState(n,l,p){this._state.removeFeatureState(n=n||"_geojsonTileLayer",l,p)}getFeatureState(n,l){return this._state.getState(n=n||"_geojsonTileLayer",l)}setDependencies(n,l,p){const m=this._tiles[n];m&&m.setDependencies(l,p)}reloadTilesForDependencies(n,l){for(const p in this._tiles)this._tiles[p].hasDependency(n,l)&&this._reloadTile(p,"reloading");this._cache.filter(p=>!p.hasDependency(n,l))}}function ke(_,n){const l=Math.abs(2*_.wrap)-+(_.wrap<0),p=Math.abs(2*n.wrap)-+(n.wrap<0);return _.overscaledZ-n.overscaledZ||p-l||n.canonical.y-_.canonical.y||n.canonical.x-_.canonical.x}function Et(_){return _==="raster"||_==="image"||_==="video"}st.maxOverzooming=10,st.maxUnderzooming=3;class Xt{constructor(n,l){this.reset(n,l)}reset(n,l){this.points=n||[],this._distances=[0];for(let p=1;p<this.points.length;p++)this._distances[p]=this._distances[p-1]+this.points[p].dist(this.points[p-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(l||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(n){if(this.points.length===1)return this.points[0];n=o.ag(n,0,1);let l=1,p=this._distances[l];const m=n*this.paddedLength+this.padding;for(;p<m&&l<this._distances.length;)p=this._distances[++l];const v=l-1,S=this._distances[v],E=p-S,A=E>0?(m-S)/E:0;return this.points[v].mult(1-A).add(this.points[l].mult(A))}}function Rt(_,n){let l=!0;return _==="always"||_!=="never"&&n!=="never"||(l=!1),l}class jt{constructor(n,l,p){const m=this.boxCells=[],v=this.circleCells=[];this.xCellCount=Math.ceil(n/p),this.yCellCount=Math.ceil(l/p);for(let S=0;S<this.xCellCount*this.yCellCount;S++)m.push([]),v.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=n,this.height=l,this.xScale=this.xCellCount/n,this.yScale=this.yCellCount/l,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(n,l,p,m,v){this._forEachCell(l,p,m,v,this._insertBoxCell,this.boxUid++),this.boxKeys.push(n),this.bboxes.push(l),this.bboxes.push(p),this.bboxes.push(m),this.bboxes.push(v)}insertCircle(n,l,p,m){this._forEachCell(l-m,p-m,l+m,p+m,this._insertCircleCell,this.circleUid++),this.circleKeys.push(n),this.circles.push(l),this.circles.push(p),this.circles.push(m)}_insertBoxCell(n,l,p,m,v,S){this.boxCells[v].push(S)}_insertCircleCell(n,l,p,m,v,S){this.circleCells[v].push(S)}_query(n,l,p,m,v,S,E){if(p<0||n>this.width||m<0||l>this.height)return[];const A=[];if(n<=0&&l<=0&&this.width<=p&&this.height<=m){if(v)return[{key:null,x1:n,y1:l,x2:p,y2:m}];for(let z=0;z<this.boxKeys.length;z++)A.push({key:this.boxKeys[z],x1:this.bboxes[4*z],y1:this.bboxes[4*z+1],x2:this.bboxes[4*z+2],y2:this.bboxes[4*z+3]});for(let z=0;z<this.circleKeys.length;z++){const F=this.circles[3*z],j=this.circles[3*z+1],N=this.circles[3*z+2];A.push({key:this.circleKeys[z],x1:F-N,y1:j-N,x2:F+N,y2:j+N})}}else this._forEachCell(n,l,p,m,this._queryCell,A,{hitTest:v,overlapMode:S,seenUids:{box:{},circle:{}}},E);return A}query(n,l,p,m){return this._query(n,l,p,m,!1,null)}hitTest(n,l,p,m,v,S){return this._query(n,l,p,m,!0,v,S).length>0}hitTestCircle(n,l,p,m,v){const S=n-p,E=n+p,A=l-p,z=l+p;if(E<0||S>this.width||z<0||A>this.height)return!1;const F=[];return this._forEachCell(S,A,E,z,this._queryCellCircle,F,{hitTest:!0,overlapMode:m,circle:{x:n,y:l,radius:p},seenUids:{box:{},circle:{}}},v),F.length>0}_queryCell(n,l,p,m,v,S,E,A){const{seenUids:z,hitTest:F,overlapMode:j}=E,N=this.boxCells[v];if(N!==null){const Y=this.bboxes;for(const ae of N)if(!z.box[ae]){z.box[ae]=!0;const oe=4*ae,le=this.boxKeys[ae];if(n<=Y[oe+2]&&l<=Y[oe+3]&&p>=Y[oe+0]&&m>=Y[oe+1]&&(!A||A(le))&&(!F||!Rt(j,le.overlapMode))&&(S.push({key:le,x1:Y[oe],y1:Y[oe+1],x2:Y[oe+2],y2:Y[oe+3]}),F))return!0}}const G=this.circleCells[v];if(G!==null){const Y=this.circles;for(const ae of G)if(!z.circle[ae]){z.circle[ae]=!0;const oe=3*ae,le=this.circleKeys[ae];if(this._circleAndRectCollide(Y[oe],Y[oe+1],Y[oe+2],n,l,p,m)&&(!A||A(le))&&(!F||!Rt(j,le.overlapMode))){const de=Y[oe],ve=Y[oe+1],ge=Y[oe+2];if(S.push({key:le,x1:de-ge,y1:ve-ge,x2:de+ge,y2:ve+ge}),F)return!0}}}return!1}_queryCellCircle(n,l,p,m,v,S,E,A){const{circle:z,seenUids:F,overlapMode:j}=E,N=this.boxCells[v];if(N!==null){const Y=this.bboxes;for(const ae of N)if(!F.box[ae]){F.box[ae]=!0;const oe=4*ae,le=this.boxKeys[ae];if(this._circleAndRectCollide(z.x,z.y,z.radius,Y[oe+0],Y[oe+1],Y[oe+2],Y[oe+3])&&(!A||A(le))&&!Rt(j,le.overlapMode))return S.push(!0),!0}}const G=this.circleCells[v];if(G!==null){const Y=this.circles;for(const ae of G)if(!F.circle[ae]){F.circle[ae]=!0;const oe=3*ae,le=this.circleKeys[ae];if(this._circlesCollide(Y[oe],Y[oe+1],Y[oe+2],z.x,z.y,z.radius)&&(!A||A(le))&&!Rt(j,le.overlapMode))return S.push(!0),!0}}}_forEachCell(n,l,p,m,v,S,E,A){const z=this._convertToXCellCoord(n),F=this._convertToYCellCoord(l),j=this._convertToXCellCoord(p),N=this._convertToYCellCoord(m);for(let G=z;G<=j;G++)for(let Y=F;Y<=N;Y++)if(v.call(this,n,l,p,m,this.xCellCount*Y+G,S,E,A))return}_convertToXCellCoord(n){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(n*this.xScale)))}_convertToYCellCoord(n){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(n*this.yScale)))}_circlesCollide(n,l,p,m,v,S){const E=m-n,A=v-l,z=p+S;return z*z>E*E+A*A}_circleAndRectCollide(n,l,p,m,v,S,E){const A=(S-m)/2,z=Math.abs(n-(m+A));if(z>A+p)return!1;const F=(E-v)/2,j=Math.abs(l-(v+F));if(j>F+p)return!1;if(z<=A||j<=F)return!0;const N=z-A,G=j-F;return N*N+G*G<=p*p}}function nr(_,n,l){const p=o.L();if(!_){const{vecSouth:j,vecEast:N}=Wr(n),G=w();G[0]=N[0],G[1]=N[1],G[2]=j[0],G[3]=j[1],m=G,(F=(S=(v=G)[0])*(z=v[3])-(A=v[2])*(E=v[1]))&&(m[0]=z*(F=1/F),m[1]=-E*F,m[2]=-A*F,m[3]=S*F),p[0]=G[0],p[1]=G[1],p[4]=G[2],p[5]=G[3]}var m,v,S,E,A,z,F;return o.N(p,p,[1/l,1/l,1]),p}function on(_,n,l,p){if(_){const m=o.L();if(!n){const{vecSouth:v,vecEast:S}=Wr(l);m[0]=S[0],m[1]=S[1],m[4]=v[0],m[5]=v[1]}return o.N(m,m,[p,p,1]),m}return l.pixelsToClipSpaceMatrix}function Wr(_){const n=Math.cos(_.rollInRadians),l=Math.sin(_.rollInRadians),p=Math.cos(_.pitchInRadians),m=Math.cos(_.bearingInRadians),v=Math.sin(_.bearingInRadians),S=o.aq();S[0]=-m*p*l-v*n,S[1]=-v*p*l+m*n;const E=o.ar(S);E<1e-9?o.as(S):o.at(S,S,1/E);const A=o.aq();A[0]=m*p*n-v*l,A[1]=v*p*n+m*l;const z=o.ar(A);return z<1e-9?o.as(A):o.at(A,A,1/z),{vecEast:A,vecSouth:S}}function Fr(_,n,l,p){let m;p?(m=[_,n,p(_,n),1],o.av(m,m,l)):(m=[_,n,0,1],Ia(m,m,l));const v=m[3];return{point:new o.P(m[0]/v,m[1]/v),signedDistanceFromCamera:v,isOccluded:!1}}function er(_,n){return .5+_/n*.5}function Cr(_,n){return _.x>=-n[0]&&_.x<=n[0]&&_.y>=-n[1]&&_.y<=n[1]}function Jn(_,n,l,p,m,v,S,E,A,z,F,j,N){const G=l?_.textSizeData:_.iconSizeData,Y=o.am(G,n.transform.zoom),ae=[256/n.width*2+1,256/n.height*2+1],oe=l?_.text.dynamicLayoutVertexArray:_.icon.dynamicLayoutVertexArray;oe.clear();const le=_.lineVertexArray,de=l?_.text.placedSymbolArray:_.icon.placedSymbolArray,ve=n.transform.width/n.transform.height;let ge=!1;for(let we=0;we<de.length;we++){const Ce=de.get(we);if(Ce.hidden||Ce.writingMode===o.an.vertical&&!ge){ho(Ce.numGlyphs,oe);continue}ge=!1;const ye=new o.P(Ce.anchorX,Ce.anchorY),Ae={getElevation:N,pitchedLabelPlaneMatrix:p,lineVertexArray:le,pitchWithMap:v,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:n.transform,tileAnchorPoint:ye,unwrappedTileID:A,width:z,height:F,translation:j},Ve=pr(Ce.anchorX,Ce.anchorY,Ae);if(!Cr(Ve.point,ae)){ho(Ce.numGlyphs,oe);continue}const Be=er(n.transform.cameraToCenterDistance,Ve.signedDistanceFromCamera),Ne=o.ao(G,Y,Ce),qe=v?Ne*n.transform.getPitchedTextCorrection(Ce.anchorX,Ce.anchorY,A)/Be:Ne*Be,wt=yn({projectionContext:Ae,pitchedLabelPlaneMatrixInverse:m,symbol:Ce,fontSize:qe,flip:!1,keepUpright:S,glyphOffsetArray:_.glyphOffsetArray,dynamicLayoutVertexArray:oe,aspectRatio:ve,rotateToLine:E});ge=wt.useVertical,(wt.notEnoughRoom||ge||wt.needsFlipping&&yn({projectionContext:Ae,pitchedLabelPlaneMatrixInverse:m,symbol:Ce,fontSize:qe,flip:!0,keepUpright:S,glyphOffsetArray:_.glyphOffsetArray,dynamicLayoutVertexArray:oe,aspectRatio:ve,rotateToLine:E}).notEnoughRoom)&&ho(Ce.numGlyphs,oe)}l?_.text.dynamicLayoutVertexBuffer.updateData(oe):_.icon.dynamicLayoutVertexBuffer.updateData(oe)}function vt(_,n,l,p,m,v,S,E){const A=v.glyphStartIndex+v.numGlyphs,z=v.lineStartIndex,F=v.lineStartIndex+v.lineLength,j=n.getoffsetX(v.glyphStartIndex),N=n.getoffsetX(A-1),G=qs(_*j,l,p,m,v.segment,z,F,E,S);if(!G)return null;const Y=qs(_*N,l,p,m,v.segment,z,F,E,S);return Y?E.projectionCache.anyProjectionOccluded?null:{first:G,last:Y}:null}function ui(_,n,l,p){return _===o.an.horizontal&&Math.abs(l.y-n.y)>Math.abs(l.x-n.x)*p?{useVertical:!0}:(_===o.an.vertical?n.y<l.y:n.x>l.x)?{needsFlipping:!0}:null}function yn(_){const{projectionContext:n,pitchedLabelPlaneMatrixInverse:l,symbol:p,fontSize:m,flip:v,keepUpright:S,glyphOffsetArray:E,dynamicLayoutVertexArray:A,aspectRatio:z,rotateToLine:F}=_,j=m/24,N=p.lineOffsetX*j,G=p.lineOffsetY*j;let Y;if(p.numGlyphs>1){const ae=p.glyphStartIndex+p.numGlyphs,oe=p.lineStartIndex,le=p.lineStartIndex+p.lineLength,de=vt(j,E,N,G,v,p,F,n);if(!de)return{notEnoughRoom:!0};const ve=fr(de.first.point.x,de.first.point.y,n,l),ge=fr(de.last.point.x,de.last.point.y,n,l);if(S&&!v){const we=ui(p.writingMode,ve,ge,z);if(we)return we}Y=[de.first];for(let we=p.glyphStartIndex+1;we<ae-1;we++){const Ce=qs(j*E.getoffsetX(we),N,G,v,p.segment,oe,le,n,F);if(!Ce)return{notEnoughRoom:!0};Y.push(Ce)}Y.push(de.last)}else{if(S&&!v){const oe=Tt(n.tileAnchorPoint.x,n.tileAnchorPoint.y,n).point,le=p.lineStartIndex+p.segment+1,de=new o.P(n.lineVertexArray.getx(le),n.lineVertexArray.gety(le)),ve=Tt(de.x,de.y,n),ge=ve.signedDistanceFromCamera>0?ve.point:Ho(n.tileAnchorPoint,de,oe,1,n),we=fr(oe.x,oe.y,n,l),Ce=fr(ge.x,ge.y,n,l),ye=ui(p.writingMode,we,Ce,z);if(ye)return ye}const ae=qs(j*E.getoffsetX(p.glyphStartIndex),N,G,v,p.segment,p.lineStartIndex,p.lineStartIndex+p.lineLength,n,F);if(!ae||n.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Y=[ae]}for(const ae of Y)o.au(A,ae.point,ae.angle);return{}}function Ho(_,n,l,p,m){const v=_.add(_.sub(n)._unit()),S=Tt(v.x,v.y,m).point,E=l.sub(S);return l.add(E._mult(p/E.mag()))}function ka(_,n,l){const p=n.projectionCache;if(p.projections[_])return p.projections[_];const m=new o.P(n.lineVertexArray.getx(_),n.lineVertexArray.gety(_)),v=Tt(m.x,m.y,n);if(v.signedDistanceFromCamera>0)return p.projections[_]=v.point,p.anyProjectionOccluded=p.anyProjectionOccluded||v.isOccluded,v.point;const S=_-l.direction;return Ho(l.distanceFromAnchor===0?n.tileAnchorPoint:new o.P(n.lineVertexArray.getx(S),n.lineVertexArray.gety(S)),m,l.previousVertex,l.absOffsetX-l.distanceFromAnchor+1,n)}function Tt(_,n,l){const p=_+l.translation[0],m=n+l.translation[1];let v;return l.pitchWithMap?(v=Fr(p,m,l.pitchedLabelPlaneMatrix,l.getElevation),v.isOccluded=!1):(v=l.transform.projectTileCoordinates(p,m,l.unwrappedTileID,l.getElevation),v.point.x=(.5*v.point.x+.5)*l.width,v.point.y=(.5*-v.point.y+.5)*l.height),v}function fr(_,n,l,p){if(l.pitchWithMap){const m=[_,n,0,1];return o.av(m,m,p),l.transform.projectTileCoordinates(m[0]/m[3],m[1]/m[3],l.unwrappedTileID,l.getElevation).point}return{x:_/l.width*2-1,y:n/l.height*2-1}}function pr(_,n,l){return l.transform.projectTileCoordinates(_,n,l.unwrappedTileID,l.getElevation)}function ts(_,n,l){return _._unit()._perp()._mult(n*l)}function rh(_,n,l,p,m,v,S,E,A){if(E.projectionCache.offsets[_])return E.projectionCache.offsets[_];const z=l.add(n);if(_+A.direction<p||_+A.direction>=m)return E.projectionCache.offsets[_]=z,z;const F=ka(_+A.direction,E,A),j=ts(F.sub(l),S,A.direction),N=l.add(j),G=F.add(j);return E.projectionCache.offsets[_]=o.aw(v,z,N,G)||z,E.projectionCache.offsets[_]}function qs(_,n,l,p,m,v,S,E,A){const z=p?_-n:_+n;let F=z>0?1:-1,j=0;p&&(F*=-1,j=Math.PI),F<0&&(j+=Math.PI);let N,G=F>0?v+m:v+m+1;E.projectionCache.cachedAnchorPoint?N=E.projectionCache.cachedAnchorPoint:(N=Tt(E.tileAnchorPoint.x,E.tileAnchorPoint.y,E).point,E.projectionCache.cachedAnchorPoint=N);let Y,ae,oe=N,le=N,de=0,ve=0;const ge=Math.abs(z),we=[];let Ce;for(;de+ve<=ge;){if(G+=F,G<v||G>=S)return null;de+=ve,le=oe,ae=Y;const Ve={absOffsetX:ge,direction:F,distanceFromAnchor:de,previousVertex:le};if(oe=ka(G,E,Ve),l===0)we.push(le),Ce=oe.sub(le);else{let Be;const Ne=oe.sub(le);Be=Ne.mag()===0?ts(ka(G+F,E,Ve).sub(oe),l,F):ts(Ne,l,F),ae||(ae=le.add(Be)),Y=rh(G,Be,oe,v,S,ae,l,E,Ve),we.push(ae),Ce=Y.sub(ae)}ve=Ce.mag()}const ye=Ce._mult((ge-de)/ve)._add(ae||le),Ae=j+Math.atan2(oe.y-le.y,oe.x-le.x);return we.push(ye),{point:ye,angle:A?Ae:0,path:we}}const mr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ho(_,n){for(let l=0;l<_;l++){const p=n.length;n.resize(p+4),n.float32.set(mr,3*p)}}function Ia(_,n,l){const p=n[0],m=n[1];return _[0]=l[0]*p+l[4]*m+l[12],_[1]=l[1]*p+l[5]*m+l[13],_[3]=l[3]*p+l[7]*m+l[15],_}const Bn=100;class Tc{constructor(n,l=new jt(n.width+200,n.height+200,25),p=new jt(n.width+200,n.height+200,25)){this.transform=n,this.grid=l,this.ignoredGrid=p,this.pitchFactor=Math.cos(n.pitch*Math.PI/180)*n.cameraToCenterDistance,this.screenRightBoundary=n.width+Bn,this.screenBottomBoundary=n.height+Bn,this.gridRightBoundary=n.width+200,this.gridBottomBoundary=n.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(n,l,p,m,v,S,E,A,z,F,j,N){const G=this.projectAndGetPerspectiveRatio(n.anchorPointX+A[0],n.anchorPointY+A[1],v,F,N),Y=p*G.perspectiveRatio;let ae;if(S||E)ae=this._projectCollisionBox(n,Y,m,v,S,E,A,G,F,j,N);else{const Ce=G.x+(j?j.x*Y:0),ye=G.y+(j?j.y*Y:0);ae={allPointsOccluded:!1,box:[Ce+n.x1*Y,ye+n.y1*Y,Ce+n.x2*Y,ye+n.y2*Y]}}const[oe,le,de,ve]=ae.box,ge=S?ae.allPointsOccluded:G.isOccluded;let we=ge;return we||(we=G.perspectiveRatio<this.perspectiveRatioCutoff),we||(we=!this.isInsideGrid(oe,le,de,ve)),we||l!=="always"&&this.grid.hitTest(oe,le,de,ve,l,z)?{box:[oe,le,de,ve],placeable:!1,offscreen:!1,occluded:ge}:{box:[oe,le,de,ve],placeable:!0,offscreen:this.isOffscreen(oe,le,de,ve),occluded:ge}}placeCollisionCircles(n,l,p,m,v,S,E,A,z,F,j,N,G,Y){const ae=[],oe=new o.P(l.anchorX,l.anchorY),le=this.getPerspectiveRatio(oe.x,oe.y,S,Y),de=(z?v*this.transform.getPitchedTextCorrection(l.anchorX,l.anchorY,S)/le:v*le)/o.aA,ve={getElevation:Y,pitchedLabelPlaneMatrix:E,lineVertexArray:p,pitchWithMap:z,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:this.transform,tileAnchorPoint:oe,unwrappedTileID:S,width:this.transform.width,height:this.transform.height,translation:G},ge=vt(de,m,l.lineOffsetX*de,l.lineOffsetY*de,!1,l,!1,ve);let we=!1,Ce=!1,ye=!0;if(ge){const Ae=.5*j*le+N,Ve=new o.P(-100,-100),Be=new o.P(this.screenRightBoundary,this.screenBottomBoundary),Ne=new Xt,qe=ge.first,wt=ge.last;let bt=[];for(let hr=qe.path.length-1;hr>=1;hr--)bt.push(qe.path[hr]);for(let hr=1;hr<wt.path.length;hr++)bt.push(wt.path[hr]);const ut=2.5*Ae;if(z){const hr=this.projectPathToScreenSpace(bt,ve);bt=hr.some(Ur=>Ur.signedDistanceFromCamera<=0)?[]:hr.map(Ur=>Ur.point)}let zt=[];if(bt.length>0){const hr=bt[0].clone(),Ur=bt[0].clone();for(let xn=1;xn<bt.length;xn++)hr.x=Math.min(hr.x,bt[xn].x),hr.y=Math.min(hr.y,bt[xn].y),Ur.x=Math.max(Ur.x,bt[xn].x),Ur.y=Math.max(Ur.y,bt[xn].y);zt=hr.x>=Ve.x&&Ur.x<=Be.x&&hr.y>=Ve.y&&Ur.y<=Be.y?[bt]:Ur.x<Ve.x||hr.x>Be.x||Ur.y<Ve.y||hr.y>Be.y?[]:o.ax([bt],Ve.x,Ve.y,Be.x,Be.y)}for(const hr of zt){Ne.reset(hr,.25*Ae);let Ur=0;Ur=Ne.length<=.5*Ae?1:Math.ceil(Ne.paddedLength/ut)+1;for(let xn=0;xn<Ur;xn++){const Yr=xn/Math.max(Ur-1,1),wn=Ne.lerp(Yr),rn=wn.x+Bn,Jr=wn.y+Bn;ae.push(rn,Jr,Ae,0);const nn=rn-Ae,di=Jr-Ae,Pr=rn+Ae,ti=Jr+Ae;if(ye=ye&&this.isOffscreen(nn,di,Pr,ti),Ce=Ce||this.isInsideGrid(nn,di,Pr,ti),n!=="always"&&this.grid.hitTestCircle(rn,Jr,Ae,n,F)&&(we=!0,!A))return{circles:[],offscreen:!1,collisionDetected:we}}}}return{circles:!A&&we||!Ce||le<this.perspectiveRatioCutoff?[]:ae,offscreen:ye,collisionDetected:we}}projectPathToScreenSpace(n,l){const p=function(m,v){const S=o.L();return o.ap(S,v.pitchedLabelPlaneMatrix),m.map(E=>{const A=Fr(E.x,E.y,S,v.getElevation),z=v.transform.projectTileCoordinates(A.point.x,A.point.y,v.unwrappedTileID,v.getElevation);return z.point.x=(.5*z.point.x+.5)*v.width,z.point.y=(.5*-z.point.y+.5)*v.height,z})}(n,l);return function(m){let v=0,S=0,E=0,A=0;for(let z=0;z<m.length;z++)m[z].isOccluded?(E=z+1,A=0):(A++,A>S&&(S=A,v=E));return m.slice(v,v+S)}(p)}queryRenderedSymbols(n){if(n.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const l=[],p=new o.a1;for(const j of n){const N=new o.P(j.x+Bn,j.y+Bn);p.extend(N),l.push(N)}const{minX:m,minY:v,maxX:S,maxY:E}=p,A=this.grid.query(m,v,S,E).concat(this.ignoredGrid.query(m,v,S,E)),z={},F={};for(const j of A){const N=j.key;if(z[N.bucketInstanceId]===void 0&&(z[N.bucketInstanceId]={}),z[N.bucketInstanceId][N.featureIndex])continue;const G=[new o.P(j.x1,j.y1),new o.P(j.x2,j.y1),new o.P(j.x2,j.y2),new o.P(j.x1,j.y2)];o.ay(l,G)&&(z[N.bucketInstanceId][N.featureIndex]=!0,F[N.bucketInstanceId]===void 0&&(F[N.bucketInstanceId]=[]),F[N.bucketInstanceId].push(N.featureIndex))}return F}insertCollisionBox(n,l,p,m,v,S){(p?this.ignoredGrid:this.grid).insert({bucketInstanceId:m,featureIndex:v,collisionGroupID:S,overlapMode:l},n[0],n[1],n[2],n[3])}insertCollisionCircles(n,l,p,m,v,S){const E=p?this.ignoredGrid:this.grid,A={bucketInstanceId:m,featureIndex:v,collisionGroupID:S,overlapMode:l};for(let z=0;z<n.length;z+=4)E.insertCircle(A,n[z],n[z+1],n[z+2])}projectAndGetPerspectiveRatio(n,l,p,m,v){if(v){let S;m?(S=[n,l,m(n,l),1],o.av(S,S,v)):(S=[n,l,0,1],Ia(S,S,v));const E=S[3];return{x:(S[0]/E+1)/2*this.transform.width+Bn,y:(-S[1]/E+1)/2*this.transform.height+Bn,perspectiveRatio:.5+this.transform.cameraToCenterDistance/E*.5,isOccluded:!1,signedDistanceFromCamera:E}}{const S=this.transform.projectTileCoordinates(n,l,p,m);return{x:(S.point.x+1)/2*this.transform.width+Bn,y:(1-S.point.y)/2*this.transform.height+Bn,perspectiveRatio:.5+this.transform.cameraToCenterDistance/S.signedDistanceFromCamera*.5,isOccluded:S.isOccluded,signedDistanceFromCamera:S.signedDistanceFromCamera}}}getPerspectiveRatio(n,l,p,m){const v=this.transform.projectTileCoordinates(n,l,p,m);return .5+this.transform.cameraToCenterDistance/v.signedDistanceFromCamera*.5}isOffscreen(n,l,p,m){return p<Bn||n>=this.screenRightBoundary||m<Bn||l>this.screenBottomBoundary}isInsideGrid(n,l,p,m){return p>=0&&n<this.gridRightBoundary&&m>=0&&l<this.gridBottomBoundary}getViewportMatrix(){const n=o.af([]);return o.M(n,n,[-100,-100,0]),n}_projectCollisionBox(n,l,p,m,v,S,E,A,z,F,j){let N=1,G=0,Y=0,ae=1;const oe=n.anchorPointX+E[0],le=n.anchorPointY+E[1];if(S&&!v){const bt=this.projectAndGetPerspectiveRatio(oe+1,le,m,z,j),ut=bt.x-A.x,zt=Math.atan((bt.y-A.y)/ut)+(ut<0?Math.PI:0),hr=Math.sin(zt),Ur=Math.cos(zt);N=Ur,G=hr,Y=-hr,ae=Ur}else if(!S&&v){const bt=Wr(this.transform);N=bt.vecEast[0],G=bt.vecEast[1],Y=bt.vecSouth[0],ae=bt.vecSouth[1]}let de=A.x,ve=A.y,ge=l;v&&(de=oe,ve=le,ge=Math.pow(2,-(this.transform.zoom-p.overscaledZ)),ge*=this.transform.getPitchedTextCorrection(oe,le,m),F||(ge*=o.ag(.5+A.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))),F&&(de+=N*F.x*ge+Y*F.y*ge,ve+=G*F.x*ge+ae*F.y*ge);const we=n.x1*ge,Ce=n.x2*ge,ye=(we+Ce)/2,Ae=n.y1*ge,Ve=n.y2*ge,Be=(Ae+Ve)/2,Ne=[{offsetX:we,offsetY:Ae},{offsetX:ye,offsetY:Ae},{offsetX:Ce,offsetY:Ae},{offsetX:Ce,offsetY:Be},{offsetX:Ce,offsetY:Ve},{offsetX:ye,offsetY:Ve},{offsetX:we,offsetY:Ve},{offsetX:we,offsetY:Be}];let qe=[];for(const{offsetX:bt,offsetY:ut}of Ne)qe.push(new o.P(de+N*bt+Y*ut,ve+G*bt+ae*ut));let wt=!1;if(v){const bt=qe.map(ut=>this.projectAndGetPerspectiveRatio(ut.x,ut.y,m,z,j));wt=bt.some(ut=>!ut.isOccluded),qe=bt.map(ut=>new o.P(ut.x,ut.y))}else wt=!0;return{box:o.az(qe),allPointsOccluded:!wt}}}class Cc{constructor(n,l,p,m){this.opacity=n?Math.max(0,Math.min(1,n.opacity+(n.placed?l:-l))):m&&p?1:0,this.placed=p}isHidden(){return this.opacity===0&&!this.placed}}class fo{constructor(n,l,p,m,v){this.text=new Cc(n?n.text:null,l,p,v),this.icon=new Cc(n?n.icon:null,l,m,v)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Ec{constructor(n,l,p){this.text=n,this.icon=l,this.skipFade=p}}class rs{constructor(n,l,p,m,v){this.bucketInstanceId=n,this.featureIndex=l,this.sourceLayerIndex=p,this.bucketIndex=m,this.tileID=v}}class _n{constructor(n){this.crossSourceCollisions=n,this.maxGroupID=0,this.collisionGroups={}}get(n){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[n]){const l=++this.maxGroupID;this.collisionGroups[n]={ID:l,predicate:p=>p.collisionGroupID===l}}return this.collisionGroups[n]}}function pg(_,n,l,p,m){const{horizontalAlign:v,verticalAlign:S}=o.aG(_);return new o.P(-(v-.5)*n+p[0]*m,-(S-.5)*l+p[1]*m)}class kc{constructor(n,l,p,m,v){this.transform=n.clone(),this.terrain=l,this.collisionIndex=new Tc(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=p,this.retainedQueryData={},this.collisionGroups=new _n(m),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=v,v&&(v.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(n){const l=this.terrain;return l?(p,m)=>l.getElevation(n,p,m):null}getBucketParts(n,l,p,m){const v=p.getBucket(l),S=p.latestFeatureIndex;if(!v||!S||l.id!==v.layerIds[0])return;const E=p.collisionBoxArray,A=v.layers[0].layout,z=v.layers[0].paint,F=Math.pow(2,this.transform.zoom-p.tileID.overscaledZ),j=p.tileSize/o.$,N=p.tileID.toUnwrapped(),G=A.get("text-rotation-alignment")==="map",Y=o.aB(p,1,this.transform.zoom),ae=o.aC(this.collisionIndex.transform,p,z.get("text-translate"),z.get("text-translate-anchor")),oe=o.aC(this.collisionIndex.transform,p,z.get("icon-translate"),z.get("icon-translate-anchor")),le=nr(G,this.transform,Y);this.retainedQueryData[v.bucketInstanceId]=new rs(v.bucketInstanceId,S,v.sourceLayerIndex,v.index,p.tileID);const de={bucket:v,layout:A,translationText:ae,translationIcon:oe,unwrappedTileID:N,pitchedLabelPlaneMatrix:le,scale:F,textPixelRatio:j,holdingForFade:p.holdingForFade(),collisionBoxArray:E,partiallyEvaluatedTextSize:o.am(v.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(v.sourceID)};if(m)for(const ve of v.sortKeyRanges){const{sortKey:ge,symbolInstanceStart:we,symbolInstanceEnd:Ce}=ve;n.push({sortKey:ge,symbolInstanceStart:we,symbolInstanceEnd:Ce,parameters:de})}else n.push({symbolInstanceStart:0,symbolInstanceEnd:v.symbolInstances.length,parameters:de})}attemptAnchorPlacement(n,l,p,m,v,S,E,A,z,F,j,N,G,Y,ae,oe,le,de,ve,ge){const we=o.aD[n.textAnchor],Ce=[n.textOffset0,n.textOffset1],ye=pg(we,p,m,Ce,v),Ae=this.collisionIndex.placeCollisionBox(l,N,A,z,F,E,S,oe,j.predicate,ve,ye,ge);if((!de||this.collisionIndex.placeCollisionBox(de,N,A,z,F,E,S,le,j.predicate,ve,ye,ge).placeable)&&Ae.placeable){let Ve;if(this.prevPlacement&&this.prevPlacement.variableOffsets[G.crossTileID]&&this.prevPlacement.placements[G.crossTileID]&&this.prevPlacement.placements[G.crossTileID].text&&(Ve=this.prevPlacement.variableOffsets[G.crossTileID].anchor),G.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[G.crossTileID]={textOffset:Ce,width:p,height:m,anchor:we,textBoxScale:v,prevAnchor:Ve},this.markUsedJustification(Y,we,G,ae),Y.allowVerticalPlacement&&(this.markUsedOrientation(Y,ae,G),this.placedOrientations[G.crossTileID]=ae),{shift:ye,placedGlyphBoxes:Ae}}}placeLayerBucketPart(n,l,p){const{bucket:m,layout:v,translationText:S,translationIcon:E,unwrappedTileID:A,pitchedLabelPlaneMatrix:z,textPixelRatio:F,holdingForFade:j,collisionBoxArray:N,partiallyEvaluatedTextSize:G,collisionGroup:Y}=n.parameters,ae=v.get("text-optional"),oe=v.get("icon-optional"),le=o.aE(v,"text-overlap","text-allow-overlap"),de=le==="always",ve=o.aE(v,"icon-overlap","icon-allow-overlap"),ge=ve==="always",we=v.get("text-rotation-alignment")==="map",Ce=v.get("text-pitch-alignment")==="map",ye=v.get("icon-text-fit")!=="none",Ae=v.get("symbol-z-order")==="viewport-y",Ve=de&&(ge||!m.hasIconData()||oe),Be=ge&&(de||!m.hasTextData()||ae);!m.collisionArrays&&N&&m.deserializeCollisionBoxes(N);const Ne=this.retainedQueryData[m.bucketInstanceId].tileID,qe=this._getTerrainElevationFunc(Ne),wt=this.transform.getFastPathSimpleProjectionMatrix(Ne),bt=(ut,zt,hr)=>{var Ur,xn;if(l[ut.crossTileID])return;if(j)return void(this.placements[ut.crossTileID]=new Ec(!1,!1,!1));let Yr=!1,wn=!1,rn=!0,Jr=null,nn={box:null,placeable:!1,offscreen:null,occluded:!1},di={placeable:!1},Pr=null,ti=null,fi=null,ea=0,ta=0,ra=0;zt.textFeatureIndex?ea=zt.textFeatureIndex:ut.useRuntimeCollisionCircles&&(ea=ut.featureIndex),zt.verticalTextFeatureIndex&&(ta=zt.verticalTextFeatureIndex);const Xs=zt.textBox;if(Xs){const Hi=zn=>{let hn=o.an.horizontal;if(m.allowVerticalPlacement&&!zn&&this.prevPlacement){const Fi=this.prevPlacement.placedOrientations[ut.crossTileID];Fi&&(this.placedOrientations[ut.crossTileID]=Fi,hn=Fi,this.markUsedOrientation(m,hn,ut))}return hn},Ps=(zn,hn)=>{if(m.allowVerticalPlacement&&ut.numVerticalGlyphVertices>0&&zt.verticalTextBox){for(const Fi of m.writingModes)if(Fi===o.an.vertical?(nn=hn(),di=nn):nn=zn(),nn&&nn.placeable)break}else nn=zn()},na=ut.textAnchorOffsetStartIndex,ja=ut.textAnchorOffsetEndIndex;if(ja===na){const zn=(hn,Fi)=>{const Wn=this.collisionIndex.placeCollisionBox(hn,le,F,Ne,A,Ce,we,S,Y.predicate,qe,void 0,wt);return Wn&&Wn.placeable&&(this.markUsedOrientation(m,Fi,ut),this.placedOrientations[ut.crossTileID]=Fi),Wn};Ps(()=>zn(Xs,o.an.horizontal),()=>{const hn=zt.verticalTextBox;return m.allowVerticalPlacement&&ut.numVerticalGlyphVertices>0&&hn?zn(hn,o.an.vertical):{box:null,offscreen:null}}),Hi(nn&&nn.placeable)}else{let zn=o.aD[(xn=(Ur=this.prevPlacement)===null||Ur===void 0?void 0:Ur.variableOffsets[ut.crossTileID])===null||xn===void 0?void 0:xn.anchor];const hn=(Wn,ay,Z0)=>{const ip=Wn.x2-Wn.x1,iu=Wn.y2-Wn.y1,Ul=ut.textBoxScale,_o=ye&&ve==="never"?ay:null;let pi=null,vo=le==="never"?1:2,sp="never";zn&&vo++;for(let ia=0;ia<vo;ia++){for(let op=na;op<ja;op++){const ap=m.textAnchorOffsets.get(op);if(zn&&ap.textAnchor!==zn)continue;const su=this.attemptAnchorPlacement(ap,Wn,ip,iu,Ul,we,Ce,F,Ne,A,Y,sp,ut,m,Z0,S,E,_o,qe);if(su&&(pi=su.placedGlyphBoxes,pi&&pi.placeable))return Yr=!0,Jr=su.shift,pi}zn?zn=null:sp=le}return p&&!pi&&(pi={box:this.collisionIndex.placeCollisionBox(Xs,"always",F,Ne,A,Ce,we,S,Y.predicate,qe,void 0,wt).box,offscreen:!1,placeable:!1,occluded:!1}),pi};Ps(()=>hn(Xs,zt.iconBox,o.an.horizontal),()=>{const Wn=zt.verticalTextBox;return m.allowVerticalPlacement&&(!nn||!nn.placeable)&&ut.numVerticalGlyphVertices>0&&Wn?hn(Wn,zt.verticalIconBox,o.an.vertical):{box:null,occluded:!0,offscreen:null}}),nn&&(Yr=nn.placeable,rn=nn.offscreen);const Fi=Hi(nn&&nn.placeable);if(!Yr&&this.prevPlacement){const Wn=this.prevPlacement.variableOffsets[ut.crossTileID];Wn&&(this.variableOffsets[ut.crossTileID]=Wn,this.markUsedJustification(m,Wn.anchor,ut,Fi))}}}if(Pr=nn,Yr=Pr&&Pr.placeable,rn=Pr&&Pr.offscreen,ut.useRuntimeCollisionCircles){const Hi=m.text.placedSymbolArray.get(ut.centerJustifiedTextSymbolIndex),Ps=o.ao(m.textSizeData,G,Hi),na=v.get("text-padding");ti=this.collisionIndex.placeCollisionCircles(le,Hi,m.lineVertexArray,m.glyphOffsetArray,Ps,A,z,p,Ce,Y.predicate,ut.collisionCircleDiameter,na,S,qe),ti.circles.length&&ti.collisionDetected&&!p&&o.w("Collisions detected, but collision boxes are not shown"),Yr=de||ti.circles.length>0&&!ti.collisionDetected,rn=rn&&ti.offscreen}if(zt.iconFeatureIndex&&(ra=zt.iconFeatureIndex),zt.iconBox){const Hi=Ps=>this.collisionIndex.placeCollisionBox(Ps,ve,F,Ne,A,Ce,we,E,Y.predicate,qe,ye&&Jr?Jr:void 0,wt);di&&di.placeable&&zt.verticalIconBox?(fi=Hi(zt.verticalIconBox),wn=fi.placeable):(fi=Hi(zt.iconBox),wn=fi.placeable),rn=rn&&fi.offscreen}const ru=ae||ut.numHorizontalGlyphVertices===0&&ut.numVerticalGlyphVertices===0,nu=oe||ut.numIconVertices===0;ru||nu?nu?ru||(wn=wn&&Yr):Yr=wn&&Yr:wn=Yr=wn&&Yr;const $l=wn&&fi.placeable;if(Yr&&Pr.placeable&&this.collisionIndex.insertCollisionBox(Pr.box,le,v.get("text-ignore-placement"),m.bucketInstanceId,di&&di.placeable&&ta?ta:ea,Y.ID),$l&&this.collisionIndex.insertCollisionBox(fi.box,ve,v.get("icon-ignore-placement"),m.bucketInstanceId,ra,Y.ID),ti&&Yr&&this.collisionIndex.insertCollisionCircles(ti.circles,le,v.get("text-ignore-placement"),m.bucketInstanceId,ea,Y.ID),p&&this.storeCollisionData(m.bucketInstanceId,hr,zt,Pr,fi,ti),ut.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(m.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[ut.crossTileID]=new Ec((Yr||Ve)&&!(Pr!=null&&Pr.occluded),(wn||Be)&&!(fi!=null&&fi.occluded),rn||m.justReloaded),l[ut.crossTileID]=!0};if(Ae){if(n.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const ut=m.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let zt=ut.length-1;zt>=0;--zt){const hr=ut[zt];bt(m.symbolInstances.get(hr),m.collisionArrays[hr],hr)}}else for(let ut=n.symbolInstanceStart;ut<n.symbolInstanceEnd;ut++)bt(m.symbolInstances.get(ut),m.collisionArrays[ut],ut);m.justReloaded=!1}storeCollisionData(n,l,p,m,v,S){if(p.textBox||p.iconBox){let E,A;this.collisionBoxArrays.has(n)?E=this.collisionBoxArrays.get(n):(E=new Map,this.collisionBoxArrays.set(n,E)),E.has(l)?A=E.get(l):(A={text:null,icon:null},E.set(l,A)),p.textBox&&(A.text=m.box),p.iconBox&&(A.icon=v.box)}if(S){let E=this.collisionCircleArrays[n];E===void 0&&(E=this.collisionCircleArrays[n]=[]);for(let A=0;A<S.circles.length;A+=4)E.push(S.circles[A+0]-Bn),E.push(S.circles[A+1]-Bn),E.push(S.circles[A+2]),E.push(S.collisionDetected?1:0)}}markUsedJustification(n,l,p,m){let v;v=m===o.an.vertical?p.verticalPlacedTextSymbolIndex:{left:p.leftJustifiedTextSymbolIndex,center:p.centerJustifiedTextSymbolIndex,right:p.rightJustifiedTextSymbolIndex}[o.aF(l)];const S=[p.leftJustifiedTextSymbolIndex,p.centerJustifiedTextSymbolIndex,p.rightJustifiedTextSymbolIndex,p.verticalPlacedTextSymbolIndex];for(const E of S)E>=0&&(n.text.placedSymbolArray.get(E).crossTileID=v>=0&&E!==v?0:p.crossTileID)}markUsedOrientation(n,l,p){const m=l===o.an.horizontal||l===o.an.horizontalOnly?l:0,v=l===o.an.vertical?l:0,S=[p.leftJustifiedTextSymbolIndex,p.centerJustifiedTextSymbolIndex,p.rightJustifiedTextSymbolIndex];for(const E of S)n.text.placedSymbolArray.get(E).placedOrientation=m;p.verticalPlacedTextSymbolIndex&&(n.text.placedSymbolArray.get(p.verticalPlacedTextSymbolIndex).placedOrientation=v)}commit(n){this.commitTime=n,this.zoomAtLastRecencyCheck=this.transform.zoom;const l=this.prevPlacement;let p=!1;this.prevZoomAdjustment=l?l.zoomAdjustment(this.transform.zoom):0;const m=l?l.symbolFadeChange(n):1,v=l?l.opacities:{},S=l?l.variableOffsets:{},E=l?l.placedOrientations:{};for(const A in this.placements){const z=this.placements[A],F=v[A];F?(this.opacities[A]=new fo(F,m,z.text,z.icon),p=p||z.text!==F.text.placed||z.icon!==F.icon.placed):(this.opacities[A]=new fo(null,m,z.text,z.icon,z.skipFade),p=p||z.text||z.icon)}for(const A in v){const z=v[A];if(!this.opacities[A]){const F=new fo(z,m,!1,!1);F.isHidden()||(this.opacities[A]=F,p=p||z.text.placed||z.icon.placed)}}for(const A in S)this.variableOffsets[A]||!this.opacities[A]||this.opacities[A].isHidden()||(this.variableOffsets[A]=S[A]);for(const A in E)this.placedOrientations[A]||!this.opacities[A]||this.opacities[A].isHidden()||(this.placedOrientations[A]=E[A]);if(l&&l.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");p?this.lastPlacementChangeTime=n:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=l?l.lastPlacementChangeTime:n)}updateLayerOpacities(n,l){const p={};for(const m of l){const v=m.getBucket(n);v&&m.latestFeatureIndex&&n.id===v.layerIds[0]&&this.updateBucketOpacities(v,m.tileID,p,m.collisionBoxArray)}}updateBucketOpacities(n,l,p,m){n.hasTextData()&&(n.text.opacityVertexArray.clear(),n.text.hasVisibleVertices=!1),n.hasIconData()&&(n.icon.opacityVertexArray.clear(),n.icon.hasVisibleVertices=!1),n.hasIconCollisionBoxData()&&n.iconCollisionBox.collisionVertexArray.clear(),n.hasTextCollisionBoxData()&&n.textCollisionBox.collisionVertexArray.clear();const v=n.layers[0],S=v.layout,E=new fo(null,0,!1,!1,!0),A=S.get("text-allow-overlap"),z=S.get("icon-allow-overlap"),F=v._unevaluatedLayout.hasValue("text-variable-anchor")||v._unevaluatedLayout.hasValue("text-variable-anchor-offset"),j=S.get("text-rotation-alignment")==="map",N=S.get("text-pitch-alignment")==="map",G=S.get("icon-text-fit")!=="none",Y=new fo(null,0,A&&(z||!n.hasIconData()||S.get("icon-optional")),z&&(A||!n.hasTextData()||S.get("text-optional")),!0);!n.collisionArrays&&m&&(n.hasIconCollisionBoxData()||n.hasTextCollisionBoxData())&&n.deserializeCollisionBoxes(m);const ae=(le,de,ve)=>{for(let ge=0;ge<de/4;ge++)le.opacityVertexArray.emplaceBack(ve);le.hasVisibleVertices=le.hasVisibleVertices||ve!==Ic},oe=this.collisionBoxArrays.get(n.bucketInstanceId);for(let le=0;le<n.symbolInstances.length;le++){const de=n.symbolInstances.get(le),{numHorizontalGlyphVertices:ve,numVerticalGlyphVertices:ge,crossTileID:we}=de;let Ce=this.opacities[we];p[we]?Ce=E:Ce||(Ce=Y,this.opacities[we]=Ce),p[we]=!0;const ye=de.numIconVertices>0,Ae=this.placedOrientations[de.crossTileID],Ve=Ae===o.an.vertical,Be=Ae===o.an.horizontal||Ae===o.an.horizontalOnly;if(ve>0||ge>0){const qe=vg(Ce.text);ae(n.text,ve,Ve?Ic:qe),ae(n.text,ge,Be?Ic:qe);const wt=Ce.text.isHidden();[de.rightJustifiedTextSymbolIndex,de.centerJustifiedTextSymbolIndex,de.leftJustifiedTextSymbolIndex].forEach(zt=>{zt>=0&&(n.text.placedSymbolArray.get(zt).hidden=wt||Ve?1:0)}),de.verticalPlacedTextSymbolIndex>=0&&(n.text.placedSymbolArray.get(de.verticalPlacedTextSymbolIndex).hidden=wt||Be?1:0);const bt=this.variableOffsets[de.crossTileID];bt&&this.markUsedJustification(n,bt.anchor,de,Ae);const ut=this.placedOrientations[de.crossTileID];ut&&(this.markUsedJustification(n,"left",de,ut),this.markUsedOrientation(n,ut,de))}if(ye){const qe=vg(Ce.icon),wt=!(G&&de.verticalPlacedIconSymbolIndex&&Ve);de.placedIconSymbolIndex>=0&&(ae(n.icon,de.numIconVertices,wt?qe:Ic),n.icon.placedSymbolArray.get(de.placedIconSymbolIndex).hidden=Ce.icon.isHidden()),de.verticalPlacedIconSymbolIndex>=0&&(ae(n.icon,de.numVerticalIconVertices,wt?Ic:qe),n.icon.placedSymbolArray.get(de.verticalPlacedIconSymbolIndex).hidden=Ce.icon.isHidden())}const Ne=oe&&oe.has(le)?oe.get(le):{text:null,icon:null};if(n.hasIconCollisionBoxData()||n.hasTextCollisionBoxData()){const qe=n.collisionArrays[le];if(qe){let wt=new o.P(0,0);if(qe.textBox||qe.verticalTextBox){let bt=!0;if(F){const ut=this.variableOffsets[we];ut?(wt=pg(ut.anchor,ut.width,ut.height,ut.textOffset,ut.textBoxScale),j&&wt._rotate(N?-this.transform.bearingInRadians:this.transform.bearingInRadians)):bt=!1}if(qe.textBox||qe.verticalTextBox){let ut;qe.textBox&&(ut=Ve),qe.verticalTextBox&&(ut=Be),nh(n.textCollisionBox.collisionVertexArray,Ce.text.placed,!bt||ut,Ne.text,wt.x,wt.y)}}if(qe.iconBox||qe.verticalIconBox){const bt=!!(!Be&&qe.verticalIconBox);let ut;qe.iconBox&&(ut=bt),qe.verticalIconBox&&(ut=!bt),nh(n.iconCollisionBox.collisionVertexArray,Ce.icon.placed,ut,Ne.icon,G?wt.x:0,G?wt.y:0)}}}}if(n.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[n.bucketInstanceId]&&(this.retainedQueryData[n.bucketInstanceId].featureSortOrder=n.featureSortOrder),n.hasTextData()&&n.text.opacityVertexBuffer&&n.text.opacityVertexBuffer.updateData(n.text.opacityVertexArray),n.hasIconData()&&n.icon.opacityVertexBuffer&&n.icon.opacityVertexBuffer.updateData(n.icon.opacityVertexArray),n.hasIconCollisionBoxData()&&n.iconCollisionBox.collisionVertexBuffer&&n.iconCollisionBox.collisionVertexBuffer.updateData(n.iconCollisionBox.collisionVertexArray),n.hasTextCollisionBoxData()&&n.textCollisionBox.collisionVertexBuffer&&n.textCollisionBox.collisionVertexBuffer.updateData(n.textCollisionBox.collisionVertexArray),n.text.opacityVertexArray.length!==n.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${n.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${n.text.layoutVertexArray.length}) / 4`);if(n.icon.opacityVertexArray.length!==n.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${n.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${n.icon.layoutVertexArray.length}) / 4`);n.bucketInstanceId in this.collisionCircleArrays&&(n.collisionCircleArray=this.collisionCircleArrays[n.bucketInstanceId],delete this.collisionCircleArrays[n.bucketInstanceId])}symbolFadeChange(n){return this.fadeDuration===0?1:(n-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(n){return Math.max(0,(this.transform.zoom-n)/1.5)}hasTransitions(n){return this.stale||n-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(n,l){const p=this.zoomAtLastRecencyCheck===l?1-this.zoomAdjustment(l):1;return this.zoomAtLastRecencyCheck=l,this.commitTime+this.fadeDuration*p>n}setStale(){this.stale=!0}}function nh(_,n,l,p,m,v){p&&p.length!==0||(p=[0,0,0,0]);const S=p[0]-Bn,E=p[1]-Bn,A=p[2]-Bn,z=p[3]-Bn;_.emplaceBack(n?1:0,l?1:0,m||0,v||0,S,E),_.emplaceBack(n?1:0,l?1:0,m||0,v||0,A,E),_.emplaceBack(n?1:0,l?1:0,m||0,v||0,A,z),_.emplaceBack(n?1:0,l?1:0,m||0,v||0,S,z)}const Pa=Math.pow(2,25),Zo=Math.pow(2,24),mg=Math.pow(2,17),gg=Math.pow(2,16),yg=Math.pow(2,9),ml=Math.pow(2,8),_g=Math.pow(2,1);function vg(_){if(_.opacity===0&&!_.placed)return 0;if(_.opacity===1&&_.placed)return 4294967295;const n=_.placed?1:0,l=Math.floor(127*_.opacity);return l*Pa+n*Zo+l*mg+n*gg+l*yg+n*ml+l*_g+n}const Ic=0;class x0{constructor(n){this._sortAcrossTiles=n.layout.get("symbol-z-order")!=="viewport-y"&&!n.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(n,l,p,m,v){const S=this._bucketParts;for(;this._currentTileIndex<n.length;)if(l.getBucketParts(S,m,n[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,v())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,S.sort((E,A)=>E.sortKey-A.sortKey));this._currentPartIndex<S.length;)if(l.placeLayerBucketPart(S[this._currentPartIndex],this._seenCrossTileIDs,p),this._currentPartIndex++,v())return!0;return!1}}class bg{constructor(n,l,p,m,v,S,E,A){this.placement=new kc(n,l,S,E,A),this._currentPlacementIndex=p.length-1,this._forceFullPlacement=m,this._showCollisionBoxes=v,this._done=!1}isDone(){return this._done}continuePlacement(n,l,p){const m=M.now(),v=()=>!this._forceFullPlacement&&M.now()-m>2;for(;this._currentPlacementIndex>=0;){const S=l[n[this._currentPlacementIndex]],E=this.placement.collisionIndex.transform.zoom;if(S.type==="symbol"&&(!S.minzoom||S.minzoom<=E)&&(!S.maxzoom||S.maxzoom>E)){if(this._inProgressLayer||(this._inProgressLayer=new x0(S)),this._inProgressLayer.continuePlacement(p[S.source],this.placement,this._showCollisionBoxes,S,v))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(n){return this.placement.commit(n),this.placement}}const gl=512/o.$/2;class ff{constructor(n,l,p){this.tileID=n,this.bucketInstanceId=p,this._symbolsByKey={};const m=new Map;for(let v=0;v<l.length;v++){const S=l.get(v),E=S.key,A=m.get(E);A?A.push(S):m.set(E,[S])}for(const[v,S]of m){const E={positions:S.map(A=>({x:Math.floor(A.anchorX*gl),y:Math.floor(A.anchorY*gl)})),crossTileIDs:S.map(A=>A.crossTileID)};if(E.positions.length>128){const A=new o.aH(E.positions.length,16,Uint16Array);for(const{x:z,y:F}of E.positions)A.add(z,F);A.finish(),delete E.positions,E.index=A}this._symbolsByKey[v]=E}}getScaledCoordinates(n,l){const{x:p,y:m,z:v}=this.tileID.canonical,{x:S,y:E,z:A}=l.canonical,z=gl/Math.pow(2,A-v),F=(E*o.$+n.anchorY)*z,j=m*o.$*gl;return{x:Math.floor((S*o.$+n.anchorX)*z-p*o.$*gl),y:Math.floor(F-j)}}findMatches(n,l,p){const m=this.tileID.canonical.z<l.canonical.z?1:Math.pow(2,this.tileID.canonical.z-l.canonical.z);for(let v=0;v<n.length;v++){const S=n.get(v);if(S.crossTileID)continue;const E=this._symbolsByKey[S.key];if(!E)continue;const A=this.getScaledCoordinates(S,l);if(E.index){const z=E.index.range(A.x-m,A.y-m,A.x+m,A.y+m).sort();for(const F of z){const j=E.crossTileIDs[F];if(!p[j]){p[j]=!0,S.crossTileID=j;break}}}else if(E.positions)for(let z=0;z<E.positions.length;z++){const F=E.positions[z],j=E.crossTileIDs[z];if(Math.abs(F.x-A.x)<=m&&Math.abs(F.y-A.y)<=m&&!p[j]){p[j]=!0,S.crossTileID=j;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:n})=>n)}}class pf{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class xg{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(n){const l=Math.round((n-this.lng)/360);if(l!==0)for(const p in this.indexes){const m=this.indexes[p],v={};for(const S in m){const E=m[S];E.tileID=E.tileID.unwrapTo(E.tileID.wrap+l),v[E.tileID.key]=E}this.indexes[p]=v}this.lng=n}addBucket(n,l,p){if(this.indexes[n.overscaledZ]&&this.indexes[n.overscaledZ][n.key]){if(this.indexes[n.overscaledZ][n.key].bucketInstanceId===l.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(n.overscaledZ,this.indexes[n.overscaledZ][n.key])}for(let v=0;v<l.symbolInstances.length;v++)l.symbolInstances.get(v).crossTileID=0;this.usedCrossTileIDs[n.overscaledZ]||(this.usedCrossTileIDs[n.overscaledZ]={});const m=this.usedCrossTileIDs[n.overscaledZ];for(const v in this.indexes){const S=this.indexes[v];if(Number(v)>n.overscaledZ)for(const E in S){const A=S[E];A.tileID.isChildOf(n)&&A.findMatches(l.symbolInstances,n,m)}else{const E=S[n.scaledTo(Number(v)).key];E&&E.findMatches(l.symbolInstances,n,m)}}for(let v=0;v<l.symbolInstances.length;v++){const S=l.symbolInstances.get(v);S.crossTileID||(S.crossTileID=p.generate(),m[S.crossTileID]=!0)}return this.indexes[n.overscaledZ]===void 0&&(this.indexes[n.overscaledZ]={}),this.indexes[n.overscaledZ][n.key]=new ff(n,l.symbolInstances,l.bucketInstanceId),!0}removeBucketCrossTileIDs(n,l){for(const p of l.getCrossTileIDsLists())for(const m of p)delete this.usedCrossTileIDs[n][m]}removeStaleBuckets(n){let l=!1;for(const p in this.indexes){const m=this.indexes[p];for(const v in m)n[m[v].bucketInstanceId]||(this.removeBucketCrossTileIDs(p,m[v]),delete m[v],l=!0)}return l}}class ih{constructor(){this.layerIndexes={},this.crossTileIDs=new pf,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(n,l,p){let m=this.layerIndexes[n.id];m===void 0&&(m=this.layerIndexes[n.id]=new xg);let v=!1;const S={};m.handleWrapJump(p);for(const E of l){const A=E.getBucket(n);A&&n.id===A.layerIds[0]&&(A.bucketInstanceId||(A.bucketInstanceId=++this.maxBucketInstanceId),m.addBucket(E.tileID,A,this.crossTileIDs)&&(v=!0),S[A.bucketInstanceId]=!0)}return m.removeStaleBuckets(S)&&(v=!0),v}pruneUnusedLayers(n){const l={};n.forEach(p=>{l[p]=!0});for(const p in this.layerIndexes)l[p]||delete this.layerIndexes[p]}}var sh="void main() {fragColor=vec4(1.0);}";const Gs={prelude:_r(`#ifdef GL_ES
76precision mediump float;
77#else
78#if !defined(lowp)
79#define lowp
80#endif
81#if !defined(mediump)
82#define mediump
83#endif
84#if !defined(highp)
85#define highp
86#endif
87#endif
88out highp vec4 fragColor;`,`#ifdef GL_ES
89precision highp float;
90#else
91#if !defined(lowp)
92#define lowp
93#endif
94#if !defined(mediump)
95#define mediump
96#endif
97#if !defined(highp)
98#define highp
99#endif
100#endif
101vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
102);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);
102return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+      c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+    c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+    c
103);}
104#ifdef TERRAIN3D
105uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;
106#endif
107const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {
108#ifdef TERRAIN3D
109highp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));
110#else
111return 1.0;
112#endif
113}float calculate_visibility(vec4 pos) {
114#ifdef TERRAIN3D
115vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;
116#else
117return 1.0;
118#endif
119}float ele(vec2 pos) {
120#ifdef TERRAIN3D
121vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
122#else
123return 0.0;
124#endif
125}float get_elevation(vec2 pos) {
126#ifdef TERRAIN3D
127#ifdef GLOBE
128if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}
129#endif
130vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;
131#else
132return 0.0;
133#endif
134}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:_r("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:_r("",`#define GLOBE_RADIUS 6371008.8
135uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos
136);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); 
137if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len
138);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:_r(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;
139#ifdef OVERDRAW_INSPECTOR
140fragColor=vec4(1.0);
141#endif
142}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:_r(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;
142uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity;
143#ifdef OVERDRAW_INSPECTOR
144fragColor=vec4(1.0);
145#endif
146}`,"uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:_r(`in vec3 v_data;in float v_visibility;
147#pragma mapbox: define highp vec4 color
148#pragma mapbox: define mediump float radius
149#pragma mapbox: define lowp float blur
150#pragma mapbox: define lowp float opacity
151#pragma mapbox: define highp vec4 stroke_color
152#pragma mapbox: define mediump float stroke_width
153#pragma mapbox: define lowp float stroke_opacity
154void main() {
155#pragma mapbox: initialize highp vec4 color
156#pragma mapbox: initialize mediump float radius
157#pragma mapbox: initialize lowp float blur
158#pragma mapbox: initialize lowp float opacity
159#pragma mapbox: initialize highp vec4 stroke_color
160#pragma mapbox: initialize mediump float stroke_width
161#pragma mapbox: initialize lowp float stroke_opacity
162vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}
163#ifdef OVERDRAW_INSPECTOR
164fragColor=vec4(1.0);
165#endif
166}`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility;
167#pragma mapbox: define highp vec4 color
168#pragma mapbox: define mediump float radius
169#pragma mapbox: define lowp float blur
170#pragma mapbox: define lowp float opacity
171#pragma mapbox: define highp vec4 stroke_color
172#pragma mapbox: define mediump float stroke_width
173#pragma mapbox: define lowp float stroke_opacity
174void main(void) {
175#pragma mapbox: initialize highp vec4 color
176#pragma mapbox: initialize mediump float radius
177#pragma mapbox: initialize lowp float blur
178#pragma mapbox: initialize lowp float opacity
179#pragma mapbox: initialize highp vec4 stroke_color
180#pragma mapbox: initialize mediump float stroke_width
181#pragma mapbox: initialize lowp float stroke_opacity
182vec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) {
183#ifdef GLOBE
184vec3 center_vector=projectToSphere(circle_center);
185#endif
186float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else {
187#ifdef GLOBE
188vec4 projected_center=interpolateProjection(circle_center,center_vector,ele);
189#else
190vec4 projected_center=projectTileWithElevation(circle_center,ele);
191#endif
192corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);}
193#ifdef GLOBE
194vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);
195#else
196gl_Position=projectTileWithElevation(corner_position,ele);
197#endif
198} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:_r(sh,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:_r(`uniform highp float u_intensity;in vec2 v_extrude;
199#pragma mapbox: define highp float weight
200#define GAUSS_COEF 0.3989422804014327
201void main() {
202#pragma mapbox: initialize highp float weight
203float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0);
204#ifdef OVERDRAW_INSPECTOR
205fragColor=vec4(1.0);
206#endif
207}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude;
208#pragma mapbox: define highp float weight
209#pragma mapbox: define mediump float radius
210const highp float ZERO=1.0/255.0/16.0;
211#define GAUSS_COEF 0.3989422804014327
212void main(void) {
213#pragma mapbox: initialize highp float weight
214#pragma mapbox: initialize mediump float radius
215vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0);
216#ifdef GLOBE
217vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0);
218#else
219gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));
220#endif
221}`),heatmapTexture:_r(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity;
222#ifdef OVERDRAW_INSPECTOR
223fragColor=vec4(0.0);
224#endif
225}`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:_r("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:_r("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:_r(`#ifdef GL_ES
226precision highp float;
227#endif
228uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(textureSize(u_elevation_stops,0)[0]);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int num_elevation_stops=textureSize(u_elevation_stops,0)[0];int r=(num_elevation_stops-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else
229{l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(textureSize(u_color_stops,0)[0]);fragColor=u_opacity*texture(u_color_stops,vec2(x,0));
230#ifdef OVERDRAW_INSPECTOR
231fragColor=vec4(1.0);
232#endif
233}`,"uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:_r("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:_r(sh,`in vec2 a_pos;void main() {
234#ifdef GLOBE
235gl_Position=projectTileFor3D(a_pos,0.0);
236#else
237gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);
238#endif
239}`),fill:_r(`#pragma mapbox: define highp vec4 color
240#pragma mapbox: define lowp float opacity
241void main() {
242#pragma mapbox: initialize highp vec4 color
243#pragma mapbox: initialize lowp float opacity
244fragColor=color*opacity;
245#ifdef OVERDRAW_INSPECTOR
246fragColor=vec4(1.0);
247#endif
248}`,`uniform vec2 u_fill_translate;in vec2 a_pos;
249#pragma mapbox: define highp vec4 color
250#pragma mapbox: define lowp float opacity
251void main() {
252#pragma mapbox: initialize highp vec4 color
253#pragma mapbox: initialize lowp float opacity
254gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:_r(`in vec2 v_pos;
255#ifdef GLOBE
256in float v_depth;
257#endif
258#pragma mapbox: define highp vec4 outline_color
259#pragma mapbox: define lowp float opacity
260void main() {
261#pragma mapbox: initialize highp vec4 outline_color
262#pragma mapbox: initialize lowp float opacity
263float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);
264#ifdef GLOBE
265if (v_depth > 1.0) {discard;}
266#endif
267#ifdef OVERDRAW_INSPECTOR
268fragColor=vec4(1.0);
269#endif
270}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;
271#ifdef GLOBE
272out float v_depth;
273#endif
274#pragma mapbox: define highp vec4 outline_color
275#pragma mapbox: define lowp float opacity
276void main() {
277#pragma mapbox: initialize highp vec4 outline_color
278#pragma mapbox: initialize lowp float opacity
279gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
280#ifdef GLOBE
281v_depth=gl_Position.z/gl_Position.w;
282#endif
283}`),fillOutlinePattern:_r(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;
284#ifdef GLOBE
285in float v_depth;
286#endif
287#pragma mapbox: define lowp float opacity
288#pragma mapbox: define lowp vec4 pattern_from
289#pragma mapbox: define lowp vec4 pattern_to
290void main() {
291#pragma mapbox: initialize lowp float opacity
292#pragma mapbox: initialize mediump vec4 pattern_from
293#pragma mapbox: initialize mediump vec4 pattern_to
294vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity;
295#ifdef GLOBE
296if (v_depth > 1.0) {discard;}
297#endif
298#ifdef OVERDRAW_INSPECTOR
299fragColor=vec4(1.0);
300#endif
301}`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;
302#ifdef GLOBE
303out float v_depth;
304#endif
305#pragma mapbox: define lowp float opacity
306#pragma mapbox: define lowp vec4 pattern_from
307#pragma mapbox: define lowp vec4 pattern_to
308#pragma mapbox: define lowp float pixel_ratio_from
309#pragma mapbox: define lowp float pixel_ratio_to
310void main() {
311#pragma mapbox: initialize lowp float opacity
312#pragma mapbox: initialize mediump vec4 pattern_from
313#pragma mapbox: initialize mediump vec4 pattern_to
314#pragma mapbox: initialize lowp float pixel_ratio_from
315#pragma mapbox: initialize lowp float pixel_ratio_to
316vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
317#ifdef GLOBE
318v_depth=gl_Position.z/gl_Position.w;
319#endif
320}`),fillPattern:_r(`#ifdef GL_ES
321precision highp float;
322#endif
323uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;
324#pragma mapbox: define lowp float opacity
325#pragma mapbox: define lowp vec4 pattern_from
326#pragma mapbox: define lowp vec4 pattern_to
327void main() {
328#pragma mapbox: initialize lowp float opacity
329#pragma mapbox: initialize mediump vec4 pattern_from
330#pragma mapbox: initialize mediump vec4 pattern_to
331vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity;
332#ifdef OVERDRAW_INSPECTOR
333fragColor=vec4(1.0);
334#endif
335}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;
336#pragma mapbox: define lowp float opacity
337#pragma mapbox: define lowp vec4 pattern_from
338#pragma mapbox: define lowp vec4 pattern_to
339#pragma mapbox: define lowp float pixel_ratio_from
340#pragma mapbox: define lowp float pixel_ratio_to
341void main() {
342#pragma mapbox: initialize lowp float opacity
343#pragma mapbox: initialize mediump vec4 pattern_from
344#pragma mapbox: initialize mediump vec4 pattern_to
345#pragma mapbox: initialize lowp float pixel_ratio_from
346#pragma mapbox: initialize lowp float pixel_ratio_to
347vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;fl
347oat fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:_r(`in vec4 v_color;void main() {fragColor=v_color;
348#ifdef OVERDRAW_INSPECTOR
349fragColor=vec4(1.0);
350#endif
351}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed;
352#ifdef TERRAIN3D
353in vec2 a_centroid;
354#endif
355out vec4 v_color;
356#pragma mapbox: define highp float base
357#pragma mapbox: define highp float height
358#pragma mapbox: define highp vec4 color
359void main() {
360#pragma mapbox: initialize highp float base
361#pragma mapbox: initialize highp float height
362#pragma mapbox: initialize highp vec4 color
363vec3 normal=a_normal_ed.xyz;
364#ifdef TERRAIN3D
365float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
366#else
367float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
368#endif
369base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
370#ifdef GLOBE
371vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
372#else
373gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
374#endif
375float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0);
376#ifdef GLOBE
377mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);
378#endif
379directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:_r(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting;
380#pragma mapbox: define lowp float base
381#pragma mapbox: define lowp float height
382#pragma mapbox: define lowp vec4 pattern_from
383#pragma mapbox: define lowp vec4 pattern_to
384#pragma mapbox: define lowp float pixel_ratio_from
385#pragma mapbox: define lowp float pixel_ratio_to
386void main() {
387#pragma mapbox: initialize lowp float base
388#pragma mapbox: initialize lowp float height
389#pragma mapbox: initialize mediump vec4 pattern_from
390#pragma mapbox: initialize mediump vec4 pattern_to
391#pragma mapbox: initialize lowp float pixel_ratio_from
392#pragma mapbox: initialize lowp float pixel_ratio_to
393vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting;
394#ifdef OVERDRAW_INSPECTOR
395fragColor=vec4(1.0);
396#endif
397}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed;
398#ifdef TERRAIN3D
399in vec2 a_centroid;
400#endif
401#ifdef GLOBE
402out vec3 v_sphere_pos;
403#endif
404out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;
405#pragma mapbox: define lowp float base
406#pragma mapbox: define lowp float height
407#pragma mapbox: define lowp vec4 pattern_from
408#pragma mapbox: define lowp vec4 pattern_to
409#pragma mapbox: define lowp float pixel_ratio_from
410#pragma mapbox: define lowp float pixel_ratio_to
411void main() {
412#pragma mapbox: initialize lowp float base
413#pragma mapbox: initialize lowp float height
414#pragma mapbox: initialize mediump vec4 pattern_from
415#pragma mapbox: initialize mediump vec4 pattern_to
416#pragma mapbox: initialize lowp float pixel_ratio_from
417#pragma mapbox: initialize lowp float pixel_ratio_to
418vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;
419#ifdef TERRAIN3D
420float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
421#else
422float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
423#endif
424base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
425#ifdef GLOBE
426vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
427#else
428gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
429#endif
430vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
431? a_pos
432: vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:_r(`#ifdef GL_ES
433precision highp float;
434#endif
435uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/p
435ow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0);
436#ifdef OVERDRAW_INSPECTOR
437fragColor=vec4(1.0);
438#endif
439}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:_r(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES];
440#define PI 3.141592653589793
441#define STANDARD 0
442#define COMBINED 1
443#define IGOR 2
444#define MULTIDIRECTIONAL 3
445#define BASIC 4
446float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else
447{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else
448{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;switch(u_method){case BASIC:
449basic_hillshade(deriv);break;case COMBINED:
450combined_hillshade(deriv);break;case IGOR:
451igor_hillshade(deriv);break;case MULTIDIRECTIONAL:
452multidirectional_hillshade(deriv);break;case STANDARD:
453default:
454standard_hillshade(deriv);break;}
455#ifdef OVERDRAW_INSPECTOR
456fragColor=vec4(1.0);
457#endif
458}`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:_r(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;
459#ifdef GLOBE
460in float v_depth;
461#endif
462#pragma mapbox: define highp vec4 color
463#pragma mapbox: define lowp float blur
464#pragma mapbox: define lowp float opacity
465void main() {
466#pragma mapbox: initialize highp vec4 color
467#pragma mapbox: initialize lowp float blur
468#pragma mapbox: initialize lowp float opacity
469float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity);
470#ifdef GLOBE
471if (v_depth > 1.0) {discard;}
472#endif
473#ifdef OVERDRAW_INSPECTOR
474fragColor=vec4(1.0);
475#endif
476}`,`
477#define scale 0.015873016
478in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar;
479#ifdef GLOBE
480out float v_depth;
481#endif
482#pragma mapbox: define highp vec4 color
483#pragma mapbox: define lowp float blur
484#pragma mapbox: define lowp float opacity
485#pragma mapbox: define mediump float gapwidth
486#pragma mapbox: define lowp float offset
487#pragma mapbox: define mediump float width
488void main() {
489#pragma mapbox: initialize highp vec4 color
490#pragma mapbox: initialize lowp float blur
491#pragma mapbox: initialize lowp float opacity
492#pragma mapbox: initialize mediump float gapwidth
493#pragma mapbox: initialize lowp float offset
494#pragma mapbox: initialize mediump float width
495float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);
495float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
496#ifdef GLOBE
497v_depth=gl_Position.z/gl_Position.w;
498#endif
499#ifdef TERRAIN3D
500v_gamma_scale=1.0;
501#else
502float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
503#endif
504v_width2=vec2(outset,inset);}`),lineGradient:_r(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv;
505#ifdef GLOBE
506in float v_depth;
507#endif
508#pragma mapbox: define lowp float blur
509#pragma mapbox: define lowp float opacity
510void main() {
511#pragma mapbox: initialize lowp float blur
512#pragma mapbox: initialize lowp float opacity
513float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity);
514#ifdef GLOBE
515if (v_depth > 1.0) {discard;}
516#endif
517#ifdef OVERDRAW_INSPECTOR
518fragColor=vec4(1.0);
519#endif
520}`,`
521#define scale 0.015873016
522in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;
523#ifdef GLOBE
524out float v_depth;
525#endif
526#pragma mapbox: define lowp float blur
527#pragma mapbox: define lowp float opacity
528#pragma mapbox: define mediump float gapwidth
529#pragma mapbox: define lowp float offset
530#pragma mapbox: define mediump float width
531void main() {
532#pragma mapbox: initialize lowp float blur
533#pragma mapbox: initialize lowp float opacity
534#pragma mapbox: initialize mediump float gapwidth
535#pragma mapbox: initialize lowp float offset
536#pragma mapbox: initialize mediump float width
537float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
538#ifdef GLOBE
539v_depth=gl_Position.z/gl_Position.w;
540#endif
541#ifdef TERRAIN3D
542v_gamma_scale=1.0;
543#else
544float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
545#endif
546v_width2=vec2(outset,inset);}`),linePattern:_r(`#ifdef GL_ES
547precision highp float;
548#endif
549uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width;
550#ifdef GLOBE
551in float v_depth;
552#endif
553#pragma mapbox: define lowp vec4 pattern_from
554#pragma mapbox: define lowp vec4 pattern_to
555#pragma mapbox: define lowp float pixel_ratio_from
556#pragma mapbox: define lowp float pixel_ratio_to
557#pragma mapbox: define lowp float blur
558#pragma mapbox: define lowp float opacity
559void main() {
560#pragma mapbox: initialize mediump vec4 pattern_from
561#pragma mapbox: initialize mediump vec4 pattern_to
562#pragma mapbox: initialize lowp float pixel_ratio_from
563#pragma mapbox: initialize lowp float pixel_ratio_to
564#pragma mapbox: initialize lowp float blur
565#pragma mapbox: initialize lowp float opacity
566vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;
567#ifdef GLOBE
568if (v_depth > 1.0) {discard;}
569#endif
570#ifdef OVERDRAW_INSPECTOR
571fragColor=vec4(1.0);
572#endif
573}`,`
574#define scale 0.015873016
575#define LINE_DISTANCE_SCALE 2.0
576in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width;
577#ifdef GLOBE
578out float v_depth;
579#endif
580#pragma mapbox: define lowp float blur
581#pragma mapbox: define lowp float opacity
582#pragma mapbox: define lowp float offset
583#pragma mapbox: define mediump float gapwidth
584#pragma mapbox: define mediump float width
585#pragma mapbox: define lowp float floorwidth
586#pragma mapbox: define lowp vec4 pattern_from
587#pragma mapbox: define lowp vec4 pattern_to
588#pragma mapbox: define lowp float pixel_ratio_from
589#pragma mapbox: define lowp float pixel_ratio_to
590void main() {
591#pragma mapbox: initialize lowp float blur
592#pragma mapbox: initialize lowp float opacity
593#pragma mapbox: initialize lowp float offset
594#pragma mapbox: initialize mediump float gapwidth
595#pragma mapbox: initialize mediump float width
596#pragma mapbox: initialize lowp float floorwidth
597#pragma mapbox: initialize mediump vec4 pattern_from
598#pragma mapbox: initialize mediump vec4 pattern_to
599#pragma mapbox: initialize lowp float pixel_ratio_from
600#pragma mapbox: initialize lowp float pixel_ratio_to
601float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);
601float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
602#ifdef GLOBE
603v_depth=gl_Position.z/gl_Position.w;
604#endif
605#ifdef TERRAIN3D
606v_gamma_scale=1.0;
607#else
608float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
609#endif
610v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:_r(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;
611#ifdef GLOBE
612in float v_depth;
613#endif
614#pragma mapbox: define highp vec4 color
615#pragma mapbox: define lowp float blur
616#pragma mapbox: define lowp float opacity
617#pragma mapbox: define mediump float width
618#pragma mapbox: define lowp float floorwidth
619void main() {
620#pragma mapbox: initialize highp vec4 color
621#pragma mapbox: initialize lowp float blur
622#pragma mapbox: initialize lowp float opacity
623#pragma mapbox: initialize mediump float width
624#pragma mapbox: initialize lowp float floorwidth
625float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);
626#ifdef GLOBE
627if (v_depth > 1.0) {discard;}
628#endif
629#ifdef OVERDRAW_INSPECTOR
630fragColor=vec4(1.0);
631#endif
632}`,`
633#define scale 0.015873016
634#define LINE_DISTANCE_SCALE 2.0
635in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;
636#ifdef GLOBE
637out float v_depth;
638#endif
639#pragma mapbox: define highp vec4 color
640#pragma mapbox: define lowp float blur
641#pragma mapbox: define lowp float opacity
642#pragma mapbox: define mediump float gapwidth
643#pragma mapbox: define lowp float offset
644#pragma mapbox: define mediump float width
645#pragma mapbox: define lowp float floorwidth
646void main() {
647#pragma mapbox: initialize highp vec4 color
648#pragma mapbox: initialize lowp float blur
649#pragma mapbox: initialize lowp float opacity
650#pragma mapbox: initialize mediump float gapwidth
651#pragma mapbox: initialize lowp float offset
652#pragma mapbox: initialize mediump float width
653#pragma mapbox: initialize lowp float floorwidth
654float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
655#ifdef GLOBE
656v_depth=gl_Position.z/gl_Position.w;
657#endif
658#ifdef TERRAIN3D
659v_gamma_scale=1.0;
660#else
661float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
662#endif
663v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:_r(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0);vec4 color1=texture(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
664#ifdef OVERDRAW_INSPECTOR
665fragColor=vec4(1.0);
666#endif
667}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5;
668#ifdef GLOBE
669if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}
670#endif
671v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:_r(`uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity;
672#pragma mapbox: define lowp float opacity
673void main() {
674#pragma mapbox: initialize lowp float opacity
675lowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha;
676#ifdef OVERDRAW_INSPECTOR
677fragColor=vec4(1.0);
678#endif
679}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_fade_opacity;
680#pragma mapbox: define lowp float opacity
681void main() {
682#pragma mapbox: initialize lowp float opacity
683vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
684camera_to_anchor_distance/u_camera_to_center_distance :
685u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
686#ifdef GLOBE
687if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
688#endif
689vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:_r(`#define SDF_PX 8.0
690uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1;
691#pragma mapbox: define highp vec4 fill_color
692#pragma mapbox: define highp vec4 halo_color
693#pragma mapbox: define lowp float opacity
694#pragma mapbox: define lowp float halo_width
695#pragma mapbox: define lowp float halo_blur
696void main() {
697#pragma mapbox: initialize highp vec4 fill_color
698#pragma mapbox: initialize highp vec4 halo_color
699#pragma mapbox: initialize lowp float opacity
700#pragma mapbox: initialize lowp float halo_width
701#pragma mapbox: initialize lowp float halo_blur
702float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity);
703#ifdef OVERDRAW_INSPECTOR
704fragColor=vec4(1.0);
705#endif
706}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1;
707#pragma mapbox: define highp vec4 fill_color
708#pragma mapbox: define highp vec4 halo_color
709#pragma mapbox: define lowp float opacity
710#pragma mapbox: define lowp float halo_width
711#pragma mapbox: define lowp float halo_blur
712void main() {
713#pragma mapbox: initialize highp vec4 fill_color
714#pragma mapbox: initialize highp vec4 halo_color
715#pragma mapbox: initialize lowp float opacity
716#pragma mapbox: initialize lowp float halo_width
717#pragma mapbox: initialize lowp float halo_blur
718vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
719camera_to_anchor_distance/u_camera_to_center_distance :
720u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
721#ifdef GLOBE
722if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
723#endif
724vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:_r(`#define SDF_PX 8.0
725#define SDF 1.0
726#define ICON 0.0
727uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1;
728#pragma mapbox: define highp vec4 fill_color
729#pragma mapbox: define highp vec4 halo_color
730#pragma mapbox: define lowp float opacity
731#pragma mapbox: define lowp float halo_width
732#pragma mapbox: define lowp float halo_blur
733void main() {
734#pragma mapbox: initialize highp vec4 fill_color
735#pragma mapbox: initialize highp vec4 halo_color
736#pragma mapbox: initialize lowp float opacity
737#pragma mapbox: initialize lowp float halo_width
738#pragma mapbox: initialize lowp float halo_blur
739float fad
739e_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha;
740#ifdef OVERDRAW_INSPECTOR
741fragColor=vec4(1.0);
742#endif
743return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity);
744#ifdef OVERDRAW_INSPECTOR
745fragColor=vec4(1.0);
746#endif
747}`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1;
748#pragma mapbox: define highp vec4 fill_color
749#pragma mapbox: define highp vec4 halo_color
750#pragma mapbox: define lowp float opacity
751#pragma mapbox: define lowp float halo_width
752#pragma mapbox: define lowp float halo_blur
753void main() {
754#pragma mapbox: initialize highp vec4 fill_color
755#pragma mapbox: initialize highp vec4 halo_color
756#pragma mapbox: initialize lowp float opacity
757#pragma mapbox: initialize lowp float halo_width
758#pragma mapbox: initialize lowp float halo_blur
759vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
760camera_to_anchor_distance/u_camera_to_center_distance :
761u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
762#ifdef GLOBE
763if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
764#endif
765vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:_r("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);
765float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:_r("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:_r("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:_r("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:_r(`in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758
766);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:_r("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};
vendor: 22,069 bytes, lines 766-815
766function _r(_,n){const l=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,p=n.match(/in ([\w]+) ([\w]+)/g),m=_.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),v=n.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),S=v?v.concat(m):m,E={};return{fragmentSource:_=_.replace(l,(A,z,F,j,N)=>(E[N]=!0,z==="define"?`
767#ifndef HAS_UNIFORM_u_${N}
768in ${F} ${j} ${N};
769#else
770uniform ${F} ${j} u_${N};
771#endif
772`:`
773#ifdef HAS_UNIFORM_u_${N}
774    ${F} ${j} ${N} = u_${N};
775#endif
776`)),vertexSource:n=n.replace(l,(A,z,F,j,N)=>{const G=j==="float"?"vec2":"vec4",Y=N.match(/color/)?"color":G;return E[N]?z==="define"?`
777#ifndef HAS_UNIFORM_u_${N}
778uniform lowp float u_${N}_t;
779in ${F} ${G} a_${N};
780out ${F} ${j} ${N};
781#else
782uniform ${F} ${j} u_${N};
783#endif
784`:Y==="vec4"?`
785#ifndef HAS_UNIFORM_u_${N}
786    ${N} = a_${N};
787#else
788    ${F} ${j} ${N} = u_${N};
789#endif
790`:`
791#ifndef HAS_UNIFORM_u_${N}
792    ${N} = unpack_mix_${Y}(a_${N}, u_${N}_t);
793#else
794    ${F} ${j} ${N} = u_${N};
795#endif
796`:z==="define"?`
797#ifndef HAS_UNIFORM_u_${N}
798uniform lowp float u_${N}_t;
799in ${F} ${G} a_${N};
800#else
801uniform ${F} ${j} u_${N};
802#endif
803`:Y==="vec4"?`
804#ifndef HAS_UNIFORM_u_${N}
805    ${F} ${j} ${N} = a_${N};
806#else
807    ${F} ${j} ${N} = u_${N};
808#endif
809`:`
810#ifndef HAS_UNIFORM_u_${N}
811    ${F} ${j} ${N} = unpack_mix_${Y}(a_${N}, u_${N}_t);
812#else
813    ${F} ${j} ${N} = u_${N};
814#endif
815`}),staticAttributes:p,staticUniforms:S}}class po{constructor(n,l,p){this.vertexBuffer=n,this.indexBuffer=l,this.segments=p}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var mo=o.aI([{name:"a_pos",type:"Int16",components:2}]);const Aa="#define PROJECTION_MERCATOR",mf="mercator";class gf{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return mf}get shaderDefine(){return Aa}get shaderPreludeCode(){return Gs.projectionMercator}get vertexShaderPreludeCode(){return Gs.projectionMercator.vertexSource}get subdivisionGranularity(){return o.aJ.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(n){}getMeshFromTileID(n,l,p,m,v){if(this._cachedMesh)return this._cachedMesh;const S=new o.aK;S.emplaceBack(0,0),S.emplaceBack(o.$,0),S.emplaceBack(0,o.$),S.emplaceBack(o.$,o.$);const E=n.createVertexBuffer(S,mo.members),A=o.aL.simpleSegment(0,0,4,2),z=new o.aM;z.emplaceBack(1,0,2),z.emplaceBack(1,2,3);const F=n.createIndexBuffer(z);return this._cachedMesh=new po(E,F,A),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(n){}}class gs{constructor(n=0,l=0,p=0,m=0){if(isNaN(n)||n<0||isNaN(l)||l<0||isNaN(p)||p<0||isNaN(m)||m<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=n,this.bottom=l,this.left=p,this.right=m}interpolate(n,l,p){return l.top!=null&&n.top!=null&&(this.top=o.C.number(n.top,l.top,p)),l.bottom!=null&&n.bottom!=null&&(this.bottom=o.C.number(n.bottom,l.bottom,p)),l.left!=null&&n.left!=null&&(this.left=o.C.number(n.left,l.left,p)),l.right!=null&&n.right!=null&&(this.right=o.C.number(n.right,l.right,p)),this}getCenter(n,l){const p=o.ag((this.left+n-this.right)/2,0,n),m=o.ag((this.top+l-this.bottom)/2,0,l);return new o.P(p,m)}equals(n){return this.top===n.top&&this.bottom===n.bottom&&this.left===n.left&&this.right===n.right}clone(){return new gs(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function go(_,n){if(!_.renderWorldCopies||_.lngRange)return;const l=n.lng-_.center.lng;n.lng+=l>180?-360:l<-180?360:0}function vr(_){return Math.max(0,Math.floor(_))}class Pc{constructor(n,l,p,m,v,S){this._callbacks=n,this._tileSize=512,this._renderWorldCopies=S===void 0||!!S,this._minZoom=l||0,this._maxZoom=p||22,this._minPitch=m??0,this._maxPitch=v??60,this.setMaxBounds(),this._width=0,this._height=0,this._center=new o.S(0,0),this._elevation=0,this._zoom=0,this._tileZoom=vr(this._zoom),this._scale=o.ae(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new gs,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(n,l,p){this._latRange=n.latRange,this._lngRange=n.lngRange,this._width=n.width,this._height=n.height,this._center=n.center,this._elevation=n.elevation,this._minElevationForCurrentTile=n.minElevationForCurrentTile,this._zoom=n.zoom,this._tileZoom=vr(this._zoom),this._scale=o.ae(this._zoom),this._bearingInRadians=n.bearingInRadians,this._fovInRadians=n.fovInRadians,this._pitchInRadians=n.pitchInRadians,this._rollInRadians=n.rollInRadians,this._unmodified=n.unmodified,this._edgeInsets=new gs(n.padding.top,n.padding.bottom,n.padding.left,n.padding.right),this._minZoom=n.minZoom,this._maxZoom=n.maxZoom,this._minPitch=n.minPitch,this._maxPitch=n.maxPitch,this._renderWorldCopies=n.renderWorldCopies,this._cameraToCenterDistance=n.cameraToCenterDistance,this._nearZ=n.nearZ,this._farZ=n.farZ,this._autoCalculateNearFarZ=!p&&n.autoCalculateNearFarZ,l&&this._constrain(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(n){this._minElevationForCurrentTile=n}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(n){this._minZoom!==n&&(this._minZoom=n,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(n){this._maxZoom!==n&&(this._maxZoom=n,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(n){this._minPitch!==n&&(this._minPitch=n,this.setPitch(Math.max(this.pitch,n)))}get maxPitch(){return this._maxPitch}setMaxPitch(n){this._maxPitch!==n&&(this._maxPitch=n,this.setPitch(Math.min(this.pitch,n)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(n){n===void 0?n=!0:n===null&&(n=!1),this._renderWorldCopies=n}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new o.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(n){const l=o.aN(n,-180,180)*Math.PI/180;var p,m,v,S,E,A,z,F,j;this._bearingInRadians!==l&&(this._unmodified=!1,this._bearingInRadians=l,this._calcMatrices(),this._rotationMatrix=w(),p=this._rotationMatrix,v=-this._bearingInRadians,S=(m=this._rotationMatrix)[0],E=m[1],A=m[2],z=m[3],F=Math.sin(v),j=Math.cos(v),p[0]=S*j+A*F,p[1]=E*j+z*F,p[2]=S*-F+A*j,p[3]=E*-F+z*j)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(n){const l=o.ag(n,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==l&&(this._unmodified=!1,this._pitchInRadians=l,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(n){const l=n/180*Math.PI;this._rollInRadians!==l&&(this._unmodified=!1,this._rollInRadians=l,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return o.aO(this._fovInRadians)}setFov(n){n=o.ag(n,.1,150),this.fov!==n&&(this._unmodified=!1,this._fovInRadians=o.ad(n),this._calcMatrices())}get zoom(){return this._zoom}setZoom(n){const l=this.getConstrained(this._center,n).zoom;this._zoom!==l&&(this._unmodified=!1,this._zoom=l,this._tileZoom=Math.max(0,Math.floor(l)),this._scale=o.ae(l),this._constrain(),this._calcMatrices())}get center(){return this._center}setCenter(n){n.lat===this._center.lat&&n.lng===this._center.lng||(this._unmodified=!1,this._center=n,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(n){n!==this._elevation&&(this._elevation=n,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(n){this._edgeInsets.equals(n)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,n,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(n,l){this._autoCalculateNearFarZ=!1,this._nearZ=n,this._farZ=l,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(n){return this._edgeInsets.equals(n)}interpolatePadding(n,l,p){this._unmodified=!1,this._edgeInsets.interpolate(n,l,p),this._constrain(),this._calcMatrices()}resize(n,l,p=!0){this._width=n,this._height=l,p&&this._constrain(),this._calcMatrices()}getMaxBounds(){return this._latRange&&this._latRange.length===2&&this._lngRange&&this._lngRange.length===2?new ue([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]]):null}setMaxBounds(n){n?(this._lngRange=[n.getWest(),n.getEast()],this._latRange=[n.getSouth(),n.getNorth()],this._constrain()):(this._lngRange=null,this._latRange=[-85.051129,o.ah])}getConstrained(n,l){return this._callbacks.getConstrained(n,l)}getCameraQueryGeometry(n,l){if(l.length===1)return[l[0],n];{const{minX:p,minY:m,maxX:v,maxY:S}=o.a1.fromPoints(l).extend(n);return[new o.P(p,m),new o.P(v,m),new o.P(v,S),new o.P(p,S),new o.P(p,m)]}}_constrain(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;const n=this._unmodified,{center:l,zoom:p}=this.getConstrained(this.center,this.zoom);this.setCenter(l),this.setZoom(p),this._unmodified=n,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let n=o.af(new Float64Array(16));o.N(n,n,[this._width/2,-this._height/2,1]),o.M(n,n,[1,-1,0]),this._clipSpaceToPixelsMatrix=n,n=o.af(new Float64Array(16)),o.N(n,n,[1,-1,1]),o.M(n,n,[-1,-1,0]),o.N(n,n,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=n,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(n,l,p,m){const v=p!==void 0?p:this.bearing,S=m=m!==void 0?m:this.pitch,E=o.a0.fromLngLat(n,l),A=-Math.cos(o.ad(S)),z=Math.sin(o.ad(S)),F=z*Math.sin(o.ad(v)),j=-z*Math.cos(o.ad(v));let N=this.elevation;const G=l-N;let Y;A*G>=0||Math.abs(A)<.1?(Y=1e4,N=l+Y*A):Y=-G/A;let ae,oe,le=o.aP(1,E.y),de=0;do{if(de+=1,de>10)break;oe=Y/le,ae=new o.a0(E.x+F*oe,E.y+j*oe),le=1/ae.meterInMercatorCoordinateUnits()}while(Math.abs(Y-oe*le)>1e-12);return{center:ae.toLngLat(),elevation:N,zoom:o.aj(this.height/2/Math.tan(this.fovInRadians/2)/oe/this.tileSize)}}recalculateZoomAndCenter(n){if(this.elevation-n==0)return;const l=o.ai(1,this.center.lat)*this.worldSize,p=this.cameraToCenterDistance/l,m=o.a0.fromLngLat(this.center,this.elevation),v=pe(this.center,this.elevation,this.pitch,this.bearing,p);this._elevation=n;const S=this.calculateCenterFromCameraLngLatAlt(v.toLngLat(),o.aP(v.z,m.y),this.bearing,this.pitch);this._elevation=S.elevation,this._center=S.center,this.setZoom(S.zoom)}getCameraPoint(){const n=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new o.P(n*Math.sin(this.rollInRadians),n*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){const n=o.ai(1,this.center.lat)*this.worldSize;return pe(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/n).toLngLat()}getMercatorTileCoordinates(n){if(!n)return[0,0,1,1];const l=n.canonical.z>=0?1<<n.canonical.z:Math.pow(2,n.canonical.z);return[n.canonical.x/l,n.canonical.y/l,1/l/o.$,1/l/o.$]}}class oh{constructor(n,l){this.min=n,this.max=l,this.center=o.aQ([],o.aR([],this.min,this.max),.5)}quadrant(n){const l=[n%2==0,n<2],p=o.aS(this.min),m=o.aS(this.max);for(let v=0;v<l.length;v++)p[v]=l[v]?this.min[v]:this.center[v],m[v]=l[v]?this.center[v]:this.max[v];return m[2]=this.max[2],new oh(p,m)}distanceX(n){return Math.max(Math.min(this.max[0],n[0]),this.min[0])-n[0]}distanceY(n){return Math.max(Math.min(this.max[1],n[1]),this.min[1])-n[1]}intersectsFrustum(n){let l=!0;for(let p=0;p<n.planes.length;p++){const m=this.intersectsPlane(n.planes[p]);if(m===0)return 0;m===1&&(l=!1)}return l?2:n.aabb.min[0]>this.max[0]||n.aabb.min[1]>this.max[1]||n.aabb.min[2]>this.max[2]||n.aabb.max[0]<this.min[0]||n.aabb.max[1]<this.min[1]||n.aabb.max[2]<this.min[2]?0:1}intersectsPlane(n){let l=n[3],p=n[3];for(let m=0;m<3;m++)n[m]>0?(l+=n[m]*this.min[m],p+=n[m]*this.max[m]):(p+=n[m]*this.min[m],l+=n[m]*this.max[m]);return l>=0?2:p<0?0:1}}class yf{distanceToTile2d(n,l,p,m){const v=m.distanceX([n,l]),S=m.distanceY([n,l]);return Math.hypot(v,S)}getWrap(n,l,p){return p}getTileBoundingVolume(n,l,p,m){var v,S;let E=p,A=p;if(m!=null&&m.terrain){const F=new o.Z(n.z,l,n.z,n.x,n.y),j=m.terrain.getMinMaxElevation(F);E=(v=j.minElevation)!==null&&v!==void 0?v:p,A=(S=j.maxElevation)!==null&&S!==void 0?S:p}const z=1<<n.z;return new oh([l+n.x/z,n.y/z,E],[l+(n.x+1)/z,(n.y+1)/z,A])}allowVariableZoom(n,l){const p=n.fov*(Math.abs(Math.cos(n.rollInRadians))*n.height+Math.abs(Math.sin(n.rollInRadians))*n.width)/n.height,m=o.ag(78.5-p/2,0,60);return!!l.terrain||n.pitch>m}allowWorldCopies(){return!0}prepareNextFrame(){}}class Ti{constructor(n,l,p){this.points=n,this.planes=l,this.aabb=p}static fromInvProjectionMatrix(n,l=1,p=0,m,v){const S=v?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],E=Math.pow(2,p),A=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(N=>function(G,Y,ae,oe){const le=o.av([],G,Y),de=1/le[3]/ae*oe;return o.aX(le,le,[de,de,1/le[3],de])}(N,n,l,E));m&&function(N,G,Y,ae){const oe=ae?4:0,le=ae?0:4;let de=0;const ve=[],ge=[];for(let ye=0;ye<4;ye++){const Ae=o.aT([],N[ye+le],N[ye+oe]),Ve=o.aY(Ae);o.aQ(Ae,Ae,1/Ve),ve.push(Ve),ge.push(Ae)}for(let ye=0;ye<4;ye++){const Ae=o.aZ(N[ye+oe],ge[ye],Y);de=Ae!==null&&Ae>=0?Math.max(de,Ae):Math.max(de,ve[ye])}const we=function(ye,Ae){const Ve=o.aT([],ye[Ae[0]],ye[Ae[1]]),Be=o.aT([],ye[Ae[2]],ye[Ae[1]]),Ne=[0,0,0,0];return o.aU(Ne,o.aV([],Ve,Be)),Ne[3]=-o.aW(Ne,ye[Ae[0]]),Ne}(N,G),Ce=function(ye,Ae){const Ve=o.a_(ye),Be=o.a$([],ye,1/Ve),Ne=o.aT([],Ae,o.aQ([],Be,o.aW(Ae,Be))),qe=o.a_(Ne);if(qe>0){const wt=Math.sqrt(1-Be[3]*Be[3]),bt=o.aQ([],Be,-Be[3]),ut=o.aR([],bt,o.aQ([],Ne,wt/qe));return o.b0(Ae,ut)}return null}(Y,we);if(Ce!==null){const ye=Ce/o.aW(ge[0],we);de=Math.min(de,ye)}for(let ye=0;ye<4;ye++){const Ae=Math.min(de,ve[ye]);N[ye+le]=[N[ye+oe][0]+ge[ye][0]*Ae,N[ye+oe][1]+ge[ye][1]*Ae,N[ye+oe][2]+ge[ye][2]*Ae,1]}}(A,S[0],m,v);const z=S.map(N=>{const G=o.aT([],A[N[0]],A[N[1]]),Y=o.aT([],A[N[2]],A[N[1]]),ae=o.aU([],o.aV([],G,Y)),oe=-o.aW(ae,A[N[1]]);return ae.concat(oe)}),F=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],j=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(const N of A)for(let G=0;G<3;G++)F[G]=Math.min(F[G],N[G]),j[G]=Math.max(j[G],N[G]);return new Ti(A,z,new oh(F,j))}}class Un{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(n){this._helper.setMinZoom(n)}setMaxZoom(n){this._helper.setMaxZoom(n)}setMinPitch(n){this._helper.setMinPitch(n)}setMaxPitch(n){this._helper.setMaxPitch(n)}setRenderWorldCopies(n){this._helper.setRenderWorldCopies(n)}setBearing(n){this._helper.setBearing(n)}setPitch(n){this._helper.setPitch(n)}setRoll(n){this._helper.setRoll(n)}setFov(n){this._helper.setFov(n)}setZoom(n){this._helper.setZoom(n)}setCenter(n){this._helper.setCenter(n)}setElevation(n){this._helper.setElevation(n)}setMinElevationForCurrentTile(n){this._helper.setMinElevationForCurrentTile(n)}setPadding(n){this._helper.setPadding(n)}interpolatePadding(n,l,p){return this._helper.interpolatePadding(n,l,p)}isPaddingEqual(n){return this._helper.isPaddingEqual(n)}resize(n,l,p=!0){this._helper.resize(n,l,p)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(n){this._helper.setMaxBounds(n)}overrideNearFarZ(n,l){this._helper.overrideNearFarZ(n,l)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(n){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),n)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(n,l){}constructor(n,l,p,m,v){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this._helper=new Pc({calcMatrices:()=>{this._calcMatrices()},getConstrained:(S,E)=>this.getConstrained(S,E)},n,l,p,m,v),this._coveringTilesDetailsProvider=new yf}clone(){const n=new Un;return n.apply(this),n}apply(n,l,p){this._helper.apply(n,l,p)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(n){const l=[new o.b1(0,n)];if(this._helper._renderWorldCopies){const p=this.screenPointToMercatorCoordinate(new o.P(0,0)),m=this.screenPointToMercatorCoordinate(new o.P(this._helper._width,0)),v=this.screenPointToMercatorCoordinate(new o.P(this._helper._width,this._helper._height)),S=this.screenPointToMercatorCoordinate(new o.P(0,this._helper._height)),E=Math.floor(Math.min(p.x,m.x,v.x,S.x)),A=Math.floor(Math.max(p.x,m.x,v.x,S.x)),z=1;for(let F=E-z;F<=A+z;F++)F!==0&&l.push(new o.b1(F,n))}return l}getCameraFrustum(){return Ti.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(n){const l=this.screenPointToLocation(this.centerPoint,n),p=n?n.getElevationForLngLatZoom(l,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(p)}setLocationAtPoint(n,l){const p=o.ai(this.elevation,this.center.lat),m=this.screenPointToMercatorCoordinateAtZ(l,p),v=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,p),S=o.a0.fromLngLat(n),E=new o.a0(S.x-(m.x-v.x),S.y-(m.y-v.y));this.setCenter(E==null?void 0:E.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(n,l){return l?this.coordinatePoint(o.a0.fromLngLat(n),l.getElevationForLngLatZoom(n,this._helper._tileZoom),this._pixelMatrix3D):this.coordinatePoint(o.a0.fromLngLat(n))}screenPointToLocation(n,l){var p;return(p=this.screenPointToMercatorCoordinate(n,l))===null||p===void 0?void 0:p.toLngLat()}screenPointToMercatorCoordinate(n,l){if(l){const p=l.pointCoordinate(n);if(p!=null)return p}return this.screenPointToMercatorCoordinateAtZ(n)}screenPointToMercatorCoordinateAtZ(n,l){const p=l||0,m=[n.x,n.y,0,1],v=[n.x,n.y,1,1];o.av(m,m,this._pixelMatrixInverse),o.av(v,v,this._pixelMatrixInverse);const S=m[3],E=v[3],A=m[1]/S,z=v[1]/E,F=m[2]/S,j=v[2]/E,N=F===j?0:(p-F)/(j-F);return new o.a0(o.C.number(m[0]/S,v[0]/E,N)/this.worldSize,o.C.number(A,z,N)/this.worldSize,p)}coordinatePoint(n,l=0,p=this._pixelMatrix){const m=[n.x*this.worldSize,n.y*this.worldSize,l,1];return o.av(m,m,p),new o.P(m[0]/m[3],m[1]/m[3])}getBounds(){const n=Math.max(0,this._helper._height/2-re(this));return new ue().extend(this.screenPointToLocation(new o.P(0,n))).extend(this.screenPointToLocation(new o.P(this._helper._width,n))).extend(this.screenPointToLocation(new o.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new o.P(0,this._helper._height)))}
vendor: 1,440 bytes, line 815
815isPointOnMapSurface(n,l){return l?l.pointCoordinate(n)!=null:n.y>this.height/2-re(this)}calculatePosMatrix(n,l=!1,p){var m;const v=(m=n.key)!==null&&m!==void 0?m:o.b2(n.wrap,n.canonical.z,n.canonical.z,n.canonical.x,n.canonical.y),S=l?this._alignedPosMatrixCache:this._posMatrixCache;if(S.has(v)){const z=S.get(v);return p?z.f32:z.f64}const E=se(n,this.worldSize);o.O(E,l?this._alignedProjMatrix:this._viewProjMatrix,E);const A={f64:E,f32:new Float32Array(E)};return S.set(v,A),p?A.f32:A.f64}calculateFogMatrix(n){const l=n.key,p=this._fogMatrixCacheF32;if(p.has(l))return p.get(l);const m=se(n,this.worldSize);return o.O(m,this._fogMatrix,m),p.set(l,new Float32Array(m)),p.get(l)}getConstrained(n,l){l=o.ag(+l,this.minZoom,this.maxZoom);const p={center:new o.S(n.lng,n.lat),zoom:l};let m=this._helper._lngRange;this._helper._renderWorldCopies||m!==null||(m=[-179.9999999999,180-1e-10]);const v=this.tileSize*o.ae(p.zoom);let S=0,E=v,A=0,z=v,F=0,j=0;const{x:N,y:G}=this.size;if(this._helper._latRange){const ve=this._helper._latRange;S=o.U(ve[1])*v,E=o.U(ve[0])*v,E-S<G&&(F=G/(E-S))}m&&(A=o.aN(o.V(m[0])*v,0,v),z=o.aN(o.V(m[1])*v,0,v),z<A&&(z+=v),z-A<N&&(j=N/(z-A)));const{x:Y,y:ae}=Me(v,n);let oe,le;const de=Math.max(j||0,F||0);if(de){const ve=new o.P(j?(z+A)/2:Y,F?(E+S)/2:ae);return p.center=Q(v,ve).wrap(),p.zoom+=o.aj(de),p}if(this._helper._latRange){const ve=G/2;ae-ve<S&&(le=S+ve),ae+ve>E&&(le=E-ve)}if(m){const ve=(A+z)/2;let ge=Y;
vendor: 32,389 bytes, line 815
815this._helper._renderWorldCopies&&(ge=o.aN(Y,ve-v/2,ve+v/2));const we=N/2;ge-we<A&&(oe=A+we),ge+we>z&&(oe=z-we)}if(oe!==void 0||le!==void 0){const ve=new o.P(oe??Y,le??ae);p.center=Q(v,ve).wrap()}return p}calculateCenterFromCameraLngLatAlt(n,l,p,m){return this._helper.calculateCenterFromCameraLngLatAlt(n,l,p,m)}_calculateNearFarZIfNeeded(n,l,p){if(!this._helper.autoCalculateNearFarZ)return;const m=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),v=n-m*this._helper._pixelPerMeter/Math.cos(l),S=m<0?v:n,E=Math.PI/2+this.pitchInRadians,A=o.ad(this.fov)*(Math.abs(Math.cos(o.ad(this.roll)))*this.height+Math.abs(Math.sin(o.ad(this.roll)))*this.width)/this.height*(.5+p.y/this.height),z=Math.sin(A)*S/Math.sin(o.ag(Math.PI-E-A,.01,Math.PI-.01)),F=re(this),j=Math.atan(F/this._helper.cameraToCenterDistance),N=o.ad(.75),G=j>N?2*j*(.5+p.y/(2*F)):N,Y=Math.sin(G)*S/Math.sin(o.ag(Math.PI-E-G,.01,Math.PI-.01)),ae=Math.min(z,Y);this._helper._farZ=1.01*(Math.cos(Math.PI/2-l)*ae+S),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;const n=this.centerOffset,l=Me(this.worldSize,this.center),p=l.x,m=l.y;this._helper._pixelPerMeter=o.ai(1,this.center.lat)*this.worldSize;const v=o.ad(Math.min(this.pitch,un)),S=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(v));let E;this._calculateNearFarZIfNeeded(S,v,n),E=new Float64Array(16),o.b3(E,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),o.ap(this._invProjMatrix,E),E[8]=2*-n.x/this._helper._width,E[9]=2*n.y/this._helper._height,this._projectionMatrix=o.b4(E),o.N(E,E,[1,-1,1]),o.M(E,E,[0,0,-this._helper.cameraToCenterDistance]),o.b5(E,E,-this.rollInRadians),o.b6(E,E,this.pitchInRadians),o.b5(E,E,-this.bearingInRadians),o.M(E,E,[-p,-m,0]),this._mercatorMatrix=o.N([],E,[this.worldSize,this.worldSize,this.worldSize]),o.N(E,E,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=o.O(new Float64Array(16),this.clipSpaceToPixelsMatrix,E),o.M(E,E,[0,0,-this.elevation]),this._viewProjMatrix=E,this._invViewProjMatrix=o.ap([],E);const A=[0,0,-1,1];o.av(A,A,this._invViewProjMatrix),this._cameraPosition=[A[0]/A[3],A[1]/A[3],A[2]/A[3]],this._fogMatrix=new Float64Array(16),o.b3(this._fogMatrix,this.fovInRadians,this.width/this.height,S,this._helper._farZ),this._fogMatrix[8]=2*-n.x/this.width,this._fogMatrix[9]=2*n.y/this.height,o.N(this._fogMatrix,this._fogMatrix,[1,-1,1]),o.M(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),o.b5(this._fogMatrix,this._fogMatrix,-this.rollInRadians),o.b6(this._fogMatrix,this._fogMatrix,this.pitchInRadians),o.b5(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),o.M(this._fogMatrix,this._fogMatrix,[-p,-m,0]),o.N(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),o.M(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=o.O(new Float64Array(16),this.clipSpaceToPixelsMatrix,E);const z=this._helper._width%2/2,F=this._helper._height%2/2,j=Math.cos(this.bearingInRadians),N=Math.sin(-this.bearingInRadians),G=p-Math.round(p)+j*z+N*F,Y=m-Math.round(m)+j*F+N*z,ae=new Float64Array(E);if(o.M(ae,ae,[G>.5?G-1:G,Y>.5?Y-1:Y,0]),this._alignedProjMatrix=ae,E=o.ap(new Float64Array(16),this._pixelMatrix),!E)throw new Error("failed to invert matrix");this._pixelMatrixInverse=E,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;const n=this.screenPointToMercatorCoordinate(new o.P(0,0)),l=[n.x*this.worldSize,n.y*this.worldSize,0,1];return o.av(l,l,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){const n=o.ai(1,this.center.lat)*this.worldSize;return pe(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/n).toLngLat()}lngLatToCameraDepth(n,l){const p=o.a0.fromLngLat(n),m=[p.x*this.worldSize,p.y*this.worldSize,l,1];return o.av(m,m,this._viewProjMatrix),m[2]/m[3]}getProjectionData(n){const{overscaledTileID:l,aligned:p,applyTerrainMatrix:m}=n,v=this._helper.getMercatorTileCoordinates(l),S=l?this.calculatePosMatrix(l,p,!0):null;let E;return E=l&&l.terrainRttPosMatrix32f&&m?l.terrainRttPosMatrix32f:S||o.b7(),{mainMatrix:E,tileMercatorCoords:v,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:E}}isLocationOccluded(n){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(n,l,p){return 1}transformLightDirection(n){return o.aS(n)}getRayDirectionFromPixel(n){throw new Error("Not implemented.")}projectTileCoordinates(n,l,p,m){const v=this.calculatePosMatrix(p);let S;m?(S=[n,l,m(n,l),1],o.av(S,S,v)):(S=[n,l,0,1],Ia(S,S,v));const E=S[3];return{point:new o.P(S[0]/E,S[1]/E),signedDistanceFromCamera:E,isOccluded:!1}}populateCache(n){for(const l of n)this.calculatePosMatrix(l)}getMatrixForModel(n,l){const p=o.a0.fromLngLat(n,l),m=p.meterInMercatorCoordinateUnits(),v=o.b8();return o.M(v,v,[p.x,p.y,p.z]),o.b5(v,v,Math.PI),o.b6(v,v,Math.PI/2),o.N(v,v,[-m,m,m]),v}getProjectionDataForCustomLayer(n=!0){const l=new o.Z(0,0,0,0,0),p=this.getProjectionData({overscaledTileID:l,applyGlobeMatrix:n}),m=se(l,this.worldSize);o.O(m,this._viewProjMatrix,m),p.tileMercatorCoords=[0,0,1,1];const v=[o.$,o.$,this.worldSize/this._helper.pixelsPerMeter],S=o.b9();return o.N(S,m,v),p.fallbackMatrix=S,p.mainMatrix=S,p}getFastPathSimpleProjectionMatrix(n){return this.calculatePosMatrix(n)}}function Ci(){o.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function Qn(_){if(_.useSlerp)if(_.k<1){const n=o.ba(_.startEulerAngles.roll,_.startEulerAngles.pitch,_.startEulerAngles.bearing),l=o.ba(_.endEulerAngles.roll,_.endEulerAngles.pitch,_.endEulerAngles.bearing),p=new Float64Array(4);o.bb(p,n,l,_.k);const m=o.bc(p);_.tr.setRoll(m.roll),_.tr.setPitch(m.pitch),_.tr.setBearing(m.bearing)}else _.tr.setRoll(_.endEulerAngles.roll),_.tr.setPitch(_.endEulerAngles.pitch),_.tr.setBearing(_.endEulerAngles.bearing);else _.tr.setRoll(o.C.number(_.startEulerAngles.roll,_.endEulerAngles.roll,_.k)),_.tr.setPitch(o.C.number(_.startEulerAngles.pitch,_.endEulerAngles.pitch,_.k)),_.tr.setBearing(o.C.number(_.startEulerAngles.bearing,_.endEulerAngles.bearing,_.k))}function vn(_,n,l,p,m){const v=m.padding,S=Me(m.worldSize,l.getNorthWest()),E=Me(m.worldSize,l.getNorthEast()),A=Me(m.worldSize,l.getSouthEast()),z=Me(m.worldSize,l.getSouthWest()),F=o.ad(-p),j=S.rotate(F),N=E.rotate(F),G=A.rotate(F),Y=z.rotate(F),ae=new o.P(Math.max(j.x,N.x,Y.x,G.x),Math.max(j.y,N.y,Y.y,G.y)),oe=new o.P(Math.min(j.x,N.x,Y.x,G.x),Math.min(j.y,N.y,Y.y,G.y)),le=ae.sub(oe),de=(m.width-(v.left+v.right+n.left+n.right))/le.x,ve=(m.height-(v.top+v.bottom+n.top+n.bottom))/le.y;if(ve<0||de<0)return void Ci();const ge=Math.min(o.aj(m.scale*Math.min(de,ve)),_.maxZoom),we=o.P.convert(_.offset),Ce=new o.P((n.left-n.right)/2,(n.top-n.bottom)/2).rotate(o.ad(p)),ye=we.add(Ce).mult(m.scale/o.ae(ge));return{center:Q(m.worldSize,S.add(A).div(2).sub(ye)),zoom:ge,bearing:p}}class ah{get useGlobeControls(){return!1}handlePanInertia(n,l){return{easingOffset:n,easingCenter:l.center}}handleMapControlsRollPitchBearingZoom(n,l){n.bearingDelta&&l.setBearing(l.bearing+n.bearingDelta),n.pitchDelta&&l.setPitch(l.pitch+n.pitchDelta),n.rollDelta&&l.setRoll(l.roll+n.rollDelta),n.zoomDelta&&l.setZoom(l.zoom+n.zoomDelta)}handleMapControlsPan(n,l,p){n.around.distSqr(l.centerPoint)<.01||l.setLocationAtPoint(p,n.around)}cameraForBoxAndBearing(n,l,p,m,v){return vn(n,l,p,m,v)}handleJumpToCenterZoom(n,l){n.zoom!==(l.zoom!==void 0?+l.zoom:n.zoom)&&n.setZoom(+l.zoom),l.center!==void 0&&n.setCenter(o.S.convert(l.center))}handleEaseTo(n,l){const p=n.zoom,m=n.padding,v={roll:n.roll,pitch:n.pitch,bearing:n.bearing},S={roll:l.roll===void 0?n.roll:l.roll,pitch:l.pitch===void 0?n.pitch:l.pitch,bearing:l.bearing===void 0?n.bearing:l.bearing},E=l.zoom!==void 0,A=!n.isPaddingEqual(l.padding);let z=!1;const F=E?+l.zoom:n.zoom;let j=n.centerPoint.add(l.offsetAsPoint);const N=n.screenPointToLocation(j),{center:G,zoom:Y}=n.getConstrained(o.S.convert(l.center||N),F??p);go(n,G);const ae=Me(n.worldSize,N),oe=Me(n.worldSize,G).sub(ae),le=o.ae(Y-p);return z=Y!==p,{easeFunc:de=>{if(z&&n.setZoom(o.C.number(p,Y,de)),o.bd(v,S)||Qn({startEulerAngles:v,endEulerAngles:S,tr:n,k:de,useSlerp:v.roll!=S.roll}),A&&(n.interpolatePadding(m,l.padding,de),j=n.centerPoint.add(l.offsetAsPoint)),l.around)n.setLocationAtPoint(l.around,l.aroundPoint);else{const ve=o.ae(n.zoom-p),ge=Y>p?Math.min(2,le):Math.max(.5,le),we=Math.pow(ge,1-de),Ce=Q(n.worldSize,ae.add(oe.mult(de*we)).mult(ve));n.setLocationAtPoint(n.renderWorldCopies?Ce.wrap():Ce,j)}},isZooming:z,elevationCenter:G}}handleFlyTo(n,l){const p=l.zoom!==void 0,m=n.zoom,v=n.getConstrained(o.S.convert(l.center||l.locationAtOffset),p?+l.zoom:m),S=v.center,E=v.zoom;go(n,S);const A=Me(n.worldSize,l.locationAtOffset),z=Me(n.worldSize,S).sub(A),F=z.mag(),j=o.ae(E-m);let N;if(l.minZoom!==void 0){const G=Math.min(+l.minZoom,m,E),Y=n.getConstrained(S,G).zoom;N=o.ae(Y-m)}return{easeFunc:(G,Y,ae,oe)=>{n.setZoom(G===1?E:m+o.aj(Y));const le=G===1?S:Q(n.worldSize,A.add(z.mult(ae)).mult(Y));n.setLocationAtPoint(n.renderWorldCopies?le.wrap():le,oe)},scaleOfZoom:j,targetCenter:S,scaleOfMinZoom:N,pixelPathLength:F}}}class Er{constructor(n,l,p){this.blendFunction=n,this.blendColor=l,this.mask=p}}Er.Replace=[1,0],Er.disabled=new Er(Er.Replace,o.be.transparent,[!1,!1,!1,!1]),Er.unblended=new Er(Er.Replace,o.be.transparent,[!0,!0,!0,!0]),Er.alphaBlended=new Er([1,771],o.be.transparent,[!0,!0,!0,!0]);const Vi=2305;class or{constructor(n,l,p){this.enable=n,this.mode=l,this.frontFace=p}}or.disabled=new or(!1,1029,Vi),or.backCCW=new or(!0,1029,Vi),or.frontCCW=new or(!0,1028,Vi);class ur{constructor(n,l,p){this.func=n,this.mask=l,this.range=p}}ur.ReadOnly=!1,ur.ReadWrite=!0,ur.disabled=new ur(519,ur.ReadOnly,[0,1]);const Ma=7680;class Jt{constructor(n,l,p,m,v,S){this.test=n,this.ref=l,this.mask=p,this.fail=m,this.depthFail=v,this.pass=S}}Jt.disabled=new Jt({func:519,mask:0},0,0,Ma,Ma,Ma);const Ra=new WeakMap;function Li(_){var n;if(Ra.has(_))return Ra.get(_);{const l=(n=_.getParameter(_.VERSION))===null||n===void 0?void 0:n.startsWith("WebGL 2.0");return Ra.set(_,l),l}}class yl{get awaitingQuery(){return!!this._readbackQueue}constructor(n){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=n;const l=n.context,p=l.gl;this._texFormat=p.RGBA,this._texType=p.UNSIGNED_BYTE;const m=new o.aK;m.emplaceBack(-1,-1),m.emplaceBack(2,-1),m.emplaceBack(-1,2);const v=new o.aM;v.emplaceBack(0,1,2),this._fullscreenTriangle=new po(l.createVertexBuffer(m,mo.members),l.createIndexBuffer(v),o.aL.simpleSegment(0,0,m.length,v.length)),this._resultBuffer=new Uint8Array(4),l.activeTexture.set(p.TEXTURE1);const S=p.createTexture();p.bindTexture(p.TEXTURE_2D,S),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.NEAREST),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.NEAREST),p.texImage2D(p.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=l.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(S),Li(p)&&(this._pbo=p.createBuffer(),p.bindBuffer(p.PIXEL_PACK_BUFFER,this._pbo),p.bufferData(p.PIXEL_PACK_BUFFER,4,p.STREAM_READ),p.bindBuffer(p.PIXEL_PACK_BUFFER,null))}destroy(){const n=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),n.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(n,l){const p=this._updateCount;return this._readbackQueue?p>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():p>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(n,l),this._updateCount++,this._measuredError}_bindFramebuffer(){const n=this._cachedRenderContext.context,l=n.gl;n.activeTexture.set(l.TEXTURE1),l.bindTexture(l.TEXTURE_2D,this._fbo.colorAttachment.get()),n.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(n,l){const p=this._cachedRenderContext.context,m=p.gl;if(this._bindFramebuffer(),p.viewport.set([0,0,this._texWidth,this._texHeight]),p.clear({color:o.be.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(p,m.TRIANGLES,ur.disabled,Jt.disabled,Er.unblended,or.disabled,((v,S)=>({u_input:v,u_output_expected:S}))(n,l),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Li(m)){m.bindBuffer(m.PIXEL_PACK_BUFFER,this._pbo),m.readBuffer(m.COLOR_ATTACHMENT0),m.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),m.bindBuffer(m.PIXEL_PACK_BUFFER,null);const v=m.fenceSync(m.SYNC_GPU_COMMANDS_COMPLETE,0);m.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:v}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){const n=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Li(n)){const l=n.clientWaitSync(this._readbackQueue.sync,0,0);if(l===n.WAIT_FAILED)return o.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(l===n.TIMEOUT_EXPIRED)return;n.bindBuffer(n.PIXEL_PACK_BUFFER,this._pbo),n.getBufferSubData(n.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),n.bindBuffer(n.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),n.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=yl._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(n){let l=0;return l+=n[0]/256,l+=n[1]/65536,l+=n[2]/16777216,n[3]<127&&(l=-l),l/128}}const ys=o.$/128;function _f(_,n){const l=_.granularity!==void 0?Math.max(_.granularity,1):1,p=l+(_.generateBorders?2:0),m=l+(_.extendToNorthPole||_.generateBorders?1:0)+(_.extendToSouthPole||_.generateBorders?1:0),v=p+1,S=m+1,E=_.generateBorders?-1:0,A=_.generateBorders||_.extendToNorthPole?-1:0,z=l+(_.generateBorders?1:0),F=l+(_.generateBorders||_.extendToSouthPole?1:0),j=v*S,N=p*m*6,G=v*S>65536;if(G&&n==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");const Y=G||n==="32bit",ae=new Int16Array(2*j);let oe=0;for(let ve=A;ve<=F;ve++)for(let ge=E;ge<=z;ge++){let we=ge/l*o.$;ge===-1&&(we=-64),ge===l+1&&(we=o.$+ys);let Ce=ve/l*o.$;ve===-1&&(Ce=_.extendToNorthPole?o.bg:-64),ve===l+1&&(Ce=_.extendToSouthPole?o.bh:o.$+ys),ae[oe++]=we,ae[oe++]=Ce}const le=Y?new Uint32Array(N):new Uint16Array(N);let de=0;for(let ve=0;ve<m;ve++)for(let ge=0;ge<p;ge++){const we=ge+1+ve*v,Ce=ge+(ve+1)*v,ye=ge+1+(ve+1)*v;le[de++]=ge+ve*v,le[de++]=Ce,le[de++]=we,le[de++]=we,le[de++]=Ce,le[de++]=ye}return{vertices:ae.buffer.slice(0),indices:le.buffer.slice(0),uses32bitIndices:Y}}const Hs=new o.aJ({fill:new o.bi(128,2),line:new o.bi(512,0),tile:new o.bi(128,32),stencil:new o.bi(128,1),circle:3});class wg{constructor(){this._tileMeshCache={},this._errorCorrectionUsable=0,this._errorMeasurementLastValue=0,this._errorCorrectionPreviousValue=0,this._errorMeasurementLastChangeTime=-1e3}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return Gs.projectionGlobe}get vertexShaderPreludeCode(){return Gs.projectionMercator.vertexSource}get subdivisionGranularity(){return Hs}get useGlobeControls(){return!0}get latitudeErrorCorrectionRadians(){return this._errorCorrectionUsable}destroy(){this._errorMeasurement&&this._errorMeasurement.destroy()}updateGPUdependent(n){this._errorMeasurement||(this._errorMeasurement=new yl(n));const l=o.U(this._errorQueryLatitudeDegrees),p=2*Math.atan(Math.exp(Math.PI-l*Math.PI*2))-.5*Math.PI,m=this._errorMeasurement.updateErrorLoop(l,p),v=M.now();m!==this._errorMeasurementLastValue&&(this._errorCorrectionPreviousValue=this._errorCorrectionUsable,this._errorMeasurementLastValue=m,this._errorMeasurementLastChangeTime=v);const S=Math.min(Math.max((v-this._errorMeasurementLastChangeTime)/1e3/.5,0),1);this._errorCorrectionUsable=o.bj(this._errorCorrectionPreviousValue,-this._errorMeasurementLastValue,o.bk(S))}_getMeshKey(n){return`${n.granularity.toString(36)}_${n.generateBorders?"b":""}${n.extendToNorthPole?"n":""}${n.extendToSouthPole?"s":""}`}getMeshFromTileID(n,l,p,m,v){const S=(v==="stencil"?Hs.stencil:Hs.tile).getGranularityForZoomLevel(l.z);return this._getMesh(n,{granularity:S,generateBorders:p,extendToNorthPole:l.y===0&&m,extendToSouthPole:l.y===(1<<l.z)-1&&m})}_getMesh(n,l){const p=this._getMeshKey(l);if(p in this._tileMeshCache)return this._tileMeshCache[p];const m=function(v,S){const E=_f(S,"16bit"),A=o.aK.deserialize({arrayBuffer:E.vertices,length:E.vertices.byteLength/2/2}),z=o.aM.deserialize({arrayBuffer:E.indices,length:E.indices.byteLength/2/3});return new po(v.createVertexBuffer(A,mo.members),v.createIndexBuffer(z),o.aL.simpleSegment(0,0,A.length,z.length))}(n,l);return this._tileMeshCache[p]=m,m}recalculate(n){}hasTransition(){const n=M.now();let l=!1;return l=l||(n-this._errorMeasurementLastChangeTime)/1e3<.7,l=l||this._errorMeasurement&&this._errorMeasurement.awaitingQuery,l}setErrorQueryLatitudeDegrees(n){this._errorQueryLatitudeDegrees=n}}const Sg=new o.r({type:new o.D(o.v.projection.type)});class Ac extends o.E{constructor(n){super(),this._transitionable=new o.t(Sg),this.setProjection(n),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new o.F(0)),this._mercatorProjection=new gf,this._verticalPerspectiveProjection=new wg}get transitionState(){const n=this.properties.get("type");if(typeof n=="string"&&n==="mercator")return 0;if(typeof n=="string"&&n==="vertical-perspective")return 1;if(n instanceof o.bl){if(n.from==="vertical-perspective"&&n.to==="mercator")return 1-n.transition;if(n.from==="mercator"&&n.to==="vertical-perspective")return n.transition}return 1}get useGlobeRendering(){return this.transitionState>0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(n){this._mercatorProjection.updateGPUdependent(n),this._verticalPerspectiveProjection.updateGPUdependent(n)}getMeshFromTileID(n,l,p,m,v){return this.currentProjection.getMeshFromTileID(n,l,p,m,v)}setProjection(n){this._transitionable.setValue("type",(n==null?void 0:n.type)||"mercator")}updateTransitions(n){this._transitioning=this._transitionable.transitioned(n,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(n){this.properties=this._transitioning.possiblyEvaluate(n)}setErrorQueryLatitudeDegrees(n){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(n),this._mercatorProjection.setErrorQueryLatitudeDegrees(n)}}function Mc(_){const n=_l(_.worldSize,_.center.lat);return 2*Math.PI*n}function Es(_,n,l,p,m){const v=1/(1<<m),S=n/o.$*v+p*v,E=o.bn((_/o.$*v+l*v)*Math.PI*2+Math.PI,2*Math.PI),A=2*Math.atan(Math.exp(Math.PI-S*Math.PI*2))-.5*Math.PI,z=Math.cos(A),F=new Float64Array(3);return F[0]=Math.sin(E)*z,F[1]=Math.sin(A),F[2]=Math.cos(E)*z,F}function ei(_){return function(n,l){const p=Math.cos(l),m=new Float64Array(3);return m[0]=Math.sin(n)*p,m[1]=Math.sin(l),m[2]=Math.cos(n)*p,m}(_.lng*Math.PI/180,_.lat*Math.PI/180)}function _l(_,n){return _/(2*Math.PI)/Math.cos(n*Math.PI/180)}function Rc(_){const n=Math.asin(_[1])/Math.PI*180,l=Math.sqrt(_[0]*_[0]+_[2]*_[2]);if(l>1e-6){const p=_[0]/l,m=Math.acos(_[2]/l),v=(p>0?m:-m)/Math.PI*180;return new o.S(o.aN(v,-180,180),n)}return new o.S(0,n)}function vl(_){return Math.cos(_*Math.PI/180)}function Vn(_,n){const l=vl(_),p=vl(n);return o.aj(p/l)}function Lc(_,n){const l=_.rotate(n.bearingInRadians),p=n.zoom+Vn(n.center.lat,0),m=o.bj(1/vl(n.center.lat),1/vl(Math.min(Math.abs(n.center.lat),60)),o.bm(p,7,3,0,1)),v=360/Mc({worldSize:n.worldSize,center:{lat:n.center.lat}});return new o.S(n.center.lng-l.x*v*m,o.ag(n.center.lat+l.y*v,-85.051129,o.ah))}function bl(_){const n=.5*_,l=Math.sin(n),p=Math.cos(n);return Math.log(l+p)-Math.log(p-l)}function xl(_,n,l,p){const m=_.lat+l*p;if(Math.abs(l)>1){const v=(Math.sign(_.lat+l)!==Math.sign(_.lat)?-Math.abs(_.lat):Math.abs(_.lat))*Math.PI/180,S=Math.abs(_.lat+l)*Math.PI/180,E=bl(v+p*(S-v)),A=bl(v),z=bl(S);return new o.S(_.lng+n*((E-A)/(z-A)),m)}return new o.S(_.lng+n*p,m)}class w0{constructor(n){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=n}swapBuffers(){if(!this._hadAnyChanges)return;const n=this._cachePrevious;this._cachePrevious=this._cache,this._cache=n,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(n,l,p,m){const v=`${n.z}_${n.x}_${n.y}_${m!=null&&m.terrain?"t":""}`,S=this._cache.get(v);if(S)return S;const E=this._cachePrevious.get(v);if(E)return this._cache.set(v,E),E;const A=this._boundingVolumeFactory(n,l,p,m);return this._cache.set(v,A),this._hadAnyChanges=!0,A}}class Wo{constructor(n,l,p,m){this.min=p,this.max=m,this.points=n,this.planes=l}static fromAabb(n,l){const p=[];for(let m=0;m<8;m++)p.push([1&~m?n[0]:l[0],(m>>1&1)==1?l[1]:n[1],(m>>2&1)==1?l[2]:n[2]]);return new Wo(p,[[-1,0,0,l[0]],[1,0,0,-n[0]],[0,-1,0,l[1]],[0,1,0,-n[1]],[0,0,-1,l[2]],[0,0,1,-n[2]]],n,l)}static fromCenterSizeAngles(n,l,p){const m=o.bq([],p[0],p[1],p[2]),v=o.br([],[l[0],0,0],m),S=o.br([],[0,l[1],0],m),E=o.br([],[0,0,l[2]],m),A=[...n],z=[...n];for(let j=0;j<8;j++)for(let N=0;N<3;N++){const G=n[N]+v[N]*(1&~j?-1:1)+S[N]*((j>>1&1)==1?1:-1)+E[N]*((j>>2&1)==1?1:-1);A[N]=Math.min(A[N],G),z[N]=Math.max(z[N],G)}const F=[];for(let j=0;j<8;j++){const N=[...n];o.aR(N,N,o.aQ([],v,1&~j?-1:1)),o.aR(N,N,o.aQ([],S,(j>>1&1)==1?1:-1)),o.aR(N,N,o.aQ([],E,(j>>2&1)==1?1:-1)),F.push(N)}return new Wo(F,[[...v,-o.aW(v,F[0])],[...S,-o.aW(S,F[0])],[...E,-o.aW(E,F[0])],[-v[0],-v[1],-v[2],-o.aW(v,F[7])],[-S[0],-S[1],-S[2],-o.aW(S,F[7])],[-E[0],-E[1],-E[2],-o.aW(E,F[7])]],A,z)}intersectsFrustum(n){let l=!0;const p=this.points.length,m=this.planes.length,v=n.planes.length,S=n.points.length;for(let E=0;E<v;E++){const A=n.planes[E];let z=0;for(let F=0;F<p;F++){const j=this.points[F];A[0]*j[0]+A[1]*j[1]+A[2]*j[2]+A[3]>=0&&z++}if(z===0)return 0;z<p&&(l=!1)}if(l)return 2;for(let E=0;E<m;E++){const A=this.planes[E];let z=0;for(let F=0;F<S;F++){const j=n.points[F];A[0]*j[0]+A[1]*j[1]+A[2]*j[2]+A[3]>=0&&z++}if(z===0)return 0}return 1}intersectsPlane(n){const l=this.points.length;let p=0;for(let m=0;m<l;m++){const v=this.points[m];n[0]*v[0]+n[1]*v[1]+n[2]*v[2]+n[3]>=0&&p++}return p===l?2:p===0?0:1}}function zc(_,n,l){const p=_-n;return p<0?-p:Math.max(0,p-l)}function vf(_,n,l,p,m){const v=_-l;let S;return S=v<0?Math.min(-v,1+v-m):v>1?Math.min(Math.max(v-m,0),1-v):0,Math.max(S,zc(n,p,m))}class S0{constructor(){this._boundingVolumeCache=new w0(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(n,l,p,m){const v=1<<p.z,S=1/v,E=p.x/v,A=p.y/v;let z=2;return z=Math.min(z,vf(n,l,E,A,S)),z=Math.min(z,vf(n,l,E+.5,-A-S,S)),z=Math.min(z,vf(n,l,E+.5,2-A-S,S)),z}getWrap(n,l,p){const m=1<<l.z,v=1/m,S=l.x/m,E=zc(n.x,S,v),A=zc(n.x,S-1,v),z=zc(n.x,S+1,v),F=Math.min(E,A,z);return F===z?1:F===A?-1:0}allowVariableZoom(n,l){return Qe(n,l)>4}allowWorldCopies(){return!1}getTileBoundingVolume(n,l,p,m){return this._boundingVolumeCache.getTileBoundingVolume(n,l,p,m)}_computeTileBoundingVolume(n,l,p,m){var v,S;let E=p,A=p;if(m!=null&&m.terrain){const z=new o.Z(n.z,l,n.z,n.x,n.y),F=m.terrain.getMinMaxElevation(z);E=(v=F.minElevation)!==null&&v!==void 0?v:p,A=(S=F.maxElevation)!==null&&S!==void 0?S:p}if(E/=o.bt,A/=o.bt,E+=1,A+=1,n.z<=0)return Wo.fromAabb([-A,-A,-A],[A,A,A]);if(n.z===1)return Wo.fromAabb([n.x===0?-A:0,n.y===0?0:-A,-A],[n.x===0?0:A,n.y===0?A:0,A]);{const z=[Es(0,0,n.x,n.y,n.z),Es(o.$,0,n.x,n.y,n.z),Es(o.$,o.$,n.x,n.y,n.z),Es(0,o.$,n.x,n.y,n.z)],F=[];for(const Ne of z)F.push(o.aQ([],Ne,A));if(A!==E)for(const Ne of z)F.push(o.aQ([],Ne,E));n.y===0&&F.push([0,1,0]),n.y===(1<<n.z)-1&&F.push([0,-1,0]);const j=[1,1,1],N=[-1,-1,-1];for(const Ne of F)for(let qe=0;qe<3;qe++)j[qe]=Math.min(j[qe],Ne[qe]),N[qe]=Math.max(N[qe],Ne[qe]);const G=Es(o.$/2,o.$/2,n.x,n.y,n.z),Y=o.aV([],[0,1,0],G);o.aU(Y,Y);const ae=o.aV([],G,Y);o.aU(ae,ae);const oe=o.aV([],z[2],z[1]);o.aU(oe,oe);const le=o.aV([],z[0],z[3]);o.aU(le,le),F.push(o.aQ([],G,A)),n.y>=(1<<n.z)/2&&F.push(o.aQ([],Es(o.$/2,0,n.x,n.y,n.z),A)),n.y<(1<<n.z)/2&&F.push(o.aQ([],Es(o.$/2,o.$,n.x,n.y,n.z),A));const de=zi(G,F),ve=zi(ae,F),ge=[-G[0],-G[1],-G[2],de.max],we=[G[0],G[1],G[2],-de.min],Ce=[-ae[0],-ae[1],-ae[2],ve.max],ye=[ae[0],ae[1],ae[2],-ve.min],Ae=[...oe,0],Ve=[...le,0],Be=[];return n.y===0?Be.push(o.bs(Ve,Ae,ge),o.bs(Ve,Ae,we)):Be.push(o.bs(Ce,Ae,ge),o.bs(Ce,Ae,we),o.bs(Ce,Ve,ge),o.bs(Ce,Ve,we)),n.y===(1<<n.z)-1?Be.push(o.bs(Ve,Ae,ge),o.bs(Ve,Ae,we)):Be.push(o.bs(ye,Ae,ge),o.bs(ye,Ae,we),o.bs(ye,Ve,ge),o.bs(ye,Ve,we)),new Wo(Be,[ge,we,Ce,ye,Ae,Ve],j,N)}}}function zi(_,n){let l=1/0,p=-1/0;for(const m of n){const v=o.aW(_,m);l=Math.min(l,v),p=Math.max(p,v)}return{min:l,max:p}}class wl{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(n){this._helper.setMinZoom(n)}setMaxZoom(n){this._helper.setMaxZoom(n)}setMinPitch(n){this._helper.setMinPitch(n)}setMaxPitch(n){this._helper.setMaxPitch(n)}setRenderWorldCopies(n){this._helper.setRenderWorldCopies(n)}setBearing(n){this._helper.setBearing(n)}setPitch(n){this._helper.setPitch(n)}setRoll(n){this._helper.setRoll(n)}setFov(n){this._helper.setFov(n)}setZoom(n){this._helper.setZoom(n)}setCenter(n){this._helper.setCenter(n)}setElevation(n){this._helper.setElevation(n)}setMinElevationForCurrentTile(n){this._helper.setMinElevationForCurrentTile(n)}setPadding(n){this._helper.setPadding(n)}interpolatePadding(n,l,p){return this._helper.interpolatePadding(n,l,p)}isPaddingEqual(n){return this._helper.isPaddingEqual(n)}resize(n,l){this._helper.resize(n,l)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(n){this._helper.setMaxBounds(n)}overrideNearFarZ(n,l){this._helper.overrideNearFarZ(n,l)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(n){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),n)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(n){}constructor(){this._cachedClippingPlane=o.bu(),this._projectionMatrix=o.b8(),this._globeViewProjMatrix32f=o.b7(),this._globeViewProjMatrixNoCorrection=o.b8(),this._globeViewProjMatrixNoCorrectionInverted=o.b8(),this._globeProjMatrixInverted=o.b8(),this._cameraPosition=o.bo(),this._globeLatitudeErrorCorrectionRadians=0,this._helper=new Pc({calcMatrices:()=>{this._calcMatrices()},getConstrained:(n,l)=>this.getConstrained(n,l)}),this._coveringTilesDetailsProvider=new S0}clone(){const n=new wl;return n.apply(this),n}apply(n,l){this._globeLatitudeErrorCorrectionRadians=l||0,this._helper.apply(n)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){const n=o.bo();return n[0]=this._cameraPosition[0],n[1]=this._cameraPosition[1],n[2]=this._cameraPosition[2],n}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(n){const{overscaledTileID:l,applyGlobeMatrix:p}=n,m=this._helper.getMercatorTileCoordinates(l);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:m,clippingPlane:this._cachedClippingPlane,projectionTransition:p?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(n){const l=this.pitchInRadians,p=this.cameraToCenterDistance/n,m=Math.sin(l)*p,v=Math.cos(l)*p+1,S=1/Math.sqrt(m*m+v*v)*1;let E=-m,A=v;const z=Math.sqrt(E*E+A*A);E/=z,A/=z;const F=[0,E,A];o.bv(F,F,[0,0,0],-this.bearingInRadians),o.bw(F,F,[0,0,0],-1*this.center.lat*Math.PI/180),o.bx(F,F,[0,0,0],this.center.lng*Math.PI/180);const j=1/o.aY(F);return o.aQ(F,F,j),[...F,-S*j]}isLocationOccluded(n){return!this.isSurfacePointVisible(ei(n))}transformLightDirection(n){const l=this._helper._center.lng*Math.PI/180,p=this._helper._center.lat*Math.PI/180,m=Math.cos(p),v=[Math.sin(l)*m,Math.sin(p),Math.cos(l)*m],S=[v[2],0,-v[0]],E=[0,0,0];o.aV(E,S,v),o.aU(S,S),o.aU(E,E);const A=[0,0,0];return o.aU(A,[S[0]*n[0]+E[0]*n[1]+v[0]*n[2],S[1]*n[0]+E[1]*n[1]+v[1]*n[2],S[2]*n[0]+E[2]*n[1]+v[2]*n[2]]),A}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(n,l,p){const m=function(E,A,z){const F=1/(1<<z.z);return new o.a0(E/o.$*F+z.x*F,A/o.$*F+z.y*F)}(n,l,p.canonical),v=(S=m.y,[o.bn(m.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-S*Math.PI*2))-.5*Math.PI]);var S;return this.getCircleRadiusCorrection()/Math.cos(v[1])}projectTileCoordinates(n,l,p,m){const v=p.canonical,S=Es(n,l,v.x,v.y,v.z),E=1+(m?m(n,l):0)/o.bt,A=[S[0]*E,S[1]*E,S[2]*E,1];o.av(A,A,this._globeViewProjMatrixNoCorrection);const z=this._cachedClippingPlane,F=z[0]*S[0]+z[1]*S[1]+z[2]*S[2]+z[3]<0;return{point:new o.P(A[0]/A[3],A[1]/A[3]),signedDistanceFromCamera:A[3],isOccluded:F}}
vendor: 4,155 bytes, line 815
815_calcMatrices(){if(!this._helper._width||!this._helper._height)return;const n=_l(this.worldSize,this.center.lat),l=o.b9(),p=o.b9();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*n),o.b3(l,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);const m=this.centerOffset;l[8]=2*-m.x/this._helper._width,l[9]=2*m.y/this._helper._height,this._projectionMatrix=o.b4(l),this._globeProjMatrixInverted=o.b9(),o.ap(this._globeProjMatrixInverted,l),o.M(l,l,[0,0,-this.cameraToCenterDistance]),o.b5(l,l,this.rollInRadians),o.b6(l,l,-this.pitchInRadians),o.b5(l,l,this.bearingInRadians),o.M(l,l,[0,0,-n]);const v=o.bo();v[0]=n,v[1]=n,v[2]=n,o.b6(p,l,this.center.lat*Math.PI/180),o.by(p,p,-this.center.lng*Math.PI/180),o.N(p,p,v),this._globeViewProjMatrixNoCorrection=p,o.b6(l,l,this.center.lat*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),o.by(l,l,-this.center.lng*Math.PI/180),o.N(l,l,v),this._globeViewProjMatrix32f=new Float32Array(l),this._globeViewProjMatrixNoCorrectionInverted=o.b9(),o.ap(this._globeViewProjMatrixNoCorrectionInverted,p);const S=o.bo();this._cameraPosition=o.bo(),this._cameraPosition[2]=this.cameraToCenterDistance/n,o.bv(this._cameraPosition,this._cameraPosition,S,-this.rollInRadians),o.bw(this._cameraPosition,this._cameraPosition,S,this.pitchInRadians),o.bv(this._cameraPosition,this._cameraPosition,S,-this.bearingInRadians),o.aR(this._cameraPosition,this._cameraPosition,[0,0,1]),o.bw(this._cameraPosition,this._cameraPosition,S,-this.center.lat*Math.PI/180),o.bx(this._cameraPosition,this._cameraPosition,S,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(n);const E=o.b4(this._globeViewProjMatrixNoCorrectionInverted);o.N(E,E,[1,1,-1]),this._cachedFrustum=Ti.fromInvProjectionMatrix(E,1,0,this._cachedClippingPlane,!0)}calculateFogMatrix(n){o.w("calculateFogMatrix is not supported on globe projection.");const l=o.b9();return o.af(l),l}getVisibleUnwrappedCoordinates(n){return[new o.b1(0,n)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(n){n&&o.w("terrain is not fully supported on vertical perspective projection."),this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(n,l){if(!this._globeViewProjMatrixNoCorrection)return 1;const p=ei(n);o.aQ(p,p,1+l/o.bt);const m=o.bu();return o.av(m,[p[0],p[1],p[2],1],this._globeViewProjMatrixNoCorrection),m[2]/m[3]}populateCache(n){}getBounds(){const n=.5*this.width,l=.5*this.height,p=[new o.P(0,0),new o.P(n,0),new o.P(this.width,0),new o.P(this.width,l),new o.P(this.width,this.height),new o.P(n,this.height),new o.P(0,this.height),new o.P(0,l)],m=[];for(const j of p)m.push(this.unprojectScreenPoint(j));let v=0,S=0,E=0,A=0;const z=this.center;for(const j of m){const N=o.bz(z.lng,j.lng),G=o.bz(z.lat,j.lat);N<S&&(S=N),N>v&&(v=N),G<A&&(A=G),G>E&&(E=G)}const F=[z.lng+S,z.lat+A,z.lng+v,z.lat+E];return this.isSurfacePointOnScreen([0,1,0])&&(F[3]=90,F[0]=-180,F[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(F[1]=-90,F[0]=-180,F[2]=180),new ue(F)}getConstrained(n,l){const p=o.ag(n.lat,-85.051129,o.ah),m=o.ag(+l,this.minZoom+Vn(0,p),this.maxZoom);return{center:new o.S(n.lng,p),zoom:m}}calculateCenterFromCameraLngLatAlt(n,l,p,m){return this._helper.calculateCenterFromCameraLngLatAlt(n,l,p,m)}setLocationAtPoint(n,l){const p=ei(this.unprojectScreenPoint(l)),m=ei(n),v=o.bo();o.bA(v);const S=o.bo();o.bx(S,p,v,-this.center.lng*Math.PI/180),o.bw(S,S,v,this.center.lat*Math.PI/180);const E=m[0]*m[0]+m[2]*m[2],A=S[0]*S[0];if(E<A)return;const z=Math.sqrt(E-A),F=-z,j=o.bB(m[0],m[2],S[0],z),N=o.bB(m[0],m[2],S[0],F),G=o.bo();o.bx(G,m,v,-j);const Y=o.bB(G[1],G[2],S[1],S[2]),ae=o.bo();o.bx(ae,m,v,-N);const oe=o.bB(ae[1],ae[2],S[1],S[2]),le=.5*Math.PI,de=Y>=-le&&Y<=le,ve=oe>=-le&&oe<=le;let ge,we;
vendor: 10,841 bytes, line 815
815if(de&&ve){const Ve=this.center.lng*Math.PI/180,Be=this.center.lat*Math.PI/180;o.bC(j,Ve)+o.bC(Y,Be)<o.bC(N,Ve)+o.bC(oe,Be)?(ge=j,we=Y):(ge=N,we=oe)}else if(de)ge=j,we=Y;else{if(!ve)return;ge=N,we=oe}const Ce=ge/Math.PI*180,ye=we/Math.PI*180,Ae=this.center.lat;this.setCenter(new o.S(Ce,o.ag(ye,-90,90))),this.setZoom(this.zoom+Vn(Ae,this.center.lat))}locationToScreenPoint(n,l){const p=ei(n);if(l){const m=l.getElevationForLngLatZoom(n,this._helper._tileZoom);o.aQ(p,p,1+m/o.bt)}return this._projectSurfacePointToScreen(p)}_projectSurfacePointToScreen(n){const l=o.bu();return o.av(l,[...n,1],this._globeViewProjMatrixNoCorrection),l[0]/=l[3],l[1]/=l[3],new o.P((.5*l[0]+.5)*this.width,(.5*-l[1]+.5)*this.height)}screenPointToMercatorCoordinate(n,l){if(l){const p=l.pointCoordinate(n);if(p)return p}return o.a0.fromLngLat(this.unprojectScreenPoint(n))}screenPointToLocation(n,l){var p;return(p=this.screenPointToMercatorCoordinate(n,l))===null||p===void 0?void 0:p.toLngLat()}isPointOnMapSurface(n,l){const p=this._cameraPosition,m=this.getRayDirectionFromPixel(n);return!!this.rayPlanetIntersection(p,m)}getRayDirectionFromPixel(n){const l=o.bu();l[0]=n.x/this.width*2-1,l[1]=-1*(n.y/this.height*2-1),l[2]=1,l[3]=1,o.av(l,l,this._globeViewProjMatrixNoCorrectionInverted),l[0]/=l[3],l[1]/=l[3],l[2]/=l[3];const p=o.bo();p[0]=l[0]-this._cameraPosition[0],p[1]=l[1]-this._cameraPosition[1],p[2]=l[2]-this._cameraPosition[2];const m=o.bo();return o.aU(m,p),m}isSurfacePointVisible(n){const l=this._cachedClippingPlane;return l[0]*n[0]+l[1]*n[1]+l[2]*n[2]+l[3]>=0}isSurfacePointOnScreen(n){if(!this.isSurfacePointVisible(n))return!1;const l=o.bu();return o.av(l,[...n,1],this._globeViewProjMatrixNoCorrection),l[0]/=l[3],l[1]/=l[3],l[2]/=l[3],l[0]>-1&&l[0]<1&&l[1]>-1&&l[1]<1&&l[2]>-1&&l[2]<1}rayPlanetIntersection(n,l){const p=o.aW(n,l),m=o.bo(),v=o.bo();o.aQ(v,l,p),o.aT(m,n,v);const S=1-o.aW(m,m);if(S<0)return null;const E=o.aW(n,n)-1,A=-p+(p<0?1:-1)*Math.sqrt(S),z=E/A,F=A;return{tMin:Math.min(z,F),tMax:Math.max(z,F)}}unprojectScreenPoint(n){const l=this._cameraPosition,p=this.getRayDirectionFromPixel(n),m=this.rayPlanetIntersection(l,p);if(m){const F=o.bo();o.aR(F,l,[p[0]*m.tMin,p[1]*m.tMin,p[2]*m.tMin]);const j=o.bo();return o.aU(j,F),Rc(j)}const v=this._cachedClippingPlane,S=v[0]*p[0]+v[1]*p[1]+v[2]*p[2],E=-o.b0(v,l)/S,A=o.bo();if(E>0)o.aR(A,l,[p[0]*E,p[1]*E,p[2]*E]);else{const F=o.bo();o.aR(F,l,[2*p[0],2*p[1],2*p[2]]);const j=o.b0(this._cachedClippingPlane,F);o.aT(A,F,[this._cachedClippingPlane[0]*j,this._cachedClippingPlane[1]*j,this._cachedClippingPlane[2]*j])}const z=function(F){const j=o.bo();return j[0]=F[0]*-F[3],j[1]=F[1]*-F[3],j[2]=F[2]*-F[3],{center:j,radius:Math.sqrt(1-F[3]*F[3])}}(v);return Rc(function(F,j,N){const G=o.bo();o.aT(G,N,F);const Y=o.bo();return o.bp(Y,F,G,j/o.a_(G)),Y}(z.center,z.radius,A))}getMatrixForModel(n,l){const p=o.S.convert(n),m=1/o.bt,v=o.b8();return o.by(v,v,p.lng/180*Math.PI),o.b6(v,v,-p.lat/180*Math.PI),o.M(v,v,[0,0,1+l/o.bt]),o.b6(v,v,.5*Math.PI),o.N(v,v,[m,m,m]),v}getProjectionDataForCustomLayer(n=!0){const l=this.getProjectionData({overscaledTileID:new o.Z(0,0,0,0,0),applyGlobeMatrix:n});return l.tileMercatorCoords=[0,0,1,1],l}getFastPathSimpleProjectionMatrix(n){}}class ns{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(n){this._helper.setMinZoom(n)}setMaxZoom(n){this._helper.setMaxZoom(n)}setMinPitch(n){this._helper.setMinPitch(n)}setMaxPitch(n){this._helper.setMaxPitch(n)}setRenderWorldCopies(n){this._helper.setRenderWorldCopies(n)}setBearing(n){this._helper.setBearing(n)}setPitch(n){this._helper.setPitch(n)}setRoll(n){this._helper.setRoll(n)}setFov(n){this._helper.setFov(n)}setZoom(n){this._helper.setZoom(n)}setCenter(n){this._helper.setCenter(n)}setElevation(n){this._helper.setElevation(n)}setMinElevationForCurrentTile(n){this._helper.setMinElevationForCurrentTile(n)}setPadding(n){this._helper.setPadding(n)}interpolatePadding(n,l,p){return this._helper.interpolatePadding(n,l,p)}isPaddingEqual(n){return this._helper.isPaddingEqual(n)}resize(n,l,p=!0){this._helper.resize(n,l,p)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(n){this._helper.setMaxBounds(n)}overrideNearFarZ(n,l){this._helper.overrideNearFarZ(n,l)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(n){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),n)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(n,l){this._globeness=n,this._globeLatitudeErrorCorrectionRadians=l,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this._helper=new Pc({calcMatrices:()=>{this._calcMatrices()},getConstrained:(n,l)=>this.getConstrained(n,l)}),this._globeness=1,this._mercatorTransform=new Un,this._verticalPerspectiveTransform=new wl}clone(){const n=new ns;return n._globeness=this._globeness,n._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,n.apply(this),n}apply(n){this._helper.apply(n),this._mercatorTransform.apply(this),this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(n){const l=this._mercatorTransform.getProjectionData(n),p=this._verticalPerspectiveTransform.getProjectionData(n);return{mainMatrix:this.isGlobeRendering?p.mainMatrix:l.mainMatrix,clippingPlane:p.clippingPlane,tileMercatorCoords:p.tileMercatorCoords,projectionTransition:n.applyGlobeMatrix?this._globeness:0,fallbackMatrix:l.fallbackMatrix}}isLocationOccluded(n){return this.currentTransform.isLocationOccluded(n)}transformLightDirection(n){return this.currentTransform.transformLightDirection(n)}getPixelScale(){return o.bj(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return o.bj(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(n,l,p){const m=this._mercatorTransform.getPitchedTextCorrection(n,l,p),v=this._verticalPerspectiveTransform.getPitchedTextCorrection(n,l,p);return o.bj(m,v,this._globeness)}projectTileCoordinates(n,l,p,m){return this.currentTransform.projectTileCoordinates(n,l,p,m)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(n){return this.currentTransform.calculateFogMatrix(n)}getVisibleUnwrappedCoordinates(n){return this.currentTransform.getVisibleUnwrappedCoordinates(n)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(n){this._mercatorTransform.recalculateZoomAndCenter(n),this._verticalPerspectiveTransform.recalculateZoomAndCenter(n)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(n,l){return this.currentTransform.lngLatToCameraDepth(n,l)}populateCache(n){this._mercatorTransform.populateCache(n),this._verticalPerspectiveTransform.populateCache(n)}getBounds(){return this.currentTransform.getBounds()}getConstrained(n,l){return this.currentTransform.getConstrained(n,l)}calculateCenterFromCameraLngLatAlt(n,l,p,m){return this._helper.calculateCenterFromCameraLngLatAlt(n,l,p,m)}setLocationAtPoint(n,l){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(n,l),void this.apply(this._mercatorTransform);this._verticalPerspectiveTransform.setLocationAtPoint(n,l),this.apply(this._verticalPerspectiveTransform)}locationToScreenPoint(n,l){return this.currentTransform.locationToScreenPoint(n,l)}screenPointToMercatorCoordinate(n,l){return this.currentTransform.screenPointToMercatorCoordinate(n,l)}screenPointToLocation(n,l){return this.currentTransform.screenPointToLocation(n,l)}
vendor: 2,610 bytes, line 815
815isPointOnMapSurface(n,l){return this.currentTransform.isPointOnMapSurface(n,l)}getRayDirectionFromPixel(n){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(n)}getMatrixForModel(n,l){return this.currentTransform.getMatrixForModel(n,l)}getProjectionDataForCustomLayer(n=!0){const l=this._mercatorTransform.getProjectionDataForCustomLayer(n);if(!this.isGlobeRendering)return l;const p=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(n);return p.fallbackMatrix=l.mainMatrix,p}getFastPathSimpleProjectionMatrix(n){return this.currentTransform.getFastPathSimpleProjectionMatrix(n)}}class qi{get useGlobeControls(){return!0}handlePanInertia(n,l){const p=Lc(n,l);return Math.abs(p.lng-l.center.lng)>180&&(p.lng=l.center.lng+179.5*Math.sign(p.lng-l.center.lng)),{easingCenter:p,easingOffset:new o.P(0,0)}}handleMapControlsRollPitchBearingZoom(n,l){const p=n.around,m=l.screenPointToLocation(p);n.bearingDelta&&l.setBearing(l.bearing+n.bearingDelta),n.pitchDelta&&l.setPitch(l.pitch+n.pitchDelta),n.rollDelta&&l.setRoll(l.roll+n.rollDelta);const v=l.zoom;n.zoomDelta&&l.setZoom(l.zoom+n.zoomDelta);const S=l.zoom-v;if(S===0)return;const E=o.bz(l.center.lng,m.lng),A=E/(Math.abs(E/180)+1),z=o.bz(l.center.lat,m.lat),F=l.getRayDirectionFromPixel(p),j=l.cameraPosition,N=-1*o.aW(j,F),G=o.bo();o.aR(G,j,[F[0]*N,F[1]*N,F[2]*N]);const Y=o.aY(G)-1,ae=Math.exp(.5*-Math.max(Y-.3,0)),oe=_l(l.worldSize,l.center.lat)/Math.min(l.width,l.height),le=o.bm(oe,.9,.5,1,.25),de=(1-o.ae(-S))*Math.min(ae,le),ve=l.center.lat,ge=l.zoom,we=new o.S(l.center.lng+A*de,o.ag(l.center.lat+z*de,-85.051129,o.ah));l.setLocationAtPoint(m,p);const Ce=l.center,ye=o.bm(Math.abs(E),45,85,0,1),Ae=o.bm(oe,.75,.35,0,1),Ve=Math.pow(Math.max(ye,Ae),.25),Be=o.bz(Ce.lng,we.lng),Ne=o.bz(Ce.lat,we.lat);l.setCenter(new o.S(Ce.lng+Be*Ve,Ce.lat+Ne*Ve).wrap()),l.setZoom(ge+Vn(ve,l.center.lat))}handleMapControlsPan(n,l,p){if(!n.panDelta)return;const m=l.center.lat,v=l.zoom;l.setCenter(Lc(n.panDelta,l).wrap()),l.setZoom(v+Vn(m,l.center.lat))}cameraForBoxAndBearing(n,l,p,m,v){const S=vn(n,l,p,m,v),E=l.left/v.width*2-1,A=(v.width-l.right)/v.width*2-1,z=l.top/v.height*-2+1,F=(v.height-l.bottom)/v.height*-2+1,j=o.bz(p.getWest(),p.getEast())<0,N=j?p.getEast():p.getWest(),G=j?p.getWest():p.getEast(),Y=Math.max(p.getNorth(),p.getSouth()),ae=Math.min(p.getNorth(),p.getSouth()),oe=N+.5*o.bz(N,G),le=Y+.5*o.bz(Y,ae),de=v.clone();de.setCenter(S.center),de.setBearing(S.bearing),de.setPitch(0),de.setRoll(0),de.setZoom(S.zoom);const ve=de.modelViewProjectionMatrix,ge=[ei(p.getNorthWest()),ei(p.getNorthEast()),ei(p.getSouthWest
vendor: 4,059 bytes, line 815
815()),ei(p.getSouthEast()),ei(new o.S(G,le)),ei(new o.S(N,le)),ei(new o.S(oe,Y)),ei(new o.S(oe,ae))],we=ei(S.center);let Ce=Number.POSITIVE_INFINITY;for(const ye of ge)E<0&&(Ce=qi.getLesserNonNegativeNonNull(Ce,qi.solveVectorScale(ye,we,ve,"x",E))),A>0&&(Ce=qi.getLesserNonNegativeNonNull(Ce,qi.solveVectorScale(ye,we,ve,"x",A))),z>0&&(Ce=qi.getLesserNonNegativeNonNull(Ce,qi.solveVectorScale(ye,we,ve,"y",z))),F<0&&(Ce=qi.getLesserNonNegativeNonNull(Ce,qi.solveVectorScale(ye,we,ve,"y",F)));if(Number.isFinite(Ce)&&Ce!==0)return S.zoom=de.zoom+o.aj(Ce),S;Ci()}handleJumpToCenterZoom(n,l){const p=n.center.lat,m=n.getConstrained(l.center?o.S.convert(l.center):n.center,n.zoom).center;n.setCenter(m.wrap());const v=l.zoom!==void 0?+l.zoom:n.zoom+Vn(p,m.lat);n.zoom!==v&&n.setZoom(v)}handleEaseTo(n,l){const p=n.zoom,m=n.center,v=n.padding,S={roll:n.roll,pitch:n.pitch,bearing:n.bearing},E={roll:l.roll===void 0?n.roll:l.roll,pitch:l.pitch===void 0?n.pitch:l.pitch,bearing:l.bearing===void 0?n.bearing:l.bearing},A=l.zoom!==void 0,z=!n.isPaddingEqual(l.padding);let F=!1;const j=l.center?o.S.convert(l.center):m,N=n.getConstrained(j,p).center;go(n,N);const G=n.clone();G.setCenter(N),G.setZoom(A?+l.zoom:p+Vn(m.lat,j.lat)),G.setBearing(l.bearing);const Y=new o.P(o.ag(n.centerPoint.x+l.offsetAsPoint.x,0,n.width),o.ag(n.centerPoint.y+l.offsetAsPoint.y,0,n.height));G.setLocationAtPoint(N,Y);const ae=(l.offset&&l.offsetAsPoint.mag())>0?G.center:N,oe=A?+l.zoom:p+Vn(m.lat,ae.lat),le=p+Vn(m.lat,0),de=oe+Vn(ae.lat,0),ve=o.bz(m.lng,ae.lng),ge=o.bz(m.lat,ae.lat),we=o.ae(de-le);return F=oe!==p,{easeFunc:Ce=>{if(o.bd(S,E)||Qn({startEulerAngles:S,endEulerAngles:E,tr:n,k:Ce,useSlerp:S.roll!=E.roll}),z&&n.interpolatePadding(v,l.padding,Ce),l.around)o.w("Easing around a point is not supported under globe projection."),n.setLocationAtPoint(l.around,l.aroundPoint);else{const ye=de>le?Math.min(2,we):Math.max(.5,we),Ae=Math.pow(ye,1-Ce),Ve=xl(m,ve,ge,Ce*Ae);n.setCenter(Ve.wrap())}if(F){const ye=o.C.number(le,de,Ce)+Vn(0,n.center.lat);n.setZoom(ye)}},isZooming:F,elevationCenter:ae}}handleFlyTo(n,l){const p=l.zoom!==void 0,m=n.center,v=n.zoom,S=n.padding,E=!n.isPaddingEqual(l.padding),A=n.getConstrained(o.S.convert(l.center||l.locationAtOffset),v).center,z=p?+l.zoom:n.zoom+Vn(n.center.lat,A.lat),F=n.clone();F.setCenter(A),F.setZoom(z),F.setBearing(l.bearing);const j=new o.P(o.ag(n.centerPoint.x+l.offsetAsPoint.x,0,n.width),o.ag(n.centerPoint.y+l.offsetAsPoint.y,0,n.height));F.setLocationAtPoint(A,j);const N=F.center;go(n,N);const G=function(ge,we,Ce){const ye=ei(we),Ae=ei(Ce),Ve=o.aW(ye,Ae),Be=Math.acos(Ve),Ne=Mc(ge);return Be/(2*Math.PI)*Ne}(n,m,N),Y=v+Vn(m.lat,0),ae=z+Vn(N.lat,0),oe=o.ae(ae-Y);let le;if(typeof l.minZoom=="number"){const ge=+l.minZoom+Vn(N.lat,0),we=Math.min(ge,Y,ae)+Vn(0,N.lat),Ce=n.getConstrained(N,we).zoom+Vn(N.lat,0);le=o.ae(Ce-Y)}const de=o.bz(m.lng,N.lng),ve=o.bz(m.lat,N.lat);return{easeFunc:(ge,we,Ce,ye)=>{const Ae=xl(m,de,ve,Ce);E&&n.interpolatePadding(S,l.padding,ge);const Ve=ge===1?N:Ae;n.setCenter(Ve.wrap());const Be=Y+o.aj(we);n.setZoom(ge===1?z:Be+Vn(0,Ve.lat))},scaleOfZoom:oe,targetCenter:N,scaleOfMinZoom:le,pixelPathLength:G}}static solveVectorScale(n,l,p,m,v){const S=m==="x"?[p[0],p[4],p[8],p[12]]:[p[1],p[5],p[9],p[13]],E=[p[3],p[7],p[11],p[15]],A=n[0]*S[0]+n[1]*S[1]+n[2]*S[2],z=n[0]*E[0]+n[1]*E[1]+n[2]*E[2],F=l[0]*S[0]+l[1]*S[1]+l[2]*S[2],j=l[0]*E[0]+l[1]*E[1]+l[2]*E[2];return F+v*z===A+v*j||E[3]*(A-F)+S[3]*(j-z)+A*j==F*z?null:(F+S[3]-v*j-v*E[3])/(F-A-v*j+v*z)}static getLesserNonNegativeNonNull(n,l){return l!==null&&l>=0&&l<n?l:n}}class bf{constructor(n){this._globe=n,this._mercatorCameraHelper=new ah,this._verticalPerspectiveCameraHelper=new qi}get useGlobeControls(){return this._globe.useGlobeRendering}get currentHelper(){return this.useGlobeControls?this._verticalPerspectiveCameraHelper:this._mercatorCameraHelper}handlePanInertia(n,l){return this.currentHelper.handlePanInertia(n,l)}handleMapControlsRollPitchBearingZoom(n,l){return this.currentHelper.handleMapControlsRollPitchBearingZoom(n,l)}
815handleMapControlsPan(n,l,p){this.currentHelper.handleMapControlsPan(n,l,p)}cameraForBoxAndBearing(n,l,p,m,v){return this.currentHelper.cameraForBoxAndBearing(n,l,p,m,v)}handleJumpToCenterZoom(n,l){this.currentHelper.handleJumpToCenterZoom(n,l)}handleEaseTo(n,l){return this.currentHelper.handleEaseTo(n,l)}handleFlyTo(n,l){return this.currentHelper.handleFlyTo(n,l)}}const Dc=(_,n)=>o.y(_,n&&n.filter(l=>l.identifier!=="source.canvas")),Sl=o.bD();class xf extends o.E{constructor(n,l={}){super(),this._rtlPluginLoaded=()=>{for(const p in this.sourceCaches){const m=this.sourceCaches[p].getSource().type;m!=="vector"&&m!=="geojson"||this.sourceCaches[p].reload()}},this.map=n,this.dispatcher=new zr(Or(),n._getMapId()),this.dispatcher.registerMessageHandler("GG",(p,m)=>this.getGlyphs(p,m)),this.dispatcher.registerMessageHandler("GI",(p,m)=>this.getImages(p,m)),this.imageManager=new Se,this.imageManager.setEventedParent(this),this.glyphManager=new Ze(n._requestManager,l.localIdeographFontFamily),this.lineAtlas=new lt(256,512),this.crossTileSymbolIndex=new ih,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new o.bE,this._loaded=!1,this._availableImages=[],this._globalState={},this._resetUpdates(),this.dispatcher.broadcast("SR",o.bF()),Qt().on(mt,this._rtlPluginLoaded),this.on("data",p=>{if(p.dataType!=="source"||p.sourceDataType!=="metadata")return;const m=this.sourceCaches[p.sourceId];if(!m)return;const v=m.getSource();if(v&&v.vectorLayerIds)for(const S in this._layers){const E=this._layers[S];E.source===v.id&&this._validateLayer(E)}})}setGlobalStateProperty(n,l){var p,m,v;this._checkLoaded();const S=l===null?(v=(m=(p=this.stylesheet.state)===null||p===void 0?void 0:p[n])===null||m===void 0?void 0:m.default)!==null&&v!==void 0?v:null:l;if(o.bG(S,this._globalState[n]))return this;this._globalState[n]=S;const E=this._findGlobalStateAffectedSources([n]);for(const A in this.sourceCaches)E.has(A)&&(this._reloadSource(A),this._changed=!0)}getGlobalState(){return this._globalState}setGlobalState(n){this._checkLoaded();const l=[];for(const m in n)!o.bG(this._globalState[m],n[m].default)&&(l.push(m),this._globalState[m]=n[m].default);const p=this._findGlobalStateAffectedSources(l);for(const m in this.sourceCaches)p.has(m)&&(this._reloadSource(m),this._changed=!0)}_findGlobalStateAffectedSources(n){if(n.length===0)return new Set;const l=new Set;for(const p in this._layers){const m=this._layers[p],v=m.getLayoutAffectingGlobalStateRefs();for(const S of n)v.has(S)&&l.add(m.source)}return l}loadURL(n,l={},p){this.fire(new o.l("dataloading",{dataType:"style"})),l.validate=typeof l.validate!="boolean"||l.validate;const m=this.map._requestManager.transformRequest(n,"Style");this._loadStyleRequest=new AbortController;const v=this._loadStyleRequest;o.j(m,this._loadStyleRequest).then(S=>{this._loadStyleRequest=null,this._load(S.data,l,p)}).catch(S=>{this._loadStyleRequest=null,S&&!v.signal.aborted&&this.fire(new o.k(S))})}loadJSON(n,l={},p){this.fire(new o.l("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,M.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,l.validate=l.validate!==!1,this._load(n,l,p)}).catch(()=>{})}loadEmpty(){this.fire(new o.l("dataloading",{dataType:"style"})),this._load(Sl,{validate:!1})}_load(n,l,p){var m,v,S;const E=l.transformStyle?l.transformStyle(p,n):n;if(!l.validate||!Dc(this,o.z(E))){this._loaded=!0,this.stylesheet=E;for(const A in E.sources)this.addSource(A,E.sources[A],{validate:!1});E.sprite?this._loadSprite(E.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(E.glyphs),this._createLayers(),this.light=new Pe(this.stylesheet.light),this._setProjectionInternal(((m=this.stylesheet.projection)===null||m===void 0?void 0:m.type)||"mercator"),this.sky=new Oe(this.stylesheet.sky),this.map.setTerrain((v=this.stylesheet.terrain)!==null&&v!==void 0?v:null),this.setGlobalState((S=this.stylesheet.state)!==null&&S!==void 0?S:null),this.fire(new o.l("data",{dataType:"style"})),this.fire(new o.l("style.load"))}}
vendor: 5,980 bytes, line 815
815_createLayers(){const n=o.bH(this.stylesheet.layers);this.dispatcher.broadcast("SL",n),this._order=n.map(l=>l.id),this._layers={},this._serializedLayers=null;for(const l of n){const p=o.bI(l);p.setEventedParent(this,{layer:{id:l.id}}),this._layers[l.id]=p}}_loadSprite(n,l=!1,p=void 0){let m;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(v,S,E,A){return o._(this,void 0,void 0,function*(){const z=te(v),F=E>1?"@2x":"",j={},N={};for(const{id:G,url:Y}of z){const ae=S.transformRequest(ce(Y,F,".json"),"SpriteJSON");j[G]=o.j(ae,A);const oe=S.transformRequest(ce(Y,F,".png"),"SpriteImage");N[G]=U.getImage(oe,A)}return yield Promise.all([...Object.values(j),...Object.values(N)]),function(G,Y){return o._(this,void 0,void 0,function*(){const ae={};for(const oe in G){ae[oe]={};const le=M.getImageCanvasContext((yield Y[oe]).data),de=(yield G[oe]).data;for(const ve in de){const{width:ge,height:we,x:Ce,y:ye,sdf:Ae,pixelRatio:Ve,stretchX:Be,stretchY:Ne,content:qe,textFitWidth:wt,textFitHeight:bt}=de[ve];ae[oe][ve]={data:null,pixelRatio:Ve,sdf:Ae,stretchX:Be,stretchY:Ne,content:qe,textFitWidth:wt,textFitHeight:bt,spriteData:{width:ge,height:we,x:Ce,y:ye,context:le}}}}return ae})}(j,N)})}(n,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(v=>{if(this._spriteRequest=null,v)for(const S in v){this._spritesImagesIds[S]=[];const E=this._spritesImagesIds[S]?this._spritesImagesIds[S].filter(A=>!(A in v)):[];for(const A of E)this.imageManager.removeImage(A),this._changedImages[A]=!0;for(const A in v[S]){const z=S==="default"?A:`${S}:${A}`;this._spritesImagesIds[S].push(z),z in this.imageManager.images?this.imageManager.updateImage(z,v[S][A],!1):this.imageManager.addImage(z,v[S][A]),l&&(this._changedImages[z]=!0)}}}).catch(v=>{this._spriteRequest=null,m=v,this.fire(new o.k(m))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),l&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new o.l("data",{dataType:"style"})),p&&p(m)})}_unloadSprite(){for(const n of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(n),this._changedImages[n]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new o.l("data",{dataType:"style"}))}_validateLayer(n){const l=this.sourceCaches[n.source];if(!l)return;const p=n.sourceLayer;if(!p)return;const m=l.getSource();(m.type==="geojson"||m.vectorLayerIds&&m.vectorLayerIds.indexOf(p)===-1)&&this.fire(new o.k(new Error(`Source layer "${p}" does not exist on source "${m.id}" as specified by style layer "${n.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const n in this.sourceCaches)if(!this.sourceCaches[n].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(n,l=!1){const p=this._serializedAllLayers();if(!n||n.length===0)return Object.values(l?o.bJ(p):p);const m=[];for(const v of n)if(p[v]){const S=l?o.bJ(p[v]):p[v];m.push(S)}return m}_serializedAllLayers(){let n=this._serializedLayers;if(n)return n;n=this._serializedLayers={};const l=Object.keys(this._layers);for(const p of l){const m=this._layers[p];m.type!=="custom"&&(n[p]=m.serialize())}return n}hasTransitions(){var n,l,p;if(!((n=this.light)===null||n===void 0)&&n.hasTransition()||!((l=this.sky)===null||l===void 0)&&l.hasTransition()||!((p=this.projection)===null||p===void 0)&&p.hasTransition())return!0;for(const m in this.sourceCaches)if(this.sourceCaches[m].hasTransition())return!0;for(const m in this._layers)if(this._layers[m].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(n){if(!this._loaded)return;const l=this._changed;if(l){const m=Object.keys(this._updatedLayers),v=Object.keys(this._removedLayers);(m.length||v.length)&&this._updateWorkerLayers(m,v);for(const S in this._updatedSources){const E=this._updatedSources[S];if(E==="reload")this._reloadSource(S);else{if(E!=="clear")throw new Error(`Invalid action ${E}`);this._clearSource(S)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const S in this._updatedPaintProps)this._layers[S].updateTransitions(n);this.light.updateTransitions(n),this.sky.updateTransitions(n),this._resetUpdates()}const p={};for(const m in this.sourceCaches){const v=this.sourceCaches[m];p[m]=v.used,v.used=!1}for(const m of this._order){const v=this._layers[m];v.recalculate(n,this._availableImages),!v.isHidden(n.zoom)&&v.source&&(this.sourceCaches[v.source].used=!0)}for(const m in p){const v=this.sourceCaches[m];!!p[m]!=!!v.used&&v.fire(new o.l("data",{sourceDataType:"visibility",dataType:"source",sourceId:m}))}this.light.recalculate(n),this.sky.recalculate(n),this.projection.recalculate(n),this.z=n.zoom,l&&this.fire(new o.l("data",{dataType:"style"}))}_updateTilesForChangedImages(){const n=Object.keys(this._changedImages);if(n.length){for(const l in this.sourceCaches)this.sourceCaches[l].reloadTilesForDependencies(["icons","patterns"],n);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const n in this.sourceCaches)this.sourceCaches[n].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(n,l){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(n,!1),removedIds:l})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(n,l={}){var p;this._checkLoaded();const m=this.serialize();if(n=l.transformStyle?l.transformStyle(m,n):n,((p=l.validate)===null||p===void 0||p)&&Dc(this,o.z(n)))return!1;(n=o.bJ(n)).layers=o.bH(n.layers);const v=o.bK(m,n),S=this._getOperationsToPerform(v);if(S.unimplemented.length>0)throw new Error(`Unimplemented: ${S.unimplemented.join(", ")}.`);
815if(S.operations.length===0)return!1;for(const E of S.operations)E();return this.stylesheet=n,this._serializedLayers=null,!0}_getOperationsToPerform(n){const l=[],p=[];for(const m of n)switch(m.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":l.push(()=>this.addLayer.apply(this,m.args));break;case"removeLayer":l.push(()=>this.removeLayer.apply(this,m.args));break;case"setPaintProperty":l.push(()=>this.setPaintProperty.apply(this,m.args));break;case"setLayoutProperty":l.push(()=>this.setLayoutProperty.apply(this,m.args));break;case"setFilter":l.push(()=>this.setFilter.apply(this,m.args));break;case"addSource":l.push(()=>this.addSource.apply(this,m.args));break;case"removeSource":l.push(()=>this.removeSource.apply(this,m.args));break;case"setLayerZoomRange":l.push(()=>this.setLayerZoomRange.apply(this,m.args));break;case"setLight":l.push(()=>this.setLight.apply(this,m.args));break;case"setGeoJSONSourceData":l.push(()=>this.setGeoJSONSourceData.apply(this,m.args));break;case"setGlyphs":l.push(()=>this.setGlyphs.apply(this,m.args));break;case"setSprite":l.push(()=>this.setSprite.apply(this,m.args));break;case"setTerrain":l.push(()=>this.map.setTerrain.apply(this,m.args));break;case"setSky":l.push(()=>this.setSky.apply(this,m.args));break;case"setProjection":this.setProjection.apply(this,m.args);break;case"setGlobalState":l.push(()=>this.setGlobalState.apply(this,m.args));break;case"setTransition":l.push(()=>{});break;default:p.push(m.command)}return{operations:l,unimplemented:p}}addImage(n,l){if(this.getImage(n))return this.fire(new o.k(new Error(`An image named "${n}" already exists.`)));this.imageManager.addImage(n,l),this._afterImageUpdated(n)}updateImage(n,l){this.imageManager.updateImage(n,l)}getImage(n){return this.imageManager.getImage(n)}removeImage(n){if(!this.getImage(n))return this.fire(new o.k(new Error(`An image named "${n}" does not exist.`)));this.imageManager.removeImage(n),this._afterImageUpdated(n)}_afterImageUpdated(n){this._availableImages=this.imageManager.listImages(),this._changedImages[n]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new o.l("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(n,l,p={}){if(this._checkLoaded(),this.sourceCaches[n]!==void 0)throw new Error(`Source "${n}" already exists.`);if(!l.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(l).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(l.type)>=0&&this._validate(o.z.source,`sources.${n}`,l,null,p))return;this.map&&this.map._collectResourceTiming&&(l.collectResourceTiming=!0);const m=this.sourceCaches[n]=new st(n,l,this.dispatcher);m.style=this,m.setEventedParent(this,()=>({isSourceLoaded:m.loaded(),source:m.serialize(),sourceId:n})),m.onAdd(this.map),this._changed=!0}removeSource(n){if(this._checkLoaded(),this.sourceCaches[n]===void 0)throw new Error("There is no source with this ID");for(const p in this._layers)if(this._layers[p].source===n)return this.fire(new o.k(new Error(`Source "${n}" cannot be removed while layer "${p}" is using it.`)));const l=this.sourceCaches[n];delete this.sourceCaches[n],delete this._updatedSources[n],l.fire(new o.l("data",{sourceDataType:"metadata",dataType:"source",sourceId:n})),l.setEventedParent(null),l.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(n,l){if(this._checkLoaded(),this.sourceCaches[n]===void 0)throw new Error(`There is no source with this ID=${n}`);const p=this.sourceCaches[n].getSource();if(p.type!=="geojson")throw new Error(`geojsonSource.type is ${p.type}, which is !== 'geojson`);p.setData(l),this._changed=!0}getSource(n){return this.sourceCaches[n]&&this.sourceCaches[n].getSource()}addLayer(n,l,p={}){this._checkLoaded();const m=n.id;if(this.getLayer(m))return void this.fire(new o.k(new Error(`Layer "${m}" already exists on this map.`)));let v;if(n.type==="custom"){if(Dc(this,o.bL(n)))return;v=o.bI(n)}else{if("source"in n&&typeof n.source=="object"&&(this.addSource(m,n.source),n=o.bJ(n),n=o.e(n,{source:m}
vendor: 6,103 bytes, line 815
815)),this._validate(o.z.layer,`layers.${m}`,n,{arrayIndex:-1},p))return;v=o.bI(n),this._validateLayer(v),v.setEventedParent(this,{layer:{id:m}})}const S=l?this._order.indexOf(l):this._order.length;if(l&&S===-1)this.fire(new o.k(new Error(`Cannot add layer "${m}" before non-existing layer "${l}".`)));else{if(this._order.splice(S,0,m),this._layerOrderChanged=!0,this._layers[m]=v,this._removedLayers[m]&&v.source&&v.type!=="custom"){const E=this._removedLayers[m];delete this._removedLayers[m],E.type!==v.type?this._updatedSources[v.source]="clear":(this._updatedSources[v.source]="reload",this.sourceCaches[v.source].pause())}this._updateLayer(v),v.onAdd&&v.onAdd(this.map)}}moveLayer(n,l){if(this._checkLoaded(),this._changed=!0,!this._layers[n])return void this.fire(new o.k(new Error(`The layer '${n}' does not exist in the map's style and cannot be moved.`)));if(n===l)return;const p=this._order.indexOf(n);this._order.splice(p,1);const m=l?this._order.indexOf(l):this._order.length;l&&m===-1?this.fire(new o.k(new Error(`Cannot move layer "${n}" before non-existing layer "${l}".`))):(this._order.splice(m,0,n),this._layerOrderChanged=!0)}removeLayer(n){this._checkLoaded();const l=this._layers[n];if(!l)return void this.fire(new o.k(new Error(`Cannot remove non-existing layer "${n}".`)));l.setEventedParent(null);const p=this._order.indexOf(n);this._order.splice(p,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[n]=l,delete this._layers[n],this._serializedLayers&&delete this._serializedLayers[n],delete this._updatedLayers[n],delete this._updatedPaintProps[n],l.onRemove&&l.onRemove(this.map)}getLayer(n){return this._layers[n]}getLayersOrder(){return[...this._order]}hasLayer(n){return n in this._layers}setLayerZoomRange(n,l,p){this._checkLoaded();const m=this.getLayer(n);m?m.minzoom===l&&m.maxzoom===p||(l!=null&&(m.minzoom=l),p!=null&&(m.maxzoom=p),this._updateLayer(m)):this.fire(new o.k(new Error(`Cannot set the zoom range of non-existing layer "${n}".`)))}setFilter(n,l,p={}){this._checkLoaded();const m=this.getLayer(n);if(m){if(!o.bG(m.filter,l))return l==null?(m.setFilter(void 0),void this._updateLayer(m)):void(this._validate(o.z.filter,`layers.${m.id}.filter`,l,null,p)||(m.setFilter(o.bJ(l)),this._updateLayer(m)))}else this.fire(new o.k(new Error(`Cannot filter non-existing layer "${n}".`)))}getFilter(n){return o.bJ(this.getLayer(n).filter)}setLayoutProperty(n,l,p,m={}){this._checkLoaded();const v=this.getLayer(n);v?o.bG(v.getLayoutProperty(l),p)||(v.setLayoutProperty(l,p,m),this._updateLayer(v)):this.fire(new o.k(new Error(`Cannot style non-existing layer "${n}".`)))}getLayoutProperty(n,l){const p=this.getLayer(n);if(p)return p.getLayoutProperty(l);this.fire(new o.k(new Error(`Cannot get style of non-existing layer "${n}".`)))}setPaintProperty(n,l,p,m={}){this._checkLoaded();const v=this.getLayer(n);v?o.bG(v.getPaintProperty(l),p)||(v.setPaintProperty(l,p,m)&&this._updateLayer(v),this._changed=!0,this._updatedPaintProps[n]=!0,this._serializedLayers=null):this.fire(new o.k(new Error(`Cannot style non-existing layer "${n}".`)))}getPaintProperty(n,l){return this.getLayer(n).getPaintProperty(l)}setFeatureState(n,l){this._checkLoaded();const p=n.source,m=n.sourceLayer,v=this.sourceCaches[p];if(v===void 0)return void this.fire(new o.k(new Error(`The source '${p}' does not exist in the map's style.`)));const S=v.getSource().type;S==="geojson"&&m?this.fire(new o.k(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):S!=="vector"||m?(n.id===void 0&&this.fire(new o.k(new Error("The feature id parameter must be provided."))),v.setFeatureState(m,n.id,l)):this.fire(new o.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(n,l){this._checkLoaded();const p=n.source,m=this.sourceCaches[p];if(m===void 0)return void this.fire(new o.k(new Error(`The source '${p}' does not exist in the map's style.`)));const v=m.getSource().type,S=v==="vector"?n.sourceLayer:void 0;v!=="vector"||S?l&&typeof n.id!="string"&&typeof n.id!="number"?this.fire(new o.k(new Error("A feature id is required to remove its specific state property."))):m.removeFeatureState(S,n.id,l):this.fire(new o.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(n){this._checkLoaded();const l=n.source,p=n.sourceLayer,m=this.sourceCaches[l];if(m!==void 0)return m.getSource().type!=="vector"||p?(n.id===void 0&&this.fire(new o.k(new Error("The feature id parameter must be provided."))),m.getFeatureState(p,n.id)):void this.fire(new o.k(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new o.k(new Error(`The source '${l}' does not exist in the map's style.`)))}getTransition(){return o.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const n=o.bM(this.sourceCaches,v=>v.serialize()),l=this._serializeByIds(this._order,!0),p=this.map.getTerrain()||void 0,m=this.stylesheet;return o.bN({version:m.version,name:m.name,metadata:m.metadata,light:m.light,sky:m.sky,center:m.center,zoom:m.zoom,bearing:m.bearing,pitch:m.pitch,sprite:m.sprite,glyphs:m.glyphs,transition:m.transition,projection:m.projection,sources:n,layers:l,terrain:p},v=>v!==void 0)}_updateLayer(n){this._updatedLayers[n.id]=!0,n.source&&!this._updatedSources[n.source]&&this.sourceCaches[n.source].getSource().type!=="raster"&&(this._updatedSources[n.source]="reload",this.sourceCaches[n.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(n){const l=S=>this._layers[S].type==="fill-extrusion",p={},m=[];for(let S=this._order.length-1;S>=0;S--){const E=this._order[S];if(l(E)){p[E]=S;for(const A of n){const z=A[E];if(z)for(const F of z)m.push(F)}}}m.sort((S,E)=>E.intersectionZ-S.intersectionZ);const v=[];for(let S=this._order.length-1;S>=0;S--){const E=this._order[S];if(l(E))for(let A=m.length-1;A>=0;A--){const z=m[A].feature;if(p[z.layer.id]<S)break;v.push(z),m.pop()}else for(const A of n){const z=A[E];if(z)for(const F of z)v.push(F.feature)}}return v}
vendor: 6,808 bytes, line 815
815queryRenderedFeatures(n,l,p){l&&l.filter&&this._validate(o.z.filter,"queryRenderedFeatures.filter",l.filter,null,l);const m={};if(l&&l.layers){if(!(Array.isArray(l.layers)||l.layers instanceof Set))return this.fire(new o.k(new Error("parameters.layers must be an Array or a Set of strings"))),[];for(const z of l.layers){const F=this._layers[z];if(!F)return this.fire(new o.k(new Error(`The layer '${z}' does not exist in the map's style and cannot be queried for features.`))),[];m[F.source]=!0}}const v=[];l.availableImages=this._availableImages;const S=this._serializedAllLayers(),E=l.layers instanceof Set?l.layers:Array.isArray(l.layers)?new Set(l.layers):null,A=Object.assign(Object.assign({},l),{layers:E});for(const z in this.sourceCaches)l.layers&&!m[z]||v.push(_t(this.sourceCaches[z],this._layers,S,n,A,p,this.map.terrain?(F,j,N)=>this.map.terrain.getElevation(F,j,N):void 0));return this.placement&&v.push(function(z,F,j,N,G,Y,ae){const oe={},le=Y.queryRenderedSymbols(N),de=[];for(const ve of Object.keys(le).map(Number))de.push(ae[ve]);de.sort(pt);for(const ve of de){const ge=ve.featureIndex.lookupSymbolFeatures(le[ve.bucketInstanceId],F,ve.bucketIndex,ve.sourceLayerIndex,G.filter,G.layers,G.availableImages,z);for(const we in ge){const Ce=oe[we]=oe[we]||[],ye=ge[we];ye.sort((Ae,Ve)=>{const Be=ve.featureSortOrder;if(Be){const Ne=Be.indexOf(Ae.featureIndex);return Be.indexOf(Ve.featureIndex)-Ne}return Ve.featureIndex-Ae.featureIndex});for(const Ae of ye)Ce.push(Ae)}}return function(ve,ge,we){for(const Ce in ve)for(const ye of ve[Ce])Nt(ye,we[ge[Ce].source]);return ve}(oe,z,j)}(this._layers,S,this.sourceCaches,n,A,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(v)}querySourceFeatures(n,l){l&&l.filter&&this._validate(o.z.filter,"querySourceFeatures.filter",l.filter,null,l);const p=this.sourceCaches[n];return p?function(m,v){const S=m.getRenderableIds().map(z=>m.getTileByID(z)),E=[],A={};for(let z=0;z<S.length;z++){const F=S[z],j=F.tileID.canonical.key;A[j]||(A[j]=!0,F.querySourceFeatures(E,v))}return E}(p,l):[]}getLight(){return this.light.getLight()}setLight(n,l={}){this._checkLoaded();const p=this.light.getLight();let m=!1;for(const S in n)if(!o.bG(n[S],p[S])){m=!0;break}if(!m)return;const v={now:M.now(),transition:o.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(n,l),this.light.updateTransitions(v)}getProjection(){var n;return(n=this.stylesheet)===null||n===void 0?void 0:n.projection}setProjection(n){if(this._checkLoaded(),this.projection){if(this.projection.name===n.type)return;this.projection.destroy(),delete this.projection}this.stylesheet.projection=n,this._setProjectionInternal(n.type)}getSky(){var n;return(n=this.stylesheet)===null||n===void 0?void 0:n.sky}setSky(n,l={}){this._checkLoaded();const p=this.getSky();let m=!1;if(!n&&!p)return;if(n&&!p)m=!0;else if(!n&&p)m=!0;else for(const S in n)if(!o.bG(n[S],p[S])){m=!0;break}if(!m)return;const v={now:M.now(),transition:o.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=n,this.sky.setSky(n,l),this.sky.updateTransitions(v)}_setProjectionInternal(n){const l=function(p){if(Array.isArray(p)){const m=new Ac({type:p});return{projection:m,transform:new ns,cameraHelper:new bf(m)}}switch(p){case"mercator":return{projection:new gf,transform:new Un,cameraHelper:new ah};case"globe":{const m=new Ac({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:m,transform:new ns,cameraHelper:new bf(m)}}case"vertical-perspective":return{projection:new wg,transform:new wl,cameraHelper:new qi};default:return o.w(`Unknown projection name: ${p}. Falling back to mercator projection.`),{projection:new gf,transform:new Un,cameraHelper:new ah}}}(n);this.projection=l.projection,this.map.migrateProjection(l.transform,l.cameraHelper);for(const p in this.sourceCaches)this.sourceCaches[p].reload()}_validate(n,l,p,m,v={}){return(!v||v.validate!==!1)&&Dc(this,n.call(o.z,o.e({key:l,style:this.serialize(),value:p,styleSpec:o.v},m)))}_remove(n=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),Qt().off(mt,this._rtlPluginLoaded);for(const l in this._layers)this._layers[l].setEventedParent(null);for(const l in this.sourceCaches){const p=this.sourceCaches[l];p.setEventedParent(null),p.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),n&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(n)}_clearSource(n){this.sourceCaches[n].clearTiles()}_reloadSource(n){this.sourceCaches[n].resume(),this.sourceCaches[n].reload()}_updateSources(n){for(const l in this.sourceCaches)this.sourceCaches[l].update(n,this.map.terrain)}_generateCollisionBoxes(){for(const n in this.sourceCaches)this._reloadSource(n)}_updatePlacement(n,l,p,m,v=!1){let S=!1,E=!1;const A={};for(const z of this._order){const F=this._layers[z];if(F.type!=="symbol")continue;if(!A[F.source]){const N=this.sourceCaches[F.source];A[F.source]=N.getRenderableIds(!0).map(G=>N.getTileByID(G)).sort((G,Y)=>Y.tileID.overscaledZ-G.tileID.overscaledZ||(G.tileID.isLessThan(Y.tileID)?-1:1))}const j=this.crossTileSymbolIndex.addLayer(F,A[F.source],n.center.lng);S=S||j}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((v=v||this._layerOrderChanged||p===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(M.now(),n.zoom))&&(this.pauseablePlacement=new bg(n,this.map.terrain,this._order,v,l,p,m,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,A),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(M.now()),E=!0),S&&this.pauseablePlacement.placement.setStale()),E||S)for(const z of this._order){const F=this._layers[z];F.type==="symbol"&&this.placement.updateLayerOpacities(F,A[F.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(M.now())}_releaseSymbolFadeTiles(){for(const n in this.sourceCaches)this.sourceCaches[n].releaseSymbolFadeTiles()}getImages(n,l){return o._(this,void 0,void 0,function*(){const p=yield this.imageManager.getImages(l.icons);this._updateTilesForChangedImages();const m=this.sourceCaches[l.source];return m&&m.setDependencies(l.tileID.key,l.type,l.icons),p})}getGlyphs(n,l){return o._(this,void 0,void 0,function*(){const p=yield this.glyphManager.getGlyphs(l.stacks),m=this.sourceCaches[l.source];return m&&m.setDependencies(l.tileID.key,l.type,[""]),p})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(n,l={}
815){this._checkLoaded(),n&&this._validate(o.z.glyphs,"glyphs",n,null,l)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=n,this.glyphManager.entries={},this.glyphManager.setURL(n))}addSprite(n,l,p={},m){this._checkLoaded();const v=[{id:n,url:l}],S=[...te(this.stylesheet.sprite),...v];this._validate(o.z.sprite,"sprite",S,null,p)||(this.stylesheet.sprite=S,this._loadSprite(v,!0,m))}removeSprite(n){this._checkLoaded();const l=te(this.stylesheet.sprite);if(l.find(p=>p.id===n)){if(this._spritesImagesIds[n])for(const p of this._spritesImagesIds[n])this.imageManager.removeImage(p),this._changedImages[p]=!0;l.splice(l.findIndex(p=>p.id===n),1),this.stylesheet.sprite=l.length>0?l:void 0,delete this._spritesImagesIds[n],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new o.l("data",{dataType:"style"}))}else this.fire(new o.k(new Error(`Sprite "${n}" doesn't exists on this map.`)))}getSprite(){return te(this.stylesheet.sprite)}setSprite(n,l={}
vendor: 5,387 bytes, lines 815-817
815,p){this._checkLoaded(),n&&this._validate(o.z.sprite,"sprite",n,null,l)||(this.stylesheet.sprite=n,n?this._loadSprite(n,!0,p):(this._unloadSprite(),p&&p(null)))}}var T0=o.aI([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class C0{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(n,l,p,m,v,S,E,A,z){this.context=n;let F=this.boundPaintVertexBuffers.length!==m.length;for(let j=0;!F&&j<m.length;j++)this.boundPaintVertexBuffers[j]!==m[j]&&(F=!0);!this.vao||this.boundProgram!==l||this.boundLayoutVertexBuffer!==p||F||this.boundIndexBuffer!==v||this.boundVertexOffset!==S||this.boundDynamicVertexBuffer!==E||this.boundDynamicVertexBuffer2!==A||this.boundDynamicVertexBuffer3!==z?this.freshBind(l,p,m,v,S,E,A,z):(n.bindVertexArray.set(this.vao),E&&E.bind(),v&&v.dynamicDraw&&v.bind(),A&&A.bind(),z&&z.bind())}freshBind(n,l,p,m,v,S,E,A){const z=n.numAttributes,F=this.context,j=F.gl;this.vao&&this.destroy(),this.vao=F.createVertexArray(),F.bindVertexArray.set(this.vao),this.boundProgram=n,this.boundLayoutVertexBuffer=l,this.boundPaintVertexBuffers=p,this.boundIndexBuffer=m,this.boundVertexOffset=v,this.boundDynamicVertexBuffer=S,this.boundDynamicVertexBuffer2=E,this.boundDynamicVertexBuffer3=A,l.enableAttributes(j,n);for(const N of p)N.enableAttributes(j,n);S&&S.enableAttributes(j,n),E&&E.enableAttributes(j,n),A&&A.enableAttributes(j,n),l.bind(),l.setVertexAttribPointers(j,n,v);for(const N of p)N.bind(),N.setVertexAttribPointers(j,n,v);S&&(S.bind(),S.setVertexAttribPointers(j,n,v)),m&&m.bind(),E&&(E.bind(),E.setVertexAttribPointers(j,n,v)),A&&(A.bind(),A.setVertexAttribPointers(j,n,v)),F.currentNumAttributes=z}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const E0=(_,n,l,p,m)=>({u_texture:0,u_ele_delta:_,u_fog_matrix:n,u_fog_color:l?l.properties.get("fog-color"):o.be.white,u_fog_ground_blend:l?l.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:m?0:l?l.calculateFogBlendOpacity(p):0,u_horizon_color:l?l.properties.get("horizon-color"):o.be.white,u_horizon_fog_blend:l?l.properties.get("horizon-fog-blend"):1,u_is_globe_mode:m?1:0}),k0={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function lh(_){const n=[];for(let l=0;l<_.length;l++){if(_[l]===null)continue;const p=_[l].split(" ");n.push(p.pop())}return n}class ch{constructor(n,l,p,m,v,S,E,A,z=[]){const F=n.gl;this.program=F.createProgram();const j=lh(l.staticAttributes),N=p?p.getBinderAttributes():[],G=j.concat(N),Y=Gs.prelude.staticUniforms?lh(Gs.prelude.staticUniforms):[],ae=E.staticUniforms?lh(E.staticUniforms):[],oe=l.staticUniforms?lh(l.staticUniforms):[],le=p?p.getBinderUniforms():[],de=Y.concat(ae).concat(oe).concat(le),ve=[];for(const Be of de)ve.indexOf(Be)<0&&ve.push(Be);const ge=p?p.defines():[];Li(F)&&ge.unshift("#version 300 es"),v&&ge.push("#define OVERDRAW_INSPECTOR;"),S&&ge.push("#define TERRAIN3D;"),A&&ge.push(A),z&&ge.push(...z);let we=ge.concat(Gs.prelude.fragmentSource,E.fragmentSource,l.fragmentSource).join(`
816`),Ce=ge.concat(Gs.prelude.vertexSource,E.vertexSource,l.vertexSource).join(`
817`);Li(F)||(we=function(Be){return Be.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(we),Ce=function(Be){return Be.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(Ce));const ye=F.createShader(F.FRAGMENT_SHADER);if(F.isContextLost())return void(this.failedToCreate=!0);if(F.shaderSource(ye,we),F.compileShader(ye),!F.getShaderParameter(ye,F.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${F.getShaderInfoLog(ye)}`);F.attachShader(this.program,ye);const Ae=F.createShader(F.VERTEX_SHADER);if(F.isContextLost())return void(this.failedToCreate=!0);if(F.shaderSource(Ae,Ce),F.compileShader(Ae),!F.getShaderParameter(Ae,F.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${F.getShaderInfoLog(Ae)}`);F.attachShader(this.program,Ae),this.attributes={};const Ve={};this.numAttributes=G.length;for(let Be=0;Be<this.numAttributes;Be++)G[Be]&&(F.bindAttribLocation(this.program,Be,G[Be]),this.attributes[G[Be]]=Be);if(F.linkProgram(this.program),!F.getProgramParameter(this.program,F.LINK_STATUS))throw new Error(`Program failed to link: ${F.getProgramInfoLog(this.program)}`);F.deleteShader(Ae),F.deleteShader(ye);for(let Be=0;Be<ve.length;Be++){const Ne=ve[Be];if(Ne&&!Ve[Ne]){const qe=F.getUniformLocation(this.program,Ne);qe&&(Ve[Ne]=qe)}}this.fixedUniforms=m(n,Ve),this.terrainUniforms=((Be,Ne)=>({u_depth:new o.bO(Be,Ne.u_depth),u_terrain:new o.bO(Be,Ne.u_terrain),u_terrain_dim:new o.bf(Be,Ne.u_terrain_dim),u_terrain_matrix:new o.bQ(Be,Ne.u_terrain_matrix),u_terrain_unpack:new o.bR(Be,Ne.u_terrain_unpack),u_terrain_exaggeration:new o.bf(Be,Ne.u_terrain_exaggeration)}))(n,Ve),this.projectionUniforms=((Be,Ne)=>({u_projection_matrix:new o.bQ(Be,Ne.u_projection_matrix),u_projection_tile_mercator_coords:new o.bR(Be,Ne.u_projection_tile_mercator_coords),u_projection_clipping_plane
vendor: 11,006 bytes, line 817
817:new o.bR(Be,Ne.u_projection_clipping_plane),u_projection_transition:new o.bf(Be,Ne.u_projection_transition),u_projection_fallback_matrix:new o.bQ(Be,Ne.u_projection_fallback_matrix)}))(n,Ve),this.binderUniforms=p?p.getUniforms(n,Ve):[]}draw(n,l,p,m,v,S,E,A,z,F,j,N,G,Y,ae,oe,le,de,ve){const ge=n.gl;if(this.failedToCreate)return;if(n.program.set(this.program),n.setDepthMode(p),n.setStencilMode(m),n.setColorMode(v),n.setCullFace(S),A){n.activeTexture.set(ge.TEXTURE2),ge.bindTexture(ge.TEXTURE_2D,A.depthTexture),n.activeTexture.set(ge.TEXTURE3),ge.bindTexture(ge.TEXTURE_2D,A.texture);for(const Ce in this.terrainUniforms)this.terrainUniforms[Ce].set(A[Ce])}if(z)for(const Ce in z)this.projectionUniforms[k0[Ce]].set(z[Ce]);if(E)for(const Ce in this.fixedUniforms)this.fixedUniforms[Ce].set(E[Ce]);oe&&oe.setUniforms(n,this.binderUniforms,Y,{zoom:ae});let we=0;switch(l){case ge.LINES:we=2;break;case ge.TRIANGLES:we=3;break;case ge.LINE_STRIP:we=1}for(const Ce of G.get()){const ye=Ce.vaos||(Ce.vaos={});(ye[F]||(ye[F]=new C0)).bind(n,this,j,oe?oe.getPaintVertexBuffers():[],N,Ce.vertexOffset,le,de,ve),ge.drawElements(l,Ce.primitiveLength*we,ge.UNSIGNED_SHORT,Ce.primitiveOffset*we*2)}}}function uh(_,n,l){const p=1/o.aB(l,1,n.transform.tileZoom),m=Math.pow(2,l.tileID.overscaledZ),v=l.tileSize*Math.pow(2,n.transform.tileZoom)/m,S=v*(l.tileID.canonical.x+l.tileID.wrap*m),E=v*l.tileID.canonical.y;return{u_image:0,u_texsize:l.imageAtlasTexture.size,u_scale:[p,_.fromScale,_.toScale],u_fade:_.t,u_pixel_coord_upper:[S>>16,E>>16],u_pixel_coord_lower:[65535&S,65535&E]}}const Oc=(_,n,l,p)=>{const m=_.style.light,v=m.properties.get("position"),S=[v.x,v.y,v.z],E=o.bU();m.properties.get("anchor")==="viewport"&&o.bV(E,_.transform.bearingInRadians),o.bW(S,S,E);const A=_.transform.transformLightDirection(S),z=m.properties.get("color");return{u_lightpos:S,u_lightpos_globe:A,u_lightintensity:m.properties.get("intensity"),u_lightcolor:[z.r,z.g,z.b],u_vertical_gradient:+n,u_opacity:l,u_fill_translate:p}},wf=(_,n,l,p,m,v,S)=>o.e(Oc(_,n,l,p),uh(v,_,S),{u_height_factor:-Math.pow(2,m.overscaledZ)/S.tileSize/8}),hh=(_,n,l,p)=>o.e(uh(n,_,l),{u_fill_translate:p}),Zs=(_,n)=>({u_world:_,u_fill_translate:n}),I0=(_,n,l,p,m)=>o.e(hh(_,n,l,m),{u_world:p}),Sf=(_,n,l,p,m)=>{const v=_.transform;let S,E,A=0;if(l.paint.get("circle-pitch-alignment")==="map"){const z=o.aB(n,1,v.zoom);S=!0,E=[z,z],A=z/(o.$*Math.pow(2,n.tileID.overscaledZ))*2*Math.PI*m}else S=!1,E=v.pixelsToGLUnits;return{u_camera_to_center_distance:v.cameraToCenterDistance,u_scale_with_map:+(l.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+S,u_device_pixel_ratio:_.pixelRatio,u_extrude_scale:E,u_globe_extrude_scale:A,u_translate:p}},Fc=_=>({u_pixel_extrude_scale:[1/_.width,1/_.height]}),Bc=_=>({u_viewport_size:[_.width,_.height]}),Tg=(_,n=1)=>({u_color:_,u_overlay:0,u_overlay_scale:n}),Nc=(_,n,l,p)=>{const m=o.aB(_,1,n)/(o.$*Math.pow(2,_.tileID.overscaledZ))*2*Math.PI*p;return{u_extrude_scale:o.aB(_,1,n),u_intensity:l,u_globe_extrude_scale:m}},Cg=(_,n,l,p)=>{const m=o.L();o.bX(m,0,_.width,_.height,0,0,1);const v=_.context.gl;return{u_matrix:m,u_world:[v.drawingBufferWidth,v.drawingBufferHeight],u_image:l,u_color_ramp:p,u_opacity:n.paint.get("heatmap-opacity")}},Tl=(_,n,l)=>{const p=l.paint.get("hillshade-accent-color");let m;switch(l.paint.get("hillshade-method")){case"basic":m=4;break;case"combined":m=1;break;case"igor":m=2;break;case"multidirectional":m=3;break;default:m=0}const v=l.getIlluminationProperties();for(let S=0;S<v.directionRadians.length;S++)l.paint.get("hillshade-illumination-anchor")==="viewport"&&(v.directionRadians[S]+=_.transform.bearingInRadians);return{u_image:0,u_latrange:Eg(0,n.tileID),u_exaggeration:l.paint.get("hillshade-exaggeration"),u_altitudes:v.altitudeRadians,u_azimuths:v.directionRadians,u_accent:p,u_method:m,u_highlights:v.highlightColor,u_shadows:v.shadowColor}},P0=(_,n)=>{const l=n.stride,p=o.L();return o.bX(p,0,o.$,-8192,0,0,1),o.M(p,p,[0,-8192,0]),{u_matrix:p,u_image:1,u_dimension:[l,l],u_zoom:_.overscaledZ,u_unpack:n.getUnpackVector()}};function Eg(_,n){const l=Math.pow(2,n.canonical.z),p=n.canonical.y;return[new o.a0(0,p/l).toLngLat().lat,new o.a0(0,(p+1)/l).toLngLat().lat]}const A0=(_,n)=>({u_image:0,u_unpack:n.getUnpackVector(),u_dimension:[n.stride,n.stride],u_elevation_stops:1,u_color_stops:4,u_opacity:_.paint.get("color-relief-opacity")}),dh=(_,n,l,p)=>{const m=_.transform;return{u_translation:Ef(_,n,l),u_ratio:p/o.aB(n,1,m.zoom),u_device_pixel_ratio:_.pixelRatio,u_units_to_pixels:[1/m.pixelsToGLUnits[0],1/m.pixelsToGLUnits[1]]}},Tf=(_,n,l,p,m)=>o.e(dh(_,n,l,p),{u_image:0,u_image_height:m}),kg=(_,n,l,p,m)=>{const v=_.transform,S=Cf(n,v);return{u_translation:Ef(_,n,l),u_texsize:n.imageAtlasTexture.size,u_ratio:p/o.aB(n,1,v.zoom),u_device_pixel_ratio:_.pixelRatio,u_image:0,u_scale:[S,m.fromScale,m.toScale],u_fade:m.t,u_units_to_pixels:[1/v.pixelsToGLUnits[0],1/v.pixelsToGLUnits[1]]}},Ig=(_,n,l,p,m,v)=>{const S=_.lineAtlas,E=Cf(n,_.transform),A=l.layout.get("line-cap")==="round",z=S.getDash(m.from,A),F=S.getDash(m.to,A),j=z.width*v.fromScale,N=F.width*v.toScale;return o.e(dh(_,n,l,p),{u_patternscale_a:[E/j,-z.height/2],u_patternscale_b:[E/N,-F.height/2],u_sdfgamma:S.width/(256*Math.min(j,N)*_.pixelRatio)/2,u_image:0,u_tex_y_a:z.y,u_tex_y_b:F.y,u_mix:v.t})};function Cf(_,n){return 1/o.aB(_,1,n.tileZoom)}function Ef(_,n,l){return o.aC(_.transform,n,l.paint.get("line-translate"),l.paint.get("line-translate-anchor"))}const La=(_,n,l,p,m)=>{return{u_tl_parent:_,u_scale_parent:n,u_buffer_scale:1,u_fade_t:l.mix,u_opacity:l.opacity*p.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:p.paint.get("raster-brightness-min"),u_brightness_high:p.paint.get("raster-brightness-max"),u_saturation_factor:(S=p.paint.get("raster-saturation"),S>0?1-1/(1.001-S):-S),u_contrast_factor:(v=p.paint.get("raster-contrast"),v>0?1/(1-v):1+v),u_spin_weights:Pg(p.paint.get("raster-hue-rotate")),u_coords_top:[m[0].x,m[0].y,m[1].x,m[1].y],u_coords_bottom:[m[3].x,m[3].y,m[2].x,m[2].y]};var v,S};function Pg(_){_*=Math.PI/180;const n=Math.sin(_),l=Math.cos(_);return[(2*l+1)/3,(-Math.sqrt(3)*n-l+1)/3,(Math.sqrt(3)*n-l+1)/3]}const kf=(_,n,l,p,m,v,S,E,A,z,F,j,N)=>{const G=S.transform;return{u_is_size_zoom_constant:+(_==="constant"||_==="source"),u_is_size_feature_constant:+(_==="constant"||_==="camera"),u_size_t:n?n.uSizeT:0,u_size:n?n.uSize:0,u_camera_to_center_distance:G.cameraToCenterDistance,u_pitch:G.pitch/360*2*Math.PI,u_rotate_symbol:+l,u_aspect_ratio:G.width/G.height,u_fade_change:S.options.fadeDuration?S.symbolFadeChange:1,u_label_plane_matrix:E,u_coord_matrix:A,u_is_text:+F,u_pitch_with_map:+p,u_is_along_line:m,u_is_variable_anchor:v,u_texsize:j,u_texture:0,u_translation:z,u_pitched_scale:N}},Cl=(_,n,l,p,m,v,S,E,A,z,F,j,N,G)=>{const Y=S.transform;return o.e(kf(_,n,l,p,m,v,S,E,A,z,F,j,G),{u_gamma_scale:p?Math.cos(Y.pitch*Math.PI/180)*Y.cameraToCenterDistance:1,u_device_pixel_ratio:S.pixelRatio,u_is_halo:1})},M0=(_,n,l,p,m,v,S,E,A,z,F,j,N)=>o.e(Cl(_,n,l,p,m,v,S,E,A,z,!0,F,0,N),{u_texsize_icon:j,u_texture_icon:1}),fh=(_,n)=>({u_opacity:_,u_color:n}),R0=(_,n,l,p,m)=>o.e(function(v,S,E,A){const z=E.imageManager.getPattern(v.from.toString()),F=E.imageManager.getPattern(v.to.toString()),{width:j,height:N}=E.imageManager.getPixelSize(),G=Math.pow(2,A.tileID.overscaledZ),Y=A.tileSize*Math.pow(2,E.transform.tileZoom)/G,ae=Y*(A.tileID.canonical.x+A.tileID.wrap*G),oe=Y*A.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:z.tl,u_pattern_br_a:z.br,u_pattern_tl_b:F.tl,u_pattern_br_b:F.br,u_texsize:[j,N],u_mix:S.t,u_pattern_size_a:z.displaySize,u_pattern_size_b:F.displaySize,u_scale_a:S.fromScale,u_scale_b:S.toScale,u_tile_units_to_pixels:1/o.aB(A,1,E.transform.tileZoom),u_pixel_coord_upper:[ae>>16,oe>>16],u_pixel_coord_lower:[65535&ae,65535&oe]}}(l,m,n,p),{u_opacity:_}),Ag=(_,n)=>{},Mg={fillExtrusion:(_,n)=>({u_lightpos:new o.bS(_,n.u_lightpos),u_lightpos_globe:new o.bS(_,n.u_lightpos_globe),u_lightintensity:new o.bf(_,n.u_lightintensity),u_lightcolor:new o.bS(_,n.u_lightcolor),u_vertical_gradient:new o.bf(_,n.u_vertical_gradient),u_opacity:new o.bf(_,n.u_opacity),u_fill_translate:new o.bT(_,n.u_fill_translate)}),fillExtrusionPattern:(_,n)=>({u_lightpos:new o.bS(_,n.u_lightpos),u_lightpos_globe:new o.bS(_,n.u_lightpos_globe),u_lightintensity:new o.bf(_,n.u_lightintensity),u_lightcolor:new o.bS(_,n.u_lightcolor),u_vertical_gradient:new o.bf(_,n.u_vertical_gradient),u_height_factor:new o.bf(_,n.u_height_factor),u_opacity:new o.bf(_,n.u_opacity),u_fill_translate:new o.bT(_,n.u_fill_translate),u_image:new o.bO(_,n.u_image),u_texsize:new o.bT(_,n.u_texsize),u_pixel_coord_upper:new o.bT(_,n.u_pixel_coord_upper),u_pixel_coord_lower:new o.bT(_,n.u_pixel_coord_lower),u_scale:new o.bS(_,n.u_scale),u_fade:new o.bf(_,n.u_fade)}),fill:(_,n)=>({u_fill_translate:new o.bT(_,n.u_fill_translate)}),fillPattern:(_,n)=>({u_image:new o.bO(_,n.u_image),u_texsize:new o.bT(_,n.u_texsize),u_pixel_coord_upper:new o.bT(_,n.u_pixel_coord_upper),u_pixel_coord_lower:new o.bT(_,n.u_pixel_coord_lower),u_scale:new o.bS(_,n.u_scale),u_fade:new o.bf(_,n.u_fade),u_fill_translate:new o.bT(_,n.u_fill_translate)}),fillOutline:(_,n)=>({u_world:new o.bT(_,n.u_world),u_fill_translate:new o.bT(_,n.u_fill_translate)}),fillOutlinePattern:(_,n)=>({u_world:new o.bT(_,n.u_world),u_image:new o.bO(_,n.u_image),u_texsize:new o.bT(_,n.u_texsize),u_pixel_coord_upper:new o.bT(_,n.u_pixel_coord_upper),u_pixel_coord_lower:new o.bT(_,n.u_pixel_coord_lower),u_scale:new o.bS(_,n.u_scale),u_fade:new o.bf(_,n.u_fade),u_fill_translate:new o.bT(_,n.u_fill_translate)}),circle:(_,n)=>({u_camera_to_center_distance:new o.bf(_,n.u_camera_to_center_distance),u_scale_with_map:new o.bO(_,n.u_scale_with_map),u_pitch_with_map:new o.bO(_,n.u_pitch_with_map),u_extrude_scale:new o.bT(_,n.u_extrude_scale),u_device_pixel_ratio:new o.bf(_,n.u_device_pixel_ratio),u_globe_extrude_scale:new o.bf(_,n.u_globe_extrude_scale),u_translate:new o.bT(_,n.u_translate)}),collisionBox:(_,n)=>({u_pixel_extrude_scale:new o.bT(_,n.u_pixel_extrude_scale)}),collisionCircle:(_,n)=>({u_viewport_size:new o.bT(_,n.u_viewport_size)}),debug:(_,n)=>({u_color:new o.bP(_,n.u_color),u_overlay:new o.bO(_,n.u_overlay),u_overlay_scale:new o.bf(_,n.u_overlay_scale)}),depth:Ag,clippingMask:Ag,heatmap:(_,n)=>({u_extrude_scale:new o.bf(_,n.u_extrude_scale),u_intensity:new o.bf(_,n.u_intensity),u_globe_extrude_scale:new o.bf(_,n.u_globe_extrude_scale)}),heatmapTexture:(_,n)=>({u_matrix:new o.bQ(_,n.u_matrix),u_world:new o.bT(_,n.u_world),u_image:new o.bO(_,n.u_image),u_color_ramp:new o.bO(_,n.u_color_ramp),u_opacity:new o.bf(_,n.u_opacity)}),hillshade:(_,n)=>({u_image:new o.bO(_,n.u_image),u_latrange:new o.bT(_,n.u_latrange),u_exaggeration:new o.bf(_,n.u_exaggeration),u_altitudes:new o.bZ(_,n.u_altitudes),u_azimuths:new o.bZ(_,n.u_azimuths),u_accent:new o.bP(_,n.u_accent),u_method:new o.bO(_,n.u_method),u_shadows:new o.bY(_,n.u_shadows),u_highlights:new o.bY(_,n.u_highlights)}
817),hillshadePrepare:(_,n)=>({u_matrix:new o.bQ(_,n.u_matrix),u_image:new o.bO(_,n.u_image),u_dimension:new o.bT(_,n.u_dimension),u_zoom:new o.bf(_,n.u_zoom),u_unpack:new o.bR(_,n.u_unpack)}),colorRelief:(_,n)=>({u_image:new o.bO(_,n.u_image),u_unpack:new o.bR(_,n.u_unpack),u_dimension:new o.bT(_,n.u_dimension),u_elevation_stops:new o.bO(_,n.u_elevation_stops),u_color_stops:new o.bO(_,n.u_color_stops),u_opacity:new o.bf(_,n.u_opacity)}),line:(_,n)=>({u_translation:new o.bT(_,n.u_translation),u_ratio:new o.bf(_,n.u_ratio),u_device_pixel_ratio:new o.bf(_,n.u_device_pixel_ratio),u_units_to_pixels:new o.bT(_,n.u_units_to_pixels)}),lineGradient:(_,n)=>({u_translation:new o.bT(_,n.u_translation),u_ratio:new o.bf(_,n.u_ratio),u_device_pixel_ratio:new o.bf(_,n.u_device_pixel_ratio),u_units_to_pixels:new o.bT(_,n.u_units_to_pixels),u_image:new o.bO(_,n.u_image),u_image_height:new o.bf(_,n.u_image_height)}),linePattern:(_,n)=>({u_translation:new o.bT(_,n.u_translation),u_texsize:new o.bT(_,n.u_texsize),u_ratio:new o.bf(_,n.u_ratio),u_device_pixel_ratio:new o.bf(_,n.u_device_pixel_ratio),u_image:new o.bO(_,n.u_image),u_units_to_pixels:new o.bT(_,n.u_units_to_pixels),u_scale:new o.bS(_,n.u_scale),u_fade:new o.bf(_,n.u_fade)}),lineSDF:(_,n)=>({u_translation:new o.bT(_,n.u_translation),u_ratio:new o.bf(_,n.u_ratio),u_device_pixel_ratio:new o.bf(_,n.u_device_pixel_ratio),u_units_to_pixels:new o.bT(_,n.u_units_to_pixels),u_patternscale_a:new o.bT(_,n.u_patternscale_a),u_patternscale_b:new o.bT(_,n.u_patternscale_b),u_sdfgamma:new o.bf(_,n.u_sdfgamma),u_image:new o.bO(_,n.u_image),u_tex_y_a:new o.bf(_,n.u_tex_y_a),u_tex_y_b:new o.bf(_,n.u_tex_y_b),u_mix:new o.bf(_,n.u_mix)}),raster:(_,n)=>({u_tl_parent:new o.bT(_,n.u_tl_parent),u_scale_parent:new o.bf(_,n.u_scale_parent),u_buffer_scale:new o.bf(_,n.u_buffer_scale),u_fade_t:new o.bf(_,n.u_fade_t),u_opacity:new o.bf(_,n.u_opacity),u_image0:new o.bO(_,n.u_image0),u_image1:new o.bO(_,n.u_image1),u_brightness_low:new o.bf(_,n.u_brightness_low),u_brightness_high:new o.bf(_,n.u_brightness_high),u_saturation_factor:new o.bf(_,n.u_saturation_factor),u_contrast_factor:new o.bf(_,n.u_contrast_factor),u_spin_weights:new o.bS(_,n.u_spin_weights),u_coords_top:new o.bR(_,n.u_coords_top),u_coords_bottom:new o.bR(_,n.u_coords_bottom)}),symbolIcon:(_,n)=>({u_is_size_zoom_constant:new o.bO(_,n.u_is_size_zoom_constant),u_is_size_feature_constant:new o.bO(_,n.u_is_size_feature_constant),u_size_t:new o.bf(_,n.u_size_t),u_size:new o.bf(_,n.u_size),u_camera_to_center_distance:new o.bf(_,n.u_camera_to_center_distance),u_pitch:new o.bf(_,n.u_pitch),u_rotate_symbol:new o.bO(_,n.u_rotate_symbol),u_aspect_ratio:new o.bf(_,n.u_aspect_ratio),u_fade_change:new o.bf(_,n.u_fade_change),u_label_plane_matrix:new o.bQ(_,n.u_label_plane_matrix),u_coord_matrix:new o.bQ(_,n.u_coord_matrix),u_is_text:new o.bO(_,n.u_is_text),u_pitch_with_map:new o.bO(_,n.u_pitch_with_map),u_is_along_line:new o.bO(_,n.u_is_along_line),u_is_variable_anchor:new o.bO(_,n.u_is_variable_anchor),u_texsize:new o.bT(_,n.u_texsize),u_texture:new o.bO(_,n.u_texture),u_translation:new o.bT(_,n.u_translation),u_pitched_scale:new o.bf(_,n.u_pitched_scale)}),symbolSDF:(_,n)=>({u_is_size_zoom_constant:new o.bO(_,n.u_is_size_zoom_constant),u_is_size_feature_constant:new o.bO(_,n.u_is_size_feature_constant),u_size_t:new o.bf(_,n.u_size_t),u_size:new o.bf(_,n.u_size),u_camera_to_center_distance:new o.bf(_,n.u_camera_to_center_distance),u_pitch:new o.bf(_,n.u_pitch),u_rotate_symbol:new o.bO(_,n.u_rotate_symbol),u_aspect_ratio:new o.bf(_,n.u_aspect_ratio),u_fade_change:new o.bf(_,n.u_fade_change),u_label_plane_matrix:new o.bQ(_,n.u_label_plane_matrix),u_coord_matrix:new o.bQ(_,n.u_coord_matrix),u_is_text:new o.bO(_,n.u_is_text),u_pitch_with_map:new o.bO(_,n.u_pitch_with_map),u_is_along_line:new o.bO(_,n.u_is_along_line),u_is_variable_anchor:new o.bO(_,n.u_is_variable_anchor),u_texsize:new o.bT(_,n.u_texsize),u_texture:new o.bO(_,n.u_texture),u_gamma_scale:new o.bf(_,n.u_gamma_scale),u_device_pixel_ratio:new o.bf(_,n.u_device_pixel_ratio),u_is_halo:new o.bO(_,n.u_is_halo),u_translation:new o.bT(_,n.u_translation),u_pitched_scale:new o.bf(_,n.u_pitched_scale)}),symbolTextAndIcon:(_,n)=>({u_is_size_zoom_constant:new o.bO(_,n.u_is_size_zoom_constant),u_is_size_feature_constant:new o.bO(_,n.u_is_size_feature_constant),u_size_t:new o.bf(_,n.u_size_t),u_size:new o.bf(_,n.u_size),u_camera_to_center_distance:new o.bf(_,n.u_camera_to_center_distance),u_pitch:new o.bf(_,n.u_pitch),u_rotate_symbol:new o.bO(_,n.u_rotate_symbol),u_aspect_ratio:new o.bf(_,n.u_aspect_ratio),u_fade_change:new o.bf(_,n.u_fade_change),u_label_plane_matrix:new o.bQ(_,n.u_label_plane_matrix
vendor: 28,025 bytes, line 817
817),u_coord_matrix:new o.bQ(_,n.u_coord_matrix),u_is_text:new o.bO(_,n.u_is_text),u_pitch_with_map:new o.bO(_,n.u_pitch_with_map),u_is_along_line:new o.bO(_,n.u_is_along_line),u_is_variable_anchor:new o.bO(_,n.u_is_variable_anchor),u_texsize:new o.bT(_,n.u_texsize),u_texsize_icon:new o.bT(_,n.u_texsize_icon),u_texture:new o.bO(_,n.u_texture),u_texture_icon:new o.bO(_,n.u_texture_icon),u_gamma_scale:new o.bf(_,n.u_gamma_scale),u_device_pixel_ratio:new o.bf(_,n.u_device_pixel_ratio),u_is_halo:new o.bO(_,n.u_is_halo),u_translation:new o.bT(_,n.u_translation),u_pitched_scale:new o.bf(_,n.u_pitched_scale)}),background:(_,n)=>({u_opacity:new o.bf(_,n.u_opacity),u_color:new o.bP(_,n.u_color)}),backgroundPattern:(_,n)=>({u_opacity:new o.bf(_,n.u_opacity),u_image:new o.bO(_,n.u_image),u_pattern_tl_a:new o.bT(_,n.u_pattern_tl_a),u_pattern_br_a:new o.bT(_,n.u_pattern_br_a),u_pattern_tl_b:new o.bT(_,n.u_pattern_tl_b),u_pattern_br_b:new o.bT(_,n.u_pattern_br_b),u_texsize:new o.bT(_,n.u_texsize),u_mix:new o.bf(_,n.u_mix),u_pattern_size_a:new o.bT(_,n.u_pattern_size_a),u_pattern_size_b:new o.bT(_,n.u_pattern_size_b),u_scale_a:new o.bf(_,n.u_scale_a),u_scale_b:new o.bf(_,n.u_scale_b),u_pixel_coord_upper:new o.bT(_,n.u_pixel_coord_upper),u_pixel_coord_lower:new o.bT(_,n.u_pixel_coord_lower),u_tile_units_to_pixels:new o.bf(_,n.u_tile_units_to_pixels)}),terrain:(_,n)=>({u_texture:new o.bO(_,n.u_texture),u_ele_delta:new o.bf(_,n.u_ele_delta),u_fog_matrix:new o.bQ(_,n.u_fog_matrix),u_fog_color:new o.bP(_,n.u_fog_color),u_fog_ground_blend:new o.bf(_,n.u_fog_ground_blend),u_fog_ground_blend_opacity:new o.bf(_,n.u_fog_ground_blend_opacity),u_horizon_color:new o.bP(_,n.u_horizon_color),u_horizon_fog_blend:new o.bf(_,n.u_horizon_fog_blend),u_is_globe_mode:new o.bf(_,n.u_is_globe_mode)}),terrainDepth:(_,n)=>({u_ele_delta:new o.bf(_,n.u_ele_delta)}),terrainCoords:(_,n)=>({u_texture:new o.bO(_,n.u_texture),u_terrain_coords_id:new o.bf(_,n.u_terrain_coords_id),u_ele_delta:new o.bf(_,n.u_ele_delta)}),projectionErrorMeasurement:(_,n)=>({u_input:new o.bf(_,n.u_input),u_output_expected:new o.bf(_,n.u_output_expected)}),atmosphere:(_,n)=>({u_sun_pos:new o.bS(_,n.u_sun_pos),u_atmosphere_blend:new o.bf(_,n.u_atmosphere_blend),u_globe_position:new o.bS(_,n.u_globe_position),u_globe_radius:new o.bf(_,n.u_globe_radius),u_inv_proj_matrix:new o.bQ(_,n.u_inv_proj_matrix)}),sky:(_,n)=>({u_sky_color:new o.bP(_,n.u_sky_color),u_horizon_color:new o.bP(_,n.u_horizon_color),u_horizon:new o.bT(_,n.u_horizon),u_horizon_normal:new o.bT(_,n.u_horizon_normal),u_sky_horizon_blend:new o.bf(_,n.u_sky_horizon_blend),u_sky_blend:new o.bf(_,n.u_sky_blend)})};class Rg{constructor(n,l,p){this.context=n;const m=n.gl;this.buffer=m.createBuffer(),this.dynamicDraw=!!p,this.context.unbindVAO(),n.bindElementBuffer.set(this.buffer),m.bufferData(m.ELEMENT_ARRAY_BUFFER,l.arrayBuffer,this.dynamicDraw?m.DYNAMIC_DRAW:m.STATIC_DRAW),this.dynamicDraw||delete l.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(n){const l=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),l.bufferSubData(l.ELEMENT_ARRAY_BUFFER,0,n.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Lg={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class If{constructor(n,l,p,m){this.length=l.length,this.attributes=p,this.itemSize=l.bytesPerElement,this.dynamicDraw=m,this.context=n;const v=n.gl;this.buffer=v.createBuffer(),n.bindVertexBuffer.set(this.buffer),v.bufferData(v.ARRAY_BUFFER,l.arrayBuffer,this.dynamicDraw?v.DYNAMIC_DRAW:v.STATIC_DRAW),this.dynamicDraw||delete l.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(n){if(n.length!==this.length)throw new Error(`Length of new data is ${n.length}, which doesn't match current length of ${this.length}`);const l=this.context.gl;this.bind(),l.bufferSubData(l.ARRAY_BUFFER,0,n.arrayBuffer)}enableAttributes(n,l){for(let p=0;p<this.attributes.length;p++){const m=l.attributes[this.attributes[p].name];m!==void 0&&n.enableVertexAttribArray(m)}}setVertexAttribPointers(n,l,p){for(let m=0;m<this.attributes.length;m++){const v=this.attributes[m],S=l.attributes[v.name];S!==void 0&&n.vertexAttribPointer(S,v.components,n[Lg[v.type]],!1,this.itemSize,v.offset+this.itemSize*(p||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class $r{constructor(n){this.gl=n.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(n){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class ph extends $r{getDefault(){return o.be.transparent}set(n){const l=this.current;(n.r!==l.r||n.g!==l.g||n.b!==l.b||n.a!==l.a||this.dirty)&&(this.gl.clearColor(n.r,n.g,n.b,n.a),this.current=n,this.dirty=!1)}}class yo extends $r{getDefault(){return 1}set(n){(n!==this.current||this.dirty)&&(this.gl.clearDepth(n),this.current=n,this.dirty=!1)}}class Pf extends $r{getDefault(){return 0}set(n){(n!==this.current||this.dirty)&&(this.gl.clearStencil(n),this.current=n,this.dirty=!1)}}class Af extends $r{getDefault(){return[!0,!0,!0,!0]}set(n){const l=this.current;(n[0]!==l[0]||n[1]!==l[1]||n[2]!==l[2]||n[3]!==l[3]||this.dirty)&&(this.gl.colorMask(n[0],n[1],n[2],n[3]),this.current=n,this.dirty=!1)}}class Mf extends $r{getDefault(){return!0}set(n){(n!==this.current||this.dirty)&&(this.gl.depthMask(n),this.current=n,this.dirty=!1)}}class zg extends $r{getDefault(){return 255}set(n){(n!==this.current||this.dirty)&&(this.gl.stencilMask(n),this.current=n,this.dirty=!1)}}class Rf extends $r{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(n){const l=this.current;(n.func!==l.func||n.ref!==l.ref||n.mask!==l.mask||this.dirty)&&(this.gl.stencilFunc(n.func,n.ref,n.mask),this.current=n,this.dirty=!1)}}class za extends $r{getDefault(){const n=this.gl;return[n.KEEP,n.KEEP,n.KEEP]}set(n){const l=this.current;(n[0]!==l[0]||n[1]!==l[1]||n[2]!==l[2]||this.dirty)&&(this.gl.stencilOp(n[0],n[1],n[2]),this.current=n,this.dirty=!1)}}class Lf extends $r{getDefault(){return!1}set(n){if(n===this.current&&!this.dirty)return;const l=this.gl;n?l.enable(l.STENCIL_TEST):l.disable(l.STENCIL_TEST),this.current=n,this.dirty=!1}}class L0 extends $r{getDefault(){return[0,1]}set(n){const l=this.current;(n[0]!==l[0]||n[1]!==l[1]||this.dirty)&&(this.gl.depthRange(n[0],n[1]),this.current=n,this.dirty=!1)}}class z0 extends $r{getDefault(){return!1}set(n){if(n===this.current&&!this.dirty)return;const l=this.gl;n?l.enable(l.DEPTH_TEST):l.disable(l.DEPTH_TEST),this.current=n,this.dirty=!1}}class D0 extends $r{getDefault(){return this.gl.LESS}set(n){(n!==this.current||this.dirty)&&(this.gl.depthFunc(n),this.current=n,this.dirty=!1)}}class O0 extends $r{getDefault(){return!1}set(n){if(n===this.current&&!this.dirty)return;const l=this.gl;n?l.enable(l.BLEND):l.disable(l.BLEND),this.current=n,this.dirty=!1}}class Dg extends $r{getDefault(){const n=this.gl;return[n.ONE,n.ZERO]}set(n){const l=this.current;(n[0]!==l[0]||n[1]!==l[1]||this.dirty)&&(this.gl.blendFunc(n[0],n[1]),this.current=n,this.dirty=!1)}}class F0 extends $r{getDefault(){return o.be.transparent}set(n){const l=this.current;(n.r!==l.r||n.g!==l.g||n.b!==l.b||n.a!==l.a||this.dirty)&&(this.gl.blendColor(n.r,n.g,n.b,n.a),this.current=n,this.dirty=!1)}}class Og extends $r{getDefault(){return this.gl.FUNC_ADD}set(n){(n!==this.current||this.dirty)&&(this.gl.blendEquation(n),this.current=n,this.dirty=!1)}}class mh extends $r{getDefault(){return!1}set(n){if(n===this.current&&!this.dirty)return;const l=this.gl;n?l.enable(l.CULL_FACE):l.disable(l.CULL_FACE),this.current=n,this.dirty=!1}}class gh extends $r{getDefault(){return this.gl.BACK}set(n){(n!==this.current||this.dirty)&&(this.gl.cullFace(n),this.current=n,this.dirty=!1)}}class yh extends $r{getDefault(){return this.gl.CCW}set(n){(n!==this.current||this.dirty)&&(this.gl.frontFace(n),this.current=n,this.dirty=!1)}}class zf extends $r{getDefault(){return null}set(n){(n!==this.current||this.dirty)&&(this.gl.useProgram(n),this.current=n,this.dirty=!1)}}class Da extends $r{getDefault(){return this.gl.TEXTURE0}set(n){(n!==this.current||this.dirty)&&(this.gl.activeTexture(n),this.current=n,this.dirty=!1)}}class jc extends $r{getDefault(){const n=this.gl;return[0,0,n.drawingBufferWidth,n.drawingBufferHeight]}set(n){const l=this.current;(n[0]!==l[0]||n[1]!==l[1]||n[2]!==l[2]||n[3]!==l[3]||this.dirty)&&(this.gl.viewport(n[0],n[1],n[2],n[3]),this.current=n,this.dirty=!1)}}class El extends $r{getDefault(){return null}set(n){if(n===this.current&&!this.dirty)return;const l=this.gl;l.bindFramebuffer(l.FRAMEBUFFER,n),this.current=n,this.dirty=!1}}class _s extends $r{getDefault(){return null}set(n){if(n===this.current&&!this.dirty)return;const l=this.gl;l.bindRenderbuffer(l.RENDERBUFFER,n),this.current=n,this.dirty=!1}}class Fg extends $r{getDefault(){return null}set(n){if(n===this.current&&!this.dirty)return;const l=this.gl;l.bindTexture(l.TEXTURE_2D,n),this.current=n,this.dirty=!1}}class Bg extends $r{getDefault(){return null}set(n){if(n===this.current&&!this.dirty)return;const l=this.gl;l.bindBuffer(l.ARRAY_BUFFER,n),this.current=n,this.dirty=!1}}class Df extends $r{getDefault(){return null}set(n){const l=this.gl;l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,n),this.current=n,this.dirty=!1}}class Oa extends $r{getDefault(){return null}set(n){var l;if(n===this.current&&!this.dirty)return;const p=this.gl;Li(p)?p.bindVertexArray(n):(l=p.getExtension("OES_vertex_array_object"))===null||l===void 0||l.bindVertexArrayOES(n),this.current=n,this.dirty=!1}}class _h extends $r{getDefault(){return 4}set(n){if(n===this.current&&!this.dirty)return;const l=this.gl;l.pixelStorei(l.UNPACK_ALIGNMENT,n),this.current=n,this.dirty=!1}}class vh extends $r{getDefault(){return!1}set(n){if(n===this.current&&!this.dirty)return;const l=this.gl;l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n),this.current=n,this.dirty=!1}}class $c extends $r{getDefault(){return!1}set(n){if(n===this.current&&!this.dirty)return;const l=this.gl;l.pixelStorei(l.UNPACK_FLIP_Y_WEBGL,n),this.current=n,this.dirty=!1}}class kl extends $r{constructor(n,l){super(n),this.context=n,this.parent=l}getDefault(){return null}}class Ng extends kl{setDirty(){this.dirty=!0}set(n){if(n===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const l=this.gl;l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_2D,n,0),this.current=n,this.dirty=!1}}class Il extends kl{set(n){if(n===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const l=this.gl;l.framebufferRenderbuffer(l.FRAMEBUFFER,l.DEPTH_ATTACHMENT,l.RENDERBUFFER,n),this.current=n,this.dirty=!1}}class Pl extends kl{set(n){if(n===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const l=this.gl;l.framebufferRenderbuffer(l.FRAMEBUFFER,l.DEPTH_STENCIL_ATTACHMENT,l.RENDERBUFFER,n),this.current=n,this.dirty=!1}}const Of="Framebuffer is not complete";class Ff{constructor(n,l,p,m,v){this.context=n,this.width=l,this.height=p;const S=n.gl,E=this.framebuffer=S.createFramebuffer();if(this.colorAttachment=new Ng(n,E),m)this.depthAttachment=v?new Pl(n,E):new Il(n,E);else if(v)throw new Error("Stencil cannot be set without depth");if(S.checkFramebufferStatus(S.FRAMEBUFFER)!==S.FRAMEBUFFER_COMPLETE)throw new Error(Of)}destroy(){const n=this.context.gl,l=this.colorAttachment.get();if(l&&n.deleteTexture(l),this.depthAttachment){const p=this.depthAttachment.get();p&&n.deleteRenderbuffer(p)}n.deleteFramebuffer(this.framebuffer)}}class br{constructor(n){var l,p;if(this.gl=n,this.clearColor=new ph(this),this.clearDepth=new yo(this),this.clearStencil=new Pf(this),this.colorMask=new Af(this),this.depthMask=new Mf(this),this.stencilMask=new zg(this),this.stencilFunc=new Rf(this),this.stencilOp=new za(this),this.stencilTest=new Lf(this),this.depthRange=new L0(this),this.depthTest=new z0(this),this.depthFunc=new D0(this),this.blend=new O0(this),this.blendFunc=new Dg(this),this.blendColor=new F0(this),this.blendEquation=new Og(this),this.cullFace=new mh(this),this.cullFaceSide=new gh(this),this.frontFace=new yh(this),this.program=new zf(this),this.activeTexture=new Da(this),this.viewport=new jc(this),this.bindFramebuffer=new El(this),this.bindRenderbuffer=new _s(this),this.bindTexture=new Fg(this),this.bindVertexBuffer=new Bg(this),this.bindElementBuffer=new Df(this),this.bindVertexArray=new Oa(this),this.pixelStoreUnpack=new _h(this),this.pixelStoreUnpackPremultiplyAlpha=new vh(this),this.pixelStoreUnpackFlipY=new $c(this),this.extTextureFilterAnisotropic=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("MOZ_EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=n.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE),Li(n)){this.HALF_FLOAT=n.HALF_FLOAT;const m=n.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(l=n.RGBA16F)!==null&&l!==void 0?l:m==null?void 0:m.RGBA16F_EXT,this.RGB16F=(p=n.RGB16F)!==null&&p!==void 0?p:m==null?void 0:m.RGB16F_EXT,n.getExtension("EXT_color_buffer_float")}else{n.getExtension("EXT_color_buffer_half_float"),n.getExtension("OES_texture_half_float_linear");const m=n.getExtension("OES_texture_half_float");this.HALF_FLOAT=m==null?void 0:m.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(n,l){return new Rg(this,n,l)}createVertexBuffer(n,l,p){return new If(this,n,l,p)}createRenderbuffer(n,l,p){const m=this.gl,v=m.createRenderbuffer();return this.bindRenderbuffer.set(v),m.renderbufferStorage(m.RENDERBUFFER,n,l,p),this.bindRenderbuffer.set(null),v}createFramebuffer(n,l,p,m){return new Ff(this,n,l,p,m)}clear({color:n,depth:l,stencil:p}){const m=this.gl;let v=0;n&&(v|=m.COLOR_BUFFER_BIT,this.clearColor.set(n),this.colorMask.set([!0,!0,!0,!0])),l!==void 0&&(v|=m.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(l),this.depthMask.set(!0)),p!==void 0&&(v|=m.STENCIL_BUFFER_BIT,this.clearStencil.set(p),this.stencilMask.set(255)),m.clear(v)}setCullFace(n){n.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(n.mode),this.frontFace.set(n.frontFace))}setDepthMode(n){n.func!==this.gl.ALWAYS||n.mask?(this.depthTest.set(!0),this.depthFunc.set(n.func),this.depthMask.set(n.mask),this.depthRange.set(n.range)):this.depthTest.set(!1)}setStencilMode(n){n.test.func!==this.gl.ALWAYS||n.mask?(this.stencilTest.set(!0),this.stencilMask.set(n.mask),this.stencilOp.set([n.fail,n.depthFail,n.pass]),this.stencilFunc.set({func:n.test.func,ref:n.ref,mask:n.test.mask})):this.stencilTest.set(!1)}setColorMode(n){o.bG(n.blendFunction,Er.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(n.blendFunction),this.blendColor.set(n.blendColor)),this.colorMask.set(n.mask)}createVertexArray(){var n;return Li(this.gl)?this.gl.createVertexArray():(n=this.gl.getExtension("OES_vertex_array_object"))===null||n===void 0?void 0:n.createVertexArrayOES()}deleteVertexArray(n){var l;return Li(this.gl)?this.gl.deleteVertexArray(n):(l=this.gl.getExtension("OES_vertex_array_object"))===null||l===void 0?void 0:l.deleteVertexArrayOES(n)}unbindVAO(){this.bindVertexArray.set(null)}}let Fa;function jg(_,n,l,p,m){const v=_.context,S=_.transform,E=v.gl,A=_.useProgram("collisionBox"),z=[];let F=0,j=0;for(let le=0;le<p.length;le++){const de=p[le],ve=n.getTile(de).getBucket(l);if(!ve)continue;const ge=m?ve.textCollisionBox:ve.iconCollisionBox,we=ve.collisionCircleArray;we.length>0&&(z.push({circleArray:we,circleOffset:j,coord:de}),F+=we.length/4,j=F),ge&&A.draw(v,E.LINES,ur.disabled,Jt.disabled,_.colorModeForRenderPass(),or.disabled,Fc(_.transform),_.style.map.terrain&&_.style.map.terrain.getTerrainData(de),S.getProjectionData({overscaledTileID:de,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),l.id,ge.layoutVertexBuffer,ge.indexBuffer,ge.segments,null,_.transform.zoom,null,null,ge.collisionVertexBuffer)}if(!m||!z.length)return;const N=_.useProgram("collisionCircle"),G=new o.b_;G.resize(4*F),G._trim();let Y=0;for(const le of z)for(let de=0;de<le.circleArray.length/4;de++){const ve=4*de,ge=le.circleArray[ve+0],we=le.circleArray[ve+1],Ce=le.circleArray[ve+2],ye=le.circleArray[ve+3];G.emplace(Y++,ge,we,Ce,ye,0),G.emplace(Y++,ge,we,Ce,ye,1),G.emplace(Y++,ge,we,Ce,ye,2),G.emplace(Y++,ge,we,Ce,ye,3)}(!Fa||Fa.length<2*F)&&(Fa=function(le){const de=2*le,ve=new o.c0;ve.resize(de),ve._trim();for(let ge=0;ge<de;ge++){const we=6*ge;ve.uint16[we+0]=4*ge+0,ve.uint16[we+1]=4*ge+1,ve.uint16[we+2]=4*ge+2,ve.uint16[we+3]=4*ge+2,ve.uint16[we+4]=4*ge+3,ve.uint16[we+5]=4*ge+0}return ve}(F));const ae=v.createIndexBuffer(Fa,!0),oe=v.createVertexBuffer(G,o.b$.members,!0);for(const le of z){const de=Bc(_.transform);N.draw(v,E.TRIANGLES,ur.disabled,Jt.disabled,_.colorModeForRenderPass(),or.disabled,de,_.style.map.terrain&&_.style.map.terrain.getTerrainData(le.coord),null,l.id,oe,ae,o.aL.simpleSegment(0,2*le.circleOffset,le.circleArray.length,le.circleArray.length/2),null,_.transform.zoom,null,null,null)}oe.destroy(),ae.destroy()}const $g=o.af(new Float32Array(16));function Uc(_,n,l,p,m,v){const{horizontalAlign:S,verticalAlign:E}=o.aG(_);return new o.P((-(S-.5)*n/m+p[0])*v,(-(E-.5)*l/m+p[1])*v)}function B0(_,n,l,p,m,v){const S=n.tileAnchorPoint.add(new o.P(n.translation[0],n.translation[1]));if(n.pitchWithMap){let E=p.mult(v);l||(E=E.rotate(-m));const A=S.add(E);return Fr(A.x,A.y,n.pitchedLabelPlaneMatrix,n.getElevation).point}if(l){const E=Tt(n.tileAnchorPoint.x+1,n.tileAnchorPoint.y,n).point.sub(_),A=Math.atan(E.y/E.x)+(E.x<0?Math.PI:0);return _.add(p.rotate(A))}return _.add(p)}function N0(_,n,l,p,m,v,S,E,A,z,F,j){const N=_.text.placedSymbolArray,G=_.text.dynamicLayoutVertexArray,Y=_.icon.dynamicLayoutVertexArray,ae={};G.clear();for(let oe=0;oe<N.length;oe++){const le=N.get(oe),de=le.hidden||!le.crossTileID||_.allowVerticalPlacement&&!le.placedOrientation?null:p[le.crossTileID];if(de){const ve=new o.P(le.anchorX,le.anchorY),ge={getElevation:j,width:m.width,height:m.height,pitchedLabelPlaneMatrix:v,pitchWithMap:l,transform:m,tileAnchorPoint:ve,translation:z,unwrappedTileID:F},we=l?pr(ve.x,ve.y,ge):Tt(ve.x,ve.y,ge),Ce=er(m.cameraToCenterDistance,we.signedDistanceFromCamera);let ye=o.ao(_.textSizeData,E,le)*Ce/o.aA;l&&(ye*=_.tilePixelRatio/S);const{width:Ae,height:Ve,anchor:Be,textOffset:Ne,textBoxScale:qe}=de,wt=Uc(Be,Ae,Ve,Ne,qe,ye),bt=m.getPitchedTextCorrection(ve.x+z[0],ve.y+z[1],F),ut=B0(we.point,ge,n,wt,-m.bearingInRadians,bt),zt=_.allowVerticalPlacement&&le.placedOrientation===o.an.vertical?Math.PI/2:0;for(let hr=0;hr<le.numGlyphs;hr++)o.au(G,ut,zt);A&&le.associatedIconIndex>=0&&(ae[le.associatedIconIndex]={shiftedAnchor:ut,angle:zt})}else ho(le.numGlyphs,G)}if(A){Y.clear();const oe=_.icon.placedSymbolArray;for(let le=0;le<oe.length;le++){const de=oe.get(le);if(de.hidden)ho(de.numGlyphs,Y);else{const ve=ae[le];if(ve)for(let ge=0;ge<de.numGlyphs;ge++)o.au(Y,ve.shiftedAnchor,ve.angle);else ho(de.numGlyphs,Y)}}_.icon.dynamicLayoutVertexBuffer.updateData(Y)}_.text.dynamicLayoutVertexBuffer.updateData(G)}function Ug(_,n,l){return l.iconsInText&&n?"symbolTextAndIcon":_?"symbolSDF":"symbolIcon"}function Vg(_,n,l,p,m,v,S,E,A,z,F,j,N){const G=_.context,Y=G.gl,ae=_.transform,oe=E==="map",le=A==="map",de=E!=="viewport"&&l.layout.get("symbol-placement")!=="point",ve=oe&&!le&&!de,ge=!l.layout.get("symbol-sort-key").isConstant();let we=!1;const Ce=_.getDepthModeForSublayer(0,ur.ReadOnly),ye=l._unevaluatedLayout.hasValue("text-variable-anchor")||l._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ae=[],Ve=ae.getCircleRadiusCorrection();for(const Be of p){const Ne=n.getTile(Be),qe=Ne.getBucket(l);if(!qe)continue;const wt=m?qe.text:qe.icon;if(!wt||!wt.segments.get().length||!wt.hasVisibleVertices)continue;const bt=wt.programConfigurations.get(l.id),ut=m||qe.sdfIcons,zt=m?qe.textSizeData:qe.iconSizeData,hr=le||ae.pitch!==0,Ur=_.useProgram(Ug(ut,m,qe),bt),xn=o.am(zt,ae.zoom),Yr=_.style.map.terrain&&_.style.map.terrain.getTerrainData(Be);let wn,rn,Jr,nn,di=[0,0],Pr=null;if(m)rn=Ne.glyphAtlasTexture,Jr=Y.LINEAR,wn=Ne.glyphAtlasTexture.size,qe.iconsInText&&(di=Ne.imageAtlasTexture.size,Pr=Ne.imageAtlasTexture,nn=hr||_.options.rotating||_.options.zooming||zt.kind==="composite"||zt.kind==="camera"?Y.LINEAR:Y.NEAREST);else{const zn=l.layout.get("icon-size").constantOr(0)!==1||qe.iconsNeedLinear;rn=Ne.imageAtlasTexture,Jr=ut||_.options.rotating||_.options.zooming||zn||hr?Y.LINEAR:Y.NEAREST,wn=Ne.imageAtlasTexture.size}const ti=o.aB(Ne,1,_.transform.zoom),fi=nr(oe,_.transform,ti),ea=o.L();o.ap(ea,fi);const ta=on(le,oe,_.transform,ti),ra=o.aC(ae,Ne,v,S),Xs=ae.getProjectionData({overscaledTileID:Be,applyGlobeMatrix:!N,applyTerrainMatrix:!0}),ru=ye&&qe.hasTextData(),nu=l.layout.get("icon-text-fit")!=="none"&&ru&&qe.hasIconData();if(de){const zn=_.style.map.terrain?(Fi,Wn)=>_.style.map.terrain.getElevation(Be,Fi,Wn):null,hn=l.layout.get("text-rotation-alignment")==="map";Jn(qe,_,m,fi,ea,le,z,hn,Be.toUnwrapped(),ae.width,ae.height,ra,zn)}const $l=m&&ye||nu,Hi=de||$l?$g:le?fi:_.transform.clipSpaceToPixelsMatrix,Ps=ut&&l.paint.get(m?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let na;na=ut?qe.iconsInText?M0(zt.kind,xn,ve,le,de,$l,_,Hi,ta,ra,wn,di,Ve):Cl(zt.kind,xn,ve,le,de,$l,_,Hi,ta,ra,m,wn,0,Ve):kf(zt.kind,xn,ve,le,de,$l,_,Hi,ta,ra,m,wn,Ve);const ja={program:Ur,buffers:wt,uniformValues:na,projectionData:Xs,atlasTexture:rn,atlasTextureIcon:Pr,atlasInterpolation:Jr,atlasInterpolationIcon:nn,isSDF:ut,hasHalo:Ps};if(ge&&qe.canOverlap){we=!0;const zn=wt.segments.get();for(const hn of zn)Ae.push({segments:new o.aL([hn]),sortKey:hn.sortKey,state:ja,terrainData:Yr})}else Ae.push({segments:wt.segments,sortKey:0,state:ja,terrainData:Yr})}we&&Ae.sort((Be,Ne)=>Be.sortKey-Ne.sortKey);for(const Be of Ae){const Ne=Be.state;if(G.activeTexture.set(Y.TEXTURE0),Ne.atlasTexture.bind(Ne.atlasInterpolation,Y.CLAMP_TO_EDGE),Ne.atlasTextureIcon&&(G.activeTexture.set(Y.TEXTURE1),Ne.atlasTextureIcon&&Ne.atlasTextureIcon.bind(Ne.atlasInterpolationIcon,Y.CLAMP_TO_EDGE)),Ne.isSDF){const qe=Ne.uniformValues;Ne.hasHalo&&(qe.u_is_halo=1,bh(Ne.buffers,Be.segments,l,_,Ne.program,Ce,F,j,qe,Ne.projectionData,Be.terrainData)),qe.u_is_halo=0}bh(Ne.buffers,Be.segments,l,_,Ne.program,Ce,F,j,Ne.uniformValues,Ne.projectionData,Be.terrainData)}}function bh(_,n,l,p,m,v,S,E,A,z,F){const j=p.context;m.draw(j,j.gl.TRIANGLES,v,S,E,or.backCCW,A,F,z,l.id,_.layoutVertexBuffer,_.indexBuffer,n,l.paint,p.transform.zoom,_.programConfigurations.get(l.id),_.dynamicLayoutVertexBuffer,_.opacityVertexBuffer)}function xh(_,n,l,p,m){const v=_.context,S=v.gl,E=Jt.disabled,A=new Er([S.ONE,S.ONE],o.be.transparent,[!0,!0,!0,!0]),z=n.getBucket(l);if(!z)return;const F=p.key;let j=l.heatmapFbos.get(F);j||(j=Vc(v,n.tileSize,n.tileSize),l.heatmapFbos.set(F,j)),v.bindFramebuffer.set(j.framebuffer),v.viewport.set([0,0,n.tileSize,n.tileSize]),v.clear({color:o.be.transparent});const N=z.programConfigurations.get(l.id),G=_.useProgram("heatmap",N,!m),Y=_.transform.getProjectionData({overscaledTileID:n.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),ae=_.style.map.terrain.getTerrainData(p);G.draw(v,S.TRIANGLES,ur.disabled,E,A,or.disabled,Nc(n,_.transform.zoom,l.paint.get("heatmap-intensity"),1),ae,Y,l.id,z.layoutVertexBuffer,z.indexBuffer,z.segments,l.paint,_.transform.zoom,N)}function wh(_,n,l,p,m){const v=_.context,S=v.gl,E=_.transform;v.setColorMode(_.colorModeForRenderPass());const A=Sh(v,n),z=l.key,F=n.heatmapFbos.get(z);if(!F)return;v.activeTexture.set(S.TEXTURE0),S.bindTexture(S.TEXTURE_2D,F.colorAttachment.get()),v.activeTexture.set(S.TEXTURE1),A.bind(S.LINEAR,S.CLAMP_TO_EDGE);const j=E.getProjectionData({overscaledTileID:l,applyTerrainMatrix:m,applyGlobeMatrix:!p});_.useProgram("heatmapTexture").draw(v,S.TRIANGLES,ur.disabled,Jt.disabled,_.colorModeForRenderPass(),or.disabled,Cg(_,n,0,1),null,j,n.id,_.rasterBoundsBuffer,_.quadTriangleIndexBuffer,_.rasterBoundsSegments,n.paint,E.zoom),F.destroy(),n.heatmapFbos.delete(z)}function Vc(_,n,l){var p,m;const v=_.gl,S=v.createTexture();v.bindTexture(v.TEXTURE_2D,S),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_WRAP_S,v.CLAMP_TO_EDGE),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_WRAP_T,v.CLAMP_TO_EDGE),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_MIN_FILTER,v.LINEAR),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_MAG_FILTER,v.LINEAR);const E=(p=_.HALF_FLOAT)!==null&&p!==void 0?p:v.UNSIGNED_BYTE,A=(m=_.RGBA16F)!==null&&m!==void 0?m:v.RGBA;v.texImage2D(v.TEXTURE_2D,0,A,n,l,0,v.RGBA,E,null);const z=_.createFramebuffer(n,l,!1,!1);return z.colorAttachment.set(S),z}function Sh(_,n){return n.colorRampTexture||(n.colorRampTexture=new o.T(_,n.colorRamp,_.gl.RGBA)),n.colorRampTexture}function Bf(_,n,l,p,m){if(!l||!p||!p.imageAtlas)return;const v=p.imageAtlas.patternPositions;let S=v[l.to.toString()],E=v[l.from.toString()];if(!S&&E&&(S=E),!E&&S&&(E=S),!S||!E){const A=m.getPaintProperty(n);S=v[A],E=v[A]}S&&E&&_.setConstantPatternPositions(S,E)}function qc(_,n,l,p,m,v,S,E){const A=_.context.gl,z="fill-pattern",F=l.paint.get(z),j=F&&F.constantOr(1),N=l.getCrossfadeParameters();let G,Y,ae,oe,le;const de=_.transform,ve=l.paint.get("fill-translate"),ge=l.paint.get("fill-translate-anchor");S?(Y=j&&!l.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",G=A.LINES):(Y=j?"fillPattern":"fill",G=A.TRIANGLES);const we=F.constantOr(null);for(const Ce of p){const ye=n.getTile(Ce);if(j&&!ye.patternsLoaded())continue;const Ae=ye.getBucket(l);if(!Ae)continue;const Ve=Ae.programConfigurations.get(l.id),Be=_.useProgram(Y,Ve),Ne=_.style.map.terrain&&_.style.map.terrain.getTerrainData(Ce);j&&(_.context.activeTexture.set(A.TEXTURE0),ye.imageAtlasTexture.bind(A.LINEAR,A.CLAMP_TO_EDGE),Ve.updatePaintBuffers(N)),Bf(Ve,z,we,ye,l);const qe=de.getProjectionData({overscaledTileID:Ce,applyGlobeMatrix:!E,applyTerrainMatrix:!0}),wt=o.aC(de,ye,ve,ge);if(S){oe=Ae.indexBuffer2,le=Ae.segments2;const ut=[A.drawingBufferWidth,A.drawingBufferHeight];ae=Y==="fillOutlinePattern"&&j?I0(_,N,ye,ut,wt):Zs(ut,wt)}else oe=Ae.indexBuffer,le=Ae.segments,ae=j?hh(_,N,ye,wt):{u_fill_translate:wt};const bt=_.stencilModeForClipping(Ce);
817Be.draw(_.context,G,m,bt,v,or.backCCW,ae,Ne,qe,l.id,Ae.layoutVertexBuffer,oe,le,l.paint,_.transform.zoom,Ve)}}function Al(_,n,l,p,m,v,S,E){const A=_.context,z=A.gl,F="fill-extrusion-pattern",j=l.paint.get(F),N=j.constantOr(1),G=l.getCrossfadeParameters(),Y=l.paint.get("fill-extrusion-opacity"),ae=j.constantOr(null),oe=_.transform;for(const le of p){const de=n.getTile(le),ve=de.getBucket(l);if(!ve)continue;const ge=_.style.map.terrain&&_.style.map.terrain.getTerrainData(le),we=ve.programConfigurations.get(l.id),Ce=_.useProgram(N?"fillExtrusionPattern":"fillExtrusion",we);N&&(_.context.activeTexture.set(z.TEXTURE0),de.imageAtlasTexture.bind(z.LINEAR,z.CLAMP_TO_EDGE),we.updatePaintBuffers(G));const ye=oe.getProjectionData({overscaledTileID:le,applyGlobeMatrix:!E,applyTerrainMatrix:!0});Bf(we,F,ae,de,l);const Ae=o.aC(oe,de,l.paint.get("fill-extrusion-translate"),l.paint.get("fill-extrusion-translate-anchor")),Ve=l.paint.get("fill-extrusion-vertical-gradient"),Be=N?wf(_,Ve,Y,Ae,le,G,de):Oc(_,Ve,Y,Ae);Ce.draw(A,A.gl.TRIANGLES,m,v,S,or.backCCW,Be,ge,ye,l.id,ve.layoutVertexBuffer,ve.indexBuffer,ve.segments,l.paint,_.transform.zoom,we,_.style.map.terrain&&ve.centroidVertexBuffer)}}function Ml(_,n,l,p,m,v,S,E,A){var z;const F=_.style.projection,j=_.context,N=_.transform,G=j.gl,Y=[`#define NUM_ILLUMINATION_SOURCES ${l.paint.get("hillshade-highlight-color").values.length}`],ae=_.useProgram("hillshade",null,!1,Y),oe=!_.options.moving;for(const le of p){const de=n.getTile(le),ve=de.fbo;if(!ve)continue;const ge=F.getMeshFromTileID(j,le.canonical,E,!0,"raster"),we=(z=_.style.map.terrain)===null||z===void 0?void 0:z.getTerrainData(le);j.activeTexture.set(G.TEXTURE0),G.bindTexture(G.TEXTURE_2D,ve.colorAttachment.get());const Ce=N.getProjectionData({overscaledTileID:le,aligned:oe,applyGlobeMatrix:!A,applyTerrainMatrix:!0});ae.draw(j,G.TRIANGLES,v,m[le.overscaledZ],S,or.backCCW,Tl(_,de,l),we,Ce,l.id,ge.vertexBuffer,ge.indexBuffer,ge.segments)}}function Gc(_,n,l,p,m,v,S,E,A){var z;const F=_.style.projection,j=_.context,N=_.transform,G=j.gl,Y=_.useProgram("colorRelief"),ae=!_.options.moving;let oe=!0;for(const le of p){const de=n.getTile(le),ve=de.dem;if(oe){const Ve=G.getParameter(G.MAX_TEXTURE_SIZE),{elevationTexture:Be,colorTexture:Ne}=l.getColorRampTextures(j,Ve,ve.getUnpackVector());j.activeTexture.set(G.TEXTURE1),Be.bind(G.NEAREST,G.CLAMP_TO_EDGE),j.activeTexture.set(G.TEXTURE4),Ne.bind(G.LINEAR,G.CLAMP_TO_EDGE),oe=!1}if(!ve||!ve.data)continue;const ge=ve.stride,we=ve.getPixels();if(j.activeTexture.set(G.TEXTURE0),j.pixelStoreUnpackPremultiplyAlpha.set(!1),de.demTexture=de.demTexture||_.getTileTexture(ge),de.demTexture){const Ve=de.demTexture;Ve.update(we,{premultiply:!1}),Ve.bind(G.LINEAR,G.CLAMP_TO_EDGE)}else de.demTexture=new o.T(j,we,G.RGBA,{premultiply:!1}),de.demTexture.bind(G.LINEAR,G.CLAMP_TO_EDGE);const Ce=F.getMeshFromTileID(j,le.canonical,E,!0,"raster"),ye=(z=_.style.map.terrain)===null||z===void 0?void 0:z.getTerrainData(le),Ae=N.getProjectionData({overscaledTileID:le,aligned:ae,applyGlobeMatrix:!A,applyTerrainMatrix:!0});Y.draw(j,G.TRIANGLES,v,m[le.overscaledZ],S,or.backCCW,A0(l,de.dem),ye,Ae,l.id,Ce.vertexBuffer,Ce.indexBuffer,Ce.segments)}}const Nf=[new o.P(0,0),new o.P(o.$,0),new o.P(o.$,o.$),new o.P(0,o.$)];function Ko(_,n,l,p,m,v,S,E,A=!1,z=!1){const F=p[p.length-1].overscaledZ,j=_.context,N=j.gl,G=_.useProgram("raster"),Y=_.transform,ae=_.style.projection,oe=_.colorModeForRenderPass(),le=!_.options.moving;for(const de of p){const ve=_.getDepthModeForSublayer(de.overscaledZ-F,l.paint.get("raster-opacity")===1?ur.ReadWrite:ur.ReadOnly,N.LESS),ge=n.getTile(de);ge.registerFadeDuration(l.paint.get("raster-fade-duration"));const we=n.findLoadedParent(de,0),Ce=n.findLoadedSibling(de),ye=j0(ge,we||Ce||null,n,l,_.transform,_.style.map.terrain);let Ae,Ve;const Be=l.paint.get("raster-resampling")==="nearest"?N.NEAREST:N.LINEAR;j.activeTexture.set(N.TEXTURE0),ge.texture.bind(Be,N.CLAMP_TO_EDGE,N.LINEAR_MIPMAP_NEAREST),j.activeTexture.set(N.TEXTURE1),we?(we.texture.bind(Be,N.CLAMP_TO_EDGE,N.LINEAR_MIPMAP_NEAREST),Ae=Math.pow(2,we.tileID.overscaledZ-ge.tileID.overscaledZ
vendor: 5,405 bytes, line 817
817),Ve=[ge.tileID.canonical.x*Ae%1,ge.tileID.canonical.y*Ae%1]):ge.texture.bind(Be,N.CLAMP_TO_EDGE,N.LINEAR_MIPMAP_NEAREST),ge.texture.useMipmap&&j.extTextureFilterAnisotropic&&_.transform.pitch>20&&N.texParameterf(N.TEXTURE_2D,j.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,j.extTextureFilterAnisotropicMax);const Ne=_.style.map.terrain&&_.style.map.terrain.getTerrainData(de),qe=Y.getProjectionData({overscaledTileID:de,aligned:le,applyGlobeMatrix:!z,applyTerrainMatrix:!0}),wt=La(Ve||[0,0],Ae||1,ye,l,E),bt=ae.getMeshFromTileID(j,de.canonical,v,S,"raster");G.draw(j,N.TRIANGLES,ve,m?m[de.overscaledZ]:Jt.disabled,oe,A?or.frontCCW:or.backCCW,wt,Ne,qe,l.id,bt.vertexBuffer,bt.indexBuffer,bt.segments)}}function j0(_,n,l,p,m,v){const S=p.paint.get("raster-fade-duration");if(!v&&S>0){const E=M.now(),A=(E-_.timeAdded)/S,z=n?(E-n.timeAdded)/S:-1,F=l.getSource(),j=Qe(m,{tileSize:F.tileSize,roundZoom:F.roundZoom}),N=!n||Math.abs(n.tileID.overscaledZ-j)>Math.abs(_.tileID.overscaledZ-j),G=N&&_.refreshedUponExpiration?1:o.ag(N?A:1-z,0,1);return _.refreshedUponExpiration&&A>=1&&(_.refreshedUponExpiration=!1),n?{opacity:1,mix:1-G}:{opacity:G,mix:0}}return{opacity:1,mix:0}}const qg=new o.be(1,0,0,1),Th=new o.be(0,1,0,1),jf=new o.be(0,0,1,1),Gg=new o.be(1,0,1,1),Hg=new o.be(0,1,1,1);function Hc(_,n,l,p){Eh(_,0,n+l/2,_.transform.width,l,p)}function Ch(_,n,l,p){Eh(_,n-l/2,0,l,_.transform.height,p)}function Eh(_,n,l,p,m,v){const S=_.context,E=S.gl;E.enable(E.SCISSOR_TEST),E.scissor(n*_.pixelRatio,l*_.pixelRatio,p*_.pixelRatio,m*_.pixelRatio),S.clear({color:v}),E.disable(E.SCISSOR_TEST)}function Zg(_,n,l){const p=_.context,m=p.gl,v=_.useProgram("debug"),S=ur.disabled,E=Jt.disabled,A=_.colorModeForRenderPass(),z="$debug",F=_.style.map.terrain&&_.style.map.terrain.getTerrainData(l);p.activeTexture.set(m.TEXTURE0);const j=n.getTileByID(l.key).latestRawTileData,N=Math.floor((j&&j.byteLength||0)/1024),G=n.getTile(l).tileSize,Y=512/Math.min(G,512)*(l.overscaledZ/_.transform.zoom)*.5;let ae=l.canonical.toString();l.overscaledZ!==l.canonical.z&&(ae+=` => ${l.overscaledZ}`),function(le,de){le.initDebugOverlayCanvas();const ve=le.debugOverlayCanvas,ge=le.context.gl,we=le.debugOverlayCanvas.getContext("2d");we.clearRect(0,0,ve.width,ve.height),we.shadowColor="white",we.shadowBlur=2,we.lineWidth=1.5,we.strokeStyle="white",we.textBaseline="top",we.font="bold 36px Open Sans, sans-serif",we.fillText(de,5,5),we.strokeText(de,5,5),le.debugOverlayTexture.update(ve),le.debugOverlayTexture.bind(ge.LINEAR,ge.CLAMP_TO_EDGE)}(_,`${ae} ${N}kB`);const oe=_.transform.getProjectionData({overscaledTileID:l,applyGlobeMatrix:!0,applyTerrainMatrix:!0});v.draw(p,m.TRIANGLES,S,E,Er.alphaBlended,or.disabled,Tg(o.be.transparent,Y),null,oe,z,_.debugBuffer,_.quadTriangleIndexBuffer,_.debugSegments),v.draw(p,m.LINE_STRIP,S,E,A,or.disabled,Tg(o.be.red),F,oe,z,_.debugBuffer,_.tileBorderIndexBuffer,_.debugSegments)}function Pn(_,n,l,p){const{isRenderingGlobe:m}=p,v=_.context,S=v.gl,E=_.transform,A=_.colorModeForRenderPass(),z=_.getDepthModeFor3D(),F=_.useProgram("terrain");v.bindFramebuffer.set(null),v.viewport.set([0,0,_.width,_.height]);for(const j of l){const N=n.getTerrainMesh(j.tileID),G=_.renderToTexture.getTexture(j),Y=n.getTerrainData(j.tileID);v.activeTexture.set(S.TEXTURE0),S.bindTexture(S.TEXTURE_2D,G.texture);const ae=n.getMeshFrameDelta(E.zoom),oe=E.calculateFogMatrix(j.tileID.toUnwrapped()),le=E0(ae,oe,_.style.sky,E.pitch,m),de=E.getProjectionData({overscaledTileID:j.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});F.draw(v,S.TRIANGLES,z,Jt.disabled,A,or.backCCW,le,Y,de,"terrain",N.vertexBuffer,N.indexBuffer,N.segments)}}function Xo(_,n){if(!n.mesh){const l=new o.aK;l.emplaceBack(-1,-1),l.emplaceBack(1,-1),l.emplaceBack(1,1),l.emplaceBack(-1,1);const p=new o.aM;p.emplaceBack(0,1,2),p.emplaceBack(0,2,3),n.mesh=new po(_.createVertexBuffer(l,mo.members),_.createIndexBuffer(p),o.aL.simpleSegment(0,0,l.length,p.length))}return n.mesh}class vs{constructor(n,l){this.context=new br(n),this.transform=l,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:o.af(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=st.maxUnderzooming+st.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ih}resize(n,l,p){if(this.width=Math.floor(n*p),this.height=Math.floor(l*p),this.pixelRatio=p,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const m of this.style._order)this.style._layers[m].resize()}setup(){const n=this.context,l=new o.aK;l.emplaceBack(0,0),l.emplaceBack(o.$,0),l.emplaceBack(0,o.$),l.emplaceBack(o.$,o.$),this.tileExtentBuffer=n.createVertexBuffer(l,mo.members),this.tileExtentSegments=o.aL.simpleSegment(0,0,4,2);const p=new o.aK;p.emplaceBack(0,0),p.emplaceBack(o.$,0),p.emplaceBack(0,o.$),p.emplaceBack(o.$,o.$),this.debugBuffer=n.createVertexBuffer(p,mo.members),this.debugSegments=o.aL.simpleSegment(0,0,4,5);const m=new o.c5;m.emplaceBack(0,0,0,0),m.emplaceBack(o.$,0,o.$,0),m.emplaceBack(0,o.$,0,o.$),m.emplaceBack(o.$,o.$,o.$,o.$),this.rasterBoundsBuffer=n.createVertexBuffer(m,T0.members),this.rasterBoundsSegments=o.aL.simpleSegment(0,0,4,2);const v=new o.aK;v.emplaceBack(0,0),v.emplaceBack(o.$,0),v.emplaceBack(0,o.$),v.emplaceBack(o.$,o.$),this.rasterBoundsBufferPosOnly=n.createVertexBuffer(v,mo.members),this.rasterBoundsSegmentsPosOnly=o.aL.simpleSegment(0,0,4,5);const S=new o.aK;
vendor: 8,320 bytes, line 817
817S.emplaceBack(0,0),S.emplaceBack(1,0),S.emplaceBack(0,1),S.emplaceBack(1,1),this.viewportBuffer=n.createVertexBuffer(S,mo.members),this.viewportSegments=o.aL.simpleSegment(0,0,4,2);const E=new o.c6;E.emplaceBack(0),E.emplaceBack(1),E.emplaceBack(3),E.emplaceBack(2),E.emplaceBack(0),this.tileBorderIndexBuffer=n.createIndexBuffer(E);const A=new o.aM;A.emplaceBack(1,0,2),A.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=n.createIndexBuffer(A);const z=this.context.gl;this.stencilClearMode=new Jt({func:z.ALWAYS,mask:0},0,255,z.ZERO,z.ZERO,z.ZERO),this.tileExtentMesh=new po(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){const n=this.context,l=n.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const p=o.L();o.bX(p,0,this.width,this.height,0,0,1),o.N(p,p,[l.drawingBufferWidth,l.drawingBufferHeight,0]);const m={mainMatrix:p,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:p};this.useProgram("clippingMask",null,!0).draw(n,l.TRIANGLES,ur.disabled,this.stencilClearMode,Er.disabled,or.disabled,null,null,m,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(n,l,p){if(this.currentStencilSource===n.source||!n.isTileClipped()||!l||!l.length)return;this.currentStencilSource=n.source,this.nextStencilID+l.length>256&&this.clearStencil();const m=this.context;m.setColorMode(Er.disabled),m.setDepthMode(ur.disabled);const v={};for(const S of l)v[S.key]=this.nextStencilID++;this._renderTileMasks(v,l,p,!0),this._renderTileMasks(v,l,p,!1),this._tileClippingMaskIDs=v}_renderTileMasks(n,l,p,m){const v=this.context,S=v.gl,E=this.style.projection,A=this.transform,z=this.useProgram("clippingMask");for(const F of l){const j=n[F.key],N=this.style.map.terrain&&this.style.map.terrain.getTerrainData(F),G=E.getMeshFromTileID(this.context,F.canonical,m,!0,"stencil"),Y=A.getProjectionData({overscaledTileID:F,applyGlobeMatrix:!p,applyTerrainMatrix:!0});z.draw(v,S.TRIANGLES,ur.disabled,new Jt({func:S.ALWAYS,mask:0},j,255,S.KEEP,S.KEEP,S.REPLACE),Er.disabled,p?or.disabled:or.backCCW,null,N,Y,"$clipping",G.vertexBuffer,G.indexBuffer,G.segments)}}_renderTilesDepthBuffer(){const n=this.context,l=n.gl,p=this.style.projection,m=this.transform,v=this.useProgram("depth"),S=this.getDepthModeFor3D(),E=We(m,{tileSize:m.tileSize});for(const A of E){const z=this.style.map.terrain&&this.style.map.terrain.getTerrainData(A),F=p.getMeshFromTileID(this.context,A.canonical,!0,!0,"raster"),j=m.getProjectionData({overscaledTileID:A,applyGlobeMatrix:!0,applyTerrainMatrix:!0});v.draw(n,l.TRIANGLES,S,Jt.disabled,Er.disabled,or.backCCW,null,z,j,"$clipping",F.vertexBuffer,F.indexBuffer,F.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const n=this.nextStencilID++,l=this.context.gl;return new Jt({func:l.NOTEQUAL,mask:255},n,255,l.KEEP,l.KEEP,l.REPLACE)}stencilModeForClipping(n){const l=this.context.gl;return new Jt({func:l.EQUAL,mask:255},this._tileClippingMaskIDs[n.key],0,l.KEEP,l.KEEP,l.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(n){const l=this.context.gl,p=n.sort((S,E)=>E.overscaledZ-S.overscaledZ),m=p[p.length-1].overscaledZ,v=p[0].overscaledZ-m+1;if(v>1){this.currentStencilSource=void 0,this.nextStencilID+v>256&&this.clearStencil();const S={};for(let E=0;E<v;E++)S[E+m]=new Jt({func:l.GEQUAL,mask:255},E+this.nextStencilID,255,l.KEEP,l.KEEP,l.REPLACE);return this.nextStencilID+=v,[S,p]}return[{[m]:Jt.disabled},p]}stencilConfigForOverlapTwoPass(n){const l=this.context.gl,p=n.sort((S,E)=>E.overscaledZ-S.overscaledZ),m=p[p.length-1].overscaledZ,v=p[0].overscaledZ-m+1;if(this.clearStencil(),v>1){const S={},E={};for(let A=0;A<v;A++)S[A+m]=new Jt({func:l.GREATER,mask:255},v+1+A,255,l.KEEP,l.KEEP,l.REPLACE),E[A+m]=new Jt({func:l.GREATER,mask:255},1+A,255,l.KEEP,l.KEEP,l.REPLACE);return this.nextStencilID=2*v+1,[S,E,p]}return this.nextStencilID=3,[{[m]:new Jt({func:l.GREATER,mask:255},2,255,l.KEEP,l.KEEP,l.REPLACE)},{[m]:new Jt({func:l.GREATER,mask:255},1,255,l.KEEP,l.KEEP,l.REPLACE)},p]}colorModeForRenderPass(){const n=this.context.gl;return this._showOverdrawInspector?new Er([n.CONSTANT_COLOR,n.ONE],new o.be(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Er.unblended:Er.alphaBlended}getDepthModeForSublayer(n,l,p){if(!this.opaquePassEnabledForLayer())return ur.disabled;const m=1-((1+this.currentLayer)*this.numSublayers+n)*this.depthEpsilon;return new ur(p||this.context.gl.LEQUAL,l,[m,m])}getDepthModeFor3D(){return new ur(this.context.gl.LEQUAL,ur.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(n,l){var p,m;this.style=n,this.options=l,this.lineAtlas=n.lineAtlas,this.imageManager=n.imageManager,this.glyphManager=n.glyphManager,this.symbolFadeChange=n.placement.symbolFadeChange(M.now()),this.imageManager.beginFrame();const v=this.style._order,S=this.style.sourceCaches,E={},A={},z={},F={isRenderingToTexture:!1,isRenderingGlobe:((p=n.projection)===null||p===void 0?void 0:p.transitionState)>0};for(const N in S){const G=S[N];G.used&&G.prepare(this.context),E[N]=G.getVisibleCoordinates(!1),A[N]=E[N].slice().reverse(),z[N]=G.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let N=0;N<v.length;N++)if(this.style._layers[v[N]].is3D()){this.opaquePassCutoff=N;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const N of v){const G=this.style._layers[N];if(!G.hasOffscreenPass()||G.isHidden(this.transform.zoom))continue;const Y=A[G.source];(G.type==="custom"||Y.length)&&this.renderLayer(this,S[G.source],G,Y,F)}if((m=this.style.projection)===null||m===void 0||m.updateGPUdependent({context:this.context,useProgram:N=>this.useProgram(N)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:l.showOverdrawInspector?o.be.black:o.be.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(N,G){const Y=N.context,ae=Y.gl,oe=((Ce,ye,Ae)=>{const Ve=Math.cos(ye.rollInRadians),Be=Math.sin(ye.rollInRadians),Ne=re(ye),qe=ye.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:Ce.properties.get("sky-color"),u_horizon_color:Ce.properties.get("horizon-color"),u_horizon:[(ye.width/2-Ne*Be)*Ae,(ye.height/2+Ne*Ve)*Ae],u_horizon_normal:[-Be,Ve],u_sky_horizon_blend:Ce.properties.get("sky-horizon-blend")*ye.height/2*Ae,u_sky_blend:qe}})(G,N.style.map.transform,N.pixelRatio),le=new ur(ae.LEQUAL,ur.ReadWrite,[0,1]),de=Jt.disabled,ve=N.colorModeForRenderPass(),ge=N.useProgram("sky"),we=Xo(Y,G);ge.draw(Y,ae.TRIANGLES,le,de,ve,or.disabled,oe,null,void 0,"sky",we.vertexBuffer,we.indexBuffer,we.segments)}(this,this.style.sky),this._showOverdrawInspector=l.showOverdrawInspector,this.depthRangeFor3D=[0,1-(n._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=v.length-1;this.currentLayer>=0;this.currentLayer--){const N=this.style._layers[v[this.currentLayer]],G=S[N.source],Y=E[N.source];this._renderTileClippingMasks(N,Y,!1),this.renderLayer(this,G,N,Y,F)}this.renderPass="translucent";let j=!1;for(this.currentLayer=0;this.currentLayer<v.length;this.currentLayer++){const N=this.style._layers[v[this.currentLayer]],G=S[N.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(N,F))continue;this.opaquePassEnabledForLayer()||j||(j=!0,F.isRenderingGlobe&&!this.style.map.terrain&&this._renderTilesDepthBuffer());const Y=(N.type==="symbol"?z:A)[N.source];this._renderTileClippingMasks(N,E[N.source],!!this.renderToTexture),this.renderLayer(this,G,N,Y,F)}if(F.isRenderingGlobe&&function(N,G,Y){const ae=N.context,oe=ae.gl,le=N.useProgram("atmosphere"),de=new ur(oe.LEQUAL,ur.ReadOnly,[0,1]),ve=N.transform,ge=function(qe,wt){const bt=qe.properties.get("position"),ut=[-bt.x,-bt.y,-bt.z],zt=o.af(new Float64Array(16));return qe.properties.get("anchor")==="map"&&(o.b5(zt,zt,wt.rollInRadians),o.b6(zt,zt,-wt.pitchInRadians),o.b5(zt,zt,wt.bearingInRadians),o.b6(zt,zt,wt.center.lat*Math.PI/180),o.by(zt,zt,-wt.center.lng*Math.PI/180)
817),o.c4(ut,ut,zt),ut}(Y,N.transform),we=ve.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Ce=G.properties.get("atmosphere-blend")*we.projectionTransition;if(Ce===0)return;const ye=_l(ve.worldSize,ve.center.lat),Ae=ve.inverseProjectionMatrix,Ve=new Float64Array(4);Ve[3]=1,o.av(Ve,Ve,ve.modelViewProjectionMatrix),Ve[0]/=Ve[3],Ve[1]/=Ve[3],Ve[2]/=Ve[3],Ve[3]=1,o.av(Ve,Ve,Ae),Ve[0]/=Ve[3],Ve[1]/=Ve[3],Ve[2]/=Ve[3],Ve[3]=1;const Be=((qe,wt,bt,ut,zt)=>({u_sun_pos:qe,u_atmosphere_blend:wt,u_globe_position:bt,u_globe_radius:ut,u_inv_proj_matrix:zt}))(ge,Ce,[Ve[0],Ve[1],Ve[2]],ye,Ae),Ne=Xo(ae,G);le.draw(ae,oe.TRIANGLES,de,Jt.disabled,Er.alphaBlended,or.disabled,Be,null,null,"atmosphere",Ne.vertexBuffer,Ne.indexBuffer,Ne.segments)}(this,this.style.sky,this.style.light),this.options.showTileBoundaries){const N=function(G,Y){let ae=null;const oe=Object.values(G._layers).flatMap(ge=>ge.source&&!ge.isHidden(Y)?[G.sourceCaches[ge.source]]:[]),le=oe.filter(ge=>ge.getSource().type==="vector"),de=oe.filter(ge=>ge.getSource().type!=="vector"),ve=ge=>{(!ae||ae.getSource().maxzoom<ge.getSource().maxzoom)&&(ae=ge)};return le.forEach(ge=>ve(ge)),ae||de.forEach(ge=>ve(ge)),ae}(this.style,this.transform.zoom);N&&function(G,Y,ae){for(let oe=0;oe<ae.length;oe++)Zg(G,Y,ae[oe])}(this,N,N.getVisibleCoordinates())}this.options.showPadding&&function(N){const G=N.transform.padding;Hc(N,N.transform.height-(G.top||0),3,qg),Hc(N,G.bottom||0,3,Th),Ch(N,G.left||0,3,jf),Ch(N,N.transform.width-(G.right||0),3,Gg);const Y=N.transform.centerPoint;(function(ae,oe,le,de){Eh(ae,oe-1,le-10,2,20,de),Eh(ae,oe-10,le-1,20,2,de)})(N,Y.x,N.transform.height-Y.y,Hg)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(n){if(!this.style||!this.style.map||!this.style.map.terrain)return;const l=this.terrainFacilitator.matrix,p=this.transform.modelViewProjectionMatrix;let m=this.terrainFacilitator.dirty;m||(m=n?!o.c7(l,p):!o.c8(l,p)),m||(m=this.style.map.terrain.sourceCache.anyTilesAfterTime(this.terrainFacilitator.renderTime)),m&&(o.c9(l,p),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(v,S){const E=v.context,A=E.gl,z=v.transform,F=Er.unblended,j=new ur(A.LEQUAL,ur.ReadWrite,[0,1]),N=S.sourceCache.getRenderableTiles(),G=v.useProgram("terrainDepth");E.bindFramebuffer.set(S.getFramebuffer("depth").framebuffer),E.viewport.set([0,0,v.width/devicePixelRatio,v.height/devicePixelRatio]),E.clear({color:o.be.transparent,depth:1});for(const Y of N){const ae=S.getTerrainMesh(Y.tileID),oe=S.getTerrainData(Y.tileID),le=z.getProjectionData({overscaledTileID:Y.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),de={u_ele_delta:S.getMeshFrameDelta(z.zoom)};G.draw(E,A.TRIANGLES,j,Jt.disabled,F,or.backCCW,de,oe,le,"terrain",ae.vertexBuffer,ae.indexBuffer,ae.segments)}E.bindFramebuffer.set(null),E.viewport.set([0,0,v.width,v.height])}(this,this.style.map.terrain),function(v,S){const E=v.context,A=E.gl,z=v.transform,F=Er.unblended,j=new ur(A.LEQUAL,ur.ReadWrite,[0,1]),N=S.getCoordsTexture(),G=S.sourceCache.getRenderableTiles(),Y=v.useProgram("terrainCoords");E.bindFramebuffer.set(S.getFramebuffer("coords").framebuffer),E.viewport.set([0,0,v.width/devicePixelRatio,v.height/devicePixelRatio]),E.clear({color:o.be.transparent,depth:1}),S.coordsIndex=[];for(const ae of G){const oe=S.getTerrainMesh(ae.tileID),le=S.getTerrainData(ae.tileID);E.activeTexture.set(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,N.texture);const de={u_terrain_coords_id:(255-S.coordsIndex.length)/255,u_texture:0,u_ele_delta:S.getMeshFrameDelta(z.zoom)},ve=z.getProjectionData({overscaledTileID:ae.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});Y.draw(E,A.TRIANGLES,j,Jt.disabled,F,or.backCCW,de,le,ve,"terrain",oe.vertexBuffer,oe.indexBuffer,oe.segments),S.coordsIndex.push(ae.tileID.key)}E.bindFramebuffer.set(null),E.viewport.set([0,0,v.width,v.height])}(this,this.style.map.terrain))}renderLayer(n,l,p,m,v){p.isHidden(this.transform.zoom)||(p.type==="background"||p.type==="custom"||(m||[]).length)&&(this.id=p.id,o.ca(p)?function(S,E,A,z,F,j){if(S.renderPass!=="translucent")return;const{isRenderingToTexture:N}=j,G=Jt.disabled,Y=S.colorModeForRenderPass();(A._unevaluatedLayout.hasValue("text-variable-anchor")||A._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(ae,oe,le,de,ve,ge,we,Ce,ye){const Ae=oe.transform,Ve=oe.style.map.terrain,Be=ve==="map",Ne=ge==="map";for(const qe of ae){const wt=de.getTile(qe),bt=wt.getBucket(le);if(!bt||!bt.text||!bt.text.segments.get().length)continue;const ut=o.am(bt.textSizeData,Ae.zoom),zt=o.aB(wt,1,oe.transform.zoom),hr=nr(Be,oe.transform,zt),Ur=le.layout.get("icon-text-fit")!=="none"&&bt.hasIconData();
817if(ut){const xn=Math.pow(2,Ae.zoom-wt.tileID.overscaledZ),Yr=Ve?(wn,rn)=>Ve.getElevation(qe,wn,rn):null;N0(bt,Be,Ne,ye,Ae,hr,xn,ut,Ur,o.aC(Ae,wt,we,Ce),qe.toUnwrapped(),Yr)}}}(z,S,A,E,A.layout.get("text-rotation-alignment"),A.layout.get("text-pitch-alignment"),A.paint.get("text-translate"),A.paint.get("text-translate-anchor"),F),A.paint.get("icon-opacity").constantOr(1)!==0&&Vg(S,E,A,z,!1,A.paint.get("icon-translate"),A.paint.get("icon-translate-anchor"),A.layout.get("icon-rotation-alignment"),A.layout.get("icon-pitch-alignment"),A.layout.get("icon-keep-upright"),G,Y,N),A.paint.get("text-opacity").constantOr(1)!==0&&Vg(S,E,A,z,!0,A.paint.get("text-translate"),A.paint.get("text-translate-anchor"),A.layout.get("text-rotation-alignment"),A.layout.get("text-pitch-alignment"),A.layout.get("text-keep-upright"),G,Y,N),E.map.showCollisionBoxes&&(jg(S,E,A,z,!0),jg(S,E,A,z,!1))}(n,l,p,m,this.style.placement.variableOffsets,v):o.cb(p)?function(S,E,A,z,F){if(S.renderPass!=="translucent")return;const{isRenderingToTexture:j}=F,N=A.paint.get("circle-opacity"),G=A.paint.get("circle-stroke-width"),Y=A.paint.get("circle-stroke-opacity"),ae=!A.layout.get("circle-sort-key").isConstant();if(N.constantOr(1)===0&&(G.constantOr(1)===0||Y.constantOr(1)===0))return;const oe=S.context,le=oe.gl,de=S.transform,ve=S.getDepthModeForSublayer(0,ur.ReadOnly),ge=Jt.disabled,we=S.colorModeForRenderPass(),Ce=[],ye=de.getCircleRadiusCorrection();for(let Ae=0;Ae<z.length;Ae++){const Ve=z[Ae],Be=E.getTile(Ve),Ne=Be.getBucket(A);if(!Ne)continue;const qe=A.paint.get("circle-translate"),wt=A.paint.get("circle-translate-anchor"),bt=o.aC(de,Be,qe,wt),ut=Ne.programConfigurations.get(A.id),zt=S.useProgram("circle",ut),hr=Ne.layoutVertexBuffer,Ur=Ne.indexBuffer,xn=S.style.map.terrain&&S.style.map.terrain.getTerrainData(Ve),Yr={programConfiguration:ut,program:zt,layoutVertexBuffer:hr,indexBuffer:Ur,uniformValues:Sf(S,Be,A,bt,ye),terrainData:xn,projectionData:de.getProjectionData({overscaledTileID:Ve,applyGlobeMatrix:!j,applyTerrainMatrix:!0})};if(ae){const wn=Ne.segments.get();for(const rn of wn)Ce.push({segments:new o.aL([rn]),sortKey:rn.sortKey,state:Yr})}else Ce.push({segments:Ne.segments,sortKey:0,state:Yr})}ae&&Ce.sort((Ae,Ve)=>Ae.sortKey-Ve.sortKey);for(const Ae of Ce){const{programConfiguration:Ve,program:Be,layoutVertexBuffer:Ne,indexBuffer:qe,uniformValues:wt,terrainData:bt,projectionData:ut}=Ae.state;Be.draw(oe,le.TRIANGLES,ve,ge,we,or.backCCW,wt,bt,ut,A.id,Ne,qe,Ae.segments,A.paint,S.transform.zoom,Ve)}}(n,l,p,m,v):o.cc(p)?function(S,E,A,z,F){if(A.paint.get("heatmap-opacity")===0)return;const j=S.context,{isRenderingToTexture:N,isRenderingGlobe:G}=F;if(S.style.map.terrain){for(const Y of z){const ae=E.getTile(Y);E.hasRenderableParent(Y)||(S.renderPass==="offscreen"?xh(S,ae,A,Y,G):S.renderPass==="translucent"&&wh(S,A,Y,N,G))}j.viewport.set([0,0,S.width,S.height])}else S.renderPass==="offscreen"?function(Y,ae,oe,le){const de=Y.context,ve=de.gl,ge=Y.transform,we=Jt.disabled,Ce=new Er([ve.ONE,ve.ONE],o.be.transparent,[!0,!0,!0,!0]);(function(ye,Ae,Ve){const Be=ye.gl;ye.activeTexture.set(Be.TEXTURE1),ye.viewport.set([0,0,Ae.width/4,Ae.height/4]);let Ne=Ve.heatmapFbos.get(o.c1);Ne?(Be.bindTexture(Be.TEXTURE_2D,Ne.colorAttachment.get()),ye.bindFramebuffer.set(Ne.framebuffer)):(Ne=Vc(ye,Ae.width/4,Ae.height/4),Ve.heatmapFbos.set(o.c1,Ne))})(de,Y,oe),de.clear({color:o.be.transparent});for(let ye=0;ye<le.length;ye++){const Ae=le[ye];if(ae.hasRenderableParent(Ae))continue;const Ve=ae.getTile(Ae),Be=Ve.getBucket(oe);if(!Be)continue;const Ne=Be.programConfigurations.get(oe.id),qe=Y.useProgram("heatmap",Ne),wt=ge.getProjectionData({overscaledTileID:Ae,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),bt=ge.getCircleRadiusCorrection();qe.draw(de,ve.TRIANGLES,ur.disabled,we,Ce,or.backCCW,Nc(Ve,ge.zoom,oe.paint.get("heatmap-intensity"),bt),null,wt,oe.id,Be.layoutVertexBuffer,Be.indexBuffer,Be.segments,oe.paint,ge.zoom,Ne)}de.viewport.set([0,0,Y.width,Y.height])}(S,E,A,z):S.renderPass==="translucent"&&function(Y,ae){const oe=Y.context,le=oe.gl;oe.setColorMode(Y.colorModeForRenderPass());const de=ae.heatmapFbos.get(o.c1);de&&(oe.activeTexture.set(le.TEXTURE0),le.bindTexture(le.TEXTURE_2D,de.colorAttachment.get()),oe.activeTexture.set(le.TEXTURE1),Sh(oe,ae).bind(le.LINEAR,le.CLAMP_TO_EDGE),Y.useProgram("heatmapTexture").draw(oe,le.TRIANGLES,ur.disabled,Jt.disabled,Y.colorModeForRenderPass(),or.disabled,Cg(Y,ae,0,1),null,null,ae.id,Y.viewportBuffer,Y.quadTriangleIndexBuffer,Y.viewportSegments,ae.paint,Y.transform.zoom))}(S,A)}(n,l,p,m,v):o.cd(p)?function(S,E,A,z,F){if(S.renderPass!=="translucent")return;const{isRenderingToTexture:j}=F,N=A.paint.get("line-opacity"),G=A.paint.get("line-width");if(N.constantOr(1)===0||G.constantOr(1)===0)return;const Y=S.getDepthModeForSublayer(0,ur.ReadOnly),ae=S.colorModeForRenderPass(),oe=A.paint.get("line-dasharray"),le=A.paint.get("line-pattern"),de=le.constantOr(1),ve=A.paint.get("line-gradient"),ge=A.getCrossfadeParameters(),we=de?"linePattern":oe?"lineSDF":ve?"lineGradient":"line",Ce=S.context,ye=Ce.gl,Ae=S.transform;let Ve=!0;for(const Be of z){const Ne=E.getTile(Be);if(de&&!Ne.patternsLoaded())continue;const qe=Ne.getBucket(A);
817if(!qe)continue;const wt=qe.programConfigurations.get(A.id),bt=S.context.program.get(),ut=S.useProgram(we,wt),zt=Ve||ut.program!==bt,hr=S.style.map.terrain&&S.style.map.terrain.getTerrainData(Be),Ur=le.constantOr(null);if(Ur&&Ne.imageAtlas){const Jr=Ne.imageAtlas,nn=Jr.patternPositions[Ur.to.toString()],di=Jr.patternPositions[Ur.from.toString()];nn&&di&&wt.setConstantPatternPositions(nn,di)}const xn=Ae.getProjectionData({overscaledTileID:Be,applyGlobeMatrix:!j,applyTerrainMatrix:!0}),Yr=Ae.getPixelScale(),wn=de?kg(S,Ne,A,Yr,ge):oe?Ig(S,Ne,A,Yr,oe,ge):ve?Tf(S,Ne,A,Yr,qe.lineClipsArray.length):dh(S,Ne,A,Yr);if(de)Ce.activeTexture.set(ye.TEXTURE0),Ne.imageAtlasTexture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE),wt.updatePaintBuffers(ge);else if(oe&&(zt||S.lineAtlas.dirty))Ce.activeTexture.set(ye.TEXTURE0),S.lineAtlas.bind(Ce);else if(ve){const Jr=qe.gradients[A.id];let nn=Jr.texture;if(A.gradientVersion!==Jr.version){let di=256;if(A.stepInterpolant){const Pr=E.getSource().maxzoom,ti=Be.canonical.z===Pr?Math.ceil(1<<S.transform.maxZoom-Be.canonical.z):1;di=o.ag(o.c2(qe.maxLineLength/o.$*1024*ti),256,Ce.maxTextureSize)}Jr.gradient=o.c3({expression:A.gradientExpression(),evaluationKey:"lineProgress",resolution:di,image:Jr.gradient||void 0,clips:qe.lineClipsArray}),Jr.texture?Jr.texture.update(Jr.gradient):Jr.texture=new o.T(Ce,Jr.gradient,ye.RGBA),Jr.version=A.gradientVersion,nn=Jr.texture}Ce.activeTexture.set(ye.TEXTURE0),nn.bind(A.stepInterpolant?ye.NEAREST:ye.LINEAR,ye.CLAMP_TO_EDGE)}const rn=S.stencilModeForClipping(Be);ut.draw(Ce,ye.TRIANGLES,Y,rn,ae,or.disabled,wn,hr,xn,A.id,qe.layoutVertexBuffer,qe.indexBuffer,qe.segments,A.paint,S.transform.zoom,wt,qe.layoutVertexBuffer2),Ve=!1}}(n,l,p,m,v):o.ce(p)?function(S,E,A,z,F){const j=A.paint.get("fill-color"),N=A.paint.get("fill-opacity");if(N.constantOr(1)===0)return;const{isRenderingToTexture:G}=F,Y=S.colorModeForRenderPass(),ae=A.paint.get("fill-pattern"),oe=S.opaquePassEnabledForLayer()&&!ae.constantOr(1)&&j.constantOr(o.be.transparent).a===1&&N.constantOr(0)===1?"opaque":"translucent";if(S.renderPass===oe){const le=S.getDepthModeForSublayer(1,S.renderPass==="opaque"?ur.ReadWrite:ur.ReadOnly);qc(S,E,A,z,le,Y,!1,G)}if(S.renderPass==="translucent"&&A.paint.get("fill-antialias")){const le=S.getDepthModeForSublayer(A.getPaintProperty("fill-outline-color")?2:0,ur.ReadOnly);qc(S,E,A,z,le,Y,!0,G)}}(n,l,p,m,v):o.cf(p)?function(S,E,A,z,F){const j=A.paint.get("fill-extrusion-opacity");if(j===0)return;const{isRenderingToTexture:N}=F;if(S.renderPass==="translucent"){const G=new ur(S.context.gl.LEQUAL,ur.ReadWrite,S.depthRangeFor3D);if(j!==1||A.paint.get("fill-extrusion-pattern").constantOr(1))Al(S,E,A,z,G,Jt.disabled,Er.disabled,N),Al(S,E,A,z,G,S.stencilModeFor3D(),S.colorModeForRenderPass(),N);else{const Y=S.colorModeForRenderPass();Al(S,E,A,z,G,Jt.disabled,Y,N)}}}(n,l,p,m,v):o.cg(p)?function(S,E,A,z,F){if(S.renderPass!=="offscreen"&&S.renderPass!=="translucent")return;const{isRenderingToTexture:j}=F,N=S.context,G=S.style.projection.useSubdivision,Y=S.getDepthModeForSublayer(0,ur.ReadOnly),ae=S.colorModeForRenderPass();if(S.renderPass==="offscreen")(function(oe,le,de,ve,ge,we,Ce){const ye=oe.context,Ae=ye.gl;for(const Ve of de){const Be=le.getTile(Ve),Ne=Be.dem;if(!Ne||!Ne.data||!Be.needsHillshadePrepare)continue;const qe=Ne.dim,wt=Ne.stride,bt=Ne.getPixels();if(ye.activeTexture.set(Ae.TEXTURE1),ye.pixelStoreUnpackPremultiplyAlpha.set(!1),Be.demTexture=Be.demTexture||oe.getTileTexture(wt),Be.demTexture){const zt=Be.demTexture;zt.update(bt,{premultiply:!1}),zt.bind(Ae.NEAREST,Ae.CLAMP_TO_EDGE)}else Be.demTexture=new o.T(ye,bt,Ae.RGBA,{premultiply:!1}),Be.demTexture.bind(Ae.NEAREST,Ae.CLAMP_TO_EDGE);ye.activeTexture.set(Ae.TEXTURE0);let ut=Be.fbo;if(!ut){const zt=new o.T(ye,{width:qe,height:qe,data:null},Ae.RGBA);zt.bind(Ae.LINEAR,Ae.CLAMP_TO_EDGE),ut=Be.fbo=ye.createFramebuffer(qe,qe,!0,!1),ut.colorAttachment.set(zt.texture)}
vendor: 35,815 bytes, lines 817-819
817ye.bindFramebuffer.set(ut.framebuffer),ye.viewport.set([0,0,qe,qe]),oe.useProgram("hillshadePrepare").draw(ye,Ae.TRIANGLES,ge,we,Ce,or.disabled,P0(Be.tileID,Ne),null,null,ve.id,oe.rasterBoundsBuffer,oe.quadTriangleIndexBuffer,oe.rasterBoundsSegments),Be.needsHillshadePrepare=!1}})(S,E,z,A,Y,Jt.disabled,ae),N.viewport.set([0,0,S.width,S.height]);else if(S.renderPass==="translucent")if(G){const[oe,le,de]=S.stencilConfigForOverlapTwoPass(z);Ml(S,E,A,de,oe,Y,ae,!1,j),Ml(S,E,A,de,le,Y,ae,!0,j)}else{const[oe,le]=S.getStencilConfigForOverlapAndUpdateStencilID(z);Ml(S,E,A,le,oe,Y,ae,!1,j)}}(n,l,p,m,v):o.ch(p)?function(S,E,A,z,F){if(S.renderPass!=="translucent"||!z.length)return;const{isRenderingToTexture:j}=F,N=S.style.projection.useSubdivision,G=S.getDepthModeForSublayer(0,ur.ReadOnly),Y=S.colorModeForRenderPass();if(N){const[ae,oe,le]=S.stencilConfigForOverlapTwoPass(z);Gc(S,E,A,le,ae,G,Y,!1,j),Gc(S,E,A,le,oe,G,Y,!0,j)}else{const[ae,oe]=S.getStencilConfigForOverlapAndUpdateStencilID(z);Gc(S,E,A,oe,ae,G,Y,!1,j)}}(n,l,p,m,v):o.ci(p)?function(S,E,A,z,F){if(S.renderPass!=="translucent"||A.paint.get("raster-opacity")===0||!z.length)return;const{isRenderingToTexture:j}=F,N=E.getSource(),G=S.style.projection.useSubdivision;if(N instanceof Ee)Ko(S,E,A,z,null,!1,!1,N.tileCoords,N.flippedWindingOrder,j);else if(G){const[Y,ae,oe]=S.stencilConfigForOverlapTwoPass(z);Ko(S,E,A,oe,Y,!1,!0,Nf,!1,j),Ko(S,E,A,oe,ae,!0,!0,Nf,!1,j)}else{const[Y,ae]=S.getStencilConfigForOverlapAndUpdateStencilID(z);Ko(S,E,A,ae,Y,!1,!0,Nf,!1,j)}}(n,l,p,m,v):o.cj(p)?function(S,E,A,z,F){const j=A.paint.get("background-color"),N=A.paint.get("background-opacity");if(N===0)return;const{isRenderingToTexture:G}=F,Y=S.context,ae=Y.gl,oe=S.style.projection,le=S.transform,de=le.tileSize,ve=A.paint.get("background-pattern");if(S.isPatternMissing(ve))return;const ge=!ve&&j.a===1&&N===1&&S.opaquePassEnabledForLayer()?"opaque":"translucent";if(S.renderPass!==ge)return;const we=Jt.disabled,Ce=S.getDepthModeForSublayer(0,ge==="opaque"?ur.ReadWrite:ur.ReadOnly),ye=S.colorModeForRenderPass(),Ae=S.useProgram(ve?"backgroundPattern":"background"),Ve=z||We(le,{tileSize:de,terrain:S.style.map.terrain});ve&&(Y.activeTexture.set(ae.TEXTURE0),S.imageManager.bind(S.context));const Be=A.getCrossfadeParameters();for(const Ne of Ve){const qe=le.getProjectionData({overscaledTileID:Ne,applyGlobeMatrix:!G,applyTerrainMatrix:!0}),wt=ve?R0(N,S,ve,{tileID:Ne,tileSize:de},Be):fh(N,j),bt=S.style.map.terrain&&S.style.map.terrain.getTerrainData(Ne),ut=oe.getMeshFromTileID(Y,Ne.canonical,!1,!0,"raster");Ae.draw(Y,ae.TRIANGLES,Ce,we,ye,or.backCCW,wt,bt,qe,A.id,ut.vertexBuffer,ut.indexBuffer,ut.segments)}}(n,0,p,m,v):o.ck(p)&&function(S,E,A,z){const{isRenderingGlobe:F}=z,j=S.context,N=A.implementation,G=S.style.projection,Y=S.transform,ae=Y.getProjectionDataForCustomLayer(F),oe={farZ:Y.farZ,nearZ:Y.nearZ,fov:Y.fov*Math.PI/180,modelViewProjectionMatrix:Y.modelViewProjectionMatrix,projectionMatrix:Y.projectionMatrix,shaderData:{variantName:G.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793;
818uniform mat4 u_projection_matrix;
819${G.shaderPreludeCode.vertexSource}`,define:G.shaderDefine},defaultProjectionData:ae},le=N.renderingMode?N.renderingMode:"2d";if(S.renderPass==="offscreen"){const de=N.prerender;de&&(S.setCustomLayerDefaults(),j.setColorMode(S.colorModeForRenderPass()),de.call(N,j.gl,oe),j.setDirty(),S.setBaseState())}else if(S.renderPass==="translucent"){S.setCustomLayerDefaults(),j.setColorMode(S.colorModeForRenderPass()),j.setStencilMode(Jt.disabled);const de=le==="3d"?S.getDepthModeFor3D():S.getDepthModeForSublayer(0,ur.ReadOnly);j.setDepthMode(de),N.render(j.gl,oe),j.setDirty(),S.setBaseState(),j.bindFramebuffer.set(null)}}(n,0,p,v))}saveTileTexture(n){const l=this._tileTextures[n.size[0]];l?l.push(n):this._tileTextures[n.size[0]]=[n]}getTileTexture(n){const l=this._tileTextures[n];return l&&l.length>0?l.pop():null}isPatternMissing(n){if(!n)return!1;if(!n.from||!n.to)return!0;const l=this.imageManager.getPattern(n.from.toString()),p=this.imageManager.getPattern(n.to.toString());return!l||!p}useProgram(n,l,p=!1,m=[]){this.cache=this.cache||{};const v=!!this.style.map.terrain,S=this.style.projection,E=p?Gs.projectionMercator:S.shaderPreludeCode,A=p?Aa:S.shaderDefine,z=n+(l?l.cacheKey:"")+`/${p?mf:S.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(v?"/terrain":"")+(m?`/${m.join("/")}`:"");return this.cache[z]||(this.cache[z]=new ch(this.context,Gs[n],l,Mg[n],this._showOverdrawInspector,v,E,A,m)),this.cache[z]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const n=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(n.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new o.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:n,drawingBufferHeight:l}=this.context.gl;return this.width!==n||this.height!==l}}function kh(_,n){let l,p=!1,m=null,v=null;const S=()=>{m=null,p&&(_.apply(v,l),m=setTimeout(S,n),p=!1)};return(...E)=>(p=!0,v=this,l=E,m||S(),m)}class Zc{constructor(n){this._getCurrentHash=()=>{const l=window.location.hash.replace("#","");if(this._hashName){let p;return l.split("&").map(m=>m.split("=")).forEach(m=>{m[0]===this._hashName&&(p=m)}),(p&&p[1]||"").split("/")}return l.split("/")},this._onHashChange=()=>{const l=this._getCurrentHash();if(!this._isValidHash(l))return!1;const p=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(l[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+l[2],+l[1]],zoom:+l[0],bearing:p,pitch:+(l[4]||0)}),!0},this._updateHashUnthrottled=()=>{const l=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,l)},this._removeHash=()=>{const l=this._getCurrentHash();if(l.length===0)return;const p=l.join("/");let m=p;m.split("&").length>0&&(m=m.split("&")[0]),this._hashName&&(m=`${this._hashName}=${p}`);let v=window.location.hash.replace(m,"");v.startsWith("#&")?v=v.slice(0,1)+v.slice(2):v==="#"&&(v="");let S=window.location.href.replace(/(#.+)?$/,v);S=S.replace("&&","&"),window.history.replaceState(window.history.state,null,S)},this._updateHash=kh(this._updateHashUnthrottled,300),this._hashName=n&&encodeURIComponent(n)}addTo(n){return this._map=n,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(n){const l=this._map.getCenter(),p=Math.round(100*this._map.getZoom())/100,m=Math.ceil((p*Math.LN2+Math.log(512/360/.5))/Math.LN10),v=Math.pow(10,m),S=Math.round(l.lng*v)/v,E=Math.round(l.lat*v)/v,A=this._map.getBearing(),z=this._map.getPitch();let F="";if(F+=n?`/${S}/${E}/${p}`:`${p}/${E}/${S}`,(A||z)&&(F+="/"+Math.round(10*A)/10),z&&(F+=`/${Math.round(z)}`),this._hashName){const j=this._hashName;let N=!1;const G=window.location.hash.slice(1).split("&").map(Y=>{const ae=Y.split("=")[0];return ae===j?(N=!0,`${ae}=${F}`):Y}).filter(Y=>Y);return N||G.push(`${j}=${F}`),`#${G.join("&")}`}return`#${F}`}_isValidHash(n){if(n.length<3||n.some(isNaN))return!1;try{new o.S(+n[2],+n[1])}catch{return!1}const l=+n[0],p=+(n[3]||0),m=+(n[4]||0);return l>=this._map.getMinZoom()&&l<=this._map.getMaxZoom()&&p>=-180&&p<=180&&m>=this._map.getMinPitch()&&m<=this._map.getMaxPitch()}}const Rl={linearity:.3,easing:o.cl(0,0,.3,1)},Ll=o.e({deceleration:2500,maxSpeed:1400},Rl),$f=o.e({deceleration:20,maxSpeed:1400},Rl),Wc=o.e({deceleration:1e3,maxSpeed:360},Rl),Uf=o.e({deceleration:1e3,maxSpeed:90},Rl),Wg=o.e({deceleration:1e3,maxSpeed:360},Rl);class Kg{constructor(n){this._map=n,this.clear()}clear(){this._inertiaBuffer=[]}record(n){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:M.now(),settings:n})}_drainInertiaBuffer(){const n=this._inertiaBuffer,l=M.now();for(;n.length>0&&l-n[0].time>160;)n.shift()}_onMoveEnd(n){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const l={zoom:0,bearing:0,pitch:0,roll:0,pan:new o.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:v}of this._inertiaBuffer)l.zoom+=v.zoomDelta||0,l.bearing+=v.bearingDelta||0,l.pitch+=v.pitchDelta||0,l.roll+=v.rollDelta||0,v.panDelta&&l.pan._add(v.panDelta),v.around&&(l.around=v.around),v.pinchAround&&(l.pinchAround=v.pinchAround);const p=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,m={};if(l.pan.mag()){const v=Dl(l.pan.mag(),p,o.e({},Ll,n||{})),S=l.pan.mult(v.amount/l.pan.mag()),E=this._map.cameraHelper.handlePanInertia(S,this._map.transform);m.center=E.easingCenter,m.offset=E.easingOffset,zl(m,v)}if(l.zoom){const v=Dl(l.zoom,p,$f);m.zoom=this._map.transform.zoom+v.amount,zl(m,v)}if(l.bearing){const v=Dl(l.bearing,p,Wc);m.bearing=this._map.transform.bearing+o.ag(v.amount,-179,179),zl(m,v)}if(l.pitch){const v=Dl(l.pitch,p,Uf);m.pitch=this._map.transform.pitch+v.amount,zl(m,v)}if(l.roll){const v=Dl(l.roll,p,Wg);m.roll=this._map.transform.roll+o.ag(v.amount,-179,179),zl(m,v)}if(m.zoom||m.bearing){const v=l.pinchAround===void 0?l.around:l.pinchAround;m.around=v?this._map.unproject(v):this._map.getCenter()}return this.clear(),o.e(m,{noMoveStart:!0})}}function zl(_,n){(!_.duration||_.duration<n.duration)&&(_.duration=n.duration,_.easing=n.easing)}function Dl(_,n,l){const{maxSpeed:p,linearity:m,deceleration:v}=l,S=o.ag(_*m/(n/1e3),-p,p),E=Math.abs(S)/(v*m);return{easing:l.easing,duration:1e3*E,amount:S*(E/2)}}class Gi extends o.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(n,l,p,m={}){p=p instanceof MouseEvent?p:new MouseEvent(n,p);const v=P.mousePos(l.getCanvas(),p),S=l.unproject(v);super(n,o.e({point:v,lngLat:S,originalEvent:p},m)),this._defaultPrevented=!1,this.target=l}}class ks extends o.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(n,l,p){const m=n==="touchend"?p.changedTouches:p.touches,v=P.touchPos(l.getCanvasContainer(),m),S=v.map(A=>l.unproject(A)),E=v.reduce((A,z,F,j)=>A.add(z.div(j.length)),new o.P(0,0));super(n,{points:v,point:E,lngLats:S,lngLat:l.unproject(E),originalEvent:p}),this._defaultPrevented=!1}}class Vf extends o.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(n,l,p){super(n,{originalEvent:p}),this._defaultPrevented=!1}}class Xg{constructor(n,l){this._map=n,this._clickTolerance=l.clickTolerance}reset(){delete this._mousedownPos}wheel(n){return this._firePreventable(new Vf(n.type,this._map,n))}mousedown(n,l){return this._mousedownPos=l,this._firePreventable(new Gi(n.type,this._map,n))}mouseup(n){this._map.fire(new Gi(n.type,this._map,n))}click(n,l){this._mousedownPos&&this._mousedownPos.dist(l)>=this._clickTolerance||this._map.fire(new Gi(n.type,this._map,n))}dblclick(n){return this._firePreventable(new Gi(n.type,this._map,n))}mouseover(n){this._map.fire(new Gi(n.type,this._map,n))}mouseout(n){this._map.fire(new Gi(n.type,this._map,n))}touchstart(n){return this._firePreventable(new ks(n.type,this._map,n))}touchmove(n){this._map.fire(new ks(n.type,this._map,n))}touchend(n){this._map.fire(new ks(n.type,this._map,n))}touchcancel(n){this._map.fire(new ks(n.type,this._map,n))}_firePreventable(n){if(this._map.fire(n),n.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Yg{constructor(n){this._map=n}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(n){this._map.fire(new Gi(n.type,this._map,n))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Gi("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(n){this._delayContextMenu?this._contextMenuEvent=n:this._ignoreContextMenu||this._map.fire(new Gi(n.type,this._map,n)),this._map.listens("contextmenu")&&n.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ol{constructor(n){this._map=n}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(n){return this.transform.screenPointToLocation(o.P.convert(n),this._map.terrain)}}class qf{constructor(n,l){this._map=n,this._tr=new Ol(n),this._el=n.getCanvasContainer(),this._container=n.getContainer(),this._clickTolerance=l.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(n,l){this.isEnabled()&&n.shiftKey&&n.button===0&&(P.disableDrag(),this._startPos=this._lastPos=l,this._active=!0)}mousemoveWindow(n,l){if(!this._active)return;const p=l;if(this._lastPos.equals(p)||!this._box&&p.dist(this._startPos)<this._clickTolerance)return;const m=this._startPos;this._lastPos=p,this._box||(this._box=P.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",n));const v=Math.min(m.x,p.x),S=Math.max(m.x,p.x),E=Math.min(m.y,p.y),A=Math.max(m.y,p.y);P.setTransform(this._box,`translate(${v}px,${E}px)`),this._box.style.width=S-v+"px",this._box.style.height=A-E+"px"}mouseupWindow(n,l){if(!this._active||n.button!==0)return;const p=this._startPos,m=l;if(this.reset(),P.suppressClick(),p.x!==m.x||p.y!==m.y)return this._map.fire(new o.l("boxzoomend",{originalEvent:n})),{cameraAnimation:v=>v.fitScreenCoordinates(p,m,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",n)}keydown(n){this._active&&n.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",n))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(P.remove(this._box),this._box=null),P.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(n,l){return this._map.fire(new o.l(n,{originalEvent:l}))}}function Ih(_,n){if(_.length!==n.length)throw new Error(`The number of touches and points are not equal - touches ${_.length}, points ${n.length}`);const l={};for(let p=0;p<_.length;p++)l[_[p].identifier]=n[p];return l}class Jg{constructor(n){this.reset(),this.numTouches=n.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(n,l,p){(this.centroid||p.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=n.timeStamp),p.length===this.numTouches&&(this.centroid=function(m){const v=new o.P(0,0);for(const S of m)v._add(S);return v.div(m.length)}(l),this.touches=Ih(p,l)))}touchmove(n,l,p){if(this.aborted||!this.centroid)return;const m=Ih(p,l);for(const v in this.touches){const S=m[v];(!S||S.dist(this.touches[v])>30)&&(this.aborted=!0)}}touchend(n,l,p){if((!this.centroid||n.timeStamp-this.startTime>500)&&(this.aborted=!0),p.length===0){const m=!this.aborted&&this.centroid;if(this.reset(),m)return m}}}class Ph{constructor(n){this.singleTap=new Jg(n),this.numTaps=n.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(n,l,p){this.singleTap.touchstart(n,l,p)}touchmove(n,l,p){this.singleTap.touchmove(n,l,p)}touchend(n,l,p){const m=this.singleTap.touchend(n,l,p);if(m){const v=n.timeStamp-this.lastTime<500,S=!this.lastTap||this.lastTap.dist(m)<30;if(v&&S||this.reset(),this.count++,this.lastTime=n.timeStamp,this.lastTap=m,this.count===this.numTaps)return this.reset(),m}}}class Ah{constructor(n){this._tr=new Ol(n),this._zoomIn=new Ph({numTouches:1,numTaps:2}),this._zoomOut=new Ph({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(n,l,p){this._zoomIn.touchstart(n,l,p),this._zoomOut.touchstart(n,l,p)}touchmove(n,l,p){this._zoomIn.touchmove(n,l,p),this._zoomOut.touchmove(n,l,p)}touchend(n,l,p){const m=this._zoomIn.touchend(n,l,p),v=this._zoomOut.touchend(n,l,p),S=this._tr;return m?(this._active=!0,n.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:E=>E.easeTo({duration:300,zoom:S.zoom+1,around:S.unproject(m)},{originalEvent:n})}):v?(this._active=!0,n.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:E=>E.easeTo({duration:300,zoom:S.zoom-1,around:S.unproject(v)},{originalEvent:n})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Fl{constructor(n){this._enabled=!!n.enable,this._moveStateManager=n.moveStateManager,this._clickTolerance=n.clickTolerance||1,this._moveFunction=n.move,this._activateOnStart=!!n.activateOnStart,n.assignEvents(this),this.reset()}reset(n){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(n)}_move(...n){const l=this._moveFunction(...n);if(l.bearingDelta||l.pitchDelta||l.rollDelta||l.around||l.panDelta)return this._active=!0,l}dragStart(n,l){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(n)&&(this._moveStateManager.startMove(n),this._lastPoint=Array.isArray(l)?l[0]:l,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(n,l){if(!this.isEnabled())return;const p=this._lastPoint;if(!p)return;if(n.preventDefault(),!this._moveStateManager.isValidMoveEvent(n))return void this.reset(n);const m=Array.isArray(l)?l[0]:l;return!this._moved&&m.dist(p)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=m,this._move(p,m))}dragEnd(n){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(n)&&(this._moved&&P.suppressClick(),this.reset(n))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const bs=0,Is=2,Qg={[bs]:1,[Is]:2};class Di{constructor(n){this._correctEvent=n.checkCorrectEvent}startMove(n){const l=P.mouseButton(n);this._eventButton=l}endMove(n){delete this._eventButton}isValidStartEvent(n){return this._correctEvent(n)}isValidMoveEvent(n){return!function(l,p){const m=Qg[p];return l.buttons===void 0||(l.buttons&m)!==m}(n,this._eventButton)}isValidEndEvent(n){return P.mouseButton(n)===this._eventButton}}class Bl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(n){return n.targetTouches.length===1}_isSameTouchEvent(n){return n.targetTouches[0].identifier===this._firstTouch}startMove(n){this._firstTouch=n.targetTouches[0].identifier}endMove(n){delete this._firstTouch}isValidStartEvent(n){return this._isOneFingerTouch(n)}isValidMoveEvent(n){return this._isOneFingerTouch(n)&&this._isSameTouchEvent(n)}isValidEndEvent(n){return this._isOneFingerTouch(n)&&this._isSameTouchEvent(n)}}class $0{constructor(n=new Di({checkCorrectEvent:()=>!0}),l=new Bl){this.mouseMoveStateManager=n,this.oneFingerTouchMoveStateManager=l}_executeRelevantHandler(n,l,p){return n instanceof MouseEvent?l(n):typeof TouchEvent<"u"&&n instanceof TouchEvent?p(n):void 0}startMove(n){this._executeRelevantHandler(n,l=>this.mouseMoveStateManager.startMove(l),l=>this.oneFingerTouchMoveStateManager.startMove(l))}endMove(n){this._executeRelevantHandler(n,l=>this.mouseMoveStateManager.endMove(l),l=>this.oneFingerTouchMoveStateManager.endMove(l))}isValidStartEvent(n){return this._executeRelevantHandler(n,l=>this.mouseMoveStateManager.isValidStartEvent(l),l=>this.oneFingerTouchMoveStateManager.isValidStartEvent(l))}isValidMoveEvent(n){return this._executeRelevantHandler(n,l=>this.mouseMoveStateManager.isValidMoveEvent(l),l=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(l))}isValidEndEvent(n){return this._executeRelevantHandler(n,l=>this.mouseMoveStateManager.isValidEndEvent(l),l=>this.oneFingerTouchMoveStateManager.isValidEndEvent(l))}}const Mh=_=>{_.mousedown=_.dragStart,_.mousemoveWindow=_.dragMove,_.mouseup=_.dragEnd,_.contextmenu=n=>{n.preventDefault()}};class U0{constructor(n,l){this._clickTolerance=n.clickTolerance||1,this._map=l,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new o.P(0,0)}_shouldBePrevented(n){return n<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(n,l,p){return this._calculateTransform(n,l,p)}touchmove(n,l,p){if(this._active){if(!this._shouldBePrevented(p.length))return n.preventDefault(),this._calculateTransform(n,l,p);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",n)}}touchend(n,l,p){this._calculateTransform(n,l,p),this._active&&this._shouldBePrevented(p.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(n,l,p){p.length>0&&(this._active=!0);const m=Ih(p,l),v=new o.P(0,0),S=new o.P(0,0);let E=0;for(const z in m){const F=m[z],j=this._touches[z];j&&(v._add(F),S._add(F.sub(j)),E++,m[z]=F)}if(this._touches=m,this._shouldBePrevented(E)||!S.mag())return;const A=S.div(E);return this._sum._add(A),this._sum.mag()<this._clickTolerance?void 0:{around:v.div(E),panDelta:A}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Gf{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(n,l,p){this._firstTwoTouches||p.length<2||(this._firstTwoTouches=[p[0].identifier,p[1].identifier],this._start([l[0],l[1]]))}touchmove(n,l,p){if(!this._firstTwoTouches)return;n.preventDefault();const[m,v]=this._firstTwoTouches,S=Kc(p,l,m),E=Kc(p,l,v);if(!S||!E)return;const A=this._aroundCenter?null:S.add(E).div(2);return this._move([S,E],A,n)}touchend(n,l,p){if(!this._firstTwoTouches)return;const[m,v]=this._firstTwoTouches,S=Kc(p,l,m),E=Kc(p,l,v);S&&E||(this._active&&P.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(n){this._enabled=!0,this._aroundCenter=!!n&&n.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Kc(_,n,l){for(let p=0;p<_.length;p++)if(_[p].identifier===l)return n[p]}function Nl(_,n){return Math.log(_/n)/Math.LN2}class Ws extends Gf{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(n){this._startDistance=this._distance=n[0].dist(n[1])}_move(n,l){const p=this._distance;if(this._distance=n[0].dist(n[1]),this._active||!(Math.abs(Nl(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Nl(this._distance,p),pinchAround:l}}}function Mt(_,n){return 180*_.angleWith(n)/Math.PI}class Hf extends Gf{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(n){this._startVector=this._vector=n[0].sub(n[1]),this._minDiameter=n[0].dist(n[1])}_move(n,l,p){const m=this._vector;if(this._vector=n[0].sub(n[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Mt(this._vector,m),pinchAround:l}}_isBelowThreshold(n){this._minDiameter=Math.min(this._minDiameter,n.mag());const l=25/(Math.PI*this._minDiameter)*360,p=Mt(n,this._startVector);return Math.abs(p)<l}}function Xc(_){return Math.abs(_.y)>Math.abs(_.x)}class Zf extends Gf{constructor(n){super(),this._currentTouchCount=0,this._map=n}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(n,l,p){super.touchstart(n,l,p),this._currentTouchCount=p.length}_start(n){this._lastPoints=n,Xc(n[0].sub(n[1]))&&(this._valid=!1)}_move(n,l,p){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const m=n[0].sub(this._lastPoints[0]),v=n[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(m,v,p.timeStamp),this._valid?(this._lastPoints=n,this._active=!0,{pitchDelta:(m.y+v.y)/2*-.5}):void 0}gestureBeginsVertically(n,l,p){if(this._valid!==void 0)return this._valid;const m=n.mag()>=2,v=l.mag()>=2;if(!m&&!v)return;if(!m||!v)return this._firstMove===void 0&&(this._firstMove=p),p-this._firstMove<100&&void 0;const S=n.y>0==l.y>0;return Xc(n)&&Xc(l)&&S}}const Yc={panStep:100,bearingStep:15,pitchStep:10};class jl{constructor(n){this._tr=new Ol(n);const l=Yc;this._panStep=l.panStep,this._bearingStep=l.bearingStep,this._pitchStep=l.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(n){if(n.altKey||n.ctrlKey||n.metaKey)return;let l=0,p=0,m=0,v=0,S=0;switch(n.keyCode){case 61:case 107:case 171:case 187:l=1;break;case 189:case 109:case 173:l=-1;break;case 37:n.shiftKey?p=-1:(n.preventDefault(),v=-1);break;case 39:n.shiftKey?p=1:(n.preventDefault(),v=1);break;case 38:n.shiftKey?m=1:(n.preventDefault(),S=-1);break;case 40:n.shiftKey?m=-1:(n.preventDefault(),S=1);break;default:return}return this._rotationDisabled&&(p=0,m=0),{cameraAnimation:E=>{const A=this._tr;E.easeTo({duration:300,easeId:"keyboardHandler",easing:Wf,zoom:l?Math.round(A.zoom)+l*(n.shiftKey?2:1):A.zoom,bearing:A.bearing+p*this._bearingStep,pitch:A.pitch+m*this._pitchStep,offset:[-v*this._panStep,-S*this._panStep],center:A.center},{originalEvent:n})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Wf(_){return _*(2-_)}const xr=4.000244140625,Kf=1/450;class ey{constructor(n,l){this._onTimeout=p=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(p)},this._map=n,this._tr=new Ol(n),this._triggerRenderFrame=l,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Kf}setZoomRate(n){this._defaultZoomRate=n}setWheelZoomRate(n){this._wheelZoomRate=n}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(n){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!n&&n.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(n){return!!this._map.cooperativeGestures.isEnabled()&&!(n.ctrlKey||this._map.cooperativeGestures.isBypassed(n))}wheel(n){if(!this.isEnabled())return;if(this._shouldBePrevented(n))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",n);let l=n.deltaMode===WheelEvent.DOM_DELTA_LINE?40*n.deltaY:n.deltaY;const p=M.now(),m=p-(this._lastWheelEventTime||0);this._lastWheelEventTime=p,l!==0&&l%xr==0?this._type="wheel":l!==0&&Math.abs(l)<4?this._type="trackpad":m>400?(this._type=null,this._lastValue=l,this._timeout=setTimeout(this._onTimeout,40,n)):this._type||(this._type=Math.abs(m*l)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,l+=this._lastValue)),n.shiftKey&&l&&(l/=4),this._type&&(this._lastWheelEvent=n,this._delta-=l,this._active||this._start(n)),n.preventDefault()}_start(n){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const l=P.mousePos(this._map.getCanvas(),n),p=this._tr;this._aroundPoint=this._aroundCenter?p.transform.locationToScreenPoint(o.S.convert(p.center)):l,this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const n=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){const E=n.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=E),typeof this._targetZoom=="number"&&(this._targetZoom+=E)}if(this._delta!==0){const E=this._type==="wheel"&&Math.abs(this._delta)>xr?this._wheelZoomRate:this._defaultZoomRate;let A=2/(1+Math.exp(-Math.abs(this._delta*E)));this._delta<0&&A!==0&&(A=1/A);const z=typeof this._targetZoom!="number"?n.scale:o.ae(this._targetZoom);this._targetZoom=n.getConstrained(n.getCameraLngLat(),o.aj(z*A)).zoom,this._type==="wheel"&&(this._startZoom=n.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const l=typeof this._targetZoom!="number"?n.zoom:this._targetZoom,p=this._startZoom,m=this._easing;let v,S=!1;if(this._type==="wheel"&&p&&m){const E=M.now()-this._lastWheelEventTime,A=Math.min((E+5)/200,1),z=m(A);v=o.C.number(p,l,z),A<1?this._frameId||(this._frameId=!0):S=!0}else v=l,S=!0;return this._active=!0,S&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=v,{noInertia:!0,needsRenderFrame:!S,zoomDelta:v-n.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(n){let l=o.cn;if(this._prevEase){const p=this._prevEase,m=(M.now()-p.start)/p.duration,v=p.easing(m+.01)-p.easing(m),S=.27/Math.sqrt(v*v+1e-4)*.01,E=Math.sqrt(.0729-S*S);l=o.cl(S,E,.25,1)}return this._prevEase={start:M.now(),duration:n,easing:l},l}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Rh{constructor(n,l){this._clickZoom=n,this._tapZoom=l}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class V0{constructor(n){this._tr=new Ol(n),this.reset()}reset(){this._active=!1}dblclick(n,l){return n.preventDefault(),{cameraAnimation:p=>{p.easeTo({duration:300,zoom:this._tr.zoom+(n.shiftKey?-1:1),around:this._tr.unproject(l)},{originalEvent:n})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class q0{constructor(){this._tap=new Ph({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(n,l,p){if(!this._swipePoint)if(this._tapTime){const m=l[0],v=n.timeStamp-this._tapTime<500,S=this._tapPoint.dist(m)<30;v&&S?p.length>0&&(this._swipePoint=m,this._swipeTouch=p[0].identifier):this.reset()}else this._tap.touchstart(n,l,p)}touchmove(n,l,p){if(this._tapTime){if(this._swipePoint){if(p[0].identifier!==this._swipeTouch)return;const m=l[0],v=m.y-this._swipePoint.y;return this._swipePoint=m,n.preventDefault(),this._active=!0,{zoomDelta:v/128}}}else this._tap.touchmove(n,l,p)}touchend(n,l,p){if(this._tapTime)this._swipePoint&&p.length===0&&this.reset();else{const m=this._tap.touchend(n,l,p);m&&(this._tapTime=n.timeStamp,this._tapPoint=m)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Xf{constructor(n,l,p){this._el=n,this._mousePan=l,this._touchPan=p}enable(n){this._inertiaOptions=n||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Lh{constructor(n,l,p,m){this._pitchWithRotate=n.pitchWithRotate,this._rollEnabled=n.rollEnabled,this._mouseRotate=l,this._mousePitch=p,this._mouseRoll=m}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class Yf{constructor(n,l,p,m){this._el=n,this._touchZoom=l,this._touchRotate=p,this._tapDragZoom=m,this._rotationDisabled=!1,this._enabled=!0}enable(n){this._touchZoom.enable(n),this._rotationDisabled||this._touchRotate.enable(n),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class ty{constructor(n,l){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=n,this._options=l,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const n=this._map.getCanvasContainer();n.classList.add("maplibregl-cooperative-gestures"),this._container=P.create("div","maplibregl-cooperative-gesture-screen",n);let l=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(l=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const p=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),m=document.createElement("div");m.className="maplibregl-desktop-message",m.textContent=l,this._container.appendChild(m);const v=document.createElement("div");v.className="maplibregl-mobile-message",v.textContent=p,this._container.appendChild(v),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(P.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(n){return n[this._bypassKey]}notifyGestureBlocked(n,l){this._enabled&&(this._map.fire(new o.l("cooperativegestureprevented",{gestureType:n,originalEvent:l})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Jc=_=>_.zoom||_.drag||_.roll||_.pitch||_.rotate;class G0 extends o.l{}function Jf(_){return _.panDelta&&_.panDelta.mag()||_.zoomDelta||_.bearingDelta||_.pitchDelta||_.rollDelta}class Yo{constructor(n,l){this.handleWindowEvent=m=>{this.handleEvent(m,`${m.type}Window`)},this.handleEvent=(m,v)=>{if(m.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const S=m.type==="renderFrame"?void 0:m,E={needsRenderFrame:!1},A={},z={};for(const{handlerName:N,handler:G,allowed:Y}of this._handlers){if(!G.isEnabled())continue;let ae;if(this._blockedByActive(z,Y,N))G.reset();else if(G[v||m.type]){if(o.co(m,v||m.type)){const oe=P.mousePos(this._map.getCanvas(),m);ae=G[v||m.type](m,oe)}else if(o.cp(m,v||m.type)){const oe=this._getMapTouches(m.touches),le=P.touchPos(this._map.getCanvas(),oe);ae=G[v||m.type](m,le,oe)}else o.cq(v||m.type)||(ae=G[v||m.type](m));this.mergeHandlerResult(E,A,ae,N,S),ae&&ae.needsRenderFrame&&this._triggerRe
vendor: 8,482 bytes, line 819
819nderFrame()}(ae||G.isActive())&&(z[N]=G)}const F={};for(const N in this._previousActiveHandlers)z[N]||(F[N]=S);this._previousActiveHandlers=z,(Object.keys(F).length||Jf(E))&&(this._changes.push([E,A,F]),this._triggerRenderFrame()),(Object.keys(z).length||Jf(E))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:j}=E;j&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],j(this._map))},this._map=n,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Kg(n),this._bearingSnap=l.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(l);const p=this._el;this._listeners=[[p,"touchstart",{passive:!0}],[p,"touchmove",{passive:!1}],[p,"touchend",void 0],[p,"touchcancel",void 0],[p,"mousedown",void 0],[p,"mousemove",void 0],[p,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[p,"mouseover",void 0],[p,"mouseout",void 0],[p,"dblclick",void 0],[p,"click",void 0],[p,"keydown",{capture:!1}],[p,"keyup",void 0],[p,"wheel",{passive:!1}],[p,"contextmenu",void 0],[window,"blur",void 0]];for(const[m,v,S]of this._listeners)P.addEventListener(m,v,m===document?this.handleWindowEvent:this.handleEvent,S)}destroy(){for(const[n,l,p]of this._listeners)P.removeEventListener(n,l,n===document?this.handleWindowEvent:this.handleEvent,p)}_addDefaultHandlers(n){const l=this._map,p=l.getCanvasContainer();this._add("mapEvent",new Xg(l,n));const m=l.boxZoom=new qf(l,n);this._add("boxZoom",m),n.interactive&&n.boxZoom&&m.enable();const v=l.cooperativeGestures=new ty(l,n.cooperativeGestures);this._add("cooperativeGestures",v),n.cooperativeGestures&&v.enable();const S=new Ah(l),E=new V0(l);l.doubleClickZoom=new Rh(E,S),this._add("tapZoom",S),this._add("clickZoom",E),n.interactive&&n.doubleClickZoom&&l.doubleClickZoom.enable();const A=new q0;this._add("tapDragZoom",A);const z=l.touchPitch=new Zf(l);this._add("touchPitch",z),n.interactive&&n.touchPitch&&l.touchPitch.enable(n.touchPitch);const F=()=>l.project(l.getCenter()),j=function({enable:ge,clickTolerance:we,aroundCenter:Ce=!0,minPixelCenterThreshold:ye=100,rotateDegreesPerPixelMoved:Ae=.8},Ve){const Be=new Di({checkCorrectEvent:Ne=>P.mouseButton(Ne)===0&&Ne.ctrlKey||P.mouseButton(Ne)===2&&!Ne.ctrlKey});return new Fl({clickTolerance:we,move:(Ne,qe)=>{const wt=Ve();if(Ce&&Math.abs(wt.y-Ne.y)>ye)return{bearingDelta:o.cm(new o.P(Ne.x,qe.y),qe,wt)};let bt=(qe.x-Ne.x)*Ae;return Ce&&qe.y<wt.y&&(bt=-bt),{bearingDelta:bt}},moveStateManager:Be,enable:ge,assignEvents:Mh})}(n,F),N=function({enable:ge,clickTolerance:we,pitchDegreesPerPixelMoved:Ce=-.5}){const ye=new Di({checkCorrectEvent:Ae=>P.mouseButton(Ae)===0&&Ae.ctrlKey||P.mouseButton(Ae)===2});return new Fl({clickTolerance:we,move:(Ae,Ve)=>({pitchDelta:(Ve.y-Ae.y)*Ce}),moveStateManager:ye,enable:ge,assignEvents:Mh})}(n),G=function({enable:ge,clickTolerance:we,rollDegreesPerPixelMoved:Ce=.3},ye){const Ae=new Di({checkCorrectEvent:Ve=>P.mouseButton(Ve)===2&&Ve.ctrlKey});return new Fl({clickTolerance:we,move:(Ve,Be)=>{const Ne=ye();let qe=(Be.x-Ve.x)*Ce;return Be.y<Ne.y&&(qe=-qe),{rollDelta:qe}},moveStateManager:Ae,enable:ge,assignEvents:Mh})}(n,F);l.dragRotate=new Lh(n,j,N,G),this._add("mouseRotate",j,["mousePitch"]),this._add("mousePitch",N,["mouseRotate","mouseRoll"]),this._add("mouseRoll",G,["mousePitch"]),n.interactive&&n.dragRotate&&l.dragRotate.enable();const Y=function({enable:ge,clickTolerance:we}){const Ce=new Di({checkCorrectEvent:ye=>P.mouseButton(ye)===0&&!ye.ctrlKey});return new Fl({clickTolerance:we,move:(ye,Ae)=>({around:Ae,panDelta:Ae.sub(ye)}),activateOnStart:!0,moveStateManager:Ce,enable:ge,assignEvents:Mh})}(n),ae=new U0(n,l);l.dragPan=new Xf(p,Y,ae),this._add("mousePan",Y),this._add("touchPan",ae,["touchZoom","touchRotate"]),n.interactive&&n.dragPan&&l.dragPan.enable(n.dragPan);const oe=new Hf,le=new Ws;l.touchZoomRotate=new Yf(p,le,oe,A),this._add("touchRotate",oe,["touchPan","touchZoom"]),this._add("touchZoom",le,["touchPan","touchRotate"]),n.interactive&&n.touchZoomRotate&&l.touchZoomRotate.enable(n.touchZoomRotate);const de=l.scrollZoom=new ey(l,()=>this._triggerRenderFrame());this._add("scrollZoom",de,["mousePan"]),n.interactive&&n.scrollZoom&&l.scrollZoom.enable(n.scrollZoom);const ve=l.keyboard=new jl(l);this._add("keyboard",ve),n.interactive&&n.keyboard&&l.keyboard.enable(),this._add("blockableMapEvent",new Yg(l))}_add(n,l,p){this._handlers.push({handlerName:n,handler:l,allowed:p}),this._handlersById[n]=l}stop(n){if(!this._updatingCamera){for(const{handler:l}of this._handlers)l.reset();this._inertia.clear(),this._fireEvents({},{},n),this._changes=[]}}isActive(){for(const{handler:n}of this._handlers)if(n.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Jc(this._eventsInProgress)||this.isZooming()}_blockedByActive(n,l,p){for(const m in n)if(m!==p&&(!l||l.indexOf(m)<0))return!0;return!1}_getMapTouches(n){const l=[];for(const p of n)this._el.contains(p.target)&&l.push(p);return l}mergeHandlerResult(n,l,p,m,v){if(!p)return;o.e(n,p);const S={handlerName:m,originalEvent:p.originalEvent||v};p.zoomDelta!==void 0&&(l.zoom=S),p.panDelta!==void 0&&(l.drag=S),p.rollDelta!==void 0&&(l.roll=S),p.pitchDelta!==void 0&&(l.pitch=S),p.bearingDelta!==void 0&&(l.rotate=S)}_applyChanges(){const n={},l={},p={};for(const[m,v,S]of this._changes)m.panDelta&&(n.panDelta=(n.panDelta||new o.P(0,0))._add(m.panDelta)),m.zoomDelta&&(n.zoomDelta=(n.zoomDelta||0)+m.zoomDelta),m.bearingDelta&&(n.bearingDelta=(n.bearingDelta||0)+m.bearingDelta),m.pitchDelta&&(n.pitchDelta=(n.pitchDelta||0)+m.pitchDelta),m.rollDelta&&(n.rollDelta=(n.rollDelta||0)+m.rollDelta),m.around!==void 0&&(n.around=m.around),m.pinchAround!==void 0&&(n.pinchAround=m.pinchAround),m.noInertia&&(n.noInertia=m.noInertia),o.e(l,v),o.e(p,S);this._updateMapTransform(n,l,p),this._changes=[]}_updateMapTransform(n,l,p){const m=this._map,v=m._getTransformForUpdate(),S=m.terrain;if(!(Jf(n)||S&&this._terrainMovement))return this._fireEvents(l,p,!0);m._stop(!0);let{panDelta:E,zoomDelta:A,bearingDelta:z,pitchDelta:F,rollDelta:j,around:N,pinchAround:G}=n;G!==void 0&&(N=G),N=N||m.transform.centerPoint,S&&!v.isPointOnMapSurface(N)&&(N=v.centerPoint);const Y={panDelta:E,zoomDelta:A,rollDelta:j,pitchDelta:F,bearingDelta:z,around:N};this._map.cameraHelper.useGlobeControls&&!v.isPointOnMapSurface(N)&&(N=v.centerPoint);const ae=N.distSqr(v.centerPoint)<.01?v.center:v.screenPointToLocation(E?N.sub(E):N);S?(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(Y,v),this._terrainMovement||!l.drag&&!l.zoom?l.drag&&this._terrainMovement?v.setCenter(v.screenPointToLocation(v.centerPoint.sub(E))):this._map.cameraHelper.handleMapControlsPan(Y,v,ae):(this._terrainMovement=!0,this._map._elevationFreeze=!0,this._map.cameraHelper.handleMapControlsPan(Y,v,ae))):(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(Y,v),this._map.cameraHelper.handleMapControlsPan(Y,v,ae)),m._applyUpdatedTransform(v),this._map._update(),n.noInertia||this._inertia.record(n),this._fireEvents(l,p,!0)}_fireEvents(n,l,p){const m=Jc(this._eventsInProgress),v=Jc(n),S={};for(const j in n){const{originalEvent:N}=n[j];this._eventsInProgress[j]||(S[`${j}start`]=N),this._eventsInProgress[j]=n[j]}!m&&v&&this._fireEvent("movestart",v.originalEvent);for(const j in S)this._fireEvent(j,S[j]);v&&this._fireEvent("move",v.originalEvent);for(const j in n){const{originalEvent:N}=n[j];this._fireEvent(j,N)}const E={};let A;for(const j in this._eventsInProgress){const{handlerName:N,originalEvent:G}=this._eventsInProgress[j];this._handlersById[N].isActive()||(delete this._eventsInProgress[j],A=l[N]||G,E[`${j}end`]=A)}for(const j in E)this._fireEvent(j,E[j]);const z=Jc(this._eventsInProgress),F=(m||v)&&!z;if(F&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const j=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&j.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(j)}if(p&&F){this._updatingCamera=!0;const j=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),N=G=>G!==0&&-this._bearingSnap<G&&G<this._bearingSnap;!j||!j.essential&&M.prefersReducedMotion?(this._map.fire(new o.l("moveend",{originalEvent:A})),N(this._map.getBearing())&&this._map.resetNorth()):(N(j.bearing||this._map.getBearing())&&
vendor: 15,419 bytes, line 819
819(j.bearing=0),j.freezeElevation=!0,this._map.easeTo(j,{originalEvent:A})),this._updatingCamera=!1}}_fireEvent(n,l){this._map.fire(new o.l(n,l?{originalEvent:l}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(n=>{delete this._frameId,this.handleEvent(new G0("renderFrame",{timeStamp:n})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class pn extends o.E{constructor(n,l,p){super(),this._renderFrameCallback=()=>{const m=Math.min((M.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(m)),m<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=n,this._bearingSnap=p.bearingSnap,this.cameraHelper=l,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(n,l){n.apply(this.transform),this.transform=n,this.cameraHelper=l}getCenter(){return new o.S(this.transform.center.lng,this.transform.center.lat)}setCenter(n,l){return this.jumpTo({center:n},l)}getCenterElevation(){return this.transform.elevation}setCenterElevation(n,l){return this.jumpTo({elevation:n},l),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(n){this._centerClampedToGround=n}panBy(n,l,p){return n=o.P.convert(n).mult(-1),this.panTo(this.transform.center,o.e({offset:n},l),p)}panTo(n,l,p){return this.easeTo(o.e({center:n},l),p)}getZoom(){return this.transform.zoom}setZoom(n,l){return this.jumpTo({zoom:n},l),this}zoomTo(n,l,p){return this.easeTo(o.e({zoom:n},l),p)}zoomIn(n,l){return this.zoomTo(this.getZoom()+1,n,l),this}zoomOut(n,l){return this.zoomTo(this.getZoom()-1,n,l),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(n,l){return n!=this.transform.fov&&(this.transform.setFov(n),this.fire(new o.l("movestart",l)).fire(new o.l("move",l)).fire(new o.l("moveend",l))),this}getBearing(){return this.transform.bearing}setBearing(n,l){return this.jumpTo({bearing:n},l),this}getPadding(){return this.transform.padding}setPadding(n,l){return this.jumpTo({padding:n},l),this}rotateTo(n,l,p){return this.easeTo(o.e({bearing:n},l),p)}resetNorth(n,l){return this.rotateTo(0,o.e({duration:1e3},n),l),this}resetNorthPitch(n,l){return this.easeTo(o.e({bearing:0,pitch:0,roll:0,duration:1e3},n),l),this}snapToNorth(n,l){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(n,l):this}getPitch(){return this.transform.pitch}setPitch(n,l){return this.jumpTo({pitch:n},l),this}getRoll(){return this.transform.roll}setRoll(n,l){return this.jumpTo({roll:n},l),this}cameraForBounds(n,l){n=ue.convert(n).adjustAntiMeridian();const p=l&&l.bearing||0;return this._cameraForBoxAndBearing(n.getNorthWest(),n.getSouthEast(),p,l)}_cameraForBoxAndBearing(n,l,p,m){const v={top:0,bottom:0,right:0,left:0};if(typeof(m=o.e({padding:v,offset:[0,0],maxZoom:this.transform.maxZoom},m)).padding=="number"){const z=m.padding;m.padding={top:z,bottom:z,right:z,left:z}}const S=o.e(v,m.padding);m.padding=S;const E=this.transform,A=new ue(n,l);return this.cameraHelper.cameraForBoxAndBearing(m,S,A,p,E)}fitBounds(n,l,p){return this._fitInternal(this.cameraForBounds(n,l),l,p)}fitScreenCoordinates(n,l,p,m,v){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(o.P.convert(n)),this.transform.screenPointToLocation(o.P.convert(l)),p,m),m,v)}_fitInternal(n,l,p){return n?(delete(l=o.e(n,l)).padding,l.linear?this.easeTo(l,p):this.flyTo(l,p)):this}jumpTo(n,l){this.stop();const p=this._getTransformForUpdate();let m=!1,v=!1,S=!1;const E=p.zoom;this.cameraHelper.handleJumpToCenterZoom(p,n);const A=p.zoom!==E;return"elevation"in n&&p.elevation!==+n.elevation&&p.setElevation(+n.elevation),"bearing"in n&&p.bearing!==+n.bearing&&(m=!0,p.setBearing(+n.bearing)),"pitch"in n&&p.pitch!==+n.pitch&&(v=!0,p.setPitch(+n.pitch)),"roll"in n&&p.roll!==+n.roll&&(S=!0,p.setRoll(+n.roll)),n.padding==null||p.isPaddingEqual(n.padding)||p.setPadding(n.padding),this._applyUpdatedTransform(p),this.fire(new o.l("movestart",l)).fire(new o.l("move",l)),A&&this.fire(new o.l("zoomstart",l)).fire(new o.l("zoom",l)).fire(new o.l("zoomend",l)),m&&this.fire(new o.l("rotatestart",l)).fire(new o.l("rotate",l)).fire(new o.l("rotateend",l)),v&&this.fire(new o.l("pitchstart",l)).fire(new o.l("pitch",l)).fire(new o.l("pitchend",l)),S&&this.fire(new o.l("rollstart",l)).fire(new o.l("roll",l)).fire(new o.l("rollend",l)),this.fire(new o.l("moveend",l))}calculateCameraOptionsFromTo(n,l,p,m=0){const v=o.a0.fromLngLat(n,l),S=o.a0.fromLngLat(p,m),E=S.x-v.x,A=S.y-v.y,z=S.z-v.z,F=Math.hypot(E,A,z);if(F===0)throw new Error("Can't calculate camera options with same From and To");const j=Math.hypot(E,A),N=o.aj(this.transform.cameraToCenterDistance/F/this.transform.tileSize),G=180*Math.atan2(E,-A)/Math.PI;let Y=180*Math.acos(j/F)/Math.PI;return Y=z<0?90-Y:90+Y,{center:S.toLngLat(),elevation:m,zoom:N,pitch:Y,bearing:G}}calculateCameraOptionsFromCameraLngLatAltRotation(n,l,p,m,v){const S=this.transform.calculateCenterFromCameraLngLatAlt(n,l,p,m);return{center:S.center,elevation:S.elevation,zoom:S.zoom,bearing:p,pitch:m,roll:v}}easeTo(n,l){this._stop(!1,n.easeId),((n=o.e({offset:[0,0],duration:500,easing:o.cn},n)).animate===!1||!n.essential&&M.prefersReducedMotion)&&(n.duration=0);const p=this._getTransformForUpdate(),m=this.getBearing(),v=p.pitch,S=p.roll,E="bearing"in n?this._normalizeBearing(n.bearing,m):m,A="pitch"in n?+n.pitch:v,z="roll"in n?this._normalizeBearing(n.roll,S):S,F="padding"in n?n.padding:p.padding,j=o.P.convert(n.offset);let N,G;n.around&&(N=o.S.convert(n.around),G=p.locationToScreenPoint(N));const Y={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},ae=this.cameraHelper.handleEaseTo(p,{bearing:E,pitch:A,roll:z,padding:F,around:N,aroundPoint:G,offsetAsPoint:j,offset:n.offset,zoom:n.zoom,center:n.center});return this._rotating=this._rotating||m!==E,this._pitching=this._pitching||A!==v,this._rolling=this._rolling||z!==S,this._padding=!p.isPaddingEqual(F),this._zooming=this._zooming||ae.isZooming,this._easeId=n.easeId,this._prepareEase(l,n.noMoveStart,Y),this.terrain&&this._prepareElevation(ae.elevationCenter),this._ease(oe=>{ae.easeFunc(oe),this.terrain&&!n.freezeElevation&&this._updateElevation(oe),this._applyUpdatedTransform(p),this._fireMoveEvents(l)},oe=>{this.terrain&&n.freezeElevation&&this._finalizeElevation(),this._afterEase(l,oe)},n),this}_prepareEase(n,l,p={}){this._moving=!0,l||p.moving||this.fire(new o.l("movestart",n)),this._zooming&&!p.zooming&&this.fire(new o.l("zoomstart",n)),this._rotating&&!p.rotating&&this.fire(new o.l("rotatestart",n)),this._pitching&&!p.pitching&&this.fire(new o.l("pitchstart",n)),this._rolling&&!p.rolling&&this.fire(new o.l("rollstart",n))}_prepareElevation(n){this._elevationCenter=n,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(n,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(n){this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));const l=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(n<1&&l!==this._elevationTarget){const p=this._elevationTarget-this._elevationStart;this._elevationStart+=n*(p-(l-(p*n+this._elevationStart))/(1-n)),this._elevationTarget=l}this.transform.setElevation(o.C.number(this._elevationStart,this._elevationTarget,n))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(n){if(!this.terrain&&n.elevation>=0&&n.pitch<=90)return{};const l=n.getCameraLngLat(),p=n.getCameraAltitude(),m=this.terrain?this.terrain.getElevationForLngLatZoom(l,n.zoom):0;if(p<m){const v=this.calculateCameraOptionsFromTo(l,m,n.center,n.elevation);return{pitch:v.pitch,zoom:v.zoom}}return{}}_applyUpdatedTransform(n){const l=[];if(l.push(m=>this._elevateCameraIfInsideTerrain(m)),this.transformCameraUpdate&&l.push(m=>this.transformCameraUpdate(m)),!l.length)return;const p=n.clone();for(const m of l){const v=p.clone(),{center:S,zoom:E,roll:A,pitch:z,bearing:F,elevation:j}=m(v);S&&v.setCenter(S),j!==void 0&&v.setElevation(j),E!==void 0&&v.setZoom(E),A!==void 0&&v.setRoll(A),z!==void 0&&v.setPitch(z),F!==void 0&&v.setBearing(F),p.apply(v)}this.transform.apply(p)}_fireMoveEvents(n){this.fire(new o.l("move",n)),this._zooming&&this.fire(new o.l("zoom",n)),this._rotating&&this.fire(new o.l("rotate",n)),this._pitching&&this.fire(new o.l("pitch",n)),this._rolling&&this.fire(new o.l("roll",n))}_afterEase(n,l){if(this._easeId&&l&&this._easeId===l)return;delete this._easeId;const p=this._zooming,m=this._rotating,v=this._pitching,S=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,p&&this.fire(new o.l("zoomend",n)),m&&this.fire(new o.l("rotateend",n)),v&&this.fire(new o.l("pitchend",n)),S&&this.fire(new o.l("rollend",n)),this.fire(new o.l("moveend",n))}flyTo(n,l){if(!n.essential&&M.prefersReducedMotion){const qe=o.Q(n,["center","zoom","bearing","pitch","roll","elevation"]);return this.jumpTo(qe,l)}this.stop(),n=o.e({offset:[0,0],speed:1.2,curve:1.42,easing:o.cn},n);const p=this._getTransformForUpdate(),m=p.bearing,v=p.pitch,S=p.roll,E=p.padding,A="bearing"in n?this._normalizeBearing(n.bearing,m):m,z="pitch"in n?+n.pitch:v,F="roll"in n?this._normalizeBearing(n.roll,S):S,j="padding"in n?n.padding:p.padding,N=o.P.convert(n.offset);let G=p.centerPoint.add(N);const Y=p.screenPointToLocation(G),ae=this.cameraHelper.handleFlyTo(p,{bearing:A,pitch:z,roll:F,padding:j,locationAtOffset:Y,offsetAsPoint:N,center:n.center,minZoom:n.minZoom,zoom:n.zoom});let oe=n.curve;const le=Math.max(p.width,p.height),de=le/ae.scaleOfZoom,ve=ae.pixelPathLength;typeof ae.scaleOfMinZoom=="number"&&(oe=Math.sqrt(le/ae.scaleOfMinZoom/ve*2));const ge=oe*oe;function we(qe){const wt=(de*de-le*le+(qe?-1:1)*ge*ge*ve*ve)/(2*(qe?de:le)*ge*ve);return Math.log(Math.sqrt(wt*wt+1)-wt)}function Ce(qe){return(Math.exp(qe)-Math.exp(-qe))/2}function ye(qe){return(Math.exp(qe)+Math.exp(-qe))/2}const Ae=we(!1);let Ve=function(qe){return ye(Ae)/ye(Ae+oe*qe)},Be=function(qe){return le*((ye(Ae)*(Ce(wt=Ae+oe*qe)/ye(wt))-Ce(Ae))/ge)/ve;var wt},Ne=(we(!0)-Ae)/oe;if(Math.abs(ve)<2e-6||!isFinite(Ne)){if(Math.abs(le-de)<1e-6)return this.easeTo(n,l);const qe=de<le?-1:1;Ne=Math.abs(Math.log(de/le))/oe,Be=()=>0,Ve=wt=>Math.exp(qe*oe*wt)}return n.duration="duration"in n?+n.duration:1e3*Ne/("screenSpeed"in n?+n.screenSpeed/oe:+n.speed),n.maxDuration&&n.duration>n.maxDuration&&(n.duration=0),this._zooming=!0,this._rotating=m!==A,this._pitching=z!==v,this._rolling=F!==S,this._padding=!p.isPaddingEqual(j),this._prepareEase(l,!1),this.terrain&&this._prepareElevation(ae.targetCenter),this._ease(qe=>{const wt=qe*Ne,bt=1/Ve(wt),ut=Be(wt);this._rotating&&p.setBearing(o.C.number(m,A,qe)),this._pitching&&p.setPitch(o.C.number(v,z,qe)),this._rolling&&p.setRoll(o.C.number(S,F,qe)),this._padding&&(p.interpolatePadding(E,j,qe),G=p.centerPoint.add(N)),ae.easeFunc(qe,bt,ut,G),this.terrain&&!n.freezeElevation&&this._updateElevation(qe),this._applyUpdatedTransform(p),this._fireMoveEvents(l)},()=>{this.terrain&&n.freezeElevation&&this._finalizeElevation(),this._afterEase(l)},n),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(n,l){var p;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const m=this._onEaseEnd;delete this._onEaseEnd,m.call(this,l)}return n||(p=this.handlers)===null||p===void 0||p.stop(!1),this}_ease(n,l,p){p.animate===!1||p.duration===0?(n(1),l()):(this._easeStart=M.now(),this._easeOptions=p,this._onEaseFrame=n,this._onEaseEnd=l,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(n,l){n=o.aN(n,-180,180);const p=Math.abs(n-l);return Math.abs(n-360-l)<p&&(n-=360),Math.abs(n+360-l)<p&&(n+=360),n}queryTerrainElevation(n){return this.terrain?this.terrain.getElevationForLngLatZoom(o.S.convert(n),this.transform.tileZoom):null}}const Qc={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class zh{constructor(n=Qc){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=l=>{!l||l.sourceDataType!=="metadata"&&l.sourceDataType!=="visibility"&&l.dataType!=="style"&&l.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=n}getDefaultPosition(){return"bottom-right"}onAdd(n){return this._map=n,this._compact=this.options.compact,this._container=P.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=P.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=P.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){P.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(n,l){const p=this._map._getUIString(`AttributionControl.${l}`);n.title=p,n.setAttribute("aria-label",p)}_updateAttributions(){if(!this._map.style)return;let n=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?n=n.concat(this.options.customAttribution.map(m=>typeof m!="string"?"":m)):typeof this.options.customAttribution=="str
819ing"&&n.push(this.options.customAttribution)),this._map.style.stylesheet){const m=this._map.style.stylesheet;this.styleOwner=m.owner,this.styleId=m.id}const l=this._map.style.sourceCaches;for(const m in l){const v=l[m];if(v.used||v.usedForTerrain){const S=v.getSource();S.attribution&&n.indexOf(S.attribution)<0&&n.push(S.attribution)}}n=n.filter(m=>String(m).trim()),n.sort((m,v)=>m.length-v.length),n=n.filter((m,v)=>{for(let S=v+1;S<n.length;S++)if(n[S].indexOf(m)>=0)return!1;return!0});const p=n.join(" | ");p!==this._attribHTML&&(this._attribHTML=p,n.length?(this._innerContainer.innerHTML=P.sanitize(p),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Qf{constructor(n={}){this._updateCompact=()=>{const l=this._container.children;if(l.length){const p=l[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&p.classList.add("maplibregl-compact"):p.classList.remove("maplibregl-compact")}},this.options=n}getDefaultPosition(){return"bottom-left"}onAdd(n){this._map=n,this._compact=this.options&&this.options.compact,this._container=P.create("div","maplibregl-ctrl");const l=P.create("a","maplibregl-ctrl-logo");return l.target="_blank",l.rel="noopener nofollow",l.href="https://maplibre.org/",l.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),l.setAttribute("rel","noopener nofollow"),this._container.appendChild(l),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){P.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class ry{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(n){const l=++this._id;return this._queue.push({callback:n,id:l,cancelled:!1}),l}remove(n){const l=this._currentlyRunning,p=l?this._queue.concat(l):this._queue;for(const m of p)if(m.id===n)return void(m.cancelled=!0)}run(n=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const l=this._currentlyRunning=this._queue;this._queue=[];for(const p of l)if(!p.cancelled&&(p.callback(n),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var ny=o.aI([{name:"a_pos3d",type:"Int16",components:3}]);class H0 extends o.E{constructor(n){super(),this._lastTilesetChange=M.now(),this.sourceCache=n,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=n._source.tileSize*2**this.deltaZoom,n.usedForTerrain=!0,n.tileSize=this.tileSize}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(n,l){this.sourceCache.update(n,l),this._renderableTilesKeys=[];const p={};for(const m of We(n,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:l,calculateTileZoom:this.sourceCache._source.calculateTileZoom}))p[m.key]=!0,this._renderableTilesKeys.push(m.key),this._tiles[m.key]||(m.terrainRttPosMatrix32f=new Float64Array(16),o.bX(m.terrainRttPosMatrix32f,0,o.$,o.$,0,0,1),this._tiles[m.key]=new cr(m,this.tileSize),this._lastTilesetChange=M.now());for(const m in this._tiles)p[m]||delete this._tiles[m]}freeRtt(n){for(const l in this._tiles){const p=this._tiles[l];(!n||p.tileID.equals(n)||p.tileID.isChildOf(n)||n.isChildOf(p.tileID))&&(p.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(n=>this.getTileByID(n))}getTileByID(n){return this._tiles[n]}getTerrainCoords(n,l){return l?this._getTerrainCoordsForTileRanges(n,l):this._getTerrainCoordsForRegularTile(n)}_getTerrainCoordsForRegularTile(n){const l={};for(const p of this._renderableTilesKeys){const m=this._tiles[p].tileID,v=n.clone(),S=o.b9();if(m.canonical.equals(n.canonical))o.bX(S,0,o.$,o.$,0,0,1);else if(m.canonical.isChildOf(n.canonical)){const E=m.canonical.z-n.canonical.z,A=m.canonical.x-(m.canonical.x>>E<<E),z=m.canonical.y-(m.canonical.y>>E<<E),F=o.$>>E;o.bX(S,0,F,F,0,0,1),o.M(S,S,[-A*F,-z*F,0])}else{if(!n.canonical.isChildOf(m.canonical))continue;
vendor: 10,964 bytes, line 819
819{const E=n.canonical.z-m.canonical.z,A=n.canonical.x-(n.canonical.x>>E<<E),z=n.canonical.y-(n.canonical.y>>E<<E),F=o.$>>E;o.bX(S,0,o.$,o.$,0,0,1),o.M(S,S,[A*F,z*F,0]),o.N(S,S,[1/2**E,1/2**E,0])}}v.terrainRttPosMatrix32f=new Float32Array(S),l[p]=v}return l}_getTerrainCoordsForTileRanges(n,l){const p={};for(const m of this._renderableTilesKeys){const v=this._tiles[m].tileID;if(!this._isWithinTileRanges(v,l))continue;const S=n.clone(),E=o.b9();if(v.canonical.z===n.canonical.z){const A=n.canonical.x-v.canonical.x,z=n.canonical.y-v.canonical.y;o.bX(E,0,o.$,o.$,0,0,1),o.M(E,E,[A*o.$,z*o.$,0])}else if(v.canonical.z>n.canonical.z){const A=v.canonical.z-n.canonical.z,z=v.canonical.x-(v.canonical.x>>A<<A),F=v.canonical.y-(v.canonical.y>>A<<A),j=n.canonical.x-(v.canonical.x>>A),N=n.canonical.y-(v.canonical.y>>A),G=o.$>>A;o.bX(E,0,G,G,0,0,1),o.M(E,E,[-z*G+j*o.$,-F*G+N*o.$,0])}else{const A=n.canonical.z-v.canonical.z,z=n.canonical.x-(n.canonical.x>>A<<A),F=n.canonical.y-(n.canonical.y>>A<<A),j=(n.canonical.x>>A)-v.canonical.x,N=(n.canonical.y>>A)-v.canonical.y,G=o.$<<A;o.bX(E,0,G,G,0,0,1),o.M(E,E,[z*o.$+j*G,F*o.$+N*G,0])}S.terrainRttPosMatrix32f=new Float32Array(E),p[m]=S}return p}getSourceTile(n,l){const p=this.sourceCache._source;let m=n.overscaledZ-this.deltaZoom;if(m>p.maxzoom&&(m=p.maxzoom),m<p.minzoom)return null;this._sourceTileCache[n.key]||(this._sourceTileCache[n.key]=n.scaledTo(m).key);let v=this.sourceCache.getTileByID(this._sourceTileCache[n.key]);if((!v||!v.dem)&&l)for(;m>=p.minzoom&&(!v||!v.dem);)v=this.sourceCache.getTileByID(n.scaledTo(m--).key);return v}anyTilesAfterTime(n=Date.now()){return this._lastTilesetChange>=n}_isWithinTileRanges(n,l){return l[n.canonical.z]&&n.canonical.x>=l[n.canonical.z].minTileX&&n.canonical.x<=l[n.canonical.z].maxTileX&&n.canonical.y>=l[n.canonical.z].minTileY&&n.canonical.y<=l[n.canonical.z].maxTileY}}class Ks{constructor(n,l,p){this._meshCache={},this.painter=n,this.sourceCache=new H0(l),this.options=p,this.exaggeration=typeof p.exaggeration=="number"?p.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(n,l,p,m=o.$){var v;if(!(l>=0&&l<m&&p>=0&&p<m))return 0;const S=this.getTerrainData(n),E=(v=S.tile)===null||v===void 0?void 0:v.dem;if(!E)return 0;const A=o.cr([],[l/m*o.$,p/m*o.$],S.u_terrain_matrix),z=[A[0]*E.dim,A[1]*E.dim],F=Math.floor(z[0]),j=Math.floor(z[1]),N=z[0]-F,G=z[1]-j;return E.get(F,j)*(1-N)*(1-G)+E.get(F+1,j)*N*(1-G)+E.get(F,j+1)*(1-N)*G+E.get(F+1,j+1)*N*G}getElevationForLngLatZoom(n,l){if(!o.cs(l,n.wrap()))return 0;const{tileID:p,mercatorX:m,mercatorY:v}=this._getOverscaledTileIDFromLngLatZoom(n,l);return this.getElevation(p,m%o.$,v%o.$,o.$)}getElevation(n,l,p,m=o.$){return this.getDEMElevation(n,l,p,m)*this.exaggeration}getTerrainData(n){if(!this._emptyDemTexture){const m=this.painter.context,v=new o.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new o.T(m,v,m.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new o.T(m,new o.R({width:1,height:1}),m.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(m.gl.NEAREST,m.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=o.af([])}const l=this.sourceCache.getSourceTile(n,!0);if(l&&l.dem&&(!l.demTexture||l.needsTerrainPrepare)){const m=this.painter.context;l.demTexture=this.painter.getTileTexture(l.dem.stride),l.demTexture?l.demTexture.update(l.dem.getPixels(),{premultiply:!1}):l.demTexture=new o.T(m,l.dem.getPixels(),m.gl.RGBA,{premultiply:!1}),l.demTexture.bind(m.gl.NEAREST,m.gl.CLAMP_TO_EDGE),l.needsTerrainPrepare=!1}const p=l&&l+l.tileID.key+n.key;if(p&&!this._demMatrixCache[p]){const m=this.sourceCache.sourceCache._source.maxzoom;let v=n.canonical.z-l.tileID.canonical.z;n.overscaledZ>n.canonical.z&&(n.canonical.z>=m?v=n.canonical.z-m:o.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const S=n.canonical.x-(n.canonical.x>>v<<v),E=n.canonical.y-(n.canonical.y>>v<<v),A=o.ct(new Float64Array(16),[1/(o.$<<v),1/(o.$<<v),0]);o.M(A,A,[S*o.$,E*o.$,0]),this._demMatrixCache[n.key]={matrix:A,coord:n}}return{u_depth:2,u_terrain:3,u_terrain_dim:l&&l.dem&&l.dem.dim||1,u_terrain_matrix:p?this._demMatrixCache[n.key].matrix:this._emptyDemMatrix,u_terrain_unpack:l&&l.dem&&l.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(l&&l.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:l}}getFramebuffer(n){const l=this.painter,p=l.width/devicePixelRatio,m=l.height/devicePixelRatio;return!this._fbo||this._fbo.width===p&&this._fbo.height===m||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new o.T(l.context,{width:p,height:m,data:null},l.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(l.context.gl.NEAREST,l.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new o.T(l.context,{width:p,height:m,data:null},l.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(l.context.gl.NEAREST,l.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=l.context.createFramebuffer(p,m,!0,!1),this._fbo.depthAttachment.set(l.context.createRenderbuffer(l.context.gl.DEPTH_COMPONENT16,p,m))),this._fbo.colorAttachment.set(n==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const n=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const l=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let v=0,S=0;v<this._coordsTextureSize;v++)for(let E=0;E<this._coordsTextureSize;E++,S+=4)l[S+0]=255&E,l[S+1]=255&v,l[S+2]=E>>8<<4|v>>8,l[S+3]=0;const p=new o.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(l.buffer)),m=new o.T(n,p,n.gl.RGBA,{premultiply:!1});return m.bind(n.gl.NEAREST,n.gl.CLAMP_TO_EDGE),this._coordsTexture=m,m}pointCoordinate(n){this.painter.maybeDrawDepthAndCoords(!0);const l=new Uint8Array(4),p=this.painter.context,m=p.gl,v=Math.round(n.x*this.painter.pixelRatio/devicePixelRatio),S=Math.round(n.y*this.painter.pixelRatio/devicePixelRatio),E=Math.round(this.painter.height/devicePixelRatio);p.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),m.readPixels(v,E-S-1,1,1,m.RGBA,m.UNSIGNED_BYTE,l),p.bindFramebuffer.set(null);const A=l[0]+(l[2]>>4<<8),z=l[1]+((15&l[2])<<8),F=this.coordsIndex[255-l[3]],j=F&&this.sourceCache.getTileByID(F);if(!j)return null;const N=this._coordsTextureSize,G=(1<<j.tileID.canonical.z)*N;return new o.a0((j.tileID.canonical.x*N+A)/G+j.tileID.wrap,(j.tileID.canonical.y*N+z)/G,this.getElevation(j.tileID,A,z,N))}depthAtPoint(n){const l=new Uint8Array(4),p=this.painter.context,m=p.gl;return p.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),m.readPixels(n.x,this.painter.height/devicePixelRatio-n.y-1,1,1,m.RGBA,m.UNSIGNED_BYTE,l),p.bindFramebuffer.set(null),(l[0]/16777216+l[1]/65536+l[2]/256+l[3])/256}getTerrainMesh(n){var l;const p=((l=this.painter.style.projection)===null||l===void 0?void 0:l.transitionState)>0,m=p&&n.canonical.y===0,v=p&&n.canonical.y===(1<<n.canonical.z)-1,S=`m_${m?"n":""}_${v?"s":""}`;if(this._meshCache[S])return this._meshCache[S];const E=this.painter.context,A=new o.cu,z=new o.aM,F=this.meshSize,j=o.$/F,N=F*F;for(let ye=0;ye<=F;ye++)for(let Ae=0;Ae<=F;Ae++)A.emplaceBack(Ae*j,ye*j,0);for(let ye=0;ye<N;ye+=F+1)for(let Ae=0;Ae<F;Ae++)z.emplaceBack(Ae+ye,F+Ae+ye+1,F+Ae+ye+2),z.emplaceBack(Ae+ye,F+Ae+ye+2,Ae+ye+1);const G=A.length,Y=G+(F+1),ae=(F+1)*F,oe=m?o.bg:0,le=m?0:1,de=v?o.bh:o.$,ve=v?0:1;for(let ye=0;ye<=F;ye++)A.emplaceBack(ye*j,oe,le);for(let ye=0;ye<=F;ye++)A.emplaceBack(ye*j,de,ve);for(let ye=0;ye<F;ye++)z.emplaceBack(ae+ye,Y+ye,Y+ye+1),z.emplaceBack(ae+ye,Y+ye+1,ae+ye+1),z.emplaceBack(0+ye,G+ye+1,G+ye),z.emplaceBack(0+ye,0+ye+1,G+ye+1);const ge=A.length,we=ge+2*(F+1);for(const ye of[0,1])for(let Ae=0;Ae<=F;Ae++)for(const Ve of[0,1])A.emplaceBack(ye*o.$,Ae*j,Ve);for(let ye=0;ye<2*F;ye+=2)z.emplaceBack(ge+ye,ge+ye+1,ge+ye+3),z.emplaceBack(ge+ye,ge+ye+3,ge+ye+2),z.emplaceBack(we+ye,we+ye+3,we+ye+1),z.emplaceBack(we+ye,we+ye+2,we+ye+3);const Ce=new po(E.createVertexBuffer(A,ny.members),E.createIndexBuffer(z),o.aL.simpleSegment(0,0,A.length,z.length));return this._meshCache[S]=Ce,Ce}getMeshFrameDelta(n){return 2*Math.PI*o.bt/Math.pow(2,Math.max(n,0))/5}getMinTileElevationForLngLatZoom(n,l){var p;const{tileID:m}=this._getOverscaledTileIDFromLngLatZoom(n,l);return(p=this.getMinMaxElevation(m).minElevation)!==null&&p!==void 0?p:0}getMinMaxElevation(n){const l=this.getTerrainData(n).tile,p={minElevation:null,maxElevation:null};return l&&l.dem&&(p.minElevation=l.dem.min*this.exaggeration,p.maxElevation=l.dem.max*this.exaggeration),p}_getOverscaledTileIDFromLngLatZoom(n,l){const p=o.a0.fromLngLat(n.wrap()),m=(1<<l)*o.$,v=p.x*m,S=p.y*m,E=Math.floor(v/o.$),A=Math.floor(S/o.$);return{tileID:new o.Z(l,0,l,E,A),mercatorX:v,mercatorY:S}}}class Dh{constructor(n,l,p){this._context=n,this._size=l,this._tileSize=p,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const n of this._objects)n.texture.destroy(),n.fbo.destroy()}_createObject(n){const l=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),p=new o.T(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return p.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),this._context.extTextureFilterAnisotropic&&this._context.gl.texParameterf(this._context.gl.TEXTURE_2D,this._context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this._context.extTextureFilterAnisotropicMax),l.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),l.colorAttachment.set(p.texture),{id:n,fbo:l,texture:p,stamp:-1,inUse:!1}}getObjectForId(n){return this._objects[n]}useObject(n){n.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(l=>n.id!==l),this._recentlyUsed.push(n.id)}stampObject(n){n.stamp=++this._stamp}getOrCreateFreeObject(){for(const l of this._recentlyUsed)if(!this._objects[l].inUse)return this._objects[l];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const n=this._createObject(this._objects.length);return this._objects.push(n),n}freeObject(n){n.inUse=!1}freeAllObjects(){for(const n of this._objects)this.freeObject(n)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(n=>!n.inUse)===!1}}const Ot={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class Wt{constructor(n,l){this.painter=n,this.terrain=l,this.pool=new Dh(n.context,30,l.sourceCache.tileSize*l.qualityFactor)}destruct(){this.pool.destruct()}getTexture(n){return this.pool.getObjectForId(n.rtt[this._stacks.length-1].id).texture}
vendor: 4,230 bytes, line 819
819prepareForRender(n,l){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=n._order.filter(p=>!n._layers[p].isHidden(l)),this._coordsAscending={};for(const p in n.sourceCaches){this._coordsAscending[p]={};const m=n.sourceCaches[p].getVisibleCoordinates(),v=n.sourceCaches[p].getSource(),S=v instanceof Ee?v.terrainTileRanges:null;for(const E of m){const A=this.terrain.sourceCache.getTerrainCoords(E,S);for(const z in A)this._coordsAscending[p][z]||(this._coordsAscending[p][z]=[]),this._coordsAscending[p][z].push(A[z])}}this._coordsAscendingStr={};for(const p of n._order){const m=n._layers[p],v=m.source;if(Ot[m.type]&&!this._coordsAscendingStr[v]){this._coordsAscendingStr[v]={};for(const S in this._coordsAscending[v])this._coordsAscendingStr[v][S]=this._coordsAscending[v][S].map(E=>E.key).sort().join()}}for(const p of this._renderableTiles)for(const m in this._coordsAscendingStr){const v=this._coordsAscendingStr[m][p.tileID.key];v&&v!==p.rttCoords[m]&&(p.rtt=[])}}renderLayer(n,l){if(n.isHidden(this.painter.transform.zoom))return!1;const p=Object.assign(Object.assign({},l),{isRenderingToTexture:!0}),m=n.type,v=this.painter,S=this._renderableLayerIds[this._renderableLayerIds.length-1]===n.id;if(Ot[m]&&(this._prevType&&Ot[this._prevType]||this._stacks.push([]),this._prevType=m,this._stacks[this._stacks.length-1].push(n.id),!S))return!0;if(Ot[this._prevType]||Ot[m]&&S){this._prevType=m;const E=this._stacks.length-1,A=this._stacks[E]||[];for(const z of this._renderableTiles){if(this.pool.isFull()&&(Pn(this.painter,this.terrain,this._rttTiles,p),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(z),z.rtt[E]){const j=this.pool.getObjectForId(z.rtt[E].id);if(j.stamp===z.rtt[E].stamp){this.pool.useObject(j);continue}}const F=this.pool.getOrCreateFreeObject();this.pool.useObject(F),this.pool.stampObject(F),z.rtt[E]={id:F.id,stamp:F.stamp},v.context.bindFramebuffer.set(F.fbo.framebuffer),v.context.clear({color:o.be.transparent,stencil:0}),v.currentStencilSource=void 0;for(let j=0;j<A.length;j++){const N=v.style._layers[A[j]],G=N.source?this._coordsAscending[N.source][z.tileID.key]:[z.tileID];v.context.viewport.set([0,0,F.fbo.width,F.fbo.height]),v._renderTileClippingMasks(N,G,!0),v.renderLayer(v,v.style.sourceCaches[N.source],N,G,p),N.source&&(z.rttCoords[N.source]=this._coordsAscendingStr[N.source][z.tileID.key])}}return Pn(this.painter,this.terrain,this._rttTiles,p),this._rttTiles=[],this.pool.freeAllObjects(),Ot[m]}return!1}}const Oh={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},ep=y,eu={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Qc,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileC
vendor: 21,835 bytes, line 819
819acheSize:null,maxTileCacheZoomLevels:o.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0},Oi={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class iy{constructor(n,l,p=!1){this.mousedown=v=>{this.startMove(v,P.mousePos(this.element,v)),P.addEventListener(window,"mousemove",this.mousemove),P.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=v=>{this.move(v,P.mousePos(this.element,v))},this.mouseup=v=>{this._rotatePitchHanlder.dragEnd(v),this.offTemp()},this.touchstart=v=>{v.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=P.touchPos(this.element,v.targetTouches)[0],this.startMove(v,this._startPos),P.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),P.addEventListener(window,"touchend",this.touchend))},this.touchmove=v=>{v.targetTouches.length!==1?this.reset():(this._lastPos=P.touchPos(this.element,v.targetTouches)[0],this.move(v,this._lastPos))},this.touchend=v=>{v.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this._rotatePitchHanlder.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=l;const m=new $0;this._rotatePitchHanlder=new Fl({clickTolerance:3,move:(v,S)=>{const E=l.getBoundingClientRect(),A=new o.P((E.bottom-E.top)/2,(E.right-E.left)/2);return{bearingDelta:o.cm(new o.P(v.x,S.y),S,A),pitchDelta:p?-.5*(S.y-v.y):void 0}},moveStateManager:m,enable:!0,assignEvents:()=>{}}),this.map=n,P.addEventListener(l,"mousedown",this.mousedown),P.addEventListener(l,"touchstart",this.touchstart,{passive:!1}),P.addEventListener(l,"touchcancel",this.reset)}startMove(n,l){this._rotatePitchHanlder.dragStart(n,l),P.disableDrag()}move(n,l){const p=this.map,{bearingDelta:m,pitchDelta:v}=this._rotatePitchHanlder.dragMove(n,l)||{};m&&p.setBearing(p.getBearing()+m),v&&p.setPitch(p.getPitch()+v)}off(){const n=this.element;P.removeEventListener(n,"mousedown",this.mousedown),P.removeEventListener(n,"touchstart",this.touchstart,{passive:!1}),P.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),P.removeEventListener(window,"touchend",this.touchend),P.removeEventListener(n,"touchcancel",this.reset),this.offTemp()}offTemp(){P.enableDrag(),P.removeEventListener(window,"mousemove",this.mousemove),P.removeEventListener(window,"mouseup",this.mouseup),P.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),P.removeEventListener(window,"touchend",this.touchend)}}let hi;function sy(_,n,l,p=!1){if(p||!l.getCoveringTilesDetailsProvider().allowWorldCopies())return _==null?void 0:_.wrap();const m=new o.S(_.lng,_.lat);if(_=new o.S(_.lng,_.lat),n){const v=new o.S(_.lng-360,_.lat),S=new o.S(_.lng+360,_.lat),E=l.locationToScreenPoint(_).distSqr(n);l.locationToScreenPoint(v).distSqr(n)<E?_=v:l.locationToScreenPoint(S).distSqr(n)<E&&(_=S)}for(;Math.abs(_.lng-l.center.lng)>180;){const v=l.locationToScreenPoint(_);if(v.x>=0&&v.y>=0&&v.x<=l.width&&v.y<=l.height)break;_.lng>l.center.lng?_.lng-=360:_.lng+=360}return _.lng!==m.lng&&l.isPointOnMapSurface(l.locationToScreenPoint(_))?_:m}const Ba={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function bn(_,n,l){const p=_.classList;for(const m in Ba)p.remove(`maplibregl-${l}-anchor-${m}`);p.add(`maplibregl-${l}-anchor-${n}`)}class An extends o.E{constructor(n){if(super(),this._onKeyPress=l=>{const p=l.code,m=l.charCode||l.keyCode;p!=="Space"&&p!=="Enter"&&m!==32&&m!==13||this.togglePopup()},this._onMapClick=l=>{const p=l.originalEvent.target,m=this._element;this._popup&&(p===m||m.contains(p))&&this.togglePopup()},this._update=l=>{if(!this._map)return;const p=this._map.loaded()&&!this._map.isMoving();((l==null?void 0:l.type)==="terrain"||(l==null?void 0:l.type)==="render"&&!p)&&this._map.once("render",this._update),this._lngLat=sy(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let m="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?m=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(m=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let v="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?v="rotateX(0deg)":this._pitchAlignment==="map"&&(v=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||l&&l.type!=="moveend"||(this._pos=this._pos.round()),P.setTransform(this._element,`${Ba[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${v} ${m}`),M.frameAsync(new AbortController).then(()=>{this._updateOpacity(l&&l.type==="moveend")}).catch(()=>{})},this._onMove=l=>{if(!this._isDragging){const p=this._clickTolerance||this._map._clickTolerance;this._isDragging=l.point.dist(this._pointerdownPos)>=p}this._isDragging&&(this._pos=l.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new o.l("dragstart"))),this.fire(new o.l("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new o.l("dragend")),this._state="inactive"},this._addDragHandler=l=>{this._element.contains(l.originalEvent.target)&&(l.preventDefault(),this._positionDelta=l.point.sub(this._pos).add(this._offset),this._pointerdownPos=l.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=n&&n.anchor||"center",this._color=n&&n.color||"#3FB1CE",this._scale=n&&n.scale||1,this._draggable=n&&n.draggable||!1,this._clickTolerance=n&&n.clickTolerance||0,this._subpixelPositioning=n&&n.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=n&&n.rotation||0,this._rotationAlignment=n&&n.rotationAlignment||"auto",this._pitchAlignment=n&&n.pitchAlignment&&n.pitchAlignment!=="auto"?n.pitchAlignment:this._rotationAlignment,this.setOpacity(n==null?void 0:n.opacity,n==null?void 0:n.opacityWhenCovered),n&&n.element)this._element=n.element,this._offset=o.P.convert(n&&n.offset||[0,0]);else{this._defaultMarker=!0,this._element=P.create("div");const l=P.createNS("http://www.w3.org/2000/svg","svg"),p=41,m=27;l.setAttributeNS(null,"display","block"),l.setAttributeNS(null,"height",`${p}px`),l.setAttributeNS(null,"width",`${m}px`),l.setAttributeNS(null,"viewBox",`0 0 ${m} ${p}`);const v=P.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"stroke","none"),v.setAttributeNS(null,"stroke-width","1"),v.setAttributeNS(null,"fill","none"),v.setAttributeNS(null,"fill-rule","evenodd");const S=P.createNS("http://www.w3.org/2000/svg","g");S.setAttributeNS(null,"fill-rule","nonzero");const E=P.createNS("http://www.w3.org/2000/svg","g");E.setAttributeNS(null,"transform","translate(3.0, 29.0)"),E.setAttributeNS(null,"fill","#000000");const A=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const le of A){const de=P.createNS("http://www.w3.org/2000/svg","ellipse");de.setAttributeNS(null,"opacity","0.04"),de.setAttributeNS(null,"cx","10.5"),de.setAttributeNS(null,"cy","5.80029008"),de.setAttributeNS(null,"rx",le.rx),de.setAttributeNS(null,"ry",le.ry),E.appendChild(de)}const z=P.createNS("http://www.w3.org/2000/svg","g");z.setAttributeNS(null,"fill",this._color);const F=P.createNS("http://www.w3.org/2000/svg","path");F.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),z.appendChild(F);const j=P.createNS("http://www.w3.org/2000/svg","g");j.setAttributeNS(null,"opacity","0.25"),j.setAttributeNS(null,"fill","#000000");const N=P.createNS("http://www.w3.org/2000/svg","path");N.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),j.appendChild(N);const G=P.createNS("http://www.w3.org/2000/svg","g");G.setAttributeNS(null,"transform","translate(6.0, 7.0)"),G.setAttributeNS(null,"fill","#FFFFFF");const Y=P.createNS("http://www.w3.org/2000/svg","g");Y.setAttributeNS(null,"transform","translate(8.0, 8.0)");const ae=P.createNS("http://www.w3.org/2000/svg","circle");ae.setAttributeNS(null,"fill","#000000"),ae.setAttributeNS(null,"opacity","0.25"),ae.setAttributeNS(null,"cx","5.5"),ae.setAttributeNS(null,"cy","5.5"),ae.setAttributeNS(null,"r","5.4999962");const oe=P.createNS("http://www.w3.org/2000/svg","circle");oe.setAttributeNS(null,"fill","#FFFFFF"),oe.setAttributeNS(null,"cx","5.5"),oe.setAttributeNS(null,"cy","5.5"),oe.setAttributeNS(null,"r","5.4999962"),Y.appendChild(ae),Y.appendChild(oe),S.appendChild(E),S.appendChild(z),S.appendChild(j),S.appendChild(G),S.appendChild(Y),l.appendChild(S),l.setAttributeNS(null,"height",p*this._scale+"px"),l.setAttributeNS(null,"width",m*this._scale+"px"),this._element.appendChild(l),this._offset=o.P.convert(n&&n.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",l=>{l.preventDefault()}),this._element.addEventListener("mousedown",l=>{l.preventDefault()}),bn(this._element,this._anchor,"marker"),n&&n.className)for(const l of n.className.split(" "))this._element.classList.add(l);this._popup=null}addTo(n){return this.remove(),this._map=n,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",n._getUIString("Marker.Title")),n.getCanvasContainer().appendChild(this._element),n.on("move",this._update),n.on("moveend",this._update),n.on("terrain",this._update),n.on("projectiontransition",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),P.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(n){return this._lngLat=o.S.convert(n),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(n){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),n){if(!("offset"in n.options)){const m=Math.abs(13.5)/Math.SQRT2;n.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[m,-1*(38.1-13.5+m)],"bottom-right":[-m,-1*(38.1-13.5+m)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=n,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(n){return this._subpixelPositioning=n,this}getPopup(){return this._popup}togglePopup(){const n=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:n?(n.isOpen()?n.remove():(n.setLngLat(this._lngLat),n.addTo(this._map)),this):this}_updateOpacity(n=!1){var l,p;const m=(l=this._map)===null||l===void 0?void 0:l.terrain,v=this._map.transform.isLocationOccluded(this._lngLat);if(!m||v){const G=v?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==G&&(this._element.style.opacity=G))}if(n)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const S=this._map,E=S.terrain.depthAtPoint(this._pos),A=S.terrain.getElevationForLngLatZoom(this._lngLat,S.transform.tileZoom);if(S.transform.lngLatToCameraDepth(this._lngLat,A)-E<.006)return void(this._element.style.opacity=this._opacity);const z=-this._offset.y/S.transform.pixelsPerMeter,F=Math.sin(S.getPitch()*Math.PI/180)*z,j=S.terrain.depthAtPoint(new o.P(this._pos.x,this._pos.y-this._offset.y)),N=S.transform.lngLatToCameraDepth(this._lngLat,A+F)-j>.006;!((p=this._popup)===null||p===void 0)&&p.isOpen()&&N&&this._popup.remove(),this._element.style.opacity=N?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(n){return this._offset=o.P.convert(n),this._update(),this}addClassName(n){this._element.classList.add(n)}removeClassName(n){this._element.classList.remove(n)}toggleClassName(n){return this._element.classList.toggle(n)}setDraggable(n){return this._draggable=!!n,this._map&&(n?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(n){return this._rotation=n||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(n){return this._rotationAlignment=n||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(n){return this._pitchAlignment=n&&n!=="auto"?n:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(n,l){return(this._opacity===void 0||n===void 0&&l===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),n!==void 0&&(this._opacity=n),l!==void 0&&(this._opacityWhenCovered=l),this._map&&this._updateOpacity(!0),this}}const oy={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Jo=0,Qo=!1;const tp={maxWidth:100,unit:"metric"};function Fh(_,n,l){const p=l&&l.maxWidth||100,m=_._container.clientHeight/2,v=_._container.clientWidth/2,S=_.unproject([v-p/2,m]),E=_.unproject([v+p/2,m]),A=Math.round(_.project(E).x-_.project(S).x),z=Math.min(p,A,_._container.clientWidth),F=S.distanceTo(E);if(l&&l.unit==="imperial"){const j=3.2808*F;j>5280?Na(n,z,j/5280,_._getUIString("ScaleControl.Miles")):Na(n,z,j,_._getUIString("ScaleControl.Feet"))}else l&&l.unit==="nautical"?Na(n,z,F/1852,_._getUIString("ScaleControl.NauticalMiles")):F>=1e3?Na(n,z,F/1e3,_._getUIString("ScaleControl.Kilometers")):Na(n,z,F,_._getUIString("ScaleControl.Meters"))}function Na(_,n,l,p){const m=function(v){const S=Math.pow(10,`${Math.floor(v)}`.length-1);let E=v/S;return E=E>=10?10:E>=5?5:E>=3?3:E>=2?2:E>=1?1:function(A){const z=Math.pow(10,Math.ceil(-Math.log(A)/Math.LN10));return Math.round(A*z)/z}(E),S*E}(l);_.style.width=n*(m/l)+"px",_.innerHTML=`${m}&nbsp;${p}`}const tu={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0},rp=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Bh(_){if(_){if(typeof _=="number"){const n=Math.round(Math.abs(_)/Math.SQRT2);return{center:new o.P(0,0),top:new o.P(0,_),"top-left":new o.P(n,n),"top-right":new o.P(-n,n),bottom:new o.P(0,-_),"bottom-left":new o.P(n,-n),"bottom-right":new o.P(-n,-n),left:new o.P(_,0),right:new o.P(-_,0)}}if(_ instanceof o.P||Array.isArray(_)){const n=o.P.convert(_);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:o.P.convert(_.center||[0,0]),top:o.P.convert(_.top||[0,0]),"top-left":o.P.convert(_["top-left"]||[0,0]),"top-right":o.P.convert(_["top-right"]||[0,0]),bottom:o.P.convert(_.bottom||[0,0]),"bottom-left":o.P.convert(_["bottom-left"]||[0,0]),"bottom-right":o.P.convert(_["bottom-right"]||[0,0]),left:o.P.convert(_.left||[0,0]),right:o.P.convert(_.right||[0,0])}}return Bh(new o.P(0,0))}const np=y;d.AJAXError=o.cy,d.Event=o.l,d.Evented=o.E,d.LngLat=o.S,d.MercatorCoordinate=o.a0,d.Point=o.P,d.addProtocol=o.cz,d.config=o.a,d.removeProtocol=o.cA,d.AttributionControl=zh,d.BoxZoomHandler=qf,d.CanvasSource=Ke,d.CooperativeGesturesHandler=ty,d.DoubleClickZoomHandler=Rh,d.DragPanHandler=Xf,d.DragRotateHandler=Lh,d.EdgeInsets=gs,d.FullscreenControl=class extends o.E{constructor(_={}){super(),this._onFullscreenChange=()=>{var n;let l=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((n=l==null?void 0:l.shadowRoot)===null||n===void 0)&&n.fullscreenElement;)l=l.shadowRoot.fullscreenElement;l===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,_&&_.container&&(_.container instanceof HTMLElement?this._container=_.container:o.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(_){return this._map=_,this._container||(this._container=this._map.getContainer()),this._controlContainer=P.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){P.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const _=this._fullscreenButton=P.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);P.create("span","maplibregl-ctrl-icon",_).setAttribute("aria-hidden","true"),_.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const _=this._getTitle();this._fullscreenButton.setAttribute("aria-label",_),this._fullscreenButton.title=_}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new o.l("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new o.l("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},d.GeoJSONSource=dt,d.GeolocateControl=class extends o.E{constructor(_){super(),this._onSuccess=n=>{if(this._map){if(this._isOutOfMapMaxBounds(n))return this._setErrorState(),this.fire(new o.l("outofmaxbounds",n)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=n,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_E
819RROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(n),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(n),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new o.l("geolocate",n)),this._finish()}},this._updateCamera=n=>{const l=new o.S(n.coords.longitude,n.coords.latitude),p=n.coords.accuracy,m=this._map.getBearing(),v=o.e({bearing:m},this.options.fitBoundsOptions),S=ue.fromLngLat(l,p);this._map.fitBounds(S,v,{geolocateSource:!0})},this._updateMarker=n=>{if(n){const l=new o.S(n.coords.longitude,n.coords.latitude);this._accuracyCircleMarker.setLngLat(l).addTo(this._map),this._userLocationDotMarker.setLngLat(l).addTo(this._map),this._accuracy=n.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=n=>{if(this._map){if(n.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const l=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=l,this._geolocateButton.setAttribute("aria-label",l),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(n.code===3&&Qo)return;this.options.trackUserLocation&&this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new o.l("error",n)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",n=>n.preventDefault()),this._geolocateButton=P.create("button","maplibregl-ctrl-geolocate",this._container),P.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=n=>{if(this._map){if(n===!1){o.w("Geolocation support is not available so the GeolocateControl will be disabled.");const l=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=l,this._geolocateButton.setAttribute("aria-label",l)}else{const l=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=l,this._geolocateButton.setAttribute("aria-label",l)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=P.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new An({element:this._dotElement}),this._circleElement=P.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new An({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",l=>{l.geolocateSource||this._watchState!=="ACTIVE_LOCK"||l.originalEvent&&l.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new o.l("trackuserlocationend")),this.fire(new o.l("userlocationlostfocus")))})}},this.options=o.e({},oy,_)}onAdd(_){return this._map=_,this._container=P.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return o._(this,arguments,void 0,function*(n=!1){if(hi!==void 0&&!n)return hi;if(window.navigator.permissions===void 0)return hi=!!window.navigator.geolocation,hi;try{hi=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{hi=!!window.navigator.geolocation}return hi})}().then(n=>this._finishSetupUI(n)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),P.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Jo=0,Qo=!1}
vendor: 4,231 bytes, line 819
819_isOutOfMapMaxBounds(_){const n=this._map.getMaxBounds(),l=_.coords;return n&&(l.longitude<n.getWest()||l.longitude>n.getEast()||l.latitude<n.getSouth()||l.latitude>n.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const _=this._map.getBounds(),n=_.getSouthEast(),l=_.getNorthEast(),p=n.distanceTo(l),m=Math.ceil(this._accuracy/(p/this._map._container.clientHeight)*2);this._circleElement.style.width=`${m}px`,this._circleElement.style.height=`${m}px`}trigger(){if(!this._setup)return o.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new o.l("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Jo--,Qo=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new o.l("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new o.l("trackuserlocationstart")),this.fire(new o.l("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let _;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Jo++,Jo>1?(_={maximumAge:6e5,timeout:0},Qo=!0):(_=this.options.positionOptions,Qo=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,_)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},d.GlobeControl=class{constructor(){this._toggleProjection=()=>{var _;const n=(_=this._map.getProjection())===null||_===void 0?void 0:_.type;this._map.setProjection(n!=="mercator"&&n?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var _;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((_
819=this._map.getProjection())===null||_===void 0?void 0:_.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(_){return this._map=_,this._container=P.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=P.create("button","maplibregl-ctrl-globe",this._container),P.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._container}onRemove(){P.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},d.Hash=Zc,d.ImageSource=Ee,d.KeyboardHandler=jl,d.LngLatBounds=ue,d.LogoControl=Qf,d.Map=class extends pn{constructor(_){var n,l;o.cv.mark(o.cw.create);const p=Object.assign(Object.assign(Object.assign({},eu),_),{canvasContextAttributes:Object.assign(Object.assign({},eu.canvasContextAttributes),_.canvasContextAttributes)});if(p.minZoom!=null&&p.maxZoom!=null&&p.minZoom>p.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(p.minPitch!=null&&p.maxPitch!=null&&p.minPitch>p.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(p.minPitch!=null&&p.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(p.maxPitch!=null&&p.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");const m=new Un,v=new ah;if(p.minZoom!==void 0&&m.setMinZoom(p.minZoom),p.maxZoom!==void 0&&m.setMaxZoom(p.maxZoom),p.minPitch!==void 0&&m.setMinPitch(p.minPitch),p.maxPitch!==void 0&&m.setMaxPitch(p.maxPitch),p.renderWorldCopies!==void 0&&m.setRenderWorldCopies(p.renderWorldCopies),super(m,v,{bearingSnap:p.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new ry,this._controls=[],this._mapId=o.a6(),this._contextLost=E=>{E.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new o.l("webglcontextlost",{originalEvent:E}))},this._contextRestored=E=>{this._setupPainter(),this.resize(),this._update(),this.fire(new o.l("webglcontextrestored",{originalEvent:E}))},this._onMapScroll=E=>{if(E.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=p.interactive,this._maxTileCacheSize=p.maxTileCacheSize,this._maxTileCacheZoomLevels=p.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},p.canvasContextAttributes),this._trackResize=p.trackResize===!0,this._bearingSnap=p.bearingSnap,this._centerClampedToGround=p.centerClampedToGround,this._refreshExpiredTiles=p.refreshExpiredTiles===!0,this._fadeDuration=p.fadeDuration,this._crossSourceCollisions=p.crossSourceCollisions===!0,this._collectResourceTiming=p.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Oh),p.locale),this._clickTolerance=p.clickTolerance,this._overridePixelRatio=p.pixelRatio,this._maxCanvasSize=p.maxCanvasSize,this.transformCameraUpdate=p.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=p.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=U.addThrottleControl(()=>this.isMoving()),this._requestManager=new V(p.transformRequest),typeof p.container=="string"){if(this._container=document.getElementById(p.container),!this._container)throw new Error(`Container '${p.container}' not found.`)}else{if(!(p.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=p.container}if(p.maxBounds&&this.setMaxBounds(p.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}),this.once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let E=!1;const A=kh(z=>{this._trackResize&&!this._removed&&(this.resize(z),this.redraw())},50);this._resizeObserver=new ResizeObserver(z=>{E?A(z):E=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Yo(this,p),this._hash=p.hash&&new Zc(typeof p.hash=="string"&&p.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:p.center,elevation:p.elevation,zoom:p.zoom,bearing:p.bearing,pitch:p.pitch,roll:p.roll}),p.bounds&&(this.resize(),this.fitBounds(p.bounds,o.e({},p.fitBoundsOptions,{duration:0}))));const S=typeof p.style=="string"||((l=(n=p.style)===null||n===void 0?void 0:n.projection)===null||l===void 0?void 0:l.type)!=="globe";this.resize(null,S),this._localIdeographFontFamily=p.localIdeographFontFamily,this._val
vendor: 17,309 bytes, line 819
819idateStyle=p.validateStyle,p.style&&this.setStyle(p.style,{localIdeographFontFamily:p.localIdeographFontFamily}),p.attributionControl&&this.addControl(new zh(typeof p.attributionControl=="boolean"?void 0:p.attributionControl)),p.maplibreLogo&&this.addControl(new Qf,p.logoPosition),this.on("style.load",()=>{if(S||this._resizeTransform(),this.transform.unmodified){const E=o.Q(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(E)}}),this.on("data",E=>{this._update(E.dataType==="style"),this.fire(new o.l(`${E.dataType}data`,E))}),this.on("dataloading",E=>{this.fire(new o.l(`${E.dataType}dataloading`,E))}),this.on("dataabort",E=>{this.fire(new o.l("sourcedataabort",E))})}_getMapId(){return this._mapId}setGlobalStateProperty(_,n){return this.style.setGlobalStateProperty(_,n),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(_,n){if(n===void 0&&(n=_.getDefaultPosition?_.getDefaultPosition():"top-right"),!_||!_.onAdd)return this.fire(new o.k(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const l=_.onAdd(this);this._controls.push(_);const p=this._controlPositions[n];return n.indexOf("bottom")!==-1?p.insertBefore(l,p.firstChild):p.appendChild(l),this}removeControl(_){if(!_||!_.onRemove)return this.fire(new o.k(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const n=this._controls.indexOf(_);return n>-1&&this._controls.splice(n,1),_.onRemove(this),this}hasControl(_){return this._controls.indexOf(_)>-1}calculateCameraOptionsFromTo(_,n,l,p){return p==null&&this.terrain&&(p=this.terrain.getElevationForLngLatZoom(l,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(_,n,l,p)}resize(_,n=!0){const[l,p]=this._containerDimensions(),m=this._getClampedPixelRatio(l,p);if(this._resizeCanvas(l,p,m),this.painter.resize(l,p,m),this.painter.overLimit()){const S=this.painter.context.gl;this._maxCanvasSize=[S.drawingBufferWidth,S.drawingBufferHeight];const E=this._getClampedPixelRatio(l,p);this._resizeCanvas(l,p,E),this.painter.resize(l,p,E)}this._resizeTransform(n);const v=!this._moving;return v&&(this.stop(),this.fire(new o.l("movestart",_)).fire(new o.l("move",_))),this.fire(new o.l("resize",_)),v&&this.fire(new o.l("moveend",_)),this}_resizeTransform(_=!0){var n;const[l,p]=this._containerDimensions();this.transform.resize(l,p,_),(n=this._requestedCameraState)===null||n===void 0||n.resize(l,p,_)}_getClampedPixelRatio(_,n){const{0:l,1:p}=this._maxCanvasSize,m=this.getPixelRatio(),v=_*m,S=n*m;return Math.min(v>l?l/v:1,S>p?p/S:1)*m}getPixelRatio(){var _;return(_=this._overridePixelRatio)!==null&&_!==void 0?_:devicePixelRatio}setPixelRatio(_){this._overridePixelRatio=_,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(_){return this.transform.setMaxBounds(ue.convert(_)),this._update()}setMinZoom(_){if((_=_??-2)>=-2&&_<=this.transform.maxZoom)return this.transform.setMinZoom(_),this._update(),this.getZoom()<_&&this.setZoom(_),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(_){if((_=_??22)>=this.transform.minZoom)return this.transform.setMaxZoom(_),this._update(),this.getZoom()>_&&this.setZoom(_),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(_){if((_=_??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(_>=0&&_<=this.transform.maxPitch)return this.transform.setMinPitch(_),this._update(),this.getPitch()<_&&this.setPitch(_),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(_){if((_=_??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(_>=this.transform.minPitch)return this.transform.setMaxPitch(_),this._update(),this.getPitch()>_&&this.setPitch(_),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(_){return this.transform.setRenderWorldCopies(_),this._update()}project(_){return this.transform.locationToScreenPoint(o.S.convert(_),this.style&&this.terrain)}unproject(_){return this.transform.screenPointToLocation(o.P.convert(_),this.terrain)}isMoving(){var _;return this._moving||((_=this.handlers)===null||_===void 0?void 0:_.isMoving())}isZooming(){var _;return this._zooming||((_=this.handlers)===null||_===void 0?void 0:_.isZooming())}isRotating(){var _;return this._rotating||((_=this.handlers)===null||_===void 0?void 0:_.isRotating())}_createDelegatedListener(_,n,l){if(_==="mouseenter"||_==="mouseover"){let p=!1;return{layers:n,listener:l,delegates:{mousemove:v=>{const S=n.filter(A=>this.getLayer(A)),E=S.length!==0?this.queryRenderedFeatures(v.point,{layers:S}):[];E.length?p||(p=!0,l.call(this,new Gi(_,this,v.originalEvent,{features:E}))):p=!1},mouseout:()=>{p=!1}}}}if(_==="mouseleave"||_==="mouseout"){let p=!1;return{layers:n,listener:l,delegates:{mousemove:S=>{const E=n.filter(A=>this.getLayer(A));(E.length!==0?this.queryRenderedFeatures(S.point,{layers:E}):[]).length?p=!0:p&&(p=!1,l.call(this,new Gi(_,this,S.originalEvent)))},mouseout:S=>{p&&(p=!1,l.call(this,new Gi(_,this,S.originalEvent)))}}}}{const p=m=>{const v=n.filter(E=>this.getLayer(E)),S=v.length!==0?this.queryRenderedFeatures(m.point,{layers:v}):[];S.length&&(m.features=S,l.call(this,m),delete m.features)};return{layers:n,listener:l,delegates:{[_]:p}}}}_saveDelegatedListener(_,n){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[_]=this._delegatedListeners[_]||[],this._delegatedListeners[_].push(n)}_removeDelegatedListener(_,n,l){if(!this._delegatedListeners||!this._delegatedListeners[_])return;const p=this._delegatedListeners[_];for(let m=0;m<p.length;m++){const v=p[m];if(v.listener===l&&v.layers.length===n.length&&v.layers.every(S=>n.includes(S))){for(const S in v.delegates)this.off(S,v.delegates[S]);return void p.splice(m,1)}}}on(_,n,l){if(l===void 0)return super.on(_,n);const p=typeof n=="string"?[n]:n,m=this._createDelegatedListener(_,p,l);this._saveDelegatedListener(_,m);for(const v in m.delegates)this.on(v,m.delegates[v]);return{unsubscribe:()=>{this._removeDelegatedListener(_,p,l)}}}once(_,n,l){if(l===void 0)return super.once(_,n);const p=typeof n=="string"?[n]:n,m=this._createDelegatedListener(_,p,l);for(const v in m.delegates){const S=m.delegates[v];m.delegates[v]=(...E)=>{this._removeDelegatedListener(_,p,l),S(...E)}}this._saveDelegatedListener(_,m);for(const v in m.delegates)this.once(v,m.delegates[v]);return this}off(_,n,l){return l===void 0?super.off(_,n):(this._removeDelegatedListener(_,typeof n=="string"?[n]:n,l),this)}queryRenderedFeatures(_,n){if(!this.style)return[];let l;const p=_ instanceof o.P||Array.isArray(_),m=p?_:[[0,0],[this.transform.width,this.transform.height]];if(n=n||(p?{}:_)||{},m instanceof o.P||typeof m[0]=="number")l=[o.P.convert(m)];else{const v=o.P.convert(m[0]),S=o.P.convert(m[1]);l=[v,new o.P(S.x,v.y),S,new o.P(v.x,S.y),v]}return this.style.queryRenderedFeatures(l,n,this.transform)}querySourceFeatures(_,n){return this.style.querySourceFeatures(_,n)}setStyle(_,n){return(n=o.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},n)).diff!==!1&&n.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&_?(this._diffStyle(_,n),this):(this._localIdeographFontFamily=n.localIdeographFontFamily,this._updateStyle(_,n))}setTransformRequest(_){return this._requestManager.setTransformRequest(_),this}_getUIString(_){const n=this._locale[_];if(n==null)throw new Error(`Missing UI string '${_}'`);return n}_updateStyle(_,n){var l,p;if(n.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(_,n));const m=this.style&&n.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!_)),_?(this.style=new xf(this,n||{}),this.style.setEventedParent(this,{style:this.style}),typeof _=="string"?this.style.loadURL(_,n,m):this.style.loadJSON(_,n,m),this):((p=(l=this.style)===null||l===void 0?void 0:l.projection)===null||p===void 0||p.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new xf(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(_,n){if(typeof _=="string"){const l=this._requestManager.transformRequest(_,"Style");o.j(l,new AbortController).then(p=>{this._updateDiff(p.data,n)}).catch(p=>{p&&this.fire(new o.k(p))})}else typeof _=="object"&&this._updateDiff(_,n)}_updateDiff(_,n){try{this.style.setState(_,n)&&this._update(!0)}catch(l){o.w(`Unable to perform style diff: ${l.message||l.error||l}.  Rebuilding the style from scratch.`),this._updateStyle(_,n)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():o.w("There is no style added to the map.")}addSource(_,n){return this._lazyInitEmptyStyle(),this.style.addSource(_,n),this._update(!0)}isSourceLoaded(_){const n=this.style&&this.style.sourceCaches[_];if(n!==void 0)return n.loaded();this.fire(new o.k(new Error(`There is no source with ID '${_}'`)))}setTerrain(_){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),_){const n=this.style.sourceCaches[_.source];if(!n)throw new Error(`cannot load terrain, because there exists no source with ID: ${_.source}`);this.terrain===null&&n.reload();for(const l in this.style._layers){const p=this.style._layers[l];p.type==="hillshade"&&p.source===_.source&&o.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),p.type==="color-relief"&&p.source===_.source&&o.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Ks(this.painter,n,_),this.painter.renderToTexture=new Wt(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=l=>{var p;l.dataType==="style"?this.terrain.sourceCache.freeRtt():l.dataType==="source"&&l.tile&&(l.sourceId!==_.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((p=l.source)===null||p===void 0?void 0:p.type)==="image"?this.terrain.sourceCache.freeRtt():this.terrain.sourceCache.freeRtt(l.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new o.l("terrain",{terrain:_})),this}getTerrain(){var _,n;return(n=(_=this.terrain)===null||_===void 0?void 0:_.options)!==null&&n!==void 0?n:null}areTilesLoaded(){const _=this.style&&this.style.sourceCaches;for(const n in _){const l=_[n]._tiles;for(const p in l){const m=l[p];if(m.state!=="loaded"&&m.state!=="errored")return!1}}return!0}removeSource(_){return this.style.removeSource(_),this._update(!0)}getSource(_){return this.style.getSource(_)}setSourceTileLodParams(_,n,l){if(l){const p=this.getSource(l);if(!p)throw new Error(`There is no source with ID "${l}", cannot set LOD parameters`);p.calculateTileZoom=Ue(Math.max(1,_),Math.max(1,n))}else for(const p in this.style.sourceCaches)this.style.sourceCaches[p].getSource().calculateTileZoom=Ue(Math.max(1,_),Math.max(1,n));return this._update(!0),this}refreshTiles(_,n){const l=this.style.sourceCaches[_];if(!l)throw new Error(`There is no source cache with ID "${_}", cannot refresh tile`);n===void 0?l.reload(!0):l.refreshTiles(n.map(p=>new o.a3(p.z,p.x,p.y)))}addImage(_,n,l={}){const{pixelRatio:p=1,sdf:m=!1,stretchX:v,stretchY:S,content:E,textFitWidth:A,textFitHeight:z}=l;if(this._lazyInitEmptyStyle(),!(n instanceof HTMLImageElement||o.b(n))){if(n.width===void 0||n.height===void 0)return this.fire(new o.k(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:F,height:j,data:N}=n,G=n;return this.style.addImage(_,{data:new o.R({width:F,height:j},new Uint8Array(N)),pixelRatio:p,stretchX:v,stretchY:S,content:E,textFitWidth:A,textFitHeight:z,sdf:m,version:0,userImage:G}),G.onAdd&&G.onAdd(this,_),this}}{const{width:F,height:j,data:N}=M.getImageData(n);this.style.addImage(_,{data:new o.R({width:F,height:j},N),pixelRatio:p,stretchX:v,stretchY:S,content:E,textFitWidth:A,textFitHeight:z,sdf:m,version:0})}}updateImage(_,n){const l=this.style.getImage(_);if(!l)return this.fire(new o.k(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const p=n instanceof HTMLImageElement||o.b(n)?M.getImageData(n):n,{width:m,height:v,data:S}=p;if(m===void 0||v===void 0)return this.fire(new o.k(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(m!==l.data.width||v!==l.data.height)return this.fire(new o.k(new Error("The width and height of the updated image must be that same as the previous version of the image")));const E=!(n instanceof HTMLImageElement||o.b(n));return l.data.replace(S,E),this.style.updateImage(_,l),this}getImage(_){return this.style.getImage(_)}hasImage(_){return _?!!this.style.getImage(_):(this.fire(new o.k(new Error("Missing required image id"))),!1)}removeImage(_){this.style.removeImage(_)}loadImage(_){return U.getImage(this._requestManager.transformRequest(_,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(_,n){return this._lazyInitEmptyStyle(),this.style.addLayer(_,n),this._update(!0)}moveLayer(_,n){return this.style.moveLayer(_,n),this._update(!0)}removeLayer(_){return this.style.removeLayer(_),this._update(!0)}getLayer(_){return this.style.getLayer(_)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(_,n,l){return this.style.setLayerZoomRange(_,n,l),this._update(!0)}setFilter(_,n,l={}){return this.style.setFilter(_,n,l),this._update(!0)}getFilter(_){return this.style.getFilter(_)}setPaintProperty(_,n,l,p={}){return this.style.setPaintProperty(_,n,l,p),this._update(!0)}getPaintProperty(_,n){return this.style.getPaintProperty(_,n)}setLayoutProperty(_,n,l,p={}){return this.style.setLayoutProperty(_,n,l,p),this._update(!0)}getLayoutProperty(_,n){return this.style.getLayoutProperty(_,n)}setGlyphs(_,n={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(_,n),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(_,n,l={}){return this._lazyInitEmptyStyle(),this.style.addSprite(_,n,l,p=>{p||this._update(!0)}),this}removeSprite(_){return this._lazyInitEmptyStyle(),this.style.removeSprite(_),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(_,n={}){return this._lazyInitEmptyStyle(),this.style.setSprite(_,n,l=>{l||this._update(!0)}),this}setLight(_,n={}){return this._lazyInitEmptyStyle(),this.style.setLight(_,n),this._update(!0)}getLight(){return this.style.getLight()}setSky(_,n={}){return this._lazyInitEmptyStyle(),this.style.setSky(_,n),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(_,n){return this.style.setFeatureState(_,n),this._update()}removeFeatureState(_,n){return this.style.removeFeatureState(_,n),this._update()}getFeatureState(_){return this.style.getFeatureState(_)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let _=0,n=0;return this._container&&(_=this._container.clientWidth||400,n=this._container.clientHeight||300),[_,n]}_setupContainer(){const _=this._container;_.classList.add("maplibregl-map");const n=this._canvasContainer=P.create("div","maplibregl-canvas-container",_);this._interactive&&n.classList.add("maplibregl-interactive"),this._canvas=P.create("canvas","maplibregl-canvas",n),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","regi
819on");const l=this._containerDimensions(),p=this._getClampedPixelRatio(l[0],l[1]);this._resizeCanvas(l[0],l[1],p);const m=this._controlContainer=P.create("div","maplibregl-control-container",_),v=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(S=>{v[S]=P.create("div",`maplibregl-ctrl-${S} `,m)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(_,n,l){this._canvas.width=Math.floor(l*_),this._canvas.height=Math.floor(l*n),this._canvas.style.width=`${_}px`,this._canvas.style.height=`${n}px`}_setupPainter(){const _=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0});let n=null;this._canvas.addEventListener("webglcontextcreationerror",p=>{n={requestedAttributes:_},p&&(n.statusMessage=p.statusMessage,n.type=p.type)},{once:!0});let l=null;if(l=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,_):this._canvas.getContext("webgl2",_)||this._canvas.getContext("webgl",_),!l){const p="Failed to initialize WebGL";throw n?(n.message=p,new Error(JSON.stringify(n))):new Error(p)}this.painter=new vs(l,this.transform),L.testSupport(l)}migrateProjection(_,n){super.migrateProjection(_,n),this.painter.transform=_,this.fire(new o.l("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(_){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||_,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(_){return this._update(),this._renderTaskQueue.add(_)}_cancelRenderFrame(_){this._renderTaskQueue.remove(_)}_render(_){var n,l,p,m,v;const S=this._idleTriggered?this._fadeDuration:0,E=((n=this.style.projection)===null||n===void 0?void 0:n.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(_),this._removed)return;let A=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const j=this.transform.zoom,N=M.now();this.style.zoomHistory.update(j,N);const G=new o.F(j,{now:N,fadeDuration:S,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition(),globalState:this.style.getGlobalState()}),Y=G.crossFadingFactor();Y===1&&Y===this._crossFadingFactor||(A=!0,this._crossFadingFactor=Y),this.style.update(G)}const z=((l=this.style.projection)===null||l===void 0?void 0:l.transitionState)>0!==E;(p=this.style.projection)===null||p===void 0||p.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((m=this.style.projection)===null||m===void 0?void 0:m.transitionState,(v=this.style.projection)===null||v===void 0?void 0:v.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||z)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=this.style&&this.style._updatePlacement(this.transform,this.showCollisionBoxes,S,this._crossSourceCollisions,z),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:S,showPadding:this.showPadding}),this.fire(new o.l("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,o.cv.mark(o.cw.load),this.fire(new o.l("load"))),this.style&&(this.style.hasTransitions()||A)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const F=this._sourcesDirty||this._styleDirty||this._placementDirty;return F||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new o.l("idle")),!this._loaded||this._fullyLoaded||F||(this._fullyLoaded=!0,o.cv.mark(o.cw.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var _;this._hash&&this._hash.remove();for(const l of this._controls)l.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),U.removeThrottleControl(this._imageQueueHandle),(_=this._resizeObserver)===null||_===void 0||_.disconnect();const n=this.painter.context.gl.getExtension("WEBGL_lose_context");n!=null&&n.loseContext&&n.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),P.remove(this._canvasContainer),P.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),o.cv.clearMetrics(),this._removed=!0,this.fire(new o.l("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,M.frame(this._frameRequest,_=>{o.cv.frame(_),this._frameRequest=null;try{this._render(_)}catch(n){if(!o.cx(n)&&!function(l){return l.message===Of}(n))throw n}},()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(_){this._showTileBoundaries!==_&&(this._showTileBoundaries=_,this._update())}get showPadding(){return!!this._showPadding}set showPadding(_){this._showPadding!==_&&(this._showPadding=_,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(_){this._showCollisionBoxes!==_&&(this._showCollisionBoxes=_,_?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(_){this._showOverdrawInspector!==_&&(this._showOverdrawInspector=_,this._update())}get repaint(){return!!this._repaint}set repaint(_){this._repaint!==_&&(this._repaint=_,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(_){this._vertices=_,this._update()}get version(){return ep}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(_){return this._lazyInitEmptyStyle(),this.style.setProjection(_),this._update(!0)}},d.MapMouseEvent=Gi,d.MapTouchEvent=ks,d.MapWheelEvent=Vf,d.Marker=An,d.NavigationControl
vendor: 9,201 bytes, line 819
819=class{constructor(_){this._updateZoomButtons=()=>{const n=this._map.getZoom(),l=n===this._map.getMaxZoom(),p=n===this._map.getMinZoom();this._zoomInButton.disabled=l,this._zoomOutButton.disabled=p,this._zoomInButton.setAttribute("aria-disabled",l.toString()),this._zoomOutButton.setAttribute("aria-disabled",p.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(n,l)=>{const p=this._map._getUIString(`NavigationControl.${l}`);n.title=p,n.setAttribute("aria-label",p)},this.options=o.e({},Oi,_),this._container=P.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",n=>n.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",n=>this._map.zoomIn({},{originalEvent:n})),P.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",n=>this._map.zoomOut({},{originalEvent:n})),P.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",n=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:n}):this._map.resetNorth({},{originalEvent:n})}),this._compassIcon=P.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(_){return this._map=_,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new iy(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){P.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(_,n){const l=P.create("button",_,this._container);return l.type="button",l.addEventListener("click",n),l}},d.Popup=class extends o.E{constructor(_){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:void 0)},this.remove=()=>(this._content&&P.remove(this._content),this._container&&(P.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new o.l("close"))),this),this._onMouseUp=n=>{this._update(n.point)},this._onMouseMove=n=>{this._update(n.point)},this._onDrag=n=>{this._update(n.point)},this._update=n=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=P.create("div","maplibregl-popup",this._map.getContainer()),this._tip=P.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const S of this.options.className.split(" "))this._container.classList.add(S);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=sy(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),this._trackPointer&&!n)return;const l=this._flatPos=this._pos=this._trackPointer&&n?n:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&n?n:this._map.transform.locationToScreenPoint(this._lngLat));let p=this.options.anchor;const m=Bh(this.options.offset);if(!p){const S=this._container.offsetWidth,E=this._container.offsetHeight;let A;A=l.y+m.bottom.y<E?["top"]:l.y>this._map.transform.height-E?["bottom"]:[],l.x<S/2?A.push("left"):l.x>this._map.transform.width-S/2&&A.push("right"),p=A.length===0?"bottom":A.join("-")}let v=l.add(m[p]);this.options.subpixelPositioning||(v=v.round()),P.setTransform(this._container,`${Ba[p]} translate(${v.x}px,${v.y}px)`),bn(this._container,p,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=o.e(Object.create(tu),_)}addTo(_){return this._map&&this.remove(),this._map=_,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new o.l("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(_){return this._lngLat=o.S.convert(_),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(_){return this.setDOMContent(document.createTextNode(_))}setHTML(_){const n=document.createDocumentFragment(),l=document.createElement("body");let p;for(l.innerHTML=_;p=l.firstChild,p;)n.appendChild(p);return this.setDOMContent(n)}getMaxWidth(){var _;return(_=this._container)===null||_===void 0?void 0:_.style.maxWidth}setMaxWidth(_){return this.options.maxWidth=_,this._update(),this}setDOMContent(_){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=P.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(_),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(_){return this._container&&this._container.classList.add(_),this}removeClassName(_){return this._container&&this._container.classList.remove(_),this}setOffset(_){return this.options.offset=_,this._update(),this}toggleClassName(_){if(this._container)return this._container.classList.toggle(_)}setSubpixelPositioning(_){this.options.subpixelPositioning=_}_createCloseButton(){this.options.closeButton&&(this._closeButton=P.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const _=this._container.querySelector(rp);_&&_.focus()}},d.RasterDEMTileSource=Xe,d.RasterTileSource=ft,d.ScaleControl=class{constructor(_){this._onMove=()=>{Fh(this._map,this._container,this.options)},this.setUnit=n=>{this.options.unit=n,Fh(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},tp),_)}getDefaultPosition(){return"bottom-left"}onAdd(_){return this._map=_,this._container=P.create("div","maplibregl-ctrl maplibregl-ctrl-scale",_.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){P.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}}
819,d.ScrollZoomHandler=ey,d.Style=xf,d.TerrainControl=class{constructor(_){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=_}onAdd(_){return this._map=_,this._container=P.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=P.create("button","maplibregl-ctrl-terrain",this._container),P.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){P.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},d.TwoFingersTouchPitchHandler=Zf,d.TwoFingersTouchRotateHandler=Hf,d.TwoFingersTouchZoomHandler=Ws,d.TwoFingersTouchZoomRotateHandler=Yf,d.VectorTileSource=je,d.VideoSource=Fe,d.addSourceType=(_,n)=>o._(void 0,void 0,void 0,function*(){if(St(_))throw new Error(`A source type called "${_}" already exists.`);((l,p)=>{nt[l]=p})(_,n)}),d.clearPrewarmedResources=function(){const _=tr;_&&(_.isPreloaded()&&_.numActive()===1?(_.release(Pt),tr=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},d.createTileMesh=_f,d.getMaxParallelImageRequests=function(){return o.a.MAX_PARALLEL_IMAGE_REQUESTS},d.getRTLTextPluginStatus=function(){return Qt().getRTLTextPluginStatus()},d.getVersion=function(){return np},d.getWorkerCount=function(){return Yt.workerCount},d.getWorkerUrl=function(){return o.a.WORKER_URL},d.importScriptInWorkers=function(_){return Je().broadcast("IS",_)},d.prewarm=function(){Or().acquire(Pt)},d.setMaxParallelImageRequests=function(_){o.a.MAX_PARALLEL_IMAGE_REQUESTS=_},d.setRTLTextPlugin=function(_,n){return Qt().setRTLTextPlugin(_,n)},d.setWorkerCount=function(_){Yt.workerCount=_},d.setWorkerUrl=function(_){o.a.WORKER_URL=_}});var h=r;return h})}(b_)),b_.exports}var NX=BX();const Ht=Az(NX);function jX(){return typeof self<"u"?fetch.bind(self):typeof global<"u"&&global.fetch?globalThis.fetch:null}class $X{constructor(){this._apiKey="",this._fetch=jX(),this.tileCacheSize=200}set apiKey(t){this._apiKey=t}get apiKey(){return this._apiKey}set fetch(t){this._fetch=t}get fetch(){return this._fetch}}const Cd=new $X,UX={AUTO:{code:null,flag:"auto",name:"Auto",latin:!1,isMode:!0,geocoding:!0},LATIN:{code:"latin",flag:"name:latin",name:"Latin",latin:!0,isMode:!1,geocoding:!1},NON_LATIN:{code:"nonlatin",flag:"name:nonlatin",name:"Non Latin",latin:!1,isMode:!1,geocoding:!1},LOCAL:{code:null,flag:"name",name:"Local",latin:!0,isMode:!1,geocoding:!1}},VX={ALBANIAN:{code:"sq",flag:"name:sq",name:"Albanian",latin:!0,isMode:!1,geocoding:!0},AMHARIC:{code:"am",flag:"name:am",name:"Amharic",latin:!1,isMode:!1,geocoding:!0},ARABIC:{code:"ar",flag:"name:ar",name:"Arabic",latin:!1,isMode:!1,geocoding:!0},ARMENIAN:{code:"hy",flag:"name:hy",name:"Armenian",latin:!1,isMode:!1,geocoding:!0},AZERBAIJANI:{code:"az",flag:"name:az",name:"Azerbaijani",latin:!0,isMode:!1,geocoding:!0},BASQUE:{code:"eu",flag:"name:eu",name:"Basque",latin:!0,isMode:!1,geocoding:!0},BELARUSIAN:{code:"be",flag:"name:be",name:"Belarusian",latin:!1,isMode:!1,geocoding:!0},BENGALI:{code:"bn",flag:"name:bn",name:"Bengali",latin:!0,isMode:!1,geocoding:!0},BOSNIAN:{code:"bs",flag:"name:bs",name:"Bosnian",latin:!0,isMode:!1,geocoding:!0},BRETON:{code:"br",flag:"name:br",name:"Breton",latin:!0,isMode:!1,geocoding:!0},BULGARIAN:{code:"bg",flag:"bg",name:"Bulgarian",latin:!1,isMode:!1,geocoding:!0},CATALAN:{code:"ca",flag:"name:ca",name:"Catalan",latin:!0,isMode:!1,geocoding:!0},CHINESE:{code:"zh",flag:"name:zh",name:"Chinese",latin:!1,isMode:!1,geocoding:!0},TRADITIONAL_CHINESE:{code:"zh-Hant",flag:"name:zh-Hant",name:"Chinese (traditional)",latin:!1,isMode:!1,geocoding:!1},SIMPLIFIED_CHINESE:{code:"zh-Hans",flag:"name:zh-Hans",name:"Chinese (simplified)",latin:!1,isMode:!1,geocoding:!1},CORSICAN:{code:"co",flag:"name:co",name:"Corsican",latin:!0,isMode:!1,geocoding:!0},CROATIAN:{code:"hr",flag:"name:hr",name:"Croatian",latin:!0,isMode:!1,geocoding:!0},CZECH:{code:"cs",flag:"name:cs",name:"Czech",latin:!0,isMode:!1,geocoding:!0},DANISH:{code:"da",flag:"name:da",name:"Danish",latin:!0,isMode:!1,geocoding:!0},DUTCH:{code:"nl",flag:"name:nl",name:"Dutch",latin:!0,isMode:!1,geocoding:!0},GERMAN:{code:"de",flag:"name:de",name:"German",latin:!0,isMode:!1,geocoding:!0},GREEK:{code:"el",flag:"name:el",name:"Greek",latin:!1,isMode:!1,geocoding:!0},ENGLISH:{code:"en",flag:"name:en",name:"English",latin:!0,isMode:!1,geocoding:!0},ESPERANTO:{code:"eo",flag:"name:eo",name:"Esperanto",latin:!0,isMode:!1,geocoding:!0}
819,ESTONIAN:{code:"et",flag:"name:et",name:"Estonian",latin:!0,isMode:!1,geocoding:!0},FINNISH:{code:"fi",flag:"name:fi",name:"Finnish",latin:!0,isMode:!1,geocoding:!0},FRENCH:{code:"fr",flag:"name:fr",name:"French",latin:!0,isMode:!1,geocoding:!0},FRISIAN:{code:"fy",flag:"name:fy",name:"Frisian (West)",latin:!0,isMode:!1,geocoding:!0},GEORGIAN:{code:"ka",flag:"name:ka",name:"Georgian",latin:!1,isMode:!1,geocoding:!0},HEBREW:{code:"he",flag:"name:he",name:"Hebrew",latin:!1,isMode:!1,geocoding:!0},HINDI:{code:"hi",flag:"name:hi",name:"Hindi",latin:!1,isMode:!1,geocoding:!0},HUNGARIAN:{code:"hu",flag:"name:hu",name:"Hungarian",latin:!0,isMode:!1,geocoding:!0},ICELANDIC:{code:"is",flag:"name:is",name:"Icelandic",latin:!0,isMode:!1,geocoding:!0},INDONESIAN:{code:"id",flag:"name:id",name:"Indonesian",latin:!0,isMode:!1,geocoding:!0},IRISH:{code:"ga",flag:"name:ga",name:"Irish",latin:!0,isMode:!1,geocoding:!0},ITALIAN:{code:"it",flag:"name:it",name:"Italian",latin:!0,isMode:!1,geocoding:!0},JAPANESE:{code:"ja",flag:"name:ja",name:"Japanese",latin:!1,isMode:!1,geocoding:!0},JAPANESE_HIRAGANA:{code:"ja-Hira",flag:"name:ja-Hira",name:"Japanese Hiragana form",latin:!1,isMode:!1,geocoding:!1},JAPANESE_2018:{code:"ja-Latn",flag:"name:ja-Latn",name:"Japanese (Latin 2018)",latin:!0,isMode:!1,geocoding:!1},JAPANESE_KANA:{code:"ja_kana",flag:"name:ja_kana",name:"Japanese (Kana)",latin:!1,isMode:!1,geocoding:!1},JAPANESE_LATIN:{code:"ja_rm",flag:"name:ja_rm",name:"Japanese (Latin script)",latin:!0,isMode:!1,geocoding:!1},KANNADA:{code:"kn",flag:"name:kn",name:"Kannada",latin:!0,isMode:!1,geocoding:!0},KAZAKH:{code:"kk",flag:"name:kk",name:"Kazakh",latin:!1,isMode:!1,geocoding:!0},KOREAN:{code:"ko",flag:"name:ko",name:"Korean",latin:!1,isMode:!1,geocoding:!0},KOREAN_LATIN:{code:"ko-Latn",flag:"name:ko-Latn",name:"Korean (Latin script)",latin:!0,isMode:!1,geocoding:!1},KURDISH:{code:"ku",flag:"name:ku",name:"Kurdish",latin:!0,isMode:!1,geocoding:!0},CLASSICAL_LATIN:{code:"la",flag:"name:la",name:"Latin",latin:!0,isMode:!1,geocoding:!0},LATVIAN:{code:"lv",flag:"name:lv",name:"Latvian",latin:!0,isMode:!1,geocoding:!0},LITHUANIAN:{code:"lt",flag:"name:lt",name:"Lithuanian",latin:!0,isMode:!1,geocoding:!0},LUXEMBOURGISH:{code:"lb",flag:"name:lb",name:"Luxembourgish",latin:!0,isMode:!1,geocoding:!0},MACEDONIAN:{code:"mk",flag:"name:mk",name:"Macedonian",latin:!1,isMode:!1,geocoding:!0},MALAYALAM:{code:"ml",flag:"name:ml",name:"Malayalam",latin:!1,isMode:!1,geocoding:!0},MALTESE:{code:"mt",flag:"name:mt",name:"Maltese",latin:!0,isMode:!1,geocoding:!0},NORWEGIAN:{code:"no",flag:"name:no",name:"Norwegian",latin:!0,isMode:!1,geocoding:!0},OCCITAN:{code:"oc",flag:"name:oc",name:"Occitan",latin:!0,isMode:!1,geocoding:!0},PERSIAN:{code:"fa",flag:"name:fa",name:"Persian",latin:!1,isMode:!1,geocoding:!0},POLISH:{code:"pl",flag:"name:pl",name:"Polish",latin:!0,isMode:!1,geocoding:!0},PORTUGUESE:{code:"pt",flag:"name:pt",name:"Portuguese",latin:!0,isMode:!1,geocoding:!0},PUNJABI:{code:"pa",flag:"name:pa",name:"Punjabi",latin:!1,isMode:!1,geocoding:!0},WESTERN_PUNJABI:{code:"pnb",flag:"name:pnb",name:"Western Punjabi",latin:!1,isMode:!1,geocoding:!1},ROMANIAN:{code:"ro",flag:"name:ro",name:"Romanian",latin:!0,isMode:!1,geocoding:!0},ROMANSH:{code:"rm",flag:"name:rm",name:"Romansh",latin:!0,isMode:!1,geocoding:!0},RUSSIAN:{code:"ru",flag:"name:ru",name:"Russian",latin:!1,isMode:!1,geocoding:!0},SERBIAN_CYRILLIC:{code:"sr",flag:"name:sr",name:"Serbian (Cyrillic script)",latin:!1,isMode:!1,geocoding:!0},SERBIAN_LATIN:{code:"sr-Latn",flag:"name:sr-Latn",name:"Serbian (Latin script)",latin:!0,isMode:!1,geocoding:!1},SCOTTISH_GAELIC:{code:"gd",flag:"name:gd",name:"Scottish Gaelic",latin:!0,isMode:!1,geocoding:!0},SLOVAK:{code:"sk",flag:"name:sk",name:"Slovak",latin:!0,isMode:!1,geocoding:!0},SLOVENE:{code:"sl",flag:"name:sl",name:"Slovene",latin:!0,isMode:!1,geocoding:!0},SPANISH:{code:"es",flag:"name:es",name:"Spanish",latin:!0,isMode:!1,geocoding:!0},SWEDISH:{code:"sv",flag:"name:sv",name:"Swedish",latin:!0,isMode:!1,geocoding:!0},TAMIL:{code:"ta",flag:"name:ta",name:"Tamil",latin:!1,isMode:!1,geocoding:!0},TELUGU:{code:"te",flag:"name:te",name:"Telugu",latin:!1,isMode:!1,geocoding:!0},THAI:{code:"th",flag:"name:th",name:"Thai",latin:!1,isMode:!1,geocoding:!0},TURKISH:{code:"tr",flag:"name:tr",name:"Turkish",latin:!0,isMode:!1,geocoding:!0},UKRAINIAN:{code:"uk",flag:"name:uk",name:"Ukrainian",latin:!1,isMode:!1,geocoding:!0},VIETNAMESE:{code:"vi",flag:"name:vi",name:"Vietnamese (Latin script)",latin:!0,isMode:!1,geocoding:!0},WELSH:{code:"cy",flag:"name:cy",name:"Welsh",latin:!0,isMode:!1,geocoding:!0}},ug={...UX,...VX};function qX(e,t=ug){return e in t?e[e]:null}function _w(e,t=ug){for(const r of Object.values(t))if(r.code===e)return r;return null}function vw(e,t=ug){for(const r of Object.values(t))if(r.flag===e)return r;return null}function GX(e){return e!==null&&typeof e=="object"&&"code"in e&&"flag"in e&&"name"in e&&"latin"in e&&"isMode"in e&&"geocoding"in e&&(typeof e.code=="string"||e.code===null)&&typeof e.flag=="string"&&typeof e.name=="string"&&typeof e.latin=="boolean"&&typeof e.isMode=="boolean"&&typeof e.geocoding=="boolean"}function RI(e,t=ug){return GX(e)?vw(e.flag,t):typeof e!="string"?null:qX(e,t)||_w(e,t)||vw(e,t)||null}async function HX(e,t={}){if(Cd.fetch===null)throw new Error("The fetch function was not found. If on NodeJS < 18 please specify the fetch function with config.fetch");
819if(new URL(e).searchParams.get("key").trim()==="")throw new Error("The MapTiler Cloud API key is missing. Set it in `config.apiKey` or get one for free at https://maptiler.com");return Cd.fetch(e,t)}const Rz={maptilerApiURL:"https://api.maptiler.com/",mapStyle:"streets-v2"};Object.freeze(Rz);class ZX extends Error{constructor(t,r=""){super(`Call to enpoint ${t.url} failed with the status code ${t.status}. ${r}`),this.res=t}}const LI={403:"Key is missing, invalid or restricted"};async function WX(e={}){const t=new URL("geolocation/ip.json",Rz.maptilerApiURL);t.searchParams.set("key",e.apiKey??Cd.apiKey);const r=t.toString(),i=await HX(r);if(!i.ok)throw new ZX(i,i.status in LI?LI[i.status]:"");return await i.json()}const zI={info:WX};function Lz(e){const t=/^maptiler:\/\/(.*)/;let r;const i=e.trim();let a;return i.startsWith("http://")||i.startsWith("https://")?a=i:(r=t.exec(i))!==null?a=`https://api.maptiler.com/maps/${r[1]}/style.json`:a=`https://api.maptiler.com/maps/${i}/style.json`,a}class zz{constructor(t,r,i,a,h,d,o=!1){this.name=t,this.variantType=r,this.id=i,this.referenceStyle=a,this.description=h,this.imageURL=d,this.deprecated=o}getName(){return this.name}getFullName(){return`${this.referenceStyle.getName()} ${this.name}`}getType(){return this.variantType}getId(){return this.id}getDescription(){return this.description}getReferenceStyle(){return this.referenceStyle}hasVariant(t){return this.referenceStyle.hasVariant(t)}getVariant(t){const r=this.referenceStyle.getVariant(t);return this.warnIfDeprecated(r),r}getVariants(){return this.referenceStyle.getVariants().filter(t=>t!==this).map(t=>(this.warnIfDeprecated(t),t))}getImageURL(){return this.imageURL}getExpandedStyleURL(){return Lz(this.getId())}warnIfDeprecated(t=this){if(!t.deprecated)return t;const r=t.getFullName();return console.warn(`Style "${r}" is deprecated and will be removed in a future version.`),t}}class Dz{constructor(t,r){this.name=t,this.id=r,this.variants={},this.orderedVariants=[]}getName(){return this.name}getId(){return this.id}addVariant(t){this.variants[t.getType()]=t,this.orderedVariants.push(t)}hasVariant(t){return t in this.variants}getVariant(t){return t in this.variants?this.variants[t]:this.orderedVariants[0]}getVariants(){return Object.values(this.variants)}getDefaultVariant(){return this.orderedVariants[0].warnIfDeprecated()}}const sm=[{referenceStyleID:"STREETS",name:"Streets",description:"",variants:[{id:"streets-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"streets-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"streets-v2-light",name:"Light",variantType:"LIGHT",description:"",imageURL:""},{id:"streets-v2-night",name:"Night",variantType:"NIGHT",description:"",imageURL:""},{id:"streets-v2-pastel",name:"Pastel",variantType:"PASTEL",description:"",imageURL:""}]},{referenceStyleID:"OUTDOOR",name:"Outdoor",description:"",variants:[{id:"outdoor-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"outdoor-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""}]},{referenceStyleID:"WINTER",name:"Winter",description:"",variants:[{id:"winter-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"winter-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""}]},{referenceStyleID:"SATELLITE",name:"Satellite",description:"",variants:[{id:"satellite",name:"Default",variantType:"DEFAULT",description:"",imageURL:""}]},{referenceStyleID:"HYBRID",name:"Hybrid",description:"",variants:[{id:"hybrid",deprecated:!0,name:"Default",variantType:"DEFAULT",description:"",imageURL:""}]},{referenceStyleID:"BASIC",name:"Basic",description:"",variants:[{id:"basic-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"basic-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"basic-v2-light",name:"Light",variantType:"LIGHT",description:"",imageURL:""}]},{referenceStyleID:"BRIGHT",name:"Bright",description:"",variants:[{id:"bright-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""}
819,{id:"bright-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"bright-v2-light",name:"Light",variantType:"LIGHT",description:"",imageURL:""},{id:"bright-v2-pastel",name:"Pastel",variantType:"PASTEL",description:"",imageURL:""}]},{referenceStyleID:"OPENSTREETMAP",name:"OpenStreetMap",description:"",variants:[{id:"openstreetmap",name:"Default",variantType:"DEFAULT",description:"",imageURL:""}]},{referenceStyleID:"TOPO",name:"Topo",description:"",variants:[{id:"topo-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"topo-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"topo-v2-shiny",name:"Shiny",deprecated:!0,variantType:"SHINY",description:"",imageURL:""},{id:"topo-v2-pastel",name:"Pastel",variantType:"PASTEL",description:"",imageURL:""},{id:"topo-v2-topographique",name:"Topographique",variantType:"TOPOGRAPHIQUE",description:"",imageURL:""}]},{referenceStyleID:"VOYAGER",name:"Voyager",description:"",variants:[{id:"voyager-v2",name:"Default",deprecated:!0,variantType:"DEFAULT",description:"",imageURL:""},{id:"voyager-v2-darkmatter",name:"Darkmatter",deprecated:!0,variantType:"DARK",description:"",imageURL:""},{id:"voyager-v2-positron",name:"Positron",deprecated:!0,variantType:"LIGHT",description:"",imageURL:""},{id:"voyager-v2-vintage",name:"Vintage",deprecated:!0,variantType:"VINTAGE",description:"",imageURL:""}]},{referenceStyleID:"TONER",name:"Toner",description:"",variants:[{id:"toner-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"toner-v2-background",name:"Background",variantType:"BACKGROUND",deprecated:!0,description:"",imageURL:""},{id:"toner-v2-lite",name:"Lite",variantType:"LITE",description:"",imageURL:""},{id:"toner-v2-lines",name:"Lines",variantType:"LINES",deprecated:!0,description:"",imageURL:""}]},{referenceStyleID:"DATAVIZ",name:"Dataviz",description:"",variants:[{id:"dataviz",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"dataviz-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"dataviz-light",name:"Light",variantType:"LIGHT",description:"",imageURL:""}]},{referenceStyleID:"BACKDROP",name:"Backdrop",description:"",variants:[{id:"backdrop",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"backdrop-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"backdrop-light",name:"Light",variantType:"LIGHT",description:"",imageURL:""}]},{referenceStyleID:"OCEAN",name:"Ocean",description:"",variants:[{id:"ocean",name:"Default",variantType:"DEFAULT",description:"",imageURL:""}]},{referenceStyleID:"AQUARELLE",name:"Aquarelle",description:"Watercolor map for creative use",variants:[{id:"aquarelle",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"aquarelle-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"aquarelle-vivid",name:"Vivid",variantType:"VIVID",description:"",imageURL:""}]},{referenceStyleID:"LANDSCAPE",name:"Landscape",description:"Terrain map for data overlays and visualisations",variants:[{id:"landscape",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"landscape-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"landscape-vivid",name:"Vivid",variantType:"VIVID",description:"",imageURL:""}]}];function KX(e){return new Proxy(e,{get(t,r,i){return t.hasVariant(r)?t.getVariant(r):r.toString().toUpperCase()===r?e.getDefaultVariant():Reflect.get(t,r,i)}})}function XX(){const e={};for(let t=0;t<sm.length;t+=1){const r=sm[t],i=KX(new Dz(r.name,r.referenceStyleID));for(let a=0;a<r.variants.length;a+=1){const h=r.variants[a],d=new zz(h.name,h.variantType,h.id,i,h.description,h.imageURL,h.deprecated);i.addVariant(d)}e[r.referenceStyleID]=i}return e}const Ru=XX();var Yy={exports:{}},DI;function YX(){if(DI)return Yy.exports;DI=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(V,te,ce){return Function.prototype.apply.call(V,te,ce)},r;e&&typeof e.ownKeys=="function"?r=e.ownKeys:Object.getOwnPropertySymbols?r=function(V){return Object.getOwnPropertyNames(V).concat(Object.getOwnPropertySymbols(V))}:r=function(V){return Object.getOwnPropertyNames(V)};function i(U){console&&console.warn&&console.warn(U)}var a=Number.isNaN||function(V){return V!==V};function h(){h.init.call(this)}Yy.exports=h,Yy.exports.once=Z,h.EventEmitter=h,h.prototype._events=void 0,h.prototype._eventsCount=0,h.prototype._maxListeners=void 0;var d=10;function o(U){if(typeof U!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof U)}Object.defineProperty(h,"defaultMaxListeners",{enumerable:!0,get:function(){return d}
819,set:function(U){if(typeof U!="number"||U<0||a(U))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+U+".");d=U}}),h.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},h.prototype.setMaxListeners=function(V){if(typeof V!="number"||V<0||a(V))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+V+".");return this._maxListeners=V,this};function y(U){return U._maxListeners===void 0?h.defaultMaxListeners:U._maxListeners}h.prototype.getMaxListeners=function(){return y(this)},h.prototype.emit=function(V){for(var te=[],ce=1;ce<arguments.length;ce++)te.push(arguments[ce]);var fe=V==="error",Se=this._events;if(Se!==void 0)fe=fe&&Se.error===void 0;else if(!fe)return!1;if(fe){var xe;if(te.length>0&&(xe=te[0]),xe instanceof Error)throw xe;var et=new Error("Unhandled error."+(xe?" ("+xe.message+")":""));throw et.context=xe,et}var ze=Se[V];if(ze===void 0)return!1;if(typeof ze=="function")t(ze,this,te);else for(var Ze=ze.length,tt=L(ze,Ze),ce=0;ce<Ze;++ce)t(tt[ce],this,te);return!0};function w(U,V,te,ce){var fe,Se,xe;if(o(te),Se=U._events,Se===void 0?(Se=U._events=Object.create(null),U._eventsCount=0):(Se.newListener!==void 0&&(U.emit("newListener",V,te.listener?te.listener:te),Se=U._events),xe=Se[V]),xe===void 0)xe=Se[V]=te,++U._eventsCount;else if(typeof xe=="function"?xe=Se[V]=ce?[te,xe]:[xe,te]:ce?xe.unshift(te):xe.push(te),fe=y(U),fe>0&&xe.length>fe&&!xe.warned){xe.warned=!0;var et=new Error("Possible EventEmitter memory leak detected. "+xe.length+" "+String(V)+" listeners added. Use emitter.setMaxListeners() to increase limit");et.name="MaxListenersExceededWarning",et.emitter=U,et.type=V,et.count=xe.length,i(et)}return U}h.prototype.addListener=function(V,te){return w(this,V,te,!1)},h.prototype.on=h.prototype.addListener,h.prototype.prependListener=function(V,te){return w(this,V,te,!0)};function T(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function k(U,V,te){var ce={fired:!1,wrapFn:void 0,target:U,type:V,listener:te},fe=T.bind(ce);return fe.listener=te,ce.wrapFn=fe,fe}h.prototype.once=function(V,te){return o(te),this.on(V,k(this,V,te)),this},h.prototype.prependOnceListener=function(V,te){return o(te),this.prependListener(V,k(this,V,te)),this},h.prototype.removeListener=function(V,te){var ce,fe,Se,xe,et;if(o(te),fe=this._events,fe===void 0)return this;if(ce=fe[V],ce===void 0)return this;if(ce===te||ce.listener===te)--this._eventsCount===0?this._events=Object.create(null):(delete fe[V],fe.removeListener&&this.emit("removeListener",V,ce.listener||te));else if(typeof ce!="function"){for(Se=-1,xe=ce.length-1;xe>=0;xe--)if(ce[xe]===te||ce[xe].listener===te){et=ce[xe].listener,Se=xe;break}if(Se<0)return this;Se===0?ce.shift():O(ce,Se),ce.length===1&&(fe[V]=ce[0]),fe.removeListener!==void 0&&this.emit("removeListener",V,et||te)}return this},h.prototype.off=h.prototype.removeListener,h.prototype.removeAllListeners=function(V){var te,ce,fe;if(ce=this._events,ce===void 0)return this;if(ce.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):ce[V]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete ce[V]),this;if(arguments.length===0){var Se=Object.keys(ce),xe;for(fe=0;fe<Se.length;++fe)xe=Se[fe],xe!=="removeListener"&&this.removeAllListeners(xe);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(te=ce[V],typeof te=="function")this.removeListener(V,te);else if(te!==void 0)for(fe=te.length-1;fe>=0;fe--)this.removeListener(V,te[fe]);return this};function M(U,V,te){var ce=U._events;if(ce===void 0)return[];var fe=ce[V];return fe===void 0?[]:typeof fe=="function"?te?[fe.listener||fe]:[fe]:te?$(fe):L(fe,fe.length)}h.prototype.listeners=function(V){return M(this,V,!0)},h.prototype.rawListeners=function(V){return M(this,V,!1)},h.listenerCount=function(U,V){return typeof U.listenerCount=="function"?U.listenerCount(V):P.call(U,V)},h.prototype.listenerCount=P;function P(U){var V=this._events;if(V!==void 0){var te=V[U];if(typeof te=="function")return 1;if(te!==void 0)return te.length}return 0}h.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function L(U,V){for(var te=new Array(V),ce=0;ce<V;++ce)te[ce]=U[ce];return te}function O(U,V){for(;V+1<U.length;V++)U[V]=U[V+1];U.pop()}function $(U){for(var V=new Array(U.length),te=0;te<V.length;++te)V[te]=U[te].listener||U[te];return V}function Z(U,V){return new Promise(function(te,ce){function fe(xe){U.removeListener(V,Se),ce(xe)}function Se(){typeof U.removeListener=="function"&&U.removeListener("error",fe),te([].slice.call(arguments))}H(U,V,Se,{once:!0}),V!=="error"&&J(U,fe,{once:!0})})}function J(U,V,te){typeof U.on=="function"&&H(U,"error",V,te)}function H(U,V,te,ce){if(typeof U.on=="function")ce.once?U.once(V,te):U.on(V,te);else if(typeof U.addEventListener=="function")U.addEventListener(V,function fe(Se){ce.once&&U.removeEventListener(V,fe),te(Se)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof U)}return Yy.exports}var JX=YX();const QX=Az(JX),Ni=[];for(let e=0;e<256;++e)Ni.push((e+256).toString(16).slice(1));function eY(e,t=0){return(Ni[e[t+0]]+Ni[e[t+1]]+Ni[e[t+2]]+Ni[e[t+3]]+"-"+Ni[e[t+4]]+Ni[e[t+5]]+"-"+Ni[e[t+6]]+Ni[e[t+7]]+"-"+Ni[e[t+8]]+Ni[e[t+9]]+"-"+Ni[e[t+10]]+Ni[e[t+11]]+Ni[e[t+12]]+Ni[e[t+13]]+Ni[e[t+14]]+Ni[e[t+15]]).toLowerCase()}let Ix;const tY=new Uint8Array(16);function rY(){if(!Ix){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ix=crypto.getRandomValues.bind(crypto)}return Ix(tY)}const nY=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),OI={randomUUID:nY};function iY(e,t,r){var a;if(OI.randomUUID&&!e)return OI.randomUUID();e=e||{};const i=e.random??((a=e.rng)==null?void 0:a.call(e))??rY();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,eY(i)}var sY=Object.defineProperty,Oz=e=>{throw TypeError(e)},oY=(e,t,r)=>t in e?sY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yr=(e,t,r)=>oY(e,typeof t!="symbol"?t+"":t,r),KS=(e,t,r)=>t.has(e)||Oz("Cannot "+r),Vr=(e,t,r)=>(KS(e,t,"read from private field"),r?r.call(e):t.get(e)),bu=(e,t,r)=>t.has(e)?Oz("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ad=(e,t,r,i)=>(KS(e,t,"write to private field"),t.set(e,r),r),zs=(e,t,r)=>(KS(e,t,"access private method"),r);const Hr={VISITOR:{code:null,flag:"visitor",name:"Visitor",latin:!0,isMode:!0,geocoding:!1},VISITOR_ENGLISH:{code:null,flag:"visitor_en",name:"Visitor English",latin:!0,isMode:!0,geocoding:!1},STYLE:{code:null,flag:"style",name:"Style",latin:!1,isMode:!0,geocoding:!1},STYLE_LOCK:{code:null,flag:"style_lock",name:"Style Lock",latin:!1,isMode:!0,geocoding:!1},...ug};function FI(){if(typeof navigator>"u"){const e=Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0];return _w(e)||Hr.ENGLISH}return Array.from(new Set(navigator.languages.map(e=>e.split("-")[0]))).map(e=>_w(e)).filter(e=>e)[0]??Hr.LOCAL}const us={maptilerLogoURL:"https://api.maptiler.com/resources/logo.svg",maptilerURL:"https://www.maptiler.com/",maptilerApiHost:"api.maptiler.com",telemetryURL:"https://api.maptiler.com/metrics",rtlPluginURL:"https://cdn.maptiler.com/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.min.js",primaryLanguage:Hr.STYLE,secondaryLanguage:Hr.LOCAL,terrainSourceURL:"https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json",terrainSourceId:"maptiler-terrain"};Object.freeze(us);const XS=iY();class aY extends QX{constructor(){super(...arguments),yr(this,"primaryLanguage",us.primaryLanguage),yr(this,"secondaryLanguage"),yr(this,"session",!0),yr(this,"cac
819hing",!0),yr(this,"telemetry",!0),yr(this,"_unit","metric"),yr(this,"_apiKey","")}set unit(t){this._unit=t,this.emit("unit",t)}get unit(){return this._unit}set apiKey(t){this._apiKey=t,Cd.apiKey=t,this.emit("apiKey",t)}get apiKey(){return this._apiKey}set fetch(t){Cd.fetch=t}get fetch(){return Cd.fetch}}const vi=new aY,bw="localcache_source",xw="localcache",lY="maptiler_sdk",cY=1e3,uY=100,ww=typeof caches<"u",{addProtocol:BI}=Ht;function hY(e,t){if(ww&&vi.caching&&vi.session&&e.host===us.maptilerApiHost){if(t==="Source"&&e.href.includes("tiles.json"))return e.href.replace("https://",`${bw}://`);if(t==="Tile"||t==="Glyphs")return e.href.replace("https://",`${xw}://`)}return e.href}let Px;async function Fz(){return Px||(Px=await caches.open(lY)),Px}let NI=0;async function dY(){const e=await Fz(),t=await e.keys(),r=t.slice(0,Math.max(t.length-cY,0));for(const i of r)e.delete(i)}function fY(){BI(bw,async(e,t)=>{if(!e.url)throw new Error("");e.url=e.url.replace(`${bw}://`,"https://");const r=e;r.signal=t.signal;const i=await fetch(e.url,r),a=await i.json();return a.tiles&&a.tiles.length>0&&(a.tiles[0]+=`&last-modified=${i.headers.get("Last-Modified")}`),{data:a,cacheControl:i.headers.get("Cache-Control"),expires:i.headers.get("Expires")}}),BI(xw,async(e,t)=>{if(!e.url)throw new Error("");e.url=e.url.replace(`${xw}://`,"https://");const r=new URL(e.url),i=new URL(r);i.searchParams.delete("mtsid"),i.searchParams.delete("key");const a=i.toString(),h=new URL(r);h.searchParams.delete("last-modified");const d=h.toString(),o=async M=>({data:await M.arrayBuffer(),cacheControl:M.headers.get("Cache-Control"),expires:M.headers.get("Expires")}),y=await Fz(),w=await y.match(a);if(w)return o(w);const T=e;T.signal=t.signal;const k=await fetch(d,T);return k.status>=200&&k.status<300&&(y.put(a,k.clone()).catch(()=>{}),++NI>uY&&(dY(),NI=0)),o(k)})}function pY(){if(typeof window>"u")return;const e=Ht.getRTLTextPluginStatus();if(e==="unavailable"||e==="requested")try{Ht.setRTLTextPlugin(us.rtlPluginURL,!0)}catch{}}function mY(e,t){for(const r of e)typeof t[r]=="function"&&(t[r]=t[r].bind(t))}function jI(e,t){let r=null;try{r=new URL(e)}catch{return{url:e}}return r.host===us.maptilerApiHost&&(r.searchParams.has("key")||r.searchParams.append("key",vi.apiKey),vi.session&&r.searchParams.append("mtsid",XS)),{url:hY(r,t)}}function $I(e){return(t,r)=>{if(e!=null){const i=e(t,r),a=jI((i==null?void 0:i.url)??"",r);return{...i,...a}}return jI(t,r)}}function gY(){return document.createElement("canvas").getContext("webgl2")?null:typeof WebGL2RenderingContext<"u"?"Graphic rendering with WebGL2 has been disabled or is not supported by your graphic card. The map cannot be displayed.":"Your browser does not support graphic rendering with WebGL2. The map cannot be displayed."}function yY(e){const t=gY();if(!t)return;let r=null;if(typeof e=="string"?r=document.getElementById(e):e instanceof HTMLElement&&(r=e),!r)throw new Error("The Map container must be provided.");const i=document.createElement("div");throw i.innerHTML=t,i.classList.add("webgl-warning-div"),r.appendChild(i),new Error(t)}function UI(e,t){return!(!Array.isArray(e)||e.length!==2||e[0]!=="get"||typeof e[1]!="string"||t&&!e[1].startsWith("name:")||!t&&e[1]!=="name")}function _Y(e,t,r){const i=structuredClone(e),a=h=>{if(typeof h!="string")for(let d=0;d<h.length;d+=1)UI(h[d],r)?h[d]=structuredClone(t):a(h[d])};return UI(i,r)?t:(a(i),i)}function vY(e,t){const r=t?/\{name:\S+\}/:/\{name\}/;return{contains:r.test(e),exactMatch:new RegExp(`^${r.source}$`).test(e)}}function bY(e,t,r){const i=r?/\{name:\S+\}/:/\{name\}/,a=e.split(i);return["concat",...a.flatMap((h,d)=>d===a.length-1?[h]:[h,t])]}function xY(e){var t;const r=/\{name(?::(?<language>\S+))?\}/g,i=[];for(;;){const a=r.exec(e);if(!a)break;const h=((t=a.groups)==null?void 0:t.language)??null;i.push(h)}return i}function wY(e){return!Array.isArray(e)||e.length!==2||e[0]!=="get"||typeof e[1]!="string"?null:e[1].trim()==="name"?{isLanguage:!0,localization:null}:e[1].trim().startsWith("name:")?{isLanguage:!0,localization:e[1].trim().split(":").pop()}:null}function SY(e){const t=[],r=structuredClone(e),i=a=>
819{if(typeof a!="string")for(let h=0;h<a.length;h+=1){const d=wY(a[h]);d?t.push(d.localization):i(a[h])}};return i([r]),t}function TY(e,t){const r=[];for(const h of e){if(h.type!=="symbol")continue;const d=h,{id:o,layout:y}=d;if(!y||!("text-field"in y))continue;const w=t.getLayoutProperty(o,"text-field");if(w)if(typeof w=="string"){const T=xY(w);r.push(T)}else{const T=SY(w);r.push(T)}}const i=r.flat(),a={unlocalized:0,localized:{}};for(const h of i)h===null?a.unlocalized+=1:(h in a.localized||(a.localized[h]=0),a.localized[h]+=1);return a}let CY=class extends Ht.Marker{addTo(e){return super.addTo(e)}};class One extends Ht.Popup{addTo(t){return super.addTo(t)}}class Fne extends Ht.Style{constructor(t,r={}){super(t,r)}}class Bne extends Ht.CanvasSource{onAdd(t){super.onAdd(t)}}class Nne extends Ht.GeoJSONSource{onAdd(t){super.onAdd(t)}}class jne extends Ht.ImageSource{onAdd(t){super.onAdd(t)}}class $ne extends Ht.RasterTileSource{onAdd(t){super.onAdd(t)}}class Une extends Ht.RasterDEMTileSource{onAdd(t){super.onAdd(t)}}class Vne extends Ht.VectorTileSource{onAdd(t){super.onAdd(t)}}class qne extends Ht.VideoSource{onAdd(t){super.onAdd(t)}}class EY extends Ht.NavigationControl{onAdd(t){return super.onAdd(t)}}class kY extends Ht.GeolocateControl{onAdd(t){return super.onAdd(t)}}class Gne extends Ht.AttributionControl{onAdd(t){return super.onAdd(t)}}class IY extends Ht.LogoControl{onAdd(t){return super.onAdd(t)}}class PY extends Ht.ScaleControl{onAdd(t){return super.onAdd(t)}}class AY extends Ht.FullscreenControl{onAdd(t){return super.onAdd(t)}}class Hne extends Ht.TerrainControl{onAdd(t){return super.onAdd(t)}}class Zne extends Ht.BoxZoomHandler{constructor(t,r){super(t,r)}}class Wne extends Ht.ScrollZoomHandler{constructor(t,r){super(t,r)}}class Kne extends Ht.CooperativeGesturesHandler{constructor(t,r){super(t,r)}}class Xne extends Ht.KeyboardHandler{constructor(t){super(t)}}class Yne extends Ht.TwoFingersTouchPitchHandler{constructor(t){super(t)}}class Jne extends Ht.MapWheelEvent{constructor(t,r,i){super(t,r,i)}}class Qne extends Ht.MapTouchEvent{constructor(t,r,i){super(t,r,i)}}class eie extends Ht.MapMouseEvent{constructor(t,r,i,a={}){super(t,r,i,a)}}class VI extends IY{constructor(t={}){super(t),yr(this,"logoURL",""),yr(this,"linkURL",""),this.logoURL=t.logoURL??us.maptilerLogoURL,this.linkURL=t.linkURL??us.maptilerURL}onAdd(t){this._map=t,this._compact=this.options.compact??!1,this._container=window.document.createElement("div"),this._container.className="maplibregl-ctrl";const r=window.document.createElement("a");return r.style.backgroundRepeat="no-repeat",r.style.cursor="pointer",r.style.display="block",r.style.height="23px",r.style.margin="0 0 -4px -4px",r.style.overflow="hidden",r.style.width="88px",r.style.backgroundImage=`url(${this.logoURL})`,r.style.backgroundSize="100px 30px",r.style.width="100px",r.style.height="30px",r.target="_blank",r.rel="noopener",r.href=this.linkURL,r.setAttribute("aria-label","MapTiler logo"),r.setAttribute("rel","noopener"),this._container.appendChild(r),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}}var MY=8,RY={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},LY={"*":{type:"source"}},zY=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],DY={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}}
vendor: 4,346 bytes, line 819
819,default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},OY={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},FY={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},BY={type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},NY={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},jY={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},$Y={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},UY=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],VY={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},qY={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},GY={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},HY={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ZY={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},WY=
vendor: 8,541 bytes, line 819
819{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},
vendor: 18,598 bytes, line 819
819KY={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},XY={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},YY={type:"array",value:"*"},JY={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},QY={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},eJ={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},tJ={type:"array",value:"*",minimum:1},rJ={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},nJ={"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},iJ={source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},sJ={type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},oJ=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],aJ={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},lJ={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},cJ={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},uJ={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},hJ={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},dJ={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},fJ={"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},pJ={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},mJ={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},gJ={"*":{type:"string"}},yJ={$version:MY,$root:RY,sources:LY,source:zY,source_vector:DY,source_raster:OY,source_raster_dem:FY,source_geojson:BY,source_video:NY,source_image:jY,layer:$Y,layout:UY,layout_background:VY,layout_fill:qY,layout_circle:GY,layout_heatmap:HY,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:ZY,layout_symbol:WY,layout_raster:KY,layout_hillshade:XY,"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:YY,filter_operator:JY,geometry_type:QY,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:eJ,expression:tJ,light:rJ,sky:nJ,terrain:iJ,projection:sJ,paint:oJ,paint_fill:aJ,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:lJ,paint_circle:cJ,paint_heatmap:uJ,paint_symbol:hJ,paint_raster:dJ,paint_hillshade:fJ,"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"}},paint_background:pJ,transition:mJ,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:gJ};class Ct{constructor(t,r,i,a){this.message=(t?`${t}: `:"")+i,a&&(this.identifier=a),r!=null&&r.__line__&&(this.line=r.__line__)}}function dv(e,...t){for(const r of t)for(const i in r)e[i]=r[i];return e}
819class ha extends Error{constructor(t,r){super(r),this.message=r,this.key=t}}class YS{constructor(t,r=[]){this.parent=t,this.bindings={};for(const[i,a]of r)this.bindings[i]=a}concat(t){return new YS(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return this.bindings[t]?!0:this.parent?this.parent.has(t):!1}}const s0={kind:"null"},kt={kind:"number"},kr={kind:"string"},wr={kind:"boolean"},ya={kind:"color"},o0={kind:"projectionDefinition"},Lu={kind:"object"},gr={kind:"value"},_J={kind:"error"},a0={kind:"collator"},l0={kind:"formatted"},c0={kind:"padding"},Am={kind:"colorArray"},u0={kind:"numberArray"},hg={kind:"resolvedImage"},h0={kind:"variableAnchorOffsetCollection"};function Os(e,t){return{kind:"array",itemType:e,N:t}}function On(e){if(e.kind==="array"){const t=On(e.itemType);return typeof e.N=="number"?`array<${t}, ${e.N}>`:e.itemType.kind==="value"?"array":`array<${t}>`}else return e.kind}const vJ=[s0,kt,kr,wr,ya,o0,l0,Lu,Os(gr),c0,u0,Am,hg,h0];function Mm(e,t){if(t.kind==="error")return null;if(e.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!Mm(e.itemType,t.itemType))&&(typeof e.N!="number"||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if(e.kind==="value"){for(const r of vJ)if(!Mm(r,t))return null}}return`Expected ${On(e)} but found ${On(t)} instead.`}function JS(e,t){return t.some(r=>r.kind===e.kind)}function zu(e,t){return t.some(r=>r==="null"?e===null:r==="array"?Array.isArray(e):r==="object"?e&&!Array.isArray(e)&&typeof e=="object":r===typeof e)}function Xl(e,t){return e.kind==="array"&&t.kind==="array"?e.itemType.kind===t.itemType.kind&&typeof e.N=="number":e.kind===t.kind}const Bz=.96422,Nz=1,jz=.82521,$z=4/29,Ed=6/29,Uz=3*Ed*Ed,bJ=Ed*Ed*Ed,xJ=Math.PI/180,wJ=180/Math.PI;function Vz(e){return e=e%360,e<0&&(e+=360),e}function qz([e,t,r,i]){e=Ax(e),t=Ax(t),r=Ax(r);let a,h;const d=Mx((.2225045*e+.7168786*t+.0606169*r)/Nz);e===t&&t===r?a=h=d:(a=Mx((.4360747*e+.3850649*t+.1430804*r)/Bz),h=Mx((.0139322*e+.0971045*t+.7141733*r)/jz));const o=116*d-16;return[o<0?0:o,500*(a-d),200*(d-h),i]}function Ax(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Mx(e){return e>bJ?Math.pow(e,1/3):e/Uz+$z}function Gz([e,t,r,i]){let a=(e+16)/116,h=isNaN(t)?a:a+t/500,d=isNaN(r)?a:a-r/200;return a=Nz*Lx(a),h=Bz*Lx(h),d=jz*Lx(d),[Rx(3.1338561*h-1.6168667*a-.4906146*d),Rx(-.9787684*h+1.9161415*a+.033454*d),Rx(.0719453*h-.2289914*a+1.4052427*d),i]}function Rx(e){return e=e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055,e<0?0:e>1?1:e}function Lx(e){return e>Ed?e*e*e:Uz*(e-$z)}function SJ(e){const[t,r,i,a]=qz(e),h=Math.sqrt(r*r+i*i);return[Math.round(h*1e4)?Vz(Math.atan2(i,r)*wJ):NaN,h,t,a]}function TJ([e,t,r,i]){return e=isNaN(e)?0:e*xJ,Gz([r,Math.cos(e)*t,Math.sin(e)*t,i])}function CJ([e,t,r,i]){e=Vz(e),t/=100,r/=100;function a(h){const d=(h+e/30)%12,o=t*Math.min(r,1-r);return r-o*Math.max(-1,Math.min(d-3,9-d,1))}return[a(0),a(8),a(4),i]}const EJ=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};function om(e,t){return EJ(e,t)?e[t]:void 0}function kJ(e){if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];const t=om(IJ,e);if(t){const[a,h,d]=t;return[a/255,h/255,d/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){const a=e.length<6?1:2;let h=1;return[Jy(e.slice(h,h+=a)),Jy(e.slice(h,h+=a)),Jy(e.slice(h,h+=a)),Jy(e.slice(h,h+a)||"ff")]}if(e.startsWith("rgb")){const a=/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/,h=e.match(a);if(h){const[d,o,y,w,T,k,M,P,L,O,$,Z]=h,J=[w||" ",M||" ",O].join("");if(J==="  "||J==="  /"||J===",,"||J===",,,"){const H=[y,k,L].join(""),U=H==="%%%"?100:H===""?255:0;if(U){const V=[ld(+o/U,0,1),ld(+T/U,0,1),ld(+P/U,0,1),$?qI(+$,Z):1];if(GI(V))return V}}return}}const r=/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/,i=e.match(r);if(i){const[a,h,d,o,y,w,T,k,M]=i,P=[d||" ",y||" ",T].join("");if(P==="  "||P==="  /"||P===",,"||P===",,,"){const L=[+h,ld(+o,0,100),ld(+w,0,100),k?qI(+k,M):1];if(GI(L))return CJ(L)}}}function Jy(e){return parseInt(e.padEnd(2,e),16)/255}function qI(e,t){return ld(t?e/100:e,0,1)}function ld(e,t,r){return Math.min(Math.max(t,e),r)}
819function GI(e){return!e.some(Number.isNaN)}const IJ={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function Du(e,t,r){return e+r*(t-e)}function Rm(e,t,r){return e.map((i,a)=>Du(i,t[a],r))}let Fn=class cd{constructor(t,r,i,a=1,h=!0){this.r=t,this.g=r,this.b=i,this.a=a,h||(this.r*=a,this.g*=a,this.b*=a,a||this.overwriteGetter("rgb",[t,r,i,a]))}static parse(t){if(t instanceof cd)return t;if(typeof t!="string")return;const r=kJ(t);if(r)return new cd(...r,!1)}get rgb(){const{r:t,g:r,b:i,a}=this,h=a||1/0;return this.overwriteGetter("rgb",[t/h,r/h,i/h,a])}get hcl(){return this.overwriteGetter("hcl",SJ(this.rgb))}get lab(){return this.overwriteGetter("lab",qz(this.rgb))}overwriteGetter(t,r){return Object.defineProperty(this,t,{value:r}),r}toString(){const[t,r,i,a]=this.rgb;return`rgba(${[t,r,i].map(h=>Math.round(h*255)).join(",")},${a})`}static interpolate(t,r,i,a="rgb"){switch(a){case"rgb":{const[h,d,o,y]=Rm(t.rgb,r.rgb,i);return new cd(h,d,o,y,!1)}case"hcl":{const[h,d,o,y]=t.hcl,[w,T,k,M]=r.hcl;let P,L;if(!isNaN(h)&&!isNaN(w)){let H=w-h;w>h&&H>180?H-=360:w<h&&h-w>180&&(H+=360),P=h+i*H}else isNaN(h)?isNaN(w)?P=NaN:(P=w,(o===1||o===0)&&(L=T)):(P=h,(k===1||k===0)&&(L=d));const[O,$,Z,J]=TJ([P,L??Du(d,T,i),Du(o,k,i),Du(y,M,i)]);return new cd(O,$,Z,J,!1)}case"lab":{const[h,d,o,y]=Gz(Rm(t.lab,r.lab,i));return new cd(h,d,o,y,!1)}}}};Fn.black=new Fn(0,0,0,1);Fn.white=new Fn(1,1,1,1);Fn.transparent=new Fn(0,0,0,0);Fn.red=new Fn(1,0,0,1);class QS{constructor(t,r,i){t?this.sensitivity=r?"variant":"case":this.sensitivity=r?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,r){return this.collator.compare(t,r)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const PJ=["bottom","center","top"];class Sw{constructor(t,r,i,a,h,d){this.text=t,this.image=r,this.scale=i,this.fontStack=a,this.textColor=h,this.verticalAlign=d}}class il{constructor(t){this.sections=t}static fromString(t){return new il([new Sw(t,null,null,null,null,null)])}isEmpty(){return this.sections.length===0?!0:!this.sections.some(t=>t.text.length!==0||t.image&&t.image.name.length!==0)}static factory(t){return t instanceof il?t:il.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map(t=>t.text).join("")}}class Ro{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Ro)return t;if(typeof t=="number")return new Ro([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const r of t)if(typeof r!="number")return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]];break}return new Ro(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,i){return new Ro(Rm(t.values,r.values,i))}}class Lo{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Lo)return t;if(typeof t=="number")return new Lo([t]);if(Array.isArray(t)){for(const r of t)if(typeof r!="number")return;return new Lo(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,i){return new Lo(Rm(t.values,r.values,i))}}class Bs{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Bs)return t;if(typeof t=="string"){const i=Fn.parse(t);return i?new Bs([i]):void 0}if(!Array.isArray(t))return;const r=[];
819for(const i of t){if(typeof i!="string")return;const a=Fn.parse(i);if(!a)return;r.push(a)}return new Bs(r)}toString(){return JSON.stringify(this.values)}static interpolate(t,r,i,a="rgb"){const h=[];if(t.values.length!=r.values.length)throw new Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${r.values.length}), cannot interpolate.`);for(let d=0;d<t.values.length;d++)h.push(Fn.interpolate(t.values[d],r.values[d],i,a));return new Bs(h)}}let jn=class extends Error{constructor(t){super(t),this.name="RuntimeError"}toJSON(){return this.message}};const AJ=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class _a{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof _a)return t;if(!(!Array.isArray(t)||t.length<1||t.length%2!==0)){for(let r=0;r<t.length;r+=2){const i=t[r],a=t[r+1];if(typeof i!="string"||!AJ.has(i)||!Array.isArray(a)||a.length!==2||typeof a[0]!="number"||typeof a[1]!="number")return}return new _a(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,i){const a=t.values,h=r.values;if(a.length!==h.length)throw new jn(`Cannot interpolate values of different length. from: ${t.toString()}, to: ${r.toString()}`);const d=[];for(let o=0;o<a.length;o+=2){if(a[o]!==h[o])throw new jn(`Cannot interpolate values containing mismatched anchors. from[${o}]: ${a[o]}, to[${o}]: ${h[o]}`);d.push(a[o]);const[y,w]=a[o+1],[T,k]=h[o+1];d.push([Du(y,T,i),Du(w,k,i)])}return new _a(d)}}class Sc{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new Sc({name:t,available:!1}):null}}class Po{constructor(t,r,i){this.from=t,this.to=r,this.transition=i}static interpolate(t,r,i){return new Po(t,r,i)}static parse(t){if(t instanceof Po)return t;if(Array.isArray(t)&&t.length===3&&typeof t[0]=="string"&&typeof t[1]=="string"&&typeof t[2]=="number")return new Po(t[0],t[1],t[2]);if(typeof t=="object"&&typeof t.from=="string"&&typeof t.to=="string"&&typeof t.transition=="number")return new Po(t.from,t.to,t.transition);if(typeof t=="string")return new Po(t,t,1)}}function Hz(e,t,r,i){return typeof e=="number"&&e>=0&&e<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof r=="number"&&r>=0&&r<=255?typeof i>"u"||typeof i=="number"&&i>=0&&i<=1?null:`Invalid rgba value [${[e,t,r,i].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof i=="number"?[e,t,r,i]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Lm(e){if(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||e instanceof Po||e instanceof Fn||e instanceof QS||e instanceof il||e instanceof Ro||e instanceof Lo||e instanceof Bs||e instanceof _a||e instanceof Sc)return!0;if(Array.isArray(e)){for(const t of e)if(!Lm(t))return!1;return!0}else if(typeof e=="object"){for(const t in e)if(!Lm(e[t]))return!1;return!0}else return!1}function li(e){if(e===null)return s0;if(typeof e=="string")return kr;if(typeof e=="boolean")return wr;if(typeof e=="number")return kt;if(e instanceof Fn)return ya;if(e instanceof Po)return o0;if(e instanceof QS)return a0;if(e instanceof il)return l0;if(e instanceof Ro)return c0;if(e instanceof Lo)return u0;if(e instanceof Bs)return Am;if(e instanceof _a)return h0;if(e instanceof Sc)return hg;if(Array.isArray(e)){const t=e.length;let r;for(const i of e){const a=li(i);if(!r)r=a;else{if(r===a)continue;r=gr;break}}return Os(r||gr,t)}else return Lu}function am(e){const t=typeof e;return e===null?"":t==="string"||t==="number"||t==="boolean"?String(e):e instanceof Fn||e instanceof Po||e instanceof il||e instanceof Ro||e instanceof Lo||e instanceof Bs||e instanceof _a||e instanceof Sc?e.toString():JSON.stringify(e)}class Nd{constructor(t,r){this.type=t,this.value=r}static parse(t,r){if(t.length!==2)return r.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Lm(t[1]))return r.error("invalid value");const i=t[1];let a=li(i);const h=r.expectedType;return a.kind==="array"&&a.N===0&&h&&h.kind==="array"&&(typeof h.N!="number"||h.N===0)&&(a=h),new Nd(a,i)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const Qy={string:kr,number:kt,boolean:wr,object:Lu};class Ao{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let i=1,a;const h=t[0];if(h==="array"){let o;if(t.length>2){const w=t[1];
819if(typeof w!="string"||!(w in Qy)||w==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);o=Qy[w],i++}else o=gr;let y;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return r.error('The length argument to "array" must be a positive integer literal',2);y=t[2],i++}a=Os(o,y)}else{if(!Qy[h])throw new Error(`Types doesn't contain name = ${h}`);a=Qy[h]}const d=[];for(;i<t.length;i++){const o=r.parse(t[i],i,gr);if(!o)return null;d.push(o)}return new Ao(a,d)}evaluate(t){for(let r=0;r<this.args.length;r++){const i=this.args[r].evaluate(t);if(Mm(this.type,li(i))){if(r===this.args.length-1)throw new jn(`Expected value to be of type ${On(this.type)}, but found ${On(li(i))} instead.`)}else return i}throw new Error}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const HI={"to-boolean":wr,"to-color":ya,"to-number":kt,"to-string":kr};class ac{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");const i=t[0];if(!HI[i])throw new Error(`Can't parse ${i} as it is not part of the known types`);if((i==="to-boolean"||i==="to-string")&&t.length!==2)return r.error("Expected one argument.");const a=HI[i],h=[];for(let d=1;d<t.length;d++){const o=r.parse(t[d],d,gr);if(!o)return null;h.push(o)}return new ac(a,h)}evaluate(t){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(t);case"color":{let r,i;for(const a of this.args){if(r=a.evaluate(t),i=null,r instanceof Fn)return r;if(typeof r=="string"){const h=t.parseColor(r);if(h)return h}else if(Array.isArray(r)&&(r.length<3||r.length>4?i=`Invalid rgba value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:i=Hz(r[0],r[1],r[2],r[3]),!i))return new Fn(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new jn(i||`Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"padding":{let r;for(const i of this.args){r=i.evaluate(t);const a=Ro.parse(r);if(a)return a}throw new jn(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"numberArray":{let r;for(const i of this.args){r=i.evaluate(t);const a=Lo.parse(r);if(a)return a}throw new jn(`Could not parse numberArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"colorArray":{let r;for(const i of this.args){r=i.evaluate(t);const a=Bs.parse(r);if(a)return a}throw new jn(`Could not parse colorArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"variableAnchorOffsetCollection":{let r;for(const i of this.args){r=i.evaluate(t);const a=_a.parse(r);if(a)return a}throw new jn(`Could not parse variableAnchorOffsetCollection from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"number":{let r=null;for(const i of this.args){if(r=i.evaluate(t),r===null)return 0;const a=Number(r);if(!isNaN(a))return a}throw new jn(`Could not convert ${JSON.stringify(r)} to number.`)}case"formatted":return il.fromString(am(this.args[0].evaluate(t)));case"resolvedImage":return Sc.fromString(am(this.args[0].evaluate(t)));case"projectionDefinition":return this.args[0].evaluate(t);default:return am(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const MJ=["Unknown","Point","LineString","Polygon"];class Zz{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?MJ[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let r=this._parseColorCache.get(t);return r||(r=Fn.parse(t),this._parseColorCache.set(t,r)),r}}class d0{constructor(t,r,i=[],a,h=new YS,d=[]){this.registry=t,this.path=i,this.key=i.map(o=>`[${o}]`).join(""),this.scope=h,this.errors=d,this.expectedType=a,this._isConstant=r}parse(t,r,i,a,h={}){return r?this.concat(r,i,a)._parse(t,h):this._parse(t,h)}_parse(t,r){(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number")&&(t=["literal",t]);function i(a,h,d){return d==="assert"?new Ao(h,[a]):d==="coerce"?new ac(h,[a]):a}if(Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const a=t[0];if(typeof a!="string")return this.error(`Expression name must be a string, but found ${typeof a} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const h=this.registry[a];if(h){let d=h.parse(t,this);if(!d)return null;if(this.expectedType){const o=this.expectedType,y=d.type;
819if((o.kind==="string"||o.kind==="number"||o.kind==="boolean"||o.kind==="object"||o.kind==="array")&&y.kind==="value")d=i(d,o,r.typeAnnotation||"assert");else if(o.kind==="projectionDefinition"&&["string","array"].includes(y.kind)||["color","formatted","resolvedImage"].includes(o.kind)&&["value","string"].includes(y.kind)||["padding","numberArray"].includes(o.kind)&&["value","number","array"].includes(y.kind)||o.kind==="colorArray"&&["value","string","array"].includes(y.kind)||o.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(y.kind))d=i(d,o,r.typeAnnotation||"coerce");else if(this.checkSubtype(o,y))return null}if(!(d instanceof Nd)&&d.type.kind!=="resolvedImage"&&this._isConstant(d)){const o=new Zz;try{d=new Nd(d.type,d.evaluate(o))}catch(y){return this.error(y.message),null}}return d}return this.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0)}else return typeof t>"u"?this.error("'undefined' value invalid. Use null instead."):typeof t=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof t} instead.`)}concat(t,r,i){const a=typeof t=="number"?this.path.concat(t):this.path,h=i?this.scope.concat(i):this.scope;return new d0(this.registry,this._isConstant,a,r||null,h,this.errors)}error(t,...r){const i=`${this.key}${r.map(a=>`[${a}]`).join("")}`;this.errors.push(new ha(i,t))}checkSubtype(t,r){const i=Mm(t,r);return i&&this.error(i),i}}class f0{constructor(t,r){this.type=r.type,this.bindings=[].concat(t),this.result=r}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const r of this.bindings)t(r[1]);t(this.result)}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const i=[];for(let h=1;h<t.length-1;h+=2){const d=t[h];if(typeof d!="string")return r.error(`Expected string, but found ${typeof d} instead.`,h);if(/[^a-zA-Z0-9_]/.test(d))return r.error("Variable names must contain only alphanumeric characters or '_'.",h);const o=r.parse(t[h+1],h+1);if(!o)return null;i.push([d,o])}const a=r.parse(t[t.length-1],t.length-1,r.expectedType,i);return a?new f0(i,a):null}outputDefined(){return this.result.outputDefined()}}class p0{constructor(t,r){this.type=r.type,this.name=t,this.boundExpression=r}static parse(t,r){if(t.length!==2||typeof t[1]!="string")return r.error("'var' expression requires exactly one string literal argument.");const i=t[1];return r.scope.has(i)?new p0(i,r.scope.get(i)):r.error(`Unknown variable "${i}". Make sure "${i}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}}class e2{constructor(t,r,i){this.type=t,this.index=r,this.input=i}static parse(t,r){if(t.length!==3)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const i=r.parse(t[1],1,kt),a=r.parse(t[2],2,Os(r.expectedType||gr));if(!i||!a)return null;const h=a.type;return new e2(h.itemType,i,a)}evaluate(t){const r=this.index.evaluate(t),i=this.input.evaluate(t);if(r<0)throw new jn(`Array index out of bounds: ${r} < 0.`);if(r>=i.length)throw new jn(`Array index out of bounds: ${r} > ${i.length-1}.`);if(r!==Math.floor(r))throw new jn(`Array index must be an integer, but found ${r} instead.`);return i[r]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class t2{constructor(t,r){this.type=wr,this.needle=t,this.haystack=r}static parse(t,r){if(t.length!==3)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const i=r.parse(t[1],1,gr),a=r.parse(t[2],2,gr);return!i||!a?null:JS(i.type,[wr,kr,kt,s0,gr])?new t2(i,a):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${On(i.type)} instead`)}evaluate(t){const r=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!i)return!1;if(!zu(r,["boolean","string","number","null"]))throw new jn(`Expected first argument to be of type boolean, string, number or null, but found ${On(li(r))} instead.`);if(!zu(i,["string","array"]))throw new jn(`Expected second argument to be of type array or string, but found ${On(li(i))} instead.`);return i.indexOf(r)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class fv{constructor(t,r,i){this.type=kt,this.needle=t,this.haystack=r,this.fromIndex=i}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const i=r.parse(t[1],1,gr),a=r.parse(t[2],2,gr);
819if(!i||!a)return null;if(!JS(i.type,[wr,kr,kt,s0,gr]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${On(i.type)} instead`);if(t.length===4){const h=r.parse(t[3],3,kt);return h?new fv(i,a,h):null}else return new fv(i,a)}evaluate(t){const r=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!zu(r,["boolean","string","number","null"]))throw new jn(`Expected first argument to be of type boolean, string, number or null, but found ${On(li(r))} instead.`);let a;if(this.fromIndex&&(a=this.fromIndex.evaluate(t)),zu(i,["string"])){const h=i.indexOf(r,a);return h===-1?-1:[...i.slice(0,h)].length}else{if(zu(i,["array"]))return i.indexOf(r,a);throw new jn(`Expected second argument to be of type array or string, but found ${On(li(i))} instead.`)}}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class r2{constructor(t,r,i,a,h,d){this.inputType=t,this.type=r,this.input=i,this.cases=a,this.outputs=h,this.otherwise=d}static parse(t,r){if(t.length<5)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!==1)return r.error("Expected an even number of arguments.");let i,a;r.expectedType&&r.expectedType.kind!=="value"&&(a=r.expectedType);const h={},d=[];for(let w=2;w<t.length-1;w+=2){let T=t[w];const k=t[w+1];Array.isArray(T)||(T=[T]);const M=r.concat(w);if(T.length===0)return M.error("Expected at least one branch label.");for(const L of T){if(typeof L!="number"&&typeof L!="string")return M.error("Branch labels must be numbers or strings.");if(typeof L=="number"&&Math.abs(L)>Number.MAX_SAFE_INTEGER)return M.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof L=="number"&&Math.floor(L)!==L)return M.error("Numeric branch labels must be integer values.");if(!i)i=li(L);else if(M.checkSubtype(i,li(L)))return null;if(typeof h[String(L)]<"u")return M.error("Branch labels must be unique.");h[String(L)]=d.length}const P=r.parse(k,w,a);if(!P)return null;a=a||P.type,d.push(P)}const o=r.parse(t[1],1,gr);if(!o)return null;const y=r.parse(t[t.length-1],t.length-1,a);return!y||o.type.kind!=="value"&&r.concat(1).checkSubtype(i,o.type)?null:new r2(i,a,o,h,d,y)}evaluate(t){const r=this.input.evaluate(t);return(li(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every(t=>t.outputDefined())&&this.otherwise.outputDefined()}}class n2{constructor(t,r,i){this.type=t,this.branches=r,this.otherwise=i}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!==0)return r.error("Expected an odd number of arguments.");let i;r.expectedType&&r.expectedType.kind!=="value"&&(i=r.expectedType);const a=[];for(let d=1;d<t.length-1;d+=2){const o=r.parse(t[d],d,wr);if(!o)return null;const y=r.parse(t[d+1],d+1,i);if(!y)return null;a.push([o,y]),i=i||y.type}const h=r.parse(t[t.length-1],t.length-1,i);if(!h)return null;if(!i)throw new Error("Can't infer output type");return new n2(i,a,h)}evaluate(t){for(const[r,i]of this.branches)if(r.evaluate(t))return i.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[r,i]of this.branches)t(r),t(i);t(this.otherwise)}outputDefined(){return this.branches.every(([t,r])=>r.outputDefined())&&this.otherwise.outputDefined()}}class pv{constructor(t,r,i,a){this.type=t,this.input=r,this.beginIndex=i,this.endIndex=a}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const i=r.parse(t[1],1,gr),a=r.parse(t[2],2,kt);if(!i||!a)return null;if(!JS(i.type,[Os(gr),kr,gr]))return r.error(`Expected first argument to be of type array or string, but found ${On(i.type)} instead`);if(t.length===4){const h=r.parse(t[3],3,kt);return h?new pv(i.type,i,a,h):null}else return new pv(i.type,i,a)}evaluate(t){const r=this.input.evaluate(t),i=this.beginIndex.evaluate(t);let a;if(this.endIndex&&(a=this.endIndex.evaluate(t)),zu(r,["string"]))return[...r].slice(i,a).join("");if(zu(r,["array"]))return r.slice(i,a);throw new jn(`Expected first argument to be of type array or string, but found ${On(li(r))} instead.`)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}function Wz(e,t){const r=e.length-1;let i=0,a=r,h=0,d,o;for(;i<=a;)if(h=Math.floor((i+a)/2),d=e[h],o=e[h+1],d<=t){if(h===r||t<o)return h;i=h+1}else if(d>t)a=h-1;else throw new jn("Input is not a number.");return 0}
819class m0{constructor(t,r,i){this.type=t,this.input=r,this.labels=[],this.outputs=[];for(const[a,h]of i)this.labels.push(a),this.outputs.push(h)}static parse(t,r){if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!==0)return r.error("Expected an even number of arguments.");const i=r.parse(t[1],1,kt);if(!i)return null;const a=[];let h=null;r.expectedType&&r.expectedType.kind!=="value"&&(h=r.expectedType);for(let d=1;d<t.length;d+=2){const o=d===1?-1/0:t[d],y=t[d+1],w=d,T=d+1;if(typeof o!="number")return r.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',w);if(a.length&&a[a.length-1][0]>=o)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',w);const k=r.parse(y,T,h);if(!k)return null;h=h||k.type,a.push([o,k])}return new m0(h,i,a)}evaluate(t){const r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(t);const a=this.input.evaluate(t);if(a<=r[0])return i[0].evaluate(t);const h=r.length;if(a>=r[h-1])return i[h-1].evaluate(t);const d=Wz(r,a);return i[d].evaluate(t)}eachChild(t){t(this.input);for(const r of this.outputs)t(r)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function RJ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zx,ZI;function LJ(){if(ZI)return zx;ZI=1,zx=e;function e(t,r,i,a){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*r,this.by=3*(a-r)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=i,this.p2y=a}return e.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,r){if(r===void 0&&(r=1e-6),t<0)return 0;if(t>1)return 1;for(var i=t,a=0;a<8;a++){var h=this.sampleCurveX(i)-t;if(Math.abs(h)<r)return i;var d=this.sampleCurveDerivativeX(i);if(Math.abs(d)<1e-6)break;i=i-h/d}var o=0,y=1;for(i=t,a=0;a<20&&(h=this.sampleCurveX(i),!(Math.abs(h-t)<r));a++)t>h?o=i:y=i,i=(y-o)*.5+o;return i},solve:function(t,r){return this.sampleCurveY(this.solveCurveX(t,r))}},zx}var zJ=LJ(),DJ=RJ(zJ);class va{constructor(t,r,i,a,h){this.type=t,this.operator=r,this.interpolation=i,this.input=a,this.labels=[],this.outputs=[];for(const[d,o]of h)this.labels.push(d),this.outputs.push(o)}static interpolationFactor(t,r,i,a){let h=0;if(t.name==="exponential")h=Dx(r,t.base,i,a);else if(t.name==="linear")h=Dx(r,1,i,a);else if(t.name==="cubic-bezier"){const d=t.controlPoints;h=new DJ(d[0],d[1],d[2],d[3]).solve(Dx(r,1,i,a))}return h}static parse(t,r){let[i,a,h,...d]=t;if(!Array.isArray(a)||a.length===0)return r.error("Expected an interpolation type expression.",1);if(a[0]==="linear")a={name:"linear"};else if(a[0]==="exponential"){const w=a[1];if(typeof w!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);a={name:"exponential",base:w}}else if(a[0]==="cubic-bezier"){const w=a.slice(1);if(w.length!==4||w.some(T=>typeof T!="number"||T<0||T>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);a={name:"cubic-bezier",controlPoints:w}}else return r.error(`Unknown interpolation type ${String(a[0])}`,1,0);if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!==0)return r.error("Expected an even number of arguments.");if(h=r.parse(h,2,kt),!h)return null;const o=[];let y=null;(i==="interpolate-hcl"||i==="interpolate-lab")&&r.expectedType!=Am?y=ya:r.expectedType&&r.expectedType.kind!=="value"&&(y=r.expectedType);for(let w=0;w<d.length;w+=2){const T=d[w],k=d[w+1],M=w+3,P=w+4;if(typeof T!="number")return r.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',M);if(o.length&&o[o.length-1][0]>=T)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',M);const L=r.parse(k,P,y);if(!L)return null;y=y||L.type,o.push([T,L])}return!Xl(y,kt)&&!Xl(y,o0)&&!Xl(y,ya)&&!Xl(y,c0)&&!Xl(y,u0)&&!Xl(y,Am)&&!Xl(y,h0)&&!Xl(y,Os(kt))?r.error(`Type ${On(y)} is not interpolatable.`):new va(y,i,a,h,o)}evaluate(t){const r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(t);const a=this.input.evaluate(t);if(a<=r[0])return i[0].evaluate(t);const h=r.length;if(a>=r[h-1])return i[h-1].evaluate(t);const d=Wz(r,a),o=r[d],y=r[d+1],w=va.interpolationFactor(this.interpolation,a,o,y),T=i[d].evaluate(t),k=i[d+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return Du(T,k,w);case"color":return Fn.interpolate(T,k,w);case"padding":return Ro.interpolate(T,k,w);case"colorArray":return Bs.interpolate(T,k,w);case"numberArray":return Lo.interpolate(T,k,w);case"variableAnchorOffsetCollection":return _a.interpolate(T,k,w);case"array":return Rm(T,k,w);case"projectionDefinition":return Po.interpolate(T,k,w)}case"interpolate-hcl":switch(this.type.kind){case"color":return Fn.interpolate(T,k,w,"hcl");case"colorArray":return Bs.interpolate(T,k,w,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return Fn.interpolate(T,k,w,"lab");case"colorArray":return Bs.interpolate(T,k,w,"lab")}}}eachChild(t){t(this.input);for(const r of this.outputs)t(r)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function Dx(e,t,r,i){const a=i-r,h=e-r;return a===0?0:t===1?h/a:(Math.pow(t,h)-1)/(Math.pow(t,a)-1)}class zm{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let i=null;const a=r.expectedType;a&&a.kind!=="value"&&(i=a);const h=[];for(const d of t.slice(1)){const o=r.parse(d,1+h.length,i,void 0,{typeAnnotation:"omit"});if(!o)return null;i=i||o.type,h.push(o)}if(!i)throw new Error("No output type");return a&&h.some(d=>Mm(a,d.type))?new zm(gr,h):new zm(i,h)}evaluate(t){let r=null,i=0,a;for(const h of this.args)if(i++,r=h.evaluate(t),r&&r instanceof Sc&&!r.available&&(a||(a=r.name),r=null,i===this.args.length&&(r=a)),r!==null)break;return r}
819eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}function WI(e,t){return e==="=="||e==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function OJ(e,t,r){return t===r}function FJ(e,t,r){return t!==r}function BJ(e,t,r){return t<r}function NJ(e,t,r){return t>r}function jJ(e,t,r){return t<=r}function $J(e,t,r){return t>=r}function Kz(e,t,r,i){return i.compare(t,r)===0}function UJ(e,t,r,i){return!Kz(e,t,r,i)}function VJ(e,t,r,i){return i.compare(t,r)<0}function qJ(e,t,r,i){return i.compare(t,r)>0}function GJ(e,t,r,i){return i.compare(t,r)<=0}function HJ(e,t,r,i){return i.compare(t,r)>=0}function hf(e,t,r){const i=e!=="=="&&e!=="!=";return class Xz{constructor(h,d,o){this.type=wr,this.lhs=h,this.rhs=d,this.collator=o,this.hasUntypedArgument=h.type.kind==="value"||d.type.kind==="value"}static parse(h,d){if(h.length!==3&&h.length!==4)return d.error("Expected two or three arguments.");const o=h[0];let y=d.parse(h[1],1,gr);if(!y)return null;if(!WI(o,y.type))return d.concat(1).error(`"${o}" comparisons are not supported for type '${On(y.type)}'.`);let w=d.parse(h[2],2,gr);if(!w)return null;if(!WI(o,w.type))return d.concat(2).error(`"${o}" comparisons are not supported for type '${On(w.type)}'.`);if(y.type.kind!==w.type.kind&&y.type.kind!=="value"&&w.type.kind!=="value")return d.error(`Cannot compare types '${On(y.type)}' and '${On(w.type)}'.`);i&&(y.type.kind==="value"&&w.type.kind!=="value"?y=new Ao(w.type,[y]):y.type.kind!=="value"&&w.type.kind==="value"&&(w=new Ao(y.type,[w])));let T=null;if(h.length===4){if(y.type.kind!=="string"&&w.type.kind!=="string"&&y.type.kind!=="value"&&w.type.kind!=="value")return d.error("Cannot use collator to compare non-string types.");if(T=d.parse(h[3],3,a0),!T)return null}return new Xz(y,w,T)}evaluate(h){const d=this.lhs.evaluate(h),o=this.rhs.evaluate(h);if(i&&this.hasUntypedArgument){const y=li(d),w=li(o);if(y.kind!==w.kind||!(y.kind==="string"||y.kind==="number"))throw new jn(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${y.kind}, ${w.kind}) instead.`)}if(this.collator&&!i&&this.hasUntypedArgument){const y=li(d),w=li(o);if(y.kind!=="string"||w.kind!=="string")return t(h,d,o)}return this.collator?r(h,d,o,this.collator.evaluate(h)):t(h,d,o)}eachChild(h){h(this.lhs),h(this.rhs),this.collator&&h(this.collator)}outputDefined(){return!0}}}const ZJ=hf("==",OJ,Kz),WJ=hf("!=",FJ,UJ),KJ=hf("<",BJ,VJ),XJ=hf(">",NJ,qJ),YJ=hf("<=",jJ,GJ),JJ=hf(">=",$J,HJ);class g0{constructor(t,r,i){this.type=a0,this.locale=i,this.caseSensitive=t,this.diacriticSensitive=r}static parse(t,r){if(t.length!==2)return r.error("Expected one argument.");const i=t[1];if(typeof i!="object"||Array.isArray(i))return r.error("Collator options argument must be an object.");const a=r.parse(i["case-sensitive"]===void 0?!1:i["case-sensitive"],1,wr);if(!a)return null;const h=r.parse(i["diacritic-sensitive"]===void 0?!1:i["diacritic-sensitive"],1,wr);if(!h)return null;let d=null;return i.locale&&(d=r.parse(i.locale,1,kr),!d)?null:new g0(a,h,d)}evaluate(t){return new QS(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}}class i2{constructor(t,r,i,a,h){this.type=kr,this.number=t,this.locale=r,this.currency=i,this.minFractionDigits=a,this.maxFractionDigits=h}static parse(t,r){if(t.length!==3)return r.error("Expected two arguments.");const i=r.parse(t[1],1,kt);if(!i)return null;const a=t[2];if(typeof a!="object"||Array.isArray(a))return r.error("NumberFormat options argument must be an object.");let h=null;if(a.locale&&(h=r.parse(a.locale,1,kr),!h))return null;let d=null;if(a.currency&&(d=r.parse(a.currency,1,kr),!d))return null;let o=null;if(a["min-fraction-digits"]&&(o=r.parse(a["min-fraction-digits"],1,kt),!o))return null;let y=null;return a["max-fraction-digits"]&&(y=r.parse(a["max-fraction-digits"],1,kt),!y)?null:new i2(i,h,d,o,y)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}}class s2{constructor(t){this.type=l0,this.sections=t}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");const i=t[1];if(!Array.isArray(i)&&typeof i=="object")return r.error("First argument must be an image or text section.");const a=[];let h=!1;for(let d=1;d<=t.length-1;++d){const o=t[d];if(h&&typeof o=="object"&&!Array.isArray(o)){h=!1;let y=null;if(o["font-scale"]&&(y=r.parse(o["font-scale"],1,kt),!y))return null;let w=null;if(o["text-font"]&&(w=r.parse(o["text-font"],1,Os(kr)),!w))return null;let T=null;if(o["text-color"]&&(T=r.parse(o["text-color"],1,ya),!T))return null;let k=null;if(o["vertical-align"]){if(typeof o["vertical-align"]=="string"&&!PJ.includes(o["vertical-align"]))return r.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${o["vertical-align"]}' instead.`);if(k=r.parse(o["vertical-align"],1,kr),!k)return null}const M=a[a.length-1];M.scale=y,M.font=w,M.textColor=T,M.verticalAlign=k}else{const y=r.parse(t[d],1,gr);if(!y)return null;const w=y.type.kind;
819if(w!=="string"&&w!=="value"&&w!=="null"&&w!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");h=!0,a.push({content:y,scale:null,font:null,textColor:null,verticalAlign:null})}}return new s2(a)}evaluate(t){const r=i=>{const a=i.content.evaluate(t);return li(a)===hg?new Sw("",a,null,null,null,i.verticalAlign?i.verticalAlign.evaluate(t):null):new Sw(am(a),null,i.scale?i.scale.evaluate(t):null,i.font?i.font.evaluate(t).join(","):null,i.textColor?i.textColor.evaluate(t):null,i.verticalAlign?i.verticalAlign.evaluate(t):null)};return new il(this.sections.map(r))}eachChild(t){for(const r of this.sections)t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor),r.verticalAlign&&t(r.verticalAlign)}outputDefined(){return!1}}class o2{constructor(t){this.type=hg,this.input=t}static parse(t,r){if(t.length!==2)return r.error("Expected two arguments.");const i=r.parse(t[1],1,kr);return i?new o2(i):r.error("No image name provided.")}evaluate(t){const r=this.input.evaluate(t),i=Sc.fromString(r);return i&&t.availableImages&&(i.available=t.availableImages.indexOf(r)>-1),i}eachChild(t){t(this.input)}outputDefined(){return!1}}class a2{constructor(t){this.type=kt,this.input=t}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);const i=r.parse(t[1],1);return i?i.type.kind!=="array"&&i.type.kind!=="string"&&i.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${On(i.type)} instead.`):new a2(i):null}evaluate(t){const r=this.input.evaluate(t);if(typeof r=="string")return[...r].length;if(Array.isArray(r))return r.length;throw new jn(`Expected value to be of type string or array, but found ${On(li(r))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}const ba=8192;function QJ(e,t){const r=eQ(e[0]),i=rQ(e[1]),a=Math.pow(2,t.z);return[Math.round(r*a*ba),Math.round(i*a*ba)]}function l2(e,t){const r=Math.pow(2,t.z),i=(e[0]/ba+t.x)/r,a=(e[1]/ba+t.y)/r;return[tQ(i),nQ(a)]}function eQ(e){return(180+e)/360}function tQ(e){return e*360-180}function rQ(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function nQ(e){return 360/Math.PI*Math.atan(Math.exp((180-e*360)*Math.PI/180))-90}function dg(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function Dm(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function iQ(e,t,r){return t[1]>e[1]!=r[1]>e[1]&&e[0]<(r[0]-t[0])*(e[1]-t[1])/(r[1]-t[1])+t[0]}function sQ(e,t,r){const i=e[0]-t[0],a=e[1]-t[1],h=e[0]-r[0],d=e[1]-r[1];return i*d-h*a===0&&i*h<=0&&a*d<=0}function y0(e,t,r,i){const a=[t[0]-e[0],t[1]-e[1]],h=[i[0]-r[0],i[1]-r[1]];return cQ(h,a)===0?!1:!!(KI(e,t,r,i)&&KI(r,i,e,t))}function oQ(e,t,r){for(const i of r)for(let a=0;a<i.length-1;++a)if(y0(e,t,i[a],i[a+1]))return!0;return!1}function df(e,t,r=!1){let i=!1;for(const a of t)for(let h=0;h<a.length-1;h++){if(sQ(e,a[h],a[h+1]))return r;iQ(e,a[h],a[h+1])&&(i=!i)}return i}function aQ(e,t){for(const r of t)if(df(e,r))return!0;return!1}function Yz(e,t){for(const r of e)if(!df(r,t))return!1;for(let r=0;r<e.length-1;++r)if(oQ(e[r],e[r+1],t))return!1;return!0}function lQ(e,t){for(const r of t)if(Yz(e,r))return!0;return!1}function cQ(e,t){return e[0]*t[1]-e[1]*t[0]}function KI(e,t,r,i){const a=e[0]-r[0],h=e[1]-r[1],d=t[0]-r[0],o=t[1]-r[1],y=i[0]-r[0],w=i[1]-r[1],T=a*w-y*h,k=d*w-y*o;return T>0&&k<0||T<0&&k>0}function c2(e,t,r){const i=[];for(let a=0;a<e.length;a++){const h=[];for(let d=0;d<e[a].length;d++){const o=QJ(e[a][d],r);dg(t,o),h.push(o)}i.push(h)}return i}function Jz(e,t,r){const i=[];for(let a=0;a<e.length;a++){const h=c2(e[a],t,r);i.push(h)}return i}function Qz(e,t,r,i){if(e[0]<r[0]||e[0]>r[2]){const a=i*.5;let h=e[0]-r[0]>a?-i:r[0]-e[0]>a?i:0;h===0&&(h=e[0]-r[2]>a?-i:r[2]-e[0]>a?i:0),e[0]+=h}dg(t,e)}function uQ(e){e[0]=e[1]=1/0,e[2]=e[3]=-1/0}function XI(e,t,r,i){const a=Math.pow(2,i.z)*ba,h=[i.x*ba,i.y*ba],d=[];for(const o of e)for(const y of o){const w=[y.x+h[0],y.y+h[1]];Qz(w,t,r,a),d.push(w)}return d}function YI(e,t,r,i){const a=Math.pow(2,i.z)*ba,h=[i.x*ba,i.y*ba],d=[];for(const o of e){const y=[];for(const w of o){const T=[w.x+h[0],w.y+h[1]];dg(t,T),y.push(T)}d.push(y)}if(t[2]-t[0]<=a/2){uQ(t);for(const o of d)for(const y of o)Qz(y,t,r,a)}return d}function hQ(e,t){const r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],a=e.canonicalID();if(t.type==="Polygon"){const h=c2(t.coordinates,i,a),d=XI(e.geometry(),r,i,a);if(!Dm(r,i))return!1;for(const o of d)if(!df(o,h))return!1}if(t.type==="MultiPolygon"){const h=Jz(t.coordinates,i,a),d=XI(e.geometry(),r,i,a);if(!Dm(r,i))return!1;for(const o of d)if(!aQ(o,h))return!1}return!0}function dQ(e,t){const r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],a=e.canonicalID();if(t.type==="Polygon"){const h=c2(t.coordinates,i,a),d=YI(e.geometry(),r,i,a);if(!Dm(r,i))return!1;for(const o of d)if(!Yz(o,h))return!1}if(t.type==="MultiPolygon"){const h=Jz(t.coordinates,i,a),d=YI(e.geometry(),r,i,a);if(!Dm(r,i))return!1;for(const o of d)if(!lQ(o,h))return!1}return!0}class Ou{constructor(t,r){this.type=wr,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Lm(t[1])){const i=t[1];if(i.type==="FeatureCollection"){const a=[];for(const h of i.features){const{type:d,coordinates:o}=h.geometry;d==="Polygon"&&a.push(o),d==="MultiPolygon"&&a.push(...o)}if(a.length){const h={type:"MultiPolygon",coordinates:a};return new Ou(i,h)}}else if(i.type==="Feature"){const a=i.geometry.type;if(a==="Polygon"||a==="MultiPolygon")return new Ou(i,i.geometry)}else if(i.type==="Polygon"||i.type==="MultiPolygon")return new Ou(i,i)}return r.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return hQ(t,this.geometries);if(t.geometryType()==="LineString")return dQ(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}class eD{constructor(t=[],r=(i,a)=>i<a?-1:i>a?1:0){if(this.data=t,this.length=this.data.length,this.compare=r,this.length>0)for(let i=(this.length>>1)-1;i>=0;i--)this._down(i)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;const t=this.data[0],r=this.data.pop();return--this.length>0&&(this.data[0]=r,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:r,compare:i}=this,a=r[t];for(;t>0;){const h=t-1>>1,d=r[h];if(i(a,d)>=0)break;r[t]=d,t=h}r[t]=a}_down(t){const{data:r,compare:i}=this,a=this.length>>1,h=r[t];for(;t<a;){let d=(t<<1)+1;const o=d+1;if(o<this.length&&i(r[o],r[d])<0&&(d=o),i(r[d],h)>=0)break;r[t]=r[d],t=d}r[t]=h}}function fQ(e,t){if(e.length<=1)return[e];const r=[];let i,a;for(const h of e){const d=pQ(h);d!==0&&(h.area=Math.abs(d),a===void 0&&(a=d<0),a===d<0?(i&&r.push(i),i=[h]):i.push(h))}return i&&r.push(i),r}function pQ(e){let t=0;for(let r=0,i=e.length,a=i-1,h,d;r<i;a=r++)h=e[r],d=e[a],t+=(d.x-h.x)*(h.y+d.y);return t}const mQ=6378.137,JI=1/298.257223563,QI=JI*(2-JI),eP=Math.PI/180;class u2{constructor(t){const r=eP*mQ*1e3,i=Math.cos(t*eP),a=1/(1-QI*(1-i*i)),h=Math.sqrt(a);this.kx=r*h*i,this.ky=r*h*a*(1-QI)}distance(t,r){const i=this.wrap(t[0]-r[0])*this.kx,a=(t[1]-r[1])*this.ky;return Math.sqrt(i*i+a*a)}pointOnLine(t,r){let i=1/0,a,h,d,o;for(let y=0;y<t.length-1;y++){let w=t[y][0],T=t[y][1],k=this.wrap(t[y+1][0]-w)*this.kx,M=(t[y+1][1]-T)*this.ky,P=0;(k!==0||M!==0)&&(P=(this.wrap(r[0]-w)*this.kx*k+(r[1]-T)*this.ky*M)/(k*k+M*M),P>1?(w=t[y+1][0],T=t[y+1][1]):P>0&&(w+=k/this.kx*P,T+=M/this.ky*P)),k=this.wrap(r[0]-w)*this.kx,M=(r[1]-T)*this.ky;const L=k*k+M*M;L<i&&(i=L,a=w,h=T,d=y,o=P)}return{point:[a,h],index:d,t:Math.max(0,Math.min(1,o))}}wrap(t){for(;t<-180;)t+=360;for(;t>180;)t-=360;return t}}const Tw=100,Cw=50;function tD(e,t){return t[0]-e[0]}function mv(e){return e[1]-e[0]+1}function dl(e,t){return e[1]>=e[0]&&e[1]<t}function Ew(e,t){if(e[0]>
vendor: 6,364 bytes, line 819
819e[1])return[null,null];const r=mv(e);if(t){if(r===2)return[e,null];const a=Math.floor(r/2);return[[e[0],e[0]+a],[e[0]+a,e[1]]]}if(r===1)return[e,null];const i=Math.floor(r/2)-1;return[[e[0],e[0]+i],[e[0]+i+1,e[1]]]}function kw(e,t){if(!dl(t,e.length))return[1/0,1/0,-1/0,-1/0];const r=[1/0,1/0,-1/0,-1/0];for(let i=t[0];i<=t[1];++i)dg(r,e[i]);return r}function Iw(e){const t=[1/0,1/0,-1/0,-1/0];for(const r of e)for(const i of r)dg(t,i);return t}function tP(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function h2(e,t,r){if(!tP(e)||!tP(t))return NaN;let i=0,a=0;return e[2]<t[0]&&(i=t[0]-e[2]),e[0]>t[2]&&(i=e[0]-t[2]),e[1]>t[3]&&(a=e[1]-t[3]),e[3]<t[1]&&(a=t[1]-e[3]),r.distance([0,0],[i,a])}function Cu(e,t,r){const i=r.pointOnLine(t,e);return r.distance(e,i.point)}function d2(e,t,r,i,a){const h=Math.min(Cu(e,[r,i],a),Cu(t,[r,i],a)),d=Math.min(Cu(r,[e,t],a),Cu(i,[e,t],a));return Math.min(h,d)}function gQ(e,t,r,i,a){if(!(dl(t,e.length)&&dl(i,r.length)))return 1/0;let h=1/0;for(let d=t[0];d<t[1];++d){const o=e[d],y=e[d+1];for(let w=i[0];w<i[1];++w){const T=r[w],k=r[w+1];if(y0(o,y,T,k))return 0;h=Math.min(h,d2(o,y,T,k,a))}}return h}function yQ(e,t,r,i,a){if(!(dl(t,e.length)&&dl(i,r.length)))return NaN;let h=1/0;for(let d=t[0];d<=t[1];++d)for(let o=i[0];o<=i[1];++o)if(h=Math.min(h,a.distance(e[d],r[o])),h===0)return h;return h}function _Q(e,t,r){if(df(e,t,!0))return 0;let i=1/0;for(const a of t){const h=a[0],d=a[a.length-1];if(h!==d&&(i=Math.min(i,Cu(e,[d,h],r)),i===0))return i;const o=r.pointOnLine(a,e);if(i=Math.min(i,r.distance(e,o.point)),i===0)return i}return i}function vQ(e,t,r,i){if(!dl(t,e.length))return NaN;for(let h=t[0];h<=t[1];++h)if(df(e[h],r,!0))return 0;let a=1/0;for(let h=t[0];h<t[1];++h){const d=e[h],o=e[h+1];for(const y of r)for(let w=0,T=y.length,k=T-1;w<T;k=w++){const M=y[k],P=y[w];if(y0(d,o,M,P))return 0;a=Math.min(a,d2(d,o,M,P,i))}}return a}function rP(e,t){for(const r of e)for(const i of r)if(df(i,t,!0))return!0;return!1}function bQ(e,t,r,i=1/0){const a=Iw(e),h=Iw(t);if(i!==1/0&&h2(a,h,r)>=i)return i;if(Dm(a,h)){if(rP(e,t))return 0}else if(rP(t,e))return 0;let d=1/0;for(const o of e)for(let y=0,w=o.length,T=w-1;y<w;T=y++){const k=o[T],M=o[y];for(const P of t)for(let L=0,O=P.length,$=O-1;L<O;$=L++){const Z=P[$],J=P[L];if(y0(k,M,Z,J))return 0;d=Math.min(d,d2(k,M,Z,J,r))}}return d}function nP(e,t,r,i,a,h){if(!h)return;const d=h2(kw(i,h),a,r);d<t&&e.push([d,h,[0,0]])}function e_(e,t,r,i,a,h,d){if(!h||!d)return;const o=h2(kw(i,h),kw(a,d),r);o<t&&e.push([o,h,d])}function gv(e,t,r,i,a=1/0){let h=Math.min(i.distance(e[0],r[0][0]),a);if(h===0)return h;const d=new eD([[0,[0,e.length-1],[0,0]]],tD),o=Iw(r);for(;d.length>0;){const y=d.pop();if(y[0]>=h)continue;const w=y[1],T=t?Cw:Tw;if(mv(w)<=T){if(!dl(w,e.length))return NaN;if(t){const k=vQ(e,w,r,i);if(isNaN(k)||k===0)return k;h=Math.min(h,k)}else for(let k=w[0];k<=w[1];++k){const M=_Q(e[k],r,i);if(h=Math.min(h,M),h===0)return 0}}else{const k=Ew(w,t);nP(d,h,i,e,o,k[0]),nP(d,h,i,e,o,k[1])}}return h}function yv(e,t,r,i,a,h=1/0){let d=Math.min(h,a.distance(e[0],r[0]));if(d===0)return d;const o=new eD([[0,[0,e.length-1],[0,r.length-1]]],tD);for(;o.length>0;){const y=o.pop();if(y[0]>=d)continue;const w=y[1],T=y[2],k=t?Cw:Tw,M=i?Cw:Tw;if(mv(w)<=k&&mv(T)<=M){if(!dl(w,e.length)&&dl(T,r.length))return NaN;let P;if(t&&i)P=gQ(e,w,r,T,a),d=Math.min(d,P);else if(t&&!i){const L=e.slice(w[0],w[1]+1);for(let O=T[0];O<=T[1];++O)if(P=Cu(r[O],L,a),d=Math.min(d,P),d===0)return d}else if(!t&&i){const L=r.slice(T[0],T[1]+1);for(let O=w[0];O<=w[1];++O)if(P=Cu(e[O],L,a),d=Math.min(d,P),d===0)return d}else P=yQ(e,w,r,T,a),d=Math.min(d,P)}else{const P=Ew(w,t),L=Ew(T,i);e_(o,d,a,e,r,P[0],L[0]),e_(o,d,a,e,r,P[0],L[1]),e_(o,d,a,e,r,P[1],L[0]),e_(o,d,a,e,r,P[1],L[1])}}return d}function xQ(e,t){const r=e.geometry(),i=r.flat().map(d=>l2([d.x,d.y],e.canonical));if(r.length===0)return NaN;const a=new u2(i[0][1]);let h=1/0;for(const d of t){switch(d.type){case"Point":h=Math.min(h,yv(i,!1,[d.coordinates],!1,a,h));break;case"LineString":h=Math.min(h,yv(i,!1,d.coordinates,!0,a,h));break;case"Polygon":h=Math.min(h,gv(i,!1,d.coordinates,a,h));break}if(h===0)return h}return h}function wQ(e,t){const r=e.geometry(),i=r.flat().map(d=>l2([d.x,d.y],e.canonical));if(r.length===0)return NaN;const a=new u2(i[0][1]);let h=1/0;for(const d of t){switch(d.type){case"Point":h=Math.min(h,yv(i,!0,[d.coordinates],!1,a,h));break;case"LineString":h=Math.min(h,yv(i,!0,d.coordinates,!0,a,h));break;case"Polygon":h=Math.min(h,gv(i,!0,d.coordinates,a,h));break}if(h===0)return h}return h}function SQ(e,t){const r=e.geometry();if(r.length===0||r[0].length===0)return NaN;const i=fQ(r).map(d=>d.map(o=>o.map(y=>l2([y.x,y.y],e.canonical)))),a=new u2(i[0][0][0][1]);let h=1/0;for(const d of t)for(const o of i){switch(d.type){case"Point":h=Math.min(h,gv([d.coordinates],!1,o,a,h));break;case"LineString":h=Math.min(h,gv(d.coordinates,!0,o,a,h));break;case"Polygon":h=Math.min(h,bQ(o,d.coordinates,a,h));break}if(h===0)return h}return h}function Ox(e){return e.type==="MultiPolygon"?e.coordinates.map(t=>({type:"Polygon",coordinates:t})):e.type==="MultiLineString"?e.coordinates.map(t=>({type:"LineString",coordinates:t})):e.type==="MultiPoint"?e.coordinates.map(t=>({type:"Point",coordinates:t})):[e]}class Fu{constructor(t,r){this.type=kt,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Lm(t[1])){const i=t[1];if(i.type==="FeatureCollection")return new Fu(i,i.features.map(a=>Ox(a.geometry)).flat());if(i.type==="Feature")return new Fu(i,Ox(i.geometry));if("type"in i&&"coordinates"in i)return new Fu(i,Ox(i))}return r.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return xQ(t,this.geometries);if(t.geometryType()==="LineString")return wQ(t,this.geometries);if(t.geometryType()==="Polygon")return SQ(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class fg{constructor(t){this.type=gr,this.key=t}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);const i=t[1];return i==null?r.error("Global state property must be defined."):typeof i!="str
819ing"?r.error(`Global state property must be string, but found ${typeof t[1]} instead.`):new fg(i)}evaluate(t){var r;const i=(r=t.globals)===null||r===void 0?void 0:r.globalState;return!i||Object.keys(i).length===0?null:om(i,this.key)}eachChild(){}outputDefined(){return!1}}const f2={"==":ZJ,"!=":WJ,">":XJ,"<":KJ,">=":JJ,"<=":YJ,array:Ao,at:e2,boolean:Ao,case:n2,coalesce:zm,collator:g0,format:s2,image:o2,in:t2,"index-of":fv,interpolate:va,"interpolate-hcl":va,"interpolate-lab":va,length:a2,let:f0,literal:Nd,match:r2,number:Ao,"number-format":i2,object:Ao,slice:pv,step:m0,string:Ao,"to-boolean":ac,"to-color":ac,"to-number":ac,"to-string":ac,var:p0,within:Ou,distance:Fu,"global-state":fg};class zo{constructor(t,r,i,a){this.name=t,this.type=r,this._evaluate=i,this.args=a}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,r){const i=t[0],a=zo.definitions[i];if(!a)return r.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);const h=Array.isArray(a)?a[0]:a.type,d=Array.isArray(a)?[[a[1],a[2]]]:a.overloads,o=d.filter(([w])=>!Array.isArray(w)||w.length===t.length-1);let y=null;for(const[w,T]of o){y=new d0(r.registry,_v,r.path,null,r.scope);const k=[];let M=!1;for(let P=1;P<t.length;P++){const L=t[P],O=Array.isArray(w)?w[P-1]:w.type,$=y.parse(L,1+k.length,O);if(!$){M=!0;break}k.push($)}if(!M){if(Array.isArray(w)&&w.length!==k.length){y.error(`Expected ${w.length} arguments, but found ${k.length} instead.`);continue}for(let P=0;P<k.length;P++){const L=Array.isArray(w)?w[P]:w.type,O=k[P];y.concat(P+1).checkSubtype(L,O.type)}if(y.errors.length===0)return new zo(i,h,T,k)}}if(o.length===1)r.errors.push(...y.errors);else{const w=(o.length?o:d).map(([k])=>CQ(k)).join(" | "),T=[];for(let k=1;k<t.length;k++){const M=r.parse(t[k],1+T.length);if(!M)return null;T.push(On(M.type))}r.error(`Expected arguments of type ${w}, but found (${T.join(", ")}) instead.`)}return null}static register(t,r){zo.definitions=r;for(const i in r)t[i]=zo}}function iP(e,[t,r,i,a]){t=t.evaluate(e),r=r.evaluate(e),i=i.evaluate(e);const h=a?a.evaluate(e):1,d=Hz(t,r,i,h);if(d)throw new jn(d);return new Fn(t/255,r/255,i/255,h,!1)}function sP(e,t){return e in t}function Fx(e,t){const r=t[e];return typeof r>"u"?null:r}function TQ(e,t,r,i){for(;r<=i;){const a=r+i>>1;if(t[a]===e)return!0;t[a]>e?i=a-1:r=a+1}return!1}function xu(e){return{type:e}}zo.register(f2,{error:[_J,[kr],(e,[t])=>{throw new jn(t.evaluate(e))}],typeof:[kr,[gr],(e,[t])=>On(li(t.evaluate(e)))],"to-rgba":[Os(kt,4),[ya],(e,[t])=>{const[r,i,a,h]=t.evaluate(e).rgb;return[r*255,i*255,a*255,h]}],rgb:[ya,[kt,kt,kt],iP],rgba:[ya,[kt,kt,kt,kt],iP],has:{type:wr,overloads:[[[kr],(e,[t])=>sP(t.evaluate(e),e.properties())],[[kr,Lu],(e,[t,r])=>sP(t.evaluate(e),r.evaluate(e))]]},get:{type:gr,overloads:[[[kr],(e,[t])=>Fx(t.evaluate(e),e.properties())],[[kr,Lu],(e,[t,r])=>Fx(t.evaluate(e),r.evaluate(e))]]},"feature-state":[gr,[kr],(e,[t])=>Fx(t.evaluate(e),e.featureState||{})],properties:[Lu,[],e=>e.properties()],"geometry-type":[kr,[],e=>e.geometryType()],id:[gr,[],e=>e.id()],zoom:[kt,[],e=>e.globals.zoom],"heatmap-density":[kt,[],e=>e.globals.heatmapDensity||0],elevation:[kt,[],e=>e.globals.elevation||0],"line-progress":[kt,[],e=>e.globals.lineProgress||0],accumulated:[gr,[],e=>e.globals.accumulated===void 0?null:e.globals.accumulated],"+":[kt,xu(kt),(e,t)=>{let r=0;for(const i of t)r+=i.evaluate(e);return r}],"*":[kt,xu(kt),(e,t)=>{let r=1;for(const i of t)r*=i.evaluate(e);return r}],"-":{type:kt,overloads:[[[kt,kt],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[kt],(e,[t])=>-t.evaluate(e)]]},"/":[kt,[kt,kt],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[kt,[kt,kt],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[kt,[],()=>Math.LN2],pi:[kt,[],()=>Math.PI],e:[kt,[],()=>Math.E],"^":[kt,[kt,kt],(e,[t,r])=>Math.pow(t.evaluate(e),r.evaluate(e))],sqrt:[kt,[kt],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[kt,[kt],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[kt,[kt],(e,[t])=>Math.log(t.evaluate(e))],log2:[kt,[kt],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[kt,[kt],(e,[t])=>Math.sin(t.evaluate(e))],cos:[kt,[kt],(e,[t])=>Math.cos(t.evaluate(e))],tan:[kt,[kt],(e,[t])=>Math.tan(t.evaluate(e))],asin:[kt,[kt],(e,[t])=>Math.asin(t.evaluate(e))],acos:[kt,[kt],(e,[t])=>Math.acos(t.evaluate(e))],atan:[kt,[kt],(e,[t])=>Math.atan(t.evaluate(e))],min:[kt,xu(kt),(e,t)=>Math.min(...t.map(r=>r.evaluate(e)))],max:[kt,xu(kt),(e,t)=>Math.max(...t.map(r=>r.evaluate(e)))],abs:[kt,[kt],(e,[t])=>Math.abs(t.evaluate(e))],round:[kt,[kt],(e,[t])=>{const r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[kt,[kt],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[kt,[kt],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[wr,[kr,gr],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[wr,[gr],(e,[t])=>e.id()===t.value],"filter-type-==":[wr,[kr],(e,[t])=>e.geometryType()===t.value],"filter-<":[wr,[kr,gr],(e,[t,r])=>{const i=e.properties()[t.value],a=r.value;return typeof i==typeof a&&i<a}],"filter-id-<":[wr,[gr],(e,[t])=>{const r=e.id(),i=t.value;return typeof r==typeof i&&r<i}],"filter->":[wr,[kr,gr],(e,[t,r])=>{const i=e.properties()[t.value],a=r.value;return typeof i==typeof a&&i>a}],"filter-id->":[wr,[gr],(e,[t])=>{const r=e.id(),i=t.value;return typeof r==typeof i&&r>i}],"filter-<=":[wr,[kr,gr],(e,[t,r])=>{const i=e.properties()[t.value],a=r.value;return typeof i==typeof a&&i<=a}],"filter-id-<=":[wr,[gr],(e,[t])=>{const r=e.id(),i=t.value;return typeof r==typeof i&&r<=i}],"filter->=":[wr,[kr,gr],(e,[t,r])=>{const i=e.properties()[t.value],a=r.value;return typeof i==typeof a&&i>=a}],"filter-id->=":[wr,[gr],(e,[t])=>{const r=e.id(),i=t.value;return typeof r==typeof i&&r>=i}],"filter-has":[wr,[gr],(e,[t])=>t.value in e.properties()],"filter-has-id":[wr,[],e=>e.id()!==null&&e.id()!==void 0],"filter-type-in":[wr,[Os(kr)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[wr,[Os(gr)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[wr,[kr,Os(gr)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[wr,[kr,Os(gr)],(e,[t,r])=>TQ(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:wr,overloads:[[[wr,wr],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[xu(wr),(e,t)=>{for(const r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:wr,overloads:[[[wr,wr],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[xu(wr),(e,t)=>{for(const r of t)if(r.evaluate(e))return!0;return!1}]]}
819,"!":[wr,[wr],(e,[t])=>!t.evaluate(e)],"is-supported-script":[wr,[kr],(e,[t])=>{const r=e.globals&&e.globals.isSupportedScript;return r?r(t.evaluate(e)):!0}],upcase:[kr,[kr],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[kr,[kr],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[kr,xu(gr),(e,t)=>t.map(r=>am(r.evaluate(e))).join("")],"resolved-locale":[kr,[a0],(e,[t])=>t.evaluate(e).resolvedLocale()]});function CQ(e){return Array.isArray(e)?`(${e.map(On).join(", ")})`:`(${On(e.type)}...)`}function _v(e){if(e instanceof p0)return _v(e.boundExpression);if(e instanceof zo&&e.name==="error"||e instanceof g0||e instanceof Ou||e instanceof Fu||e instanceof fg)return!1;const t=e instanceof ac||e instanceof Ao;let r=!0;return e.eachChild(i=>{t?r=r&&_v(i):r=r&&i instanceof Nd}),r?_0(e)&&v0(e,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"]):!1}function _0(e){if(e instanceof zo&&(e.name==="get"&&e.args.length===1||e.name==="feature-state"||e.name==="has"&&e.args.length===1||e.name==="properties"||e.name==="geometry-type"||e.name==="id"||/^filter-/.test(e.name))||e instanceof Ou||e instanceof Fu)return!1;let t=!0;return e.eachChild(r=>{t&&!_0(r)&&(t=!1)}),t}function Om(e){if(e instanceof zo&&e.name==="feature-state")return!1;let t=!0;return e.eachChild(r=>{t&&!Om(r)&&(t=!1)}),t}function v0(e,t){if(e instanceof zo&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild(i=>{r&&!v0(i,t)&&(r=!1)}),r}function Pw(e){return{result:"success",value:e}}function ud(e){return{result:"error",value:e}}function vv(e){return e["property-type"]==="data-driven"||e["property-type"]==="cross-faded-data-driven"}function rD(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function nD(e){return!!e.expression&&e.expression.interpolated}function Dr(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":e===null?"null":typeof e}function p2(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&li(e)===Lu}class EQ{constructor(t,r){this.expression=t,this._warningHistory={},this._evaluator=new Zz,this._defaultValue=r?PQ(r):null,this._enumValues=r&&r.type==="enum"?r.values:null}evaluateWithoutErrorHandling(t,r,i,a,h,d){return this._evaluator.globals=t,this._evaluator.feature=r,this._evaluator.featureState=i,this._evaluator.canonical=a,this._evaluator.availableImages=h||null,this._evaluator.formattedSection=d,this.expression.evaluate(this._evaluator)}evaluate(t,r,i,a,h,d){this._evaluator.globals=t,this._evaluator.feature=r||null,this._evaluator.featureState=i||null,this._evaluator.canonical=a,this._evaluator.availableImages=h||null,this._evaluator.formattedSection=d||null;try{const o=this.expression.evaluate(this._evaluator);if(o==null||typeof o=="number"&&o!==o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new jn(`Expected value to be one of ${Object.keys(this._enumValues).map(y=>JSON.stringify(y)).join(", ")}, but found ${JSON.stringify(o)} instead.`);return o}catch(o){return this._warningHistory[o.message]||(this._warningHistory[o.message]=!0,typeof console<"u"&&console.warn(o.message)),this._defaultValue}}}function iD(e){return Array.isArray(e)&&e.length>0&&typeof e[0]=="string"&&e[0]in f2}function sD(e,t){const r=new d0(f2,_v,[],t?IQ(t):void 0),i=r.parse(e,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return i?Pw(new EQ(i,t)):ud(r.errors)}class oP{constructor(t,r){this.kind=t,this._styleExpression=r,this.isStateDependent=t!=="constant"&&!Om(r.expression),this.globalStateRefs=m2(r.expression)}evaluateWithoutErrorHandling(t,r,i,a,h,d){return this._styleExpression.evaluateWithoutErrorHandling(t,r,i,a,h,d)}evaluate(t,r,i,a,h,d){return this._styleExpression.evaluate(t,r,i,a,h,d)}}class aP{constructor(t,r,i,a){this.kind=t,this.zoomStops=i,this._styleExpression=r,this.isStateDependent=t!=="camera"&&!Om(r.expression),this.globalStateRefs=m2(r.expression),this.interpolationType=a}evaluateWithoutErrorHandling(t,r,i,a,h,d){return this._styleExpression.evaluateWithoutErrorHandling(t,r,i,a,h,d)}evaluate(t,r,i,a,h,d){return this._styleExpression.evaluate(t,r,i,a,h,d)}interpolationFactor(t,r,i){return this.interpolationType?va.interpolationFactor(this.interpolationType,t,r,i
819):0}}function kQ(e,t){const r=sD(e,t);if(r.result==="error")return r;const i=r.value.expression,a=_0(i);if(!a&&!vv(t))return ud([new ha("","data expressions not supported")]);const h=v0(i,["zoom"]);if(!h&&!rD(t))return ud([new ha("","zoom expressions not supported")]);const d=x_(i);if(!d&&!h)return ud([new ha("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(d instanceof ha)return ud([d]);if(d instanceof va&&!nD(t))return ud([new ha("",'"interpolate" expressions cannot be used with this property')]);if(!d)return Pw(a?new oP("constant",r.value):new oP("source",r.value));const o=d instanceof va?d.interpolation:void 0;return Pw(a?new aP("camera",r.value,d.labels,o):new aP("composite",r.value,d.labels,o))}function x_(e){let t=null;if(e instanceof f0)t=x_(e.result);else if(e instanceof zm){for(const r of e.args)if(t=x_(r),t)break}else(e instanceof m0||e instanceof va)&&e.input instanceof zo&&e.input.name==="zoom"&&(t=e);return t instanceof ha||e.eachChild(r=>{const i=x_(r);i instanceof ha?t=i:!t&&i?t=new ha("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&i&&t!==i&&(t=new ha("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function m2(e,t=new Set){return e instanceof fg&&t.add(e.key),e.eachChild(r=>{m2(r,t)}),t}function IQ(e){const t={color:ya,string:kr,number:kt,enum:kr,boolean:wr,formatted:l0,padding:c0,numberArray:u0,colorArray:Am,projectionDefinition:o0,resolvedImage:hg,variableAnchorOffsetCollection:h0};return e.type==="array"?Os(t[e.value]||gr,e.length):t[e.type]}function PQ(e){if(e.type==="color"&&p2(e.default))return new Fn(0,0,0,0);switch(e.type){case"color":return Fn.parse(e.default)||null;case"padding":return Ro.parse(e.default)||null;case"numberArray":return Lo.parse(e.default)||null;case"colorArray":return Bs.parse(e.default)||null;case"variableAnchorOffsetCollection":return _a.parse(e.default)||null;case"projectionDefinition":return Po.parse(e.default)||null;default:return e.default===void 0?null:e.default}}function oD(e){if(e===!0||e===!1)return!0;if(!Array.isArray(e)||e.length===0)return!1;switch(e[0]){case"has":return e.length>=2&&e[1]!=="$id"&&e[1]!=="$type";case"in":return e.length>=3&&(typeof e[1]!="string"||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return e.length!==3||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(const t of e.slice(1))if(!oD(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}function aD(e){const t=e.key,r=e.value;return r?[new Ct(t,r,"constants have been deprecated as of v8")]:[]}function Gn(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function qu(e){if(Array.isArray(e))return e.map(qu);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){const t={};for(const r in e)t[r]=qu(e[r]);return t}return Gn(e)}function no(e){const t=e.key,r=e.value,i=e.valueSpec||{},a=e.objectElementValidators||{},h=e.style,d=e.styleSpec,o=e.validateSpec;let y=[];const w=Dr(r);if(w!=="object")return[new Ct(t,r,`object expected, ${w} found`)];for(const T in r){const k=T.split(".")[0],M=om(i,k)||i["*"];let P;if(om(a,k))P=a[k];else if(om(i,k))P=o;else if(a["*"])P=a["*"];else if(i["*"])P=o;else{y.push(new Ct(t,r[T],`unknown property "${T}"`));continue}y=y.concat(P({key:(t&&`${t}.`)+T,value:r[T],valueSpec:M,style:h,styleSpec:d,object:r,objectKey:T,validateSpec:o},r))}for(const T in i)a[T]||i[T].required&&i[T].default===void 0&&r[T]===void 0&&y.push(new Ct(t,r,`missing required property "${T}"`));return y}function g2(e){const t=e.value,r=e.valueSpec,i=e.validateSpec,a=e.style,h=e.styleSpec,d=e.key,o=e.arrayElementValidator||i;if(Dr(t)!=="array")return[new Ct(d,t,`array expected, ${Dr(t)} found`)];if(r.length&&t.length!==r.length)return[new Ct(d,t,`array length ${r.length} expected, length ${t.length} found`)];if(r["min-length"]&&t.length<r["min-length"])return[new Ct(d,t,`array length at least ${r["min-length"]} expected, length ${t.length} found`)];let y={type:r.value,values:r.values};h.$version<7&&(y.function=r.function),Dr(r.value)==="object"&&(y=r.value);let w=[];for(let T=0;T<t.length;T++)w=w.concat(o({array:t,arrayIndex:T,value:t[T],valueSpec:y,validateSpec:e.validateSpec,style:a,styleSpec:h,key:`${d}[${T}]`}));return w}function b0(e){const t=e.key,r=e.value,i=e.valueSpec;let a=Dr(r);return a==="number"&&r!==r&&(a="NaN"),a!=="number"?[new Ct(t,r,`number expected, ${a} found`)]:"minimum"in i&&r<i.minimum?[new Ct(t,r,`${r} is less than the minimum value ${i.minimum}`)]:"maximum"in i&&r>i.maximum?[new Ct(t,r,`${r} is greater than the maximum value ${i.maximum}`)]:[]}function lD(e){const t=e.valueSpec,r=Gn(e.value.type);let i,a={},h,d;const o=r!=="categorical"&&e.value.property===void 0,y=!o,w=Dr(e.value.stops)==="array"&&Dr(e.value.stops[0])==="array"&&Dr(e.value.stops[0][0])==="object",T=no({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:k,default:L}});return r==="identity"&&o&&T.push(new Ct(e.key,e.value,'missing required property "property"')),r!=="identity"&&!e.value.stops&&T.push(new Ct(e.key,e.value,'missing required property "stops"')),r==="exponential"&&e.valueSpec.expression&&!nD(e.valueSpec)&&T.push(new Ct(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(y&&!vv(e.valueSpec)?T.push(new Ct(e.key,e.value,"property functions not supported")):o&&!rD(e.valueSpec)&&T.push(new Ct(e.key,e.value,"zoom functions not supported"))),(r==="categorical"||w)&&e.value.property===void 0&&T.push(new Ct(e.key,e.value,'"property" property is required')),T;function k(O){if(r==="identity")return[new Ct(O.key,O.value,'identity function may not have a "stops" property')];let $=[];const Z=O.value;return $=$.concat(g2({key:O.key,value:Z,valueSpec:O.valueSpec,validateSpec:O.validateSpec,style:O.style,styleSpec:O.styleSpec,arrayElementValidator:M})),Dr(Z)==="array"&&Z.length===0&&$.push(new Ct(O.key,Z,"array must have at least one stop")),$}function M(O){let $=[];const Z=O.value,J=O.key;if(Dr(Z)!=="array")return[new Ct(J,Z,`array expected, ${Dr(Z)} found`)];if(Z.length!==2)return[new Ct(J,Z,`array length 2 expected, length ${Z.length} found`)];if(w){if(Dr(Z[0])!=="object")return[new Ct(J,Z,`object expected, ${Dr(Z[0])} found`)];if(Z[0].zoom===void 0)return[new Ct(J,Z,"object stop key must have zoom")];if(Z[0].value===void 0)return[new Ct(J,Z,"object stop key must have value")];if(d&&d>Gn(Z[0].zoom))return[new Ct(J,Z[0].zoom,"stop zoom values must appear in ascending order")];Gn(Z[0].zoom)!==d&&(d=Gn(Z[0].zoom),h=void 0,a={}),$=$.concat(no({key:`${J}[0]`,value:Z[0],valueSpec:{zoom:{}},validateSpec:O.validateSpec,style:O.style,styleSpec:O.styleSpec,objectElementValidators:{zoom:b0,value:P}}))}else $=$.concat(P({key:`${J}[0]`,value:Z[0],validateSpec:O.validateSpec,style:O.style,styleSpec:O.styleSpec},Z));return iD(qu(Z[1]))?$.concat([new Ct(`${J}[1]`,Z[1],"expressions are not allowed in function stops.")]):$.concat(O.validateSpec({key:`${J}[1]`,value:Z[1],valueSpec:t,validateSpec:O.validateSpec,style:O.style,styleSpec:O.styleSpec}))}function P(O,$){const Z=Dr(O.value),J=Gn(O.value),H=O.value!==null?O.value:$;if(!i)i=Z;else if(Z!==i)return[new Ct(O.key,H,`${Z} stop domain type must match previous stop domain type ${i}`)];
819if(Z!=="number"&&Z!=="string"&&Z!=="boolean")return[new Ct(O.key,H,"stop domain value must be a number, string, or boolean")];if(Z!=="number"&&r!=="categorical"){let U=`number expected, ${Z} found`;return vv(t)&&r===void 0&&(U+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ct(O.key,H,U)]}return r==="categorical"&&Z==="number"&&(!isFinite(J)||Math.floor(J)!==J)?[new Ct(O.key,H,`integer expected, found ${J}`)]:r!=="categorical"&&Z==="number"&&h!==void 0&&J<h?[new Ct(O.key,H,"stop domain values must appear in ascending order")]:(h=J,r==="categorical"&&J in a?[new Ct(O.key,H,"stop domain values must be unique")]:(a[J]=!0,[]))}function L(O){return O.validateSpec({key:O.key,value:O.value,valueSpec:t,validateSpec:O.validateSpec,style:O.style,styleSpec:O.styleSpec})}}function jd(e){const t=(e.expressionContext==="property"?kQ:sD)(qu(e.value),e.valueSpec);if(t.result==="error")return t.value.map(i=>new Ct(`${e.key}${i.key}`,e.value,i.message));const r=t.value.expression||t.value._styleExpression.expression;if(e.expressionContext==="property"&&e.propertyKey==="text-font"&&!r.outputDefined())return[new Ct(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if(e.expressionContext==="property"&&e.propertyType==="layout"&&!Om(r))return[new Ct(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if(e.expressionContext==="filter"&&!Om(r))return[new Ct(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&e.expressionContext.indexOf("cluster")===0){if(!v0(r,["zoom","feature-state"]))return[new Ct(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(e.expressionContext==="cluster-initial"&&!_0(r))return[new Ct(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function AQ(e){const t=e.value,r=e.key,i=Dr(t);return i!=="boolean"?[new Ct(r,t,`boolean expected, ${i} found`)]:[]}function Aw(e){const t=e.key,r=e.value,i=Dr(r);return i!=="string"?[new Ct(t,r,`color expected, ${i} found`)]:Fn.parse(String(r))?[]:[new Ct(t,r,`color expected, "${r}" found`)]}function Fm(e){const t=e.key,r=e.value,i=e.valueSpec,a=[];return Array.isArray(i.values)?i.values.indexOf(Gn(r))===-1&&a.push(new Ct(t,r,`expected one of [${i.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(i.values).indexOf(Gn(r))===-1&&a.push(new Ct(t,r,`expected one of [${Object.keys(i.values).join(", ")}], ${JSON.stringify(r)} found`)),a}function y2(e){return oD(qu(e.value))?jd(dv({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):cD(e)}function cD(e){const t=e.value,r=e.key;if(Dr(t)!=="array")return[new Ct(r,t,`array expected, ${Dr(t)} found`)];const i=e.styleSpec;let a,h=[];if(t.length<1)return[new Ct(r,t,"filter array must have at least 1 element")];switch(h=h.concat(Fm({key:`${r}[0]`,value:t[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),Gn(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&Gn(t[1])==="$type"&&h.push(new Ct(r,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&h.push(new Ct(r,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>
819=2&&(a=Dr(t[1]),a!=="string"&&h.push(new Ct(`${r}[1]`,t[1],`string expected, ${a} found`)));for(let d=2;d<t.length;d++)a=Dr(t[d]),Gn(t[1])==="$type"?h=h.concat(Fm({key:`${r}[${d}]`,value:t[d],valueSpec:i.geometry_type,style:e.style,styleSpec:e.styleSpec})):a!=="string"&&a!=="number"&&a!=="boolean"&&h.push(new Ct(`${r}[${d}]`,t[d],`string, number, or boolean expected, ${a} found`));break;case"any":case"all":case"none":for(let d=1;d<t.length;d++)h=h.concat(cD({key:`${r}[${d}]`,value:t[d],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":a=Dr(t[1]),t.length!==2?h.push(new Ct(r,t,`filter array for "${t[0]}" operator must have 2 elements`)):a!=="string"&&h.push(new Ct(`${r}[1]`,t[1],`string expected, ${a} found`));break}return h}function uD(e,t){const r=e.key,i=e.validateSpec,a=e.style,h=e.styleSpec,d=e.value,o=e.objectKey,y=h[`${t}_${e.layerType}`];if(!y)return[];const w=o.match(/^(.*)-transition$/);if(t==="paint"&&w&&y[w[1]]&&y[w[1]].transition)return i({key:r,value:d,valueSpec:h.transition,style:a,styleSpec:h});const T=e.valueSpec||y[o];if(!T)return[new Ct(r,d,`unknown property "${o}"`)];let k;if(Dr(d)==="string"&&vv(T)&&!T.tokens&&(k=/^{([^}]+)}$/.exec(d)))return[new Ct(r,d,`"${o}" does not support interpolation syntax
820Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(k[1])} }\`.`)];const M=[];return e.layerType==="symbol"&&(o==="text-field"&&a&&!a.glyphs&&M.push(new Ct(r,d,'use of "text-field" requires a style "glyphs" property')),o==="text-font"&&p2(qu(d))&&Gn(d.type)==="identity"&&M.push(new Ct(r,d,'"text-font" does not support identity functions'))),M.concat(i({key:e.key,value:d,valueSpec:T,style:a,styleSpec:h,expressionContext:"property",propertyType:t,propertyKey:o}))}function hD(e){return uD(e,"paint")}function dD(e){return uD(e,"layout")}function fD(e){let t=[];const r=e.value,i=e.key,a=e.style,h=e.styleSpec;if(Dr(r)!=="object")return[new Ct(i,r,`object expected, ${Dr(r)} found`)];!r.type&&!r.ref&&t.push(new Ct(i,r,'either "type" or "ref" is required'));let d=Gn(r.type);const o=Gn(r.ref);if(r.id){const y=Gn(r.id);for(let w=0;w<e.arrayIndex;w++){const T=a.layers[w];Gn(T.id)===y&&t.push(new Ct(i,r.id,`duplicate layer id "${r.id}", previously used at line ${T.id.__line__}`))}}if("ref"in r){["type","source","source-layer","filter","layout"].forEach(w=>{w in r&&t.push(new Ct(i,r[w],`"${w}" is prohibited for ref layers`))});let y;a.layers.forEach(w=>{Gn(w.id)===o&&(y=w)}),y?y.ref?t.push(new Ct(i,r.ref,"ref cannot reference another ref layer")):d=Gn(y.type):t.push(new Ct(i,r.ref,`ref layer "${o}" not found`))}else if(d!=="background")if(!r.source)t.push(new Ct(i,r,'missing required property "source"'));else{const y=a.sources&&a.sources[r.source],w=y&&Gn(y.type);y?w==="vector"&&d==="raster"?t.push(new Ct(i,r.source,`layer "${r.id}" requires a raster source`)):w!=="raster-dem"&&d==="hillshade"?t.push(new Ct(i,r.source,`layer "${r.id}" requires a raster-dem source`)):w!=="raster-dem"&&d==="color-relief"?t.push(new Ct(i,r.source,`layer "${r.id}" requires a raster-dem source`)):w==="raster"&&d!=="raster"?t.push(new Ct(i,r.source,`layer "${r.id}" requires a vector source`)):w==="vector"&&!r["source-layer"]?t.push(new Ct(i,r,`layer "${r.id}" must specify a "source-layer"`)):w==="raster-dem"&&d!=="hillshade"&&d!=="color-relief"?t.push(new Ct(i,r.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):d==="line"&&r.paint&&r.paint["line-gradient"]&&(w!=="geojson"||!y.lineMetrics)&&t.push(new Ct(i,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new Ct(i,r.source,`source "${r.source}" not found`))}return t=t.concat(no({key:i,value:r,valueSpec:h.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*"(){return[]},type(){return e.validateSpec({key:`${i}.type`,value:r.type,valueSpec:h.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:r,objectKey:"type"})},filter:y2,layout(y){return no({layer:r,key:y.key,value:y.value,style:y.style,styleSpec:y.styleSpec,validateSpec:y.validateSpec,objectElementValidators:{"*"(w){return dD(dv({layerType:d},w))}}})},paint(y){return no({layer:r,key:y.key,value:y.value,style:y.style,styleSpec:y.styleSpec,validateSpec:y.validateSpec,objectElementValidators:{"*"(w){return hD(dv({layerType:d},w))}}})}}})),t}function Gu(e){const t=e.value,r=e.key,i=Dr(t);return i!=="string"?[new Ct(r,t,`string expected, ${i} found`)]:[]}function MQ(e){var t;const r=(t=e.sourceName)!==null&&t!==void 0?t:"",i=e.value,a=e.styleSpec,h=a.source_raster_dem,d=e.style;let o=[];const y=Dr(i);if(i===void 0)return o;if(y!=="object")return o.push(new Ct("source_raster_dem",i,`object expected, ${y} found`)),o;const w=Gn(i.encoding)==="custom",T=["redFactor","greenFactor","blueFactor","baseShift"],k=e.value.encoding?`"${e.value.encoding}"`:"Default";for(const M in i)!w&&T.includes(M)?o.push(new Ct(M,i[M],`In "${r}": "${M}" is only valid when "encoding" is set to "custom". ${k} encoding found`)):h[M]?o=o.concat(e.validateSpec({key:M,value:i[M],valueSpec:h[M],validateSpec:e.validateSpec,style:d,styleSpec:a})):o.push(new Ct(M,i[M],`unknown property "${M}"`));return o}const lP={promoteId:RQ};function pD(e){const t=e.value,r=e.key,i=e.styleSpec,a=e.style,h=e.validateSpec;if(!t.type)return[new Ct(r,t,'"type" is required')];const d=Gn(t.type);let o;switch(d){case"vector":case"raster":return o=no({key:r,value:t,valueSpec:i[`source_${d.replace("-","_")}`],style:e.style,styleSpec:i,objectElementValidators:lP,validateSpec:h}),o;case"raster-dem":return o=MQ({sourceName:r,value:t,style:e.style,styleSpec:i,validateSpec:h}),o;case"geojson":if(o=no({key:r,value:t,valueSpec:i.source_geojson,style:a,styleSpec:i,validateSpec:h,objectElementValidators:lP}),t.cluster)for(const y in t.clusterProperties){const[w,T]=t.clusterProperties[y],k=typeof w=="string"?[w,["accumulated"],["get",y]]:w;
820o.push(...jd({key:`${r}.${y}.map`,value:T,expressionContext:"cluster-map"})),o.push(...jd({key:`${r}.${y}.reduce`,value:k,expressionContext:"cluster-reduce"}))}return o;case"video":return no({key:r,value:t,valueSpec:i.source_video,style:a,validateSpec:h,styleSpec:i});case"image":return no({key:r,value:t,valueSpec:i.source_image,style:a,validateSpec:h,styleSpec:i});case"canvas":return[new Ct(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Fm({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function RQ({key:e,value:t}){if(Dr(t)==="string")return Gu({key:e,value:t});{const r=[];for(const i in t)r.push(...Gu({key:`${e}.${i}`,value:t[i]}));return r}}function mD(e){const t=e.value,r=e.styleSpec,i=r.light,a=e.style;let h=[];const d=Dr(t);if(t===void 0)return h;if(d!=="object")return h=h.concat([new Ct("light",t,`object expected, ${d} found`)]),h;for(const o in t){const y=o.match(/^(.*)-transition$/);y&&i[y[1]]&&i[y[1]].transition?h=h.concat(e.validateSpec({key:o,value:t[o],valueSpec:r.transition,validateSpec:e.validateSpec,style:a,styleSpec:r})):i[o]?h=h.concat(e.validateSpec({key:o,value:t[o],valueSpec:i[o],validateSpec:e.validateSpec,style:a,styleSpec:r})):h=h.concat([new Ct(o,t[o],`unknown property "${o}"`)])}return h}function gD(e){const t=e.value,r=e.styleSpec,i=r.sky,a=e.style,h=Dr(t);if(t===void 0)return[];if(h!=="object")return[new Ct("sky",t,`object expected, ${h} found`)];let d=[];for(const o in t)i[o]?d=d.concat(e.validateSpec({key:o,value:t[o],valueSpec:i[o],style:a,styleSpec:r})):d=d.concat([new Ct(o,t[o],`unknown property "${o}"`)]);return d}function yD(e){const t=e.value,r=e.styleSpec,i=r.terrain,a=e.style;let h=[];const d=Dr(t);if(t===void 0)return h;if(d!=="object")return h=h.concat([new Ct("terrain",t,`object expected, ${d} found`)]),h;for(const o in t)i[o]?h=h.concat(e.validateSpec({key:o,value:t[o],valueSpec:i[o],validateSpec:e.validateSpec,style:a,styleSpec:r})):h=h.concat([new Ct(o,t[o],`unknown property "${o}"`)]);return h}function LQ(e){return Gu(e).length===0?[]:jd(e)}function zQ(e){return Gu(e).length===0?[]:jd(e)}function DQ(e){const t=e.key,r=e.value;if(Dr(r)==="array"){if(r.length<1||r.length>4)return[new Ct(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];const i={type:"number"};let a=[];for(let h=0;h<r.length;h++)a=a.concat(e.validateSpec({key:`${t}[${h}]`,value:r[h],validateSpec:e.validateSpec,valueSpec:i}));return a}else return b0({key:t,value:r,valueSpec:{}})}function OQ(e){const t=e.key,r=e.value;if(Dr(r)==="array"){const i={type:"number"};if(r.length<1)return[new Ct(t,r,"array length at least 1 expected, length 0 found")];let a=[];for(let h=0;h<r.length;h++)a=a.concat(e.validateSpec({key:`${t}[${h}]`,value:r[h],validateSpec:e.validateSpec,valueSpec:i}));return a}else return b0({key:t,value:r,valueSpec:{}})}function FQ(e){const t=e.key,r=e.value;if(Dr(r)==="array"){if(r.length<1)return[new Ct(t,r,"array length at least 1 expected, length 0 found")];let i=[];for(let a=0;a<r.length;a++)i=i.concat(Aw({key:`${t}[${a}]`,value:r[a]}));return i}else return Aw({key:t,value:r})}function BQ(e){const t=e.key,r=e.value,i=Dr(r),a=e.styleSpec;if(i!=="array"||r.length<1||r.length%2!==0)return[new Ct(t,r,"variableAnchorOffsetCollection requires a non-empty array of even length")];let h=[];for(let d=0;d<r.length;d+=2)h=h.concat(Fm({key:`${t}[${d}]`,value:r[d],valueSpec:a.layout_symbol["text-anchor"]})),h=h.concat(g2({key:`${t}[${d+1}]`,value:r[d+1],valueSpec:{length:2,value:"number"},validateSpec:e.validateSpec,style:e.style,styleSpec:a}));return h}function _D(e){let t=[];const r=e.value,i=e.key;if(Array.isArray(r)){const a=[],h=[];for(const d in r){r[d].id&&a.includes(r[d].id)&&t.push(new Ct(i,r,`all the sprites' ids must be unique, but ${r[d].id} is duplicated`)),a.push(r[d].id),r[d].url&&h.includes(r[d].url)&&t.push(new Ct(i,r,`all the sprites' URLs must be unique, but ${r[d].url} is duplicated`)),h.push(r[d].url);const o={id:{type:"string",required:!0},url:{type:"string",required:!0}};t=t.concat(no({key:`${i}[${d}]`,value:r[d],valueSpec:o,validateSpec:e.validateSpec}))}return t}else return Gu({key:i,value:r})}function NQ(e){const t=e.value,r=e.styleSpec,i=r.projection,a=e.style,h=Dr(t);if(t===void 0)return[];if(h!=="object")return[new Ct("projection",t,`object expected, ${h} found`)];let d=[];for(const o in t)i[o]?d=d.concat(e.validateSpec({key:o,value:t[o],valueSpec:i[o],style:a,styleSpec:r})):d=d.concat([new Ct(o,t[o],`unknown property "${o}"`)]);return d}function jQ(e){const t=e.key;let r=e.value;r=r instanceof String?r.valueOf():r;const i=Dr(r);return i==="array"&&!UQ(r)&&!$Q(r)?[new Ct(t,r,`projection expected, invalid array ${JSON.stringify(r)} found`)]:["array","string"].includes(i)?[]:[new Ct(t,r,`projection expected, invalid type "${i}" found`)]}function $Q(e){return!!["interpolate","step","literal"].includes(e[0])}function UQ(e){return Array.isArray(e)&&e.length===3&&typeof e[0]=="string"&&typeof e[1]=="string"&&typeof e[2]=="number"}function VQ(e){return!!e&&e.constructor===Object}function vD(e){return VQ(e.value)?[]:[new Ct(e.key,e.value,`object expected, ${Dr(e.value)} found`)]}const cP={"*"(){return[]},array:g2,boolean:AQ,number:b0,color:Aw,constants:aD,enum:Fm,filter:y2,function:lD,layer:fD,object:no,source:pD,light:mD,sky:gD,terrain:yD,projection:NQ,projectionDefinition:jQ,string:Gu,formatted:LQ,resolvedImage:zQ,padding:DQ,numberArray:OQ,colorArray:FQ,variableAnchorOffsetCollection:BQ,sprite:_D,state:vD};function bv(e){const t=e.value,r=e.valueSpec,i=e.styleSpec;return e.validateSpec=bv,r.expression&&p2(Gn(t))?lD(e):r.expression&&iD(qu(t))?jd(e):r.type&&cP[r.type]?cP[r.type](e):no(dv({},e,{valueSpec:r.type?i[r.type]:r}))}function bD(e){const t=e.value,r=e.key,i=Gu(e);return i.length||(t.indexOf("{fontstack}")===-1&&i.push(new Ct(r,t,'"glyphs" url must include a "{fontstack}" token')),t.indexOf("{range}")===-1&&i.push(new Ct(r,t,'"glyphs" url must include a "{range}" token'))),i}function Vs(e,t=yJ){let r=[];return r=r.concat(bv({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,validateSpec:bv,objectElementValidators:{glyphs:bD,"*"(){return[]}}})),e.constants&&(r=r.concat(aD({key:"constants",value:e.constants}))),xD(r)}Vs.source=Go(qo(pD));Vs.sprite=Go(qo(_D));Vs.glyphs=Go(qo(bD));Vs.light=Go(qo(mD));Vs.sky=Go(qo(gD));Vs.terrain=Go(qo(yD));Vs.state=Go(qo(vD));Vs.layer=Go(qo(fD));Vs.filter=Go(qo(y2));Vs.paintProperty=Go(qo(hD));Vs.layoutProperty=Go(qo(dD));function qo(e){return function(t){return e({...t,validateSpec:bv})}}function xD(e){return[].concat(e).sort((t,r)=>t.line-r.line)}function Go(e){return function(...t){return xD(e.apply(this,t))}}function uP(e){if(!e)return{style:Ru[sm[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),requiresUrlMonitoring:!1,isFallback:!0};if(typeof e=="string"){const t=GQ(e);return t.isValidStyle?{style:t.styleObject,requiresUrlMonitoring:!1,isFallback:!1}:t.isValidJSON?{style:Ru[sm[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),requiresUrlMonitoring:!1,isFallback:!0}:e.startsWith("http")?{style:e,requiresUrlMonitoring:!0,isFallback:!1}:e.toLowerCase().includes(".json")?{style:qQ(e),requiresUrlMonitoring:!0,isFallback:!1}:{style:Lz(e),requiresUrlMonitoring:!0,isFallback:!1}}return e instanceof zz?{style:e.getExpandedStyleURL(),requiresUrlMonitoring:!1,isFallback:!1}:e instanceof Dz?{style:e.getDefaultVariant().getExpandedStyleURL(),requiresUrlMonitoring:!1,isFallback:!1}:Vs(e).length===0?{style:e,requiresUrlMonitoring:!1,isFallback:!1}:{style:Ru[sm[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),requiresUrlMonitoring:!1,isFallback:!0}}function qQ(e){try{return new URL(e).href}catch{}return new URL(e,location.origin).href}function GQ(e){try{const t=JSON.parse(e),r=Vs(t);return{isValidJSON:!0,isValidStyle:r.length===0,styleObject:r.length===0?t:null}}catch{return{isValidJSON:!1,isValidStyle:!1,styleObject:null}}}function sl(e,t,r){const i=window.document.createElement(e);return t!==void 0&&(i.className=t),r&&r.appendChild(i),i}function _2(e){e.parentNode&&e.parentNode.removeChild(e)}class HQ{constructor(){yr(this,"_map"),yr(this,"_container"),yr(this,"_terrainButton"),mY(["_toggleTerrain","_updateTerrainIcon"],this)}onAdd(t){return this._map=t,this._container=sl("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=sl("button","maplibregl-ctrl-terrain",this._container),sl("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.t
820ype="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){_2(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}_toggleTerrain(){this._map.hasTerrain()?this._map.disableTerrain():this._map.enableTerrain(),this._updateTerrainIcon()}_updateTerrainIcon(){this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.hasTerrain()?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))}}class ZQ extends EY{constructor(t={}){super({showCompass:t.showCompass??!0,showZoom:t.showZoom??!0,visualizePitch:t.visualizePitch??!0}),yr(this,"_rotateCompassArrow",()=>{const r=this._map.getBearing(),i=this._map.getPitch(),a=this.options.visualizePitch?`scale(${Math.min(1.5,1/Math.cos(i*(Math.PI/180))**.5)}) rotateX(${Math.min(70,i)}deg) rotateZ(${-r}deg)`:`rotate(${-r}deg)`;this._compassIcon.style.transform=a}),this._compass&&(this._compass.removeEventListener("click",this._compass.clickFunction),this._compass.addEventListener("click",r=>{this._map.getPitch()===0?this._map.easeTo({pitch:Math.min(this._map.getMaxPitch(),80)}):this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:r}):this._map.resetNorth({},{originalEvent:r})}))}_createButton(t,r){const i=super._createButton(t,r);return i.clickFunction=r,i}}const hP=Ht.Marker,dP=Ht.LngLat,WQ=Ht.LngLatBounds;class KQ extends kY{constructor(){super(...arguments),yr(this,"lastUpdatedCenter",new dP(0,0)),yr(this,"_updateCamera",t=>{var r;const i=new dP(t.coords.longitude,t.coords.latitude),a=t.coords.accuracy,h={bearing:this._map.getBearing(),...this.options.fitBoundsOptions,linear:!0},d=this._map.getZoom();d>(((r=this.options.fitBoundsOptions)==null?void 0:r.maxZoom)??30)&&(h.zoom=d),this._map.fitBounds(WQ.fromLngLat(i,a),h,{geolocateSource:!0});let o=!1;const y=()=>{o=!0};this._map.once("click",y),this._map.once("dblclick",y),this._map.once("dragstart",y),this._map.once("mousedown",y),this._map.once("touchstart",y),this._map.once("wheel",y),this._map.once("moveend",()=>{this._map.off("click",y),this._map.off("dblclick",y),this._map.off("dragstart",y),this._map.off("mousedown",y),this._map.off("touchstart",y),this._map.off("wheel",y),!o&&(this.lastUpdatedCenter=this._map.getCenter())})}),yr(this,"_finishSetupUI",t=>{if(this._map){if(t===!1){const r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r)}else{const r=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=sl("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new hP({element:this._dotElement}),this._circleElement=sl("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new hP({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("move",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("moveend",r=>{const i=r.originalEvent&&r.originalEvent.type==="resize",a=this.lastUpdatedCenter.distanceTo(this._map.getCenter());!r.geolocateSource&&this._watchState==="ACTIVE_LOCK"&&!i&&a>1&&(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new Event("trackuserlocationend")))})}}),yr(this,"_onZoom",()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()})}_updateCircleRadius(){if(this._watchState!=="BACKGROUND"&&this._watchState!=="ACTIVE_LOCK")return;const t=[this._lastKnownPosition.coords.longitude,this._lastKnownPosition.coords.latitude],r=this._map.project(t),i=this._map.unproject([r.x,r.y]),a=this._map.unproject([r.x+20,r.y]),h=i.distanceTo(a)/20,d=Math.ceil(2*this._accuracy/h);this._circleElement.style.width=`${d}px`,this._circleElement.style.height=`${d}px`}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_E
820RROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;case"BACKGROUND_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}}var Ds,ca,wu,Su,eo,w_,ls,wD,to,SD;class Bx{constructor(t,r){bu(this,ls),bu(this,Ds),yr(this,"map"),bu(this,ca),bu(this,wu),bu(this,Su),bu(this,eo,!1),bu(this,w_),t.style!==void 0&&ad(this,eo,!0),ad(this,Ds,{zoomAdjust:-4,position:"top-right",...r,forceNoAttributionControl:!0,attributionControl:!1,navigationControl:!1,geolocateControl:!1,maptilerLogo:!1,minimap:!1,hash:!1,pitchAdjust:!1,...t,containerStyle:{border:"1px solid #000",width:"400px",height:"300px",...t.containerStyle??{}}}),t.lockZoom!==void 0&&(Vr(this,Ds).minZoom=t.lockZoom,Vr(this,Ds).maxZoom=t.lockZoom)}setStyle(t,r){Vr(this,eo)||this.map.setStyle(t,r),zs(this,ls,to).call(this)}addLayer(t,r){return Vr(this,eo)||this.map.addLayer(t,r),zs(this,ls,to).call(this),this.map}moveLayer(t,r){return Vr(this,eo)||this.map.moveLayer(t,r),zs(this,ls,to).call(this),this.map}removeLayer(t){return Vr(this,eo)||this.map.removeLayer(t),zs(this,ls,to).call(this),this}setLayerZoomRange(t,r,i){return Vr(this,eo)||this.map.setLayerZoomRange(t,r,i),zs(this,ls,to).call(this),this}setFilter(t,r,i){return Vr(this,eo)||this.map.setFilter(t,r,i),zs(this,ls,to).call(this),this}setPaintProperty(t,r,i,a){return Vr(this,eo)||this.map.setPaintProperty(t,r,i,a),zs(this,ls,to).call(this),this}setLayoutProperty(t,r,i,a){return Vr(this,eo)||this.map.setLayoutProperty(t,r,i,a),zs(this,ls,to).call(this),this}setGlyphs(t,r){return Vr(this,eo)||this.map.setGlyphs(t,r),zs(this,ls,to).call(this),this}onAdd(t){ad(this,ca,t),ad(this,wu,sl("div","maplibregl-ctrl maplibregl-ctrl-group"));for(const[r,i]of Object.entries(Vr(this,Ds).containerStyle))Vr(this,wu).style.setProperty(r,i);return Vr(this,Ds).container=Vr(this,wu),Vr(this,Ds).zoom=t.getZoom()+Vr(this,Ds).zoomAdjust,this.map=new TD(Vr(this,Ds)),this.map.once("style.load",()=>{this.map.resize()}),this.map.once("load",()=>{zs(this,ls,wD).call(this,Vr(this,Ds).parentRect),ad(this,w_,zs(this,ls,SD).call(this))}),Vr(this,wu)}onRemove(){var t;(t=Vr(this,w_))==null||t.call(this),_2(Vr(this,wu))}}Ds=new WeakMap,ca=new WeakMap,wu=new WeakMap,Su=new WeakMap,eo=new WeakMap,w_=new WeakMap,ls=new WeakSet,wD=function(e){e===void 0||e.linePaint===void 0&&e.fillPaint===void 0||(ad(this,Su,{type:"Feature",properties:{name:"parentRect"},geometry:{type:"Polygon",coordinates:[[[],[],[],[],[]]]}}),this.map.addSource("parentRect",{type:"geojson",data:Vr(this,Su)}),(e.lineLayout!==void 0||e.linePaint!==void 0)&&this.map.addLayer({id:"parentRectOutline",type:"line",source:"parentRect",layout:{...e.lineLayout},paint:{"line-color":"#FFF","line-width":1,"line-opacity":.85,...e.linePaint}}),e.fillPaint!==void 0&&this.map.addLayer({id:"parentRectFill",type:"fill",source:"parentRect",layout:{},paint:{"fill-color":"#08F","fill-opacity":.135,...e.fillPaint}}),zs(this,ls,to).call(this))},to=function(){if(Vr(this,Su)===void 0)return;const{devicePixelRatio:e}=window,t=Vr(this,ca).getCanvas(),r=t.width/e,i=t.height/e,a=Vr(this,ca).unproject.bind(Vr(this,ca)),h=a([0,0]),d=a([r,0]),o=a([0,i]),y=a([r,i]);Vr(this,Su).geometry.coordinates=[[o.toArray(),y.toArray(),d.toArray(),h.toArray(),o.toArray()]];const w=this.map.getSource("parentRect");w!==void 0&&w.setData(Vr(this,Su))},SD=function(){const{pitchAdjust:e}=Vr(this,Ds),t=()=>{h("parent")},r=()=>{h("minimap")},i=()=>{Vr(this,ca).on("move",t),this.map.on("move",r)},a=()=>{Vr(this,ca).off("move",t),this.map.off("move",r)},h=d=>{a();const o=d==="parent"?Vr(this,ca):this.map,y=d==="parent"?this.map:Vr(this,ca),w=o.getCenter(),T=o.getZoom()+Vr(this,Ds).zoomAdjust*(d==="parent"?1:-1),k=o.getBearing(),M=o.getPitch();y.jumpTo({center:w,zoom:T,bearing:k,pitch:e?M:0}),zs(this,ls,to).call(this),i()};return i(),()=>{a()}};class XQ{constructor(){yr(this,"map"),yr(this,"container"),yr(this,"projectionButton")}onAdd(t){return this.map=t,this.container=sl("div","maplibregl-ctrl maplibregl-ctrl-group"),this.projectionButton=sl("button","maplibregl-ctrl-projection",this.container),sl("span","maplibregl-ctrl-icon",this.projectionButton).setAttribute("aria-hidden","true"),this.projectionButton.t
820ype="button",this.projectionButton.addEventListener("click",this.toggleProjection.bind(this)),t.on("projectiontransition",this.updateProjectionIcon.bind(this)),this.updateProjectionIcon(),this.container}onRemove(){_2(this.container),this.map.off("projectiontransition",this.updateProjectionIcon),this.map=void 0}toggleProjection(){this.map.getProjection()===void 0&&this.map.setProjection({type:"mercator"}),this.map.isGlobeProjection()?this.map.enableMercatorProjection():this.map.enableGlobeProjection(),this.updateProjectionIcon()}updateProjectionIcon(){this.projectionButton.classList.remove("maplibregl-ctrl-projection-globe"),this.projectionButton.classList.remove("maplibregl-ctrl-projection-mercator"),this.map.isGlobeProjection()?(this.projectionButton.classList.add("maplibregl-ctrl-projection-mercator"),this.projectionButton.title="Enable Mercator projection"):(this.projectionButton.classList.add("maplibregl-ctrl-projection-globe"),this.projectionButton.title="Enable Globe projection")}}const YQ="3.4.1",JQ={version:YQ};class QQ{constructor(t,r=2e3){yr(this,"map"),yr(this,"registeredModules",new Set),this.map=t,setTimeout(async()=>{if(!vi.telemetry)return;const i=this.preparePayload();try{(await fetch(i,{method:"POST"})).ok||console.warn("The metrics could not be sent to MapTiler Cloud")}catch(a){console.warn("The metrics could not be sent to MapTiler Cloud",a)}},Math.max(1e3,r))}registerModule(t,r){this.registeredModules.add(`${t}:${r}`)}preparePayload(){const t=new URL(us.telemetryURL);return t.searchParams.append("sdk",JQ.version),t.searchParams.append("key",vi.apiKey),t.searchParams.append("mtsid",XS),t.searchParams.append("session",vi.session?"1":"0"),t.searchParams.append("caching",vi.caching?"1":"0"),t.searchParams.append("lang-updated",this.map.isLanguageUpdated()?"1":"0"),t.searchParams.append("terrain",this.map.getTerrain()?"1":"0"),t.searchParams.append("globe",this.map.isGlobeProjection()?"1":"0"),this.registeredModules.size>0&&t.searchParams.append("modules",Array.from(this.registeredModules).join("|")),t.href}}const eee={POINT:"POINT",COUNTRY:"COUNTRY"};let TD=class CD extends Ht.Map{constructor(t){yY(t.container),t.apiKey&&(vi.apiKey=t.apiKey);const{style:r,requiresUrlMonitoring:i,isFallback:a}=uP(t.style);a&&console.warn("Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Fallback to default MapTiler style."),vi.apiKey||console.warn("MapTiler Cloud API key is not set. Visit https://maptiler.com and try Cloud for free!");const h=location.hash;let d={compact:!1};t.customAttribution?d.customAttribution=t.customAttribution:t.attributionControl&&typeof t.attributionControl=="object"&&(d={...d,...t.attributionControl});const o={...t,style:r,maplibreLogo:!1,transformRequest:$I(t.transformRequest),attributionControl:t.forceNoAttributionControl===!0?!1:d};delete o.style,super(o),yr(this,"options"),yr(this,"telemetry"),yr(this,"isTerrainEnabled",!1),yr(this,"terrainExaggeration",1),yr(this,"primaryLanguage"),yr(this,"terrainGrowing",!1),yr(this,"terrainFlattening",!1),yr(this,"minimap"),yr(this,"forceLanguageUpdate"),yr(this,"languageAlwaysBeenStyle"),yr(this,"isReady",!1),yr(this,"terrainAnimationDuration",1e3),yr(this,"monitoredStyleUrls"),yr(this,"styleInProcess",!1),yr(this,"curentProjection"),yr(this,"originalLabelStyle",new window.Map),yr(this,"isStyleLocalized",!1),yr(this,"languageIsUpdated",!1),this.options=t,this.setStyle(r),i&&this.monitorStyleUrl(r);const y=()=>{let P="The distant style could not be loaded.";this.getStyle()?P+="Leaving the style as is.":(this.setStyle(Ru.STREETS),P+=`Loading default MapTiler Cloud style "${Ru.STREETS.getDefaultVariant().getId()}" as a fallback.`),console.warn(P)};if(this.on("style.load",()=>{this.styleInProcess=!1}),this.on("error",P=>{if(P.error instanceof Ht.AJAXError){const L=P.error.url,O=new URL(L);O.search="";const $=O.href;this.monitoredStyleUrls&&this.monitoredStyleUrls.has($)&&(this.monitoredStyleUrls.delete($),y());return}if(this.styleInProcess){y();return}}),vi.caching&&!ww&&console.warn("The cache API is only available in secure contexts. More info at https://developer.mozilla.org/en-US/docs/Web/API/Cache"),vi.caching&&ww&&fY(),typeof t.language>"u")this.primaryLanguage=vi.primaryLanguage;else{const P=RI(t.language,Hr);this.primaryLanguage=P??vi.primaryLanguage}this.forceLanguageUpdate=!(this.primaryLanguage===Hr.STYLE||this.primaryLanguage===Hr.STYLE_LOCK),this.languageAlwaysBeenStyle=this.primaryLanguage===Hr.STYLE,this.terrainExaggeration=t.terrainExaggeration??this.terrainExaggeration,this.curentProjection=t.projection,this.on("styledata",()=>{this.curentProjection==="mercator"?this.setProjection({type:"mercator"}):this.curentProjection==="globe"&&this.setProjection({type:"globe"})}),this.once("styledata",async()=>
820{if(!t.geolocate||t.center||t.hash&&h)return;try{if(t.geolocate===eee.COUNTRY){await this.fitToIpBounds();return}}catch(L){console.warn(L.message)}let P;try{await this.centerOnIpPoint(t.zoom),P=this.getCameraHash()}catch(L){console.warn(L.message)}(await navigator.permissions.query({name:"geolocation"})).state==="granted"&&navigator.geolocation.getCurrentPosition(L=>{P===this.getCameraHash()&&(this.terrain?this.easeTo({center:[L.coords.longitude,L.coords.latitude],zoom:t.zoom||12,duration:2e3}):this.once("terrain",()=>{this.easeTo({center:[L.coords.longitude,L.coords.latitude],zoom:t.zoom||12,duration:2e3})}))},null,{maximumAge:24*3600*1e3,timeout:5e3,enableHighAccuracy:!1})}),this.on("styledata",()=>{this.setPrimaryLanguage(this.primaryLanguage)}),this.on("styledata",()=>{this.getTerrain()===null&&this.isTerrainEnabled&&this.enableTerrain(this.terrainExaggeration)}),this.once("load",async()=>{let P={logo:null};try{const L=Object.keys(this.style.sourceCaches).map($=>this.getSource($)).filter($=>$&&"url"in $&&typeof $.url=="string"&&$.url.includes("tiles.json")),O=new URL(L[0].url);O.searchParams.has("key")||O.searchParams.append("key",vi.apiKey),P=await(await fetch(O.href)).json()}catch{}if(t.forceNoAttributionControl!==!0)if("logo"in P&&P.logo){const L=P.logo;this.addControl(new VI({logoURL:L}),t.logoPosition)}else t.maptilerLogo&&this.addControl(new VI,t.logoPosition);if(t.scaleControl){const L=t.scaleControl===!0||t.scaleControl===void 0?"bottom-right":t.scaleControl,O=new PY({unit:vi.unit});this.addControl(O,L),vi.on("unit",$=>{O.setUnit($)})}if(t.navigationControl!==!1){const L=t.navigationControl===!0||t.navigationControl===void 0?"top-right":t.navigationControl;this.addControl(new ZQ,L)}if(t.geolocateControl!==!1){const L=t.geolocateControl===!0||t.geolocateControl===void 0?"top-right":t.geolocateControl;this.addControl(new KQ({positionOptions:{enableHighAccuracy:!0,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!0,showAccuracyCircle:!0,showUserLocation:!0}),L)}if(t.terrainControl){const L=t.terrainControl===!0||t.terrainControl===void 0?"top-right":t.terrainControl;this.addControl(new HQ,L)}if(t.projectionControl){const L=t.projectionControl===!0||t.projectionControl===void 0?"top-right":t.projectionControl;this.addControl(new XQ,L)}if(t.fullscreenControl){const L=t.fullscreenControl===!0||t.fullscreenControl===void 0?"top-right":t.fullscreenControl;this.addControl(new AY({}),L)}this.isReady=!0,this.fire("ready",{target:this})});let w=!1,T=!1,k;this.once("ready",()=>{w=!0,T&&this.fire("loadWithTerrain",k)}),this.once("style.load",()=>{const{minimap:P}=t;if(typeof P=="object"){const{zoom:L,center:O,style:$,language:Z,apiKey:J,maptilerLogo:H,canvasContextAttributes:U,refreshExpiredTiles:V,maxBounds:te,scrollZoom:ce,minZoom:fe,maxZoom:Se,boxZoom:xe,locale:et,fadeDuration:ze,crossSourceCollisions:Ze,clickTolerance:tt,bounds:at,fitBoundsOptions:Pe,pixelRatio:He,validateStyle:Oe}=t;this.minimap=new Bx(P,{zoom:L,center:O,style:$,language:Z,apiKey:J,container:"null",maptilerLogo:H,canvasContextAttributes:U,refreshExpiredTiles:V,maxBounds:te,scrollZoom:ce,minZoom:fe,maxZoom:Se,boxZoom:xe,locale:et,fadeDuration:ze,crossSourceCollisions:Ze,clickTolerance:tt,bounds:at,fitBoundsOptions:Pe,pixelRatio:He,validateStyle:Oe}),this.addControl(this.minimap,P.position??"bottom-left")}else P===!0?(this.minimap=new Bx({},t),this.addControl(this.minimap,"bottom-left")):P!==void 0&&P!==!1&&(this.minimap=new Bx({},t),this.addControl(this.minimap,P))});const M=P=>{P.terrain&&(T=!0,k={type:"loadWithTerrain",target:this,terrain:P.terrain},this.off("terrain",M),w&&this.fire("loadWithTerrain",k))};this.on("terrain",M),t.terrain&&this.enableTerrain(t.terrainExaggeration??this.terrainExaggeration),this.once("load",()=>{this.getCanvas().addEventListener("webglcontextlost",P=>{if(this._removed===!0){console.warn("[webglcontextlost]","WebGL context lost after map removal. This is harmless.");return}console.warn("[webglcontextlost]","Unexpected loss of WebGL context!"),this.fire("webglContextLost",P)})}),this.telemetry=new QQ(this)}recreate(){const t={center:this.getCenter(),zoom:this.getZoom(),bearing:this.getBearing(),pitch:this.getPitch()};this.remove(),Object.assign(this,new CD({...this.options})),this.once("load",()=>{this.jumpTo(t)})}setTerrainAnimationDuration(t){this.terrainAnimationDuration=Math.max(t,0)}async onLoadAsync(){return new Promise(t=>{if(this.loaded()){t(this);return}this.once("load",()=>{t(this)})})}async onReadyAsync(){return new Promise(t=>{if(this.isReady){t(this);return}this.once("ready",()=>{t(this)})})}async onLoadWithTerrainAsync(){return new Promise(t=>{if(this.isReady&&this.terrain){t(this);return}this.once("loadWithTerrain",()=>{t(this)})})}monitorStyleUrl(t){typeof this.monitoredStyleUrls>"u"&&(this.monitoredStyleUrls=new Set);
820const r=new URL(t);r.search="",this.monitoredStyleUrls.add(r.href)}setStyle(t,r){var i;this.originalLabelStyle.clear(),(i=this.minimap)==null||i.setStyle(t),this.forceLanguageUpdate=!0,this.once("idle",()=>{this.forceLanguageUpdate=!1});const a=uP(t);if(a.requiresUrlMonitoring&&this.monitorStyleUrl(a.style),a.isFallback){if(this.getStyle())return console.warn("Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Keeping the curent style instead."),this;console.warn("Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Fallback to default MapTiler style.")}this.styleInProcess=!0;try{super.setStyle(a.style,r)}catch(h){this.styleInProcess=!1,console.error("Error while setting style:",h)}return this}addLayer(t,r){var i;return(i=this.minimap)==null||i.addLayer(t,r),super.addLayer(t,r)}moveLayer(t,r){var i;return(i=this.minimap)==null||i.moveLayer(t,r),super.moveLayer(t,r)}removeLayer(t){var r;return(r=this.minimap)==null||r.removeLayer(t),super.removeLayer(t)}setLayerZoomRange(t,r,i){var a;return(a=this.minimap)==null||a.setLayerZoomRange(t,r,i),super.setLayerZoomRange(t,r,i)}setFilter(t,r,i){var a;return(a=this.minimap)==null||a.setFilter(t,r,i),super.setFilter(t,r,i)}setPaintProperty(t,r,i,a){var h;return(h=this.minimap)==null||h.setPaintProperty(t,r,i,a),super.setPaintProperty(t,r,i,a)}setLayoutProperty(t,r,i,a){var h;return(h=this.minimap)==null||h.setLayoutProperty(t,r,i,a),super.setLayoutProperty(t,r,i,a)}setGlyphs(t,r){var i;return(i=this.minimap)==null||i.setGlyphs(t,r),super.setGlyphs(t,r)}getStyleLanguage(){return!this.style||!this.style.stylesheet||!this.style.stylesheet.metadata||typeof this.style.stylesheet.metadata!="object"?null:"maptiler:language"in this.style.stylesheet.metadata&&typeof this.style.stylesheet.metadata["maptiler:language"]=="string"?vw(this.style.stylesheet.metadata["maptiler:language"]):null}setLanguage(t){var r;(r=this.minimap)==null||r.map.setLanguage(t),this.onStyleReady(()=>{this.setPrimaryLanguage(t)})}setPrimaryLanguage(t){const r=this.getStyleLanguage(),i=RI(t,Hr);if(!i){console.warn(`The language "${i}" is not supported.`);return}if(!(i.flag===Hr.STYLE.flag&&r&&(r.flag===Hr.AUTO.flag||r.flag===Hr.VISITOR.flag))&&(i.flag!==Hr.STYLE.flag&&(this.languageAlwaysBeenStyle=!1),this.languageAlwaysBeenStyle||this.primaryLanguage===i&&!this.forceLanguageUpdate))return;if(this.primaryLanguage.flag===Hr.STYLE_LOCK.flag){console.warn("The language cannot be changed because this map has been instantiated with the STYLE_LOCK language flag.");return}this.primaryLanguage=i;let a=i;if(i.flag===Hr.STYLE.flag){if(!r){console.warn("The style has no default languages or has an invalid one.");return}a=r}let h=Hr.LOCAL.flag,d=["get",h];a.flag===Hr.VISITOR.flag?(h=FI().flag,d=["case",["all",["has",h],["has",Hr.LOCAL.flag]],["case",["==",["get",h],["get",Hr.LOCAL.flag]],["get",Hr.LOCAL.flag],["format",["get",h],{"font-scale":.8},`
821`,["get",Hr.LOCAL.flag],{"font-scale":1.1}]],["get",Hr.LOCAL.flag]]):a.flag===Hr.VISITOR_ENGLISH.flag?(h=Hr.ENGLISH.flag,d=["case",["all",["has",h],["has",Hr.LOCAL.flag]],["case",["==",["get",h],["get",Hr.LOCAL.flag]],["get",Hr.LOCAL.flag],["format",["get",h],{"font-scale":.8},`
822`,["get",Hr.LOCAL.flag],{"font-scale":1.1}]],["get",Hr.LOCAL.flag]]):a.flag===Hr.AUTO.flag?(h=FI().flag,d=["coalesce",["get",h],["get",Hr.LOCAL.flag]]):a===Hr.LOCAL?(h=Hr.LOCAL.flag,d=["get",h]):(h=a.flag,d=["coalesce",["get",h],["get",Hr.LOCAL.flag]]);const{layers:o}=this.getStyle(),y=this.originalLabelStyle.size===0;if(y){const w=TY(o,this);this.isStyleLocalized=Object.keys(w.localized).length>0}for(const w of o){if(w.type!=="symbol")continue;const T=w,k=this.getSource(T.source);if(!k||!("url"in k&&typeof k.url=="string")||new URL(k.url).host!==us.maptilerApiHost)continue;const{id:M,layout:P}=T;if(!P||!("text-field"in P))continue;let L;if(y?(L=this.getLayoutProperty(M,"text-field"),this.originalLabelStyle.set(M,L)):L=this.originalLabelStyle.get(M),typeof L=="string"){const{contains:O,exactMatch:$}=vY(L,this.isStyleLocalized);if(!O)continue;if($)this.setLayoutProperty(M,"text-field",d);else{const Z=bY(L,d,this.isStyleLocalized);this.setLayoutProperty(M,"text-field",Z)}}else{const O=_Y(L,d,this.isStyleLocalized);this.setLayoutProperty(M,"text-field",O)}}this.languageIsUpdated=!0}getPrimaryLanguage(){return this.primaryLanguage}getTerrainExaggeration(){return this.terrainExaggeration}hasTerrain(){return this.isTerrainEnabled}growTerrain(t){if(!this.terrain)return;const r=performance.now(),i=this.terrain.exaggeration,a=t-i,h=()=>
822{if(!this.terrain||this.terrainFlattening)return;const d=(performance.now()-r)/this.terrainAnimationDuration;if(d<.99){const o=1-(1-d)**4,y=i+o*a;this.terrain.exaggeration=y,requestAnimationFrame(h)}else this.terrainGrowing=!1,this.terrainFlattening=!1,this.terrain.exaggeration=t,this.fire("terrainAnimationStop",{terrain:this.terrain});this._elevationFreeze=!1,this.triggerRepaint()};!this.terrainGrowing&&!this.terrainFlattening&&this.fire("terrainAnimationStart",{terrain:this.terrain}),this.terrainGrowing=!0,this.terrainFlattening=!1,requestAnimationFrame(h)}enableTerrain(t=this.terrainExaggeration){if(t<0){console.warn("Terrain exaggeration cannot be negative.");return}const r=a=>{!this.terrain||a.type!=="data"||a.dataType!=="source"||!("source"in a)||a.sourceId!=="maptiler-terrain"||a.source.type!=="raster-dem"||a.isSourceLoaded&&(this.off("data",r),this.growTerrain(t))},i=()=>{this.isTerrainEnabled=!0,this.terrainExaggeration=t,this.on("data",r),this.addSource(us.terrainSourceId,{type:"raster-dem",url:us.terrainSourceURL}),this.setTerrain({source:us.terrainSourceId,exaggeration:0})};if(this.getTerrain()){this.isTerrainEnabled=!0,this.growTerrain(t);return}this.loaded()||this.isTerrainEnabled?i():this.once("load",()=>{this.getTerrain()&&this.getSource(us.terrainSourceId)||i()})}disableTerrain(){if(!this.terrain)return;this.isTerrainEnabled=!1;const t=performance.now(),r=this.terrain.exaggeration,i=()=>{if(!this.terrain||this.terrainGrowing)return;const a=(performance.now()-t)/this.terrainAnimationDuration;if(this._elevationFreeze=!1,a<.99){const h=(1-a)**4,d=r*h;this.terrain.exaggeration=d,requestAnimationFrame(i)}else this.terrain.exaggeration=0,this.terrainGrowing=!1,this.terrainFlattening=!1,this.setTerrain(),this.get
822Source(us.terrainSourceId)&&this.removeSource(us.terrainSourceId),this.fire("terrainAnimationStop",{terrain:null});this.triggerRepaint()};!this.terrainGrowing&&!this.terrainFlattening&&this.fire("terrainAnimationStart",{terrain:this.terrain}),this.terrainGrowing=!1,this.terrainFlattening=!0,requestAnimationFrame(i)}setTerrainExaggeration(t,r=!0){!r&&this.terrain?(this.terrainExaggeration=t,this.terrain.exaggeration=t,this.triggerRepaint()):this.enableTerrain(t)}onStyleReady(t){this.isStyleLoaded()?t():this.once("styledata",()=>{t()})}async fitToIpBounds(){const t=await zI.info();this.fitBounds(t.country_bounds,{duration:0,padding:100})}async centerOnIpPoint(t){const r=await zI.info();this.jumpTo({center:[r.longitude??0,r.latitude??0],zoom:t||11})}getCameraHash(){const t=new Float32Array(5),r=this.getCenter();return t[0]=r.lng,t[1]=r.lat,t[2]=this.getZoom(),t[3]=this.getPitch(),t[4]=this.getBearing(),Pz.fromUint8Array(new Uint8Array(t.buffer))}getSdkConfig(){return vi}getMaptilerSessionId(){return XS}setTransformRequest(t){return super.setTransformRequest($I(t)),this}isGlobeProjection(){const t=this.getProjection();return t?t.type==="globe":!1}enableGlobeProjection(){this.isGlobeProjection()!==!0&&(this.setProjection({type:"globe"}),this.curentProjection="globe")}enableMercatorProjection(){this.isGlobeProjection()!==!1&&(this.setProjection({type:"mercator"}),this.curentProjection="mercator")}isLanguageUpdated(){return this.languageIsUpdated}};function t_(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function tee(e){return`#${t_(e[0])}${t_(e[1])}${t_(e[2])}${e.length===4?t_(e[3]):""}`}let ar=class hd extends Array{constructor(t={}){super(),yr(this,"min",0),yr(this,"max",1),"min"in t&&(this.min=t.min),"max"in t&&(this.max=t.max),"stops"in t&&this.setStops(t.stops,{clone:!1})}static fromArrayDefinition(t){return new hd({stops:t.map(r=>({value:r[0],color:r[1]}))})}setStops(t,r={clone:!0}){const i=r.clone?this.clone():this;i.length=0;let a=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY;for(let d=0;d<t.length;d+=1)a=Math.min(a,t[d].value),h=Math.max(h,t[d].value),i.push({value:t[d].value,color:t[d].color.slice()});return i.sort((d,o)=>d.value<o.value?-1:1),this.min=a,this.max=h,i}scale(t,r,i={clone:!0}){const a=i.clone,h=this[0].value,d=this.at(-1).value-h,o=r-t,y=[];for(let w=0;w<this.length;w+=1){const T=(this[w].value-h)/d*o+t;a?y.push({value:T,color:this[w].color.slice()}):this[w].value=T}return a?new hd({stops:y}):this}at(t){return t<0?this[this.length+t]:this[t]}clone(){return new hd({stops:this.getRawColorStops()})}getRawColorStops(){const t=[];for(let r=0;r<this.length;r+=1)t.push({value:this[r].value,color:this[r].color});return t}reverse(t={clone:!0}){const r=t.clone?this.clone():this;for(let i=0;i<~~(r.length/2);i+=1){const a=r[i].color;r[i].color=r.at(-(i+1)).color,r.at(-(i+1)).color=a}return r}getBounds(){return{min:this.min,max:this.max}}getColor(t,r={smooth:!0}){if(t<=this[0].value)return this[0].color;if(t>=this.at(-1).value)return this.at(-1).color;for(let i=0;i<this.length-1;i+=1){if(t>this[i+1].value)continue;const a=this[i].color;if(!r.smooth)return a.slice();const h=this[i].value,d=this[i+1].value,o=this[i+1].color,y=(d-t)/(d-h);return a.map((w,T)=>Math.round(w*y+o[T]*(1-y)))}return[0,0,0]}getColorHex(t,r={smooth:!0,withAlpha:!1}){return tee(this.getColor(t,r))}getColorRelative(t,r={smooth:!0}){const i=this.getBounds();return this.getColor(i.min+t*(i.max-i.min),r)}getCanvasStrip(t={horizontal:!0,size:512,smooth:!0}){const r=document.createElement("canvas");r.width=t.horizontal?t.size:1,r.height=t.horizontal?1:t.size;const i=r.getContext("2d");if(!i)throw new Error("Canvs context is missing");const a=i.getImageData(0,0,r.width,r.height),h=a.data,d=t.size,o=this[0].value,y=(this.at(-1).value-o)/d;for(let w=0;w<d;w+=1){const T=this.getColor(o+w*y,{smooth:t.smooth});h[w*4]=T[0],h[w*4+1]=T[1],h[w*4+2]=T[2],h[w*4+3]=T.length>3?T[3]:255}return i.putImageData(a,0,0),r}resample(t,r=15){const i=this.getBounds(),a=this.scale(0,1),h=1/(r-1);let d;if(t==="ease-in-square")d=Array.from({length:r},(o,y)=>{const w=y*h,T=w**2,k=a.getColor(T);return{value:w,color:k}});
822else if(t==="ease-out-square")d=Array.from({length:r},(o,y)=>{const w=y*h,T=1-(1-w)**2,k=a.getColor(T);return{value:w,color:k}});else if(t==="ease-out-sqrt")d=Array.from({length:r},(o,y)=>{const w=y*h,T=w**.5,k=a.getColor(T);return{value:w,color:k}});else if(t==="ease-in-sqrt")d=Array.from({length:r},(o,y)=>{const w=y*h,T=1-(1-w)**.5,k=a.getColor(T);return{value:w,color:k}});else if(t==="ease-out-exp")d=Array.from({length:r},(o,y)=>{const w=y*h,T=1-2**(-10*w),k=a.getColor(T);return{value:w,color:k}});else if(t==="ease-in-exp")d=Array.from({length:r},(o,y)=>{const w=y*h,T=2**(10*w-10),k=a.getColor(T);return{value:w,color:k}});else throw new Error("Invalid ressampling method.");return new hd({stops:d}).scale(i.min,i.max)}transparentStart(){const t=this.getRawColorStops();t.unshift({value:t[0].value,color:t[0].color.slice()}),t[1].value+=.001;for(const r of t)r.color.length===3&&r.color.push(255);return t[0].color[3]=0,new hd({stops:t})}hasTransparentStart(){return this[0].color.length===4&&this[0].color[3]===0}};new ar({stops:[{value:0,color:[0,0,0,0]},{value:1,color:[0,0,0,0]}]}),new ar({stops:[{value:0,color:[0,0,0]},{value:1,color:[255,255,255]}]}),new ar({stops:[{value:0,color:[0,0,131]},{value:.125,color:[0,60,170]},{value:.375,color:[5,255,255]},{value:.625,color:[255,255,0]},{value:.875,color:[250,0,0]},{value:1,color:[128,0,0]}]}),new ar({stops:[{value:0,color:[255,0,0]},{value:.169,color:[253,255,2]},{value:.173,color:[247,255,2]},{value:.337,color:[0,252,4]},{value:.341,color:[0,252,10]},{value:.506,color:[1,249,255]},{value:.671,color:[2,0,253]},{value:.675,color:[8,0,253]},{value:.839,color:[255,0,251]},{value:.843,color:[255,0,245]},{value:1,color:[255,0,6]}]}),new ar({stops:[{value:0,color:[0,0,0]},{value:.3,color:[230,0,0]},{value:.6,color:[255,210,0]},{value:1,color:[255,255,255]}]}),new ar({stops:[{value:0,color:[255,0,255]},{value:1,color:[255,255,0]}]}),new ar({stops:[{value:0,color:[0,128,102]},{value:1,color:[255,255,102]}]}),new ar({stops:[{value:0,color:[255,0,0]},{value:1,color:[255,255,0]}]}),new ar({stops:[{value:0,color:[0,0,255]},{value:1,color:[0,255,128]}]}),new ar({stops:[{value:0,color:[0,0,0]},{value:.376,color:[84,84,116]},{value:.753,color:[169,200,200]},{value:1,color:[255,255,255]}]}),new ar({stops:[{value:0,color:[0,0,0]},{value:.804,color:[255,160,102]},{value:1,color:[255,199,127]}]}),new ar({stops:[{value:0,color:[0,0,0]},{value:1,color:[255,255,255]}]}),new ar({stops:[{value:0,color:[8,29,88]},{value:.125,color:[37,52,148]},{value:.25,color:[34,94,168]},{value:.375,color:[29,145,192]},{value:.5,color:[65,182,196]},{value:.625,color:[127,205,187]},{value:.75,color:[199,233,180]},{value:.875,color:[237,248,217]},{value:1,color:[255,255,217]}]}),new ar({stops:[{value:0,color:[0,68,27]},{value:.125,color:[0,109,44]},{value:.25,color:[35,139,69]},{value:.375,color:[65,171,93]},{value:.5,color:[116,196,118]},{value:.625,color:[161,217,155]},{value:.75,color:[199,233,192]},{value:.875,color:[229,245,224]},{value:1,color:[247,252,245]}]}),new ar({stops:[{value:0,color:[128,0,38]},{value:.125,color:[189,0,38]},{value:.25,color:[227,26,28]},{value:.375,color:[252,78,42]},{value:.5,color:[253,141,60]},{value:.625,color:[254,178,76]},{value:.75,color:[254,217,118]},{value:.875,color:[255,237,160]},{value:1,color:[255,255,204]}]}),new ar({stops:[{value:0,color:[0,0,255]},{value:1,color:[255,0,0]}]}),new ar({stops:[{value:0,color:[5,10,172]},{value:.35,color:[106,137,247]},{value:.5,color:[190,190,190]},{value:.6,color:[220,170,132]},{value:.7,color:[230,145,90]},{value:1,color:[178,10,28]}]}),new ar({stops:[{value:0,color:[0,0,255]},{value:.1,color:[51,153,255]},{value:.2,color:[102,204,255]},{value:.3,color:[153,204,255]},{value:.4,color:[204,204,255]},{value:.5,color:[255,255,255]},{value:.6,color:[255,204,255]},{value:.7,color:[255,153,255]},{value:.8,color:[255,102,204]},{value:.9,color:[255,102,102]},{value:1,color:[255,0,0]}]}),new ar({stops:[{value:0,color:[150,0,90]},{value:.125,color:[0,0,200]},{value:.25,color:[0,25,255]},{value:.375,color:[0,152,255]},{value:.5,color:[44,255,150]},{value:.625,color:[151,255,0]}
822,{value:.75,color:[255,234,0]},{value:.875,color:[255,111,0]},{value:1,color:[255,0,0]}]}),new ar({stops:[{value:0,color:[12,51,131]},{value:.25,color:[10,136,186]},{value:.5,color:[242,211,56]},{value:.75,color:[242,143,56]},{value:1,color:[217,30,30]}]}),new ar({stops:[{value:0,color:[0,0,0]},{value:.2,color:[230,0,0]},{value:.4,color:[230,210,0]},{value:.7,color:[255,255,255]},{value:1,color:[160,200,255]}]}),new ar({stops:[{value:0,color:[0,0,130]},{value:.1,color:[0,180,180]},{value:.2,color:[40,210,40]},{value:.4,color:[230,230,50]},{value:.6,color:[120,70,20]},{value:1,color:[255,255,255]}]}),new ar({stops:[{value:0,color:[0,0,0]},{value:.15,color:[30,0,100]},{value:.4,color:[120,0,100]},{value:.6,color:[160,90,0]},{value:.8,color:[230,200,0]},{value:1,color:[255,250,220]}]}),new ar({stops:[{value:0,color:[68,1,84]},{value:.13,color:[71,44,122]},{value:.25,color:[59,81,139]},{value:.38,color:[44,113,142]},{value:.5,color:[33,144,141]},{value:.63,color:[39,173,129]},{value:.75,color:[92,200,99]},{value:.88,color:[170,220,50]},{value:1,color:[253,231,37]}]}),new ar({stops:[{value:0,color:[0,0,4]},{value:.13,color:[31,12,72]},{value:.25,color:[85,15,109]},{value:.38,color:[136,34,106]},{value:.5,color:[186,54,85]},{value:.63,color:[227,89,51]},{value:.75,color:[249,140,10]},{value:.88,color:[249,201,50]},{value:1,color:[252,255,164]}]}),new ar({stops:[{value:0,color:[0,0,4]},{value:.13,color:[28,16,68]},{value:.25,color:[79,18,123]},{value:.38,color:[129,37,129]},{value:.5,color:[181,54,122]},{value:.63,color:[229,80,100]},{value:.75,color:[251,135,97]},{value:.88,color:[254,194,135]},{value:1,color:[252,253,191]}]}),new ar({stops:[{value:0,color:[13,8,135]},{value:.13,color:[75,3,161]},{value:.25,color:[125,3,168]},{value:.38,color:[168,34,150]},{value:.5,color:[203,70,121]},{value:.63,color:[229,107,93]},{value:.75,color:[248,148,65]},{value:.88,color:[253,195,40]},{value:1,color:[240,249,33]}]}),new ar({stops:[{value:0,color:[125,0,179]},{value:.13,color:[172,0,187]},{value:.25,color:[219,0,170]},{value:.38,color:[255,0,130]},{value:.5,color:[255,63,74]},{value:.63,color:[255,123,0]},{value:.75,color:[234,176,0]},{value:.88,color:[190,228,0]},{value:1,color:[147,255,0]}]}),new ar({stops:[{value:0,color:[125,0,179]},{value:.13,color:[116,0,218]},{value:.25,color:[98,74,237]},{value:.38,color:[68,146,231]},{value:.5,color:[0,204,197]},{value:.63,color:[0,247,146]},{value:.75,color:[0,255,88]},{value:.88,color:[40,255,8]},{value:1,color:[147,255,0]}]}),new ar({stops:[{value:0,color:[125,0,179]},{value:.1,color:[199,0,180]},{value:.2,color:[255,0,121]},{value:.3,color:[255,108,0]},{value:.4,color:[222,194,0]},{value:.5,color:[150,255,0]},{value:.6,color:[0,255,55]},{value:.7,color:[0,246,150]},{value:.8,color:[50,167,222]},{value:.9,color:[103,51,235]},{value:1,color:[124,0,186]}]}),new ar({stops:[{value:0,color:[40,26,44]},{value:.13,color:[59,49,90]},{value:.25,color:[64,76,139]},{value:.38,color:[63,110,151]},{value:.5,color:[72,142,158]},{value:.63,color:[85,174,163]},{value:.75,color:[120,206,163]},{value:.88,color:[187,230,172]},{value:1,color:[253,254,204]}]}),new ar({stops:[{value:0,color:[47,15,62]},{value:.13,color:[87,23,86]},{value:.25,color:[130,28,99]},{value:.38,color:[171,41,96]},{value:.5,color:[206,67,86]},{value:.63,color:[230,106,84]},{value:.75,color:[242,149,103]},{value:.88,color:[249,193,135]},{value:1,color:[254,237,176]}]}),new ar({stops:[{value:0,color:[18,36,20]},{value:.13,color:[25,63,41]},{value:.25,color:[24,91,59]},{value:.38,color:[13,119,72]},{value:.5,color:[18,148,80]},{value:.63,color:[80,173,89]},{value:.75,color:[132,196,122]},{value:.88,color:[175,221,162]},{value:1,color:[215,249,208]}]}),new ar({stops:[{value:0,color:[54,14,36]},{value:.13,color:[89,23,80]},{value:.25,color:[110,45,132]},{value:.38,color:[120,77,178]},{value:.5,color:[120,113,213]},{value:.63,color:[115,151,228]},{value:.75,color:[134,185,227]},{value:.88,color:[177,214,227]},{value:1,color:[230,241,241]}]}),new ar({stops:[{value:0,color:[30,4,110]},{value:.13,color:[47,14,176]},{value:.25,color:[41,45,236]},{value:.38,color:[25,99,212]},{value:.5,color:[68,131,200]},{value:.63,color:[114,156,197]}
822,{value:.75,color:[157,181,203]},{value:.88,color:[200,208,216]},{value:1,color:[241,237,236]}]}),new ar({stops:[{value:0,color:[60,9,18]},{value:.13,color:[100,17,27]},{value:.25,color:[142,20,29]},{value:.38,color:[177,43,27]},{value:.5,color:[192,87,63]},{value:.63,color:[205,125,105]},{value:.75,color:[216,162,148]},{value:.88,color:[227,199,193]},{value:1,color:[241,237,236]}]}),new ar({stops:[{value:0,color:[64,5,5]},{value:.13,color:[106,6,15]},{value:.25,color:[144,26,7]},{value:.38,color:[168,64,3]},{value:.5,color:[188,100,4]},{value:.63,color:[206,136,11]},{value:.75,color:[220,174,25]},{value:.88,color:[231,215,44]},{value:1,color:[248,254,105]}]}),new ar({stops:[{value:0,color:[51,20,24]},{value:.13,color:[90,32,35]},{value:.25,color:[129,44,34]},{value:.38,color:[159,68,25]},{value:.5,color:[182,99,19]},{value:.63,color:[199,134,22]},{value:.75,color:[212,171,35]},{value:.88,color:[221,210,54]},{value:1,color:[225,253,75]}]}),new ar({stops:[{value:0,color:[145,105,18]},{value:.13,color:[184,71,38]},{value:.25,color:[186,58,115]},{value:.38,color:[160,71,185]},{value:.5,color:[110,97,218]},{value:.63,color:[50,123,164]},{value:.75,color:[31,131,110]},{value:.88,color:[77,129,34]},{value:1,color:[145,105,18]}]}),new ar({stops:[{value:0,color:[42,24,108]},{value:.13,color:[33,50,162]},{value:.25,color:[15,90,145]},{value:.38,color:[40,118,137]},{value:.5,color:[59,146,135]},{value:.63,color:[79,175,126]},{value:.75,color:[120,203,104]},{value:.88,color:[193,221,100]},{value:1,color:[253,239,154]}]}),new ar({stops:[{value:0,color:[4,35,51]},{value:.13,color:[23,51,122]},{value:.25,color:[85,59,157]},{value:.38,color:[129,79,143]},{value:.5,color:[175,95,130]},{value:.63,color:[222,112,101]},{value:.75,color:[249,146,66]},{value:.88,color:[249,196,65]},{value:1,color:[232,250,91]}]}),new ar({stops:[{value:0,color:[34,31,27]},{value:.13,color:[65,50,41]},{value:.25,color:[98,69,52]},{value:.38,color:[131,89,57]},{value:.5,color:[161,112,59]},{value:.63,color:[185,140,66]},{value:.75,color:[202,174,88]},{value:.88,color:[216,209,126]},{value:1,color:[233,246,171]}]}),new ar({stops:[{value:0,color:[17,32,64]},{value:.13,color:[35,52,116]},{value:.25,color:[29,81,156]},{value:.38,color:[31,113,162]},{value:.5,color:[50,144,169]},{value:.63,color:[87,173,176]},{value:.75,color:[149,196,189]},{value:.88,color:[203,221,211]},{value:1,color:[254,251,230]}]}),new ar({stops:[{value:0,color:[23,35,19]},{value:.13,color:[24,64,38]},{value:.25,color:[11,95,45]},{value:.38,color:[39,123,35]},{value:.5,color:[95,146,12]},{value:.63,color:[152,165,18]},{value:.75,color:[201,186,69]},{value:.88,color:[233,216,137]},{value:1,color:[255,253,205]}]}),new ar({stops:[{value:0,color:[0,0,0]},{value:.07,color:[22,5,59]},{value:.13,color:[60,4,105]},{value:.2,color:[109,1,135]},{value:.27,color:[161,0,147]},{value:.33,color:[210,2,142]},{value:.4,color:[251,11,123]},{value:.47,color:[255,29,97]},{value:.53,color:[255,54,69]},{value:.6,color:[255,85,46]},{value:.67,color:[255,120,34]},{value:.73,color:[255,157,37]},{value:.8,color:[241,191,57]},{value:.87,color:[224,220,93]},{value:.93,color:[218,241,142]},{value:1,color:[227,253,198]}]}),new ar({stops:[{value:0,color:[0,32,77,255]},{value:.125,color:[5,54,110,255]},{value:.25,color:[65,77,108,255]},{value:.375,color:[97,100,111,255]},{value:.5,color:[125,124,121,255]},{value:.625,color:[156,149,120,255]},{value:.75,color:[190,175,111,255]},{value:.875,color:[225,204,94,255]},{value:1,color:[255,235,70,255]}]}),new ar({stops:[{value:0,color:[48,18,59,255]},{value:.125,color:[70,107,227,255]},{value:.25,color:[40,187,236,255]},{value:.375,color:[49,242,153,255]},{value:.5,color:[162,252,60,255]},{value:.625,color:[237,208,58,255]},{value:.75,color:[251,128,34,255]},{value:.875,color:[210,49,5,255]},{value:1,color:[122,4,3,255]}]}),new ar({stops:[{value:0,color:[250,235,221,0]},{value:.133,color:[250,235,221,255]},{value:.266,color:[246,170,130,255]},{value:.4,color:[240,96,67,255]},{value:.533,color:[203,27,79,255]},{value:.666,color:[132,30,90,255]},{value:.8,color:[63,27,68,255]},{value:1,color:[3,5,26,255]}]}),new ar({stops:[{value:0,color:[11,4,5,255]},{value:.125,color:[43,28,53,255]},{value:.25,color:[62,53,107,255]},{value:.375,color:[59,86,152,255]},{value:.5,color:[53,123,162,255]},{value:.625,color:[53,158,170,255]}
822,{value:.75,color:[73,193,173,255]},{value:.875,color:[150,221,181,255]},{value:1,color:[222,245,229,255]}]});pY();Ht.Map;Ht.Marker;Ht.Popup;Ht.Style;Ht.CanvasSource;Ht.GeoJSONSource;Ht.ImageSource;Ht.RasterTileSource;Ht.RasterDEMTileSource;Ht.VectorTileSource;Ht.VideoSource;Ht.NavigationControl;Ht.GeolocateControl;Ht.AttributionControl;Ht.LogoControl;Ht.ScaleControl;Ht.FullscreenControl;Ht.TerrainControl;Ht.BoxZoomHandler;Ht.ScrollZoomHandler;Ht.CooperativeGesturesHandler;Ht.KeyboardHandler;Ht.TwoFingersTouchPitchHandler;Ht.MapWheelEvent;Ht.MapTouchEvent;Ht.MapMouseEvent;Ht.config;Ht.getVersion;const{setRTLTextPlugin:rie,getRTLTextPluginStatus:nie,LngLat:iie,LngLatBounds:sie,MercatorCoordinate:oie,Evented:aie,AJAXError:lie,prewarm:cie,clearPrewarmedResources:uie,Hash:hie,Point:die,EdgeInsets:fie,DragRotateHandler:pie,DragPanHandler:mie,TwoFingersTouchZoomRotateHandler:gie,DoubleClickZoomHandler:yie,TwoFingersTouchZoomHandler:_ie,TwoFingersTouchRotateHandler:vie,getWorkerCount:bie,setWorkerCount:xie,getMaxParallelImageRequests:wie,setMaxParallelImageRequests:Sie,getWorkerUrl:Tie,setWorkerUrl:Cie,addSourceType:Eie,importScriptInWorkers:kie,addProtocol:Iie,removeProtocol:Pie}=Ht,ree=Zr(async()=>{let e,t;const{$apiClient:r}=Lr(),i=cl("maptilerStyle",()=>null);try{const{data:a}=([e,t]=el(()=>mR({client:r})),e=await e,t(),e);a!=null&&a.success&&(a!=null&&a.data)&&(a.data.maptilerKey&&(vi.apiKey=a.data.maptilerKey),a.data.maptilerStyle&&(i.value=a.data.maptilerStyle))}catch(a){console.error("Failed to fetch MapTiler keys from API:",a)}if(!document.querySelector('link[href="/maptiler-sdk.css"]')){const h=document.createElement("link");h.rel="stylesheet",h.href="/maptiler-sdk.css",h.onerror=()=>{Dn(()=>Promise.resolve({}),__vite__mapDeps([26]),import.meta.url).catch(d=>{console.error("Also failed to import CSS directly:",d)})},document.head.appendChild(h)}});var nee=Object.defineProperty,iee=(e,t,r)=>t in e?nee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lm=(e,t,r)=>iee(e,typeof t!="symbol"?t+"":t,r);const fP={"#":{pattern:/[0-9]/},"@":{pattern:/[a-zA-Z]/},"*":{pattern:/[a-zA-Z0-9]/}},pP=(e,t,r)=>e.replaceAll(t,"").replace(r,".").replace("..",".").replace(/[^.\d]/g,""),mP=(e,t,r)=>{var i;return new Intl.NumberFormat(((i=r.number)==null?void 0:i.locale)??"en",{minimumFractionDigits:e,maximumFractionDigits:t,roundingMode:"trunc"})},see=(e,t=!0,r)=>{var i,a,h,d;const o=((i=r.number)==null?void 0:i.unsigned)!==!0&&e.startsWith("-")?"-":"",y=((a=r.number)==null?void 0:a.fraction)??0;let w=mP(0,y,r);const T=w.formatToParts(1000.12),k=((h=T.find($=>$.type==="group"))==null?void 0:h.value)??" ",M=((d=T.find($=>$.type==="decimal"))==null?void 0:d.value)??".",P=pP(e,k,M);if(Number.isNaN(parseFloat(P)))return o;const L=P.split(".");if(L[1]!=null&&L[1].length>=1){const $=L[1].length<=y?L[1].length:y;w=mP($,y,r)}let O=w.format(parseFloat(P));return t?y>0&&P.endsWith(".")&&!P.slice(0,-1).includes(".")&&(O+=M):O=pP(O,k,M),o+O};class oee{constructor(t={}){lm(this,"opts",{}),lm(this,"memo",new Map);const r={...t};if(r.tokens!=null){r.tokens=r.tokensReplace?{...r.tokens}:{...fP,...r.tokens};for(const i of Object.values(r.tokens))typeof i.pattern=="string"&&(i.pattern=new RegExp(i.pattern))}else r.tokens=fP;Array.isArray(r.mask)&&(r.mask.length>1?r.mask=[...r.mask].sort((i,a)=>i.length-a.length):r.mask=r.mask[0]??""),r.mask===""&&(r.mask=null),this.opts=r}masked(t){return this.process(String(t),this.findMask(String(t)))}unmasked(t){return this.process(String(t),this.findMask(String(t)),!1)}isEager(){return this.opts.eager===!0}isReversed(){return this.opts.reversed===!0}completed(t){const r=this.findMask(String(t));if(this.opts.mask==null||r==null)return!1;const i=this.process(String(t),r).length;
vendor: 4,640 bytes, line 822
822return typeof this.opts.mask=="string"?i>=this.opts.mask.length:i>=r.length}findMask(t){const r=this.opts.mask;if(r==null)return null;if(typeof r=="string")return r;if(typeof r=="function")return r(t);const i=this.process(t,r.slice(-1).pop()??"",!1);return r.find(a=>this.process(t,a,!1).length>=i.length)??""}escapeMask(t){const r=[],i=[];return t.split("").forEach((a,h)=>{a==="!"&&t[h-1]!=="!"?i.push(h-i.length):r.push(a)}),{mask:r.join(""),escaped:i}}process(t,r,i=!0){if(this.opts.number!=null)return see(t,i,this.opts);if(r==null)return t;const a=`v=${t},mr=${r},m=${i?1:0}`;if(this.memo.has(a))return this.memo.get(a);const{mask:h,escaped:d}=this.escapeMask(r),o=[],y=this.opts.tokens!=null?this.opts.tokens:{},w=this.isReversed()?-1:1,T=this.isReversed()?"unshift":"push",k=this.isReversed()?0:h.length-1,M=this.isReversed()?()=>$>-1&&Z>-1:()=>$<h.length&&Z<t.length,P=H=>!this.isReversed()&&H<=k||this.isReversed()&&H>=k;let L,O=-1,$=this.isReversed()?h.length-1:0,Z=this.isReversed()?t.length-1:0,J=!1;for(;M();){const H=h.charAt($),U=y[H],V=(U==null?void 0:U.transform)!=null?U.transform(t.charAt(Z)):t.charAt(Z);if(!d.includes($)&&U!=null?(V.match(U.pattern)!=null?(o[T](V),U.repeated?(O===-1?O=$:$===k&&$!==O&&($=O-w),k===O&&($-=w)):U.multiple&&(J=!0,$-=w),$+=w):U.multiple?J&&($+=w,Z-=w,J=!1):V===L?L=void 0:U.optional&&($+=w,Z-=w),Z+=w):(i&&!this.isEager()&&o[T](H),V===H&&!this.isEager()?Z+=w:L=H,this.isEager()||($+=w)),this.isEager())for(;P($)&&(y[h.charAt($)]==null||d.includes($));){if(i){if(o[T](h.charAt($)),t.charAt(Z)===h.charAt($)){$+=w,Z+=w;continue}}else h.charAt($)===t.charAt(Z)&&(Z+=w);$+=w}}return this.memo.set(a,o.join("")),this.memo.get(a)}}const ED=e=>JSON.parse(e.replaceAll("'",'"')),aee=(e,t={})=>{const r={...t};e.dataset.maska!=null&&e.dataset.maska!==""&&(r.mask=lee(e.dataset.maska)),e.dataset.maskaEager!=null&&(r.eager=r_(e.dataset.maskaEager)),e.dataset.maskaReversed!=null&&(r.reversed=r_(e.dataset.maskaReversed)),e.dataset.maskaTokensReplace!=null&&(r.tokensReplace=r_(e.dataset.maskaTokensReplace)),e.dataset.maskaTokens!=null&&(r.tokens=cee(e.dataset.maskaTokens));const i={};return e.dataset.maskaNumberLocale!=null&&(i.locale=e.dataset.maskaNumberLocale),e.dataset.maskaNumberFraction!=null&&(i.fraction=parseInt(e.dataset.maskaNumberFraction)),e.dataset.maskaNumberUnsigned!=null&&(i.unsigned=r_(e.dataset.maskaNumberUnsigned)),(e.dataset.maskaNumber!=null||Object.values(i).length>0)&&(r.number=i),r},r_=e=>e!==""?!!JSON.parse(e):!0,lee=e=>e.startsWith("[")&&e.endsWith("]")?ED(e):e,cee=e=>{if(e.startsWith("{")&&e.endsWith("}"))return ED(e);const t={};return e.split("|").forEach(r=>{const i=r.split(":");t[i[0]]={pattern:new RegExp(i[1]),optional:i[2]==="optional",multiple:i[2]==="multiple",repeated:i[2]==="repeated"}}),t};class uee{constructor(t,r={}){lm(this,"items",new Map),lm(this,"eventAbortController"),lm(this,"onInput",i=>{if(i instanceof CustomEvent&&i.type==="input"&&!i.isTrusted&&!i.bubbles)return;const a=i.target,h=this.items.get(a);if(h===void 0)return;const d="inputType"in i&&i.inputType.startsWith("delete"),o=h.isEager(),y=d&&o&&h.unmasked(a.value)===""?"":a.value;this.fixCursor(a,d,()=>this.setValue(a,y))}),this.options=r,this.eventAbortController=new AbortController,this.init(this.getInputs(t))}update(t={}){this.options={...t},this.init(Array.from(this.items.keys()))}updateValue(t){var r;t.value!==""&&t.value!==((r=this.processInput(t))==null?void 0:r.masked)&&this.setValue(t,t.value)}destroy(){this.eventAbortController.abort(),this.items.clear()}init(t){const r=this.getOptions(this.options);for(const i of t){if(!this.items.has(i)){const{signal:h}=this.eventAbortController;i.addEventListener("input",this.onInput,{capture:!0,signal:h})}const a=new oee(aee(i,r));this.items.set(i,a),queueMicrotask(()=>this.updateValue(i)),i.selectionStart===null&&a.isEager()&&console.warn("Maska: input of `%s` type is not supported",i.type)}}getInputs(t){return typeof t=="string"?Array.from(document.querySelectorAll(t)):"length"in t?Array.from(t):[t]}getOptions(t){const{onMaska:r,preProcess:i,postProcess:a,...h}=t;return h}fixCursor(t,r,i){var a,h;const d=t.selectionStart,o=t.value;if(i(),d===null||d===o.length&&!r)return;const y=t.value,w=o.slice(0,d),T=y.slice(0,d),k=(a=this.processInput(t,w))==null?void 0:a.unmasked,M=(h=this.processInput(t,T))==null?void 0:h.unmasked;if(k===void 0||M===void 0)return;let P=d;w!==T&&(P+=r?y.length-o.length:k.length-M.length),t.setSelectionRange(P,P)}setValue(t,r){const i=this.processInput(t,r);i!==void 0&&(t.value=i.masked,this.options.onMaska!=null&&(Array.isArray(this.options.onMaska)?this.options.onMaska.forEac
822h(a=>a(i)):this.options.onMaska(i)),t.dispatchEvent(new CustomEvent("maska",{detail:i})),t.dispatchEvent(new CustomEvent("input",{detail:i.masked})))}processInput(t,r){const i=this.items.get(t);if(i===void 0)return;let a=r??t.value;this.options.preProcess!=null&&(a=this.options.preProcess(a));let h=i.masked(a);return this.options.postProcess!=null&&(h=this.options.postProcess(h)),{masked:h,unmasked:i.unmasked(a),completed:i.completed(a)}}}const Nx=new WeakMap,hee=(e,t)=>{if(e.arg==null||e.instance==null)return;const r="setup"in e.instance.$.type;e.arg in e.instance?e.instance[e.arg]=t:r&&console.warn("Maska: please expose `%s` using defineExpose",e.arg)},dee=(e,t)=>{var r;const i=e instanceof HTMLInputElement?e:e.querySelector("input");if(i==null||(i==null?void 0:i.type)==="file")return;let a={};if(t.value!=null&&(a=typeof t.value=="string"?{mask:t.value}:{...t.value}),t.arg!=null){const h=d=>{const o=t.modifiers.unmasked?d.unmasked:t.modifiers.completed?d.completed:d.masked;hee(t,o)};a.onMaska=a.onMaska==null?h:Array.isArray(a.onMaska)?[...a.onMaska,h]:[a.onMaska,h]}Nx.has(i)?(r=Nx.get(i))==null||r.update(a):Nx.set(i,new uee(i,a))},fee=Zr(e=>{e.vueApp.directive("maska",dee)}),pee=new Set(["sushi-friday.ru","www.sushi-friday.ru","pizza-friday.ru","www.pizza-friday.ru"]);function v2(e=window.location.hostname){return pee.has(e)}function mee(){return cl("revback-unread",()=>0)}function gee(e,t,r){var a,h,d;(a=e.onUnread)==null||a.call(e,o=>{t.value=o});let i=!1;(h=e.onToggle)==null||h.call(e,o=>{i&&!o&&r.value&&(r.value=!1),i=o}),r.value&&!((d=e.getOpen)!=null&&d.call(e))&&e.open()}const yee=Zr(()=>{var d;const e=gn();if(Mr(()=>e.currentRoute.value.query.support!=null,o=>{var y,w;o?(y=window.RevBack)==null||y.open():(w=window.RevBack)==null||w.close()},{immediate:!0}),!v2())return;const t=(d=Si().public.revbackWidgetKey)==null?void 0:d.trim();if(!t)return;Zd({script:[{src:"https://api.revback.ai/widget.js","data-widget-key":t,async:!0}]});const r=mee(),i=Dd("support");let a=0;const h=fw(()=>{const o=window.RevBack;o!=null&&o.onUnread&&o.onToggle?(clearInterval(h),gee(o,r,i)):++a>150&&clearInterval(h)},200)}),_ee=Zr(()=>{c$()}),vee=Zr(()=>{const t=Si().public.brand;typeof t=="string"&&t&&ZV("brand",t),Wd(()=>{const r=Oo();Mr(()=>{var i,a;return((a=(i=r.user)==null?void 0:i.session)==null?void 0:a.clientId)??null},i=>{mk(i?{id:i}:null)},{immediate:!0})})}),gP=new Map,bee=6e4,xee=/(^|\.)((sushi|pizza|test)-friday\.ru)$/i;function wee(e){try{const t=new URL(e,window.location.href);return t.origin===window.location.origin||xee.test(t.hostname)}catch{return!1}}function See(e){const t=e.target;if(!t||!(t instanceof Element))return;const r=t.tagName;if(!["IMG","LINK","SCRIPT"].includes(r))return;const i=t.src||t.href||"";if(!i||!wee(i))return;const a=`${r}:${i}`,h=Date.now(),d=gP.get(a)??0;if(h-d<bee)return;gP.set(a,h);let o="unknown";try{o=new URL(i,window.location.href).hostname}catch{}wm(`Resource load failed: ${i}`,{level:"warning",tags:{source:"resource",resourceType:r,url:i},fingerprint:["resource-load-failed",r,o]})}const Tee=Zr(()=>{window.addEventListener("error",See,!0)}),Cee=Zr(async()=>{var i;let e,t;const r=Oo();if(r.cookieToken&&((i=r.user.session)!=null&&i.clientId)&&!r.user.info)try{[e,t]=el(()=>r.fetchUserInfo()),await e,t()}catch(a){console.error("Failed to recover user session:",a)}});function Eee(e){return e===0}const kee=Zr(async()=>{let e,t;const r=_c();if(!Eee(r.restaurants.length))return;console.warn("[user.client] SSR не загрузил рестораны, запускаем клиентский fallback");const i=th();try{[e,t]=el(()=>r.fetchRestaurants()),await e,t()}catch{console.error("[user.client] fetchRestaurants failed");return}r.restaurants.length!==0&&i.fetchCities()});function xv(e){return e==="/auth"||e.startsWith("/auth/")}const kD=()=>{const e=ps("cookie_consent",{default:()=>null,maxAge:31536e3,sameSite:"lax"}),t=ps("isCookieAccepted_v2",{readonly:!0});return!e.value&&t.value&&(e.value="all"),e},Iee=Zr(()=>{if(!v2())return;const e=kD(),{getVkPixelId:t}=e5(),r=t(),i=gn();let a=!1;const h=()=>
822{if(a||xv(window.location.pathname))return;a=!0;const o=window;(o._tmr||(o._tmr=[])).push({id:r,type:"pageView",start:new Date().getTime()});const w=`tmr-code-${r}`;if(document.getElementById(w))return;const T=document.createElement("script");T.type="text/javascript",T.async=!0,T.id=w,T.src="https://top-fwz1.mail.ru/js/code.js";const k=document.getElementsByTagName("script")[0];k.parentNode.insertBefore(T,k)};if(e.value==="all")h();else{const o=Mr(e,y=>{y==="all"&&(h(),o())})}let d=!0;i.afterEach(o=>{var y;if(!a&&e.value==="all"&&(h(),a)){d=!1;return}if(d){d=!1;return}xv(o.path)||(y=window._tmr)==null||y.push({id:r,type:"pageView",start:new Date().getTime()})})}),Pee=Zr(()=>{if(!v2())return;const e=kD(),{getMetrikaCounterId:t,getMetrikaInitParams:r,hit:i,userParams:a}=QL(),h=t(),d=r(),o=gn();let y=null,w=!1;const T=()=>{if(w||xv(window.location.pathname))return;w=!0;const M=window;(function(P,L,O,$,Z,J,H){P[Z]=P[Z]||function(){(P[Z].a=P[Z].a||[]).push(arguments)},P[Z].l=1*new Date;for(let U=0;U<L.scripts.length;U++)if(L.scripts[U].src===$)return;J=L.createElement(O),H=L.getElementsByTagName(O)[0],J.async=1,J.src=$,H.parentNode.insertBefore(J,H)})(M,document,"script","https://mc.yandex.ru/metrika/tag.js","ym"),M.ym(h,"init",d),y!=null&&y.isAuthorized&&a({is_authorized:!0})};if(e.value==="all")T();else{const M=Mr(e,P=>{P==="all"&&(T(),M())})}let k=!0;o.afterEach(M=>{if(!w&&e.value==="all"&&(T(),w)){k=!1;return}if(k){k=!1;return}xv(M.path)||i(M.fullPath,document.title)}),Wd(()=>{const M=Oo();y=M,Mr(()=>M.isAuthorized,P=>{P&&a({is_authorized:!0})},{immediate:!0})})});function yP(e){const{error:t,instance:r,info:i}=e,a={info:i};if(r!=null&&r.$props){const h=Zn(),d=h?h.getOptions():null;d!=null&&d.attachProps&&r.$props!==!1&&(a.propsData=r.$props)}setTimeout(()=>{Qm(t,{captureContext:{contexts:{nuxt:a}},mechanism:{handled:!1,type:`auto.function.nuxt.${r?"vue":"app"}-error`}})})}const Aee=Zr({dependsOn:["sentry-client-config"],async setup(e){if(typeof __SENTRY_TRACING__>"u"||__SENTRY_TRACING__){const t=Zn();t&&"$router"in e&&t.addIntegration(C9({router:e.$router,routeLabel:"path"}))}e.hook("app:created",t=>{const r=Zn();r&&r.addIntegration(w9({...tn._sentryNuxtVueIntegrationOptions,app:t,attachErrorHandler:!1}))}),e.hook("app:error",t=>{nS(t)&&t!=null&&t.statusCode&&t.statusCode>=300&&t.statusCode<500||yP({error:t})}),e.hook("vue:error",(t,r,i)=>{yP({error:t,instance:r,info:i})})}}),Mee=[C6,k6,R6,AK,LK,zK,DK,OK,FK,$K,UK,VK,XK,rX,oX,cX,uX,dX,fX,gX,yX,DX,OX,ree,fee,yee,_ee,vee,Tee,Cee,kee,Iee,Pee,Aee],ID=(e="RouteProvider")=>Rr({name:e,props:{vnode:{type:Object,required:!0},route:{type:Object,required:!0},vnodeRef:Object,renderKey:String,trackRootNodes:Boolean},setup(t){const r=t.renderKey,i=t.route,a={};for(const h in t.route)Object.defineProperty(a,h,{get:()=>r===t.renderKey?t.route[h]:i[h],enumerable:!0});return Ns(Hm,da(a)),()=>cn(t.vnode,{ref:t.vnodeRef})}}),Ree=ID(),_P=new WeakMap,Lee=Rr({name:"NuxtPage",inheritAttrs:!1,props:{name:{type:String},transition:{type:[Boolean,Object],default:void 0},keepalive:{type:[Boolean,Object],default:void 0},route:{type:Object},pageKey:{type:[Function,String],default:null}},setup(e,{attrs:t,slots:r,expose:i}){const a=Lr(),h=It(),d=an(Hm,null);let o;i({pageRef:h});const y=an(TM,null);let w;const T=a.deferHydration();if(a.isHydrating){const M=a.hooks.hookOnce("app:error",T);gn().beforeEach(M)}e.pageKey&&Mr(()=>e.pageKey,(M,P)=>{M!==P&&a.callHook("page:loading:start")});let k=!1;{const M=gn().beforeResolve(()=>{k=!1});bc(()=>{M()})}return()=>cn(nR,{name:e.name,route:e.route,...t},{default:M=>{const P=Dee(d,M.route,M.Component),L=d&&d.matched.length===M.route.matched.length;if(!M.Component){if(w&&!L)return w;T();return}if(w&&y&&!y.isCurrent(M.route))return w;if(P&&d&&(!y||y!=null&&y.isCurrent(d)))return L?w:null;const O=k1(M,e.pageKey),$=Oee(d,M.route,M.Component);!a.isHydrating&&o===O&&!$&&(a.callHook("page:loading:end"),k=!0),o=O;const Z=!!(e.transition??M.route.meta.pageTransition??f1),J=Z&&zee([e.transition,M.route.meta.pageTransition,f1,{onAfterLeave:()=>{a.callHook("page:transition:finish",M.Component)}}]),H=e.keepalive??M.route.meta.keepalive??cN;return w=iR(Z&&J,jj(H,cn(Yw,{suspensible:!0,onPending:()=>a.callHook("page:start",M.Component),onResolve:()=>{Ri(()=>a.callHook("page:finish",M.Component).then(()=>
822{if(!k&&!$)return k=!0,a.callHook("page:loading:end")}).finally(T))}},{default:()=>{const U={key:O||void 0,vnode:r.default?Fee(r.default,M):M.Component,route:M.route,renderKey:O||void 0,trackRootNodes:Z,vnodeRef:h};if(!H)return cn(Ree,U);const V=M.Component.type,te=V;let ce=_P.get(te);return ce||(ce=ID(V.name||V.__name),_P.set(te,ce)),cn(ce,U)}}))).default(),w}})}});function zee(e){const t=e.filter(Boolean).map(r=>({...r,onAfterLeave:r.onAfterLeave?uS(r.onAfterLeave):void 0}));return Gd(...t)}function Dee(e,t,r){if(!e)return!1;const i=t.matched.findIndex(a=>{var h;return((h=a.components)==null?void 0:h.default)===(r==null?void 0:r.type)});return!i||i===-1?!1:t.matched.slice(0,i).some((a,h)=>{var d,o,y;return((d=a.components)==null?void 0:d.default)!==((y=(o=e.matched[h])==null?void 0:o.components)==null?void 0:y.default)})||r&&k1({route:t,Component:r})!==k1({route:e,Component:r})}function Oee(e,t,r){return e?t.matched.findIndex(a=>{var h;return((h=a.components)==null?void 0:h.default)===(r==null?void 0:r.type)})<t.matched.length-1:!1}function Fee(e,t){const r=e(t);return r.length===1?cn(r[0]):cn(Cn,void 0,r)}const Bee=Rr({name:"LayoutLoader",inheritAttrs:!1,props:{name:String,layoutProps:Object},setup(e,t){return()=>cn(oc[e.name],e.layoutProps,t.slots)}}),Nee={name:{type:[String,Boolean,Object],default:null},fallback:{type:[String,Object],default:null}},jee=Rr({name:"NuxtLayout",inheritAttrs:!1,props:Nee,setup(e,t){const r=Lr(),i=an(Hm),a=i===$s()?Dj():i,h=it(()=>{let y=ot(e.name)??a.meta.layout??"default";return y&&!(y in oc)&&e.fallback&&(y=ot(e.fallback)),y}),d=It();t.expose({layoutRef:d});const o=r.deferHydration();if(r.isHydrating){const y=r.hooks.hookOnce("app:error",o);gn().beforeEach(y)}return()=>{const y=h.value&&h.value in oc,w=a.meta.layoutTransition??lN;return iR(y&&w,{default:()=>cn(Yw,{suspensible:!0,onResolve:()=>{Ri(o)}},{default:()=>cn($ee,{layoutProps:ln(t.attrs,{ref:d}),key:h.value||void 0,name:h.value,shouldProvide:!e.name,hasTransition:!!w},t.slots)})}).default()}}}),$ee=Rr({name:"NuxtLayoutProvider",inheritAttrs:!1,props:{name:{type:[String,Boolean]},layoutProps:{type:Object},hasTransition:{type:Boolean},shouldProvide:{type:Boolean}},setup(e,t){const r=e.name;return e.shouldProvide&&Ns(TM,{isCurrent:i=>r===(i.meta.layout??"default")}),()=>{var i,a;return!r||typeof r=="string"&&!(r in oc)?(a=(i=t.slots).default)==null?void 0:a.call(i):cn(Bee,{key:r,layoutProps:e.layoutProps,name:r},t.slots)}}}),Uee={slots:{root:"relative group overflow-hidden bg-default shadow-lg rounded-lg ring ring-default p-4 flex gap-2.5 focus:outline-none",wrapper:"w-0 flex-1 flex flex-col",title:"text-sm font-medium text-highlighted",description:"text-sm text-muted",icon:"shrink-0 size-5",avatar:"shrink-0",avatarSize:"2xl",actions:"flex gap-1.5 shrink-0",progress:"absolute inset-x-0 bottom-0 h-1 z-[-1]",close:"p-0"},variants:{color:{primary:{root:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary",icon:"text-primary",progress:"bg-primary"},secondary:{root:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary",icon:"text-secondary",progress:"bg-secondary"},success:{root:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success",icon:"text-success",progress:"bg-success"},info:{root:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info",icon:"text-info",progress:"bg-info"},warning:{root:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning",icon:"text-warning",progress:"bg-warning"},error:{root:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error",icon:"text-error",progress:"bg-error"},neutral:{root:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted",icon:"text-highlighted",progress:"bg-inverted"}},orientation:{horizontal:{root:"items-center",actions:"items-center"},vertical:{root:"items-start",actions:"items-start mt-2.5"}},title:{true:{description:"mt-1"}}},defaultVariants:{color:"primary"}},Vee={__name:"Toast",props:{as:{type:null,required:!1},title:{type:[String,Object,Function],required:!1},description:{type:[String,Object,Function],required:!1},icon:{type:String,required:!1},avatar:{type:Object,required:!1},color:{type:null,required:!1},orientation:{type:null,required:!1,default:"vertical"},actions:{type:Array,required:!1},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:String,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},type:{type:String,required:!1},duration:{type:Number,required:!1}},emits:["escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd","update:open"],setup(e,{expose:t,emit:r}){const i=e,a=r,h=dA(),{t:d}=fK(),o=Us(),y=JH(cg(i,"as","defaultOpen","open","duration","type"),a),w=it(()=>{var M;return co({extend:co(Uee),...((M=o.ui)==null?void 0:M.toast)||{}})({color:i.color,orientation:i.orientation,title:!!i.title||!!h.title})}),T=It(),k=It(0);return js(()=>{T.value&&setTimeout(()=>{var M;k.value=(M=T.value.$el.getBoundingClientRect())==null?void 0:M.height},0)}),t({height:k}),(M,P)=>{var L;
822return Ft(),Kt(ot(dZ),ln({ref_key:"el",ref:T},ot(y),{"data-orientation":e.orientation,class:w.value.root({class:[i.class,(L=i.ui)==null?void 0:L.root]}),style:{"--height":k.value}}),{default:dr(({remaining:O,duration:$})=>{var Z,J,H,U,V,te,ce,fe,Se;return[Nr(M.$slots,"leading",{},()=>{var xe,et,ze;return[e.avatar?(Ft(),Kt(iz,ln({key:0,size:((xe=i.ui)==null?void 0:xe.avatarSize)||w.value.avatarSize()},e.avatar,{class:w.value.avatar({class:(et=i.ui)==null?void 0:et.avatar})}),null,16,["size","class"])):e.icon?(Ft(),Kt(cv,{key:1,name:e.icon,class:bi(w.value.icon({class:(ze=i.ui)==null?void 0:ze.icon}))},null,8,["name","class"])):ai("",!0)]}),Co("div",{class:bi(w.value.wrapper({class:(Z=i.ui)==null?void 0:Z.wrapper}))},[e.title||h.title?(Ft(),Kt(ot(fZ),{key:0,class:bi(w.value.title({class:(J=i.ui)==null?void 0:J.title}))},{default:dr(()=>[Nr(M.$slots,"title",{},()=>[typeof e.title=="function"?(Ft(),Kt(Tu(e.title()),{key:0})):typeof e.title=="object"?(Ft(),Kt(Tu(e.title),{key:1})):(Ft(),Ki(Cn,{key:2},[Id(Mo(e.title),1)],64))])]),_:3},8,["class"])):ai("",!0),e.description||h.description?(Ft(),Kt(ot(uZ),{key:1,class:bi(w.value.description({class:(H=i.ui)==null?void 0:H.description}))},{default:dr(()=>[Nr(M.$slots,"description",{},()=>[typeof e.description=="function"?(Ft(),Kt(Tu(e.description()),{key:0})):typeof e.description=="object"?(Ft(),Kt(Tu(e.description),{key:1})):(Ft(),Ki(Cn,{key:2},[Id(Mo(e.description),1)],64))])]),_:3},8,["class"])):ai("",!0),e.orientation==="vertical"&&((U=e.actions)!=null&&U.length||h.actions)?(Ft(),Ki("div",{key:2,class:bi(w.value.actions({class:(V=i.ui)==null?void 0:V.actions}))},[Nr(M.$slots,"actions",{},()=>[(Ft(!0),Ki(Cn,null,R_(e.actions,(xe,et)=>(Ft(),Kt(ot(eI),{key:et,"alt-text":xe.label||"Action","as-child":"",onClick:P[0]||(P[0]=a_(()=>{},["stop"]))},{default:dr(()=>[Sr(__,ln({size:"xs",color:e.color},{ref_for:!0},xe),null,16,["color"])]),_:2},1032,["alt-text"]))),128))])],2)):ai("",!0)],2),e.orientation==="horizontal"&&((te=e.actions)!=null&&te.length||h.actions)||e.close?(Ft(),Ki("div",{key:0,class:bi(w.value.actions({class:(ce=i.ui)==null?void 0:ce.actions,orientation:"horizontal"}))},[e.orientation==="horizontal"&&((fe=e.actions)!=null&&fe.length||h.actions)?Nr(M.$slots,"actions",{key:0},()=>[(Ft(!0),Ki(Cn,null,R_(e.actions,(xe,et)=>(Ft(),Kt(ot(eI),{key:et,"alt-text":xe.label||"Action","as-child":"",onClick:P[1]||(P[1]=a_(()=>{},["stop"]))},{default:dr(()=>[Sr(__,ln({size:"xs",color:e.color},{ref_for:!0},xe),null,16,["color"])]),_:2},1032,["alt-text"]))),128))]):ai("",!0),e.close||h.close?(Ft(),Kt(ot(F5),{key:1,"as-child":""},{default:dr(()=>[Nr(M.$slots,"close",{ui:w.value},()=>{var xe;return[e.close?(Ft(),Kt(__,ln({key:0,icon:e.closeIcon||ot(o).ui.icons.close,size:"md",color:"neutral",variant:"link","aria-label":ot(d)("toast.close")},typeof e.close=="object"?e.close:{},{class:w.value.close({class:(xe=i.ui)==null?void 0:xe.close}),onClick:P[2]||(P[2]=a_(()=>{},["stop"]))}),null,16,["icon","aria-label","class"])):ai("",!0)]})]),_:3})):ai("",!0)],2)):ai("",!0),O>0&&$?(Ft(),Ki("div",{key:1,class:bi(w.value.progress({class:(Se=i.ui)==null?void 0:Se.progress})),style:fl({width:`${O/$*100}%`})},null,6)):ai("",!0)]}),_:3},16,["data-orientation","class","style"])}}},qee={slots:{viewport:"fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-(--height) focus:outline-none",base:"pointer-events-auto absolute inset-x-0 z-(--index) transform-(--transform) data-[expanded=false]:data-[front=false]:h-(--front-height) data-[expanded=false]:data-[front=false]:*:invisible data-[state=closed]:animate-[toast-closed_200ms_ease-in-out] data-[state=closed]:data-[expanded=false]:data-[front=false]:animate-[toast-collapsed-closed_200ms_ease-in-out] data-[swipe=move]:transition-none transition-[transform,translate,height] duration-200 ease-out"},variants:{position:{"top-left":{viewport:"left-4"},"top-center":{viewport:"left-1/2 transform -translate-x-1/2"},"top-right":{viewport:"right-4"},"bottom-left":{viewport:"left-4"},"bottom-center":{viewport:"left-1/2 transform -translate-x-1/2"},"bottom-right":{viewport:"right-4"}},swipeDirection:{up:"data-[swipe=end]:animate-[toast-slide-up_200ms_ease-out]",right:"data-[swipe=end]:animate-[toast-slide-right_200ms_ease-out]",down:"data-[swipe=end]:animate-[toast-slide-down_200ms_ease-out]",left:"data-[swipe=end]:animate-[toast-slide-left_200ms_ease-out]"}},compoundVariants:[{position:["top-left","top-center","top-right"],class:{viewport:"top-4",base:"top-0 data-[state=open]:animate-[slide-in-from-top_200ms_ease-in-out]"}},{position:["bottom-left","bottom-center","bottom-right"],class:{viewport:"bottom-4",base:"bottom-0 data-[state=open]:animate-[slide-in-from-bottom_200ms_ease-in-out]"}},{swipeDirection:["left","right"],class:"data-[swipe=move]:translate-x-(--reka-toast-swipe-move-x) data-[swipe=end]:translate-x-(--reka-toast-swipe-end-x) data-[swipe=cancel]:translate-x-0"},{swipeDirection:["up","down"],class:"data-[swipe=move]:translate-y-(--reka-toast-swipe-move-y) data-[swipe=end]:translate-y-(--reka-toast-swipe-end-y) data-[swipe=cancel]:translate-y-0"}],defaultVariants:{position:"bottom-right"}},Gee={name:"Toaster"},Hee=Object.assign(Gee,{props:{position:{type:null,required:!1},expand:{type:Boolean,required:!1,default:!0},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},class:{type:null,required:!1},ui:{type:null,required:!1},label:{type:String,required:!1},duration:{type:Number,required:!1,default:5e3},swipeThreshold:{type:Number,required:!1}},setup(e){const t=e,{toasts:r,remove:i}=pw(),a=Us(),h=af(cg(t,"duration","label","swipeThreshold")),d=pK(Fs(()=>t.portal)),o=it(()=>{switch(t.position){case"top-center":return"up";case"top-right":case"bottom-right":return"right";case"bottom-center":return"down";case"top-left":case"bottom-left":return"left"}return"right"}),y=it(()=>{var $;return co({extend:co(qee),...(($=a.ui)==null?void 0:$.toaster)||{}})({position:t.position,swipeDirection:o.value})});function w($,Z){$||i(Z)}const T=It(!1),k=it(()=>t.expand||T.value),M=It([]),P=it(()=>M.value.reduce(($,{height:Z})=>$+Z+16,0)),L=it(()=>{var $;return(($=M.value[M.value.length-1])==null?void 0:$.height)||0});function O($){return M.value.slice($+1).reduce((Z,{height:J})=>Z+J+16,0)}return($,Z)=>(Ft(),Kt(ot(eZ),ln({"swipe-direction":o.value},ot(h)),{default:dr(()=>[Nr($.$slots,"default"),(Ft(!0),Ki(Cn,null,R_(ot(r),(J,H)=>(Ft(),Kt(Vee,ln({key:J.id,ref_for:!0,ref_key:"refs",ref:M},{ref_for:!0},ot($5)(J,["id","close"]),{close:J.close,"data-expanded":k.value,"data-front":!k.value&&H===ot(r).length-1,style:{"--index":H-ot(r).length+ot(r).length,"--before":ot(r).length-1-H,"--offset":O(H),"--scale":k.value?"1":"calc(1 - var(--before) * var(--scale-factor))","--translate":k.value?"calc(var(--offset) * var(--translate-factor))":"
822calc(var(--before) * var(--gap))","--transform":"translateY(var(--translate)) scale(var(--scale))"},class:[y.value.base(),{"cursor-pointer":!!J.onClick}],"onUpdate:open":U=>w(U,J.id),onClick:U=>J.onClick&&J.onClick(J)}),null,16,["close","data-expanded","data-front","style","class","onUpdate:open","onClick"]))),128)),Sr(ot(hZ),xa(Ku(ot(d))),{default:dr(()=>{var J,H,U;return[Sr(ot(mZ),{"data-expanded":k.value,class:bi(y.value.viewport({class:[t.class,(J=t.ui)==null?void 0:J.viewport]})),style:fl({"--scale-factor":"0.05","--translate-factor":(H=e.position)!=null&&H.startsWith("top")?"1px":"-1px","--gap":(U=e.position)!=null&&U.startsWith("top")?"16px":"-16px","--front-height":`${L.value}px`,"--height":`${P.value}px`}),onMouseenter:Z[0]||(Z[0]=V=>T.value=!0),onMouseleave:Z[1]||(Z[1]=V=>T.value=!1)},null,8,["data-expanded","class","style"])]}),_:1},16)]),_:3},16,["swipe-direction"]))}});function Zee(){const e=da([]),t=(o,y)=>{const{props:w,defaultOpen:T,destroyOnClose:k}=y||{},M=Mi({id:Symbol(""),isOpen:!!T,component:Nm(o),isMounted:!!T,destroyOnClose:!!k,props:w||{}});return e.push(M),{...M,result:new Promise(()=>{}),open:P=>r(M.id,P),close:P=>i(M.id,P),patch:P=>h(M.id,P)}},r=(o,y)=>{const w=d(o);return y&&h(w.id,y),w.isOpen=!0,w.isMounted=!0,{id:o,isMounted:w.isMounted,isOpen:w.isOpen,result:new Promise(T=>{w.resolvePromise=T})}},i=(o,y)=>{const w=d(o);w.isOpen=!1,w.resolvePromise&&(w.resolvePromise(y),w.resolvePromise=void 0)},a=o=>{const y=d(o);if(y.isMounted=!1,y.destroyOnClose){const w=e.findIndex(T=>T.id===o);e.splice(w,1)}},h=(o,y)=>{const w=d(o);Object.entries(y).forEach(([T,k])=>{w.props[T]=k})},d=o=>{const y=e.find(w=>w.id===o);if(!y)throw new Error("Overlay not found");return y};return{overlays:e,open:r,close:i,create:t,patch:h,unMount:a}}const Wee=B5(Zee),Kee={__name:"OverlayProvider",setup(e){const{overlays:t,unMount:r,close:i}=Wee(),a=it(()=>t.filter(o=>o.isMounted)),h=o=>{i(o),r(o)},d=(o,y)=>{i(o,y)};return(o,y)=>(Ft(!0),Ki(Cn,null,R_(a.value,w=>(Ft(),Kt(Tu(w.component),ln({key:w.id},{ref_for:!0},w.props,{open:w.isOpen,"onUpdate:open":T=>w.isOpen=T,onClose:T=>d(w.id,T),"onAfter:leave":T=>h(w.id)}),null,16,["open","onUpdate:open","onClose","onAfter:leave"]))),128))}},Xee={name:"App"},Yee=Object.assign(Xee,{props:{tooltip:{type:Object,required:!1},toaster:{type:[Object,null],required:!1},locale:{type:null,required:!1},portal:{type:null,required:!1,default:"body"},scrollBody:{type:[Boolean,Object],required:!1},nonce:{type:String,required:!1}},setup(e){const t=e,r=af(cg(t,"scrollBody")),i=Fs(()=>t.tooltip),a=Fs(()=>t.toaster),h=Fs(()=>t.locale);Ns(oz,h);const d=Fs(()=>t.portal);return Ns(dw,d),(o,y)=>{var w,T;return Ft(),Kt(ot(NH),ln({"use-id":()=>pF(),dir:(w=h.value)==null?void 0:w.dir,locale:(T=h.value)==null?void 0:T.code},ot(r)),{default:dr(()=>[Sr(ot(yZ),xa(Ku(i.value)),{default:dr(()=>[e.toaster!==null?(Ft(),Kt(Hee,xa(ln({key:0},a.value)),{default:dr(()=>[Nr(o.$slots,"default")]),_:3},16)):Nr(o.$slots,"default",{key:1}),Sr(Kee)]),_:3},16)]),_:3},16,["use-id","dir","locale"])}}}),Jee=(e,t)=>{const[r,i]=e;let a=!1;for(let h=0,d=t.length-1;h<t.length;d=h++){const{longitude:o,latitude:y}=t[h],{longitude:w,latitude:T}=t[d];y>i!=T>i&&r<(w-o)*(i-y)/(T-y)+o&&(a=!a)}return a},$d=(e,t,r,i)=>{const h=(r-e)*Math.PI/180,d=(i-t)*Math.PI/180,o=Math.sin(h/2)*Math.sin(h/2)+Math.cos(e*Math.PI/180)*Math.cos(r*Math.PI/180)*Math.sin(d/2)*Math.sin(d/2);return 6371*(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)))},Qee=(e,t,r)=>{const i=r.filter(a=>{var h;return(h=a.deliveryZones)==null?void 0:h.some(d=>Jee([e,t],d))});return i.length?[...i].sort((a,h)=>{const d=$d(t,e,a.latitude,a.longitude),o=$d(t,e,h.latitude,h.longitude);return d!==o?d-o:a.id.localeCompare(h.id)})[0]:null},ete=(e,t,r)=>r.length?[...r].sort((i,a)=>{const h=$d(t,e,i.latitude,i.longitude),d=$d(t,e,a.latitude,a.longitude);return h!==d?h-d:i.id.localeCompare(a.id)})[0]:null,tte=()=>{const e=th(),t=Si(),{currentBrand:r}=sf(),i=(...P)=>{},a=()=>t.public.defaultCity==="Москва"?[37.6173,55.7558]:t.public.defaultCity==="Копейск"?[61.62176,55.114683]:[37.6173,55.7558],h=(P,L)=>{try{i("createMap:start",{hasContainer:!!P,center:L==null?void 0:L.center,zoom:L==null?void 0:L.zoom});const O={version:8,sources:{osm:{type:"raster",tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256,attribution:"© OpenStreetMap contributors"}},layers:[{id:"osm",type:"raster",source:"osm"}]},$=new TD({container:P,style:(L==null?void 0:L.style)||cl("maptilerStyle").value||Ru.STREETS,center:(L==null?void 0:L.center)||e.currentCity&&e.currentCity.coords||a(),zoom:(L==null?void 0:L.zoom)||12,language:"ru",attributionControl:!1,navigationControl:!1,geolocateControl:!1,scaleControl:!1,fullscreenControl:!1});return $.on("error",Z=>{console.error("MapTiler style error, switching to fallback:",Z);try{$.setStyle(O)}catch(J){console.error("Fallback style error:",J)}}),$.on("styleimagemissing",Z=>{const H=new ImageData(64,64);for(let U=0;U<H.data.length;U+=4)H.data[U]=0,H.data[U+1]=0,H.data[U+2]=0,H.data[U+3]=0;$.addImage(Z.id,H,{sdf:!0,pixelRatio:1})}),$.on("load",()=>{console.log("Map loaded successfully"),i("createMap:event:load",{center:$.getCenter(),zoom:$.getZoom()})}),$}catch(O){throw console.error("Error creating map:",O),O}},d=(P,L)=>{if(P)try{i("addDeliveryZones:start",{restaurantsCount:L.length}
822),L.forEach(O=>{O.deliveryZones&&O.deliveryZones.length>0&&(i("addDeliveryZones:restaurant",{restaurantId:O.id,zonesCount:O.deliveryZones.length}),O.deliveryZones.forEach(($,Z)=>{const J=`delivery-zone-${O.id}-${Z}`,H=`delivery-zone-layer-${O.id}-${Z}`;try{const U=$.map(te=>[te.longitude,te.latitude]);if(U.length>0){const te=U[0],ce=U[U.length-1];(te[0]!==ce[0]||te[1]!==ce[1])&&U.push(te)}const V={type:"Feature",geometry:{type:"Polygon",coordinates:[U]}};P.getSource(J)||(P.addSource(J,{type:"geojson",data:V}),i("addDeliveryZones:sourceAdded",{sourceId:J,layerId:H,pointsCount:U.length}),P.addLayer({id:H,type:"fill",source:J,paint:{"fill-color":"#fbbf24","fill-opacity":.3}}),P.addLayer({id:`${H}-outline`,type:"line",source:J,paint:{"line-color":"#f59e0b","line-width":2,"line-opacity":.8}}))}catch(U){console.warn("Error adding delivery zone:",U,O.name),i("addDeliveryZones:zoneError",{restaurantId:O.id,zoneIndex:Z,zoneError:U})}}))})}catch(O){console.error("Error adding delivery zones:",O)}},o=P=>{if(P)try{i("clearDeliveryZones:start");const L=P.getStyle();if(!L)return;const O=L.layers||[],$=L.sources||{};O.forEach(Z=>{if(Z.id&&Z.id.includes("delivery-zone"))try{P.removeLayer(Z.id),i("clearDeliveryZones:layerRemoved",{layerId:Z.id})}catch{console.warn("Layer already removed:",Z.id)}}),Object.keys($).forEach(Z=>{if(Z.includes("delivery-zone"))try{P.removeSource(Z),i("clearDeliveryZones:sourceRemoved",{sourceId:Z})}catch{console.warn("Source already removed:",Z)}})}catch(L){console.warn("Error clearing delivery zones:",L)}},y=(P,L,O,$)=>{if(P)try{i("addRestaurantMarkers:start",{restaurantsCount:L.length,selectedRestaurantId:$});const Z=L.filter(J=>J.latitude&&J.longitude&&J.pickup);if(Z.length===0){i("addRestaurantMarkers:empty");return}if(P._restaurantMarkers&&P._restaurantMarkers.length>0){P._restaurantMarkers.forEach(J=>{const H=J.getElement(),U=H.dataset.restaurantId,V=Z.find(te=>te.id===U);if(V){const te=V.isClosed,ce=r.value.storeImage,fe=H.querySelector("img");fe&&(fe.src=ce,fe.style.filter=te?"grayscale(1)":"none")}else console.log("no restaurant",U)}),i("addRestaurantMarkers:reuseExisting",{markersCount:P._restaurantMarkers.length});return}w(P),Z.forEach(J=>{const H=J.isClosed,U=r.value.storeImage,V=document.createElement("div");V.className="restaurant-marker",V.dataset.restaurantId=J.id,V.innerHTML=`
823          <img
824            src="${U}"
825            alt="${H?"Закрытый ресторан":"Открытый ресторан"}"
826            style="
827              width: 72px;
828              height: 72px;
829              cursor: pointer;
830              transition: transform 0.2s ease;
831              filter: ${H?"grayscale(1)":"none"};
832            "
833          />
834        `,O&&V.addEventListener("click",ce=>{ce.stopPropagation(),i("addRestaurantMarkers:markerClick",{restaurantId:J.id}),O(J)});const te=new CY({element:V,anchor:"center"}).setLngLat([J.longitude,J.latitude]);te.addTo(P),P._restaurantMarkers||(P._restaurantMarkers=[]),P._restaurantMarkers.push(te),i("addRestaurantMarkers:markerAdded",{restaurantId:J.id})})}catch(Z){console.error("Error adding restaurant markers:",Z)}},w=P=>{if(P)try{P._restaurantMarkers&&(i("clearRestaurantMarkers:start",{markersCount:P._restaurantMarkers.length}),P._restaurantMarkers.forEach(L=>{L.remove()}),P._restaurantMarkers=[],i("clearRestaurantMarkers:done"))}catch(L){console.warn("Error clearing restaurant markers:",L)}};return{createMap:h,defaultCity:a,addDeliveryZones:d,clearDeliveryZones:o,addRestaurantMarkers:y,clearRestaurantMarkers:w,updateRestaurantMarkersSelection:(P,L)=>{P&&P._restaurantMarkers&&P._restaurantMarkers.forEach(O=>{const $=O.getElement();$.dataset.restaurantId,$.querySelector("img")})},findNearestRestaurant:(P,L,O)=>
834{if(i("findNearestRestaurant:start",{userLng:P,userLat:L,restaurantsCount:O.length}),!O.length)return null;const $=O.filter(Z=>Z.deliveryZones&&Z.deliveryZones.length>0);if($.length>0){const Z=Qee(P,L,$);if(Z){const J=$d(L,P,Z.latitude,Z.longitude);return i("findNearestRestaurant:foundByDeliveryZone",{restaurantId:Z.id,distance:J}),Z}}if(O.length>0){const Z=ete(P,L,O);if(Z){const J=$d(L,P,Z.latitude,Z.longitude);return i("findNearestRestaurant:foundByDistance",{restaurantId:Z.id,minDistance:J}),Z}}return null},getAddressByCoords:async(P,L)=>{try{i("getAddressByCoords:start",{lng:P,lat:L});const O=await _K("/api/dadata/geolocate/address",{method:"POST",body:{lat:L,lon:P}});if(O.suggestions&&O.suggestions.length>0){const $=O.suggestions[0];return i("getAddressByCoords:done",{address:$.value}),$.value||null}return i("getAddressByCoords:empty"),null}catch(O){return console.error("Error getting address:",O),null}},MapStyle:Ru}},rte=async({nearestRestaurant:e,currentCityName:t,enqueueGeoBatch:r,syncCityByName:i,onCitySyncRequested:a})=>{var o;if(!e)return null;r(e.id);const h=((o=e.city)==null?void 0:o.trim())||null;return!!h&&!K1(t??null,h)&&h&&(a==null||a({beforeCity:t??null,afterCity:h,restaurantId:e.id}),await i(h)),e};function jx(e,t){return t==="DELIVERY"?e.filter(r=>r.deliveryZones&&r.deliveryZones.length>0):e.filter(r=>r.pickup)}function nte(){const{findNearestRestaurant:e}=tte(),t=_c(),r=Sd(),i=th();return{checkAndSetNearestRestaurant:async(d,o,y="DELIVERY",w)=>{var M;const T=jx(t.restaurants,y),k=e(o,d,T)??null;return rte({nearestRestaurant:k,currentCityName:((M=i.currentCity)==null?void 0:M.name)??null,enqueueGeoBatch:P=>{r.enqueuePatch({restaurantId:P,...w??{}})},syncCityByName:async P=>{await i.selectCityAndSyncRoute(P,{source:"geo-batch"})},onCitySyncRequested:({beforeCity:P,afterCity:L,restaurantId:O})=>{}})},findNearestByOrderType:(d,o,y="DELIVERY")=>{const w=jx(t.restaurants,y);return e(o,d,w)??null},getRestaurantsByOrderType:jx}}function ite(){const e=$s(),t=e0(),r=_c(),i=th(),{findNearestByOrderType:a,checkAndSetNearestRestaurant:h}=nte();Mr(()=>{var d,o;return{citiesCount:i.cities.length,restaurantsCount:r.restaurants.length,receiptType:t.address.receiptType,addressLat:((d=t.address.deliveryAddress)==null?void 0:d.latitude)??null,addressLng:((o=t.address.deliveryAddress)==null?void 0:o.longitude)??null,routeCity:e.params.city??null,deliveryRestaurantId:t.address.restaurantId}},({restaurantsCount:d,receiptType:o,addressLat:y,addressLng:w,routeCity:T,deliveryRestaurantId:k})=>{const M=typeof T=="string"?T:null,P=k?r.findRestaurantById(k):null,L=n5(P);if(!Z9({cartCitySlug:H9(Sd().cart,r.restaurants),routeCitySlug:M}))return;if(o==="DELIVERY"&&!!L&&!!M&&L!==M&&!t.isDeliveryContextSyncInProgress&&!Sd().isUserGeoPending()){t.updateViewAddress(null),t.address.deliveryAddress=null;const Z=JL(r.currentRestaurant);t.setReceiptType(Z,"route_sync"),t.address.restaurantId=r.currentRestaurantId??null;return}if(d>0&&o==="DELIVERY"&&y&&w&&!Sd().isUserGeoPending()){const Z=a(y,w,"DELIVERY"),J=t.address.restaurantId;Z&&Z.id!==J&&(fs("restaurant_reconciled_for_delivery_address",{routeCity:e.params.city??null,correctRestaurantId:Z.id}),h(y,w,"DELIVERY"))}},{immediate:!0})}const ste=Rr({__name:"app",setup(e){var y;let t=null;const r=Oo(),i=mK();ite();const a=(y=Si().public.yandexWebmaster)==null?void 0:y.trim();a&&Zd({meta:[{name:"yandex-verification",content:a}]});const h=()=>{document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%",document.body.style.height="100%",document.body.style.overscrollBehavior="none",document.documentElement.style.overscrollBehavior="none"},d=()=>{document.body.style.overflow="",document.body.style.position="",document.body.style.width="",document.body.style.height="",document.body.style.overscrollBehavior="",document.documentElement.style.overscrollBehavior=""},o=()=>{const w=!!document.querySelector('[data-state="open"]'),T=!!document.querySelector('[data-state="closed"]');w||T?h():d()};return js(async()=>{window.addEventListener("pageshow",w=>{w.persisted&&(document.querySelector('[data-state="open"]')||d())}),t=new MutationObserver(()=>{o()}),t.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-state"]}),o()}),jo(()=>{r.isAuthorized?(i.fetchActiveOrders(),i.startActiveOrdersPolling()):i.clearOrders()}),bc(()=>{t&&(t.disconnect(),t=null),d()}),(w,T)=>{const k=Lee,M=jee,P=Yee;return Ft(),Kt(P,null,{default:dr(()=>[Sr(M,null,{default:dr(()=>[Sr(k)]),_:1})]),_:1})}}}),ote={base:"w-full max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8"},ate={__name:"Container",props:{as:{type:null,required:!1},class:{type:null,required:!1}},setup(e){const t=e,r=Us(),i=it(()=>{var a;return co({extend:co(ote),...((a=r.ui)==null?void 0:a.container)||{}})});return(a,h)=>(Ft(),Kt(ot(uo),{as:e.as,class:bi(i.value({class:t.class}))},{default:dr(()=>[Nr(a.$slots,"default")]),_:3},8,["as","class"]))}};function Aie(){var d,o;const e=Si(),t=th(),r=e.public.brand==="pizza"?"kop":"msk",i=((d=GS.find(y=>y.name===e.public.defaultCity))==null?void 0:d.url)||r,a=(o=t.currentCity)==null?void 0:o.url;return{brandFallbackSlug:r,defaultSlug:i,currentSlug:a,targetSlug:a||i}}function lte(){const t=Si().public.brand==="pizza"?"kop":"msk",r=ps("cityName",{default:()=>""}),i=GS.find(a=>a.name===r.value);return{targetSlug:i!=null&&i.url?"/"+(i==null?void 0:i.url):"/"+t}}const cte=(e,t)=>
834{const r=e.__vccOpts||e;for(const[i,a]of t)r[i]=a;return r},ute={class:"wrapper"},hte={class:"h-full"},dte={class:"error-page__wrapper h-full"},fte={class:"error-page h-full"},pte={class:"error-page__title flex flex-col items-center justify-center gap-3 h-full"},mte={key:0,class:"dev-only-block flex flex-col gap-2"},gte={class:"text-2xl font-bold text-white-100"},yte={__name:"error",props:{error:{type:Object,default:()=>({statusCode:404,message:"Такой страницы не существует",fatal:!0})}},setup(e){var a;const{targetSlug:t}=lte(),r=!1;v6({title:"Страница не найдена - 404",description:"Страница не найдена - 404",robots:"noindex, nofollow"});const i=e;return i.error&&Qm(i.error,{tags:{source:"error.vue",statusCode:String(((a=i.error)==null?void 0:a.statusCode)??"")}}),js(()=>{i.error&&console.error("Page error:",i.error)}),(h,d)=>{const o=__,y=ate;return Ft(),Ki("div",ute,[Co("main",hte,[Co("div",dte,[Sr(y,{class:"h-full"},{default:dr(()=>[Co("div",fte,[Co("div",pte,[d[0]||(d[0]=Co("h1",{class:"text-9xl font-bold text-white-100"}," 404 ",-1)),d[1]||(d[1]=Co("p",{сlass:"text-2xl font-bold text-white-100"}," Такой страницы не существует ",-1)),Sr(o,{class:"max-h-max mt-5",label:"На главную",to:ot(t)},null,8,["to"]),ot(r)?(Ft(),Ki("div",mte,[Co("p",gte," Code: "+Mo(e.error.statusCode)+", Message: "+Mo(e.error.message),1),Co("p",null,Mo(e.error.statusMessage)+": "+Mo(e.error.stack),1)])):ai("",!0)])])]),_:1})])])])}}},_te=cte(yte,[["__scopeId","data-v-fa8e9b23"]]),vte={key:0},vP={__name:"nuxt-root",setup(e){const t=()=>null,r=Lr(),i=r.deferHydration();if(r.isHydrating){const y=r.hooks.hookOnce("app:error",i);gn().beforeEach(y)}const a=!1;Ns(Hm,$s()),r.hooks.callHookWith(y=>y.map(w=>w()),"vue:setup");const h=Bv(),d=!1;uA((y,w,T)=>{if(r.hooks.callHook("vue:error",y,w,T).catch(k=>console.error("[nuxt] Error in `vue:error` hook",k)),nS(y)&&(y.fatal||y.unhandled))return r.runWithContext(()=>nc(y)),!1});const o=!1;return(y,w)=>(Ft(),Kt(Yw,{onResolve:ot(i)},{default:dr(()=>[ot(d)?(Ft(),Ki("div",vte)):ot(h)?(Ft(),Kt(ot(_te),{key:1,error:ot(h)},null,8,["error"])):ot(o)?(Ft(),Kt(ot(t),{key:2,context:ot(o)},null,8,["context"])):ot(a)?(Ft(),Kt(Tu(ot(a)),{key:3})):(Ft(),Kt(ot(ste),{key:4}))]),_:1},8,["onResolve"]))}};let bP;{let e;bP=async function(){var d,o;if(e)return e;const i=!!(((d=window.__NUXT__)==null?void 0:d.serverRendered)??((o=document.getElementById("__NUXT_DATA__"))==null?void 0:o.dataset.ssr)==="true")?rM(vP):a1(vP),a=mN({vueApp:i});async function h(y){var w;await a.callHook("app:error",y),(w=a.payload).error||(w.error=Hd(y))}i.config.errorHandler=h,a.hook("app:suspense:resolve",()=>{i.config.errorHandler===h&&(i.config.errorHandler=void 0)});try{await _N(a,Mee)}catch(y){h(y)}try{await a.hooks.callHook("app:created",i),await a.hooks.callHook("app:beforeMount",i),i.mount(dN),await a.hooks.callHook("app:mounted",i),await Ri()}catch(y){h(y)}return i},e=bP().catch(t=>{throw console.error("Error while mounting app:",t),t})}export{Qd as $,Fre as A,HU as B,kn as C,Kr as D,Ju as E,Pu as F,V8 as G,ZE as H,Q_ as I,ZU as J,ES as K,UU as L,Gv as M,jre as N,Vv as O,DR as P,zR as Q,Kd as R,tf as S,SL as T,wL as U,Jp as V,tne as W,Y8 as X,Zn as Y,Dre as Z,c_ as _,zV as a,dr as a$,Xd as a0,Yd as a1,tn as a2,kre as a3,O1 as a4,VE as a5,ma as a6,Pre as a7,en as a8,Bre as a9,vS as aA,Xre as aB,Yre as aC,N8 as aD,nne as aE,Kre as aF,$8 as aG,wS as aH,cc as aI,Mu as aJ,EL as aK,Jre as aL,Ire as aM,mq as aN,C9 as aO,Si as aP,Aie as aQ,gn as aR,v6 as aS,Zd as aT,Fv as aU,Ki as aV,Ft as aW,Rr as aX,sf as aY,Sr as aZ,Co as a_,Are as aa,Mre as ab,Rre as ac,eU as ad,q8 as ae,$R as af,JU as ag,Lre as ah,Ji as ai,rne as aj,Ar as ak,lo as al,_k as am,wc as an,F8 as ao,O8 as ap,B7 as aq,gq as ar,D7 as as,Np as at,ev as au,nl as av,Qi as aw,X8 as ax,zre as ay,Sq as az,ir as b,lne as b$,Id as b0,y8 as b1,Mo as b2,ot as b3,rre as b4,_c as b5,js as b6,it as b7,Cn as b8,R_ as b9,Dd as bA,Xr as bB,Hd as bC,wa as bD,Zu as bE,kd as bF,Ste as bG,z1 as bH,vne as bI,gne as bJ,vc as bK,Fd as bL,Bo as bM,FH as bN,$S as bO,n0 as bP,uo as bQ,Nr as bR,Yk as bS,ln as bT,E5 as bU,Ea as bV,bre as bW,Tu as bX,UH as bY,Qte as bZ,Kte as b_,Qv as ba,th as bb,$s as bc,IR as bd,pw as be,wm as bf,Ri as bg,Qm as bh,Dn as bi,ai as bj,cte as bk,It as bl,Ca as bm,_K as bn,dS as bo,Mr as bp,Wu as bq,Kt as br,a_ as bs,fl as bt,bi as bu,QP as bv,__ as bw,Lte as bx,o1 as by,Jte as bz,kS as c,Wee as c$,jo as c0,eh as c1,EF as c2,xa as c3,Ku as c4,YH as c5,af as c6,dne as c7,Tne as c8,JH as c9,k4 as cA,jte as cB,cv as cC,Us as cD,co as cE,kD as cF,mK as cG,tte as cH,Xte as cI,dA as cJ,ere as cK,cg as cL,Ane as cM,pF as cN,AZ as cO,IZ as cP,iz as cQ,Mne as cR,an as cS,Ns as cT,LZ as cU,zZ as cV,OZ as cW,MZ as cX,RZ as cY,DZ as cZ,H$ as c_,pne as ca,cne as cb,mne as cc,_ne as cd,Xu as ce,Lr as cf,ps as cg,IN as ch,Y$ as ci,DS as cj,Rne as ck,J$ as cl,X$ as cm,xR as cn,W$ as co,Q$ as cp,K$ as cq,fw as cr,Sd as cs,e0 as ct,one as cu,cl as cv,Oo as cw,Mi as cx,bc as cy,S4 as cz,CS as d,fK as d$,vK as d0,gM as d1,pK as d2,Fs as d3,Gd as d4,$te as d5,Z$ as d6,$u as d7,fs as d8,ane as d9,V$ as dA,U$ as dB,BZ as dC,RF as dD,$d as dE,Jee as dF,Tre as dG,r5 as dH,K1 as dI,Lne as dJ,Wd as dK,Z9 as dL,H9 as dM,t8 as dN,Sre as dO,ci as dP,TZ as dQ,_Z as dR,iw as dS,kne as dT,En as dU,xZ as dV,Ine as dW,Pne as dX,Ene as dY,q$ as dZ,t
834K as d_,n5 as da,wK as db,cR as dc,yR as dd,I9 as de,ine as df,Cre as dg,Ere as dh,cn as di,zte as dj,CY as dk,mee as dl,DE as dm,D$ as dn,PR as dp,e8 as dq,$$ as dr,F$ as ds,Nte as dt,B$ as du,sne as dv,N$ as dw,z$ as dx,O$ as dy,nte as dz,Vre as e,cA as e$,j$ as e0,G$ as e1,fF as e2,rA as e3,Yn as e4,pre as e5,EP as e6,Pte as e7,lre as e8,TF as e9,Gte as eA,Ute as eB,gre as eC,Hte as eD,cre as eE,xte as eF,Vd as eG,kte as eH,jw as eI,qd as eJ,Vm as eK,xre as eL,Dte as eM,Bte as eN,Fte as eO,Ote as eP,sre as eQ,wre as eR,g4 as eS,Bw as eT,pa as eU,ll as eV,ire as eW,so as eX,pc as eY,Nm as eZ,oA as e_,C_ as ea,xd as eb,Yw as ec,Iu as ed,Cte as ee,vre as ef,Ete as eg,Qw as eh,Ite as ei,No as ej,$m as ek,Ai as el,Cv as em,Sa as en,fre as eo,a1 as ep,ZF as eq,Yte as er,HF as es,rM as et,jm as eu,Uw as ev,$4 as ew,Vte as ex,qte as ey,Zte as ez,iV as f,aA as f0,uA as f1,PF as f2,IF as f3,kF as f4,Vw as f5,iF as f6,Mte as f7,VP as f8,Ate as f9,Y4 as fA,y4 as fB,are as fC,YF as fD,Wte as fE,ore as fF,Rte as fG,une as fH,HH as fI,bne as fJ,wx as fK,R5 as fL,xne as fM,wne as fN,Sne as fO,VH as fP,hne as fQ,yne as fR,fne as fS,LH as fT,Dne as fU,zne as fV,Az as fW,hv as fX,A_ as fa,nre as fb,nB as fc,vC as fd,dre as fe,fm as ff,kC as fg,ure as fh,fc as fi,da as fj,KF as fk,hre as fl,wte as fm,Up as fn,qr as fo,tre as fp,Tte as fq,_re as fr,mre as fs,V4 as ft,XF as fu,yre as fv,tA as fw,KA as fx,J4 as fy,XA as fz,Uv as g,Ure as h,Gre as i,Xm as j,yU as k,Ore as l,Nre as m,qv as n,XV as o,ene as p,Zre as q,vL as r,NR as s,$re as t,uc as u,qre as v,uL as w,Hre as x,Qre as y,Wre as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.