(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();/** * @vue/shared v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function Vx(e,t){const r=new Set(e.split(","));return t?n=>r.has(n.toLowerCase()):n=>r.has(n)}const Ja={},Wd=[],Wl=()=>{},vk=()=>!1,I_=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),jx=e=>e.startsWith("onUpdate:"),iu=Object.assign,Hx=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},mk=Object.prototype.hasOwnProperty,aa=(e,t)=>mk.call(e,t),wi=Array.isArray,Xd=e=>M_(e)==="[object Map]",oC=e=>M_(e)==="[object Set]",Bi=e=>typeof e=="function",ds=e=>typeof e=="string",b0=e=>typeof e=="symbol",Ao=e=>e!==null&&typeof e=="object",sC=e=>(Ao(e)||Bi(e))&&Bi(e.then)&&Bi(e.catch),uC=Object.prototype.toString,M_=e=>uC.call(e),gk=e=>M_(e).slice(8,-1),lC=e=>M_(e)==="[object Object]",Gx=e=>ds(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Jv=Vx(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),P_=e=>{const t=Object.create(null);return r=>t[r]||(t[r]=e(r))},_k=/-(\w)/g,i0=P_(e=>e.replace(_k,(t,r)=>r?r.toUpperCase():"")),yk=/\B([A-Z])/g,E0=P_(e=>e.replace(yk,"-$1").toLowerCase()),cC=P_(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ky=P_(e=>e?`on${cC(e)}`:""),xp=(e,t)=>!Object.is(e,t),Qy=(e,t)=>{for(let r=0;r{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:r})},xk=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let u7;const fC=()=>u7||(u7=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function O_(e){if(wi(e)){const t={};for(let r=0;r{if(r){const n=r.split(Ek);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function k_(e){let t="";if(ds(e))t=e;else if(wi(e))for(let r=0;rds(e)?e:e==null?"":wi(e)||Ao(e)&&(e.toString===uC||!Bi(e.toString))?JSON.stringify(e,pC,2):String(e),pC=(e,t)=>t&&t.__v_isRef?pC(e,t.value):Xd(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,i],o)=>(r[Jy(n,o)+" =>"]=i,r),{})}:oC(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>Jy(r))}:b0(t)?Jy(t):Ao(t)&&!wi(t)&&!lC(t)?String(t):t,Jy=(e,t="")=>{var r;return b0(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};/** * @vue/reactivity v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let vc;class Ck{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=vc,!t&&vc&&(this.index=(vc.scopes||(vc.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const r=vc;try{return vc=this,t()}finally{vc=r}}}on(){vc=this}off(){vc=this.parent}stop(t){if(this._active){let r,n;for(r=0,n=this.effects.length;r=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),M1()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=pp,r=_1;try{return pp=!0,_1=this,this._runnings++,l7(this),this.fn()}finally{c7(this),this._runnings--,_1=r,pp=t}}stop(){var t;this.active&&(l7(this),c7(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function Mk(e){return e.value}function l7(e){e._trackId++,e._depsLength=0}function c7(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const r=new Map;return r.cleanup=e,r.computed=t,r},g6=new WeakMap,y1=Symbol(""),_6=Symbol("");function $u(e,t,r){if(pp&&_1){let n=g6.get(e);n||g6.set(e,n=new Map);let i=n.get(r);i||n.set(r,i=_C(()=>n.delete(r))),mC(_1,i)}}function rh(e,t,r,n,i,o){const a=g6.get(e);if(!a)return;let u=[];if(t==="clear")u=[...a.values()];else if(r==="length"&&wi(e)){const c=Number(n);a.forEach((f,m)=>{(m==="length"||!b0(m)&&m>=c)&&u.push(f)})}else switch(r!==void 0&&u.push(a.get(r)),t){case"add":wi(e)?Gx(r)&&u.push(a.get("length")):(u.push(a.get(y1)),Xd(e)&&u.push(a.get(_6)));break;case"delete":wi(e)||(u.push(a.get(y1)),Xd(e)&&u.push(a.get(_6)));break;case"set":Xd(e)&&u.push(a.get(y1));break}Xx();for(const c of u)c&&gC(c,4);Yx()}const Pk=Vx("__proto__,__v_isRef,__isVue"),yC=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(b0)),f7=Ok();function Ok(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...r){const n=va(this);for(let o=0,a=this.length;o{e[t]=function(...r){I1(),Xx();const n=va(this)[t].apply(this,r);return Yx(),M1(),n}}),e}function kk(e){const t=va(this);return $u(t,"has",e),t.hasOwnProperty(e)}class xC{constructor(t=!1,r=!1){this._isReadonly=t,this._isShallow=r}get(t,r,n){const i=this._isReadonly,o=this._isShallow;if(r==="__v_isReactive")return!i;if(r==="__v_isReadonly")return i;if(r==="__v_isShallow")return o;if(r==="__v_raw")return n===(i?o?Wk:AC:o?SC:EC).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const a=wi(t);if(!i){if(a&&aa(f7,r))return Reflect.get(f7,r,n);if(r==="hasOwnProperty")return kk}const u=Reflect.get(t,r,n);return(b0(r)?yC.has(r):Pk(r))||(i||$u(t,"get",r),o)?u:Vu(u)?a&&Gx(r)?u:u.value:Ao(u)?i?TC(u):Kx(u):u}}class bC extends xC{constructor(t=!1){super(!1,t)}set(t,r,n,i){let o=t[r];if(!this._isShallow){const c=a0(o);if(!Vg(n)&&!a0(n)&&(o=va(o),n=va(n)),!wi(t)&&Vu(o)&&!Vu(n))return c?!1:(o.value=n,!0)}const a=wi(t)&&Gx(r)?Number(r)e,D_=e=>Reflect.getPrototypeOf(e);function L2(e,t,r=!1,n=!1){e=e.__v_raw;const i=va(e),o=va(t);r||(xp(t,o)&&$u(i,"get",t),$u(i,"get",o));const{has:a}=D_(i),u=n?Zx:r?Jx:lm;if(a.call(i,t))return u(e.get(t));if(a.call(i,o))return u(e.get(o));e!==i&&e.get(t)}function N2(e,t=!1){const r=this.__v_raw,n=va(r),i=va(e);return t||(xp(e,i)&&$u(n,"has",e),$u(n,"has",i)),e===i?r.has(e):r.has(e)||r.has(i)}function U2(e,t=!1){return e=e.__v_raw,!t&&$u(va(e),"iterate",y1),Reflect.get(e,"size",e)}function h7(e){e=va(e);const t=va(this);return D_(t).has.call(t,e)||(t.add(e),rh(t,"add",e,e)),this}function p7(e,t){t=va(t);const r=va(this),{has:n,get:i}=D_(r);let o=n.call(r,e);o||(e=va(e),o=n.call(r,e));const a=i.call(r,e);return r.set(e,t),o?xp(t,a)&&rh(r,"set",e,t):rh(r,"add",e,t),this}function d7(e){const t=va(this),{has:r,get:n}=D_(t);let i=r.call(t,e);i||(e=va(e),i=r.call(t,e)),n&&n.call(t,e);const o=t.delete(e);return i&&rh(t,"delete",e,void 0),o}function v7(){const e=va(this),t=e.size!==0,r=e.clear();return t&&rh(e,"clear",void 0,void 0),r}function z2(e,t){return function(n,i){const o=this,a=o.__v_raw,u=va(a),c=t?Zx:e?Jx:lm;return!e&&$u(u,"iterate",y1),a.forEach((f,m)=>n.call(i,c(f),c(m),o))}}function $2(e,t,r){return function(...n){const i=this.__v_raw,o=va(i),a=Xd(o),u=e==="entries"||e===Symbol.iterator&&a,c=e==="keys"&&a,f=i[e](...n),m=r?Zx:t?Jx:lm;return!t&&$u(o,"iterate",c?_6:y1),{next(){const{value:_,done:b}=f.next();return b?{value:_,done:b}:{value:u?[m(_[0]),m(_[1])]:m(_),done:b}},[Symbol.iterator](){return this}}}}function Hh(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Nk(){const e={get(o){return L2(this,o)},get size(){return U2(this)},has:N2,add:h7,set:p7,delete:d7,clear:v7,forEach:z2(!1,!1)},t={get(o){return L2(this,o,!1,!0)},get size(){return U2(this)},has:N2,add:h7,set:p7,delete:d7,clear:v7,forEach:z2(!1,!0)},r={get(o){return L2(this,o,!0)},get size(){return U2(this,!0)},has(o){return N2.call(this,o,!0)},add:Hh("add"),set:Hh("set"),delete:Hh("delete"),clear:Hh("clear"),forEach:z2(!0,!1)},n={get(o){return L2(this,o,!0,!0)},get size(){return U2(this,!0)},has(o){return N2.call(this,o,!0)},add:Hh("add"),set:Hh("set"),delete:Hh("delete"),clear:Hh("clear"),forEach:z2(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=$2(o,!1,!1),r[o]=$2(o,!0,!1),t[o]=$2(o,!1,!0),n[o]=$2(o,!0,!0)}),[e,r,t,n]}const[Uk,zk,$k,Vk]=Nk();function qx(e,t){const r=t?e?Vk:$k:e?zk:Uk;return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(aa(r,i)&&i in n?r:n,i,o)}const jk={get:qx(!1,!1)},Hk={get:qx(!1,!0)},Gk={get:qx(!0,!1)},EC=new WeakMap,SC=new WeakMap,AC=new WeakMap,Wk=new WeakMap;function Xk(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Yk(e){return e.__v_skip||!Object.isExtensible(e)?0:Xk(gk(e))}function Kx(e){return a0(e)?e:Qx(e,!1,Fk,jk,EC)}function Zk(e){return Qx(e,!1,Lk,Hk,SC)}function TC(e){return Qx(e,!0,Bk,Gk,AC)}function Qx(e,t,r,n,i){if(!Ao(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const a=Yk(e);if(a===0)return e;const u=new Proxy(e,a===2?n:r);return i.set(e,u),u}function Yd(e){return a0(e)?Yd(e.__v_raw):!!(e&&e.__v_isReactive)}function a0(e){return!!(e&&e.__v_isReadonly)}function Vg(e){return!!(e&&e.__v_isShallow)}function wC(e){return Yd(e)||a0(e)}function va(e){const t=e&&e.__v_raw;return t?va(t):e}function CC(e){return Object.isExtensible(e)&&$g(e,"__v_skip",!0),e}const lm=e=>Ao(e)?Kx(e):e,Jx=e=>Ao(e)?TC(e):e;class RC{constructor(t,r,n,i){this.getter=t,this._setter=r,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Wx(()=>t(this._value),()=>mg(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const t=va(this);return(!t._cacheable||t.effect.dirty)&&xp(t._value,t._value=t.effect.run())&&mg(t,4),IC(t),t.effect._dirtyLevel>=2&&mg(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function qk(e,t,r=!1){let n,i;const o=Bi(e);return o?(n=e,i=Wl):(n=e.get,i=e.set),new RC(n,i,o||!i,r)}function IC(e){var t;pp&&_1&&(e=va(e),mC(_1,(t=e.dep)!=null?t:e.dep=_C(()=>e.dep=void 0,e instanceof RC?e:void 0)))}function mg(e,t=4,r){e=va(e);const n=e.dep;n&&gC(n,t)}function Vu(e){return!!(e&&e.__v_isRef===!0)}function zv(e){return Kk(e,!1)}function Kk(e,t){return Vu(e)?e:new Qk(e,t)}class Qk{constructor(t,r){this.__v_isShallow=r,this.dep=void 0,this.__v_isRef=!0,this._rawValue=r?t:va(t),this._value=r?t:lm(t)}get value(){return IC(this),this._value}set value(t){const r=this.__v_isShallow||Vg(t)||a0(t);t=r?t:va(t),xp(t,this._rawValue)&&(this._rawValue=t,this._value=r?t:lm(t),mg(this,4))}}function jl(e){return Vu(e)?e.value:e}const Jk={get:(e,t,r)=>jl(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const i=e[t];return Vu(i)&&!Vu(r)?(i.value=r,!0):Reflect.set(e,t,r,n)}};function MC(e){return Yd(e)?e:new Proxy(e,Jk)}/** * @vue/runtime-core v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function dp(e,t,r,n){try{return n?e(...n):e()}catch(i){F_(i,t,r)}}function bc(e,t,r,n){if(Bi(e)){const o=dp(e,t,r,n);return o&&sC(o)&&o.catch(a=>{F_(a,t,r)}),o}const i=[];for(let o=0;o>>1,i=tu[n],o=fm(i);osf&&tu.splice(t,1)}function iD(e){wi(e)?Zd.push(...e):(!ap||!ap.includes(e,e.allowRecurse?p1+1:p1))&&Zd.push(e),OC()}function m7(e,t,r=cm?sf+1:0){for(;rfm(r)-fm(n));if(Zd.length=0,ap){ap.push(...t);return}for(ap=t,p1=0;p1e.id==null?1/0:e.id,aD=(e,t)=>{const r=fm(e)-fm(t);if(r===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return r};function DC(e){y6=!1,cm=!0,tu.sort(aD);try{for(sf=0;sfds(A)?A.trim():A)),_&&(i=r.map(xk))}let u,c=n[u=Ky(t)]||n[u=Ky(i0(t))];!c&&o&&(c=n[u=Ky(E0(t))]),c&&bc(c,e,6,i);const f=n[u+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,bc(f,e,6,i)}}function FC(e,t,r=!1){const n=t.emitsCache,i=n.get(e);if(i!==void 0)return i;const o=e.emits;let a={},u=!1;if(!Bi(e)){const c=f=>{const m=FC(f,t,!0);m&&(u=!0,iu(a,m))};!r&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!u?(Ao(e)&&n.set(e,null),null):(wi(o)?o.forEach(c=>a[c]=null):iu(a,o),Ao(e)&&n.set(e,a),a)}function B_(e,t){return!e||!I_(t)?!1:(t=t.slice(2).replace(/Once$/,""),aa(e,t[0].toLowerCase()+t.slice(1))||aa(e,E0(t))||aa(e,t))}let ll=null,BC=null;function jg(e){const t=ll;return ll=e,BC=e&&e.type.__scopeId||null,t}function sD(e,t=ll,r){if(!t||e._n)return e;const n=(...i)=>{n._d&&w7(-1);const o=jg(t);let a;try{a=e(...i)}finally{jg(o),n._d&&w7(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function e3(e){const{type:t,vnode:r,proxy:n,withProxy:i,props:o,propsOptions:[a],slots:u,attrs:c,emit:f,render:m,renderCache:_,data:b,setupState:A,ctx:w,inheritAttrs:R}=e;let P,k;const L=jg(e);try{if(r.shapeFlag&4){const V=i||n,G=V;P=of(m.call(G,V,_,o,A,b,w)),k=c}else{const V=t;P=of(V.length>1?V(o,{attrs:c,slots:u,emit:f}):V(o,null)),k=t.props?c:uD(c)}}catch(V){rm.length=0,F_(V,e,1),P=vp(hm)}let B=P;if(k&&R!==!1){const V=Object.keys(k),{shapeFlag:G}=B;V.length&&G&7&&(a&&V.some(jx)&&(k=lD(k,a)),B=o0(B,k))}return r.dirs&&(B=o0(B),B.dirs=B.dirs?B.dirs.concat(r.dirs):r.dirs),r.transition&&(B.transition=r.transition),P=B,jg(L),P}const uD=e=>{let t;for(const r in e)(r==="class"||r==="style"||I_(r))&&((t||(t={}))[r]=e[r]);return t},lD=(e,t)=>{const r={};for(const n in e)(!jx(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function cD(e,t,r){const{props:n,children:i,component:o}=e,{props:a,children:u,patchFlag:c}=t,f=o.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&c>=0){if(c&1024)return!0;if(c&16)return n?g7(n,a,f):!!a;if(c&8){const m=t.dynamicProps;for(let _=0;_e.__isSuspense;function dD(e,t){t&&t.pendingBranch?wi(e)?t.effects.push(...e):t.effects.push(e):iD(e)}const vD=Symbol.for("v-scx"),mD=()=>_g(vD),V2={};function t3(e,t,r){return LC(e,t,r)}function LC(e,t,{immediate:r,deep:n,flush:i,once:o,onTrack:a,onTrigger:u}=Ja){if(t&&o){const K=t;t=(...Z)=>{K(...Z),G()}}const c=vu,f=K=>n===!0?K:d1(K,n===!1?1:void 0);let m,_=!1,b=!1;if(Vu(e)?(m=()=>e.value,_=Vg(e)):Yd(e)?(m=()=>f(e),_=!0):wi(e)?(b=!0,_=e.some(K=>Yd(K)||Vg(K)),m=()=>e.map(K=>{if(Vu(K))return K.value;if(Yd(K))return f(K);if(Bi(K))return dp(K,c,2)})):Bi(e)?t?m=()=>dp(e,c,2):m=()=>(A&&A(),bc(e,c,3,[w])):m=Wl,t&&n){const K=m;m=()=>d1(K())}let A,w=K=>{A=B.onStop=()=>{dp(K,c,4),A=B.onStop=void 0}},R;if(z_)if(w=Wl,t?r&&bc(t,c,3,[m(),b?[]:void 0,w]):m(),i==="sync"){const K=mD();R=K.__watcherHandles||(K.__watcherHandles=[])}else return Wl;let P=b?new Array(e.length).fill(V2):V2;const k=()=>{if(!(!B.active||!B.dirty))if(t){const K=B.run();(n||_||(b?K.some((Z,ve)=>xp(Z,P[ve])):xp(K,P)))&&(A&&A(),bc(t,c,3,[K,P===V2?void 0:b&&P[0]===V2?[]:P,w]),P=K)}else B.run()};k.allowRecurse=!!t;let L;i==="sync"?L=k:i==="post"?L=()=>Du(k,c&&c.suspense):(k.pre=!0,c&&(k.id=c.uid),L=()=>t5(k));const B=new Wx(m,Wl,L),V=Ik(),G=()=>{B.stop(),V&&Hx(V.effects,B)};return t?r?k():P=B.run():i==="post"?Du(B.run.bind(B),c&&c.suspense):B.run(),R&&R.push(G),G}function gD(e,t,r){const n=this.proxy,i=ds(e)?e.includes(".")?NC(n,e):()=>n[e]:e.bind(n,n);let o;Bi(t)?o=t:(o=t.handler,r=t);const a=Um(this),u=LC(i,o.bind(n),r);return a(),u}function NC(e,t){const r=t.split(".");return()=>{let n=e;for(let i=0;i0){if(r>=t)return e;r++}if(n=n||new Set,n.has(e))return e;if(n.add(e),Vu(e))d1(e.value,t,r,n);else if(wi(e))for(let i=0;i{d1(i,t,r,n)});else if(lC(e))for(const i in e)d1(e[i],t,r,n);return e}function _D(e,t){if(ll===null)return e;const r=$_(ll)||ll.proxy,n=e.dirs||(e.dirs=[]);for(let i=0;i!!e.type.__asyncLoader,UC=e=>e.type.__isKeepAlive;function yD(e,t){zC(e,"a",t)}function xD(e,t){zC(e,"da",t)}function zC(e,t,r=vu){const n=e.__wdc||(e.__wdc=()=>{let i=r;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(L_(t,n,r),r){let i=r.parent;for(;i&&i.parent;)UC(i.parent.vnode)&&bD(n,t,r,i),i=i.parent}}function bD(e,t,r,n){const i=L_(t,e,n,!0);VC(()=>{Hx(n[t],i)},r)}function L_(e,t,r=vu,n=!1){if(r){const i=r[e]||(r[e]=[]),o=t.__weh||(t.__weh=(...a)=>{if(r.isUnmounted)return;I1();const u=Um(r),c=bc(t,r,e,a);return u(),M1(),c});return n?i.unshift(o):i.push(o),o}}const uh=e=>(t,r=vu)=>(!z_||e==="sp")&&L_(e,(...n)=>t(...n),r),ED=uh("bm"),$C=uh("m"),SD=uh("bu"),AD=uh("u"),TD=uh("bum"),VC=uh("um"),wD=uh("sp"),CD=uh("rtg"),RD=uh("rtc");function ID(e,t=vu){L_("ec",e,t)}function MD(e,t,r,n){let i;const o=r&&r[n];if(wi(e)||ds(e)){i=new Array(e.length);for(let a=0,u=e.length;at(a,u,void 0,o&&o[u]));else{const a=Object.keys(e);i=new Array(a.length);for(let u=0,c=a.length;ue?JC(e)?$_(e)||e.proxy:x6(e.parent):null,em=iu(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=>x6(e.parent),$root:e=>x6(e.root),$emit:e=>e.emit,$options:e=>r5(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,t5(e.update)}),$nextTick:e=>e.n||(e.n=tD.bind(e.proxy)),$watch:e=>gD.bind(e)}),r3=(e,t)=>e!==Ja&&!e.__isScriptSetup&&aa(e,t),PD={get({_:e},t){const{ctx:r,setupState:n,data:i,props:o,accessCache:a,type:u,appContext:c}=e;let f;if(t[0]!=="$"){const A=a[t];if(A!==void 0)switch(A){case 1:return n[t];case 2:return i[t];case 4:return r[t];case 3:return o[t]}else{if(r3(n,t))return a[t]=1,n[t];if(i!==Ja&&aa(i,t))return a[t]=2,i[t];if((f=e.propsOptions[0])&&aa(f,t))return a[t]=3,o[t];if(r!==Ja&&aa(r,t))return a[t]=4,r[t];b6&&(a[t]=0)}}const m=em[t];let _,b;if(m)return t==="$attrs"&&$u(e,"get",t),m(e);if((_=u.__cssModules)&&(_=_[t]))return _;if(r!==Ja&&aa(r,t))return a[t]=4,r[t];if(b=c.config.globalProperties,aa(b,t))return b[t]},set({_:e},t,r){const{data:n,setupState:i,ctx:o}=e;return r3(i,t)?(i[t]=r,!0):n!==Ja&&aa(n,t)?(n[t]=r,!0):aa(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:i,propsOptions:o}},a){let u;return!!r[a]||e!==Ja&&aa(e,a)||r3(t,a)||(u=o[0])&&aa(u,a)||aa(n,a)||aa(em,a)||aa(i.config.globalProperties,a)},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:aa(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}};function _7(e){return wi(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}let b6=!0;function OD(e){const t=r5(e),r=e.proxy,n=e.ctx;b6=!1,t.beforeCreate&&y7(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:a,watch:u,provide:c,inject:f,created:m,beforeMount:_,mounted:b,beforeUpdate:A,updated:w,activated:R,deactivated:P,beforeDestroy:k,beforeUnmount:L,destroyed:B,unmounted:V,render:G,renderTracked:K,renderTriggered:Z,errorCaptured:ve,serverPrefetch:Ie,expose:de,inheritAttrs:se,components:le,directives:ye,filters:ke}=t;if(f&&kD(f,n,null),a)for(const Gt in a){const Zt=a[Gt];Bi(Zt)&&(n[Gt]=Zt.bind(r))}if(i){const Gt=i.call(r,r);Ao(Gt)&&(e.data=Kx(Gt))}if(b6=!0,o)for(const Gt in o){const Zt=o[Gt],st=Bi(Zt)?Zt.bind(r,r):Bi(Zt.get)?Zt.get.bind(r,r):Wl,tt=!Bi(Zt)&&Bi(Zt.set)?Zt.set.bind(r):Wl,dt=fF({get:st,set:tt});Object.defineProperty(n,Gt,{enumerable:!0,configurable:!0,get:()=>dt.value,set:nt=>dt.value=nt})}if(u)for(const Gt in u)jC(u[Gt],n,r,Gt);if(c){const Gt=Bi(c)?c.call(r):c;Reflect.ownKeys(Gt).forEach(Zt=>{UD(Zt,Gt[Zt])})}m&&y7(m,e,"c");function Lt(Gt,Zt){wi(Zt)?Zt.forEach(st=>Gt(st.bind(r))):Zt&&Gt(Zt.bind(r))}if(Lt(ED,_),Lt($C,b),Lt(SD,A),Lt(AD,w),Lt(yD,R),Lt(xD,P),Lt(ID,ve),Lt(RD,K),Lt(CD,Z),Lt(TD,L),Lt(VC,V),Lt(wD,Ie),wi(de))if(de.length){const Gt=e.exposed||(e.exposed={});de.forEach(Zt=>{Object.defineProperty(Gt,Zt,{get:()=>r[Zt],set:st=>r[Zt]=st})})}else e.exposed||(e.exposed={});G&&e.render===Wl&&(e.render=G),se!=null&&(e.inheritAttrs=se),le&&(e.components=le),ye&&(e.directives=ye)}function kD(e,t,r=Wl){wi(e)&&(e=E6(e));for(const n in e){const i=e[n];let o;Ao(i)?"default"in i?o=_g(i.from||n,i.default,!0):o=_g(i.from||n):o=_g(i),Vu(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):t[n]=o}}function y7(e,t,r){bc(wi(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function jC(e,t,r,n){const i=n.includes(".")?NC(r,n):()=>r[n];if(ds(e)){const o=t[e];Bi(o)&&t3(i,o)}else if(Bi(e))t3(i,e.bind(r));else if(Ao(e))if(wi(e))e.forEach(o=>jC(o,t,r,n));else{const o=Bi(e.handler)?e.handler.bind(r):t[e.handler];Bi(o)&&t3(i,o,e)}}function r5(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:a}}=e.appContext,u=o.get(t);let c;return u?c=u:!i.length&&!r&&!n?c=t:(c={},i.length&&i.forEach(f=>Hg(c,f,a,!0)),Hg(c,t,a)),Ao(t)&&o.set(t,c),c}function Hg(e,t,r,n=!1){const{mixins:i,extends:o}=t;o&&Hg(e,o,r,!0),i&&i.forEach(a=>Hg(e,a,r,!0));for(const a in t)if(!(n&&a==="expose")){const u=DD[a]||r&&r[a];e[a]=u?u(e[a],t[a]):t[a]}return e}const DD={data:x7,props:b7,emits:b7,methods:$v,computed:$v,beforeCreate:du,created:du,beforeMount:du,mounted:du,beforeUpdate:du,updated:du,beforeDestroy:du,beforeUnmount:du,destroyed:du,unmounted:du,activated:du,deactivated:du,errorCaptured:du,serverPrefetch:du,components:$v,directives:$v,watch:BD,provide:x7,inject:FD};function x7(e,t){return t?e?function(){return iu(Bi(e)?e.call(this,this):e,Bi(t)?t.call(this,this):t)}:t:e}function FD(e,t){return $v(E6(e),E6(t))}function E6(e){if(wi(e)){const t={};for(let r=0;r1)return r&&Bi(t)?t.call(n&&n.proxy):t}}function zD(e,t,r,n=!1){const i={},o={};$g(o,U_,1),e.propsDefaults=Object.create(null),GC(e,t,i,o);for(const a in e.propsOptions[0])a in i||(i[a]=void 0);r?e.props=n?i:Zk(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function $D(e,t,r,n){const{props:i,attrs:o,vnode:{patchFlag:a}}=e,u=va(i),[c]=e.propsOptions;let f=!1;if((n||a>0)&&!(a&16)){if(a&8){const m=e.vnode.dynamicProps;for(let _=0;_{c=!0;const[b,A]=WC(_,t,!0);iu(a,b),A&&u.push(...A)};!r&&t.mixins.length&&t.mixins.forEach(m),e.extends&&m(e.extends),e.mixins&&e.mixins.forEach(m)}if(!o&&!c)return Ao(e)&&n.set(e,Wd),Wd;if(wi(o))for(let m=0;m-1,A[1]=R<0||w-1||aa(A,"default"))&&u.push(_)}}}const f=[a,u];return Ao(e)&&n.set(e,f),f}function E7(e){return e[0]!=="$"&&!Jv(e)}function S7(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function A7(e,t){return S7(e)===S7(t)}function T7(e,t){return wi(t)?t.findIndex(r=>A7(r,e)):Bi(t)&&A7(t,e)?0:-1}const XC=e=>e[0]==="_"||e==="$stable",n5=e=>wi(e)?e.map(of):[of(e)],VD=(e,t,r)=>{if(t._n)return t;const n=sD((...i)=>n5(t(...i)),r);return n._c=!1,n},YC=(e,t,r)=>{const n=e._ctx;for(const i in e){if(XC(i))continue;const o=e[i];if(Bi(o))t[i]=VD(i,o,n);else if(o!=null){const a=n5(o);t[i]=()=>a}}},ZC=(e,t)=>{const r=n5(t);e.slots.default=()=>r},jD=(e,t)=>{if(e.vnode.shapeFlag&32){const r=t._;r?(e.slots=va(t),$g(t,"_",r)):YC(t,e.slots={})}else e.slots={},t&&ZC(e,t);$g(e.slots,U_,1)},HD=(e,t,r)=>{const{vnode:n,slots:i}=e;let o=!0,a=Ja;if(n.shapeFlag&32){const u=t._;u?r&&u===1?o=!1:(iu(i,t),!r&&u===1&&delete i._):(o=!t.$stable,YC(t,i)),a=t}else t&&(ZC(e,t),a={default:1});if(o)for(const u in i)!XC(u)&&a[u]==null&&delete i[u]};function A6(e,t,r,n,i=!1){if(wi(e)){e.forEach((b,A)=>A6(b,t&&(wi(t)?t[A]:t),r,n,i));return}if(gg(n)&&!i)return;const o=n.shapeFlag&4?$_(n.component)||n.component.proxy:n.el,a=i?null:o,{i:u,r:c}=e,f=t&&t.r,m=u.refs===Ja?u.refs={}:u.refs,_=u.setupState;if(f!=null&&f!==c&&(ds(f)?(m[f]=null,aa(_,f)&&(_[f]=null)):Vu(f)&&(f.value=null)),Bi(c))dp(c,u,12,[a,m]);else{const b=ds(c),A=Vu(c);if(b||A){const w=()=>{if(e.f){const R=b?aa(_,c)?_[c]:m[c]:c.value;i?wi(R)&&Hx(R,o):wi(R)?R.includes(o)||R.push(o):b?(m[c]=[o],aa(_,c)&&(_[c]=m[c])):(c.value=[o],e.k&&(m[e.k]=c.value))}else b?(m[c]=a,aa(_,c)&&(_[c]=a)):A&&(c.value=a,e.k&&(m[e.k]=a))};a?(w.id=-1,Du(w,r)):w()}}}const Du=dD;function GD(e){return WD(e)}function WD(e,t){const r=fC();r.__VUE__=!0;const{insert:n,remove:i,patchProp:o,createElement:a,createText:u,createComment:c,setText:f,setElementText:m,parentNode:_,nextSibling:b,setScopeId:A=Wl,insertStaticContent:w}=e,R=(ge,Be,ft,At=null,bt=null,$t=null,Mr=void 0,tr=null,lr=!!Be.dynamicChildren)=>{if(ge===Be)return;ge&&!sv(ge,Be)&&(At=pn(ge),nt(ge,bt,$t,!0),ge=null),Be.patchFlag===-2&&(lr=!1,Be.dynamicChildren=null);const{type:or,ref:Q,shapeFlag:Ge}=Be;switch(or){case N_:P(ge,Be,ft,At);break;case hm:k(ge,Be,ft,At);break;case i3:ge==null&&L(Be,ft,At,Mr);break;case mc:le(ge,Be,ft,At,bt,$t,Mr,tr,lr);break;default:Ge&1?G(ge,Be,ft,At,bt,$t,Mr,tr,lr):Ge&6?ye(ge,Be,ft,At,bt,$t,Mr,tr,lr):(Ge&64||Ge&128)&&or.process(ge,Be,ft,At,bt,$t,Mr,tr,lr,Qt)}Q!=null&&bt&&A6(Q,ge&&ge.ref,$t,Be||ge,!Be)},P=(ge,Be,ft,At)=>{if(ge==null)n(Be.el=u(Be.children),ft,At);else{const bt=Be.el=ge.el;Be.children!==ge.children&&f(bt,Be.children)}},k=(ge,Be,ft,At)=>{ge==null?n(Be.el=c(Be.children||""),ft,At):Be.el=ge.el},L=(ge,Be,ft,At)=>{[ge.el,ge.anchor]=w(ge.children,Be,ft,At,ge.el,ge.anchor)},B=({el:ge,anchor:Be},ft,At)=>{let bt;for(;ge&&ge!==Be;)bt=b(ge),n(ge,ft,At),ge=bt;n(Be,ft,At)},V=({el:ge,anchor:Be})=>{let ft;for(;ge&&ge!==Be;)ft=b(ge),i(ge),ge=ft;i(Be)},G=(ge,Be,ft,At,bt,$t,Mr,tr,lr)=>{Be.type==="svg"?Mr="svg":Be.type==="math"&&(Mr="mathml"),ge==null?K(Be,ft,At,bt,$t,Mr,tr,lr):Ie(ge,Be,bt,$t,Mr,tr,lr)},K=(ge,Be,ft,At,bt,$t,Mr,tr)=>{let lr,or;const{props:Q,shapeFlag:Ge,transition:at,dirs:yt}=ge;if(lr=ge.el=a(ge.type,$t,Q&&Q.is,Q),Ge&8?m(lr,ge.children):Ge&16&&ve(ge.children,lr,null,At,bt,n3(ge,$t),Mr,tr),yt&&r1(ge,null,At,"created"),Z(lr,ge,ge.scopeId,Mr,At),Q){for(const hr in Q)hr!=="value"&&!Jv(hr)&&o(lr,hr,null,Q[hr],$t,ge.children,At,bt,Xn);"value"in Q&&o(lr,"value",null,Q.value,$t),(or=Q.onVnodeBeforeMount)&&qc(or,At,ge)}yt&&r1(ge,null,At,"beforeMount");const rr=XD(bt,at);rr&&at.beforeEnter(lr),n(lr,Be,ft),((or=Q&&Q.onVnodeMounted)||rr||yt)&&Du(()=>{or&&qc(or,At,ge),rr&&at.enter(lr),yt&&r1(ge,null,At,"mounted")},bt)},Z=(ge,Be,ft,At,bt)=>{if(ft&&A(ge,ft),At)for(let $t=0;$t{for(let or=lr;or{const tr=Be.el=ge.el;let{patchFlag:lr,dynamicChildren:or,dirs:Q}=Be;lr|=ge.patchFlag&16;const Ge=ge.props||Ja,at=Be.props||Ja;let yt;if(ft&&n1(ft,!1),(yt=at.onVnodeBeforeUpdate)&&qc(yt,ft,Be,ge),Q&&r1(Be,ge,ft,"beforeUpdate"),ft&&n1(ft,!0),or?de(ge.dynamicChildren,or,tr,ft,At,n3(Be,bt),$t):Mr||Zt(ge,Be,tr,null,ft,At,n3(Be,bt),$t,!1),lr>0){if(lr&16)se(tr,Be,Ge,at,ft,At,bt);else if(lr&2&&Ge.class!==at.class&&o(tr,"class",null,at.class,bt),lr&4&&o(tr,"style",Ge.style,at.style,bt),lr&8){const rr=Be.dynamicProps;for(let hr=0;hr{yt&&qc(yt,ft,Be,ge),Q&&r1(Be,ge,ft,"updated")},At)},de=(ge,Be,ft,At,bt,$t,Mr)=>{for(let tr=0;tr{if(ft!==At){if(ft!==Ja)for(const tr in ft)!Jv(tr)&&!(tr in At)&&o(ge,tr,ft[tr],null,Mr,Be.children,bt,$t,Xn);for(const tr in At){if(Jv(tr))continue;const lr=At[tr],or=ft[tr];lr!==or&&tr!=="value"&&o(ge,tr,or,lr,Mr,Be.children,bt,$t,Xn)}"value"in At&&o(ge,"value",ft.value,At.value,Mr)}},le=(ge,Be,ft,At,bt,$t,Mr,tr,lr)=>{const or=Be.el=ge?ge.el:u(""),Q=Be.anchor=ge?ge.anchor:u("");let{patchFlag:Ge,dynamicChildren:at,slotScopeIds:yt}=Be;yt&&(tr=tr?tr.concat(yt):yt),ge==null?(n(or,ft,At),n(Q,ft,At),ve(Be.children||[],ft,Q,bt,$t,Mr,tr,lr)):Ge>0&&Ge&64&&at&&ge.dynamicChildren?(de(ge.dynamicChildren,at,ft,bt,$t,Mr,tr),(Be.key!=null||bt&&Be===bt.subTree)&&qC(ge,Be,!0)):Zt(ge,Be,ft,Q,bt,$t,Mr,tr,lr)},ye=(ge,Be,ft,At,bt,$t,Mr,tr,lr)=>{Be.slotScopeIds=tr,ge==null?Be.shapeFlag&512?bt.ctx.activate(Be,ft,At,Mr,lr):ke(Be,ft,At,bt,$t,Mr,lr):Rt(ge,Be,lr)},ke=(ge,Be,ft,At,bt,$t,Mr)=>{const tr=ge.component=aF(ge,At,bt);if(UC(ge)&&(tr.ctx.renderer=Qt),oF(tr),tr.asyncDep){if(bt&&bt.registerDep(tr,Lt),!ge.el){const lr=tr.subTree=vp(hm);k(null,lr,Be,ft)}}else Lt(tr,ge,Be,ft,bt,$t,Mr)},Rt=(ge,Be,ft)=>{const At=Be.component=ge.component;if(cD(ge,Be,ft))if(At.asyncDep&&!At.asyncResolved){Gt(At,Be,ft);return}else At.next=Be,nD(At.update),At.effect.dirty=!0,At.update();else Be.el=ge.el,At.vnode=Be},Lt=(ge,Be,ft,At,bt,$t,Mr)=>{const tr=()=>{if(ge.isMounted){let{next:Q,bu:Ge,u:at,parent:yt,vnode:rr}=ge;{const qe=KC(ge);if(qe){Q&&(Q.el=rr.el,Gt(ge,Q,Mr)),qe.asyncDep.then(()=>{ge.isUnmounted||tr()});return}}let hr=Q,Cn;n1(ge,!1),Q?(Q.el=rr.el,Gt(ge,Q,Mr)):Q=rr,Ge&&Qy(Ge),(Cn=Q.props&&Q.props.onVnodeBeforeUpdate)&&qc(Cn,yt,Q,rr),n1(ge,!0);const rn=e3(ge),Ne=ge.subTree;ge.subTree=rn,R(Ne,rn,_(Ne.el),pn(Ne),ge,bt,$t),Q.el=rn.el,hr===null&&fD(ge,rn.el),at&&Du(at,bt),(Cn=Q.props&&Q.props.onVnodeUpdated)&&Du(()=>qc(Cn,yt,Q,rr),bt)}else{let Q;const{el:Ge,props:at}=Be,{bm:yt,m:rr,parent:hr}=ge,Cn=gg(Be);if(n1(ge,!1),yt&&Qy(yt),!Cn&&(Q=at&&at.onVnodeBeforeMount)&&qc(Q,hr,Be),n1(ge,!0),Ge&&Ut){const rn=()=>{ge.subTree=e3(ge),Ut(Ge,ge.subTree,ge,bt,null)};Cn?Be.type.__asyncLoader().then(()=>!ge.isUnmounted&&rn()):rn()}else{const rn=ge.subTree=e3(ge);R(null,rn,ft,At,ge,bt,$t),Be.el=rn.el}if(rr&&Du(rr,bt),!Cn&&(Q=at&&at.onVnodeMounted)){const rn=Be;Du(()=>qc(Q,hr,rn),bt)}(Be.shapeFlag&256||hr&&gg(hr.vnode)&&hr.vnode.shapeFlag&256)&&ge.a&&Du(ge.a,bt),ge.isMounted=!0,Be=ft=At=null}},lr=ge.effect=new Wx(tr,Wl,()=>t5(or),ge.scope),or=ge.update=()=>{lr.dirty&&lr.run()};or.id=ge.uid,n1(ge,!0),or()},Gt=(ge,Be,ft)=>{Be.component=ge;const At=ge.vnode.props;ge.vnode=Be,ge.next=null,$D(ge,Be.props,At,ft),HD(ge,Be.children,ft),I1(),m7(ge),M1()},Zt=(ge,Be,ft,At,bt,$t,Mr,tr,lr=!1)=>{const or=ge&&ge.children,Q=ge?ge.shapeFlag:0,Ge=Be.children,{patchFlag:at,shapeFlag:yt}=Be;if(at>0){if(at&128){tt(or,Ge,ft,At,bt,$t,Mr,tr,lr);return}else if(at&256){st(or,Ge,ft,At,bt,$t,Mr,tr,lr);return}}yt&8?(Q&16&&Xn(or,bt,$t),Ge!==or&&m(ft,Ge)):Q&16?yt&16?tt(or,Ge,ft,At,bt,$t,Mr,tr,lr):Xn(or,bt,$t,!0):(Q&8&&m(ft,""),yt&16&&ve(Ge,ft,At,bt,$t,Mr,tr,lr))},st=(ge,Be,ft,At,bt,$t,Mr,tr,lr)=>{ge=ge||Wd,Be=Be||Wd;const or=ge.length,Q=Be.length,Ge=Math.min(or,Q);let at;for(at=0;atQ?Xn(ge,bt,$t,!0,!1,Ge):ve(Be,ft,At,bt,$t,Mr,tr,lr,Ge)},tt=(ge,Be,ft,At,bt,$t,Mr,tr,lr)=>{let or=0;const Q=Be.length;let Ge=ge.length-1,at=Q-1;for(;or<=Ge&&or<=at;){const yt=ge[or],rr=Be[or]=lr?op(Be[or]):of(Be[or]);if(sv(yt,rr))R(yt,rr,ft,null,bt,$t,Mr,tr,lr);else break;or++}for(;or<=Ge&&or<=at;){const yt=ge[Ge],rr=Be[at]=lr?op(Be[at]):of(Be[at]);if(sv(yt,rr))R(yt,rr,ft,null,bt,$t,Mr,tr,lr);else break;Ge--,at--}if(or>Ge){if(or<=at){const yt=at+1,rr=ytat)for(;or<=Ge;)nt(ge[or],bt,$t,!0),or++;else{const yt=or,rr=or,hr=new Map;for(or=rr;or<=at;or++){const Jn=Be[or]=lr?op(Be[or]):of(Be[or]);Jn.key!=null&&hr.set(Jn.key,or)}let Cn,rn=0;const Ne=at-rr+1;let qe=!1,ct=0;const Vt=new Array(Ne);for(or=0;or=Ne){nt(Jn,bt,$t,!0);continue}let Ri;if(Jn.key!=null)Ri=hr.get(Jn.key);else for(Cn=rr;Cn<=at;Cn++)if(Vt[Cn-rr]===0&&sv(Jn,Be[Cn])){Ri=Cn;break}Ri===void 0?nt(Jn,bt,$t,!0):(Vt[Ri-rr]=or+1,Ri>=ct?ct=Ri:qe=!0,R(Jn,Be[Ri],ft,null,bt,$t,Mr,tr,lr),rn++)}const Qr=qe?YD(Vt):Wd;for(Cn=Qr.length-1,or=Ne-1;or>=0;or--){const Jn=rr+or,Ri=Be[Jn],qn=Jn+1{const{el:$t,type:Mr,transition:tr,children:lr,shapeFlag:or}=ge;if(or&6){dt(ge.component.subTree,Be,ft,At);return}if(or&128){ge.suspense.move(Be,ft,At);return}if(or&64){Mr.move(ge,Be,ft,Qt);return}if(Mr===mc){n($t,Be,ft);for(let Ge=0;Getr.enter($t),bt);else{const{leave:Ge,delayLeave:at,afterLeave:yt}=tr,rr=()=>n($t,Be,ft),hr=()=>{Ge($t,()=>{rr(),yt&&yt()})};at?at($t,rr,hr):hr()}else n($t,Be,ft)},nt=(ge,Be,ft,At=!1,bt=!1)=>{const{type:$t,props:Mr,ref:tr,children:lr,dynamicChildren:or,shapeFlag:Q,patchFlag:Ge,dirs:at}=ge;if(tr!=null&&A6(tr,null,ft,ge,!0),Q&256){Be.ctx.deactivate(ge);return}const yt=Q&1&&at,rr=!gg(ge);let hr;if(rr&&(hr=Mr&&Mr.onVnodeBeforeUnmount)&&qc(hr,Be,ge),Q&6)Ar(ge.component,ft,At);else{if(Q&128){ge.suspense.unmount(ft,At);return}yt&&r1(ge,null,Be,"beforeUnmount"),Q&64?ge.type.remove(ge,Be,ft,bt,Qt,At):or&&($t!==mc||Ge>0&&Ge&64)?Xn(or,Be,ft,!1,!0):($t===mc&&Ge&384||!bt&&Q&16)&&Xn(lr,Be,ft),At&&pr(ge)}(rr&&(hr=Mr&&Mr.onVnodeUnmounted)||yt)&&Du(()=>{hr&&qc(hr,Be,ge),yt&&r1(ge,null,Be,"unmounted")},ft)},pr=ge=>{const{type:Be,el:ft,anchor:At,transition:bt}=ge;if(Be===mc){ur(ft,At);return}if(Be===i3){V(ge);return}const $t=()=>{i(ft),bt&&!bt.persisted&&bt.afterLeave&&bt.afterLeave()};if(ge.shapeFlag&1&&bt&&!bt.persisted){const{leave:Mr,delayLeave:tr}=bt,lr=()=>Mr(ft,$t);tr?tr(ge.el,$t,lr):lr()}else $t()},ur=(ge,Be)=>{let ft;for(;ge!==Be;)ft=b(ge),i(ge),ge=ft;i(Be)},Ar=(ge,Be,ft)=>{const{bum:At,scope:bt,update:$t,subTree:Mr,um:tr}=ge;At&&Qy(At),bt.stop(),$t&&($t.active=!1,nt(Mr,ge,Be,ft)),tr&&Du(tr,Be),Du(()=>{ge.isUnmounted=!0},Be),Be&&Be.pendingBranch&&!Be.isUnmounted&&ge.asyncDep&&!ge.asyncResolved&&ge.suspenseId===Be.pendingId&&(Be.deps--,Be.deps===0&&Be.resolve())},Xn=(ge,Be,ft,At=!1,bt=!1,$t=0)=>{for(let Mr=$t;Mrge.shapeFlag&6?pn(ge.component.subTree):ge.shapeFlag&128?ge.suspense.next():b(ge.anchor||ge.el);let gi=!1;const Je=(ge,Be,ft)=>{ge==null?Be._vnode&&nt(Be._vnode,null,null,!0):R(Be._vnode||null,ge,Be,null,null,null,ft),gi||(gi=!0,m7(),kC(),gi=!1),Be._vnode=ge},Qt={p:R,um:nt,m:dt,r:pr,mt:ke,mc:ve,pc:Zt,pbc:de,n:pn,o:e};let Xr,Ut;return t&&([Xr,Ut]=t(Qt)),{render:Je,hydrate:Xr,createApp:ND(Je,Xr)}}function n3({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 n1({effect:e,update:t},r){e.allowRecurse=t.allowRecurse=r}function XD(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function qC(e,t,r=!1){const n=e.children,i=t.children;if(wi(n)&&wi(i))for(let o=0;o>1,e[r[u]]0&&(t[n]=r[o-1]),r[o]=n)}}for(o=r.length,a=r[o-1];o-- >0;)r[o]=a,a=t[a];return r}function KC(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:KC(t)}const ZD=e=>e.__isTeleport,mc=Symbol.for("v-fgt"),N_=Symbol.for("v-txt"),hm=Symbol.for("v-cmt"),i3=Symbol.for("v-stc"),rm=[];let gc=null;function yg(e=!1){rm.push(gc=e?null:[])}function qD(){rm.pop(),gc=rm[rm.length-1]||null}let pm=1;function w7(e){pm+=e}function KD(e){return e.dynamicChildren=pm>0?gc||Wd:null,qD(),pm>0&&gc&&gc.push(e),e}function xg(e,t,r,n,i,o){return KD(eu(e,t,r,n,i,o,!0))}function QD(e){return e?e.__v_isVNode===!0:!1}function sv(e,t){return e.type===t.type&&e.key===t.key}const U_="__vInternal",QC=({key:e})=>e??null,bg=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?ds(e)||Vu(e)||Bi(e)?{i:ll,r:e,k:t,f:!!r}:e:null);function eu(e,t=null,r=null,n=0,i=null,o=e===mc?0:1,a=!1,u=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&QC(t),ref:t&&bg(t),scopeId:BC,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:ll};return u?(i5(c,r),o&128&&e.normalize(c)):r&&(c.shapeFlag|=ds(r)?8:16),pm>0&&!a&&gc&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&gc.push(c),c}const vp=JD;function JD(e,t=null,r=null,n=0,i=null,o=!1){if((!e||e===hD)&&(e=hm),QD(e)){const u=o0(e,t,!0);return r&&i5(u,r),pm>0&&!o&&gc&&(u.shapeFlag&6?gc[gc.indexOf(e)]=u:gc.push(u)),u.patchFlag|=-2,u}if(cF(e)&&(e=e.__vccOpts),t){t=eF(t);let{class:u,style:c}=t;u&&!ds(u)&&(t.class=k_(u)),Ao(c)&&(wC(c)&&!wi(c)&&(c=iu({},c)),t.style=O_(c))}const a=ds(e)?1:pD(e)?128:ZD(e)?64:Ao(e)?4:Bi(e)?2:0;return eu(e,t,r,n,i,a,o,!0)}function eF(e){return e?wC(e)||U_ in e?iu({},e):e:null}function o0(e,t,r=!1){const{props:n,ref:i,patchFlag:o,children:a}=e,u=t?rF(n||{},t):n;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&QC(u),ref:t&&t.ref?r&&i?wi(i)?i.concat(bg(t)):[i,bg(t)]:bg(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==mc?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&o0(e.ssContent),ssFallback:e.ssFallback&&o0(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function tF(e=" ",t=0){return vp(N_,null,e,t)}function of(e){return e==null||typeof e=="boolean"?vp(hm):wi(e)?vp(mc,null,e.slice()):typeof e=="object"?op(e):vp(N_,null,String(e))}function op(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:o0(e)}function i5(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(wi(t))r=16;else if(typeof t=="object")if(n&65){const i=t.default;i&&(i._c&&(i._d=!1),i5(e,i()),i._c&&(i._d=!0));return}else{r=32;const i=t._;!i&&!(U_ in t)?t._ctx=ll:i===3&&ll&&(ll.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Bi(t)?(t={default:t,_ctx:ll},r=32):(t=String(t),n&64?(r=16,t=[tF(t)]):r=8);e.children=t,e.shapeFlag|=r}function rF(...e){const t={};for(let r=0;r{let i;return(i=e[r])||(i=e[r]=[]),i.push(n),o=>{i.length>1?i.forEach(a=>a(o)):i[0](o)}};Gg=t("__VUE_INSTANCE_SETTERS__",r=>vu=r),T6=t("__VUE_SSR_SETTERS__",r=>z_=r)}const Um=e=>{const t=vu;return Gg(e),e.scope.on(),()=>{e.scope.off(),Gg(t)}},C7=()=>{vu&&vu.scope.off(),Gg(null)};function JC(e){return e.vnode.shapeFlag&4}let z_=!1;function oF(e,t=!1){t&&T6(t);const{props:r,children:n}=e.vnode,i=JC(e);zD(e,r,i,t),jD(e,n);const o=i?sF(e,t):void 0;return t&&T6(!1),o}function sF(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=CC(new Proxy(e.ctx,PD));const{setup:n}=r;if(n){const i=e.setupContext=n.length>1?lF(e):null,o=Um(e);I1();const a=dp(n,e,0,[e.props,i]);if(M1(),o(),sC(a)){if(a.then(C7,C7),t)return a.then(u=>{R7(e,u,t)}).catch(u=>{F_(u,e,0)});e.asyncDep=a}else R7(e,a,t)}else eR(e,t)}function R7(e,t,r){Bi(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ao(t)&&(e.setupState=MC(t)),eR(e,r)}let I7;function eR(e,t,r){const n=e.type;if(!e.render){if(!t&&I7&&!n.render){const i=n.template||r5(e).template;if(i){const{isCustomElement:o,compilerOptions:a}=e.appContext.config,{delimiters:u,compilerOptions:c}=n,f=iu(iu({isCustomElement:o,delimiters:u},a),c);n.render=I7(i,f)}}e.render=n.render||Wl}{const i=Um(e);I1();try{OD(e)}finally{M1(),i()}}}function uF(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,r){return $u(e,"get","$attrs"),t[r]}}))}function lF(e){const t=r=>{e.exposed=r||{}};return{get attrs(){return uF(e)},slots:e.slots,emit:e.emit,expose:t}}function $_(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(MC(CC(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in em)return em[r](e)},has(t,r){return r in t||r in em}}))}function cF(e){return Bi(e)&&"__vccOpts"in e}const fF=(e,t)=>qk(e,t,z_),hF="3.4.21";/** * @vue/runtime-dom v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/const pF="http://www.w3.org/2000/svg",dF="http://www.w3.org/1998/Math/MathML",sp=typeof document<"u"?document:null,M7=sp&&sp.createElement("template"),vF={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,n)=>{const i=t==="svg"?sp.createElementNS(pF,e):t==="mathml"?sp.createElementNS(dF,e):sp.createElement(e,r?{is:r}:void 0);return e==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:e=>sp.createTextNode(e),createComment:e=>sp.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>sp.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,r,n,i,o){const a=r?r.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),r),!(i===o||!(i=i.nextSibling)););else{M7.innerHTML=n==="svg"?`${e}`:n==="mathml"?`${e}`:e;const u=M7.content;if(n==="svg"||n==="mathml"){const c=u.firstChild;for(;c.firstChild;)u.appendChild(c.firstChild);u.removeChild(c)}t.insertBefore(u,r)}return[a?a.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}},mF=Symbol("_vtc");function gF(e,t,r){const n=e[mF];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}const Wg=Symbol("_vod"),tR=Symbol("_vsh"),_F={beforeMount(e,{value:t},{transition:r}){e[Wg]=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):uv(e,t)},mounted(e,{value:t},{transition:r}){r&&t&&r.enter(e)},updated(e,{value:t,oldValue:r},{transition:n}){!t!=!r&&(n?t?(n.beforeEnter(e),uv(e,!0),n.enter(e)):n.leave(e,()=>{uv(e,!1)}):uv(e,t))},beforeUnmount(e,{value:t}){uv(e,t)}};function uv(e,t){e.style.display=t?e[Wg]:"none",e[tR]=!t}const yF=Symbol(""),xF=/(^|;)\s*display\s*:/;function bF(e,t,r){const n=e.style,i=ds(r);let o=!1;if(r&&!i){if(t)if(ds(t))for(const a of t.split(";")){const u=a.slice(0,a.indexOf(":")).trim();r[u]==null&&Eg(n,u,"")}else for(const a in t)r[a]==null&&Eg(n,a,"");for(const a in r)a==="display"&&(o=!0),Eg(n,a,r[a])}else if(i){if(t!==r){const a=n[yF];a&&(r+=";"+a),n.cssText=r,o=xF.test(r)}}else t&&e.removeAttribute("style");Wg in e&&(e[Wg]=o?n.display:"",e[tR]&&(n.display="none"))}const P7=/\s*!important$/;function Eg(e,t,r){if(wi(r))r.forEach(n=>Eg(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=EF(e,t);P7.test(r)?e.setProperty(E0(n),r.replace(P7,""),"important"):e[n]=r}}const O7=["Webkit","Moz","ms"],a3={};function EF(e,t){const r=a3[t];if(r)return r;let n=i0(t);if(n!=="filter"&&n in e)return a3[t]=n;n=cC(n);for(let i=0;io3||(IF.then(()=>o3=0),o3=Date.now());function PF(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;bc(OF(n,r.value),t,5,[n])};return r.value=e,r.attached=MF(),r}function OF(e,t){if(wi(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(n=>i=>!i._stopped&&n&&n(i))}else return t}const B7=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,kF=(e,t,r,n,i,o,a,u,c)=>{const f=i==="svg";t==="class"?gF(e,n,f):t==="style"?bF(e,r,n):I_(t)?jx(t)||CF(e,t,r,n,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):DF(e,t,n,f))?AF(e,t,n,o,a,u,c):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),SF(e,t,n,f))};function DF(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&B7(t)&&Bi(r));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return B7(t)&&ds(r)?!1:t in e}const FF=iu({patchProp:kF},vF);let L7;function BF(){return L7||(L7=GD(FF))}const LF=(...e)=>{const t=BF().createApp(...e),{mount:r}=t;return t.mount=n=>{const i=UF(n);if(!i)return;const o=t._component;!Bi(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const a=r(i,!1,NF(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},t};function NF(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function UF(e){return ds(e)?document.querySelector(e):e}function rR(e,t){return function(){return e.apply(t,arguments)}}const{toString:zF}=Object.prototype,{getPrototypeOf:a5}=Object,V_=(e=>t=>{const r=zF.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),gf=e=>(e=e.toLowerCase(),t=>V_(t)===e),j_=e=>t=>typeof t===e,{isArray:S0}=Array,dm=j_("undefined");function $F(e){return e!==null&&!dm(e)&&e.constructor!==null&&!dm(e.constructor)&&Yl(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const nR=gf("ArrayBuffer");function VF(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&nR(e.buffer),t}const jF=j_("string"),Yl=j_("function"),iR=j_("number"),H_=e=>e!==null&&typeof e=="object",HF=e=>e===!0||e===!1,Sg=e=>{if(V_(e)!=="object")return!1;const t=a5(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},GF=gf("Date"),WF=gf("File"),XF=gf("Blob"),YF=gf("FileList"),ZF=e=>H_(e)&&Yl(e.pipe),qF=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Yl(e.append)&&((t=V_(e))==="formdata"||t==="object"&&Yl(e.toString)&&e.toString()==="[object FormData]"))},KF=gf("URLSearchParams"),QF=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zm(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),S0(e))for(n=0,i=e.length;n0;)if(i=r[n],t===i.toLowerCase())return i;return null}const oR=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,sR=e=>!dm(e)&&e!==oR;function w6(){const{caseless:e}=sR(this)&&this||{},t={},r=(n,i)=>{const o=e&&aR(t,i)||i;Sg(t[o])&&Sg(n)?t[o]=w6(t[o],n):Sg(n)?t[o]=w6({},n):S0(n)?t[o]=n.slice():t[o]=n};for(let n=0,i=arguments.length;n(zm(t,(i,o)=>{r&&Yl(i)?e[o]=rR(i,r):e[o]=i},{allOwnKeys:n}),e),eB=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),tB=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},rB=(e,t,r,n)=>{let i,o,a;const u={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!n||n(a,e,t))&&!u[a]&&(t[a]=e[a],u[a]=!0);e=r!==!1&&a5(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},nB=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},iB=e=>{if(!e)return null;if(S0(e))return e;let t=e.length;if(!iR(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},aB=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&a5(Uint8Array)),oB=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=n.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},sB=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},uB=gf("HTMLFormElement"),lB=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),N7=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),cB=gf("RegExp"),uR=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};zm(r,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(n[o]=a||i)}),Object.defineProperties(e,n)},fB=e=>{uR(e,(t,r)=>{if(Yl(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Yl(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},hB=(e,t)=>{const r={},n=i=>{i.forEach(o=>{r[o]=!0})};return S0(e)?n(e):n(String(e).split(t)),r},pB=()=>{},dB=(e,t)=>(e=+e,Number.isFinite(e)?e:t),s3="abcdefghijklmnopqrstuvwxyz",U7="0123456789",lR={DIGIT:U7,ALPHA:s3,ALPHA_DIGIT:s3+s3.toUpperCase()+U7},vB=(e=16,t=lR.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function mB(e){return!!(e&&Yl(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const gB=e=>{const t=new Array(10),r=(n,i)=>{if(H_(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const o=S0(n)?[]:{};return zm(n,(a,u)=>{const c=r(a,i+1);!dm(c)&&(o[u]=c)}),t[i]=void 0,o}}return n};return r(e,0)},_B=gf("AsyncFunction"),yB=e=>e&&(H_(e)||Yl(e))&&Yl(e.then)&&Yl(e.catch),br={isArray:S0,isArrayBuffer:nR,isBuffer:$F,isFormData:qF,isArrayBufferView:VF,isString:jF,isNumber:iR,isBoolean:HF,isObject:H_,isPlainObject:Sg,isUndefined:dm,isDate:GF,isFile:WF,isBlob:XF,isRegExp:cB,isFunction:Yl,isStream:ZF,isURLSearchParams:KF,isTypedArray:aB,isFileList:YF,forEach:zm,merge:w6,extend:JF,trim:QF,stripBOM:eB,inherits:tB,toFlatObject:rB,kindOf:V_,kindOfTest:gf,endsWith:nB,toArray:iB,forEachEntry:oB,matchAll:sB,isHTMLForm:uB,hasOwnProperty:N7,hasOwnProp:N7,reduceDescriptors:uR,freezeMethods:fB,toObjectSet:hB,toCamelCase:lB,noop:pB,toFiniteNumber:dB,findKey:aR,global:oR,isContextDefined:sR,ALPHABET:lR,generateString:vB,isSpecCompliantForm:mB,toJSONObject:gB,isAsyncFn:_B,isThenable:yB};function ea(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}br.inherits(ea,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:br.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const cR=ea.prototype,fR={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{fR[e]={value:e}});Object.defineProperties(ea,fR);Object.defineProperty(cR,"isAxiosError",{value:!0});ea.from=(e,t,r,n,i,o)=>{const a=Object.create(cR);return br.toFlatObject(e,a,function(c){return c!==Error.prototype},u=>u!=="isAxiosError"),ea.call(a,e.message,t,r,n,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const xB=null;function C6(e){return br.isPlainObject(e)||br.isArray(e)}function hR(e){return br.endsWith(e,"[]")?e.slice(0,-2):e}function z7(e,t,r){return e?e.concat(t).map(function(i,o){return i=hR(i),!r&&o?"["+i+"]":i}).join(r?".":""):t}function bB(e){return br.isArray(e)&&!e.some(C6)}const EB=br.toFlatObject(br,{},null,function(t){return/^is[A-Z]/.test(t)});function G_(e,t,r){if(!br.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=br.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(R,P){return!br.isUndefined(P[R])});const n=r.metaTokens,i=r.visitor||m,o=r.dots,a=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&br.isSpecCompliantForm(t);if(!br.isFunction(i))throw new TypeError("visitor must be a function");function f(w){if(w===null)return"";if(br.isDate(w))return w.toISOString();if(!c&&br.isBlob(w))throw new ea("Blob is not supported. Use a Buffer instead.");return br.isArrayBuffer(w)||br.isTypedArray(w)?c&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function m(w,R,P){let k=w;if(w&&!P&&typeof w=="object"){if(br.endsWith(R,"{}"))R=n?R:R.slice(0,-2),w=JSON.stringify(w);else if(br.isArray(w)&&bB(w)||(br.isFileList(w)||br.endsWith(R,"[]"))&&(k=br.toArray(w)))return R=hR(R),k.forEach(function(B,V){!(br.isUndefined(B)||B===null)&&t.append(a===!0?z7([R],V,o):a===null?R:R+"[]",f(B))}),!1}return C6(w)?!0:(t.append(z7(P,R,o),f(w)),!1)}const _=[],b=Object.assign(EB,{defaultVisitor:m,convertValue:f,isVisitable:C6});function A(w,R){if(!br.isUndefined(w)){if(_.indexOf(w)!==-1)throw Error("Circular reference detected in "+R.join("."));_.push(w),br.forEach(w,function(k,L){(!(br.isUndefined(k)||k===null)&&i.call(t,k,br.isString(L)?L.trim():L,R,b))===!0&&A(k,R?R.concat(L):[L])}),_.pop()}}if(!br.isObject(e))throw new TypeError("data must be an object");return A(e),t}function $7(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function o5(e,t){this._pairs=[],e&&G_(e,this,t)}const pR=o5.prototype;pR.append=function(t,r){this._pairs.push([t,r])};pR.toString=function(t){const r=t?function(n){return t.call(this,n,$7)}:$7;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function SB(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function dR(e,t,r){if(!t)return e;const n=r&&r.encode||SB,i=r&&r.serialize;let o;if(i?o=i(t,r):o=br.isURLSearchParams(t)?t.toString():new o5(t,r).toString(n),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class V7{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){br.forEach(this.handlers,function(n){n!==null&&t(n)})}}const vR={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},AB=typeof URLSearchParams<"u"?URLSearchParams:o5,TB=typeof FormData<"u"?FormData:null,wB=typeof Blob<"u"?Blob:null,CB={isBrowser:!0,classes:{URLSearchParams:AB,FormData:TB,Blob:wB},protocols:["http","https","file","blob","url","data"]},mR=typeof window<"u"&&typeof document<"u",RB=(e=>mR&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),IB=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",MB=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:mR,hasStandardBrowserEnv:RB,hasStandardBrowserWebWorkerEnv:IB},Symbol.toStringTag,{value:"Module"})),cf={...MB,...CB};function PB(e,t){return G_(e,new cf.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,o){return cf.isNode&&br.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function OB(e){return br.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function kB(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n=r.length;return a=!a&&br.isArray(i)?i.length:a,c?(br.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!u):((!i[a]||!br.isObject(i[a]))&&(i[a]=[]),t(r,n,i[a],o)&&br.isArray(i[a])&&(i[a]=kB(i[a])),!u)}if(br.isFormData(e)&&br.isFunction(e.entries)){const r={};return br.forEachEntry(e,(n,i)=>{t(OB(n),i,r,0)}),r}return null}function DB(e,t,r){if(br.isString(e))try{return(t||JSON.parse)(e),br.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const s5={transitional:vR,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=br.isObject(t);if(o&&br.isHTMLForm(t)&&(t=new FormData(t)),br.isFormData(t))return i?JSON.stringify(gR(t)):t;if(br.isArrayBuffer(t)||br.isBuffer(t)||br.isStream(t)||br.isFile(t)||br.isBlob(t))return t;if(br.isArrayBufferView(t))return t.buffer;if(br.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return PB(t,this.formSerializer).toString();if((u=br.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return G_(u?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||i?(r.setContentType("application/json",!1),DB(t)):t}],transformResponse:[function(t){const r=this.transitional||s5.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(t&&br.isString(t)&&(n&&!this.responseType||i)){const a=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(u){if(a)throw u.name==="SyntaxError"?ea.from(u,ea.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:cf.classes.FormData,Blob:cf.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};br.forEach(["delete","get","head","post","put","patch"],e=>{s5.headers[e]={}});const u5=s5,FB=br.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),BB=e=>{const t={};let r,n,i;return e&&e.split(` `).forEach(function(a){i=a.indexOf(":"),r=a.substring(0,i).trim().toLowerCase(),n=a.substring(i+1).trim(),!(!r||t[r]&&FB[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},j7=Symbol("internals");function lv(e){return e&&String(e).trim().toLowerCase()}function Ag(e){return e===!1||e==null?e:br.isArray(e)?e.map(Ag):String(e)}function LB(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const NB=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function u3(e,t,r,n,i){if(br.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!br.isString(t)){if(br.isString(n))return t.indexOf(n)!==-1;if(br.isRegExp(n))return n.test(t)}}function UB(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function zB(e,t){const r=br.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,o,a){return this[n].call(this,t,i,o,a)},configurable:!0})})}class W_{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function o(u,c,f){const m=lv(c);if(!m)throw new Error("header name must be a non-empty string");const _=br.findKey(i,m);(!_||i[_]===void 0||f===!0||f===void 0&&i[_]!==!1)&&(i[_||c]=Ag(u))}const a=(u,c)=>br.forEach(u,(f,m)=>o(f,m,c));return br.isPlainObject(t)||t instanceof this.constructor?a(t,r):br.isString(t)&&(t=t.trim())&&!NB(t)?a(BB(t),r):t!=null&&o(r,t,n),this}get(t,r){if(t=lv(t),t){const n=br.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return LB(i);if(br.isFunction(r))return r.call(this,i,n);if(br.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=lv(t),t){const n=br.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||u3(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function o(a){if(a=lv(a),a){const u=br.findKey(n,a);u&&(!r||u3(n,n[u],u,r))&&(delete n[u],i=!0)}}return br.isArray(t)?t.forEach(o):o(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const o=r[n];(!t||u3(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const r=this,n={};return br.forEach(this,(i,o)=>{const a=br.findKey(n,o);if(a){r[a]=Ag(i),delete r[o];return}const u=t?UB(o):String(o).trim();u!==o&&delete r[o],r[u]=Ag(i),n[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return br.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&br.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[j7]=this[j7]={accessors:{}}).accessors,i=this.prototype;function o(a){const u=lv(a);n[u]||(zB(i,a),n[u]=!0)}return br.isArray(t)?t.forEach(o):o(t),this}}W_.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);br.reduceDescriptors(W_.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});br.freezeMethods(W_);const nh=W_;function l3(e,t){const r=this||u5,n=t||r,i=nh.from(n.headers);let o=n.data;return br.forEach(e,function(u){o=u.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function _R(e){return!!(e&&e.__CANCEL__)}function $m(e,t,r){ea.call(this,e??"canceled",ea.ERR_CANCELED,t,r),this.name="CanceledError"}br.inherits($m,ea,{__CANCEL__:!0});function $B(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ea("Request failed with status code "+r.status,[ea.ERR_BAD_REQUEST,ea.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const VB=cf.hasStandardBrowserEnv?{write(e,t,r,n,i,o){const a=[e+"="+encodeURIComponent(t)];br.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),br.isString(n)&&a.push("path="+n),br.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function jB(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function HB(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function yR(e,t){return e&&!jB(t)?HB(e,t):t}const GB=cf.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function i(o){let a=o;return t&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(a){const u=br.isString(a)?i(a):a;return u.protocol===n.protocol&&u.host===n.host}}():function(){return function(){return!0}}();function WB(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function XB(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(c){const f=Date.now(),m=n[o];a||(a=f),r[i]=c,n[i]=f;let _=o,b=0;for(;_!==i;)b+=r[_++],_=_%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),f-a{const o=i.loaded,a=i.lengthComputable?i.total:void 0,u=o-r,c=n(u),f=o<=a;r=o;const m={loaded:o,total:a,progress:a?o/a:void 0,bytes:u,rate:c||void 0,estimated:c&&a&&f?(a-o)/c:void 0,event:i};m[t?"download":"upload"]=!0,e(m)}}const YB=typeof XMLHttpRequest<"u",ZB=YB&&function(e){return new Promise(function(r,n){let i=e.data;const o=nh.from(e.headers).normalize();let{responseType:a,withXSRFToken:u}=e,c;function f(){e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}let m;if(br.isFormData(i)){if(cf.hasStandardBrowserEnv||cf.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((m=o.getContentType())!==!1){const[R,...P]=m?m.split(";").map(k=>k.trim()).filter(Boolean):[];o.setContentType([R||"multipart/form-data",...P].join("; "))}}let _=new XMLHttpRequest;if(e.auth){const R=e.auth.username||"",P=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(R+":"+P))}const b=yR(e.baseURL,e.url);_.open(e.method.toUpperCase(),dR(b,e.params,e.paramsSerializer),!0),_.timeout=e.timeout;function A(){if(!_)return;const R=nh.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),k={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:R,config:e,request:_};$B(function(B){r(B),f()},function(B){n(B),f()},k),_=null}if("onloadend"in _?_.onloadend=A:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(A)},_.onabort=function(){_&&(n(new ea("Request aborted",ea.ECONNABORTED,e,_)),_=null)},_.onerror=function(){n(new ea("Network Error",ea.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let P=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const k=e.transitional||vR;e.timeoutErrorMessage&&(P=e.timeoutErrorMessage),n(new ea(P,k.clarifyTimeoutError?ea.ETIMEDOUT:ea.ECONNABORTED,e,_)),_=null},cf.hasStandardBrowserEnv&&(u&&br.isFunction(u)&&(u=u(e)),u||u!==!1&&GB(b))){const R=e.xsrfHeaderName&&e.xsrfCookieName&&VB.read(e.xsrfCookieName);R&&o.set(e.xsrfHeaderName,R)}i===void 0&&o.setContentType(null),"setRequestHeader"in _&&br.forEach(o.toJSON(),function(P,k){_.setRequestHeader(k,P)}),br.isUndefined(e.withCredentials)||(_.withCredentials=!!e.withCredentials),a&&a!=="json"&&(_.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&_.addEventListener("progress",H7(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&_.upload&&_.upload.addEventListener("progress",H7(e.onUploadProgress)),(e.cancelToken||e.signal)&&(c=R=>{_&&(n(!R||R.type?new $m(null,e,_):R),_.abort(),_=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));const w=WB(b);if(w&&cf.protocols.indexOf(w)===-1){n(new ea("Unsupported protocol "+w+":",ea.ERR_BAD_REQUEST,e));return}_.send(i||null)})},R6={http:xB,xhr:ZB};br.forEach(R6,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const G7=e=>`- ${e}`,qB=e=>br.isFunction(e)||e===null||e===!1,xR={getAdapter:e=>{e=br.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let o=0;o`adapter ${u} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since : `+o.map(G7).join(` `):" "+G7(o[0]):"as no adapter specified";throw new ea("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:R6};function c3(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $m(null,e)}function W7(e){return c3(e),e.headers=nh.from(e.headers),e.data=l3.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xR.getAdapter(e.adapter||u5.adapter)(e).then(function(n){return c3(e),n.data=l3.call(e,e.transformResponse,n),n.headers=nh.from(n.headers),n},function(n){return _R(n)||(c3(e),n&&n.response&&(n.response.data=l3.call(e,e.transformResponse,n.response),n.response.headers=nh.from(n.response.headers))),Promise.reject(n)})}const X7=e=>e instanceof nh?e.toJSON():e;function s0(e,t){t=t||{};const r={};function n(f,m,_){return br.isPlainObject(f)&&br.isPlainObject(m)?br.merge.call({caseless:_},f,m):br.isPlainObject(m)?br.merge({},m):br.isArray(m)?m.slice():m}function i(f,m,_){if(br.isUndefined(m)){if(!br.isUndefined(f))return n(void 0,f,_)}else return n(f,m,_)}function o(f,m){if(!br.isUndefined(m))return n(void 0,m)}function a(f,m){if(br.isUndefined(m)){if(!br.isUndefined(f))return n(void 0,f)}else return n(void 0,m)}function u(f,m,_){if(_ in t)return n(f,m);if(_ in e)return n(void 0,f)}const c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u,headers:(f,m)=>i(X7(f),X7(m),!0)};return br.forEach(Object.keys(Object.assign({},e,t)),function(m){const _=c[m]||i,b=_(e[m],t[m],m);br.isUndefined(b)&&_!==u||(r[m]=b)}),r}const bR="1.6.7",l5={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{l5[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Y7={};l5.transitional=function(t,r,n){function i(o,a){return"[Axios v"+bR+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return(o,a,u)=>{if(t===!1)throw new ea(i(a," has been removed"+(r?" in "+r:"")),ea.ERR_DEPRECATED);return r&&!Y7[a]&&(Y7[a]=!0,console.warn(i(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,a,u):!0}};function KB(e,t,r){if(typeof e!="object")throw new ea("options must be an object",ea.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],a=t[o];if(a){const u=e[o],c=u===void 0||a(u,o,e);if(c!==!0)throw new ea("option "+o+" must be "+c,ea.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ea("Unknown option "+o,ea.ERR_BAD_OPTION)}}const I6={assertOptions:KB,validators:l5},Gh=I6.validators;class Xg{constructor(t){this.defaults=t,this.interceptors={request:new V7,response:new V7}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=` `+o):n.stack=o}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=s0(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&I6.assertOptions(n,{silentJSONParsing:Gh.transitional(Gh.boolean),forcedJSONParsing:Gh.transitional(Gh.boolean),clarifyTimeoutError:Gh.transitional(Gh.boolean)},!1),i!=null&&(br.isFunction(i)?r.paramsSerializer={serialize:i}:I6.assertOptions(i,{encode:Gh.function,serialize:Gh.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=o&&br.merge(o.common,o[r.method]);o&&br.forEach(["delete","get","head","post","put","patch","common"],w=>{delete o[w]}),r.headers=nh.concat(a,o);const u=[];let c=!0;this.interceptors.request.forEach(function(R){typeof R.runWhen=="function"&&R.runWhen(r)===!1||(c=c&&R.synchronous,u.unshift(R.fulfilled,R.rejected))});const f=[];this.interceptors.response.forEach(function(R){f.push(R.fulfilled,R.rejected)});let m,_=0,b;if(!c){const w=[W7.bind(this),void 0];for(w.unshift.apply(w,u),w.push.apply(w,f),b=w.length,m=Promise.resolve(r);_{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(u=>{n.subscribe(u),o=u}).then(i);return a.cancel=function(){n.unsubscribe(o)},a},t(function(o,a,u){n.reason||(n.reason=new $m(o,a,u),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new c5(function(i){t=i}),cancel:t}}}const QB=c5;function JB(e){return function(r){return e.apply(null,r)}}function eL(e){return br.isObject(e)&&e.isAxiosError===!0}const M6={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(M6).forEach(([e,t])=>{M6[t]=e});const tL=M6;function ER(e){const t=new Tg(e),r=rR(Tg.prototype.request,t);return br.extend(r,Tg.prototype,t,{allOwnKeys:!0}),br.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return ER(s0(e,i))},r}const rs=ER(u5);rs.Axios=Tg;rs.CanceledError=$m;rs.CancelToken=QB;rs.isCancel=_R;rs.VERSION=bR;rs.toFormData=G_;rs.AxiosError=ea;rs.Cancel=rs.CanceledError;rs.all=function(t){return Promise.all(t)};rs.spread=JB;rs.isAxiosError=eL;rs.mergeConfig=s0;rs.AxiosHeaders=nh;rs.formToJSON=e=>gR(br.isHTMLForm(e)?new FormData(e):e);rs.getAdapter=xR.getAdapter;rs.HttpStatusCode=tL;rs.default=rs;const Z7=rs,rL="FeatureCollection",nL="320581",iL={type:"name",properties:{name:"urn:ogc:def:crs:OGC:1.3:CRS84"}},aL=[{type:"Feature",properties:{id:"7331",name:"董浜镇",site:"www.poi86.com"},geometry:{type:"MultiPolygon",coordinates:[[[[120.936453,31.627662],[120.935708,31.627646],[120.934992,31.627093],[120.933876,31.626764],[120.933546,31.626409],[120.933236,31.626368],[120.93221,31.626698],[120.930804,31.626695],[120.930108,31.626829],[120.92976,31.626688],[120.929553,31.625363],[120.929235,31.624836],[120.928767,31.624372],[120.927352,31.623938],[120.92671,31.623824],[120.926161,31.624176],[120.925843,31.624713],[120.925464,31.624758],[120.925212,31.624689],[120.924803,31.624434],[120.924347,31.624008],[120.924372,31.623821],[120.925794,31.623119],[120.926761,31.622797],[120.928305,31.622681],[120.930747,31.622331],[120.931304,31.622038],[120.932349,31.621697],[120.933738,31.620565],[120.933953,31.620321],[120.93263,31.62023],[120.932259,31.619618],[120.931867,31.619618],[120.931137,31.618695],[120.93035,31.619202],[120.929594,31.619412],[120.927636,31.619894],[120.927364,31.6195],[120.926536,31.61983],[120.92446,31.620422],[120.923367,31.619321],[120.922383,31.619758],[120.92184,31.620156],[120.921414,31.620345],[120.920155,31.620281],[120.91923,31.620374],[120.918907,31.620112],[120.916451,31.621266],[120.916579,31.621513],[120.91487,31.622403],[120.913658,31.621801],[120.913108,31.621807],[120.912298,31.621339],[120.911908,31.621347],[120.910336,31.622188],[120.909875,31.622627],[120.909517,31.622494],[120.907267,31.621784],[120.906502,31.621391],[120.905627,31.620719],[120.902353,31.618701],[120.899064,31.616984],[120.898503,31.616848],[120.897461,31.617739],[120.897525,31.617895],[120.899938,31.620161],[120.898731,31.620881],[120.897972,31.621128],[120.897515,31.621422],[120.8968,31.621691],[120.895373,31.621911],[120.894938,31.622119],[120.894166,31.62206],[120.891783,31.622227],[120.889491,31.622515],[120.889068,31.622639],[120.886286,31.622669],[120.886058,31.622741],[120.885411,31.622552],[120.884966,31.622867],[120.884493,31.623414],[120.883892,31.623768],[120.882907,31.624669],[120.882664,31.624983],[120.881316,31.62552],[120.880817,31.625997],[120.88039,31.62613],[120.879157,31.626203],[120.878593,31.626449],[120.877623,31.62631],[120.877089,31.626395],[120.877384,31.627712],[120.878126,31.629646],[120.878138,31.630233],[120.87823,31.630625],[120.878581,31.631124],[120.878963,31.632257],[120.881232,31.632144],[120.882834,31.631926],[120.883992,31.631657],[120.88427,31.632284],[120.883,31.63252],[120.883122,31.632843],[120.883092,31.63301],[120.882715,31.633012],[120.882529,31.632696],[120.880845,31.632923],[120.881204,31.634396],[120.881506,31.634292],[120.882506,31.634166],[120.883489,31.633696],[120.884018,31.633561],[120.885044,31.636324],[120.88625,31.63609],[120.886634,31.636707],[120.887511,31.638614],[120.887729,31.639564],[120.887803,31.64037],[120.888931,31.639852],[120.889225,31.64037],[120.89163,31.639169],[120.891748,31.638773],[120.891931,31.638618],[120.89242,31.638458],[120.892891,31.639251],[120.893147,31.63925],[120.893564,31.639118],[120.893964,31.638852],[120.894829,31.640645],[120.895915,31.641697],[120.896109,31.642106],[120.896626,31.642504],[120.896309,31.642582],[120.895722,31.643058],[120.895479,31.643352],[120.894963,31.643603],[120.894509,31.643945],[120.895465,31.644673],[120.896232,31.645575],[120.894191,31.646916],[120.894653,31.647332],[120.895224,31.647037],[120.895432,31.647126],[120.895992,31.646746],[120.89616,31.646811],[120.896946,31.646257],[120.89745,31.646607],[120.89803,31.646406],[120.899141,31.647625],[120.900809,31.646497],[120.903489,31.649041],[120.90901,31.653979],[120.909956,31.653455],[120.910575,31.654316],[120.910596,31.654745],[120.910869,31.654981],[120.911226,31.655179],[120.912694,31.655476],[120.913994,31.656303],[120.911881,31.658498],[120.91327,31.659244],[120.91401,31.659976],[120.914933,31.660682],[120.915706,31.661403],[120.916604,31.661754],[120.916826,31.662039],[120.916817,31.663342],[120.917041,31.663559],[120.918443,31.663985],[120.918852,31.663868],[120.919413,31.663917],[120.920094,31.66431],[120.920489,31.664418],[120.921422,31.664375],[120.921657,31.664485],[120.92185,31.664855],[120.921656,31.665147],[120.921563,31.665452],[120.921652,31.665662],[120.92209,31.665892],[120.922428,31.666247],[120.922548,31.666529],[120.922538,31.666744],[120.922818,31.667142],[120.923261,31.667565],[120.92393,31.667961],[120.924721,31.668248],[120.925821,31.669043],[120.926178,31.669208],[120.92633,31.669841],[120.926782,31.670271],[120.927511,31.670702],[120.929001,31.671387],[120.928794,31.671423],[120.928387,31.671726],[120.927337,31.67264],[120.927047,31.673683],[120.926652,31.674423],[120.926206,31.674176],[120.92461,31.675459],[120.923931,31.675116],[120.92274,31.676244],[120.922447,31.676168],[120.921806,31.675697],[120.92168,31.675716],[120.919864,31.67701],[120.919117,31.676342],[120.915672,31.677978],[120.916344,31.678166],[120.917099,31.679177],[120.916288,31.679838],[120.916073,31.679636],[120.915247,31.6803],[120.913682,31.682047],[120.91317,31.682348],[120.91328,31.682884],[120.91293,31.683005],[120.911069,31.684106],[120.910725,31.684928],[120.910921,31.686079],[120.91111,31.686611],[120.911182,31.686646],[120.911522,31.686751],[120.913247,31.688944],[120.913334,31.689121],[120.913007,31.690028],[120.913168,31.690259],[120.913316,31.690303],[120.913691,31.690212],[120.913988,31.690231],[120.914316,31.690798],[120.914297,31.691428],[120.914564,31.691497],[120.915317,31.691217],[120.915847,31.690742],[120.916041,31.690886],[120.916119,31.691109],[120.916073,31.691402],[120.916302,31.691789],[120.917355,31.691631],[120.918617,31.691549],[120.919062,31.693237],[120.919447,31.693985],[120.919922,31.69382],[120.919504,31.693455],[120.919975,31.693035],[120.920048,31.69303],[120.920418,31.693772],[120.921091,31.693523],[120.920777,31.693065],[120.922033,31.692755],[120.92203,31.692437],[120.922266,31.692389],[120.922395,31.691795],[120.922842,31.691608],[120.922973,31.692205],[120.923311,31.692099],[120.923514,31.692261],[120.924092,31.692205],[120.924689,31.692466],[120.925229,31.691991],[120.929212,31.689186],[120.929556,31.689427],[120.930078,31.690653],[120.93042,31.691234],[120.930846,31.69163],[120.931064,31.69197],[120.929892,31.692727],[120.931738,31.695282],[120.932596,31.696793],[120.930474,31.697912],[120.9304,31.697951],[120.931072,31.69853],[120.931295,31.69897],[120.93207,31.699346],[120.932063,31.699632],[120.932265,31.699691],[120.932883,31.699577],[120.933436,31.699597],[120.9339,31.699713],[120.934483,31.699985],[120.93458,31.700142],[120.934522,31.70039],[120.933852,31.701205],[120.934041,31.701384],[120.93515,31.701137],[120.937463,31.701398],[120.938582,31.701809],[120.939304,31.700833],[120.940126,31.701017],[120.94064,31.701047],[120.942296,31.70145],[120.943183,31.701939],[120.943382,31.702282],[120.943805,31.702504],[120.943965,31.702573],[120.943766,31.702909],[120.942908,31.705016],[120.942125,31.706275],[120.943635,31.708177],[120.943188,31.708587],[120.944531,31.70945],[120.945757,31.708062],[120.94588,31.707555],[120.946983,31.70631],[120.947434,31.706964],[120.9477,31.706473],[120.94918,31.708175],[120.948311,31.70885],[120.949852,31.710594],[120.949086,31.711039],[120.950949,31.713106],[120.951359,31.713332],[120.95156,31.713316],[120.951888,31.713118],[120.952018,31.712711],[120.95232,31.712284],[120.952339,31.711945],[120.952533,31.711811],[120.953039,31.711687],[120.954496,31.711691],[120.956078,31.710986],[120.957102,31.710431],[120.958684,31.710147],[120.960252,31.710111],[120.961927,31.708958],[120.963629,31.708059],[120.965545,31.707541],[120.965813,31.707574],[120.966297,31.707223],[120.965013,31.706347],[120.964401,31.70563],[120.963505,31.704879],[120.963249,31.704542],[120.962407,31.703757],[120.961718,31.703262],[120.959978,31.701705],[120.961304,31.700755],[120.96189,31.700755],[120.962899,31.699932],[120.963076,31.700028],[120.963803,31.700885],[120.964269,31.700363],[120.965052,31.701277],[120.965115,31.701582],[120.96554,31.701264],[120.966222,31.700975],[120.966604,31.700623],[120.966656,31.700448],[120.966112,31.699927],[120.965808,31.69949],[120.967961,31.698171],[120.968209,31.697824],[120.968173,31.697669],[120.966894,31.695912],[120.966319,31.695358],[120.964862,31.693694],[120.96716,31.692009],[120.969215,31.690698],[120.96953,31.691099],[120.969177,31.691334],[120.970722,31.693305],[120.972685,31.691958],[120.97393,31.693547],[120.978448,31.691293],[120.980553,31.694289],[120.980754,31.694306],[120.980853,31.694044],[120.980902,31.693852],[120.981061,31.693707],[120.981731,31.693454],[120.981986,31.693111],[120.982302,31.692907],[120.983144,31.692618],[120.983344,31.69254],[120.983777,31.692176],[120.984965,31.69162],[120.985189,31.691678],[120.985346,31.691631],[120.985499,31.691482],[120.985505,31.691207],[120.985312,31.690778],[120.98548,31.690593],[120.985744,31.690514],[120.986373,31.689814],[120.987049,31.68952],[120.987573,31.689656],[120.987825,31.689571],[120.987996,31.689376],[120.988328,31.689214],[120.988609,31.688948],[120.989463,31.688465],[120.98955,31.688332],[120.989092,31.687911],[120.989458,31.687401],[120.989711,31.687216],[120.990377,31.687337],[120.990631,31.687503],[120.990895,31.687517],[120.99156,31.686919],[120.991592,31.686749],[120.991421,31.686349],[120.99158,31.686171],[120.991878,31.686082],[120.992159,31.686091],[120.992446,31.685827],[120.992634,31.685759],[120.99325,31.685961],[120.99349,31.685973],[120.993614,31.685826],[120.993592,31.685528],[120.993952,31.685353],[120.993969,31.685193],[120.993457,31.685038],[120.993392,31.684891],[120.993571,31.684523],[120.994028,31.684474],[120.994492,31.68429],[120.994967,31.68434],[120.995124,31.684274],[120.995205,31.684144],[120.995317,31.683742],[120.99593,31.683608],[120.99618,31.68344],[120.996503,31.683655],[120.996843,31.683574],[120.997025,31.683314],[120.997223,31.683197],[120.997145,31.682716],[120.997422,31.682409],[120.997554,31.682325],[120.99796,31.682319],[120.998153,31.682228],[120.998411,31.68186],[120.998861,31.681816],[120.999246,31.682225],[120.999594,31.682392],[120.999947,31.682378],[121.000018,31.682281],[120.999802,31.681709],[120.999869,31.681545],[121.000636,31.68118],[121.001276,31.681248],[121.001855,31.680947],[121.001784,31.68072],[121.001528,31.680629],[121.001463,31.680503],[121.001573,31.680131],[121.001679,31.680055],[121.002262,31.680416],[121.00336,31.680243],[121.003483,31.680321],[121.003688,31.680771],[121.003853,31.680724],[121.003912,31.680436],[121.004173,31.680121],[121.004963,31.679673],[121.005599,31.679185],[121.006051,31.679736],[121.006709,31.679849],[121.006758,31.679603],[121.006704,31.6792],[121.007168,31.679188],[121.007457,31.679093],[121.007649,31.678829],[121.007798,31.67875],[121.008344,31.678821],[121.008511,31.67853],[121.008448,31.678178],[121.008499,31.678077],[121.008945,31.677736],[121.009164,31.677645],[121.01003,31.677757],[121.01033,31.677698],[121.011428,31.677066],[121.011591,31.676928],[121.011665,31.676677],[121.011542,31.676462],[121.011354,31.676345],[121.011293,31.676187],[121.011827,31.675891],[121.011367,31.674597],[121.010925,31.672489],[121.010249,31.670272],[121.009708,31.669611],[121.009199,31.669237],[121.00638,31.667833],[121.005403,31.66782],[121.004078,31.668066],[121.003432,31.668107],[121.002267,31.667765],[121.000023,31.666589],[120.998541,31.665551],[120.99583,31.664185],[120.994885,31.663494],[120.994121,31.66249],[120.993883,31.66179],[120.99346,31.660666],[120.993113,31.659476],[120.992433,31.657883],[120.992094,31.657414],[120.991678,31.657047],[120.990741,31.655832],[120.990618,31.65538],[120.990376,31.653293],[120.989636,31.65234],[120.988957,31.651215],[120.988639,31.651033],[120.987563,31.650418],[120.986046,31.649809],[120.984693,31.649266],[120.982951,31.648837],[120.981699,31.648362],[120.980763,31.648441],[120.979125,31.648379],[120.97797,31.64809],[120.977172,31.647687],[120.974936,31.645722],[120.973553,31.644731],[120.972677,31.643983],[120.971442,31.642679],[120.971286,31.642357],[120.970979,31.641724],[120.970655,31.640778],[120.970481,31.639929],[120.968818,31.635474],[120.968869,31.635073],[120.969311,31.63464],[120.970191,31.633402],[120.970307,31.63279],[120.968418,31.633883],[120.968138,31.634045],[120.964576,31.637066],[120.96415,31.637918],[120.962485,31.636944],[120.9611,31.636018],[120.960621,31.635698],[120.956944,31.634027],[120.955554,31.633312],[120.953594,31.632572],[120.95285,31.631834],[120.952323,31.631513],[120.951987,31.631439],[120.951042,31.630645],[120.949965,31.630041],[120.949458,31.630675],[120.945974,31.629174],[120.943869,31.628378],[120.942144,31.627637],[120.939468,31.630524],[120.938253,31.629474],[120.937528,31.628993],[120.937218,31.628917],[120.937,31.628052],[120.936789,31.627781],[120.936453,31.627662]]]]}},{type:"Feature",properties:{id:"7332",name:"虞山镇",site:"www.poi86.com"},geometry:{type:"MultiPolygon",coordinates:[[[[120.671057,31.682624],[120.669268,31.681368],[120.660979,31.674664],[120.658852,31.672197],[120.658661,31.672287],[120.656721,31.670281],[120.656219,31.6705],[120.655499,31.670813],[120.649381,31.670972],[120.643654,31.669992],[120.641103,31.669787],[120.636759,31.673433],[120.63479,31.675085],[120.634972,31.675669],[120.635871,31.67854],[120.635675,31.679399],[120.63617,31.680191],[120.635349,31.680583],[120.636142,31.681311],[120.636496,31.681273],[120.636533,31.681469],[120.637326,31.681441],[120.637778,31.682092],[120.636725,31.682646],[120.637159,31.683251],[120.637783,31.683185],[120.637849,31.683838],[120.640189,31.683082],[120.640451,31.683474],[120.641933,31.682952],[120.64314,31.685302],[120.643183,31.685386],[120.641598,31.686701],[120.642717,31.689434],[120.639891,31.694531],[120.642456,31.694932],[120.642624,31.695361],[120.642484,31.697395],[120.640973,31.70023],[120.639789,31.700393],[120.639266,31.702296],[120.638511,31.703349],[120.638511,31.704441],[120.63824,31.705327],[120.639695,31.705196],[120.639891,31.707099],[120.641701,31.706679],[120.641664,31.708256],[120.640647,31.708489],[120.640574,31.708802],[120.640479,31.709207],[120.639891,31.709244],[120.639957,31.710424],[120.635582,31.711749],[120.635909,31.714472],[120.633773,31.714808],[120.633736,31.714276],[120.632225,31.714602],[120.632458,31.716123],[120.631927,31.716151],[120.631758,31.717102],[120.633568,31.716813],[120.634035,31.717009],[120.634128,31.718492],[120.634622,31.719737],[120.634958,31.719839],[120.634958,31.720362],[120.634193,31.720334],[120.635009,31.721279],[120.635352,31.721109],[120.635418,31.721464],[120.636075,31.721332],[120.636272,31.721924],[120.637916,31.721924],[120.638218,31.722481],[120.638731,31.722384],[120.639493,31.723633],[120.639624,31.72433],[120.640769,31.725539],[120.641925,31.72617],[120.642412,31.726696],[120.643332,31.726985],[120.644581,31.727024],[120.645041,31.726788],[120.645436,31.727222],[120.650234,31.726919],[120.651373,31.727366],[120.652574,31.728076],[120.653429,31.728234],[120.654875,31.72947],[120.654967,31.730482],[120.65619,31.731402],[120.656873,31.731534],[120.65803,31.732362],[120.658056,31.733111],[120.660216,31.73444],[120.660883,31.735083],[120.662197,31.735385],[120.663618,31.734689],[120.664603,31.734597],[120.66651,31.735083],[120.66789,31.733085],[120.667985,31.733201],[120.672846,31.739119],[120.674226,31.742274],[120.674463,31.742971],[120.674358,31.744509],[120.675084,31.744841],[120.675228,31.744907],[120.675739,31.74514],[120.678565,31.745824],[120.679419,31.748716],[120.680932,31.748584],[120.681128,31.749768],[120.681497,31.750333],[120.682154,31.750136],[120.682443,31.75099],[120.683403,31.751411],[120.683863,31.753028],[120.688162,31.751805],[120.690874,31.750741],[120.691008,31.750688],[120.691317,31.75145],[120.691607,31.751411],[120.691712,31.75174],[120.692076,31.751763],[120.692274,31.752709],[120.691962,31.752864],[120.6921,31.753422],[120.694466,31.753422],[120.694844,31.753268],[120.694985,31.753334],[120.695041,31.753547],[120.695002,31.753784],[120.69533,31.754047],[120.696185,31.754172],[120.69629,31.754441],[120.696891,31.754523],[120.697131,31.754415],[120.698669,31.754859],[120.700165,31.756338],[120.70147,31.757629],[120.705391,31.757994],[120.706291,31.758164],[120.707122,31.757719],[120.711244,31.757065],[120.711462,31.757319],[120.712919,31.757012],[120.725371,31.755064],[120.733233,31.753457],[120.733615,31.753279],[120.733899,31.753233],[120.734287,31.753171],[120.735017,31.753053],[120.735611,31.752794],[120.736145,31.753145],[120.745619,31.753846],[120.746447,31.753463],[120.748739,31.753176],[120.749635,31.753024],[120.749833,31.752933],[120.749895,31.752897],[120.751341,31.752028],[120.752189,31.751963],[120.753738,31.753082],[120.755053,31.753773],[120.755612,31.754687],[120.756172,31.75492],[120.758578,31.753866],[120.760481,31.753969],[120.761171,31.752812],[120.763279,31.751833],[120.763643,31.752784],[120.764231,31.753642],[120.76535,31.75311],[120.766208,31.752915],[120.766403,31.753435],[120.767087,31.753231],[120.767028,31.75311],[120.767756,31.752812],[120.768278,31.752877],[120.768387,31.752471],[120.768419,31.752355],[120.767794,31.751833],[120.767952,31.751497],[120.76756,31.750578],[120.769006,31.750046],[120.768278,31.749291],[120.765909,31.750513],[120.765686,31.750345],[120.765452,31.749422],[120.765583,31.749095],[120.765126,31.747715],[120.764632,31.747416],[120.76493,31.746987],[120.764865,31.746763],[120.764468,31.746642],[120.763876,31.746204],[120.763309,31.746594],[120.762425,31.745756],[120.763605,31.745243],[120.764463,31.744618],[120.765687,31.745393],[120.766586,31.745326],[120.767021,31.744755],[120.76664,31.741782],[120.767143,31.740475],[120.768815,31.740564],[120.770056,31.739818],[120.771529,31.738611],[120.772663,31.73736],[120.776013,31.735342],[120.776265,31.735088],[120.776291,31.734617],[120.776052,31.733219],[120.775345,31.73194],[120.775101,31.731041],[120.77507,31.730288],[120.774631,31.729368],[120.774554,31.728445],[120.774601,31.728064],[120.774259,31.727141],[120.774002,31.726703],[120.773055,31.723943],[120.77266,31.721866],[120.772471,31.72098],[120.771466,31.719548],[120.771288,31.71874],[120.771228,31.717941],[120.770143,31.716023],[120.770006,31.715383],[120.768807,31.712007],[120.76851,31.711471],[120.766797,31.706753],[120.764667,31.701551],[120.770372,31.699678],[120.771524,31.7026],[120.775482,31.701253],[120.776316,31.703103],[120.777969,31.70251],[120.777341,31.700168],[120.779378,31.699483],[120.779929,31.698816],[120.780329,31.698017],[120.783261,31.696189],[120.785428,31.697696],[120.787313,31.697087],[120.789436,31.696639],[120.792395,31.695659],[120.793271,31.695229],[120.794578,31.695143],[120.797732,31.694575],[120.799019,31.694492],[120.800867,31.694228],[120.801532,31.694046],[120.804441,31.693686],[120.804707,31.693419],[120.805443,31.691687],[120.805228,31.690243],[120.80485,31.688937],[120.804292,31.687614],[120.804008,31.686534],[120.803475,31.685058],[120.802971,31.683031],[120.802713,31.682422],[120.802419,31.678892],[120.79767,31.676745],[120.789742,31.673162],[120.789057,31.672382],[120.789266,31.671601],[120.793463,31.663131],[120.794542,31.661081],[120.792715,31.66019],[120.793092,31.659505],[120.793697,31.659825],[120.794445,31.658658],[120.793693,31.658344],[120.794273,31.65704],[120.796558,31.657563],[120.797328,31.656107],[120.797679,31.65395],[120.798332,31.650805],[120.79828,31.649052],[120.797779,31.647229],[120.795881,31.639842],[120.796462,31.639586],[120.79805,31.639163],[120.799317,31.638946],[120.801156,31.638455],[120.804034,31.637404],[120.80259,31.634163],[120.801972,31.634425],[120.801662,31.633664],[120.79926,31.63276],[120.798649,31.631053],[120.796758,31.625522],[120.795728,31.622577],[120.795149,31.620569],[120.795108,31.618806],[120.790483,31.618977],[120.78817,31.618806],[120.787085,31.618447],[120.784454,31.615271],[120.783403,31.613565],[120.782657,31.612682],[120.781162,31.610475],[120.780096,31.609699],[120.778755,31.609211],[120.772165,31.608723],[120.769252,31.608638],[120.767874,31.608221],[120.766944,31.607758],[120.765561,31.60768],[120.764241,31.608274],[120.762938,31.609215],[120.76176,31.610585],[120.758998,31.613904],[120.755789,31.61658],[120.754067,31.616432],[120.752125,31.616632],[120.749099,31.616232],[120.747785,31.616665],[120.739151,31.614473],[120.737278,31.612508],[120.738877,31.610955],[120.736547,31.60762],[120.737461,31.606341],[120.736273,31.604833],[120.734016,31.604389],[120.733349,31.602046],[120.73376,31.599762],[120.733577,31.59798],[120.733742,31.594544],[120.733819,31.590737],[120.733602,31.590207],[120.731991,31.586245],[120.73024,31.584341],[120.727983,31.579319],[120.726553,31.578254],[120.723984,31.577719],[120.721101,31.578547],[120.721338,31.576997],[120.72206,31.571913],[120.723145,31.569401],[120.724668,31.568815],[120.731772,31.568441],[120.735937,31.565917],[120.738679,31.563918],[120.740791,31.562776],[120.740631,31.561062],[120.741256,31.560475],[120.740239,31.558535],[120.738757,31.558964],[120.73787,31.557845],[120.736583,31.557975],[120.734558,31.557651],[120.733999,31.552094],[120.730586,31.551936],[120.730026,31.55105],[120.729467,31.550854],[120.725225,31.551414],[120.725355,31.553707],[120.725187,31.554369],[120.723677,31.5545],[120.723351,31.555554],[120.723509,31.557064],[120.722167,31.557465],[120.722101,31.558873],[120.71894,31.558845],[120.711444,31.559759],[120.709859,31.560747],[120.709141,31.560813],[120.708274,31.558669],[120.706219,31.555471],[120.704964,31.553773],[120.690782,31.556393],[120.687229,31.557316],[120.687528,31.558668],[120.68792,31.559917],[120.68792,31.562249],[120.685617,31.56209],[120.685486,31.562808],[120.684796,31.562808],[120.684498,31.56334],[120.682623,31.563274],[120.682703,31.562057],[120.677575,31.562114],[120.67763,31.561069],[120.668232,31.559894],[120.668111,31.560948],[120.666134,31.561042],[120.666134,31.562198],[120.662628,31.562499],[120.662348,31.562524],[120.662469,31.563854],[120.663137,31.571055],[120.663332,31.573072],[120.663263,31.577747],[120.663057,31.58139],[120.664251,31.585364],[120.666459,31.587268],[120.670064,31.591039],[120.679461,31.600788],[120.682305,31.603716],[120.686988,31.608085],[120.688503,31.609855],[120.689404,31.610907],[120.689871,31.611454],[120.695601,31.616258],[120.697295,31.617593],[120.698466,31.618621],[120.701041,31.619287],[120.705909,31.619947],[120.709892,31.620477],[120.712866,31.621167],[120.716867,31.621628],[120.719493,31.621922],[120.721959,31.623521],[120.724381,31.625394],[120.725523,31.626079],[120.726528,31.626216],[120.730959,31.619957],[120.733975,31.615526],[120.734278,31.615206],[120.738532,31.615697],[120.7407,31.616103],[120.74758,31.617281],[120.746552,31.619902],[120.74693,31.620503],[120.748081,31.620933],[120.748304,31.621345],[120.749043,31.62174],[120.749888,31.62165],[120.748974,31.622136],[120.748574,31.622878],[120.74826,31.623678],[120.749625,31.623747],[120.749812,31.628036],[120.747148,31.628105],[120.746878,31.629983],[120.746685,31.6329],[120.746318,31.634761],[120.745956,31.636133],[120.742577,31.635856],[120.741711,31.635666],[120.741444,31.635532],[120.741188,31.635113],[120.740675,31.634938],[120.73958,31.6347],[120.738018,31.634533],[120.734155,31.634177],[120.733334,31.634191],[120.731704,31.631821],[120.730871,31.631012],[120.729831,31.62936],[120.726326,31.626967],[120.725861,31.627033],[120.724391,31.628794],[120.725547,31.62968],[120.727907,31.633501],[120.73031,31.635811],[120.729456,31.636775],[120.726734,31.634605],[120.726391,31.634681],[120.725614,31.635207],[120.724937,31.635397],[120.723795,31.636113],[120.72295,31.63641],[120.722196,31.63571],[120.723528,31.634895],[120.722196,31.633859],[120.722568,31.633477],[120.723991,31.634271],[120.724152,31.634091],[120.724365,31.634147],[120.724923,31.633623],[120.724624,31.633363],[120.724727,31.633167],[120.724521,31.632961],[120.724923,31.63257],[120.723766,31.631647],[120.723934,31.631386],[120.722918,31.630565],[120.71932,31.634383],[120.719263,31.634444],[120.723012,31.637442],[120.725178,31.63992],[120.725286,31.640043],[120.726927,31.640798],[120.727981,31.641488],[120.730023,31.643558],[120.728753,31.644543],[120.728547,31.645353],[120.728634,31.646188],[120.728885,31.646667],[120.72745,31.647307],[120.728057,31.648221],[120.729878,31.647629],[120.730118,31.648632],[120.732204,31.648238],[120.734714,31.648255],[120.73627,31.649327],[120.736818,31.649449],[120.736349,31.651025],[120.735481,31.653192],[120.734896,31.65443],[120.734415,31.655907],[120.733698,31.655586],[120.732345,31.653945],[120.730634,31.654325],[120.729584,31.656959],[120.72937,31.657766],[120.729393,31.658827],[120.729446,31.66002],[120.730299,31.65999],[120.731472,31.659655],[120.73202,31.659655],[120.732535,31.659434],[120.733982,31.659952],[120.736571,31.660165],[120.736277,31.661579],[120.734961,31.66184],[120.734304,31.662768],[120.732816,31.662661],[120.732061,31.663948],[120.731818,31.66414],[120.727707,31.667387],[120.728739,31.667533],[120.728592,31.667912],[120.730517,31.668341],[120.73042,31.668952],[120.732086,31.669579],[120.731633,31.670588],[120.730375,31.670169],[120.7301,31.670805],[120.728553,31.670247],[120.727972,31.671528],[120.726372,31.670957],[120.727001,31.669615],[120.726316,31.669392],[120.726506,31.668935],[120.726035,31.668782],[120.723971,31.6705],[120.724651,31.670951],[120.724377,31.671654],[120.724736,31.671786],[120.724662,31.671968],[120.723467,31.671604],[120.722599,31.672515],[120.722201,31.672362],[120.719867,31.674735],[120.718604,31.676127],[120.71924,31.676617],[120.720284,31.677259],[120.72202,31.678043],[120.722514,31.677167],[120.724672,31.678129],[120.723958,31.679414],[120.724485,31.680837],[120.724628,31.681482],[120.7246,31.682406],[120.723835,31.683954],[120.723073,31.684091],[120.719992,31.684644],[120.719824,31.682704],[120.718742,31.680764],[120.71795,31.68178],[120.718163,31.684796],[120.716575,31.684733],[120.717134,31.686087],[120.715592,31.686607],[120.714719,31.684522],[120.716638,31.684568],[120.71664,31.684267],[120.716067,31.682951],[120.716797,31.682827],[120.716668,31.682277],[120.715551,31.682478],[120.715049,31.681417],[120.716924,31.680726],[120.71618,31.67942],[120.716167,31.679137],[120.716009,31.67906],[120.715927,31.678862],[120.714432,31.679921],[120.708728,31.683431],[120.707722,31.68423],[120.705233,31.684644],[120.700029,31.686612],[120.699547,31.686894],[120.696811,31.688496],[120.691019,31.690725],[120.685869,31.68969],[120.68477,31.69089],[120.674734,31.685036],[120.674859,31.685007],[120.674238,31.684855],[120.671057,31.682624]]]]}},{type:"Feature",properties:{id:"27522",name:"古里镇",site:"www.poi86.com"},geometry:{type:"MultiPolygon",coordinates:[[[[120.917705,31.574047],[120.917759,31.572637],[120.915652,31.572768],[120.915988,31.571854],[120.917834,31.571985],[120.917759,31.570866],[120.916323,31.570922],[120.916174,31.569672],[120.915056,31.569617],[120.914738,31.568945],[120.915205,31.568815],[120.917834,31.568945],[120.917703,31.567696],[120.915465,31.56764],[120.915465,31.566913],[120.914664,31.566987],[120.914664,31.56639],[120.91526,31.566391],[120.915652,31.565794],[120.915521,31.565402],[120.914738,31.565607],[120.914141,31.565607],[120.914272,31.56337],[120.914869,31.562512],[120.914663,31.561654],[120.915204,31.561132],[120.917833,31.561001],[120.91789,31.559882],[120.917498,31.559677],[120.917759,31.55882],[120.918301,31.558583],[120.917773,31.558007],[120.915963,31.556647],[120.915265,31.556576],[120.914743,31.555935],[120.913908,31.553913],[120.913284,31.553476],[120.912924,31.552971],[120.914032,31.551553],[120.915041,31.550598],[120.915513,31.549865],[120.915661,31.549635],[120.914752,31.549318],[120.912904,31.549342],[120.912236,31.54925],[120.911661,31.548339],[120.909564,31.54998],[120.908332,31.548707],[120.907776,31.548388],[120.905685,31.546873],[120.905219,31.54678],[120.90432,31.546129],[120.903457,31.545273],[120.902591,31.544159],[120.901587,31.543122],[120.900026,31.540332],[120.897395,31.542269],[120.895766,31.543201],[120.894357,31.544006],[120.893212,31.543213],[120.893226,31.542958],[120.894016,31.54122],[120.893863,31.540246],[120.892117,31.541085],[120.891117,31.541148],[120.88886,31.541864],[120.887313,31.541864],[120.888014,31.543069],[120.888396,31.543453],[120.888423,31.543572],[120.886987,31.544315],[120.88678,31.544051],[120.885898,31.544702],[120.885336,31.544059],[120.883679,31.544932],[120.883107,31.544616],[120.882789,31.545071],[120.882542,31.546032],[120.88252,31.546786],[120.881531,31.546749],[120.881348,31.547756],[120.881164,31.548285],[120.880735,31.550073],[120.880652,31.550713],[120.880382,31.551654],[120.88014,31.553003],[120.879725,31.554728],[120.879454,31.554944],[120.87946,31.55567],[120.879796,31.556851],[120.880356,31.557815],[120.880493,31.55838],[120.881165,31.559714],[120.881597,31.559964],[120.88289,31.560485],[120.885573,31.56196],[120.885765,31.562293],[120.88583,31.562607],[120.886237,31.563244],[120.886388,31.563858],[120.885542,31.564097],[120.880704,31.564365],[120.87933,31.564518],[120.878339,31.564697],[120.877676,31.565113],[120.876415,31.565505],[120.876313,31.564657],[120.874476,31.565505],[120.874335,31.566233],[120.873944,31.566494],[120.873169,31.566696],[120.872409,31.567071],[120.870198,31.567699],[120.869791,31.567912],[120.869475,31.569034],[120.869631,31.569609],[120.869808,31.57174],[120.869805,31.572747],[120.869413,31.57457],[120.869158,31.576312],[120.868814,31.576338],[120.867283,31.576195],[120.865889,31.575817],[120.862056,31.574168],[120.861576,31.574165],[120.861175,31.57466],[120.860159,31.57452],[120.85973,31.576105],[120.859273,31.576339],[120.859207,31.5766],[120.858909,31.576861],[120.858517,31.576823],[120.858583,31.577784],[120.858247,31.578045],[120.856566,31.57784],[120.856715,31.578477],[120.856998,31.579695],[120.857607,31.584317],[120.858211,31.58707],[120.859352,31.590757],[120.86087,31.593945],[120.862254,31.596475],[120.863428,31.598013],[120.861301,31.599554],[120.861447,31.600852],[120.859258,31.602966],[120.858858,31.603064],[120.855951,31.604668],[120.852709,31.606293],[120.850851,31.607348],[120.848874,31.608545],[120.845877,31.611129],[120.845107,31.612254],[120.847793,31.614218],[120.84735,31.615406],[120.84653,31.616553],[120.845506,31.617443],[120.84503,31.617705],[120.843684,31.616356],[120.840253,31.618296],[120.828452,31.624728],[120.826323,31.625829],[120.824822,31.626253],[120.824604,31.626314],[120.81165,31.626997],[120.808769,31.627552],[120.803847,31.629194],[120.80097,31.630286],[120.798649,31.631053],[120.79926,31.63276],[120.801662,31.633664],[120.801972,31.634425],[120.80259,31.634163],[120.804034,31.637404],[120.801156,31.638455],[120.799317,31.638946],[120.79805,31.639163],[120.796462,31.639586],[120.795881,31.639842],[120.797779,31.647229],[120.79828,31.649052],[120.798332,31.650805],[120.797679,31.65395],[120.797328,31.656107],[120.796558,31.657563],[120.794273,31.65704],[120.793693,31.658344],[120.794445,31.658658],[120.793697,31.659825],[120.793092,31.659505],[120.792715,31.66019],[120.794542,31.661081],[120.793463,31.663131],[120.789266,31.671601],[120.789057,31.672382],[120.789742,31.673162],[120.79767,31.676745],[120.802419,31.678892],[120.81417,31.684146],[120.817533,31.685515],[120.821832,31.687266],[120.83029,31.690898],[120.838828,31.694459],[120.839171,31.693304],[120.839607,31.69273],[120.839964,31.691888],[120.840262,31.691423],[120.840133,31.691025],[120.840078,31.69053],[120.839757,31.689821],[120.839221,31.689168],[120.839336,31.687907],[120.839683,31.68728],[120.83953,31.687012],[120.839162,31.686756],[120.83967,31.685869],[120.840797,31.686411],[120.842756,31.684405],[120.842224,31.684032],[120.842031,31.683678],[120.843428,31.682118],[120.844987,31.683152],[120.845393,31.682343],[120.845691,31.681964],[120.847242,31.678832],[120.850096,31.679658],[120.850369,31.679623],[120.850716,31.679688],[120.851449,31.679931],[120.853308,31.680017],[120.852741,31.677808],[120.852329,31.676727],[120.852101,31.675498],[120.851683,31.674389],[120.8514,31.672716],[120.850966,31.671673],[120.850939,31.671177],[120.8525,31.671019],[120.852474,31.670031],[120.852619,31.669992],[120.852646,31.669887],[120.852981,31.669842],[120.85305,31.669526],[120.854154,31.669462],[120.854041,31.668684],[120.856301,31.668039],[120.855698,31.665624],[120.857503,31.665302],[120.857644,31.666026],[120.857689,31.667286],[120.858035,31.667345],[120.858651,31.668133],[120.858819,31.668805],[120.859109,31.669406],[120.86486,31.669284],[120.865859,31.669327],[120.866972,31.669191],[120.867834,31.669235],[120.868296,31.669089],[120.868709,31.668865],[120.870344,31.668567],[120.870121,31.667984],[120.869805,31.667509],[120.869338,31.666567],[120.869192,31.665914],[120.868882,31.66553],[120.868518,31.66485],[120.867116,31.659844],[120.866476,31.658183],[120.866195,31.656806],[120.865725,31.655406],[120.865704,31.654986],[120.865444,31.654577],[120.865272,31.654087],[120.86493,31.652734],[120.865807,31.652734],[120.867717,31.652457],[120.868423,31.652233],[120.868655,31.651965],[120.869463,31.65169],[120.870615,31.651507],[120.871434,31.653254],[120.871935,31.653266],[120.874136,31.652874],[120.875186,31.652671],[120.873771,31.650789],[120.872374,31.649305],[120.871259,31.647614],[120.86965,31.646131],[120.870966,31.645559],[120.87193,31.645953],[120.872434,31.64563],[120.873044,31.646408],[120.874465,31.645683],[120.875055,31.646681],[120.878342,31.645666],[120.879089,31.647307],[120.880007,31.648828],[120.881084,31.648281],[120.882845,31.647577],[120.883698,31.646869],[120.884693,31.646428],[120.885154,31.646354],[120.885793,31.646063],[120.887058,31.645324],[120.887814,31.645056],[120.888524,31.644655],[120.889489,31.643975],[120.888975,31.642743],[120.888083,31.641065],[120.887803,31.64037],[120.887729,31.639564],[120.887511,31.638614],[120.886634,31.636707],[120.88625,31.63609],[120.885044,31.636324],[120.884018,31.633561],[120.883489,31.633696],[120.882506,31.634166],[120.881506,31.634292],[120.881204,31.634396],[120.880845,31.632923],[120.882529,31.632696],[120.882715,31.633012],[120.883092,31.63301],[120.883122,31.632843],[120.883,31.63252],[120.88427,31.632284],[120.883992,31.631657],[120.882834,31.631926],[120.881232,31.632144],[120.878963,31.632257],[120.878581,31.631124],[120.87823,31.630625],[120.878138,31.630233],[120.878126,31.629646],[120.877384,31.627712],[120.877089,31.626395],[120.877623,31.62631],[120.878593,31.626449],[120.879157,31.626203],[120.88039,31.62613],[120.880817,31.625997],[120.881316,31.62552],[120.882664,31.624983],[120.882907,31.624669],[120.883892,31.623768],[120.884493,31.623414],[120.884966,31.622867],[120.885411,31.622552],[120.886058,31.622741],[120.886286,31.622669],[120.889068,31.622639],[120.889491,31.622515],[120.891783,31.622227],[120.894166,31.62206],[120.894938,31.622119],[120.895373,31.621911],[120.8968,31.621691],[120.897515,31.621422],[120.897972,31.621128],[120.898731,31.620881],[120.899938,31.620161],[120.897525,31.617895],[120.897461,31.617739],[120.898503,31.616848],[120.899064,31.616984],[120.902353,31.618701],[120.905627,31.620719],[120.906502,31.621391],[120.907267,31.621784],[120.909517,31.622494],[120.909875,31.622627],[120.910336,31.622188],[120.911908,31.621347],[120.912298,31.621339],[120.913108,31.621807],[120.913658,31.621801],[120.91487,31.622403],[120.916579,31.621513],[120.916451,31.621266],[120.918907,31.620112],[120.91923,31.620374],[120.920155,31.620281],[120.921414,31.620345],[120.92184,31.620156],[120.922383,31.619758],[120.923367,31.619321],[120.92446,31.620422],[120.926536,31.61983],[120.927364,31.6195],[120.927636,31.619894],[120.929594,31.619412],[120.93035,31.619202],[120.931137,31.618695],[120.931867,31.619618],[120.932259,31.619618],[120.93263,31.62023],[120.933953,31.620321],[120.935634,31.620302],[120.935764,31.618847],[120.933187,31.618472],[120.932714,31.618308],[120.930238,31.616813],[120.92814,31.61595],[120.925655,31.614805],[120.927166,31.613422],[120.928623,31.612219],[120.930868,31.610621],[120.93121,31.610144],[120.931874,31.6098],[120.932278,31.609377],[120.932332,31.609102],[120.932489,31.609026],[120.932954,31.609012],[120.933223,31.608778],[120.933725,31.60809],[120.932704,31.607855],[120.931414,31.607202],[120.930368,31.606526],[120.928706,31.605159],[120.928267,31.604662],[120.926811,31.602486],[120.924383,31.599503],[120.924042,31.598708],[120.929384,31.598628],[120.932152,31.598596],[120.93207,31.596702],[120.931518,31.596786],[120.931346,31.596685],[120.930504,31.596681],[120.928135,31.596364],[120.92749,31.596126],[120.926614,31.59596],[120.926191,31.595753],[120.925266,31.593854],[120.924864,31.592712],[120.925797,31.592638],[120.925983,31.593421],[120.926067,31.593492],[120.929186,31.592651],[120.92963,31.592406],[120.929676,31.591877],[120.930439,31.592077],[120.932092,31.592015],[120.93255,31.593047],[120.934499,31.592936],[120.935093,31.593163],[120.936844,31.592143],[120.938291,31.593104],[120.938935,31.592278],[120.939019,31.592171],[120.931317,31.584358],[120.931578,31.583761],[120.927913,31.584814],[120.92749,31.584731],[120.926875,31.584159],[120.926635,31.583461],[120.926366,31.583037],[120.925956,31.582836],[120.925269,31.582087],[120.924863,31.58175],[120.924789,31.581277],[120.924857,31.581125],[120.92465,31.580551],[120.924677,31.580109],[120.924805,31.57971],[120.924669,31.578644],[120.924675,31.577384],[120.924624,31.57733],[120.923619,31.577419],[120.923102,31.577358],[120.919014,31.577398],[120.918904,31.577167],[120.918894,31.576779],[120.919427,31.574752],[120.919468,31.574141],[120.919341,31.574137],[120.917705,31.574047]]]]}},{type:"Feature",properties:{id:"27523",name:"支塘镇",site:"www.poi86.com"},geometry:{type:"MultiPolygon",coordinates:[[[[120.988587,31.507535],[120.984157,31.502868],[120.98421,31.501354],[120.984,31.501418],[120.980004,31.498344],[120.978522,31.497633],[120.975804,31.49604],[120.974935,31.497324],[120.974573,31.497126],[120.974403,31.497491],[120.974037,31.497418],[120.97215,31.497041],[120.970853,31.498094],[120.970814,31.498535],[120.969998,31.498272],[120.9698,31.498706],[120.969287,31.498272],[120.968154,31.497719],[120.96718,31.497482],[120.966428,31.497549],[120.965995,31.498522],[120.964731,31.49997],[120.964251,31.500872],[120.963678,31.502255],[120.962361,31.503775],[120.960018,31.503999],[120.960149,31.503341],[120.958318,31.503037],[120.957121,31.502748],[120.957121,31.502222],[120.956002,31.50209],[120.956331,31.501037],[120.956042,31.500971],[120.956107,31.500615],[120.955515,31.500418],[120.955212,31.502064],[120.954027,31.501932],[120.953896,31.502419],[120.951328,31.501866],[120.951131,31.502788],[120.953211,31.503538],[120.953342,31.505816],[120.951526,31.505777],[120.951065,31.507659],[120.951657,31.507423],[120.951368,31.509173],[120.950446,31.509397],[120.9488,31.514743],[120.944459,31.513874],[120.942402,31.521023],[120.940664,31.520299],[120.941414,31.518982],[120.940427,31.518522],[120.940624,31.518061],[120.940071,31.517797],[120.938583,31.520957],[120.937043,31.51993],[120.93595,31.524144],[120.934608,31.523722],[120.933883,31.524973],[120.936345,31.525197],[120.935397,31.528133],[120.935792,31.531293],[120.933751,31.531227],[120.933619,31.533196],[120.933605,31.533412],[120.930355,31.531911],[120.926049,31.529147],[120.923403,31.526777],[120.918663,31.525394],[120.914423,31.523116],[120.91333,31.521576],[120.908854,31.525421],[120.909684,31.525881],[120.907381,31.531849],[120.896357,31.52793],[120.895043,31.527462],[120.892173,31.530648],[120.893068,31.531701],[120.894214,31.533281],[120.89711,31.536243],[120.899415,31.539648],[120.900026,31.540332],[120.901587,31.543122],[120.902591,31.544159],[120.903457,31.545273],[120.90432,31.546129],[120.905219,31.54678],[120.905685,31.546873],[120.907776,31.548388],[120.908332,31.548707],[120.909564,31.54998],[120.911661,31.548339],[120.912236,31.54925],[120.912904,31.549342],[120.914752,31.549318],[120.915661,31.549635],[120.915513,31.549865],[120.915041,31.550598],[120.914032,31.551553],[120.912924,31.552971],[120.913284,31.553476],[120.913908,31.553913],[120.914743,31.555935],[120.915265,31.556576],[120.915963,31.556647],[120.917773,31.558007],[120.918301,31.558583],[120.917759,31.55882],[120.917498,31.559677],[120.91789,31.559882],[120.917833,31.561001],[120.915204,31.561132],[120.914663,31.561654],[120.914869,31.562512],[120.914272,31.56337],[120.914141,31.565607],[120.914738,31.565607],[120.915521,31.565402],[120.915652,31.565794],[120.91526,31.566391],[120.914664,31.56639],[120.914664,31.566987],[120.915465,31.566913],[120.915465,31.56764],[120.917703,31.567696],[120.917834,31.568945],[120.915205,31.568815],[120.914738,31.568945],[120.915056,31.569617],[120.916174,31.569672],[120.916323,31.570922],[120.917759,31.570866],[120.917834,31.571985],[120.915988,31.571854],[120.915652,31.572768],[120.917759,31.572637],[120.917705,31.574047],[120.919341,31.574137],[120.919468,31.574141],[120.919427,31.574752],[120.918894,31.576779],[120.918904,31.577167],[120.919014,31.577398],[120.923102,31.577358],[120.923619,31.577419],[120.924624,31.57733],[120.924675,31.577384],[120.924669,31.578644],[120.924805,31.57971],[120.924677,31.580109],[120.92465,31.580551],[120.924857,31.581125],[120.924789,31.581277],[120.924863,31.58175],[120.925269,31.582087],[120.925956,31.582836],[120.926366,31.583037],[120.926635,31.583461],[120.926875,31.584159],[120.92749,31.584731],[120.927913,31.584814],[120.931578,31.583761],[120.931317,31.584358],[120.939019,31.592171],[120.938935,31.592278],[120.938291,31.593104],[120.936844,31.592143],[120.935093,31.593163],[120.934499,31.592936],[120.93255,31.593047],[120.932092,31.592015],[120.930439,31.592077],[120.929676,31.591877],[120.92963,31.592406],[120.929186,31.592651],[120.926067,31.593492],[120.925983,31.593421],[120.925797,31.592638],[120.924864,31.592712],[120.925266,31.593854],[120.926191,31.595753],[120.926614,31.59596],[120.92749,31.596126],[120.928135,31.596364],[120.930504,31.596681],[120.931346,31.596685],[120.931518,31.596786],[120.93207,31.596702],[120.932152,31.598596],[120.929384,31.598628],[120.924042,31.598708],[120.924383,31.599503],[120.926811,31.602486],[120.928267,31.604662],[120.928706,31.605159],[120.930368,31.606526],[120.931414,31.607202],[120.932704,31.607855],[120.933725,31.60809],[120.933223,31.608778],[120.932954,31.609012],[120.932489,31.609026],[120.932332,31.609102],[120.932278,31.609377],[120.931874,31.6098],[120.93121,31.610144],[120.930868,31.610621],[120.928623,31.612219],[120.927166,31.613422],[120.925655,31.614805],[120.92814,31.61595],[120.930238,31.616813],[120.932714,31.618308],[120.933187,31.618472],[120.935764,31.618847],[120.935634,31.620302],[120.933953,31.620321],[120.933738,31.620565],[120.932349,31.621697],[120.931304,31.622038],[120.930747,31.622331],[120.928305,31.622681],[120.926761,31.622797],[120.925794,31.623119],[120.924372,31.623821],[120.924347,31.624008],[120.924803,31.624434],[120.925212,31.624689],[120.925464,31.624758],[120.925843,31.624713],[120.926161,31.624176],[120.92671,31.623824],[120.927352,31.623938],[120.928767,31.624372],[120.929235,31.624836],[120.929553,31.625363],[120.92976,31.626688],[120.930108,31.626829],[120.930804,31.626695],[120.93221,31.626698],[120.933236,31.626368],[120.933546,31.626409],[120.933876,31.626764],[120.934992,31.627093],[120.935708,31.627646],[120.936453,31.627662],[120.936789,31.627781],[120.937,31.628052],[120.937218,31.628917],[120.937528,31.628993],[120.938253,31.629474],[120.939468,31.630524],[120.942144,31.627637],[120.943869,31.628378],[120.945974,31.629174],[120.949458,31.630675],[120.949965,31.630041],[120.951042,31.630645],[120.951987,31.631439],[120.952323,31.631513],[120.95285,31.631834],[120.953594,31.632572],[120.955554,31.633312],[120.956944,31.634027],[120.960621,31.635698],[120.9611,31.636018],[120.962485,31.636944],[120.96415,31.637918],[120.964576,31.637066],[120.968138,31.634045],[120.968418,31.633883],[120.970307,31.63279],[120.970191,31.633402],[120.969311,31.63464],[120.968869,31.635073],[120.968818,31.635474],[120.970481,31.639929],[120.970655,31.640778],[120.970979,31.641724],[120.971286,31.642357],[120.971442,31.642679],[120.972677,31.643983],[120.973553,31.644731],[120.974936,31.645722],[120.977172,31.647687],[120.97797,31.64809],[120.979125,31.648379],[120.980763,31.648441],[120.981699,31.648362],[120.982951,31.648837],[120.984693,31.649266],[120.986046,31.649809],[120.987563,31.650418],[120.988639,31.651033],[120.988957,31.651215],[120.989636,31.65234],[120.990376,31.653293],[120.990618,31.65538],[120.990741,31.655832],[120.991678,31.657047],[120.992094,31.657414],[120.992433,31.657883],[120.993113,31.659476],[120.99346,31.660666],[120.993883,31.66179],[120.994121,31.66249],[120.994885,31.663494],[120.99583,31.664185],[120.998541,31.665551],[121.000023,31.666589],[121.002267,31.667765],[121.003432,31.668107],[121.004078,31.668066],[121.005403,31.66782],[121.00638,31.667833],[121.009199,31.669237],[121.009708,31.669611],[121.010249,31.670272],[121.010695,31.670201],[121.01361,31.671419],[121.014084,31.671854],[121.014724,31.672964],[121.015896,31.672124],[121.01584,31.671266],[121.017146,31.670614],[121.020067,31.668429],[121.020011,31.668194],[121.019551,31.667838],[121.018563,31.667799],[121.017312,31.666877],[121.016506,31.66568],[121.014653,31.664178],[121.011796,31.661479],[121.012875,31.660887],[121.013442,31.661716],[121.013968,31.661479],[121.013903,31.66086],[121.014612,31.660924],[121.015048,31.660491],[121.015888,31.660154],[121.016536,31.660228],[121.016825,31.659609],[121.017655,31.659307],[121.017918,31.659346],[121.018315,31.65869],[121.019761,31.659017],[121.019761,31.658385],[121.020288,31.658227],[121.021121,31.657526],[121.021708,31.657373],[121.022,31.657068],[121.022658,31.656937],[121.023053,31.656713],[121.023382,31.657332],[121.024172,31.656739],[121.024501,31.656344],[121.026476,31.655159],[121.026989,31.655265],[121.028056,31.654567],[121.029372,31.654277],[121.029381,31.653658],[121.03036,31.653513],[121.03115,31.653158],[121.031034,31.652547],[121.032329,31.652207],[121.033428,31.65246],[121.033686,31.65185],[121.033849,31.651143],[121.034349,31.651012],[121.035165,31.650577],[121.035758,31.65088],[121.036285,31.650248],[121.036061,31.649853],[121.036317,31.649639],[121.036456,31.649524],[121.036932,31.649769],[121.03726,31.649938],[121.038194,31.6493],[121.038984,31.648642],[121.038918,31.648141],[121.040537,31.647615],[121.040998,31.646733],[121.041303,31.646801],[121.042012,31.646101],[121.042512,31.646166],[121.043236,31.645376],[121.043131,31.645021],[121.043265,31.644887],[121.043657,31.644494],[121.043302,31.643928],[121.046093,31.64169],[121.050017,31.640044],[121.051426,31.639386],[121.052182,31.639432],[121.054691,31.63853],[121.05577,31.63857],[121.056139,31.638069],[121.057021,31.637911],[121.05735,31.638109],[121.057785,31.637845],[121.058904,31.637674],[121.059283,31.637535],[121.055435,31.630839],[121.052748,31.632059],[121.052011,31.631848],[121.048062,31.625265],[121.04693,31.624729],[121.043885,31.623284],[121.041541,31.621721],[121.0357,31.614507],[121.033368,31.611625],[121.030386,31.610307],[121.025152,31.607992],[121.021518,31.60728],[121.015857,31.601751],[121.011228,31.599644],[120.997635,31.593456],[120.997801,31.593219],[121.004626,31.583608],[120.991335,31.5754],[120.996994,31.569187],[120.992065,31.566834],[120.978151,31.556857],[120.978138,31.556768],[120.97778,31.554458],[120.977885,31.552417],[120.97907,31.551443],[120.979688,31.550021],[120.973013,31.547889],[120.976897,31.545979],[120.981098,31.547665],[120.982625,31.545611],[120.982059,31.545308],[120.982401,31.54327],[120.982414,31.543188],[120.993816,31.544899],[120.995395,31.53463],[120.997423,31.535288],[121.000033,31.527767],[121.001428,31.524407],[121.002453,31.521938],[120.998345,31.515881],[120.991762,31.510878],[120.988587,31.507535]]]]}},{type:"Feature",properties:{id:"27524",name:"梅李镇",site:"www.poi86.com"},geometry:{type:"MultiPolygon",coordinates:[[[[120.911881,31.658498],[120.913994,31.656303],[120.912694,31.655476],[120.911226,31.655179],[120.910869,31.654981],[120.910596,31.654745],[120.910575,31.654316],[120.909956,31.653455],[120.90901,31.653979],[120.903489,31.649041],[120.900809,31.646497],[120.899141,31.647625],[120.89803,31.646406],[120.89745,31.646607],[120.896946,31.646257],[120.89616,31.646811],[120.895992,31.646746],[120.895432,31.647126],[120.895224,31.647037],[120.894653,31.647332],[120.894191,31.646916],[120.896232,31.645575],[120.895465,31.644673],[120.894509,31.643945],[120.894963,31.643603],[120.895479,31.643352],[120.895722,31.643058],[120.896309,31.642582],[120.896626,31.642504],[120.896109,31.642106],[120.895915,31.641697],[120.894829,31.640645],[120.893964,31.638852],[120.893564,31.639118],[120.893147,31.63925],[120.892891,31.639251],[120.89242,31.638458],[120.891931,31.638618],[120.891748,31.638773],[120.89163,31.639169],[120.889225,31.64037],[120.888931,31.639852],[120.887803,31.64037],[120.888083,31.641065],[120.888975,31.642743],[120.889489,31.643975],[120.888524,31.644655],[120.887814,31.645056],[120.887058,31.645324],[120.885793,31.646063],[120.885154,31.646354],[120.884693,31.646428],[120.883698,31.646869],[120.882845,31.647577],[120.881084,31.648281],[120.880007,31.648828],[120.879089,31.647307],[120.878342,31.645666],[120.875055,31.646681],[120.874465,31.645683],[120.873044,31.646408],[120.872434,31.64563],[120.87193,31.645953],[120.870966,31.645559],[120.86965,31.646131],[120.871259,31.647614],[120.872374,31.649305],[120.873771,31.650789],[120.875186,31.652671],[120.874136,31.652874],[120.871935,31.653266],[120.871434,31.653254],[120.870615,31.651507],[120.869463,31.65169],[120.868655,31.651965],[120.868423,31.652233],[120.867717,31.652457],[120.865807,31.652734],[120.86493,31.652734],[120.865272,31.654087],[120.865444,31.654577],[120.865704,31.654986],[120.865725,31.655406],[120.866195,31.656806],[120.866476,31.658183],[120.867116,31.659844],[120.868518,31.66485],[120.868882,31.66553],[120.869192,31.665914],[120.869338,31.666567],[120.869805,31.667509],[120.870121,31.667984],[120.870344,31.668567],[120.868709,31.668865],[120.868296,31.669089],[120.867834,31.669235],[120.866972,31.669191],[120.865859,31.669327],[120.86486,31.669284],[120.859109,31.669406],[120.858819,31.668805],[120.858651,31.668133],[120.858035,31.667345],[120.857689,31.667286],[120.857644,31.666026],[120.857503,31.665302],[120.855698,31.665624],[120.856301,31.668039],[120.854041,31.668684],[120.854154,31.669462],[120.85305,31.669526],[120.852981,31.669842],[120.852646,31.669887],[120.852619,31.669992],[120.852474,31.670031],[120.8525,31.671019],[120.850939,31.671177],[120.850966,31.671673],[120.8514,31.672716],[120.851683,31.674389],[120.852101,31.675498],[120.852329,31.676727],[120.852741,31.677808],[120.853308,31.680017],[120.851449,31.679931],[120.850716,31.679688],[120.850369,31.679623],[120.850096,31.679658],[120.847242,31.678832],[120.845691,31.681964],[120.845393,31.682343],[120.844987,31.683152],[120.843428,31.682118],[120.842031,31.683678],[120.842224,31.684032],[120.842756,31.684405],[120.840797,31.686411],[120.83967,31.685869],[120.839162,31.686756],[120.83953,31.687012],[120.839683,31.68728],[120.839336,31.687907],[120.839221,31.689168],[120.839757,31.689821],[120.840078,31.69053],[120.840133,31.691025],[120.840262,31.691423],[120.839964,31.691888],[120.839607,31.69273],[120.839171,31.693304],[120.838828,31.694459],[120.838481,31.695032],[120.836857,31.696637],[120.834637,31.699074],[120.834024,31.699552],[120.83371,31.699619],[120.8337,31.699888],[120.833315,31.700548],[120.833609,31.701052],[120.833553,31.701774],[120.833207,31.702584],[120.832477,31.702632],[120.831521,31.702466],[120.829883,31.704168],[120.830408,31.70509],[120.830514,31.705736],[120.8313,31.70627],[120.831768,31.706471],[120.83477,31.709704],[120.830996,31.713287],[120.82966,31.714563],[120.827832,31.71591],[120.826703,31.716402],[120.823398,31.718729],[120.820597,31.720411],[120.8199,31.72083],[120.817196,31.722819],[120.816234,31.723708],[120.819055,31.726382],[120.820412,31.727397],[120.820837,31.727103],[120.823458,31.729919],[120.823082,31.73004],[120.823297,31.730265],[120.81985,31.732323],[120.819212,31.732801],[120.818938,31.732424],[120.817906,31.733025],[120.817766,31.733209],[120.8193,31.735697],[120.82049,31.734882],[120.821179,31.735793],[120.820283,31.737059],[120.819907,31.737442],[120.819713,31.738161],[120.819187,31.738574],[120.81763,31.740695],[120.814967,31.743092],[120.816007,31.743872],[120.815557,31.744241],[120.814746,31.743762],[120.81426,31.744422],[120.814831,31.744827],[120.814532,31.74526],[120.815304,31.745643],[120.815059,31.746377],[120.814564,31.746111],[120.814351,31.746166],[120.812888,31.746089],[120.812385,31.746306],[120.812175,31.746686],[120.812292,31.747094],[120.812219,31.747472],[120.812702,31.749375],[120.813429,31.750286],[120.812651,31.750733],[120.813166,31.751266],[120.813961,31.752081],[120.813421,31.752322],[120.813843,31.752965],[120.813291,31.753206],[120.815767,31.756745],[120.816739,31.758354],[120.818844,31.761238],[120.820618,31.764601],[120.818361,31.766236],[120.819257,31.767265],[120.820763,31.76704],[120.82203,31.768227],[120.82124,31.768948],[120.82691,31.77335],[120.831783,31.777591],[120.833879,31.779611],[120.838494,31.779686],[120.855352,31.779956],[120.872188,31.780227],[120.886307,31.783917],[120.884873,31.779009],[120.881865,31.768709],[120.882162,31.767414],[120.882518,31.76724],[120.883139,31.766816],[120.883958,31.766009],[120.882234,31.760829],[120.881576,31.759291],[120.881633,31.759112],[120.88154,31.758232],[120.878722,31.756075],[120.877677,31.755417],[120.87386,31.753975],[120.874325,31.753557],[120.873364,31.752912],[120.873018,31.752557],[120.874588,31.751171],[120.875329,31.75068],[120.875719,31.750333],[120.875111,31.749786],[120.876071,31.749484],[120.87439,31.747926],[120.87579,31.746759],[120.875198,31.746208],[120.876732,31.745303],[120.876098,31.744633],[120.874666,31.745353],[120.873458,31.744437],[120.874585,31.743403],[120.874045,31.743025],[120.872965,31.74404],[120.87205,31.743205],[120.871307,31.742882],[120.872505,31.741902],[120.872718,31.74156],[120.87082,31.74081],[120.87138,31.740281],[120.870066,31.73933],[120.870238,31.739066],[120.870564,31.738873],[120.871647,31.737464],[120.871921,31.736901],[120.872219,31.736702],[120.872295,31.736582],[120.872222,31.736237],[120.872951,31.735122],[120.873421,31.734564],[120.873866,31.733738],[120.875377,31.732558],[120.875871,31.732394],[120.876257,31.731914],[120.877086,31.731718],[120.87767,31.731439],[120.878928,31.730118],[120.879331,31.729966],[120.879606,31.730293],[120.879224,31.730522],[120.879866,31.731227],[120.880241,31.730998],[120.880015,31.730749],[120.880362,31.730496],[120.880024,31.730194],[120.881405,31.729355],[120.880798,31.728727],[120.881716,31.728321],[120.881814,31.727865],[120.882491,31.727618],[120.882286,31.72728],[120.882889,31.726977],[120.88325,31.727446],[120.883346,31.727412],[120.883716,31.727282],[120.883852,31.727579],[120.884102,31.7275],[120.884237,31.727773],[120.884815,31.727638],[120.884701,31.727364],[120.88603,31.726931],[120.885577,31.725551],[120.885234,31.724748],[120.884859,31.724112],[120.885838,31.723688],[120.885648,31.723438],[120.886183,31.723147],[120.887733,31.722613],[120.888389,31.722525],[120.888848,31.723148],[120.889892,31.722055],[120.890669,31.721572],[120.890372,31.721175],[120.891923,31.719899],[120.893872,31.71874],[120.894326,31.719459],[120.896278,31.718503],[120.896986,31.719577],[120.898874,31.718817],[120.897689,31.71724],[120.897433,31.716759],[120.897226,31.715484],[120.897042,31.715228],[120.896248,31.714644],[120.895599,31.713926],[120.89522,31.713672],[120.894694,31.713479],[120.894128,31.713394],[120.893077,31.713562],[120.892625,31.713703],[120.892102,31.713625],[120.891851,31.713117],[120.891761,31.711716],[120.891584,31.711479],[120.891447,31.711068],[120.891458,31.710668],[120.892235,31.709494],[120.892501,31.708902],[120.891731,31.707829],[120.891383,31.707825],[120.891101,31.706949],[120.891979,31.706794],[120.892284,31.707286],[120.892407,31.707835],[120.894906,31.707864],[120.895588,31.70777],[120.896239,31.707915],[120.896693,31.707936],[120.897374,31.707692],[120.897952,31.707623],[120.898595,31.707714],[120.899355,31.707636],[120.900176,31.707338],[120.900754,31.707293],[120.901397,31.707372],[120.901821,31.707177],[120.902138,31.706776],[120.90261,31.706564],[120.902973,31.706609],[120.903444,31.70691],[120.903711,31.707182],[120.904117,31.707281],[120.90463,31.706889],[120.905736,31.705784],[120.905923,31.705717],[120.907159,31.705702],[120.907401,31.705593],[120.907562,31.704864],[120.908071,31.703423],[120.910835,31.702079],[120.913858,31.700283],[120.91278,31.698497],[120.915026,31.697612],[120.915274,31.697811],[120.915919,31.697548],[120.91255,31.692046],[120.914297,31.691428],[120.914316,31.690798],[120.913988,31.690231],[120.913691,31.690212],[120.913316,31.690303],[120.913168,31.690259],[120.913007,31.690028],[120.913334,31.689121],[120.913247,31.688944],[120.911522,31.686751],[120.911182,31.686646],[120.91111,31.686611],[120.910921,31.686079],[120.910725,31.684928],[120.911069,31.684106],[120.91293,31.683005],[120.91328,31.682884],[120.91317,31.682348],[120.913682,31.682047],[120.915247,31.6803],[120.916073,31.679636],[120.916288,31.679838],[120.917099,31.679177],[120.916344,31.678166],[120.915672,31.677978],[120.919117,31.676342],[120.919864,31.67701],[120.92168,31.675716],[120.921806,31.675697],[120.922447,31.676168],[120.92274,31.676244],[120.923931,31.675116],[120.92461,31.675459],[120.926206,31.674176],[120.926652,31.674423],[120.927047,31.673683],[120.927337,31.67264],[120.928387,31.671726],[120.928794,31.671423],[120.929001,31.671387],[120.927511,31.670702],[120.926782,31.670271],[120.92633,31.669841],[120.926178,31.669208],[120.925821,31.669043],[120.924721,31.668248],[120.92393,31.667961],[120.923261,31.667565],[120.922818,31.667142],[120.922538,31.666744],[120.922548,31.666529],[120.922428,31.666247],[120.92209,31.665892],[120.921652,31.665662],[120.921563,31.665452],[120.921656,31.665147],[120.92185,31.664855],[120.921657,31.664485],[120.921422,31.664375],[120.920489,31.664418],[120.920094,31.66431],[120.919413,31.663917],[120.918852,31.663868],[120.918443,31.663985],[120.917041,31.663559],[120.916817,31.663342],[120.916826,31.662039],[120.916604,31.661754],[120.915706,31.661403],[120.914933,31.660682],[120.91401,31.659976],[120.91327,31.659244],[120.911881,31.658498]]]]}},{type:"Feature",properties:{id:"27525",name:"海虞镇",site:"www.poi86.com"},geometry:{type:"MultiPolygon",coordinates:[[[[120.83029,31.690898],[120.821832,31.687266],[120.817533,31.685515],[120.81417,31.684146],[120.802419,31.678892],[120.802713,31.682422],[120.802971,31.683031],[120.803475,31.685058],[120.804008,31.686534],[120.804292,31.687614],[120.80485,31.688937],[120.805228,31.690243],[120.805443,31.691687],[120.804707,31.693419],[120.804441,31.693686],[120.801532,31.694046],[120.800867,31.694228],[120.799019,31.694492],[120.797732,31.694575],[120.794578,31.695143],[120.793271,31.695229],[120.792395,31.695659],[120.789436,31.696639],[120.787313,31.697087],[120.785428,31.697696],[120.783261,31.696189],[120.780329,31.698017],[120.779929,31.698816],[120.779378,31.699483],[120.777341,31.700168],[120.777969,31.70251],[120.776316,31.703103],[120.775482,31.701253],[120.771524,31.7026],[120.770372,31.699678],[120.764667,31.701551],[120.766797,31.706753],[120.76851,31.711471],[120.768807,31.712007],[120.770006,31.715383],[120.770143,31.716023],[120.771228,31.717941],[120.771288,31.71874],[120.771466,31.719548],[120.772471,31.72098],[120.77266,31.721866],[120.773055,31.723943],[120.774002,31.726703],[120.774259,31.727141],[120.774601,31.728064],[120.774554,31.728445],[120.774631,31.729368],[120.77507,31.730288],[120.775101,31.731041],[120.775345,31.73194],[120.776052,31.733219],[120.776291,31.734617],[120.776265,31.735088],[120.776013,31.735342],[120.772663,31.73736],[120.771529,31.738611],[120.770056,31.739818],[120.768815,31.740564],[120.767143,31.740475],[120.76664,31.741782],[120.767021,31.744755],[120.766586,31.745326],[120.765687,31.745393],[120.764463,31.744618],[120.763605,31.745243],[120.762425,31.745756],[120.763309,31.746594],[120.763876,31.746204],[120.764468,31.746642],[120.764865,31.746763],[120.76493,31.746987],[120.764632,31.747416],[120.765126,31.747715],[120.765583,31.749095],[120.765452,31.749422],[120.765686,31.750345],[120.765909,31.750513],[120.768278,31.749291],[120.769006,31.750046],[120.76756,31.750578],[120.767952,31.751497],[120.767794,31.751833],[120.768419,31.752355],[120.768387,31.752471],[120.768278,31.752877],[120.767756,31.752812],[120.767028,31.75311],[120.767087,31.753231],[120.766403,31.753435],[120.766208,31.752915],[120.76535,31.75311],[120.764231,31.753642],[120.763643,31.752784],[120.763279,31.751833],[120.761171,31.752812],[120.760481,31.753969],[120.758578,31.753866],[120.756172,31.75492],[120.755612,31.754687],[120.755053,31.753773],[120.753738,31.753082],[120.752189,31.751963],[120.751341,31.752028],[120.749895,31.752897],[120.749833,31.752933],[120.749635,31.753024],[120.748739,31.753176],[120.746447,31.753463],[120.745619,31.753846],[120.736145,31.753145],[120.735611,31.752794],[120.735017,31.753053],[120.734287,31.753171],[120.733899,31.753233],[120.733615,31.753279],[120.733233,31.753457],[120.725371,31.755064],[120.712919,31.757012],[120.711462,31.757319],[120.71245,31.758467],[120.714725,31.760571],[120.714725,31.761754],[120.716631,31.762766],[120.718866,31.763489],[120.718538,31.764317],[120.717683,31.764975],[120.718537,31.766027],[120.717354,31.769182],[120.716789,31.769313],[120.716855,31.769799],[120.716592,31.770299],[120.716894,31.77043],[120.716829,31.770759],[120.71646,31.770667],[120.716329,31.771154],[120.716565,31.771193],[120.715711,31.774112],[120.715474,31.774243],[120.71554,31.774835],[120.715251,31.775597],[120.715316,31.776189],[120.715119,31.776583],[120.711767,31.778055],[120.711044,31.778056],[120.710873,31.778319],[120.711504,31.77845],[120.712227,31.77891],[120.712885,31.779502],[120.713634,31.779699],[120.71508,31.779765],[120.715738,31.780093],[120.715672,31.780553],[120.716921,31.781237],[120.717276,31.781802],[120.717867,31.782355],[120.717972,31.782986],[120.719024,31.783143],[120.720365,31.783998],[120.721022,31.78384],[120.721785,31.784103],[120.72214,31.783771],[120.723652,31.783446],[120.72356,31.7843],[120.723363,31.784892],[120.723099,31.785089],[120.722955,31.785313],[120.723389,31.785286],[120.723586,31.785641],[120.724467,31.785378],[120.724769,31.786535],[120.725624,31.786627],[120.72565,31.78689],[120.725913,31.786956],[120.726084,31.787482],[120.72703,31.78735],[120.727162,31.787718],[120.726872,31.787876],[120.72661,31.78831],[120.72661,31.788507],[120.726307,31.788533],[120.726281,31.78877],[120.72613,31.788704],[120.72613,31.789098],[120.725118,31.78919],[120.725092,31.790663],[120.725486,31.791425],[120.725617,31.792438],[120.725052,31.792701],[120.725288,31.793161],[120.726498,31.794015],[120.726367,31.795001],[120.726439,31.795725],[120.726334,31.795774],[120.726258,31.795994],[120.726653,31.797062],[120.725387,31.797236],[120.725798,31.797703],[120.725226,31.797949],[120.725151,31.799149],[120.724247,31.799721],[120.723491,31.799701],[120.722913,31.800445],[120.722669,31.800773],[120.722058,31.801134],[120.722123,31.801332],[120.723044,31.80118],[120.724227,31.801706],[120.724247,31.801956],[120.72495,31.80212],[120.724918,31.802462],[120.725312,31.802495],[120.725377,31.803612],[120.725608,31.804026],[120.725752,31.80452],[120.726081,31.805032],[120.72548,31.805318],[120.725666,31.805591],[120.725666,31.805867],[120.725552,31.805959],[120.725437,31.805851],[120.725315,31.805867],[120.72519,31.806238],[120.724625,31.806245],[120.723268,31.8059],[120.722275,31.807652],[120.722101,31.807668],[120.721772,31.808463],[120.720911,31.808375],[120.721331,31.809609],[120.722176,31.811727],[120.722709,31.813413],[120.722791,31.814094],[120.723277,31.815218],[120.720333,31.816016],[120.720112,31.816213],[120.722479,31.819655],[120.722426,31.819806],[120.719337,31.821167],[120.719501,31.822764],[120.719455,31.823158],[120.720718,31.824177],[120.722163,31.823388],[120.724819,31.826195],[120.725575,31.825965],[120.725757,31.826338],[120.726002,31.826839],[120.727764,31.829238],[120.728783,31.829271],[120.729815,31.828331],[120.731622,31.830336],[120.731134,31.830803],[120.729874,31.831749],[120.732832,31.833747],[120.735133,31.831881],[120.735556,31.832202],[120.738288,31.834273],[120.738512,31.834181],[120.739077,31.834904],[120.739865,31.835496],[120.740101,31.835799],[120.74239,31.838743],[120.752052,31.832669],[120.763464,31.825399],[120.784024,31.814724],[120.796224,31.823335],[120.800037,31.824952],[120.803692,31.819693],[120.804283,31.819719],[120.805598,31.819167],[120.805677,31.818852],[120.817998,31.814346],[120.83193,31.809254],[120.839493,31.805748],[120.850275,31.803224],[120.8528,31.803908],[120.855693,31.807169],[120.887446,31.835822],[120.888128,31.835279],[120.888428,31.834649],[120.888708,31.830799],[120.888827,31.830249],[120.889318,31.829149],[120.890478,31.827449],[120.891988,31.825889],[120.893817,31.824219],[120.898777,31.820019],[120.903908,31.816219],[120.910847,31.811879],[120.917499,31.808764],[120.903801,31.791426],[120.900878,31.787725],[120.886307,31.783917],[120.872188,31.780227],[120.855352,31.779956],[120.838494,31.779686],[120.833879,31.779611],[120.831783,31.777591],[120.82691,31.77335],[120.82124,31.768948],[120.82203,31.768227],[120.820763,31.76704],[120.819257,31.767265],[120.818361,31.766236],[120.820618,31.764601],[120.818844,31.761238],[120.816739,31.758354],[120.815767,31.756745],[120.813291,31.753206],[120.813843,31.752965],[120.813421,31.752322],[120.813961,31.752081],[120.813166,31.751266],[120.812651,31.750733],[120.813429,31.750286],[120.812702,31.749375],[120.812219,31.747472],[120.812292,31.747094],[120.812175,31.746686],[120.812385,31.746306],[120.812888,31.746089],[120.814351,31.746166],[120.814564,31.746111],[120.815059,31.746377],[120.815304,31.745643],[120.814532,31.74526],[120.814831,31.744827],[120.81426,31.744422],[120.814746,31.743762],[120.815557,31.744241],[120.816007,31.743872],[120.814967,31.743092],[120.81763,31.740695],[120.819187,31.738574],[120.819713,31.738161],[120.819907,31.737442],[120.820283,31.737059],[120.821179,31.735793],[120.82049,31.734882],[120.8193,31.735697],[120.817766,31.733209],[120.817906,31.733025],[120.818938,31.732424],[120.819212,31.732801],[120.81985,31.732323],[120.823297,31.730265],[120.823082,31.73004],[120.823458,31.729919],[120.820837,31.727103],[120.820412,31.727397],[120.819055,31.726382],[120.816234,31.723708],[120.817196,31.722819],[120.8199,31.72083],[120.820597,31.720411],[120.823398,31.718729],[120.826703,31.716402],[120.827832,31.71591],[120.82966,31.714563],[120.830996,31.713287],[120.83477,31.709704],[120.831768,31.706471],[120.8313,31.70627],[120.830514,31.705736],[120.830408,31.70509],[120.829883,31.704168],[120.831521,31.702466],[120.832477,31.702632],[120.833207,31.702584],[120.833553,31.701774],[120.833609,31.701052],[120.833315,31.700548],[120.8337,31.699888],[120.83371,31.699619],[120.834024,31.699552],[120.834637,31.699074],[120.836857,31.696637],[120.838481,31.695032],[120.838828,31.694459],[120.83029,31.690898]]]]}},{type:"Feature",properties:{id:"27526",name:"辛庄镇",site:"www.poi86.com"},geometry:{type:"MultiPolygon",coordinates:[[[[120.707629,31.521279],[120.70616,31.521334],[120.704585,31.521491],[120.702616,31.517002],[120.701985,31.51582],[120.700804,31.512039],[120.698834,31.511881],[120.697889,31.509124],[120.697259,31.508888],[120.697101,31.507549],[120.695132,31.504555],[120.694344,31.504555],[120.692374,31.502034],[120.69395,31.500065],[120.691587,31.498647],[120.689223,31.499278],[120.688436,31.49849],[120.685442,31.49786],[120.685048,31.495103],[120.683079,31.496678],[120.683316,31.499278],[120.68174,31.497702],[120.680952,31.499278],[120.679928,31.500065],[120.680165,31.501405],[120.677066,31.502244],[120.676384,31.502429],[120.674651,31.499829],[120.669294,31.500223],[120.664454,31.500247],[120.658896,31.501405],[120.658266,31.498648],[120.65732,31.49786],[120.6522,31.49849],[120.6522,31.500617],[120.652097,31.50069],[120.649994,31.502193],[120.650782,31.504556],[120.651806,31.50495],[120.649837,31.507313],[120.648813,31.506367],[120.646686,31.506919],[120.646056,31.506131],[120.643692,31.506762],[120.644086,31.509282],[120.642904,31.509282],[120.643535,31.510858],[120.645111,31.511488],[120.644717,31.512827],[120.642117,31.513221],[120.641172,31.512433],[120.63999,31.513221],[120.640778,31.514009],[120.641565,31.515427],[120.640541,31.515584],[120.639754,31.514796],[120.638809,31.515427],[120.63936,31.518735],[120.633452,31.518972],[120.632113,31.518735],[120.630143,31.518735],[120.632113,31.522516],[120.632867,31.527189],[120.632901,31.5274],[120.621636,31.5274],[120.622266,31.530157],[120.621478,31.530787],[120.623448,31.533545],[120.624629,31.533151],[120.625181,31.53512],[120.623448,31.536066],[120.623999,31.541028],[120.622661,31.54158],[120.621478,31.543943],[120.622661,31.54733],[120.622561,31.547354],[120.618871,31.54824],[120.616753,31.548669],[120.616122,31.551032],[120.613995,31.552451],[120.612026,31.551269],[120.608875,31.55182],[120.608875,31.547488],[120.605094,31.547488],[120.599628,31.548823],[120.595374,31.549901],[120.594763,31.554692],[120.594433,31.558731],[120.594163,31.560923],[120.594121,31.561262],[120.593736,31.5646],[120.593644,31.565421],[120.593214,31.567672],[120.592349,31.571448],[120.591364,31.576132],[120.590854,31.577732],[120.589053,31.578802],[120.586864,31.580586],[120.583434,31.583292],[120.582674,31.584972],[120.581144,31.587692],[120.577774,31.587452],[120.575364,31.587564],[120.571323,31.587832],[120.566774,31.587892],[120.565924,31.587962],[120.565404,31.587822],[120.565074,31.587602],[120.564334,31.586872],[120.563234,31.586102],[120.564894,31.583282],[120.565604,31.582342],[120.565484,31.582252],[120.564404,31.581982],[120.564244,31.581812],[120.564564,31.580952],[120.565454,31.579732],[120.56411,31.579239],[120.555554,31.576352],[120.555499,31.576511],[120.555345,31.576458],[120.554854,31.576316],[120.554734,31.576566],[120.554854,31.576626],[120.553584,31.578906],[120.549433,31.577476],[120.547734,31.577026],[120.546144,31.576716],[120.544904,31.577116],[120.540634,31.578756],[120.540728,31.579107],[120.541894,31.582542],[120.542304,31.583292],[120.543014,31.584022],[120.543474,31.585842],[120.543454,31.585952],[120.541854,31.587432],[120.541523,31.587542],[120.541164,31.588182],[120.540894,31.589262],[120.540794,31.589982],[120.540774,31.591022],[120.540454,31.591602],[120.540674,31.592012],[120.540394,31.593112],[120.539884,31.596522],[120.539854,31.596592],[120.539634,31.596652],[120.539574,31.596772],[120.539554,31.597792],[120.539464,31.597882],[120.538664,31.597992],[120.538594,31.598162],[120.538704,31.602762],[120.538844,31.605092],[120.538964,31.605752],[120.538534,31.606522],[120.538638,31.606799],[120.538934,31.607582],[120.539205,31.607562],[120.539774,31.607302],[120.540464,31.607142],[120.540574,31.607262],[120.540574,31.607592],[120.540934,31.607652],[120.541084,31.607372],[120.541434,31.608062],[120.543854,31.607342],[120.543794,31.606762],[120.544114,31.606712],[120.544404,31.607472],[120.545604,31.607072],[120.548334,31.606652],[120.549124,31.606252],[120.549204,31.606252],[120.549524,31.606682],[120.551765,31.604322],[120.552754,31.603562],[120.556444,31.603862],[120.557244,31.604032],[120.558554,31.604462],[120.560544,31.605392],[120.560814,31.605352],[120.560904,31.605252],[120.561234,31.604552],[120.562735,31.604852],[120.562705,31.605142],[120.563674,31.605442],[120.562414,31.607512],[120.561724,31.607132],[120.561294,31.607592],[120.561064,31.607742],[120.559664,31.608222],[120.559654,31.608602],[120.559384,31.608592],[120.559354,31.608772],[120.561384,31.609742],[120.561294,31.609872],[120.561624,31.610022],[120.561234,31.610662],[120.561884,31.611042],[120.561614,31.611432],[120.562654,31.611912],[120.564274,31.611922],[120.565974,31.610252],[120.566784,31.610792],[120.566834,31.610742],[120.567092,31.610835],[120.567154,31.610862],[120.566904,31.611212],[120.567334,31.611332],[120.567394,31.611542],[120.567354,31.611732],[120.568864,31.611642],[120.568604,31.611932],[120.568824,31.612132],[120.568584,31.612722],[120.569484,31.613492],[120.569094,31.613822],[120.568735,31.613672],[120.568474,31.613852],[120.568734,31.614132],[120.568414,31.614422],[120.568784,31.615102],[120.569015,31.615802],[120.569134,31.616522],[120.568984,31.616922],[120.568664,31.617152],[120.569174,31.617782],[120.5699,31.618292],[120.570644,31.617702],[120.572114,31.616712],[120.573144,31.616112],[120.573584,31.616022],[120.575044,31.615922],[120.576944,31.615872],[120.577944,31.615682],[120.579454,31.615542],[120.580394,31.615532],[120.581924,31.615092],[120.584234,31.614742],[120.586125,31.613852],[120.586454,31.613762],[120.587484,31.613682],[120.588614,31.613812],[120.589324,31.614202],[120.592094,31.615442],[120.592664,31.615812],[120.593464,31.616592],[120.594394,31.617322],[120.594621,31.617613],[120.59558,31.61741],[120.597323,31.616851],[120.599036,31.616439],[120.599094,31.616426],[120.599496,31.616329],[120.599598,31.616124],[120.601239,31.616124],[120.601836,31.616459],[120.60578,31.61672],[120.607487,31.614809],[120.608577,31.612972],[120.613207,31.606313],[120.614396,31.604562],[120.617696,31.601459],[120.618668,31.60041],[120.619193,31.59976],[120.619528,31.598697],[120.619267,31.597914],[120.620642,31.597126],[120.621761,31.595671],[120.622321,31.595317],[120.624624,31.595112],[120.625677,31.594888],[120.626824,31.593965],[120.628307,31.59321],[120.631656,31.592356],[120.641275,31.59348],[120.641857,31.593555],[120.6448,31.59341],[120.647397,31.594001],[120.648811,31.594704],[120.649974,31.595582],[120.651556,31.5974],[120.652397,31.598205],[120.654255,31.598375],[120.656037,31.59844],[120.657286,31.598729],[120.657864,31.59914],[120.659017,31.598844],[120.659467,31.598909],[120.660568,31.599699],[120.661845,31.599569],[120.662703,31.599177],[120.66372,31.599177],[120.663981,31.599466],[120.663132,31.601144],[120.66454,31.601769],[120.664615,31.602598],[120.666088,31.601834],[120.666778,31.601704],[120.667767,31.601389],[120.66882,31.603481],[120.670767,31.602776],[120.679461,31.600788],[120.670064,31.591039],[120.666459,31.587268],[120.664251,31.585364],[120.663057,31.58139],[120.663263,31.577747],[120.663332,31.573072],[120.663137,31.571055],[120.662469,31.563854],[120.662348,31.562524],[120.662628,31.562499],[120.666134,31.562198],[120.666134,31.561042],[120.668111,31.560948],[120.668232,31.559894],[120.67763,31.561069],[120.677575,31.562114],[120.682703,31.562057],[120.682623,31.563274],[120.684498,31.56334],[120.684796,31.562808],[120.685486,31.562808],[120.685617,31.56209],[120.68792,31.562249],[120.68792,31.559917],[120.687528,31.558668],[120.687229,31.557316],[120.690782,31.556393],[120.704964,31.553773],[120.706219,31.555471],[120.708274,31.558669],[120.709141,31.560813],[120.709859,31.560747],[120.711444,31.559759],[120.71894,31.558845],[120.722101,31.558873],[120.722167,31.557465],[120.723509,31.557064],[120.723351,31.555554],[120.723677,31.5545],[120.725187,31.554369],[120.725355,31.553707],[120.725225,31.551414],[120.729467,31.550854],[120.730026,31.55105],[120.730586,31.551936],[120.733999,31.552094],[120.734558,31.557651],[120.736583,31.557975],[120.736407,31.557385],[120.736628,31.556999],[120.736469,31.556309],[120.739034,31.555451],[120.738642,31.554369],[120.735976,31.555152],[120.734297,31.549894],[120.733971,31.548216],[120.733933,31.54733],[120.736339,31.546537],[120.736992,31.548318],[120.738605,31.54802],[120.738343,31.547293],[120.738983,31.547187],[120.739137,31.547162],[120.738735,31.546015],[120.738017,31.546015],[120.737653,31.543386],[120.737952,31.542556],[120.737812,31.542136],[120.735155,31.54236],[120.734959,31.542295],[120.734922,31.541605],[120.73501,31.541448],[120.73509,31.541306],[120.736432,31.541278],[120.736171,31.5396],[120.737318,31.539208],[120.737057,31.538313],[120.736432,31.537884],[120.73608,31.53755],[120.735748,31.537028],[120.734773,31.537662],[120.731131,31.537876],[120.729399,31.53764],[120.729399,31.535671],[120.731132,31.535119],[120.73114,31.534929],[120.731368,31.529605],[120.726011,31.528581],[120.720891,31.528187],[120.722309,31.523697],[120.716952,31.520704],[120.715881,31.520798],[120.712462,31.521098],[120.707629,31.521279]]]]}},{type:"Feature",properties:{id:"27527",name:"沙家浜镇",site:"www.poi86.com"},geometry:{type:"MultiPolygon",coordinates:[[[[120.881555,31.53556],[120.881508,31.535414],[120.882522,31.535243],[120.881798,31.533861],[120.881995,31.533768],[120.881337,31.532478],[120.880325,31.532776],[120.879336,31.532386],[120.879033,31.531991],[120.876795,31.53232],[120.876637,31.532742],[120.875676,31.532913],[120.875412,31.532452],[120.875083,31.532281],[120.874991,31.531557],[120.874491,31.531491],[120.87403,31.528199],[120.872753,31.528304],[120.872555,31.527146],[120.870475,31.526856],[120.870475,31.525737],[120.87087,31.525698],[120.870909,31.524947],[120.86874,31.524903],[120.868566,31.52234],[120.869224,31.521392],[120.868434,31.521326],[120.868013,31.520076],[120.869092,31.519641],[120.868803,31.51872],[120.869066,31.518496],[120.868539,31.517377],[120.868171,31.517443],[120.867842,31.516745],[120.869066,31.516218],[120.868605,31.515362],[120.87004,31.515007],[120.868908,31.514691],[120.866749,31.515481],[120.866406,31.513111],[120.869514,31.511926],[120.869434,31.511452],[120.862851,31.514085],[120.862612,31.512864],[120.862535,31.51053],[120.864036,31.510135],[120.863589,31.50587],[120.863378,31.504685],[120.862588,31.504869],[120.861798,31.507186],[120.858717,31.507318],[120.857269,31.508687],[120.855454,31.508839],[120.852706,31.508442],[120.852582,31.508424],[120.852582,31.506265],[120.850212,31.506528],[120.850245,31.509273],[120.8485,31.509293],[120.845551,31.508898],[120.845551,31.50824],[120.844814,31.508029],[120.844366,31.509477],[120.842921,31.50938],[120.840943,31.508819],[120.840811,31.509741],[120.841522,31.509952],[120.84147,31.510609],[120.843181,31.510926],[120.843122,31.511577],[120.841575,31.5114],[120.841378,31.512203],[120.838909,31.511827],[120.838856,31.512124],[120.83935,31.512203],[120.839238,31.512815],[120.841147,31.513091],[120.841245,31.512664],[120.842839,31.512696],[120.842826,31.513375],[120.843036,31.513473],[120.843089,31.513025],[120.844386,31.51321],[120.844485,31.512815],[120.843583,31.512532],[120.843715,31.512203],[120.844768,31.512387],[120.845538,31.512697],[120.846052,31.512486],[120.844814,31.517772],[120.842918,31.517719],[120.843102,31.516324],[120.842049,31.516139],[120.842128,31.519694],[120.844235,31.519299],[120.845034,31.521256],[120.844551,31.52159],[120.845077,31.523512],[120.841822,31.524035],[120.839918,31.523149],[120.839284,31.522854],[120.829838,31.52169],[120.825353,31.52163],[120.822458,31.534388],[120.821141,31.537179],[120.82075,31.536035],[120.820457,31.535178],[120.81756,31.535178],[120.815085,31.535336],[120.810609,31.534546],[120.810345,31.535178],[120.806132,31.536231],[120.805415,31.538742],[120.804627,31.534803],[120.805711,31.534019],[120.801476,31.527241],[120.801161,31.5222],[120.797223,31.522199],[120.797223,31.526138],[120.794072,31.526454],[120.794124,31.525067],[120.789543,31.525435],[120.786909,31.525172],[120.786119,31.529016],[120.785066,31.529648],[120.786225,31.532545],[120.78599,31.532683],[120.785329,31.533072],[120.783331,31.530168],[120.782538,31.529016],[120.780958,31.52978],[120.776588,31.530851],[120.776297,31.531966],[120.774322,31.532413],[120.774375,31.532887],[120.77319,31.533203],[120.773928,31.534783],[120.767792,31.538944],[120.766274,31.539808],[120.761683,31.54242],[120.760669,31.542276],[120.760199,31.542208],[120.758181,31.534784],[120.758839,31.533204],[120.758181,31.532098],[120.756943,31.53136],[120.754757,31.531887],[120.752256,31.530965],[120.749886,31.531045],[120.746726,31.532229],[120.743363,31.533138],[120.740933,31.534073],[120.738646,31.535447],[120.736852,31.536311],[120.735748,31.537028],[120.73608,31.53755],[120.736432,31.537884],[120.737057,31.538313],[120.737318,31.539208],[120.736171,31.5396],[120.736432,31.541278],[120.73509,31.541306],[120.73501,31.541448],[120.734922,31.541605],[120.734959,31.542295],[120.735155,31.54236],[120.737812,31.542136],[120.737952,31.542556],[120.737653,31.543386],[120.738017,31.546015],[120.738735,31.546015],[120.739137,31.547162],[120.738983,31.547187],[120.738343,31.547293],[120.738605,31.54802],[120.736992,31.548318],[120.736339,31.546537],[120.733933,31.54733],[120.733971,31.548216],[120.734297,31.549894],[120.735976,31.555152],[120.738642,31.554369],[120.739034,31.555451],[120.736469,31.556309],[120.736628,31.556999],[120.736407,31.557385],[120.736583,31.557975],[120.73787,31.557845],[120.738757,31.558964],[120.740239,31.558535],[120.741256,31.560475],[120.740631,31.561062],[120.740791,31.562776],[120.742155,31.562781],[120.743085,31.562689],[120.743912,31.562232],[120.745651,31.562609],[120.748345,31.562874],[120.750252,31.562238],[120.753878,31.56254],[120.755411,31.562466],[120.758237,31.563526],[120.759447,31.563756],[120.760986,31.564242],[120.761967,31.564323],[120.763337,31.565629],[120.764201,31.566679],[120.765464,31.567318],[120.765403,31.569085],[120.76484,31.571048],[120.763237,31.574935],[120.763373,31.576205],[120.765111,31.576518],[120.767495,31.576825],[120.769898,31.577243],[120.771762,31.577383],[120.773551,31.577717],[120.775488,31.574624],[120.777824,31.571099],[120.77881,31.56868],[120.779394,31.566243],[120.779483,31.564885],[120.782049,31.564783],[120.78766,31.564835],[120.788742,31.564893],[120.789391,31.565115],[120.794245,31.567035],[120.800361,31.567341],[120.804969,31.5677],[120.806787,31.568225],[120.806324,31.570471],[120.805036,31.573002],[120.807055,31.573352],[120.830451,31.578118],[120.833174,31.574008],[120.839507,31.579217],[120.842037,31.58166],[120.842667,31.581412],[120.843262,31.579344],[120.843413,31.579129],[120.84636,31.576771],[120.846894,31.574178],[120.847586,31.572074],[120.854704,31.573351],[120.855436,31.575613],[120.856214,31.57854],[120.856715,31.578477],[120.856566,31.57784],[120.858247,31.578045],[120.858583,31.577784],[120.858517,31.576823],[120.858909,31.576861],[120.859207,31.5766],[120.859273,31.576339],[120.85973,31.576105],[120.860159,31.57452],[120.861175,31.57466],[120.861576,31.574165],[120.862056,31.574168],[120.865889,31.575817],[120.867283,31.576195],[120.868814,31.576338],[120.869158,31.576312],[120.869413,31.57457],[120.869805,31.572747],[120.869808,31.57174],[120.869631,31.569609],[120.869475,31.569034],[120.869791,31.567912],[120.870198,31.567699],[120.872409,31.567071],[120.873169,31.566696],[120.873944,31.566494],[120.874335,31.566233],[120.874476,31.565505],[120.876313,31.564657],[120.876415,31.565505],[120.877676,31.565113],[120.878339,31.564697],[120.87933,31.564518],[120.880704,31.564365],[120.885542,31.564097],[120.886388,31.563858],[120.886237,31.563244],[120.88583,31.562607],[120.885765,31.562293],[120.885573,31.56196],[120.88289,31.560485],[120.881597,31.559964],[120.881165,31.559714],[120.880493,31.55838],[120.880356,31.557815],[120.879796,31.556851],[120.87946,31.55567],[120.879454,31.554944],[120.879725,31.554728],[120.88014,31.553003],[120.880382,31.551654],[120.880652,31.550713],[120.880735,31.550073],[120.881164,31.548285],[120.881348,31.547756],[120.881531,31.546749],[120.88252,31.546786],[120.882542,31.546032],[120.882789,31.545071],[120.883107,31.544616],[120.883679,31.544932],[120.885336,31.544059],[120.885898,31.544702],[120.88678,31.544051],[120.886987,31.544315],[120.888423,31.543572],[120.888396,31.543453],[120.888014,31.543069],[120.887313,31.541864],[120.88886,31.541864],[120.891117,31.541148],[120.892117,31.541085],[120.893863,31.540246],[120.895398,31.539057],[120.893424,31.536217],[120.889645,31.538061],[120.888987,31.537495],[120.8885,31.53757],[120.888025,31.537205],[120.887591,31.53735],[120.886775,31.536467],[120.886577,31.536599],[120.886011,31.535901],[120.882127,31.53735],[120.881555,31.53556]]]]}},{type:"Feature",properties:{id:"27530",name:"常熟虞山尚湖旅游度假区",site:"www.poi86.com"},geometry:{type:"MultiPolygon",coordinates:[[[[120.73031,31.635811],[120.727907,31.633501],[120.725547,31.62968],[120.724391,31.628794],[120.725861,31.627033],[120.726326,31.626967],[120.726528,31.626216],[120.725523,31.626079],[120.724381,31.625394],[120.721959,31.623521],[120.719493,31.621922],[120.716867,31.621628],[120.712866,31.621167],[120.709892,31.620477],[120.705909,31.619947],[120.701041,31.619287],[120.698466,31.618621],[120.69529,31.621071],[120.685801,31.627349],[120.676844,31.633241],[120.672123,31.636338],[120.669904,31.637953],[120.668297,31.639412],[120.66719,31.640735],[120.666064,31.64243],[120.665273,31.644114],[120.66466,31.645807],[120.664218,31.647937],[120.664095,31.649475],[120.664107,31.650511],[120.664299,31.663461],[120.66426,31.669407],[120.664257,31.669661],[120.658852,31.672197],[120.660979,31.674664],[120.669268,31.681368],[120.671057,31.682624],[120.674238,31.684855],[120.674859,31.685007],[120.67815,31.684232],[120.680321,31.683721],[120.678913,31.683521],[120.678287,31.680723],[120.679071,31.680629],[120.678511,31.679743],[120.677196,31.680266],[120.676506,31.67882],[120.677169,31.677244],[120.678679,31.677701],[120.67894,31.676479],[120.676049,31.674604],[120.674463,31.674147],[120.674034,31.671186],[120.674617,31.671033],[120.675424,31.670822],[120.677952,31.669246],[120.679761,31.670626],[120.681869,31.668947],[120.682792,31.66974],[120.684042,31.669311],[120.689106,31.66628],[120.688976,31.665916],[120.689209,31.665329],[120.688351,31.664377],[120.69298,31.660961],[120.694686,31.662806],[120.695266,31.662463],[120.697761,31.660129],[120.69875,31.65983],[120.70069,31.658413],[120.701758,31.658254],[120.707457,31.656939],[120.707697,31.656773],[120.711989,31.653814],[120.716191,31.652434],[120.719941,31.650849],[120.723932,31.650705],[120.72814,31.649378],[120.728416,31.649714],[120.728834,31.649711],[120.729368,31.649465],[120.729765,31.648933],[120.730118,31.648632],[120.729878,31.647629],[120.728057,31.648221],[120.72745,31.647307],[120.728885,31.646667],[120.728634,31.646188],[120.728547,31.645353],[120.728753,31.644543],[120.730023,31.643558],[120.727981,31.641488],[120.726927,31.640798],[120.725286,31.640043],[120.725178,31.63992],[120.723012,31.637442],[120.719263,31.634444],[120.71932,31.634383],[120.722918,31.630565],[120.723934,31.631386],[120.723766,31.631647],[120.724923,31.63257],[120.724521,31.632961],[120.724727,31.633167],[120.724624,31.633363],[120.724923,31.633623],[120.724365,31.634147],[120.724152,31.634091],[120.723991,31.634271],[120.722568,31.633477],[120.722196,31.633859],[120.723528,31.634895],[120.722196,31.63571],[120.72295,31.63641],[120.723795,31.636113],[120.724937,31.635397],[120.725614,31.635207],[120.726391,31.634681],[120.726734,31.634605],[120.729456,31.636775],[120.73031,31.635811]]]]}},{type:"Feature",properties:{id:"27534",name:"虞山林场",site:"www.poi86.com"},geometry:{type:"MultiPolygon",coordinates:[[[[120.717134,31.686087],[120.716575,31.684733],[120.718163,31.684796],[120.71795,31.68178],[120.718742,31.680764],[120.719824,31.682704],[120.719992,31.684644],[120.723073,31.684091],[120.723835,31.683954],[120.7246,31.682406],[120.724628,31.681482],[120.724485,31.680837],[120.723958,31.679414],[120.724672,31.678129],[120.722514,31.677167],[120.72202,31.678043],[120.720284,31.677259],[120.71924,31.676617],[120.718604,31.676127],[120.719867,31.674735],[120.722201,31.672362],[120.722599,31.672515],[120.723467,31.671604],[120.724662,31.671968],[120.724736,31.671786],[120.724377,31.671654],[120.724651,31.670951],[120.723971,31.6705],[120.726035,31.668782],[120.726506,31.668935],[120.726316,31.669392],[120.727001,31.669615],[120.726372,31.670957],[120.727972,31.671528],[120.728553,31.670247],[120.7301,31.670805],[120.730375,31.670169],[120.731633,31.670588],[120.732086,31.669579],[120.73042,31.668952],[120.730517,31.668341],[120.728592,31.667912],[120.728739,31.667533],[120.727707,31.667387],[120.731818,31.66414],[120.732061,31.663948],[120.732816,31.662661],[120.734304,31.662768],[120.734961,31.66184],[120.736277,31.661579],[120.736571,31.660165],[120.733982,31.659952],[120.732535,31.659434],[120.73202,31.659655],[120.731472,31.659655],[120.730299,31.65999],[120.729446,31.66002],[120.729393,31.658827],[120.72937,31.657766],[120.729584,31.656959],[120.730634,31.654325],[120.732345,31.653945],[120.733698,31.655586],[120.734415,31.655907],[120.734896,31.65443],[120.735481,31.653192],[120.736349,31.651025],[120.736818,31.649449],[120.73627,31.649327],[120.734714,31.648255],[120.732204,31.648238],[120.730118,31.648632],[120.729765,31.648933],[120.729368,31.649465],[120.728834,31.649711],[120.728416,31.649714],[120.72814,31.649378],[120.723932,31.650705],[120.719941,31.650849],[120.716191,31.652434],[120.711989,31.653814],[120.707697,31.656773],[120.707457,31.656939],[120.701758,31.658254],[120.70069,31.658413],[120.69875,31.65983],[120.697761,31.660129],[120.695266,31.662463],[120.694686,31.662806],[120.69298,31.660961],[120.688351,31.664377],[120.689209,31.665329],[120.688976,31.665916],[120.689106,31.66628],[120.684042,31.669311],[120.682792,31.66974],[120.681869,31.668947],[120.679761,31.670626],[120.677952,31.669246],[120.675424,31.670822],[120.674617,31.671033],[120.674034,31.671186],[120.674463,31.674147],[120.676049,31.674604],[120.67894,31.676479],[120.678679,31.677701],[120.677169,31.677244],[120.676506,31.67882],[120.677196,31.680266],[120.678511,31.679743],[120.679071,31.680629],[120.678287,31.680723],[120.678913,31.683521],[120.680321,31.683721],[120.67815,31.684232],[120.674859,31.685007],[120.674734,31.685036],[120.68477,31.69089],[120.685869,31.68969],[120.691019,31.690725],[120.696811,31.688496],[120.699547,31.686894],[120.700029,31.686612],[120.705233,31.684644],[120.707722,31.68423],[120.708728,31.683431],[120.714432,31.679921],[120.715927,31.678862],[120.716009,31.67906],[120.716167,31.679137],[120.71618,31.67942],[120.716924,31.680726],[120.715049,31.681417],[120.715551,31.682478],[120.716668,31.682277],[120.716797,31.682827],[120.716067,31.682951],[120.71664,31.684267],[120.716638,31.684568],[120.714719,31.684522],[120.715592,31.686607],[120.717134,31.686087]]]]}},{type:"Feature",properties:{id:"27535",name:"江苏省常熟高新技术产业开发区",site:"www.poi86.com"},geometry:{type:"MultiPolygon",coordinates:[[[[120.80097,31.630286],[120.803847,31.629194],[120.808769,31.627552],[120.81165,31.626997],[120.824604,31.626314],[120.824822,31.626253],[120.826323,31.625829],[120.828452,31.624728],[120.840253,31.618296],[120.843684,31.616356],[120.84503,31.617705],[120.845506,31.617443],[120.84653,31.616553],[120.84735,31.615406],[120.847793,31.614218],[120.845107,31.612254],[120.845877,31.611129],[120.848874,31.608545],[120.850851,31.607348],[120.852709,31.606293],[120.855951,31.604668],[120.858858,31.603064],[120.859258,31.602966],[120.861447,31.600852],[120.861301,31.599554],[120.863428,31.598013],[120.862254,31.596475],[120.86087,31.593945],[120.859352,31.590757],[120.858211,31.58707],[120.857607,31.584317],[120.856998,31.579695],[120.856715,31.578477],[120.856214,31.57854],[120.855436,31.575613],[120.854704,31.573351],[120.847586,31.572074],[120.846894,31.574178],[120.84636,31.576771],[120.843413,31.579129],[120.843262,31.579344],[120.842667,31.581412],[120.842037,31.58166],[120.839507,31.579217],[120.833174,31.574008],[120.830451,31.578118],[120.807055,31.573352],[120.805036,31.573002],[120.806324,31.570471],[120.806787,31.568225],[120.804969,31.5677],[120.800361,31.567341],[120.794245,31.567035],[120.789391,31.565115],[120.788742,31.564893],[120.78766,31.564835],[120.782049,31.564783],[120.779483,31.564885],[120.779394,31.566243],[120.77881,31.56868],[120.777824,31.571099],[120.775488,31.574624],[120.773551,31.577717],[120.771762,31.577383],[120.769898,31.577243],[120.767495,31.576825],[120.765111,31.576518],[120.763373,31.576205],[120.763237,31.574935],[120.76484,31.571048],[120.765403,31.569085],[120.765464,31.567318],[120.764201,31.566679],[120.763337,31.565629],[120.761967,31.564323],[120.760986,31.564242],[120.759447,31.563756],[120.758237,31.563526],[120.755411,31.562466],[120.753878,31.56254],[120.750252,31.562238],[120.748345,31.562874],[120.745651,31.562609],[120.743912,31.562232],[120.743085,31.562689],[120.742155,31.562781],[120.740791,31.562776],[120.738679,31.563918],[120.735937,31.565917],[120.731772,31.568441],[120.724668,31.568815],[120.723145,31.569401],[120.72206,31.571913],[120.721338,31.576997],[120.721101,31.578547],[120.723984,31.577719],[120.726553,31.578254],[120.727983,31.579319],[120.73024,31.584341],[120.731991,31.586245],[120.733602,31.590207],[120.733819,31.590737],[120.733742,31.594544],[120.733577,31.59798],[120.73376,31.599762],[120.733349,31.602046],[120.734016,31.604389],[120.736273,31.604833],[120.737461,31.606341],[120.736547,31.60762],[120.738877,31.610955],[120.737278,31.612508],[120.739151,31.614473],[120.747785,31.616665],[120.749099,31.616232],[120.752125,31.616632],[120.754067,31.616432],[120.755789,31.61658],[120.758998,31.613904],[120.76176,31.610585],[120.762938,31.609215],[120.764241,31.608274],[120.765561,31.60768],[120.766944,31.607758],[120.767874,31.608221],[120.769252,31.608638],[120.772165,31.608723],[120.778755,31.609211],[120.780096,31.609699],[120.781162,31.610475],[120.782657,31.612682],[120.783403,31.613565],[120.784454,31.615271],[120.787085,31.618447],[120.78817,31.618806],[120.790483,31.618977],[120.795108,31.618806],[120.795149,31.620569],[120.795728,31.622577],[120.796758,31.625522],[120.798649,31.631053],[120.80097,31.630286]]]]}},{type:"Feature",properties:{id:"26913",name:"常熟经济技术开发区",site:"www.poi86.com"},geometry:{type:"MultiPolygon",coordinates:[[[[120.937024,31.801115],[120.938748,31.800559],[120.978421,31.791935],[120.987047,31.789879],[120.997448,31.787378],[121.002737,31.785458],[121.006037,31.785438],[121.009668,31.785809],[121.010247,31.785868],[121.028638,31.785839],[121.034407,31.785828],[121.054917,31.786287],[121.063747,31.785337],[121.067567,31.784447],[121.078097,31.779807],[121.087022,31.774079],[121.102042,31.763334],[121.080792,31.749975],[121.072256,31.737076],[121.062901,31.726103],[121.061303,31.725516],[121.059438,31.725472],[121.055628,31.726219],[121.053193,31.726172],[121.051319,31.725357],[121.049676,31.724235],[121.036754,31.710893],[121.003192,31.729458],[121.003152,31.729479],[120.988831,31.737312],[120.987332,31.738132],[120.98102,31.741581],[120.97729,31.737373],[120.970554,31.730509],[120.963788,31.73486],[120.959536,31.737485],[120.958594,31.738061],[120.953675,31.741062],[120.950996,31.742885],[120.948152,31.744606],[120.950025,31.746919],[120.951614,31.748696],[120.952493,31.749286],[120.947611,31.74974],[120.943596,31.749621],[120.941165,31.748761],[120.937063,31.744946],[120.929636,31.739833],[120.924768,31.735959],[120.919999,31.732019],[120.91815,31.730369],[120.914848,31.732308],[120.908934,31.735632],[120.908694,31.735767],[120.914513,31.742225],[120.915738,31.741579],[120.91951,31.744343],[120.919966,31.744726],[120.920931,31.745801],[120.924618,31.743372],[120.931255,31.750947],[120.928296,31.752958],[120.926291,31.754534],[120.92607,31.754855],[120.925993,31.754968],[120.934487,31.765289],[120.935992,31.801448],[120.937024,31.801115]]]]}},{type:"Feature",properties:{id:"10711",name:"江苏常熟服装城",site:"www.poi86.com"},geometry:{type:"MultiPolygon",coordinates:[[[[120.7407,31.616103],[120.738532,31.615697],[120.734278,31.615206],[120.733975,31.615526],[120.730959,31.619957],[120.726528,31.626216],[120.726326,31.626967],[120.729831,31.62936],[120.730871,31.631012],[120.731704,31.631821],[120.733334,31.634191],[120.734155,31.634177],[120.738018,31.634533],[120.73958,31.6347],[120.740675,31.634938],[120.741188,31.635113],[120.741444,31.635532],[120.741711,31.635666],[120.742577,31.635856],[120.745956,31.636133],[120.746318,31.634761],[120.746685,31.6329],[120.746878,31.629983],[120.747148,31.628105],[120.749812,31.628036],[120.749625,31.623747],[120.74826,31.623678],[120.748574,31.622878],[120.748974,31.622136],[120.749888,31.62165],[120.749043,31.62174],[120.748304,31.621345],[120.748081,31.620933],[120.74693,31.620503],[120.746552,31.619902],[120.74758,31.617281],[120.7407,31.616103]]]]}},{type:"Feature",properties:{id:"37788",name:"尚湖镇",site:"www.poi86.com"},geometry:{type:"MultiPolygon",coordinates:[[[[120.688503,31.609855],[120.686988,31.608085],[120.682305,31.603716],[120.679461,31.600788],[120.670767,31.602776],[120.66882,31.603481],[120.667767,31.601389],[120.666778,31.601704],[120.666088,31.601834],[120.664615,31.602598],[120.66454,31.601769],[120.663132,31.601144],[120.663981,31.599466],[120.66372,31.599177],[120.662703,31.599177],[120.661845,31.599569],[120.660568,31.599699],[120.659467,31.598909],[120.659017,31.598844],[120.657864,31.59914],[120.657286,31.598729],[120.656037,31.59844],[120.654255,31.598375],[120.652397,31.598205],[120.651556,31.5974],[120.649974,31.595582],[120.648811,31.594704],[120.647397,31.594001],[120.6448,31.59341],[120.641857,31.593555],[120.641275,31.59348],[120.631656,31.592356],[120.628307,31.59321],[120.626824,31.593965],[120.625677,31.594888],[120.624624,31.595112],[120.622321,31.595317],[120.621761,31.595671],[120.620642,31.597126],[120.619267,31.597914],[120.619528,31.598697],[120.619193,31.59976],[120.618668,31.60041],[120.617696,31.601459],[120.614396,31.604562],[120.613207,31.606313],[120.608577,31.612972],[120.607487,31.614809],[120.60578,31.61672],[120.601836,31.616459],[120.601239,31.616124],[120.599598,31.616124],[120.599496,31.616329],[120.599094,31.616426],[120.599036,31.616439],[120.597323,31.616851],[120.59558,31.61741],[120.594621,31.617613],[120.594744,31.618022],[120.594745,31.618892],[120.594574,31.619092],[120.593354,31.619802],[120.593294,31.620052],[120.592814,31.620332],[120.593115,31.620922],[120.593304,31.620832],[120.593384,31.620992],[120.593634,31.620862],[120.594114,31.622192],[120.593304,31.622402],[120.593295,31.622702],[120.593054,31.622742],[120.593034,31.623292],[120.592854,31.623352],[120.593034,31.624022],[120.591424,31.624952],[120.588325,31.627172],[120.586344,31.628462],[120.585685,31.628742],[120.584284,31.628752],[120.584414,31.629162],[120.584275,31.629212],[120.584534,31.629932],[120.585065,31.630652],[120.585004,31.630742],[120.585944,31.632052],[120.587374,31.631272],[120.587604,31.631532],[120.587814,31.631422],[120.587945,31.631552],[120.588195,31.631402],[120.588004,31.631112],[120.588774,31.630642],[120.589065,31.631152],[120.589035,31.631272],[120.589464,31.631962],[120.589594,31.631922],[120.589665,31.631752],[120.589864,31.631612],[120.590185,31.632142],[120.590305,31.632232],[120.589984,31.632532],[120.590995,31.634072],[120.587045,31.636792],[120.585037,31.638933],[120.584665,31.639432],[120.585935,31.640462],[120.586415,31.640012],[120.586845,31.639762],[120.588175,31.640782],[120.587875,31.641142],[120.587614,31.641292],[120.586935,31.640902],[120.586835,31.640932],[120.587235,31.641692],[120.587605,31.642692],[120.587775,31.643702],[120.588204,31.643782],[120.588835,31.643092],[120.589955,31.642872],[120.590245,31.643212],[120.590755,31.644112],[120.590555,31.644242],[120.590625,31.644462],[120.590355,31.645072],[120.590395,31.645132],[120.591725,31.644772],[120.591825,31.645392],[120.591625,31.645472],[120.591895,31.646142],[120.592804,31.645802],[120.593135,31.646644],[120.593205,31.646822],[120.589035,31.650052],[120.588435,31.653652],[120.588315,31.654152],[120.588245,31.654169],[120.587585,31.654332],[120.586435,31.654772],[120.585685,31.654952],[120.585445,31.653782],[120.585285,31.653702],[120.582335,31.654362],[120.581024,31.652202],[120.578595,31.652622],[120.577995,31.654052],[120.577385,31.653972],[120.577455,31.653262],[120.572355,31.656642],[120.572245,31.655612],[120.571105,31.656162],[120.570535,31.656542],[120.570275,31.656142],[120.569895,31.656262],[120.569515,31.655862],[120.567305,31.657622],[120.566295,31.657042],[120.565805,31.657662],[120.565235,31.658222],[120.565135,31.658142],[120.565195,31.658062],[120.565245,31.657402],[120.565025,31.657262],[120.564945,31.657602],[120.564965,31.658182],[120.564285,31.657872],[120.563745,31.657762],[120.562825,31.657832],[120.561765,31.658202],[120.561985,31.658652],[120.562215,31.659412],[120.561515,31.659552],[120.561145,31.658562],[120.560895,31.658712],[120.560835,31.658452],[120.560055,31.658492],[120.560005,31.657782],[120.558935,31.657772],[120.558865,31.656732],[120.559465,31.656732],[120.559475,31.656162],[120.558005,31.656212],[120.557493,31.656103],[120.557185,31.655732],[120.557075,31.655402],[120.556695,31.655562],[120.556265,31.655382],[120.555565,31.655882],[120.554995,31.655482],[120.553704,31.656622],[120.553175,31.657352],[120.552185,31.658382],[120.552995,31.658952],[120.552375,31.659652],[120.552915,31.660002],[120.552315,31.660682],[120.552735,31.660943],[120.552722,31.661202],[120.553185,31.661512],[120.553535,31.661232],[120.553365,31.661042],[120.553515,31.660782],[120.553585,31.660782],[120.554315,31.661402],[120.554455,31.661062],[120.555075,31.661662],[120.555685,31.661192],[120.556055,31.661402],[120.556575,31.660982],[120.557035,31.661352],[120.557495,31.661012],[120.558135,31.661582],[120.558615,31.661202],[120.559455,31.662372],[120.560105,31.662272],[120.560445,31.663032],[120.561435,31.662972],[120.562015,31.662862],[120.564295,31.661782],[120.564745,31.661732],[120.564845,31.661832],[120.564825,31.662812],[120.564385,31.665032],[120.564955,31.665382],[120.564265,31.666622],[120.563935,31.667702],[120.564045,31.669062],[120.564195,31.669702],[120.564165,31.669792],[120.563525,31.669792],[120.563445,31.670412],[120.564025,31.670462],[120.564115,31.670062],[120.564365,31.670042],[120.564525,31.670692],[120.563035,31.670652],[120.562305,31.671622],[120.562845,31.671702],[120.562845,31.672192],[120.563655,31.672322],[120.562695,31.673842],[120.562735,31.673982],[120.562925,31.674092],[120.562915,31.674232],[120.563745,31.674642],[120.564925,31.674422],[120.565185,31.675222],[120.565145,31.675292],[120.564105,31.675502],[120.563425,31.675362],[120.563375,31.675492],[120.563485,31.676452],[120.562935,31.676632],[120.563095,31.677692],[120.562135,31.678242],[120.562695,31.679422],[120.562325,31.679592],[120.562365,31.679662],[120.562125,31.679782],[120.562135,31.680412],[120.562285,31.680472],[120.562382,31.680772],[120.560775,31.681112],[120.559675,31.680592],[120.559545,31.680742],[120.559915,31.681002],[120.559395,31.682402],[120.559125,31.682542],[120.558735,31.682522],[120.558605,31.682602],[120.55877,31.682771],[120.559075,31.683032],[120.559145,31.683282],[120.559276,31.683412],[120.559895,31.683392],[120.560076,31.683502],[120.560615,31.683932],[120.561845,31.685212],[120.561965,31.686242],[120.561986,31.687492],[120.562605,31.687362],[120.563805,31.687302],[120.563815,31.687892],[120.563566,31.687962],[120.563935,31.689232],[120.564075,31.689292],[120.564935,31.688892],[120.565395,31.689482],[120.566265,31.690352],[120.566155,31.690632],[120.565815,31.691012],[120.565875,31.691072],[120.566415,31.691392],[120.568175,31.691802],[120.572616,31.691572],[120.572645,31.692012],[120.572385,31.692102],[120.572336,31.691922],[120.572155,31.691932],[120.572155,31.692132],[120.571916,31.692162],[120.571896,31.692592],[120.571465,31.692642],[120.571465,31.693052],[120.571586,31.693062],[120.571595,31.693272],[120.571085,31.693362],[120.571025,31.693612],[120.571245,31.693622],[120.571365,31.693932],[120.572445,31.693202],[120.573305,31.692362],[120.573815,31.692142],[120.574146,31.692062],[120.574172,31.692121],[120.574575,31.693592],[120.574055,31.693772],[120.574246,31.694722],[120.573715,31.694832],[120.573746,31.695682],[120.573786,31.695812],[120.573891,31.695818],[120.576115,31.695402],[120.580706,31.694932],[120.580925,31.695712],[120.581296,31.695692],[120.582215,31.697492],[120.582435,31.697512],[120.582815,31.698292],[120.582995,31.698352],[120.583966,31.698052],[120.584106,31.698142],[120.584865,31.699512],[120.584856,31.699592],[120.584105,31.699872],[120.584186,31.700082],[120.585015,31.700012],[120.585165,31.700482],[120.583775,31.701082],[120.584016,31.701472],[120.585616,31.700992],[120.587176,31.702402],[120.587315,31.702452],[120.587646,31.702252],[120.587775,31.702282],[120.588595,31.702942],[120.589695,31.704412],[120.589626,31.704782],[120.590956,31.706842],[120.591085,31.707172],[120.591526,31.707732],[120.591956,31.707832],[120.592015,31.707662],[120.591606,31.707472],[120.591526,31.707192],[120.592296,31.707352],[120.592275,31.707752],[120.593616,31.708132],[120.593805,31.708442],[120.593816,31.708692],[120.59515,31.708986],[120.596385,31.709152],[120.596786,31.709282],[120.596866,31.709762],[120.597235,31.710072],[120.5972,31.710237],[120.596976,31.710462],[120.596965,31.711042],[120.596856,31.711172],[120.595595,31.711832],[120.596006,31.712532],[120.595975,31.712672],[120.595586,31.713042],[120.594895,31.713452],[120.591766,31.714362],[120.591326,31.714352],[120.589585,31.713452],[120.589356,31.713442],[120.588325,31.713702],[120.588286,31.713762],[120.588516,31.714272],[120.588216,31.714412],[120.588226,31.714462],[120.588486,31.715162],[120.588726,31.715572],[120.587806,31.717402],[120.587686,31.717502],[120.586726,31.717152],[120.586346,31.717092],[120.586266,31.716922],[120.586156,31.716902],[120.585826,31.717032],[120.585456,31.717052],[120.583686,31.717522],[120.583556,31.717462],[120.582025,31.715642],[120.580226,31.715752],[120.579696,31.715672],[120.579576,31.715532],[120.579286,31.714722],[120.579126,31.714472],[120.578835,31.714412],[120.578826,31.714492],[120.578866,31.714762],[120.578565,31.714862],[120.578636,31.715512],[120.578356,31.715552],[120.578445,31.715922],[120.578016,31.716022],[120.578096,31.717182],[120.578146,31.717252],[120.578646,31.717272],[120.578676,31.716882],[120.579186,31.716872],[120.579266,31.716782],[120.579316,31.716172],[120.579536,31.716132],[120.579465,31.716682],[120.579666,31.717052],[120.579585,31.719812],[120.579816,31.720222],[120.579006,31.720572],[120.578686,31.720502],[120.578296,31.720592],[120.578216,31.720712],[120.578336,31.721082],[120.578266,31.721172],[120.577656,31.721422],[120.577406,31.721772],[120.577366,31.721912],[120.577516,31.723232],[120.576796,31.723292],[120.576746,31.723352],[120.576806,31.724002],[120.576916,31.724082],[120.576916,31.724412],[120.576676,31.724572],[120.576586,31.724742],[120.576496,31.725672],[120.576526,31.726012],[120.576626,31.726132],[120.577426,31.726362],[120.577586,31.726532],[120.577636,31.726652],[120.577576,31.726922],[120.577276,31.727132],[120.576346,31.727212],[120.576026,31.727302],[120.575874,31.727444],[120.575806,31.727632],[120.576056,31.728072],[120.576036,31.728242],[120.575845,31.728492],[120.575446,31.728762],[120.574869,31.728979],[120.574816,31.729032],[120.574872,31.729078],[120.575336,31.729342],[120.578016,31.729902],[120.578515,31.730132],[120.578936,31.730062],[120.579136,31.730102],[120.579166,31.730242],[120.578746,31.730462],[120.578666,31.730572],[120.579176,31.731392],[120.578986,31.731542],[120.579016,31.731612],[120.579256,31.731912],[120.579896,31.731632],[120.580036,31.731632],[120.580356,31.732272],[120.580316,31.732342],[120.579416,31.732692],[120.579696,31.733372],[120.579726,31.733612],[120.579666,31.733722],[120.579846,31.733872],[120.579806,31.734002],[120.579566,31.734072],[120.579166,31.733752],[120.578896,31.733852],[120.578896,31.734012],[120.579776,31.734742],[120.579816,31.734852],[120.579416,31.735332],[120.579366,31.735562],[120.579106,31.735822],[120.579226,31.736582],[120.579586,31.736682],[120.579586,31.737122],[120.579696,31.737272],[120.580876,31.736932],[120.581466,31.737462],[120.581816,31.737652],[120.582546,31.738412],[120.582566,31.738512],[120.582026,31.738712],[120.581886,31.738882],[120.581966,31.739052],[120.582166,31.739082],[120.583276,31.738692],[120.584836,31.737892],[120.584986,31.737692],[120.585166,31.737692],[120.585636,31.738082],[120.586656,31.738092],[120.586876,31.738222],[120.587606,31.739012],[120.587896,31.739852],[120.588056,31.739912],[120.588766,31.739872],[120.588756,31.740162],[120.589916,31.740232],[120.590076,31.740292],[120.590236,31.740512],[120.590636,31.740552],[120.590506,31.739987],[120.591072,31.739763],[120.590966,31.739238],[120.591689,31.738936],[120.591229,31.737661],[120.592478,31.737293],[120.592149,31.736833],[120.593108,31.736413],[120.592517,31.735099],[120.593056,31.735015],[120.595303,31.734665],[120.595408,31.735033],[120.596222,31.734836],[120.596485,31.735519],[120.597865,31.734928],[120.600204,31.734731],[120.60023,31.73523],[120.599771,31.735256],[120.600007,31.736439],[120.601282,31.736347],[120.601282,31.737162],[120.602136,31.73703],[120.602044,31.735953],[120.602924,31.735585],[120.604212,31.735361],[120.604475,31.734271],[120.605805,31.734049],[120.606209,31.733981],[120.605749,31.732825],[120.606538,31.732536],[120.606407,31.732234],[120.607195,31.731288],[120.607721,31.731182],[120.607392,31.730328],[120.608115,31.730394],[120.608667,31.731643],[120.608864,31.731117],[120.60956,31.73138],[120.609718,31.731091],[120.611202,31.731616],[120.611334,31.731182],[120.610178,31.730696],[120.610743,31.729711],[120.610809,31.729251],[120.611689,31.72908],[120.611558,31.728292],[120.6137,31.728002],[120.613463,31.726846],[120.615539,31.72636],[120.615434,31.726031],[120.617642,31.725663],[120.617773,31.726255],[120.618457,31.72636],[120.618588,31.725729],[120.619179,31.725795],[120.619245,31.726162],[120.619744,31.726058],[120.619704,31.725506],[120.620467,31.725308],[120.620624,31.726097],[120.621452,31.725992],[120.621518,31.726951],[120.621978,31.726649],[120.622005,31.725965],[120.622307,31.725992],[120.622727,31.725861],[120.622596,31.725598],[120.622963,31.725466],[120.622661,31.724743],[120.623449,31.72452],[120.623647,31.724783],[120.625394,31.724323],[120.624935,31.723692],[120.626314,31.723535],[120.626286,31.722802],[120.626281,31.722686],[120.626767,31.722713],[120.626872,31.722161],[120.628411,31.722581],[120.629068,31.722292],[120.62966,31.722752],[120.630251,31.722621],[120.630422,31.722778],[120.632157,31.722318],[120.633249,31.723606],[120.634169,31.723212],[120.63384,31.722581],[120.63413,31.722384],[120.63384,31.721858],[120.635009,31.721279],[120.634193,31.720334],[120.634958,31.720362],[120.634958,31.719839],[120.634622,31.719737],[120.634128,31.718492],[120.634035,31.717009],[120.633568,31.716813],[120.631758,31.717102],[120.631927,31.716151],[120.632458,31.716123],[120.632225,31.714602],[120.633736,31.714276],[120.633773,31.714808],[120.635909,31.714472],[120.635582,31.711749],[120.639957,31.710424],[120.639891,31.709244],[120.640479,31.709207],[120.640574,31.708802],[120.640647,31.708489],[120.641664,31.708256],[120.641701,31.706679],[120.639891,31.707099],[120.639695,31.705196],[120.63824,31.705327],[120.638511,31.704441],[120.638511,31.703349],[120.639266,31.702296],[120.639789,31.700393],[120.640973,31.70023],[120.642484,31.697395],[120.642624,31.695361],[120.642456,31.694932],[120.639891,31.694531],[120.642717,31.689434],[120.641598,31.686701],[120.643183,31.685386],[120.64314,31.685302],[120.641933,31.682952],[120.640451,31.683474],[120.640189,31.683082],[120.637849,31.683838],[120.637783,31.683185],[120.637159,31.683251],[120.636725,31.682646],[120.637778,31.682092],[120.637326,31.681441],[120.636533,31.681469],[120.636496,31.681273],[120.636142,31.681311],[120.635349,31.680583],[120.63617,31.680191],[120.635675,31.679399],[120.635871,31.67854],[120.634972,31.675669],[120.63479,31.675085],[120.636759,31.673433],[120.641103,31.669787],[120.643654,31.669992],[120.649381,31.670972],[120.655499,31.670813],[120.656219,31.6705],[120.656721,31.670281],[120.658661,31.672287],[120.658852,31.672197],[120.664257,31.669661],[120.66426,31.669407],[120.664299,31.663461],[120.664107,31.650511],[120.664095,31.649475],[120.664218,31.647937],[120.66466,31.645807],[120.665273,31.644114],[120.666064,31.64243],[120.66719,31.640735],[120.668297,31.639412],[120.669904,31.637953],[120.672123,31.636338],[120.676844,31.633241],[120.685801,31.627349],[120.69529,31.621071],[120.698466,31.618621],[120.697295,31.617593],[120.695601,31.616258],[120.689871,31.611454],[120.689404,31.610907],[120.688503,31.609855]]]]}},{type:"Feature",properties:{id:"37789",name:"碧溪街道",site:"www.poi86.com"},geometry:{type:"MultiPolygon",coordinates:[[[[120.950996,31.742885],[120.953675,31.741062],[120.958594,31.738061],[120.959536,31.737485],[120.963788,31.73486],[120.970554,31.730509],[120.97729,31.737373],[120.98102,31.741581],[120.987332,31.738132],[120.988831,31.737312],[121.003152,31.729479],[121.003192,31.729458],[121.036754,31.710893],[121.049676,31.724235],[121.051319,31.725357],[121.053193,31.726172],[121.055628,31.726219],[121.059438,31.725472],[121.061303,31.725516],[121.062901,31.726103],[121.072256,31.737076],[121.065161,31.726356],[121.060819,31.724793],[121.060819,31.723491],[121.057954,31.721754],[121.055609,31.718715],[121.055349,31.715675],[121.053004,31.713331],[121.052744,31.711768],[121.051268,31.708989],[121.04976,31.704968],[121.04538,31.696016],[121.044929,31.695096],[121.045623,31.694835],[121.047794,31.695096],[121.04953,31.692491],[121.051441,31.689191],[121.048006,31.684039],[121.047968,31.683981],[121.046926,31.683981],[121.043886,31.685718],[121.04215,31.686413],[121.041281,31.685978],[121.039544,31.682679],[121.037309,31.679847],[121.035637,31.677729],[121.028864,31.670956],[121.025976,31.67267],[121.02508,31.671854],[121.024198,31.671814],[121.024132,31.671327],[121.02387,31.670761],[121.023303,31.670669],[121.023039,31.670274],[121.022224,31.670103],[121.020875,31.669219],[121.020209,31.669023],[121.020067,31.668429],[121.017146,31.670614],[121.01584,31.671266],[121.015896,31.672124],[121.014724,31.672964],[121.014084,31.671854],[121.01361,31.671419],[121.010695,31.670201],[121.010249,31.670272],[121.010925,31.672489],[121.011367,31.674597],[121.011827,31.675891],[121.011293,31.676187],[121.011354,31.676345],[121.011542,31.676462],[121.011665,31.676677],[121.011591,31.676928],[121.011428,31.677066],[121.01033,31.677698],[121.01003,31.677757],[121.009164,31.677645],[121.008945,31.677736],[121.008499,31.678077],[121.008448,31.678178],[121.008511,31.67853],[121.008344,31.678821],[121.007798,31.67875],[121.007649,31.678829],[121.007457,31.679093],[121.007168,31.679188],[121.006704,31.6792],[121.006758,31.679603],[121.006709,31.679849],[121.006051,31.679736],[121.005599,31.679185],[121.004963,31.679673],[121.004173,31.680121],[121.003912,31.680436],[121.003853,31.680724],[121.003688,31.680771],[121.003483,31.680321],[121.00336,31.680243],[121.002262,31.680416],[121.001679,31.680055],[121.001573,31.680131],[121.001463,31.680503],[121.001528,31.680629],[121.001784,31.68072],[121.001855,31.680947],[121.001276,31.681248],[121.000636,31.68118],[120.999869,31.681545],[120.999802,31.681709],[121.000018,31.682281],[120.999947,31.682378],[120.999594,31.682392],[120.999246,31.682225],[120.998861,31.681816],[120.998411,31.68186],[120.998153,31.682228],[120.99796,31.682319],[120.997554,31.682325],[120.997422,31.682409],[120.997145,31.682716],[120.997223,31.683197],[120.997025,31.683314],[120.996843,31.683574],[120.996503,31.683655],[120.99618,31.68344],[120.99593,31.683608],[120.995317,31.683742],[120.995205,31.684144],[120.995124,31.684274],[120.994967,31.68434],[120.994492,31.68429],[120.994028,31.684474],[120.993571,31.684523],[120.993392,31.684891],[120.993457,31.685038],[120.993969,31.685193],[120.993952,31.685353],[120.993592,31.685528],[120.993614,31.685826],[120.99349,31.685973],[120.99325,31.685961],[120.992634,31.685759],[120.992446,31.685827],[120.992159,31.686091],[120.991878,31.686082],[120.99158,31.686171],[120.991421,31.686349],[120.991592,31.686749],[120.99156,31.686919],[120.990895,31.687517],[120.990631,31.687503],[120.990377,31.687337],[120.989711,31.687216],[120.989458,31.687401],[120.989092,31.687911],[120.98955,31.688332],[120.989463,31.688465],[120.988609,31.688948],[120.988328,31.689214],[120.987996,31.689376],[120.987825,31.689571],[120.987573,31.689656],[120.987049,31.68952],[120.986373,31.689814],[120.985744,31.690514],[120.98548,31.690593],[120.985312,31.690778],[120.985505,31.691207],[120.985499,31.691482],[120.985346,31.691631],[120.985189,31.691678],[120.984965,31.69162],[120.983777,31.692176],[120.983344,31.69254],[120.983144,31.692618],[120.982302,31.692907],[120.981986,31.693111],[120.981731,31.693454],[120.981061,31.693707],[120.980902,31.693852],[120.980853,31.694044],[120.980754,31.694306],[120.980553,31.694289],[120.978448,31.691293],[120.97393,31.693547],[120.972685,31.691958],[120.970722,31.693305],[120.969177,31.691334],[120.96953,31.691099],[120.969215,31.690698],[120.96716,31.692009],[120.964862,31.693694],[120.966319,31.695358],[120.966894,31.695912],[120.968173,31.697669],[120.968209,31.697824],[120.967961,31.698171],[120.965808,31.69949],[120.966112,31.699927],[120.966656,31.700448],[120.966604,31.700623],[120.966222,31.700975],[120.96554,31.701264],[120.965115,31.701582],[120.965052,31.701277],[120.964269,31.700363],[120.963803,31.700885],[120.963076,31.700028],[120.962899,31.699932],[120.96189,31.700755],[120.961304,31.700755],[120.959978,31.701705],[120.961718,31.703262],[120.962407,31.703757],[120.963249,31.704542],[120.963505,31.704879],[120.964401,31.70563],[120.965013,31.706347],[120.966297,31.707223],[120.965813,31.707574],[120.965545,31.707541],[120.963629,31.708059],[120.961927,31.708958],[120.960252,31.710111],[120.958684,31.710147],[120.957102,31.710431],[120.956078,31.710986],[120.954496,31.711691],[120.953039,31.711687],[120.952533,31.711811],[120.952339,31.711945],[120.95232,31.712284],[120.952018,31.712711],[120.951888,31.713118],[120.95156,31.713316],[120.951359,31.713332],[120.950949,31.713106],[120.949086,31.711039],[120.949852,31.710594],[120.948311,31.70885],[120.94918,31.708175],[120.9477,31.706473],[120.947434,31.706964],[120.946983,31.70631],[120.94588,31.707555],[120.945757,31.708062],[120.944531,31.70945],[120.943188,31.708587],[120.943635,31.708177],[120.942125,31.706275],[120.942908,31.705016],[120.943766,31.702909],[120.943965,31.702573],[120.943805,31.702504],[120.943382,31.702282],[120.943183,31.701939],[120.942296,31.70145],[120.94064,31.701047],[120.940126,31.701017],[120.939304,31.700833],[120.938582,31.701809],[120.937463,31.701398],[120.93515,31.701137],[120.934041,31.701384],[120.933852,31.701205],[120.934522,31.70039],[120.93458,31.700142],[120.934483,31.699985],[120.9339,31.699713],[120.933436,31.699597],[120.932883,31.699577],[120.932265,31.699691],[120.932063,31.699632],[120.93207,31.699346],[120.931295,31.69897],[120.931072,31.69853],[120.9304,31.697951],[120.930474,31.697912],[120.932596,31.696793],[120.931738,31.695282],[120.929892,31.692727],[120.931064,31.69197],[120.930846,31.69163],[120.93042,31.691234],[120.930078,31.690653],[120.929556,31.689427],[120.929212,31.689186],[120.925229,31.691991],[120.924689,31.692466],[120.924092,31.692205],[120.923514,31.692261],[120.923311,31.692099],[120.922973,31.692205],[120.922842,31.691608],[120.922395,31.691795],[120.922266,31.692389],[120.92203,31.692437],[120.922033,31.692755],[120.920777,31.693065],[120.921091,31.693523],[120.920418,31.693772],[120.920048,31.69303],[120.919975,31.693035],[120.919504,31.693455],[120.919922,31.69382],[120.919447,31.693985],[120.919062,31.693237],[120.918617,31.691549],[120.917355,31.691631],[120.916302,31.691789],[120.916073,31.691402],[120.916119,31.691109],[120.916041,31.690886],[120.915847,31.690742],[120.915317,31.691217],[120.914564,31.691497],[120.914297,31.691428],[120.91255,31.692046],[120.915919,31.697548],[120.915274,31.697811],[120.915026,31.697612],[120.91278,31.698497],[120.913858,31.700283],[120.910835,31.702079],[120.908071,31.703423],[120.907562,31.704864],[120.907401,31.705593],[120.907159,31.705702],[120.905923,31.705717],[120.905736,31.705784],[120.90463,31.706889],[120.904117,31.707281],[120.903711,31.707182],[120.903444,31.70691],[120.902973,31.706609],[120.90261,31.706564],[120.902138,31.706776],[120.901821,31.707177],[120.901397,31.707372],[120.900754,31.707293],[120.900176,31.707338],[120.899355,31.707636],[120.898595,31.707714],[120.897952,31.707623],[120.897374,31.707692],[120.896693,31.707936],[120.896239,31.707915],[120.895588,31.70777],[120.894906,31.707864],[120.892407,31.707835],[120.892284,31.707286],[120.891979,31.706794],[120.891101,31.706949],[120.891383,31.707825],[120.891731,31.707829],[120.892501,31.708902],[120.892235,31.709494],[120.891458,31.710668],[120.891447,31.711068],[120.891584,31.711479],[120.891761,31.711716],[120.891851,31.713117],[120.892102,31.713625],[120.892625,31.713703],[120.893077,31.713562],[120.894128,31.713394],[120.894694,31.713479],[120.89522,31.713672],[120.895599,31.713926],[120.896248,31.714644],[120.897042,31.715228],[120.897226,31.715484],[120.897433,31.716759],[120.897689,31.71724],[120.898874,31.718817],[120.896986,31.719577],[120.896278,31.718503],[120.894326,31.719459],[120.893872,31.71874],[120.891923,31.719899],[120.890372,31.721175],[120.890669,31.721572],[120.889892,31.722055],[120.888848,31.723148],[120.888389,31.722525],[120.887733,31.722613],[120.886183,31.723147],[120.885648,31.723438],[120.885838,31.723688],[120.884859,31.724112],[120.885234,31.724748],[120.885577,31.725551],[120.88603,31.726931],[120.884701,31.727364],[120.884815,31.727638],[120.884237,31.727773],[120.884102,31.7275],[120.883852,31.727579],[120.883716,31.727282],[120.883346,31.727412],[120.88325,31.727446],[120.882889,31.726977],[120.882286,31.72728],[120.882491,31.727618],[120.881814,31.727865],[120.881716,31.728321],[120.880798,31.728727],[120.881405,31.729355],[120.880024,31.730194],[120.880362,31.730496],[120.880015,31.730749],[120.880241,31.730998],[120.879866,31.731227],[120.879224,31.730522],[120.879606,31.730293],[120.879331,31.729966],[120.878928,31.730118],[120.87767,31.731439],[120.877086,31.731718],[120.876257,31.731914],[120.875871,31.732394],[120.875377,31.732558],[120.873866,31.733738],[120.873421,31.734564],[120.872951,31.735122],[120.872222,31.736237],[120.872295,31.736582],[120.872219,31.736702],[120.871921,31.736901],[120.871647,31.737464],[120.870564,31.738873],[120.870238,31.739066],[120.870066,31.73933],[120.87138,31.740281],[120.87082,31.74081],[120.872718,31.74156],[120.872505,31.741902],[120.871307,31.742882],[120.87205,31.743205],[120.872965,31.74404],[120.874045,31.743025],[120.874585,31.743403],[120.873458,31.744437],[120.874666,31.745353],[120.876098,31.744633],[120.876732,31.745303],[120.875198,31.746208],[120.87579,31.746759],[120.87439,31.747926],[120.876071,31.749484],[120.875111,31.749786],[120.875719,31.750333],[120.875329,31.75068],[120.874588,31.751171],[120.873018,31.752557],[120.873364,31.752912],[120.874325,31.753557],[120.87386,31.753975],[120.877677,31.755417],[120.878722,31.756075],[120.88154,31.758232],[120.881633,31.759112],[120.881576,31.759291],[120.882234,31.760829],[120.883958,31.766009],[120.883139,31.766816],[120.882518,31.76724],[120.882162,31.767414],[120.881865,31.768709],[120.884873,31.779009],[120.886307,31.783917],[120.900878,31.787725],[120.903801,31.791426],[120.917499,31.808764],[120.925418,31.805232],[120.926627,31.804711],[120.932764,31.802503],[120.935992,31.801448],[120.934487,31.765289],[120.925993,31.754968],[120.92607,31.754855],[120.926291,31.754534],[120.928296,31.752958],[120.931255,31.750947],[120.924618,31.743372],[120.920931,31.745801],[120.919966,31.744726],[120.91951,31.744343],[120.915738,31.741579],[120.914513,31.742225],[120.908694,31.735767],[120.908934,31.735632],[120.914848,31.732308],[120.91815,31.730369],[120.919999,31.732019],[120.924768,31.735959],[120.929636,31.739833],[120.937063,31.744946],[120.941165,31.748761],[120.943596,31.749621],[120.947611,31.74974],[120.952493,31.749286],[120.951614,31.748696],[120.950025,31.746919],[120.948152,31.744606],[120.950996,31.742885]]]]}}],oL={type:rL,name:nL,crs:iL,features:aL},sL="FeatureCollection",uL=[{type:"Feature",properties:{id:"B020002193",name:"董浜镇",district:"江苏省苏州市常熟市",adcode:"320581",location:"120.933271,31.647432",address:[],typecode:"130105",city:[],longitude:120.933271,latitude:31.647432},geometry:{type:"Point",coordinates:[120.933271,31.647432]}},{type:"Feature",properties:{id:"B0FFM6CYQN",name:"常熟服装城",district:"江苏省苏州市常熟市",adcode:"320581",location:"120.734638,31.624103",address:"商城西路与新湖路交叉口西120米",typecode:"061100",city:[],longitude:120.734638,latitude:31.624103},geometry:{type:"Point",coordinates:[120.734638,31.624103]}},{type:"Feature",properties:{id:"B0FFH1WUDU",name:"经济技术开发区",district:"江苏省苏州市常熟市",adcode:"320581",location:"120.943260,31.746748",address:"永嘉路与金茂路交叉口东140米",typecode:"120100",city:[],longitude:120.94326,latitude:31.746748},geometry:{type:"Point",coordinates:[120.94326,31.746748]}},{type:"Feature",properties:{id:"B0FFGCV7LQ",name:"古里镇",district:"江苏省苏州市常熟市",adcode:"320581",location:"120.842154,31.633566",address:"文学街",typecode:"130105",city:[],longitude:120.842154,latitude:31.633566},geometry:{type:"Point",coordinates:[120.842154,31.633566]}},{type:"Feature",properties:{id:"B02000JTTQ",name:"支塘镇",district:"江苏省苏州市常熟市",adcode:"320581",location:"120.964049,31.609770",address:"中心街",typecode:"130105",city:[],longitude:120.964049,latitude:31.60977},geometry:{type:"Point",coordinates:[120.964049,31.60977]}},{type:"Feature",properties:{id:"B02001HI2S",name:"梅李镇",district:"江苏省苏州市常熟市",adcode:"320581",location:"120.862938,31.709310",address:"人民路18号",typecode:"130105",city:[],longitude:120.862938,latitude:31.70931},geometry:{type:"Point",coordinates:[120.862938,31.70931]}},{type:"Feature",properties:{id:"B020001FLI",name:"海虞镇",district:"江苏省苏州市常熟市",adcode:"320581",location:"120.803813,31.746609",address:"府前路68号",typecode:"130105",city:[],longitude:120.803813,latitude:31.746609},geometry:{type:"Point",coordinates:[120.803813,31.746609]}},{type:"Feature",properties:{id:"B020015VAY",name:"辛庄镇",district:"江苏省苏州市常熟市",adcode:"320581",location:"120.676973,31.539263",address:"新阳大道100号",typecode:"130105",city:[],longitude:120.676973,latitude:31.539263},geometry:{type:"Point",coordinates:[120.676973,31.539263]}},{type:"Feature",properties:{id:"B0FFG4WCLV",name:"沙家浜镇",district:"江苏省苏州市常熟市",adcode:"320581",location:"120.846952,31.544784",address:"中环路145号",typecode:"130105",city:[],longitude:120.846952,latitude:31.544784},geometry:{type:"Point",coordinates:[120.846952,31.544784]}},{type:"Feature",properties:{id:"B02001CKNK",name:"尚湖旅游度假区",district:"江苏省苏州市常熟市",adcode:"320581",location:"120.726437,31.668019",address:"虞山北路兴福寺路街8号",typecode:"130100",city:[],longitude:120.726437,latitude:31.668019},geometry:{type:"Point",coordinates:[120.726437,31.668019]}},{type:"Feature",properties:{id:"B0FFFY1BHI",name:"高新技术产业开发区管委会",district:"江苏省苏州市常熟市",adcode:"320581",location:"120.789449,31.601032",address:"东南大道1号",typecode:"130000",city:[],longitude:120.789449,latitude:31.601032},geometry:{type:"Point",coordinates:[120.789449,31.601032]}},{type:"Feature",properties:{id:"B020001QS2",name:"尚湖镇",district:"江苏省苏州市常熟市",adcode:"320581",location:"120.627862,31.661417",address:"永升(安)路附近",typecode:"130105",city:[],longitude:120.627862,latitude:31.661417},geometry:{type:"Point",coordinates:[120.627862,31.661417]}}],lL={type:sL,features:uL},cL=""+new URL("changshu-CJhH3VgD.png",import.meta.url).href,fL=""+new URL("chinamap-dd5f46jr.png",import.meta.url).href,hL=""+new URL("cityTextures-Bg0Fz_IN.png",import.meta.url).href;var SR={},AR={},q7=function(t){return AR[t]},pl=function(t,r){AR[t]=r},pL=function(t){return SR[t]},A0=function(t,r){SR[t]=r},K7={},f3={},h3=34,cv=10,p3=13;function TR(e){return new Function("d","return {"+e.map(function(t,r){return JSON.stringify(t)+": d["+r+'] || ""'}).join(",")+"}")}function dL(e,t){var r=TR(e);return function(n,i){return t(r(n),i,e)}}function Q7(e){var t=Object.create(null),r=[];return e.forEach(function(n){for(var i in n)i in t||r.push(t[i]=i)}),r}function Fu(e,t){var r=e+"",n=r.length;return n9999?"+"+Fu(e,6):Fu(e,4)}function mL(e){var t=e.getUTCHours(),r=e.getUTCMinutes(),n=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":vL(e.getUTCFullYear())+"-"+Fu(e.getUTCMonth()+1,2)+"-"+Fu(e.getUTCDate(),2)+(i?"T"+Fu(t,2)+":"+Fu(r,2)+":"+Fu(n,2)+"."+Fu(i,3)+"Z":n?"T"+Fu(t,2)+":"+Fu(r,2)+":"+Fu(n,2)+"Z":r||t?"T"+Fu(t,2)+":"+Fu(r,2)+"Z":"")}function gL(e){var t=new RegExp('["'+e+` \r]`),r=e.charCodeAt(0);function n(_,b){var A,w,R=i(_,function(P,k){if(A)return A(P,k-1);w=P,A=b?dL(P,b):TR(P)});return R.columns=w||[],R}function i(_,b){var A=[],w=_.length,R=0,P=0,k,L=w<=0,B=!1;_.charCodeAt(w-1)===cv&&--w,_.charCodeAt(w-1)===p3&&--w;function V(){if(L)return f3;if(B)return B=!1,K7;var K,Z=R,ve;if(_.charCodeAt(Z)===h3){for(;R++=w?L=!0:(ve=_.charCodeAt(R++))===cv?B=!0:ve===p3&&(B=!0,_.charCodeAt(R)===cv&&++R),_.slice(Z+1,K-1).replace(/""/g,'"')}for(;R"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var h5=function(t){return wg.REGISTERED_PROTOCOLS[t.substring(0,t.indexOf("://"))]},IL=function(e){_n(r,e);var t=CL(r);function r(n,i,o,a){var u;return Ht(this,r),u=t.call(this,"AJAXError: ".concat(i," (").concat(n,"): ").concat(o)),u.status=n,u.statusText=i,u.url=o,u.body=a,u}return jt(r)}(P6(Error));function PR(e,t){var r=new XMLHttpRequest,n=Array.isArray(e.url)?e.url[0]:e.url;r.open(e.method||"GET",n,!0),e.type==="arrayBuffer"&&(r.responseType="arraybuffer");for(var i in e.headers)e.headers.hasOwnProperty(i)&&r.setRequestHeader(i,e.headers[i]);return e.type==="json"&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials=e.credentials==="include",r.onerror=function(){t(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||r.status===0)&&r.response!==null){var o=r.response;if(e.type==="json")try{o=JSON.parse(r.response)}catch(u){return t(u)}t(null,o,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"),r)}else{var a=new Blob([r.response],{type:r.getResponseHeader("Content-Type")});t(new IL(r.status,r.statusText,n.toString(),a))}},r.cancel=r.abort,r.send(e.body),r}function ML(e){return new Promise(function(t,r){PR(e,function(n,i,o,a,u){n?r({err:n,data:null,xhr:u}):t({err:null,data:i,cacheControl:o,expires:a,xhr:u})})})}function p5(e,t){return PR(e,t)}var PL=function(t,r){var n=h5(t.url)||p5;return n(Qe(Qe({},t),{},{type:"json"}),r)},d5=function(t,r){var n=h5(t.url)||p5;return n(Qe(Qe({},t),{},{type:"arrayBuffer"}),r)},OL=function(t,r){return p5(Qe(Qe({},t),{},{method:"GET"}),r)},rE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function OR(e,t){var r=new window.Image,n=window.URL||window.webkitURL;r.crossOrigin="anonymous",r.onload=function(){t(null,r),n.revokeObjectURL(r.src),r.onload=null,window.requestAnimationFrame(function(){r.src=rE})},r.onerror=function(){return t(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."))};var i=new Blob([new Uint8Array(e)],{type:"image/png"});r.src=e.byteLength?n.createObjectURL(i):rE}function kR(e,t){var r=new Blob([new Uint8Array(e)],{type:"image/png"});createImageBitmap(r).then(function(n){t(null,n)}).catch(function(n){t(new Error("Could not load image because of ".concat(n.message,". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.")))})}var O6=function(t,r,n){var i=function(a,u){if(a)r(a);else if(u){var c=typeof createImageBitmap=="function",f=n?n(u):u;c?kR(f,r):OR(f,r)}};return t.type==="json"?PL(t,i):d5(t,i)},kL=function(t,r){var n=typeof createImageBitmap=="function";n?kR(t,r):OR(t,r)};function v5(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function DR(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Vm(){}var gm=.7,Yg=1/gm,qd="\\s*([+-]?\\d+)\\s*",_m="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",hf="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",DL=/^#([0-9a-f]{3,8})$/,FL=new RegExp("^rgb\\("+[qd,qd,qd]+"\\)$"),BL=new RegExp("^rgb\\("+[hf,hf,hf]+"\\)$"),LL=new RegExp("^rgba\\("+[qd,qd,qd,_m]+"\\)$"),NL=new RegExp("^rgba\\("+[hf,hf,hf,_m]+"\\)$"),UL=new RegExp("^hsl\\("+[_m,hf,hf]+"\\)$"),zL=new RegExp("^hsla\\("+[_m,hf,hf,_m]+"\\)$"),nE={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};v5(Vm,u0,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:iE,formatHex:iE,formatHsl:$L,formatRgb:aE,toString:aE});function iE(){return this.rgb().formatHex()}function $L(){return FR(this).formatHsl()}function aE(){return this.rgb().formatRgb()}function u0(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=DL.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?oE(t):r===3?new cl(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?j2(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?j2(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=FL.exec(e))?new cl(t[1],t[2],t[3],1):(t=BL.exec(e))?new cl(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=LL.exec(e))?j2(t[1],t[2],t[3],t[4]):(t=NL.exec(e))?j2(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=UL.exec(e))?lE(t[1],t[2]/100,t[3]/100,1):(t=zL.exec(e))?lE(t[1],t[2]/100,t[3]/100,t[4]):nE.hasOwnProperty(e)?oE(nE[e]):e==="transparent"?new cl(NaN,NaN,NaN,0):null}function oE(e){return new cl(e>>16&255,e>>8&255,e&255,1)}function j2(e,t,r,n){return n<=0&&(e=t=r=NaN),new cl(e,t,r,n)}function VL(e){return e instanceof Vm||(e=u0(e)),e?(e=e.rgb(),new cl(e.r,e.g,e.b,e.opacity)):new cl}function Zg(e,t,r,n){return arguments.length===1?VL(e):new cl(e,t,r,n??1)}function cl(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}v5(cl,Zg,DR(Vm,{brighter:function(e){return e=e==null?Yg:Math.pow(Yg,e),new cl(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?gm:Math.pow(gm,e),new cl(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:sE,formatHex:sE,formatRgb:uE,toString:uE}));function sE(){return"#"+d3(this.r)+d3(this.g)+d3(this.b)}function uE(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function d3(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function lE(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new uf(e,t,r,n)}function FR(e){if(e instanceof uf)return new uf(e.h,e.s,e.l,e.opacity);if(e instanceof Vm||(e=u0(e)),!e)return new uf;if(e instanceof uf)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,u=o-i,c=(o+i)/2;return u?(t===o?a=(r-n)/u+(r0&&c<1?0:a,new uf(a,u,c,e.opacity)}function jL(e,t,r,n){return arguments.length===1?FR(e):new uf(e,t,r,n??1)}function uf(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}v5(uf,jL,DR(Vm,{brighter:function(e){return e=e==null?Yg:Math.pow(Yg,e),new uf(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?gm:Math.pow(gm,e),new uf(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new cl(v3(e>=240?e-240:e+120,i,n),v3(e,i,n),v3(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function v3(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}function Ta(e){var t=u0(e),r=[0,0,0,0];return t!=null&&(r[0]=t.r/255,r[1]=t.g/255,r[2]=t.b/255,r[3]=t.opacity),r}function x1(e){var t=e&&e[0],r=e&&e[1],n=e&&e[2],i=t+r*256+n*65536-1;return i}function sh(e){return[e+1&255,e+1>>8&255,e+1>>8>>8&255]}function HL(e){var t=window.document.createElement("canvas"),r=t.getContext("2d");t.width=256,t.height=1;for(var n=null,i=r.createLinearGradient(0,0,256,1),o=e.positions[0],a=e.positions[e.positions.length-1],u=0;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?e:t)),e}var rN=tN,nN=/\s/;function iN(e){for(var t=e.length;t--&&nN.test(e.charAt(t)););return t}var aN=iN,oN=aN,sN=/^\s+/;function uN(e){return e&&e.slice(0,oN(e)+1).replace(sN,"")}var lN=uN;function cN(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Zl=cN;const fN=oa(Zl);var hN=typeof _c=="object"&&_c&&_c.Object===Object&&_c,LR=hN,pN=LR,dN=typeof self=="object"&&self&&self.Object===Object&&self,vN=pN||dN||Function("return this")(),Sc=vN,mN=Sc,gN=mN.Symbol,jm=gN,cE=jm,NR=Object.prototype,_N=NR.hasOwnProperty,yN=NR.toString,fv=cE?cE.toStringTag:void 0;function xN(e){var t=_N.call(e,fv),r=e[fv];try{e[fv]=void 0;var n=!0}catch{}var i=yN.call(e);return n&&(t?e[fv]=r:delete e[fv]),i}var bN=xN,EN=Object.prototype,SN=EN.toString;function AN(e){return SN.call(e)}var TN=AN,fE=jm,wN=bN,CN=TN,RN="[object Null]",IN="[object Undefined]",hE=fE?fE.toStringTag:void 0;function MN(e){return e==null?e===void 0?IN:RN:hE&&hE in Object(e)?wN(e):CN(e)}var lh=MN;function PN(e){return e!=null&&typeof e=="object"}var ql=PN,ON=lh,kN=ql,DN="[object Symbol]";function FN(e){return typeof e=="symbol"||kN(e)&&ON(e)==DN}var X_=FN,BN=lN,pE=Zl,LN=X_,dE=NaN,NN=/^[-+]0x[0-9a-f]+$/i,UN=/^0b[01]+$/i,zN=/^0o[0-7]+$/i,$N=parseInt;function VN(e){if(typeof e=="number")return e;if(LN(e))return dE;if(pE(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=pE(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=BN(e);var r=UN.test(e);return r||zN.test(e)?$N(e.slice(2),r?2:8):NN.test(e)?dE:+e}var UR=VN,jN=rN,m3=UR;function HN(e,t,r){return r===void 0&&(r=t,t=void 0),r!==void 0&&(r=m3(r),r=r===r?r:0),t!==void 0&&(t=m3(t),t=t===t?t:0),jN(m3(e),t,r)}var GN=HN;const WN=oa(GN);function XN(){this.__data__=[],this.size=0}var YN=XN;function ZN(e,t){return e===t||e!==e&&t!==t}var Hm=ZN,qN=Hm;function KN(e,t){for(var r=e.length;r--;)if(qN(e[r][0],t))return r;return-1}var Y_=KN,QN=Y_,JN=Array.prototype,eU=JN.splice;function tU(e){var t=this.__data__,r=QN(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():eU.call(t,r,1),--this.size,!0}var rU=tU,nU=Y_;function iU(e){var t=this.__data__,r=nU(t,e);return r<0?void 0:t[r][1]}var aU=iU,oU=Y_;function sU(e){return oU(this.__data__,e)>-1}var uU=sU,lU=Y_;function cU(e,t){var r=this.__data__,n=lU(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var fU=cU,hU=YN,pU=rU,dU=aU,vU=uU,mU=fU;function T0(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=Z$}var WR=q$,K$=lh,Q$=WR,J$=ql,eV="[object Arguments]",tV="[object Array]",rV="[object Boolean]",nV="[object Date]",iV="[object Error]",aV="[object Function]",oV="[object Map]",sV="[object Number]",uV="[object Object]",lV="[object RegExp]",cV="[object Set]",fV="[object String]",hV="[object WeakMap]",pV="[object ArrayBuffer]",dV="[object DataView]",vV="[object Float32Array]",mV="[object Float64Array]",gV="[object Int8Array]",_V="[object Int16Array]",yV="[object Int32Array]",xV="[object Uint8Array]",bV="[object Uint8ClampedArray]",EV="[object Uint16Array]",SV="[object Uint32Array]",qa={};qa[vV]=qa[mV]=qa[gV]=qa[_V]=qa[yV]=qa[xV]=qa[bV]=qa[EV]=qa[SV]=!0;qa[eV]=qa[tV]=qa[pV]=qa[rV]=qa[dV]=qa[nV]=qa[iV]=qa[aV]=qa[oV]=qa[sV]=qa[uV]=qa[lV]=qa[cV]=qa[fV]=qa[hV]=!1;function AV(e){return J$(e)&&Q$(e.length)&&!!qa[K$(e)]}var TV=AV;function wV(e){return function(t){return e(t)}}var ey=wV,Kg={exports:{}};Kg.exports;(function(e,t){var r=LR,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o&&r.process,u=function(){try{var c=i&&i.require&&i.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}}();e.exports=u})(Kg,Kg.exports);var S5=Kg.exports,CV=TV,RV=ey,xE=S5,bE=xE&&xE.isTypedArray,IV=bE?RV(bE):CV,ty=IV;const MV=oa(ty);var PV=k$,OV=HR,kV=ch,DV=J_,FV=GR,BV=ty,LV=Object.prototype,NV=LV.hasOwnProperty;function UV(e,t){var r=kV(e),n=!r&&OV(e),i=!r&&!n&&DV(e),o=!r&&!n&&!i&&BV(e),a=r||n||i||o,u=a?PV(e.length,String):[],c=u.length;for(var f in e)(t||NV.call(e,f))&&!(a&&(f=="length"||i&&(f=="offset"||f=="parent")||o&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||FV(f,c)))&&u.push(f);return u}var XR=UV,zV=Object.prototype;function $V(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||zV;return e===r}var A5=$V;function VV(e,t){return function(r){return e(t(r))}}var YR=VV,jV=YR,HV=jV(Object.keys,Object),GV=HV,WV=A5,XV=GV,YV=Object.prototype,ZV=YV.hasOwnProperty;function qV(e){if(!WV(e))return XV(e);var t=[];for(var r in Object(e))ZV.call(e,r)&&r!="constructor"&&t.push(r);return t}var KV=qV,QV=q_,JV=WR;function ej(e){return e!=null&&JV(e.length)&&!QV(e)}var ry=ej,tj=XR,rj=KV,nj=ry;function ij(e){return nj(e)?tj(e):rj(e)}var T5=ij,aj=Gm,oj=T5;function sj(e,t){return e&&aj(t,oj(t),e)}var uj=sj;function lj(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var cj=lj,fj=Zl,hj=A5,pj=cj,dj=Object.prototype,vj=dj.hasOwnProperty;function mj(e){if(!fj(e))return pj(e);var t=hj(e),r=[];for(var n in e)n=="constructor"&&(t||!vj.call(e,n))||r.push(n);return r}var gj=mj,_j=XR,yj=gj,xj=ry;function bj(e){return xj(e)?_j(e,!0):yj(e)}var Wm=bj,Ej=Gm,Sj=Wm;function Aj(e,t){return e&&Ej(t,Sj(t),e)}var Tj=Aj,Qg={exports:{}};Qg.exports;(function(e,t){var r=Sc,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o?r.Buffer:void 0,u=a?a.allocUnsafe:void 0;function c(f,m){if(m)return f.slice();var _=f.length,b=u?u(_):new f.constructor(_);return f.copy(b),b}e.exports=c})(Qg,Qg.exports);var ZR=Qg.exports;function wj(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r=t||Z<0||_&&ve>=o}function k(){var K=_3();if(P(K))return L(K);u=setTimeout(k,R(K))}function L(K){return u=void 0,b&&n?A(K):(n=i=void 0,a)}function B(){u!==void 0&&clearTimeout(u),f=0,n=c=i=u=void 0}function V(){return u===void 0?a:L(_3())}function G(){var K=_3(),Z=P(K);if(n=arguments,i=this,c=K,Z){if(u===void 0)return w(c);if(_)return clearTimeout(u),u=setTimeout(k,t),A(c)}return u===void 0&&(u=setTimeout(k,t)),a}return G.cancel=B,G.flush=V,G}var lI=JW;const eX=oa(lI);var tX=ch,rX=X_,nX=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,iX=/^\w*$/;function aX(e,t){if(tX(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||rX(e)?!0:iX.test(e)||!nX.test(e)||t!=null&&e in Object(t)}var oX=aX,cI=x5,sX="Expected a function";function M5(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(sX);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(M5.Cache||cI),r}M5.Cache=cI;var uX=M5,lX=uX,cX=500;function fX(e){var t=lX(e,function(n){return r.size===cX&&r.clear(),n}),r=t.cache;return t}var hX=fX,pX=hX,dX=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vX=/\\(\\)?/g,mX=pX(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(dX,function(r,n,i,o){t.push(i?o.replace(vX,"$1"):n||r)}),t}),gX=mX;function _X(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++ru))return!1;var f=o.get(e),m=o.get(t);if(f&&m)return f==t&&m==e;var _=-1,b=!0,A=r&fY?new sY:void 0;for(o.set(e,t),o.set(t,e);++_0){if(++t>=bq)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Tq=Aq,wq=xq,Cq=Tq,Rq=Cq(wq),Iq=Rq,Mq=SI,Pq=dq,Oq=Iq;function kq(e,t){return Oq(Pq(e,t,Mq),e+"")}var AI=kq,Dq=Hm,Fq=ry,Bq=GR,Lq=Zl;function Nq(e,t,r){if(!Lq(r))return!1;var n=typeof t;return(n=="number"?Fq(r)&&Bq(t,r.length):n=="string"&&t in r)?Dq(r[t],e):!1}var Uq=Nq,zq=AI,$q=Uq;function Vq(e){return zq(function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&$q(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n-1;)u!==e&&i4.call(u,c,1),i4.call(e,c,1);return e}var _K=gK,yK=_K;function xK(e,t){return e&&e.length&&t&&t.length?yK(e,t):e}var bK=xK,EK=AI,SK=bK,AK=EK(SK),TK=AK;const wK=oa(TK);var CK=lI,RK=Zl,IK="Expected a function";function MK(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(IK);return RK(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),CK(e,t,{leading:n,maxWait:t,trailing:i})}var PK=MK;const OK=oa(PK);var kK=wI;function DK(e,t){var r=e==null?0:e.length;return!!r&&kK(e,t,0)>-1}var FK=DK;function BK(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=KK){var f=t?null:ZK(e);if(f)return qK(f);a=!1,i=YK,c=new GK}else c=t?[]:u;e:for(;++ni?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n=n?e:oQ(e,t,r)}var uQ=sQ,lQ="\\ud800-\\udfff",cQ="\\u0300-\\u036f",fQ="\\ufe20-\\ufe2f",hQ="\\u20d0-\\u20ff",pQ=cQ+fQ+hQ,dQ="\\ufe0e\\ufe0f",vQ="\\u200d",mQ=RegExp("["+vQ+lQ+pQ+dQ+"]");function gQ(e){return mQ.test(e)}var CI=gQ;function _Q(e){return e.split("")}var yQ=_Q,RI="\\ud800-\\udfff",xQ="\\u0300-\\u036f",bQ="\\ufe20-\\ufe2f",EQ="\\u20d0-\\u20ff",SQ=xQ+bQ+EQ,AQ="\\ufe0e\\ufe0f",TQ="["+RI+"]",U6="["+SQ+"]",z6="\\ud83c[\\udffb-\\udfff]",wQ="(?:"+U6+"|"+z6+")",II="[^"+RI+"]",MI="(?:\\ud83c[\\udde6-\\uddff]){2}",PI="[\\ud800-\\udbff][\\udc00-\\udfff]",CQ="\\u200d",OI=wQ+"?",kI="["+AQ+"]?",RQ="(?:"+CQ+"(?:"+[II,MI,PI].join("|")+")"+kI+OI+")*",IQ=kI+OI+RQ,MQ="(?:"+[II+U6+"?",U6,MI,PI,TQ].join("|")+")",PQ=RegExp(z6+"(?="+z6+")|"+MQ+IQ,"g");function OQ(e){return e.match(PQ)||[]}var kQ=OQ,DQ=yQ,FQ=CI,BQ=kQ;function LQ(e){return FQ(e)?BQ(e):DQ(e)}var NQ=LQ,UQ=uQ,zQ=CI,$Q=NQ,VQ=Xm;function jQ(e){return function(t){t=VQ(t);var r=zQ(t)?$Q(t):void 0,n=r?r[0]:t.charAt(0),i=r?UQ(r,1).join(""):t.slice(1);return n[e]()+i}}var HQ=jQ,GQ=HQ,WQ=GQ("toUpperCase"),DI=WQ;const XQ=oa(DI);function YQ(e){return e===void 0}var ZQ=YQ;const qQ=oa(ZQ);var KQ=Xm,QQ=DI;function JQ(e){return QQ(KQ(e).toLowerCase())}var eJ=JQ;function tJ(e,t,r,n){var i=-1,o=e==null?0:e.length;for(n&&o&&(r=e[++i]);++i0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(r)}function qI(e,t){e instanceof HTMLElement?e.className=t:e.className.baseVal=t}function O5(e){return e instanceof SVGElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}vee(["transform","WebkitTransform"]);function gee(){var e,t=window.document.querySelector('meta[name="viewport"]');if(!t)return 1;var r=(e=t.content)===null||e===void 0?void 0:e.split(","),n=r.find(function(i){var o=i.split("="),a=Nn(o,1),u=a[0];return u==="initial-scale"});return n?n.split("=")[1]*1:1}var ul=gee()<1?1:window.devicePixelRatio;function _ee(e,t){e.setAttribute("style","".concat(e.style.cssText).concat(t))}function yee(e){return Object.entries(e).map(function(t){var r=Nn(t,2),n=r[0],i=r[1];return"".concat(n,": ").concat(i)}).join(";")}function xee(e,t){return{left:e.left-t.left,top:e.top-t.top,right:t.left+t.width-e.left-e.width,bottom:t.top+t.height-e.top-e.height}}function KI(e){e.innerHTML=""}function bee(e){e.setAttribute("draggable","false")}function Eee(e,t){for(var r=Array.isArray(t)?t:[t],n=e;n instanceof Element&&n!==window.document.body;){var i,o;if(r.find(function(a){var u;return(u=n)===null||u===void 0?void 0:u.matches(a)}))return n;n=(i=(o=n)===null||o===void 0?void 0:o.parentElement)!==null&&i!==void 0?i:null}}var E3;function See(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap}var V6=(E3=navigator)===null||E3===void 0?void 0:E3.userAgent;V6.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);V6.indexOf("Android")>-1||V6.indexOf("Adr")>-1;function j6(e){var t=[1/0,1/0,-1/0,-1/0];return RR(e,function(r){t[0]>r[0]&&(t[0]=r[0]),t[1]>r[1]&&(t[1]=r[1]),t[2]n&&e.lng<=o&&e.lat>i&&e.lat<=a}function Tee(e){var t=[1/0,1/0,-1/0,-1/0];return e.forEach(function(r){var n=r.coordinates;QI(t,n)}),t}function QI(e,t){return Array.isArray(t[0])?t.forEach(function(r){QI(e,r)}):(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]1&&arguments[1]!==void 0?arguments[1]:!0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{enable:!0,decimal:1};e=Ree(e,t);var n=e[0],i=e[1],o=n*l4/180,a=Math.log(Math.tan((90+i)*Math.PI/360))/(Math.PI/180);return a=a*l4/180,r.enable&&(o=Number(o.toFixed(r.decimal)),a=Number(a.toFixed(r.decimal))),e.length===3?[o,a,e[2]]:[o,a]}function wee(e){if(e==null)throw new Error("lng is required");return(e>180||e<-180)&&(e=e%360,e>180&&(e=-360+e),e<-180&&(e=360+e),e===0&&(e=0)),e}function Cee(e){if(e==null)throw new Error("lat is required");return(e>90||e<-90)&&(e=e%180,e>90&&(e=-180+e),e<-90&&(e=180+e),e===0&&(e=0)),e}function Ree(e,t){if(t===!1)return e;var r=wee(e[0]),n=Cee(e[1]);return n>85&&(n=85),n<-85&&(n=-85),e.length===3?[r,n,e[2]]:[r,n]}function ko(e){var t=85.0511287798,r=Math.max(Math.min(t,e[1]),-t),n=256<<20,i=Math.PI/180,o=e[0]*i,a=r*i;a=Math.log(Math.tan(Math.PI/4+a/2));var u=.5/Math.PI,c=.5,f=-.5/Math.PI;return i=.5,o=n*(u*o+c),a=n*(f*a+i),[Math.floor(o),Math.floor(a)]}function k5(e,t){var r=Math.abs(e[1][1]-e[0][1])*t,n=Math.abs(e[1][0]-e[0][0])*t;return[[e[0][0]-n,e[0][1]-r],[e[1][0]+n,e[1][1]+r]]}function JI(e,t){return e[0][0]<=t[0][0]&&e[0][1]<=t[0][1]&&e[1][0]>=t[1][0]&&e[1][1]>=t[1][1]}function t_(e){return[[e[0],e[1]],[e[2],e[3]]]}function Iee(e){var t=Mee(e,[0,0]);return[e[0]/t,e[1]/t]}function Mee(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function ih(e){if(S3(e[0]))return e;if(S3(e[0][0]))throw new Error("当前数据不支持标注");if(S3(e[0][0][0])){var t=e,r=0,n=0,i=0;return t.forEach(function(o){o.forEach(function(a){r+=a[0],n+=a[1],i++})}),[r/i,n/i,0]}else throw new Error("当前数据不支持标注")}function Pee(e){for(var t=e[0],r=e[1],n=e[0],i=e[1],o=0,a=0,u=0,c=0;c0&&arguments[0]!==void 0?arguments[0]:50,r=arguments.length>1?arguments[1]:void 0;Ht(this,e),this.limit=t,this.destroy=r||this.defaultDestroy,this.order=[],this.clear()}return jt(e,[{key:"clear",value:function(){var r=this;this.order.forEach(function(n){r.delete(n)}),this.cache={},this.order=[]}},{key:"get",value:function(r){var n=this.cache[r];return n&&(this.deleteOrder(r),this.appendOrder(r)),n}},{key:"set",value:function(r,n){this.cache[r]?(this.delete(r),this.cache[r]=n,this.appendOrder(r)):(Object.keys(this.cache).length===this.limit&&this.delete(this.order[0]),this.cache[r]=n,this.appendOrder(r))}},{key:"delete",value:function(r){var n=this.cache[r];n&&(this.deleteCache(r),this.deleteOrder(r),this.destroy(n,r))}},{key:"deleteCache",value:function(r){delete this.cache[r]}},{key:"deleteOrder",value:function(r){var n=this.order.findIndex(function(i){return i===r});n>=0&&this.order.splice(n,1)}},{key:"appendOrder",value:function(r){this.order.push(r)}},{key:"defaultDestroy",value:function(r,n){return null}}]),e}();function Fee(e){if(e.length===0)throw new Error("max requires at least one data point");for(var t=e[0],r=1;rt&&(t=e[r]);return t*1}function Bee(e){if(e.length===0)throw new Error("min requires at least one data point");for(var t=e[0],r=1;rn&&(n=i,r=t),i=1,t=e[o]):i++;return r*1}var tM={min:Bee,max:Fee,mean:Lee,sum:eM,mode:Nee};function rM(e,t){return e.map(function(r){return r[t]})}function c4(e,t,r,n,i,o,a){try{var u=e[o](a),c=u.value}catch(f){r(f);return}u.done?t(c):Promise.resolve(c).then(n,i)}function Mt(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(c){c4(o,n,i,a,u,"next",c)}function u(c){c4(o,n,i,a,u,"throw",c)}a(void 0)})}}var nM={exports:{}},iM={exports:{}};(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(iM);var Uee=iM.exports;(function(e){var t=Uee.default;function r(){e.exports=r=function(){return i},e.exports.__esModule=!0,e.exports.default=e.exports;var n,i={},o=Object.prototype,a=o.hasOwnProperty,u=Object.defineProperty||function(st,tt,dt){st[tt]=dt.value},c=typeof Symbol=="function"?Symbol:{},f=c.iterator||"@@iterator",m=c.asyncIterator||"@@asyncIterator",_=c.toStringTag||"@@toStringTag";function b(st,tt,dt){return Object.defineProperty(st,tt,{value:dt,enumerable:!0,configurable:!0,writable:!0}),st[tt]}try{b({},"")}catch{b=function(dt,nt,pr){return dt[nt]=pr}}function A(st,tt,dt,nt){var pr=tt&&tt.prototype instanceof V?tt:V,ur=Object.create(pr.prototype),Ar=new Gt(nt||[]);return u(ur,"_invoke",{value:ye(st,dt,Ar)}),ur}function w(st,tt,dt){try{return{type:"normal",arg:st.call(tt,dt)}}catch(nt){return{type:"throw",arg:nt}}}i.wrap=A;var R="suspendedStart",P="suspendedYield",k="executing",L="completed",B={};function V(){}function G(){}function K(){}var Z={};b(Z,f,function(){return this});var ve=Object.getPrototypeOf,Ie=ve&&ve(ve(Zt([])));Ie&&Ie!==o&&a.call(Ie,f)&&(Z=Ie);var de=K.prototype=V.prototype=Object.create(Z);function se(st){["next","throw","return"].forEach(function(tt){b(st,tt,function(dt){return this._invoke(tt,dt)})})}function le(st,tt){function dt(pr,ur,Ar,Xn){var pn=w(st[pr],st,ur);if(pn.type!=="throw"){var gi=pn.arg,Je=gi.value;return Je&&t(Je)=="object"&&a.call(Je,"__await")?tt.resolve(Je.__await).then(function(Qt){dt("next",Qt,Ar,Xn)},function(Qt){dt("throw",Qt,Ar,Xn)}):tt.resolve(Je).then(function(Qt){gi.value=Qt,Ar(gi)},function(Qt){return dt("throw",Qt,Ar,Xn)})}Xn(pn.arg)}var nt;u(this,"_invoke",{value:function(ur,Ar){function Xn(){return new tt(function(pn,gi){dt(ur,Ar,pn,gi)})}return nt=nt?nt.then(Xn,Xn):Xn()}})}function ye(st,tt,dt){var nt=R;return function(pr,ur){if(nt===k)throw new Error("Generator is already running");if(nt===L){if(pr==="throw")throw ur;return{value:n,done:!0}}for(dt.method=pr,dt.arg=ur;;){var Ar=dt.delegate;if(Ar){var Xn=ke(Ar,dt);if(Xn){if(Xn===B)continue;return Xn}}if(dt.method==="next")dt.sent=dt._sent=dt.arg;else if(dt.method==="throw"){if(nt===R)throw nt=L,dt.arg;dt.dispatchException(dt.arg)}else dt.method==="return"&&dt.abrupt("return",dt.arg);nt=k;var pn=w(st,tt,dt);if(pn.type==="normal"){if(nt=dt.done?L:P,pn.arg===B)continue;return{value:pn.arg,done:dt.done}}pn.type==="throw"&&(nt=L,dt.method="throw",dt.arg=pn.arg)}}}function ke(st,tt){var dt=tt.method,nt=st.iterator[dt];if(nt===n)return tt.delegate=null,dt==="throw"&&st.iterator.return&&(tt.method="return",tt.arg=n,ke(st,tt),tt.method==="throw")||dt!=="return"&&(tt.method="throw",tt.arg=new TypeError("The iterator does not provide a '"+dt+"' method")),B;var pr=w(nt,st.iterator,tt.arg);if(pr.type==="throw")return tt.method="throw",tt.arg=pr.arg,tt.delegate=null,B;var ur=pr.arg;return ur?ur.done?(tt[st.resultName]=ur.value,tt.next=st.nextLoc,tt.method!=="return"&&(tt.method="next",tt.arg=n),tt.delegate=null,B):ur:(tt.method="throw",tt.arg=new TypeError("iterator result is not an object"),tt.delegate=null,B)}function Rt(st){var tt={tryLoc:st[0]};1 in st&&(tt.catchLoc=st[1]),2 in st&&(tt.finallyLoc=st[2],tt.afterLoc=st[3]),this.tryEntries.push(tt)}function Lt(st){var tt=st.completion||{};tt.type="normal",delete tt.arg,st.completion=tt}function Gt(st){this.tryEntries=[{tryLoc:"root"}],st.forEach(Rt,this),this.reset(!0)}function Zt(st){if(st||st===""){var tt=st[f];if(tt)return tt.call(st);if(typeof st.next=="function")return st;if(!isNaN(st.length)){var dt=-1,nt=function pr(){for(;++dt=0;--pr){var ur=this.tryEntries[pr],Ar=ur.completion;if(ur.tryLoc==="root")return nt("end");if(ur.tryLoc<=this.prev){var Xn=a.call(ur,"catchLoc"),pn=a.call(ur,"finallyLoc");if(Xn&&pn){if(this.prev=0;--nt){var pr=this.tryEntries[nt];if(pr.tryLoc<=this.prev&&a.call(pr,"finallyLoc")&&this.prev=0;--dt){var nt=this.tryEntries[dt];if(nt.finallyLoc===tt)return this.complete(nt.completion,nt.afterLoc),Lt(nt),B}},catch:function(tt){for(var dt=this.tryEntries.length-1;dt>=0;--dt){var nt=this.tryEntries[dt];if(nt.tryLoc===tt){var pr=nt.completion;if(pr.type==="throw"){var ur=pr.arg;Lt(nt)}return ur}}throw new Error("illegal catch attempt")},delegateYield:function(tt,dt,nt){return this.delegate={iterator:Zt(tt),resultName:dt,nextLoc:nt},this.method==="next"&&(this.arg=n),B}},i}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(nM);var zee=nM.exports,Rg=zee(),$ee=Rg;try{regeneratorRuntime=Rg}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Rg:Function("r","regeneratorRuntime = r")(Rg)}const he=oa($ee);function Vee(e,t){t===void 0&&(t={});var r=Number(e[0]),n=Number(e[1]),i=Number(e[2]),o=Number(e[3]);if(e.length===6)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[r,n],u=[r,o],c=[i,o],f=[i,n];return f5([[a,f,c,u,a]],t.properties,{bbox:e,id:t.id})}var aM={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,f,m){this.fn=c,this.context=f,this.once=m||!1}function o(c,f,m,_,b){if(typeof m!="function")throw new TypeError("The listener must be a function");var A=new i(m,_||c,b),w=r?r+f:f;return c._events[w]?c._events[w].fn?c._events[w]=[c._events[w],A]:c._events[w].push(A):(c._events[w]=A,c._eventsCount++),c}function a(c,f){--c._eventsCount===0?c._events=new n:delete c._events[f]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var f=[],m,_;if(this._eventsCount===0)return f;for(_ in m=this._events)t.call(m,_)&&f.push(r?_.slice(1):_);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(m)):f},u.prototype.listeners=function(f){var m=r?r+f:f,_=this._events[m];if(!_)return[];if(_.fn)return[_.fn];for(var b=0,A=_.length,w=new Array(A);bi&&(_=i);for(var b=Nn(r,4),A=b[0],w=b[1],R=b[2],P=b[3],k=[Math.max(A,m[0]),Math.max(w,m[1]),Math.min(R,m[2]),Math.min(P,m[3])],L=[],B=H6(k[0],k[1],_),V=Nn(B,2),G=V[0],K=V[1],Z=H6(k[2],k[3],_),ve=Nn(Z,2),Ie=ve[0],de=ve[1],se=G;se<=Ie;se++)for(var le=de;le<=K;le++)L.push({x:se,y:le,z:_});var ye=(Ie+G)/2,ke=(K+de)/2,Rt=function(Gt,Zt){return Math.abs(Gt-ye)+Math.abs(Zt-ke)};return L.sort(function(Lt,Gt){return Rt(Lt.x,Lt.y)-Rt(Gt.x,Gt.y)}),L}var Kee=function(t,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o=Math.pow(2,n),a=o-1,u=o,c=t,f=r;return i&&(c<0?c=c+u:c>a&&(c=c%u)),{warpX:c,warpY:f}};function Qee(e){var t=Jee();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function Jee(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ete=function(e){_n(r,e);var t=Qee(r);function r(n){var i;Ht(this,r),i=t.call(this),F($e(i),"tileSize",256),F($e(i),"isVisible",!1),F($e(i),"isCurrent",!1),F($e(i),"isVisibleChange",!1),F($e(i),"loadedLayers",0),F($e(i),"isLayerLoaded",!1),F($e(i),"isLoad",!1),F($e(i),"isChildLoad",!1),F($e(i),"parent",null),F($e(i),"children",[]),F($e(i),"data",null),F($e(i),"properties",{}),F($e(i),"loadDataId",0);var o=n.x,a=n.y,u=n.z,c=n.tileSize,f=n.warp,m=f===void 0?!0:f;return i.x=o,i.y=a,i.z=u,i.warp=m||!0,i.tileSize=c,i}return jt(r,[{key:"isLoading",get:function(){return this.loadStatus===dc.Loading}},{key:"isLoaded",get:function(){return this.loadStatus===dc.Loaded}},{key:"isFailure",get:function(){return this.loadStatus===dc.Failure}},{key:"setTileLayerLoaded",value:function(){this.isLayerLoaded=!0}},{key:"isCancelled",get:function(){return this.loadStatus===dc.Cancelled}},{key:"isDone",get:function(){return[dc.Loaded,dc.Cancelled,dc.Failure].includes(this.loadStatus)}},{key:"bounds",get:function(){return lM(this.x,this.y,this.z)}},{key:"bboxPolygon",get:function(){var i=Nn(this.bounds,4),o=i[0],a=i[1],u=i[2],c=i[3],f=[(u-o)/2,(c-a)/2],m=Vee(this.bounds,{properties:{key:this.key,id:this.key,bbox:this.bounds,center:f,meta:` `.concat(this.key,` `)}});return m}},{key:"key",get:function(){var i="".concat(this.x,"_").concat(this.y,"_").concat(this.z);return i}},{key:"layerLoad",value:function(){this.loadedLayers++,this.emit("layerLoaded")}},{key:"loadData",value:function(){var n=Mt(he.mark(function o(a){var u,c,f,m,_,b,A,w,R,P,k,L,B,V,G,K,Z;return he.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return u=a.getData,c=a.onLoad,f=a.onError,this.loadDataId++,m=this.loadDataId,this.isLoading&&this.abortLoad(),this.abortController=new AbortController,this.loadStatus=dc.Loading,_=null,Ie.prev=7,A=this.x,w=this.y,R=this.z,P=this.bounds,k=this.tileSize,L=this.warp,B=Kee(A,w,R,L),V=B.warpX,G=B.warpY,K=this.abortController.signal,Z={x:V,y:G,z:R,bounds:P,tileSize:k,signal:K,warp:L},Ie.next=14,u(Z,this);case 14:_=Ie.sent,Ie.next=20;break;case 17:Ie.prev=17,Ie.t0=Ie.catch(7),b=Ie.t0;case 20:if(m===this.loadDataId){Ie.next=22;break}return Ie.abrupt("return");case 22:if(!(this.isCancelled&&!_)){Ie.next=24;break}return Ie.abrupt("return");case 24:if(!(b||!_)){Ie.next=28;break}return this.loadStatus=dc.Failure,f(b,this),Ie.abrupt("return");case 28:this.loadStatus=dc.Loaded,this.data=_,c(this);case 31:case"end":return Ie.stop()}},o,this,[[7,17]])}));function i(o){return n.apply(this,arguments)}return i}()},{key:"reloadData",value:function(i){this.isLoading&&this.abortLoad(),this.loadData(i)}},{key:"abortLoad",value:function(){this.isLoaded||this.isCancelled||(this.loadStatus=dc.Cancelled,this.abortController.abort(),this.xhrCancel&&this.xhrCancel())}}]),r}(ju.EventEmitter),tte=function(t,r){var n=t_(t),i=k5(n,r),o=360*3-180,a=85.0511287798065,u=[Math.max(i[0][0],-o),Math.max(i[0][1],-a),Math.min(i[1][0],o),Math.min(i[1][1],a)];return u},rte=function(t,r){var n=t_(t),i=t_(r),o=JI(n,i);return o};function Wh(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=nte(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function nte(e,t){if(e){if(typeof e=="string")return p4(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p4(e,t)}}function p4(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ote=Ci.throttle,_d=function(e){return e.TilesLoadStart="tiles-load-start",e.TileLoaded="tile-loaded",e.TileError="tile-error",e.TileUnload="tile-unload",e.TileUpdate="tile-update",e.TilesLoadFinished="tiles-load-finished",e}({}),ste=function(e){_n(r,e);var t=ite(r);function r(n){var i;return Ht(this,r),i=t.call(this),F($e(i),"currentTiles",[]),F($e(i),"cacheTiles",new Map),F($e(i),"throttleUpdate",ote(function(o,a){i.update(o,a)},16)),F($e(i),"onTileLoad",function(o){i.emit(_d.TileLoaded,o),i.updateTileVisible(),i.loadFinished()}),F($e(i),"onTileError",function(o,a){i.emit(_d.TileError,{error:o,tile:a}),i.updateTileVisible(),i.loadFinished()}),F($e(i),"onTileUnload",function(o){i.emit(_d.TileUnload,o),i.loadFinished()}),i.options={tileSize:256,minZoom:0,maxZoom:1/0,zoomOffset:0,extent:uM,getTileData:Zee,warp:!0,updateStrategy:Ig.Replace},i.updateOptions(n),i}return jt(r,[{key:"isLoaded",get:function(){return this.currentTiles.every(function(i){return i.isDone})}},{key:"tiles",get:function(){var i=Array.from(this.cacheTiles.values()).sort(function(o,a){return o.z-a.z});return i}},{key:"updateOptions",value:function(i){var o=i.minZoom===void 0?this.options.minZoom:Math.ceil(i.minZoom),a=i.maxZoom===void 0?this.options.maxZoom:Math.floor(i.maxZoom);this.options=Qe(Qe(Qe({},this.options),i),{},{minZoom:o,maxZoom:a})}},{key:"update",value:function(i,o){var a=this,u=Math.max(0,Math.ceil(i));if(!(this.lastViewStates&&this.lastViewStates.zoom===u&&rte(this.lastViewStates.latLonBoundsBuffer,o))){var c=tte(o,Wee);this.lastViewStates={zoom:u,latLonBounds:o,latLonBoundsBuffer:c},this.currentZoom=u;var f=!1,m=this.getTileIndices(u,c).filter(function(_){return a.options.warp||_.x>=0&&_.x0;){var c=i.shift();c.abortLoad()}}},{key:"getTileByLngLat",value:function(i,o,a){var u=this.options.zoomOffset,c=Math.ceil(a)+u,f=H6(i,o,c),m=this.tiles.filter(function(_){return _.key==="".concat(f[0],"_").concat(f[1],"_").concat(c)});return m[0]}},{key:"getTileExtent",value:function(i,o){return this.getTileIndices(o,i)}},{key:"getTileByZXY",value:function(i,o,a){var u=this.tiles.filter(function(c){return c.key==="".concat(o,"_").concat(a,"_").concat(i)});return u[0]}},{key:"clear",value:function(){var i=Wh(this.cacheTiles.values()),o;try{for(i.s();!(o=i.n()).done;){var a=o.value;a.isLoading?a.abortLoad():this.onTileUnload(a)}}catch(u){i.e(u)}finally{i.f()}this.lastViewStates=void 0,this.cacheTiles.clear(),this.currentTiles=[]}},{key:"destroy",value:function(){this.clear(),this.removeAllListeners()}},{key:"updateTileVisible",value:function(){var i=this.options.updateStrategy,o=new Map,a=Wh(this.cacheTiles.values()),u;try{for(a.s();!(u=a.n()).done;){var c=u.value;o.set(c.key,c.isVisible),c.isCurrent=!1,c.isVisible=!1}}catch(w){a.e(w)}finally{a.f()}var f=Wh(this.currentTiles),m;try{for(f.s();!(m=f.n()).done;){var _=m.value;_.isCurrent=!0,_.isVisible=!0}}catch(w){f.e(w)}finally{f.f()}var b=Array.from(this.cacheTiles.values());typeof i=="function"?i(b):Yee[i](b);var A=!1;Array.from(this.cacheTiles.values()).forEach(function(w){w.isVisible!==o.get(w.key)?(w.isVisibleChange=!0,A=!0):w.isVisibleChange=!1}),A&&this.emit(_d.TileUpdate)}},{key:"getTileIndices",value:function(i,o){var a=this.options,u=a.tileSize,c=a.extent,f=a.zoomOffset,m=Math.floor(this.options.maxZoom),_=Math.ceil(this.options.minZoom),b=qee({maxZoom:m,minZoom:_,zoomOffset:f,tileSize:u,zoom:i,latLonBounds:o,extent:c});return b}},{key:"getTileId",value:function(i,o,a){var u="".concat(i,",").concat(o,",").concat(a);return u}},{key:"loadFinished",value:function(){var i=!this.currentTiles.some(function(o){return!o.isDone});return i&&this.emit(_d.TilesLoadFinished),i}},{key:"getTile",value:function(i,o,a){var u=this.getTileId(i,o,a),c=this.cacheTiles.get(u);return c}},{key:"createTile",value:function(i,o,a){var u=this.getTileId(i,o,a),c=new ete({x:i,y:o,z:a,tileSize:this.options.tileSize,warp:this.options.warp});return this.cacheTiles.set(u,c),c.loadData({getData:this.options.getTileData,onLoad:this.onTileLoad,onError:this.onTileError}),c}},{key:"resizeCacheTiles",value:function(){var i=Xee*this.currentTiles.length,o=this.cacheTiles.size>i;if(o){var a=Wh(this.cacheTiles),u;try{for(a.s();!(u=a.n()).done;){var c=Nn(u.value,2),f=c[0],m=c[1];if(!m.isVisible&&!this.currentTiles.includes(m)&&(this.cacheTiles.delete(f),this.onTileUnload(m)),this.cacheTiles.size<=i)break}}catch(_){a.e(_)}finally{a.f()}}this.rebuildTileTree()}},{key:"rebuildTileTree",value:function(){var i=Wh(this.cacheTiles.values()),o;try{for(i.s();!(o=i.n()).done;){var a=o.value;a.parent=null,a.children.length=0}}catch(_){i.e(_)}finally{i.f()}var u=Wh(this.cacheTiles.values()),c;try{for(u.s();!(c=u.n()).done;){var f=c.value,m=this.getNearestAncestor(f.x,f.y,f.z);f.parent=m,m!=null&&m.children&&m.children.push(f)}}catch(_){u.e(_)}finally{u.f()}}},{key:"getNearestAncestor",value:function(i,o,a){for(;a>this.options.minZoom;){i=Math.floor(i/2),o=Math.floor(o/2),a=a-1;var u=this.getTile(i,o,a);if(u)return u}return null}}]),r}(D5);function cM(e){var t=[],r=/\{([a-z])-([a-z])\}/.exec(e);if(r){var n=r[1].charCodeAt(0),i=r[2].charCodeAt(0),o;for(o=n;o<=i;++o)t.push(e.replace(r[0],String.fromCharCode(o)));return t}if(r=/\{(\d+)-(\d+)\}/.exec(e),r){for(var a=parseInt(r[2],10),u=parseInt(r[1],10);u<=a;u++)t.push(e.replace(r[0],u.toString()));return t}return t.push(e),t}function Kd(e,t){if(!e||!e.length)throw new Error("url is not allowed to be empty");var r=t.x,n=t.y,i=t.z,o=cM(e),a=Math.abs(r+n)%o.length,u=h5(o[a])?"".concat(o[a],"/{z}/{x}/{y}"):o[a];return u.replace(/\{x\}/g,r.toString()).replace(/\{y\}/g,n.toString()).replace(/\{z\}/g,i.toString()).replace(/\{bbox\}/g,lM(r,n,i).join(",")).replace(/\{-y\}/g,(Math.pow(2,i)-n-1).toString())}function ute(e,t){var r=t.x,n=t.y,i=t.z,o=t.layer,a=t.version,u=a===void 0?"1.0.0":a,c=t.style,f=c===void 0?"default":c,m=t.format,_=t.service,b=_===void 0?"WMTS":_,A=t.tileMatrixset,w=cM(e),R=Math.abs(r+n)%w.length,P="".concat(w[R],"&SERVICE=").concat(b,"&REQUEST=GetTile&VERSION=").concat(u,"&LAYER=").concat(o,"&STYLE=").concat(f,"&TILEMATRIXSET=").concat(A,"&FORMAT=").concat(m,"&TILECOL=").concat(r,"&TILEROW=").concat(n,"&TILEMATRIX=").concat(i);return P}function G6(e,t){if(!e)throw new Error(t||"web worker helper assertion failed.")}var T3=new Map;function lte(e){G6(e.source&&!e.url||!e.source&&e.url);var t=T3.get(e.source||e.url);return t||(e.url&&(t=cte(e.url),T3.set(e.url,t)),e.source&&(t=fM(e.source),T3.set(e.source,t))),G6(t),t}function cte(e){if(!e.startsWith("http"))return e;var t=fte(e);return fM(t)}function fM(e){var t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function fte(e){return`try { importScripts('`+e+`'); } catch (error) { console.error(error); throw error; }`}function B5(e,t,r){t===void 0&&(t=!0);var n=r||new Set;if(e){if(d4(e))n.add(e);else if(d4(e.buffer))n.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(t&&typeof e=="object")for(var i in e)B5(e[i],t,n)}}return r===void 0?Array.from(n):[]}function d4(e){return e?e instanceof ArrayBuffer||typeof MessagePort<"u"&&e instanceof MessagePort||typeof ImageBitmap<"u"&&e instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas:!1}var w3=function(){};(function(){function e(t){this.terminated=!1,this.loadableURL="";var r=t.name,n=t.source,i=t.url;G6(n||i),this.name=r,this.source=n,this.url=i,this.onMessage=w3,this.onError=function(o){return console.log(o)},this.worker=this.createBrowserWorker()}return e.isSupported=function(){return typeof Worker<"u"},e.prototype.destroy=function(){this.onMessage=w3,this.onError=w3,this.worker.terminate(),this.terminated=!0},Object.defineProperty(e.prototype,"isRunning",{get:function(){return!!this.onMessage},enumerable:!1,configurable:!0}),e.prototype.postMessage=function(t,r){r=r||B5(t),this.worker.postMessage(t,r)},e.prototype.getErrorFromErrorEvent=function(t){var r="Failed to load ";return r+="worker "+this.name+" from "+this.url+". ",t.message&&(r+=t.message+" in "),t.lineno&&(r+=":"+t.lineno+":"+t.colno),new Error(r)},e.prototype.createBrowserWorker=function(){var t=this;this.loadableURL=lte({source:this.source,url:this.url});var r=new Worker(this.loadableURL,{name:this.name});return r.onmessage=function(n){n.data?t.onMessage(n.data):t.onError(new Error("No data received"))},r.onerror=function(n){t.onError(t.getErrorFromErrorEvent(n)),t.terminated=!0},r.onmessageerror=function(n){return console.error("worker "+t.name+", message error: "+n)},r},e})();var C3=new Map;(function(){function e(){}return Object.defineProperty(e,"onmessage",{set:function(t){self.onmessage=function(r){if(v4(r)){var n=r.data,i=n.type,o=n.payload;t(i,o)}}},enumerable:!1,configurable:!0}),e.addEventListener=function(t){var r=C3.get(t);r||(r=function(n){if(v4(n)){var i=n.data,o=i.type,a=i.payload;t(o,a)}}),self.addEventListener("message",r)},e.removeEventListener=function(t){var r=C3.get(t);C3.delete(t),self.removeEventListener("message",r)},e.postMessage=function(t,r){if(self){var n={source:"Worker thread",type:t,payload:r},i=B5(r);self.postMessage(n,i)}},e})();function v4(e){var t=e.type,r=e.data;return t==="message"&&r&&typeof r.source=="string"&&r.source==="Main thread"}function L5(e){var t=e.color;return!t||!t.length?[1,1,1,1]:t}function N5(e,t,r){return r.length===2?[r[0],r[1],0]:[r[0],r[1],r[2]]}function U5(e){var t=e.filter;return t?[1]:[0]}function z5(e,t){return[t]}var $5={exports:{}};$5.exports=ay;$5.exports.default=ay;function ay(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,o=hM(e,0,i,r,!0),a=[];if(!o||o.next===o.prev)return a;var u,c,f,m,_,b,A;if(n&&(o=mte(e,t,o,r)),e.length>80*r){u=f=e[0],c=m=e[1];for(var w=r;wf&&(f=_),b>m&&(m=b);A=Math.max(f-u,m-c),A=A!==0?32767/A:0}return ym(o,a,r,u,c,A,0),a}function hM(e,t,r,n,i){var o,a;if(i===Y6(e,t,r,n)>0)for(o=t;o=t;o-=n)a=m4(o,e[o],e[o+1],a);return a&&oy(a,a.next)&&(bm(a),a=a.next),a}function E1(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(oy(r,r.next)||So(r.prev,r,r.next)===0)){if(bm(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function ym(e,t,r,n,i,o,a){if(e){!a&&o&&bte(e,n,i,o);for(var u=e,c,f;e.prev!==e.next;){if(c=e.prev,f=e.next,o?pte(e,n,i,o):hte(e)){t.push(c.i/r|0),t.push(e.i/r|0),t.push(f.i/r|0),bm(e),e=f.next,u=f.next;continue}if(e=f,e===u){a?a===1?(e=dte(E1(e),t,r),ym(e,t,r,n,i,o,2)):a===2&&vte(e,t,r,n,i,o):ym(E1(e),t,r,n,i,o,1);break}}}}function hte(e){var t=e.prev,r=e,n=e.next;if(So(t,r,n)>=0)return!1;for(var i=t.x,o=r.x,a=n.x,u=t.y,c=r.y,f=n.y,m=io?i>a?i:a:o>a?o:a,A=u>c?u>f?u:f:c>f?c:f,w=n.next;w!==t;){if(w.x>=m&&w.x<=b&&w.y>=_&&w.y<=A&&Ud(i,u,o,c,a,f,w.x,w.y)&&So(w.prev,w,w.next)>=0)return!1;w=w.next}return!0}function pte(e,t,r,n){var i=e.prev,o=e,a=e.next;if(So(i,o,a)>=0)return!1;for(var u=i.x,c=o.x,f=a.x,m=i.y,_=o.y,b=a.y,A=uc?u>f?u:f:c>f?c:f,P=m>_?m>b?m:b:_>b?_:b,k=W6(A,w,t,r,n),L=W6(R,P,t,r,n),B=e.prevZ,V=e.nextZ;B&&B.z>=k&&V&&V.z<=L;){if(B.x>=A&&B.x<=R&&B.y>=w&&B.y<=P&&B!==i&&B!==a&&Ud(u,m,c,_,f,b,B.x,B.y)&&So(B.prev,B,B.next)>=0||(B=B.prevZ,V.x>=A&&V.x<=R&&V.y>=w&&V.y<=P&&V!==i&&V!==a&&Ud(u,m,c,_,f,b,V.x,V.y)&&So(V.prev,V,V.next)>=0))return!1;V=V.nextZ}for(;B&&B.z>=k;){if(B.x>=A&&B.x<=R&&B.y>=w&&B.y<=P&&B!==i&&B!==a&&Ud(u,m,c,_,f,b,B.x,B.y)&&So(B.prev,B,B.next)>=0)return!1;B=B.prevZ}for(;V&&V.z<=L;){if(V.x>=A&&V.x<=R&&V.y>=w&&V.y<=P&&V!==i&&V!==a&&Ud(u,m,c,_,f,b,V.x,V.y)&&So(V.prev,V,V.next)>=0)return!1;V=V.nextZ}return!0}function dte(e,t,r){var n=e;do{var i=n.prev,o=n.next.next;!oy(i,o)&&pM(i,n,n.next,o)&&xm(i,o)&&xm(o,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(o.i/r|0),bm(n),bm(n.next),n=e=o),n=n.next}while(n!==e);return E1(n)}function vte(e,t,r,n,i,o){var a=e;do{for(var u=a.next.next;u!==a.prev;){if(a.i!==u.i&&Ate(a,u)){var c=dM(a,u);a=E1(a,a.next),c=E1(c,c.next),ym(a,t,r,n,i,o,0),ym(c,t,r,n,i,o,0);return}u=u.next}a=a.next}while(a!==e)}function mte(e,t,r,n){var i=[],o,a,u,c,f;for(o=0,a=t.length;o=r.next.y&&r.next.y!==r.y){var u=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(u<=n&&u>o&&(o=u,a=r.x=r.x&&r.x>=f&&n!==r.x&&Ud(ia.x||r.x===a.x&&xte(a,r)))&&(a=r,_=b)),r=r.next;while(r!==c);return a}function xte(e,t){return So(e.prev,e,t.prev)<0&&So(t.next,e,e.next)<0}function bte(e,t,r,n){var i=e;do i.z===0&&(i.z=W6(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,Ete(i)}function Ete(e){var t,r,n,i,o,a,u,c,f=1;do{for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,u=0,t=0;t0||c>0&&n;)u!==0&&(c===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,u--):(i=n,n=n.nextZ,c--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}o.nextZ=null,f*=2}while(a>1);return e}function W6(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function Ste(e){var t=e,r=e;do(t.x=(e-a)*(o-u)&&(e-a)*(n-u)>=(r-a)*(t-u)&&(r-a)*(o-u)>=(i-a)*(n-u)}function Ate(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!Tte(e,t)&&(xm(e,t)&&xm(t,e)&&wte(e,t)&&(So(e.prev,e,t.prev)||So(e,t.prev,t))||oy(e,t)&&So(e.prev,e,e.next)>0&&So(t.prev,t,t.next)>0)}function So(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function oy(e,t){return e.x===t.x&&e.y===t.y}function pM(e,t,r,n){var i=W2(So(e,t,r)),o=W2(So(e,t,n)),a=W2(So(r,n,e)),u=W2(So(r,n,t));return!!(i!==o&&a!==u||i===0&&G2(e,r,t)||o===0&&G2(e,n,t)||a===0&&G2(r,e,n)||u===0&&G2(r,t,n))}function G2(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function W2(e){return e>0?1:e<0?-1:0}function Tte(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&pM(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function xm(e,t){return So(e.prev,e,e.next)<0?So(e,t,e.next)>=0&&So(e,e.prev,t)>=0:So(e,t,e.prev)<0||So(e,e.next,t)<0}function wte(e,t){var r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function dM(e,t){var r=new X6(e.i,e.x,e.y),n=new X6(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function m4(e,t,r,n){var i=new X6(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function bm(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function X6(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}ay.deviation=function(e,t,r,n){var i=t&&t.length,o=i?t[0]*r:e.length,a=Math.abs(Y6(e,0,o,r));if(i)for(var u=0,c=t.length;u0&&(n+=e[i-1].length,r.holes.push(n))}return r};var Cte=$5.exports;const mf=oa(Cte);var po=1e-6,au=typeof Float32Array<"u"?Float32Array:Array,g4=Math.random;Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});function v1(){var e=new au(16);return au!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function Rte(e){var t=new au(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Ite(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function vM(e,t,r,n,i,o,a,u,c,f,m,_,b,A,w,R){var P=new au(16);return P[0]=e,P[1]=t,P[2]=r,P[3]=n,P[4]=i,P[5]=o,P[6]=a,P[7]=u,P[8]=c,P[9]=f,P[10]=m,P[11]=_,P[12]=b,P[13]=A,P[14]=w,P[15]=R,P}function Mte(e,t,r,n,i,o,a,u,c,f,m,_,b,A,w,R,P){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=o,e[5]=a,e[6]=u,e[7]=c,e[8]=f,e[9]=m,e[10]=_,e[11]=b,e[12]=A,e[13]=w,e[14]=R,e[15]=P,e}function mM(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Pte(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],o=t[6],a=t[7],u=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=o,e[11]=t[14],e[12]=i,e[13]=a,e[14]=u}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function V5(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],u=t[5],c=t[6],f=t[7],m=t[8],_=t[9],b=t[10],A=t[11],w=t[12],R=t[13],P=t[14],k=t[15],L=r*u-n*a,B=r*c-i*a,V=r*f-o*a,G=n*c-i*u,K=n*f-o*u,Z=i*f-o*c,ve=m*R-_*w,Ie=m*P-b*w,de=m*k-A*w,se=_*P-b*R,le=_*k-A*R,ye=b*k-A*P,ke=L*ye-B*le+V*se+G*de-K*Ie+Z*ve;return ke?(ke=1/ke,e[0]=(u*ye-c*le+f*se)*ke,e[1]=(i*le-n*ye-o*se)*ke,e[2]=(R*Z-P*K+k*G)*ke,e[3]=(b*K-_*Z-A*G)*ke,e[4]=(c*de-a*ye-f*Ie)*ke,e[5]=(r*ye-i*de+o*Ie)*ke,e[6]=(P*V-w*Z-k*B)*ke,e[7]=(m*Z-b*V+A*B)*ke,e[8]=(a*le-u*de+f*ve)*ke,e[9]=(n*de-r*le-o*ve)*ke,e[10]=(w*K-R*V+k*L)*ke,e[11]=(_*V-m*K-A*L)*ke,e[12]=(u*Ie-a*se-c*ve)*ke,e[13]=(r*se-n*Ie+i*ve)*ke,e[14]=(R*B-w*G-P*L)*ke,e[15]=(m*G-_*B+b*L)*ke,e):null}function Ote(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],u=t[5],c=t[6],f=t[7],m=t[8],_=t[9],b=t[10],A=t[11],w=t[12],R=t[13],P=t[14],k=t[15];return e[0]=u*(b*k-A*P)-_*(c*k-f*P)+R*(c*A-f*b),e[1]=-(n*(b*k-A*P)-_*(i*k-o*P)+R*(i*A-o*b)),e[2]=n*(c*k-f*P)-u*(i*k-o*P)+R*(i*f-o*c),e[3]=-(n*(c*A-f*b)-u*(i*A-o*b)+_*(i*f-o*c)),e[4]=-(a*(b*k-A*P)-m*(c*k-f*P)+w*(c*A-f*b)),e[5]=r*(b*k-A*P)-m*(i*k-o*P)+w*(i*A-o*b),e[6]=-(r*(c*k-f*P)-a*(i*k-o*P)+w*(i*f-o*c)),e[7]=r*(c*A-f*b)-a*(i*A-o*b)+m*(i*f-o*c),e[8]=a*(_*k-A*R)-m*(u*k-f*R)+w*(u*A-f*_),e[9]=-(r*(_*k-A*R)-m*(n*k-o*R)+w*(n*A-o*_)),e[10]=r*(u*k-f*R)-a*(n*k-o*R)+w*(n*f-o*u),e[11]=-(r*(u*A-f*_)-a*(n*A-o*_)+m*(n*f-o*u)),e[12]=-(a*(_*P-b*R)-m*(u*P-c*R)+w*(u*b-c*_)),e[13]=r*(_*P-b*R)-m*(n*P-i*R)+w*(n*b-i*_),e[14]=-(r*(u*P-c*R)-a*(n*P-i*R)+w*(n*c-i*u)),e[15]=r*(u*b-c*_)-a*(n*b-i*_)+m*(n*c-i*u),e}function kte(e){var t=e[0],r=e[1],n=e[2],i=e[3],o=e[4],a=e[5],u=e[6],c=e[7],f=e[8],m=e[9],_=e[10],b=e[11],A=e[12],w=e[13],R=e[14],P=e[15],k=t*a-r*o,L=t*u-n*o,B=t*c-i*o,V=r*u-n*a,G=r*c-i*a,K=n*c-i*u,Z=f*w-m*A,ve=f*R-_*A,Ie=f*P-b*A,de=m*R-_*w,se=m*P-b*w,le=_*P-b*R;return k*le-L*se+B*de+V*Ie-G*ve+K*Z}function pf(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],u=t[4],c=t[5],f=t[6],m=t[7],_=t[8],b=t[9],A=t[10],w=t[11],R=t[12],P=t[13],k=t[14],L=t[15],B=r[0],V=r[1],G=r[2],K=r[3];return e[0]=B*n+V*u+G*_+K*R,e[1]=B*i+V*c+G*b+K*P,e[2]=B*o+V*f+G*A+K*k,e[3]=B*a+V*m+G*w+K*L,B=r[4],V=r[5],G=r[6],K=r[7],e[4]=B*n+V*u+G*_+K*R,e[5]=B*i+V*c+G*b+K*P,e[6]=B*o+V*f+G*A+K*k,e[7]=B*a+V*m+G*w+K*L,B=r[8],V=r[9],G=r[10],K=r[11],e[8]=B*n+V*u+G*_+K*R,e[9]=B*i+V*c+G*b+K*P,e[10]=B*o+V*f+G*A+K*k,e[11]=B*a+V*m+G*w+K*L,B=r[12],V=r[13],G=r[14],K=r[15],e[12]=B*n+V*u+G*_+K*R,e[13]=B*i+V*c+G*b+K*P,e[14]=B*o+V*f+G*A+K*k,e[15]=B*a+V*m+G*w+K*L,e}function Em(e,t,r){var n=r[0],i=r[1],o=r[2],a,u,c,f,m,_,b,A,w,R,P,k;return t===e?(e[12]=t[0]*n+t[4]*i+t[8]*o+t[12],e[13]=t[1]*n+t[5]*i+t[9]*o+t[13],e[14]=t[2]*n+t[6]*i+t[10]*o+t[14],e[15]=t[3]*n+t[7]*i+t[11]*o+t[15]):(a=t[0],u=t[1],c=t[2],f=t[3],m=t[4],_=t[5],b=t[6],A=t[7],w=t[8],R=t[9],P=t[10],k=t[11],e[0]=a,e[1]=u,e[2]=c,e[3]=f,e[4]=m,e[5]=_,e[6]=b,e[7]=A,e[8]=w,e[9]=R,e[10]=P,e[11]=k,e[12]=a*n+m*i+w*o+t[12],e[13]=u*n+_*i+R*o+t[13],e[14]=c*n+b*i+P*o+t[14],e[15]=f*n+A*i+k*o+t[15]),e}function Sm(e,t,r){var n=r[0],i=r[1],o=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Dte(e,t,r,n){var i=n[0],o=n[1],a=n[2],u=Math.hypot(i,o,a),c,f,m,_,b,A,w,R,P,k,L,B,V,G,K,Z,ve,Ie,de,se,le,ye,ke,Rt;return u0?(r[0]=(u*a+m*n+c*o-f*i)*2/_,r[1]=(c*a+m*i+f*n-u*o)*2/_,r[2]=(f*a+m*o+u*i-c*n)*2/_):(r[0]=(u*a+m*n+c*o-f*i)*2,r[1]=(c*a+m*i+f*n-u*o)*2,r[2]=(f*a+m*o+u*i-c*n)*2),_M(e,t,r),e}function $te(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function yM(e,t){var r=t[0],n=t[1],i=t[2],o=t[4],a=t[5],u=t[6],c=t[8],f=t[9],m=t[10];return e[0]=Math.hypot(r,n,i),e[1]=Math.hypot(o,a,u),e[2]=Math.hypot(c,f,m),e}function Vte(e,t){var r=new au(3);yM(r,t);var n=1/r[0],i=1/r[1],o=1/r[2],a=t[0]*n,u=t[1]*i,c=t[2]*o,f=t[4]*n,m=t[5]*i,_=t[6]*o,b=t[8]*n,A=t[9]*i,w=t[10]*o,R=a+m+w,P=0;return R>0?(P=Math.sqrt(R+1)*2,e[3]=.25*P,e[0]=(_-A)/P,e[1]=(b-c)/P,e[2]=(u-f)/P):a>m&&a>w?(P=Math.sqrt(1+a-m-w)*2,e[3]=(_-A)/P,e[0]=.25*P,e[1]=(u+f)/P,e[2]=(b+c)/P):m>w?(P=Math.sqrt(1+m-a-w)*2,e[3]=(b-c)/P,e[0]=(u+f)/P,e[1]=.25*P,e[2]=(_+A)/P):(P=Math.sqrt(1+w-a-m)*2,e[3]=(u-f)/P,e[0]=(b+c)/P,e[1]=(_+A)/P,e[2]=.25*P),e}function jte(e,t,r,n){var i=t[0],o=t[1],a=t[2],u=t[3],c=i+i,f=o+o,m=a+a,_=i*c,b=i*f,A=i*m,w=o*f,R=o*m,P=a*m,k=u*c,L=u*f,B=u*m,V=n[0],G=n[1],K=n[2];return e[0]=(1-(w+P))*V,e[1]=(b+B)*V,e[2]=(A-L)*V,e[3]=0,e[4]=(b-B)*G,e[5]=(1-(_+P))*G,e[6]=(R+k)*G,e[7]=0,e[8]=(A+L)*K,e[9]=(R-k)*K,e[10]=(1-(_+w))*K,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function Hte(e,t,r,n,i){var o=t[0],a=t[1],u=t[2],c=t[3],f=o+o,m=a+a,_=u+u,b=o*f,A=o*m,w=o*_,R=a*m,P=a*_,k=u*_,L=c*f,B=c*m,V=c*_,G=n[0],K=n[1],Z=n[2],ve=i[0],Ie=i[1],de=i[2],se=(1-(R+k))*G,le=(A+V)*G,ye=(w-B)*G,ke=(A-V)*K,Rt=(1-(b+k))*K,Lt=(P+L)*K,Gt=(w+B)*Z,Zt=(P-L)*Z,st=(1-(b+R))*Z;return e[0]=se,e[1]=le,e[2]=ye,e[3]=0,e[4]=ke,e[5]=Rt,e[6]=Lt,e[7]=0,e[8]=Gt,e[9]=Zt,e[10]=st,e[11]=0,e[12]=r[0]+ve-(se*ve+ke*Ie+Gt*de),e[13]=r[1]+Ie-(le*ve+Rt*Ie+Zt*de),e[14]=r[2]+de-(ye*ve+Lt*Ie+st*de),e[15]=1,e}function Gte(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=r+r,u=n+n,c=i+i,f=r*a,m=n*a,_=n*u,b=i*a,A=i*u,w=i*c,R=o*a,P=o*u,k=o*c;return e[0]=1-_-w,e[1]=m+k,e[2]=b-P,e[3]=0,e[4]=m-k,e[5]=1-f-w,e[6]=A+R,e[7]=0,e[8]=b+P,e[9]=A-R,e[10]=1-f-_,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Wte(e,t,r,n,i,o,a){var u=1/(r-t),c=1/(i-n),f=1/(o-a);return e[0]=o*2*u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o*2*c,e[6]=0,e[7]=0,e[8]=(r+t)*u,e[9]=(i+n)*c,e[10]=(a+o)*f,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*o*2*f,e[15]=0,e}function xM(e,t,r,n,i){var o=1/Math.tan(t/2),a;return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,i!=null&&i!==1/0?(a=1/(n-i),e[10]=(i+n)*a,e[14]=2*i*n*a):(e[10]=-1,e[14]=-2*n),e}var bM=xM;function Xte(e,t,r,n,i){var o=1/Math.tan(t/2),a;return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,i!=null&&i!==1/0?(a=1/(n-i),e[10]=i*a,e[14]=i*n*a):(e[10]=-1,e[14]=-n),e}function Yte(e,t,r,n){var i=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),u=Math.tan(t.rightDegrees*Math.PI/180),c=2/(a+u),f=2/(i+o);return e[0]=c,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=f,e[6]=0,e[7]=0,e[8]=-((a-u)*c*.5),e[9]=(i-o)*f*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}function EM(e,t,r,n,i,o,a){var u=1/(t-r),c=1/(n-i),f=1/(o-a);return e[0]=-2*u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*f,e[11]=0,e[12]=(t+r)*u,e[13]=(i+n)*c,e[14]=(a+o)*f,e[15]=1,e}var Zte=EM;function qte(e,t,r,n,i,o,a){var u=1/(t-r),c=1/(n-i),f=1/(o-a);return e[0]=-2*u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=f,e[11]=0,e[12]=(t+r)*u,e[13]=(i+n)*c,e[14]=o*f,e[15]=1,e}function Kte(e,t,r,n){var i,o,a,u,c,f,m,_,b,A,w=t[0],R=t[1],P=t[2],k=n[0],L=n[1],B=n[2],V=r[0],G=r[1],K=r[2];return Math.abs(w-V)0&&(A=1/Math.sqrt(A),m*=A,_*=A,b*=A);var w=c*b-f*_,R=f*m-u*b,P=u*_-c*m;return A=w*w+R*R+P*P,A>0&&(A=1/Math.sqrt(A),w*=A,R*=A,P*=A),e[0]=w,e[1]=R,e[2]=P,e[3]=0,e[4]=_*P-b*R,e[5]=b*w-m*P,e[6]=m*R-_*w,e[7]=0,e[8]=m,e[9]=_,e[10]=b,e[11]=0,e[12]=i,e[13]=o,e[14]=a,e[15]=1,e}function Jte(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function ere(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function tre(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e}function SM(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}function rre(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e}function nre(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e[9]=t[9]+r[9]*n,e[10]=t[10]+r[10]*n,e[11]=t[11]+r[11]*n,e[12]=t[12]+r[12]*n,e[13]=t[13]+r[13]*n,e[14]=t[14]+r[14]*n,e[15]=t[15]+r[15]*n,e}function ire(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function Z6(e,t){var r=e[0],n=e[1],i=e[2],o=e[3],a=e[4],u=e[5],c=e[6],f=e[7],m=e[8],_=e[9],b=e[10],A=e[11],w=e[12],R=e[13],P=e[14],k=e[15],L=t[0],B=t[1],V=t[2],G=t[3],K=t[4],Z=t[5],ve=t[6],Ie=t[7],de=t[8],se=t[9],le=t[10],ye=t[11],ke=t[12],Rt=t[13],Lt=t[14],Gt=t[15];return Math.abs(r-L)<=po*Math.max(1,Math.abs(r),Math.abs(L))&&Math.abs(n-B)<=po*Math.max(1,Math.abs(n),Math.abs(B))&&Math.abs(i-V)<=po*Math.max(1,Math.abs(i),Math.abs(V))&&Math.abs(o-G)<=po*Math.max(1,Math.abs(o),Math.abs(G))&&Math.abs(a-K)<=po*Math.max(1,Math.abs(a),Math.abs(K))&&Math.abs(u-Z)<=po*Math.max(1,Math.abs(u),Math.abs(Z))&&Math.abs(c-ve)<=po*Math.max(1,Math.abs(c),Math.abs(ve))&&Math.abs(f-Ie)<=po*Math.max(1,Math.abs(f),Math.abs(Ie))&&Math.abs(m-de)<=po*Math.max(1,Math.abs(m),Math.abs(de))&&Math.abs(_-se)<=po*Math.max(1,Math.abs(_),Math.abs(se))&&Math.abs(b-le)<=po*Math.max(1,Math.abs(b),Math.abs(le))&&Math.abs(A-ye)<=po*Math.max(1,Math.abs(A),Math.abs(ye))&&Math.abs(w-ke)<=po*Math.max(1,Math.abs(w),Math.abs(ke))&&Math.abs(R-Rt)<=po*Math.max(1,Math.abs(R),Math.abs(Rt))&&Math.abs(P-Lt)<=po*Math.max(1,Math.abs(P),Math.abs(Lt))&&Math.abs(k-Gt)<=po*Math.max(1,Math.abs(k),Math.abs(Gt))}var are=pf,ore=SM;const sre=Object.freeze(Object.defineProperty({__proto__:null,add:tre,adjoint:Ote,clone:Rte,copy:Ite,create:v1,determinant:kte,equals:Z6,exactEquals:ire,frob:ere,fromQuat:Gte,fromQuat2:zte,fromRotation:Bte,fromRotationTranslation:_M,fromRotationTranslationScale:jte,fromRotationTranslationScaleOrigin:Hte,fromScaling:Fte,fromTranslation:gM,fromValues:vM,fromXRotation:Lte,fromYRotation:Nte,fromZRotation:Ute,frustum:Wte,getRotation:Vte,getScaling:yM,getTranslation:$te,identity:mM,invert:V5,lookAt:Kte,mul:are,multiply:pf,multiplyScalar:rre,multiplyScalarAndAdd:nre,ortho:Zte,orthoNO:EM,orthoZO:qte,perspective:bM,perspectiveFromFieldOfView:Yte,perspectiveNO:xM,perspectiveZO:Xte,rotate:Dte,rotateX:sy,rotateY:j5,rotateZ:H5,scale:Sm,set:Mte,str:Jte,sub:ore,subtract:SM,targetTo:Qte,translate:Em,transpose:Pte},Symbol.toStringTag,{value:"Module"}));function zd(){var e=new au(3);return au!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function ure(e){var t=new au(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function AM(e){var t=e[0],r=e[1],n=e[2];return Math.hypot(t,r,n)}function Gl(e,t,r){var n=new au(3);return n[0]=e,n[1]=t,n[2]=r,n}function lre(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function cre(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}function fre(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function TM(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function wM(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function CM(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function hre(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}function pre(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}function dre(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function vre(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function mre(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}function gre(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function _re(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}function RM(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.hypot(r,n,i)}function IM(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}function MM(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function PM(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function yre(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function $d(e,t){var r=t[0],n=t[1],i=t[2],o=r*r+n*n+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function OM(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function kM(e,t,r){var n=t[0],i=t[1],o=t[2],a=r[0],u=r[1],c=r[2];return e[0]=i*c-o*u,e[1]=o*a-n*c,e[2]=n*u-i*a,e}function xre(e,t,r,n){var i=t[0],o=t[1],a=t[2];return e[0]=i+n*(r[0]-i),e[1]=o+n*(r[1]-o),e[2]=a+n*(r[2]-a),e}function bre(e,t,r,n,i,o){var a=o*o,u=a*(2*o-3)+1,c=a*(o-2)+o,f=a*(o-1),m=a*(3-2*o);return e[0]=t[0]*u+r[0]*c+n[0]*f+i[0]*m,e[1]=t[1]*u+r[1]*c+n[1]*f+i[1]*m,e[2]=t[2]*u+r[2]*c+n[2]*f+i[2]*m,e}function Ere(e,t,r,n,i,o){var a=1-o,u=a*a,c=o*o,f=u*a,m=3*o*u,_=3*c*a,b=c*o;return e[0]=t[0]*f+r[0]*m+n[0]*_+i[0]*b,e[1]=t[1]*f+r[1]*m+n[1]*_+i[1]*b,e[2]=t[2]*f+r[2]*m+n[2]*_+i[2]*b,e}function Sre(e,t){t=t||1;var r=g4()*2*Math.PI,n=g4()*2-1,i=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*i,e[1]=Math.sin(r)*i,e[2]=n*t,e}function Vv(e,t,r){var n=t[0],i=t[1],o=t[2],a=r[3]*n+r[7]*i+r[11]*o+r[15];return a=a||1,e[0]=(r[0]*n+r[4]*i+r[8]*o+r[12])/a,e[1]=(r[1]*n+r[5]*i+r[9]*o+r[13])/a,e[2]=(r[2]*n+r[6]*i+r[10]*o+r[14])/a,e}function Are(e,t,r){var n=t[0],i=t[1],o=t[2];return e[0]=n*r[0]+i*r[3]+o*r[6],e[1]=n*r[1]+i*r[4]+o*r[7],e[2]=n*r[2]+i*r[5]+o*r[8],e}function Tre(e,t,r){var n=r[0],i=r[1],o=r[2],a=r[3],u=t[0],c=t[1],f=t[2],m=i*f-o*c,_=o*u-n*f,b=n*c-i*u,A=i*b-o*_,w=o*m-n*b,R=n*_-i*m,P=a*2;return m*=P,_*=P,b*=P,A*=2,w*=2,R*=2,e[0]=u+m+A,e[1]=c+_+w,e[2]=f+b+R,e}function wre(e,t,r,n){var i=[],o=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],o[0]=i[0],o[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),o[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e}function Cre(e,t,r,n){var i=[],o=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],o[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),o[1]=i[1],o[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e}function Rre(e,t,r,n){var i=[],o=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],o[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),o[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),o[2]=i[2],e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e}function q6(e,t){var r=e[0],n=e[1],i=e[2],o=t[0],a=t[1],u=t[2],c=Math.sqrt(r*r+n*n+i*i),f=Math.sqrt(o*o+a*a+u*u),m=c*f,_=m&&OM(e,t)/m;return Math.acos(Math.min(Math.max(_,-1),1))}function Ire(e){return e[0]=0,e[1]=0,e[2]=0,e}function Mre(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function Pre(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Ore(e,t){var r=e[0],n=e[1],i=e[2],o=t[0],a=t[1],u=t[2];return Math.abs(r-o)<=po*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-a)<=po*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-u)<=po*Math.max(1,Math.abs(i),Math.abs(u))}var K6=TM,kre=wM,Dre=CM,Fre=RM,Bre=IM,Lre=AM,Nre=MM,Ure=function(){var e=zd();return function(t,r,n,i,o,a){var u,c;for(r||(r=3),n||(n=0),i?c=Math.min(i*r+n,t.length):c=t.length,u=n;u0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e}function mp(e,t){return e[0]*t[0]+e[1]*t[1]}function jre(e,t,r,n){var i=t[0],o=t[1];return e[0]=i+n*(r[0]-i),e[1]=o+n*(r[1]-o),e}var c0=b1;(function(){var e=Vi();return function(t,r,n,i,o,a){var u,c;for(r||(r=2),n||(n=0),i?c=Math.min(i*r+n,t.length):c=t.length,u=n;u0&&arguments[0]!==void 0?arguments[0]:{};Ht(this,e),F(this,"lastFlip",-1),F(this,"miter",l0(0,0)),F(this,"started",!1),F(this,"dash",!1),F(this,"totalDistance",0),F(this,"currentIndex",0),this.join=t.join||"miter",this.cap=t.cap||"butt",this.miterLimit=t.miterLimit||10,this.thickness=t.thickness||1,this.dash=t.dash||!1,this.complex={positions:[],indices:[],normals:[],startIndex:0,indexes:[]}}return jt(e,[{key:"extrude_gaode2",value:function(r,n){var i=this.complex;if(r.length<=1)return i;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var o=r.length,a=i.startIndex,u=1;uthis.miterLimit&&(le=!0)}le?(A.push(this.normal[0],this.normal[1],0),A.push(de[0],de[1],0),b.push(o[0],o[1],o[2]|0,this.totalDistance,-this.thickness*se,o[2]|0),this.complex.indexes.push(this.currentIndex),b.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness*se,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,_.push.apply(_,nr(this.lastFlip!==-se?[n,n+2,n+3]:[n+2,n+1,n+3])),_.push(n+2,n+3,n+4),Yh(X2,Xh),lf(this.normal,X2),A.push(this.normal[0],this.normal[1],0),b.push(o[0],o[1],o[2]|0,this.totalDistance,-this.thickness*se,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,m+=3):(this.extrusions(b,A,o,de,Ie,this.totalDistance),_.push.apply(_,nr(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),se=-1,lf(this.normal,de),m+=2),this.lastFlip=se}else{if(Yh(this.normal,Qo),w){var G=Vi(),K=Vi();c0(K,Qo,this.normal),Oo(G,Qo,this.normal),A.push(K[0],K[1],0),A.push(G[0],G[1],0),b.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),b.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(b,A,o,this.normal,this.thickness,this.totalDistance);_.push.apply(_,nr(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),m+=2}return m}},{key:"simpleSegment",value:function(r,n,i,o,a){var u=0,c=r.indices,f=r.positions,m=r.normals,_=ko([o[0],o[1]]),b=ko([i[0],i[1]]);xd(Qo,_,b);var A=0;if(this.dash&&(A=this.lineSegmentDistance(_,b),this.totalDistance+=A),this.normal||(this.normal=Vi(),Yh(this.normal,Qo)),this.started||(this.started=!0,this.extrusions(f,m,i,this.normal,this.thickness,this.totalDistance-A)),c.push(n+0,n+1,n+2),!a)Yh(this.normal,Qo),this.extrusions(f,m,o,this.normal,this.thickness,this.totalDistance),c.push.apply(c,nr(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),u+=2;else{var w=ko([a[0],a[1]]);M3(_,w)&&Oo(w,_,df(w,b1(w,_,b))),xd(Xh,w,_);var R=I3(yd,Vi(),Qo,Xh,this.thickness),P=Nn(R,2),k=P[0],L=P[1],B=mp(yd,this.normal)<0?-1:1;this.extrusions(f,m,o,L,k,this.totalDistance),c.push.apply(c,nr(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),B=-1,lf(this.normal,L),u+=2,this.lastFlip=B}return u}},{key:"segment",value:function(r,n,i,o,a){var u=0,c=r.indices,f=r.positions,m=r.normals,_=this.cap==="square",b=this.join==="bevel",A=ko([o[0],o[1]]),w=ko([i[0],i[1]]);xd(Qo,A,w);var R=0;if(this.dash&&(R=this.lineSegmentDistance(A,w),this.totalDistance+=R),this.normal||(this.normal=Vi(),Yh(this.normal,Qo)),!this.started)if(this.started=!0,_){var P=Vi(),k=Vi();Oo(P,this.normal,Qo),Oo(k,this.normal,Qo),m.push(k[0],k[1],0),m.push(P[0],P[1],0),f.push(i[0],i[1],i[2]|0,this.totalDistance-R,-this.thickness,i[2]|0),this.complex.indexes.push(this.currentIndex),f.push(i[0],i[1],i[2]|0,this.totalDistance-R,this.thickness,i[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(f,m,i,this.normal,this.thickness,this.totalDistance-R);if(c.push(n+0,n+1,n+2),a){var V=ko([a[0],a[1]]);M3(A,V)&&Oo(V,A,df(V,b1(V,A,w))),xd(Xh,V,A);var G=I3(yd,Vi(),Qo,Xh,this.thickness),K=Nn(G,2),Z=K[0],ve=K[1],Ie=mp(yd,this.normal)<0?-1:1,de=b;if(!de&&this.join==="miter"){var se=Z;se>this.miterLimit&&(de=!0)}de?(m.push(this.normal[0],this.normal[1],0),m.push(ve[0],ve[1],0),f.push(o[0],o[1],o[2]|0,this.totalDistance,-this.thickness*Ie,o[2]|0),this.complex.indexes.push(this.currentIndex),f.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness*Ie,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,c.push.apply(c,nr(this.lastFlip!==-Ie?[n,n+2,n+3]:[n+2,n+1,n+3])),c.push(n+2,n+3,n+4),Yh(X2,Xh),lf(this.normal,X2),m.push(this.normal[0],this.normal[1],0),f.push(o[0],o[1],o[2]|0,this.totalDistance,-this.thickness*Ie,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,u+=3):(this.extrusions(f,m,o,ve,Z,this.totalDistance),c.push.apply(c,nr(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),Ie=-1,lf(this.normal,ve),u+=2),this.lastFlip=Ie}else{if(Yh(this.normal,Qo),_){var L=Vi(),B=Vi();c0(B,Qo,this.normal),Oo(L,Qo,this.normal),m.push(B[0],B[1],0),m.push(L[0],L[1],0),f.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),f.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(f,m,o,this.normal,this.thickness,this.totalDistance);c.push.apply(c,nr(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),u+=2}return u}},{key:"extrusions",value:function(r,n,i,o,a,u){n.push(o[0],o[1],0),n.push(o[0],o[1],0),r.push(i[0],i[1],i[2]|0,u,-a,i[2]|0),this.complex.indexes.push(this.currentIndex),r.push(i[0],i[1],i[2]|0,u,a,i[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}},{key:"lineSegmentDistance",value:function(r,n){var i=n[0]-r[0],o=n[1]-r[1];return Math.sqrt(i*i+o*o)}}]),e}();function Q6(e){var t=e.coordinates,r=e.originCoordinates,n=e.version,i=new Hre({dash:!0,join:"bevel"});if(n==="GAODE2.x"){var o=t;Array.isArray(o[0][0])||(o=[t]);var a=r;Array.isArray(a[0][0])||(a=[r]);for(var u=0;u=Math.abs(u)?r-c+u:u-c+r,r=c}r+n>=0!=!!t&&e.reverse()}const qre=oa(Zre);function Kre(e,t){return e.map(function(r){return r[t]*1})}function LM(e){return Array.isArray(e)?e.length===0||typeof e[0]=="number":!1}function J6(e){var t=Object.isFrozen(e)?Ci.cloneDeep(e):e;return qre(t,!0),t}function NM(e,t){var r=t.x,n=t.y,i=t.x1,o=t.y1,a=t.coordinates,u=t.geometry,c=[];if(!Array.isArray(e))return{dataArray:[]};if(u)return e.filter(function(k){return k[u]&&k[u].type&&k[u].coordinates&&k[u].coordinates.length>0}).forEach(function(k,L){var B=J6(k[u]);IR(B,function(V){var G=CR(V),K=Qe(Qe({},k),{},{_id:L,coordinates:G});c.push(K)})}),{dataArray:c};for(var f=0;f>>0}function ene(e,t){return t===void 0?null:typeof(e.properties[t]*1)=="number"?e.properties[t]*1:e.properties&&e.properties[t]?Jre(e.properties[t]+"")%1000019:null}function tne(e,t){var r=[],n={};return e.features?(e.features=e.features.filter(function(i){var o=i.geometry;return i!=null&&o&&o.type&&o.coordinates&&o.coordinates.length>0}),e=J6(e),e.features.length===0?{dataArray:[],featureKeys:n}:(IR(e,function(i,o){var a=ene(i,t==null?void 0:t.featureId);a===null&&(a=o);var u=a,c=CR(i),f=Qe(Qe({},i.properties),{},{coordinates:c,_id:u});r.push(f)}),{dataArray:r,featureKeys:n})):(e.features=[],{dataArray:[]})}function ex(e,t,r,n){for(var i=n,o=r-t>>1,a=r-t,u,c=e[t],f=e[t+1],m=e[r],_=e[r+1],b=t+3;bi)u=b,i=A;else if(A===i){var w=Math.abs(b-o);wn&&(u-t>3&&ex(e,t,u,n),e[u+2]=i,r-u>3&&ex(e,u,r,n))}function rne(e,t,r,n,i,o){var a=i-r,u=o-n;if(a!==0||u!==0){var c=((e-r)*a+(t-n)*u)/(a*a+u*u);c>1?(r=i,n=o):c>0&&(r+=a*c,n+=u*c)}return a=e-r,u=t-n,a*a+u*u}function Am(e,t,r,n){var i={id:typeof e>"u"?null:e,type:t,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return nne(i),i}function nne(e){var t=e.geometry,r=e.type;if(r==="Point"||r==="MultiPoint"||r==="LineString")P3(e,t);else if(r==="Polygon"||r==="MultiLineString")for(var n=0;n0&&(n?a+=(i*f-c*o)/2:a+=Math.sqrt(Math.pow(c-i,2)+Math.pow(f-o,2))),i=c,o=f}var m=t.length-3;t[2]=1,ex(t,0,m,r),t[m+2]=1,t.size=Math.abs(a),t.start=0,t.end=t.size}function O3(e,t,r,n){for(var i=0;i1?1:r}function Jf(e,t,r,n,i,o,a,u){if(r/=t,n/=t,o>=r&&a=n)return null;for(var c=[],f=0;f=r&&w=n)continue;var R=[];if(b==="Point"||b==="MultiPoint")ane(_,R,r,n,i);else if(b==="LineString")$M(_,R,r,n,i,!1,u.lineMetrics);else if(b==="MultiLineString")k3(_,R,r,n,i,!1);else if(b==="Polygon")k3(_,R,r,n,i,!0);else if(b==="MultiPolygon")for(var P=0;P<_.length;P++){var k=[];k3(_[P],k,r,n,i,!0),k.length&&R.push(k)}if(R.length){if(u.lineMetrics&&b==="LineString"){for(P=0;P=r&&a<=n&&(t.push(e[o]),t.push(e[o+1]),t.push(e[o+2]))}}function $M(e,t,r,n,i,o,a){for(var u=b4(e),c=i===0?one:sne,f=e.start,m,_,b=0;br&&(_=c(u,A,w,P,k,r),a&&(u.start=f+m*_)):L>n?B=r&&(_=c(u,A,w,P,k,r),V=!0),B>n&&L<=n&&(_=c(u,A,w,P,k,n),V=!0),!o&&V&&(a&&(u.end=f+m*_),t.push(u),u=b4(e)),a&&(f+=m)}var G=e.length-3;A=e[G],w=e[G+1],R=e[G+2],L=i===0?A:w,L>=r&&L<=n&&D3(u,A,w,R),G=u.length-3,o&&G>=3&&(u[G]!==u[0]||u[G+1]!==u[1])&&D3(u,u[0],u[1],u[2]),u.length&&t.push(u)}function b4(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function k3(e,t,r,n,i,o){for(var a=0;aa.maxX&&(a.maxX=m),_>a.maxY&&(a.maxY=_)}return a}function cne(e,t,r,n){var i=t.geometry,o=t.type,a=[];if(o==="Point"||o==="MultiPoint")for(var u=0;u0&&t.size<(i?a:n)){r.numPoints+=t.length/3;return}for(var u=[],c=0;ca)&&(r.numSimplified++,u.push(t[c]),u.push(t[c+1])),r.numPoints++;i&&fne(u,o),e.push(u)}function fne(e,t){for(var r=0,n=0,i=e.length,o=i-2;n0===t)for(n=0,i=e.length;n24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=ine(e,t);this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),n=une(n,t),n.length&&this.splitTile(n,0,0,0),r&&(n.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)))}uy.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};uy.prototype.splitTile=function(e,t,r,n,i,o,a){for(var u=[e,t,r,n],c=this.options,f=c.debug;u.length;){n=u.pop(),r=u.pop(),t=u.pop(),e=u.pop();var m=1<1&&console.time("creation"),b=this.tiles[_]=lne(e,t,r,n,c),this.tileCoords.push({z:t,x:r,y:n}),f)){f>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,b.numFeatures,b.numPoints,b.numSimplified),console.timeEnd("creation"));var A="z"+t;this.stats[A]=(this.stats[A]||0)+1,this.total++}if(b.source=e,i){if(t===c.maxZoom||t===i)continue;var w=1<1&&console.time("clipping");var R=.5*c.buffer/c.extent,P=.5-R,k=.5+R,L=1+R,B,V,G,K,Z,ve;B=V=G=K=null,Z=Jf(e,m,r-R,r+k,0,b.minX,b.maxX,c),ve=Jf(e,m,r+P,r+L,0,b.minX,b.maxX,c),e=null,Z&&(B=Jf(Z,m,n-R,n+k,1,b.minY,b.maxY,c),V=Jf(Z,m,n+P,n+L,1,b.minY,b.maxY,c),Z=null),ve&&(G=Jf(ve,m,n-R,n+k,1,b.minY,b.maxY,c),K=Jf(ve,m,n+P,n+L,1,b.minY,b.maxY,c),ve=null),f>1&&console.timeEnd("clipping"),u.push(B||[],t+1,r*2,n*2),u.push(V||[],t+1,r*2,n*2+1),u.push(G||[],t+1,r*2+1,n*2),u.push(K||[],t+1,r*2+1,n*2+1)}}};uy.prototype.getTile=function(e,t,r){var n=this.options,i=n.extent,o=n.debug;if(e<0||e>24)return null;var a=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);for(var c=e,f=t,m=r,_;!_&&c>0;)c--,f=Math.floor(f/2),m=Math.floor(m/2),_=this.tiles[rx(c,f,m)];return!_||!_.source?null:(o>1&&console.log("found parent tile z%d-%d-%d",c,f,m),o>1&&console.time("drilling down"),this.splitTile(_.source,c,f,m,e,t,r),o>1&&console.timeEnd("drilling down"),this.tiles[u]?S4(this.tiles[u],i):null)};function rx(e,t,r){return((1<"u"?t:Qe(Qe({},t),e.geojsonvtOptions)}function bne(e,t){var r=xne(t),n=r.extent||4096,i=hne(e,r),o=function(c,f){return yne(f,i,c,n)},a=Qe(Qe(Qe({},dne),t),{},{getTileData:o});return{data:e,dataArray:[],tilesetOptions:a,isTile:!0}}function VM(e,t){var r=t.extent,n=r===void 0?[121.168,30.2828,121.384,30.4219]:r,i=t.requestParameters,o=i===void 0?{}:i,a=new Promise(function(c){e instanceof HTMLImageElement||See(e)?c([e]):Ene(e,o,function(f){c(f)})}),u={originData:e,images:a,_id:1,dataArray:[{_id:0,coordinates:[[n[0],n[1]],[n[2],n[3]]]}]};return u}function Ene(e,t,r){var n=[];if(typeof e=="string")O6(Qe(Qe({},t),{},{url:e}),function(a,u){u&&(n.push(u),r(n))});else{var i=e.length,o=0;e.forEach(function(a){O6(Qe(Qe({},t),{},{url:a}),function(u,c){o++,c&&n.push(c),o===i&&r(n)})})}return VM}var Sne=function(){var e=Mt(he.mark(function t(r,n,i,o){var a,u;return he.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return a={x:n.x,y:n.y,z:n.z},u=Kd(r,a),f.abrupt("return",new Promise(function(m){o?o(a,function(_,b){if(_||!b){var A={layers:{defaultLayer:{features:[]}}},w=new jv(A,n.x,n.y,n.z);m(w)}else{var R={layers:{defaultLayer:{features:b.features}}},P=new jv(R,n.x,n.y,n.z);m(P)}}):OL(Qe(Qe({},i),{},{url:u}),function(_,b){if(_||!b){var A={layers:{defaultLayer:{features:[]}}},w=new jv(A,n.x,n.y,n.z);m(w)}else{var R=JSON.parse(b),P={layers:{defaultLayer:{features:R}}},k=new jv(P,n.x,n.y,n.z);m(k)}})}));case 3:case"end":return f.stop()}},t)}));return function(r,n,i,o){return e.apply(this,arguments)}}();function Ane(e,t){var r=function(o,a){return Sne(e,a,t==null?void 0:t.requestParameters,t.getCustomData)},n=Qe(Qe({},t),{},{getTileData:r});return{dataArray:[],tilesetOptions:n,isTile:!0}}var Tne=Qd;function Qd(e,t){this.x=e,this.y=t}Qd.prototype={clone:function(){return new Qd(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},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(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),r=Math.sin(e),n=t*this.x-r*this.y,i=r*this.x+t*this.y;return this.x=n,this.y=i,this},_rotateAround:function(e,t){var r=Math.cos(e),n=Math.sin(e),i=t.x+r*(this.x-t.x)-n*(this.y-t.y),o=t.y+n*(this.x-t.x)+r*(this.y-t.y);return this.x=i,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}};Qd.convert=function(e){return e instanceof Qd?e:Array.isArray(e)?new Qd(e[0],e[1]):e};var wne=Tne,Cne=f0;function f0(e,t,r,n,i){this.properties={},this.extent=r,this.type=0,this._pbf=e,this._geometry=-1,this._keys=n,this._values=i,e.readFields(Rne,this,t)}function Rne(e,t,r){e==1?t.id=r.readVarint():e==2?Ine(r,t):e==3?t.type=r.readVarint():e==4&&(t._geometry=r.pos)}function Ine(e,t){for(var r=e.readVarint()+e.pos;e.pos>3}if(n--,r===1||r===2)i+=e.readSVarint(),o+=e.readSVarint(),r===1&&(u&&a.push(u),u=[]),u.push(new wne(i,o));else if(r===7)u&&u.push(u[0].clone());else throw new Error("unknown command "+r)}return u&&a.push(u),a};f0.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,i=0,o=0,a=1/0,u=-1/0,c=1/0,f=-1/0;e.pos>3}if(n--,r===1||r===2)i+=e.readSVarint(),o+=e.readSVarint(),iu&&(u=i),of&&(f=o);else if(r!==7)throw new Error("unknown command "+r)}return[a,c,u,f]};f0.prototype.toGeoJSON=function(e,t,r){var n=this.extent*Math.pow(2,r),i=this.extent*e,o=this.extent*t,a=this.loadGeometry(),u=f0.types[this.type],c,f;function m(A){for(var w=0;w>3;t=n===1?e.readString():n===2?e.readFloat():n===3?e.readDouble():n===4?e.readVarint64():n===5?e.readVarint():n===6?e.readSVarint():n===7?e.readBoolean():null}return t}jM.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new One(this._pbf,t,this.extent,this._keys,this._values)};var Bne=kne,Lne=Nne;function Nne(e,t){this.layers=e.readFields(Une,{},t)}function Une(e,t,r){if(e===3){var n=new Bne(r,r.readVarint()+r.pos);n.length&&(t[n.name]=n)}}var zne=Lne,W5={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */W5.read=function(e,t,r,n,i){var o,a,u=i*8-n-1,c=(1<>1,m=-7,_=r?i-1:0,b=r?-1:1,A=e[t+_];for(_+=b,o=A&(1<<-m)-1,A>>=-m,m+=u;m>0;o=o*256+e[t+_],_+=b,m-=8);for(a=o&(1<<-m)-1,o>>=-m,m+=n;m>0;a=a*256+e[t+_],_+=b,m-=8);if(o===0)o=1-f;else{if(o===c)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-f}return(A?-1:1)*a*Math.pow(2,o-n)};W5.write=function(e,t,r,n,i,o){var a,u,c,f=o*8-i-1,m=(1<>1,b=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=n?0:o-1,w=n?1:-1,R=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=m):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+_>=1?t+=b/c:t+=b*Math.pow(2,1-_),t*c>=2&&(a++,c/=2),a+_>=m?(u=0,a=m):a+_>=1?(u=(t*c-1)*Math.pow(2,i),a=a+_):(u=t*Math.pow(2,_-1)*Math.pow(2,i),a=0));i>=8;e[r+A]=u&255,A+=w,u/=256,i-=8);for(a=a<0;e[r+A]=a&255,A+=w,a/=256,f-=8);e[r+A-w]|=R*128};var $ne=ha,Y2=W5;function ha(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}ha.Varint=0;ha.Fixed64=1;ha.Bytes=2;ha.Fixed32=5;var nx=65536*65536,T4=1/nx,Vne=12,HM=typeof TextDecoder>"u"?null:new TextDecoder("utf8");ha.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos>3,o=this.pos;this.type=n&7,e(i,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=Z2(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=C4(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=Z2(this.buf,this.pos)+Z2(this.buf,this.pos+4)*nx;return this.pos+=8,e},readSFixed64:function(){var e=Z2(this.buf,this.pos)+C4(this.buf,this.pos+4)*nx;return this.pos+=8,e},readFloat:function(){var e=Y2.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=Y2.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t=this.buf,r,n;return n=t[this.pos++],r=n&127,n<128||(n=t[this.pos++],r|=(n&127)<<7,n<128)||(n=t[this.pos++],r|=(n&127)<<14,n<128)||(n=t[this.pos++],r|=(n&127)<<21,n<128)?r:(n=t[this.pos],r|=(n&15)<<28,jne(r,e,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2===1?(e+1)/-2:e/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=Vne&&HM?nie(this.buf,t,e):rie(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==ha.Bytes)return e.push(this.readVarint(t));var r=Yf(this);for(e=e||[];this.pos127;);else if(t===ha.Bytes)this.pos=this.readVarint()+this.pos;else if(t===ha.Fixed32)this.pos+=4;else if(t===ha.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+t)},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0){Hne(e,this);return}this.realloc(4),this.buf[this.pos++]=e&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127)))},writeSVarint:function(e){this.writeVarint(e<0?-e*2-1:e*2)},writeBoolean:function(e){this.writeVarint(!!e)},writeString:function(e){e=String(e),this.realloc(e.length*4),this.pos++;var t=this.pos;this.pos=iie(this.buf,e,this.pos);var r=this.pos-t;r>=128&&w4(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),Y2.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),Y2.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r=128&&w4(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,ha.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,Xne,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,Yne,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,Kne,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,Zne,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,qne,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,Qne,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,Jne,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,eie,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,tie,t)},writeBytesField:function(e,t){this.writeTag(e,ha.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,ha.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,ha.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,ha.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,ha.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,ha.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,ha.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,ha.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,ha.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,ha.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,!!t)}};function jne(e,t,r){var n=r.buf,i,o;if(o=n[r.pos++],i=(o&112)>>4,o<128||(o=n[r.pos++],i|=(o&127)<<3,o<128)||(o=n[r.pos++],i|=(o&127)<<10,o<128)||(o=n[r.pos++],i|=(o&127)<<17,o<128)||(o=n[r.pos++],i|=(o&127)<<24,o<128)||(o=n[r.pos++],i|=(o&1)<<31,o<128))return bd(e,i,t);throw new Error("Expected varint not more than 10 bytes")}function Yf(e){return e.type===ha.Bytes?e.readVarint()+e.pos:e.pos+1}function bd(e,t,r){return r?t*4294967296+(e>>>0):(t>>>0)*4294967296+(e>>>0)}function Hne(e,t){var r,n;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(r=~(-e%4294967296),n=~(-e/4294967296),r^4294967295?r=r+1|0:(r=0,n=n+1|0)),e>=18446744073709552e3||e<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),Gne(r,n,t),Wne(n,t)}function Gne(e,t,r){r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos]=e&127}function Wne(e,t){var r=(e&7)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127)))))}function w4(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(Math.LN2*7));r.realloc(n);for(var i=r.pos-1;i>=e;i--)r.buf[i+n]=r.buf[i]}function Xne(e,t){for(var r=0;r>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function C4(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function rie(e,t,r){for(var n="",i=t;i239?4:o>223?3:o>191?2:1;if(i+u>r)break;var c,f,m;u===1?o<128&&(a=o):u===2?(c=e[i+1],(c&192)===128&&(a=(o&31)<<6|c&63,a<=127&&(a=null))):u===3?(c=e[i+1],f=e[i+2],(c&192)===128&&(f&192)===128&&(a=(o&15)<<12|(c&63)<<6|f&63,(a<=2047||a>=55296&&a<=57343)&&(a=null))):u===4&&(c=e[i+1],f=e[i+2],m=e[i+3],(c&192)===128&&(f&192)===128&&(m&192)===128&&(a=(o&15)<<18|(c&63)<<12|(f&63)<<6|m&63,(a<=65535||a>=1114112)&&(a=null))),a===null?(a=65533,u=1):a>65535&&(a-=65536,n+=String.fromCharCode(a>>>10&1023|55296),a=56320|a&1023),n+=String.fromCharCode(a),i+=u}return n}function nie(e,t,r){return HM.decode(e.subarray(t,r))}function iie(e,t,r){for(var n=0,i,o;n55295&&i<57344)if(o)if(i<56320){e[r++]=239,e[r++]=191,e[r++]=189,o=i;continue}else i=o-55296<<10|i-56320|65536,o=null;else{i>56319||n+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):o=i;continue}else o&&(e[r++]=239,e[r++]=191,e[r++]=189,o=null);i<128?e[r++]=i:(i<2048?e[r++]=i>>6|192:(i<65536?e[r++]=i>>12|224:(e[r++]=i>>18|240,e[r++]=i>>12&63|128),e[r++]=i>>6&63|128),e[r++]=i&63|128)}return r}const aie=oa($ne);var R4=function(){function e(t,r,n,i){Ht(this,e),F(this,"vectorLayerCache",{}),this.x=r,this.y=n,this.z=i,this.vectorTile=new zne(new aie(t))}return jt(e,[{key:"getTileData",value:function(r){if(!r||!this.vectorTile.layers[r])return[];if(this.vectorLayerCache[r])return this.vectorLayerCache[r];var n=this.vectorTile.layers[r];if(Array.isArray(n.features))return this.vectorLayerCache[r]=n.features,n.features;for(var i=[],o=0;o0)switch(n[0]){case"band":try{e[i]=t[n[1]][r]}catch{console.warn("Raster Data err!"),e[i]=0}break;default:GM(n,t,r)}})}function cie(e){var t=Nn(e,3),r=t[0],n=t[1],i=n===void 0?-1:n,o=t[2],a=o===void 0?-1:o;if(r===void 0)return console.warn("Express err!"),["+",0,0];var u=r.replace(/\s+/g,"");return[u,i,a]}function ix(e){var t=cie(e),r=t[0],n=t[1],i=t[2];return Array.isArray(n)&&(n=ix(e[1])),Array.isArray(i)&&(i=ix(e[2])),lie(r,n,i)}var fie={nd:{type:"operation",expression:["/",["-",["band",1],["band",0]],["+",["band",1],["band",0]]]},rgb:{type:"function",method:hie}};function hie(e,t){for(var r=e[0].rasterData,n=e[1].rasterData,i=e[2].rasterData,o=[],a=(t==null?void 0:t.countCut)||[2,98],u=Nn(a,2),c=u[0],f=u[1],m=(t==null?void 0:t.RMinMax)||Jd(r,c,f),_=(t==null?void 0:t.GMinMax)||Jd(n,c,f),b=(t==null?void 0:t.BMinMax)||Jd(i,c,f),A=0;A"u"&&(r.Reflect=e);function i(c,f){return function(m,_){Object.defineProperty(c,m,{configurable:!0,writable:!0,value:_}),f&&f(m,_)}}function o(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function u(){return o()||a()}})(function(t,r){var n=Object.prototype.hasOwnProperty,i=typeof Symbol=="function",o=i&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=i&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",u=typeof Object.create=="function",c={__proto__:[]}instanceof Array,f=!u&&!c,m={create:u?function(){return rn(Object.create(null))}:c?function(){return rn({__proto__:null})}:function(){return rn({})},has:f?function(Ne,qe){return n.call(Ne,qe)}:function(Ne,qe){return qe in Ne},get:f?function(Ne,qe){return n.call(Ne,qe)?Ne[qe]:void 0}:function(Ne,qe){return Ne[qe]}},_=Object.getPrototypeOf(Function),b=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:rr(),A=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:hr(),w=typeof WeakMap=="function"?WeakMap:Cn(),R=i?Symbol.for("@reflect-metadata:registry"):void 0,P=Q(),k=Ge(P);function L(Ne,qe,ct,Vt){if(nt(ct)){if(!Xr(Ne))throw new TypeError;if(!ge(qe))throw new TypeError;return le(Ne,qe)}else{if(!Xr(Ne))throw new TypeError;if(!Ar(qe))throw new TypeError;if(!Ar(Vt)&&!nt(Vt)&&!pr(Vt))throw new TypeError;return pr(Vt)&&(Vt=void 0),ct=Qt(ct),ye(Ne,qe,ct,Vt)}}t("decorate",L);function B(Ne,qe){function ct(Vt,Qr){if(!Ar(Vt))throw new TypeError;if(!nt(Qr)&&!Be(Qr))throw new TypeError;Zt(Ne,qe,Vt,Qr)}return ct}t("metadata",B);function V(Ne,qe,ct,Vt){if(!Ar(ct))throw new TypeError;return nt(Vt)||(Vt=Qt(Vt)),Zt(Ne,qe,ct,Vt)}t("defineMetadata",V);function G(Ne,qe,ct){if(!Ar(qe))throw new TypeError;return nt(ct)||(ct=Qt(ct)),ke(Ne,qe,ct)}t("hasMetadata",G);function K(Ne,qe,ct){if(!Ar(qe))throw new TypeError;return nt(ct)||(ct=Qt(ct)),Rt(Ne,qe,ct)}t("hasOwnMetadata",K);function Z(Ne,qe,ct){if(!Ar(qe))throw new TypeError;return nt(ct)||(ct=Qt(ct)),Lt(Ne,qe,ct)}t("getMetadata",Z);function ve(Ne,qe,ct){if(!Ar(qe))throw new TypeError;return nt(ct)||(ct=Qt(ct)),Gt(Ne,qe,ct)}t("getOwnMetadata",ve);function Ie(Ne,qe){if(!Ar(Ne))throw new TypeError;return nt(qe)||(qe=Qt(qe)),st(Ne,qe)}t("getMetadataKeys",Ie);function de(Ne,qe){if(!Ar(Ne))throw new TypeError;return nt(qe)||(qe=Qt(qe)),tt(Ne,qe)}t("getOwnMetadataKeys",de);function se(Ne,qe,ct){if(!Ar(qe))throw new TypeError;if(nt(ct)||(ct=Qt(ct)),!Ar(qe))throw new TypeError;nt(ct)||(ct=Qt(ct));var Vt=yt(qe,ct,!1);return nt(Vt)?!1:Vt.OrdinaryDeleteMetadata(Ne,qe,ct)}t("deleteMetadata",se);function le(Ne,qe){for(var ct=Ne.length-1;ct>=0;--ct){var Vt=Ne[ct],Qr=Vt(qe);if(!nt(Qr)&&!pr(Qr)){if(!ge(Qr))throw new TypeError;qe=Qr}}return qe}function ye(Ne,qe,ct,Vt){for(var Qr=Ne.length-1;Qr>=0;--Qr){var Jn=Ne[Qr],Ri=Jn(qe,ct,Vt);if(!nt(Ri)&&!pr(Ri)){if(!Ar(Ri))throw new TypeError;Vt=Ri}}return Vt}function ke(Ne,qe,ct){var Vt=Rt(Ne,qe,ct);if(Vt)return!0;var Qr=lr(qe);return pr(Qr)?!1:ke(Ne,Qr,ct)}function Rt(Ne,qe,ct){var Vt=yt(qe,ct,!1);return nt(Vt)?!1:gi(Vt.OrdinaryHasOwnMetadata(Ne,qe,ct))}function Lt(Ne,qe,ct){var Vt=Rt(Ne,qe,ct);if(Vt)return Gt(Ne,qe,ct);var Qr=lr(qe);if(!pr(Qr))return Lt(Ne,Qr,ct)}function Gt(Ne,qe,ct){var Vt=yt(qe,ct,!1);if(!nt(Vt))return Vt.OrdinaryGetOwnMetadata(Ne,qe,ct)}function Zt(Ne,qe,ct,Vt){var Qr=yt(ct,Vt,!0);Qr.OrdinaryDefineOwnMetadata(Ne,qe,ct,Vt)}function st(Ne,qe){var ct=tt(Ne,qe),Vt=lr(Ne);if(Vt===null)return ct;var Qr=st(Vt,qe);if(Qr.length<=0)return ct;if(ct.length<=0)return Qr;for(var Jn=new A,Ri=[],qn=0,en=ct;qn=0&&en=this._keys.length?(this._index=-1,this._keys=qe,this._values=qe):this._index++,{value:fn,done:!1}}return{value:void 0,done:!0}},qn.prototype.throw=function(en){throw this._index>=0&&(this._index=-1,this._keys=qe,this._values=qe),en},qn.prototype.return=function(en){return this._index>=0&&(this._index=-1,this._keys=qe,this._values=qe),{value:en,done:!0}},qn}(),Vt=function(){function qn(){this._keys=[],this._values=[],this._cacheKey=Ne,this._cacheIndex=-2}return Object.defineProperty(qn.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),qn.prototype.has=function(en){return this._find(en,!1)>=0},qn.prototype.get=function(en){var fn=this._find(en,!1);return fn>=0?this._values[fn]:void 0},qn.prototype.set=function(en,fn){var an=this._find(en,!0);return this._values[an]=fn,this},qn.prototype.delete=function(en){var fn=this._find(en,!1);if(fn>=0){for(var an=this._keys.length,un=fn+1;un= than the number of constructor arguments of its base class.")},Bie="Invalid Container constructor argument. Container options must be an object.",Lie="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",Nie="Invalid Container option. Auto bind injectable must be a boolean",Uie="Invalid Container option. Skip base check must be a boolean",zie="Cannot apply @postConstruct decorator multiple times in the same class",$ie=function(){for(var e=[],t=0;t ")}function QM(e){e.childRequests.forEach(function(t){if(KM(t,t.serviceIdentifier)){var r=Gie(t);throw new Error(Rie+" "+r)}else QM(t)})}function Wie(e,t){if(t.isTagged()||t.isNamed()){var r="",n=t.getNamedTag(),i=t.getCustomTags();return n!==null&&(r+=n.toString()+` `),i!==null&&i.forEach(function(o){r+=o.toString()+` `})," "+e+` `+e+" - "+r}else return" "+e}function cy(e){if(e.name)return e.name;var t=e.toString(),r=t.match(/^function\s*([^\s(]+)/);return r?r[1]:"Anonymous function: "+t}var JM=function(){function e(t){this.id=Ym(),this.container=t}return e.prototype.addPlan=function(t){this.plan=t},e.prototype.setCurrentRequest=function(t){this.currentRequest=t},e}(),bp=function(){function e(t,r){this.key=t,this.value=r}return e.prototype.toString=function(){return this.key===ff?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},e}(),Xie=function(){function e(t,r){this.parentContext=t,this.rootRequest=r}return e}();function Yie(e,t,r,n){var i=YM;eP(i,e,t,n,r)}function Zie(e,t,r){var n=ZM;eP(n,e.constructor,t,r)}function eP(e,t,r,n,i){var o={},a=typeof i=="number",u=i!==void 0&&a?i.toString():r;if(a&&r!==void 0)throw new Error(Die);Reflect.hasOwnMetadata(e,t)&&(o=Reflect.getMetadata(e,t));var c=o[u];if(!Array.isArray(c))c=[];else for(var f=0,m=c;f0,m=c.length>r.length,_=f||m?c.length:r.length,b=rae(n,t,o,u,_),A=rP(e,r),w=r_(r_([],b),A);return w}function tae(e,t,r,n,i){var o=i[e.toString()]||[],a=iP(o),u=a.unmanaged!==!0,c=n[e],f=a.inject||a.multiInject;if(c=f||c,c instanceof Qie&&(c=c.unwrap()),u){var m=c===Object,_=c===Function,b=c===void 0,A=m||_||b;if(!t&&A){var w=wie+" argument "+e+" in class "+r+".";throw new Error(w)}var R=new fy(th.ConstructorArgument,a.targetName,c);return R.metadata=o,R}return null}function rae(e,t,r,n,i){for(var o=[],a=0;a0?u:nP(e,r)}else return 0}function iP(e){var t={};return e.forEach(function(r){t[r.key.toString()]=r.value}),{inject:t[ly],multiInject:t[Tm],targetName:t[WM],unmanaged:t[Y5]}}var Z5=function(){function e(t,r,n,i,o){this.id=Ym(),this.serviceIdentifier=t,this.parentContext=r,this.parentRequest=n,this.target=o,this.childRequests=[],this.bindings=Array.isArray(i)?i:[i],this.requestScope=n===null?new Map:null}return e.prototype.addChildRequest=function(t,r,n){var i=new e(t,this.parentContext,this,r,n);return this.childRequests.push(i),i},e}();function lx(e){return e._bindingDictionary}function nae(e,t,r,n,i,o){var a=e?Tm:ly,u=new bp(a,r),c=new fy(t,n,r,u);if(i!==void 0){var f=new bp(i,o);c.metadata.push(f)}return c}function D4(e,t,r,n,i){var o=Cm(r.container,i.serviceIdentifier),a=[];return o.length===kg.NoBindingsAvailable&&r.container.options.autoBindInjectable&&typeof i.serviceIdentifier=="function"&&e.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(r.container.bind(i.serviceIdentifier).toSelf(),o=Cm(r.container,i.serviceIdentifier)),t?a=o:a=o.filter(function(u){var c=new Z5(u.serviceIdentifier,r,n,u,i);return u.constraint(c)}),iae(i.serviceIdentifier,a,i,r.container),a}function iae(e,t,r,n){switch(t.length){case kg.NoBindingsAvailable:if(r.isOptional())return t;var i=wm(e),o=Aie;throw o+=Wie(i,r),o+=O4(n,i,Cm),new Error(o);case kg.OnlyOneBindingAvailable:if(!r.isArray())return t;case kg.MultipleBindingsAvailable:default:if(r.isArray())return t;var i=wm(e),o=Eie+" "+i;throw o+=O4(n,i,Cm),new Error(o)}}function aP(e,t,r,n,i,o){var a,u;if(i===null){a=D4(e,t,n,null,o),u=new Z5(r,n,null,a,o);var c=new Xie(n,u);n.addPlan(c)}else a=D4(e,t,n,i,o),u=i.addChildRequest(o.serviceIdentifier,a,o);a.forEach(function(f){var m=null;if(o.isArray())m=u.addChildRequest(f.serviceIdentifier,f,o);else{if(f.cache)return;m=u}if(f.type===Us.Instance&&f.implementationType!==null){var _=eae(e,f.implementationType);if(!n.container.options.skipBaseClassChecks){var b=nP(e,f.implementationType);if(_.length0){var i=t.filter(function(a){return a.target!==null&&a.target.type===th.ConstructorArgument}),o=i.map(r);n=lae(e,o),n=uae(n,t,r)}else n=new e;return cae(e,n),n}var L3=function(e,t,r){try{return r()}catch(n){throw qM(n)?new Error(Vie(e,t.toString())):n}},cx=function(e){return function(t){t.parentContext.setCurrentRequest(t);var r=t.bindings,n=t.childRequests,i=t.target&&t.target.isArray(),o=!t.parentRequest||!t.parentRequest.target||!t.target||!t.parentRequest.target.matchesArray(t.target.serviceIdentifier);if(i&&o)return n.map(function(_){var b=cx(e);return b(_)});var a=null;if(t.target.isOptional()&&r.length===0)return;var u=r[0],c=u.scope===zs.Singleton,f=u.scope===zs.Request;if(c&&u.activated)return u.cache;if(f&&e!==null&&e.has(u.id))return e.get(u.id);if(u.type===Us.ConstantValue)a=u.cache,u.activated=!0;else if(u.type===Us.Function)a=u.cache,u.activated=!0;else if(u.type===Us.Constructor)a=u.implementationType;else if(u.type===Us.DynamicValue&&u.dynamicValue!==null)a=L3("toDynamicValue",u.serviceIdentifier,function(){return u.dynamicValue(t.parentContext)});else if(u.type===Us.Factory&&u.factory!==null)a=L3("toFactory",u.serviceIdentifier,function(){return u.factory(t.parentContext)});else if(u.type===Us.Provider&&u.provider!==null)a=L3("toProvider",u.serviceIdentifier,function(){return u.provider(t.parentContext)});else if(u.type===Us.Instance&&u.implementationType!==null)a=fae(u.implementationType,n,cx(e));else{var m=wm(t.serviceIdentifier);throw new Error(Iie+" "+m)}return typeof u.onActivation=="function"&&(a=u.onActivation(t.parentContext,a)),c&&(u.cache=a,u.activated=!0),f&&e!==null&&!e.has(u.id)&&e.set(u.id,a),a}};function hae(e){var t=cx(e.plan.rootRequest.requestScope);return t(e.plan.rootRequest)}var Qf=function(e,t){var r=e.parentRequest;return r!==null?t(r)?!0:Qf(r,t):!1},Hv=function(e){return function(t){var r=function(n){return n!==null&&n.target!==null&&n.target.matchesTag(e)(t)};return r.metaData=new bp(e,t),r}},q2=Hv(ff),N3=function(e){return function(t){var r=null;if(t!==null)if(r=t.bindings[0],typeof e=="string"){var n=r.serviceIdentifier;return n===e}else{var i=t.bindings[0].implementationType;return e===i}return!1}},q5=function(){function e(t){this._binding=t}return e.prototype.when=function(t){return this._binding.constraint=t,new Ls(this._binding)},e.prototype.whenTargetNamed=function(t){return this._binding.constraint=q2(t),new Ls(this._binding)},e.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(t){var r=t.target!==null&&!t.target.isNamed()&&!t.target.isTagged();return r},new Ls(this._binding)},e.prototype.whenTargetTagged=function(t,r){return this._binding.constraint=Hv(t)(r),new Ls(this._binding)},e.prototype.whenInjectedInto=function(t){return this._binding.constraint=function(r){return N3(t)(r.parentRequest)},new Ls(this._binding)},e.prototype.whenParentNamed=function(t){return this._binding.constraint=function(r){return q2(t)(r.parentRequest)},new Ls(this._binding)},e.prototype.whenParentTagged=function(t,r){return this._binding.constraint=function(n){return Hv(t)(r)(n.parentRequest)},new Ls(this._binding)},e.prototype.whenAnyAncestorIs=function(t){return this._binding.constraint=function(r){return Qf(r,N3(t))},new Ls(this._binding)},e.prototype.whenNoAncestorIs=function(t){return this._binding.constraint=function(r){return!Qf(r,N3(t))},new Ls(this._binding)},e.prototype.whenAnyAncestorNamed=function(t){return this._binding.constraint=function(r){return Qf(r,q2(t))},new Ls(this._binding)},e.prototype.whenNoAncestorNamed=function(t){return this._binding.constraint=function(r){return!Qf(r,q2(t))},new Ls(this._binding)},e.prototype.whenAnyAncestorTagged=function(t,r){return this._binding.constraint=function(n){return Qf(n,Hv(t)(r))},new Ls(this._binding)},e.prototype.whenNoAncestorTagged=function(t,r){return this._binding.constraint=function(n){return!Qf(n,Hv(t)(r))},new Ls(this._binding)},e.prototype.whenAnyAncestorMatches=function(t){return this._binding.constraint=function(r){return Qf(r,t)},new Ls(this._binding)},e.prototype.whenNoAncestorMatches=function(t){return this._binding.constraint=function(r){return!Qf(r,t)},new Ls(this._binding)},e}(),Ls=function(){function e(t){this._binding=t}return e.prototype.onActivation=function(t){return this._binding.onActivation=t,new q5(this._binding)},e}(),lp=function(){function e(t){this._binding=t,this._bindingWhenSyntax=new q5(this._binding),this._bindingOnSyntax=new Ls(this._binding)}return e.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},e.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(t,r){return this._bindingWhenSyntax.whenTargetTagged(t,r)},e.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},e.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},e.prototype.whenParentTagged=function(t,r){return this._bindingWhenSyntax.whenParentTagged(t,r)},e.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},e.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},e.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},e.prototype.whenAnyAncestorTagged=function(t,r){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,r)},e.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},e.prototype.whenNoAncestorTagged=function(t,r){return this._bindingWhenSyntax.whenNoAncestorTagged(t,r)},e.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},e.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},e.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},e}(),pae=function(){function e(t){this._binding=t}return e.prototype.inRequestScope=function(){return this._binding.scope=zs.Request,new lp(this._binding)},e.prototype.inSingletonScope=function(){return this._binding.scope=zs.Singleton,new lp(this._binding)},e.prototype.inTransientScope=function(){return this._binding.scope=zs.Transient,new lp(this._binding)},e}(),F4=function(){function e(t){this._binding=t,this._bindingWhenSyntax=new q5(this._binding),this._bindingOnSyntax=new Ls(this._binding),this._bindingInSyntax=new pae(t)}return e.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},e.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},e.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},e.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},e.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(t,r){return this._bindingWhenSyntax.whenTargetTagged(t,r)},e.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},e.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},e.prototype.whenParentTagged=function(t,r){return this._bindingWhenSyntax.whenParentTagged(t,r)},e.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},e.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},e.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},e.prototype.whenAnyAncestorTagged=function(t,r){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,r)},e.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},e.prototype.whenNoAncestorTagged=function(t,r){return this._bindingWhenSyntax.whenNoAncestorTagged(t,r)},e.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},e.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},e.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},e}(),dae=function(){function e(t){this._binding=t}return e.prototype.to=function(t){return this._binding.type=Us.Instance,this._binding.implementationType=t,new F4(this._binding)},e.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+kie);var t=this._binding.serviceIdentifier;return this.to(t)},e.prototype.toConstantValue=function(t){return this._binding.type=Us.ConstantValue,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=zs.Singleton,new lp(this._binding)},e.prototype.toDynamicValue=function(t){return this._binding.type=Us.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new F4(this._binding)},e.prototype.toConstructor=function(t){return this._binding.type=Us.Constructor,this._binding.implementationType=t,this._binding.scope=zs.Singleton,new lp(this._binding)},e.prototype.toFactory=function(t){return this._binding.type=Us.Factory,this._binding.factory=t,this._binding.scope=zs.Singleton,new lp(this._binding)},e.prototype.toFunction=function(t){if(typeof t!="function")throw new Error(Oie);var r=this.toConstantValue(t);return this._binding.type=Us.Function,this._binding.scope=zs.Singleton,r},e.prototype.toAutoFactory=function(t){return this._binding.type=Us.Factory,this._binding.factory=function(r){var n=function(){return r.container.get(t)};return n},this._binding.scope=zs.Singleton,new lp(this._binding)},e.prototype.toProvider=function(t){return this._binding.type=Us.Provider,this._binding.provider=t,this._binding.scope=zs.Singleton,new lp(this._binding)},e.prototype.toService=function(t){this.toDynamicValue(function(r){return r.container.get(t)})},e}(),vae=function(){function e(){}return e.of=function(t,r){var n=new e;return n.bindings=t,n.middleware=r,n},e}(),B4=function(){function e(){this._map=new Map}return e.prototype.getMap=function(){return this._map},e.prototype.add=function(t,r){if(t==null)throw new Error(dv);if(r==null)throw new Error(dv);var n=this._map.get(t);n!==void 0?(n.push(r),this._map.set(t,n)):this._map.set(t,[r])},e.prototype.get=function(t){if(t==null)throw new Error(dv);var r=this._map.get(t);if(r!==void 0)return r;throw new Error(P4)},e.prototype.remove=function(t){if(t==null)throw new Error(dv);if(!this._map.delete(t))throw new Error(P4)},e.prototype.removeByCondition=function(t){var r=this;this._map.forEach(function(n,i){var o=n.filter(function(a){return!t(a)});o.length>0?r._map.set(i,o):r._map.delete(i)})},e.prototype.hasKey=function(t){if(t==null)throw new Error(dv);return this._map.has(t)},e.prototype.clone=function(){var t=new e;return this._map.forEach(function(r,n){r.forEach(function(i){return t.add(n,i.clone())})}),t},e.prototype.traverse=function(t){this._map.forEach(function(r,n){t(n,r)})},e}(),mae=function(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(m){try{f(n.next(m))}catch(_){a(_)}}function c(m){try{f(n.throw(m))}catch(_){a(_)}}function f(m){m.done?o(m.value):i(m.value).then(u,c)}f((n=n.apply(e,t||[])).next())})},gae=function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(f){return function(m){return c([f,m])}}function c(f){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=f[0]&2?i.return:f[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,f[1])).done)return o;switch(i=0,o&&(f=[f[0]&2,o.value]),f[0]){case 0:case 1:o=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,i=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]"),IRendererService:Symbol.for("IRendererService"),IShaderModuleService:Symbol.for("IShaderModuleService"),IIconService:Symbol.for("IIconService"),IFontService:Symbol.for("IFontService"),IInteractionService:Symbol.for("IInteractionService"),IPickingService:Symbol.for("IPickingService"),IControlService:Symbol.for("IControlService"),IStyleAttributeService:Symbol.for("IStyleAttributeService"),ILayer:Symbol.for("ILayer"),ILayerPlugin:Symbol.for("ILayerPlugin"),INormalPass:Symbol.for("INormalPass"),IPostProcessor:Symbol.for("IPostProcessor"),IPostProcessingPass:Symbol.for("IPostProcessingPass"),IFactoryPostProcessingPass:Symbol.for("Factory"),IFactoryNormalPass:Symbol.for("Factory"),IMultiPassRenderer:Symbol.for("IMultiPassRenderer"),SceneID:Symbol.for("SceneID"),MapConfig:Symbol.for("MapConfig")},Q5={exports:{}};Q5.exports=Zm;Q5.exports.default=Zm;var e0=1e20;function Zm(e,t,r,n,i,o){this.fontSize=e||24,this.buffer=t===void 0?3:t,this.cutoff=n||.25,this.fontFamily=i||"sans-serif",this.fontWeight=o||"normal",this.radius=r||8;var a=this.size=this.fontSize+this.buffer*2,u=a+this.buffer*2;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textAlign="left",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(u*u),this.gridInner=new Float64Array(u*u),this.f=new Float64Array(u),this.z=new Float64Array(u+1),this.v=new Uint16Array(u),this.useMetrics=this.ctx.measureText("A").actualBoundingBoxLeft!==void 0,this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function Tae(e,t,r,n,i,o,a){o.fill(e0,0,t*r),a.fill(0,0,t*r);for(var u=(t-n)/2,c=0;c-1);c++,o[c]=u,a[c]=f,a[c+1]=e0}for(u=0,c=0;u=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function Iae(e,t){if(e){if(typeof e=="string")return U4(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return U4(e,t)}}function U4(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);ro&&(A=0,b++),u[R]={x:A,y:_+b*mv,width:mv,height:mv,advance:k},A+=mv}});var w=n+i*2;return{mapping:u,xOffset:A,yOffset:_+b*w,canvasHeight:sP(_+(b+1)*w)}}function Pae(e,t,r){var n=0,i=0,o=0,a=[],u={},c=oP(e),f;try{for(c.s();!(f=c.n()).done;){var m=f.value;if(!u[m.id]){var _=m.size;n+_+t>r&&(z4(u,a,i),n=0,i=o+i+t,o=0,a=[]),a.push({icon:m,xOffset:n}),n=n+_+t,o=Math.max(o,_)}}}catch(A){c.e(A)}finally{c.f()}a.length>0&&z4(u,a,i);var b=sP(o+i+t);return{mapping:u,canvasHeight:b}}function z4(e,t,r){var n=oP(t),i;try{for(n.s();!(i=n.n()).done;){var o=i.value,a=o.icon,u=o.xOffset;e[a.id]=Qe(Qe({},a),{},{x:u,y:r,image:a.image,width:a.width,height:a.height})}}catch(c){n.e(c)}finally{n.f()}}function sP(e){return Math.pow(2,Math.ceil(Math.log2(e)))}var $4,V4;function j4(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Oae(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function Oae(e,t){if(e){if(typeof e=="string")return H4(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return H4(e,t)}}function H4(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Fae=Hae(),Bae="sans-serif",Lae="normal",Nae=24,Uae=3,zae=.25,$ae=8,G4=1024,Vae=1,W4=1,jae=3;function Hae(){for(var e=[],t=32;t<128;t++)e.push(String.fromCharCode(t));return e}function X4(e,t,r,n){e.font="".concat(n," ").concat(r,"px ").concat(t),e.fillStyle="black",e.textBaseline="middle"}function Y4(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Yae=3,K4=1024,gv=64,Zae=(Z4=ai(),Z4(q4=function(e){_n(r,e);var t=Wae(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function Qae(e,t){if(e){if(typeof e=="string")return r8(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return r8(e,t)}}function r8(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1&&this.controls.splice(n,1),r.remove(),this}},{key:"addControls",value:function(){var r=this;this.unAddControls.forEach(function(n){n.addTo(r.scene),r.controls.push(n)}),this.unAddControls=[]}},{key:"destroy",value:function(){var r=Kae(this.controls),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;i.remove()}}catch(o){r.e(o)}finally{r.f()}this.controls=[],this.clearControlPos()}},{key:"initControlPos",value:function(){var r=this.controlCorners={},n="l7-",i=this.controlContainer=fl("div",n+"control-container",this.container);function o(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],c=u.map(function(f){return n+f}).join(" ");r[u.filter(function(f){return!["row","column"].includes(f)}).join("")]=fl("div",c,i)}function a(u){var c=u.replace(/^(top|bottom|left|right|center)/,"$1-").split("-");return[].concat(nr(c),[Jae[u]])}Object.values(n_).forEach(function(u){o(a(u))}),this.checkCornerOverlap()}},{key:"clearControlPos",value:function(){for(var r in this.controlCorners)this.controlCorners[r]&&e_(this.controlCorners[r]);this.controlContainer&&e_(this.controlContainer)}},{key:"checkCornerOverlap",value:function(){var r=this,n=window.MutationObserver;if(n)for(var i=function(){var c=a[o],f=c.match(/^(top|bottom)(left|right)$/);if(f){var m=Nn(f,3),_=m[1],b=m[2],A=r.controlCorners["".concat(_).concat(b)],w=new n(function(R){var P=Nn(R,1),k=P[0].target;A&&(A.style[_]=k.clientHeight+"px")});w.observe(r.controlCorners["".concat(b).concat(_)],{childList:!0,attributes:!0})}},o=0,a=Object.keys(this.controlCorners);o-1&&this.markerLayers.splice(n,1)}},{key:"addMarker",value:function(r){this.mapsService.map&&this.mapsService.getMarkerContainer()?(this.markers.push(r),r.addTo(this.scene)):this.unAddMarkers.push(r)}},{key:"addMarkers",value:function(){var r=this;this.unAddMarkers.forEach(function(n){n.addTo(r.scene),r.markers.push(n)}),this.unAddMarkers=[]}},{key:"addMarkerLayers",value:function(){var r=this;this.unAddMarkerLayers.forEach(function(n){r.markerLayers.push(n),n.addTo(r.scene)}),this.unAddMarkers=[]}},{key:"removeMarker",value:function(r){r.remove(),this.markers.indexOf(r);var n=this.markers.indexOf(r);n>-1&&this.markers.splice(n,1)}},{key:"removeAllMarkers",value:function(){this.destroy()}},{key:"init",value:function(r){this.scene=r,this.mapsService=r.get(wt.IMapService)}},{key:"destroy",value:function(){this.markers.forEach(function(r){r.remove()}),this.markers=[],this.markerLayers.forEach(function(r){r.destroy()}),this.markerLayers=[]}},{key:"removeMakerLayerMarker",value:function(r){r.destroy()}}]),e}())||i8),a8,o8,roe=(a8=ai(),a8(o8=function(){function e(){Ht(this,e),F(this,"scene",void 0),F(this,"mapsService",void 0),F(this,"popups",[]),F(this,"unAddPopups",[])}return jt(e,[{key:"isMarkerReady",get:function(){return this.mapsService.map&&this.mapsService.getMarkerContainer()}},{key:"removePopup",value:function(r){r!=null&&r.isOpen()&&r.remove();var n=this.popups.indexOf(r);n>-1&&this.popups.splice(n,1);var i=this.unAddPopups.indexOf(r);i>-1&&this.unAddPopups.splice(i,1)}},{key:"destroy",value:function(){this.popups.forEach(function(r){return r.remove()})}},{key:"addPopup",value:function(r){var n=this;r&&r.getOptions().autoClose&&[].concat(nr(this.popups),nr(this.unAddPopups)).forEach(function(i){i.getOptions().autoClose&&n.removePopup(i)}),this.isMarkerReady?(r.addTo(this.scene),this.popups.push(r)):this.unAddPopups.push(r),r.on("close",function(){n.removePopup(r)})}},{key:"initPopup",value:function(){var r=this;this.unAddPopups.length&&this.unAddPopups.forEach(function(n){r.addPopup(n),r.unAddPopups=[]})}},{key:"init",value:function(r){this.scene=r,this.mapsService=r.get(wt.IMapService)}}]),e}())||o8),up=function(e){return e.normal="normal",e.additive="additive",e.subtractive="subtractive",e.min="min",e.max="max",e.none="none",e}({}),m1=function(e){return e.MULTIPLE="MULTIPLE",e.SINGLE="SINGLE",e}({}),py=function(e){return e.AND="and",e.OR="or",e}({}),ps=function(e){return e.INIT="init",e.UPDATE="update",e}({}),noe={MapToken:"您正在使用 Demo 测试 Token, 生产环境务必自行注册 Token 确保服务稳定 高德地图申请地址 https://lbs.amap.com/api/javascript-api/guide/abc/prepare Mapbox地图申请地址 https://docs.mapbox.com/help/glossary/access-token/",SDK:"请确认引入了mapbox-gl api且在L7之前引入"},s8,u8,ioe=Ci.merge,aoe={id:"map",logoPosition:"bottomleft",logoVisible:!0,antialias:!0,stencil:!0,preserveDrawingBuffer:!1,pickBufferScale:1,fitBoundsOptions:{animate:!1}},ooe={colors:["rgb(103,0,31)","rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(247,247,247)","rgb(209,229,240)","rgb(146,197,222)","rgb(67,147,195)","rgb(33,102,172)","rgb(5,48,97)"],size:10,shape:"circle",scales:{},shape2d:["circle","triangle","square","pentagon","hexagon","octogon","hexagram","rhombus","vesica"],shape3d:["cylinder","triangleColumn","hexagonColumn","squareColumn"],minZoom:-1,maxZoom:24,visible:!0,autoFit:!1,pickingBuffer:0,enablePropagation:!1,zIndex:0,blend:"normal",maskLayers:[],enableMask:!0,maskOperation:py.AND,pickedFeatureID:-1,enableMultiPassRenderer:!1,enablePicking:!0,active:!1,activeColor:"#2f54eb",enableHighlight:!1,enableSelect:!1,highlightColor:"#2f54eb",activeMix:0,selectColor:"blue",selectMix:0,enableTAA:!1,jitterScale:1,enableLighting:!1,animateOption:{enable:!1,interval:.2,duration:4,trailLength:.15},forward:!0},soe=(s8=ai(),s8(u8=function(){function e(){Ht(this,e),F(this,"sceneConfigCache",{}),F(this,"layerConfigCache",{}),F(this,"layerAttributeConfigCache",{})}return jt(e,[{key:"getSceneConfig",value:function(r){return this.sceneConfigCache[r]}},{key:"getSceneWarninfo",value:function(r){return noe[r]}},{key:"setSceneConfig",value:function(r,n){this.sceneConfigCache[r]=Qe(Qe({},aoe),n)}},{key:"getLayerConfig",value:function(r){return this.layerConfigCache[r]}},{key:"setLayerConfig",value:function(r,n,i){this.layerConfigCache[n]=Qe({},ioe({},this.sceneConfigCache[r],ooe,i))}},{key:"getAttributeConfig",value:function(r){return this.layerAttributeConfigCache[r]}},{key:"setAttributeConfig",value:function(r,n){this.layerAttributeConfigCache[r]=Qe(Qe({},this.layerAttributeConfigCache[r]),n)}},{key:"clean",value:function(){this.sceneConfigCache={},this.layerConfigCache={}}}]),e}())||u8);function bi(e,t,r,n){r&&Object.defineProperty(e,t,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function mi(e,t,r,n,i){var o={};return Object.keys(n).forEach(function(a){o[a]=n[a]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(a,u){return u(e,t,a)||a},o),i&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var U3=Math.PI/180,uoe=512,l8=4003e4;function c8(e){var t=e.latitude,r=t===void 0?0:t,n=e.zoom,i=n===void 0?0:n,o=e.scale,a=e.highPrecision,u=a===void 0?!1:a,c=e.flipY,f=c===void 0?!1:c;o=o!==void 0?o:Math.pow(2,i);var m={},_=uoe*o,b=Math.cos(r*U3),A=_/360,w=A/b,R=_/l8/b;if(m.pixelsPerMeter=[R,-R,R],m.metersPerPixel=[1/R,-1/R,1/R],m.pixelsPerDegree=[A,-w,R],m.degreesPerPixel=[1/A,-1/w,1/R],u){var P=U3*Math.tan(r*U3)/b,k=A*P/2,L=_/l8*P,B=L/w*R;m.pixelsPerDegree2=[0,-k,L],m.pixelsPerMeter2=[B,0,B],f&&(m.pixelsPerDegree2[1]=-m.pixelsPerDegree2[1],m.pixelsPerMeter2[1]=-m.pixelsPerMeter2[1])}return f&&(m.pixelsPerMeter[1]=-m.pixelsPerMeter[1],m.metersPerPixel[1]=-m.metersPerPixel[1],m.pixelsPerDegree[1]=-m.pixelsPerDegree[1],m.degreesPerPixel[1]=-m.degreesPerPixel[1]),m}var Vd=function(e){return e[e.LNGLAT=1]="LNGLAT",e[e.LNGLAT_OFFSET=2]="LNGLAT_OFFSET",e[e.VECTOR_TILE=3]="VECTOR_TILE",e[e.IDENTITY=4]="IDENTITY",e[e.P20=5]="P20",e[e.P20_OFFSET=6]="P20_OFFSET",e[e.METER_OFFSET=7]="METER_OFFSET",e[e.P20_2=8]="P20_2",e}({}),a1={CoordinateSystem:"u_CoordinateSystem",ViewportCenter:"u_ViewportCenter",ViewportCenterProjection:"u_ViewportCenterProjection",PixelsPerDegree:"u_PixelsPerDegree",PixelsPerDegree2:"u_PixelsPerDegree2",PixelsPerMeter:"u_PixelsPerMeter",Mvp:"u_Mvp"},f8,h8,p8,z3,d8,loe=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0],coe=(f8=ai(),h8=ki(wt.ICameraService),f8(p8=(z3=function(){function e(){Ht(this,e),F(this,"needRefresh",!0),bi(this,"cameraService",d8,this),F(this,"coordinateSystem",void 0),F(this,"viewportCenter",void 0),F(this,"viewportCenterProjection",void 0),F(this,"pixelsPerDegree",void 0),F(this,"pixelsPerDegree2",void 0),F(this,"pixelsPerMeter",void 0)}return jt(e,[{key:"refresh",value:function(r){var n=this.cameraService.getZoom(),i=this.cameraService.getZoomScale(),o=r||this.cameraService.getCenter(),a=c8({latitude:o[1],zoom:n}),u=a.pixelsPerMeter,c=a.pixelsPerDegree;this.viewportCenter=o,this.viewportCenterProjection=[0,0,0,0],this.pixelsPerMeter=u,this.pixelsPerDegree=c,this.pixelsPerDegree2=[0,0,0],this.coordinateSystem===Vd.LNGLAT||this.coordinateSystem===Vd.P20?this.cameraService.setViewProjectionMatrix(void 0):this.coordinateSystem===Vd.LNGLAT_OFFSET?this.calculateLnglatOffset(o,n):this.coordinateSystem===Vd.P20_OFFSET&&this.calculateLnglatOffset(o,n,i,!0),this.needRefresh=!1}},{key:"getCoordinateSystem",value:function(){return this.coordinateSystem}},{key:"setCoordinateSystem",value:function(r){this.coordinateSystem=r}},{key:"getViewportCenter",value:function(){return this.viewportCenter}},{key:"getViewportCenterProjection",value:function(){return this.viewportCenterProjection}},{key:"getPixelsPerDegree",value:function(){return this.pixelsPerDegree}},{key:"getPixelsPerDegree2",value:function(){return this.pixelsPerDegree2}},{key:"getPixelsPerMeter",value:function(){return this.pixelsPerMeter}},{key:"calculateLnglatOffset",value:function(r,n,i,o){var a=c8({latitude:r[1],zoom:n,scale:i,flipY:o,highPrecision:!0}),u=a.pixelsPerMeter,c=a.pixelsPerDegree,f=a.pixelsPerDegree2,m=this.cameraService.getViewMatrix(),_=this.cameraService.getProjectionMatrix(),b=pf([],_,m),A=this.cameraService.projectFlat([Math.fround(r[0]),Math.fround(r[1])],Math.pow(2,n));this.viewportCenterProjection=G5([],[A[0],A[1],0,1],b),m=this.cameraService.getViewMatrixUncentered()||m,b=pf([],_,m),b=pf([],b,loe),this.cameraService.setViewProjectionMatrix(b),this.pixelsPerMeter=u,this.pixelsPerDegree=c,this.pixelsPerDegree2=f}}]),e}(),d8=mi(z3.prototype,"cameraService",[h8],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),z3))||p8),v8,m8;function foe(e){var t=hoe();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function hoe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var poe=(v8=ai(),v8(m8=function(e){_n(r,e);var t=foe(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",Ei=t.console&&(t.console.warn||t.console.log);return Ei&&Ei.call(t.console,_t,hn),ee.apply(this,arguments)}}var R;typeof Object.assign!="function"?R=function(ue){if(ue===i||ue===null)throw new TypeError("Cannot convert undefined or null to object");for(var Ue=Object(ue),_t=1;_t-1}function de(ee){return ee.trim().split(/\s+/g)}function se(ee,ue,Ue){if(ee.indexOf&&!Ue)return ee.indexOf(ue);for(var _t=0;_tno[ue]}):_t=_t.sort()),_t}function ke(ee,ue){for(var Ue,_t,Sr=ue[0].toUpperCase()+ue.slice(1),hn=0;hn1&&!Ue.firstMultiple?Ue.firstMultiple=rr(ue):Sr===1&&(Ue.firstMultiple=!1);var hn=Ue.firstInput,Ei=Ue.firstMultiple,La=Ei?Ei.center:hn.center,mo=ue.center=hr(_t);ue.timeStamp=m(),ue.deltaTime=ue.timeStamp-hn.timeStamp,ue.angle=qe(La,mo),ue.distance=Ne(La,mo),at(Ue,ue),ue.offsetDirection=rn(ue.deltaX,ue.deltaY);var no=Cn(ue.deltaTime,ue.deltaX,ue.deltaY);ue.overallVelocityX=no.x,ue.overallVelocityY=no.y,ue.overallVelocity=f(no.x)>f(no.y)?no.x:no.y,ue.scale=Ei?Vt(Ei.pointers,_t):1,ue.rotation=Ei?ct(Ei.pointers,_t):0,ue.maxPointers=Ue.prevInput?ue.pointers.length>Ue.prevInput.maxPointers?ue.pointers.length:Ue.prevInput.maxPointers:ue.pointers.length,yt(Ue,ue);var Vs=ee.element;ve(ue.srcEvent.target,Vs)&&(Vs=ue.srcEvent.target),ue.target=Vs}function at(ee,ue){var Ue=ue.center,_t=ee.offsetDelta||{},Sr=ee.prevDelta||{},hn=ee.prevInput||{};(ue.eventType===pn||hn.eventType===Je)&&(Sr=ee.prevDelta={x:hn.deltaX||0,y:hn.deltaY||0},_t=ee.offsetDelta={x:Ue.x,y:Ue.y}),ue.deltaX=Sr.x+(Ue.x-_t.x),ue.deltaY=Sr.y+(Ue.y-_t.y)}function yt(ee,ue){var Ue=ee.lastInterval||ue,_t=ue.timeStamp-Ue.timeStamp,Sr,hn,Ei,La;if(ue.eventType!=Qt&&(_t>Xn||Ue.velocity===i)){var mo=ue.deltaX-Ue.deltaX,no=ue.deltaY-Ue.deltaY,Vs=Cn(_t,mo,no);hn=Vs.x,Ei=Vs.y,Sr=f(Vs.x)>f(Vs.y)?Vs.x:Vs.y,La=rn(mo,no),ee.lastInterval=ue}else Sr=Ue.velocity,hn=Ue.velocityX,Ei=Ue.velocityY,La=Ue.direction;ue.velocity=Sr,ue.velocityX=hn,ue.velocityY=Ei,ue.direction=La}function rr(ee){for(var ue=[],Ue=0;Ue=f(ue)?ee<0?Ut:ge:ue<0?Be:ft}function Ne(ee,ue,Ue){Ue||(Ue=Mr);var _t=ue[Ue[0]]-ee[Ue[0]],Sr=ue[Ue[1]]-ee[Ue[1]];return Math.sqrt(_t*_t+Sr*Sr)}function qe(ee,ue,Ue){Ue||(Ue=Mr);var _t=ue[Ue[0]]-ee[Ue[0]],Sr=ue[Ue[1]]-ee[Ue[1]];return Math.atan2(Sr,_t)*180/Math.PI}function ct(ee,ue){return qe(ue[1],ue[0],tr)+qe(ee[1],ee[0],tr)}function Vt(ee,ue){return Ne(ue[0],ue[1],tr)/Ne(ee[0],ee[1],tr)}var Qr={mousedown:pn,mousemove:gi,mouseup:Je},Jn="mousedown",Ri="mousemove mouseup";function qn(){this.evEl=Jn,this.evWin=Ri,this.pressed=!1,lr.apply(this,arguments)}L(qn,lr,{handler:function(ue){var Ue=Qr[ue.type];Ue&pn&&ue.button===0&&(this.pressed=!0),Ue&gi&&ue.which!==1&&(Ue=Je),this.pressed&&(Ue&Je&&(this.pressed=!1),this.callback(this.manager,Ue,{pointers:[ue],changedPointers:[ue],pointerType:ur,srcEvent:ue}))}});var en={pointerdown:pn,pointermove:gi,pointerup:Je,pointercancel:Qt,pointerout:Qt},fn={2:nt,3:pr,4:ur,5:Ar},an="pointerdown",un="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(an="MSPointerDown",un="MSPointerMove MSPointerUp MSPointerCancel");function ti(){this.evEl=an,this.evWin=un,lr.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}L(ti,lr,{handler:function(ue){var Ue=this.store,_t=!1,Sr=ue.type.toLowerCase().replace("ms",""),hn=en[Sr],Ei=fn[ue.pointerType]||ue.pointerType,La=Ei==nt,mo=se(Ue,ue.pointerId,"pointerId");hn&pn&&(ue.button===0||La)?mo<0&&(Ue.push(ue),mo=Ue.length-1):hn&(Je|Qt)&&(_t=!0),!(mo<0)&&(Ue[mo]=ue,this.callback(this.manager,hn,{pointers:Ue,changedPointers:[ue],pointerType:Ei,srcEvent:ue}),_t&&Ue.splice(mo,1))}});var Hi={touchstart:pn,touchmove:gi,touchend:Je,touchcancel:Qt},Fn="touchstart",j="touchstart touchmove touchend touchcancel";function Y(){this.evTarget=Fn,this.evWin=j,this.started=!1,lr.apply(this,arguments)}L(Y,lr,{handler:function(ue){var Ue=Hi[ue.type];if(Ue===pn&&(this.started=!0),!!this.started){var _t=J.call(this,ue,Ue);Ue&(Je|Qt)&&_t[0].length-_t[1].length===0&&(this.started=!1),this.callback(this.manager,Ue,{pointers:_t[0],changedPointers:_t[1],pointerType:nt,srcEvent:ue})}}});function J(ee,ue){var Ue=le(ee.touches),_t=le(ee.changedTouches);return ue&(Je|Qt)&&(Ue=ye(Ue.concat(_t),"identifier",!0)),[Ue,_t]}var ce={touchstart:pn,touchmove:gi,touchend:Je,touchcancel:Qt},Ee="touchstart touchmove touchend touchcancel";function je(){this.evTarget=Ee,this.targetIds={},lr.apply(this,arguments)}L(je,lr,{handler:function(ue){var Ue=ce[ue.type],_t=Ye.call(this,ue,Ue);_t&&this.callback(this.manager,Ue,{pointers:_t[0],changedPointers:_t[1],pointerType:nt,srcEvent:ue})}});function Ye(ee,ue){var Ue=le(ee.touches),_t=this.targetIds;if(ue&(pn|gi)&&Ue.length===1)return _t[Ue[0].identifier]=!0,[Ue,Ue];var Sr,hn,Ei=le(ee.changedTouches),La=[],mo=this.target;if(hn=Ue.filter(function(no){return ve(no.target,mo)}),ue===pn)for(Sr=0;Sr-1&&_t.splice(hn,1)};setTimeout(Sr,ie)}}function Ot(ee){for(var ue=ee.srcEvent.clientX,Ue=ee.srcEvent.clientY,_t=0;_t-1&&this.requireFail.splice(ue,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(ee){return!!this.simultaneous[ee.id]},emit:function(ee){var ue=this,Ue=this.state;function _t(Sr){ue.manager.emit(Sr,ee)}Ue=hi&&_t(ue.options.event+To(Ue))},tryEmit:function(ee){if(this.canEmit())return this.emit(ee);this.state=Wn},canEmit:function(){for(var ee=0;eeue.threshold&&Sr&ue.direction},attrTest:function(ee){return fa.prototype.attrTest.call(this,ee)&&(this.state&Gn||!(this.state&Gn)&&this.directionTest(ee))},emit:function(ee){this.pX=ee.deltaX,this.pY=ee.deltaY;var ue=dl(ee.direction);ue&&(ee.additionalEvent=this.options.event+ue),this._super.emit.call(this,ee)}});function $s(){fa.apply(this,arguments)}L($s,fa,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Rr]},attrTest:function(ee){return this._super.attrTest.call(this,ee)&&(Math.abs(ee.scale-1)>this.options.threshold||this.state&Gn)},emit:function(ee){if(ee.scale!==1){var ue=ee.scale<1?"in":"out";ee.additionalEvent=this.options.event+ue}this._super.emit.call(this,ee)}});function sa(){si.apply(this,arguments),this._timer=null,this._input=null}L(sa,si,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Dt]},process:function(ee){var ue=this.options,Ue=ee.pointers.length===ue.pointers,_t=ee.distanceue.time;if(this._input=ee,!_t||!Ue||ee.eventType&(Je|Qt)&&!Sr)this.reset();else if(ee.eventType&pn)this.reset(),this._timer=_(function(){this.state=Wi,this.tryEmit()},ue.time,this);else if(ee.eventType&Je)return Wi;return Wn},reset:function(){clearTimeout(this._timer)},emit:function(ee){this.state===Wi&&(ee&&ee.eventType&Je?this.manager.emit(this.options.event+"up",ee):(this._input.timeStamp=m(),this.manager.emit(this.options.event,this._input)))}});function Hu(){fa.apply(this,arguments)}L(Hu,fa,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Rr]},attrTest:function(ee){return this._super.attrTest.call(this,ee)&&(Math.abs(ee.rotation)>this.options.threshold||this.state&Gn)}});function ro(){fa.apply(this,arguments)}L(ro,fa,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:At|bt,pointers:1},getTouchAction:function(){return vl.prototype.getTouchAction.call(this)},attrTest:function(ee){var ue=this.options.direction,Ue;return ue&(At|bt)?Ue=ee.overallVelocity:ue&At?Ue=ee.overallVelocityX:ue&bt&&(Ue=ee.overallVelocityY),this._super.attrTest.call(this,ee)&&ue&ee.offsetDirection&&ee.distance>this.options.threshold&&ee.maxPointers==this.options.pointers&&f(Ue)>this.options.velocity&&ee.eventType&Je},emit:function(ee){var ue=dl(ee.offsetDirection);ue&&this.manager.emit(this.options.event+ue,ee),this.manager.emit(this.options.event,ee)}});function ua(){si.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}L(ua,si,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[zr]},process:function(ee){var ue=this.options,Ue=ee.pointers.length===ue.pointers,_t=ee.distance"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var goe={panstart:"dragstart",panmove:"dragging",panend:"dragend",pancancel:"dragcancel"},_oe=(g8=ai(),_8=ki(wt.IMapService),g8(y8=($3=function(e){_n(r,e);var t=voe(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a0){var c=u.changedTouches[0];n.onHover({clientX:c.clientX,clientY:c.clientY,type:"touchend"})}}),F($e(n),"onTouchMove",function(u){var c=u.changedTouches[0];n.onHover({clientX:c.clientX,clientY:c.clientY,type:"touchmove"})}),F($e(n),"onHover",function(u){var c=u.clientX,f=u.clientY,m=c,_=f,b=u.type,A=n.mapService.getMapContainer();if(A){var w=A.getBoundingClientRect(),R=w.top,P=w.left;m=m-P-A.clientLeft,_=_-R-A.clientTop}var k=n.mapService.containerToLngLat([m,_]);if(b==="click"){n.isDoubleTap(m,_,k);return}if(b==="touch"){n.isDoubleTap(m,_,k);return}b!=="click"&&b!=="dblclick"&&n.emit(Bu.Hover,{x:m,y:_,lngLat:k,type:b,target:u})}),n}return jt(r,[{key:"init",value:function(){this.addEventListenerOnMap(),this.$containter=this.mapService.getMapContainer()}},{key:"destroy",value:function(){this.hammertime&&this.hammertime.destroy(),this.removeEventListenerOnMap(),this.off(Bu.Hover)}},{key:"triggerHover",value:function(i){var o=i.x,a=i.y;this.emit(Bu.Hover,{x:o,y:a})}},{key:"triggerSelect",value:function(i){this.emit(Bu.Select,{featureId:i})}},{key:"triggerActive",value:function(i){this.emit(Bu.Active,{featureId:i})}},{key:"addEventListenerOnMap",value:function(){var i=this.mapService.getMapContainer();if(i){var o=new _v.Manager(i);o.add(new _v.Tap({event:"dblclick",taps:2})),o.add(new _v.Tap({event:"click"})),o.add(new _v.Pan({threshold:0,pointers:0})),o.add(new _v.Press({})),o.on("dblclick click",this.onHammer),o.on("panstart panmove panend pancancel",this.onDrag),i.addEventListener("touchstart",this.onTouch),i.addEventListener("touchend",this.onTouchEnd),i.addEventListener("mousemove",this.onHover),i.addEventListener("touchmove",this.onTouchMove),i.addEventListener("mousedown",this.onHover,!0),i.addEventListener("mouseup",this.onHover),i.addEventListener("contextmenu",this.onHover),this.hammertime=o}}},{key:"removeEventListenerOnMap",value:function(){var i=this.mapService.getMapContainer();i&&(i.removeEventListener("mousemove",this.onHover),this.hammertime.off("dblclick click",this.onHammer),this.hammertime.off("panstart panmove panend pancancel",this.onDrag),i.removeEventListener("touchstart",this.onTouch),i.removeEventListener("touchend",this.onTouchEnd),i.removeEventListener("mousedown",this.onHover),i.removeEventListener("mouseup",this.onHover),i.removeEventListener("contextmenu",this.onHover))}},{key:"interactionEvent",value:function(i){var o=i.type,a=i.pointerType,u,c;a==="touch"?(c=Math.floor(i.pointers[0].clientY),u=Math.floor(i.pointers[0].clientX)):(c=Math.floor(i.srcEvent.y),u=Math.floor(i.srcEvent.x));var f=this.mapService.getMapContainer();if(f){var m=f.getBoundingClientRect(),_=m.top,b=m.left;u-=b,c-=_}var A=this.mapService.containerToLngLat([u,c]);return{x:u,y:c,lngLat:A,type:o,target:i.srcEvent}}},{key:"isDoubleTap",value:function(i,o,a){var u=this,c=new Date().getTime(),f="click";c-this.lastClickTime<400&&Math.abs(this.lastClickXY[0]-i)<10&&Math.abs(this.lastClickXY[1]-o)<10?(this.lastClickTime=0,this.lastClickXY=[-1,-1],this.clickTimer&&clearTimeout(this.clickTimer),f="dblclick",this.emit(Bu.Hover,{x:i,y:o,lngLat:a,type:f})):(this.lastClickTime=c,this.lastClickXY=[i,o],this.clickTimer=setTimeout(function(){f="click",u.emit(Bu.Hover,{x:i,y:o,lngLat:a,type:f})},400))}}]),r}(D5),x8=mi($3.prototype,"mapService",[_8],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$3))||y8),yoe=0;function xoe(e){var t=e;if(typeof e=="string"&&(t=document.getElementById(e)),t){var r=document.createElement("div");return r.style.cssText+=` position: absolute; z-index:2; height: 100%; width: 100%; pointer-events: none; `,r.id="l7-scene-".concat(yoe++),r.classList.add("l7-scene"),t.appendChild(r),r}return null}function boe(e){var t,r=!0;if((e==null||(t=e.target)===null||t===void 0?void 0:t.target)instanceof HTMLElement)for(var n,i=e==null||(n=e.target)===null||n===void 0?void 0:n.target;i;){var o,a=Array.from(i.classList);if(a.includes("l7-marker")||a.includes("l7-popup")){r=!1;break}i=(o=i)===null||o===void 0?void 0:o.parentElement}return r}var fx=function(e){return e[e.SAMPLED=0]="SAMPLED",e[e.RENDER_TARGET=1]="RENDER_TARGET",e}({}),b8,E8,S8,A8,T8,w8,C8,o1,R8,I8,M8,P8,O8;function Eoe(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Soe(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function Soe(e,t){if(e){if(typeof e=="string")return k8(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return k8(e,t)}}function k8(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rP-1*ul||G<0||K>k-1*ul||K<0)){ke.next=9;break}return ke.abrupt("return",!1);case 9:return ke.next=11,A({x:Math.floor(G/t.pickBufferScale),y:Math.floor((k-(u+1)*ul)/t.pickBufferScale),width:1,height:1,data:new Uint8Array(4),framebuffer:t.pickingFBO});case 11:return Z=ke.sent,t.pickedColors=Z,Z[0]!==0||Z[1]!==0||Z[2]!==0?(ve=x1(Z),Ie=i.layerPickService.getFeatureById(ve),ve!==i.getCurrentPickId()&&f==="mousemove"&&(f="mouseenter"),de={x:a,y:u,type:f,lngLat:c,featureId:ve,feature:Ie,target:m},Ie&&(_=!0,i.setCurrentPickId(ve),t.triggerHoverOnLayer(i,de))):(se={x:a,y:u,lngLat:c,type:i.getCurrentPickId()!==null&&f==="mousemove"?"mouseout":"un"+f,featureId:null,target:m,feature:null},t.triggerHoverOnLayer(i,Qe(Qe({},se),{},{type:"unpick"})),t.triggerHoverOnLayer(i,se),i.setCurrentPickId(null)),B&&i.layerPickService.highlightPickedFeature(Z),V&&f==="click"&&(Z==null?void 0:Z.toString())!==[0,0,0,0].toString()&&(le=x1(Z),i.getCurrentSelectedId()===null||le!==i.getCurrentSelectedId()?(i.layerPickService.selectFeature(Z),i.setCurrentSelectedId(le)):(i.layerPickService.selectFeature(new Uint8Array([0,0,0,0])),i.setCurrentSelectedId(null))),ke.abrupt("return",_);case 17:case"end":return ke.stop()}},n)}));return function(n,i){return r.apply(this,arguments)}}())}return jt(e,[{key:"init",value:function(r){var n=this.rendererService,i=n.createTexture2D,o=n.createFramebuffer,a=n.getViewportSize,u=a(),c=u.width,f=u.height;this.pickBufferScale=this.configService.getSceneConfig(r).pickBufferScale||1,c=Math.round(c/this.pickBufferScale),f=Math.round(f/this.pickBufferScale);var m=i({width:c,height:f,usage:fx.RENDER_TARGET,label:"Picking Texture"});this.pickingFBO=o({color:m,depth:!0,width:c,height:f}),this.interactionService.on(Bu.Hover,this.pickingAllLayer.bind(this))}},{key:"boxPickLayer",value:function(){var t=Mt(he.mark(function n(i,o,a){var u=this,c,f,m,_;return he.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return c=this.rendererService,f=c.useFramebufferAsync,m=c.clear,this.resizePickingFBO(),i.hooks.beforePickingEncode.call(),A.next=5,f(this.pickingFBO,Mt(he.mark(function w(){return he.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:m({framebuffer:u.pickingFBO,color:[0,0,0,0],stencil:0,depth:1}),i.renderModels({ispick:!0});case 2:case"end":return P.stop()}},w)})));case 5:return i.hooks.afterPickingEncode.call(),A.next=8,this.pickBox(i,o);case 8:_=A.sent,a(_);case 10:case"end":return A.stop()}},n,this)}));function r(n,i,o){return t.apply(this,arguments)}return r}()},{key:"pickBox",value:function(){var t=Mt(he.mark(function n(i,o){var a=this,u,c,f,m,_,b,A,w,R,P,k,L,B,V,G,K,Z,ve,Ie,de,se;return he.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(u=o.map(function(ke){var Rt=ke<0?0:ke;return Math.floor(Rt*ul/a.pickBufferScale)}),c=Nn(u,4),f=c[0],m=c[1],_=c[2],b=c[3],A=this.rendererService,w=A.readPixelsAsync,R=A.getViewportSize,P=R(),k=P.width,L=P.height,!(f>(k-1)*ul/this.pickBufferScale||_<0||m>(L-1)*ul/this.pickBufferScale||b<0)){ye.next=5;break}return ye.abrupt("return",[]);case 5:return B=Math.min(k/this.pickBufferScale,_)-f,V=Math.min(L/this.pickBufferScale,b)-m,ye.next=9,w({x:f,y:Math.floor(L/this.pickBufferScale-(b+1)),width:B,height:V,data:new Uint8Array(B*V*4),framebuffer:this.pickingFBO});case 9:for(G=ye.sent,K=[],Z={},ve=0;ve0&&arguments[0]!==void 0?arguments[0]:!0;Ht(this,e),F(this,"autoStart",void 0),F(this,"startTime",0),F(this,"oldTime",0),F(this,"running",!1),F(this,"elapsedTime",0),this.autoStart=t}return jt(e,[{key:"start",value:function(){this.startTime=(typeof performance>"u"?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}},{key:"stop",value:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}},{key:"getElapsedTime",value:function(){return this.getDelta(),this.elapsedTime}},{key:"getDelta",value:function(){var r=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var n=(typeof performance>"u"?Date:performance).now();r=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=r}return r}}]),e}(),D8,F8,B8,L8,N8,yv,U8,z8,$8;function K2(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=woe(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function woe(e,t){if(e){if(typeof e=="string")return V8(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return V8(e,t)}}function V8(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var j8=Ci.throttle,Ioe=(D8=ai(),F8=ki(wt.IRendererService),B8=ki(wt.IMapService),L8=ki(wt.IDebugService),D8(N8=(yv=function(e){_n(r,e);var t=Coe(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a-1&&u.layerChildren.splice(c,1)):(f=this.layers.indexOf(a),f>-1&&this.layers.splice(f,1)),a.destroy(),this.reRender(),this.emit("layerChange",this.layers);case 4:case"end":return _.stop()}},o,this)}));function i(o,a){return n.apply(this,arguments)}return i}()},{key:"removeAllLayers",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:this.destroy(),this.reRender();case 2:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"setEnableRender",value:function(i){this.enableRender=i}},{key:"renderLayers",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f,m,_,b,A,w;return he.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(!(this.alreadyInRendering||!this.enableRender)){P.next=2;break}return P.abrupt("return");case 2:this.updateLayerRenderList(),a=this.debugService.generateRenderUid(),this.debugService.renderStart(a),this.alreadyInRendering=!0,this.clear(),u=K2(this.layerList);try{for(u.s();!(c=u.n()).done;)f=c.value,f.prerender()}catch(k){u.e(k)}finally{u.f()}this.renderService.beginFrame(),m=K2(this.layerList),P.prev=11,m.s();case 13:if((_=m.n()).done){P.next=25;break}if(b=_.value,A=b.getLayerConfig(),w=A.enableMask,b.masks.filter(function(k){return k.inited}).length>0&&w&&this.renderMask(b.masks),!b.getLayerConfig().enableMultiPassRenderer){P.next=22;break}return P.next=20,b.renderMultiPass();case 20:P.next=23;break;case 22:b.render();case 23:P.next=13;break;case 25:P.next=30;break;case 27:P.prev=27,P.t0=P.catch(11),m.e(P.t0);case 30:return P.prev=30,m.f(),P.finish(30);case 33:this.renderService.endFrame(),this.debugService.renderEnd(a),this.alreadyInRendering=!1;case 36:case"end":return P.stop()}},o,this,[[11,27,30,33]])}));function i(){return n.apply(this,arguments)}return i}()},{key:"renderMask",value:function(i){var o=0;this.renderService.clear({stencil:0,depth:1,framebuffer:null});var a=i.length>1?m1.MULTIPLE:m1.SINGLE,u=K2(i),c;try{for(u.s();!(c=u.n()).done;){var f=c.value;f.render({isStencil:!0,stencilType:a,stencilIndex:o++})}}catch(m){u.e(m)}finally{u.f()}}},{key:"beforeRenderData",value:function(){var n=Mt(he.mark(function o(a){var u;return he.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,a.hooks.beforeRenderData.promise();case 2:u=f.sent,u&&this.renderLayers();case 4:case"end":return f.stop()}},o,this)}));function i(o){return n.apply(this,arguments)}return i}()},{key:"renderTileLayerMask",value:function(i){var o=0,a=i.getLayerConfig(),u=a.enableMask,c=u===void 0?!0:u,f=i.tileMask?1:0,m=i.masks.filter(function(R){return R.inited});f=f+(c?m.length:1);var _=f>1?m1.MULTIPLE:m1.SINGLE;if((i.tileMask||m.length&&c)&&this.renderService.clear({stencil:0,depth:1,framebuffer:null}),m.length&&c){var b=K2(m),A;try{for(b.s();!(A=b.n()).done;){var w=A.value;w.render({isStencil:!0,stencilType:_,stencilIndex:o++})}}catch(R){b.e(R)}finally{b.f()}}i.tileMask&&i.tileMask.render({isStencil:!0,stencilType:_,stencilIndex:o++,stencilOperation:py.OR})}},{key:"renderTileLayer",value:function(){var n=Mt(he.mark(function o(a){return he.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(this.renderTileLayerMask(a),!a.getLayerConfig().enableMultiPassRenderer){c.next=6;break}return c.next=4,a.renderMultiPass();case 4:c.next=8;break;case 6:return c.next=8,a.render();case 8:case"end":return c.stop()}},o,this)}));function i(o){return n.apply(this,arguments)}return i}()},{key:"updateLayerRenderList",value:function(){var i=this;this.layerList=[],this.layers.filter(function(o){return o.inited}).filter(function(o){return o.isVisible()}).sort(function(o,a){return o.zIndex-a.zIndex}).forEach(function(o){i.layerList.push(o)})}},{key:"destroy",value:function(){this.layers.forEach(function(i){i.destroy()}),this.layers=[],this.layerList=[],this.emit("layerChange",this.layers)}},{key:"startAnimate",value:function(){this.animateInstanceCount++===0&&(this.clock.start(),this.runRender())}},{key:"stopAnimate",value:function(){--this.animateInstanceCount===0&&(this.stopRender(),this.clock.stop())}},{key:"getOESTextureFloat",value:function(){return this.renderService.extensionObject.OES_texture_float}},{key:"enableShaderPick",value:function(){this.shaderPicking=!0}},{key:"disableShaderPick",value:function(){this.shaderPicking=!1}},{key:"getShaderPickStat",value:function(){return this.shaderPicking}},{key:"clear",value:function(){var i=Ta(this.mapService.bgColor);this.renderService.clear({color:i,depth:1,stencil:0,framebuffer:null})}},{key:"runRender",value:function(){this.renderLayers(),this.layerRenderID=window.requestAnimationFrame(this.runRender.bind(this))}},{key:"stopRender",value:function(){window.cancelAnimationFrame(this.layerRenderID)}}]),r}(ju.EventEmitter),U8=mi(yv.prototype,"renderService",[F8],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),z8=mi(yv.prototype,"mapService",[B8],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$8=mi(yv.prototype,"debugService",[L8],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),yv))||N8);function Moe(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o=0)&&(r[i]=e[i]);return r}function hl(e,t){if(e==null)return{};var r=Moe(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var W=function(e){return e[e.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",e[e.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",e[e.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT",e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.SRC_COLOR=768]="SRC_COLOR",e[e.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",e[e.SRC_ALPHA=770]="SRC_ALPHA",e[e.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",e[e.DST_ALPHA=772]="DST_ALPHA",e[e.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",e[e.DST_COLOR=774]="DST_COLOR",e[e.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",e[e.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",e[e.FUNC_ADD=32774]="FUNC_ADD",e[e.BLEND_EQUATION=32777]="BLEND_EQUATION",e[e.BLEND_EQUATION_RGB=32777]="BLEND_EQUATION_RGB",e[e.BLEND_EQUATION_ALPHA=34877]="BLEND_EQUATION_ALPHA",e[e.FUNC_SUBTRACT=32778]="FUNC_SUBTRACT",e[e.FUNC_REVERSE_SUBTRACT=32779]="FUNC_REVERSE_SUBTRACT",e[e.MAX_EXT=32776]="MAX_EXT",e[e.MIN_EXT=32775]="MIN_EXT",e[e.BLEND_DST_RGB=32968]="BLEND_DST_RGB",e[e.BLEND_SRC_RGB=32969]="BLEND_SRC_RGB",e[e.BLEND_DST_ALPHA=32970]="BLEND_DST_ALPHA",e[e.BLEND_SRC_ALPHA=32971]="BLEND_SRC_ALPHA",e[e.CONSTANT_COLOR=32769]="CONSTANT_COLOR",e[e.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",e[e.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",e[e.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA",e[e.BLEND_COLOR=32773]="BLEND_COLOR",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER_BINDING=34964]="ARRAY_BUFFER_BINDING",e[e.ELEMENT_ARRAY_BUFFER_BINDING=34965]="ELEMENT_ARRAY_BUFFER_BINDING",e[e.STREAM_DRAW=35040]="STREAM_DRAW",e[e.STATIC_DRAW=35044]="STATIC_DRAW",e[e.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",e[e.BUFFER_SIZE=34660]="BUFFER_SIZE",e[e.BUFFER_USAGE=34661]="BUFFER_USAGE",e[e.CURRENT_VERTEX_ATTRIB=34342]="CURRENT_VERTEX_ATTRIB",e[e.FRONT=1028]="FRONT",e[e.BACK=1029]="BACK",e[e.FRONT_AND_BACK=1032]="FRONT_AND_BACK",e[e.CULL_FACE=2884]="CULL_FACE",e[e.BLEND=3042]="BLEND",e[e.DITHER=3024]="DITHER",e[e.STENCIL_TEST=2960]="STENCIL_TEST",e[e.DEPTH_TEST=2929]="DEPTH_TEST",e[e.SCISSOR_TEST=3089]="SCISSOR_TEST",e[e.POLYGON_OFFSET_FILL=32823]="POLYGON_OFFSET_FILL",e[e.SAMPLE_ALPHA_TO_COVERAGE=32926]="SAMPLE_ALPHA_TO_COVERAGE",e[e.SAMPLE_COVERAGE=32928]="SAMPLE_COVERAGE",e[e.NO_ERROR=0]="NO_ERROR",e[e.INVALID_ENUM=1280]="INVALID_ENUM",e[e.INVALID_VALUE=1281]="INVALID_VALUE",e[e.INVALID_OPERATION=1282]="INVALID_OPERATION",e[e.OUT_OF_MEMORY=1285]="OUT_OF_MEMORY",e[e.CW=2304]="CW",e[e.CCW=2305]="CCW",e[e.LINE_WIDTH=2849]="LINE_WIDTH",e[e.ALIASED_POINT_SIZE_RANGE=33901]="ALIASED_POINT_SIZE_RANGE",e[e.ALIASED_LINE_WIDTH_RANGE=33902]="ALIASED_LINE_WIDTH_RANGE",e[e.CULL_FACE_MODE=2885]="CULL_FACE_MODE",e[e.FRONT_FACE=2886]="FRONT_FACE",e[e.DEPTH_RANGE=2928]="DEPTH_RANGE",e[e.DEPTH_WRITEMASK=2930]="DEPTH_WRITEMASK",e[e.DEPTH_CLEAR_VALUE=2931]="DEPTH_CLEAR_VALUE",e[e.DEPTH_FUNC=2932]="DEPTH_FUNC",e[e.STENCIL_CLEAR_VALUE=2961]="STENCIL_CLEAR_VALUE",e[e.STENCIL_FUNC=2962]="STENCIL_FUNC",e[e.STENCIL_FAIL=2964]="STENCIL_FAIL",e[e.STENCIL_PASS_DEPTH_FAIL=2965]="STENCIL_PASS_DEPTH_FAIL",e[e.STENCIL_PASS_DEPTH_PASS=2966]="STENCIL_PASS_DEPTH_PASS",e[e.STENCIL_REF=2967]="STENCIL_REF",e[e.STENCIL_VALUE_MASK=2963]="STENCIL_VALUE_MASK",e[e.STENCIL_WRITEMASK=2968]="STENCIL_WRITEMASK",e[e.STENCIL_BACK_FUNC=34816]="STENCIL_BACK_FUNC",e[e.STENCIL_BACK_FAIL=34817]="STENCIL_BACK_FAIL",e[e.STENCIL_BACK_PASS_DEPTH_FAIL=34818]="STENCIL_BACK_PASS_DEPTH_FAIL",e[e.STENCIL_BACK_PASS_DEPTH_PASS=34819]="STENCIL_BACK_PASS_DEPTH_PASS",e[e.STENCIL_BACK_REF=36003]="STENCIL_BACK_REF",e[e.STENCIL_BACK_VALUE_MASK=36004]="STENCIL_BACK_VALUE_MASK",e[e.STENCIL_BACK_WRITEMASK=36005]="STENCIL_BACK_WRITEMASK",e[e.VIEWPORT=2978]="VIEWPORT",e[e.SCISSOR_BOX=3088]="SCISSOR_BOX",e[e.COLOR_CLEAR_VALUE=3106]="COLOR_CLEAR_VALUE",e[e.COLOR_WRITEMASK=3107]="COLOR_WRITEMASK",e[e.UNPACK_ALIGNMENT=3317]="UNPACK_ALIGNMENT",e[e.PACK_ALIGNMENT=3333]="PACK_ALIGNMENT",e[e.MAX_TEXTURE_SIZE=3379]="MAX_TEXTURE_SIZE",e[e.MAX_VIEWPORT_DIMS=3386]="MAX_VIEWPORT_DIMS",e[e.SUBPIXEL_BITS=3408]="SUBPIXEL_BITS",e[e.RED_BITS=3410]="RED_BITS",e[e.GREEN_BITS=3411]="GREEN_BITS",e[e.BLUE_BITS=3412]="BLUE_BITS",e[e.ALPHA_BITS=3413]="ALPHA_BITS",e[e.DEPTH_BITS=3414]="DEPTH_BITS",e[e.STENCIL_BITS=3415]="STENCIL_BITS",e[e.POLYGON_OFFSET_UNITS=10752]="POLYGON_OFFSET_UNITS",e[e.POLYGON_OFFSET_FACTOR=32824]="POLYGON_OFFSET_FACTOR",e[e.TEXTURE_BINDING_2D=32873]="TEXTURE_BINDING_2D",e[e.SAMPLE_BUFFERS=32936]="SAMPLE_BUFFERS",e[e.SAMPLES=32937]="SAMPLES",e[e.SAMPLE_COVERAGE_VALUE=32938]="SAMPLE_COVERAGE_VALUE",e[e.SAMPLE_COVERAGE_INVERT=32939]="SAMPLE_COVERAGE_INVERT",e[e.COMPRESSED_TEXTURE_FORMATS=34467]="COMPRESSED_TEXTURE_FORMATS",e[e.DONT_CARE=4352]="DONT_CARE",e[e.FASTEST=4353]="FASTEST",e[e.NICEST=4354]="NICEST",e[e.GENERATE_MIPMAP_HINT=33170]="GENERATE_MIPMAP_HINT",e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.INT=5124]="INT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.FLOAT=5126]="FLOAT",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.ALPHA=6406]="ALPHA",e[e.RGB=6407]="RGB",e[e.RGBA=6408]="RGBA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.RED=6403]="RED",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",e[e.VERTEX_SHADER=35633]="VERTEX_SHADER",e[e.MAX_VERTEX_ATTRIBS=34921]="MAX_VERTEX_ATTRIBS",e[e.MAX_VERTEX_UNIFORM_VECTORS=36347]="MAX_VERTEX_UNIFORM_VECTORS",e[e.MAX_VARYING_VECTORS=36348]="MAX_VARYING_VECTORS",e[e.MAX_COMBINED_TEXTURE_IMAGE_UNITS=35661]="MAX_COMBINED_TEXTURE_IMAGE_UNITS",e[e.MAX_VERTEX_TEXTURE_IMAGE_UNITS=35660]="MAX_VERTEX_TEXTURE_IMAGE_UNITS",e[e.MAX_TEXTURE_IMAGE_UNITS=34930]="MAX_TEXTURE_IMAGE_UNITS",e[e.MAX_FRAGMENT_UNIFORM_VECTORS=36349]="MAX_FRAGMENT_UNIFORM_VECTORS",e[e.SHADER_TYPE=35663]="SHADER_TYPE",e[e.DELETE_STATUS=35712]="DELETE_STATUS",e[e.LINK_STATUS=35714]="LINK_STATUS",e[e.VALIDATE_STATUS=35715]="VALIDATE_STATUS",e[e.ATTACHED_SHADERS=35717]="ATTACHED_SHADERS",e[e.ACTIVE_UNIFORMS=35718]="ACTIVE_UNIFORMS",e[e.ACTIVE_ATTRIBUTES=35721]="ACTIVE_ATTRIBUTES",e[e.SHADING_LANGUAGE_VERSION=35724]="SHADING_LANGUAGE_VERSION",e[e.CURRENT_PROGRAM=35725]="CURRENT_PROGRAM",e[e.NEVER=512]="NEVER",e[e.LESS=513]="LESS",e[e.EQUAL=514]="EQUAL",e[e.LEQUAL=515]="LEQUAL",e[e.GREATER=516]="GREATER",e[e.NOTEQUAL=517]="NOTEQUAL",e[e.GEQUAL=518]="GEQUAL",e[e.ALWAYS=519]="ALWAYS",e[e.KEEP=7680]="KEEP",e[e.REPLACE=7681]="REPLACE",e[e.INCR=7682]="INCR",e[e.DECR=7683]="DECR",e[e.INVERT=5386]="INVERT",e[e.INCR_WRAP=34055]="INCR_WRAP",e[e.DECR_WRAP=34056]="DECR_WRAP",e[e.VENDOR=7936]="VENDOR",e[e.RENDERER=7937]="RENDERER",e[e.VERSION=7938]="VERSION",e[e.NEAREST=9728]="NEAREST",e[e.LINEAR=9729]="LINEAR",e[e.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",e[e.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",e[e.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",e[e.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR",e[e.TEXTURE_MAG_FILTER=10240]="TEXTURE_MAG_FILTER",e[e.TEXTURE_MIN_FILTER=10241]="TEXTURE_MIN_FILTER",e[e.TEXTURE_WRAP_S=10242]="TEXTURE_WRAP_S",e[e.TEXTURE_WRAP_T=10243]="TEXTURE_WRAP_T",e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE=5890]="TEXTURE",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_BINDING_CUBE_MAP=34068]="TEXTURE_BINDING_CUBE_MAP",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e[e.MAX_CUBE_MAP_TEXTURE_SIZE=34076]="MAX_CUBE_MAP_TEXTURE_SIZE",e[e.TEXTURE0=33984]="TEXTURE0",e[e.TEXTURE1=33985]="TEXTURE1",e[e.TEXTURE2=33986]="TEXTURE2",e[e.TEXTURE3=33987]="TEXTURE3",e[e.TEXTURE4=33988]="TEXTURE4",e[e.TEXTURE5=33989]="TEXTURE5",e[e.TEXTURE6=33990]="TEXTURE6",e[e.TEXTURE7=33991]="TEXTURE7",e[e.TEXTURE8=33992]="TEXTURE8",e[e.TEXTURE9=33993]="TEXTURE9",e[e.TEXTURE10=33994]="TEXTURE10",e[e.TEXTURE11=33995]="TEXTURE11",e[e.TEXTURE12=33996]="TEXTURE12",e[e.TEXTURE13=33997]="TEXTURE13",e[e.TEXTURE14=33998]="TEXTURE14",e[e.TEXTURE15=33999]="TEXTURE15",e[e.TEXTURE16=34e3]="TEXTURE16",e[e.TEXTURE17=34001]="TEXTURE17",e[e.TEXTURE18=34002]="TEXTURE18",e[e.TEXTURE19=34003]="TEXTURE19",e[e.TEXTURE20=34004]="TEXTURE20",e[e.TEXTURE21=34005]="TEXTURE21",e[e.TEXTURE22=34006]="TEXTURE22",e[e.TEXTURE23=34007]="TEXTURE23",e[e.TEXTURE24=34008]="TEXTURE24",e[e.TEXTURE25=34009]="TEXTURE25",e[e.TEXTURE26=34010]="TEXTURE26",e[e.TEXTURE27=34011]="TEXTURE27",e[e.TEXTURE28=34012]="TEXTURE28",e[e.TEXTURE29=34013]="TEXTURE29",e[e.TEXTURE30=34014]="TEXTURE30",e[e.TEXTURE31=34015]="TEXTURE31",e[e.ACTIVE_TEXTURE=34016]="ACTIVE_TEXTURE",e[e.REPEAT=10497]="REPEAT",e[e.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35678]="SAMPLER_2D",e[e.SAMPLER_CUBE=35680]="SAMPLER_CUBE",e[e.VERTEX_ATTRIB_ARRAY_ENABLED=34338]="VERTEX_ATTRIB_ARRAY_ENABLED",e[e.VERTEX_ATTRIB_ARRAY_SIZE=34339]="VERTEX_ATTRIB_ARRAY_SIZE",e[e.VERTEX_ATTRIB_ARRAY_STRIDE=34340]="VERTEX_ATTRIB_ARRAY_STRIDE",e[e.VERTEX_ATTRIB_ARRAY_TYPE=34341]="VERTEX_ATTRIB_ARRAY_TYPE",e[e.VERTEX_ATTRIB_ARRAY_NORMALIZED=34922]="VERTEX_ATTRIB_ARRAY_NORMALIZED",e[e.VERTEX_ATTRIB_ARRAY_POINTER=34373]="VERTEX_ATTRIB_ARRAY_POINTER",e[e.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=34975]="VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",e[e.COMPILE_STATUS=35713]="COMPILE_STATUS",e[e.LOW_FLOAT=36336]="LOW_FLOAT",e[e.MEDIUM_FLOAT=36337]="MEDIUM_FLOAT",e[e.HIGH_FLOAT=36338]="HIGH_FLOAT",e[e.LOW_INT=36339]="LOW_INT",e[e.MEDIUM_INT=36340]="MEDIUM_INT",e[e.HIGH_INT=36341]="HIGH_INT",e[e.FRAMEBUFFER=36160]="FRAMEBUFFER",e[e.RENDERBUFFER=36161]="RENDERBUFFER",e[e.RGBA4=32854]="RGBA4",e[e.RGB5_A1=32855]="RGB5_A1",e[e.RGB565=36194]="RGB565",e[e.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",e[e.STENCIL_INDEX=6401]="STENCIL_INDEX",e[e.STENCIL_INDEX8=36168]="STENCIL_INDEX8",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.RENDERBUFFER_WIDTH=36162]="RENDERBUFFER_WIDTH",e[e.RENDERBUFFER_HEIGHT=36163]="RENDERBUFFER_HEIGHT",e[e.RENDERBUFFER_INTERNAL_FORMAT=36164]="RENDERBUFFER_INTERNAL_FORMAT",e[e.RENDERBUFFER_RED_SIZE=36176]="RENDERBUFFER_RED_SIZE",e[e.RENDERBUFFER_GREEN_SIZE=36177]="RENDERBUFFER_GREEN_SIZE",e[e.RENDERBUFFER_BLUE_SIZE=36178]="RENDERBUFFER_BLUE_SIZE",e[e.RENDERBUFFER_ALPHA_SIZE=36179]="RENDERBUFFER_ALPHA_SIZE",e[e.RENDERBUFFER_DEPTH_SIZE=36180]="RENDERBUFFER_DEPTH_SIZE",e[e.RENDERBUFFER_STENCIL_SIZE=36181]="RENDERBUFFER_STENCIL_SIZE",e[e.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=36048]="FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",e[e.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=36049]="FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",e[e.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=36050]="FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",e[e.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=36051]="FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",e[e.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",e[e.DEPTH_ATTACHMENT=36096]="DEPTH_ATTACHMENT",e[e.STENCIL_ATTACHMENT=36128]="STENCIL_ATTACHMENT",e[e.DEPTH_STENCIL_ATTACHMENT=33306]="DEPTH_STENCIL_ATTACHMENT",e[e.NONE=0]="NONE",e[e.FRAMEBUFFER_COMPLETE=36053]="FRAMEBUFFER_COMPLETE",e[e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=36054]="FRAMEBUFFER_INCOMPLETE_ATTACHMENT",e[e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=36055]="FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",e[e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=36057]="FRAMEBUFFER_INCOMPLETE_DIMENSIONS",e[e.FRAMEBUFFER_UNSUPPORTED=36061]="FRAMEBUFFER_UNSUPPORTED",e[e.FRAMEBUFFER_BINDING=36006]="FRAMEBUFFER_BINDING",e[e.RENDERBUFFER_BINDING=36007]="RENDERBUFFER_BINDING",e[e.MAX_RENDERBUFFER_SIZE=34024]="MAX_RENDERBUFFER_SIZE",e[e.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",e[e.UNPACK_FLIP_Y_WEBGL=37440]="UNPACK_FLIP_Y_WEBGL",e[e.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441]="UNPACK_PREMULTIPLY_ALPHA_WEBGL",e[e.CONTEXT_LOST_WEBGL=37442]="CONTEXT_LOST_WEBGL",e[e.UNPACK_COLORSPACE_CONVERSION_WEBGL=37443]="UNPACK_COLORSPACE_CONVERSION_WEBGL",e[e.BROWSER_DEFAULT_WEBGL=37444]="BROWSER_DEFAULT_WEBGL",e}({}),Poe=Ci.isNil,Ooe=function(){function e(t){var r=this;Ht(this,e),F(this,"name",void 0),F(this,"type",void 0),F(this,"scale",void 0),F(this,"descriptor",void 0),F(this,"featureBufferLayout",[]),F(this,"needRescale",!1),F(this,"needRemapping",!1),F(this,"needRegenerateVertices",!1),F(this,"featureRange",{startIndex:0,endIndex:1/0}),F(this,"vertexAttribute",void 0),F(this,"defaultCallback",function(n){if(n.length===0){var i;return((i=r.scale)===null||i===void 0?void 0:i.defaultValues)||[]}return n.map(function(o,a){var u,c=(u=r.scale)===null||u===void 0?void 0:u.scalers[a].func,f=c(o);return f})}),this.setProps(t)}return jt(e,[{key:"setProps",value:function(r){Object.assign(this,r)}},{key:"mapping",value:function(r){var n;if((n=this.scale)!==null&&n!==void 0&&n.callback){var i,o=(i=this.scale)===null||i===void 0?void 0:i.callback.apply(i,nr(r));if(!Poe(o))return[o]}return this.defaultCallback(r)}},{key:"resetDescriptor",value:function(){this.descriptor&&(this.descriptor.buffer.data=[])}}]),e}(),koe=["buffer","update","name"],Doe=["buffer","update","name"],xv,H8,G8,W8,V3,X8,Foe=(xv={},F(xv,W.FLOAT,4),F(xv,W.UNSIGNED_BYTE,1),F(xv,W.UNSIGNED_SHORT,2),xv),Boe=(H8=ai(),G8=ki(wt.IRendererService),H8(W8=(V3=function(){function e(){Ht(this,e),F(this,"attributesAndIndices",void 0),bi(this,"rendererService",X8,this),F(this,"attributes",[]),F(this,"triangulation",void 0),F(this,"featureLayout",{sizePerElement:0,elements:[]})}return jt(e,[{key:"registerStyleAttribute",value:function(r){var n=this.getLayerStyleAttribute(r.name||"");return n?n.setProps(r):(n=new Ooe(r),this.attributes.push(n)),n}},{key:"unRegisterStyleAttribute",value:function(r){var n=this.attributes.findIndex(function(i){return i.name===r});n>-1&&this.attributes.splice(n,1)}},{key:"updateScaleAttribute",value:function(r){this.attributes.forEach(function(n){var i,o=n.name,a=(i=n.scale)===null||i===void 0?void 0:i.field;(r[o]||a&&r[a])&&(n.needRescale=!0,n.needRemapping=!0,n.needRegenerateVertices=!0)})}},{key:"updateStyleAttribute",value:function(r,n,i){var o=this.getLayerStyleAttribute(r);o||(o=this.registerStyleAttribute(Qe(Qe({},n),{},{name:r})));var a=n.scale;a&&o&&(o.scale=a,o.needRescale=!0,o.needRemapping=!0,o.needRegenerateVertices=!0,i&&i.featureRange&&(o.featureRange=i.featureRange))}},{key:"getLayerStyleAttributes",value:function(){return this.attributes}},{key:"getLayerStyleAttribute",value:function(r){return this.attributes.find(function(n){return n.name===r})}},{key:"getLayerAttributeScale",value:function(r){var n,i=this.getLayerStyleAttribute(r),o=i==null||(n=i.scale)===null||n===void 0?void 0:n.scalers;return o&&o[0]?o[0].func:null}},{key:"updateAttributeByFeatureRange",value:function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,u=this.attributes.find(function(G){return G.name===r});if(u&&u.descriptor){var c=u.descriptor,f=c.update,m=c.buffer,_=c.size,b=_===void 0?0:_,A=Foe[m.type||W.FLOAT];if(f){var w=this.featureLayout,R=w.elements,P=w.sizePerElement,k=R.slice(i,o);if(!k.length)return;var L=k[0].offset,B=L*b*A,V=k.map(function(G,K){for(var Z=G.featureIdx,ve=G.vertices,Ie=G.normals,de=ve.length/P,se=[],le=0;le0&&o[o.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function eb(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n=0&&n.length%1===0}e.exports=t.default})(Rm,Rm.exports);var zu={},px={exports:{}},dx={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r){return function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];var o=n.pop();return r.call(this,n,o)}},e.exports=t.default})(dx,dx.exports);var Sp={};Object.defineProperty(Sp,"__esModule",{value:!0});Sp.fallback=hP;Sp.wrap=pP;var Loe=Sp.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,Noe=Sp.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,Uoe=Sp.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function hP(e){setTimeout(e,0)}function pP(e){return function(t){for(var r=[],n=arguments.length-1;n-- >0;)r[n]=arguments[n+1];return e(function(){return t.apply(void 0,r)})}}var Gv;Loe?Gv=queueMicrotask:Noe?Gv=setImmediate:Uoe?Gv=process.nextTick:Gv=hP;Sp.default=pP(Gv);(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r=dx.exports,n=u(r),i=Sp,o=u(i),a=zu;function u(_){return _&&_.__esModule?_:{default:_}}function c(_){return(0,a.isAsync)(_)?function(){for(var b=[],A=arguments.length;A--;)b[A]=arguments[A];var w=b.pop(),R=_.apply(this,b);return f(R,w)}:(0,n.default)(function(b,A){var w;try{w=_.apply(this,b)}catch(R){return A(R)}if(w&&typeof w.then=="function")return f(w,A);A(null,w)})}function f(_,b){return _.then(function(A){m(b,null,A)},function(A){m(b,A&&A.message?A:new Error(A))})}function m(_,b,A){try{_(b,A)}catch(w){(0,o.default)(function(R){throw R},w)}}e.exports=t.default})(px,px.exports);Object.defineProperty(zu,"__esModule",{value:!0});zu.isAsyncIterable=zu.isAsyncGenerator=zu.isAsync=void 0;var zoe=px.exports,$oe=Voe(zoe);function Voe(e){return e&&e.__esModule?e:{default:e}}function dP(e){return e[Symbol.toStringTag]==="AsyncFunction"}function joe(e){return e[Symbol.toStringTag]==="AsyncGenerator"}function Hoe(e){return typeof e[Symbol.asyncIterator]=="function"}function Goe(e){if(typeof e!="function")throw new Error("expected a function");return dP(e)?(0,$oe.default)(e):e}zu.default=Goe;zu.isAsync=dP;zu.isAsyncGenerator=joe;zu.isAsyncIterable=Hoe;var S1={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(n,i){if(i===void 0&&(i=n.length),!i)throw new Error("arity is undefined");function o(){for(var a=this,u=[],c=arguments.length;c--;)u[c]=arguments[c];return typeof u[i-1]=="function"?n.apply(this,u):new Promise(function(f,m){u[i-1]=function(_){for(var b=[],A=arguments.length-1;A-- >0;)b[A]=arguments[A+1];if(_)return m(_);f(b.length>1?b:b[0])},n.apply(a,u)})}return o}e.exports=t.default})(S1,S1.exports);(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=Rm.exports,n=c(r),i=zu,o=c(i),a=S1.exports,u=c(a);function c(f){return f&&f.__esModule?f:{default:f}}t.default=(0,u.default)(function(f,m,_){var b=(0,n.default)(m)?[]:{};f(m,function(A,w,R){(0,o.default)(A)(function(P){for(var k,L=[],B=arguments.length-1;B-- >0;)L[B]=arguments[B+1];L.length<2&&(k=L,L=k[0]),b[w]=L,R(P)})},function(A){return _(A,b)})},3),e.exports=t.default})(i_,i_.exports);var vx={exports:{}},a_={exports:{}},mx={exports:{}},Im={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(n){function i(){for(var o=[],a=arguments.length;a--;)o[a]=arguments[a];if(n!==null){var u=n;n=null,u.apply(this,o)}}return Object.assign(i,n),i}e.exports=t.default})(Im,Im.exports);var gx={exports:{}},_x={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r){return r[Symbol.iterator]&&r[Symbol.iterator]()},e.exports=t.default})(_x,_x.exports);(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r=Rm.exports,n=a(r),i=_x.exports,o=a(i);function a(_){return _&&_.__esModule?_:{default:_}}function u(_){var b=-1,A=_.length;return function(){return++b=u||b||m||(b=!0,a.next().then(function(L){var B=L.value,V=L.done;if(!(_||m)){if(b=!1,V){m=!0,A<=0&&f(null);return}A++,c(B,w,P),w++,R()}}).catch(k))}function P(L,B){if(A-=1,!_){if(L)return k(L);if(L===!1){m=!0,_=!0;return}if(B===n.default||m&&A<=0)return m=!0,f(null);R()}}function k(L){_||(b=!1,m=!0,f(L))}R()}e.exports=t.default})(yx,yx.exports);(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=Im.exports,n=A(r),i=gx.exports,o=A(i),a=Mm.exports,u=A(a),c=zu,f=yx.exports,m=A(f),_=Pm.exports,b=A(_);function A(w){return w&&w.__esModule?w:{default:w}}t.default=function(w){return function(R,P,k){if(k=(0,n.default)(k),w<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!R)return k(null);if((0,c.isAsyncGenerator)(R))return(0,m.default)(R,w,P,k);if((0,c.isAsyncIterable)(R))return(0,m.default)(R[Symbol.asyncIterator](),w,P,k);var L=(0,o.default)(R),B=!1,V=!1,G=0,K=!1;function Z(Ie,de){if(!V)if(G-=1,Ie)B=!0,k(Ie);else if(Ie===!1)B=!0,V=!0;else{if(de===b.default||B&&G<=0)return B=!0,k(null);K||ve()}}function ve(){for(K=!0;G0;)L[B]=arguments[B+1];if(k!==!1){if(k||w===b.length)return A.apply(void 0,[k].concat(L));R(L)}}R([])}t.default=(0,f.default)(_),e.exports=t.default})(bx,bx.exports);var Woe=fP(bx.exports),Z8=function(){function e(){this.tasks=[]}return e.prototype.call=function(){return dy(this.tasks)},e.prototype.tap=function(t,r){this.tasks.push(function(n){var i=r();n(i,t)})},e}(),Xoe=function(){function e(){this.args=[],this.tasks=[]}return e.prototype.promise=function(){for(var t=arguments,r=[],n=0;n";while(a[0]);return i>4?i:n}();return e===r};_P.isLegacyOpera=function(){return!!window.opera};var yP=gP.exports,xP={exports:{}},rse=xP.exports={};rse.getOption=nse;function nse(e,t,r){var n=e[t];return n==null&&r!==void 0?r:n}var ise=xP.exports,q8=ise,ase=function(t){t=t||{};var r=t.reporter,n=q8.getOption(t,"async",!0),i=q8.getOption(t,"auto",!0);i&&!n&&(r&&r.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var o=K8(),a,u=!1;function c(w,R){!u&&i&&n&&o.size()===0&&_(),o.add(w,R)}function f(){for(u=!0;o.size();){var w=o;o=K8(),w.process()}u=!1}function m(w){u||(w===void 0&&(w=n),a&&(b(a),a=null),w?_():f())}function _(){a=A(f)}function b(w){var R=clearTimeout;return R(w)}function A(w){var R=function(P){return setTimeout(P,0)};return R(w)}return{add:c,force:m}};function K8(){var e={},t=0,r=0,n=0;function i(u,c){c||(c=u,u=0),u>r?r=u:u div::-webkit-scrollbar { "+f(["display: none"])+` } `,de+="."+Ie+" { "+f(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+ve,"animation-name: "+ve])+` } `,de+="@-webkit-keyframes "+ve+` { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } } `,de+="@keyframes "+ve+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",Z(de)}}function b(V){V.className+=" "+u+"_animation_active"}function A(V,G,K){if(V.addEventListener)V.addEventListener(G,K);else if(V.attachEvent)V.attachEvent("on"+G,K);else return t.error("[scroll] Don't know how to add event listeners.")}function w(V,G,K){if(V.removeEventListener)V.removeEventListener(G,K);else if(V.detachEvent)V.detachEvent("on"+G,K);else return t.error("[scroll] Don't know how to remove event listeners.")}function R(V){return n(V).container.childNodes[0].childNodes[0].childNodes[0]}function P(V){return n(V).container.childNodes[0].childNodes[0].childNodes[1]}function k(V,G){var K=n(V).listeners;if(!K.push)throw new Error("Cannot add listener to an element that is not detectable.");n(V).listeners.push(G)}function L(V,G,K){K||(K=G,G=V,V=null),V=V||{};function Z(){if(V.debug){var Je=Array.prototype.slice.call(arguments);if(Je.unshift(i.get(G),"Scroll: "),t.log.apply)t.log.apply(null,Je);else for(var Qt=0;Qt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Ase=(rS=ai(),nS=ki(wt.SceneID),iS=ki(wt.IIconService),aS=ki(wt.IFontService),oS=ki(wt.IControlService),sS=ki(wt.IGlobalConfigService),uS=ki(wt.IMapService),lS=ki(wt.ICoordinateSystemService),cS=ki(wt.IRendererService),fS=ki(wt.ILayerService),hS=ki(wt.IDebugService),pS=ki(wt.ICameraService),dS=ki(wt.IInteractionService),vS=ki(wt.IPickingService),mS=ki(wt.IShaderModuleService),gS=ki(wt.IMarkerService),_S=ki(wt.IPopupService),rS(yS=(As=function(e){_n(r,e);var t=Ese(r);function r(){var n;return Ht(this,r),n=t.call(this),F($e(n),"destroyed",!1),F($e(n),"loaded",!1),bi($e(n),"id",xS,$e(n)),bi($e(n),"iconService",bS,$e(n)),bi($e(n),"fontService",ES,$e(n)),bi($e(n),"controlService",SS,$e(n)),bi($e(n),"configService",AS,$e(n)),bi($e(n),"map",TS,$e(n)),bi($e(n),"coordinateSystemService",wS,$e(n)),bi($e(n),"rendererService",CS,$e(n)),bi($e(n),"layerService",RS,$e(n)),bi($e(n),"debugService",IS,$e(n)),bi($e(n),"cameraService",MS,$e(n)),bi($e(n),"interactionService",PS,$e(n)),bi($e(n),"pickingService",OS,$e(n)),bi($e(n),"shaderModuleService",kS,$e(n)),bi($e(n),"markerService",DS,$e(n)),bi($e(n),"popupService",FS,$e(n)),F($e(n),"inited",!1),F($e(n),"rendering",!1),F($e(n),"$container",void 0),F($e(n),"canvas",void 0),F($e(n),"markerContainer",void 0),F($e(n),"resizeDetector",void 0),F($e(n),"hooks",void 0),F($e(n),"handleWindowResized",function(){n.emit("resize"),n.$container&&(n.initContainer(),n.coordinateSystemService.needRefresh=!0,n.render())}),F($e(n),"handleMapCameraChanged",function(i){n.cameraService.update(i),n.render()}),n.hooks={init:new Xoe},n}return jt(r,[{key:"init",value:function(i){var o=this;this.configService.setSceneConfig(this.id,i),this.shaderModuleService.registerBuiltinModules(),this.iconService.init(),this.iconService.on("imageUpdate",function(){return o.render()}),this.fontService.init(),this.hooks.init.tapPromise("initMap",Mt(he.mark(function a(){return he.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return o.debugService.log("map.mapInitStart",{type:o.map.version}),c.next=3,new Promise(function(f){o.map.onCameraChanged(function(m){o.cameraService.init(),o.cameraService.update(m),f()}),o.map.init()});case 3:o.map.onCameraChanged(o.handleMapCameraChanged),o.map.addMarkerContainer(),o.markerService.addMarkers(),o.markerService.addMarkerLayers(),o.popupService.initPopup(),o.interactionService.init(),o.interactionService.on(Bu.Drag,o.addSceneEvent.bind(o));case 10:case"end":return c.stop()}},a)}))),this.hooks.init.tapPromise("initRenderer",Mt(he.mark(function a(){var u,c,f;return he.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(c=((u=o.map)===null||u===void 0?void 0:u.getOverlayContainer())||void 0,c?o.$container=c:o.$container=xoe(o.configService.getSceneConfig(o.id).id||""),!o.$container){_.next=14;break}return o.canvas=fl("canvas","",o.$container),o.setCanvas(),_.next=7,o.rendererService.init(o.canvas,o.configService.getSceneConfig(o.id),i.gl);case 7:o.registerContextLost(),o.initContainer(),o.resizeDetector=bse({strategy:"scroll"}),o.resizeDetector.listenTo(o.$container,o.handleWindowResized),window.matchMedia&&((f=window.matchMedia("screen and (-webkit-min-device-pixel-ratio: 1.5)"))===null||f===void 0||f.addListener(o.handleWindowResized.bind("screen"))),_.next=15;break;case 14:console.error("容器 id 不存在");case 15:o.pickingService.init(o.id);case 16:case"end":return _.stop()}},a)}))),this.render()}},{key:"registerContextLost",value:function(){var i=this,o=this.rendererService.getCanvas();o&&o.addEventListener("webglcontextlost",function(){return i.emit("webglcontextlost")})}},{key:"addLayer",value:function(i){this.layerService.sceneService=this,this.layerService.add(i)}},{key:"addMask",value:function(i){this.layerService.sceneService=this,this.layerService.addMask(i)}},{key:"render",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(!(this.rendering||this.destroyed)){u.next=2;break}return u.abrupt("return");case 2:if(this.rendering=!0,this.inited){u.next=16;break}return u.next=6,this.hooks.init.promise();case 6:return this.destroyed&&this.destroy(),u.next=9,this.layerService.initLayers();case 9:this.layerService.renderLayers(),this.controlService.addControls(),this.loaded=!0,this.emit("loaded"),this.inited=!0,u.next=20;break;case 16:return u.next=18,this.layerService.initLayers();case 18:return u.next=20,this.layerService.renderLayers();case 20:this.rendering=!1;case 21:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"addFontFace",value:function(i,o){this.fontService.addFontFace(i,o)}},{key:"getSceneContainer",value:function(){return this.$container}},{key:"exportPng",value:function(){var n=Mt(he.mark(function o(a){var u,c,f;return he.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return c=(u=this.$container)===null||u===void 0?void 0:u.getElementsByTagName("canvas")[0],_.next=3,this.render();case 3:return f=a==="jpg"?c==null?void 0:c.toDataURL("image/jpeg"):c==null?void 0:c.toDataURL("image/png"),_.abrupt("return",f);case 5:case"end":return _.stop()}},o,this)}));function i(o){return n.apply(this,arguments)}return i}()},{key:"getSceneConfig",value:function(){return this.configService.getSceneConfig(this.id)}},{key:"getPointSizeRange",value:function(){return this.rendererService.getPointSizeRange()}},{key:"addMarkerContainer",value:function(){var i=this.$container.parentElement;i!==null&&(this.markerContainer=fl("div","l7-marker-container",i))}},{key:"getMarkerContainer",value:function(){return this.markerContainer}},{key:"destroy",value:function(){var i=this,o;if(!this.inited){this.destroyed=!0;return}this.resizeDetector.removeListener(this.$container,this.handleWindowResized),this.pickingService.destroy(),this.layerService.destroy(),this.interactionService.destroy(),this.controlService.destroy(),this.markerService.destroy(),this.fontService.destroy(),this.iconService.destroy(),this.removeAllListeners(),this.inited=!1,this.map.destroy(),setTimeout(function(){var a;(a=i.$container)===null||a===void 0||a.removeChild(i.canvas),i.canvas=null,i.rendererService.destroy()}),(o=this.$container)===null||o===void 0||(o=o.parentNode)===null||o===void 0||o.removeChild(this.$container),this.emit("destroy")}},{key:"initContainer",value:function(){var i,o,a=ul,u=((i=this.$container)===null||i===void 0?void 0:i.clientWidth)||400,c=((o=this.$container)===null||o===void 0?void 0:o.clientHeight)||300,f=this.canvas;f&&(f.width=u*a,f.height=c*a),this.rendererService.viewport({x:0,y:0,width:a*u,height:a*c})}},{key:"setCanvas",value:function(){var i,o,a=ul,u=((i=this.$container)===null||i===void 0?void 0:i.clientWidth)||400,c=((o=this.$container)===null||o===void 0?void 0:o.clientHeight)||300,f=this.canvas;f.width=u*a,f.height=c*a,f.style.width="100%",f.style.height="100%"}},{key:"addSceneEvent",value:function(i){this.emit(i.type,i)}}]),r}(ju.EventEmitter),xS=mi(As.prototype,"id",[nS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),bS=mi(As.prototype,"iconService",[iS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ES=mi(As.prototype,"fontService",[aS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),SS=mi(As.prototype,"controlService",[oS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),AS=mi(As.prototype,"configService",[sS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),TS=mi(As.prototype,"map",[uS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),wS=mi(As.prototype,"coordinateSystemService",[lS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),CS=mi(As.prototype,"rendererService",[cS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),RS=mi(As.prototype,"layerService",[fS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),IS=mi(As.prototype,"debugService",[hS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),MS=mi(As.prototype,"cameraService",[pS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),PS=mi(As.prototype,"interactionService",[dS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),OS=mi(As.prototype,"pickingService",[vS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),kS=mi(As.prototype,"shaderModuleService",[mS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),DS=mi(As.prototype,"markerService",[gS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),FS=mi(As.prototype,"popupService",[_S],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),As))||yS);function Tse(e){var t=0;switch(e){case"vec2":case"ivec2":t=2;break;case"vec3":case"ivec3":t=3;break;case"vec4":case"ivec4":case"mat2":t=4;break;case"mat3":t=9;break;case"mat4":t=16;break}return t}var EP=/uniform\s+(bool|float|int|vec2|vec3|vec4|ivec2|ivec3|ivec4|mat2|mat3|mat4|sampler2D|samplerCube)\s+([\s\S]*?);/g;function BS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r={};return e=e.replace(EP,function(n,i,o){var a=o.split(":"),u=a[0].trim(),c="";switch(a.length>1&&(c=a[1].trim()),i){case"bool":c=c==="true";break;case"float":case"int":c=Number(c);break;case"vec2":case"vec3":case"vec4":case"ivec2":case"ivec3":case"ivec4":case"mat2":case"mat3":case"mat4":c?c=c.replace("[","").replace("]","").split(",").reduce(function(f,m){return f.push(Number(m.trim())),f},[]):c=new Array(Tse(i)).fill(0);break}return r[u]=c,"".concat(t?"uniform ":"").concat(i," ").concat(u,`; `)}),{content:e,uniforms:r}}function j3(e){var t=BS(e,!0),r=t.content,n=t.uniforms;return r=r.replace(/(\s*uniform\s*.*\s*){((?:\s*.*\s*)*?)};/g,function(i,o,a){a=a.trim().replace(/^.*$/gm,function(m){return"uniform ".concat(m)});var u=BS(a),c=u.content,f=u.uniforms;return Object.assign(n,f),"".concat(o,`{ `).concat(c,` };`)}),{content:r,uniforms:n}}function LS(e){var t={};return e.replace(EP,function(r,n,i){var o=i.trim();return t[o]?"":(t[o]=!0,"uniform ".concat(n," ").concat(o,`; `))})}var NS,US,wse=Ci.uniq,zS="#define PI 3.14159265359",Cse=`#define SHIFT_RIGHT17 1.0 / 131072.0 #define SHIFT_RIGHT18 1.0 / 262144.0 #define SHIFT_RIGHT19 1.0 / 524288.0 #define SHIFT_RIGHT20 1.0 / 1048576.0 #define SHIFT_RIGHT21 1.0 / 2097152.0 #define SHIFT_RIGHT22 1.0 / 4194304.0 #define SHIFT_RIGHT23 1.0 / 8388608.0 #define SHIFT_RIGHT24 1.0 / 16777216.0 #define SHIFT_LEFT17 131072.0 #define SHIFT_LEFT18 262144.0 #define SHIFT_LEFT19 524288.0 #define SHIFT_LEFT20 1048576.0 #define SHIFT_LEFT21 2097152.0 #define SHIFT_LEFT22 4194304.0 #define SHIFT_LEFT23 8388608.0 #define SHIFT_LEFT24 16777216.0 vec2 unpack_float(float packedValue) { int packedIntValue = int(packedValue); int v0 = packedIntValue / 256; return vec2(v0, packedIntValue - v0 * 256); } vec4 decode_color(vec2 encodedColor) { return vec4( unpack_float(encodedColor[0]) / 255.0, unpack_float(encodedColor[1]) / 255.0 ); } `,$S=`layout(std140) uniform SceneUniforms { mat4 u_ViewMatrix; mat4 u_ProjectionMatrix; mat4 u_ViewProjectionMatrix; mat4 u_ModelMatrix; vec4 u_ViewportCenterProjection; vec3 u_PixelsPerDegree; float u_Zoom; vec3 u_PixelsPerDegree2; float u_ZoomScale; vec3 u_PixelsPerMeter; float u_CoordinateSystem; vec3 u_CameraPosition; float u_DevicePixelRatio; vec2 u_ViewportCenter; vec2 u_ViewportSize; float u_FocalDistance; }; layout(std140) uniform LayerUniforms { mat4 u_Mvp; vec2 u_sceneCenterMercator; }; `,VS=`layout(std140) uniform PickingUniforms { vec4 u_HighlightColor; vec4 u_SelectColor; vec3 u_PickingColor; float u_PickingStage; vec3 u_CurrentSelectedId; float u_PickingThreshold; float u_PickingBuffer; float u_shaderPick; float u_EnableSelect; float u_activeMix; };`,Rse=`#define ambientRatio 0.5 #define diffuseRatio 0.3 #define specularRatio 0.2 float calc_lighting(vec4 pos) { vec3 worldPos = vec3(pos * u_ModelMatrix); vec3 worldNormal = a_Normal; // //cal light weight vec3 viewDir = normalize(u_CameraPosition - worldPos); vec3 lightDir = normalize(vec3(1, -10.5, 12)); vec3 halfDir = normalize(viewDir+lightDir); // //lambert float lambert = dot(worldNormal, lightDir); //specular float specular = pow(max(0.0, dot(worldNormal, halfDir)), 32.0); //sum to light weight float lightWeight = ambientRatio + diffuseRatio * lambert + specularRatio * specular; return lightWeight; } `,Ise=`// Blinn-Phong model // apply lighting in vertex shader instead of fragment shader // @see https://learnopengl.com/Advanced-Lighting/Advanced-Lighting uniform float u_Ambient : 1.0; uniform float u_Diffuse : 1.0; uniform float u_Specular : 1.0; uniform int u_NumOfDirectionalLights : 1; uniform int u_NumOfSpotLights : 0; #define SHININESS 32.0 #define MAX_NUM_OF_DIRECTIONAL_LIGHTS 3 #define MAX_NUM_OF_SPOT_LIGHTS 3 struct DirectionalLight { vec3 direction; vec3 ambient; vec3 diffuse; vec3 specular; }; struct SpotLight { vec3 position; vec3 direction; vec3 ambient; vec3 diffuse; vec3 specular; float constant; float linear; float quadratic; float angle; float blur; float exponent; }; uniform DirectionalLight u_DirectionalLights[MAX_NUM_OF_DIRECTIONAL_LIGHTS]; uniform SpotLight u_SpotLights[MAX_NUM_OF_SPOT_LIGHTS]; vec3 calc_directional_light(DirectionalLight light, vec3 normal, vec3 viewDir) { vec3 lightDir = normalize(light.direction); // diffuse shading float diff = max(dot(normal, lightDir), 0.0); // Blinn-Phong specular shading vec3 halfwayDir = normalize(lightDir + viewDir); float spec = pow(max(dot(normal, halfwayDir), 0.0), SHININESS); vec3 ambient = light.ambient * u_Ambient; vec3 diffuse = light.diffuse * diff * u_Diffuse; vec3 specular = light.specular * spec * u_Specular; return ambient + diffuse + specular; } vec3 calc_lighting(vec3 position, vec3 normal, vec3 viewDir) { vec3 weight = vec3(0.0); for (int i = 0; i < MAX_NUM_OF_DIRECTIONAL_LIGHTS; i++) { if (i >= u_NumOfDirectionalLights) { break; } weight += calc_directional_light(u_DirectionalLights[i], normal, viewDir); } return weight; } `,Mse=` in vec4 v_PickingResult; #pragma include "picking_uniforms" #define PICKING_NONE 0.0 #define PICKING_ENCODE 1.0 #define PICKING_HIGHLIGHT 2.0 #define COLOR_SCALE 1. / 255. #define HIGHLIGHT 1.0 #define SELECT 2.0 /* * Returns highlight color if this item is selected. */ vec4 filterHighlightColor(vec4 color, float weight) { // float selected = v_PickingResult.a; bool selected = bool(v_PickingResult.a); // if (selected == SELECT) { if (selected) { // // 点击选中状态 // vec4 selectColor = u_SelectColor * COLOR_SCALE; // return selectColor; // } else if (selected == HIGHLIGHT) { // // hover 高亮状态 vec4 highLightColor = u_HighlightColor * COLOR_SCALE; float highLightAlpha = highLightColor.a; float highLightRatio = highLightAlpha / (highLightAlpha + color.a * (1.0 - highLightAlpha)); vec3 resultRGB = mix(color.rgb, highLightColor.rgb, highLightRatio); return vec4(mix(resultRGB * weight, color.rgb, u_activeMix), color.a); } else { return color; } } /* * Returns picking color if picking enabled else unmodified argument. */ vec4 filterPickingColor(vec4 color) { vec3 pickingColor = v_PickingResult.rgb; if (u_PickingStage == PICKING_ENCODE && length(pickingColor) < 0.001) { discard; } return u_PickingStage == PICKING_ENCODE ? vec4(pickingColor, step(0.001,color.a)): color; } /* * Returns picking color if picking is enabled if not * highlight color if this item is selected, otherwise unmodified argument. */ vec4 filterColor(vec4 color) { // 过滤多余的 shader 计算 // return color; if(u_shaderPick < 0.5) { return color; // 暂时去除 直接取消计算在选中时拖拽地图会有问题 } else { return filterPickingColor(filterHighlightColor(color, 1.0)); } } vec4 filterColorAlpha(vec4 color, float alpha) { // 过滤多余的 shader 计算 // return color; if(u_shaderPick < 0.5) { return color; // 暂时去除 直接取消计算在选中时拖拽地图会有问题 } else { return filterPickingColor(filterHighlightColor(color, alpha)); } } `,Pse=`layout(location = 3) in vec3 a_PickingColor; out vec4 v_PickingResult; #pragma include "picking_uniforms" #define PICKING_NONE 0.0 #define PICKING_ENCODE 1.0 #define PICKING_HIGHLIGHT 2.0 #define COLOR_SCALE 1. / 255. #define NORMAL 0.0 #define HIGHLIGHT 1.0 #define SELECT 2.0 bool isVertexPicked(vec3 vertexColor) { return distance(vertexColor,u_PickingColor.rgb) < 0.01; } // 判断当前点是否已经被 select 选中 bool isVertexSelected(vec3 vertexColor) { return distance(vertexColor,u_CurrentSelectedId.rgb) < 0.01; } void setPickingColor(vec3 pickingColor) { if(u_shaderPick < 0.5) { return; } // compares only in highlight stage v_PickingResult.a = float((u_PickingStage == PICKING_HIGHLIGHT) && isVertexPicked(pickingColor)); // Stores the picking color so that the fragment shader can render it during picking v_PickingResult.rgb = pickingColor * COLOR_SCALE; } float setPickingSize(float x) { return u_PickingStage == PICKING_ENCODE ? x + u_PickingBuffer : x; } float setPickingOrder(float z) { bool selected = bool(v_PickingResult.a); return selected ? z + 1. : 0.; } `,Ose=` #define E 2.718281828459045 vec2 ProjectFlat(vec2 lnglat){ float maxs=85.0511287798; float lat=max(min(maxs,lnglat.y),-maxs); float scale= 268435456.; float d=PI/180.; float x=lnglat.x*d; float y=lat*d; y=log(tan((PI/4.)+(y/2.))); float a=.5/PI, b=.5, c=-.5/PI; d=.5; x=scale*(a*x+b); y=scale*(c*y+d); return vec2(x,y); } vec2 unProjectFlat(vec2 px){ float a=.5/PI; float b=.5; float c=-.5/PI; float d=.5; float scale = 268435456.; float x=(px.x/scale-b)/a; float y=(px.y/scale-d)/c; y=(atan(pow(E,y))-(PI/4.))*2.; d=PI/180.; float lat=y/d; float lng=x/d; return vec2(lng,lat); } float pixelDistance(vec2 from, vec2 to) { vec2 a1 = ProjectFlat(from); vec2 b1 = ProjectFlat(to); return distance(a1, b1); } // gaode2.0 vec2 customProject(vec2 lnglat) { // 经纬度 => 平面坐标 float t = lnglat.x; float e = lnglat.y; float Sm = 180.0 / PI; float Tm = 6378137.0; float Rm = PI / 180.0; float r = 85.0511287798; e = max(min(r, e), -r); t *= Rm; e *= Rm; e = log(tan(PI / 4.0 + e / 2.0)); return vec2(t * Tm, e * Tm); } vec2 unProjCustomCoord(vec2 point) { // 平面坐标 => 经纬度 float Sm = 57.29577951308232; //180 / Math.PI float Tm = 6378137.0; float t = point.x; float e = point.y; return vec2(t / Tm * Sm, (2.0 * atan(exp(e / Tm)) - PI / 2.0) * Sm); } float customPixelDistance(vec2 from, vec2 to) { vec2 a1 = ProjectFlat(from); vec2 b1 = ProjectFlat(to); return distance(a1, b1); }`,jS=`#define TILE_SIZE 512.0 #define PI 3.1415926536 #define WORLD_SCALE TILE_SIZE / (PI * 2.0) #define EARTH_CIRCUMFERENCE 40.03e6 #define COORDINATE_SYSTEM_LNGLAT 1.0 // mapbox #define COORDINATE_SYSTEM_LNGLAT_OFFSET 2.0 // mapbox offset #define COORDINATE_SYSTEM_VECTOR_TILE 3.0 #define COORDINATE_SYSTEM_IDENTITY 4.0 #define COORDINATE_SYSTEM_P20 5.0 // amap #define COORDINATE_SYSTEM_P20_OFFSET 6.0 // amap offset #define COORDINATE_SYSTEM_METER_OFFSET 7.0 #define COORDINATE_SYSTEM_P20_2 8.0 // amap2.0 #pragma include "scene_uniforms" // web mercator coords -> world coords vec2 project_mercator(vec2 lnglat) { if (u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.0 return lnglat; } float x = lnglat.x; return vec2( radians(x) + PI, PI - log(tan(PI * 0.25 + radians(lnglat.y) * 0.5)) ); } float project_scale(float meters) { return meters * u_PixelsPerMeter.z; } // offset coords -> world coords vec4 project_offset(vec4 offset) { float dy = offset.y; dy = clamp(dy, -1., 1.); vec3 pixels_per_unit = u_PixelsPerDegree + u_PixelsPerDegree2 * dy; return vec4(offset.xyz * pixels_per_unit, offset.w); } vec3 project_normal(vec3 normal) { vec4 normal_modelspace = u_ModelMatrix * vec4(normal, 0.0); return normalize(normal_modelspace.xyz * u_PixelsPerMeter); } vec3 project_offset_normal(vec3 vector) { if (u_CoordinateSystem < COORDINATE_SYSTEM_LNGLAT + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_LNGLAT - 0.01 || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { // normals generated by the polygon tesselator are in lnglat offsets instead of meters return normalize(vector * u_PixelsPerDegree); } return project_normal(vector); } // || u_CoordinateSystem < COORDINATE_SYSTEM_P20_OFFSET + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_P20_OFFSET - 0.01 // reverse Y vec3 reverse_offset_normal(vec3 vector) { if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 ||u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET ) { return vector * vec3(1.0, -1.0, 1.0); } if (u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.0 return vector; } return vector; } vec4 project_mvt_offset_position(vec4 position) { float a = COORDINATE_SYSTEM_LNGLAT_OFFSET; float b = COORDINATE_SYSTEM_P20_OFFSET; float c = COORDINATE_SYSTEM_LNGLAT; if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { return project_offset(vec4(0.0, 0.0, position.z, position.w)); } if (u_CoordinateSystem < COORDINATE_SYSTEM_LNGLAT + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_LNGLAT - 0.01) { return vec4( project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale, project_scale(position.z), position.w ); } return position; } vec4 project_position(vec4 position) { float a = COORDINATE_SYSTEM_LNGLAT_OFFSET; float b = COORDINATE_SYSTEM_P20_OFFSET; float c = COORDINATE_SYSTEM_LNGLAT; if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { float X = position.x - u_ViewportCenter.x; float Y = position.y - u_ViewportCenter.y; return project_offset(vec4(X, Y, position.z, position.w)); } if (u_CoordinateSystem < COORDINATE_SYSTEM_LNGLAT + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_LNGLAT - 0.01) { return vec4( project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale, project_scale(position.z), position.w ); } if (u_CoordinateSystem == COORDINATE_SYSTEM_P20) { return vec4( (project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale - vec2(215440491., 106744817.)) * vec2(1., -1.), project_scale(position.z), position.w ); } // if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // return vec4( // position.xy, // project_scale(position.z), // position.w); // } return position; // TODO: 瓦片坐标系 & 常规世界坐标系 } vec2 project_pixel_size_to_clipspace(vec2 pixels) { vec2 offset = pixels / u_ViewportSize * u_DevicePixelRatio * 2.0; return offset * u_FocalDistance; } float project_pixel_allmap(float pixel) { if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT) { return pixel * pow(2.0, u_Zoom); } return pixel * u_FocalDistance ; } // 适配纹理贴图的等像素大小 float project_pixel_texture(float pixel) { // mapbox zoom > 12 if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { return pixel * pow(0.5, u_Zoom) * u_FocalDistance ; } // amap2 zoom > 12 if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom))* u_FocalDistance ; } // amap zoom > 12 if (u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { return pixel * pow(0.5, u_Zoom)* u_FocalDistance ; } // amap zoom < 12 if (u_CoordinateSystem == COORDINATE_SYSTEM_P20) { return pixel * pow(2.0, (20.0 - u_Zoom))* u_FocalDistance ; } return pixel * 2.0 * u_FocalDistance;; } // 在不论什么底图下需要统一处理的时候使用 float project_float_pixel(float pixel) { if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { // mapbox P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1 return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ; } if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { // amap P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1 return pixel * pow(2.0, (19.0 - u_Zoom)); } if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // amap2 P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3 return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom))* u_FocalDistance ; } return pixel * u_FocalDistance; } // Project meter into the unit of pixel which used in the camera world space float project_float_meter(float meter) { if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { // Since the zoom level uniform is updated by mapservice and it's alread been subtracted by 1 // Not sure if we are supposed to do that again return meter; } else { return project_float_pixel(meter); } // TODO: change the following code to make adaptations for amap // return u_FocalDistance * TILE_SIZE * pow(2.0, u_Zoom) * meter / EARTH_CIRCUMFERENCE; } float project_pixel(float pixel) { if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { // amap P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1 return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ; } if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // amap2 P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3 return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom)) * u_FocalDistance ; } return pixel * u_FocalDistance; } vec2 project_pixel(vec2 pixel) { if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1 return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ; } if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3 return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom)) * u_FocalDistance ; } return pixel * -1. * u_FocalDistance; } vec3 project_pixel(vec3 pixel) { if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1 return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ; } if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3 return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom)) * u_FocalDistance ; } return pixel * -1. * u_FocalDistance; } vec4 project_common_position_to_clipspace(vec4 position, mat4 viewProjectionMatrix, vec4 center) { if (u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { // Needs to be divided with project_uCommonUnitsPerMeter position.w *= u_PixelsPerMeter.z; } return viewProjectionMatrix * position + center; } // Projects from common space coordinates to clip space vec4 project_common_position_to_clipspace(vec4 position) { return project_common_position_to_clipspace( position, u_ViewProjectionMatrix, u_ViewportCenterProjection ); } vec4 unproject_clipspace_to_position(vec4 clipspacePos, mat4 u_InverseViewProjectionMatrix) { vec4 pos = u_InverseViewProjectionMatrix * (clipspacePos - u_ViewportCenterProjection); if (u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { // Needs to be divided with project_uCommonUnitsPerMeter pos.w = pos.w / u_PixelsPerMeter.z; } return pos; } bool isEqual( float a, float b) { return a< b + 0.001 && a > b - 0.001; } // 支持 GaodeV2、Mapbox vec4 project_common_position_to_clipspace_v2(vec4 position) { if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x return u_Mvp * position; } else { return project_common_position_to_clipspace(position); } } `,kse=`vec2 rotate_matrix(vec2 v, float a) { float b = a / 180.0 * 3.1415926535897932384626433832795; float s = sin(b); float c = cos(b); mat2 m = mat2(c, s, -s, c); return m * v; }`,Dse=`/** * 2D signed distance field functions * @see http://www.iquilezles.org/www/articles/distfunctions2d/distfunctions2d.htm */ float ndot(vec2 a, vec2 b ) { return a.x*b.x - a.y*b.y; } float sdCircle(vec2 p, float r) { return length(p) - r; } float sdEquilateralTriangle(vec2 p) { float k = sqrt(3.0); p.x = abs(p.x) - 1.0; p.y = p.y + 1.0/k; if( p.x + k*p.y > 0.0 ) p = vec2(p.x-k*p.y,-k*p.x-p.y)/2.0; p.x -= clamp( p.x, -2.0, 0.0 ); return -length(p)*sign(p.y); } float sdBox(vec2 p, vec2 b) { vec2 d = abs(p)-b; return length(max(d,vec2(0))) + min(max(d.x,d.y),0.0); } float sdPentagon(vec2 p, float r) { vec3 k = vec3(0.809016994,0.587785252,0.726542528); p.x = abs(p.x); p -= 2.0*min(dot(vec2(-k.x,k.y),p),0.0)*vec2(-k.x,k.y); p -= 2.0*min(dot(vec2( k.x,k.y),p),0.0)*vec2( k.x,k.y); p -= vec2(clamp(p.x,-r*k.z,r*k.z),r); return length(p)*sign(p.y); } float sdHexagon(vec2 p, float r) { vec3 k = vec3(-0.866025404,0.5,0.577350269); p = abs(p); p -= 2.0*min(dot(k.xy,p),0.0)*k.xy; p -= vec2(clamp(p.x, -k.z*r, k.z*r), r); return length(p)*sign(p.y); } float sdOctogon(vec2 p, float r) { vec3 k = vec3(-0.9238795325, 0.3826834323, 0.4142135623 ); p = abs(p); p -= 2.0*min(dot(vec2( k.x,k.y),p),0.0)*vec2( k.x,k.y); p -= 2.0*min(dot(vec2(-k.x,k.y),p),0.0)*vec2(-k.x,k.y); p -= vec2(clamp(p.x, -k.z*r, k.z*r), r); return length(p)*sign(p.y); } float sdHexagram(vec2 p, float r) { vec4 k=vec4(-0.5,0.8660254038,0.5773502692,1.7320508076); p = abs(p); p -= 2.0*min(dot(k.xy,p),0.0)*k.xy; p -= 2.0*min(dot(k.yx,p),0.0)*k.yx; p -= vec2(clamp(p.x,r*k.z,r*k.w),r); return length(p)*sign(p.y); } float sdRhombus(vec2 p, vec2 b) { vec2 q = abs(p); float h = clamp((-2.0*ndot(q,b)+ndot(b,b))/dot(b,b),-1.0,1.0); float d = length( q - 0.5*b*vec2(1.0-h,1.0+h) ); return d * sign( q.x*b.y + q.y*b.x - b.x*b.y ); } float sdVesica(vec2 p, float r, float d) { p = abs(p); float b = sqrt(r*r-d*d); // can delay this sqrt return ((p.y-b)*d>p.x*b) ? length(p-vec2(0.0,b)) : length(p-vec2(-d,0.0))-r; } `,HS=/precision\s+(high|low|medium)p\s+float/,GS=`#ifdef GL_FRAGMENT_PRECISION_HIGH precision highp float; #else precision mediump float; #endif `,Fse=/#pragma include (["^+"]?["[a-zA-Z_0-9](.*)"]*?)/g,Bse=/void\s+main\s*\([^)]*\)\s*\{\n?/,Lse=(NS=ai(),NS(US=function(){function e(){Ht(this,e),F(this,"moduleCache",{}),F(this,"rawContentCache",{})}return jt(e,[{key:"registerBuiltinModules",value:function(){this.destroy(),this.registerModule("common",{vs:zS,fs:zS}),this.registerModule("decode",{vs:Cse,fs:""}),this.registerModule("scene_uniforms",{vs:$S,fs:$S}),this.registerModule("picking_uniforms",{vs:VS,fs:VS}),this.registerModule("projection",{vs:jS,fs:jS}),this.registerModule("project",{vs:Ose,fs:""}),this.registerModule("sdf_2d",{vs:"",fs:Dse}),this.registerModule("lighting",{vs:Ise,fs:""}),this.registerModule("light",{vs:Rse,fs:""}),this.registerModule("picking",{vs:Pse,fs:Mse}),this.registerModule("rotation_2d",{vs:kse,fs:""})}},{key:"registerModule",value:function(r,n){n.vs=n.vs.replace(/\r\n/g,` `),n.fs=n.fs.replace(/\r\n/g,` `);var i=n.vs,o=n.fs,a=n.uniforms,u=n.inject,c=j3(i),f=c.content,m=c.uniforms,_=j3(o),b=_.content,A=_.uniforms;this.rawContentCache[r]={fs:b,inject:u,uniforms:Qe(Qe(Qe({},m),A),a),vs:f}}},{key:"destroy",value:function(){this.moduleCache={},this.rawContentCache={}}},{key:"getModule",value:function(r){var n=this,i=this.rawContentCache[r].vs,o=this.rawContentCache[r].fs,a=this.rawContentCache[r].inject,u={};a!=null&&a["vs:#decl"]&&(i=(a==null?void 0:a["vs:#decl"])+i,u=j3(a==null?void 0:a["vs:#decl"]).uniforms),a!=null&&a["vs:#main-start"]&&(i=i.replace(Bse,function(k){return k+(a==null?void 0:a["vs:#main-start"])})),a!=null&&a["fs:#decl"]&&(o=(a==null?void 0:a["fs:#decl"])+o);var c=this.processModule(i,[],"vs"),f=c.content,m=c.includeList,_=this.processModule(o,[],"fs"),b=_.content,A=_.includeList,w="",R=wse(m.concat(A).concat(r)).reduce(function(k,L){return Qe(Qe({},k),n.rawContentCache[L].uniforms)},Qe({},u));HS.test(b)||(w=w+GS),w=w+b;var P="";return HS.test(f)||(P=P+GS),P=P+f,this.moduleCache[r]={fs:w.trim(),uniforms:R,vs:P.trim()},this.moduleCache[r]}},{key:"processModule",value:function(r,n,i){var o=this,a=r.replace(Fse,function(u,c){var f=c.split(" "),m=f[0].replace(/"/g,"");if(n.indexOf(m)>-1)return"";var _=o.rawContentCache[m][i];n.push(m);var b=o.processModule(_,n,i),A=b.content;return A});return{content:a,includeList:n}}},{key:"injectDefines",value:function(r){var n=Object.keys(r).reduce(function(i,o){return i+"#define ".concat(o.toUpperCase()," ").concat(r[o],`; `)},` `);return n}}]),e}())||US);function Nse(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Bt(e),e!==null););return e}function gp(){return typeof Reflect<"u"&&Reflect.get?gp=Reflect.get.bind():gp=function(t,r,n){var i=Nse(t,r);if(i){var o=Object.getOwnPropertyDescriptor(i,r);return o.get?o.get.call(arguments.length<3?t:n):o.value}},gp.apply(this,arguments)}var M0=function(e){return e.Normal="normal",e.PostProcessing="post-processing",e}({}),WS,XS,vy=(WS=ai(),WS(XS=function(){function e(){Ht(this,e),F(this,"shaderModuleService",void 0),F(this,"rendererService",void 0),F(this,"cameraService",void 0),F(this,"mapService",void 0),F(this,"interactionService",void 0),F(this,"layerService",void 0),F(this,"config",void 0)}return jt(e,[{key:"getName",value:function(){return""}},{key:"getType",value:function(){return M0.Normal}},{key:"init",value:function(r,n){this.config=n,this.rendererService=r.getContainer().get(wt.IRendererService),this.cameraService=r.getContainer().get(wt.ICameraService),this.mapService=r.getContainer().get(wt.IMapService),this.interactionService=r.getContainer().get(wt.IInteractionService),this.layerService=r.getContainer().get(wt.ILayerService),this.shaderModuleService=r.getContainer().get(wt.IShaderModuleService)}},{key:"render",value:function(r){}}]),e}())||XS),YS,ZS;function Use(e){var t=zse();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function zse(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var $se=(YS=ai(),YS(ZS=function(e){_n(r,e);var t=Use(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getName",value:function(){return"clear"}},{key:"init",value:function(i,o){gp(Bt(r.prototype),"init",this).call(this,i,o)}},{key:"render",value:function(){this.rendererService.clear({color:[0,0,0,0],depth:1,framebuffer:null})}}]),r}(vy))||ZS),qS,KS,QS,H3,JS;function Vse(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=jse(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function jse(e,t){if(e){if(typeof e=="string")return eA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eA(e,t)}}function eA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Xse=(tA=ai(),tA(rA=function(e){_n(r,e);var t=Gse(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;ak||K<0||Z>L||Z<0)){var ve;R(n.pickingFBO,Mt(he.mark(function Ie(){var de,se,le,ye,ke;return he.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:return Lt.next=2,w({x:Math.round(K),y:Math.round(L-(f+1)*ul),width:1,height:1,data:new Uint8Array(1*1*4),framebuffer:n.pickingFBO});case 2:ve=Lt.sent,ve[0]!==0||ve[1]!==0||ve[2]!==0?(se=x1(ve),le=n.layer.getSource().getFeatureById(se),ye={x:c,y:f,type:_,lngLat:m,featureId:se,feature:le},le&&(n.layer.setCurrentPickId(se),n.triggerHoverOnLayer(ye))):(ke={x:c,y:f,lngLat:m,type:n.layer.getCurrentPickId()===null?"un"+_:"mouseout",featureId:null,feature:null},n.triggerHoverOnLayer(Qe(Qe({},ke),{},{type:"unpick"})),n.triggerHoverOnLayer(ke),n.layer.setCurrentPickId(null)),V&&n.highlightPickedFeature(ve),G&&_==="click"&&((de=ve)===null||de===void 0?void 0:de.toString())!==[0,0,0,0].toString()&&n.selectFeature(ve);case 6:case"end":return Lt.stop()}},Ie)})))}}}),n}return jt(r,[{key:"getType",value:function(){return M0.Normal}},{key:"getName",value:function(){return"pixelPicking"}},{key:"init",value:function(i,o){gp(Bt(r.prototype),"init",this).call(this,i,o),this.layer=i;var a=this.rendererService,u=a.createTexture2D,c=a.createFramebuffer,f=a.getViewportSize,m=f(),_=m.width,b=m.height,A=u({width:_,height:b,wrapS:W.CLAMP_TO_EDGE,wrapT:W.CLAMP_TO_EDGE,label:"Picking Texture"});this.pickingFBO=c({color:A}),this.interactionService.on(Bu.Hover,this.pickFromPickingFBO),this.interactionService.on(Bu.Select,this.selectFeatureHandle.bind(this)),this.interactionService.on(Bu.Active,this.highlightFeatureHandle.bind(this))}},{key:"render",value:function(i){var o=this;if(!this.alreadyInRendering){var a=this.rendererService,u=a.getViewportSize,c=a.useFramebuffer,f=a.clear,m=u(),_=m.width,b=m.height;this.alreadyInRendering=!0,(this.width!==_||this.height!==b)&&(this.pickingFBO.resize({width:_,height:b}),this.width=_,this.height=b),c(this.pickingFBO,function(){f({framebuffer:o.pickingFBO,color:[0,0,0,0],stencil:0,depth:1});var A=o.layer.multiPassRenderer.getRenderFlag();o.layer.multiPassRenderer.setRenderFlag(!1),i.hooks.beforePickingEncode.call(),i.render(),i.hooks.afterPickingEncode.call(),o.layer.multiPassRenderer.setRenderFlag(A),o.alreadyInRendering=!1})}}},{key:"triggerHoverOnLayer",value:function(i){this.layer.emit(i.type,i)}},{key:"highlightPickedFeature",value:function(i){var o=Nn(i,3),a=o[0],u=o[1],c=o[2];this.layer.hooks.beforeHighlight.call([a,u,c]),this.layerService.renderLayers()}},{key:"selectFeature",value:function(i){var o=Nn(i,3),a=o[0],u=o[1],c=o[2];this.layer.hooks.beforeSelect.call([a,u,c]),this.layerService.renderLayers()}},{key:"selectFeatureHandle",value:function(i){var o=i.featureId,a=sh(o);this.selectFeature(new Uint8Array(a))}},{key:"highlightFeatureHandle",value:function(i){var o=i.featureId,a=sh(o);this.highlightPickedFeature(new Uint8Array(a))}}]),r}(vy))||rA),nA,iA,aA,G3,oA,Yse=Ci.camelCase,Zse=Ci.isNil,qse=Ci.upperFirst,Kse=`attribute vec2 a_Position; varying vec2 v_UV; void main() { v_UV = 0.5 * (a_Position + 1.0); gl_Position = vec4(a_Position, 0., 1.); }`,fh=(nA=ai(),iA=ki(wt.IShaderModuleService),nA(aA=(G3=function(){function e(){Ht(this,e),bi(this,"shaderModuleService",oA,this),F(this,"rendererService",void 0),F(this,"config",void 0),F(this,"quad",Kse),F(this,"enabled",!0),F(this,"renderToScreen",!1),F(this,"model",void 0),F(this,"name",void 0),F(this,"optionsToUpdate",{})}return jt(e,[{key:"getName",value:function(){return this.name}},{key:"setName",value:function(r){this.name=r}},{key:"getType",value:function(){return M0.PostProcessing}},{key:"init",value:function(r,n){this.config=n,this.rendererService=r.getContainer().get(wt.IRendererService),this.shaderModuleService=r.getContainer().get(wt.IShaderModuleService);var i=this.rendererService,o=i.createAttribute,a=i.createBuffer,u=i.createModel,c=this.setupShaders(),f=c.vs,m=c.fs,_=c.uniforms;this.model=u({vs:f,fs:m,attributes:{a_Position:o({buffer:a({data:[-4,-4,4,-4,0,4],type:W.FLOAT}),size:2})},uniforms:Qe(Qe({u_Texture:null},_),this.config&&this.convertOptionsToUniforms(this.config)),depth:{enable:!1},count:3,blend:{enable:this.getName()==="copy"}})}},{key:"render",value:function(r,n){var i=this,o=r.multiPassRenderer.getPostProcessor(),a=this.rendererService,u=a.useFramebuffer,c=a.getViewportSize,f=a.clear,m=c(),_=m.width,b=m.height;u(this.renderToScreen?null:o.getWriteFBO(),function(){f({framebuffer:o.getWriteFBO(),color:[0,0,0,0],depth:1,stencil:0});var A=Qe({u_BloomFinal:0,u_Texture:o.getReadFBO(),u_ViewportSize:[_,b]},i.convertOptionsToUniforms(i.optionsToUpdate));n&&(A.u_BloomFinal=1,A.u_Texture2=n),i.model.draw({uniforms:A})})}},{key:"isEnabled",value:function(){return this.enabled}},{key:"setEnabled",value:function(r){this.enabled=r}},{key:"setRenderToScreen",value:function(r){this.renderToScreen=r}},{key:"updateOptions",value:function(r){this.optionsToUpdate=Qe(Qe({},this.optionsToUpdate),r)}},{key:"setupShaders",value:function(){throw new Error("Method not implemented.")}},{key:"convertOptionsToUniforms",value:function(r){var n={};return Object.keys(r).forEach(function(i){Zse(r[i])||(n["u_".concat(qse(Yse(i)))]=r[i])}),n}}]),e}(),oA=mi(G3.prototype,"shaderModuleService",[iA],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),G3))||aA),sA,uA;function Qse(e){var t=Jse();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function Jse(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var eue=`varying vec2 v_UV; uniform float u_BloomFinal: 0.0; uniform sampler2D u_Texture; uniform sampler2D u_Texture2; uniform vec2 u_ViewportSize: [1.0, 1.0]; uniform float u_radius: 5.0; uniform float u_intensity: 0.3; uniform float u_baseRadio: 0.5; // https://github.com/Jam3/glsl-fast-gaussian-blur/blob/master/9.glsl vec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) { vec4 color = vec4(0.0); vec2 off1 = vec2(1.3846153846) * direction; vec2 off2 = vec2(3.2307692308) * direction; color += texture2D(image, uv) * 0.2270270270; color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162; color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162; color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703; color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703; return color; } float luminance(vec4 color) { return 0.2125 * color.r + 0.7154 * color.g + 0.0721 * color.b; } void main() { // vec4 baseColor = texture2D(u_Texture, v_UV); float r = sqrt(u_radius); vec4 c1 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(u_radius, 0.0)); // c1 *= luminance(c1); vec4 c2 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(0.0, u_radius)); // c2 *= luminance(c2); vec4 c3 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(r, r)); // c3 *= luminance(c3); vec4 c4 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(r, -r)); // c4 *= luminance(c4); vec4 inbloomColor = (c1 + c2 + c3 + c4) * 0.25; // float lum = luminance(inbloomColor); // inbloomColor.rgb *= lum; if(u_BloomFinal > 0.0) { vec4 baseColor = texture2D(u_Texture2, v_UV); float baselum = luminance(baseColor); gl_FragColor = mix(inbloomColor, baseColor, u_baseRadio); if(baselum <= 0.2) { gl_FragColor = inbloomColor * u_intensity; } } else { gl_FragColor = inbloomColor; } }`,tue=`attribute vec2 a_Position; varying vec2 v_UV; void main() { v_UV = 0.5 * (a_Position + 1.0); gl_Position = vec4(a_Position, 0., 1.); }`,W3=Ci.isNil,rue=(sA=ai(),sA(uA=function(e){_n(r,e);var t=Qse(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("blur-pass",{vs:tue,fs:eue});var i=this.shaderModuleService.getModule("blur-pass"),o=i.vs,a=i.fs,u=i.uniforms,c=this.rendererService.getViewportSize(),f=c.width,m=c.height;return{vs:o,fs:a,uniforms:Qe(Qe({},u),{},{u_ViewportSize:[f,m]})}}},{key:"convertOptionsToUniforms",value:function(i){var o={};return W3(i.bloomRadius)||(o.u_radius=i.bloomRadius),W3(i.bloomIntensity)||(o.u_intensity=i.bloomIntensity),W3(i.bloomBaseRadio)||(o.u_baseRadio=i.bloomBaseRadio),o}}]),r}(fh))||uA),lA,cA;function nue(e){var t=iue();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function iue(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var aue=`varying vec2 v_UV; uniform sampler2D u_Texture; uniform vec2 u_ViewportSize: [1.0, 1.0]; uniform vec2 u_BlurDir: [1.0, 0.0]; // https://github.com/Jam3/glsl-fast-gaussian-blur/blob/master/9.glsl vec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) { vec4 color = vec4(0.0); vec2 off1 = vec2(1.3846153846) * direction; vec2 off2 = vec2(3.2307692308) * direction; color += texture2D(image, uv) * 0.2270270270; color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162; color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162; color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703; color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703; return color; } void main() { gl_FragColor = blur9(u_Texture, v_UV, u_ViewportSize, u_BlurDir); }`,oue=`attribute vec2 a_Position; varying vec2 v_UV; void main() { v_UV = 0.5 * (a_Position + 1.0); gl_Position = vec4(a_Position, 0., 1.); }`,sue=Ci.isNil,uue=(lA=ai(),lA(cA=function(e){_n(r,e);var t=nue(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("blur-pass",{vs:oue,fs:aue});var i=this.shaderModuleService.getModule("blur-pass"),o=i.vs,a=i.fs,u=i.uniforms,c=this.rendererService.getViewportSize(),f=c.width,m=c.height;return{vs:o,fs:a,uniforms:Qe(Qe({},u),{},{u_ViewportSize:[f,m]})}}},{key:"convertOptionsToUniforms",value:function(i){var o={};return sue(i.blurRadius)||(o.u_BlurDir=[i.blurRadius,0]),o}}]),r}(fh))||cA),fA,hA;function lue(e){var t=cue();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function cue(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var fue=`varying vec2 v_UV; uniform sampler2D u_Texture; uniform vec2 u_ViewportSize: [1.0, 1.0]; uniform vec2 u_BlurDir: [1.0, 0.0]; // https://github.com/Jam3/glsl-fast-gaussian-blur/blob/master/9.glsl vec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) { vec4 color = vec4(0.0); vec2 off1 = vec2(1.3846153846) * direction; vec2 off2 = vec2(3.2307692308) * direction; color += texture2D(image, uv) * 0.2270270270; color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162; color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162; color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703; color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703; return color; } void main() { gl_FragColor = blur9(u_Texture, v_UV, u_ViewportSize, u_BlurDir); }`,hue=`attribute vec2 a_Position; varying vec2 v_UV; void main() { v_UV = 0.5 * (a_Position + 1.0); gl_Position = vec4(a_Position, 0., 1.); }`,pue=Ci.isNil,due=(fA=ai(),fA(hA=function(e){_n(r,e);var t=lue(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("blur-pass",{vs:hue,fs:fue});var i=this.shaderModuleService.getModule("blur-pass"),o=i.vs,a=i.fs,u=i.uniforms,c=this.rendererService.getViewportSize(),f=c.width,m=c.height;return{vs:o,fs:a,uniforms:Qe(Qe({},u),{},{u_ViewportSize:[f,m]})}}},{key:"convertOptionsToUniforms",value:function(i){var o={};return pue(i.blurRadius)||(o.u_BlurDir=[0,i.blurRadius]),o}}]),r}(fh))||hA),pA,dA;function vue(e){var t=mue();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function mue(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var gue=`varying vec2 v_UV; uniform sampler2D u_Texture; uniform vec2 u_ViewportSize: [1.0, 1.0]; uniform vec2 u_Center : [0.5, 0.5]; uniform float u_Angle : 0; uniform float u_Size : 8; #pragma include "common" float scale = PI / u_Size; float pattern(float u_Angle, vec2 texSize, vec2 texCoord) { float s = sin(u_Angle), c = cos(u_Angle); vec2 tex = texCoord * texSize - u_Center * texSize; vec2 point = vec2( c * tex.x - s * tex.y, s * tex.x + c * tex.y ) * scale; return (sin(point.x) * sin(point.y)) * 4.0; } // https://github.com/evanw/glfx.js/blob/master/src/filters/fun/colorhalftone.js vec4 colorHalftone_filterColor(vec4 color, vec2 texSize, vec2 texCoord) { vec3 cmy = 1.0 - color.rgb; float k = min(cmy.x, min(cmy.y, cmy.z)); cmy = (cmy - k) / (1.0 - k); cmy = clamp( cmy * 10.0 - 3.0 + vec3( pattern(u_Angle + 0.26179, texSize, texCoord), pattern(u_Angle + 1.30899, texSize, texCoord), pattern(u_Angle, texSize, texCoord) ), 0.0, 1.0 ); k = clamp(k * 10.0 - 5.0 + pattern(u_Angle + 0.78539, texSize, texCoord), 0.0, 1.0); return vec4(1.0 - cmy - k, color.a); } void main() { gl_FragColor = vec4(texture2D(u_Texture, v_UV)); gl_FragColor = colorHalftone_filterColor(gl_FragColor, u_ViewportSize, v_UV); }`,_ue=`attribute vec2 a_Position; varying vec2 v_UV; void main() { v_UV = 0.5 * (a_Position + 1.0); gl_Position = vec4(a_Position, 0., 1.); }`,yue=(pA=ai(),pA(dA=function(e){_n(r,e);var t=vue(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("colorhalftone-pass",{vs:_ue,fs:gue});var i=this.shaderModuleService.getModule("colorhalftone-pass"),o=i.vs,a=i.fs,u=i.uniforms,c=this.rendererService.getViewportSize(),f=c.width,m=c.height;return{vs:o,fs:a,uniforms:Qe(Qe({},u),{},{u_ViewportSize:[f,m]})}}}]),r}(fh))||dA),vA,mA;function xue(e){var t=bue();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function bue(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Eue=`varying vec2 v_UV; uniform sampler2D u_Texture; void main() { gl_FragColor = vec4(texture2D(u_Texture, v_UV)); }`,Sue=`attribute vec2 a_Position; varying vec2 v_UV; void main() { v_UV = 0.5 * (a_Position + 1.0); gl_Position = vec4(a_Position, 0., 1.); }`,Aue=(vA=ai(),vA(mA=function(e){_n(r,e);var t=xue(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"setupShaders",value:function(){return this.shaderModuleService.registerModule("copy-pass",{vs:Sue,fs:Eue}),this.shaderModuleService.getModule("copy-pass")}}]),r}(fh))||mA),gA,_A;function Tue(e){var t=wue();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function wue(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Cue=`varying vec2 v_UV; uniform sampler2D u_Texture; uniform vec2 u_ViewportSize: [1.0, 1.0]; uniform vec2 u_Center : [0.5, 0.5]; uniform float u_Scale : 10; // https://github.com/evanw/glfx.js/blob/master/src/filters/fun/hexagonalpixelate.js vec4 hexagonalPixelate_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) { vec2 tex = (texCoord * texSize - u_Center * texSize) / u_Scale; tex.y /= 0.866025404; tex.x -= tex.y * 0.5; vec2 a; if (tex.x + tex.y - floor(tex.x) - floor(tex.y) < 1.0) { a = vec2(floor(tex.x), floor(tex.y)); } else a = vec2(ceil(tex.x), ceil(tex.y)); vec2 b = vec2(ceil(tex.x), floor(tex.y)); vec2 c = vec2(floor(tex.x), ceil(tex.y)); vec3 TEX = vec3(tex.x, tex.y, 1.0 - tex.x - tex.y); vec3 A = vec3(a.x, a.y, 1.0 - a.x - a.y); vec3 B = vec3(b.x, b.y, 1.0 - b.x - b.y); vec3 C = vec3(c.x, c.y, 1.0 - c.x - c.y); float alen = length(TEX - A); float blen = length(TEX - B); float clen = length(TEX - C); vec2 choice; if (alen < blen) { if (alen < clen) choice = a; else choice = c; } else { if (blen < clen) choice = b; else choice = c; } choice.x += choice.y * 0.5; choice.y *= 0.866025404; choice *= u_Scale / texSize; return texture2D(texture, choice + u_Center); } void main() { gl_FragColor = vec4(texture2D(u_Texture, v_UV)); gl_FragColor = hexagonalPixelate_sampleColor(u_Texture, u_ViewportSize, v_UV); }`,Rue=`attribute vec2 a_Position; varying vec2 v_UV; void main() { v_UV = 0.5 * (a_Position + 1.0); gl_Position = vec4(a_Position, 0., 1.); }`,Iue=(gA=ai(),gA(_A=function(e){_n(r,e);var t=Tue(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("hexagonalpixelate-pass",{vs:Rue,fs:Cue});var i=this.shaderModuleService.getModule("hexagonalpixelate-pass"),o=i.vs,a=i.fs,u=i.uniforms,c=this.rendererService.getViewportSize(),f=c.width,m=c.height;return{vs:o,fs:a,uniforms:Qe(Qe({},u),{},{u_ViewportSize:[f,m]})}}}]),r}(fh))||_A),yA,xA;function Mue(e){var t=Pue();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function Pue(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Oue=`varying vec2 v_UV; uniform sampler2D u_Texture; uniform vec2 u_ViewportSize: [1.0, 1.0]; uniform float u_Strength : 0.6; vec4 ink_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) { vec2 dx = vec2(1.0 / texSize.x, 0.0); vec2 dy = vec2(0.0, 1.0 / texSize.y); vec4 color = texture2D(texture, texCoord); float bigTotal = 0.0; float smallTotal = 0.0; vec3 bigAverage = vec3(0.0); vec3 smallAverage = vec3(0.0); for (float x = -2.0; x <= 2.0; x += 1.0) { for (float y = -2.0; y <= 2.0; y += 1.0) { vec3 sample = texture2D(texture, texCoord + dx * x + dy * y).rgb; bigAverage += sample; bigTotal += 1.0; if (abs(x) + abs(y) < 2.0) { smallAverage += sample; smallTotal += 1.0; } } } vec3 edge = max(vec3(0.0), bigAverage / bigTotal - smallAverage / smallTotal); float power = u_Strength * u_Strength * u_Strength * u_Strength * u_Strength; return vec4(color.rgb - dot(edge, edge) * power * 100000.0, color.a); } void main() { gl_FragColor = vec4(texture2D(u_Texture, v_UV)); gl_FragColor = ink_sampleColor(u_Texture, u_ViewportSize, v_UV); }`,kue=`attribute vec2 a_Position; varying vec2 v_UV; void main() { v_UV = 0.5 * (a_Position + 1.0); gl_Position = vec4(a_Position, 0., 1.); }`,Due=(yA=ai(),yA(xA=function(e){_n(r,e);var t=Mue(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("ink-pass",{vs:kue,fs:Oue});var i=this.shaderModuleService.getModule("ink-pass"),o=i.vs,a=i.fs,u=i.uniforms,c=this.rendererService.getViewportSize(),f=c.width,m=c.height;return{vs:o,fs:a,uniforms:Qe(Qe({},u),{},{u_ViewportSize:[f,m]})}}}]),r}(fh))||xA),bA,EA;function Fue(e){var t=Bue();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function Bue(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Lue=`varying vec2 v_UV; uniform sampler2D u_Texture; uniform float u_Amount : 0.5; float rand(vec2 co) { return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); } // https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js vec4 noise_filterColor(vec4 color, vec2 texCoord) { float diff = (rand(texCoord) - 0.5) * u_Amount; color.r += diff; color.g += diff; color.b += diff; return color; } void main() { gl_FragColor = vec4(texture2D(u_Texture, v_UV)); gl_FragColor = noise_filterColor(gl_FragColor, v_UV); }`,Nue=`attribute vec2 a_Position; varying vec2 v_UV; void main() { v_UV = 0.5 * (a_Position + 1.0); gl_Position = vec4(a_Position, 0., 1.); }`,Uue=(bA=ai(),bA(EA=function(e){_n(r,e);var t=Fue(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"setupShaders",value:function(){return this.shaderModuleService.registerModule("noise-pass",{vs:Nue,fs:Lue}),this.shaderModuleService.getModule("noise-pass")}}]),r}(fh))||EA),SA,AA;function zue(e){var t=$ue();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function $ue(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Vue=`attribute vec2 a_Position; varying vec2 v_UV; void main() { v_UV = 0.5 * (a_Position + 1.0); gl_Position = vec4(a_Position, 0., 1.); }`,jue=`varying vec2 v_UV; uniform sampler2D u_Texture; uniform float u_Amount : 0.5; // https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/sepia.js vec4 sepia_filterColor(vec4 color) { float r = color.r; float g = color.g; float b = color.b; color.r = min(1.0, (r * (1.0 - (0.607 * u_Amount))) + (g * (0.769 * u_Amount)) + (b * (0.189 * u_Amount))); color.g = min(1.0, (r * 0.349 * u_Amount) + (g * (1.0 - (0.314 * u_Amount))) + (b * 0.168 * u_Amount)); color.b = min(1.0, (r * 0.272 * u_Amount) + (g * 0.534 * u_Amount) + (b * (1.0 - (0.869 * u_Amount)))); return color; } void main() { gl_FragColor = vec4(texture2D(u_Texture, v_UV)); gl_FragColor = sepia_filterColor(gl_FragColor); }`,Hue=(SA=ai(),SA(AA=function(e){_n(r,e);var t=zue(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"setupShaders",value:function(){return this.shaderModuleService.registerModule("sepia-pass",{vs:Vue,fs:jue}),this.shaderModuleService.getModule("sepia-pass")}}]),r}(fh))||AA),TA,wA,CA,RA,Sd,IA,Gue=(TA=ai(),wA=ki(wt.IRendererService),CA=yae(),TA(RA=(Sd=function(){function e(){Ht(this,e),bi(this,"rendererService",IA,this),F(this,"passes",[]),F(this,"readFBO",void 0),F(this,"writeFBO",void 0)}return jt(e,[{key:"getReadFBO",value:function(){return this.readFBO}},{key:"getWriteFBO",value:function(){return this.writeFBO}},{key:"getCurrentFBOTex",value:function(){var r=this.rendererService,n=r.getViewportSize,i=r.createTexture2D,o=n(),a=o.width,u=o.height;return i({x:0,y:0,width:a,height:u,copy:!0})}},{key:"getReadFBOTex",value:function(){var r=this,n=this.rendererService.useFramebuffer;return new Promise(function(i){n(r.readFBO,Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:i(r.getCurrentFBOTex());case 1:case"end":return u.stop()}},o)})))})}},{key:"renderBloomPass",value:function(){var t=Mt(he.mark(function n(i,o){var a,u;return he.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.getReadFBOTex();case 2:a=f.sent,u=0;case 4:if(!(u<4)){f.next=11;break}return f.next=7,o.render(i,a);case 7:this.swap(),u++,f.next=4;break;case 11:case"end":return f.stop()}},n,this)}));function r(n,i){return t.apply(this,arguments)}return r}()},{key:"render",value:function(){var t=Mt(he.mark(function n(i){var o,a;return he.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:o=0;case 1:if(!(o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Yue=(MA=ai(),MA(PA=function(e){_n(r,e);var t=Wue(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getType",value:function(){return M0.Normal}},{key:"getName",value:function(){return"render"}},{key:"init",value:function(i,o){gp(Bt(r.prototype),"init",this).call(this,i,o)}},{key:"render",value:function(i){var o=this.rendererService,a=o.useFramebuffer,u=o.clear,c=i.multiPassRenderer.getPostProcessor().getReadFBO();a(c,function(){u({color:[0,0,0,0],depth:1,stencil:0,framebuffer:c}),i.multiPassRenderer.setRenderFlag(!1),i.models.forEach(function(f){f.draw({uniforms:i.layerModel.getUninforms()})}),i.multiPassRenderer.setRenderFlag(!0)})}}]),r}(vy))||PA),OA,kA,DA,X3,FA;function Zue(e){var t=que();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function que(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Kue=`uniform float u_opacity : 1.0; uniform float u_MixRatio : 0.5; uniform sampler2D u_Diffuse1; uniform sampler2D u_Diffuse2; varying vec2 v_UV; void main() { vec4 texel1 = texture2D(u_Diffuse1, v_UV); vec4 texel2 = texture2D(u_Diffuse2, v_UV); gl_FragColor = u_opacity * mix(texel1, texel2, u_MixRatio); } `,BA=`varying vec2 v_UV; uniform sampler2D u_Texture; void main() { gl_FragColor = vec4(texture2D(u_Texture, v_UV)); }`,Que=`attribute vec2 a_Position; varying vec2 v_UV; void main() { v_UV = 0.5 * (a_Position + 1.0); gl_Position = vec4(a_Position, 0., 1.); }`;function LA(e,t){for(var r=0,n=1/t,i=e;i>0;)r=r+n*(i%t),i=Math.floor(i/t),n=n/t;return r}var Jue=1,ele=(OA=ai(),kA=ki(wt.IShaderModuleService),OA(DA=(X3=function(e){_n(r,e);var t=Zue(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=1&&(f(this.copyRenderTarget,function(){o.outputModel.draw({uniforms:{u_Texture:o.outputRenderTarget}})}),f(i.multiPassRenderer.getPostProcessor().getReadFBO(),function(){o.copyModel.draw({uniforms:{u_Texture:o.copyRenderTarget}})}),i.multiPassRenderer.getPostProcessor().render(i));var L=this.prevRenderTarget;this.prevRenderTarget=this.outputRenderTarget,this.outputRenderTarget=L,this.frame++,this.cameraService.clearJitterProjectionMatrix()}},{key:"isFinished",value:function(){return this.frame>=this.haltonSequence.length}},{key:"resetFrame",value:function(){this.frame=0}},{key:"stopAccumulating",value:function(){this.accumulatingId=0,window.clearTimeout(this.timer)}},{key:"createTriangleModel",value:function(i,o,a){this.shaderModuleService.registerModule(i,{vs:Que,fs:o});var u=this.shaderModuleService.getModule(i),c=u.vs,f=u.fs,m=u.uniforms,_=this.rendererService,b=_.createAttribute,A=_.createBuffer,w=_.createModel;return w(Qe({vs:c,fs:f,attributes:{a_Position:b({buffer:A({data:[-4,-4,4,-4,0,4],type:W.FLOAT}),size:2})},uniforms:Qe({},m),depth:{enable:!1},count:3},a))}}]),r}(vy),FA=mi(X3.prototype,"shaderModuleService",[kA],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),X3))||DA),Ts=new K5;Ts.bind(wt.IGlobalConfigService).to(soe).inSingletonScope();Kie(ai(),ju.EventEmitter);Ts.bind(wt.IEventEmitter).to(ju.EventEmitter);var tle=Aae(Ts,!1),rb=function(t){var r=tle.lazyInject(t);return function(n,i,o){r.call(this,n,i),o&&(o.initializer=function(){return n[i]})}},rle=0;function nle(){var e=new K5;return e.parent=Ts,e.bind(wt.SceneID).toConstantValue("".concat(rle++)),e.bind(wt.IShaderModuleService).to(Lse).inSingletonScope(),e.bind(wt.ILayerService).to(Ioe).inSingletonScope(),e.bind(wt.IDebugService).to(poe).inSingletonScope(),e.bind(wt.ISceneService).to(Ase).inSingletonScope(),e.bind(wt.ICameraService).to(qae).inSingletonScope(),e.bind(wt.ICoordinateSystemService).to(coe).inSingletonScope(),e.bind(wt.IInteractionService).to(_oe).inSingletonScope(),e.bind(wt.IPickingService).to(Aoe).inSingletonScope(),e.bind(wt.IControlService).to(eoe).inSingletonScope(),e.bind(wt.IMarkerService).to(toe).inSingletonScope(),e.bind(wt.IIconService).to(Zae).inSingletonScope(),e.bind(wt.IFontService).to(Gae).inSingletonScope(),e.bind(wt.IPopupService).to(roe).inSingletonScope(),e.bind(wt.INormalPass).to($se).whenTargetNamed("clear"),e.bind(wt.INormalPass).to(Xse).whenTargetNamed("pixelPicking"),e.bind(wt.INormalPass).to(Yue).whenTargetNamed("render"),e.bind(wt.INormalPass).to(ele).whenTargetNamed("taa"),e.bind(wt.IFactoryNormalPass).toFactory(function(t){return function(r){return t.container.getNamed(wt.INormalPass,r)}}),e.bind(wt.IPostProcessingPass).to(Aue).whenTargetNamed("copy"),e.bind(wt.IPostProcessingPass).to(rue).whenTargetNamed("bloom"),e.bind(wt.IPostProcessingPass).to(uue).whenTargetNamed("blurH"),e.bind(wt.IPostProcessingPass).to(due).whenTargetNamed("blurV"),e.bind(wt.IPostProcessingPass).to(Uue).whenTargetNamed("noise"),e.bind(wt.IPostProcessingPass).to(Hue).whenTargetNamed("sepia"),e.bind(wt.IPostProcessingPass).to(yue).whenTargetNamed("colorHalftone"),e.bind(wt.IPostProcessingPass).to(Iue).whenTargetNamed("hexagonalPixelate"),e.bind(wt.IPostProcessingPass).to(Due).whenTargetNamed("ink"),e.bind(wt.IFactoryPostProcessingPass).toFactory(function(t){return function(r){var n=t.container.getNamed(wt.IPostProcessingPass,r);return n.setName(r),n}}),e}function om(e){var t=new K5;return t.parent=e,t.bind(wt.IStyleAttributeService).to(Boe).inSingletonScope(),t.bind(wt.IMultiPassRenderer).to(Hse).inSingletonScope(),t.bind(wt.IPostProcessor).to(Gue).inSingletonScope(),t}Ci.clamp;var s1={ProjectionMatrix:"u_ProjectionMatrix",ViewMatrix:"u_ViewMatrix",ViewProjectionMatrix:"u_ViewProjectionMatrix",Zoom:"u_Zoom",ZoomScale:"u_ZoomScale",FocalDistance:"u_FocalDistance",CameraPosition:"u_CameraPosition"},Ho={MapInitStart:"mapInitStart",LayerInitStart:"layerInitStart",LayerInitEnd:"layerInitEnd",SourceInitStart:"sourceInitStart",SourceInitEnd:"sourceInitEnd",ScaleInitStart:"scaleInitStart",ScaleInitEnd:"scaleInitEnd",MappingStart:"mappingStart",MappingEnd:"mappingEnd",BuildModelStart:"buildModelStart",BuildModelEnd:"buildModelEnd"},pa=function(e){return e.LINEAR="linear",e.SEQUENTIAL="sequential",e.POWER="power",e.LOG="log",e.IDENTITY="identity",e.TIME="time",e.QUANTILE="quantile",e.QUANTIZE="quantize",e.THRESHOLD="threshold",e.CAT="cat",e.DIVERGING="diverging",e.CUSTOM="threshold",e}({}),Ad=function(e){return e.CONSTANT="constant",e.VARIABLE="variable",e}({}),wn=function(e){return e[e.Attribute=0]="Attribute",e[e.InstancedAttribute=1]="InstancedAttribute",e[e.Uniform=2]="Uniform",e}({}),ile=["mapload","mapchange","mapAfterFrameChange"],Q2=["loaded","fontloaded","maploaded","resize","destroy","dragstart","dragging","dragend","dragcancel"],Ns=function(e){return e.IMAGE="image",e.CUSTOMIMAGE="customImage",e.ARRAYBUFFER="arraybuffer",e.RGB="rgb",e.TERRAINRGB="terrainRGB",e.CUSTOMRGB="customRGB",e.CUSTOMARRAYBUFFER="customArrayBuffer",e.CUSTOMTERRAINRGB="customTerrainRGB",e}({}),ale=function(){var e=Mt(he.mark(function t(r,n,i,o){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",new Promise(function(c,f){n({x:r.x,y:r.y,z:r.z},function(m,_){if(m||_.length===0){f(m);return}_&&ox([{data:_,bands:[0]}],i,o,function(b,A){b?f(b):A&&c(A)})})}));case 1:case"end":return u.stop()}},t)}));return function(r,n,i,o){return e.apply(this,arguments)}}(),ole=function(){var e=Mt(he.mark(function t(r,n){return he.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",new Promise(function(a,u){n({x:r.x,y:r.y,z:r.z},function(c,f){if(c||!f){u(c);return}f instanceof ArrayBuffer?kL(f,function(m,_){m&&u(m),a(_)}):f instanceof HTMLImageElement?a(f):u(c)})}));case 1:case"end":return o.stop()}},t)}));return function(r,n){return e.apply(this,arguments)}}();function sle(e,t){return Array.isArray(e)?typeof e[0]=="string"?e.map(function(r){return Kd(r,t)}):e.map(function(r){return{url:Kd(r.url,t),bands:r.bands||[0]}}):Kd(e,t)}function ule(e){return typeof e=="string"?[{url:e,bands:[0]}]:typeof e[0]=="string"?e.map(function(t){return{url:t,bands:[0]}}):e}function NA(e,t){e.xhrCancel=function(){t.map(function(r){r.abort()})}}var lle=function(){var e=Mt(he.mark(function t(r,n,i,o,a){var u,c,f,m,_,b;return he.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(u=ule(n.url),!(u.length>1)){w.next=15;break}return w.next=4,cle(u,n);case 4:if(c=w.sent,f=c.rasterFiles,m=c.xhrList,_=c.errList,NA(r,m),!(_.length>0)){w.next=12;break}return i(_,null),w.abrupt("return");case 12:ox(f,o,a,i),w.next=17;break;case 15:b=d5(n,function(R,P){if(R)i(R);else if(P){var k=[{data:P,bands:u[0].bands}];ox(k,o,a,i)}}),NA(r,[b]);case 17:case"end":return w.stop()}},t)}));return function(r,n,i,o,a){return e.apply(this,arguments)}}();function cle(e,t){return Ex.apply(this,arguments)}function Ex(){return Ex=Mt(he.mark(function e(t,r){var n,i,o,a,u,c,f,m,_,b,A;return he.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:n=[],i=[],o=[],a=0;case 4:if(!(a1&&arguments[1]!==void 0?arguments[1]:{};if(ple(e))throw new Error("tile server url is error");var r=(t==null?void 0:t.dataType)||Ns.IMAGE;r===Ns.RGB&&(r=Ns.ARRAYBUFFER);var n=function(a,u){switch(r){case Ns.IMAGE:return UA(e,a,u,t);case Ns.CUSTOMIMAGE:case Ns.CUSTOMTERRAINRGB:return ole(u,t==null?void 0:t.getCustomData);case Ns.ARRAYBUFFER:return fle(e,a,u,(t==null?void 0:t.format)||zA,t==null?void 0:t.operation);case Ns.CUSTOMARRAYBUFFER:case Ns.CUSTOMRGB:return ale(u,t==null?void 0:t.getCustomData,(t==null?void 0:t.format)||zA,t==null?void 0:t.operation);default:return UA(e,a,u,t)}},i=Qe(Qe(Qe({},hle),t),{},{getTileData:n});return{data:e,dataArray:[],tilesetOptions:i,isTile:!0}}var vle=["extent","min","max","width","height","format","operation"];function mle(e,t){var r=t.extent,n=t.min,i=t.max,o=t.width,a=t.height,u=t.format,c=t.operation,f=hl(t,vle),m;if(u===void 0||LM(e))m=Array.from(e);else{var _=Array.isArray(e)?e:[e];m=X5(_,u,c)}var b={_id:1,dataArray:[Qe(Qe({_id:1,data:m,width:o,height:a},f),{},{min:n,max:i,coordinates:[[r[0],r[1]],[r[2],r[3]]]})]};return b}var gle={tileSize:256,minZoom:0,maxZoom:1/0,zoomOffset:0},_le=function(){var e=Mt(he.mark(function t(r){return he.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",new Promise(function(o){var a=Nn(r.bounds,4),u=a[0],c=a[1],f=a[2],m=a[3],_={layers:{testTile:{features:[{type:"Feature",properties:{key:r.x+"/"+r.y+"/"+r.z,x:(u+f)/2,y:(c+m)/2},geometry:{type:"LineString",coordinates:[[f,m],[f,c],[u,c],[u,c]]}}]}}};o(_)}));case 1:case"end":return i.stop()}},t)}));return function(r){return e.apply(this,arguments)}}();function yle(e,t){var r=function(o){return _le(o)},n=Qe(Qe(Qe({},gle),t),{},{getTileData:r});return{data:e,dataArray:[],tilesetOptions:n,isTile:!0}}var xle=["extent","width","height"];function ble(e,t){var r=t.extent,n=t.width,i=t.height,o=hl(t,xle);e.length<3&&console.warn("RGB解析需要三个波段的数据");for(var a=o.bands||[0,1,2],u=Nn(a,3),c=u[0],f=u[1],m=u[2],_=[e[c],e[f],e[m]],b=[],A=(o==null?void 0:o.countCut)||[2,98],w=Nn(A,2),R=w[0],P=w[1],k=(o==null?void 0:o.RMinMax)||Jd(_[0],R,P),L=(o==null?void 0:o.GMinMax)||Jd(_[1],R,P),B=(o==null?void 0:o.BMinMax)||Jd(_[2],R,P),V=0;V<_[0].length;V++)b.push(Math.max(0,_[0][V]-k[0])),b.push(Math.max(0,_[1][V]-L[0])),b.push(Math.max(0,_[2][V]-B[0]));var G={_id:1,dataArray:[Qe(Qe({_id:1,data:b,width:n,height:i,rMinMax:k,gMinMax:L,bMinMax:B},o),{},{coordinates:[[r[0],r[1]],[r[2],r[3]]]})]};return G}var Ele=["extent","width","height"];function Sle(e,t){var r=t.extent,n=t.width,i=t.height,o=hl(t,Ele);e.length<2&&console.warn("RGB解析需要2个波段的数据");for(var a=o.bands||[0,1],u=Nn(a,2),c=u[0],f=u[1],m=[e[c],e[f]],_=[],b=0;b>1;n(de,se,Lt,ye,ke,Rt%2),r(de,se,le,ye,Lt-1,Rt+1),r(de,se,le,Lt+1,ke,Rt+1)}}function n(de,se,le,ye,ke,Rt){for(;ke>ye;){if(ke-ye>600){var Lt=ke-ye+1,Gt=le-ye+1,Zt=Math.log(Lt),st=.5*Math.exp(2*Zt/3),tt=.5*Math.sqrt(Zt*st*(Lt-st)/Lt)*(Gt-Lt/2<0?-1:1),dt=Math.max(ye,Math.floor(le-Gt*st/Lt+tt)),nt=Math.min(ke,Math.floor(le+(Lt-Gt)*st/Lt+tt));n(de,se,le,dt,nt,Rt)}var pr=se[2*le+Rt],ur=ye,Ar=ke;for(i(de,se,ye,le),se[2*ke+Rt]>pr&&i(de,se,ye,ke);urpr;)Ar--}se[2*ye+Rt]===pr?i(de,se,ye,Ar):(Ar++,i(de,se,Ar,ke)),Ar<=le&&(ye=Ar+1),le<=Ar&&(ke=Ar-1)}}function i(de,se,le,ye){o(de,le,ye),o(se,2*le,2*ye),o(se,2*le+1,2*ye+1)}function o(de,se,le){var ye=de[se];de[se]=de[le],de[le]=ye}function a(de,se,le,ye,ke,Rt,Lt){for(var Gt=[0,de.length-1,0],Zt=[],st,tt;Gt.length;){var dt=Gt.pop(),nt=Gt.pop(),pr=Gt.pop();if(nt-pr<=Lt){for(var ur=pr;ur<=nt;ur++)st=se[2*ur],tt=se[2*ur+1],st>=le&&st<=ke&&tt>=ye&&tt<=Rt&&Zt.push(de[ur]);continue}var Ar=Math.floor((pr+nt)/2);st=se[2*Ar],tt=se[2*Ar+1],st>=le&&st<=ke&&tt>=ye&&tt<=Rt&&Zt.push(de[Ar]);var Xn=(dt+1)%2;(dt===0?le<=st:ye<=tt)&&(Gt.push(pr),Gt.push(Ar-1),Gt.push(Xn)),(dt===0?ke>=st:Rt>=tt)&&(Gt.push(Ar+1),Gt.push(nt),Gt.push(Xn))}return Zt}function u(de,se,le,ye,ke,Rt){for(var Lt=[0,de.length-1,0],Gt=[],Zt=ke*ke;Lt.length;){var st=Lt.pop(),tt=Lt.pop(),dt=Lt.pop();if(tt-dt<=Rt){for(var nt=dt;nt<=tt;nt++)c(se[2*nt],se[2*nt+1],le,ye)<=Zt&&Gt.push(de[nt]);continue}var pr=Math.floor((dt+tt)/2),ur=se[2*pr],Ar=se[2*pr+1];c(ur,Ar,le,ye)<=Zt&&Gt.push(de[pr]);var Xn=(st+1)%2;(st===0?le-ke<=ur:ye-ke<=Ar)&&(Lt.push(dt),Lt.push(pr-1),Lt.push(Xn)),(st===0?le+ke>=ur:ye+ke>=Ar)&&(Lt.push(pr+1),Lt.push(tt),Lt.push(Xn))}return Gt}function c(de,se,le,ye){var ke=de-le,Rt=se-ye;return ke*ke+Rt*Rt}var f=function(de){return de[0]},m=function(de){return de[1]},_=function(se,le,ye,ke,Rt){le===void 0&&(le=f),ye===void 0&&(ye=m),ke===void 0&&(ke=64),Rt===void 0&&(Rt=Float64Array),this.nodeSize=ke,this.points=se;for(var Lt=se.length<65536?Uint16Array:Uint32Array,Gt=this.ids=new Lt(se.length),Zt=this.coords=new Rt(se.length*2),st=0;st=ke;tt--){var dt=+Date.now();Zt=this._cluster(Zt,tt),this.trees[tt]=new _(Zt,ve,Ie,Lt,Float32Array),ye&&console.log("z%d: %d clusters in %dms",tt,Zt.length,+Date.now()-dt)}return ye&&console.timeEnd("total time"),this},w.prototype.getClusters=function(se,le){var ye=((se[0]+180)%360+360)%360-180,ke=Math.max(-90,Math.min(90,se[1])),Rt=se[2]===180?180:((se[2]+180)%360+360)%360-180,Lt=Math.max(-90,Math.min(90,se[3]));if(se[2]-se[0]>=360)ye=-180,Rt=180;else if(ye>Rt){var Gt=this.getClusters([ye,ke,180,Lt],le),Zt=this.getClusters([-180,ke,Rt,Lt],le);return Gt.concat(Zt)}for(var st=this.trees[this._limitZoom(le)],tt=st.range(B(ye),V(Lt),B(Rt),V(ke)),dt=[],nt=0,pr=tt;ntle&&(Ar+=Je.numPoints||1)}if(Ar>ur&&Ar>=Zt){for(var Qt=dt.x*ur,Xr=dt.y*ur,Ut=Gt&&ur>1?this._map(dt,!0):null,ge=(tt<<5)+(le+1)+this.points.length,Be=0,ft=pr;Be1)for(var Mr=0,tr=pr;Mr>5},w.prototype._getOriginZoom=function(se){return(se-this.points.length)%32},w.prototype._map=function(se,le){if(se.numPoints)return le?Z({},se.properties):se.properties;var ye=this.points[se.index].properties,ke=this.options.map(ye);return le&&ke===ye?Z({},ke):ke};function R(de,se,le,ye,ke){return{x:A(de),y:A(se),zoom:1/0,id:le,parentId:-1,numPoints:ye,properties:ke}}function P(de,se){var le=de.geometry.coordinates,ye=le[0],ke=le[1];return{x:A(B(ye)),y:A(V(ke)),zoom:1/0,index:se,parentId:-1}}function k(de){return{type:"Feature",id:de.id,properties:L(de),geometry:{type:"Point",coordinates:[G(de.x),K(de.y)]}}}function L(de){var se=de.numPoints,le=se>=1e4?Math.round(se/1e3)+"k":se>=1e3?Math.round(se/100)/10+"k":se;return Z(Z({},de.properties),{cluster:!0,cluster_id:de.id,point_count:se,point_count_abbreviated:le})}function B(de){return de/360+.5}function V(de){var se=Math.sin(de*Math.PI/180),le=.5-.25*Math.log((1+se)/(1-se))/Math.PI;return le<0?0:le>1?1:le}function G(de){return(de-.5)*360}function K(de){var se=(180-de*360)*Math.PI/180;return 360*Math.atan(Math.exp(se))/Math.PI-90}function Z(de,se){for(var le in se)de[le]=se[le];return de}function ve(de){return de.x}function Ie(de){return de.y}return w})})(SP);var Ale=SP.exports;const Tle=oa(Ale);function AP(e,t){var r=t.radius,n=r===void 0?40:r,i=t.maxZoom,o=i===void 0?18:i,a=t.minZoom,u=a===void 0?0:a,c=t.zoom,f=c===void 0?2:c;if(e.pointIndex){var m=e.pointIndex.getClusters(e.extent,Math.floor(f));return e.dataArray=wle(m),e}var _=new Tle({radius:n,minZoom:u,maxZoom:o}),b={type:"FeatureCollection",features:[]};return b.features=e.dataArray.map(function(A){return{type:"Feature",geometry:{type:"Point",coordinates:A.coordinates},properties:Qe({},A)}}),_.load(b.features),_}function wle(e){return e.map(function(t,r){return Qe({coordinates:t.geometry.coordinates,_id:r+1},t.properties)})}function Cle(e){if(e.length===0)throw new Error("max requires at least one data point");for(var t=e[0],r=1;rt&&(t=e[r]);return t}function Rle(e){if(e.length===0)throw new Error("min requires at least one data point");for(var t=e[0],r=1;r=Math.abs(e[i])?r+=t-n+e[i]:r+=e[i]-n+t,t=n;return t+r*1}function Ile(e){if(e.length===0)throw new Error("mean requires at least one data point");return TP(e)/e.length}var Mle={min:Rle,max:Cle,mean:Ile,sum:TP};function Ple(e){var t=Ole();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function Ole(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var kle=Ci.cloneDeep,$A=Ci.isFunction,Dle=Ci.isString,Fle=Ci.mergeWith;function Ble(e,t){if(Array.isArray(t))return t}var wP=function(e){_n(r,e);var t=Ple(r);function r(n,i){var o;return Ht(this,r),o=t.call(this),F($e(o),"type","source"),F($e(o),"isTile",!1),F($e(o),"inited",!1),F($e(o),"hooks",{init:new nf}),F($e(o),"parser",{type:"geojson"}),F($e(o),"transforms",[]),F($e(o),"cluster",!1),F($e(o),"clusterOptions",{enable:!1,radius:40,maxZoom:20,zoom:-99,method:"count"}),F($e(o),"invalidExtent",!1),F($e(o),"dataArrayChanged",!1),F($e(o),"cfg",{autoRender:!0}),o.originData=n,o.initCfg(i),o.init().then(function(){o.inited=!0,o.emit("update",{type:"inited"})}),o}return jt(r,[{key:"getSourceCfg",value:function(){return this.cfg}},{key:"getClusters",value:function(i){return this.clusterIndex.getClusters(this.caculClusterExtent(2),i)}},{key:"getClustersLeaves",value:function(i){return this.clusterIndex.getLeaves(i,1/0)}},{key:"getParserType",value:function(){return this.parser.type}},{key:"updateClusterData",value:function(i){var o=this,a=this.clusterOptions,u=a.method,c=u===void 0?"sum":u,f=a.field,m=this.clusterIndex.getClusters(this.caculClusterExtent(2),Math.floor(i));this.clusterOptions.zoom=i,m.forEach(function(_){_.id||(_.properties.point_count=1)}),(f||$A(c))&&(m=m.map(function(_){var b=_.id;if(b){var A=o.clusterIndex.getLeaves(b,1/0),w=A.map(function(k){return k.properties}),R;if(Dle(c)&&f){var P=Kre(w,f);R=Mle[c](P)}$A(c)&&(R=c(w)),_.properties.stat=R}else _.properties.point_count=1;return _})),this.data=q7("geojson")({type:"FeatureCollection",features:m}),this.executeTrans()}},{key:"getFeatureById",value:function(i){var o=this.parser,a=o.type,u=a===void 0?"geojson":a,c=o.geometry;if(u==="geojson"&&!this.cluster){var f=i=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function Nle(e,t){if(e){if(typeof e=="string")return jA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jA(e,t)}}function jA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rn?i:n)}}catch(B){o.e(B)}finally{o.f()}var c=(r+n)/2,f=$le(t,c);if(f.xOffset<=0||f.yOffset<=0)return{gridHash:{},gridOffset:f};var m={},_=VA(e),b;try{for(_.s();!(b=_.n()).done;){var A=b.value,w=A.coordinates[1],R=A.coordinates[0];if(Number.isFinite(w)&&Number.isFinite(R)){var P=Math.floor((w+90)/f.yOffset),k=Math.floor((R+180)/f.xOffset),L="".concat(P,"-").concat(k);m[L]=m[L]||{count:0,points:[]},m[L].count+=1,m[L].points.push(A)}}}catch(B){_.e(B)}finally{_.f()}return{gridHash:m,gridOffset:f}}function $le(e,t){var r=Vle(e),n=jle(t,e);return{yOffset:r,xOffset:n}}function Vle(e){return e/nb*(180/Math.PI)}function jle(e,t){return t/nb*(180/Math.PI)/Math.cos(e*Math.PI/180)}function Hle(e,t,r){return Object.keys(e).reduce(function(n,i,o){var a=i.split("-"),u=parseInt(a[0],10),c=parseInt(a[1],10),f={};if(r.field&&r.method){var m=rM(e[i].points,r.field);f[r.method]=tM[r.method](m)}return Object.assign(f,{_id:o,coordinates:ko([-180+t.xOffset*(c+.5),-90+t.yOffset*(u+.5)]),rawData:e[i].points,count:e[i].count}),n.push(f),n},[])}var Ld=Math.PI/3,Gle=[0,Ld,2*Ld,3*Ld,4*Ld,5*Ld];function Wle(e){return e[0]}function Xle(e){return e[1]}function Yle(){var e=0,t=0,r=1,n=1,i=Wle,o=Xle,a,u,c;function f(_){var b={},A=[],w,R=_.length;for(w=0;w1){var K=k-V,Z=V+(kIe*Ie+de*de&&(V=Z+(B&1?1:-1)/2,B=ve)}var se=V+"-"+B,le=b[se];le?le.push(P):(A.push(le=b[se]=[P]),le.x=(V+(B&1)/2)*u,le.y=B*c)}return A}function m(_){var b=0,A=0;return Gle.map(function(w){var R=Math.sin(w)*_,P=-Math.cos(w)*_,k=R-b,L=P-A;return b=R,A=P,[k,L]})}return f.hexagon=function(_){return"m"+m(_==null?a:+_).join("l")+"z"},f.centers=function(){for(var _=[],b=Math.round(t/c),A=Math.round(e/u),w=b*c;w',function(e){try{let f=function(){u||(u=!0,o())},m=function(){try{a.documentElement.doScroll("left")}catch{return void setTimeout(m,50)}f()};var r=(r=document.getElementsByTagName("script"))[r.length-1],t=r.getAttribute("data-injectcss"),r=r.getAttribute("data-disable-injectsvg");if(!r){var n,i,o,a,u,c=function(b,A){A.parentNode.insertBefore(b,A)};if(t&&!e.__iconfont__svg__cssinject__){e.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(_){console&&console.log(_)}}n=function(){var b,A=document.createElement("div");A.innerHTML=e._iconfont_svg_string_3580659,(A=A.getElementsByTagName("svg")[0])&&(A.setAttribute("aria-hidden","true"),A.style.position="absolute",A.style.width=0,A.style.height=0,A.style.overflow="hidden",A=A,(b=document.body).firstChild?c(A,b.firstChild):b.appendChild(A))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=n,a=e.document,u=!1,m(),a.onreadystatechange=function(){a.readyState=="complete"&&(a.onreadystatechange=null,f())})}}catch{}}(window);function Jle(e){var t=ece();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function ece(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var CP=function(e){_n(r,e);var t=Jle(r);function r(n){var i;return Ht(this,r),i=t.call(this),r.controlCount++,i.controlOption=Qe(Qe({},i.getDefault(n)),n||{}),i}return jt(r,[{key:"getOptions",value:function(){return this.controlOption}},{key:"setOptions",value:function(i){var o=this.getDefault(i);Object.entries(i).forEach(function(a){var u=Nn(a,2),c=u[0],f=u[1];f===void 0&&(i[c]=o[c])}),"position"in i&&this.setPosition(i.position),"className"in i&&this.setClassName(i.className),"style"in i&&this.setStyle(i.style),this.controlOption=Qe(Qe({},this.controlOption),i)}},{key:"addTo",value:function(i){this.mapsService=i.get(wt.IMapService),this.renderService=i.get(wt.IRendererService),this.layerService=i.get(wt.ILayerService),this.controlService=i.get(wt.IControlService),this.configService=i.get(wt.IGlobalConfigService),this.scene=i.get(wt.ISceneService),this.sceneContainer=i,this.isShow=!0,this.container=this.onAdd(),nm(this.container,"l7-control");var o=this.controlOption,a=o.className,u=o.style;return a&&this.setClassName(a),u&&this.setStyle(u),this.insertContainer(),this.emit("add",this),this}},{key:"remove",value:function(){if(!this.mapsService)return this;e_(this.container),this.onRemove(),this.emit("remove",this)}},{key:"onAdd",value:function(){return fl("div")}},{key:"onRemove",value:function(){}},{key:"show",value:function(){var i=this.container;$6(i,"l7-control--hide"),this.isShow=!0,this.emit("show",this)}},{key:"hide",value:function(){var i=this.container;nm(i,"l7-control--hide"),this.isShow=!1,this.emit("hide",this)}},{key:"getDefault",value:function(i){return{position:n_.TOPRIGHT,name:"".concat(r.controlCount)}}},{key:"getContainer",value:function(){return this.container}},{key:"getIsShow",value:function(){return this.isShow}},{key:"_refocusOnMap",value:function(i){if(this.mapsService&&i&&i.screenX>0&&i.screenY>0){var o=this.mapsService.getContainer();o!==null&&o.focus()}}},{key:"setPosition",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:n_.TOPLEFT,o=this.controlService;return o&&o.removeControl(this),this.controlOption.position=i,o&&o.addControl(this,this.sceneContainer),this}},{key:"setClassName",value:function(i){var o=this.container,a=this.controlOption.className;a&&$6(o,a),i&&nm(o,i)}},{key:"setStyle",value:function(i){var o=this.container;i?o.setAttribute("style",i):o.removeAttribute("style")}},{key:"insertContainer",value:function(){var i=this.controlOption.position,o=this.container;if(i instanceof Element)i.appendChild(o);else{var a=this.controlService.controlCorners[i];["bottomleft","bottomright","righttop","rightbottom"].includes(i)?a.insertBefore(o,a.firstChild):a.appendChild(o)}}},{key:"checkUpdateOption",value:function(i,o){return o.some(function(a){return a in i})}}]),r}(D5);F(CP,"controlCount",0);function tce(e){var t=rce();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function rce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var nce=function(e){_n(r,e);var t=tce(r);function r(n,i){var o;return Ht(this,r),o=t.call(this),F($e(o),"isShow",!1),F($e(o),"timeout",null),F($e(o),"show",function(){return o.isShow||!o.contentDOM.innerHTML||(o.resetPopperPosition(),$6(o.popperDOM,"l7-popper-hide"),o.isShow=!0,o.option.unique&&r.conflictPopperList.forEach(function(a){a!==$e(o)&&a.isShow&&a.hide()}),o.emit("show"),window.addEventListener("pointerdown",o.onPopperUnClick)),$e(o)}),F($e(o),"hide",function(){return o.isShow&&(nm(o.popperDOM,"l7-popper-hide"),o.isShow=!1,o.emit("hide"),window.removeEventListener("pointerdown",o.onPopperUnClick)),$e(o)}),F($e(o),"setHideTimeout",function(){o.timeout||(o.timeout=window.setTimeout(function(){o.isShow&&(o.hide(),o.timeout=null)},300))}),F($e(o),"clearHideTimeout",function(){o.timeout&&(window.clearTimeout(o.timeout),o.timeout=null)}),F($e(o),"onBtnClick",function(){o.isShow?o.hide():o.show()}),F($e(o),"onPopperUnClick",function(a){Eee(a.target,[".l7-button-control",".l7-popper-content"])||o.hide()}),F($e(o),"onBtnMouseLeave",function(){o.setHideTimeout()}),F($e(o),"onBtnMouseMove",function(){o.clearHideTimeout(),!o.isShow&&o.show()}),o.button=n,o.option=i,o.init(),i.unique&&r.conflictPopperList.push($e(o)),o}return jt(r,[{key:"buttonRect",get:function(){return this.button.getBoundingClientRect()}},{key:"getPopperDOM",value:function(){return this.popperDOM}},{key:"getIsShow",value:function(){return this.isShow}},{key:"getContent",value:function(){return this.content}},{key:"setContent",value:function(i){typeof i=="string"?this.contentDOM.innerHTML=i:i instanceof HTMLElement&&(KI(this.contentDOM),this.contentDOM.appendChild(i)),this.content=i}},{key:"init",value:function(){var i=this.option.trigger;this.popperDOM=this.createPopper(),i==="click"?this.button.addEventListener("click",this.onBtnClick):(this.button.addEventListener("mousemove",this.onBtnMouseMove),this.button.addEventListener("mouseleave",this.onBtnMouseLeave),this.popperDOM.addEventListener("mousemove",this.onBtnMouseMove),this.popperDOM.addEventListener("mouseleave",this.onBtnMouseLeave))}},{key:"destroy",value:function(){this.button.removeEventListener("click",this.onBtnClick),this.button.removeEventListener("mousemove",this.onBtnMouseMove),this.button.removeEventListener("mousemove",this.onBtnMouseLeave),this.popperDOM.removeEventListener("mousemove",this.onBtnMouseMove),this.popperDOM.removeEventListener("mouseleave",this.onBtnMouseLeave),e_(this.popperDOM)}},{key:"resetPopperPosition",value:function(){var i={},o=this.option,a=o.container,u=o.offset,c=u===void 0?[0,0]:u,f=o.placement,m=Nn(c,2),_=m[0],b=m[1],A=this.button.getBoundingClientRect(),w=a.getBoundingClientRect(),R=xee(A,w),P=R.left,k=R.right,L=R.top,B=R.bottom,V=!1,G=!1;/^(left|right)/.test(f)?(f.includes("left")?i.right="".concat(A.width+k,"px"):f.includes("right")&&(i.left="".concat(A.width+P,"px")),f.includes("start")?i.top="".concat(L,"px"):f.includes("end")?i.bottom="".concat(B,"px"):(i.top="".concat(L+A.height/2,"px"),G=!0,i.transform="translate(".concat(_,"px, calc(").concat(b,"px - 50%))"))):/^(top|bottom)/.test(f)&&(f.includes("top")?i.bottom="".concat(A.height+B,"px"):f.includes("bottom")&&(i.top="".concat(A.height+L,"px")),f.includes("start")?i.left="".concat(P,"px"):f.includes("end")?i.right="".concat(k,"px"):(i.left="".concat(P+A.width/2,"px"),V=!0,i.transform="translate(calc(".concat(_,"px - 50%), ").concat(b,"px)"))),i.transform="translate(calc(".concat(_,"px - ").concat(V?"50%":"0%","), calc(").concat(b,"px - ").concat(G?"50%":"0%",")");var K=f.split("-");K.length&&nm(this.popperDOM,K.map(function(Z){return"l7-popper-".concat(Z)}).join(" ")),_ee(this.popperDOM,yee(i))}},{key:"createPopper",value:function(){var i=this.option,o=i.container,a=i.className,u=a===void 0?"":a,c=i.content,f=fl("div","l7-popper l7-popper-hide ".concat(u)),m=fl("div","l7-popper-content"),_=fl("div","l7-popper-arrow");return f.appendChild(m),f.appendChild(_),o.appendChild(f),this.popperDOM=f,this.contentDOM=m,c&&this.setContent(c),f}}]),r}(ju.EventEmitter);F(nce,"conflictPopperList",[]);function ice(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=ace(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function ace(e,t){if(e){if(typeof e=="string")return HA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return HA(e,t)}}function HA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u")return!1;for(var e=GA[0],t={},r=0,n=GA;r0&&arguments[0]!==void 0?arguments[0]:document.documentElement,r=arguments.length>1?arguments[1]:void 0;return new Promise(function(n,i){var o=function u(){Vl.off("change",u),n()};Vl.on("change",o);var a=t[ah.requestFullscreen](r);a instanceof Promise&&a.then(o).catch(i)})},exit:function(){return new Promise(function(t,r){if(!Vl.isFullscreen){t();return}var n=function o(){Vl.off("change",o),t()};Vl.on("change",n);var i=document[ah.exitFullscreen]();i instanceof Promise&&i.then(n).catch(r)})},toggle:function(t,r){return Vl.isFullscreen?Vl.exit():Vl.request(t,r)},onchange:function(t){Vl.on("change",t)},onerror:function(t){Vl.on("error",t)},on:function(t,r){var n=WA[t];n&&document.addEventListener(n,r,!1)},off:function(t,r){var n=WA[t];n&&document.removeEventListener(n,r,!1)},raw:ah};Object.defineProperties(Vl,{isFullscreen:{get:function(){return!!document[ah.fullscreenElement]}},element:{enumerable:!0,get:function(){var t;return(t=document[ah.fullscreenElement])!==null&&t!==void 0?t:void 0}},isEnabled:{enumerable:!0,get:function(){return!!document[ah.fullscreenEnabled]}}});ah||(Vl={isEnabled:!1});function oce(e){var t=sce();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function sce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var uce=function(e){_n(r,e);var t=oce(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getDefault",value:function(){return{position:n_.BOTTOMLEFT,name:"logo",href:"https://l7.antv.antgroup.com/",img:"https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*GRb1TKp4HcMAAAAAAAAAAAAAARQnAQ"}}},{key:"onAdd",value:function(){var i=fl("div","l7-control-logo");return this.setLogoContent(i),i}},{key:"onRemove",value:function(){return null}},{key:"setOptions",value:function(i){gp(Bt(r.prototype),"setOptions",this).call(this,i),this.checkUpdateOption(i,["img","href"])&&(KI(this.container),this.setLogoContent(this.container))}},{key:"setLogoContent",value:function(i){var o=this.controlOption,a=o.href,u=o.img,c=fl("img");if(c.setAttribute("src",u),c.setAttribute("aria-label","AntV logo"),bee(c),a){var f=fl("a","l7-control-logo-link");f.target="_blank",f.href=a,f.rel="noopener nofollow",f.setAttribute("rel","noopener nofollow"),f.appendChild(c),i.appendChild(f)}else i.appendChild(c)}}]),r}(CP),Kh,RP=(Kh={},F(Kh,up.additive,{enable:!0,func:{srcRGB:W.ONE,dstRGB:W.ONE,srcAlpha:1,dstAlpha:1}}),F(Kh,up.none,{enable:!1}),F(Kh,up.normal,{enable:!0,func:{srcRGB:W.SRC_ALPHA,dstRGB:W.ONE_MINUS_SRC_ALPHA,srcAlpha:1,dstAlpha:1}}),F(Kh,up.subtractive,{enable:!0,func:{srcRGB:W.ONE,dstRGB:W.ONE,srcAlpha:W.ZERO,dstAlpha:W.ONE_MINUS_SRC_COLOR},equation:{rgb:W.FUNC_SUBTRACT,alpha:W.FUNC_SUBTRACT}}),F(Kh,up.max,{enable:!0,func:{srcRGB:W.ONE,dstRGB:W.ONE},equation:{rgb:W.MAX_EXT}}),F(Kh,up.min,{enable:!0,func:{srcRGB:W.ONE,dstRGB:W.ONE},equation:{rgb:W.MIN_EXT}}),Kh);function IP(e){return e.map(function(t){return typeof t=="string"&&(t=[t,{}]),t})}function MP(e,t,r,n){var i=e.multiPassRenderer,o=e.getLayerConfig(),a=o.enableTAA;return a?i.add(n("taa")):i.add(n("render")),IP(t).forEach(function(u){var c=Nn(u,2),f=c[0],m=c[1];i.add(r(f),m)}),i.add(r("copy")),i}var lce=function(){function e(t){Ht(this,e),this.layer=t}return jt(e,[{key:"pickRender",value:function(r){var n=this.layer.getContainer(),i=n.get(wt.ILayerService),o=this.layer;if(o.tileLayer)return o.tileLayer.pickRender(r);o.hooks.beforePickingEncode.call(),i.renderTileLayerMask(o),o.renderModels({ispick:!0}),o.hooks.afterPickingEncode.call()}},{key:"pick",value:function(){var t=Mt(he.mark(function n(i,o){var a,u;return he.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(a=this.layer.getContainer(),u=a.get(wt.IPickingService),i.type!=="RasterLayer"){f.next=4;break}return f.abrupt("return",this.pickRasterLayer(i,o));case 4:return this.pickRender(o),f.abrupt("return",u.pickFromPickingFBO(i,o));case 6:case"end":return f.stop()}},n,this)}));function r(n,i){return t.apply(this,arguments)}return r}()},{key:"pickRasterLayer",value:function(r,n,i){var o=this.layer.getContainer(),a=o.get(wt.IPickingService),u=o.get(wt.IMapService),c=this.layer.getSource().extent,f=Aee(n.lngLat,c),m={x:n.x,y:n.y,type:n.type,lngLat:n.lngLat,target:n,rasterValue:null},_=i||r;if(f){var b=this.readRasterValue(r,c,u,n.x,n.y);return m.rasterValue=b,a.triggerHoverOnLayer(_,m),!0}else return m.type=n.type==="mousemove"?"mouseout":"un"+n.type,a.triggerHoverOnLayer(_,Qe(Qe({},m),{},{type:"unpick"})),a.triggerHoverOnLayer(_,m),!1}},{key:"readRasterValue",value:function(r,n,i,o,a){var u=r.getSource().data.dataArray[0],c=Nn(n,4),f=c[0],m=f===void 0?0:f,_=c[1],b=_===void 0?0:_,A=c[2],w=A===void 0?10:A,R=c[3],P=R===void 0?-10:R,k=i.lngLatToContainer([m,b]),L=i.lngLatToContainer([w,P]),B=L.x-k.x,V=k.y-L.y,G=[(o-k.x)/B,(a-L.y)/V],K=u.width||1,Z=u.height||1,ve=Math.floor(G[0]*K),Ie=Math.floor(G[1]*Z),de=Math.max(0,Ie-1)*K+ve,se=u.data[de];return se}},{key:"selectFeature",value:function(r){var n=this.layer,i=Nn(r,3),o=i[0],a=i[1],u=i[2];n.hooks.beforeSelect.call([o,a,u])}},{key:"highlightPickedFeature",value:function(r){var n=Nn(r,3),i=n[0],o=n[1],a=n[2];this.layer.hooks.beforeHighlight.call([i,o,a])}},{key:"getFeatureById",value:function(r){return this.layer.getSource().getFeatureById(r)}}]),e}(),cce=function(){function e(t){Ht(this,e),this.layer=t;var r=this.layer.getContainer();this.rendererService=r.get(wt.IRendererService)}return jt(e,[{key:"getColorTexture",value:function(r,n){var i=this.getTextureKey(r,n);return this.key===i?this.colorTexture:(this.createColorTexture(r,n),this.key=i,this.colorTexture)}},{key:"createColorTexture",value:function(r,n){var i=this.rendererService.createTexture2D,o=this.getColorRampBar(r,n),a=i({data:new Uint8Array(o.data),width:o.width,height:o.height,flipY:!1,unorm:!0});return this.colorTexture=a,a}},{key:"setColorTexture",value:function(r,n,i){this.key=this.getTextureKey(n,i),this.colorTexture=r}},{key:"destroy",value:function(){var r;(r=this.colorTexture)===null||r===void 0||r.destroy()}},{key:"getColorRampBar",value:function(r,n){switch(r.type){case"cat":return WL(r);case"quantize":return XL(r);case"custom":return YL(r,n);case"linear":return GL(r,n);default:return HL(r)}}},{key:"getTextureKey",value:function(r,n){var i;return"".concat(r.colors.join("_"),"_").concat(r==null||(i=r.positions)===null||i===void 0?void 0:i.join("_"),"_").concat(r.type,"_").concat(n==null?void 0:n.join("_"))}}]),e}(),fce=["passes"],hce=["moduleName","vertexShader","fragmentShader","inject","triangulation","styleOption","pickingEnabled"],XA,Y3,YA;function pce(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=dce(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function dce(e,t){if(e){if(typeof e=="string")return ZA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ZA(e,t)}}function ZA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Z3=Ci.isEqual,qA=Ci.isFunction,KA=Ci.isNumber,Ds=Ci.isObject,gce=Ci.isPlainObject,_ce=Ci.isUndefined,QA=0,P0=(XA=rb(wt.IGlobalConfigService),Y3=function(e){_n(r,e);var t=vce(r);function r(){var n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Ht(this,r),n=t.call(this),F($e(n),"id","".concat(QA++)),F($e(n),"name","".concat(QA)),F($e(n),"visible",!0),F($e(n),"zIndex",0),F($e(n),"inited",!1),F($e(n),"layerModelNeedUpdate",!1),F($e(n),"pickedFeatureID",null),F($e(n),"selectedFeatureID",null),F($e(n),"styleNeedUpdate",!1),F($e(n),"forceRender",!1),F($e(n),"clusterZoom",0),F($e(n),"defaultSourceConfig",{data:[],options:{parser:{type:"json"}}}),F($e(n),"dataState",{dataSourceNeedUpdate:!1,dataMappingNeedUpdate:!1,filterNeedUpdate:!1,featureScaleNeedUpdate:!1,StyleAttrNeedUpdate:!1}),F($e(n),"hooks",{init:new Yoe,afterInit:new Z8,beforeRender:new Z8,beforeRenderData:new Zoe,afterRender:new nf,beforePickingEncode:new nf,afterPickingEncode:new nf,beforeHighlight:new nf(["pickedColor"]),afterHighlight:new nf,beforeSelect:new nf(["pickedColor"]),afterSelect:new nf,beforeDestroy:new nf,afterDestroy:new nf}),F($e(n),"models",[]),F($e(n),"startInit",!1),F($e(n),"layerChildren",[]),F($e(n),"masks",[]),bi($e(n),"configService",YA,$e(n)),F($e(n),"animateOptions",{enable:!1}),F($e(n),"currentPickId",null),F($e(n),"encodeStyleAttribute",{}),F($e(n),"enableShaderEncodeStyles",[]),F($e(n),"enableDataEncodeStyles",[]),F($e(n),"pendingStyleAttributes",[]),F($e(n),"scaleOptions",{}),F($e(n),"animateStatus",!1),F($e(n),"isDestroyed",!1),F($e(n),"uniformBuffers",[]),F($e(n),"encodeDataLength",0),F($e(n),"sourceEvent",function(){n.dataState.dataSourceNeedUpdate=!0;var o=n.getLayerConfig();o&&o.autoFit&&n.fitBounds(o.fitBoundsOptions);var a=n.layerSource.getSourceCfg().autoRender;a&&setTimeout(function(){n.reRender()},10)}),n.name=i.name||n.id,n.zIndex=i.zIndex||0,n.rawConfig=i,n}return jt(r,[{key:"addMask",value:function(i){this.masks.push(i),this.updateLayerConfig({maskLayers:this.masks}),this.enableMask()}},{key:"removeMask",value:function(i){var o=this.masks.indexOf(i);o>-1&&this.masks.splice(o,1),this.updateLayerConfig({maskLayers:this.masks})}},{key:"disableMask",value:function(){this.updateLayerConfig({enableMask:!1})}},{key:"enableMask",value:function(){this.updateLayerConfig({enableMask:!0})}},{key:"addMaskLayer",value:function(i){this.masks.push(i)}},{key:"removeMaskLayer",value:function(i){var o=this.masks.indexOf(i);o>-1&&this.masks.splice(o,1),i.destroy()}},{key:"getAttribute",value:function(i){return this.styleAttributeService.getLayerStyleAttribute(i)}},{key:"getLayerConfig",value:function(){return this.configService.getLayerConfig(this.id)}},{key:"updateLayerConfig",value:function(i){var o=this;if(Object.keys(i).map(function(u){u in o.rawConfig&&(o.rawConfig[u]=i[u])}),!this.startInit)this.needUpdateConfig=Qe(Qe({},this.needUpdateConfig),i);else{var a=this.container.get(wt.SceneID);this.configService.setLayerConfig(a,this.id,Qe(Qe(Qe({},this.configService.getLayerConfig(this.id)),this.needUpdateConfig),i)),this.needUpdateConfig={}}}},{key:"setContainer",value:function(i,o){this.container=i,this.sceneContainer=o}},{key:"getContainer",value:function(){return this.container}},{key:"addPlugin",value:function(i){return this.plugins.push(i),this}},{key:"init",value:function(){var n=Mt(he.mark(function o(){var a=this,u,c,f,m,_,b,A;return he.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:u=this.container.get(wt.SceneID),this.startInit=!0,this.configService.setLayerConfig(u,this.id,this.rawConfig),this.layerType=this.rawConfig.layerType,this.iconService=this.container.get(wt.IIconService),this.fontService=this.container.get(wt.IFontService),this.rendererService=this.container.get(wt.IRendererService),this.layerService=this.container.get(wt.ILayerService),this.debugService=this.container.get(wt.IDebugService),this.interactionService=this.container.get(wt.IInteractionService),this.pickingService=this.container.get(wt.IPickingService),this.mapService=this.container.get(wt.IMapService),c=this.getLayerConfig(),f=c.enableMultiPassRenderer,m=c.passes,f&&m!==null&&m!==void 0&&m.length&&m.length>0&&this.mapService.on("mapAfterFrameChange",function(){a.renderLayers()}),this.cameraService=this.container.get(wt.ICameraService),this.coordinateService=this.container.get(wt.ICoordinateSystemService),this.shaderModuleService=this.container.get(wt.IShaderModuleService),this.postProcessingPassFactory=this.container.get(wt.IFactoryPostProcessingPass),this.normalPassFactory=this.container.get(wt.IFactoryNormalPass),this.styleAttributeService=this.container.get(wt.IStyleAttributeService),f&&(this.multiPassRenderer=this.container.get(wt.IMultiPassRenderer),this.multiPassRenderer.setLayer(this)),this.pendingStyleAttributes.forEach(function(P){var k=P.attributeName,L=P.attributeField,B=P.attributeValues,V=P.updateOptions;a.styleAttributeService.updateStyleAttribute(k,{scale:Qe({field:L},a.splitValuesAndCallbackInAttribute(B,L?void 0:a.getLayerConfig()[k]))},V)}),this.pendingStyleAttributes=[],this.plugins=this.container.getAll(wt.ILayerPlugin),_=pce(this.plugins);try{for(_.s();!(b=_.n()).done;)A=b.value,A.apply(this,{rendererService:this.rendererService,mapService:this.mapService,styleAttributeService:this.styleAttributeService,normalPassFactory:this.normalPassFactory,postProcessingPassFactory:this.postProcessingPassFactory})}catch(P){_.e(P)}finally{_.f()}return this.layerPickService=new lce(this),this.textureService=new cce(this),this.log(Ho.LayerInitStart),R.next=31,this.hooks.init.promise();case 31:this.log(Ho.LayerInitEnd),this.inited=!0,this.emit("inited",{target:this,type:"inited"}),this.emit("add",{target:this,type:"add"}),this.hooks.afterInit.call();case 36:case"end":return R.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"log",value:function(i){var o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"init";if(!(this.tileLayer||this.isTileLayer)){var u="".concat(this.id,".").concat(a,".").concat(i),c={id:this.id,type:this.type};(o=this.debugService)===null||o===void 0||o.log(u,c)}}},{key:"updateModelData",value:function(i){i.attributes&&i.elements?this.models.map(function(o){o.updateAttributesAndElements(i.attributes,i.elements)}):console.warn("data error")}},{key:"setLayerPickService",value:function(i){this.layerPickService=i}},{key:"prepareBuildModel",value:function(){Object.keys(this.needUpdateConfig||{}).length!==0&&this.updateLayerConfig({});var i=this.getLayerConfig(),o=i.animateOption;o!=null&&o.enable&&(this.layerService.startAnimate(),this.animateStatus=!0)}},{key:"color",value:function(i,o,a){return this.updateStyleAttribute("color",i,o,a),this}},{key:"texture",value:function(i,o,a){return this.updateStyleAttribute("texture",i,o,a),this}},{key:"rotate",value:function(i,o,a){return this.updateStyleAttribute("rotate",i,o,a),this}},{key:"size",value:function(i,o,a){return this.updateStyleAttribute("size",i,o,a),this}},{key:"filter",value:function(i,o,a){var u=this.updateStyleAttribute("filter",i,o,a);return this.dataState.dataSourceNeedUpdate=u&&this.inited,this}},{key:"shape",value:function(i,o,a){this.shapeOption={field:i,values:o};var u=this.updateStyleAttribute("shape",i,o,a);return this.dataState.dataSourceNeedUpdate=u&&this.inited,this}},{key:"label",value:function(i,o,a){return this.pendingStyleAttributes.push({attributeName:"label",attributeField:i,attributeValues:o,updateOptions:a}),this}},{key:"animate",value:function(i){var o={};return Ds(i)?(o.enable=!0,o=Qe(Qe({},o),i)):o.enable=i,this.updateLayerConfig({animateOption:o}),this}},{key:"source",value:function(i,o){return(i==null?void 0:i.type)==="source"?(this.setSource(i),this):(this.sourceOption={data:i,options:o},this.clusterZoom=0,this)}},{key:"setData",value:function(i,o){var a=this;return this.inited?(this.log(Ho.SourceInitStart,ps.UPDATE),this.layerSource.setData(i,o),this.log(Ho.SourceInitEnd,ps.UPDATE)):this.on("inited",function(){a.log(Ho.SourceInitStart,ps.UPDATE);var u=a.getSource();u?a.layerSource.setData(i,o):a.source(new wP(i,o)),a.layerSource.once("update",function(){a.log(Ho.SourceInitEnd,ps.UPDATE)})}),this}},{key:"style",value:function(i){var o=this,a=i.passes,u=hl(i,fce);a&&IP(a).forEach(function(f){var m=o.multiPassRenderer.getPostProcessor().getPostProcessingPassByName(f[0]);m&&m.updateOptions(f[1])}),u.borderColor&&(u.stroke=u.borderColor),u.borderWidth&&(u.strokeWidth=u.borderWidth);var c=u;return Object.keys(u).forEach(function(f){var m=u[f];Array.isArray(m)&&m.length===2&&!KA(m[0])&&!KA(m[1])&&(c[f]={field:m[0],value:m[1]})}),this.encodeStyle(c),this.updateLayerConfig(c),this}},{key:"encodeStyle",value:function(i){var o=this;Object.keys(i).forEach(function(a){[].concat(nr(o.enableShaderEncodeStyles),nr(o.enableDataEncodeStyles)).includes(a)&&gce(i[a])&&(i[a].field||i[a].value)&&!Z3(o.encodeStyleAttribute[a],i[a])?(o.encodeStyleAttribute[a]=i[a],o.updateStyleAttribute(a,i[a].field,i[a].value),o.inited&&(o.dataState.dataMappingNeedUpdate=!0)):o.encodeStyleAttribute[a]&&(delete o.encodeStyleAttribute[a],o.dataState.dataSourceNeedUpdate=!0)})}},{key:"scale",value:function(i,o){var a=Qe({},this.scaleOptions);if(Ds(i)?this.scaleOptions=Qe(Qe({},this.scaleOptions),i):this.scaleOptions[i]=o,this.styleAttributeService&&!Z3(a,this.scaleOptions)){var u=Ds(i)?i:F({},i,o);this.styleAttributeService.updateScaleAttribute(u)}return this}},{key:"renderLayers",value:function(){this.rendering=!0,this.layerService.reRender(),this.rendering=!1}},{key:"prerender",value:function(){}},{key:"render",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.tileLayer?(this.tileLayer.render(),this):(this.layerService.beforeRenderData(this),this.encodeDataLength<=0&&!this.forceRender?this:(this.renderModels(i),this))}},{key:"renderMultiPass",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(!(this.encodeDataLength<=0&&!this.forceRender)){u.next=2;break}return u.abrupt("return");case 2:if(!(this.multiPassRenderer&&this.multiPassRenderer.getRenderFlag())){u.next=7;break}return u.next=5,this.multiPassRenderer.render();case 5:u.next=8;break;case 7:this.multiPassRenderer?this.renderModels():this.renderModels();case 8:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"active",value:function(i){var o={};return o.enableHighlight=Ds(i)?!0:i,Ds(i)?(o.enableHighlight=!0,i.color&&(o.highlightColor=i.color),i.mix&&(o.activeMix=i.mix)):o.enableHighlight=!!i,this.updateLayerConfig(o),this}},{key:"setActive",value:function(i,o){var a=this;if(Ds(i)){var u=i.x,c=u===void 0?0:u,f=i.y,m=f===void 0?0:f;this.updateLayerConfig({highlightColor:Ds(o)?o.color:this.getLayerConfig().highlightColor,activeMix:Ds(o)?o.mix:this.getLayerConfig().activeMix}),this.pick({x:c,y:m})}else this.updateLayerConfig({pickedFeatureID:i,highlightColor:Ds(o)?o.color:this.getLayerConfig().highlightColor,activeMix:Ds(o)?o.mix:this.getLayerConfig().activeMix}),this.hooks.beforeHighlight.call(sh(i)).then(function(){setTimeout(function(){a.reRender()},1)})}},{key:"select",value:function(i){var o={};return o.enableSelect=Ds(i)?!0:i,Ds(i)?(o.enableSelect=!0,i.color&&(o.selectColor=i.color),i.mix&&(o.selectMix=i.mix)):o.enableSelect=!!i,this.updateLayerConfig(o),this}},{key:"setSelect",value:function(i,o){var a=this;if(Ds(i)){var u=i.x,c=u===void 0?0:u,f=i.y,m=f===void 0?0:f;this.updateLayerConfig({selectColor:Ds(o)?o.color:this.getLayerConfig().selectColor,selectMix:Ds(o)?o.mix:this.getLayerConfig().selectMix}),this.pick({x:c,y:m})}else this.updateLayerConfig({pickedFeatureID:i,selectColor:Ds(o)?o.color:this.getLayerConfig().selectColor,selectMix:Ds(o)?o.mix:this.getLayerConfig().selectMix}),this.hooks.beforeSelect.call(sh(i)).then(function(){setTimeout(function(){a.reRender()},1)})}},{key:"setBlend",value:function(i){return this.updateLayerConfig({blend:i}),this.reRender(),this}},{key:"show",value:function(){return this.updateLayerConfig({visible:!0}),this.reRender(),this.emit("show"),this}},{key:"hide",value:function(){return this.updateLayerConfig({visible:!1}),this.reRender(),this.emit("hide"),this}},{key:"setIndex",value:function(i){return this.zIndex=i,this.layerService.updateLayerRenderList(),this.layerService.renderLayers(),this}},{key:"setCurrentPickId",value:function(i){this.currentPickId=i}},{key:"getCurrentPickId",value:function(){return this.currentPickId}},{key:"setCurrentSelectedId",value:function(i){this.selectedFeatureID=i}},{key:"getCurrentSelectedId",value:function(){return this.selectedFeatureID}},{key:"isVisible",value:function(){var i=this.mapService.getZoom(),o=this.getLayerConfig(),a=o.visible,u=o.minZoom,c=u===void 0?-1/0:u,f=o.maxZoom,m=f===void 0?1/0:f;return!!a&&i>=c&&i0&&arguments[0]!==void 0?arguments[0]:!0;if(!this.isDestroyed){(i=this.layerModel)===null||i===void 0||i.uniformBuffers.forEach(function(b){b.destroy()}),this.layerChildren.map(function(b){return b.destroy(!1)}),this.layerChildren=[];var m=this.getLayerConfig(),_=m.maskfence;_&&(this.masks.map(function(b){return b.destroy(!1)}),this.masks=[]),this.hooks.beforeDestroy.call(),this.layerSource.off("update",this.sourceEvent),(o=this.multiPassRenderer)===null||o===void 0||o.destroy(),this.textureService.destroy(),this.styleAttributeService.clearAllAttributes(),this.hooks.afterDestroy.call(),(a=this.layerModel)===null||a===void 0||a.clearModels(f),(u=this.tileLayer)===null||u===void 0||u.destroy(),this.models=[],(c=this.debugService)===null||c===void 0||c.removeLog(this.id),this.emit("remove",{target:this,type:"remove"}),this.emit("destroy",{target:this,type:"destroy"}),this.removeAllListeners(),this.isDestroyed=!0}}},{key:"clear",value:function(){this.styleAttributeService.clearAllAttributes()}},{key:"clearModels",value:function(){var i;this.models.forEach(function(o){return o.destroy()}),(i=this.layerModel)===null||i===void 0||i.clearModels(),this.models=[]}},{key:"isDirty",value:function(){return!!(this.styleAttributeService.getLayerStyleAttributes()||[]).filter(function(i){return i.needRescale||i.needRemapping||i.needRegenerateVertices}).length}},{key:"setSource",value:function(i){var o=this;if(this.layerSource&&this.layerSource.off("update",this.sourceEvent),this.layerSource=i,this.clusterZoom=0,this.inited&&this.layerSource.cluster){var a=this.mapService.getZoom();this.layerSource.updateClusterData(a)}this.layerSource.inited&&this.sourceEvent(),this.layerSource.on("update",function(u){var c=u.type;if(o.coordCenter===void 0){var f,m=o.layerSource.center;o.coordCenter=m,(f=o.mapService)!==null&&f!==void 0&&f.setCoordCenter&&o.mapService.setCoordCenter(m)}if(c==="update"){if(o.tileLayer){o.tileLayer.reload();return}o.sourceEvent()}})}},{key:"getSource",value:function(){return this.layerSource}},{key:"getScaleOptions",value:function(){return this.scaleOptions}},{key:"setEncodedData",value:function(i){this.encodedData=i,this.encodeDataLength=i.length}},{key:"getEncodedData",value:function(){return this.encodedData}},{key:"getScale",value:function(i){return this.styleAttributeService.getLayerAttributeScale(i)}},{key:"getLegend",value:function(i){var o,a,u,c=this.styleAttributeService.getLayerStyleAttribute(i),f=(c==null||(o=c.scale)===null||o===void 0?void 0:o.scalers)||[];return{type:(a=f[0].option)===null||a===void 0?void 0:a.type,field:c==null||(u=c.scale)===null||u===void 0?void 0:u.field,items:this.getLegendItems(i)}}},{key:"getLegendItems",value:function(i){var o=this.styleAttributeService.getLayerAttributeScale(i);if(!o)return[];if(o.invertExtent){var a=o.range().map(function(f){return F({value:o.invertExtent(f)},i,f)});return a}else if(o.ticks){var u=o.ticks().map(function(f){return F({value:f},i,o(f))});return u}else if(o!=null&&o.domain){var c=o.domain().filter(function(f){return!_ce(f)}).map(function(f){return F({value:f},i,o(f))});return c}return[]}},{key:"pick",value:function(i){var o=i.x,a=i.y;this.interactionService.triggerHover({x:o,y:a})}},{key:"boxSelect",value:function(i,o){this.pickingService.boxPickLayer(this,i,o)}},{key:"buildLayerModel",value:function(){var n=Mt(he.mark(function o(a){var u=this,c,f,m,_,b,A,w,R,P,k,L,B,V,G;return he.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return c=a.moduleName,f=a.vertexShader,m=a.fragmentShader,_=a.inject,b=a.triangulation,A=a.styleOption,w=a.pickingEnabled,R=w===void 0?!0:w,P=hl(a,hce),this.shaderModuleService.registerModule(c,{vs:f,fs:m,inject:_}),k=this.shaderModuleService.getModule(c),L=k.vs,B=k.fs,V=k.uniforms,G=this.rendererService.createModel,Z.abrupt("return",new Promise(function(ve){var Ie=u.styleAttributeService.createAttributesAndIndices(u.encodedData,b,A),de=Ie.attributes,se=Ie.elements,le=Ie.count,ye=[].concat(nr(u.layerModel.uniformBuffers),nr(u.rendererService.uniformBuffers),[u.getLayerUniformBuffer()]);R&&ye.push(u.getPickingUniformBuffer());var ke=Qe({attributes:de,uniforms:V,fs:B,vs:L,elements:se,blend:RP[up.normal],uniformBuffers:ye,textures:u.layerModel.textures},P);le&&(ke.count=le);var Rt=G(ke);ve(Rt)}));case 5:case"end":return Z.stop()}},o,this)}));function i(o){return n.apply(this,arguments)}return i}()},{key:"createAttributes",value:function(i){var o=i.triangulation,a=this.styleAttributeService.createAttributes(this.encodedData,o),u=a.attributes;return u}},{key:"getTime",value:function(){return this.layerService.clock.getDelta()}},{key:"setAnimateStartTime",value:function(){this.animateStartTime=this.layerService.clock.getElapsedTime()}},{key:"stopAnimate",value:function(){this.animateStatus&&(this.layerService.stopAnimate(),this.animateStatus=!1,this.updateLayerConfig({animateOption:{enable:!1}}))}},{key:"getLayerAnimateTime",value:function(){return this.layerService.clock.getElapsedTime()-this.animateStartTime}},{key:"needPick",value:function(i){var o=this.getLayerConfig(),a=o.enableHighlight,u=a===void 0?!0:a,c=o.enableSelect,f=c===void 0?!0:c,m=this.eventNames().indexOf(i)!==-1||this.eventNames().indexOf("un"+i)!==-1;return(i==="click"||i==="dblclick")&&f&&(m=!0),i==="mousemove"&&(u||this.eventNames().indexOf("mouseenter")!==-1||this.eventNames().indexOf("unmousemove")!==-1||this.eventNames().indexOf("mouseout")!==-1)&&(m=!0),this.isVisible()&&m}},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:throw new Error("Method not implemented.");case 1:case"end":return u.stop()}},o)}));function i(){return n.apply(this,arguments)}return i}()},{key:"rebuildModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,this.buildModels();case 2:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"renderMulPass",value:function(){var n=Mt(he.mark(function o(a){return he.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,a.render();case 2:case"end":return c.stop()}},o)}));function i(o){return n.apply(this,arguments)}return i}()},{key:"renderModels",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.encodeDataLength<=0&&!this.forceRender?(this.clearModels(),this):(this.hooks.beforeRender.call(),this.models.forEach(function(a){a.draw({uniforms:i.layerModel.getUninforms(),blend:i.layerModel.getBlend(),stencil:i.layerModel.getStencil(o),textures:i.layerModel.textures},(o==null?void 0:o.ispick)||!1)}),this.hooks.afterRender.call(),this)}},{key:"updateStyleAttribute",value:function(i,o,a,u){var c=this.configService.getAttributeConfig(this.id)||{};return Z3(c[i],{field:o,values:a})?!1:(["color","size","texture","rotate","filter","label","shape"].indexOf(i)!==-1&&this.configService.setAttributeConfig(this.id,F({},i,{field:o,values:a})),this.startInit?this.styleAttributeService.updateStyleAttribute(i,{scale:Qe({field:o},this.splitValuesAndCallbackInAttribute(a,this.getLayerConfig()[o]))},u):this.pendingStyleAttributes.push({attributeName:i,attributeField:o,attributeValues:a,updateOptions:u}),!0)}},{key:"getLayerAttributeConfig",value:function(){return this.configService.getAttributeConfig(this.id)}},{key:"getShaderPickStat",value:function(){return this.layerService.getShaderPickStat()}},{key:"setEarthTime",value:function(i){console.warn("empty fn")}},{key:"processData",value:function(i){return i}},{key:"getModelType",value:function(){throw new Error("Method not implemented.")}},{key:"getDefaultConfig",value:function(){return{}}},{key:"initLayerModels",value:function(){var n=Mt(he.mark(function o(){var a,u;return he.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return this.models.forEach(function(m){return m.destroy()}),this.models=[],this.uniformBuffers.forEach(function(m){m.destroy()}),this.uniformBuffers=[],a=this.rendererService.createBuffer({data:new Float32Array(20).fill(0),isUBO:!0}),this.uniformBuffers.push(a),u=this.rendererService.createBuffer({data:new Float32Array(20).fill(0),isUBO:!0}),this.uniformBuffers.push(u),f.next=10,this.layerModel.initModels();case 10:this.models=f.sent;case 11:case"end":return f.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"getLayerUniformBuffer",value:function(){return this.uniformBuffers[0]}},{key:"getPickingUniformBuffer",value:function(){return this.uniformBuffers[1]}},{key:"reRender",value:function(){this.inited&&this.layerService.reRender()}},{key:"splitValuesAndCallbackInAttribute",value:function(i){return{values:qA(i)?void 0:i,callback:qA(i)?i:void 0}}}]),r}(ju.EventEmitter),YA=mi(Y3.prototype,"configService",[XA],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Y3);function yce(e,t){return{enable:e,mask:255,func:{cmp:W.EQUAL,ref:t?1:0,mask:1}}}function JA(e){return e.maskOperation===py.OR?{enable:!0,mask:255,func:{cmp:W.ALWAYS,ref:1,mask:255},opFront:{fail:W.KEEP,zfail:W.REPLACE,zpass:W.REPLACE}}:{enable:!0,mask:255,func:{cmp:e.stencilType===m1.SINGLE||e.stencilIndex===0?W.ALWAYS:W.LESS,ref:e.stencilType===m1.SINGLE?1:e.stencilIndex===0?2:1,mask:255},opFront:{fail:W.KEEP,zfail:W.REPLACE,zpass:W.REPLACE}}}var Vn=function(e){return e[e.POSITION=0]="POSITION",e[e.COLOR=1]="COLOR",e[e.VERTEX_ID=2]="VERTEX_ID",e[e.PICKING_COLOR=3]="PICKING_COLOR",e[e.STROKE=4]="STROKE",e[e.OPACITY=5]="OPACITY",e[e.OFFSETS=6]="OFFSETS",e[e.ROTATION=7]="ROTATION",e[e.EXTRUSION_BASE=8]="EXTRUSION_BASE",e[e.SIZE=9]="SIZE",e[e.SHAPE=10]="SHAPE",e[e.EXTRUDE=11]="EXTRUDE",e[e.MAX=12]="MAX",e[e.NORMAL=13]="NORMAL",e[e.UV=14]="UV",e[e.LINEAR=15]="LINEAR",e}({});function xce(e){switch(e){case"rotation":return{name:"Rotation",type:wn.Attribute,descriptor:{name:"a_Rotation",shaderLocation:Vn.ROTATION,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:1,update:function(r){var n=r.rotation,i=n===void 0?0:n;return Array.isArray(i)?[i[0]]:[i]}}};case"stroke":return{name:"stroke",type:wn.Attribute,descriptor:{name:"a_Stroke",shaderLocation:Vn.STROKE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:4,update:function(r){var n=r.stroke,i=n===void 0?[1,1,1,1]:n;return i}}};case"opacity":return{name:"opacity",type:wn.Attribute,descriptor:{name:"a_Opacity",shaderLocation:Vn.OPACITY,buffer:{usage:W.STATIC_DRAW,data:[],type:W.FLOAT},size:1,update:function(r){var n=r.opacity,i=n===void 0?1:n;return[i]}}};case"extrusionBase":return{name:"extrusionBase",type:wn.Attribute,descriptor:{name:"a_ExtrusionBase",shaderLocation:Vn.EXTRUSION_BASE,buffer:{usage:W.STATIC_DRAW,data:[],type:W.FLOAT},size:1,update:function(r){var n=r.extrusionBase,i=n===void 0?0:n;return[i]}}};case"offsets":return{name:"offsets",type:wn.Attribute,descriptor:{name:"a_Offsets",shaderLocation:Vn.OFFSETS,buffer:{usage:W.STATIC_DRAW,data:[],type:W.FLOAT},size:2,update:function(r){var n=r.offsets;return n}}};case"thetaOffset":return{name:"thetaOffset",type:wn.Attribute,descriptor:{name:"a_ThetaOffset",shaderLocation:15,buffer:{usage:W.STATIC_DRAW,data:[],type:W.FLOAT},size:1,update:function(r){var n=r.thetaOffset,i=n===void 0?1:n;return[i]}}};default:return}}var bce={opacity:1,stroke:[1,0,0,1],offsets:[0,0],rotation:0,extrusionBase:0,strokeOpacity:1,thetaOffset:.314},J2={opacity:"float",stroke:"vec4",offsets:"vec2",textOffset:"vec2",rotation:"float",extrusionBase:"float",strokeOpacity:"float",thetaOffset:"float"};function eT(e){return Math.max(Math.ceil(e/4)*4,4)}var tT,q3,rT,nT={opacity:Vn.OPACITY,stroke:Vn.STROKE,offsets:Vn.OFFSETS,rotation:Vn.ROTATION,extrusionBase:Vn.EXTRUSION_BASE,thetaOffset:15},Ba=(tT=rb(wt.IGlobalConfigService),q3=function(){function e(t){Ht(this,e),F(this,"uniformBuffers",[]),F(this,"textures",[]),F(this,"preStyleAttribute",{}),F(this,"encodeStyleAttribute",{}),bi(this,"configService",rT,this),this.layer=t,this.rendererService=t.getContainer().get(wt.IRendererService),this.pickingService=t.getContainer().get(wt.IPickingService),this.shaderModuleService=t.getContainer().get(wt.IShaderModuleService),this.styleAttributeService=t.getContainer().get(wt.IStyleAttributeService),this.mapService=t.getContainer().get(wt.IMapService),this.iconService=t.getContainer().get(wt.IIconService),this.fontService=t.getContainer().get(wt.IFontService),this.cameraService=t.getContainer().get(wt.ICameraService),this.layerService=t.getContainer().get(wt.ILayerService),this.registerStyleAttribute(),this.registerBuiltinAttributes(),this.startModelAnimate();var r=this.rendererService.createTexture2D;this.createTexture2D=r}return jt(e,[{key:"getBlend",value:function(){var r=this.layer.getLayerConfig(),n=r.blend,i=n===void 0?"normal":n;return RP[up[i]]}},{key:"getStencil",value:function(r){var n=this.layer.getLayerConfig(),i=n.mask,o=i===void 0?!1:i,a=n.maskInside,u=a===void 0?!0:a,c=n.enableMask,f=n.maskOperation,m=f===void 0?py.AND:f;if(this.layer.type==="MaskLayer")return JA({isStencil:!0,stencilType:m1.SINGLE});if(r.isStencil)return JA(Qe(Qe({},r),{},{maskOperation:m}));var _=o||c&&this.layer.masks.length!==0||this.layer.tileMask!==void 0;return yce(_,u)}},{key:"getDefaultStyle",value:function(){return{}}},{key:"getUninforms",value:function(){var r=this.getCommonUniformsInfo(),n=this.getUniformsBufferInfo(this.getStyleAttribute());this.updateStyleUnifoms();var i=Qe(Qe({},n.uniformsOption),r.uniformsOption);return!this.rendererService.hasOwnProperty("device")&&this.textures&&this.textures.length===1&&(i.u_texture=this.textures[0]),i}},{key:"getAnimateUniforms",value:function(){return{}}},{key:"needUpdate",value:function(){var t=Mt(he.mark(function n(){return he.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",!1);case 1:case"end":return o.stop()}},n)}));function r(){return t.apply(this,arguments)}return r}()},{key:"buildModels",value:function(){var t=Mt(he.mark(function n(){return he.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:throw new Error("Method not implemented.");case 1:case"end":return o.stop()}},n)}));function r(){return t.apply(this,arguments)}return r}()},{key:"initModels",value:function(){var t=Mt(he.mark(function n(){return he.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:throw new Error("Method not implemented.");case 1:case"end":return o.stop()}},n)}));function r(){return t.apply(this,arguments)}return r}()},{key:"clearModels",value:function(){}},{key:"getAttribute",value:function(){throw new Error("Method not implemented.")}},{key:"prerender",value:function(){}},{key:"render",value:function(r){throw new Error("Method not implemented.")}},{key:"registerBuiltinAttributes",value:function(){throw new Error("Method not implemented.")}},{key:"animateOption2Array",value:function(r){return[r.enable?0:1,r.duration||4,r.interval||.2,r.trailLength||.1]}},{key:"startModelAnimate",value:function(){var r=this.layer.getLayerConfig(),n=r.animateOption;n.enable&&this.layer.setAnimateStartTime()}},{key:"getInject",value:function(){var r=this.layer.encodeStyleAttribute,n="",i=[];this.layer.enableShaderEncodeStyles.forEach(function(u){r[u]?n+="#define USE_ATTRIBUTE_".concat(u.toUpperCase(),` 0.0; `):i.push(" ".concat(J2[u]," u_").concat(u,";")),n+=` #ifdef USE_ATTRIBUTE_`.concat(u.toUpperCase(),` layout(location = `).concat(nT[u],") in ").concat(J2[u]," a_").concat(u.charAt(0).toUpperCase()+u.slice(1),`; #endif `)});var o=i.length?` layout(std140) uniform AttributeUniforms { `.concat(i.join(` `),` }; `):"";n+=o;var a="";return this.layer.enableShaderEncodeStyles.forEach(function(u){a+=` #ifdef USE_ATTRIBUTE_`.concat(u.toUpperCase(),` `).concat(J2[u]," ").concat(u," = a_").concat(u.charAt(0).toUpperCase()+u.slice(1),`; #else `).concat(J2[u]," ").concat(u," = u_").concat(u,`; #endif `)}),{"vs:#decl":n,"fs:#decl":o,"vs:#main-start":a}}},{key:"getStyleAttribute",value:function(){var r=this,n={};return this.layer.enableShaderEncodeStyles.forEach(function(i){if(!r.layer.encodeStyleAttribute[i]){var o=r.layer.getLayerConfig()[i],a=typeof o>"u"?bce[i]:o;i==="stroke"&&(a=Ta(a)),n["u_"+i]=a}}),n}},{key:"registerStyleAttribute",value:function(){var r=this;Object.keys(this.layer.encodeStyleAttribute).forEach(function(n){var i=xce(n);i&&(r.styleAttributeService.registerStyleAttribute(i),i.descriptor&&(i.descriptor.shaderLocation=nT[n]))})}},{key:"updateEncodeAttribute",value:function(r,n){this.encodeStyleAttribute[r]=n}},{key:"initUniformsBuffer",value:function(){var r=this.getUniformsBufferInfo(this.getStyleAttribute()),n=this.getCommonUniformsInfo();r.uniformsLength!==0&&(this.attributeUnifoms=this.rendererService.createBuffer({data:new Float32Array(eT(r.uniformsLength)).fill(0),isUBO:!0}),this.uniformBuffers.push(this.attributeUnifoms)),n.uniformsLength!==0&&(this.commonUnifoms=this.rendererService.createBuffer({data:new Float32Array(eT(n.uniformsLength)).fill(0),isUBO:!0}),this.uniformBuffers.push(this.commonUnifoms))}},{key:"getUniformsBufferInfo",value:function(r){var n=0,i=[];return Object.values(r).forEach(function(o){Array.isArray(o)?(i.push.apply(i,nr(o)),n+=o.length):typeof o=="number"?(i.push(o),n+=1):typeof o=="boolean"&&(i.push(Number(o)),n+=1)}),{uniformsOption:r,uniformsLength:n,uniformsArray:i}}},{key:"getCommonUniformsInfo",value:function(){return{uniformsLength:0,uniformsArray:[],uniformsOption:{}}}},{key:"updateStyleUnifoms",value:function(){var r,n,i=this.getUniformsBufferInfo(this.getStyleAttribute()),o=i.uniformsArray,a=this.getCommonUniformsInfo(),u=a.uniformsArray;(r=this.attributeUnifoms)===null||r===void 0||r.subData({offset:0,data:new Uint8Array(new Float32Array(o).buffer)}),(n=this.commonUnifoms)===null||n===void 0||n.subData({offset:0,data:new Uint8Array(new Float32Array(u).buffer)})}}]),e}(),rT=mi(q3.prototype,"configService",[tT],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),q3),iT=function(e){return e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e}({}),Ece=function(e){return e.NORMAL="normal",e.REPLACE="replace",e}({}),ib=function(e){return e[e.pixel=0]="pixel",e[e.meter=1]="meter",e}({}),PP=100;function aT(e){return e/180*Math.acos(-1)}function OP(e){var t=aT(e[0])+Math.PI/2,r=aT(e[1]),n=PP+Math.random()*.4,i=n*Math.cos(r)*Math.cos(t),o=n*Math.cos(r)*Math.sin(t),a=n*Math.sin(r);return[o,a,i]}var eg=Vi();Vi();var Jo=Vi(),Qh=Vi(),Td=Vi();function K3(e,t,r,n,i){Oo(e,r,n),df(e,e),t=l0(-e[1],e[0]);var o=l0(-r[1],r[0]);return[i/mp(t,o),t]}function Jh(e,t){return FM(e,-t[1],t[0])}function wd(e,t,r){return c0(e,t,r),df(e,e),e}function Q3(e,t){return e[0]===t[0]&&e[1]===t[1]}var Sce=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ht(this,e),F(this,"lastFlip",-1),F(this,"miter",l0(0,0)),F(this,"started",!1),F(this,"dash",!1),F(this,"totalDistance",0),F(this,"currentIndex",0),this.join=t.join||"miter",this.cap=t.cap||"butt",this.miterLimit=t.miterLimit||10,this.thickness=t.thickness||1,this.dash=t.dash||!1,this.complex={positions:[],indices:[],normals:[],startIndex:0,indexes:[]}}return jt(e,[{key:"simpleExtrude",value:function(r){var n=this.complex;if(r.length<=1)return n;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var i=r.length,o=n.startIndex,a=1;athis.miterLimit&&(le=!0)}le?(A.push(this.normal[0],this.normal[1],0),A.push(de[0],de[1],0),b.push(o[0],o[1],o[2]|0,this.totalDistance,-this.thickness*se,o[2]|0),this.complex.indexes.push(this.currentIndex),b.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness*se,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,_.push.apply(_,nr(this.lastFlip!==-se?[n,n+2,n+3]:[n+2,n+1,n+3])),_.push(n+2,n+3,n+4),Jh(eg,Qh),lf(this.normal,eg),A.push(this.normal[0],this.normal[1],0),b.push(o[0],o[1],o[2]|0,this.totalDistance,-this.thickness*se,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,m+=3):(this.extrusions(b,A,o,de,Ie,this.totalDistance),_.push.apply(_,nr(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),se=-1,lf(this.normal,de),m+=2),this.lastFlip=se}else{if(Jh(this.normal,Jo),w){var G=Vi(),K=Vi();c0(K,Jo,this.normal),Oo(G,Jo,this.normal),A.push(K[0],K[1],0),A.push(G[0],G[1],0),b.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),b.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(b,A,o,this.normal,this.thickness,this.totalDistance);_.push.apply(_,nr(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),m+=2}return m}},{key:"segment",value:function(r,n,i,o,a){var u=0,c=r.indices,f=r.positions,m=r.normals,_=this.cap==="square",b=this.join==="bevel",A=ko([o[0],o[1]]),w=ko([i[0],i[1]]);wd(Jo,A,w);var R=0;if(this.dash&&(R=this.lineSegmentDistance(A,w),this.totalDistance+=R),this.normal||(this.normal=Vi(),Jh(this.normal,Jo)),!this.started)if(this.started=!0,_){var P=Vi(),k=Vi();Oo(P,this.normal,Jo),Oo(k,this.normal,Jo),m.push(k[0],k[1],0),m.push(P[0],P[1],0),f.push(i[0],i[1],i[2]|0,this.totalDistance-R,-this.thickness,i[2]|0),this.complex.indexes.push(this.currentIndex),f.push(i[0],i[1],i[2]|0,this.totalDistance-R,this.thickness,i[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(f,m,i,this.normal,this.thickness,this.totalDistance-R);if(c.push(n+0,n+1,n+2),a){var V=ko([a[0],a[1]]);Q3(A,V)&&Oo(V,A,df(V,b1(V,A,w))),wd(Qh,V,A);var G=K3(Td,Vi(),Jo,Qh,this.thickness),K=Nn(G,2),Z=K[0],ve=K[1],Ie=mp(Td,this.normal)<0?-1:1,de=b;if(!de&&this.join==="miter"){var se=Z;se>this.miterLimit&&(de=!0)}de?(m.push(this.normal[0],this.normal[1],0),m.push(ve[0],ve[1],0),f.push(o[0],o[1],o[2]|0,this.totalDistance,-this.thickness*Ie,o[2]|0),this.complex.indexes.push(this.currentIndex),f.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness*Ie,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,c.push.apply(c,nr(this.lastFlip!==-Ie?[n,n+2,n+3]:[n+2,n+1,n+3])),c.push(n+2,n+3,n+4),Jh(eg,Qh),lf(this.normal,eg),m.push(this.normal[0],this.normal[1],0),f.push(o[0],o[1],o[2]|0,this.totalDistance,-this.thickness*Ie,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,u+=3):(this.extrusions(f,m,o,ve,Z,this.totalDistance),c.push.apply(c,nr(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),Ie=-1,lf(this.normal,ve),u+=2),this.lastFlip=Ie}else{if(Jh(this.normal,Jo),_){var L=Vi(),B=Vi();c0(B,Jo,this.normal),Oo(L,Jo,this.normal),m.push(B[0],B[1],0),m.push(L[0],L[1],0),f.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),f.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(f,m,o,this.normal,this.thickness,this.totalDistance);c.push.apply(c,nr(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),u+=2}return u}},{key:"extrusions",value:function(r,n,i,o,a,u){n.push(o[0],o[1],0),n.push(o[0],o[1],0),r.push(i[0],i[1],i[2]|0,u,-a,i[2]|0),this.complex.indexes.push(this.currentIndex),r.push(i[0],i[1],i[2]|0,u,a,i[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}},{key:"lineSegmentDistance",value:function(r,n){var i=n[0]-r[0],o=n[1]-r[1];return Math.sqrt(i*i+o*o)}}]),e}();function kP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e[0][0],n=e[0][e[0].length-1];r[0]===n[0]&&r[1]===n[1]&&(e[0]=e[0].slice(0,e[0].length-1));for(var i=e[0].length,o=mf.flatten(e),a=o.vertices,u=o.dimensions,c=[],f=[],m=[],_=0;_3&&arguments[3]!==void 0?arguments[3]:!1,i=zd(),o=zd(),a=zd();n&&(e=A3(e),t=A3(t),r=A3(r));var u=Gl.apply(R3,nr(e)),c=Gl.apply(R3,nr(t)),f=Gl.apply(R3,nr(r));K6(i,f,c),K6(o,u,c),kM(a,i,o);var m=zd();return $d(m,a),m}var Ul,Ev=function(e){return e.CYLINDER="cylinder",e.SQUARECOLUMN="squareColumn",e.TRIANGLECOLUMN="triangleColumn",e.HEXAGONCOLUMN="hexagonColumn",e.PENTAGONCOLUMN="pentagonColumn",e}({}),Sv=function(e){return e.CIRCLE="circle",e.SQUARE="square",e.TRIANGLE="triangle",e.HEXAGON="hexagon",e.PENTAGON="pentagon",e}({});function qm(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=Math.PI*2/e,n=[],i=0;i1&&arguments[1]!==void 0?arguments[1]:!1;if(tg&&tg[e])return tg[e];var r=J3[e]?J3[e]():J3.cylinder(),n=kP([r],t);return tg[e]=n,n}/*! ***************************************************************************** Copyright (C) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */var hT;(function(e){(function(t){var r=typeof _c=="object"?_c:typeof self=="object"?self:typeof this=="object"?this:Function("return this;")(),n=i(e);typeof r.Reflect>"u"?r.Reflect=e:n=i(r.Reflect,n),t(n);function i(o,a){return function(u,c){typeof o[u]!="function"&&Object.defineProperty(o,u,{configurable:!0,writable:!0,value:c}),a&&a(u,c)}}})(function(t){var r=Object.prototype.hasOwnProperty,n=typeof Symbol=="function",i=n&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",o=n&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",a=typeof Object.create=="function",u={__proto__:[]}instanceof Array,c=!a&&!u,f={create:a?function(){return Q(Object.create(null))}:u?function(){return Q({__proto__:null})}:function(){return Q({})},has:c?function(Ge,at){return r.call(Ge,at)}:function(Ge,at){return at in Ge},get:c?function(Ge,at){return r.call(Ge,at)?Ge[at]:void 0}:function(Ge,at){return Ge[at]}},m=Object.getPrototypeOf(Function),_=typeof process=="object"&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL==="true",b=!_&&typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:tr(),A=!_&&typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:lr(),w=!_&&typeof WeakMap=="function"?WeakMap:or(),R=new w;function P(Ge,at,yt,rr){if(dt(yt)){if(!Qt(Ge))throw new TypeError;if(!Ut(at))throw new TypeError;return de(Ge,at)}else{if(!Qt(Ge))throw new TypeError;if(!ur(at))throw new TypeError;if(!ur(rr)&&!dt(rr)&&!nt(rr))throw new TypeError;return nt(rr)&&(rr=void 0),yt=Je(yt),se(Ge,at,yt,rr)}}t("decorate",P);function k(Ge,at){function yt(rr,hr){if(!ur(rr))throw new TypeError;if(!dt(hr)&&!ge(hr))throw new TypeError;Gt(Ge,at,rr,hr)}return yt}t("metadata",k);function L(Ge,at,yt,rr){if(!ur(yt))throw new TypeError;return dt(rr)||(rr=Je(rr)),Gt(Ge,at,yt,rr)}t("defineMetadata",L);function B(Ge,at,yt){if(!ur(at))throw new TypeError;return dt(yt)||(yt=Je(yt)),ye(Ge,at,yt)}t("hasMetadata",B);function V(Ge,at,yt){if(!ur(at))throw new TypeError;return dt(yt)||(yt=Je(yt)),ke(Ge,at,yt)}t("hasOwnMetadata",V);function G(Ge,at,yt){if(!ur(at))throw new TypeError;return dt(yt)||(yt=Je(yt)),Rt(Ge,at,yt)}t("getMetadata",G);function K(Ge,at,yt){if(!ur(at))throw new TypeError;return dt(yt)||(yt=Je(yt)),Lt(Ge,at,yt)}t("getOwnMetadata",K);function Z(Ge,at){if(!ur(Ge))throw new TypeError;return dt(at)||(at=Je(at)),Zt(Ge,at)}t("getMetadataKeys",Z);function ve(Ge,at){if(!ur(Ge))throw new TypeError;return dt(at)||(at=Je(at)),st(Ge,at)}t("getOwnMetadataKeys",ve);function Ie(Ge,at,yt){if(!ur(at))throw new TypeError;dt(yt)||(yt=Je(yt));var rr=le(at,yt,!1);if(dt(rr)||!rr.delete(Ge))return!1;if(rr.size>0)return!0;var hr=R.get(at);return hr.delete(yt),hr.size>0||R.delete(at),!0}t("deleteMetadata",Ie);function de(Ge,at){for(var yt=Ge.length-1;yt>=0;--yt){var rr=Ge[yt],hr=rr(at);if(!dt(hr)&&!nt(hr)){if(!Ut(hr))throw new TypeError;at=hr}}return at}function se(Ge,at,yt,rr){for(var hr=Ge.length-1;hr>=0;--hr){var Cn=Ge[hr],rn=Cn(at,yt,rr);if(!dt(rn)&&!nt(rn)){if(!ur(rn))throw new TypeError;rr=rn}}return rr}function le(Ge,at,yt){var rr=R.get(Ge);if(dt(rr)){if(!yt)return;rr=new b,R.set(Ge,rr)}var hr=rr.get(at);if(dt(hr)){if(!yt)return;hr=new b,rr.set(at,hr)}return hr}function ye(Ge,at,yt){var rr=ke(Ge,at,yt);if(rr)return!0;var hr=Mr(at);return nt(hr)?!1:ye(Ge,hr,yt)}function ke(Ge,at,yt){var rr=le(at,yt,!1);return dt(rr)?!1:pn(rr.has(Ge))}function Rt(Ge,at,yt){var rr=ke(Ge,at,yt);if(rr)return Lt(Ge,at,yt);var hr=Mr(at);if(!nt(hr))return Rt(Ge,hr,yt)}function Lt(Ge,at,yt){var rr=le(at,yt,!1);if(!dt(rr))return rr.get(Ge)}function Gt(Ge,at,yt,rr){var hr=le(yt,rr,!0);hr.set(Ge,at)}function Zt(Ge,at){var yt=st(Ge,at),rr=Mr(Ge);if(rr===null)return yt;var hr=Zt(rr,at);if(hr.length<=0)return yt;if(yt.length<=0)return hr;for(var Cn=new A,rn=[],Ne=0,qe=yt;Ne=0&&Ne=this._keys.length?(this._index=-1,this._keys=at,this._values=at):this._index++,{value:qe,done:!1}}return{value:void 0,done:!0}},rn.prototype.throw=function(Ne){throw this._index>=0&&(this._index=-1,this._keys=at,this._values=at),Ne},rn.prototype.return=function(Ne){return this._index>=0&&(this._index=-1,this._keys=at,this._values=at),{value:Ne,done:!0}},rn}();return function(){function rn(){this._keys=[],this._values=[],this._cacheKey=Ge,this._cacheIndex=-2}return Object.defineProperty(rn.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),rn.prototype.has=function(Ne){return this._find(Ne,!1)>=0},rn.prototype.get=function(Ne){var qe=this._find(Ne,!1);return qe>=0?this._values[qe]:void 0},rn.prototype.set=function(Ne,qe){var ct=this._find(Ne,!0);return this._values[ct]=qe,this},rn.prototype.delete=function(Ne){var qe=this._find(Ne,!1);if(qe>=0){for(var ct=this._keys.length,Vt=qe+1;Vt=e.colors.length?null:e.colors[n]),F(i,"value",r),i})}}function kce(e){var t=Dce();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function Dce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Fce=`uniform sampler2D u_texture; layout(std140) uniform commonUniforms { float u_opacity:1.0; float u_brightness:1.0; float u_contrast:1.0; float u_saturation:1.0; float u_gamma:1.0; }; in vec2 v_texCoord; out vec4 outputColor; vec3 setContrast(vec3 rgb, float contrast) { vec3 color = mix(vec3(0.5), rgb, contrast); color = clamp(color, 0.0, 1.0); return color; } vec3 setSaturation(vec3 rgb, float adjustment) { const vec3 grayVector = vec3(0.2125, 0.7154, 0.0721); vec3 intensity = vec3(dot(rgb, grayVector)); vec3 color = mix(intensity, rgb, adjustment); color = clamp(color, 0.0, 1.0); return color; } void main() { vec4 color = texture(SAMPLER_2D(u_texture),vec2(v_texCoord.x,v_texCoord.y)); //brightness color.rgb = mix(vec3(0.0, 0.0, 0.0), color.rgb, u_brightness); //contrast color.rgb = setContrast(color.rgb, u_contrast); // saturation color.rgb = setSaturation(color.rgb, u_saturation); // gamma color.rgb = pow(color.rgb, vec3(u_gamma)); outputColor = color; outputColor.a *= u_opacity; if(outputColor.a < 0.01) discard; } `,Bce=`layout(location = 0) in vec3 a_Position; layout(location = 14) in vec2 a_Uv; layout(std140) uniform commonUniforms { float u_opacity:1.0; float u_brightness:1.0; float u_contrast:1.0; float u_saturation:1.0; float u_gamma:1.0; }; out vec2 v_texCoord; #pragma include "projection" void main() { v_texCoord = a_Uv; vec4 project_pos = project_position(vec4(a_Position, 1.0)); gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy,0., 1.0)); } `,Lce=function(e){_n(r,e);var t=kce(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getCommonUniformsInfo",value:function(){var i=this.layer.getLayerConfig(),o=i.opacity,a=i.brightness,u=i.contrast,c=i.saturation,f=i.gamma,m={u_opacity:pv(o,1),u_brightness:pv(a,1),u_contrast:pv(u,1),u_saturation:pv(c,1),u_gamma:pv(f,1)};this.textures=[this.texture];var _=this.getUniformsBufferInfo(m);return _}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,this.loadTexture();case 2:return u.abrupt("return",this.buildModels());case 3:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"clearModels",value:function(){var i;(i=this.texture)===null||i===void 0||i.destroy()}},{key:"loadTexture",value:function(){var n=Mt(he.mark(function o(){var a,u,c;return he.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return a=this.rendererService.createTexture2D,this.texture=a({height:1,width:1}),u=this.layer.getSource(),m.next=5,u.data.images;case 5:c=m.sent,this.texture=a({data:c[0],width:c[0].width,height:c[0].height,mag:W.LINEAR,min:W.LINEAR});case 7:case"end":return m.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a;return he.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.initUniformsBuffer(),c.next=3,this.layer.buildLayerModel({moduleName:"rasterImage",vertexShader:Bce,fragmentShader:Fce,triangulation:gy,primitive:W.TRIANGLES,blend:{enable:!0},depth:{enable:!1},pickingEnabled:!1});case 3:return a=c.sent,c.abrupt("return",[a]);case 5:case"end":return c.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:wn.Attribute,descriptor:{name:"a_Uv",shaderLocation:Vn.UV,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:2,update:function(o,a,u){return[u[3],u[4]]}}})}}]),r}(Ba),Nce={image:Lce};function Uce(e){var t=zce();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function zce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var $ce=function(e){_n(r,e);var t=Uce(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Hce=` #define Animate 0.0 #define LineTexture 1.0 uniform sampler2D u_texture; layout(std140) uniform commonUniorm { vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; vec4 u_dash_array; vec4 u_sourceColor; vec4 u_targetColor; vec2 u_textSize; float segmentNumber; float u_lineDir: 1.0; float u_icon_step: 100; float u_line_texture: 0.0; float u_textureBlend; float u_blur : 0.9; float u_line_type: 0.0; float u_time; float u_linearColor: 0.0; }; in vec4 v_color; in vec2 v_iconMapUV; in vec4 v_lineData; //dash in vec4 v_dash_array; in float v_distance_ratio; out vec4 outputColor; #pragma include "picking" void main() { if(u_dash_array!=vec4(0.0)){ float dashLength = mod(v_distance_ratio, v_dash_array.x + v_dash_array.y + v_dash_array.z + v_dash_array.w); if(!(dashLength < v_dash_array.x || (dashLength > (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z))) { discard; }; } float animateSpeed = 0.0; // 运动速度 outputColor = v_color; if(u_animate.x == Animate && u_line_texture != LineTexture) { animateSpeed = u_time / u_animate.y; float alpha =1.0 - fract( mod(1.0- v_lineData.b, u_animate.z)* (1.0/ u_animate.z) + u_time / u_animate.y); alpha = (alpha + u_animate.w -1.0) / u_animate.w; // alpha = smoothstep(0., 1., alpha); alpha = clamp(alpha, 0.0, 1.0); outputColor.a *= alpha; } // 当存在贴图时在底色上贴上贴图 if(u_line_texture == LineTexture) { // while load texture float arcRadio = smoothstep( 0.0, 1.0, (v_lineData.r / segmentNumber)); // float arcRadio = smoothstep( 0.0, 1.0, d_distance_ratio); float count = v_lineData.g; // 贴图在弧线上重复的数量 float time = 0.0; if(u_animate.x == Animate) { time = u_time / u_animate.y; } float redioCount = arcRadio * count; float u = fract(redioCount - time); float v = v_lineData.a; // 横向 v vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.; vec4 pattern = texture(SAMPLER_2D(u_texture), uv); if(u_animate.x == Animate) { float currentPlane = floor(redioCount - time); float textureStep = floor(count * u_animate.z); float a = mod(currentPlane, textureStep); if(a < textureStep - 1.0) { pattern = vec4(0.0); } } if(u_textureBlend == 0.0) { // normal pattern.a = 0.0; outputColor = filterColor(outputColor + pattern); } else { // replace pattern.a *= v_color.a; if(outputColor.a <= 0.0) { pattern.a = 0.0; } outputColor = filterColor(pattern); } } else { outputColor = filterColor(outputColor); } }`,Gce=`#define Animate 0.0 #define LineTexture 1.0 layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in float a_Size; layout(location = 12) in vec4 a_Instance; layout(location = 14) in vec2 a_iconMapUV; layout(std140) uniform commonUniorm { vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; vec4 u_dash_array; vec4 u_sourceColor; vec4 u_targetColor; vec2 u_textSize; float segmentNumber; float u_lineDir: 1.0; float u_icon_step: 100; float u_line_texture: 0.0; float u_textureBlend; float u_blur : 0.9; float u_line_type: 0.0; float u_time; float u_linearColor: 0.0; }; out vec4 v_color; out vec2 v_iconMapUV; out vec4 v_lineData; //dash out vec4 v_dash_array; out float v_distance_ratio; #pragma include "projection" #pragma include "project" #pragma include "picking" float bezier3(vec3 arr, float t) { float ut = 1. - t; return (arr.x * ut + arr.y * t) * ut + (arr.y * ut + arr.z * t) * t; } vec2 midPoint(vec2 source, vec2 target, float arcThetaOffset) { vec2 center = target - source; float r = length(center); float theta = atan(center.y, center.x); float thetaOffset = arcThetaOffset; float r2 = r / 2.0 / cos(thetaOffset); float theta2 = theta + thetaOffset; vec2 mid = vec2(r2*cos(theta2) + source.x, r2*sin(theta2) + source.y); if(u_lineDir == 1.0) { // 正向 return mid; } else { // 逆向 // (mid + vmin)/2 = (s + t)/2 vec2 vmid = source + target - mid; return vmid; } // return mid; } float getSegmentRatio(float index) { // dash: index / (segmentNumber - 1.); // normal: smoothstep(0.0, 1.0, index / (segmentNumber - 1.)); return smoothstep(0.0, 1.0, index / (segmentNumber - 1.)); // return index / (segmentNumber - 1.); } vec2 interpolate (vec2 source, vec2 target, float t, float arcThetaOffset) { // if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation vec2 mid = midPoint(source, target, arcThetaOffset); vec3 x = vec3(source.x, mid.x, target.x); vec3 y = vec3(source.y, mid.y, target.y); return vec2(bezier3(x ,t), bezier3(y,t)); } vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) { // normalized direction of the line vec2 dir_screenspace = normalize(line_clipspace); // rotate by 90 degrees dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x); vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0; return offset; } vec2 getNormal(vec2 line_clipspace, float offset_direction) { // normalized direction of the line vec2 dir_screenspace = normalize(line_clipspace); // rotate by 90 degrees dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x); return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction); } void main() { //vs中计算渐变色 if(u_linearColor==1.0){ float d_segmentIndex = a_Position.x + 1.0; // 当前顶点在弧线中所处的分段位置 v_color = mix(u_sourceColor, u_targetColor, d_segmentIndex/segmentNumber); } else{ v_color = a_Color; } v_color.a = v_color.a * opacity; vec2 source = a_Instance.rg; // 起始点 vec2 target = a_Instance.ba; // 终点 float segmentIndex = a_Position.x; float segmentRatio = getSegmentRatio(segmentIndex); //计算dashArray和distanceRatio 输出到片元 vec2 s = source; vec2 t = target; if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x s = unProjCustomCoord(source); t = unProjCustomCoord(target); } float total_Distance = pixelDistance(s, t) / 2.0 * PI; v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / total_Distance; v_distance_ratio = segmentIndex / segmentNumber; float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0)); float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir); float d_distance_ratio; if(u_animate.x == Animate) { d_distance_ratio = segmentIndex / segmentNumber; if(u_lineDir != 1.0) { d_distance_ratio = 1.0 - d_distance_ratio; } } v_lineData.b = d_distance_ratio; vec4 curr = project_position(vec4(interpolate(source, target, segmentRatio, thetaOffset), 0.0, 1.0)); vec4 next = project_position(vec4(interpolate(source, target, nextSegmentRatio, thetaOffset), 0.0, 1.0)); vec2 offset = project_pixel(getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y)); float d_segmentIndex = a_Position.x + 1.0; // 当前顶点在弧线中所处的分段位置 v_lineData.r = d_segmentIndex; if(LineTexture == u_line_texture) { // 开启贴图模式 float arcDistrance = length(source - target); // 起始点和终点的距离 if(u_CoordinateSystem == COORDINATE_SYSTEM_P20) { // amap arcDistrance *= 1000000.0; } if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { // mapbox // arcDistrance *= 8.0; arcDistrance = project_pixel_allmap(arcDistrance); } v_iconMapUV = a_iconMapUV; float pixelLen = project_pixel_texture(u_icon_step); // 贴图沿弧线方向的长度 - 随地图缩放改变 float texCount = floor(arcDistrance/pixelLen); // 贴图在弧线上重复的数量 v_lineData.g = texCount; float lineOffsetWidth = length(offset + offset * sign(a_Position.y)); // 线横向偏移的距离 float linePixelSize = project_pixel(a_Size); // 定点位置偏移 v_lineData.a = lineOffsetWidth/linePixelSize; // 线图层贴图部分的 v 坐标值 } gl_Position = project_common_position_to_clipspace_v2(vec4(curr.xy + offset, 0, 1.0)); setPickingColor(a_PickingColor); } `,Wce={solid:0,dash:1};Ci.isNumber;var Xce=function(e){_n(r,e);var t=Vce(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var qce=`#define LineTypeSolid 0.0 #define LineTypeDash 1.0 #define Animate 0.0 #define LineTexture 1.0 uniform sampler2D u_texture; layout(std140) uniform commonUniorm { vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; vec4 u_dash_array: [10.0, 5., 0, 0]; vec4 u_sourceColor; vec4 u_targetColor; vec2 u_textSize; float u_globel; float u_globel_radius; float u_global_height: 10; float segmentNumber; float u_line_type: 0.0; float u_icon_step: 100; float u_line_texture: 0.0; float u_textureBlend; float u_time; float u_linearColor: 0.0; }; // varying vec2 v_normal; in vec4 v_dash_array; in vec4 v_color; in vec4 v_line_data; in float v_segmentIndex; in vec2 v_iconMapUV; out vec4 outputColor; #pragma include "picking" void main() { float animateSpeed = 0.0; // 运动速度 float d_distance_ratio = v_line_data.g; // 当前点位距离占线总长的比例 outputColor = v_color; if(u_line_type == LineTypeDash) { float flag = 0.; float dashLength = mod(d_distance_ratio, v_dash_array.x + v_dash_array.y + v_dash_array.z + v_dash_array.w); if(dashLength < v_dash_array.x || (dashLength > (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z)) { flag = 1.; } outputColor.a *=flag; } if(u_animate.x == Animate && u_line_texture != LineTexture) { animateSpeed = u_time / u_animate.y; float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + u_time / u_animate.y); alpha = (alpha + u_animate.w -1.0) / u_animate.w; // alpha = smoothstep(0., 1., alpha); alpha = clamp(alpha, 0.0, 1.0); outputColor.a *= alpha; // u_animate // x enable // y duration // z interval // w trailLength } if(u_line_texture == LineTexture && u_line_type != LineTypeDash) { // while load texture // float arcRadio = smoothstep( 0.0, 1.0, (v_segmentIndex / segmentNumber)); float arcRadio = v_segmentIndex / (segmentNumber - 1.0); float count = v_line_data.b; // // 贴图在弧线上重复的数量 float time = 0.0; if(u_animate.x == Animate) { time = u_time / u_animate.y; } float redioCount = arcRadio * count; float u = fract(redioCount - time); float v = v_line_data.a; // 线图层贴图部分的 v 坐标值 vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.; vec4 pattern = texture(SAMPLER_2D(u_texture), uv); if(u_animate.x == Animate) { float currentPlane = floor(redioCount - time); float textureStep = floor(count * u_animate.z); float a = mod(currentPlane, textureStep); if(a < textureStep - 1.0) { pattern = vec4(0.0); } } if(u_textureBlend == 0.0) { // normal pattern.a = 0.0; outputColor = filterColor(outputColor + pattern); } else { // replace pattern.a *= v_color.a; if(outputColor.a <= 0.0) { pattern.a = 0.0; discard; } else { outputColor = filterColor(pattern); } } } else { outputColor = filterColor(outputColor); } } `,Kce=`#define LineTypeSolid 0.0 #define LineTypeDash 1.0 #define Animate 0.0 #define LineTexture 1.0 layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in float a_Size; layout(location = 12) in vec4 a_Instance; layout(location = 14) in vec2 a_iconMapUV; layout(std140) uniform commonUniorm { vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; vec4 u_dash_array: [10.0, 5., 0, 0]; vec4 u_sourceColor; vec4 u_targetColor; vec2 u_textSize; float u_globel; float u_globel_radius; float u_global_height: 10; float segmentNumber; float u_line_type: 0.0; float u_icon_step: 100; float u_line_texture: 0.0; float u_textureBlend; float u_time; float u_linearColor: 0.0; }; out vec4 v_color; out vec4 v_dash_array; out float v_segmentIndex; out vec2 v_iconMapUV; out vec4 v_line_data; #pragma include "projection" #pragma include "project" #pragma include "picking" float maps (float value, float start1, float stop1, float start2, float stop2) { return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1)); } float getSegmentRatio(float index) { return smoothstep(0.0, 1.0, index / (segmentNumber - 1.0)); } float paraboloid(vec2 source, vec2 target, float ratio) { vec2 x = mix(source, target, ratio); vec2 center = mix(source, target, 0.5); float dSourceCenter = distance(source, center); float dXCenter = distance(x, center); return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter); } vec3 getPos(vec2 source, vec2 target, float segmentRatio) { float vertex_height = paraboloid(source, target, segmentRatio); return vec3( mix(source, target, segmentRatio), sqrt(max(0.0, vertex_height)) ); } vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) { // normalized direction of the line vec2 dir_screenspace = normalize(line_clipspace); // rotate by 90 degrees dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x); vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0; return offset; } vec2 getNormal(vec2 line_clipspace, float offset_direction) { // normalized direction of the line vec2 dir_screenspace = normalize(line_clipspace); // rotate by 90 degrees dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x); return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction); } float torad(float deg) { return (deg / 180.0) * acos(-1.0); } vec3 lglt2xyz(vec2 lnglat) { float pi = 3.1415926; // + Math.PI/2 是为了对齐坐标 float lng = torad(lnglat.x) + pi / 2.0; float lat = torad(lnglat.y); // 手动增加一些偏移,减轻面的冲突 float radius = u_globel_radius; float z = radius * cos(lat) * cos(lng); float x = radius * cos(lat) * sin(lng); float y = radius * sin(lat); return vec3(x, y, z); } void main() { //vs中计算渐变色 if(u_linearColor==1.0){ float d_segmentIndex = a_Position.x + 1.0; // 当前顶点在弧线中所处的分段位置 v_color = mix(u_sourceColor, u_targetColor, d_segmentIndex/segmentNumber); } else{ v_color = a_Color; } v_color.a = v_color.a * opacity; vec2 source = project_position(vec4(a_Instance.rg, 0, 0)).xy; vec2 target = project_position(vec4(a_Instance.ba, 0, 0)).xy; float segmentIndex = a_Position.x; float segmentRatio = getSegmentRatio(segmentIndex); float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0)); float d_distance_ratio; if(u_line_type == LineTypeDash) { d_distance_ratio = segmentIndex / segmentNumber; vec2 s = source; vec2 t = target; if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x s = unProjCustomCoord(source); t = unProjCustomCoord(target); } float total_Distance = pixelDistance(s, t) / 2.0 * PI; v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / (total_Distance / segmentNumber * segmentIndex); } if(u_animate.x == Animate) { d_distance_ratio = segmentIndex / segmentNumber; } v_line_data.g = d_distance_ratio; // 当前点位距离占线总长的比例 float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir); vec3 curr = getPos(source, target, segmentRatio); vec3 next = getPos(source, target, nextSegmentRatio); vec2 offset = getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y); // v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y); v_segmentIndex = a_Position.x; if(LineTexture == u_line_texture && u_line_type != LineTypeDash) { // 开启贴图模式 float arcDistrance = length(source - target); float pixelLen = project_pixel_texture(u_icon_step); v_line_data.b = floor(arcDistrance/pixelLen); // 贴图在弧线上重复的数量 vec2 projectOffset = project_pixel(offset); float lineOffsetWidth = length(projectOffset + projectOffset * sign(a_Position.y)); // 线横向偏移的距离 float linePixelSize = project_pixel(a_Size); // 定点位置偏移,按地图等级缩放后的距离 v_line_data.a = lineOffsetWidth/linePixelSize; // 线图层贴图部分的 v 坐标值 v_iconMapUV = a_iconMapUV; } gl_Position = project_common_position_to_clipspace_v2(vec4(curr.xy + project_pixel(offset), curr.z * thetaOffset, 1.0)); // 地球模式 if(u_globel > 0.0) { vec3 startLngLat = lglt2xyz(a_Instance.rg); vec3 endLngLat = lglt2xyz(a_Instance.ba); float globalRadius = length(startLngLat); vec3 lineDir = normalize(endLngLat - startLngLat); vec3 midPointDir = normalize((startLngLat + endLngLat)/2.0); // 线的偏移 vec3 lnglatOffset = cross(lineDir, midPointDir) * a_Position.y; // 计算起始点和终止点的距离 float lnglatLength = length(a_Instance.rg - a_Instance.ba)/50.0; // 计算飞线各个节点相应的高度 float lineHeight = u_global_height * (-4.0*segmentRatio*segmentRatio + 4.0 * segmentRatio) * lnglatLength; // 地球点位 vec3 globalPoint = normalize(mix(startLngLat, endLngLat, segmentRatio)) * (globalRadius + lineHeight) + lnglatOffset * a_Size; gl_Position = u_ViewProjectionMatrix * vec4(globalPoint, 1.0); } setPickingColor(a_PickingColor); } `,Qce={solid:0,dash:1},pT=function(e){_n(r,e);var t=Yce(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0,n=mu(r.source)==="object"?r.source.type:r.source,i=mu(r.target)==="object"?r.target.type:r.target,o=mu(r.source)==="object"?r.source:{},a=o.width,u=a===void 0?n?dT[n]:0:a;o.height;var c=mu(r.target)==="object"?r.target:{},f=c.width,m=f===void 0?i?dT[i]:0:f;return c.height,{vertices:[0,Nu,1*u].concat(nr(e),[1,Nu,-1*m],nr(e),[1,-Nu,-1*m],nr(e),[0,-Nu,1*u],nr(e),[0,Nu,1*u],nr(e),[1,Nu,-1*m],nr(e),[1,-Nu,-1*m],nr(e),[0,-Nu,1*u],nr(e)),outLineIndices:[0,1,2,0,2,3].map(function(_){return _+t}),indices:[4,5,6,4,6,7].map(function(_){return _+t}),normals:[1,-1,1,1,1,1,-1,0,1,-1,0,1,0,0,0,0,0,0,0,0,0,0,0,0],dimensions:2}}function vT(e,t){var r=mu(e)==="object"?e.type:e,n=t==="source"?1:-1,i=mu(e)==="object"?e:{};switch(r){case"circle":return ife(n,i);case"triangle":return efe(n,i);case"diamond":return rfe(n,i);case"rect":return tfe(n,i);case"classic":return nfe(n,i);case"halfTriangle":return Jce(n,i);default:return{vertices:[],indices:[],normals:[],dimensions:2,outLineIndices:[],outLineNormals:[]}}}function ofe(e){var t=e.coordinates.flat(),r=1,n=1;return{vertices:[1,0,0].concat(nr(t),[1,2,-3],nr(t),[1,1,-3],nr(t),[0,1,0],nr(t),[0,0,0],nr(t),[1,0,0],nr(t),[1,2,-3],nr(t),[1,1,-3],nr(t),[0,1,0],nr(t),[0,0,0],nr(t)),normals:[-r,2*n,1,2*n,-n,1,n,-n,1,n,-n,1,-r,-n,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],indices:[0,1,2,0,2,3,0,3,4,5,6,7,5,7,8,5,8,9],size:7}}function sfe(e,t){return t?ufe(e,t):ofe(e)}function ufe(e,t){var r=e.coordinates.flat(),n=t,i=n.target,o=i===void 0?"classic":i,a=n.source,u=a===void 0?"circle":a,c=mT(vT(u,"source"),r,0,0),f=afe(r,c.vertices.length/7,t),m=mT(vT(o,"target"),r,1,c.vertices.length/7+f.vertices.length/7),_={vertices:[].concat(nr(c.vertices),nr(f.vertices),nr(m.vertices)),indices:[].concat(nr(c.outLineIndices),nr(f.outLineIndices),nr(m.outLineIndices),nr(c.indices),nr(f.indices),nr(m.indices)),normals:[].concat(nr(c.normals),nr(f.normals),nr(m.normals)),size:7};return _}function mT(e,t){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=[],o=e.vertices,a=e.indices,u=e.dimensions,c=e.outLineIndices,f=0;f"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ffe=`// #extension GL_OES_standard_derivatives : enable in vec4 v_color; out vec4 outputColor; // line texture #pragma include "picking" void main() { outputColor = v_color; outputColor = filterColor(outputColor); } `,hfe=`layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in vec2 a_Size; layout(location = 12) in vec4 a_Instance; layout(location = 13) in vec3 a_Normal; layout(std140) uniform commonUniorm { float u_gap_width: 1.0; float u_stroke_width: 1.0; float u_stroke_opacity: 1.0; }; #pragma include "projection" #pragma include "project" #pragma include "picking" out vec4 v_color; vec2 project_pixel_offset(vec2 offsets) { vec2 data = project_pixel(offsets); if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3 return data; } return vec2(data.x, -data.y);; } vec2 line_dir(vec2 target, vec2 source) { if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3 return normalize(target - source); } return normalize(ProjectFlat(target) - ProjectFlat(source)); } float flag_gap() { if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3 return 1.; } return -1.; } void main() { // 透明度计算 vec2 source = a_Instance.rg; // 起始点 vec2 target = a_Instance.ba; // 终点 vec2 flowlineDir = line_dir(target,source); vec2 perpendicularDir = vec2(-flowlineDir.y, flowlineDir.x); // mapbox || 高德 vec2 position = mix(source, target, a_Position.x); float lengthCommon = length(project_position(vec4(target,0,1)) - project_position(vec4(source,0,1))); // vec2 offsetDistances = a_Size.x * project_pixel_offset(vec2(a_Position.y, a_Position.z)); // Mapbox || 高德 vec2 limitedOffsetDistances = clamp( offsetDistances, project_pixel(-lengthCommon*.2), project_pixel(lengthCommon*.2) ); float startOffsetCommon = project_pixel(offsets[0]); float endOffsetCommon = project_pixel(offsets[1]); float endpointOffset = mix( clamp(startOffsetCommon, 0.0, lengthCommon*.2), -clamp(endOffsetCommon, 0.0, lengthCommon*.2), a_Position.x ); vec2 normalsCommon = u_stroke_width * project_pixel_offset(vec2(a_Normal.x, a_Normal.y)); // mapbox || 高德 float gapCommon = flag_gap() * project_pixel(u_gap_width); vec3 offsetCommon = vec3( flowlineDir * (limitedOffsetDistances[1] + normalsCommon.y + endpointOffset * 1.05) - perpendicularDir * (limitedOffsetDistances[0] + gapCommon + normalsCommon.x), 0.0 ); vec4 project_pos = project_position(vec4(position.xy, 0, 1.0)); vec4 fillColor = vec4(a_Color.rgb, a_Color.a * opacity); v_color = mix(fillColor, vec4(u_stroke.xyz, u_stroke.w * fillColor.w * u_stroke_opacity), a_Normal.z); gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy + offsetCommon.xy, 0., 1.0)); setPickingColor(a_PickingColor); } `,pfe=function(e){_n(r,e);var t=lfe(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getCommonUniformsInfo",value:function(){var i=this.layer.getLayerConfig(),o=i.gapWidth,a=o===void 0?2:o,u=i.strokeWidth,c=u===void 0?1:u,f=i.strokeOpacity,m=f===void 0?1:f,_={u_gap_width:a,u_stroke_width:c,u_stroke_opacity:m},b=this.getUniformsBufferInfo(_);return b}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return this.initUniformsBuffer(),u.abrupt("return",this.buildModels());case 2:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a;return he.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.layer.buildLayerModel({moduleName:"flow_line",vertexShader:hfe,fragmentShader:ffe,inject:this.getInject(),triangulation:sfe,styleOption:this.layer.getLayerConfig().symbol,primitive:W.TRIANGLES,depth:{enable:!1},pick:!1});case 2:return a=c.sent,c.abrupt("return",[a]);case 4:case"end":return c.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:wn.Attribute,descriptor:{name:"a_Size",shaderLocation:Vn.SIZE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:2,update:function(o){var a=o.size,u=a===void 0?1:a;return Array.isArray(u)?[u[0],u[1]]:[u,0]}}}),this.styleAttributeService.registerStyleAttribute({name:"instance",type:wn.Attribute,descriptor:{name:"a_Instance",shaderLocation:12,buffer:{usage:W.STATIC_DRAW,data:[],type:W.FLOAT},size:4,update:function(o,a,u){return[u[3],u[4],u[5],u[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:wn.Attribute,descriptor:{name:"a_Normal",shaderLocation:Vn.NORMAL,buffer:{usage:W.STATIC_DRAW,data:[],type:W.FLOAT},size:3,update:function(o,a,u,c,f){return f}}})}}]),r}(Ba);function dfe(e){var t=vfe();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function vfe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var mfe=`#define LineTypeSolid 0.0 #define LineTypeDash 1.0 #define Animate 0.0 #define LineTexture 1.0 uniform sampler2D u_texture; layout(std140) uniform commonUniorm { vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; vec4 u_dash_array: [10.0, 5., 0, 0]; vec4 u_sourceColor; vec4 u_targetColor; vec2 u_textSize; float segmentNumber; float u_line_type: 0.0; float u_icon_step: 100; float u_line_texture: 0.0; float u_textureBlend; float u_time; float u_linearColor: 0; }; in vec4 v_line_data; in vec2 v_iconMapUV; in vec4 v_dash_array; in float v_distance_ratio; in vec4 v_color; out vec4 outputColor; #pragma include "picking" #pragma include "project" #pragma include "projection" void main() { float animateSpeed = 0.0; float d_segmentIndex = v_line_data.g; // 设置弧线的底色 if(u_linearColor == 1.0) { // 使用渐变颜色 outputColor = mix(u_sourceColor, u_targetColor, d_segmentIndex/segmentNumber); outputColor.a *= v_color.a; } else { // 使用 color 方法传入的颜色 outputColor = v_color; } // float blur = 1.- smoothstep(u_blur, 1., length(v_normal.xy)); // float blur = smoothstep(1.0, u_blur, length(v_normal.xy)); if(u_line_type == LineTypeDash) { float dashLength = mod(v_distance_ratio, v_dash_array.x + v_dash_array.y + v_dash_array.z + v_dash_array.w); if(dashLength < v_dash_array.x || (dashLength > (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z)) { // 实线部分 } else { // 虚线部分 discard; }; } // 设置弧线的动画模式 if(u_animate.x == Animate) { animateSpeed = u_time / u_animate.y; float alpha =1.0 - fract( mod(1.0- v_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + u_time / u_animate.y); alpha = (alpha + u_animate.w -1.0) / u_animate.w; alpha = smoothstep(0., 1., alpha); outputColor.a *= alpha; } // 设置弧线的贴图 if(LineTexture == u_line_texture && u_line_type != LineTypeDash) { float arcRadio = smoothstep( 0.0, 1.0, (d_segmentIndex / (segmentNumber - 1.0))); // float arcRadio = d_segmentIndex / (segmentNumber - 1.0); float count = v_line_data.b; // 贴图在弧线上重复的数量 float u = fract(arcRadio * count - animateSpeed * count); // float u = fract(arcRadio * count - animateSpeed); if(u_animate.x == Animate) { u = outputColor.a/v_color.a; } float v = v_line_data.a; // 线图层贴图部分的 v 坐标值 vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.; vec4 pattern = texture(SAMPLER_2D(u_texture), uv); // 设置贴图和底色的叠加模式 if(u_textureBlend == 0.0) { // normal pattern.a = 0.0; outputColor = filterColor(outputColor + pattern); } else { // replace pattern.a *= v_color.a; if(outputColor.a <= 0.0) { pattern.a = 0.0; } outputColor = filterColor(pattern); } } else { outputColor = filterColor(outputColor); } // gl_FragColor = filterColor(gl_FragColor); }`,gfe=`#define LineTypeSolid 0.0 #define LineTypeDash 1.0 #define Animate 0.0 #define LineTexture 1.0 layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in float a_Size; layout(location = 12) in vec4 a_Instance; layout(location = 14) in vec2 a_iconMapUV; layout(std140) uniform commonUniorm { vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; vec4 u_dash_array: [10.0, 5., 0, 0]; vec4 u_sourceColor; vec4 u_targetColor; vec2 u_textSize; float segmentNumber; float u_line_type: 0.0; float u_icon_step: 100; float u_line_texture: 0.0; float u_textureBlend; float u_time; float u_linearColor: 0; }; out vec4 v_dash_array; out vec4 v_color; out vec2 v_iconMapUV; out vec4 v_line_data; out float v_distance_ratio; #pragma include "projection" #pragma include "project" #pragma include "picking" float maps (float value, float start1, float stop1, float start2, float stop2) { return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1)); } float getSegmentRatio(float index) { return index / (segmentNumber - 1.); } float paraboloid(vec2 source, vec2 target, float ratio) { vec2 x = mix(source, target, ratio); vec2 center = mix(source, target, 0.5); float dSourceCenter = distance(source, center); float dXCenter = distance(x, center); return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter); } vec3 getPos(vec2 source, vec2 target, float segmentRatio) { float vertex_height = paraboloid(source, target, segmentRatio); return vec3( mix(source, target, segmentRatio), sqrt(max(0.0, vertex_height)) ); } vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) { // normalized direction of the line vec2 dir_screenspace = normalize(line_clipspace); // rotate by 90 degrees dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x); vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size)/ 2.0; return offset; } vec2 getNormal(vec2 line_clipspace, float offset_direction) { // normalized direction of the line vec2 dir_screenspace = normalize(line_clipspace); // rotate by 90 degrees dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x); return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction); } float getAngularDist (vec2 source, vec2 target) { vec2 delta = source - target; vec2 sin_half_delta = sin(delta / 2.0); float a = sin_half_delta.y * sin_half_delta.y + cos(source.y) * cos(target.y) * sin_half_delta.x * sin_half_delta.x; return 2.0 * atan(sqrt(a), sqrt(1.0 - a)); } vec2 midPoint(vec2 source, vec2 target) { vec2 center = target - source; float r = length(center); float theta = atan(center.y, center.x); float thetaOffset = 0.314; float r2 = r / 2.0 / cos(thetaOffset); float theta2 = theta + thetaOffset; vec2 mid = vec2(r2*cos(theta2) + source.x, r2*sin(theta2) + source.y); return mid; } float bezier3(vec3 arr, float t) { float ut = 1. - t; return (arr.x * ut + arr.y * t) * ut + (arr.y * ut + arr.z * t) * t; } vec2 interpolate (vec2 source, vec2 target, float angularDist, float t) { // if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x vec2 mid = midPoint(source, target); vec3 x = vec3(source.x, mid.x, target.x); vec3 y = vec3(source.y, mid.y, target.y); return vec2(bezier3(x ,t), bezier3(y,t)); } else { if(abs(angularDist - PI) < 0.001) { return (1.0 - t) * source + t * target; } float a = sin((1.0 - t) * angularDist) / sin(angularDist); float b = sin(t * angularDist) / sin(angularDist); vec2 sin_source = sin(source); vec2 cos_source = cos(source); vec2 sin_target = sin(target); vec2 cos_target = cos(target); float x = a * cos_source.y * cos_source.x + b * cos_target.y * cos_target.x; float y = a * cos_source.y * sin_source.x + b * cos_target.y * sin_target.x; float z = a * sin_source.y + b * sin_target.y; return vec2(atan(y, x), atan(z, sqrt(x * x + y * y))); } } void main() { v_color = a_Color; v_color.a = v_color.a * opacity; vec2 source = radians(a_Instance.rg); vec2 target = radians(a_Instance.ba); float angularDist = getAngularDist(source, target); float segmentIndex = a_Position.x; float segmentRatio = getSegmentRatio(segmentIndex); float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0)); if(u_line_type == LineTypeDash) { v_distance_ratio = segmentIndex / segmentNumber; vec2 s = source; vec2 t = target; if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x s = unProjCustomCoord(source); t = unProjCustomCoord(target); } float total_Distance = pixelDistance(s, t) / 2.0 * PI; total_Distance = total_Distance*16.0; // total_Distance*16.0 调整默认的效果 v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / total_Distance; } if(u_animate.x == Animate) { v_distance_ratio = segmentIndex / segmentNumber; } float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir); v_distance_ratio = segmentIndex / segmentNumber; vec4 curr = project_position(vec4(degrees(interpolate(source, target, angularDist, segmentRatio)), 0.0, 1.0)); vec4 next = project_position(vec4(degrees(interpolate(source, target, angularDist, nextSegmentRatio)), 0.0, 1.0)); // v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y); vec2 offset = project_pixel(getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y)); // vec4 project_pos = project_position(vec4(curr.xy, 0, 1.0)); // gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, curr.z, 1.0)); v_line_data.g = a_Position.x; // 该顶点在弧线上的分段排序 if(LineTexture == u_line_texture) { // 开启贴图模式 // float mapZoomScale = u_CoordinateSystem !== COORDINATE_SYSTEM_P20_2?10000000.0:1.0; float d_arcDistrance = length(source - target); if(u_CoordinateSystem == COORDINATE_SYSTEM_P20) { // amap d_arcDistrance = d_arcDistrance * 1000000.0; } if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { // mapbox d_arcDistrance = project_pixel_allmap(d_arcDistrance); } float d_pixelLen = project_pixel(u_icon_step)/8.0; v_line_data.b = floor(d_arcDistrance/d_pixelLen); // 贴图在弧线上重复的数量 float lineOffsetWidth = length(offset + offset * sign(a_Position.y)); // 线横向偏移的距离 float linePixelSize = project_pixel(a_Size); // 定点位置偏移,按地图等级缩放后的距离 v_line_data.a = lineOffsetWidth/linePixelSize; // 线图层贴图部分的 v 坐标值 v_iconMapUV = a_iconMapUV; } gl_Position = project_common_position_to_clipspace_v2(vec4(curr.xy + offset, 0, 1.0)); setPickingColor(a_PickingColor); } `,_fe={solid:0,dash:1},yfe=function(e){_n(r,e);var t=dfe(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Efe=`// #extension GL_OES_standard_derivatives : enable #define Animate 0.0 #define LineTexture 1.0 uniform sampler2D u_texture; layout(std140) uniform commonUniorm { vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; vec4 u_dash_array; vec4 u_blur; vec4 u_sourceColor; vec4 u_targetColor; vec2 u_textSize; float u_icon_step: 100; float u_heightfixed: 0.0; float u_vertexScale: 1.0; float u_raisingHeight: 0.0; float u_strokeWidth: 0.0; float u_textureBlend; float u_line_texture; float u_linearDir: 1.0; float u_linearColor: 0; float u_time; }; in vec4 v_color; in vec4 v_stroke; // dash in vec4 v_dash_array; in float v_d_distance_ratio; in vec2 v_iconMapUV; in vec4 v_texture_data; out vec4 outputColor; #pragma include "picking" // [animate, duration, interval, trailLength], void main() { if(u_dash_array!=vec4(0.0)){ float dashLength = mod(v_d_distance_ratio, v_dash_array.x + v_dash_array.y + v_dash_array.z + v_dash_array.w); if(!(dashLength < v_dash_array.x || (dashLength > (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z))) { // 虚线部分 discard; }; } float animateSpeed = 0.0; // 运动速度 float d_distance_ratio = v_texture_data.r; // 当前点位距离占线总长的比例 if(u_linearDir < 1.0) { d_distance_ratio = v_texture_data.a; } if(u_linearColor == 1.0) { // 使用渐变颜色 outputColor = mix(u_sourceColor, u_targetColor, d_distance_ratio); outputColor.a *= v_color.a; } else { // 使用 color 方法传入的颜色 outputColor = v_color; } // anti-alias // float blur = 1.0 - smoothstep(u_blur, 1., length(v_normal.xy)); if(u_animate.x == Animate) { animateSpeed = u_time / u_animate.y; float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + animateSpeed); alpha = (alpha + u_animate.w -1.0) / u_animate.w; alpha = smoothstep(0., 1., alpha); outputColor.a *= alpha; } if(u_line_texture == LineTexture) { // while load texture float aDistance = v_texture_data.g; // 当前顶点的距离 float d_texPixelLen = v_texture_data.b; // 贴图的像素长度,根据地图层级缩放 float u = fract(mod(aDistance, d_texPixelLen)/d_texPixelLen - animateSpeed); float v = v_texture_data.a; // 线图层贴图部分的 v 坐标值 // v = max(smoothstep(0.95, 1.0, v), v); vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.; vec4 pattern = texture(SAMPLER_2D(u_texture), uv); if(u_textureBlend == 0.0) { // normal pattern.a = 0.0; outputColor += pattern; } else { // replace pattern.a *= v_color.a; if(outputColor.a <= 0.0) { pattern.a = 0.0; } outputColor = pattern; } } float v = v_texture_data.a; float strokeWidth = min(0.5, u_strokeWidth); // 绘制 border if(strokeWidth > 0.01) { float borderOuterWidth = strokeWidth / 2.0; if(v >= 1.0 - strokeWidth || v <= strokeWidth) { if(v > strokeWidth) { // 外侧 float linear = smoothstep(0.0, 1.0, (v - (1.0 - strokeWidth))/strokeWidth); // float linear = step(0.0, (v - (1.0 - borderWidth))/borderWidth); outputColor.rgb = mix(outputColor.rgb, v_stroke.rgb, linear); } else if(v <= strokeWidth) { float linear = smoothstep(0.0, 1.0, v/strokeWidth); outputColor.rgb = mix(v_stroke.rgb, outputColor.rgb, linear); } } if(v < borderOuterWidth) { outputColor.a = mix(0.0, outputColor.a, v/borderOuterWidth); } else if(v > 1.0 - borderOuterWidth) { outputColor.a = mix(outputColor.a, 0.0, (v - (1.0 - borderOuterWidth))/borderOuterWidth); } } // blur float blurV = v_texture_data.a; if(blurV < 0.5) { outputColor.a *= mix(u_blur.r, u_blur.g, blurV/0.5); } else { outputColor.a *= mix(u_blur.g, u_blur.b, (blurV - 0.5)/0.5); } outputColor = filterColor(outputColor); } `,Sfe=` #define Animate 0.0 layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in vec2 a_Size; layout(location = 10) in vec3 a_DistanceAndIndexAndMiter; layout(location = 13) in vec4 a_Normal_Total_Distance; layout(location = 14) in vec2 a_iconMapUV; layout(std140) uniform commonUniorm { vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; vec4 u_dash_array; vec4 u_blur; vec4 u_sourceColor; vec4 u_targetColor; vec2 u_textSize; float u_icon_step: 100; float u_heightfixed: 0.0; float u_vertexScale: 1.0; float u_raisingHeight: 0.0; float u_strokeWidth: 0.0; float u_textureBlend; float u_line_texture; float u_linearDir: 1.0; float u_linearColor: 0; float u_time; }; out vec4 v_color; out vec4 v_stroke; //dash out vec4 v_dash_array; out float v_d_distance_ratio; // texV 线图层 - 贴图部分的 v 坐标(线的宽度方向) out vec2 v_iconMapUV; out vec4 v_texture_data; #pragma include "projection" #pragma include "picking" void main() { vec2 a_DistanceAndIndex = a_DistanceAndIndexAndMiter.xy; float a_Miter = a_DistanceAndIndexAndMiter.z; vec3 a_Normal = a_Normal_Total_Distance.xyz; float a_Total_Distance = a_Normal_Total_Distance.w; //dash输出 v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / a_Total_Distance; v_d_distance_ratio = a_DistanceAndIndex.x / a_Total_Distance; // cal style mapping - 数据纹理映射部分的计算 float d_texPixelLen; // 贴图的像素长度,根据地图层级缩放 v_iconMapUV = a_iconMapUV; d_texPixelLen = project_float_pixel(u_icon_step); if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { d_texPixelLen *= 10.0; } v_color = a_Color; v_color.a *= opacity; v_stroke = stroke; vec3 size = a_Miter * setPickingSize(a_Size.x) * reverse_offset_normal(a_Normal); vec2 offset = project_pixel(size.xy); float lineDistance = a_DistanceAndIndex.x; float currentLinePointRatio = lineDistance / a_Total_Distance; float lineOffsetWidth = length(offset + offset * sign(a_Miter)); // 线横向偏移的距离(向两侧偏移的和) float linePixelSize = project_pixel(a_Size.x) * 2.0; // 定点位置偏移,按地图等级缩放后的距离 单侧 * 2 float texV = lineOffsetWidth/linePixelSize; // 线图层贴图部分的 v 坐标值 v_texture_data = vec4(currentLinePointRatio, lineDistance, d_texPixelLen, texV); // 设置数据集的参数 vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0)); // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, a_Size.y, 1.0)); float h = float(a_Position.z) * u_vertexScale; // 线顶点的高度 - 兼容不存在第三个数值的情况 vertex height float lineHeight = a_Size.y; // size 第二个参数代表的高度 [linewidth, lineheight] if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x lineHeight *= 0.2; // 保持和 amap/mapbox 一致的效果 h *= 0.2; if(u_heightfixed < 1.0) { lineHeight = project_pixel(a_Size.y); } gl_Position = u_Mvp * (vec4(project_pos.xy + offset, lineHeight + h + u_raisingHeight, 1.0)); } else { // mapbox - amap // 兼容 mapbox 在线高度上的效果表现基本一致 if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { // mapbox // 保持高度相对不变 float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); h *= mapboxZoomScale; h += u_raisingHeight * mapboxZoomScale; if(u_heightfixed > 0.0) { lineHeight *= mapboxZoomScale; } } else { // amap h += u_raisingHeight; // lineHeight 顶点偏移高度 if(u_heightfixed < 1.0) { lineHeight *= pow(2.0, 20.0 - u_Zoom); } } gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, lineHeight + h, 1.0)); } setPickingColor(a_PickingColor); } `,BP=function(e){_n(r,e);var t=xfe(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var wfe=` layout(std140) uniform commonUniorm { vec4 u_sourceColor; vec4 u_targetColor; vec4 u_dash_array; float u_vertexScale: 1.0; float u_linearColor: 0; }; in float v_distanceScale; in vec4 v_color; //dash in vec4 v_dash_array; out vec4 outputColor; void main() { if(u_dash_array!=vec4(0.0)){ float dashLength = mod(v_distanceScale, v_dash_array.x + v_dash_array.y + v_dash_array.z + v_dash_array.w); if(!(dashLength < v_dash_array.x || (dashLength > (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z))) { // 虚线部分 discard; }; } if(u_linearColor==1.0){ outputColor = mix(u_sourceColor, u_targetColor, v_distanceScale); outputColor.a *= v_color.a; // 全局透明度 } else{ outputColor = v_color; } } `,Cfe=`layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in vec4 a_SizeDistanceAndTotalDistance; layout(std140) uniform commonUniorm { vec4 u_sourceColor; vec4 u_targetColor; vec4 u_dash_array; float u_vertexScale: 1.0; float u_linearColor: 0; }; #pragma include "projection" #pragma include "picking" out vec4 v_color; out float v_distanceScale; out vec4 v_dash_array; void main() { //dash输出 v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / a_SizeDistanceAndTotalDistance.a; v_color = a_Color; v_distanceScale = a_SizeDistanceAndTotalDistance.b / a_SizeDistanceAndTotalDistance.a; v_color.a = v_color.a * opacity; vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0)); float h = float(a_Position.z) * u_vertexScale; // 线顶点的高度 - 兼容不存在第三个数值的情况 if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x gl_Position = u_Mvp * (vec4(project_pos.xy, project_pixel(a_SizeDistanceAndTotalDistance.y) + h * 0.2, 1.0)); } else { float lineHeight = a_SizeDistanceAndTotalDistance.y; // 兼容 mapbox 在线高度上的效果表现基本一致 if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { // 保持高度相对不变 h *= 2.0/pow(2.0, 20.0 - u_Zoom); } // amap1.x if(u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { // 保持高度相对不变 lineHeight *= pow(2.0, 20.0 - u_Zoom); } gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, lineHeight + h, 1.0)); gl_PointSize = 10.0; } } `;Ci.isNumber;var Rfe=function(e){_n(r,e);var t=Afe(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getCommonUniformsInfo",value:function(){var i=this.layer.getLayerConfig(),o=i.sourceColor,a=i.targetColor,u=i.lineType,c=u===void 0?"solid":u,f=i.dashArray,m=f===void 0?[10,5,0,0]:f,_=i.vertexHeightScale,b=_===void 0?20:_,A=m;c!=="dash"&&(A=[0,0,0,0]),A.length===2&&A.push(0,0);var w=0,R=[0,0,0,0],P=[0,0,0,0];o&&a&&(R=Ta(o),P=Ta(a),w=1);var k={u_sourceColor:R,u_targetColor:P,u_dash_array:A,u_vertexScale:b,u_linearColor:w},L=this.getUniformsBufferInfo(k);return L}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",this.buildModels());case 1:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"getShaders",value:function(){return{frag:wfe,vert:Cfe,type:"lineSimpleNormal"}}},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f,m;return he.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return this.initUniformsBuffer(),a=this.getShaders(),u=a.frag,c=a.vert,f=a.type,b.next=4,this.layer.buildLayerModel({moduleName:f,vertexShader:c,fragmentShader:u,triangulation:Cce,inject:this.getInject(),primitive:W.LINES,depth:{enable:!1},pick:!1});case 4:return m=b.sent,b.abrupt("return",[m]);case 6:case"end":return b.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"sizeDistanceAndTotalDistance",type:wn.Attribute,descriptor:{name:"a_SizeDistanceAndTotalDistance",shaderLocation:Vn.SIZE,buffer:{usage:W.STATIC_DRAW,data:[],type:W.FLOAT},size:4,update:function(o,a,u){var c=o.size,f=c===void 0?1:c,m=Array.isArray(f)?[f[0],f[1]]:[f,0];return[m[0],m[1],u[3],u[5]]}}})}}]),r}(Ba);function Ife(e){var t=Mfe();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function Mfe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Pfe=`#define Animate 0.0 #define LineTexture 1.0 // line texture uniform sampler2D u_texture; layout(std140) uniform commonUniorm { vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; vec4 u_sourceColor; vec4 u_targetColor; vec2 u_textSize; float u_icon_step: 100; float u_heightfixed; float u_linearColor: 0; float u_line_texture; float u_textureBlend; float u_iconStepCount; float u_time; }; in vec2 v_iconMapUV; in float v_blur; in float v_radio; in vec4 v_color; in vec4 v_dataset; out vec4 outputColor; #pragma include "picking" void main() { float animateSpeed = 0.0; // 运动速度 float d_distance_ratio = v_dataset.r; // 当前点位距离占线总长的比例 float v = v_dataset.a; if(u_linearColor == 1.0) { // 使用渐变颜色 outputColor = mix(u_sourceColor, u_targetColor, v); } else { // 使用 color 方法传入的颜色 outputColor = v_color; } outputColor.a *= v_color.a; // 全局透明度 if(u_animate.x == Animate) { animateSpeed = u_time / u_animate.y; float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + animateSpeed); alpha = (alpha + u_animate.w -1.0) / u_animate.w; alpha = smoothstep(0., 1., alpha); outputColor.a *= alpha; } if(u_line_texture == LineTexture) { // while load texture float aDistance = v_dataset.g; // 当前顶点的距离 float d_texPixelLen = v_dataset.b; // 贴图的像素长度,根据地图层级缩放 float u = fract(mod(aDistance, d_texPixelLen)/d_texPixelLen - animateSpeed); float v = v_dataset.a; // 线图层贴图部分的 v 坐标值 // 计算纹理间隔 start float flag = 0.0; if(u > 1.0/u_iconStepCount) { flag = 1.0; } u = fract(u*u_iconStepCount); // 计算纹理间隔 end vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.; vec4 pattern = texture(SAMPLER_2D(u_texture), uv); // Tip: 判断纹理间隔 if(flag > 0.0) { pattern = vec4(0.0); } if(u_textureBlend == 0.0) { // normal pattern.a = 0.0; outputColor = filterColor(outputColor + pattern); } else { // replace pattern.a *= v_color.a; if(outputColor.a <= 0.0) { pattern.a = 0.0; } outputColor = filterColor(pattern); } } // blur - AA if(v < v_blur) { outputColor.a = mix(0.0, outputColor.a, v/v_blur); } else if(v > 1.0 - v_blur) { outputColor.a = mix(outputColor.a, 0.0, (v - (1.0 - v_blur))/v_blur); } outputColor = filterColor(outputColor); } `,Ofe=`#define Animate 0.0 layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in vec2 a_Size; layout(location = 10) in float a_Miter; layout(location = 11) in float a_Total_Distance; layout(location = 12) in vec4 a_Instance; layout(location = 13) in vec3 a_Normal; layout(location = 14) in vec2 a_iconMapUV; layout(location = 15) in float a_Distance; layout(std140) uniform commonUniorm { vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; vec4 u_sourceColor; vec4 u_targetColor; vec2 u_textSize; float u_icon_step: 100; float u_heightfixed; float u_linearColor: 0; float u_line_texture; float u_textureBlend; float u_iconStepCount; float u_time; }; #pragma include "projection" #pragma include "light" #pragma include "picking" // texV 线图层 - 贴图部分的 v 坐标(线的宽度方向) out vec2 v_iconMapUV; out vec4 v_color; out float v_blur; out float v_radio; out vec4 v_dataset; void main() { float d_distance_ratio; // 当前点位距离占线总长的比例 float d_texPixelLen; // 贴图的像素长度,根据地图层级缩放 v_iconMapUV = a_iconMapUV; if(u_heightfixed < 1.0) { // 高度随 zoom 调整 d_texPixelLen = project_pixel(u_icon_step); } else { d_texPixelLen = u_icon_step; } if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { d_texPixelLen *= 10.0; } if(u_animate.x == Animate || u_linearColor == 1.0) { d_distance_ratio = a_Distance / a_Total_Distance; } float miter = (a_Miter + 1.0)/2.0; // 设置数据集的参数 v_dataset[0] = d_distance_ratio; // 当前点位距离占线总长的比例 v_dataset[1] = a_Distance; // 当前顶点的距离 v_dataset[2] = d_texPixelLen; // 贴图的像素长度,根据地图层级缩放 v_dataset[3] = miter; // 线图层贴图部分的 v 坐标值 0 - 1 vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0)); float originSize = a_Size.x; // 固定高度 if(u_heightfixed < 1.0) { originSize = project_float_meter(a_Size.x); // 高度随 zoom 调整 } float wallHeight = originSize * miter; float lightWeight = calc_lighting(vec4(project_pos.xy, wallHeight, 1.0)); v_blur = min(project_float_pixel(2.0) / originSize, 0.05); v_color = vec4(a_Color.rgb * lightWeight, a_Color.w * opacity); if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x gl_Position = u_Mvp * (vec4(project_pos.xy, wallHeight, 1.0)); } else { gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, wallHeight, 1.0)); } setPickingColor(a_PickingColor); } `,kfe=function(e){_n(r,e);var t=Ife(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var sb=function(e){_n(r,e);var t=Ffe(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Ufe=` layout(std140) uniform commonUniorm { vec4 u_stroke_color; float u_additive; float u_stroke_opacity; float u_stroke_width; }; in vec4 v_color; in float v_blur; in float v_innerRadius; out vec4 outputColor; #pragma include "picking" void main() { vec2 center = vec2(0.5); // Tip: 片元到中心点的距离 0 - 1 float fragmengTocenter = distance(center, gl_PointCoord) * 2.0; // Tip: 片元的剪切成圆形 float circleClipOpacity = 1.0 - smoothstep(v_blur, 1.0, fragmengTocenter); if(v_innerRadius < 0.99) { // 当存在 stroke 且 stroke > 0.01 float blurWidth = (1.0 - v_blur)/2.0; vec4 stroke = vec4(u_stroke_color.rgb, u_stroke_opacity); if(fragmengTocenter > v_innerRadius + blurWidth) { outputColor = stroke; } else if(fragmengTocenter > v_innerRadius - blurWidth){ float mixR = (fragmengTocenter - (v_innerRadius - blurWidth)) / (blurWidth * 2.0); outputColor = mix(v_color, stroke, mixR); } else { outputColor = v_color; } } else { // 当不存在 stroke 或 stroke <= 0.01 outputColor = v_color; } outputColor = filterColor(outputColor); if(u_additive > 0.0) { outputColor *= circleClipOpacity; } else { outputColor.a *= circleClipOpacity; } } `,zfe=` layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in float a_Size; layout(std140) uniform commonUniorm { vec4 u_stroke_color; float u_additive; float u_stroke_opacity; float u_stroke_width; }; out vec4 v_color; out float v_blur; out float v_innerRadius; #pragma include "projection" #pragma include "picking" #pragma include "project" void main() { v_color = vec4(a_Color.xyz, a_Color.w * opacity); v_blur = 1.0 - max(2.0/a_Size, 0.05); v_innerRadius = max((a_Size - u_stroke_width) / a_Size, 0.0); vec2 offset = project_pixel(u_offsets); if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x gl_Position = u_Mvp * vec4(a_Position.xy + offset, a_Position.z, 1.0); } else { // else vec4 project_pos = project_position(vec4(a_Position, 1.0)) + vec4(a_Size / 2.,-a_Size /2.,0.,0.); gl_Position = project_common_position_to_clipspace(vec4(vec2(project_pos.xy+offset),project_pos.z,project_pos.w)); } gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio; setPickingColor(a_PickingColor); } `;function gT(e){var t=e.coordinates;return{vertices:nr(t),indices:[0],size:t.length}}var $fe=function(e){_n(r,e);var t=Lfe(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getDefaultStyle",value:function(){return{blend:"additive"}}},{key:"getCommonUniformsInfo",value:function(){var i=this.layer.getLayerConfig(),o=i.blend,a=i.strokeOpacity,u=a===void 0?1:a,c=i.strokeWidth,f=c===void 0?0:c,m=i.stroke,_=m===void 0?"#fff":m,b={u_stroke_color:Ta(_),u_additive:o==="additive"?1:0,u_stroke_opacity:u,u_stroke_width:f},A=this.getUniformsBufferInfo(b);return A}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",this.buildModels());case 1:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a;return he.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.layer.triangulation=gT,this.initUniformsBuffer(),c.next=4,this.layer.buildLayerModel({moduleName:"pointSimple",vertexShader:zfe,fragmentShader:Ufe,inject:this.getInject(),triangulation:gT,depth:{enable:!1},primitive:W.POINTS});case 4:return a=c.sent,c.abrupt("return",[a]);case 6:case"end":return c.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:wn.Attribute,descriptor:{name:"a_Size",shaderLocation:Vn.SIZE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:1,update:function(o){var a=o.size,u=a===void 0?1:a;return Array.isArray(u)?[u[0]]:[u]}}})}}]),r}(Ba);function Vfe(e){var t=jfe();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function jfe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Hfe=`precision highp float; in vec4 v_color; #pragma include "picking" layout(std140) uniform commonUniform { vec4 u_sourceColor; vec4 u_targetColor; float u_linearColor: 0; float u_heightfixed: 0.0; // 默认不固定 float u_globel; float u_r; float u_pickLight: 0.0; float u_opacitylinear: 0.0; float u_opacitylinear_dir: 1.0; float u_lightEnable: 1.0; }; in float v_lightWeight; in float v_barLinearZ; out vec4 outputColor; void main() { outputColor = v_color; // 开启透明度渐变 if(u_opacitylinear > 0.0) { outputColor.a *= u_opacitylinear_dir > 0.0 ? (1.0 - v_barLinearZ): v_barLinearZ; } // picking if(u_pickLight > 0.0) { outputColor = filterColorAlpha(outputColor, v_lightWeight); } else { outputColor = filterColor(outputColor); } } `,Gfe=`precision highp float; #define pi 3.1415926535 #define ambientRatio 0.5 #define diffuseRatio 0.3 #define specularRatio 0.2 layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in vec3 a_Size; layout(location = 11) in vec3 a_Pos; layout(location = 13) in vec3 a_Normal; layout(std140) uniform commonUniform { vec4 u_sourceColor; vec4 u_targetColor; float u_linearColor: 0; float u_heightfixed: 0.0; // 默认不固定 float u_globel; float u_r; float u_pickLight: 0.0; float u_opacitylinear: 0.0; float u_opacitylinear_dir: 1.0; float u_lightEnable: 1.0; }; out vec4 v_color; out float v_lightWeight; out float v_barLinearZ; // 用于将在顶点着色器中计算好的样式值传递给片元 #pragma include "projection" #pragma include "light" #pragma include "picking" float getYRadian(float x, float z) { if(x > 0.0 && z > 0.0) { return atan(x/z); } else if(x > 0.0 && z <= 0.0){ return atan(-z/x) + pi/2.0; } else if(x <= 0.0 && z <= 0.0) { return pi + atan(x/z); //atan(x/z) + } else { return atan(z/-x) + pi*3.0/2.0; } } float getXRadian(float y, float r) { return atan(y/r); } void main() { // cal style mapping - 数据纹理映射部分的计算 vec3 size = a_Size * a_Position; // a_Position.z 是在构建网格的时候传入的标准值 0 - 1,在插值器插值可以获取 0~1 线性渐变的值 v_barLinearZ = a_Position.z; vec3 offset = size; // 控制圆柱体的大小 - 从标准单位圆柱体进行偏移 if(u_heightfixed < 1.0) { // 圆柱体不固定高度 if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1 offset = offset * pow(2.0, (19.0 - u_Zoom)); } if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3 offset = offset * pow(2.0, (19.0 - 3.0 - u_Zoom)); } } else {// 圆柱体固定高度 ( 处理 mapbox ) if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { offset *= 4.0/pow(2.0, 21.0 - u_Zoom); } } vec4 project_pos = project_position(vec4(a_Pos.xy, 0., 1.0)); // u_r 控制圆柱的生长 vec4 pos = vec4(project_pos.xy + offset.xy, offset.z * u_r, 1.0); // 圆柱光照效果 float lightWeight = 1.0; if(u_lightEnable > 0.0) { // 取消三元表达式,增强健壮性 lightWeight = calc_lighting(pos); } v_lightWeight = lightWeight; // 设置圆柱的底色 if(u_linearColor == 1.0) { // 使用渐变颜色 v_color = mix(u_sourceColor, u_targetColor, v_barLinearZ); v_color.rgb *= lightWeight; } else { // 使用 color 方法传入的颜色 v_color = a_Color; } v_color.a *= u_opacity; // 在地球模式下,将原本垂直于 xy 平面的圆柱调整姿态到适应圆的角度 //旋转矩阵mx,创建绕x轴旋转矩阵 float r = sqrt(a_Pos.z*a_Pos.z + a_Pos.x*a_Pos.x); float xRadian = getXRadian(a_Pos.y, r); float xcos = cos(xRadian);//求解旋转角度余弦值 float xsin = sin(xRadian);//求解旋转角度正弦值 mat4 mx = mat4( 1,0,0,0, 0,xcos,-xsin,0, 0,xsin,xcos,0, 0,0,0,1); //旋转矩阵my,创建绕y轴旋转矩阵 float yRadian = getYRadian(a_Pos.x, a_Pos.z); float ycos = cos(yRadian);//求解旋转角度余弦值 float ysin = sin(yRadian);//求解旋转角度正弦值 mat4 my = mat4( ycos,0,-ysin,0, 0,1,0,0, ysin,0,ycos,0, 0,0,0,1); gl_Position = u_ViewProjectionMatrix * vec4(( my * mx * vec4(a_Position * a_Size, 1.0)).xyz + a_Pos, 1.0); setPickingColor(a_PickingColor); } `,Wfe=Ci.isNumber,Xfe=function(e){_n(r,e);var t=Vfe(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a0&&a.enable){var K=a.speed,Z=K===void 0?.01:K;this.raiseCount+=Z,this.raiseCount>=1&&(this.raiseRepeat>1?(this.raiseCount=0,this.raiseRepeat--):this.raiseCount=1)}var ve={u_sourceColor:V,u_targetColor:G,u_linearColor:B,u_pickLight:Number(b),u_heightfixed:Number(w),u_r:a.enable&&this.raiseRepeat>0?this.raiseCount:1,u_opacity:Wfe(c)?c:1,u_opacitylinear:Number(P.enable),u_opacitylinear_dir:P.dir==="up"?1:0,u_lightEnable:Number(L)},Ie=this.getUniformsBufferInfo(ve);return Ie}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return this.initUniformsBuffer(),u.abrupt("return",this.buildModels());case 2:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f;return he.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return a=this.layer.getLayerConfig(),u=a.animateOption.repeat,c=u===void 0?1:u,this.raiseRepeat=c,_.next=4,this.layer.buildLayerModel({moduleName:"pointEarthExtrude",vertexShader:Gfe,fragmentShader:Hfe,triangulation:DP,depth:{enable:!0},inject:this.getInject(),cull:{enable:!0,face:_5(this.mapService.version)},blend:this.getBlend()});case 4:return f=_.sent,_.abrupt("return",[f]);case 6:case"end":return _.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:wn.Attribute,descriptor:{name:"a_Size",shaderLocation:Vn.SIZE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:3,update:function(o){var a=o.size;if(a){var u=[];return Array.isArray(a)&&(u=a.length===2?[a[0],a[0],a[1]]:a),Array.isArray(a)||(u=[a,a,a]),u}else return[2,2,2]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:wn.Attribute,descriptor:{name:"a_Normal",shaderLocation:Vn.NORMAL,buffer:{usage:W.STATIC_DRAW,data:[],type:W.FLOAT},size:3,update:function(o,a,u,c,f){return f}}}),this.styleAttributeService.registerStyleAttribute({name:"pos",type:wn.Attribute,descriptor:{name:"a_Pos",shaderLocation:15,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:3,update:function(o){var a=ih(o.coordinates);return OP([a[0],a[1]])}}})}}]),r}(Ba);function Yfe(e){var t=Zfe();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function Zfe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var qfe=`in vec4 v_data; in vec4 v_color; in float v_radius; layout(std140) uniform commonUniform { float u_additive; float u_stroke_opacity : 1; float u_stroke_width : 2; float u_blur : 0.0; }; #pragma include "sdf_2d" #pragma include "picking" out vec4 outputColor; void main() { int shape = int(floor(v_data.w + 0.5)); vec4 strokeColor = u_stroke == vec4(0.0) ? v_color : u_stroke; lowp float antialiasblur = v_data.z; float r = v_radius / (v_radius + u_stroke_width); float outer_df; float inner_df; // 'circle', 'triangle', 'square', 'pentagon', 'hexagon', 'octogon', 'hexagram', 'rhombus', 'vesica' if (shape == 0) { outer_df = sdCircle(v_data.xy, 1.0); inner_df = sdCircle(v_data.xy, r); } else if (shape == 1) { outer_df = sdEquilateralTriangle(1.1 * v_data.xy); inner_df = sdEquilateralTriangle(1.1 / r * v_data.xy); } else if (shape == 2) { outer_df = sdBox(v_data.xy, vec2(1.)); inner_df = sdBox(v_data.xy, vec2(r)); } else if (shape == 3) { outer_df = sdPentagon(v_data.xy, 0.8); inner_df = sdPentagon(v_data.xy, r * 0.8); } else if (shape == 4) { outer_df = sdHexagon(v_data.xy, 0.8); inner_df = sdHexagon(v_data.xy, r * 0.8); } else if (shape == 5) { outer_df = sdOctogon(v_data.xy, 1.0); inner_df = sdOctogon(v_data.xy, r); } else if (shape == 6) { outer_df = sdHexagram(v_data.xy, 0.52); inner_df = sdHexagram(v_data.xy, r * 0.52); } else if (shape == 7) { outer_df = sdRhombus(v_data.xy, vec2(1.0)); inner_df = sdRhombus(v_data.xy, vec2(r)); } else if (shape == 8) { outer_df = sdVesica(v_data.xy, 1.1, 0.8); inner_df = sdVesica(v_data.xy, r * 1.1, r * 0.8); } if(outer_df > antialiasblur + 0.018) discard; float opacity_t = smoothstep(0.0, antialiasblur, outer_df); float color_t = u_stroke_width < 0.01 ? 0.0 : smoothstep( antialiasblur, 0.0, inner_df ); if(u_stroke_width < 0.01) { outputColor = vec4(v_color.rgb, v_color.a * u_opacity); } else { outputColor = mix(vec4(v_color.rgb, v_color.a * u_opacity), strokeColor * u_stroke_opacity, color_t); } if(u_additive > 0.0) { outputColor *= opacity_t; outputColor = filterColorAlpha(outputColor, outputColor.a); } else { outputColor.a *= opacity_t; outputColor = filterColor(outputColor); } } `,Kfe=`layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in float a_Size; layout(location = 10) in float a_Shape; layout(location = 11) in vec3 a_Extrude; layout(std140) uniform commonUniform { float u_additive; float u_stroke_opacity : 1; float u_stroke_width : 2; float u_blur : 0.0; }; out vec4 v_data; out vec4 v_color; out float v_radius; #pragma include "projection" #pragma include "picking" void main() { vec3 extrude = a_Extrude; float shape_type = a_Shape; /* * setPickingSize 设置拾取大小 */ float newSize = setPickingSize(a_Size); // float newSize = setPickingSize(a_Size) * 0.00001038445708445579; // unpack color(vec2) v_color = a_Color; // radius(16-bit) v_radius = newSize; // anti-alias // float antialiased_blur = -max(u_blur, antialiasblur); float antialiasblur = -max(2.0 / u_DevicePixelRatio / newSize, u_blur); // TODP: /abs(extrude.x) 是为了兼容地球模式 v_data = vec4(extrude.x/abs(extrude.x), extrude.y/abs(extrude.y), antialiasblur,shape_type); gl_Position = u_ViewProjectionMatrix * vec4(a_Position + extrude * newSize * 0.1 + vec3(u_offsets,0.0), 1.0); setPickingColor(a_PickingColor); }`,Qfe=function(e){_n(r,e);var t=Yfe(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getCommonUniformsInfo",value:function(){var i=this.layer.getLayerConfig(),o=i.strokeOpacity,a=o===void 0?1:o,u=i.strokeWidth,c=u===void 0?0:u,f=i.blend,m=i.blur,_=m===void 0?0:m;this.layer.getLayerConfig();var b={u_additive:f==="additive"?1:0,u_stroke_opacity:a,u_stroke_width:c,u_blur:_},A=this.getUniformsBufferInfo(b);return A}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return this.initUniformsBuffer(),u.abrupt("return",this.buildModels());case 2:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a;return he.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.layer.triangulation=cT,c.next=3,this.layer.buildLayerModel({moduleName:"pointEarthFill",vertexShader:Kfe,fragmentShader:qfe,triangulation:cT,inject:this.getInject(),depth:{enable:!0},blend:this.getBlend()});case 3:return a=c.sent,c.abrupt("return",[a]);case 5:case"end":return c.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"animateOption2Array",value:function(i){return[i.enable?0:1,i.speed||1,i.rings||3,0]}},{key:"registerBuiltinAttributes",value:function(){var i=this;this.styleAttributeService.registerStyleAttribute({name:"extrude",type:wn.Attribute,descriptor:{name:"a_Extrude",shaderLocation:Vn.EXTRUDE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:3,update:function(a,u,c,f){var m=Nn(c,3),_=m[0],b=m[1],A=m[2],w=Gl(0,0,1),R=Gl(_,0,A),P=_>=0?q6(w,R):Math.PI*2-q6(w,R),k=Math.PI*2-Math.asin(b/100),L=v1();j5(L,L,P),sy(L,L,k);var B=Gl(1,1,0);Vv(B,B,L),$d(B,B);var V=Gl(-1,1,0);Vv(V,V,L),$d(V,V);var G=Gl(-1,-1,0);Vv(G,G,L),$d(G,G);var K=Gl(1,-1,0);Vv(K,K,L),$d(K,K);var Z=[].concat(nr(B),nr(V),nr(G),nr(K)),ve=f%4*3;return[Z[ve],Z[ve+1],Z[ve+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:wn.Attribute,descriptor:{name:"a_Size",shaderLocation:Vn.SIZE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:1,update:function(a){var u=a.size,c=u===void 0?5:u;return Array.isArray(c)?[c[0]]:[c]}}}),this.styleAttributeService.registerStyleAttribute({name:"shape",type:wn.Attribute,descriptor:{name:"a_Shape",shaderLocation:Vn.SHAPE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:1,update:function(a){var u=a.shape,c=u===void 0?2:u,f=i.layer.getLayerConfig().shape2d,m=f.indexOf(c);return[m]}}})}}]),r}(Ba);function Jfe(e){var t=ehe();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function ehe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var the=` in vec4 v_color; in float v_lightWeight; out vec4 outputColor; layout(std140) uniform commonUniforms { float u_pickLight; float u_heightfixed; float u_r; float u_linearColor; vec4 u_sourceColor; vec4 u_targetColor; float u_opacitylinear; float u_opacitylinear_dir; float u_lightEnable; }; #pragma include "scene_uniforms" #pragma include "picking" void main() { outputColor = v_color; // 开启透明度渐变 // picking if(u_pickLight > 0.0) { outputColor = filterColorAlpha(outputColor, v_lightWeight); } else { outputColor = filterColor(outputColor); } } `,rhe=`#define pi 3.1415926535 layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in vec3 a_Size; layout(location = 11) in vec3 a_Extrude; layout(location = 13) in vec3 a_Normal; layout(std140) uniform commonUniforms { float u_pickLight; float u_heightfixed; float u_r; float u_linearColor; vec4 u_sourceColor; vec4 u_targetColor; float u_opacitylinear; float u_opacitylinear_dir; float u_lightEnable; }; out vec4 v_color; out float v_lightWeight; #pragma include "projection" #pragma include "light" #pragma include "picking" float getYRadian(float x, float z) { if(x > 0.0 && z > 0.0) { return atan(x/z); } else if(x > 0.0 && z <= 0.0){ return atan(-z/x) + pi/2.0; } else if(x <= 0.0 && z <= 0.0) { return pi + atan(x/z); //atan(x/z) + } else { return atan(z/-x) + pi*3.0/2.0; } } float getXRadian(float y, float r) { return atan(y/r); } void main() { vec3 size = a_Size * a_Position; vec3 offset = size; // 控制圆柱体的大小 - 从标准单位圆柱体进行偏移 if(u_heightfixed < 1.0) { // 圆柱体不固定高度 if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1 offset = offset * pow(2.0, (19.0 - u_Zoom)); } if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3 offset = offset * pow(2.0, (19.0 - 3.0 - u_Zoom)); } } else {// 圆柱体固定高度 ( 处理 mapbox ) if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { offset *= 4.0/pow(2.0, 21.0 - u_Zoom); } } vec4 project_pos = project_position(vec4(a_Extrude.xy, 0., 1.0)); // u_r 控制圆柱的生长 vec4 pos = vec4(project_pos.xy + offset.xy, offset.z * u_r, 1.0); // // 圆柱光照效果 float lightWeight = 1.0; if(u_lightEnable > 0.0) { // 取消三元表达式,增强健壮性 lightWeight = calc_lighting(pos); } v_lightWeight = lightWeight; v_color = a_Color; // 设置圆柱的底色 if(u_linearColor == 1.0) { // 使用渐变颜色 v_color = mix(u_sourceColor, u_targetColor, a_Position.z); v_color.a = v_color.a * opacity; } else { v_color = vec4(a_Color.rgb * lightWeight, a_Color.w * opacity); } if(u_opacitylinear > 0.0) { v_color.a *= u_opacitylinear_dir > 0.0 ? (1.0 - a_Position.z): a_Position.z; } gl_Position = project_common_position_to_clipspace_v2(pos); setPickingColor(a_PickingColor); } `,LP=function(e){_n(r,e);var t=Jfe(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a0&&a.enable){var V=a.speed,G=V===void 0?.01:V;this.raiseCount+=G,this.raiseCount>=1&&(this.raiseRepeat>1?(this.raiseCount=0,this.raiseRepeat--):this.raiseCount=1)}var K={u_pickLight:Number(m),u_heightfixed:Number(b),u_r:a.enable&&this.raiseRepeat>0?this.raiseCount:1,u_linearColor:k,u_sourceColor:L,u_targetColor:B,u_opacitylinear:Number(w.enable),u_opacitylinear_dir:w.dir==="up"?1:0,u_lightEnable:Number(P)},Z=this.getUniformsBufferInfo(K);return Z}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",this.buildModels());case 1:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f,m,_;return he.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return a=this.layer.getLayerConfig(),u=a.depth,c=u===void 0?!0:u,f=a.animateOption.repeat,m=f===void 0?1:f,this.raiseRepeat=m,this.initUniformsBuffer(),A.next=5,this.layer.buildLayerModel({moduleName:"pointExtrude",vertexShader:rhe,fragmentShader:the,triangulation:DP,inject:this.getInject(),cull:{enable:!0,face:_5(this.mapService.version)},depth:{enable:c}});case 5:return _=A.sent,A.abrupt("return",[_]);case 7:case"end":return A.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:wn.Attribute,descriptor:{name:"a_Size",shaderLocation:Vn.SIZE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:3,update:function(o){var a=o.size;if(a){var u=[];return Array.isArray(a)&&(u=a.length===2?[a[0],a[0],a[1]]:a),Array.isArray(a)||(u=[a,a,a]),u}else return[2,2,2]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:wn.Attribute,descriptor:{name:"a_Normal",shaderLocation:Vn.NORMAL,buffer:{usage:W.STATIC_DRAW,data:[],type:W.FLOAT},size:3,update:function(o,a,u,c,f){return f}}}),this.styleAttributeService.registerStyleAttribute({name:"extrude",type:wn.Attribute,descriptor:{name:"a_Extrude",shaderLocation:Vn.EXTRUDE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:3,update:function(o){var a=ih(o.coordinates);return[a[0],a[1],0]}}})}}]),r}(Ba);function nhe(e){var t=ihe();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function ihe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ahe=` layout(std140) uniform commonUniforms { vec3 u_blur_height_fixed; float u_stroke_width; float u_additive; float u_stroke_opacity; float u_size_unit; float u_time; vec4 u_animate; }; in vec4 v_color; in vec4 v_stroke; in vec4 v_data; in float v_radius; #pragma include "scene_uniforms" #pragma include "sdf_2d" #pragma include "picking" out vec4 outputColor; void main() { int shape = int(floor(v_data.w + 0.5)); lowp float antialiasblur = v_data.z; float r = v_radius / (v_radius + u_stroke_width); float outer_df; float inner_df; // 'circle', 'triangle', 'square', 'pentagon', 'hexagon', 'octogon', 'hexagram', 'rhombus', 'vesica' if (shape == 0) { outer_df = sdCircle(v_data.xy, 1.0); inner_df = sdCircle(v_data.xy, r); } else if (shape == 1) { outer_df = sdEquilateralTriangle(1.1 * v_data.xy); inner_df = sdEquilateralTriangle(1.1 / r * v_data.xy); } else if (shape == 2) { outer_df = sdBox(v_data.xy, vec2(1.)); inner_df = sdBox(v_data.xy, vec2(r)); } else if (shape == 3) { outer_df = sdPentagon(v_data.xy, 0.8); inner_df = sdPentagon(v_data.xy, r * 0.8); } else if (shape == 4) { outer_df = sdHexagon(v_data.xy, 0.8); inner_df = sdHexagon(v_data.xy, r * 0.8); } else if (shape == 5) { outer_df = sdOctogon(v_data.xy, 1.0); inner_df = sdOctogon(v_data.xy, r); } else if (shape == 6) { outer_df = sdHexagram(v_data.xy, 0.52); inner_df = sdHexagram(v_data.xy, r * 0.52); } else if (shape == 7) { outer_df = sdRhombus(v_data.xy, vec2(1.0)); inner_df = sdRhombus(v_data.xy, vec2(r)); } else if (shape == 8) { outer_df = sdVesica(v_data.xy, 1.1, 0.8); inner_df = sdVesica(v_data.xy, r * 1.1, r * 0.8); } float opacity_t = smoothstep(0.0, antialiasblur, outer_df); float color_t = u_stroke_width < 0.01 ? 0.0 : smoothstep( antialiasblur, 0.0, inner_df ); float PI = 3.14159; float N_RINGS = 3.0; float FREQ = 1.0; if(u_stroke_width < 0.01) { outputColor = v_color; } else { outputColor = mix(v_color, v_stroke * u_stroke_opacity, color_t); } float intensity = 1.0; if(u_time!=-1.0){ //wave相关逻辑 float d = length(v_data.xy); if(d > 0.5) { discard; } intensity = clamp(cos(d * PI), 0.0, 1.0) * clamp(cos(2.0 * PI * (d * 2.0 * u_animate.z - u_animate.y * u_time)), 0.0, 1.0); } if(u_additive > 0.0) { outputColor *= opacity_t; outputColor *= intensity;//wave outputColor = filterColorAlpha(outputColor, outputColor.a); } else { outputColor.a *= opacity_t; outputColor.a *= intensity;//wave outputColor = filterColor(outputColor); } // 作为 mask 模板时需要丢弃透明的像素 if(outputColor.a < 0.01) { discard; } } `,ohe=`layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in float a_Size; layout(location = 10) in float a_Shape; layout(location = 11) in vec3 a_Extrude; layout(std140) uniform commonUniforms { vec3 u_blur_height_fixed; float u_stroke_width; float u_additive; float u_stroke_opacity; float u_size_unit; float u_time; vec4 u_animate; }; out vec4 v_color; out vec4 v_stroke; out vec4 v_data; out float v_radius; #pragma include "projection" #pragma include "picking" #pragma include "rotation_2d" void main() { // 透明度计算 v_stroke = stroke; vec3 extrude = a_Extrude; float shape_type = a_Shape; /* * setPickingSize 设置拾取大小 * u_meter2coord 在等面积大小的时候设置单位 */ float newSize = setPickingSize(a_Size); // float newSize = setPickingSize(a_Size) * 0.00001038445708445579; // unpack color(vec2) v_color = vec4(a_Color.xyz, a_Color.w * opacity); if(u_size_unit == 1.0) { newSize = newSize * u_PixelsPerMeter.z; } v_radius = newSize; // anti-alias // float antialiased_blur = -max(u_blur, antialiasblur); float antialiasblur = -max(2.0 / u_DevicePixelRatio / newSize, u_blur_height_fixed.x); vec2 offset = (extrude.xy * (newSize + u_stroke_width) + u_offsets); vec3 aPosition = a_Position; offset = project_pixel(offset); offset = rotate_matrix(offset,rotation); // TODP: /abs(extrude.x) 是为了兼容地球模式 v_data = vec4(extrude.x/abs(extrude.x), extrude.y/abs(extrude.y), antialiasblur,shape_type); // vec4 project_pos = project_position(vec4(a_Position.xy, 0.0, 1.0)); vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0)); // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0)); float raisingHeight = u_blur_height_fixed.y; if(u_blur_height_fixed.z < 1.0) { // false raisingHeight = project_pixel(u_blur_height_fixed.y); } else { if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); raisingHeight = u_blur_height_fixed.y * mapboxZoomScale; } } gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy + offset, raisingHeight, 1.0)); setPickingColor(a_PickingColor); } `,NP=function(e){_n(r,e);var t=nhe(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getCommonUniformsInfo",value:function(){var i=this.layer.getLayerConfig(),o=i.strokeOpacity,a=o===void 0?1:o,u=i.strokeWidth,c=u===void 0?0:u,f=i.blend,m=i.blur,_=m===void 0?0:m,b=i.raisingHeight,A=b===void 0?0:b,w=i.heightfixed,R=w===void 0?!1:w,P=i.unit,k=P===void 0?"pixel":P,L=this.getAnimateUniforms().u_time;isNaN(L)&&(L=-1);var B={u_blur_height_fixed:[_,Number(A),Number(R)],u_stroke_width:c,u_additive:f==="additive"?1:0,u_stroke_opacity:a,u_size_unit:ib[k],u_time:L,u_animate:this.getAnimateUniforms().u_animate},V=this.getUniformsBufferInfo(B);return V}},{key:"getAnimateUniforms",value:function(){var i=this.layer.getLayerConfig(),o=i.animateOption,a=o===void 0?{enable:!1}:o;return{u_animate:this.animateOption2Array(a),u_time:this.layer.getLayerAnimateTime()}}},{key:"getAttribute",value:function(){return this.styleAttributeService.createAttributesAndIndices(this.layer.getEncodedData(),Mg)}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",this.buildModels());case 1:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f,m,_,b,A;return he.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return a=this.layer.getLayerConfig(),u=a.animateOption,c=u===void 0?{enable:!1}:u,f=this.getShaders(c),m=f.frag,_=f.vert,b=f.type,this.layer.triangulation=Mg,this.initUniformsBuffer(),R.next=6,this.layer.buildLayerModel({moduleName:b,vertexShader:_,fragmentShader:m,inject:this.getInject(),triangulation:Mg,depth:{enable:!1}});case 6:return A=R.sent,R.abrupt("return",[A]);case 8:case"end":return R.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"getShaders",value:function(i){return{frag:ahe,vert:ohe,type:"pointFill"}}},{key:"animateOption2Array",value:function(i){return[i.enable?0:1,i.speed||1,i.rings||3,0]}},{key:"registerBuiltinAttributes",value:function(){var i=this.layer.getLayerConfig().shape2d;this.styleAttributeService.registerStyleAttribute({name:"extrude",type:wn.Attribute,descriptor:{name:"a_Extrude",shaderLocation:Vn.EXTRUDE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:3,update:function(a,u,c,f){var m=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],_=f%4*3;return[m[_],m[_+1],m[_+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:wn.Attribute,descriptor:{name:"a_Size",shaderLocation:Vn.SIZE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:1,update:function(a){var u=a.size,c=u===void 0?5:u;return Array.isArray(c)?[c[0]]:[c]}}}),this.styleAttributeService.registerStyleAttribute({name:"shape",type:wn.Attribute,descriptor:{name:"a_Shape",shaderLocation:Vn.SHAPE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:1,update:function(a){var u=a.shape,c=u===void 0?2:u,f=i.indexOf(c);return[f]}}})}}]),r}(Ba);function she(e){var t=uhe();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function uhe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var lhe=`in vec2 v_uv;// 本身的 uv 坐标 in vec2 v_Iconuv; in float v_opacity; out vec4 outputColor; uniform sampler2D u_texture; layout(std140) uniform commonUniform { vec2 u_textSize; float u_heightfixed: 0.0; float u_raisingHeight: 0.0; float u_size_unit; }; #pragma include "scene_uniforms" #pragma include "sdf_2d" #pragma include "picking" void main() { vec2 pos = v_Iconuv / u_textSize + v_uv / u_textSize * 64.; outputColor = texture(SAMPLER_2D(u_texture), pos); outputColor.a *= v_opacity; outputColor = filterColor(outputColor); } `,che=`layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in float a_Size; layout(location = 11) in vec3 a_Extrude; layout(location = 14) in vec2 a_Uv; layout(std140) uniform commonUniform { vec2 u_textSize; float u_heightfixed: 0.0; float u_raisingHeight: 0.0; float u_size_unit; }; out vec2 v_uv; out vec2 v_Iconuv; out float v_opacity; #pragma include "projection" #pragma include "picking" #pragma include "rotation_2d" void main() { vec3 extrude = a_Extrude; v_uv = (a_Extrude.xy + 1.0)/2.0; v_uv.y = 1.0 - v_uv.y; v_Iconuv = a_Uv; v_opacity = opacity; float newSize = a_Size; if(u_size_unit == 1.0) { newSize = newSize * u_PixelsPerMeter.z; } // vec2 offset = (u_RotateMatrix * extrude.xy * (a_Size) + textrueOffsets); vec2 offset = (extrude.xy * (newSize) + offsets); offset = rotate_matrix(offset,rotation); vec3 aPosition = a_Position; offset = project_pixel(offset); vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0)); float raisingHeight = u_raisingHeight; if(u_heightfixed < 1.0) { // height fixed raisingHeight = project_pixel(u_raisingHeight); } else { if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); raisingHeight = u_raisingHeight * mapboxZoomScale; } } gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy + offset, 0.0, 1.0)); setPickingColor(a_PickingColor); } `,fhe=function(e){_n(r,e);var t=she(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var dhe=`layout(std140) uniform commonUniforms { vec2 u_textSize; float u_raisingHeight; float u_heightfixed; }; uniform sampler2D u_texture; in vec4 v_color; in vec2 v_uv; in float v_opacity; #pragma include "picking" out vec4 outputColor; void main(){ vec2 pos = v_uv / u_textSize + gl_PointCoord / u_textSize * 64.; vec4 textureColor; // Y = 0.299R + 0.587G + 0.114B // 亮度提取 textureColor = texture(SAMPLER_2D(u_texture), pos); // Tip: 去除边缘部分 mipmap 导致的混合变暗 float fragmengTocenter = distance(vec2(0.5), gl_PointCoord); if(fragmengTocenter >= 0.5) { float luma = 0.299 * textureColor.r + 0.587 * textureColor.g + 0.114 * textureColor.b; textureColor.a *= luma; } if(all(lessThan(v_color, vec4(1.0+0.00001))) && all(greaterThan(v_color, vec4(1.0-0.00001))) || v_color==vec4(1.0)){ outputColor= textureColor; }else { outputColor= step(0.01, textureColor.z) * v_color; } outputColor.a *= v_opacity; if (outputColor.a < 0.01) { discard; } outputColor = filterColor(outputColor); } `,vhe=`layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in float a_Size; layout(location = 14) in vec2 a_Uv; layout(std140) uniform commonUniforms { vec2 u_textSize; float u_raisingHeight; float u_heightfixed; }; out vec4 v_color; out vec2 v_uv; out float v_opacity; #pragma include "projection" #pragma include "picking" void main() { // cal style mapping - 数据纹理映射部分的计算 v_color = a_Color; v_opacity = opacity; v_uv = a_Uv; vec4 project_pos = project_position(vec4(a_Position, 1.0)); vec2 offset = project_pixel(offsets); float raisingHeight = u_raisingHeight; if(u_heightfixed < 1.0) { // false raisingHeight = project_pixel(u_raisingHeight); } else { if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); raisingHeight = u_raisingHeight * mapboxZoomScale; } } gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy + offset, raisingHeight, 1.0)); gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio; setPickingColor(a_PickingColor); } `,UP=function(e){_n(r,e);var t=hhe(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var _he=`in vec4 v_color; out vec4 outputColor; void main() { outputColor = v_color; }`,yhe=`layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in float a_Size; layout(std140) uniform u_Common { float u_size_scale; }; out vec4 v_color; #pragma include "projection" #pragma include "project" void main() { v_color = vec4(a_Color.xyz, a_Color.w * opacity); if (u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x gl_Position = u_Mvp * vec4(a_Position, 1.0); } else { vec4 project_pos = project_position(vec4(a_Position, 1.0)) + vec4(a_Size / 2., -a_Size /2., 0., 0.); gl_Position = project_common_position_to_clipspace(project_pos); } gl_PointSize = a_Size * u_size_scale * 2.0 * u_DevicePixelRatio; } `;function _T(e){var t=e.coordinates;return{vertices:nr(t),indices:[0],size:t.length}}var zP=function(e){_n(r,e);var t=mhe(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getDefaultStyle",value:function(){return{blend:"additive"}}},{key:"getCommonUniformsInfo",value:function(){var i={u_size_scale:.5},o=this.getUniformsBufferInfo(i);return o}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",this.buildModels());case 1:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a;return he.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.layer.triangulation=_T,this.initUniformsBuffer(),c.next=4,this.layer.buildLayerModel({moduleName:"pointNormal",vertexShader:yhe,fragmentShader:_he,triangulation:_T,inject:this.getInject(),depth:{enable:!1},primitive:W.POINTS,pick:!1});case 4:return a=c.sent,c.abrupt("return",[a]);case 6:case"end":return c.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"clearModels",value:function(){}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:wn.Attribute,descriptor:{name:"a_Size",shaderLocation:Vn.SIZE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:1,update:function(o){var a=o.size,u=a===void 0?1:a;return Array.isArray(u)?[u[0]]:[u]}}})}}]),r}(Ba);function xhe(e){var t=bhe();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function bhe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Ehe=` layout(std140) uniform commonUniorm{ float u_additive; float u_size_unit; float u_speed: 1.0; float u_time; }; in vec4 v_data; in vec4 v_color; in float v_radius; in vec2 v_extrude; #pragma include "sdf_2d" #pragma include "picking" out vec4 outputColor; void main() { lowp float antialiasblur = v_data.z; float r = v_radius / (v_radius); float outer_df = sdCircle(v_data.xy, 1.0); float inner_df = sdCircle(v_data.xy, r); float opacity_t = smoothstep(0.0, antialiasblur, outer_df); outputColor = vec4(v_color.rgb, v_color.a); if(u_additive > 0.0) { outputColor *= opacity_t; } else { outputColor.a *= opacity_t; } if(outputColor.a > 0.0) { outputColor = filterColor(outputColor); } vec2 extrude = v_extrude; vec2 dir = normalize(extrude); vec2 baseDir = vec2(1.0, 0.0); float pi = 3.14159265359; float flag = sign(dir.y); float rades = dot(dir, baseDir); float radar_v = (flag - 1.0) * -0.5 * acos(rades)/pi; // simple AA if(radar_v > 0.99) { radar_v = 1.0 - (radar_v - 0.99)/0.01; } outputColor.a *= radar_v; } `,She=`layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in float a_Size; layout(location = 11) in vec3 a_Extrude; layout(std140) uniform commonUniorm { float u_additive; float u_size_unit; float u_speed: 1.0; float u_time; }; out vec4 v_data; out vec4 v_color; out float v_radius; out vec2 v_extrude; #pragma include "projection" #pragma include "picking" void main() { float newSize = setPickingSize(a_Size); float time = u_time * u_speed; mat2 rotateMatrix = mat2( cos(time), sin(time), -sin(time), cos(time) ); v_extrude = rotateMatrix * a_Extrude.xy; v_color = a_Color; v_color.a *= opacity; float blur = 0.0; float antialiasblur = -max(2.0 / u_DevicePixelRatio / a_Size, blur); if(u_size_unit == 1.) { newSize = newSize * u_PixelsPerMeter.z; } v_radius = newSize; vec2 offset = (a_Extrude.xy * (newSize)); vec3 aPosition = a_Position; offset = project_pixel(offset); v_data = vec4(a_Extrude.x, a_Extrude.y, antialiasblur, -1.0); vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0)); gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0)); setPickingColor(a_PickingColor); } `,Ahe=function(e){_n(r,e);var t=xhe(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getCommonUniformsInfo",value:function(){var i=this.layer.getLayerConfig(),o=i.blend,a=i.speed,u=a===void 0?1:a,c=i.unit,f=c===void 0?"pixel":c,m={u_additive:o==="additive"?1:0,u_size_unit:ib[f],u_speed:u,u_time:this.layer.getLayerAnimateTime()},_=this.getUniformsBufferInfo(m);return _}},{key:"getAnimateUniforms",value:function(){return{}}},{key:"getAttribute",value:function(){return this.styleAttributeService.createAttributesAndIndices(this.layer.getEncodedData(),o_)}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",this.buildModels());case 1:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a;return he.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.initUniformsBuffer(),c.next=3,this.layer.buildLayerModel({moduleName:"pointRadar",vertexShader:She,fragmentShader:Ehe,triangulation:o_,inject:this.getInject(),depth:{enable:!1}});case 3:return a=c.sent,c.abrupt("return",[a]);case 5:case"end":return c.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"animateOption2Array",value:function(i){return[i.enable?0:1,i.speed||1,i.rings||3,0]}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"extrude",type:wn.Attribute,descriptor:{name:"a_Extrude",shaderLocation:Vn.EXTRUDE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:3,update:function(o,a,u,c){var f=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],m=c%4*3;return[f[m],f[m+1],f[m+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:wn.Attribute,descriptor:{shaderLocation:Vn.SIZE,name:"a_Size",buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:1,update:function(o){var a=o.size,u=a===void 0?5:a;return Array.isArray(u)?[u[0]]:[u]}}})}}]),r}(Ba);function The(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=whe(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function whe(e,t){if(e){if(typeof e=="string")return yT(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yT(e,t)}}function yT(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rthis.width||o<0||n>this.height)return a?!1:[];var c=[];if(r<=0&&n<=0&&this.width<=i&&this.height<=o){if(a)return!0;for(var f=0;f0:c}},{key:"queryCell",value:function(r,n,i,o,a,u,c,f){var m=c.seenUids,_=this.boxCells[a];if(_!==null){var b=this.bboxes,A=The(_),w;try{for(A.s();!(w=A.n()).done;){var R=w.value;if(!m.box[R]){m.box[R]=!0;var P=R*4;if(r<=b[P+2]&&n<=b[P+3]&&i>=b[P+0]&&o>=b[P+1]&&(!f||f(this.boxKeys[R]))){if(c.hitTest)return u.push(!0),!0;u.push({key:this.boxKeys[R],x1:b[P],y1:b[P+1],x2:b[P+2],y2:b[P+3]})}}}}catch(k){A.e(k)}finally{A.f()}}return!1}},{key:"forEachCell",value:function(r,n,i,o,a,u,c,f){for(var m=this.convertToXCellCoord(r),_=this.convertToYCellCoord(n),b=this.convertToXCellCoord(i),A=this.convertToYCellCoord(o),w=m;w<=b;w++)for(var R=_;R<=A;R++){var P=this.xCellCount*R+w;if(a.call(this,r,n,i,o,P,u,c,f))return}}},{key:"convertToXCellCoord",value:function(r){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(r*this.xScale)))}},{key:"convertToYCellCoord",value:function(r){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(r*this.yScale)))}}]),e}();const Rhe=Che;var Ihe=function(){function e(t,r){Ht(this,e),F(this,"viewportPadding",100),this.width=t,this.height=r,this.viewportPadding=Math.max(t,r),this.grid=new Rhe(t+this.viewportPadding,r+this.viewportPadding,25),this.screenRightBoundary=t+this.viewportPadding,this.screenBottomBoundary=r+this.viewportPadding,this.gridRightBoundary=t+2*this.viewportPadding,this.gridBottomBoundary=r+2*this.viewportPadding}return jt(e,[{key:"placeCollisionBox",value:function(r){var n=r.x1+r.anchorPointX+this.viewportPadding,i=r.y1+r.anchorPointY+this.viewportPadding,o=r.x2+r.anchorPointX+this.viewportPadding,a=r.y2+r.anchorPointY+this.viewportPadding;return!this.isInsideGrid(n,i,o,a)||this.grid.hitTest(n,i,o,a)?{box:[]}:{box:[n,i,o,a]}}},{key:"insertCollisionBox",value:function(r,n){var i={featureIndex:n};this.grid.insert(i,r[0],r[1],r[2],r[3])}},{key:"project",value:function(r,n,i){var o=zre(n,i,0,1),a=DM(),u=vM.apply(sre,nr(r));return G5(a,o,u),{x:(a[0]/a[3]+1)/2*this.width+this.viewportPadding,y:(-a[1]/a[3]+1)/2*this.height+this.viewportPadding}}},{key:"isInsideGrid",value:function(r,n,i,o){return i>=0&&r=0&&n=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function Mhe(e,t){if(e){if(typeof e=="string")return xT(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xT(e,t)}}function xT(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r6&&arguments[6]!==void 0?arguments[6]:[0,0],u=arguments.length>7?arguments[7]:void 0,c=e.split(` `),f=[],m={positionedGlyphs:f,top:a[1],bottom:a[1],left:a[0],right:a[0],lineCount:c.length,text:e};return u?Ohe(m,t,c,r,n,i,o):Phe(m,t,c,r,n,i,o),f.length?m:!1}function Dhe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0],r=arguments.length>2?arguments[2]:void 0,n=e.positionedGlyphs,i=n===void 0?[]:n,o=[],a=$P(i),u;try{for(a.s();!(u=a.n()).done;){var c=u.value,f=c.metrics,m=4,_=f.advance*c.scale/2,b=r?[c.x+_,c.y]:[0,0],A=r?[0,0]:[c.x+_+t[0],c.y+t[1]],w=(0-m)*c.scale-_+A[0],R=(0-m)*c.scale+A[1],P=w+f.width*c.scale,k=R+f.height*c.scale,L={x:w,y:R},B={x:P,y:R},V={x:w,y:k},G={x:P,y:k};o.push({tl:L,tr:B,bl:V,br:G,tex:f,glyphOffset:b})}}catch(K){a.e(K)}finally{a.f()}return o}function Fhe(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Bhe(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function Bhe(e,t){if(e){if(typeof e=="string")return bT(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bT(e,t)}}function bT(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ET=`#define SDF_PX 8.0 #define EDGE_GAMMA 0.105 #define FONT_SIZE 48.0 uniform sampler2D u_sdf_map; layout(std140) uniform commonUniforms { vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0]; vec2 u_sdf_map_size; float u_raisingHeight: 0.0; float u_stroke_width : 2; float u_gamma_scale : 0.5; float u_halo_blur : 0.5; }; in vec2 v_uv; in float v_gamma_scale; in vec4 v_color; in vec4 v_stroke_color; in float v_fontScale; out vec4 outputColor; #pragma include "picking" void main() { // get style data mapping // get sdf from atlas float dist = texture(SAMPLER_2D(u_sdf_map), v_uv).a; lowp float buff = (6.0 - u_stroke_width / v_fontScale) / SDF_PX; highp float gamma = (u_halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (v_fontScale * u_gamma_scale) / 1.0; highp float gamma_scaled = gamma * v_gamma_scale; highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist); outputColor = mix(v_color, v_stroke_color, smoothstep(0., 0.5, 1.- dist)); outputColor.a *= alpha; // 作为 mask 模板时需要丢弃透明的像素 if (outputColor.a < 0.01) { discard; } outputColor = filterColor(outputColor); } `,ST=`#define SDF_PX 8.0 #define EDGE_GAMMA 0.105 #define FONT_SIZE 24.0 layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in float a_Size; layout(location = 10) in vec2 a_textOffsets; layout(location = 14) in vec2 a_tex; layout(std140) uniform commonUniforms { vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0]; vec2 u_sdf_map_size; float u_raisingHeight: 0.0; float u_stroke_width : 2; float u_gamma_scale : 0.5; float u_halo_blur : 0.5; }; out vec2 v_uv; out float v_gamma_scale; out vec4 v_color; out vec4 v_stroke_color; out float v_fontScale; #pragma include "projection" #pragma include "picking" #pragma include "rotation_2d" void main() { // cal style mapping - 数据纹理映射部分的计算 v_uv = a_tex / u_sdf_map_size; v_color = vec4(a_Color.xyz, a_Color.w * opacity); v_stroke_color = vec4(u_stroke_color.xyz, u_stroke_color.w * opacity); // 文本缩放比例 float fontScale = a_Size / FONT_SIZE; v_fontScale = fontScale; vec4 project_pos = project_position(vec4(a_Position, 1.0)); // vec4 projected_position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0)); vec2 offset = rotate_matrix(a_textOffsets,rotation); // gl_Position = vec4(projected_position.xy / projected_position.w + rotation_matrix * a_textOffsets * fontScale / u_ViewportSize * 2.0 * u_DevicePixelRatio, 0.0, 1.0); float raiseHeight = u_raisingHeight; if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); raiseHeight = u_raisingHeight * mapboxZoomScale; } vec4 projected_position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz + vec3(0.0, 0.0, raiseHeight), 1.0)); gl_Position = vec4( projected_position.xy / projected_position.w + offset * fontScale / u_ViewportSize * 2.0 * u_DevicePixelRatio, 0.0, 1.0); v_gamma_scale = gl_Position.w; setPickingColor(a_PickingColor); } `,Av=Ci.isEqual;function AT(e){var t=this,r=e.id,n=[],i=[];if(!t.glyphInfoMap||!t.glyphInfoMap[r])return{vertices:[],indices:[],size:7};var o=t.glyphInfoMap[r].centroid,a=o.length===2?[o[0],o[1],0]:o;return t.glyphInfoMap[r].glyphQuads.forEach(function(u,c){n.push.apply(n,nr(a).concat([u.tex.x,u.tex.y+u.tex.height,u.tl.x,u.tl.y],nr(a),[u.tex.x+u.tex.width,u.tex.y+u.tex.height,u.tr.x,u.tr.y],nr(a),[u.tex.x+u.tex.width,u.tex.y,u.br.x,u.br.y],nr(a),[u.tex.x,u.tex.y,u.bl.x,u.bl.y])),i.push(0+c*4,1+c*4,2+c*4,2+c*4,3+c*4,0+c*4)}),{vertices:n,indices:i,size:7}}var GP=function(e){_n(r,e);var t=Lhe(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a.5||!k||c!==this.preTextStyle.textAllowOverlap)){B.next=14;break}return B.next=13,this.reBuildModel();case 13:return B.abrupt("return",!0);case 14:return B.abrupt("return",!1);case 15:case"end":return B.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"clearModels",value:function(){var i;(i=this.texture)===null||i===void 0||i.destroy(),this.layer.off("remapping",this.mapping)}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"textOffsets",type:wn.Attribute,descriptor:{shaderLocation:10,name:"a_textOffsets",buffer:{usage:W.STATIC_DRAW,data:[],type:W.FLOAT},size:2,update:function(o,a,u){return[u[5],u[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"textUv",type:wn.Attribute,descriptor:{name:"a_tex",shaderLocation:Vn.UV,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:2,update:function(o,a,u){return[u[3],u[4]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:wn.Attribute,descriptor:{name:"a_Size",shaderLocation:Vn.SIZE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:1,update:function(o){var a=o.size,u=a===void 0?12:a;return Array.isArray(u)?[u[0]]:[u]}}})}},{key:"bindEvent",value:function(){this.layer.isTileLayer||this.layer.on("remapping",this.mapping)}},{key:"textExtent",value:function(){var i=this.mapService.getBounds();return k5(i,.5)}},{key:"initTextFont",value:function(){var i=this.getTextStyle(),o=i.fontWeight,a=i.fontFamily,u=this.rawEncodeData,c=[];u.forEach(function(f){var m=f.shape,_=m===void 0?"":m;_=_.toString();var b=Fhe(_),A;try{for(b.s();!(A=b.n()).done;){var w=A.value;c.indexOf(w)===-1&&c.push(w)}}catch(R){b.e(R)}finally{b.f()}}),this.fontService.setFontOptions({characterSet:c,fontWeight:o,fontFamily:a,iconfont:!1})}},{key:"initIconFontTex",value:function(){var i=this.getTextStyle(),o=i.fontWeight,a=i.fontFamily,u=this.rawEncodeData,c=[];u.forEach(function(f){var m=f.shape,_=m===void 0?"":m;_="".concat(_),c.indexOf(_)===-1&&c.push(_)}),this.fontService.setFontOptions({characterSet:c,fontWeight:o,fontFamily:a,iconfont:!0})}},{key:"getTextStyle",value:function(){var i=this.layer.getLayerConfig(),o=i.fontWeight,a=o===void 0?"400":o,u=i.fontFamily,c=u===void 0?"sans-serif":u,f=i.textAllowOverlap,m=f===void 0?!1:f,_=i.padding,b=_===void 0?[0,0]:_,A=i.textAnchor,w=A===void 0?"center":A,R=i.textOffset,P=R===void 0?[0,0]:R,k=i.opacity,L=k===void 0?1:k,B=i.strokeOpacity,V=B===void 0?1:B,G=i.strokeWidth,K=G===void 0?0:G,Z=i.stroke,ve=Z===void 0?"#000":Z;return{fontWeight:a,fontFamily:c,textAllowOverlap:m,padding:b,textAnchor:w,textOffset:P,opacity:L,strokeOpacity:V,strokeWidth:K,stroke:ve}}},{key:"generateGlyphLayout",value:function(i){var o=this,a=this.getFontServiceMapping(),u=this.layer.getLayerConfig(),c=u.spacing,f=c===void 0?2:c,m=u.textAnchor,_=m===void 0?"center":m,b=u.textOffset,A=this.rawEncodeData;this.glyphInfo=A.map(function(w){var R=w.shape,P=R===void 0?"":R,k=w.id,L=w.size,B=L===void 0?1:L,V=w.textOffset?w.textOffset:b||[0,0],G=w.textAnchor?w.textAnchor:_||"center",K=khe(P.toString(),a,B,G,"left",f,V,i),Z=Dhe(K,V,!1);return w.shaping=K,w.glyphQuads=Z,w.centroid=ih(w.coordinates),w.originCentroid=w.version==="GAODE2.x"?ih(w.originCoordinates):w.originCentroid=w.centroid,o.glyphInfoMap[k]={shaping:K,glyphQuads:Z,centroid:ih(w.coordinates)},w})}},{key:"getFontServiceMapping",value:function(){var i=this.layer.getLayerConfig(),o=i.fontWeight,a=o===void 0?"400":o,u=i.fontFamily,c=u===void 0?"sans-serif":u;return this.fontService.getMappingByKey("".concat(c,"_").concat(a))}},{key:"getFontServiceCanvas",value:function(){var i=this.layer.getLayerConfig(),o=i.fontWeight,a=o===void 0?"400":o,u=i.fontFamily,c=u===void 0?"sans-serif":u;return this.fontService.getCanvasByKey("".concat(c,"_").concat(a))}},{key:"filterGlyphs",value:function(){var i=this,o=this.layer.getLayerConfig(),a=o.padding,u=a===void 0?[0,0]:a,c=o.textAllowOverlap,f=c===void 0?!1:c;if(!f){this.glyphInfoMap={},this.currentZoom=this.mapService.getZoom(),this.extent=this.textExtent();var m=this.rendererService.getViewportSize(),_=m.width,b=m.height,A=new Ihe(_,b),w=this.glyphInfo.filter(function(R){var P=R.shaping,k=R.id,L=k===void 0?0:k,B=R.version==="GAODE2.x"?R.originCentroid:R.centroid,V=R.size,G=V/16,K=i.mapService.lngLatToContainer(B),Z=A.placeCollisionBox({x1:P.left*G-u[0],x2:P.right*G+u[0],y1:P.top*G-u[1],y2:P.bottom*G+u[1],anchorPointX:K.x,anchorPointY:K.y}),ve=Z.box;return ve&&ve.length?(A.insertCollisionBox(ve,L),!0):!1});w.forEach(function(R){i.glyphInfoMap[R.id]=R})}}},{key:"initGlyph",value:function(){var i=this.layer.getLayerConfig(),o=i.iconfont,a=o===void 0?!1:o;a?this.initIconFontTex():this.initTextFont(),this.generateGlyphLayout(a)}},{key:"updateTexture",value:function(){var i=this.rendererService.createTexture2D,o=this.getFontServiceCanvas();this.textureHeight=o.height,this.texture&&this.texture.destroy(),this.texture=i({data:o,mag:W.LINEAR,min:W.LINEAR,width:o.width,height:o.height}),this.textures=[this.texture]}},{key:"reBuildModel",value:function(){var n=Mt(he.mark(function o(){var a;return he.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.filterGlyphs(),c.next=3,this.layer.buildLayerModel({moduleName:"pointText",vertexShader:ST,fragmentShader:ET,triangulation:AT.bind(this),inject:this.getInject(),depth:{enable:!1}});case 3:a=c.sent,this.layer.models=[a];case 5:case"end":return c.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()}]),r}(Ba),Uhe={fillImage:fhe,fill:NP,radar:Ahe,image:UP,normal:zP,simplePoint:$fe,extrude:LP,text:GP,earthFill:Qfe,earthExtrude:Xfe};function zhe(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=$he(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function $he(e,t){if(e){if(typeof e=="string")return TT(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return TT(e,t)}}function TT(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Om=function(e){_n(r,e);var t=Vhe(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Xhe=`layout(std140) uniform commonUniforms { vec4 u_sourceColor; vec4 u_targetColor; float u_linearColor; float u_topsurface; float u_sidesurface; float u_heightfixed; // 默认不固定 float u_raisingHeight; }; in vec4 v_Color; #pragma include "scene_uniforms" #pragma include "picking" out vec4 outputColor; void main() { // top face if(u_topsurface < 1.0) { discard; } outputColor = v_Color; outputColor = filterColor(outputColor); } `,Yhe=`layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in float a_Size; layout(location = 13) in vec3 a_Normal; layout(location = 14) in vec3 a_uvs; layout(std140) uniform commonUniforms { vec4 u_sourceColor; vec4 u_targetColor; float u_linearColor; float u_topsurface; float u_sidesurface; float u_heightfixed; // 默认不固定 float u_raisingHeight; }; out vec4 v_Color; #pragma include "projection" #pragma include "light" #pragma include "picking" void main() { float isSide = a_Position.z; float topU = a_uvs[0]; float topV = 1.0 - a_uvs[1]; float sidey = a_uvs[2]; vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0); float lightWeight = calc_lighting(pos); vec4 project_pos = project_position(pos); if(u_heightfixed > 0.0) { // 判断几何体是否固定高度 project_pos.z = a_Position.z * a_Size; project_pos.z += u_raisingHeight; if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); project_pos.z *= mapboxZoomScale; project_pos.z += u_raisingHeight * mapboxZoomScale; } } gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0)); // Tip: 部分机型 GPU 计算精度兼容 if(isSide < 0.999) { // side face // if(u_sidesurface < 1.0) { // discard; // } if(u_linearColor == 1.0) { vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey); linearColor.rgb *= lightWeight; v_Color = linearColor; } else { v_Color = a_Color; } } else { v_Color = a_Color; } v_Color = vec4(v_Color.rgb * lightWeight, v_Color.w * opacity); setPickingColor(a_PickingColor); } `,Zhe=`uniform sampler2D u_texture; layout(std140) uniform commonUniforms { vec4 u_sourceColor; vec4 u_targetColor; float u_linearColor; float u_topsurface; float u_sidesurface; float u_heightfixed; // 默认不固定 float u_raisingHeight; }; in vec4 v_Color; in vec3 v_uvs; in vec2 v_texture_data; #pragma include "scene_uniforms" #pragma include "picking" out vec4 outputColor; void main() { float opacity = u_opacity; float isSide = v_texture_data.x; float lightWeight = v_texture_data.y; float topU = v_uvs[0]; float topV = 1.0 - v_uvs[1]; float sidey = v_uvs[2]; outputColor = texture(SAMPLER_2D(u_texture), vec2(topU, topV)); // Tip: 部分机型 GPU 计算精度兼容 if (isSide < 0.999) {// 是否是边缘 // side face if (u_sidesurface < 1.0) { discard; } if (u_linearColor == 1.0) { vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey); linearColor.rgb *= lightWeight; outputColor = linearColor; } else { outputColor = v_Color; } } else { // top face if (u_topsurface < 1.0) { discard; } } outputColor.a *= opacity; outputColor = filterColor(outputColor); } `,qhe=`layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in float a_Size; layout(location = 13) in vec3 a_Normal; layout(location = 14) in vec3 a_uvs; layout(std140) uniform commonUniforms { vec4 u_sourceColor; vec4 u_targetColor; float u_linearColor; float u_topsurface; float u_sidesurface; float u_heightfixed; // 默认不固定 float u_raisingHeight; }; out vec4 v_Color; out vec3 v_uvs; out vec2 v_texture_data; #pragma include "projection" #pragma include "light" #pragma include "picking" void main() { vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0); float lightWeight = calc_lighting(pos); vec4 project_pos = project_position(pos); v_uvs = a_uvs; v_Color = a_Color; v_Color.a *= opacity; v_texture_data = vec2(a_Position.z, lightWeight); if(u_heightfixed > 0.0) { // 判断几何体是否固定高度 project_pos.z = a_Position.z * a_Size; project_pos.z += u_raisingHeight; if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); project_pos.z *= mapboxZoomScale; project_pos.z += u_raisingHeight * mapboxZoomScale; } } gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0)); setPickingColor(a_PickingColor); } `,Khe=` layout(std140) uniform commonUniforms { vec4 u_sourceColor; vec4 u_targetColor; float u_linearColor; float u_topsurface; float u_sidesurface; float u_heightfixed; // 默认不固定 float u_raisingHeight; }; in vec4 v_Color; in vec3 v_uvs; in vec2 v_texture_data; out vec4 outputColor; #pragma include "scene_uniforms" #pragma include "picking" void main() { float isSide = v_texture_data.x; float sidey = v_uvs[2]; float lightWeight = v_texture_data.y; // Tip: 部分机型 GPU 计算精度兼容 if(isSide < 0.999) { // side face if(u_sidesurface < 1.0) { discard; } if( u_linearColor == 1.0) { // side use linear vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey); linearColor.rgb *= lightWeight; outputColor = linearColor; } else { // side notuse linear outputColor = v_Color; } } else { // top face if(u_topsurface < 1.0) { discard; } outputColor = v_Color; } outputColor = filterColorAlpha(outputColor, lightWeight); } `,Qhe=`layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in float a_Size; layout(location = 13) in vec3 a_Normal; layout(location = 14) in vec3 a_uvs; layout(std140) uniform commonUniforms { vec4 u_sourceColor; vec4 u_targetColor; float u_linearColor; float u_topsurface; float u_sidesurface; float u_heightfixed; // 默认不固定 float u_raisingHeight; }; out vec4 v_Color; out vec3 v_uvs; out vec2 v_texture_data; #pragma include "projection" #pragma include "light" #pragma include "picking" void main() { v_uvs = a_uvs; // cal style mapping - 数据纹理映射部分的计算 vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0); vec4 project_pos = project_position(pos); if(u_heightfixed > 0.0) { // 判断几何体是否固定高度 project_pos.z = a_Position.z * a_Size; project_pos.z += u_raisingHeight; if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); project_pos.z *= mapboxZoomScale; project_pos.z += u_raisingHeight * mapboxZoomScale; } } gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0)); float lightWeight = calc_lighting(pos); v_texture_data = vec2(a_Position.z,lightWeight); v_Color = vec4(a_Color.rgb * lightWeight, a_Color.w * opacity); setPickingColor(a_PickingColor); } `,Jhe=function(e){_n(r,e);var t=Ghe(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getUninforms",value:function(){var i=this.getCommonUniformsInfo(),o=this.getUniformsBufferInfo(this.getStyleAttribute());return this.updateStyleUnifoms(),Qe(Qe({},i.uniformsOption),o.uniformsOption)}},{key:"getCommonUniformsInfo",value:function(){var i=this.layer.getLayerConfig(),o=i.mapTexture,a=i.heightfixed,u=a===void 0?!1:a,c=i.raisingHeight,f=c===void 0?0:c,m=i.topsurface,_=m===void 0?!0:m,b=i.sidesurface,A=b===void 0?!0:b,w=i.sourceColor,R=i.targetColor,P=0,k=[1,1,1,1],L=[1,1,1,1];w&&R&&(k=Ta(w),L=Ta(R),P=1);var B={u_sourceColor:k,u_targetColor:L,u_linearColor:P,u_topsurface:Number(_),u_sidesurface:Number(A),u_heightfixed:Number(u),u_raisingHeight:Number(f)};o&&this.texture&&(B.u_texture=this.texture,this.textures=[this.texture]);var V=this.getUniformsBufferInfo(B);return V}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,this.loadTexture();case 2:return u.abrupt("return",this.buildModels());case 3:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f,m;return he.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return a=this.getShaders(),u=a.frag,c=a.vert,f=a.type,this.initUniformsBuffer(),b.next=4,this.layer.buildLayerModel({moduleName:f,vertexShader:c,fragmentShader:u,depth:{enable:!0},inject:this.getInject(),triangulation:FP});case 4:return m=b.sent,b.abrupt("return",[m]);case 6:case"end":return b.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"getShaders",value:function(){var i=this.layer.getLayerConfig(),o=i.pickLight,a=i.mapTexture;return a?{frag:Zhe,vert:qhe,type:"polygonExtrudeTexture"}:o?{frag:Khe,vert:Qhe,type:"polygonExtrudePickLight"}:{frag:Xhe,vert:Yhe,type:"polygonExtrude"}}},{key:"clearModels",value:function(){var i;(i=this.texture)===null||i===void 0||i.destroy(),this.textures=[]}},{key:"registerBuiltinAttributes",value:function(){var i=this.layer.getSource().extent,o=i,a=this.layer.coordCenter||this.layer.getSource().center,u=o[2]-o[0],c=o[3]-o[1];if(this.mapService.version==="GAODE2.x"){var f=this.mapService.coordToAMap2RelativeCoordinates([i[0],i[1]],a),m=Nn(f,2),_=m[0],b=m[1],A=this.mapService.coordToAMap2RelativeCoordinates([i[2],i[3]],a),w=Nn(A,2),R=w[0],P=w[1];u=R-_,c=P-b,o=[_,b,R,P]}this.styleAttributeService.registerStyleAttribute({name:"uvs",type:wn.Attribute,descriptor:{name:"a_uvs",shaderLocation:Vn.UV,buffer:{usage:W.STATIC_DRAW,data:[],type:W.FLOAT},size:3,update:function(L,B,V){var G=V[0],K=V[1];return[(G-o[0])/u,(K-o[1])/c,V[4]]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:wn.Attribute,descriptor:{name:"a_Normal",shaderLocation:Vn.NORMAL,buffer:{usage:W.STATIC_DRAW,data:[],type:W.FLOAT},size:3,update:function(L,B,V,G,K){return K}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:wn.Attribute,descriptor:{name:"a_Size",shaderLocation:Vn.SIZE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:1,update:function(L){var B=L.size,V=B===void 0?10:B;return Array.isArray(V)?[V[0]]:[V]}}})}},{key:"loadTexture",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f;return he.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(a=this.layer.getLayerConfig(),u=a.mapTexture,c=this.rendererService.createTexture2D,this.texture=c({height:1,width:1}),!u){_.next=8;break}return _.next=6,Hhe(u);case 6:f=_.sent,this.texture=c({data:f,width:f.width,height:f.height,wrapS:W.CLAMP_TO_EDGE,wrapT:W.CLAMP_TO_EDGE,min:W.LINEAR,mag:W.LINEAR});case 8:case"end":return _.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()}]),r}(Ba);function epe(e){var t=tpe();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function tpe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var rpe=` in vec4 v_Color; #pragma include "scene_uniforms" #pragma include "picking" out vec4 outputColor; void main() { outputColor = v_Color; outputColor = filterColor(outputColor); } `,npe=`layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 9) in float a_Size; layout(location = 13) in vec3 a_Normal; out vec4 v_Color; #pragma include "projection" #pragma include "light" #pragma include "picking" void main() { vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size + (1.0 - a_Position.z) * extrusionBase, 1.0); vec4 project_pos = project_position(pos); float lightWeight = calc_lighting(project_pos); v_Color = a_Color; v_Color = vec4(v_Color.rgb * lightWeight, v_Color.w * opacity); gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0)); setPickingColor(a_PickingColor); } `,ipe=function(e){_n(r,e);var t=epe(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getUninforms",value:function(){var i=this.getCommonUniformsInfo(),o=this.getUniformsBufferInfo(this.getStyleAttribute());return this.updateStyleUnifoms(),Qe(Qe({},i.uniformsOption),o.uniformsOption)}},{key:"getCommonUniformsInfo",value:function(){var i={},o=this.getUniformsBufferInfo(i);return o}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",this.buildModels());case 1:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f,m;return he.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return a=this.getShaders(),u=a.frag,c=a.vert,f=a.type,this.initUniformsBuffer(),b.next=4,this.layer.buildLayerModel({moduleName:f,vertexShader:c,fragmentShader:u,inject:this.getInject(),triangulation:FP,depth:{enable:!0}});case 4:return m=b.sent,b.abrupt("return",[m]);case 6:case"end":return b.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"getShaders",value:function(){return{frag:rpe,vert:npe,type:"polygonExtrude"}}},{key:"clearModels",value:function(){var i;(i=this.texture)===null||i===void 0||i.destroy()}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"normal",type:wn.Attribute,descriptor:{name:"a_Normal",shaderLocation:Vn.NORMAL,buffer:{usage:W.STATIC_DRAW,data:[],type:W.FLOAT},size:3,update:function(o,a,u,c,f){return f}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:wn.Attribute,descriptor:{name:"a_Size",shaderLocation:Vn.SIZE,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:1,update:function(o){var a=o.size,u=a===void 0?10:a;return Array.isArray(u)?[u[0]]:[u]}}})}}]),r}(Ba);function ape(e){var t=ope();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function ope(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var spe=`in vec4 v_color; #pragma include "scene_uniforms" #pragma include "picking" out vec4 outputColor; void main() { outputColor = v_color; outputColor = filterColor(outputColor); } `,upe=` layout(std140) uniform commonUniforms { float u_raisingHeight; float u_opacitylinear; float u_dir; }; in vec4 v_color; in vec3 v_linear; in vec2 v_pos; out vec4 outputColor; #pragma include "scene_uniforms" #pragma include "picking" void main() { outputColor = v_color; if (u_opacitylinear > 0.0) { outputColor.a *= u_dir == 1.0 ? 1.0 - length(v_pos - v_linear.xy)/v_linear.z : length(v_pos - v_linear.xy)/v_linear.z; } outputColor = filterColor(outputColor); } `,lpe=`layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 15) in vec3 a_linear; layout(std140) uniform commonUniforms { float u_raisingHeight; float u_opacitylinear; float u_dir; }; out vec4 v_color; out vec3 v_linear; out vec2 v_pos; #pragma include "projection" #pragma include "picking" void main() { if (u_opacitylinear > 0.0) { v_linear = a_linear; v_pos = a_Position.xy; } v_color = vec4(a_Color.xyz, a_Color.w * opacity); vec4 project_pos = project_position(vec4(a_Position, 1.0)); project_pos.z += u_raisingHeight; if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); project_pos.z *= mapboxZoomScale; project_pos.z += u_raisingHeight * mapboxZoomScale; } gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0)); setPickingColor(a_PickingColor); }`,cpe=`layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(std140) uniform commonUniforms { float u_raisingHeight; }; out vec4 v_color; #pragma include "projection" #pragma include "picking" void main() { // cal style mapping - 数据纹理映射部分的计算 // cal style mapping - 数据纹理映射部分的计算 v_color = vec4(a_Color.xyz, a_Color.w * opacity); vec4 project_pos = project_position(vec4(a_Position, 1.0)); // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0)); project_pos.z += u_raisingHeight; if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); project_pos.z *= mapboxZoomScale; project_pos.z += u_raisingHeight * mapboxZoomScale; } gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0)); setPickingColor(a_PickingColor); } `,fpe=function(e){_n(r,e);var t=ape(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getUninforms",value:function(){var i=this.getCommonUniformsInfo(),o=this.getUniformsBufferInfo(this.getStyleAttribute());return this.updateStyleUnifoms(),Qe(Qe({},i.uniformsOption),o.uniformsOption)}},{key:"getCommonUniformsInfo",value:function(){var i=this.layer.getLayerConfig(),o=i.raisingHeight,a=o===void 0?0:o,u=i.opacityLinear,c=u===void 0?{enable:!1,dir:"in"}:u,f={u_raisingHeight:Number(a),u_opacitylinear:Number(c.enable),u_dir:c.dir==="in"?1:0},m=this.getUniformsBufferInfo(f);return m}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",this.buildModels());case 1:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f,m,_;return he.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return a=this.getModelParams(),u=a.frag,c=a.vert,f=a.triangulation,m=a.type,this.initUniformsBuffer(),this.layer.triangulation=f,A.next=5,this.layer.buildLayerModel({moduleName:m,vertexShader:c,fragmentShader:u,inject:this.getInject(),triangulation:f,primitive:W.TRIANGLES,depth:{enable:!1}});case 5:return _=A.sent,A.abrupt("return",[_]);case 7:case"end":return A.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"registerBuiltinAttributes",value:function(){var i=this.layer.getLayerConfig(),o=i.opacityLinear,a=o===void 0?{enable:!1,dir:"in"}:o;a.enable&&this.styleAttributeService.registerStyleAttribute({name:"linear",type:wn.Attribute,descriptor:{name:"a_linear",shaderLocation:Vn.LINEAR,buffer:{usage:W.STATIC_DRAW,data:[],type:W.FLOAT},size:3,update:function(c,f,m){return[m[3],m[4],m[5]]}}})}},{key:"getModelParams",value:function(){var i=this.layer.getLayerConfig(),o=i.opacityLinear,a=o===void 0?{enable:!1}:o;return a.enable?{frag:upe,vert:lpe,type:"polygonLinear",triangulation:Ice}:{frag:spe,vert:cpe,type:"polygonFill",triangulation:BM}}}]),r}(Ba);function hpe(e){var t=ppe();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function ppe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var dpe=` layout(std140) uniform commonUniforms { vec4 u_watercolor; vec4 u_watercolor2; float u_time; }; in vec2 v_uv; in float v_opacity; out vec4 outputColor; float coast2water_fadedepth = 0.10; float large_waveheight = .750; // change to adjust the "heavy" waves float large_wavesize = 3.4; // factor to adjust the large wave size float small_waveheight = 0.6; // change to adjust the small random waves float small_wavesize = 0.5; // factor to ajust the small wave size float water_softlight_fact = 15.; // range [1..200] (should be << smaller than glossy-fact) float water_glossylight_fact= 120.; // range [1..200] float particle_amount = 70.; vec3 water_specularcolor = vec3(1.3, 1.3, 0.9); // specular Color (RGB) of the water-highlights #define light vec3(-0., sin(u_time*0.5)*.5 + .35, 2.8) // position of the sun uniform sampler2D u_texture1; uniform sampler2D u_texture2; uniform sampler2D u_texture3; float hash( float n ) { return fract(sin(n)*43758.5453123); } // 2d noise function float noise1( in vec2 x ) { vec2 p = floor(x); vec2 f = smoothstep(0.0, 1.0, fract(x)); float n = p.x + p.y*57.0; return mix(mix( hash(n+ 0.0), hash(n+ 1.0),f.x), mix( hash(n+ 57.0), hash(n+ 58.0),f.x),f.y); } float noise(vec2 p) { return texture(SAMPLER_2D(u_texture2),p*vec2(1./256.)).x; } vec4 highness(vec2 p) { vec4 t = texture(SAMPLER_2D(u_texture1),fract(p)); float clipped = -2.0-smoothstep(3.,10.,t.a)*6.9-smoothstep(10.,100.,t.a)*89.9-smoothstep(0.,10000.,t.a)*10000.0; return clamp(t, 0.0,3.0)+clamp(t/3.0-1.0, 0.0,1.0)+clamp(t/16.0-1.0, 0.0,1.0); } float height_map( vec2 p ) { vec4 height=highness(p); /* height = -0.5+ 0.5*smoothstep(-100.,0.,-height)+ 2.75*smoothstep(0.,2.,height)+ 1.75*smoothstep(2.,4.,height)+ 2.75*smoothstep(4.,16.,height)+ 1.5*smoothstep(16.,1000.,height); */ mat2 m = mat2( 0.9563*1.4, -0.2924*1.4, 0.2924*1.4, 0.9563*1.4 ); //p = p*6.; float f = 0.6000*noise1( p ); p = m*p*1.1*6.; f += 0.2500*noise( p ); p = m*p*1.32; f += 0.1666*noise( p ); p = m*p*1.11; f += 0.0834*noise( p ); p = m*p*1.12; f += 0.0634*noise( p ); p = m*p*1.13; f += 0.0444*noise( p ); p = m*p*1.14; f += 0.0274*noise( p ); p = m*p*1.15; f += 0.0134*noise( p ); p = m*p*1.16; f += 0.0104*noise( p ); p = m*p*1.17; f += 0.0084*noise( p ); f = .25*f+dot(height,vec4(-.03125,-.125,.25,.25))*.5; const float FLAT_LEVEL = 0.92525; //f = f*0.25+height*0.75; if (f level) { col = CalcTerrain(uv, height); } if (height <= level) { vec2 dif = vec2(.0, .01); vec2 pos = uv*15. + vec2(u_time*.01); float h1 = water_map(pos-dif,waveheight); float h2 = water_map(pos+dif,waveheight); float h3 = water_map(pos-dif.yx,waveheight); float h4 = water_map(pos+dif.yx,waveheight); vec3 normwater = normalize(vec3(h3-h4, h1-h2, .125)); // norm-vector of the 'bumpy' water-plane uv += normwater.xy*.002*(level-height); col = CalcTerrain(uv, height); float coastfade = clamp((level-height)/coast2water_fadedepth, 0., 1.); float coastfade2= clamp((level-height)/deepwater_fadedepth, 0., 1.); float intensity = col.r*.2126+col.g*.7152+col.b*.0722; watercolor = mix(watercolor*intensity, watercolor2, smoothstep(0., 1., coastfade2)); vec3 r0 = vec3(uv, WATER_LEVEL); vec3 rd = normalize( light - r0 ); // ray-direction to the light from water-position float grad = dot(normwater, rd); // dot-product of norm-vector and light-direction float specular = pow(grad, water_softlight_fact); // used for soft highlights float specular2= pow(grad, water_glossylight_fact); // used for glossy highlights float gradpos = dot(vec3(0., 0., 1.), rd); float specular1= smoothstep(0., 1., pow(gradpos, 5.)); // used for diffusity (some darker corona around light's specular reflections...) float watershade = test_shadow( uv, level ); watercolor *= 2.2+watershade; watercolor += (.2+.8*watershade) * ((grad-1.0)*.5+specular) * .25; watercolor /= (1.+specular1*1.25); watercolor += watershade*specular2*water_specularcolor; watercolor += watershade*coastfade*(1.-coastfade2)*(vec3(.5, .6, .7)*nautic(uv)+vec3(1., 1., 1.)*particles(uv)); col = mix(col, watercolor, coastfade); } outputColor = vec4(col, v_opacity); } `,vpe=`layout(location = 0) in vec3 a_Position; layout(location = 14) in vec2 a_uv; layout(std140) uniform commonUniforms { vec4 u_watercolor; vec4 u_watercolor2; float u_time; }; out vec2 v_uv; out float v_opacity; #pragma include "projection" void main() { v_uv = a_uv; v_opacity = opacity; vec4 project_pos = project_position(vec4(a_Position, 1.0)); gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0)); } `;Ci.isNumber;var mpe=function(e){_n(r,e);var t=hpe(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getUninforms",value:function(){var i=this.getCommonUniformsInfo(),o=this.getUniformsBufferInfo(this.getStyleAttribute());return this.updateStyleUnifoms(),Qe(Qe({},i.uniformsOption),o.uniformsOption)}},{key:"getCommonUniformsInfo",value:function(){var i=this.layer.getLayerConfig(),o=i.watercolor,a=o===void 0?"#6D99A8":o,u=i.watercolor2,c=u===void 0?"#0F121C":u,f={u_watercolor:Ta(a),u_watercolor2:Ta(c),u_time:this.layer.getLayerAnimateTime(),u_texture1:this.texture1,u_texture2:this.texture2,u_texture3:this.texture3};this.textures=[this.texture1,this.texture2,this.texture3];var m=this.getUniformsBufferInfo(f);return m}},{key:"getAnimateUniforms",value:function(){return{u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return this.loadTexture(),u.abrupt("return",this.buildModels());case 2:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a;return he.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.initUniformsBuffer(),c.next=3,this.layer.buildLayerModel({moduleName:"polygonOcean",vertexShader:vpe,fragmentShader:dpe,inject:this.getInject(),triangulation:ab,primitive:W.TRIANGLES,depth:{enable:!1}});case 3:return a=c.sent,c.abrupt("return",[a]);case 5:case"end":return c.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"clearModels",value:function(){var i,o,a;(i=this.texture1)===null||i===void 0||i.destroy(),(o=this.texture2)===null||o===void 0||o.destroy(),(a=this.texture3)===null||a===void 0||a.destroy()}},{key:"registerBuiltinAttributes",value:function(){var i=this.layer.getSource().extent,o=Nn(i,4),a=o[0],u=o[1],c=o[2],f=o[3],m=c-a,_=f-u;this.styleAttributeService.registerStyleAttribute({name:"oceanUv",type:wn.Attribute,descriptor:{name:"a_uv",shaderLocation:Vn.UV,buffer:{usage:W.STATIC_DRAW,data:[],type:W.FLOAT},size:2,update:function(A,w,R,P){var k=A.version==="GAODE2.x"?A.originCoordinates[0][P]:R,L=Nn(k,2),B=L[0],V=L[1];return[(B-a)/m,(V-u)/_]}}})}},{key:"loadTexture",value:function(){var i=this,o=this.rendererService.createTexture2D,a={height:0,width:0};this.texture1=o(a),this.texture2=o(a),this.texture3=o(a),u(function(f){i.texture1=c(f[0]),i.texture2=c(f[1]),i.texture3=c(f[2]),i.layerService.reRender()});function u(f){var m=0,_=[],b=["https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*EojwT4VzSiYAAAAAAAAAAAAAARQnAQ","https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*MJ22QbpuCzIAAAAAAAAAAAAAARQnAQ","https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*-z2HSIVDsHIAAAAAAAAAAAAAARQnAQ"];b.map(function(A){var w=new Image;w.crossOrigin="",w.src=A,_.push(w),w.onload=function(){m++,m===3&&f(_)}})}function c(f){return o({data:f,width:f.width,height:f.height,wrapS:W.MIRRORED_REPEAT,wrapT:W.MIRRORED_REPEAT,min:W.LINEAR,mag:W.LINEAR})}}}]),r}(Ba);function gpe(e){var t=_pe();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function _pe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ype=`uniform sampler2D u_texture; layout(std140) uniform commonUniforms { float u_speed; float u_time; }; out vec4 outputColor; in vec4 v_Color; in vec2 v_uv; float rand(vec2 n) { return 0.5 + 0.5 * fract(sin(dot(n.xy, vec2(12.9898, 78.233)))* 43758.5453); } float water(vec3 p) { float t = u_time * u_speed; p.z += t * 2.; p.x += t * 2.; vec3 c1 = texture(SAMPLER_2D(u_texture), p.xz / 30.).xyz; p.z += t * 3.; p.x += t * 0.52; vec3 c2 = texture(SAMPLER_2D(u_texture), p.xz / 30.).xyz; p.z += t * 4.; p.x += t * 0.8; vec3 c3 = texture(SAMPLER_2D(u_texture), p.xz / 30.).xyz; c1 += c2 - c3; float z = (c1.x + c1.y + c1.z) / 3.; return p.y + z / 4.; } float map(vec3 p) { float d = 100.0; d = water(p); return d; } float intersect(vec3 ro, vec3 rd) { float d = 0.0; for (int i = 0; i <= 100; i++) { float h = map(ro + rd * d); if (h < 0.1) return d; d += h; } return 0.0; } vec3 norm(vec3 p) { float eps = .1; return normalize(vec3( map(p + vec3(eps, 0, 0)) - map(p + vec3(-eps, 0, 0)), map(p + vec3(0, eps, 0)) - map(p + vec3(0, -eps, 0)), map(p + vec3(0, 0, eps)) - map(p + vec3(0, 0, -eps)) )); } float calSpc() { vec3 l1 = normalize(vec3(1, 1, 1)); vec3 ro = vec3(-3, 20, -8); vec3 rc = vec3(0, 0, 0); vec3 ww = normalize(rc - ro); vec3 uu = normalize(cross(vec3(0,1,0), ww)); vec3 vv = normalize(cross(rc - ro, uu)); vec3 rd = normalize(uu * v_uv.x + vv * v_uv.y + ww); float d = intersect(ro, rd); vec3 p = ro + rd * d; vec3 n = norm(p); float spc = pow(max(0.0, dot(reflect(l1, n), rd)), 30.0); return spc; } void main() { outputColor = v_Color; float spc = calSpc(); outputColor += spc * 0.4; } `,xpe=`layout(location = 0) in vec3 a_Position; layout(location = 1) in vec4 a_Color; layout(location = 14) in vec2 a_uv; layout(std140) uniform commonUniforms { float u_speed; float u_time; }; out vec4 v_Color; out vec2 v_uv; #pragma include "projection" void main() { v_uv = a_uv; v_Color = a_Color; v_Color.a *= opacity; vec4 project_pos = project_position(vec4(a_Position, 1.0)); gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0)); } `;Ci.isNumber;var bpe=function(e){_n(r,e);var t=gpe(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getUninforms",value:function(){var i=this.getCommonUniformsInfo(),o=this.getUniformsBufferInfo(this.getStyleAttribute());return this.updateStyleUnifoms(),Qe(Qe({},i.uniformsOption),o.uniformsOption)}},{key:"getCommonUniformsInfo",value:function(){var i=this.layer.getLayerConfig(),o=i.speed,a=o===void 0?.5:o,u={u_speed:a,u_time:this.layer.getLayerAnimateTime(),u_texture:this.texture};this.textures=[this.texture];var c=this.getUniformsBufferInfo(u);return c}},{key:"getAnimateUniforms",value:function(){return{u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return this.loadTexture(),u.abrupt("return",this.buildModels());case 2:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a;return he.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.initUniformsBuffer(),c.next=3,this.layer.buildLayerModel({moduleName:"polygonWater",vertexShader:xpe,fragmentShader:ype,triangulation:ab,inject:this.getInject(),primitive:W.TRIANGLES,depth:{enable:!1},pickingEnabled:!1,diagnosticDerivativeUniformityEnabled:!1});case 3:return a=c.sent,c.abrupt("return",[a]);case 5:case"end":return c.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"clearModels",value:function(){var i;(i=this.texture)===null||i===void 0||i.destroy()}},{key:"registerBuiltinAttributes",value:function(){var i=this.layer.getSource().extent,o=Nn(i,4),a=o[0],u=o[1],c=o[2],f=o[3],m=c-a,_=f-u;this.styleAttributeService.registerStyleAttribute({name:"waterUv",type:wn.Attribute,descriptor:{name:"a_uv",shaderLocation:Vn.UV,buffer:{usage:W.STATIC_DRAW,data:[],type:W.FLOAT},size:2,update:function(A,w,R,P){var k=A.version==="GAODE2.x"?A.originCoordinates[0][P]:R,L=Nn(k,2),B=L[0],V=L[1];return[(B-a)/m,(V-u)/_]}}})}},{key:"loadTexture",value:function(){var i=this,o=this.layer.getLayerConfig(),a=o.waterTexture,u=this.rendererService.createTexture2D;this.texture=u({height:1,width:1});var c=new Image;c.crossOrigin="",a?(console.warn("L7 recommend:https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*EojwT4VzSiYAAAAAAAAAAAAAARQnAQ"),c.src=a):c.src="https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*EojwT4VzSiYAAAAAAAAAAAAAARQnAQ",c.onload=function(){i.texture=u({data:c,width:c.width,height:c.height,wrapS:W.MIRRORED_REPEAT,wrapT:W.MIRRORED_REPEAT,min:W.LINEAR,mag:W.LINEAR}),i.layerService.reRender()}}}]),r}(Ba),Epe={fill:fpe,line:BP,extrude:Jhe,text:GP,point_fill:NP,point_image:UP,point_normal:zP,point_extrude:LP,water:bpe,ocean:mpe,extrusion:ipe};function Spe(e){var t=Ape();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function Ape(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var s_=function(e){_n(r,e);var t=Spe(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Cpe=`layout(std140) uniform commonUniforms { vec2 u_domain; float u_opacity; float u_noDataValue; float u_clampLow; float u_clampHigh; }; uniform sampler2D u_rasterTexture; uniform sampler2D u_colorTexture; in vec2 v_texCoord; bool isnan_emu(float x) { return (x > 0.0 || x < 0.0) ? x != x : x != 0.0; } out vec4 outputColor; void main() { // Can use any component here since u_rasterTexture is under luminance format. float value = texture(SAMPLER_2D(u_rasterTexture), vec2(v_texCoord.x, v_texCoord.y)).r; if (value == u_noDataValue || isnan_emu(value)) { discard; } else if ((u_clampLow < 0.5 && value < u_domain[0]) || (u_clampHigh < 0.5 && value > u_domain[1])) { discard; } else { float normalisedValue =(value - u_domain[0]) / (u_domain[1] - u_domain[0]); vec4 color = texture(SAMPLER_2D(u_colorTexture), vec2(normalisedValue, 0)); outputColor = color; outputColor.a = outputColor.a * u_opacity ; if (outputColor.a < 0.01) discard; } } `,Rpe=` layout(location = 0) in vec3 a_Position; layout(location = 14) in vec2 a_Uv; layout(std140) uniform commonUniforms { vec2 u_domain; float u_opacity; float u_noDataValue; float u_clampLow; float u_clampHigh; }; out vec2 v_texCoord; #pragma include "projection" void main() { v_texCoord = a_Uv; vec4 project_pos = project_position(vec4(a_Position, 1.0)); gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy,0., 1.0)); } `,wT=function(e){_n(r,e);var t=Tpe(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getUninforms",value:function(){var i=this.getCommonUniformsInfo(),o=this.getUniformsBufferInfo(this.getStyleAttribute());return this.updateStyleUnifoms(),Qe(Qe({},i.uniformsOption),o.uniformsOption)}},{key:"getCommonUniformsInfo",value:function(){var i=this.layer.getLayerConfig(),o=i.opacity,a=o===void 0?1:o,u=i.clampLow,c=u===void 0?!0:u,f=i.clampHigh,m=f===void 0?!0:f,_=i.noDataValue,b=_===void 0?-9999999:_,A=i.domain,w=i.rampColors,R=A||g5(w);this.colorTexture=this.layer.textureService.getColorTexture(w,R);var P={u_domain:R,u_opacity:a||1,u_noDataValue:b,u_clampLow:c?1:0,u_clampHigh:(typeof m<"u"?m:c)?1:0,u_rasterTexture:this.texture,u_colorTexture:this.colorTexture};this.textures=[this.texture,this.colorTexture];var k=this.getUniformsBufferInfo(P);return k}},{key:"getRasterData",value:function(){var n=Mt(he.mark(function o(a){var u,c,f,m;return he.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(!Array.isArray(a.data)){b.next=4;break}return b.abrupt("return",{data:a.data,width:a.width,height:a.height});case 4:return b.next=6,a.data;case 6:return u=b.sent,c=u.rasterData,f=u.width,m=u.height,b.abrupt("return",{data:Array.from(c),width:f,height:m});case 11:case"end":return b.stop()}},o)}));function i(o){return n.apply(this,arguments)}return i}()},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",this.buildModels());case 1:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f,m,_,b,A,w,R;return he.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return this.initUniformsBuffer(),a=this.layer.getSource(),u=this.rendererService,c=u.createTexture2D,f=u.queryVerdorInfo,m=a.data.dataArray[0],k.next=6,this.getRasterData(m);case 6:return _=k.sent,b=_.data,A=_.width,w=_.height,this.texture=c({data:new Float32Array(b),width:A,height:w,format:f()==="WebGL1"?W.LUMINANCE:W.RED,type:W.FLOAT,alignment:1}),k.next=13,this.layer.buildLayerModel({moduleName:"rasterImageData",vertexShader:Rpe,fragmentShader:Cpe,triangulation:gy,primitive:W.TRIANGLES,depth:{enable:!1},pickingEnabled:!1});case 13:return R=k.sent,k.abrupt("return",[R]);case 15:case"end":return k.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"clearModels",value:function(){var i,o;(i=this.texture)===null||i===void 0||i.destroy(),(o=this.colorTexture)===null||o===void 0||o.destroy()}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:wn.Attribute,descriptor:{shaderLocation:Vn.UV,name:"a_Uv",buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:2,update:function(o,a,u){return[u[3],u[4]]}}})}}]),r}(Ba),Ipe=["data"],Mpe=["rasterData"];function Ppe(e){var t=Ope();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function Ope(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var kpe=`uniform sampler2D u_texture; layout(std140) uniform commonUniforms { vec2 u_rminmax; vec2 u_gminmax; vec2 u_bminmax; float u_opacity; float u_noDataValue; }; in vec2 v_texCoord; out vec4 outputColor; void main() { vec3 rgb = texture(SAMPLER_2D(u_texture),vec2(v_texCoord.x,v_texCoord.y)).rgb; if(rgb == vec3(u_noDataValue)) { outputColor = vec4(0.0, 0, 0, 0.0); } else { outputColor = vec4(rgb.r / (u_rminmax.y -u_rminmax.x), rgb.g /(u_gminmax.y -u_gminmax.x), rgb.b/ (u_bminmax.y - u_bminmax.x), u_opacity); } if(outputColor.a < 0.01) discard; }`,Dpe=` layout(location = 0) in vec3 a_Position; layout(location = 14) in vec2 a_Uv; layout(std140) uniform commonUniforms { vec2 u_rminmax; vec2 u_gminmax; vec2 u_bminmax; float u_opacity; float u_noDataValue; }; out vec2 v_texCoord; #pragma include "projection" void main() { v_texCoord = a_Uv; vec4 project_pos = project_position(vec4(a_Position, 1.0)); gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy,0., 1.0)); } `,Fpe=function(e){_n(r,e);var t=Ppe(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Npe=`uniform sampler2D u_texture; uniform sampler2D u_colorTexture; layout(std140) uniform commonUniforms { vec4 u_unpack; vec2 u_domain; float u_opacity; float u_noDataValue; float u_clampLow; float u_clampHigh; }; in vec2 v_texCoord; out vec4 outputColor; float getElevation(vec2 coord, float bias) { // Convert encoded elevation value to meters vec4 data = texture(SAMPLER_2D(u_texture), coord,bias) * 255.0; data.a = -1.0; return dot(data, u_unpack); } vec4 getColor(float value) { float normalisedValue =(value- u_domain[0]) / (u_domain[1] - u_domain[0]); vec2 coord = vec2(normalisedValue, 0); return texture(SAMPLER_2D(u_colorTexture), coord); } void main() { float value = getElevation(v_texCoord,0.0); if (value == u_noDataValue) { outputColor = vec4(0.0, 0, 0, 0.0); } else if ((u_clampLow < 0.5 && value < u_domain[0]) || (u_clampHigh < 0.5 && value > u_domain[1])) { outputColor = vec4(0.0, 0, 0, 0.0); } else { outputColor = getColor(value); outputColor.a = outputColor.a * u_opacity ; if(outputColor.a < 0.01) discard; } } `,Upe=`layout(location = 0) in vec3 a_Position; layout(location = 14) in vec2 a_Uv; layout(std140) uniform commonUniforms { vec4 u_unpack; vec2 u_domain; float u_opacity; float u_noDataValue; float u_clampLow; float u_clampHigh; }; out vec2 v_texCoord; #pragma include "projection" void main() { v_texCoord = a_Uv; vec4 project_pos = project_position(vec4(a_Position, 1.0)); gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy,0., 1.0)); } `,zpe=function(e){_n(r,e);var t=Bpe(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getCommonUniformsInfo",value:function(){var i=this.layer.getLayerConfig(),o=i.opacity,a=i.clampLow,u=a===void 0?!0:a,c=i.clampHigh,f=c===void 0?!0:c,m=i.noDataValue,_=m===void 0?-9999999:m,b=i.domain,A=i.rampColors,w=i.colorTexture,R=i.rScaler,P=R===void 0?6553.6:R,k=i.gScaler,L=k===void 0?25.6:k,B=i.bScaler,V=B===void 0?.1:B,G=i.offset,K=G===void 0?1e4:G,Z=b||g5(A),ve=w;w?this.layer.textureService.setColorTexture(w,A,Z):ve=this.layer.textureService.getColorTexture(A,Z);var Ie={u_unpack:[P,L,V,K],u_domain:Z,u_opacity:o||1,u_noDataValue:_,u_clampLow:u,u_clampHigh:typeof f<"u"?f:u,u_texture:this.texture,u_colorTexture:ve};this.textures=[this.texture,ve];var de=this.getUniformsBufferInfo(Ie);return de}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f;return he.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return this.initUniformsBuffer(),a=this.layer.getSource(),u=this.rendererService.createTexture2D,_.next=5,a.data.images;case 5:return c=_.sent,this.texture=u({data:c[0],width:c[0].width,height:c[0].height,min:W.LINEAR,mag:W.LINEAR}),_.next=9,this.layer.buildLayerModel({moduleName:"RasterTileDataImage",vertexShader:Upe,fragmentShader:Npe,triangulation:gy,primitive:W.TRIANGLES,depth:{enable:!1}});case 9:return f=_.sent,_.abrupt("return",[f]);case 11:case"end":return _.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"clearModels",value:function(){var i;(i=this.texture)===null||i===void 0||i.destroy()}},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",this.initModels());case 1:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:wn.Attribute,descriptor:{name:"a_Uv",shaderLocation:Vn.UV,buffer:{usage:W.DYNAMIC_DRAW,data:[],type:W.FLOAT},size:2,update:function(o,a,u){return[u[3],u[4]]}}})}}]),r}(Ba),$pe={raster:wT,rasterRgb:Fpe,raster3d:wT,rasterTerrainRgb:zpe};function Vpe(e){var t=jpe();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function jpe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ub=function(e){_n(r,e);var t=Vpe(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Wpe=`layout(std140) uniform commonUniorm { vec4 u_color; float u_opacity; }; out vec4 outputColor; void main() { outputColor = u_color; outputColor.a *= u_opacity; } `,Xpe=`layout(location = 0) in vec3 a_Position; layout(std140) uniform commonUniorm { vec4 u_color; float u_opacity; }; #pragma include "projection" void main() { vec4 project_pos = project_position(vec4(a_Position, 1.0)); if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0)); } else { gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0)); } } `,Ype=function(e){_n(r,e);var t=Hpe(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getUninforms",value:function(){var i=this.getCommonUniformsInfo(),o=this.getUniformsBufferInfo(this.getStyleAttribute());return this.updateStyleUnifoms(),Qe(Qe({},i.uniformsOption),o.uniformsOption)}},{key:"getCommonUniformsInfo",value:function(){var i=this.layer.getLayerConfig(),o=i.opacity,a=o===void 0?1:o,u=i.color,c=u===void 0?"#000":u,f={u_color:Ta(c),u_opacity:a||1},m=this.getUniformsBufferInfo(f);return m}},{key:"initModels",value:function(){var n=Mt(he.mark(function o(){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",this.buildModels());case 1:case"end":return u.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"buildModels",value:function(){var n=Mt(he.mark(function o(){var a;return he.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.initUniformsBuffer(),c.next=3,this.layer.buildLayerModel({moduleName:"mask",vertexShader:Xpe,fragmentShader:Wpe,triangulation:ab,depth:{enable:!1},pick:!1});case 3:return a=c.sent,c.abrupt("return",[a]);case 5:case"end":return c.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"clearModels",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;i&&this.layerService.clear()}},{key:"registerBuiltinAttributes",value:function(){return""}}]),r}(Ba),Zpe={fill:Ype};function qpe(e){var t=Kpe();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function Kpe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var WP=function(e){_n(r,e);var t=qpe(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a0&&this.mapService.version==="GAODE2.x"){var o=n.coordCenter||n.getSource().center;r.filter(function(a){return!a.originCoordinates}).map(function(a){a.version="GAODE2.x",a.originCoordinates=Qpe(a.coordinates),a.coordinates=i.mapService.coordToAMap2RelativeCoordinates(a.coordinates,o)})}}},{key:"adjustData2SimpleCoordinates",value:function(r){var n=this;r.length>0&&this.mapService.version==="SIMPLE"&&r.map(function(i){i.simpleCoordinate||(i.coordinates=n.unProjectCoordinates(i.coordinates),i.simpleCoordinate=!0)})}},{key:"unProjectCoordinates",value:function(r){var n=this;if(typeof r[0]=="number")return this.mapService.simpleMapCoord.unproject(r);if(r[0]&&r[0][0]instanceof Array){var i=[];return r.map(function(a){var u=[];a.map(function(c){u.push(n.mapService.simpleMapCoord.unproject(c))}),i.push(u)}),i}else{var o=[];return r.map(function(a){o.push(n.mapService.simpleMapCoord.unproject(a))}),o}}},{key:"applyAttributeMapping",value:function(r,n){var i;if(!r.scale)return[];var o=(r==null||(i=r.scale)===null||i===void 0?void 0:i.scalers)||[],a=[];o.forEach(function(c){var f,m=c.field;(n.hasOwnProperty(m)||((f=r.scale)===null||f===void 0?void 0:f.type)==="variable")&&a.push(n[m])});var u=r.mapping?r.mapping(a):[];return u}},{key:"getArrowPoints",value:function(r,n){var i=[n[0]-r[0],n[1]-r[1]],o=Iee(i),a=[r[0]+o[0]*1e-4,r[1]+o[1]*1e-4];return a}}]),e}(),PT=mi(rg.prototype,"mapService",[RT],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),OT=mi(rg.prototype,"fontService",[IT],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),rg))||MT),kT,DT,e1e=(kT=ai(),kT(DT=function(){function e(){Ht(this,e)}return jt(e,[{key:"apply",value:function(r){var n=this;this.mapService=r.getContainer().get(wt.IMapService),r.hooks.init.tapPromise("DataSourcePlugin",Mt(he.mark(function i(){var o,a,u,c;return he.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(r.log(Ho.SourceInitStart,ps.INIT),o=r.getSource(),o||(a=r.sourceOption||r.defaultSourceConfig,u=a.data,c=a.options,o=new wP(u,c),r.setSource(o)),!o.inited){m.next=8;break}n.updateClusterData(r),r.log(Ho.SourceInitEnd,ps.INIT),m.next=10;break;case 8:return m.next=10,new Promise(function(_){o.on("update",function(b){b.type==="inited"&&(n.updateClusterData(r),r.log(Ho.SourceInitEnd,ps.INIT)),_(null)})});case 10:case"end":return m.stop()}},i)}))),r.hooks.beforeRenderData.tapPromise("DataSourcePlugin",Mt(he.mark(function i(){var o,a,u;return he.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return o=n.updateClusterData(r),a=r.dataState.dataSourceNeedUpdate,r.dataState.dataSourceNeedUpdate=!1,u=o||a,f.abrupt("return",u);case 5:case"end":return f.stop()}},i)})))}},{key:"updateClusterData",value:function(r){if(r.isTileLayer||r.tileLayer||!r.getSource())return!1;var n=r.getSource(),i=n.cluster,o=n.clusterOptions.zoom,a=o===void 0?0:o,u=this.mapService.getZoom()-1,c=r.dataState.dataSourceNeedUpdate;return i&&c&&n.updateClusterData(Math.floor(u)),i&&Math.abs(r.clusterZoom-u)>=1?(a!==Math.floor(u)&&n.updateClusterData(Math.floor(u)),r.clusterZoom=u,!0):!1}}]),e}())||DT);function lb(e,t){return et?1:e>=t?0:NaN}function XP(e){return e.length===1&&(e=t1e(e)),{left:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}function t1e(e){return function(t,r){return lb(e(t),r)}}var r1e=XP(lb),_y=r1e.right;function n1e(e){return e===null?NaN:+e}function FT(e,t){var r=e.length,n=-1,i,o,a;if(t==null){for(;++n=i)for(o=a=i;++ni&&(o=i),a=i)for(o=a=i;++ni&&(o=i),a0)return[e];if((n=t0)for(e=Math.ceil(e/u),t=Math.floor(t/u),a=new Array(o=Math.ceil(t-e+1));++i=0?(o>=Tx?10:o>=Cx?5:o>=Rx?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Tx?10:o>=Cx?5:o>=Rx?2:1)}function Ix(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),o=n/i;return o>=Tx?i*=10:o>=Cx?i*=5:o>=Rx&&(i*=2),t=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),a=+r(e[o],o,e),u=+r(e[o+1],o+1,e);return a+(u-a)*(i-o)}}function a1e(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}function o1e(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,u=nr&&(o=t.slice(r,o),u[a]?u[a]+=o:u[++a]=o),(n=n[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,c.push({i:a,x:u_(n,i)})),r=t6.lastIndex;return rr&&(n=t,t=r,r=n),function(i){return Math.max(t,Math.min(r,i))}}function S1e(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i2?A1e:S1e,c=f=null,_}function _(b){return isNaN(b=+b)?o:(c||(c=u(e.map(n),t,r)))(n(a(b)))}return _.invert=function(b){return a(i((f||(f=u(t,e.map(n),u_)))(b)))},_.domain=function(b){return arguments.length?(e=QP.call(b,E1e),a===ru||(a=zT(e)),m()):e.slice()},_.range=function(b){return arguments.length?(t=A1.call(b),m()):t.slice()},_.rangeRound=function(b){return t=A1.call(b),r=x1e,m()},_.clamp=function(b){return arguments.length?(a=b?zT(e):ru,_):a!==ru},_.interpolate=function(b){return arguments.length?(r=b,m()):r},_.unknown=function(b){return arguments.length?(o=b,_):o},function(b,A){return n=b,i=A,m()}}function JP(e,t){return hb()(e,t)}function T1e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function h_(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function h0(e){return e=h_(Math.abs(e)),e?e[1]:NaN}function w1e(e,t){return function(r,n){for(var i=r.length,o=[],a=0,u=e[0],c=0;i>0&&u>0&&(c+u+1>n&&(u=Math.max(1,n-c)),o.push(r.substring(i-=u,i+u)),!((c+=u+1)>n));)u=e[a=(a+1)%e.length];return o.reverse().join(t)}}function C1e(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var R1e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function p_(e){if(!(t=R1e.exec(e)))throw new Error("invalid format: "+e);var t;return new pb({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}p_.prototype=pb.prototype;function pb(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}pb.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function I1e(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var eO;function M1e(e,t){var r=h_(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(eO=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+h_(e,Math.max(0,t+o-1))[0]}function $T(e,t){var r=h_(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const VT={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:T1e,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return $T(e*100,t)},r:$T,s:M1e,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function jT(e){return e}var HT=Array.prototype.map,GT=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function P1e(e){var t=e.grouping===void 0||e.thousands===void 0?jT:w1e(HT.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?jT:C1e(HT.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"-":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function f(_){_=p_(_);var b=_.fill,A=_.align,w=_.sign,R=_.symbol,P=_.zero,k=_.width,L=_.comma,B=_.precision,V=_.trim,G=_.type;G==="n"?(L=!0,G="g"):VT[G]||(B===void 0&&(B=12),V=!0,G="g"),(P||b==="0"&&A==="=")&&(P=!0,b="0",A="=");var K=R==="$"?r:R==="#"&&/[boxX]/.test(G)?"0"+G.toLowerCase():"",Z=R==="$"?n:/[%p]/.test(G)?a:"",ve=VT[G],Ie=/[defgprs%]/.test(G);B=B===void 0?6:/[gprs]/.test(G)?Math.max(1,Math.min(21,B)):Math.max(0,Math.min(20,B));function de(se){var le=K,ye=Z,ke,Rt,Lt;if(G==="c")ye=ve(se)+ye,se="";else{se=+se;var Gt=se<0||1/se<0;if(se=isNaN(se)?c:ve(Math.abs(se),B),V&&(se=I1e(se)),Gt&&+se==0&&w!=="+"&&(Gt=!1),le=(Gt?w==="("?w:u:w==="-"||w==="("?"":w)+le,ye=(G==="s"?GT[8+eO/3]:"")+ye+(Gt&&w==="("?")":""),Ie){for(ke=-1,Rt=se.length;++keLt||Lt>57){ye=(Lt===46?i+se.slice(ke+1):se.slice(ke))+ye,se=se.slice(0,ke);break}}}L&&!P&&(se=t(se,1/0));var Zt=le.length+se.length+ye.length,st=Zt>1)+le+se+ye+st.slice(Zt);break;default:se=st+le+se+ye;break}return o(se)}return de.toString=function(){return _+""},de}function m(_,b){var A=f((_=p_(_),_.type="f",_)),w=Math.max(-8,Math.min(8,Math.floor(h0(b)/3)))*3,R=Math.pow(10,-w),P=GT[8+w/3];return function(k){return A(R*k)+P}}return{format:f,formatPrefix:m}}var ng,db,tO;O1e({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function O1e(e){return ng=P1e(e),db=ng.format,tO=ng.formatPrefix,ng}function k1e(e){return Math.max(0,-h0(Math.abs(e)))}function D1e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(h0(t)/3)))*3-h0(Math.abs(e)))}function F1e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,h0(t)-h0(e))+1}function B1e(e,t,r,n){var i=Ix(e,t,r),o;switch(n=p_(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=D1e(i,a))&&(n.precision=o),tO(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=F1e(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=k1e(i))&&(n.precision=o-(n.type==="%")*2);break}}return db(n)}function Km(e){var t=e.domain;return e.ticks=function(r){var n=t();return YP(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return B1e(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,a=n[i],u=n[o],c;return u0?(a=Math.floor(a/c)*c,u=Math.ceil(u/c)*c,c=Dg(a,u,r)):c<0&&(a=Math.ceil(a*c)/c,u=Math.floor(u*c)/c,c=Dg(a,u,r)),c>0?(n[i]=Math.floor(a/c)*c,n[o]=Math.ceil(u/c)*c,t(n)):c<0&&(n[i]=Math.ceil(a*c)/c,n[o]=Math.floor(u*c)/c,t(n)),e},e}function rO(){var e=JP(ru,ru);return e.copy=function(){return yy(e,rO())},Ap.apply(e,arguments),Km(e)}function nO(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],a;return o0){for(;bm)break;L.push(P)}}else for(;b=1;--R)if(P=w*R,!(Pm)break;L.push(P)}}else L=YP(b,A,Math.min(A-b,k)).map(o);return _?L.reverse():L},t.tickFormat=function(u,c){if(c==null&&(c=n===10?".0e":","),typeof c!="function"&&(c=db(c)),u===1/0)return c;u==null&&(u=10);var f=Math.max(1,n*u/t.ticks().length);return function(m){var _=m/o(Math.round(i(m)));return _*n0?r[u-1]:e[0],u=r?[n[r-1],t]:[n[f-1],n[f]]},a.unknown=function(c){return arguments.length&&(o=c),a},a.thresholds=function(){return n.slice()},a.copy=function(){return sO().domain([e,t]).range(i).unknown(o)},Ap.apply(Km(a),arguments)}function uO(){var e=[.5],t=[0,1],r,n=1;function i(o){return o<=o?t[_y(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=A1.call(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=A1.call(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return uO().domain(e).range(t).unknown(r)},Ap.apply(i,arguments)}var r6=new Date,n6=new Date;function _u(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),u=i.ceil(o);return o-a0))return c;do c.push(f=new Date(+o)),t(o,u),e(o);while(f=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,u){if(a>=a)if(u<0)for(;++u<=0;)for(;t(a,-1),!o(a););else for(;--u>=0;)for(;t(a,1),!o(a););})},r&&(i.count=function(o,a){return r6.setTime(+o),n6.setTime(+a),e(r6),e(n6),Math.floor(r(r6,n6))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?function(a){return n(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var d_=_u(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});d_.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?_u(function(t){t.setTime(Math.floor(t/e)*e)},function(t,r){t.setTime(+t+r*e)},function(t,r){return(r-t)/e}):d_};const W1e=d_;d_.range;var v_=1e3,km=6e4,qT=36e5,lO=864e5,cO=6048e5,fO=_u(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*v_)},function(e,t){return(t-e)/v_},function(e){return e.getUTCSeconds()});const X1e=fO;fO.range;var hO=_u(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*v_)},function(e,t){e.setTime(+e+t*km)},function(e,t){return(t-e)/km},function(e){return e.getMinutes()});const Y1e=hO;hO.range;var pO=_u(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*v_-e.getMinutes()*km)},function(e,t){e.setTime(+e+t*qT)},function(e,t){return(t-e)/qT},function(e){return e.getHours()});const Z1e=pO;pO.range;var dO=_u(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*km)/lO},function(e){return e.getDate()-1});const vb=dO;dO.range;function O1(e){return _u(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,r){t.setDate(t.getDate()+r*7)},function(t,r){return(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*km)/cO})}var mb=O1(0),m_=O1(1),q1e=O1(2),K1e=O1(3),p0=O1(4),Q1e=O1(5),J1e=O1(6);mb.range;m_.range;q1e.range;K1e.range;p0.range;Q1e.range;J1e.range;var vO=_u(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()});const ede=vO;vO.range;var gb=_u(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});gb.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:_u(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)})};const d0=gb;gb.range;var _b=_u(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/lO},function(e){return e.getUTCDate()-1});_b.range;function k1(e){return _u(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCDate(t.getUTCDate()+r*7)},function(t,r){return(r-t)/cO})}var mO=k1(0),g_=k1(1),tde=k1(2),rde=k1(3),v0=k1(4),nde=k1(5),ide=k1(6);mO.range;g_.range;tde.range;rde.range;v0.range;nde.range;ide.range;var T1=_u(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});T1.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:_u(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})};T1.range;function i6(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function a6(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Tv(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function ade(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,a=e.shortDays,u=e.months,c=e.shortMonths,f=wv(i),m=Cv(i),_=wv(o),b=Cv(o),A=wv(a),w=Cv(a),R=wv(u),P=Cv(u),k=wv(c),L=Cv(c),B={a:Gt,A:Zt,b:st,B:tt,c:null,d:rw,e:rw,f:Rde,g:Nde,G:zde,H:Tde,I:wde,j:Cde,L:gO,m:Ide,M:Mde,p:dt,q:nt,Q:aw,s:ow,S:Pde,u:Ode,U:kde,V:Dde,w:Fde,W:Bde,x:null,X:null,y:Lde,Y:Ude,Z:$de,"%":iw},V={a:pr,A:ur,b:Ar,B:Xn,c:null,d:nw,e:nw,f:Gde,g:t0e,G:n0e,H:Vde,I:jde,j:Hde,L:yO,m:Wde,M:Xde,p:pn,q:gi,Q:aw,s:ow,S:Yde,u:Zde,U:qde,V:Kde,w:Qde,W:Jde,x:null,X:null,y:e0e,Y:r0e,Z:i0e,"%":iw},G={a:de,A:se,b:le,B:ye,c:ke,d:ew,e:ew,f:bde,g:JT,G:QT,H:tw,I:tw,j:gde,L:xde,m:mde,M:_de,p:Ie,q:vde,Q:Sde,s:Ade,S:yde,u:cde,U:fde,V:hde,w:lde,W:pde,x:Rt,X:Lt,y:JT,Y:QT,Z:dde,"%":Ede};B.x=K(r,B),B.X=K(n,B),B.c=K(t,B),V.x=K(r,V),V.X=K(n,V),V.c=K(t,V);function K(Je,Qt){return function(Xr){var Ut=[],ge=-1,Be=0,ft=Je.length,At,bt,$t;for(Xr instanceof Date||(Xr=new Date(+Xr));++ge53)return null;"w"in Ut||(Ut.w=1),"Z"in Ut?(Be=a6(Tv(Ut.y,0,1)),ft=Be.getUTCDay(),Be=ft>4||ft===0?g_.ceil(Be):g_(Be),Be=_b.offset(Be,(Ut.V-1)*7),Ut.y=Be.getUTCFullYear(),Ut.m=Be.getUTCMonth(),Ut.d=Be.getUTCDate()+(Ut.w+6)%7):(Be=i6(Tv(Ut.y,0,1)),ft=Be.getDay(),Be=ft>4||ft===0?m_.ceil(Be):m_(Be),Be=vb.offset(Be,(Ut.V-1)*7),Ut.y=Be.getFullYear(),Ut.m=Be.getMonth(),Ut.d=Be.getDate()+(Ut.w+6)%7)}else("W"in Ut||"U"in Ut)&&("w"in Ut||(Ut.w="u"in Ut?Ut.u%7:"W"in Ut?1:0),ft="Z"in Ut?a6(Tv(Ut.y,0,1)).getUTCDay():i6(Tv(Ut.y,0,1)).getDay(),Ut.m=0,Ut.d="W"in Ut?(Ut.w+6)%7+Ut.W*7-(ft+5)%7:Ut.w+Ut.U*7-(ft+6)%7);return"Z"in Ut?(Ut.H+=Ut.Z/100|0,Ut.M+=Ut.Z%100,a6(Ut)):i6(Ut)}}function ve(Je,Qt,Xr,Ut){for(var ge=0,Be=Qt.length,ft=Xr.length,At,bt;ge=ft)return-1;if(At=Qt.charCodeAt(ge++),At===37){if(At=Qt.charAt(ge++),bt=G[At in KT?Qt.charAt(ge++):At],!bt||(Ut=bt(Je,Xr,Ut))<0)return-1}else if(At!=Xr.charCodeAt(Ut++))return-1}return Ut}function Ie(Je,Qt,Xr){var Ut=f.exec(Qt.slice(Xr));return Ut?(Je.p=m[Ut[0].toLowerCase()],Xr+Ut[0].length):-1}function de(Je,Qt,Xr){var Ut=A.exec(Qt.slice(Xr));return Ut?(Je.w=w[Ut[0].toLowerCase()],Xr+Ut[0].length):-1}function se(Je,Qt,Xr){var Ut=_.exec(Qt.slice(Xr));return Ut?(Je.w=b[Ut[0].toLowerCase()],Xr+Ut[0].length):-1}function le(Je,Qt,Xr){var Ut=k.exec(Qt.slice(Xr));return Ut?(Je.m=L[Ut[0].toLowerCase()],Xr+Ut[0].length):-1}function ye(Je,Qt,Xr){var Ut=R.exec(Qt.slice(Xr));return Ut?(Je.m=P[Ut[0].toLowerCase()],Xr+Ut[0].length):-1}function ke(Je,Qt,Xr){return ve(Je,t,Qt,Xr)}function Rt(Je,Qt,Xr){return ve(Je,r,Qt,Xr)}function Lt(Je,Qt,Xr){return ve(Je,n,Qt,Xr)}function Gt(Je){return a[Je.getDay()]}function Zt(Je){return o[Je.getDay()]}function st(Je){return c[Je.getMonth()]}function tt(Je){return u[Je.getMonth()]}function dt(Je){return i[+(Je.getHours()>=12)]}function nt(Je){return 1+~~(Je.getMonth()/3)}function pr(Je){return a[Je.getUTCDay()]}function ur(Je){return o[Je.getUTCDay()]}function Ar(Je){return c[Je.getUTCMonth()]}function Xn(Je){return u[Je.getUTCMonth()]}function pn(Je){return i[+(Je.getUTCHours()>=12)]}function gi(Je){return 1+~~(Je.getUTCMonth()/3)}return{format:function(Je){var Qt=K(Je+="",B);return Qt.toString=function(){return Je},Qt},parse:function(Je){var Qt=Z(Je+="",!1);return Qt.toString=function(){return Je},Qt},utcFormat:function(Je){var Qt=K(Je+="",V);return Qt.toString=function(){return Je},Qt},utcParse:function(Je){var Qt=Z(Je+="",!0);return Qt.toString=function(){return Je},Qt}}}var KT={"-":"",_:" ",0:"0"},ws=/^\s*\d+/,ode=/^%/,sde=/[\\^$*+?|[\]().{}]/g;function ca(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o68?1900:2e3),r+n[0].length):-1}function dde(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function vde(e,t,r){var n=ws.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function mde(e,t,r){var n=ws.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function ew(e,t,r){var n=ws.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function gde(e,t,r){var n=ws.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function tw(e,t,r){var n=ws.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function _de(e,t,r){var n=ws.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function yde(e,t,r){var n=ws.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function xde(e,t,r){var n=ws.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function bde(e,t,r){var n=ws.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Ede(e,t,r){var n=ode.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Sde(e,t,r){var n=ws.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Ade(e,t,r){var n=ws.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function rw(e,t){return ca(e.getDate(),t,2)}function Tde(e,t){return ca(e.getHours(),t,2)}function wde(e,t){return ca(e.getHours()%12||12,t,2)}function Cde(e,t){return ca(1+vb.count(d0(e),e),t,3)}function gO(e,t){return ca(e.getMilliseconds(),t,3)}function Rde(e,t){return gO(e,t)+"000"}function Ide(e,t){return ca(e.getMonth()+1,t,2)}function Mde(e,t){return ca(e.getMinutes(),t,2)}function Pde(e,t){return ca(e.getSeconds(),t,2)}function Ode(e){var t=e.getDay();return t===0?7:t}function kde(e,t){return ca(mb.count(d0(e)-1,e),t,2)}function _O(e){var t=e.getDay();return t>=4||t===0?p0(e):p0.ceil(e)}function Dde(e,t){return e=_O(e),ca(p0.count(d0(e),e)+(d0(e).getDay()===4),t,2)}function Fde(e){return e.getDay()}function Bde(e,t){return ca(m_.count(d0(e)-1,e),t,2)}function Lde(e,t){return ca(e.getFullYear()%100,t,2)}function Nde(e,t){return e=_O(e),ca(e.getFullYear()%100,t,2)}function Ude(e,t){return ca(e.getFullYear()%1e4,t,4)}function zde(e,t){var r=e.getDay();return e=r>=4||r===0?p0(e):p0.ceil(e),ca(e.getFullYear()%1e4,t,4)}function $de(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ca(t/60|0,"0",2)+ca(t%60,"0",2)}function nw(e,t){return ca(e.getUTCDate(),t,2)}function Vde(e,t){return ca(e.getUTCHours(),t,2)}function jde(e,t){return ca(e.getUTCHours()%12||12,t,2)}function Hde(e,t){return ca(1+_b.count(T1(e),e),t,3)}function yO(e,t){return ca(e.getUTCMilliseconds(),t,3)}function Gde(e,t){return yO(e,t)+"000"}function Wde(e,t){return ca(e.getUTCMonth()+1,t,2)}function Xde(e,t){return ca(e.getUTCMinutes(),t,2)}function Yde(e,t){return ca(e.getUTCSeconds(),t,2)}function Zde(e){var t=e.getUTCDay();return t===0?7:t}function qde(e,t){return ca(mO.count(T1(e)-1,e),t,2)}function xO(e){var t=e.getUTCDay();return t>=4||t===0?v0(e):v0.ceil(e)}function Kde(e,t){return e=xO(e),ca(v0.count(T1(e),e)+(T1(e).getUTCDay()===4),t,2)}function Qde(e){return e.getUTCDay()}function Jde(e,t){return ca(g_.count(T1(e)-1,e),t,2)}function e0e(e,t){return ca(e.getUTCFullYear()%100,t,2)}function t0e(e,t){return e=xO(e),ca(e.getUTCFullYear()%100,t,2)}function r0e(e,t){return ca(e.getUTCFullYear()%1e4,t,4)}function n0e(e,t){var r=e.getUTCDay();return e=r>=4||r===0?v0(e):v0.ceil(e),ca(e.getUTCFullYear()%1e4,t,4)}function i0e(){return"+0000"}function iw(){return"%"}function aw(e){return+e}function ow(e){return Math.floor(+e/1e3)}var Cd,bO;a0e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function a0e(e){return Cd=ade(e),bO=Cd.format,Cd.parse,Cd.utcFormat,Cd.utcParse,Cd}var Xv=1e3,Yv=Xv*60,Zv=Yv*60,Dm=Zv*24,o0e=Dm*7,sw=Dm*30,o6=Dm*365;function s0e(e){return new Date(e)}function u0e(e){return e instanceof Date?+e:+new Date(+e)}function EO(e,t,r,n,i,o,a,u,c){var f=JP(ru,ru),m=f.invert,_=f.domain,b=c(".%L"),A=c(":%S"),w=c("%I:%M"),R=c("%I %p"),P=c("%a %d"),k=c("%b %d"),L=c("%B"),B=c("%Y"),V=[[a,1,Xv],[a,5,5*Xv],[a,15,15*Xv],[a,30,30*Xv],[o,1,Yv],[o,5,5*Yv],[o,15,15*Yv],[o,30,30*Yv],[i,1,Zv],[i,3,3*Zv],[i,6,6*Zv],[i,12,12*Zv],[n,1,Dm],[n,2,2*Dm],[r,1,o0e],[t,1,sw],[t,3,3*sw],[e,1,o6]];function G(Z){return(a(Z)2){var _=f.scale.ticks(a.values.length);f.scale.domain(_)}a.values?f.scale.range(a.values):f.scale.range(f.option.domain);break;case pa.QUANTILE:case pa.QUANTIZE:case pa.THRESHOLD:f.scale.range(a.values);break;case pa.IDENTITY:break;case pa.CAT:a.values?f.scale.range(a.values):f.scale.range(f.option.domain);break;case pa.DIVERGING:case pa.SEQUENTIAL:f.scale.interpolator(f1e(a.values));break}}if(a.values==="text"){var b;f.scale.range((b=f.option)===null||b===void 0?void 0:b.domain)}})):(a.type=Ad.CONSTANT,a.defaultValues=c.map(function(f,m){return f.scale(a.names[m])})),a.scalers=c.map(function(f){return{field:f.field,func:f.scale,option:f.option}}),o.needRescale=!1}})}},{key:"parseFields",value:function(r){return Array.isArray(r)?r:h0e(r)?r.split("*"):[r]}},{key:"createScale",value:function(r,n,i,o){var a,u,c=this.scaleOptions[n]&&((a=this.scaleOptions[n])===null||a===void 0?void 0:a.field)===r?this.scaleOptions[n]:this.scaleOptions[r],f={field:r,scale:void 0,type:Ad.VARIABLE,option:c};if(!o||!o.length)return c&&c.type?f.scale=this.createDefaultScale(c):(f.scale=f_([r]),f.type=Ad.CONSTANT),f;var m=(u=o.find(function(A){return!s6(A[r])}))===null||u===void 0?void 0:u[r];if(this.isNumber(r)||s6(m)&&!c)f.scale=f_([r]),f.type=Ad.CONSTANT;else{var _=c&&c.type||this.getDefaultType(m);i==="text"&&(_=pa.CAT),i===void 0&&(_=pa.IDENTITY);var b=this.createScaleConfig(_,r,c,o);f.scale=this.createDefaultScale(b),f.option=b}return f}},{key:"getDefaultType",value:function(r){var n=pa.LINEAR;return typeof r=="string"&&(n=d0e.test(r)?pa.TIME:pa.CAT),n}},{key:"createScaleConfig",value:function(r,n,i,o){var a={type:r},u=[];if(r===pa.QUANTILE){var c=new Map;o==null||o.forEach(function(_){c.set(_._id,_[n])}),u=Array.from(c.values())}else u=(o==null?void 0:o.map(function(_){return _[n]}))||[];if(i!=null&&i.domain)a.domain=i==null?void 0:i.domain;else if(r===pa.CAT||r===pa.IDENTITY)a.domain=p0e(u);else if(r===pa.QUANTILE)a.domain=u;else if(r===pa.DIVERGING){var f=FT(u),m=(i==null?void 0:i.neutral)!==void 0?i==null?void 0:i.neutral:(f[0]+f[1])/2;a.domain=[f[0],m,f[1]]}else a.domain=FT(u);return Qe(Qe({},a),i)}},{key:"createDefaultScale",value:function(r){var n=r.type,i=r.domain,o=r.unknown,a=r.clamp,u=r.nice,c=v0e[n]();return i&&c.domain&&c.domain(i),o&&c.unknown(o),a!==void 0&&c.clamp&&c.clamp(a),u!==void 0&&c.nice&&c.nice(u),c}}]),e}())||lw),cw,fw,g0e=(cw=ai(),cw(fw=function(){function e(){Ht(this,e)}return jt(e,[{key:"apply",value:function(r){r.hooks.beforeRender.tap("LayerAnimateStylePlugin",function(){var n=r.animateStatus;n&&r.models.forEach(function(i){i.addUniforms(Qe({},r.layerModel.getAnimateUniforms()))})})}}]),e}())||fw),hw,pw,_0e=(hw=ai(),hw(pw=function(){function e(){Ht(this,e)}return jt(e,[{key:"apply",value:function(r){r.hooks.afterInit.tap("LayerMaskPlugin",function(){var n=r.getLayerConfig(),i=n.maskLayers,o=n.enableMask;if(!r.tileLayer&&i&&i.length>0){var a;(a=r.masks).push.apply(a,nr(i)),r.updateLayerConfig({mask:o})}})}}]),e}())||pw),y0e=function(){function e(t){var r=t.rendererService,n=t.layerService,i=t.parent;Ht(this,e),F(this,"tileResource",new Map),F(this,"layerTiles",[]),this.rendererService=r,this.layerService=n,this.parent=i}return jt(e,[{key:"tiles",get:function(){return this.layerTiles}},{key:"hasTile",value:function(r){return this.layerTiles.some(function(n){return n.key===r})}},{key:"addTile",value:function(r){this.layerTiles.push(r)}},{key:"getTile",value:function(r){return this.layerTiles.find(function(n){return n.key===r})}},{key:"getVisibleTileBylngLat",value:function(r){return this.layerTiles.find(function(n){return n.isLoaded&&n.visible&&n.lnglatInBounds(r)})}},{key:"removeTile",value:function(r){var n=this.layerTiles.findIndex(function(o){return o.key===r}),i=this.layerTiles.splice(n,1);i[0]&&i[0].destroy()}},{key:"updateTileVisible",value:function(r){var n=this.getTile(r.key);if(r.isVisible)if(r.parent){var i=this.isChildrenLoaded(r.parent);n==null||n.updateVisible(i)}else n==null||n.updateVisible(!0);else if(r.parent){var o=this.isChildrenLoaded(r.parent);n==null||n.updateVisible(!o)}else n==null||n.updateVisible(!1)}},{key:"isParentLoaded",value:function(r){var n=r.parent;if(!n)return!0;var i=this.getTile(n==null?void 0:n.key);return!!(i!=null&&i.isLoaded)}},{key:"isChildrenLoaded",value:function(r){var n=this,i=r==null?void 0:r.children;return i.length===0?!0:i.every(function(o){var a=n.getTile(o==null?void 0:o.key);return a?(a==null?void 0:a.isLoaded)===!0:!0})}},{key:"render",value:function(){var t=Mt(he.mark(function n(){var i=this,o,a;return he.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return o=this.getRenderLayers(),a=o.map(function(){var f=Mt(he.mark(function m(_){return he.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,i.layerService.renderTileLayer(_);case 2:case"end":return A.stop()}},m)}));return function(m){return f.apply(this,arguments)}}()),c.next=4,Promise.all(a);case 4:case"end":return c.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"getRenderLayers",value:function(){var r=this.layerTiles.filter(function(i){return i.visible&&i.isLoaded}),n=[];return r.map(function(i){return n.push.apply(n,nr(i.getLayers()))}),n}},{key:"getLayers",value:function(){var r=this.layerTiles.filter(function(i){return i.isLoaded}),n=[];return r.map(function(i){return n.push.apply(n,nr(i.getLayers()))}),n}},{key:"getTiles",value:function(){return this.layerTiles}},{key:"destroy",value:function(){this.layerTiles.forEach(function(r){return r.destroy()}),this.tileResource.clear()}}]),e}();/** * splaytree v3.1.2 * Fast Splay tree for Node and browser * * @author Alexander Milevski * @license MIT * @preserve *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */function x0e(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(f){return function(m){return c([f,m])}}function c(f){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=f[0]&2?i.return:f[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,f[1])).done)return o;switch(i=0,o&&(f=[f[0]&2,o.value]),f[0]){case 0:case 1:o=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,i=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]t?1:e0){if(t.right===null)break;if(r(e,t.right.key)>0){var u=t.right;if(t.right=u.left,u.left=t,t=u,t.right===null)break}i.right=t,i=t,t=t.right}else break}return i.right=t.left,o.left=t.right,t.left=n.right,t.right=n.left,t}function u6(e,t,r,n){var i=new Ep(e,t);if(r===null)return i.left=i.right=null,i;r=cp(e,r,n);var o=n(e,r.key);return o<0?(i.left=r.left,i.right=r,r.left=null):o>=0&&(i.right=r.right,i.left=r,r.right=null),i}function dw(e,t,r){var n=null,i=null;if(t){t=cp(e,t,r);var o=r(t.key,e);o===0?(n=t.left,i=t.right):o<0?(i=t.right,t.right=null,n=t):(n=t.left,t.left=null,i=t)}return{left:n,right:i}}function E0e(e,t,r){return t===null?e:(e===null||(t=cp(e.key,t,r),t.left=e),t)}function Ox(e,t,r,n,i){if(e){n(""+t+(r?"└── ":"├── ")+i(e)+` `);var o=t+(r?" ":"│ ");e.left&&Ox(e.left,o,!1,n,i),e.right&&Ox(e.right,o,!0,n,i)}}var yb=function(){function e(t){t===void 0&&(t=b0e),this._root=null,this._size=0,this._comparator=t}return e.prototype.insert=function(t,r){return this._size++,this._root=u6(t,r,this._root,this._comparator)},e.prototype.add=function(t,r){var n=new Ep(t,r);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var i=this._comparator,o=cp(t,this._root,i),a=i(t,o.key);return a===0?this._root=o:(a<0?(n.left=o.left,n.right=o,o.left=null):a>0&&(n.right=o.right,n.left=o,o.right=null),this._size++,this._root=n),this._root},e.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},e.prototype._remove=function(t,r,n){var i;if(r===null)return null;r=cp(t,r,n);var o=n(t,r.key);return o===0?(r.left===null?i=r.right:(i=cp(t,r.left,n),i.right=r.right),this._size--,i):r},e.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=cp(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},e.prototype.findStatic=function(t){for(var r=this._root,n=this._comparator;r;){var i=n(t,r.key);if(i===0)return r;i<0?r=r.left:r=r.right}return null},e.prototype.find=function(t){return this._root&&(this._root=cp(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},e.prototype.contains=function(t){for(var r=this._root,n=this._comparator;r;){var i=n(t,r.key);if(i===0)return!0;i<0?r=r.left:r=r.right}return!1},e.prototype.forEach=function(t,r){for(var n=this._root,i=[],o=!1;!o;)n!==null?(i.push(n),n=n.left):i.length!==0?(n=i.pop(),t.call(r,n),n=n.right):o=!0;return this},e.prototype.range=function(t,r,n,i){for(var o=[],a=this._comparator,u=this._root,c;o.length!==0||u;)if(u)o.push(u),u=u.left;else{if(u=o.pop(),c=a(u.key,r),c>0)break;if(a(u.key,t)>=0&&n.call(i,u))return this;u=u.right}return this},e.prototype.keys=function(){var t=[];return this.forEach(function(r){var n=r.key;return t.push(n)}),t},e.prototype.values=function(){var t=[];return this.forEach(function(r){var n=r.data;return t.push(n)}),t},e.prototype.min=function(){return this._root?this.minNode(this._root).key:null},e.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},e.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},e.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},e.prototype.at=function(t){for(var r=this._root,n=!1,i=0,o=[];!n;)if(r)o.push(r),r=r.left;else if(o.length>0){if(r=o.pop(),i===t)return r;i++,r=r.right}else n=!0;return null},e.prototype.next=function(t){var r=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var i=this._comparator;r;){var o=i(t.key,r.key);if(o===0)break;o<0?(n=r,r=r.left):r=r.right}return n},e.prototype.prev=function(t){var r=this._root,n=null;if(t.left!==null){for(n=t.left;n.right;)n=n.right;return n}for(var i=this._comparator;r;){var o=i(t.key,r.key);if(o===0)break;o<0?r=r.left:(n=r,r=r.right)}return n},e.prototype.clear=function(){return this._root=null,this._size=0,this},e.prototype.toList=function(){return A0e(this._root)},e.prototype.load=function(t,r,n){r===void 0&&(r=[]),n===void 0&&(n=!1);var i=t.length,o=this._comparator;if(n&&Fx(t,r,0,i-1,o),this._root===null)this._root=kx(t,r,0,i),this._size=i;else{var a=T0e(this.toList(),S0e(t,r),o);i=this._size+i,this._root=Dx({head:a},0,i)}return this},e.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),e.prototype.toString=function(t){t===void 0&&(t=function(n){return String(n.key)});var r=[];return Ox(this._root,"",!0,function(n){return r.push(n)},t),r.join("")},e.prototype.update=function(t,r,n){var i=this._comparator,o=dw(t,this._root,i),a=o.left,u=o.right;i(t,r)<0?u=u6(r,n,u,i):a=u6(r,n,a,i),this._root=E0e(a,u,i)},e.prototype.split=function(t){return dw(t,this._root,this._comparator)},e.prototype[Symbol.iterator]=function(){var t,r,n;return x0e(this,function(i){switch(i.label){case 0:t=this._root,r=[],n=!1,i.label=1;case 1:return n?[3,6]:t===null?[3,2]:(r.push(t),t=t.left,[3,5]);case 2:return r.length===0?[3,4]:(t=r.pop(),[4,t]);case 3:return i.sent(),t=t.right,[3,5];case 4:n=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},e}();function kx(e,t,r,n){var i=n-r;if(i>0){var o=r+Math.floor(i/2),a=e[o],u=t[o],c=new Ep(a,u);return c.left=kx(e,t,r,o),c.right=kx(e,t,o+1,n),c}return null}function S0e(e,t){for(var r=new Ep(null,null),n=r,i=0;i0?(t=o=o.next=r.pop(),t=t.right):n=!0;return o.next=null,i.next}function Dx(e,t,r){var n=r-t;if(n>0){var i=t+Math.floor(n/2),o=Dx(e,t,i),a=e.head;return a.left=o,e.head=e.head.next,a.right=Dx(e,i+1,r),a}return null}function T0e(e,t,r){for(var n=new Ep(null,null),i=n,o=e,a=t;o!==null&&a!==null;)r(o.key,a.key)<0?(i.next=o,o=o.next):(i.next=a,a=a.next),i=i.next;return o!==null?i.next=o:a!==null&&(i.next=a),n.next}function Fx(e,t,r,n,i){if(!(r>=n)){for(var o=e[r+n>>1],a=r-1,u=n+1;;){do a++;while(i(e[a],o)<0);do u--;while(i(e[u],o)>0);if(a>=u)break;var c=e[a];e[a]=e[u],e[u]=c,c=t[a],t[a]=t[u],t[u]=c}Fx(e,t,r,u,i),Fx(e,t,u+1,n,i)}}const oh=11102230246251565e-32,Qs=134217729,w0e=(3+8*oh)*oh;function l6(e,t,r,n,i){let o,a,u,c,f=t[0],m=n[0],_=0,b=0;m>f==m>-f?(o=f,f=t[++_]):(o=m,m=n[++b]);let A=0;if(_f==m>-f?(a=f+o,u=o-(a-f),f=t[++_]):(a=m+o,u=o-(a-m),m=n[++b]),o=a,u!==0&&(i[A++]=u);_f==m>-f?(a=o+f,c=a-o,u=o-(a-c)+(f-c),f=t[++_]):(a=o+m,c=a-o,u=o-(a-c)+(m-c),m=n[++b]),o=a,u!==0&&(i[A++]=u);for(;_=ke||-ye>=ke||(_=e-Ie,u=e-(Ie+_)+(_-i),_=r-de,f=r-(de+_)+(_-i),_=t-se,c=t-(se+_)+(_-o),_=n-le,m=n-(le+_)+(_-o),u===0&&c===0&&f===0&&m===0)||(ke=M0e*a+w0e*Math.abs(ye),ye+=Ie*m+le*u-(se*f+de*c),ye>=ke||-ye>=ke))return ye;V=u*le,b=Qs*u,A=b-(b-u),w=u-A,b=Qs*le,R=b-(b-le),P=le-R,G=w*P-(V-A*R-w*R-A*P),K=c*de,b=Qs*c,A=b-(b-c),w=c-A,b=Qs*de,R=b-(b-de),P=de-R,Z=w*P-(K-A*R-w*R-A*P),k=G-Z,_=G-k,hu[0]=G-(k+_)+(_-Z),L=V+k,_=L-V,B=V-(L-_)+(k-_),k=B-K,_=B-k,hu[1]=B-(k+_)+(_-K),ve=L+k,_=ve-L,hu[2]=L-(ve-_)+(k-_),hu[3]=ve;const Rt=l6(4,Rd,4,hu,vw);V=Ie*m,b=Qs*Ie,A=b-(b-Ie),w=Ie-A,b=Qs*m,R=b-(b-m),P=m-R,G=w*P-(V-A*R-w*R-A*P),K=se*f,b=Qs*se,A=b-(b-se),w=se-A,b=Qs*f,R=b-(b-f),P=f-R,Z=w*P-(K-A*R-w*R-A*P),k=G-Z,_=G-k,hu[0]=G-(k+_)+(_-Z),L=V+k,_=L-V,B=V-(L-_)+(k-_),k=B-K,_=B-k,hu[1]=B-(k+_)+(_-K),ve=L+k,_=ve-L,hu[2]=L-(ve-_)+(k-_),hu[3]=ve;const Lt=l6(Rt,vw,4,hu,mw);V=u*m,b=Qs*u,A=b-(b-u),w=u-A,b=Qs*m,R=b-(b-m),P=m-R,G=w*P-(V-A*R-w*R-A*P),K=c*f,b=Qs*c,A=b-(b-c),w=c-A,b=Qs*f,R=b-(b-f),P=f-R,Z=w*P-(K-A*R-w*R-A*P),k=G-Z,_=G-k,hu[0]=G-(k+_)+(_-Z),L=V+k,_=L-V,B=V-(L-_)+(k-_),k=B-K,_=B-k,hu[1]=B-(k+_)+(_-K),ve=L+k,_=ve-L,hu[2]=L-(ve-_)+(k-_),hu[3]=ve;const Gt=l6(Lt,mw,4,hu,gw);return gw[Gt-1]}function O0e(e,t,r,n,i,o){const a=(t-o)*(r-i),u=(e-i)*(n-o),c=a-u,f=Math.abs(a+u);return Math.abs(c)>=R0e*f?c:-P0e(e,t,r,n,i,o,f)}var CO={};const Rv=(e,t)=>e.ll.x<=t.x&&t.x<=e.ur.x&&e.ll.y<=t.y&&t.y<=e.ur.y,Bx=(e,t)=>{if(t.ur.x{if(-fpe.x*t.y-e.y*t.x,RO=(e,t)=>e.x*t.x+e.y*t.y,xw=(e,t,r)=>{const n=O0e(e.x,e.y,t.x,t.y,r.x,r.y);return n>0?-1:n<0?1:0},__=e=>Math.sqrt(RO(e,e)),F0e=(e,t,r)=>{const n={x:t.x-e.x,y:t.y-e.y},i={x:r.x-e.x,y:r.y-e.y};return Fg(i,n)/__(i)/__(n)},B0e=(e,t,r)=>{const n={x:t.x-e.x,y:t.y-e.y},i={x:r.x-e.x,y:r.y-e.y};return RO(i,n)/__(i)/__(n)},bw=(e,t,r)=>t.y===0?null:{x:e.x+t.x/t.y*(r-e.y),y:r},Ew=(e,t,r)=>t.x===0?null:{x:r,y:e.y+t.y/t.x*(r-e.x)},L0e=(e,t,r,n)=>{if(t.x===0)return Ew(r,n,e.x);if(n.x===0)return Ew(e,t,r.x);if(t.y===0)return bw(r,n,e.y);if(n.y===0)return bw(e,t,r.y);const i=Fg(t,n);if(i==0)return null;const o={x:r.x-e.x,y:r.y-e.y},a=Fg(o,t)/i,u=Fg(o,n)/i,c=e.x+u*t.x,f=r.x+a*n.x,m=e.y+u*t.y,_=r.y+a*n.y,b=(c+f)/2,A=(m+_)/2;return{x:b,y:A}};class Hl{static compare(t,r){const n=Hl.comparePoints(t.point,r.point);return n!==0?n:(t.point!==r.point&&t.link(r),t.isLeft!==r.isLeft?t.isLeft?1:-1:_p.compare(t.segment,r.segment))}static comparePoints(t,r){return t.xr.x?1:t.yr.y?1:0}constructor(t,r){t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=r}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");const r=t.point.events;for(let n=0,i=r.length;n{const o=i.otherSE;r.set(i,{sine:F0e(this.point,t.point,o.point),cosine:B0e(this.point,t.point,o.point)})};return(i,o)=>{r.has(i)||n(i),r.has(o)||n(o);const{sine:a,cosine:u}=r.get(i),{sine:c,cosine:f}=r.get(o);return a>=0&&c>=0?uf?-1:0:a<0&&c<0?uf?1:0:ca?1:0}}}let N0e=0;class _p{static compare(t,r){const n=t.leftSE.point.x,i=r.leftSE.point.x,o=t.rightSE.point.x,a=r.rightSE.point.x;if(au&&c>f)return-1;const _=t.comparePoint(r.leftSE.point);if(_<0)return 1;if(_>0)return-1;const b=r.comparePoint(t.rightSE.point);return b!==0?b:-1}if(n>i){if(uc&&u>m)return 1;const _=r.comparePoint(t.leftSE.point);if(_!==0)return _;const b=t.comparePoint(r.rightSE.point);return b<0?1:b>0?-1:1}if(uc)return 1;if(oa){const _=t.comparePoint(r.rightSE.point);if(_<0)return 1;if(_>0)return-1}if(o!==a){const _=f-u,b=o-n,A=m-c,w=a-i;if(_>b&&Aw)return-1}return o>a?1:om?1:t.idr.id?1:0}constructor(t,r,n,i){this.id=++N0e,this.leftSE=t,t.segment=this,t.otherSE=r,this.rightSE=r,r.segment=this,r.otherSE=t,this.rings=n,this.windings=i}static fromRing(t,r,n){let i,o,a;const u=Hl.comparePoints(t,r);if(u<0)i=t,o=r,a=1;else if(u>0)i=r,o=t,a=-1;else throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);const c=new Hl(i,!0),f=new Hl(o,!1);return new _p(c,f,[n],[a])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const t=this.leftSE.point.y,r=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:tr?t:r}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}comparePoint(t){if(this.isAnEndpoint(t))return 0;const r=this.leftSE.point,n=this.rightSE.point,i=this.vector();if(r.x===n.x)return t.x===r.x?0:t.x0&&u.swapEvents(),Hl.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),o.checkForConsuming()),r}swapEvents(){const t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let r=0,n=this.windings.length;r0){const o=r;r=n,n=o}if(r.prev===n){const o=r;r=n,n=o}for(let o=0,a=n.rings.length;oi.length===1&&i[0].isSubject;this._isInResult=n(t)!==n(r);break}default:throw new Error(`Unrecognized operation type found ${yc.type}`)}return this._isInResult}}class Sw{constructor(t,r,n){if(!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=r,this.isExterior=n,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const i=Fm.round(t[0][0],t[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};let o=i;for(let a=1,u=t.length;athis.bbox.ur.x&&(this.bbox.ur.x=c.x),c.y>this.bbox.ur.y&&(this.bbox.ur.y=c.y),o=c)}(i.x!==o.x||i.y!==o.y)&&this.segments.push(_p.fromRing(o,i,this))}getSweepEvents(){const t=[];for(let r=0,n=this.segments.length;rthis.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=r}getSweepEvents(){const t=this.exteriorRing.getSweepEvents();for(let r=0,n=this.interiorRings.length;rthis.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=r}getSweepEvents(){const t=[];for(let r=0,n=this.polys.length;r0&&(t=a)}let r=t.segment.prevInResult(),n=r?r.prevInResult():null;for(;;){if(!r)return null;if(!n)return r.ringOut;if(n.ringOut!==r.ringOut)return n.ringOut.enclosingRing()!==r.ringOut?r.ringOut:r.ringOut.enclosingRing();r=n.prevInResult(),n=r?r.prevInResult():null}}}class Tw{constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){const t=[this.exteriorRing.getGeom()];if(t[0]===null)return null;for(let r=0,n=this.interiorRings.length;r1&&arguments[1]!==void 0?arguments[1]:_p.compare;this.queue=t,this.tree=new yb(r),this.segments=[]}process(t){const r=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(r),n;const i=t.isLeft?this.tree.add(r):this.tree.find(r);if(!i)throw new Error(`Unable to find segment #${r.id} [${r.leftSE.point.x}, ${r.leftSE.point.y}] -> [${r.rightSE.point.x}, ${r.rightSE.point.y}] in SweepLine tree.`);let o=i,a=i,u,c;for(;u===void 0;)o=this.tree.prev(o),o===null?u=null:o.key.consumedBy===void 0&&(u=o.key);for(;c===void 0;)a=this.tree.next(a),a===null?c=null:a.key.consumedBy===void 0&&(c=a.key);if(t.isLeft){let f=null;if(u){const _=u.getIntersection(r);if(_!==null&&(r.isAnEndpoint(_)||(f=_),!u.isAnEndpoint(_))){const b=this._splitSafely(u,_);for(let A=0,w=b.length;A0?(this.tree.remove(r),n.push(t)):(this.segments.push(r),r.prev=u)}else{if(u&&c){const f=u.getIntersection(c);if(f!==null){if(!u.isAnEndpoint(f)){const m=this._splitSafely(u,f);for(let _=0,b=m.length;_ww)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const a=new $0e(o);let u=o.size,c=o.pop();for(;c;){const _=c.key;if(o.size===u){const A=_.segment;throw new Error(`Unable to pop() ${_.isLeft?"left":"right"} SweepEvent [${_.point.x}, ${_.point.y}] from segment #${A.id} [${A.leftSE.point.x}, ${A.leftSE.point.y}] -> [${A.rightSE.point.x}, ${A.rightSE.point.y}] from queue.`)}if(o.size>ww)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(a.segments.length>V0e)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const b=a.process(_);for(let A=0,w=b.length;A1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var D1=function(e){_n(r,e);var t=eve(r);function r(n,i){var o;return Ht(this,r),o=t.call(this),F($e(o),"visible",!0),F($e(o),"layers",[]),F($e(o),"isLoaded",!1),F($e(o),"tileMaskLayers",[]),o.parent=i,o.sourceTile=n,o.x=n.x,o.y=n.y,o.z=n.z,o.key="".concat(o.x,"_").concat(o.y,"_").concat(o.z),o}return jt(r,[{key:"getLayers",value:function(){return this.layers}},{key:"styleUpdate",value:function(){}},{key:"lnglatInBounds",value:function(i){var o=Nn(this.sourceTile.bounds,4),a=o[0],u=o[1],c=o[2],f=o[3],m=i.lng,_=i.lat;return m>=a&&m<=c&&_>=u&&_<=f}},{key:"getLayerOptions",value:function(){var i,o=this.parent.getLayerConfig();return Qe(Qe({},o),{},{textAllowOverlap:!0,autoFit:!1,maskLayers:this.getMaskLayer(),tileMask:J0e(this.parent.type),mask:o.mask||((i=o.maskLayers)===null||i===void 0?void 0:i.length)!==0&&o.enableMask})}},{key:"getMaskLayer",value:function(){var i=this,o=this.parent.getLayerConfig(),a=o.maskLayers,u=[];return a==null||a.forEach(function(c){if(!c.tileLayer)return u.push(c),c;var f=c.tileLayer,m=f.getTile(i.sourceTile.key),_=m==null?void 0:m.getLayers()[0];_&&u.push(_)}),u}},{key:"addTileMask",value:function(){var n=Mt(he.mark(function o(){var a,u,c;return he.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return a=new s_({name:"mask",visible:!0,enablePicking:!1}).source({type:"FeatureCollection",features:[this.sourceTile.bboxPolygon]},{parser:{type:"geojson",featureId:"id"}}).shape("fill").color("#0f0").style({opacity:.5}),u=om(this.parent.sceneContainer),a.setContainer(u,this.parent.sceneContainer),m.next=5,a.init();case 5:return this.tileMask=a,c=this.getMainLayer(),c!==void 0&&(c.tileMask=a),m.abrupt("return",a);case 9:case"end":return m.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"addMask",value:function(){var n=Mt(he.mark(function o(a,u){var c;return he.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return c=om(this.parent.sceneContainer),u.setContainer(c,this.parent.sceneContainer),m.next=4,u.init();case 4:a.addMask(u),this.tileMaskLayers.push(u);case 6:case"end":return m.stop()}},o,this)}));function i(o,a){return n.apply(this,arguments)}return i}()},{key:"addLayer",value:function(){var n=Mt(he.mark(function o(a){var u;return he.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return a.isTileLayer=!0,u=om(this.parent.sceneContainer),a.setContainer(u,this.parent.sceneContainer),this.layers.push(a),f.next=6,a.init();case 6:case"end":return f.stop()}},o,this)}));function i(o){return n.apply(this,arguments)}return i}()},{key:"updateVisible",value:function(i){this.visible=i,this.updateOptions("visible",i)}},{key:"updateOptions",value:function(i,o){this.layers.forEach(function(a){a.updateLayerConfig(F({},i,o))})}},{key:"getMainLayer",value:function(){return this.layers[0]}},{key:"getFeatures",value:function(i){return[]}},{key:"getFeatureById",value:function(i){return[]}},{key:"destroy",value:function(){var i;(i=this.tileMask)===null||i===void 0||i.destroy(),this.layers.forEach(function(o){return o.destroy()})}}]),r}(ju.EventEmitter);function rve(e){var t=nve();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function nve(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ive=function(e){_n(r,e);var t=rve(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"initTileLayer",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f;return he.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return a=this.getSourceOption(),u=a.data.features[0].properties,c=new sb().source(a.data,a.options).size(1).shape("line").color("red"),f=new Om({minZoom:this.z-1,maxZoom:this.z+1,textAllowOverlap:!0}).source([u],{parser:{type:"json",x:"x",y:"y"}}).size(20).color("red").shape(this.key).style({stroke:"#fff",strokeWidth:2}),_.next=6,this.addLayer(c);case 6:return _.next=8,this.addLayer(f);case 8:this.isLoaded=!0;case 9:case"end":return _.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"getSourceOption",value:function(){var i=this.parent.getSource(),o=this.sourceTile.data.layers.testTile.features;return{data:{type:"FeatureCollection",features:o},options:{parser:{type:"geojson"},transforms:i.transforms}}}}]),r}(D1);function ave(e){var t=ove();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function ove(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var sve=function(e){_n(r,e);var t=ave(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"initTileLayer",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f;return he.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return a=this.parent.getLayerAttributeConfig(),u=this.getLayerOptions(),c=this.getSourceOption(),f=new $ce(Qe({},u)).source(c.data,c.options),a&&Object.keys(a).forEach(function(b){var A,w,R=b;f[R]((A=a[R])===null||A===void 0?void 0:A.field,(w=a[R])===null||w===void 0?void 0:w.values)}),_.next=7,this.addLayer(f);case 7:this.isLoaded=!0;case 8:case"end":return _.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"getSourceOption",value:function(){var i=this.parent.getSource();return{data:this.sourceTile.data,options:{parser:{type:"image",extent:this.sourceTile.bounds},transforms:i.transforms}}}}]),r}(D1);function uve(e){var t=lve();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function lve(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var cve=function(e){_n(r,e);var t=uve(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"initTileLayer",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f;return he.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return a=this.parent.getLayerAttributeConfig(),u=this.getLayerOptions(),c=this.getSourceOption(),f=new WP(Qe({},u)).source(c.data,c.options),a&&Object.keys(a).forEach(function(b){var A,w,R=b;f[R]((A=a[R])===null||A===void 0?void 0:A.field,(w=a[R])===null||w===void 0?void 0:w.values)}),_.next=7,this.addLayer(f);case 7:this.isLoaded=!0;case 8:case"end":return _.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"getFeatures",value:function(i){if(!i)return[];var o=this.sourceTile.data;return o.getTileData(i)}},{key:"getSourceOption",value:function(){var i=this.parent.getSource(),o=this.parent.getLayerConfig(),a=o.sourceLayer,u=o.featureId,c=this.getFeatures(a);return{data:{type:"FeatureCollection",features:c},options:{parser:{type:"geojson",featureId:u},transforms:i.transforms}}}}]),r}(D1),fve=["rasterData"];function hve(e){var t=pve();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function pve(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var dve=function(e){_n(r,e);var t=hve(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"initTileLayer",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f;return he.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return a=this.parent.getLayerAttributeConfig(),u=this.getLayerOptions(),c=this.getSourceOption(),f=new ub(Qe({},u)).source(c.data,c.options),a&&Object.keys(a).forEach(function(b){var A,w,R=b;f[R]((A=a[R])===null||A===void 0?void 0:A.field,(w=a[R])===null||w===void 0?void 0:w.values)}),_.next=7,this.addLayer(f);case 7:this.isLoaded=!0;case 8:case"end":return _.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"getSourceOption",value:function(){var i=this.parent.getSource(),o=this.sourceTile.data.data,a=o.rasterData,u=hl(o,fve);return{data:a,options:{parser:Qe({type:"rasterRgb",extent:this.sourceTile.bounds},u),transforms:i.transforms}}}}]),r}(D1);function vve(e){var t=mve();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function mve(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var gve=function(e){_n(r,e);var t=vve(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"initTileLayer",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f;return he.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return a=this.parent.getLayerAttributeConfig(),u=this.getLayerOptions(),c=this.getSourceOption(),f=new ub(Qe({},u)).source(c.data,c.options),a&&Object.keys(a).forEach(function(b){var A,w,R=b;f[R]((A=a[R])===null||A===void 0?void 0:A.field,(w=a[R])===null||w===void 0?void 0:w.values)}),_.next=7,this.addLayer(f);case 7:this.isLoaded=!0;case 8:case"end":return _.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"getSourceOption",value:function(){var i=this.parent.getSource();return{data:this.sourceTile.data,options:{parser:{type:"image",extent:this.sourceTile.bounds},transforms:i.transforms}}}}]),r}(D1),_ve=["rasterData"];function yve(e){var t=xve();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function xve(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var bve={positions:[0,1],colors:["#000","#fff"]},Eve=function(e){_n(r,e);var t=yve(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"initTileLayer",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f,m,_,b;return he.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return a=this.parent.getLayerAttributeConfig(),u=this.getLayerOptions(),c=this.getSourceOption(),f=this.getLayerOptions(),m=f.rampColors,_=f.domain,this.colorTexture=this.parent.textureService.getColorTexture(m,_),b=new ub(Qe(Qe({},u),{},{colorTexture:this.colorTexture})).source(c.data,c.options),a&&Object.keys(a).forEach(function(R){var P,k,L=R;b[L]((P=a[L])===null||P===void 0?void 0:P.field,(k=a[L])===null||k===void 0?void 0:k.values)}),w.next=9,this.addLayer(b);case 9:this.isLoaded=!0;case 10:case"end":return w.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"getSourceOption",value:function(){var i=this.parent.getSource(),o=this.sourceTile.data.data,a=o.rasterData,u=hl(o,_ve);return{data:a,options:{parser:Qe({type:"raster",extent:this.sourceTile.bounds},u),transforms:i.transforms}}}},{key:"styleUpdate",value:function(){for(var i=this,o=arguments.length,a=new Array(o),u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ig=function(e){_n(r,e);var t=Sve(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"initTileLayer",value:function(){var n=Mt(he.mark(function o(){var a,u,c,f,m;return he.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(a=this.parent.getLayerAttributeConfig(),u=this.getLayerOptions(),c=Q0e(this.parent.type),f=this.getSourceOption(),f){b.next=8;break}return this.isLoaded=!0,this.emit("loaded"),b.abrupt("return");case 8:return m=new c(Qe({},u)).source(f.data,f.options),Object.keys(a).forEach(function(A){var w,R,P=A;m[P]((w=a[P])===null||w===void 0?void 0:w.field,(R=a[P])===null||R===void 0?void 0:R.values)}),b.next=12,this.addLayer(m);case 12:if(!u.tileMask){b.next=15;break}return b.next=15,this.addTileMask();case 15:this.setLayerMinMaxZoom(m),this.isLoaded=!0,this.emit("loaded");case 18:case"end":return b.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"getSourceOption",value:function(){var i=this.parent.getSource(),o=this.parent.getLayerConfig(),a=o.sourceLayer,u=a===void 0?"defaultLayer":a,c=o.featureId,f=c===void 0?"id":c,m=this.getFeatures(u);return{data:{type:"FeatureCollection",features:m},options:{parser:{type:"geojson",featureId:f},transforms:i.transforms}}}},{key:"setLayerMinMaxZoom",value:function(i){i.getModelType()==="text"&&i.updateLayerConfig({maxZoom:this.z+1,minZoom:this.z-1})}},{key:"getFeatures",value:function(i){var o=this.sourceTile.data;return o.getTileData(i)}},{key:"getFeatureById",value:function(i){var o=this.getMainLayer();if(!o)return[];var a=o.getSource().data.dataArray.filter(function(u){return u._id===i});return a}}]),r}(D1);function Tve(e){var t=e.type;switch(t){case"PolygonLayer":return ig;case"LineLayer":return ig;case"PointLayer":return ig;case"TileDebugLayer":return ive;case"MaskLayer":return cve;case"RasterLayer":var r=e.getSource().parser.dataType;switch(r){case Ns.RGB:case Ns.CUSTOMRGB:return dve;case Ns.ARRAYBUFFER:case Ns.CUSTOMARRAYBUFFER:return Eve;case Ns.TERRAINRGB:case Ns.CUSTOMTERRAINRGB:return gve;default:return sve}default:return ig}}var wve=["shape","color","size","style","animate","filter","rotate","scale","setBlend","setSelect","setActive","disableMask","enableMask","addMask","removeMask"],Cve=Ci.debounce,Cw=function(){function e(t){var r=this;Ht(this,e),F(this,"initedTileset",!1),F(this,"mapchange",function(){var i;if(r.parent.isVisible()!==!1){var o=r.getCurrentView(),a=o.latLonBounds,u=o.zoom;if(r.mapService.version==="GAODE1.x"){var c=r.parent.getLayerConfig(),f=c.visible;u<2&&f?(r.parent.updateLayerConfig({visible:!1}),r.layerService.reRender()):u>=2&&!f&&(r.parent.updateLayerConfig({visible:!0}),r.layerService.reRender())}r.lastViewStates&&r.lastViewStates.zoom===u&&r.lastViewStates.latLonBounds.toString()===a.toString()||(r.lastViewStates={zoom:u,latLonBounds:a},(i=r.tilesetManager)===null||i===void 0||i.throttleUpdate(u,a))}}),F(this,"viewchange",Cve(this.mapchange,24)),this.parent=t;var n=this.parent.getContainer();this.rendererService=n.get(wt.IRendererService),this.layerService=n.get(wt.ILayerService),this.mapService=n.get(wt.IMapService),this.pickingService=n.get(wt.IPickingService),this.tileLayerService=new y0e({rendererService:this.rendererService,layerService:this.layerService,parent:t}),this.tilePickService=new K0e({tileLayerService:this.tileLayerService,layerService:this.layerService,parent:t}),this.parent.setLayerPickService(this.tilePickService),this.proxy(t),this.initTileSetManager()}return jt(e,[{key:"initTileSetManager",value:function(){var r,n=this.parent.getSource();if(this.tilesetManager=n.tileset,this.initedTileset||(this.bindTilesetEvent(),this.initedTileset=!0),this.parent.isVisible()!==!1){var i=this.getCurrentView(),o=i.latLonBounds,a=i.zoom;(r=this.tilesetManager)===null||r===void 0||r.update(a,o)}}},{key:"getCurrentView",value:function(){var r=this.mapService.getBounds(),n=[r[0][0],r[0][1],r[1][0],r[1][1]],i=this.mapService.getZoom();return{latLonBounds:n,zoom:i}}},{key:"bindTilesetEvent",value:function(){var r=this;this.tilesetManager.on("tile-loaded",function(n){}),this.tilesetManager.on("tile-unload",function(n){r.tileUnLoad(n)}),this.tilesetManager.on("tile-error",function(n,i){r.tileError(n)}),this.tilesetManager.on("tile-update",function(){r.tileUpdate()}),this.mapService.on("zoomend",this.mapchange),this.mapService.on("moveend",this.viewchange)}},{key:"render",value:function(){this.tileLayerService.render()}},{key:"getLayers",value:function(){return this.tileLayerService.getLayers()}},{key:"getTiles",value:function(){return this.tileLayerService.getTiles()}},{key:"getTile",value:function(r){return this.tileLayerService.getTile(r)}},{key:"tileLoaded",value:function(r){}},{key:"tileError",value:function(r){console.warn("error:",r)}},{key:"destroy",value:function(){var r;this.mapService.off("zoomend",this.mapchange),this.mapService.off("moveend",this.viewchange),(r=this.tilesetManager)===null||r===void 0||r.destroy(),this.tileLayerService.destroy()}},{key:"reload",value:function(){var r;this.tilesetManager.clear();var n=this.getCurrentView(),i=n.latLonBounds,o=n.zoom;(r=this.tilesetManager)===null||r===void 0||r.update(o,i)}},{key:"tileUnLoad",value:function(r){this.tileLayerService.removeTile(r.key)}},{key:"tileUpdate",value:function(){var t=Mt(he.mark(function n(){var i=this,o,a,u;return he.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(this.tilesetManager){f.next=2;break}return f.abrupt("return");case 2:return o=this.parent.getMinZoom(),a=this.parent.getMaxZoom(),u=this.tilesetManager.tiles.filter(function(m){return m.isLoaded}).filter(function(m){return m.isVisibleChange}).filter(function(m){return m.data}).filter(function(m){return m.z>=o&&m.z * + * { margin-left: 6px; } .l7-select-control--normal .l7-select-control-item input[type='checkbox'] { width: 14px; height: 14px; } .l7-select-control--normal .l7-select-control-item:hover { background-color: #f3f3f3; } .l7-select-control--image { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; -webkit-box-sizing: content-box; box-sizing: content-box; max-width: 460px; max-height: 400px; margin: 12px 0 0 12px; overflow-x: hidden; overflow-y: auto; } .l7-select-control--image .l7-select-control-item { position: relative; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-flex: 0; -ms-flex: 0 0 calc((100% - (12px + 9px) * 2) / 3); flex: 0 0 calc((100% - (12px + 9px) * 2) / 3); -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-sizing: content-box; box-sizing: content-box; margin-right: 12px; margin-bottom: 12px; overflow: hidden; font-size: 12px; border: 1px solid #fff; border-radius: 2px; } .l7-select-control--image .l7-select-control-item img { width: 100%; height: 80px; } .l7-select-control--image .l7-select-control-item input[type='checkbox'] { position: absolute; top: 0; right: 0; } .l7-select-control--image .l7-select-control-item input[type='radio'] { position: absolute; top: 0; right: 0; } .l7-select-control--image .l7-select-control-item .l7-select-control-item-row { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; line-height: 26px; } .l7-select-control--image .l7-select-control-item .l7-select-control-item-row > * + * { margin-left: 8px; } .l7-select-control--image .l7-select-control-item.l7-select-control-item-active { border-color: #0370fe; } .l7-select-control-item { cursor: pointer; } .l7-select-control-item input[type='checkbox'] { margin: 0; cursor: pointer; } .l7-select-control--multiple .l7-select-control-item:hover { background-color: transparent; } .l7-control-logo { width: 89px; height: 16px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .l7-control-logo img { height: 100%; width: 100%; } .l7-control-logo .l7-control-logo-link { display: block; cursor: pointer; } .l7-control-logo .l7-control-logo-link img { cursor: pointer; } .l7-control-mouse-location { background-color: #fff; border-radius: 2px; -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15); box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15); padding: 2px 4px; min-width: 130px; } .l7-control-zoom { overflow: hidden; border-radius: 2px; -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15); box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15); } .l7-control-zoom .l7-button-control { font-size: 16px; border-bottom: 1px solid #f0f0f0; border-radius: 0; -webkit-box-shadow: 0 0 0; box-shadow: 0 0 0; } .l7-control-zoom .l7-button-control .l7-iconfont { width: 14px; height: 14px; } .l7-control-zoom .l7-button-control:last-child { border-bottom: 0; } .l7-control-zoom .l7-control-zoom__number { color: #595959; padding: 0; } .l7-control-zoom .l7-control-zoom__number:hover { background-color: #fff; } .l7-control-scale { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; } .l7-control-scale .l7-control-scale-line { -webkit-box-sizing: border-box; box-sizing: border-box; padding: 2px 5px 1px; overflow: hidden; color: #595959; font-size: 10px; line-height: 1.1; white-space: nowrap; background: #fff; border: 2px solid #000; border-top: 0; -webkit-transition: width 0.1s; transition: width 0.1s; } .l7-control-scale .l7-control-scale-line + .l7-control-scale .l7-control-scale-line { margin-top: -2px; border-top: 2px solid #777; border-bottom: none; } .l7-right .l7-control-scale { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; } .l7-right .l7-control-scale .l7-control-scale-line { text-align: right; } .l7-popup { position: absolute; top: 0; left: 0; z-index: 5; display: -webkit-box; display: -ms-flexbox; display: flex; will-change: transform; pointer-events: none; } .l7-popup.l7-popup-hide { display: none; } .l7-popup .l7-popup-content { position: relative; padding: 16px; font-size: 14px; background: #fff; border-radius: 3px; -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); } .l7-popup .l7-popup-content .l7-popup-content__title { margin-bottom: 8px; font-weight: bold; } .l7-popup .l7-popup-content .l7-popup-close-button, .l7-popup .l7-popup-content .l7-popup-content__title, .l7-popup .l7-popup-content .l7-popup-content__panel { white-space: normal; -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text; pointer-events: initial; } .l7-popup .l7-popup-content .l7-popup-close-button { position: absolute; top: 0; right: 0; width: 18px; height: 18px; padding: 0; font-size: 14px; line-height: 18px; text-align: center; background-color: transparent; border: 0; border-radius: 0 3px 0 0; cursor: pointer; } .l7-popup .l7-popup-tip { position: relative; z-index: 1; width: 0; height: 0; border: 10px solid transparent; } .l7-popup.l7-popup-anchor-bottom, .l7-popup.l7-popup-anchor-bottom-left, .l7-popup.l7-popup-anchor-bottom-right { -webkit-box-orient: vertical; -webkit-box-direction: reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; } .l7-popup.l7-popup-anchor-bottom .l7-popup-tip, .l7-popup.l7-popup-anchor-bottom-left .l7-popup-tip, .l7-popup.l7-popup-anchor-bottom-right .l7-popup-tip { bottom: 1px; } .l7-popup.l7-popup-anchor-top, .l7-popup.l7-popup-anchor-top-left, .l7-popup.l7-popup-anchor-top-right { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; } .l7-popup.l7-popup-anchor-top .l7-popup-tip, .l7-popup.l7-popup-anchor-top-left .l7-popup-tip, .l7-popup.l7-popup-anchor-top-right .l7-popup-tip { top: 1px; } .l7-popup.l7-popup-anchor-left { -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; } .l7-popup.l7-popup-anchor-right { -webkit-box-orient: horizontal; -webkit-box-direction: reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; } .l7-popup-anchor-top .l7-popup-tip { position: relative; -webkit-align-self: center; -ms-flex-item-align: center; align-self: center; border-top: none; border-bottom-color: #fff; } .l7-popup-anchor-top-left .l7-popup-tip { -webkit-align-self: flex-start; -ms-flex-item-align: start; align-self: flex-start; border-top: none; border-bottom-color: #fff; border-left: none; } .l7-popup-anchor-top-right .l7-popup-tip { -webkit-align-self: flex-end; -ms-flex-item-align: end; align-self: flex-end; border-top: none; border-right: none; border-bottom-color: #fff; } .l7-popup-anchor-bottom .l7-popup-tip { -webkit-align-self: center; -ms-flex-item-align: center; align-self: center; border-top-color: #fff; border-bottom: none; } .l7-popup-anchor-bottom-left .l7-popup-tip { -webkit-align-self: flex-start; -ms-flex-item-align: start; align-self: flex-start; border-top-color: #fff; border-bottom: none; border-left: none; } .l7-popup-anchor-bottom-right .l7-popup-tip { -webkit-align-self: flex-end; -ms-flex-item-align: end; align-self: flex-end; border-top-color: #fff; border-right: none; border-bottom: none; } .l7-popup-anchor-left .l7-popup-tip { -webkit-align-self: center; -ms-flex-item-align: center; align-self: center; border-right-color: #fff; border-left: none; } .l7-popup-anchor-right .l7-popup-tip { right: 1px; -webkit-align-self: center; -ms-flex-item-align: center; align-self: center; border-right: none; border-left-color: #fff; } .l7-popup-anchor-top-left .l7-popup-content { border-top-left-radius: 0; } .l7-popup-anchor-top-right .l7-popup-content { border-top-right-radius: 0; } .l7-popup-anchor-bottom-left .l7-popup-content { border-bottom-left-radius: 0; } .l7-popup-anchor-bottom-right .l7-popup-content { border-bottom-right-radius: 0; } .l7-popup-track-pointer { display: none; } .l7-popup-track-pointer * { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; pointer-events: none; } .l7-map:hover .l7-popup-track-pointer { display: -webkit-box; display: -ms-flexbox; display: flex; } .l7-map:active .l7-popup-track-pointer { display: none; } .l7-layer-popup__row { font-size: 12px; } .l7-layer-popup__row + .l7-layer-popup__row { margin-top: 4px; } .l7-control-swipe { position: absolute; top: 50%; left: 50%; z-index: 6; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); -ms-touch-action: none; touch-action: none; } .l7-control-swipe_hide { display: none; } .l7-control-swipe:before { position: absolute; top: -5000px; bottom: -5000px; left: 50%; z-index: -1; width: 4px; background: #fff; -webkit-transform: translate(-2px, 0); transform: translate(-2px, 0); content: ''; } .l7-control-swipe.horizontal:before { top: 50%; right: -5000px; bottom: auto; left: -5000px; width: auto; height: 4px; } .l7-control-swipe__button { display: block; width: 28px; height: 28px; margin: 0; padding: 0; color: #595959; font-weight: bold; font-size: inherit; text-align: center; text-decoration: none; background-color: #fff; border: none; border-radius: 2px; outline: none; } .l7-control-swipe, .l7-control-swipe__button { cursor: ew-resize; } .l7-control-swipe.horizontal, .l7-control-swipe.horizontal button { cursor: ns-resize; } .l7-control-swipe:after, .l7-control-swipe__button:before, .l7-control-swipe__button:after { position: absolute; top: 25%; bottom: 25%; left: 50%; width: 2px; background: currentColor; -webkit-transform: translate(-1px, 0); transform: translate(-1px, 0); content: ''; } .l7-control-swipe__button:after { -webkit-transform: translateX(4px); transform: translateX(4px); } .l7-control-swipe__button:before { -webkit-transform: translateX(-6px); transform: translateX(-6px); } `);var n9,c6,i9,Wve=(n9=rb(wt.IGlobalConfigService),c6=function(){function e(t){Ht(this,e),bi(this,"configService",i9,this),this.config=t}return jt(e,[{key:"setContainer",value:function(r,n,i){r.bind(wt.MapConfig).toConstantValue(Qe(Qe({},this.config),{},{id:n,canvas:i})),r.bind(wt.IMapService).to(this.getServiceConstructor()).inSingletonScope()}},{key:"getServiceConstructor",value:function(){throw new Error("Method not implemented.")}}]),e}(),i9=mi(c6.prototype,"configService",[n9],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),c6);function sm(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function Bg(e,t){var r=G5([],t,e);return $re(r,r,1/r[3]),r}function w1(e,t){if(!e)throw new Error(t||"viewport-mercator-project: assertion failed.")}var xc=Math.PI,IO=xc/4,yp=xc/180,a9=180/xc,xb=512,o9=4003e4,Xve=1.5;function MO(e){return Math.pow(2,e)}function f6(e,t){var r=Nn(e,2),n=r[0],i=r[1];w1(Number.isFinite(n)&&Number.isFinite(t)),w1(Number.isFinite(i)&&i>=-90&&i<=90,"invalid latitude"),t*=xb;var o=n*yp,a=i*yp,u=t*(o+xc)/(2*xc),c=t*(xc-Math.log(Math.tan(IO+a*.5)))/(2*xc);return[u,c]}function s9(e,t){var r=Nn(e,2),n=r[0],i=r[1];t*=xb;var o=n/t*(2*xc)-xc,a=2*(Math.atan(Math.exp(xc-i/t*(2*xc)))-IO);return[o*a9,a*a9]}function Yve(e){var t=e.latitude,r=e.longitude,n=e.zoom,i=e.scale,o=e.highPrecision,a=o===void 0?!1:o;i=i!==void 0?i:MO(n),w1(Number.isFinite(t)&&Number.isFinite(r)&&Number.isFinite(i));var u={},c=xb*i,f=Math.cos(t*yp),m=c/360,_=m/f,b=c/o9/f;if(u.pixelsPerMeter=[b,-b,b],u.metersPerPixel=[1/b,-1/b,1/b],u.pixelsPerDegree=[m,-_,b],u.degreesPerPixel=[1/m,-1/_,1/b],a){var A=yp*Math.tan(t*yp)/f,w=m*A/2,R=c/o9*A,P=R/_*b;u.pixelsPerDegree2=[0,-w,R],u.pixelsPerMeter2=[P,0,P]}return u}function Zve(e){var t=e.height,r=e.pitch,n=e.bearing,i=e.altitude,o=e.center,a=o===void 0?null:o,u=e.flipY,c=u===void 0?!1:u,f=sm();return Em(f,f,[0,0,-i]),Sm(f,f,[1,1,1/t]),sy(f,f,-r*yp),H5(f,f,n*yp),c&&Sm(f,f,[1,-1,1]),a&&Em(f,f,PM([],a)),f}function qve(e){var t=e.width,r=e.height,n=e.altitude,i=n===void 0?Xve:n,o=e.pitch,a=o===void 0?0:o,u=e.nearZMultiplier,c=u===void 0?1:u,f=e.farZMultiplier,m=f===void 0?1:f,_=a*yp,b=Math.atan(.5/i),A=Math.sin(b)*i/Math.sin(Math.PI/2-_-b),w=Math.cos(Math.PI/2-_)*A+i;return{fov:2*Math.atan(r/2/i),aspect:t/r,focalDistance:i,near:c,far:w*m}}function Kve(e){var t=e.width,r=e.height,n=e.pitch,i=e.altitude,o=e.nearZMultiplier,a=e.farZMultiplier,u=qve({width:t,height:r,altitude:i,pitch:n,nearZMultiplier:o,farZMultiplier:a}),c=u.fov,f=u.aspect,m=u.near,_=u.far,b=bM([],c,f,m,_);return b}function Qve(e,t){var r=Nn(e,3),n=r[0],i=r[1],o=r[2],a=o===void 0?0:o;return w1(Number.isFinite(n)&&Number.isFinite(i)&&Number.isFinite(a)),Bg(t,[n,i,a,1])}function PO(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=Nn(e,3),i=n[0],o=n[1],a=n[2];if(w1(Number.isFinite(i)&&Number.isFinite(o),"invalid pixel coordinate"),Number.isFinite(a)){var u=Bg(t,[i,o,a,1]);return u}var c=Bg(t,[i,o,0,1]),f=Bg(t,[i,o,1,1]),m=c[2],_=f[2],b=m===_?0:((r||0)-m)/(_-m);return jre([],c,f,b)}var u9=sm(),Jve=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width,n=t.height,i=t.viewMatrix,o=i===void 0?u9:i,a=t.projectionMatrix,u=a===void 0?u9:a;Ht(this,e),this.width=r||1,this.height=n||1,this.scale=1,this.pixelsPerMeter=1,this.viewMatrix=o,this.projectionMatrix=u;var c=sm();pf(c,c,this.projectionMatrix),pf(c,c,this.viewMatrix),this.viewProjectionMatrix=c;var f=sm();Sm(f,f,[this.width/2,-this.height/2,1]),Em(f,f,[1,-1,0]),pf(f,f,this.viewProjectionMatrix);var m=V5(sm(),f);if(!m)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=f,this.pixelUnprojectionMatrix=m,this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}return jt(e,[{key:"equals",value:function(r){return r instanceof e?r.width===this.width&&r.height===this.height&&Z6(r.projectionMatrix,this.projectionMatrix)&&Z6(r.viewMatrix,this.viewMatrix):!1}},{key:"project",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.topLeft,o=i===void 0?!0:i,a=this.projectPosition(r),u=Qve(a,this.pixelProjectionMatrix),c=Nn(u,2),f=c[0],m=c[1],_=o?m:this.height-m;return r.length===2?[f,_]:[f,_,u[2]]}},{key:"unproject",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.topLeft,o=i===void 0?!0:i,a=n.targetZ,u=Nn(r,3),c=u[0],f=u[1],m=u[2],_=o?f:this.height-f,b=a&&a*this.pixelsPerMeter,A=PO([c,_,m],this.pixelUnprojectionMatrix,b),w=this.unprojectPosition(A),R=Nn(w,3),P=R[0],k=R[1],L=R[2];return Number.isFinite(m)?[P,k,L]:Number.isFinite(a)?[P,k,a]:[P,k]}},{key:"projectPosition",value:function(r){var n=this.projectFlat(r),i=Nn(n,2),o=i[0],a=i[1],u=(r[2]||0)*this.pixelsPerMeter;return[o,a,u]}},{key:"unprojectPosition",value:function(r){var n=this.unprojectFlat(r),i=Nn(n,2),o=i[0],a=i[1],u=(r[2]||0)/this.pixelsPerMeter;return[o,a,u]}},{key:"projectFlat",value:function(r){return arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.scale,r}},{key:"unprojectFlat",value:function(r){return arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.scale,r}}]),e}();function eme(e){var t=e.width,r=e.height,n=e.bounds,i=e.minExtent,o=i===void 0?0:i,a=e.maxZoom,u=a===void 0?24:a,c=e.padding,f=c===void 0?0:c,m=e.offset,_=m===void 0?[0,0]:m,b=Nn(n,2),A=Nn(b[0],2),w=A[0],R=A[1],P=Nn(b[1],2),k=P[0],L=P[1];if(Number.isFinite(f)){var B=f;f={top:B,bottom:B,left:B,right:B}}else w1(Number.isFinite(f.top)&&Number.isFinite(f.bottom)&&Number.isFinite(f.left)&&Number.isFinite(f.right));var V=new OO({width:t,height:r,longitude:0,latitude:0,zoom:0}),G=V.project([w,L]),K=V.project([k,R]),Z=[Math.max(Math.abs(K[0]-G[0]),o),Math.max(Math.abs(K[1]-G[1]),o)],ve=[t-f.left-f.right-Math.abs(_[0])*2,r-f.top-f.bottom-Math.abs(_[1])*2];w1(ve[0]>0&&ve[1]>0);var Ie=ve[0]/Z[0],de=ve[1]/Z[1],se=(f.right-f.left)/2/Ie,le=(f.bottom-f.top)/2/de,ye=[(K[0]+G[0])/2+se,(K[1]+G[1])/2+le],ke=V.unproject(ye),Rt=V.zoom+Math.log2(Math.abs(Math.min(Ie,de)));return{longitude:ke[0],latitude:ke[1],zoom:Math.min(Rt,u)}}var OO=function(e){_n(t,e);function t(){var r,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.width,o=n.height,a=n.latitude,u=a===void 0?0:a,c=n.longitude,f=c===void 0?0:c,m=n.zoom,_=m===void 0?0:m,b=n.pitch,A=b===void 0?0:b,w=n.bearing,R=w===void 0?0:w,P=n.altitude,k=P===void 0?1.5:P,L=n.nearZMultiplier,B=n.farZMultiplier;Ht(this,t),i=i||1,o=o||1;var V=MO(_);k=Math.max(.75,k);var G=f6([f,u],V);G[2]=0;var K=Kve({width:i,height:o,pitch:A,bearing:R,altitude:k,nearZMultiplier:L||1/o,farZMultiplier:B||1.01}),Z=Zve({height:o,center:G,pitch:A,bearing:R,altitude:k,flipY:!0});return r=yn(this,Bt(t).call(this,{width:i,height:o,viewMatrix:Z,projectionMatrix:K})),r.latitude=u,r.longitude=f,r.zoom=_,r.pitch=A,r.bearing=R,r.altitude=k,r.scale=V,r.center=G,r.pixelsPerMeter=Yve($e($e(r))).pixelsPerMeter[2],Object.freeze($e($e(r))),r}return jt(t,[{key:"projectFlat",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.scale;return f6(n,i)}},{key:"unprojectFlat",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.scale;return s9(n,i)}},{key:"getMapCenterByLngLatPosition",value:function(n){var i=n.lngLat,o=n.pos,a=PO(o,this.pixelUnprojectionMatrix),u=f6(i,this.scale),c=Oo([],u,Vre([],a)),f=Oo([],this.center,c);return s9(f,this.scale)}},{key:"getLocationAtPoint",value:function(n){var i=n.lngLat,o=n.pos;return this.getMapCenterByLngLatPosition({lngLat:i,pos:o})}},{key:"fitBounds",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.width,a=this.height,u=eme(Object.assign({width:o,height:a,bounds:n},i)),c=u.longitude,f=u.latitude,m=u.zoom;return new t({width:o,height:a,longitude:c,latitude:f,zoom:m})}}]),t}(Jve),tme=function(){function e(t){Ht(this,e),F(this,"size",1e4),this.size=t||1e4}return jt(e,[{key:"setSize",value:function(r){this.size=r}},{key:"getSize",value:function(){return[this.size,this.size]}},{key:"mercatorXfromLng",value:function(r){return(180+r)/360*this.size}},{key:"mercatorYfromLat",value:function(r){return(1-(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360)*this.size}},{key:"lngFromMercatorX",value:function(r){return r/this.size*360-180}},{key:"latFromMercatorY",value:function(r){var n=180-(1-r/this.size)*360;return 360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90}},{key:"project",value:function(r){var n=this.mercatorXfromLng(r[0]),i=this.mercatorYfromLat(r[1]);return[n,i]}},{key:"unproject",value:function(r){var n=this.lngFromMercatorX(r[0]),i=this.latFromMercatorY(r[1]);return[n,i]}}]),e}(),rme={light:"mapbox://styles/zcxduo/ck2ypyb1r3q9o1co1766dex29",dark:"mapbox://styles/zcxduo/ck241p6413s0b1cpayzldv7x7",normal:"mapbox://styles/mapbox/streets-v11",blank:{version:8,sources:{},layers:[{id:"background",type:"background",layout:{visibility:"none"}}]}},l9,c9,f9,h9,p9,d9,Md,v9,m9,g9,_9,y9={mapmove:"move",camerachange:"move",zoomchange:"zoom",dragging:"drag"},nme=12,ime=(l9=ai(),c9=ki(wt.MapConfig),f9=ki(wt.IGlobalConfigService),h9=ki(wt.ICoordinateSystemService),p9=ki(wt.IEventEmitter),l9(d9=(Md=function(){function e(){var t=this;Ht(this,e),F(this,"version","DEFAUlTMAP"),F(this,"simpleMapCoord",new tme),F(this,"bgColor","rgba(0.0, 0.0, 0.0, 0.0)"),bi(this,"config",v9,this),bi(this,"configService",m9,this),bi(this,"coordinateSystemService",g9,this),bi(this,"eventEmitter",_9,this),F(this,"handleCameraChanged",function(r){var n=t.map.getCenter(),i=n.lat,o=n.lng;t.emit("mapchange"),t.viewport.syncWithMapCamera({bearing:t.map.getBearing(),center:[o,i],viewportHeight:t.map.transform.height,pitch:t.map.getPitch(),viewportWidth:t.map.transform.width,zoom:t.map.getZoom(),cameraHeight:0}),t.updateCoordinateSystemService(),t.cameraChangedCallback(t.viewport)})}return jt(e,[{key:"setBgColor",value:function(r){this.bgColor=r}},{key:"addMarkerContainer",value:function(){var r=this.map.getCanvasContainer();this.markerContainer=fl("div","l7-marker-container",r),this.markerContainer.setAttribute("tabindex","-1")}},{key:"getMarkerContainer",value:function(){return this.markerContainer}},{key:"getOverlayContainer",value:function(){}},{key:"on",value:function(r,n){ile.indexOf(r)!==-1?this.eventEmitter.on(r,n):this.map.on(y9[r]||r,n)}},{key:"off",value:function(r,n){this.map.off(y9[r]||r,n),this.eventEmitter.off(r,n)}},{key:"getContainer",value:function(){return this.map.getContainer()}},{key:"getMapCanvasContainer",value:function(){return this.map.getCanvasContainer()}},{key:"getSize",value:function(){if(this.version==="SIMPLE")return this.simpleMapCoord.getSize();var r=this.map.transform;return[r.width,r.height]}},{key:"getType",value:function(){return"default"}},{key:"getZoom",value:function(){return this.map.getZoom()}},{key:"setZoom",value:function(r){return this.map.setZoom(r)}},{key:"getCenter",value:function(){return this.map.getCenter()}},{key:"setCenter",value:function(r){this.map.setCenter(r)}},{key:"getPitch",value:function(){return this.map.getPitch()}},{key:"getRotation",value:function(){return this.map.getBearing()}},{key:"getBounds",value:function(){return this.map.getBounds().toArray()}},{key:"getMinZoom",value:function(){return this.map.getMinZoom()}},{key:"getMaxZoom",value:function(){return this.map.getMaxZoom()}},{key:"setRotation",value:function(r){this.map.setBearing(r)}},{key:"zoomIn",value:function(r,n){this.map.zoomIn(r,n)}},{key:"zoomOut",value:function(r,n){this.map.zoomOut(r,n)}},{key:"setPitch",value:function(r){return this.map.setPitch(r)}},{key:"panTo",value:function(r){this.map.panTo(r)}},{key:"panBy",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.map.panBy([r,n])}},{key:"fitBounds",value:function(r,n){this.map.fitBounds(r,n)}},{key:"setMaxZoom",value:function(r){this.map.setMaxZoom(r)}},{key:"setMinZoom",value:function(r){this.map.setMinZoom(r)}},{key:"setMapStatus",value:function(r){r.doubleClickZoom===!0&&this.map.doubleClickZoom.enable(),r.doubleClickZoom===!1&&this.map.doubleClickZoom.disable(),r.dragEnable===!1&&this.map.dragPan.disable(),r.dragEnable===!0&&this.map.dragPan.enable(),r.rotateEnable===!1&&this.map.dragRotate.disable(),r.dragEnable===!0&&this.map.dragRotate.enable(),r.keyboardEnable===!1&&this.map.keyboard.disable(),r.keyboardEnable===!0&&this.map.keyboard.enable(),r.zoomEnable===!1&&this.map.scrollZoom.disable(),r.zoomEnable===!0&&this.map.scrollZoom.enable()}},{key:"setZoomAndCenter",value:function(r,n){this.map.flyTo({zoom:r,center:n})}},{key:"setMapStyle",value:function(r){this.map.setStyle(this.getMapStyleValue(r))}},{key:"meterToCoord",value:function(r,n){return 1}},{key:"pixelToLngLat",value:function(r){return this.map.unproject(r)}},{key:"lngLatToPixel",value:function(r){return this.map.project(r)}},{key:"containerToLngLat",value:function(r){return this.map.unproject(r)}},{key:"lngLatToContainer",value:function(r){return this.map.project(r)}},{key:"getMapStyle",value:function(){try{var r,n=(r=this.map.getStyle().sprite)!==null&&r!==void 0?r:"";return/^mapbox:\/\/sprites\/zcxduo\/\w+\/\w+$/.test(n)?n==null?void 0:n.replace(/\/\w+$/,"").replace(/sprites/,"styles"):n}catch{return""}}},{key:"getMapStyleConfig",value:function(){return rme}},{key:"getMapStyleValue",value:function(r){var n;return(n=this.getMapStyleConfig()[r])!==null&&n!==void 0?n:r}},{key:"destroy",value:function(){this.eventEmitter.removeAllListeners(),this.map&&(this.map.remove(),this.$mapContainer=null)}},{key:"emit",value:function(r){for(var n,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a1?i-1:0),a=1;anme&&n?this.coordinateSystemService.setCoordinateSystem(Vd.LNGLAT_OFFSET):this.coordinateSystemService.setCoordinateSystem(Vd.LNGLAT)}}]),e}(),v9=mi(Md.prototype,"config",[c9],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),m9=mi(Md.prototype,"configService",[f9],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),g9=mi(Md.prototype,"coordinateSystemService",[h9],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),_9=mi(Md.prototype,"eventEmitter",[p9],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Md))||d9),kO={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(_c,function(){var r,n,i;function o(a,u){if(!r)r=u;else if(!n)n=u;else{var c="var sharedChunk = {}; ("+r+")(sharedChunk); ("+n+")(sharedChunk);",f={};r(f),i=u(f),typeof window<"u"&&(i.workerUrl=window.URL.createObjectURL(new Blob([c],{type:"text/javascript"})))}}return o(["exports"],function(a){function u(s,l){return s(l={exports:{}},l.exports),l.exports}var c=f;function f(s,l,h,g){this.cx=3*s,this.bx=3*(h-s)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(g-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=s,this.p1y=g,this.p2x=h,this.p2y=g}f.prototype.sampleCurveX=function(s){return((this.ax*s+this.bx)*s+this.cx)*s},f.prototype.sampleCurveY=function(s){return((this.ay*s+this.by)*s+this.cy)*s},f.prototype.sampleCurveDerivativeX=function(s){return(3*this.ax*s+2*this.bx)*s+this.cx},f.prototype.solveCurveX=function(s,l){var h,g,x,E,T;for(l===void 0&&(l=1e-6),x=s,T=0;T<8;T++){if(E=this.sampleCurveX(x)-s,Math.abs(E)(g=1))return g;for(;hE?h=x:g=x,x=.5*(g-h)+h}return x},f.prototype.solve=function(s,l){return this.sampleCurveY(this.solveCurveX(s,l))};var m=_;function _(s,l){this.x=s,this.y=l}_.prototype={clone:function(){return new _(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,l){return this.clone()._rotateAround(s,l)},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 l=s.x-this.x,h=s.y-this.y;return l*l+h*h},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,l){return Math.atan2(this.x*l-this.y*s,this.x*s+this.y*l)},_matMult:function(s){var l=s[2]*this.x+s[3]*this.y;return this.x=s[0]*this.x+s[1]*this.y,this.y=l,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 l=Math.cos(s),h=Math.sin(s),g=h*this.x+l*this.y;return this.x=l*this.x-h*this.y,this.y=g,this},_rotateAround:function(s,l){var h=Math.cos(s),g=Math.sin(s),x=l.y+g*(this.x-l.x)+h*(this.y-l.y);return this.x=l.x+h*(this.x-l.x)-g*(this.y-l.y),this.y=x,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},_.convert=function(s){return s instanceof _?s:Array.isArray(s)?new _(s[0],s[1]):s};var b=typeof self<"u"?self:{},A=Math.pow(2,53)-1;function w(s,l,h,g){var x=new c(s,l,h,g);return function(E){return x.solve(E)}}var R=w(.25,.1,.25,1);function P(s,l,h){return Math.min(h,Math.max(l,s))}function k(s,l,h){var g=h-l,x=((s-l)%g+g)%g+l;return x===l?h:x}function L(s){for(var l=[],h=arguments.length-1;h-- >0;)l[h]=arguments[h+1];for(var g=0,x=l;g>l/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,s)}()}function K(s){return!!s&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(s)}function Z(s,l){s.forEach(function(h){l[h]&&(l[h]=l[h].bind(l))})}function ve(s,l){return s.indexOf(l,s.length-l.length)!==-1}function Ie(s,l,h){var g={};for(var x in s)g[x]=l.call(h||this,s[x],x,s);return g}function de(s,l,h){var g={};for(var x in s)l.call(h||this,s[x],x,s)&&(g[x]=s[x]);return g}function se(s){return Array.isArray(s)?s.map(se):typeof s=="object"&&s?Ie(s,se):s}var le={};function ye(s){le[s]||(typeof console<"u"&&console.warn(s),le[s]=!0)}function ke(s,l,h){return(h.y-s.y)*(l.x-s.x)>(l.y-s.y)*(h.x-s.x)}function Rt(s){for(var l=0,h=0,g=s.length,x=g-1,E=void 0,T=void 0;h@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(g,x,E,T){var M=E||T;return l[x]=!M||M.toLowerCase(),""}),l["max-age"]){var h=parseInt(l["max-age"],10);isNaN(h)?delete l["max-age"]:l["max-age"]=h}return l}var Zt=null;function st(s){if(Zt==null){var l=s.navigator?s.navigator.userAgent:null;Zt=!!s.safari||!(!l||!(/\b(iPad|iPhone|iPod)\b/.test(l)||l.match("Safari")&&!l.match("Chrome")))}return Zt}function tt(s){try{var l=b[s];return l.setItem("_mapbox_test_",1),l.removeItem("_mapbox_test_"),!0}catch{return!1}}var dt,nt,pr,ur,Ar=b.performance&&b.performance.now?b.performance.now.bind(b.performance):Date.now.bind(Date),Xn=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame,pn=b.cancelAnimationFrame||b.mozCancelAnimationFrame||b.webkitCancelAnimationFrame||b.msCancelAnimationFrame,gi={now:Ar,frame:function(s){var l=Xn(s);return{cancel:function(){return pn(l)}}},getImageData:function(s,l){l===void 0&&(l=0);var h=b.document.createElement("canvas"),g=h.getContext("2d");if(!g)throw new Error("failed to create canvas 2d context");return h.width=s.width,h.height=s.height,g.drawImage(s,0,0,s.width,s.height),g.getImageData(-l,-l,s.width+2*l,s.height+2*l)},resolveURL:function(s){return dt||(dt=b.document.createElement("a")),dt.href=s,dt.href},hardwareConcurrency:b.navigator&&b.navigator.hardwareConcurrency||4,get devicePixelRatio(){return b.devicePixelRatio},get prefersReducedMotion(){return!!b.matchMedia&&(nt==null&&(nt=b.matchMedia("(prefers-reduced-motion: reduce)")),nt.matches)}},Je={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Qt={supported:!1,testSupport:function(s){!Xr&&ur&&(Ut?ge(s):pr=s)}},Xr=!1,Ut=!1;function ge(s){var l=s.createTexture();s.bindTexture(s.TEXTURE_2D,l);try{if(s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,ur),s.isContextLost())return;Qt.supported=!0}catch{}s.deleteTexture(l),Xr=!0}b.document&&((ur=b.document.createElement("img")).onload=function(){pr&&ge(pr),pr=null,Ut=!0},ur.onerror=function(){Xr=!0,pr=null},ur.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var Be="01",ft=function(s,l){this._transformRequestFn=s,this._customAccessToken=l,this._createSkuToken()};function At(s){return s.indexOf("mapbox:")===0}ft.prototype._createSkuToken=function(){var s=function(){for(var l="",h=0;h<10;h++)l+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",Be,l].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=s.token,this._skuTokenExpiresAt=s.tokenExpiresAt},ft.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},ft.prototype.transformRequest=function(s,l){return this._transformRequestFn&&this._transformRequestFn(s,l)||{url:s}},ft.prototype.normalizeStyleURL=function(s,l){if(!At(s))return s;var h=tr(s);return h.path="/styles/v1"+h.path,this._makeAPIURL(h,this._customAccessToken||l)},ft.prototype.normalizeGlyphsURL=function(s,l){if(!At(s))return s;var h=tr(s);return h.path="/fonts/v1"+h.path,this._makeAPIURL(h,this._customAccessToken||l)},ft.prototype.normalizeSourceURL=function(s,l){if(!At(s))return s;var h=tr(s);return h.path="/v4/"+h.authority+".json",h.params.push("secure"),this._makeAPIURL(h,this._customAccessToken||l)},ft.prototype.normalizeSpriteURL=function(s,l,h,g){var x=tr(s);return At(s)?(x.path="/styles/v1"+x.path+"/sprite"+l+h,this._makeAPIURL(x,this._customAccessToken||g)):(x.path+=""+l+h,lr(x))},ft.prototype.normalizeTileURL=function(s,l){if(this._isSkuTokenExpired()&&this._createSkuToken(),s&&!At(s))return s;var h=tr(s);h.path=h.path.replace(/(\.(png|jpg)\d*)(?=$)/,(gi.devicePixelRatio>=2||l===512?"@2x":"")+(Qt.supported?".webp":"$1")),h.path=h.path.replace(/^.+\/v4\//,"/"),h.path="/v4"+h.path;var g=this._customAccessToken||function(x){for(var E=0,T=x;E=0&&s.params.splice(x,1)}if(g.path!=="/"&&(s.path=""+g.path+s.path),!Je.REQUIRE_ACCESS_TOKEN)return lr(s);if(!(l=l||Je.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+h);if(l[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+h);return s.params=s.params.filter(function(E){return E.indexOf("access_token")===-1}),s.params.push("access_token="+l),lr(s)};var bt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function $t(s){return bt.test(s)}var Mr=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function tr(s){var l=s.match(Mr);if(!l)throw new Error("Unable to parse URL object");return{protocol:l[1],authority:l[2],path:l[3]||"/",params:l[4]?l[4].split("&"):[]}}function lr(s){var l=s.params.length?"?"+s.params.join("&"):"";return s.protocol+"://"+s.authority+s.path+l}function or(s){if(!s)return null;var l=s.split(".");if(!l||l.length!==3)return null;try{return JSON.parse(decodeURIComponent(b.atob(l[1]).split("").map(function(h){return"%"+("00"+h.charCodeAt(0).toString(16)).slice(-2)}).join("")))}catch{return null}}var Q=function(s){this.type=s,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};Q.prototype.getStorageKey=function(s){var l,h=or(Je.ACCESS_TOKEN);return l=h&&h.u?b.btoa(encodeURIComponent(h.u).replace(/%([0-9A-F]{2})/g,function(g,x){return String.fromCharCode(+("0x"+x))})):Je.ACCESS_TOKEN||"",s?"mapbox.eventData."+s+":"+l:"mapbox.eventData:"+l},Q.prototype.fetchEventData=function(){var s=tt("localStorage"),l=this.getStorageKey(),h=this.getStorageKey("uuid");if(s)try{var g=b.localStorage.getItem(l);g&&(this.eventData=JSON.parse(g));var x=b.localStorage.getItem(h);x&&(this.anonId=x)}catch{ye("Unable to read from LocalStorage")}},Q.prototype.saveEventData=function(){var s=tt("localStorage"),l=this.getStorageKey(),h=this.getStorageKey("uuid");if(s)try{b.localStorage.setItem(h,this.anonId),Object.keys(this.eventData).length>=1&&b.localStorage.setItem(l,JSON.stringify(this.eventData))}catch{ye("Unable to write to LocalStorage")}},Q.prototype.processRequests=function(s){},Q.prototype.postEvent=function(s,l,h,g){var x=this;if(Je.EVENTS_URL){var E=tr(Je.EVENTS_URL);E.params.push("access_token="+(g||Je.ACCESS_TOKEN||""));var T={event:this.type,created:new Date(s).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.13.3",skuId:Be,userId:this.anonId},M=l?L(T,l):T,D={url:lr(E),headers:{"Content-Type":"text/plain"},body:JSON.stringify([M])};this.pendingRequest=Fn(D,function(N){x.pendingRequest=null,h(N),x.saveEventData(),x.processRequests(g)})}},Q.prototype.queueRequest=function(s,l){this.queue.push(s),this.processRequests(l)};var Ge,at,yt=function(s){function l(){s.call(this,"map.load"),this.success={},this.skuToken=""}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.postMapLoadEvent=function(h,g,x,E){this.skuToken=x;var T=!(!E&&!Je.ACCESS_TOKEN),M=Array.isArray(h)&&h.some(function(D){return At(D)||$t(D)});Je.EVENTS_URL&&T&&M&&this.queueRequest({id:g,timestamp:Date.now()},E)},l.prototype.processRequests=function(h){var g=this;if(!this.pendingRequest&&this.queue.length!==0){var x=this.queue.shift(),E=x.id,T=x.timestamp;E&&this.success[E]||(this.anonId||this.fetchEventData(),K(this.anonId)||(this.anonId=G()),this.postEvent(T,{skuToken:this.skuToken},function(M){M||E&&(g.success[E]=!0)},h))}},l}(Q),rr=new(function(s){function l(h){s.call(this,"appUserTurnstile"),this._customAccessToken=h}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.postTurnstileEvent=function(h,g){Je.EVENTS_URL&&Je.ACCESS_TOKEN&&Array.isArray(h)&&h.some(function(x){return At(x)||$t(x)})&&this.queueRequest(Date.now(),g)},l.prototype.processRequests=function(h){var g=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var x=or(Je.ACCESS_TOKEN),E=x?x.u:Je.ACCESS_TOKEN,T=E!==this.eventData.tokenU;K(this.anonId)||(this.anonId=G(),T=!0);var M=this.queue.shift();if(this.eventData.lastSuccess){var D=new Date(this.eventData.lastSuccess),N=new Date(M),$=(M-this.eventData.lastSuccess)/864e5;T=T||$>=1||$<-1||D.getDate()!==N.getDate()}else T=!0;if(!T)return this.processRequests();this.postEvent(M,{"enabled.telemetry":!1},function(H){H||(g.eventData.lastSuccess=M,g.eventData.tokenU=E)},h)}},l}(Q)),hr=rr.postTurnstileEvent.bind(rr),Cn=new yt,rn=Cn.postMapLoadEvent.bind(Cn),Ne=500,qe=50;function ct(){b.caches&&!Ge&&(Ge=b.caches.open("mapbox-tiles"))}function Vt(s){var l=s.indexOf("?");return l<0?s:s.slice(0,l)}var Qr,Jn=1/0;function Ri(){return Qr==null&&(Qr=b.OffscreenCanvas&&new b.OffscreenCanvas(1,1).getContext("2d")&&typeof b.createImageBitmap=="function"),Qr}var qn={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(qn);var en=function(s){function l(h,g,x){g===401&&$t(x)&&(h+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),s.call(this,h),this.status=g,this.url=x,this.name=this.constructor.name,this.message=h}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},l}(Error),fn=Lt()?function(){return self.worker&&self.worker.referrer}:function(){return(b.location.protocol==="blob:"?b.parent:b).location.href},an,un,ti=function(s,l){if(!(/^file:/.test(h=s.url)||/^file:/.test(fn())&&!/^\w+:/.test(h))){if(b.fetch&&b.Request&&b.AbortController&&b.Request.prototype.hasOwnProperty("signal"))return function(g,x){var E,T=new b.AbortController,M=new b.Request(g.url,{method:g.method||"GET",body:g.body,credentials:g.credentials,headers:g.headers,referrer:fn(),signal:T.signal}),D=!1,N=!1,$=(E=M.url).indexOf("sku=")>0&&$t(E);g.type==="json"&&M.headers.set("Accept","application/json");var H=function(re,xe,Se){if(!N){if(re&&re.message!=="SecurityError"&&ye(re),xe&&Se)return q(xe);var ze=Date.now();b.fetch(M).then(function(Oe){if(Oe.ok){var et=$?Oe.clone():null;return q(Oe,et,ze)}return x(new en(Oe.statusText,Oe.status,g.url))}).catch(function(Oe){Oe.code!==20&&x(new Error(Oe.message))})}},q=function(re,xe,Se){(g.type==="arrayBuffer"?re.arrayBuffer():g.type==="json"?re.json():re.text()).then(function(ze){N||(xe&&Se&&function(Oe,et,ut){if(ct(),Ge){var St={status:et.status,statusText:et.statusText,headers:new b.Headers};et.headers.forEach(function(Xt,Er){return St.headers.set(Er,Xt)});var It=Gt(et.headers.get("Cache-Control")||"");It["no-store"]||(It["max-age"]&&St.headers.set("Expires",new Date(ut+1e3*It["max-age"]).toUTCString()),new Date(St.headers.get("Expires")).getTime()-ut<42e4||function(Xt,Er){if(at===void 0)try{new Response(new ReadableStream),at=!0}catch{at=!1}at?Er(Xt.body):Xt.blob().then(Er)}(et,function(Xt){var Er=new b.Response(Xt,St);ct(),Ge&&Ge.then(function(kr){return kr.put(Vt(Oe.url),Er)}).catch(function(kr){return ye(kr.message)})}))}}(M,xe,Se),D=!0,x(null,ze,re.headers.get("Cache-Control"),re.headers.get("Expires")))}).catch(function(ze){N||x(new Error(ze.message))})};return $?function(re,xe){if(ct(),!Ge)return xe(null);var Se=Vt(re.url);Ge.then(function(ze){ze.match(Se).then(function(Oe){var et=function(ut){if(!ut)return!1;var St=new Date(ut.headers.get("Expires")||0),It=Gt(ut.headers.get("Cache-Control")||"");return St>Date.now()&&!It["no-cache"]}(Oe);ze.delete(Se),et&&ze.put(Se,Oe.clone()),xe(null,Oe,et)}).catch(xe)}).catch(xe)}(M,H):H(null,null),{cancel:function(){N=!0,D||T.abort()}}}(s,l);if(Lt()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",s,l,void 0,!0)}var h;return function(g,x){var E=new b.XMLHttpRequest;for(var T in E.open(g.method||"GET",g.url,!0),g.type==="arrayBuffer"&&(E.responseType="arraybuffer"),g.headers)E.setRequestHeader(T,g.headers[T]);return g.type==="json"&&(E.responseType="text",E.setRequestHeader("Accept","application/json")),E.withCredentials=g.credentials==="include",E.onerror=function(){x(new Error(E.statusText))},E.onload=function(){if((E.status>=200&&E.status<300||E.status===0)&&E.response!==null){var M=E.response;if(g.type==="json")try{M=JSON.parse(E.response)}catch(D){return x(D)}x(null,M,E.getResponseHeader("Cache-Control"),E.getResponseHeader("Expires"))}else x(new en(E.statusText,E.status,g.url))},E.send(g.body),{cancel:function(){return E.abort()}}}(s,l)},Hi=function(s,l){return ti(L(s,{type:"arrayBuffer"}),l)},Fn=function(s,l){return ti(L(s,{method:"POST"}),l)},j="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";an=[],un=0;var Y=function(s,l){if(Qt.supported&&(s.headers||(s.headers={}),s.headers.accept="image/webp,*/*"),un>=Je.MAX_PARALLEL_IMAGE_REQUESTS){var h={requestParameters:s,callback:l,cancelled:!1,cancel:function(){this.cancelled=!0}};return an.push(h),h}un++;var g=!1,x=function(){if(!g)for(g=!0,un--;an.length&&un0||this._oneTimeListeners&&this._oneTimeListeners[s]&&this._oneTimeListeners[s].length>0||this._eventedParent&&this._eventedParent.listens(s)},Ye.prototype.setEventedParent=function(s,l){return this._eventedParent=s,this._eventedParentData=l,this};var ie={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},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},"*":{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:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{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:{},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_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"],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:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"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:{},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-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"],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"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},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}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","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"},"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",default:335,minimum:0,maximum:359,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:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",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"}},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"}}},Ce=function(s,l,h,g){this.message=(s?s+": ":"")+h,g&&(this.identifier=g),l!=null&&l.__line__&&(this.line=l.__line__)};function it(s){var l=s.value;return l?[new Ce(s.key,l,"constants have been deprecated as of v8")]:[]}function Nt(s){for(var l=[],h=arguments.length-1;h-- >0;)l[h]=arguments[h+1];for(var g=0,x=l;g":s.itemType.kind==="value"?"array":"array<"+l+">"}return s.kind}var ka=[qr,Dt,zr,Rr,Pr,Gi,Hn,_i(Lr),oi];function hi(s,l){if(l.kind==="error")return null;if(s.kind==="array"){if(l.kind==="array"&&(l.N===0&&l.itemType.kind==="value"||!hi(s.itemType,l.itemType))&&(typeof s.N!="number"||s.N===l.N))return null}else{if(s.kind===l.kind)return null;if(s.kind==="value"){for(var h=0,g=ka;h255?255:M}function x(M){return g(M[M.length-1]==="%"?parseFloat(M)/100*255:parseInt(M))}function E(M){return(D=M[M.length-1]==="%"?parseFloat(M)/100:parseFloat(M))<0?0:D>1?1:D;var D}function T(M,D,N){return N<0?N+=1:N>1&&(N-=1),6*N<1?M+(D-M)*N*6:2*N<1?D:3*N<2?M+(D-M)*(2/3-N)*6:M}try{l.parseCSSColor=function(M){var D,N=M.replace(/ /g,"").toLowerCase();if(N in h)return h[N].slice();if(N[0]==="#")return N.length===4?(D=parseInt(N.substr(1),16))>=0&&D<=4095?[(3840&D)>>4|(3840&D)>>8,240&D|(240&D)>>4,15&D|(15&D)<<4,1]:null:N.length===7&&(D=parseInt(N.substr(1),16))>=0&&D<=16777215?[(16711680&D)>>16,(65280&D)>>8,255&D,1]:null;var $=N.indexOf("("),H=N.indexOf(")");if($!==-1&&H+1===N.length){var q=N.substr(0,$),re=N.substr($+1,H-($+1)).split(","),xe=1;switch(q){case"rgba":if(re.length!==4)return null;xe=E(re.pop());case"rgb":return re.length!==3?null:[x(re[0]),x(re[1]),x(re[2]),xe];case"hsla":if(re.length!==4)return null;xe=E(re.pop());case"hsl":if(re.length!==3)return null;var Se=(parseFloat(re[0])%360+360)%360/360,ze=E(re[1]),Oe=E(re[2]),et=Oe<=.5?Oe*(ze+1):Oe+ze-Oe*ze,ut=2*Oe-et;return[g(255*T(ut,et,Se+1/3)),g(255*T(ut,et,Se)),g(255*T(ut,et,Se-1/3)),xe];default:return null}}return null}}catch{}}).parseCSSColor,si=function(s,l,h,g){g===void 0&&(g=1),this.r=s,this.g=l,this.b=h,this.a=g};si.parse=function(s){if(s){if(s instanceof si)return s;if(typeof s=="string"){var l=Wn(s);if(l)return new si(l[0]/255*l[3],l[1]/255*l[3],l[2]/255*l[3],l[3])}}},si.prototype.toString=function(){var s=this.toArray(),l=s[1],h=s[2],g=s[3];return"rgba("+Math.round(s[0])+","+Math.round(l)+","+Math.round(h)+","+g+")"},si.prototype.toArray=function(){var s=this.a;return s===0?[0,0,0,0]:[255*this.r/s,255*this.g/s,255*this.b/s,s]},si.black=new si(0,0,0,1),si.white=new si(1,1,1,1),si.transparent=new si(0,0,0,0),si.red=new si(1,0,0,1);var To=function(s,l,h){this.sensitivity=s?l?"variant":"case":l?"accent":"base",this.locale=h,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};To.prototype.compare=function(s,l){return this.collator.compare(s,l)},To.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var dl=function(s,l,h,g,x){this.text=s,this.image=l,this.scale=h,this.fontStack=g,this.textColor=x},wa=function(s){this.sections=s};wa.fromString=function(s){return new wa([new dl(s,null,null,null,null)])},wa.prototype.isEmpty=function(){return this.sections.length===0||!this.sections.some(function(s){return s.text.length!==0||s.image&&s.image.name.length!==0})},wa.factory=function(s){return s instanceof wa?s:wa.fromString(s)},wa.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(s){return s.text}).join("")},wa.prototype.serialize=function(){for(var s=["format"],l=0,h=this.sections;l=0&&s<=255&&typeof l=="number"&&l>=0&&l<=255&&typeof h=="number"&&h>=0&&h<=255?g===void 0||typeof g=="number"&&g>=0&&g<=1?null:"Invalid rgba value ["+[s,l,h,g].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof g=="number"?[s,l,h,g]:[s,l,h]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function $s(s){if(s===null||typeof s=="string"||typeof s=="boolean"||typeof s=="number"||s instanceof si||s instanceof To||s instanceof wa||s instanceof fa)return!0;if(Array.isArray(s)){for(var l=0,h=s;l2){var M=s[1];if(typeof M!="string"||!(M in Ca)||M==="object")return l.error('The item type argument of "array" must be one of string, number, boolean',1);E=Ca[M],g++}else E=Lr;if(s.length>3){if(s[2]!==null&&(typeof s[2]!="number"||s[2]<0||s[2]!==Math.floor(s[2])))return l.error('The length argument to "array" must be a positive integer literal',2);T=s[2],g++}h=_i(E,T)}else h=Ca[x];for(var D=[];g1)&&l.push(g)}}return l.concat(this.args.map(function(x){return x.serialize()}))};var Go=function(s){this.type=Gi,this.sections=s};Go.parse=function(s,l){if(s.length<2)return l.error("Expected at least one argument.");var h=s[1];if(!Array.isArray(h)&&typeof h=="object")return l.error("First argument must be an image or text section.");for(var g=[],x=!1,E=1;E<=s.length-1;++E){var T=s[E];if(x&&typeof T=="object"&&!Array.isArray(T)){x=!1;var M=null;if(T["font-scale"]&&!(M=l.parse(T["font-scale"],1,Dt)))return null;var D=null;if(T["text-font"]&&!(D=l.parse(T["text-font"],1,_i(zr))))return null;var N=null;if(T["text-color"]&&!(N=l.parse(T["text-color"],1,Pr)))return null;var $=g[g.length-1];$.scale=M,$.font=D,$.textColor=N}else{var H=l.parse(s[E],1,Lr);if(!H)return null;var q=H.type.kind;if(q!=="string"&&q!=="value"&&q!=="null"&&q!=="resolvedImage")return l.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");x=!0,g.push({content:H,scale:null,font:null,textColor:null})}}return new Go(g)},Go.prototype.evaluate=function(s){return new wa(this.sections.map(function(l){var h=l.content.evaluate(s);return sa(h)===oi?new dl("",h,null,null,null):new dl(Hu(h),null,l.scale?l.scale.evaluate(s):null,l.font?l.font.evaluate(s).join(","):null,l.textColor?l.textColor.evaluate(s):null)}))},Go.prototype.eachChild=function(s){for(var l=0,h=this.sections;l-1),h},Bo.prototype.eachChild=function(s){s(this.input)},Bo.prototype.outputDefined=function(){return!1},Bo.prototype.serialize=function(){return["image",this.input.serialize()]};var yf={"to-boolean":Rr,"to-color":Pr,"to-number":Dt,"to-string":zr},vs=function(s,l){this.type=s,this.args=l};vs.parse=function(s,l){if(s.length<2)return l.error("Expected at least one argument.");var h=s[0];if((h==="to-boolean"||h==="to-string")&&s.length!==2)return l.error("Expected one argument.");for(var g=yf[h],x=[],E=1;E4?"Invalid rbga value "+JSON.stringify(l)+": expected an array containing either three or four numeric values.":vl(l[0],l[1],l[2],l[3])))return new si(l[0]/255,l[1]/255,l[2]/255,l[3])}throw new ua(h||"Could not parse color from value '"+(typeof l=="string"?l:String(JSON.stringify(l)))+"'")}if(this.type.kind==="number"){for(var T=null,M=0,D=this.args;M=l[2]||s[1]<=l[1]||s[3]>=l[3])}function hn(s,l){var h=(180+s[0])/360,g=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+s[1]*Math.PI/360)))/360,x=Math.pow(2,l.z);return[Math.round(h*x*8192),Math.round(g*x*8192)]}function Ei(s,l,h){return l[1]>s[1]!=h[1]>s[1]&&s[0]<(h[0]-l[0])*(s[1]-l[1])/(h[1]-l[1])+l[0]}function La(s,l){for(var h,g,x,E,T,M,D,N=!1,$=0,H=l.length;$0&&M<0||T<0&&M>0}function Vs(s,l,h){for(var g=0,x=h;gh[2]){var x=.5*g,E=s[0]-h[0]>x?-g:h[0]-s[0]>x?g:0;E===0&&(E=s[0]-h[2]>x?-g:h[2]-s[0]>x?g:0),s[0]+=E}_t(l,s)}function L1(s,l,h,g){for(var x=8192*Math.pow(2,g.z),E=[8192*g.x,8192*g.y],T=[],M=0,D=s;M=0)return!1;var h=!0;return s.eachChild(function(g){h&&!yu(g,l)&&(h=!1)}),h}wo.parse=function(s,l){if(s.length!==2)return l.error("'within' expression requires exactly one argument, but found "+(s.length-1)+" instead.");if($s(s[1])){var h=s[1];if(h.type==="FeatureCollection")for(var g=0;gl))throw new ua("Input is not a number.");E=T-1}return 0}Gu.prototype.parse=function(s,l,h,g,x){return x===void 0&&(x={}),l?this.concat(l,h,g)._parse(s,x):this._parse(s,x)},Gu.prototype._parse=function(s,l){function h(N,$,H){return H==="assert"?new Qi($,[N]):H==="coerce"?new vs($,[N]):N}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", []].');var 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;var x=this.registry[g];if(x){var E=x.parse(s,this);if(!E)return null;if(this.expectedType){var T=this.expectedType,M=E.type;if(T.kind!=="string"&&T.kind!=="number"&&T.kind!=="boolean"&&T.kind!=="object"&&T.kind!=="array"||M.kind!=="value")if(T.kind!=="color"&&T.kind!=="formatted"&&T.kind!=="resolvedImage"||M.kind!=="value"&&M.kind!=="string"){if(this.checkSubtype(T,M))return null}else E=h(E,T,l.typeAnnotation||"coerce");else E=h(E,T,l.typeAnnotation||"assert")}if(!(E instanceof ro)&&E.type.kind!=="resolvedImage"&&function N($){if($ instanceof xu)return N($.boundExpression);if($ instanceof ue&&$.name==="error"||$ instanceof Ue||$ instanceof wo)return!1;var H=$ instanceof vs||$ instanceof Qi,q=!0;return $.eachChild(function(re){q=H?q&&N(re):q&&re instanceof ro}),!!q&&ml($)&&yu($,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(E)){var D=new ee;try{E=new ro(E.type,E.evaluate(D))}catch(N){return this.error(N.message),null}}return E}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.")},Gu.prototype.concat=function(s,l,h){var g=typeof s=="number"?this.path.concat(s):this.path,x=h?this.scope.concat(h):this.scope;return new Gu(this.registry,g,l||null,x,this.errors)},Gu.prototype.error=function(s){for(var l=[],h=arguments.length-1;h-- >0;)l[h]=arguments[h+1];var g=""+this.key+l.map(function(x){return"["+x+"]"}).join("");this.errors.push(new ar(g,s))},Gu.prototype.checkSubtype=function(s,l){var h=hi(s,l);return h&&this.error(h),h};var ms=function(s,l,h){this.type=s,this.input=l,this.labels=[],this.outputs=[];for(var g=0,x=h;g=T)return l.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',D);var $=l.parse(M,N,x);if(!$)return null;x=x||$.type,g.push([T,$])}return new ms(x,h,g)},ms.prototype.evaluate=function(s){var l=this.labels,h=this.outputs;if(l.length===1)return h[0].evaluate(s);var g=this.input.evaluate(s);if(g<=l[0])return h[0].evaluate(s);var x=l.length;return g>=l[x-1]?h[x-1].evaluate(s):h[bf(l,g)].evaluate(s)},ms.prototype.eachChild=function(s){s(this.input);for(var l=0,h=this.outputs;l0&&s.push(this.labels[l]),s.push(this.outputs[l].serialize());return s};var _l=Object.freeze({__proto__:null,number:Ra,color:function(s,l,h){return new si(Ra(s.r,l.r,h),Ra(s.g,l.g,h),Ra(s.b,l.b,h),Ra(s.a,l.a,h))},array:function(s,l,h){return s.map(function(g,x){return Ra(g,l[x],h)})}}),Wu=6/29*3*(6/29),ph=Math.PI/180,N1=180/Math.PI;function dh(s){return s>.008856451679035631?Math.pow(s,1/3):s/Wu+4/29}function Cp(s){return s>6/29?s*s*s:Wu*(s-4/29)}function Rp(s){return 255*(s<=.0031308?12.92*s:1.055*Math.pow(s,1/2.4)-.055)}function Ip(s){return(s/=255)<=.04045?s/12.92:Math.pow((s+.055)/1.055,2.4)}function U1(s){var l=Ip(s.r),h=Ip(s.g),g=Ip(s.b),x=dh((.4124564*l+.3575761*h+.1804375*g)/.95047),E=dh((.2126729*l+.7151522*h+.072175*g)/1);return{l:116*E-16,a:500*(x-E),b:200*(E-dh((.0193339*l+.119192*h+.9503041*g)/1.08883)),alpha:s.a}}function z1(s){var l=(s.l+16)/116,h=isNaN(s.a)?l:l+s.a/500,g=isNaN(s.b)?l:l-s.b/200;return l=1*Cp(l),h=.95047*Cp(h),g=1.08883*Cp(g),new si(Rp(3.2404542*h-1.5371385*l-.4985314*g),Rp(-.969266*h+1.8760108*l+.041556*g),Rp(.0556434*h-.2040259*l+1.0572252*g),s.alpha)}function O0(s,l,h){var g=l-s;return s+h*(g>180||g<-180?g-360*Math.round(g/360):g)}var Ef={forward:U1,reverse:z1,interpolate:function(s,l,h){return{l:Ra(s.l,l.l,h),a:Ra(s.a,l.a,h),b:Ra(s.b,l.b,h),alpha:Ra(s.alpha,l.alpha,h)}}},bu={forward:function(s){var l=U1(s),h=l.l,g=l.a,x=l.b,E=Math.atan2(x,g)*N1;return{h:E<0?E+360:E,c:Math.sqrt(g*g+x*x),l:h,alpha:s.a}},reverse:function(s){var l=s.h*ph,h=s.c;return z1({l:s.l,a:Math.cos(l)*h,b:Math.sin(l)*h,alpha:s.alpha})},interpolate:function(s,l,h){return{h:O0(s.h,l.h,h),c:Ra(s.c,l.c,h),l:Ra(s.l,l.l,h),alpha:Ra(s.alpha,l.alpha,h)}}},$1=Object.freeze({__proto__:null,lab:Ef,hcl:bu}),Co=function(s,l,h,g,x){this.type=s,this.operator=l,this.interpolation=h,this.input=g,this.labels=[],this.outputs=[];for(var E=0,T=x;E1}))return l.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);g={name:"cubic-bezier",controlPoints:M}}if(s.length-1<4)return l.error("Expected at least 4 arguments, but found only "+(s.length-1)+".");if((s.length-1)%2!=0)return l.error("Expected an even number of arguments.");if(!(x=l.parse(x,2,Dt)))return null;var D=[],N=null;h==="interpolate-hcl"||h==="interpolate-lab"?N=Pr:l.expectedType&&l.expectedType.kind!=="value"&&(N=l.expectedType);for(var $=0;$=H)return l.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',re);var Se=l.parse(q,xe,N);if(!Se)return null;N=N||Se.type,D.push([H,Se])}return N.kind==="number"||N.kind==="color"||N.kind==="array"&&N.itemType.kind==="number"&&typeof N.N=="number"?new Co(N,h,g,x,D):l.error("Type "+Gn(N)+" is not interpolatable.")},Co.prototype.evaluate=function(s){var l=this.labels,h=this.outputs;if(l.length===1)return h[0].evaluate(s);var g=this.input.evaluate(s);if(g<=l[0])return h[0].evaluate(s);var x=l.length;if(g>=l[x-1])return h[x-1].evaluate(s);var E=bf(l,g),T=Co.interpolationFactor(this.interpolation,g,l[E],l[E+1]),M=h[E].evaluate(s),D=h[E+1].evaluate(s);return this.operator==="interpolate"?_l[this.type.kind.toLowerCase()](M,D,T):this.operator==="interpolate-hcl"?bu.reverse(bu.interpolate(bu.forward(M),bu.forward(D),T)):Ef.reverse(Ef.interpolate(Ef.forward(M),Ef.forward(D),T))},Co.prototype.eachChild=function(s){s(this.input);for(var l=0,h=this.outputs;l=h.length)throw new ua("Array index out of bounds: "+l+" > "+(h.length-1)+".");if(l!==Math.floor(l))throw new ua("Array index must be an integer, but found "+l+" instead.");return h[l]},xl.prototype.eachChild=function(s){s(this.index),s(this.input)},xl.prototype.outputDefined=function(){return!1},xl.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var js=function(s,l){this.type=Rr,this.needle=s,this.haystack=l};js.parse=function(s,l){if(s.length!==3)return l.error("Expected 2 arguments, but found "+(s.length-1)+" instead.");var h=l.parse(s[1],1,Lr),g=l.parse(s[2],2,Lr);return h&&g?Wi(h.type,[Rr,zr,Dt,qr,Lr])?new js(h,g):l.error("Expected first argument to be of type boolean, string, number or null, but found "+Gn(h.type)+" instead"):null},js.prototype.evaluate=function(s){var l=this.needle.evaluate(s),h=this.haystack.evaluate(s);if(!h)return!1;if(!Ii(l,["boolean","string","number","null"]))throw new ua("Expected first argument to be of type boolean, string, number or null, but found "+Gn(sa(l))+" instead.");if(!Ii(h,["string","array"]))throw new ua("Expected second argument to be of type array or string, but found "+Gn(sa(h))+" instead.");return h.indexOf(l)>=0},js.prototype.eachChild=function(s){s(this.needle),s(this.haystack)},js.prototype.outputDefined=function(){return!0},js.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Xu=function(s,l,h){this.type=Dt,this.needle=s,this.haystack=l,this.fromIndex=h};Xu.parse=function(s,l){if(s.length<=2||s.length>=5)return l.error("Expected 3 or 4 arguments, but found "+(s.length-1)+" instead.");var h=l.parse(s[1],1,Lr),g=l.parse(s[2],2,Lr);if(!h||!g)return null;if(!Wi(h.type,[Rr,zr,Dt,qr,Lr]))return l.error("Expected first argument to be of type boolean, string, number or null, but found "+Gn(h.type)+" instead");if(s.length===4){var x=l.parse(s[3],3,Dt);return x?new Xu(h,g,x):null}return new Xu(h,g)},Xu.prototype.evaluate=function(s){var l=this.needle.evaluate(s),h=this.haystack.evaluate(s);if(!Ii(l,["boolean","string","number","null"]))throw new ua("Expected first argument to be of type boolean, string, number or null, but found "+Gn(sa(l))+" instead.");if(!Ii(h,["string","array"]))throw new ua("Expected second argument to be of type array or string, but found "+Gn(sa(h))+" instead.");if(this.fromIndex){var g=this.fromIndex.evaluate(s);return h.indexOf(l,g)}return h.indexOf(l)},Xu.prototype.eachChild=function(s){s(this.needle),s(this.haystack),this.fromIndex&&s(this.fromIndex)},Xu.prototype.outputDefined=function(){return!1},Xu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var s=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),s]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Rs=function(s,l,h,g,x,E){this.inputType=s,this.type=l,this.input=h,this.cases=g,this.outputs=x,this.otherwise=E};Rs.parse=function(s,l){if(s.length<5)return l.error("Expected at least 4 arguments, but found only "+(s.length-1)+".");if(s.length%2!=1)return l.error("Expected an even number of arguments.");var h,g;l.expectedType&&l.expectedType.kind!=="value"&&(g=l.expectedType);for(var x={},E=[],T=2;TNumber.MAX_SAFE_INTEGER)return N.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof q=="number"&&Math.floor(q)!==q)return N.error("Numeric branch labels must be integer values.");if(h){if(N.checkSubtype(h,sa(q)))return null}else h=sa(q);if(x[String(q)]!==void 0)return N.error("Branch labels must be unique.");x[String(q)]=E.length}var re=l.parse(D,T,g);if(!re)return null;g=g||re.type,E.push(re)}var xe=l.parse(s[1],1,Lr);if(!xe)return null;var Se=l.parse(s[s.length-1],s.length-1,g);return Se?xe.type.kind!=="value"&&l.concat(1).checkSubtype(h,xe.type)?null:new Rs(h,g,xe,x,E,Se):null},Rs.prototype.evaluate=function(s){var l=this.input.evaluate(s);return(sa(l)===this.inputType&&this.outputs[this.cases[l]]||this.otherwise).evaluate(s)},Rs.prototype.eachChild=function(s){s(this.input),this.outputs.forEach(s),s(this.otherwise)},Rs.prototype.outputDefined=function(){return this.outputs.every(function(s){return s.outputDefined()})&&this.otherwise.outputDefined()},Rs.prototype.serialize=function(){for(var s=this,l=["match",this.input.serialize()],h=[],g={},x=0,E=Object.keys(this.cases).sort();x=5)return l.error("Expected 3 or 4 arguments, but found "+(s.length-1)+" instead.");var h=l.parse(s[1],1,Lr),g=l.parse(s[2],2,Dt);if(!h||!g)return null;if(!Wi(h.type,[_i(Lr),zr,Lr]))return l.error("Expected first argument to be of type array or string, but found "+Gn(h.type)+" instead");if(s.length===4){var x=l.parse(s[3],3,Dt);return x?new bl(h.type,h,g,x):null}return new bl(h.type,h,g)},bl.prototype.evaluate=function(s){var l=this.input.evaluate(s),h=this.beginIndex.evaluate(s);if(!Ii(l,["string","array"]))throw new ua("Expected first argument to be of type array or string, but found "+Gn(sa(l))+" instead.");if(this.endIndex){var g=this.endIndex.evaluate(s);return l.slice(h,g)}return l.slice(h)},bl.prototype.eachChild=function(s){s(this.input),s(this.beginIndex),this.endIndex&&s(this.endIndex)},bl.prototype.outputDefined=function(){return!1},bl.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var s=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),s]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var k0=Xi("==",function(s,l,h){return l===h},j1),vh=Xi("!=",function(s,l,h){return l!==h},function(s,l,h,g){return!j1(0,l,h,g)}),Mp=Xi("<",function(s,l,h){return l",function(s,l,h){return l>h},function(s,l,h,g){return g.compare(l,h)>0}),Pp=Xi("<=",function(s,l,h){return l<=h},function(s,l,h,g){return g.compare(l,h)<=0}),H1=Xi(">=",function(s,l,h){return l>=h},function(s,l,h,g){return g.compare(l,h)>=0}),ns=function(s,l,h,g,x){this.type=zr,this.number=s,this.locale=l,this.currency=h,this.minFractionDigits=g,this.maxFractionDigits=x};ns.parse=function(s,l){if(s.length!==3)return l.error("Expected two arguments.");var h=l.parse(s[1],1,Dt);if(!h)return null;var g=s[2];if(typeof g!="object"||Array.isArray(g))return l.error("NumberFormat options argument must be an object.");var x=null;if(g.locale&&!(x=l.parse(g.locale,1,zr)))return null;var E=null;if(g.currency&&!(E=l.parse(g.currency,1,zr)))return null;var T=null;if(g["min-fraction-digits"]&&!(T=l.parse(g["min-fraction-digits"],1,Dt)))return null;var M=null;return g["max-fraction-digits"]&&!(M=l.parse(g["max-fraction-digits"],1,Dt))?null:new ns(h,x,E,T,M)},ns.prototype.evaluate=function(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))},ns.prototype.eachChild=function(s){s(this.number),this.locale&&s(this.locale),this.currency&&s(this.currency),this.minFractionDigits&&s(this.minFractionDigits),this.maxFractionDigits&&s(this.maxFractionDigits)},ns.prototype.outputDefined=function(){return!1},ns.prototype.serialize=function(){var s={};return this.locale&&(s.locale=this.locale.serialize()),this.currency&&(s.currency=this.currency.serialize()),this.minFractionDigits&&(s["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(s["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),s]};var Zu=function(s){this.type=Dt,this.input=s};Zu.parse=function(s,l){if(s.length!==2)return l.error("Expected 1 argument, but found "+(s.length-1)+" instead.");var h=l.parse(s[1],1);return h?h.type.kind!=="array"&&h.type.kind!=="string"&&h.type.kind!=="value"?l.error("Expected argument of type string or array, but found "+Gn(h.type)+" instead."):new Zu(h):null},Zu.prototype.evaluate=function(s){var l=this.input.evaluate(s);if(typeof l=="string"||Array.isArray(l))return l.length;throw new ua("Expected value to be of type string or array, but found "+Gn(sa(l))+" instead.")},Zu.prototype.eachChild=function(s){s(this.input)},Zu.prototype.outputDefined=function(){return!1},Zu.prototype.serialize=function(){var s=["length"];return this.eachChild(function(l){s.push(l.serialize())}),s};var Eu={"==":k0,"!=":vh,">":Ia,"<":Mp,">=":H1,"<=":Pp,array:Qi,at:xl,boolean:Qi,case:Yu,coalesce:yl,collator:Ue,format:Go,image:Bo,in:js,"index-of":Xu,interpolate:Co,"interpolate-hcl":Co,"interpolate-lab":Co,length:Zu,let:Cs,literal:ro,match:Rs,number:Qi,"number-format":ns,object:Qi,slice:bl,step:ms,string:Qi,"to-boolean":vs,"to-color":vs,"to-number":vs,"to-string":vs,var:xu,within:wo};function El(s,l){var h=l[0],g=l[1],x=l[2],E=l[3];h=h.evaluate(s),g=g.evaluate(s),x=x.evaluate(s);var T=E?E.evaluate(s):1,M=vl(h,g,x,T);if(M)throw new ua(M);return new si(h/255*T,g/255*T,x/255*T,T)}function mh(s,l){return s in l}function wc(s,l){var h=l[s];return h===void 0?null:h}function ou(s){return{type:s}}function Sf(s){return{result:"success",value:s}}function Sl(s){return{result:"error",value:s}}function qu(s){return s["property-type"]==="data-driven"||s["property-type"]==="cross-faded-data-driven"}function Op(s){return!!s.expression&&s.expression.parameters.indexOf("zoom")>-1}function Af(s){return!!s.expression&&s.expression.interpolated}function ta(s){return s instanceof Number?"number":s instanceof String?"string":s instanceof Boolean?"boolean":Array.isArray(s)?"array":s===null?"null":typeof s}function gh(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)}function D0(s){return s}function Al(s,l,h){return s!==void 0?s:l!==void 0?l:h!==void 0?h:void 0}function Tf(s,l,h,g,x){return Al(typeof h===x?g[h]:void 0,s.default,l.default)}function kp(s,l,h){if(ta(h)!=="number")return Al(s.default,l.default);var g=s.stops.length;if(g===1||h<=s.stops[0][0])return s.stops[0][1];if(h>=s.stops[g-1][0])return s.stops[g-1][1];var x=bf(s.stops.map(function(E){return E[0]}),h);return s.stops[x][1]}function _h(s,l,h){var g=s.base!==void 0?s.base:1;if(ta(h)!=="number")return Al(s.default,l.default);var x=s.stops.length;if(x===1||h<=s.stops[0][0])return s.stops[0][1];if(h>=s.stops[x-1][0])return s.stops[x-1][1];var E=bf(s.stops.map(function(H){return H[0]}),h),T=function(H,q,re,xe){var Se=xe-re,ze=H-re;return Se===0?0:q===1?ze/Se:(Math.pow(q,ze)-1)/(Math.pow(q,Se)-1)}(h,g,s.stops[E][0],s.stops[E+1][0]),M=s.stops[E][1],D=s.stops[E+1][1],N=_l[l.type]||D0;if(s.colorSpace&&s.colorSpace!=="rgb"){var $=$1[s.colorSpace];N=function(H,q){return $.reverse($.interpolate($.forward(H),$.forward(q),T))}}return typeof M.evaluate=="function"?{evaluate:function(){for(var H=[],q=arguments.length;q--;)H[q]=arguments[q];var re=M.evaluate.apply(void 0,H),xe=D.evaluate.apply(void 0,H);if(re!==void 0&&xe!==void 0)return N(re,xe,T)}}:N(M,D,T)}function Ku(s,l,h){return l.type==="color"?h=si.parse(h):l.type==="formatted"?h=wa.fromString(h.toString()):l.type==="resolvedImage"?h=fa.fromString(h.toString()):ta(h)===l.type||l.type==="enum"&&l.values[h]||(h=void 0),Al(h,s.default,l.default)}ue.register(Eu,{error:[{kind:"error"},[zr],function(s,l){throw new ua(l[0].evaluate(s))}],typeof:[zr,[Lr],function(s,l){return Gn(sa(l[0].evaluate(s)))}],"to-rgba":[_i(Dt,4),[Pr],function(s,l){return l[0].evaluate(s).toArray()}],rgb:[Pr,[Dt,Dt,Dt],El],rgba:[Pr,[Dt,Dt,Dt,Dt],El],has:{type:Rr,overloads:[[[zr],function(s,l){return mh(l[0].evaluate(s),s.properties())}],[[zr,Hn],function(s,l){var h=l[1];return mh(l[0].evaluate(s),h.evaluate(s))}]]},get:{type:Lr,overloads:[[[zr],function(s,l){return wc(l[0].evaluate(s),s.properties())}],[[zr,Hn],function(s,l){var h=l[1];return wc(l[0].evaluate(s),h.evaluate(s))}]]},"feature-state":[Lr,[zr],function(s,l){return wc(l[0].evaluate(s),s.featureState||{})}],properties:[Hn,[],function(s){return s.properties()}],"geometry-type":[zr,[],function(s){return s.geometryType()}],id:[Lr,[],function(s){return s.id()}],zoom:[Dt,[],function(s){return s.globals.zoom}],"heatmap-density":[Dt,[],function(s){return s.globals.heatmapDensity||0}],"line-progress":[Dt,[],function(s){return s.globals.lineProgress||0}],accumulated:[Lr,[],function(s){return s.globals.accumulated===void 0?null:s.globals.accumulated}],"+":[Dt,ou(Dt),function(s,l){for(var h=0,g=0,x=l;g":[Rr,[zr,Lr],function(s,l){var h=l[0],g=l[1],x=s.properties()[h.value],E=g.value;return typeof x==typeof E&&x>E}],"filter-id->":[Rr,[Lr],function(s,l){var h=l[0],g=s.id(),x=h.value;return typeof g==typeof x&&g>x}],"filter-<=":[Rr,[zr,Lr],function(s,l){var h=l[0],g=l[1],x=s.properties()[h.value],E=g.value;return typeof x==typeof E&&x<=E}],"filter-id-<=":[Rr,[Lr],function(s,l){var h=l[0],g=s.id(),x=h.value;return typeof g==typeof x&&g<=x}],"filter->=":[Rr,[zr,Lr],function(s,l){var h=l[0],g=l[1],x=s.properties()[h.value],E=g.value;return typeof x==typeof E&&x>=E}],"filter-id->=":[Rr,[Lr],function(s,l){var h=l[0],g=s.id(),x=h.value;return typeof g==typeof x&&g>=x}],"filter-has":[Rr,[Lr],function(s,l){return l[0].value in s.properties()}],"filter-has-id":[Rr,[],function(s){return s.id()!==null&&s.id()!==void 0}],"filter-type-in":[Rr,[_i(zr)],function(s,l){return l[0].value.indexOf(s.geometryType())>=0}],"filter-id-in":[Rr,[_i(Lr)],function(s,l){return l[0].value.indexOf(s.id())>=0}],"filter-in-small":[Rr,[zr,_i(Lr)],function(s,l){var h=l[0];return l[1].value.indexOf(s.properties()[h.value])>=0}],"filter-in-large":[Rr,[zr,_i(Lr)],function(s,l){var h=l[0],g=l[1];return function(x,E,T,M){for(;T<=M;){var D=T+M>>1;if(E[D]===x)return!0;E[D]>x?M=D-1:T=D+1}return!1}(s.properties()[h.value],g.value,0,g.value.length-1)}],all:{type:Rr,overloads:[[[Rr,Rr],function(s,l){var h=l[1];return l[0].evaluate(s)&&h.evaluate(s)}],[ou(Rr),function(s,l){for(var h=0,g=l;h0&&typeof s[0]=="string"&&s[0]in Eu}function Cc(s,l){var h=new Gu(Eu,[],l?function(x){var E={color:Pr,string:zr,number:Dt,enum:zr,boolean:Rr,formatted:Gi,resolvedImage:oi};return x.type==="array"?_i(E[x.value]||Lr,x.length):E[x.type]}(l):void 0),g=h.parse(s,void 0,void 0,void 0,l&&l.type==="string"?{typeAnnotation:"coerce"}:void 0);return g?Sf(new Tl(g,l)):Sl(h.errors)}Tl.prototype.evaluateWithoutErrorHandling=function(s,l,h,g,x,E){return this._evaluator.globals=s,this._evaluator.feature=l,this._evaluator.featureState=h,this._evaluator.canonical=g,this._evaluator.availableImages=x||null,this._evaluator.formattedSection=E,this.expression.evaluate(this._evaluator)},Tl.prototype.evaluate=function(s,l,h,g,x,E){this._evaluator.globals=s,this._evaluator.feature=l||null,this._evaluator.featureState=h||null,this._evaluator.canonical=g,this._evaluator.availableImages=x||null,this._evaluator.formattedSection=E||null;try{var T=this.expression.evaluate(this._evaluator);if(T==null||typeof T=="number"&&T!=T)return this._defaultValue;if(this._enumValues&&!(T in this._enumValues))throw new ua("Expected value to be one of "+Object.keys(this._enumValues).map(function(M){return JSON.stringify(M)}).join(", ")+", but found "+JSON.stringify(T)+" instead.");return T}catch(M){return this._warningHistory[M.message]||(this._warningHistory[M.message]=!0,typeof console<"u"&&console.warn(M.message)),this._defaultValue}};var ec=function(s,l){this.kind=s,this._styleExpression=l,this.isStateDependent=s!=="constant"&&!gl(l.expression)};ec.prototype.evaluateWithoutErrorHandling=function(s,l,h,g,x,E){return this._styleExpression.evaluateWithoutErrorHandling(s,l,h,g,x,E)},ec.prototype.evaluate=function(s,l,h,g,x,E){return this._styleExpression.evaluate(s,l,h,g,x,E)};var tc=function(s,l,h,g){this.kind=s,this.zoomStops=h,this._styleExpression=l,this.isStateDependent=s!=="camera"&&!gl(l.expression),this.interpolationType=g};function Dp(s,l){if((s=Cc(s,l)).result==="error")return s;var h=s.value.expression,g=ml(h);if(!g&&!qu(l))return Sl([new ar("","data expressions not supported")]);var x=yu(h,["zoom"]);if(!x&&!Op(l))return Sl([new ar("","zoom expressions not supported")]);var E=function T(M){var D=null;if(M instanceof Cs)D=T(M.result);else if(M instanceof yl)for(var N=0,$=M.args;N<$.length&&!(D=T($[N]));N+=1);else(M instanceof ms||M instanceof Co)&&M.input instanceof ue&&M.input.name==="zoom"&&(D=M);return D instanceof ar||M.eachChild(function(H){var q=T(H);q instanceof ar?D=q:!D&&q?D=new ar("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):D&&q&&D!==q&&(D=new ar("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),D}(h);return E||x?E instanceof ar?Sl([E]):E instanceof Co&&!Af(l)?Sl([new ar("",'"interpolate" expressions cannot be used with this property')]):Sf(E?new tc(g?"camera":"composite",s.value,E.labels,E instanceof Co?E.interpolation:void 0):new ec(g?"constant":"source",s.value)):Sl([new ar("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}tc.prototype.evaluateWithoutErrorHandling=function(s,l,h,g,x,E){return this._styleExpression.evaluateWithoutErrorHandling(s,l,h,g,x,E)},tc.prototype.evaluate=function(s,l,h,g,x,E){return this._styleExpression.evaluate(s,l,h,g,x,E)},tc.prototype.interpolationFactor=function(s,l,h){return this.interpolationType?Co.interpolationFactor(this.interpolationType,s,l,h):0};var rc=function(s,l){this._parameters=s,this._specification=l,Nt(this,function h(g,x){var E,T,M,D=x.type==="color",N=g.stops&&typeof g.stops[0][0]=="object",$=N||!(N||g.property!==void 0),H=g.type||(Af(x)?"exponential":"interval");if(D&&((g=Nt({},g)).stops&&(g.stops=g.stops.map(function(Gr){return[Gr[0],si.parse(Gr[1])]})),g.default=si.parse(g.default?g.default:x.default)),g.colorSpace&&g.colorSpace!=="rgb"&&!$1[g.colorSpace])throw new Error("Unknown color space: "+g.colorSpace);if(H==="exponential")E=_h;else if(H==="interval")E=kp;else if(H==="categorical"){E=Tf,T=Object.create(null);for(var q=0,re=g.stops;qg.maximum?[new Ce(l,h,h+" is greater than the maximum value "+g.maximum)]:[]}function Lp(s){var l,h,g,x=s.valueSpec,E=vr(s.value.type),T={},M=E!=="categorical"&&s.value.property===void 0,D=!M,N=ta(s.value.stops)==="array"&&ta(s.value.stops[0])==="array"&&ta(s.value.stops[0][0])==="object",$=Hs({key:s.key,value:s.value,valueSpec:s.styleSpec.function,style:s.style,styleSpec:s.styleSpec,objectElementValidators:{stops:function(re){if(E==="identity")return[new Ce(re.key,re.value,'identity function may not have a "stops" property')];var xe=[],Se=re.value;return xe=xe.concat(Fp({key:re.key,value:Se,valueSpec:re.valueSpec,style:re.style,styleSpec:re.styleSpec,arrayElementValidator:H})),ta(Se)==="array"&&Se.length===0&&xe.push(new Ce(re.key,Se,"array must have at least one stop")),xe},default:function(re){return yi({key:re.key,value:re.value,valueSpec:x,style:re.style,styleSpec:re.styleSpec})}}});return E==="identity"&&M&&$.push(new Ce(s.key,s.value,'missing required property "property"')),E==="identity"||s.value.stops||$.push(new Ce(s.key,s.value,'missing required property "stops"')),E==="exponential"&&s.valueSpec.expression&&!Af(s.valueSpec)&&$.push(new Ce(s.key,s.value,"exponential functions not supported")),s.styleSpec.$version>=8&&(D&&!qu(s.valueSpec)?$.push(new Ce(s.key,s.value,"property functions not supported")):M&&!Op(s.valueSpec)&&$.push(new Ce(s.key,s.value,"zoom functions not supported"))),E!=="categorical"&&!N||s.value.property!==void 0||$.push(new Ce(s.key,s.value,'"property" property is required')),$;function H(re){var xe=[],Se=re.value,ze=re.key;if(ta(Se)!=="array")return[new Ce(ze,Se,"array expected, "+ta(Se)+" found")];if(Se.length!==2)return[new Ce(ze,Se,"array length 2 expected, length "+Se.length+" found")];if(N){if(ta(Se[0])!=="object")return[new Ce(ze,Se,"object expected, "+ta(Se[0])+" found")];if(Se[0].zoom===void 0)return[new Ce(ze,Se,"object stop key must have zoom")];if(Se[0].value===void 0)return[new Ce(ze,Se,"object stop key must have value")];if(g&&g>vr(Se[0].zoom))return[new Ce(ze,Se[0].zoom,"stop zoom values must appear in ascending order")];vr(Se[0].zoom)!==g&&(g=vr(Se[0].zoom),h=void 0,T={}),xe=xe.concat(Hs({key:ze+"[0]",value:Se[0],valueSpec:{zoom:{}},style:re.style,styleSpec:re.styleSpec,objectElementValidators:{zoom:Bp,value:q}}))}else xe=xe.concat(q({key:ze+"[0]",value:Se[0],valueSpec:{},style:re.style,styleSpec:re.styleSpec},Se));return Jl(Ot(Se[1]))?xe.concat([new Ce(ze+"[1]",Se[1],"expressions are not allowed in function stops.")]):xe.concat(yi({key:ze+"[1]",value:Se[1],valueSpec:x,style:re.style,styleSpec:re.styleSpec}))}function q(re,xe){var Se=ta(re.value),ze=vr(re.value),Oe=re.value!==null?re.value:xe;if(l){if(Se!==l)return[new Ce(re.key,Oe,Se+" stop domain type must match previous stop domain type "+l)]}else l=Se;if(Se!=="number"&&Se!=="string"&&Se!=="boolean")return[new Ce(re.key,Oe,"stop domain value must be a number, string, or boolean")];if(Se!=="number"&&E!=="categorical"){var et="number expected, "+Se+" found";return qu(x)&&E===void 0&&(et+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ce(re.key,Oe,et)]}return E!=="categorical"||Se!=="number"||isFinite(ze)&&Math.floor(ze)===ze?E!=="categorical"&&Se==="number"&&h!==void 0&&ze=2&&s[1]!=="$id"&&s[1]!=="$type";case"in":return s.length>=3&&(typeof s[1]!="string"||Array.isArray(s[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return s.length!==3||Array.isArray(s[1])||Array.isArray(s[2]);case"any":case"all":for(var l=0,h=s.slice(1);ll?1:0}function yh(s){if(!s)return!0;var l,h=s[0];return s.length<=1?h!=="any":h==="=="?Np(s[1],s[2],"=="):h==="!="?bh(Np(s[1],s[2],"==")):h==="<"||h===">"||h==="<="||h===">="?Np(s[1],s[2],h):h==="any"?(l=s.slice(1),["any"].concat(l.map(yh))):h==="all"?["all"].concat(s.slice(1).map(yh)):h==="none"?["all"].concat(s.slice(1).map(yh).map(bh)):h==="in"?xh(s[1],s.slice(2)):h==="!in"?bh(xh(s[1],s.slice(2))):h==="has"?G1(s[1]):h==="!has"?bh(G1(s[1])):h!=="within"||s}function Np(s,l,h){switch(s){case"$type":return["filter-type-"+h,l];case"$id":return["filter-id-"+h,l];default:return["filter-"+h,s,l]}}function xh(s,l){if(l.length===0)return!1;switch(s){case"$type":return["filter-type-in",["literal",l]];case"$id":return["filter-id-in",["literal",l]];default:return l.length>200&&!l.some(function(h){return typeof h!=typeof l[0]})?["filter-in-large",s,["literal",l.sort(F0)]]:["filter-in-small",s,["literal",l]]}}function G1(s){switch(s){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",s]}}function bh(s){return["!",s]}function Up(s){return Rc(Ot(s.value))?wl(Nt({},s,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function l(h){var g=h.value,x=h.key;if(ta(g)!=="array")return[new Ce(x,g,"array expected, "+ta(g)+" found")];var E,T=h.styleSpec,M=[];if(g.length<1)return[new Ce(x,g,"filter array must have at least 1 element")];switch(M=M.concat(Su({key:x+"[0]",value:g[0],valueSpec:T.filter_operator,style:h.style,styleSpec:h.styleSpec})),vr(g[0])){case"<":case"<=":case">":case">=":g.length>=2&&vr(g[1])==="$type"&&M.push(new Ce(x,g,'"$type" cannot be use with operator "'+g[0]+'"'));case"==":case"!=":g.length!==3&&M.push(new Ce(x,g,'filter array for operator "'+g[0]+'" must have 3 elements'));case"in":case"!in":g.length>=2&&(E=ta(g[1]))!=="string"&&M.push(new Ce(x+"[1]",g[1],"string expected, "+E+" found"));for(var D=2;D=$[re+0]&&g>=$[re+1])?(T[q]=!0,E.push(N[q])):T[q]=!1}}},ma.prototype._forEachCell=function(s,l,h,g,x,E,T,M){for(var D=this._convertToCellCoord(s),N=this._convertToCellCoord(l),$=this._convertToCellCoord(h),H=this._convertToCellCoord(g),q=D;q<=$;q++)for(var re=N;re<=H;re++){var xe=this.d*re+q;if((!M||M(this._convertFromCellCoord(q),this._convertFromCellCoord(re),this._convertFromCellCoord(q+1),this._convertFromCellCoord(re+1)))&&x.call(this,s,l,h,g,xe,E,T,M))return}},ma.prototype._convertFromCellCoord=function(s){return(s-this.padding)/this.scale},ma.prototype._convertToCellCoord=function(s){return Math.max(0,Math.min(this.d-1,Math.floor(s*this.scale)+this.padding))},ma.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var s=this.cells,l=3+this.cells.length+1+1,h=0,g=0;g=0)){var $=s[N];D[N]=Da[M].shallow.indexOf(N)>=0?$:Wo($,l)}s instanceof Error&&(D.message=s.message)}if(D.$name)throw new Error("$name property is reserved for worker serialization logic.");return M!=="Object"&&(D.$name=M),D}throw new Error("can't serialize object of type "+typeof s)}function Yi(s){if(s==null||typeof s=="boolean"||typeof s=="number"||typeof s=="string"||s instanceof Boolean||s instanceof Number||s instanceof String||s instanceof Date||s instanceof RegExp||Pf(s)||Pc(s)||ArrayBuffer.isView(s)||s instanceof Mc)return s;if(Array.isArray(s))return s.map(Yi);if(typeof s=="object"){var l=s.$name||"Object",h=Da[l].klass;if(!h)throw new Error("can't deserialize unregistered class "+l);if(h.deserialize)return h.deserialize(s);for(var g=Object.create(h.prototype),x=0,E=Object.keys(s);x=0?M:Yi(M)}}return g}throw new Error("can't deserialize object of type "+typeof s)}var Ah=function(){this.first=!0};Ah.prototype.update=function(s,l){var h=Math.floor(s);return this.first?(this.first=!1,this.lastIntegerZoom=h,this.lastIntegerZoomTime=0,this.lastZoom=s,this.lastFloorZoom=h,!0):(this.lastFloorZoom>h?(this.lastIntegerZoom=h+1,this.lastIntegerZoomTime=l):this.lastFloorZoom=128&&s<=255},Arabic:function(s){return s>=1536&&s<=1791},"Arabic Supplement":function(s){return s>=1872&&s<=1919},"Arabic Extended-A":function(s){return s>=2208&&s<=2303},"Hangul Jamo":function(s){return s>=4352&&s<=4607},"Unified Canadian Aboriginal Syllabics":function(s){return s>=5120&&s<=5759},Khmer:function(s){return s>=6016&&s<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(s){return s>=6320&&s<=6399},"General Punctuation":function(s){return s>=8192&&s<=8303},"Letterlike Symbols":function(s){return s>=8448&&s<=8527},"Number Forms":function(s){return s>=8528&&s<=8591},"Miscellaneous Technical":function(s){return s>=8960&&s<=9215},"Control Pictures":function(s){return s>=9216&&s<=9279},"Optical Character Recognition":function(s){return s>=9280&&s<=9311},"Enclosed Alphanumerics":function(s){return s>=9312&&s<=9471},"Geometric Shapes":function(s){return s>=9632&&s<=9727},"Miscellaneous Symbols":function(s){return s>=9728&&s<=9983},"Miscellaneous Symbols and Arrows":function(s){return s>=11008&&s<=11263},"CJK Radicals Supplement":function(s){return s>=11904&&s<=12031},"Kangxi Radicals":function(s){return s>=12032&&s<=12255},"Ideographic Description Characters":function(s){return s>=12272&&s<=12287},"CJK Symbols and Punctuation":function(s){return s>=12288&&s<=12351},Hiragana:function(s){return s>=12352&&s<=12447},Katakana:function(s){return s>=12448&&s<=12543},Bopomofo:function(s){return s>=12544&&s<=12591},"Hangul Compatibility Jamo":function(s){return s>=12592&&s<=12687},Kanbun:function(s){return s>=12688&&s<=12703},"Bopomofo Extended":function(s){return s>=12704&&s<=12735},"CJK Strokes":function(s){return s>=12736&&s<=12783},"Katakana Phonetic Extensions":function(s){return s>=12784&&s<=12799},"Enclosed CJK Letters and Months":function(s){return s>=12800&&s<=13055},"CJK Compatibility":function(s){return s>=13056&&s<=13311},"CJK Unified Ideographs Extension A":function(s){return s>=13312&&s<=19903},"Yijing Hexagram Symbols":function(s){return s>=19904&&s<=19967},"CJK Unified Ideographs":function(s){return s>=19968&&s<=40959},"Yi Syllables":function(s){return s>=40960&&s<=42127},"Yi Radicals":function(s){return s>=42128&&s<=42191},"Hangul Jamo Extended-A":function(s){return s>=43360&&s<=43391},"Hangul Syllables":function(s){return s>=44032&&s<=55215},"Hangul Jamo Extended-B":function(s){return s>=55216&&s<=55295},"Private Use Area":function(s){return s>=57344&&s<=63743},"CJK Compatibility Ideographs":function(s){return s>=63744&&s<=64255},"Arabic Presentation Forms-A":function(s){return s>=64336&&s<=65023},"Vertical Forms":function(s){return s>=65040&&s<=65055},"CJK Compatibility Forms":function(s){return s>=65072&&s<=65103},"Small Form Variants":function(s){return s>=65104&&s<=65135},"Arabic Presentation Forms-B":function(s){return s>=65136&&s<=65279},"Halfwidth and Fullwidth Forms":function(s){return s>=65280&&s<=65519}};function Qu(s){for(var l=0,h=s;l=65097&&s<=65103)||Dr["CJK Compatibility Ideographs"](s)||Dr["CJK Compatibility"](s)||Dr["CJK Radicals Supplement"](s)||Dr["CJK Strokes"](s)||!(!Dr["CJK Symbols and Punctuation"](s)||s>=12296&&s<=12305||s>=12308&&s<=12319||s===12336)||Dr["CJK Unified Ideographs Extension A"](s)||Dr["CJK Unified Ideographs"](s)||Dr["Enclosed CJK Letters and Months"](s)||Dr["Hangul Compatibility Jamo"](s)||Dr["Hangul Jamo Extended-A"](s)||Dr["Hangul Jamo Extended-B"](s)||Dr["Hangul Jamo"](s)||Dr["Hangul Syllables"](s)||Dr.Hiragana(s)||Dr["Ideographic Description Characters"](s)||Dr.Kanbun(s)||Dr["Kangxi Radicals"](s)||Dr["Katakana Phonetic Extensions"](s)||Dr.Katakana(s)&&s!==12540||!(!Dr["Halfwidth and Fullwidth Forms"](s)||s===65288||s===65289||s===65293||s>=65306&&s<=65310||s===65339||s===65341||s===65343||s>=65371&&s<=65503||s===65507||s>=65512&&s<=65519)||!(!Dr["Small Form Variants"](s)||s>=65112&&s<=65118||s>=65123&&s<=65126)||Dr["Unified Canadian Aboriginal Syllabics"](s)||Dr["Unified Canadian Aboriginal Syllabics Extended"](s)||Dr["Vertical Forms"](s)||Dr["Yijing Hexagram Symbols"](s)||Dr["Yi Syllables"](s)||Dr["Yi Radicals"](s))))}function Th(s){return!(Of(s)||function(l){return!!(Dr["Latin-1 Supplement"](l)&&(l===167||l===169||l===174||l===177||l===188||l===189||l===190||l===215||l===247)||Dr["General Punctuation"](l)&&(l===8214||l===8224||l===8225||l===8240||l===8241||l===8251||l===8252||l===8258||l===8263||l===8264||l===8265||l===8273)||Dr["Letterlike Symbols"](l)||Dr["Number Forms"](l)||Dr["Miscellaneous Technical"](l)&&(l>=8960&&l<=8967||l>=8972&&l<=8991||l>=8996&&l<=9e3||l===9003||l>=9085&&l<=9114||l>=9150&&l<=9165||l===9167||l>=9169&&l<=9179||l>=9186&&l<=9215)||Dr["Control Pictures"](l)&&l!==9251||Dr["Optical Character Recognition"](l)||Dr["Enclosed Alphanumerics"](l)||Dr["Geometric Shapes"](l)||Dr["Miscellaneous Symbols"](l)&&!(l>=9754&&l<=9759)||Dr["Miscellaneous Symbols and Arrows"](l)&&(l>=11026&&l<=11055||l>=11088&&l<=11097||l>=11192&&l<=11243)||Dr["CJK Symbols and Punctuation"](l)||Dr.Katakana(l)||Dr["Private Use Area"](l)||Dr["CJK Compatibility Forms"](l)||Dr["Small Form Variants"](l)||Dr["Halfwidth and Fullwidth Forms"](l)||l===8734||l===8756||l===8757||l>=9984&&l<=10087||l>=10102&&l<=10131||l===65532||l===65533)}(s))}function Gs(s){return s>=1424&&s<=2303||Dr["Arabic Presentation Forms-A"](s)||Dr["Arabic Presentation Forms-B"](s)}function gs(s,l){return!(!l&&Gs(s)||s>=2304&&s<=3583||s>=3840&&s<=4255||Dr.Khmer(s))}function wh(s){for(var l=0,h=s;l-1&&(Xo="error"),Ch&&Ch(s)};function Oc(){Rh.fire(new Ee("pluginStateChange",{pluginStatus:Xo,pluginURL:Tu}))}var Rh=new Ye,jp=function(){return Xo},_s=function(){if(Xo!=="deferred"||!Tu)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Xo="loading",Oc(),Tu&&Hi({url:Tu},function(s){s?X1(s):(Xo="loaded",Oc())})},Ms={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Xo==="loaded"||Ms.applyArabicShaping!=null},isLoading:function(){return Xo==="loading"},setState:function(s){Xo=s.pluginStatus,Tu=s.pluginURL},isParsed:function(){return Ms.applyArabicShaping!=null&&Ms.processBidirectionalText!=null&&Ms.processStyledBidirectionalText!=null},getPluginURL:function(){return Tu}},Zn=function(s,l){this.zoom=s,l?(this.now=l.now,this.fadeDuration=l.fadeDuration,this.zoomHistory=l.zoomHistory,this.transition=l.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ah,this.transition={})};Zn.prototype.isSupportedScript=function(s){return function(l,h){for(var g=0,x=l;gthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:l+(1-l)*h}:{fromScale:.5,toScale:1,t:1-(1-h)*l}};var Ps=function(s,l){this.property=s,this.value=l,this.expression=function(h,g){if(gh(h))return new rc(h,g);if(Jl(h)){var x=Dp(h,g);if(x.result==="error")throw new Error(x.value.map(function(T){return T.key+": "+T.message}).join(", "));return x.value}var E=h;return typeof h=="string"&&g.type==="color"&&(E=si.parse(h)),{kind:"constant",evaluate:function(){return E}}}(l===void 0?s.specification.default:l,s.specification)};Ps.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Ps.prototype.possiblyEvaluate=function(s,l,h){return this.property.possiblyEvaluate(this,s,l,h)};var Os=function(s){this.property=s,this.value=new Ps(s,void 0)};Os.prototype.transitioned=function(s,l){return new Pl(this.property,this.value,l,L({},s.transition,this.transition),s.now)},Os.prototype.untransitioned=function(){return new Pl(this.property,this.value,null,{},0)};var go=function(s){this._properties=s,this._values=Object.create(s.defaultTransitionablePropertyValues)};go.prototype.getValue=function(s){return se(this._values[s].value.value)},go.prototype.setValue=function(s,l){this._values.hasOwnProperty(s)||(this._values[s]=new Os(this._values[s].property)),this._values[s].value=new Ps(this._values[s].property,l===null?void 0:se(l))},go.prototype.getTransition=function(s){return se(this._values[s].transition)},go.prototype.setTransition=function(s,l){this._values.hasOwnProperty(s)||(this._values[s]=new Os(this._values[s].property)),this._values[s].transition=se(l)||void 0},go.prototype.serialize=function(){for(var s={},l=0,h=Object.keys(this._values);lthis.end)return this.prior=null,x;if(this.value.isDataDriven())return this.prior=null,x;if(g=1)return 1;var D=M*M,N=D*M;return 4*(M<.5?N:3*(M-D)+N-.75)}(T))}return x};var Ju=function(s){this._properties=s,this._values=Object.create(s.defaultTransitioningPropertyValues)};Ju.prototype.possiblyEvaluate=function(s,l,h){for(var g=new kc(this._properties),x=0,E=Object.keys(this._values);xE.zoomHistory.lastIntegerZoom?{from:h,to:g}:{from:x,to:g}},l.prototype.interpolate=function(h){return h},l}(nn),No=function(s){this.specification=s};No.prototype.possiblyEvaluate=function(s,l,h,g){if(s.value!==void 0){if(s.expression.kind==="constant"){var x=s.expression.evaluate(l,null,{},h,g);return this._calculate(x,x,x,l)}return this._calculate(s.expression.evaluate(new Zn(Math.floor(l.zoom-1),l)),s.expression.evaluate(new Zn(Math.floor(l.zoom),l)),s.expression.evaluate(new Zn(Math.floor(l.zoom+1),l)),l)}},No.prototype._calculate=function(s,l,h,g){return g.zoom>g.zoomHistory.lastIntegerZoom?{from:s,to:l}:{from:h,to:l}},No.prototype.interpolate=function(s){return s};var su=function(s){this.specification=s};su.prototype.possiblyEvaluate=function(s,l,h,g){return!!s.expression.evaluate(l,null,{},h,g)},su.prototype.interpolate=function(){return!1};var ga=function(s){for(var l in this.properties=s,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],s){var h=s[l];h.specification.overridable&&this.overridableProperties.push(l);var g=this.defaultPropertyValues[l]=new Ps(h,void 0),x=this.defaultTransitionablePropertyValues[l]=new Os(h);this.defaultTransitioningPropertyValues[l]=x.untransitioned(),this.defaultPossiblyEvaluatedValues[l]=g.possiblyEvaluate({})}};Kr("DataDrivenProperty",nn),Kr("DataConstantProperty",dn),Kr("CrossFadedDataDrivenProperty",ys),Kr("CrossFadedProperty",No),Kr("ColorRampProperty",su);var Xs=function(s){function l(h,g){if(s.call(this),this.id=h.id,this.type=h.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},h.type!=="custom"&&(this.metadata=(h=h).metadata,this.minzoom=h.minzoom,this.maxzoom=h.maxzoom,h.type!=="background"&&(this.source=h.source,this.sourceLayer=h["source-layer"],this.filter=h.filter),g.layout&&(this._unevaluatedLayout=new Ws(g.layout)),g.paint)){for(var x in this._transitionablePaint=new go(g.paint),h.paint)this.setPaintProperty(x,h.paint[x],{validate:!1});for(var E in h.layout)this.setLayoutProperty(E,h.layout[E],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new kc(g.paint)}}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},l.prototype.getLayoutProperty=function(h){return h==="visibility"?this.visibility:this._unevaluatedLayout.getValue(h)},l.prototype.setLayoutProperty=function(h,g,x){x===void 0&&(x={}),g!=null&&this._validate(Mf,"layers."+this.id+".layout."+h,h,g,x)||(h!=="visibility"?this._unevaluatedLayout.setValue(h,g):this.visibility=g)},l.prototype.getPaintProperty=function(h){return ve(h,"-transition")?this._transitionablePaint.getTransition(h.slice(0,-11)):this._transitionablePaint.getValue(h)},l.prototype.setPaintProperty=function(h,g,x){if(x===void 0&&(x={}),g!=null&&this._validate(Sh,"layers."+this.id+".paint."+h,h,g,x))return!1;if(ve(h,"-transition"))return this._transitionablePaint.setTransition(h.slice(0,-11),g||void 0),!1;var E=this._transitionablePaint._values[h],T=E.property.specification["property-type"]==="cross-faded-data-driven",M=E.value.isDataDriven(),D=E.value;this._transitionablePaint.setValue(h,g),this._handleSpecialPaintPropertyUpdate(h);var N=this._transitionablePaint._values[h].value;return N.isDataDriven()||M||T||this._handleOverridablePaintPropertyUpdate(h,D,N)},l.prototype._handleSpecialPaintPropertyUpdate=function(h){},l.prototype._handleOverridablePaintPropertyUpdate=function(h,g,x){return!1},l.prototype.isHidden=function(h){return!!(this.minzoom&&h=this.maxzoom)||this.visibility==="none"},l.prototype.updateTransitions=function(h){this._transitioningPaint=this._transitionablePaint.transitioned(h,this._transitioningPaint)},l.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},l.prototype.recalculate=function(h,g){h.getCrossfadeParameters&&(this._crossfadeParameters=h.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(h,void 0,g)),this.paint=this._transitioningPaint.possiblyEvaluate(h,void 0,g)},l.prototype.serialize=function(){var h={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&&(h.layout=h.layout||{},h.layout.visibility=this.visibility),de(h,function(g,x){return!(g===void 0||x==="layout"&&!Object.keys(g).length||x==="paint"&&!Object.keys(g).length)})},l.prototype._validate=function(h,g,x,E,T){return T===void 0&&(T={}),(!T||T.validate!==!1)&&Ml(this,h.call(If,{key:g,layerType:this.type,objectKey:x,value:E,styleSpec:ie,style:{glyphs:!0,sprite:!0}}))},l.prototype.is3D=function(){return!1},l.prototype.isTileClipped=function(){return!1},l.prototype.hasOffscreenPass=function(){return!1},l.prototype.resize=function(){},l.prototype.isStateDependent=function(){for(var h in this.paint._values){var g=this.paint.get(h);if(g instanceof Lo&&qu(g.property.specification)&&(g.value.kind==="source"||g.value.kind==="composite")&&g.value.isStateDependent)return!0}return!1},l}(Ye),el={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},ic=function(s,l){this._structArray=s,this._pos1=l*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Li=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function ao(s,l){l===void 0&&(l=1);var h=0,g=0;return{members:s.map(function(x){var E=el[x.type].BYTES_PER_ELEMENT,T=h=Hp(h,Math.max(l,E)),M=x.components||1;return g=Math.max(g,E),h+=E*M,{name:x.name,type:x.type,components:M,offset:T}}),size:Hp(h,Math.max(g,l)),alignment:l}}function Hp(s,l){return Math.ceil(s/l)*l}Li.serialize=function(s,l){return s._trim(),l&&(s.isTransferred=!0,l.push(s.arrayBuffer)),{length:s.length,arrayBuffer:s.arrayBuffer}},Li.deserialize=function(s){var l=Object.create(this.prototype);return l.arrayBuffer=s.arrayBuffer,l.length=s.length,l.capacity=s.arrayBuffer.byteLength/l.bytesPerElement,l._refreshViews(),l},Li.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Li.prototype.clear=function(){this.length=0},Li.prototype.resize=function(s){this.reserve(s),this.length=s},Li.prototype.reserve=function(s){if(s>this.capacity){this.capacity=Math.max(s,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var l=this.uint8;this._refreshViews(),l&&this.uint8.set(l)}},Li.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Ol=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g){var x=this.length;return this.resize(x+1),this.emplace(x,h,g)},l.prototype.emplace=function(h,g,x){var E=2*h;return this.int16[E+0]=g,this.int16[E+1]=x,h},l}(Li);Ol.prototype.bytesPerElement=4,Kr("StructArrayLayout2i4",Ol);var Ih=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g,x,E){var T=this.length;return this.resize(T+1),this.emplace(T,h,g,x,E)},l.prototype.emplace=function(h,g,x,E,T){var M=4*h;return this.int16[M+0]=g,this.int16[M+1]=x,this.int16[M+2]=E,this.int16[M+3]=T,h},l}(Li);Ih.prototype.bytesPerElement=8,Kr("StructArrayLayout4i8",Ih);var tl=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g,x,E,T,M){var D=this.length;return this.resize(D+1),this.emplace(D,h,g,x,E,T,M)},l.prototype.emplace=function(h,g,x,E,T,M,D){var N=6*h;return this.int16[N+0]=g,this.int16[N+1]=x,this.int16[N+2]=E,this.int16[N+3]=T,this.int16[N+4]=M,this.int16[N+5]=D,h},l}(Li);tl.prototype.bytesPerElement=12,Kr("StructArrayLayout2i4i12",tl);var xs=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g,x,E,T,M){var D=this.length;return this.resize(D+1),this.emplace(D,h,g,x,E,T,M)},l.prototype.emplace=function(h,g,x,E,T,M,D){var N=4*h,$=8*h;return this.int16[N+0]=g,this.int16[N+1]=x,this.uint8[$+4]=E,this.uint8[$+5]=T,this.uint8[$+6]=M,this.uint8[$+7]=D,h},l}(Li);xs.prototype.bytesPerElement=8,Kr("StructArrayLayout2i4ub8",xs);var Dc=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g){var x=this.length;return this.resize(x+1),this.emplace(x,h,g)},l.prototype.emplace=function(h,g,x){var E=2*h;return this.float32[E+0]=g,this.float32[E+1]=x,h},l}(Li);Dc.prototype.bytesPerElement=8,Kr("StructArrayLayout2f8",Dc);var wu=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g,x,E,T,M,D,N,$,H){var q=this.length;return this.resize(q+1),this.emplace(q,h,g,x,E,T,M,D,N,$,H)},l.prototype.emplace=function(h,g,x,E,T,M,D,N,$,H,q){var re=10*h;return this.uint16[re+0]=g,this.uint16[re+1]=x,this.uint16[re+2]=E,this.uint16[re+3]=T,this.uint16[re+4]=M,this.uint16[re+5]=D,this.uint16[re+6]=N,this.uint16[re+7]=$,this.uint16[re+8]=H,this.uint16[re+9]=q,h},l}(Li);wu.prototype.bytesPerElement=20,Kr("StructArrayLayout10ui20",wu);var Mh=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g,x,E,T,M,D,N,$,H,q,re){var xe=this.length;return this.resize(xe+1),this.emplace(xe,h,g,x,E,T,M,D,N,$,H,q,re)},l.prototype.emplace=function(h,g,x,E,T,M,D,N,$,H,q,re,xe){var Se=12*h;return this.int16[Se+0]=g,this.int16[Se+1]=x,this.int16[Se+2]=E,this.int16[Se+3]=T,this.uint16[Se+4]=M,this.uint16[Se+5]=D,this.uint16[Se+6]=N,this.uint16[Se+7]=$,this.int16[Se+8]=H,this.int16[Se+9]=q,this.int16[Se+10]=re,this.int16[Se+11]=xe,h},l}(Li);Mh.prototype.bytesPerElement=24,Kr("StructArrayLayout4i4ui4i24",Mh);var Fc=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g,x){var E=this.length;return this.resize(E+1),this.emplace(E,h,g,x)},l.prototype.emplace=function(h,g,x,E){var T=3*h;return this.float32[T+0]=g,this.float32[T+1]=x,this.float32[T+2]=E,h},l}(Li);Fc.prototype.bytesPerElement=12,Kr("StructArrayLayout3f12",Fc);var kf=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h){var g=this.length;return this.resize(g+1),this.emplace(g,h)},l.prototype.emplace=function(h,g){return this.uint32[1*h+0]=g,h},l}(Li);kf.prototype.bytesPerElement=4,Kr("StructArrayLayout1ul4",kf);var Ph=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g,x,E,T,M,D,N,$){var H=this.length;return this.resize(H+1),this.emplace(H,h,g,x,E,T,M,D,N,$)},l.prototype.emplace=function(h,g,x,E,T,M,D,N,$,H){var q=10*h,re=5*h;return this.int16[q+0]=g,this.int16[q+1]=x,this.int16[q+2]=E,this.int16[q+3]=T,this.int16[q+4]=M,this.int16[q+5]=D,this.uint32[re+3]=N,this.uint16[q+8]=$,this.uint16[q+9]=H,h},l}(Li);Ph.prototype.bytesPerElement=20,Kr("StructArrayLayout6i1ul2ui20",Ph);var ac=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g,x,E,T,M){var D=this.length;return this.resize(D+1),this.emplace(D,h,g,x,E,T,M)},l.prototype.emplace=function(h,g,x,E,T,M,D){var N=6*h;return this.int16[N+0]=g,this.int16[N+1]=x,this.int16[N+2]=E,this.int16[N+3]=T,this.int16[N+4]=M,this.int16[N+5]=D,h},l}(Li);ac.prototype.bytesPerElement=12,Kr("StructArrayLayout2i2i2i12",ac);var oc=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g,x,E,T){var M=this.length;return this.resize(M+1),this.emplace(M,h,g,x,E,T)},l.prototype.emplace=function(h,g,x,E,T,M){var D=4*h,N=8*h;return this.float32[D+0]=g,this.float32[D+1]=x,this.float32[D+2]=E,this.int16[N+6]=T,this.int16[N+7]=M,h},l}(Li);oc.prototype.bytesPerElement=16,Kr("StructArrayLayout2f1f2i16",oc);var Gp=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g,x,E){var T=this.length;return this.resize(T+1),this.emplace(T,h,g,x,E)},l.prototype.emplace=function(h,g,x,E,T){var M=12*h,D=3*h;return this.uint8[M+0]=g,this.uint8[M+1]=x,this.float32[D+1]=E,this.float32[D+2]=T,h},l}(Li);Gp.prototype.bytesPerElement=12,Kr("StructArrayLayout2ub2f12",Gp);var Cu=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g,x){var E=this.length;return this.resize(E+1),this.emplace(E,h,g,x)},l.prototype.emplace=function(h,g,x,E){var T=3*h;return this.uint16[T+0]=g,this.uint16[T+1]=x,this.uint16[T+2]=E,h},l}(Li);Cu.prototype.bytesPerElement=6,Kr("StructArrayLayout3ui6",Cu);var uu=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){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)},l.prototype.emplaceBack=function(h,g,x,E,T,M,D,N,$,H,q,re,xe,Se,ze,Oe,et){var ut=this.length;return this.resize(ut+1),this.emplace(ut,h,g,x,E,T,M,D,N,$,H,q,re,xe,Se,ze,Oe,et)},l.prototype.emplace=function(h,g,x,E,T,M,D,N,$,H,q,re,xe,Se,ze,Oe,et,ut){var St=24*h,It=12*h,Xt=48*h;return this.int16[St+0]=g,this.int16[St+1]=x,this.uint16[St+2]=E,this.uint16[St+3]=T,this.uint32[It+2]=M,this.uint32[It+3]=D,this.uint32[It+4]=N,this.uint16[St+10]=$,this.uint16[St+11]=H,this.uint16[St+12]=q,this.float32[It+7]=re,this.float32[It+8]=xe,this.uint8[Xt+36]=Se,this.uint8[Xt+37]=ze,this.uint8[Xt+38]=Oe,this.uint32[It+10]=et,this.int16[St+22]=ut,h},l}(Li);uu.prototype.bytesPerElement=48,Kr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",uu);var Oh=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){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)},l.prototype.emplaceBack=function(h,g,x,E,T,M,D,N,$,H,q,re,xe,Se,ze,Oe,et,ut,St,It,Xt,Er,kr,mn,Gr,An,Zr,li){var Ln=this.length;return this.resize(Ln+1),this.emplace(Ln,h,g,x,E,T,M,D,N,$,H,q,re,xe,Se,ze,Oe,et,ut,St,It,Xt,Er,kr,mn,Gr,An,Zr,li)},l.prototype.emplace=function(h,g,x,E,T,M,D,N,$,H,q,re,xe,Se,ze,Oe,et,ut,St,It,Xt,Er,kr,mn,Gr,An,Zr,li,Ln){var sn=34*h,di=17*h;return this.int16[sn+0]=g,this.int16[sn+1]=x,this.int16[sn+2]=E,this.int16[sn+3]=T,this.int16[sn+4]=M,this.int16[sn+5]=D,this.int16[sn+6]=N,this.int16[sn+7]=$,this.uint16[sn+8]=H,this.uint16[sn+9]=q,this.uint16[sn+10]=re,this.uint16[sn+11]=xe,this.uint16[sn+12]=Se,this.uint16[sn+13]=ze,this.uint16[sn+14]=Oe,this.uint16[sn+15]=et,this.uint16[sn+16]=ut,this.uint16[sn+17]=St,this.uint16[sn+18]=It,this.uint16[sn+19]=Xt,this.uint16[sn+20]=Er,this.uint16[sn+21]=kr,this.uint16[sn+22]=mn,this.uint32[di+12]=Gr,this.float32[di+13]=An,this.float32[di+14]=Zr,this.float32[di+15]=li,this.float32[di+16]=Ln,h},l}(Li);Oh.prototype.bytesPerElement=68,Kr("StructArrayLayout8i15ui1ul4f68",Oh);var kl=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h){var g=this.length;return this.resize(g+1),this.emplace(g,h)},l.prototype.emplace=function(h,g){return this.float32[1*h+0]=g,h},l}(Li);kl.prototype.bytesPerElement=4,Kr("StructArrayLayout1f4",kl);var Ys=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g,x){var E=this.length;return this.resize(E+1),this.emplace(E,h,g,x)},l.prototype.emplace=function(h,g,x,E){var T=3*h;return this.int16[T+0]=g,this.int16[T+1]=x,this.int16[T+2]=E,h},l}(Li);Ys.prototype.bytesPerElement=6,Kr("StructArrayLayout3i6",Ys);var Wp=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g,x){var E=this.length;return this.resize(E+1),this.emplace(E,h,g,x)},l.prototype.emplace=function(h,g,x,E){var T=4*h;return this.uint32[2*h+0]=g,this.uint16[T+2]=x,this.uint16[T+3]=E,h},l}(Li);Wp.prototype.bytesPerElement=8,Kr("StructArrayLayout1ul2ui8",Wp);var Df=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g){var x=this.length;return this.resize(x+1),this.emplace(x,h,g)},l.prototype.emplace=function(h,g,x){var E=2*h;return this.uint16[E+0]=g,this.uint16[E+1]=x,h},l}(Li);Df.prototype.bytesPerElement=4,Kr("StructArrayLayout2ui4",Df);var kh=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h){var g=this.length;return this.resize(g+1),this.emplace(g,h)},l.prototype.emplace=function(h,g){return this.uint16[1*h+0]=g,h},l}(Li);kh.prototype.bytesPerElement=2,Kr("StructArrayLayout1ui2",kh);var Dh=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},l.prototype.emplaceBack=function(h,g,x,E){var T=this.length;return this.resize(T+1),this.emplace(T,h,g,x,E)},l.prototype.emplace=function(h,g,x,E,T){var M=4*h;return this.float32[M+0]=g,this.float32[M+1]=x,this.float32[M+2]=E,this.float32[M+3]=T,h},l}(Li);Dh.prototype.bytesPerElement=16,Kr("StructArrayLayout4f16",Dh);var p=function(s){function l(){s.apply(this,arguments)}s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l;var h={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return h.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},h.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},h.x1.get=function(){return this._structArray.int16[this._pos2+2]},h.y1.get=function(){return this._structArray.int16[this._pos2+3]},h.x2.get=function(){return this._structArray.int16[this._pos2+4]},h.y2.get=function(){return this._structArray.int16[this._pos2+5]},h.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},h.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},h.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},h.anchorPoint.get=function(){return new m(this.anchorPointX,this.anchorPointY)},Object.defineProperties(l.prototype,h),l}(ic);p.prototype.size=20;var v=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.get=function(h){return new p(this,h)},l}(Ph);Kr("CollisionBoxArray",v);var d=function(s){function l(){s.apply(this,arguments)}s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l;var h={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return h.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},h.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},h.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},h.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},h.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},h.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},h.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},h.segment.get=function(){return this._structArray.uint16[this._pos2+10]},h.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},h.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},h.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},h.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},h.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},h.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},h.placedOrientation.set=function(g){this._structArray.uint8[this._pos1+37]=g},h.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},h.hidden.set=function(g){this._structArray.uint8[this._pos1+38]=g},h.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},h.crossTileID.set=function(g){this._structArray.uint32[this._pos4+10]=g},h.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(l.prototype,h),l}(ic);d.prototype.size=48;var y=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.get=function(h){return new d(this,h)},l}(uu);Kr("PlacedSymbolArray",y);var S=function(s){function l(){s.apply(this,arguments)}s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l;var h={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return h.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},h.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},h.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},h.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},h.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},h.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},h.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},h.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},h.key.get=function(){return this._structArray.uint16[this._pos2+8]},h.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},h.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},h.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},h.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},h.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},h.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},h.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},h.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},h.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},h.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},h.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},h.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},h.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},h.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},h.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},h.crossTileID.set=function(g){this._structArray.uint32[this._pos4+12]=g},h.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},h.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},h.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},h.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(l.prototype,h),l}(ic);S.prototype.size=68;var C=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.get=function(h){return new S(this,h)},l}(Oh);Kr("SymbolInstanceArray",C);var I=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.getoffsetX=function(h){return this.float32[1*h+0]},l}(kl);Kr("GlyphOffsetArray",I);var O=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.getx=function(h){return this.int16[3*h+0]},l.prototype.gety=function(h){return this.int16[3*h+1]},l.prototype.gettileUnitDistanceFromAnchor=function(h){return this.int16[3*h+2]},l}(Ys);Kr("SymbolLineVertexArray",O);var z=function(s){function l(){s.apply(this,arguments)}s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l;var h={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return h.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},h.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},h.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(l.prototype,h),l}(ic);z.prototype.size=8;var X=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.get=function(h){return new z(this,h)},l}(Wp);Kr("FeatureIndexArray",X);var ne=ao([{name:"a_pos",components:2,type:"Int16"}],4).members,ae=function(s){s===void 0&&(s=[]),this.segments=s};function oe(s,l){return 256*(s=P(Math.floor(s),0,255))+P(Math.floor(l),0,255)}ae.prototype.prepareSegment=function(s,l,h,g){var x=this.segments[this.segments.length-1];return s>ae.MAX_VERTEX_ARRAY_LENGTH&&ye("Max vertices per segment is "+ae.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+s),(!x||x.vertexLength+s>ae.MAX_VERTEX_ARRAY_LENGTH||x.sortKey!==g)&&(x={vertexOffset:l.length,primitiveOffset:h.length,vertexLength:0,primitiveLength:0},g!==void 0&&(x.sortKey=g),this.segments.push(x)),x},ae.prototype.get=function(){return this.segments},ae.prototype.destroy=function(){for(var s=0,l=this.segments;s>>16)*M&65535)<<16)&4294967295)<<15|N>>>17))*D+(((N>>>16)*D&65535)<<16)&4294967295)<<13|E>>>19))+((5*(E>>>16)&65535)<<16)&4294967295))+((58964+(T>>>16)&65535)<<16);switch(N=0,g){case 3:N^=(255&l.charCodeAt($+2))<<16;case 2:N^=(255&l.charCodeAt($+1))<<8;case 1:E^=N=(65535&(N=(N=(65535&(N^=255&l.charCodeAt($)))*M+(((N>>>16)*M&65535)<<16)&4294967295)<<15|N>>>17))*D+(((N>>>16)*D&65535)<<16)&4294967295}return E^=l.length,E=2246822507*(65535&(E^=E>>>16))+((2246822507*(E>>>16)&65535)<<16)&4294967295,E=3266489909*(65535&(E^=E>>>13))+((3266489909*(E>>>16)&65535)<<16)&4294967295,(E^=E>>>16)>>>0}}),Fe=u(function(s){s.exports=function(l,h){for(var g,x=l.length,E=h^x,T=0;x>=4;)g=1540483477*(65535&(g=255&l.charCodeAt(T)|(255&l.charCodeAt(++T))<<8|(255&l.charCodeAt(++T))<<16|(255&l.charCodeAt(++T))<<24))+((1540483477*(g>>>16)&65535)<<16),E=1540483477*(65535&E)+((1540483477*(E>>>16)&65535)<<16)^(g=1540483477*(65535&(g^=g>>>24))+((1540483477*(g>>>16)&65535)<<16)),x-=4,++T;switch(x){case 3:E^=(255&l.charCodeAt(T+2))<<16;case 2:E^=(255&l.charCodeAt(T+1))<<8;case 1:E=1540483477*(65535&(E^=255&l.charCodeAt(T)))+((1540483477*(E>>>16)&65535)<<16)}return E=1540483477*(65535&(E^=E>>>13))+((1540483477*(E>>>16)&65535)<<16),(E^=E>>>15)>>>0}}),_e=be,De=Fe;_e.murmur3=be,_e.murmur2=De;var Xe=function(){this.ids=[],this.positions=[],this.indexed=!1};Xe.prototype.add=function(s,l,h,g){this.ids.push(Ct(s)),this.positions.push(l,h,g)},Xe.prototype.getPositions=function(s){for(var l=Ct(s),h=0,g=this.ids.length-1;h>1;this.ids[x]>=l?g=x:h=x+1}for(var E=[];this.ids[h]===l;)E.push({index:this.positions[3*h],start:this.positions[3*h+1],end:this.positions[3*h+2]}),h++;return E},Xe.serialize=function(s,l){var h=new Float64Array(s.ids),g=new Uint32Array(s.positions);return function x(E,T,M,D){for(;M>1],$=M-1,H=D+1;;){do $++;while(E[$]N);if($>=H)break;mt(E,$,H),mt(T,3*$,3*H),mt(T,3*$+1,3*H+1),mt(T,3*$+2,3*H+2)}H-MT.x+1||DT.y+1)&&ye("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return h}function ba(s,l){return{type:s.type,id:s.id,properties:s.properties,geometry:l?_a(s):[]}}function Yo(s,l,h,g,x){s.emplaceBack(2*l+(g+1)/2,2*h+(x+1)/2)}var Uo=function(s){this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(function(l){return l.id}),this.index=s.index,this.hasPattern=!1,this.layoutVertexArray=new Ol,this.indexArray=new Cu,this.segments=new ae,this.programConfigurations=new In(s.layers,s.zoom),this.stateDependentLayerIds=this.layers.filter(function(l){return l.isStateDependent()}).map(function(l){return l.id})};function Ru(s,l){for(var h=0;h1){if(Bc(s,l))return!0;for(var g=0;g1?h:h.sub(l)._mult(x)._add(l))}function rl(s,l){for(var h,g,x,E=!1,T=0;Tl.y!=(x=h[D]).y>l.y&&l.x<(x.x-g.x)*(l.y-g.y)/(x.y-g.y)+g.x&&(E=!E);return E}function lu(s,l){for(var h=!1,g=0,x=s.length-1;gl.y!=T.y>l.y&&l.x<(T.x-E.x)*(l.y-E.y)/(T.y-E.y)+E.x&&(h=!h)}return h}function Fl(s,l,h){var g=h[0],x=h[2];if(s.xx.x&&l.x>x.x||s.yx.y&&l.y>x.y)return!1;var E=ke(s,l,h[0]);return E!==ke(s,l,h[1])||E!==ke(s,l,h[2])||E!==ke(s,l,h[3])}function Ro(s,l,h){var g=l.paint.get(s).value;return g.kind==="constant"?g.value:h.programConfigurations.get(l.id).getMaxValue(s)}function Ma(s){return Math.sqrt(s[0]*s[0]+s[1]*s[1])}function as(s,l,h,g,x){if(!l[0]&&!l[1])return s;var E=m.convert(l)._mult(x);h==="viewport"&&E._rotate(-g);for(var T=[],M=0;M=8192||$<0||$>=8192)){var H=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,s.sortKey),q=H.vertexLength;Yo(this.layoutVertexArray,N,$,-1,-1),Yo(this.layoutVertexArray,N,$,1,-1),Yo(this.layoutVertexArray,N,$,1,1),Yo(this.layoutVertexArray,N,$,-1,1),this.indexArray.emplaceBack(q,q+1,q+2),this.indexArray.emplaceBack(q,q+3,q+2),H.vertexLength+=4,H.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,h,{},g)},Kr("CircleBucket",Uo,{omit:["layers"]});var qs=new ga({"circle-sort-key":new nn(ie.layout_circle["circle-sort-key"])}),cu={paint:new ga({"circle-radius":new nn(ie.paint_circle["circle-radius"]),"circle-color":new nn(ie.paint_circle["circle-color"]),"circle-blur":new nn(ie.paint_circle["circle-blur"]),"circle-opacity":new nn(ie.paint_circle["circle-opacity"]),"circle-translate":new dn(ie.paint_circle["circle-translate"]),"circle-translate-anchor":new dn(ie.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new dn(ie.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new dn(ie.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new nn(ie.paint_circle["circle-stroke-width"]),"circle-stroke-color":new nn(ie.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new nn(ie.paint_circle["circle-stroke-opacity"])}),layout:qs},vi=typeof Float32Array<"u"?Float32Array:Array;function yo(s){return s[0]=1,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=1,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s}function Va(s,l,h){var g=l[0],x=l[1],E=l[2],T=l[3],M=l[4],D=l[5],N=l[6],$=l[7],H=l[8],q=l[9],re=l[10],xe=l[11],Se=l[12],ze=l[13],Oe=l[14],et=l[15],ut=h[0],St=h[1],It=h[2],Xt=h[3];return s[0]=ut*g+St*M+It*H+Xt*Se,s[1]=ut*x+St*D+It*q+Xt*ze,s[2]=ut*E+St*N+It*re+Xt*Oe,s[3]=ut*T+St*$+It*xe+Xt*et,s[4]=(ut=h[4])*g+(St=h[5])*M+(It=h[6])*H+(Xt=h[7])*Se,s[5]=ut*x+St*D+It*q+Xt*ze,s[6]=ut*E+St*N+It*re+Xt*Oe,s[7]=ut*T+St*$+It*xe+Xt*et,s[8]=(ut=h[8])*g+(St=h[9])*M+(It=h[10])*H+(Xt=h[11])*Se,s[9]=ut*x+St*D+It*q+Xt*ze,s[10]=ut*E+St*N+It*re+Xt*Oe,s[11]=ut*T+St*$+It*xe+Xt*et,s[12]=(ut=h[12])*g+(St=h[13])*M+(It=h[14])*H+(Xt=h[15])*Se,s[13]=ut*x+St*D+It*q+Xt*ze,s[14]=ut*E+St*N+It*re+Xt*Oe,s[15]=ut*T+St*$+It*xe+Xt*et,s}Math.hypot||(Math.hypot=function(){for(var s=arguments,l=0,h=arguments.length;h--;)l+=s[h]*s[h];return Math.sqrt(l)});var Mu,Fh=Va;function Bl(s,l,h){var g=l[0],x=l[1],E=l[2],T=l[3];return s[0]=h[0]*g+h[4]*x+h[8]*E+h[12]*T,s[1]=h[1]*g+h[5]*x+h[9]*E+h[13]*T,s[2]=h[2]*g+h[6]*x+h[10]*E+h[14]*T,s[3]=h[3]*g+h[7]*x+h[11]*E+h[15]*T,s}Mu=new vi(3),vi!=Float32Array&&(Mu[0]=0,Mu[1]=0,Mu[2]=0),function(){var s=new vi(4);vi!=Float32Array&&(s[0]=0,s[1]=0,s[2]=0,s[3]=0)}();var Xp=(function(){var s=new vi(2);vi!=Float32Array&&(s[0]=0,s[1]=0)}(),function(s){function l(h){s.call(this,h,cu)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.createBucket=function(h){return new Uo(h)},l.prototype.queryRadius=function(h){var g=h;return Ro("circle-radius",this,g)+Ro("circle-stroke-width",this,g)+Ma(this.paint.get("circle-translate"))},l.prototype.queryIntersectsFeature=function(h,g,x,E,T,M,D,N){for(var $=as(h,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),M.angle,D),H=this.paint.get("circle-radius").evaluate(g,x)+this.paint.get("circle-stroke-width").evaluate(g,x),q=this.paint.get("circle-pitch-alignment")==="map",re=q?$:function(Er,kr){return Er.map(function(mn){return uc(mn,kr)})}($,N),xe=q?H*D:H,Se=0,ze=E;Ses.width||x.height>s.height||h.x>s.width-x.width||h.y>s.height-x.height)throw new RangeError("out of range source coordinates for image copy");if(x.width>l.width||x.height>l.height||g.x>l.width-x.width||g.y>l.height-x.height)throw new RangeError("out of range destination coordinates for image copy");for(var T=s.data,M=l.data,D=0;D80*h){g=E=s[0],x=T=s[1];for(var xe=h;xeE&&(E=M),D>T&&(T=D);N=(N=Math.max(E-g,T-x))!==0?1/N:0}return Yp(q,re,h,g,x,N),re}function r2(s,l,h,g,x){var E,T;if(x===Uf(s,l,h,g)>0)for(E=l;E=l;E-=g)T=zh(E,s[E],s[E+1],T);return T&&Ff(T,T.next)&&(cc(T),T=T.next),T}function Nc(s,l){if(!s)return s;l||(l=s);var h,g=s;do if(h=!1,g.steiner||!Ff(g,g.next)&&Pa(g.prev,g,g.next)!==0)g=g.next;else{if(cc(g),(g=l=g.prev)===g.next)break;h=!0}while(h||g!==l);return l}function Yp(s,l,h,g,x,E,T){if(s){!T&&E&&function($,H,q,re){var xe=$;do xe.z===null&&(xe.z=Nh(xe.x,xe.y,H,q,re)),xe.prevZ=xe.prev,xe.nextZ=xe.next,xe=xe.next;while(xe!==$);xe.prevZ.nextZ=null,xe.prevZ=null,function(Se){var ze,Oe,et,ut,St,It,Xt,Er,kr=1;do{for(Oe=Se,Se=null,St=null,It=0;Oe;){for(It++,et=Oe,Xt=0,ze=0;ze0||Er>0&&et;)Xt!==0&&(Er===0||!et||Oe.z<=et.z)?(ut=Oe,Oe=Oe.nextZ,Xt--):(ut=et,et=et.nextZ,Er--),St?St.nextZ=ut:Se=ut,ut.prevZ=St,St=ut;Oe=et}St.nextZ=null,kr*=2}while(It>1)}(xe)}(s,g,x,E);for(var M,D,N=s;s.prev!==s.next;)if(M=s.prev,D=s.next,E?wy(s,g,x,E):Ty(s))l.push(M.i/h),l.push(s.i/h),l.push(D.i/h),cc(s),s=D.next,N=D.next;else if((s=D)===N){T?T===1?Yp(s=Cy(Nc(s),l,h),l,h,g,x,E,2):T===2&&Ry(s,l,h,g,x,E):Yp(Nc(s),l,h,g,x,E,1);break}}}function Ty(s){var l=s.prev,h=s,g=s.next;if(Pa(l,h,g)>=0)return!1;for(var x=s.next.next;x!==s.prev;){if(Uc(l.x,l.y,h.x,h.y,g.x,g.y,x.x,x.y)&&Pa(x.prev,x,x.next)>=0)return!1;x=x.next}return!0}function wy(s,l,h,g){var x=s.prev,E=s,T=s.next;if(Pa(x,E,T)>=0)return!1;for(var M=x.x>E.x?x.x>T.x?x.x:T.x:E.x>T.x?E.x:T.x,D=x.y>E.y?x.y>T.y?x.y:T.y:E.y>T.y?E.y:T.y,N=Nh(x.x=N&&q&&q.z<=$;){if(H!==s.prev&&H!==s.next&&Uc(x.x,x.y,E.x,E.y,T.x,T.y,H.x,H.y)&&Pa(H.prev,H,H.next)>=0||(H=H.prevZ,q!==s.prev&&q!==s.next&&Uc(x.x,x.y,E.x,E.y,T.x,T.y,q.x,q.y)&&Pa(q.prev,q,q.next)>=0))return!1;q=q.nextZ}for(;H&&H.z>=N;){if(H!==s.prev&&H!==s.next&&Uc(x.x,x.y,E.x,E.y,T.x,T.y,H.x,H.y)&&Pa(H.prev,H,H.next)>=0)return!1;H=H.prevZ}for(;q&&q.z<=$;){if(q!==s.prev&&q!==s.next&&Uc(x.x,x.y,E.x,E.y,T.x,T.y,q.x,q.y)&&Pa(q.prev,q,q.next)>=0)return!1;q=q.nextZ}return!0}function Cy(s,l,h){var g=s;do{var x=g.prev,E=g.next.next;!Ff(x,E)&&J1(x,g,g.next,E)&&zc(x,E)&&zc(E,x)&&(l.push(x.i/h),l.push(g.i/h),l.push(E.i/h),cc(g),cc(g.next),g=s=E),g=g.next}while(g!==s);return Nc(g)}function Ry(s,l,h,g,x,E){var T=s;do{for(var M=T.next.next;M!==T.prev;){if(T.i!==M.i&&Q1(T,M)){var D=Uh(T,M);return T=Nc(T,T.next),D=Nc(D,D.next),Yp(T,l,h,g,x,E),void Yp(D,l,h,g,x,E)}M=M.next}T=T.next}while(T!==s)}function Iy(s,l){return s.x-l.x}function L0(s,l){if(l=function(g,x){var E,T=x,M=g.x,D=g.y,N=-1/0;do{if(D<=T.y&&D>=T.next.y&&T.next.y!==T.y){var $=T.x+(D-T.y)*(T.next.x-T.x)/(T.next.y-T.y);if($<=M&&$>N){if(N=$,$===M){if(D===T.y)return T;if(D===T.next.y)return T.next}E=T.x=T.x&&T.x>=re&&M!==T.x&&Uc(DE.x||T.x===E.x&&q1(E,T)))&&(E=T,Se=H)),T=T.next;while(T!==q);return E}(s,l)){var h=Uh(l,s);Nc(l,l.next),Nc(h,h.next)}}function q1(s,l){return Pa(s.prev,s,l.prev)<0&&Pa(l.next,s,s.next)<0}function Nh(s,l,h,g,x){return(s=1431655765&((s=858993459&((s=252645135&((s=16711935&((s=32767*(s-h)*x)|s<<8))|s<<4))|s<<2))|s<<1))|(l=1431655765&((l=858993459&((l=252645135&((l=16711935&((l=32767*(l-g)*x)|l<<8))|l<<4))|l<<2))|l<<1))<<1}function K1(s){var l=s,h=s;do(l.x=0&&(s-T)*(g-M)-(h-T)*(l-M)>=0&&(h-T)*(E-M)-(x-T)*(g-M)>=0}function Q1(s,l){return s.next.i!==l.i&&s.prev.i!==l.i&&!function(h,g){var x=h;do{if(x.i!==h.i&&x.next.i!==h.i&&x.i!==g.i&&x.next.i!==g.i&&J1(x,x.next,h,g))return!0;x=x.next}while(x!==h);return!1}(s,l)&&(zc(s,l)&&zc(l,s)&&function(h,g){var x=h,E=!1,T=(h.x+g.x)/2,M=(h.y+g.y)/2;do x.y>M!=x.next.y>M&&x.next.y!==x.y&&T<(x.next.x-x.x)*(M-x.y)/(x.next.y-x.y)+x.x&&(E=!E),x=x.next;while(x!==h);return E}(s,l)&&(Pa(s.prev,s,l.prev)||Pa(s,l.prev,l))||Ff(s,l)&&Pa(s.prev,s,s.next)>0&&Pa(l.prev,l,l.next)>0)}function Pa(s,l,h){return(l.y-s.y)*(h.x-l.x)-(l.x-s.x)*(h.y-l.y)}function Ff(s,l){return s.x===l.x&&s.y===l.y}function J1(s,l,h,g){var x=Lf(Pa(s,l,h)),E=Lf(Pa(s,l,g)),T=Lf(Pa(h,g,s)),M=Lf(Pa(h,g,l));return x!==E&&T!==M||!(x!==0||!Bf(s,h,l))||!(E!==0||!Bf(s,g,l))||!(T!==0||!Bf(h,s,g))||!(M!==0||!Bf(h,l,g))}function Bf(s,l,h){return l.x<=Math.max(s.x,h.x)&&l.x>=Math.min(s.x,h.x)&&l.y<=Math.max(s.y,h.y)&&l.y>=Math.min(s.y,h.y)}function Lf(s){return s>0?1:s<0?-1:0}function zc(s,l){return Pa(s.prev,s,s.next)<0?Pa(s,l,s.next)>=0&&Pa(s,s.prev,l)>=0:Pa(s,l,s.prev)<0||Pa(s,s.next,l)<0}function Uh(s,l){var h=new Nf(s.i,s.x,s.y),g=new Nf(l.i,l.x,l.y),x=s.next,E=l.prev;return s.next=l,l.prev=s,h.next=x,x.prev=h,g.next=h,h.prev=g,E.next=g,g.prev=E,g}function zh(s,l,h,g){var x=new Nf(s,l,h);return g?(x.next=g.next,x.prev=g,g.next.prev=x,g.next=x):(x.prev=x,x.next=x),x}function cc(s){s.next.prev=s.prev,s.prev.next=s.next,s.prevZ&&(s.prevZ.nextZ=s.nextZ),s.nextZ&&(s.nextZ.prevZ=s.prevZ)}function Nf(s,l,h){this.i=s,this.x=l,this.y=h,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Uf(s,l,h,g){for(var x=0,E=l,T=h-g;ED;){if(N-D>600){var H=N-D+1,q=M-D+1,re=Math.log(H),xe=.5*Math.exp(2*re/3),Se=.5*Math.sqrt(re*xe*(H-xe)/H)*(q-H/2<0?-1:1);E(T,M,Math.max(D,Math.floor(M-q*xe/H+Se)),Math.min(N,Math.floor(M+(H-q)*xe/H+Se)),$)}var ze=T[M],Oe=D,et=N;for(fc(T,D,M),$(T[N],ze)>0&&fc(T,D,N);Oe0;)et--}$(T[D],ze)===0?fc(T,D,et):fc(T,++et,N),et<=M&&(D=et+1),M<=et&&(N=et-1)}})(s,l,h||0,g||s.length-1,x||zf)}function fc(s,l,h){var g=s[l];s[l]=s[h],s[h]=g}function zf(s,l){return sl?1:0}function ed(s,l){var h=s.length;if(h<=1)return[s];for(var g,x,E=[],T=0;T1)for(var D=0;D0&&h.holes.push(g+=s[x-1].length)}return h},Y1.default=Ay;var nl=function(s){this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(function(l){return l.id}),this.index=s.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Ol,this.indexArray=new Cu,this.indexArray2=new Df,this.programConfigurations=new In(s.layers,s.zoom),this.segments=new ae,this.segments2=new ae,this.stateDependentLayerIds=this.layers.filter(function(l){return l.isStateDependent()}).map(function(l){return l.id})};nl.prototype.populate=function(s,l,h){this.hasPattern=U0("fill",this.layers,l);for(var g=this.layers[0].layout.get("fill-sort-key"),x=[],E=0,T=s;E>3}if(x--,g===1||g===2)E+=s.readSVarint(),T+=s.readSVarint(),g===1&&(l&&M.push(l),l=[]),l.push(new m(E,T));else{if(g!==7)throw new Error("unknown command "+g);l&&l.push(l[0].clone())}}return l&&M.push(l),M},$f.prototype.bbox=function(){var s=this._pbf;s.pos=this._geometry;for(var l=s.readVarint()+s.pos,h=1,g=0,x=0,E=0,T=1/0,M=-1/0,D=1/0,N=-1/0;s.pos>3}if(g--,h===1||h===2)(x+=s.readSVarint())M&&(M=x),(E+=s.readSVarint())N&&(N=E);else if(h!==7)throw new Error("unknown command "+h)}return[T,D,M,N]},$f.prototype.toGeoJSON=function(s,l,h){var g,x,E=this.extent*Math.pow(2,h),T=this.extent*s,M=this.extent*l,D=this.loadGeometry(),N=$f.types[this.type];function $(re){for(var xe=0;xe>3;x=T===1?g.readString():T===2?g.readFloat():T===3?g.readDouble():T===4?g.readVarint64():T===5?g.readVarint():T===6?g.readSVarint():T===7?g.readBoolean():null}return x}(h))}function u2(s,l,h){if(s===3){var g=new $0(h,h.readVarint()+h.pos);g.length&&(l[g.name]=g)}}Vf.prototype.feature=function(s){if(s<0||s>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[s];var l=this._pbf.readVarint()+this._pbf.pos;return new s2(this._pbf,l,this.extent,this._keys,this._values)};var jc={VectorTile:function(s,l){this.layers=s.readFields(u2,{},l)},VectorTileFeature:s2,VectorTileLayer:$0},td=jc.VectorTileFeature.types,rd=Math.pow(2,13);function ss(s,l,h,g,x,E,T,M){s.emplaceBack(l,h,2*Math.floor(g*rd)+T,x*rd*2,E*rd*2,Math.round(M))}var qo=function(s){this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(function(l){return l.id}),this.index=s.index,this.hasPattern=!1,this.layoutVertexArray=new tl,this.indexArray=new Cu,this.programConfigurations=new In(s.layers,s.zoom),this.segments=new ae,this.stateDependentLayerIds=this.layers.filter(function(l){return l.isStateDependent()}).map(function(l){return l.id})};function so(s,l){return s.x===l.x&&(s.x<0||s.x>8192)||s.y===l.y&&(s.y<0||s.y>8192)}qo.prototype.populate=function(s,l,h){this.features=[],this.hasPattern=U0("fill-extrusion",this.layers,l);for(var g=0,x=s;g8192})||di.every(function(Qn){return Qn.y<0})||di.every(function(Qn){return Qn.y>8192})))for(var Se=0,ze=0;ze=1){var et=xe[ze-1];if(!so(Oe,et)){H.vertexLength+4>ae.MAX_VERTEX_ARRAY_LENGTH&&(H=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var ut=Oe.sub(et)._perp()._unit(),St=et.dist(Oe);Se+St>32768&&(Se=0),ss(this.layoutVertexArray,Oe.x,Oe.y,ut.x,ut.y,0,0,Se),ss(this.layoutVertexArray,Oe.x,Oe.y,ut.x,ut.y,0,1,Se),ss(this.layoutVertexArray,et.x,et.y,ut.x,ut.y,0,0,Se+=St),ss(this.layoutVertexArray,et.x,et.y,ut.x,ut.y,0,1,Se);var It=H.vertexLength;this.indexArray.emplaceBack(It,It+2,It+1),this.indexArray.emplaceBack(It+1,It+2,It+3),H.vertexLength+=4,H.primitiveLength+=2}}}}if(H.vertexLength+D>ae.MAX_VERTEX_ARRAY_LENGTH&&(H=this.segments.prepareSegment(D,this.layoutVertexArray,this.indexArray)),td[s.type]==="Polygon"){for(var Xt=[],Er=[],kr=H.vertexLength,mn=0,Gr=M;mn=2&&s[D-1].equals(s[D-2]);)D--;for(var N=0;N0;if(Er&&Oe>N){var mn=$.dist(re);if(mn>2*H){var Gr=$.sub($.sub(re)._mult(H/mn)._round());this.updateDistance(re,Gr),this.addCurrentVertex(Gr,Se,0,0,q),re=Gr}}var An=re&&xe,Zr=An?h:M?"butt":g;if(An&&Zr==="round"&&(Itx&&(Zr="bevel"),Zr==="bevel"&&(It>2&&(Zr="flipbevel"),It100)et=ze.mult(-1);else{var li=It*Se.add(ze).mag()/Se.sub(ze).mag();et._perp()._mult(li*(kr?-1:1))}this.addCurrentVertex($,et,0,0,q),this.addCurrentVertex($,et.mult(-1),0,0,q)}else if(Zr==="bevel"||Zr==="fakeround"){var Ln=-Math.sqrt(It*It-1),sn=kr?Ln:0,di=kr?0:Ln;if(re&&this.addCurrentVertex($,Se,sn,di,q),Zr==="fakeround")for(var Qn=Math.round(180*Xt/Math.PI/20),Pi=1;Pi2*H){var Aa=$.add(xe.sub($)._mult(H/Fa)._round());this.updateDistance($,Aa),this.addCurrentVertex(Aa,ze,0,0,q),$=Aa}}}}},us.prototype.addCurrentVertex=function(s,l,h,g,x,E){E===void 0&&(E=!1);var T=l.y*g-l.x,M=-l.y-l.x*g;this.addHalfVertex(s,l.x+l.y*h,l.y-l.x*h,E,!1,h,x),this.addHalfVertex(s,T,M,E,!0,-g,x),this.distance>h2/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(s,l,h,g,x,E))},us.prototype.addHalfVertex=function(s,l,h,g,x,E,T){var M=.5*(this.lineClips?this.scaledDistance*(h2-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((s.x<<1)+(g?1:0),(s.y<<1)+(x?1:0),Math.round(63*l)+128,Math.round(63*h)+128,1+(E===0?0:E<0?-1:1)|(63&M)<<2,M>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);var D=T.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,D),T.primitiveLength++),x?this.e2=D:this.e1=D},us.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},us.prototype.updateDistance=function(s,l){this.distance+=s.dist(l),this.updateScaledDistance()},Kr("LineBucket",us,{omit:["layers","patternFeatures"]});var Dy=new ga({"line-cap":new dn(ie.layout_line["line-cap"]),"line-join":new nn(ie.layout_line["line-join"]),"line-miter-limit":new dn(ie.layout_line["line-miter-limit"]),"line-round-limit":new dn(ie.layout_line["line-round-limit"]),"line-sort-key":new nn(ie.layout_line["line-sort-key"])}),p2={paint:new ga({"line-opacity":new nn(ie.paint_line["line-opacity"]),"line-color":new nn(ie.paint_line["line-color"]),"line-translate":new dn(ie.paint_line["line-translate"]),"line-translate-anchor":new dn(ie.paint_line["line-translate-anchor"]),"line-width":new nn(ie.paint_line["line-width"]),"line-gap-width":new nn(ie.paint_line["line-gap-width"]),"line-offset":new nn(ie.paint_line["line-offset"]),"line-blur":new nn(ie.paint_line["line-blur"]),"line-dasharray":new No(ie.paint_line["line-dasharray"]),"line-pattern":new ys(ie.paint_line["line-pattern"]),"line-gradient":new su(ie.paint_line["line-gradient"])}),layout:Dy},V0=new(function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.possiblyEvaluate=function(h,g){return g=new Zn(Math.floor(g.zoom),{now:g.now,fadeDuration:g.fadeDuration,zoomHistory:g.zoomHistory,transition:g.transition}),s.prototype.possiblyEvaluate.call(this,h,g)},l.prototype.evaluate=function(h,g,x,E){return g=L({},g,{zoom:Math.floor(g.zoom)}),s.prototype.evaluate.call(this,h,g,x,E)},l}(nn))(p2.paint.properties["line-width"].specification);V0.useIntegerZoom=!0;var d2=function(s){function l(h){s.call(this,h,p2),this.gradientVersion=0}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._handleSpecialPaintPropertyUpdate=function(h){h==="line-gradient"&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof ms,this.gradientVersion=(this.gradientVersion+1)%A)},l.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},l.prototype.recalculate=function(h,g){s.prototype.recalculate.call(this,h,g),this.paint._values["line-floorwidth"]=V0.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,h)},l.prototype.createBucket=function(h){return new us(h)},l.prototype.queryRadius=function(h){var g=h,x=j0(Ro("line-width",this,g),Ro("line-gap-width",this,g)),E=Ro("line-offset",this,g);return x/2+Math.abs(E)+Ma(this.paint.get("line-translate"))},l.prototype.queryIntersectsFeature=function(h,g,x,E,T,M,D){var N=as(h,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),M.angle,D),$=D/2*j0(this.paint.get("line-width").evaluate(g,x),this.paint.get("line-gap-width").evaluate(g,x)),H=this.paint.get("line-offset").evaluate(g,x);return H&&(E=function(q,re){for(var xe=[],Se=new m(0,0),ze=0;ze=3){for(var Oe=0;Oe0?l+2*s:s}var Fy=ao([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),By=ao([{name:"a_projected_pos",components:3,type:"Float32"}],4),v2=(ao([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),ao([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),m2=(ao([{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"}]),ao([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),U=ao([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function fe(s,l,h){return s.sections.forEach(function(g){g.text=function(x,E,T){var M=E.layout.get("text-transform").evaluate(T,{});return M==="uppercase"?x=x.toLocaleUpperCase():M==="lowercase"&&(x=x.toLocaleLowerCase()),Ms.applyArabicShaping&&(x=Ms.applyArabicShaping(x)),x}(g.text,l,h)}),s}ao([{name:"triangle",components:3,type:"Uint16"}]),ao([{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"}]),ao([{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",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),ao([{type:"Float32",name:"offsetX"}]),ao([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Me={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},gt=function(s,l,h,g,x){var E,T,M=8*x-g-1,D=(1<>1,$=-7,H=h?x-1:0,q=h?-1:1,re=s[l+H];for(H+=q,E=re&(1<<-$)-1,re>>=-$,$+=M;$>0;E=256*E+s[l+H],H+=q,$-=8);for(T=E&(1<<-$)-1,E>>=-$,$+=g;$>0;T=256*T+s[l+H],H+=q,$-=8);if(E===0)E=1-N;else{if(E===D)return T?NaN:1/0*(re?-1:1);T+=Math.pow(2,g),E-=N}return(re?-1:1)*T*Math.pow(2,E-g)},zt=function(s,l,h,g,x,E){var T,M,D,N=8*E-x-1,$=(1<>1,q=x===23?Math.pow(2,-24)-Math.pow(2,-77):0,re=g?0:E-1,xe=g?1:-1,Se=l<0||l===0&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(M=isNaN(l)?1:0,T=$):(T=Math.floor(Math.log(l)/Math.LN2),l*(D=Math.pow(2,-T))<1&&(T--,D*=2),(l+=T+H>=1?q/D:q*Math.pow(2,1-H))*D>=2&&(T++,D/=2),T+H>=$?(M=0,T=$):T+H>=1?(M=(l*D-1)*Math.pow(2,x),T+=H):(M=l*Math.pow(2,H-1)*Math.pow(2,x),T=0));x>=8;s[h+re]=255&M,re+=xe,M/=256,x-=8);for(T=T<0;s[h+re]=255&T,re+=xe,T/=256,N-=8);s[h+re-xe]|=128*Se},xt=lt;function lt(s){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(s)?s:new Uint8Array(s||0),this.pos=0,this.type=0,this.length=this.buf.length}lt.Varint=0,lt.Fixed64=1,lt.Bytes=2,lt.Fixed32=5;var gr=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function sr(s){return s.type===lt.Bytes?s.readVarint()+s.pos:s.pos+1}function Ir(s,l,h){return h?4294967296*l+(s>>>0):4294967296*(l>>>0)+(s>>>0)}function xr(s,l,h){var g=l<=16383?1:l<=2097151?2:l<=268435455?3:Math.floor(Math.log(l)/(7*Math.LN2));h.realloc(g);for(var x=h.pos-1;x>=s;x--)h.buf[x+g]=h.buf[x]}function wr(s,l){for(var h=0;h>>8,s[h+2]=l>>>16,s[h+3]=l>>>24}function Ur(s,l){return(s[l]|s[l+1]<<8|s[l+2]<<16)+(s[l+3]<<24)}function er(s,l,h){s===1&&h.readMessage(Fr,l)}function Fr(s,l,h){if(s===3){var g=h.readMessage(En,{}),x=g.width,E=g.height,T=g.left,M=g.top,D=g.advance;l.push({id:g.id,bitmap:new Lc({width:x+6,height:E+6},g.bitmap),metrics:{width:x,height:E,left:T,top:M,advance:D}})}}function En(s,l,h){s===1?l.id=h.readVarint():s===2?l.bitmap=h.readBytes():s===3?l.width=h.readVarint():s===4?l.height=h.readVarint():s===5?l.left=h.readSVarint():s===6?l.top=h.readSVarint():s===7&&(l.advance=h.readVarint())}function jn(s){for(var l=0,h=0,g=0,x=s;g=0;q--){var re=T[q];if(!(H.w>re.w||H.h>re.h)){if(H.x=re.x,H.y=re.y,D=Math.max(D,H.y+H.h),M=Math.max(M,H.x+H.w),H.w===re.w&&H.h===re.h){var xe=T.pop();q>3,E=this.pos;this.type=7&g,s(x,l,this),this.pos===E&&this.skip(g)}return l},readMessage:function(s,l){return this.readFields(s,l,this.readVarint()+this.pos)},readFixed32:function(){var s=Vr(this.buf,this.pos);return this.pos+=4,s},readSFixed32:function(){var s=Ur(this.buf,this.pos);return this.pos+=4,s},readFixed64:function(){var s=Vr(this.buf,this.pos)+4294967296*Vr(this.buf,this.pos+4);return this.pos+=8,s},readSFixed64:function(){var s=Vr(this.buf,this.pos)+4294967296*Ur(this.buf,this.pos+4);return this.pos+=8,s},readFloat:function(){var s=gt(this.buf,this.pos,!0,23,4);return this.pos+=4,s},readDouble:function(){var s=gt(this.buf,this.pos,!0,52,8);return this.pos+=8,s},readVarint:function(s){var l,h,g=this.buf;return l=127&(h=g[this.pos++]),h<128?l:(l|=(127&(h=g[this.pos++]))<<7,h<128?l:(l|=(127&(h=g[this.pos++]))<<14,h<128?l:(l|=(127&(h=g[this.pos++]))<<21,h<128?l:function(x,E,T){var M,D,N=T.buf;if(M=(112&(D=N[T.pos++]))>>4,D<128||(M|=(127&(D=N[T.pos++]))<<3,D<128)||(M|=(127&(D=N[T.pos++]))<<10,D<128)||(M|=(127&(D=N[T.pos++]))<<17,D<128)||(M|=(127&(D=N[T.pos++]))<<24,D<128)||(M|=(1&(D=N[T.pos++]))<<31,D<128))return Ir(x,M,E);throw new Error("Expected varint not more than 10 bytes")}(l|=(15&(h=g[this.pos]))<<28,s,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var s=this.readVarint();return s%2==1?(s+1)/-2:s/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var s=this.readVarint()+this.pos,l=this.pos;return this.pos=s,s-l>=12&&gr?function(h,g,x){return gr.decode(h.subarray(g,x))}(this.buf,l,s):function(h,g,x){for(var E="",T=g;T239?4:$>223?3:$>191?2:1;if(T+q>x)break;q===1?$<128&&(H=$):q===2?(192&(M=h[T+1]))==128&&(H=(31&$)<<6|63&M)<=127&&(H=null):q===3?(D=h[T+2],(192&(M=h[T+1]))==128&&(192&D)==128&&((H=(15&$)<<12|(63&M)<<6|63&D)<=2047||H>=55296&&H<=57343)&&(H=null)):q===4&&(D=h[T+2],N=h[T+3],(192&(M=h[T+1]))==128&&(192&D)==128&&(192&N)==128&&((H=(15&$)<<18|(63&M)<<12|(63&D)<<6|63&N)<=65535||H>=1114112)&&(H=null)),H===null?(H=65533,q=1):H>65535&&(H-=65536,E+=String.fromCharCode(H>>>10&1023|55296),H=56320|1023&H),E+=String.fromCharCode(H),T+=q}return E}(this.buf,l,s)},readBytes:function(){var s=this.readVarint()+this.pos,l=this.buf.subarray(this.pos,s);return this.pos=s,l},readPackedVarint:function(s,l){if(this.type!==lt.Bytes)return s.push(this.readVarint(l));var h=sr(this);for(s=s||[];this.pos127;);else if(l===lt.Bytes)this.pos=this.readVarint()+this.pos;else if(l===lt.Fixed32)this.pos+=4;else{if(l!==lt.Fixed64)throw new Error("Unimplemented type: "+l);this.pos+=8}},writeTag:function(s,l){this.writeVarint(s<<3|l)},realloc:function(s){for(var l=this.length||16;l268435455||s<0?function(l,h){var g,x;if(l>=0?(g=l%4294967296|0,x=l/4294967296|0):(x=~(-l/4294967296),4294967295^(g=~(-l%4294967296))?g=g+1|0:(g=0,x=x+1|0)),l>=18446744073709552e3||l<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");h.realloc(10),function(E,T,M){M.buf[M.pos++]=127&E|128,E>>>=7,M.buf[M.pos++]=127&E|128,E>>>=7,M.buf[M.pos++]=127&E|128,E>>>=7,M.buf[M.pos++]=127&E|128,M.buf[M.pos]=127&(E>>>=7)}(g,0,h),function(E,T){var M=(7&E)<<4;T.buf[T.pos++]|=M|((E>>>=3)?128:0),E&&(T.buf[T.pos++]=127&E|((E>>>=7)?128:0),E&&(T.buf[T.pos++]=127&E|((E>>>=7)?128:0),E&&(T.buf[T.pos++]=127&E|((E>>>=7)?128:0),E&&(T.buf[T.pos++]=127&E|((E>>>=7)?128:0),E&&(T.buf[T.pos++]=127&E)))))}(x,h)}(s,this):(this.realloc(4),this.buf[this.pos++]=127&s|(s>127?128:0),s<=127||(this.buf[this.pos++]=127&(s>>>=7)|(s>127?128:0),s<=127||(this.buf[this.pos++]=127&(s>>>=7)|(s>127?128:0),s<=127||(this.buf[this.pos++]=s>>>7&127))))},writeSVarint:function(s){this.writeVarint(s<0?2*-s-1:2*s)},writeBoolean:function(s){this.writeVarint(!!s)},writeString:function(s){s=String(s),this.realloc(4*s.length),this.pos++;var l=this.pos;this.pos=function(g,x,E){for(var T,M,D=0;D55295&&T<57344){if(!M){T>56319||D+1===x.length?(g[E++]=239,g[E++]=191,g[E++]=189):M=T;continue}if(T<56320){g[E++]=239,g[E++]=191,g[E++]=189,M=T;continue}T=M-55296<<10|T-56320|65536,M=null}else M&&(g[E++]=239,g[E++]=191,g[E++]=189,M=null);T<128?g[E++]=T:(T<2048?g[E++]=T>>6|192:(T<65536?g[E++]=T>>12|224:(g[E++]=T>>18|240,g[E++]=T>>12&63|128),g[E++]=T>>6&63|128),g[E++]=63&T|128)}return E}(this.buf,s,this.pos);var h=this.pos-l;h>=128&&xr(l,h,this),this.pos=l-1,this.writeVarint(h),this.pos+=h},writeFloat:function(s){this.realloc(4),zt(this.buf,s,this.pos,!0,23,4),this.pos+=4},writeDouble:function(s){this.realloc(8),zt(this.buf,s,this.pos,!0,52,8),this.pos+=8},writeBytes:function(s){var l=s.length;this.writeVarint(l),this.realloc(l);for(var h=0;h=128&&xr(h,g,this),this.pos=h-1,this.writeVarint(g),this.pos+=g},writeMessage:function(s,l,h){this.writeTag(s,lt.Bytes),this.writeRawMessage(l,h)},writePackedVarint:function(s,l){l.length&&this.writeMessage(s,wr,l)},writePackedSVarint:function(s,l){l.length&&this.writeMessage(s,Or,l)},writePackedBoolean:function(s,l){l.length&&this.writeMessage(s,rt,l)},writePackedFloat:function(s,l){l.length&&this.writeMessage(s,cr,l)},writePackedDouble:function(s,l){l.length&&this.writeMessage(s,Cr,l)},writePackedFixed32:function(s,l){l.length&&this.writeMessage(s,Pt,l)},writePackedSFixed32:function(s,l){l.length&&this.writeMessage(s,_r,l)},writePackedFixed64:function(s,l){l.length&&this.writeMessage(s,Nr,l)},writePackedSFixed64:function(s,l){l.length&&this.writeMessage(s,Jt,l)},writeBytesField:function(s,l){this.writeTag(s,lt.Bytes),this.writeBytes(l)},writeFixed32Field:function(s,l){this.writeTag(s,lt.Fixed32),this.writeFixed32(l)},writeSFixed32Field:function(s,l){this.writeTag(s,lt.Fixed32),this.writeSFixed32(l)},writeFixed64Field:function(s,l){this.writeTag(s,lt.Fixed64),this.writeFixed64(l)},writeSFixed64Field:function(s,l){this.writeTag(s,lt.Fixed64),this.writeSFixed64(l)},writeVarintField:function(s,l){this.writeTag(s,lt.Varint),this.writeVarint(l)},writeSVarintField:function(s,l){this.writeTag(s,lt.Varint),this.writeSVarint(l)},writeStringField:function(s,l){this.writeTag(s,lt.Bytes),this.writeString(l)},writeFloatField:function(s,l){this.writeTag(s,lt.Fixed32),this.writeFloat(l)},writeDoubleField:function(s,l){this.writeTag(s,lt.Fixed64),this.writeDouble(l)},writeBooleanField:function(s,l){this.writeVarintField(s,!!l)}};var Br=function(s,l){var h=l.pixelRatio,g=l.version,x=l.stretchX,E=l.stretchY,T=l.content;this.paddedRect=s,this.pixelRatio=h,this.stretchX=x,this.stretchY=E,this.content=T,this.version=g},mr={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};mr.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},mr.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},mr.tlbr.get=function(){return this.tl.concat(this.br)},mr.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Br.prototype,mr);var Wt=function(s,l){var h={},g={};this.haveRenderCallbacks=[];var x=[];this.addImages(s,h,x),this.addImages(l,g,x);var E=jn(x),T=new os({width:E.w||1,height:E.h||1});for(var M in s){var D=s[M],N=h[M].paddedRect;os.copy(D.data,T,{x:0,y:0},{x:N.x+1,y:N.y+1},D.data)}for(var $ in l){var H=l[$],q=g[$].paddedRect,re=q.x+1,xe=q.y+1,Se=H.data.width,ze=H.data.height;os.copy(H.data,T,{x:0,y:0},{x:re,y:xe},H.data),os.copy(H.data,T,{x:0,y:ze-1},{x:re,y:xe-1},{width:Se,height:1}),os.copy(H.data,T,{x:0,y:0},{x:re,y:xe+ze},{width:Se,height:1}),os.copy(H.data,T,{x:Se-1,y:0},{x:re-1,y:xe},{width:1,height:ze}),os.copy(H.data,T,{x:0,y:0},{x:re+Se,y:xe},{width:1,height:ze})}this.image=T,this.iconPositions=h,this.patternPositions=g};Wt.prototype.addImages=function(s,l,h){for(var g in s){var x=s[g],E={x:0,y:0,w:x.data.width+2,h:x.data.height+2};h.push(E),l[g]=new Br(E,x),x.hasRenderCallback&&this.haveRenderCallbacks.push(g)}},Wt.prototype.patchUpdatedImages=function(s,l){for(var h in s.dispatchRenderCallbacks(this.haveRenderCallbacks),s.updatedImages)this.patchUpdatedImage(this.iconPositions[h],s.getImage(h),l),this.patchUpdatedImage(this.patternPositions[h],s.getImage(h),l)},Wt.prototype.patchUpdatedImage=function(s,l,h){if(s&&l&&s.version!==l.version){s.version=l.version;var g=s.tl;h.update(l.data,void 0,{x:g[0],y:g[1]})}},Kr("ImagePosition",Br),Kr("ImageAtlas",Wt);var Sn={horizontal:1,vertical:2,horizontalOnly:3},ui=function(){this.scale=1,this.fontStack="",this.imageName=null};ui.forText=function(s,l){var h=new ui;return h.scale=s||1,h.fontStack=l,h},ui.forImage=function(s){var l=new ui;return l.imageName=s,l};var jr=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function ri(s,l,h,g,x,E,T,M,D,N,$,H,q,re,xe,Se){var ze,Oe=jr.fromFeature(s,x);H===Sn.vertical&&Oe.verticalizePunctuation();var et=Ms.processBidirectionalText,ut=Ms.processStyledBidirectionalText;if(et&&Oe.sections.length===1){ze=[];for(var St=0,It=et(Oe.toString(),Ha(Oe,N,E,l,g,re,xe));St0&&sd>ho&&(ho=sd)}else{var b2=Qn[$i.fontStack],ud=b2&&b2[Ou];if(ud&&ud.rect)Wc=ud.rect,Xa=ud.metrics;else{var X0=di[$i.fontStack],E2=X0&&X0[Ou];if(!E2)continue;Xa=E2.metrics}Gc=24*(Fi-$i.scale)}Jp?(sn.verticalizable=!0,ya.push({glyph:Ou,imageName:Nl,x:Po,y:Es+Gc,vertical:Jp,scale:$i.scale,fontStack:$i.fontStack,sectionIndex:Hc,metrics:Xa,rect:Wc}),Po+=ad*$i.scale+Aa):(ya.push({glyph:Ou,imageName:Nl,x:Po,y:Es+Gc,vertical:Jp,scale:$i.scale,fontStack:$i.fontStack,sectionIndex:Hc,metrics:Xa,rect:Wc}),Po+=Xa.advance*$i.scale+Aa)}ya.length!==0&&(Vo=Math.max(Po-Aa,Vo),uo(ya,0,ya.length-1,Wa,ho)),Po=0;var S2=zi*Fi+ho;ls.lineOffset=Math.max(ho,ks),Es+=S2,Ss=Math.max(S2,Ss),++jo}else Es+=zi,++jo}var Wf,Y0=Es- -17,ld=la(Sa),Vh=ld.horizontalAlign,cd=ld.verticalAlign;(function(A2,T2,Z0,q0,w2,K0,Q0,J0,C2){var fd,R2=(T2-Z0)*w2;fd=K0!==Q0?-J0*q0- -17:(-q0*C2+.5)*Q0;for(var hd=0,ev=A2;hd=0&&g>=s&&$n[this.text.charCodeAt(g)];g--)h--;this.text=this.text.substring(s,h),this.sectionIndex=this.sectionIndex.slice(s,h)},jr.prototype.substring=function(s,l){var h=new jr;return h.text=this.text.substring(s,l),h.sectionIndex=this.sectionIndex.slice(s,l),h.sections=this.sections,h},jr.prototype.toString=function(){return this.text},jr.prototype.getMaxScale=function(){var s=this;return this.sectionIndex.reduce(function(l,h){return Math.max(l,s.sections[h].scale)},0)},jr.prototype.addTextSection=function(s,l){this.text+=s.text,this.sections.push(ui.forText(s.scale,s.fontStack||l));for(var h=this.sections.length-1,g=0;g=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var $n={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Dn={};function Di(s,l,h,g,x,E){if(l.imageName){var T=g[l.imageName];return T?T.displaySize[0]*l.scale*24/E+x:0}var M=h[l.fontStack],D=M&&M[s];return D?D.metrics.advance*l.scale+x:0}function ja(s,l,h,g){var x=Math.pow(s-l,2);return g?s=0,H=0,q=0;q-h/2;){if(--T<0)return!1;M-=s[T].dist(E),E=s[T]}M+=s[T].dist(s[T+1]),T++;for(var D=[],N=0;Mg;)N-=D.shift().angleDelta;if(N>x)return!1;T++,M+=$.dist(H)}return!0}function Ni(s){for(var l=0,h=0;hN){var xe=(N-D)/re,Se=Ra(H.x,q.x,xe),ze=Ra(H.y,q.y,xe),Oe=new Oa(Se,ze,q.angleTo(H),$);return Oe._round(),!T||zo(s,Oe,M,T,l)?Oe:void 0}D+=re}}function Ga(s,l,h,g,x,E,T,M,D){var N=Mn(g,E,T),$=fi(g,x),H=$*T,q=s[0].x===0||s[0].x===D||s[0].y===0||s[0].y===D;return l-H=0&&Pi=0&&Tn=0&&Gr+Er<=kr){var zi=new Oa(Pi,Tn,di,Zr);zi._round(),Oe&&!zo(xe,zi,ut,Oe,et)||An.push(zi)}}mn+=sn}return It||An.length||St||(An=re(xe,mn/2,ze,Oe,et,ut,St,!0,Xt)),An}(s,q?l/2*M%l:($/2+2*E)*T*M%l,l,N,h,H,q,!1,D)}function il(s,l,h,g,x){for(var E=[],T=0;T=g&&H.x>=g||($.x>=g?$=new m(g,$.y+(g-$.x)/(H.x-$.x)*(H.y-$.y))._round():H.x>=g&&(H=new m(g,$.y+(g-$.x)/(H.x-$.x)*(H.y-$.y))._round()),$.y>=x&&H.y>=x||($.y>=x?$=new m($.x+(x-$.y)/(H.y-$.y)*(H.x-$.x),x)._round():H.y>=x&&(H=new m($.x+(x-$.y)/(H.y-$.y)*(H.x-$.x),x)._round()),D&&$.equals(D[D.length-1])||E.push(D=[$]),D.push(H)))))}return E}function Ae(s,l,h,g){var x=[],E=s.image,T=E.pixelRatio,M=E.paddedRect.w-2,D=E.paddedRect.h-2,N=s.right-s.left,$=s.bottom-s.top,H=E.stretchX||[[0,M]],q=E.stretchY||[[0,D]],re=function(Pi,Tn){return Pi+Tn[1]-Tn[0]},xe=H.reduce(re,0),Se=q.reduce(re,0),ze=M-xe,Oe=D-Se,et=0,ut=xe,St=0,It=Se,Xt=0,Er=ze,kr=0,mn=Oe;if(E.content&&g){var Gr=E.content;et=Et(H,0,Gr[0]),St=Et(q,0,Gr[1]),ut=Et(H,Gr[0],Gr[2]),It=Et(q,Gr[1],Gr[3]),Xt=Gr[0]-et,kr=Gr[1]-St,Er=Gr[2]-Gr[0]-ut,mn=Gr[3]-Gr[1]-It}var An=function(Pi,Tn,zi,Sa){var Na=Hr(Pi.stretch-et,ut,N,s.left),Fa=ni(Pi.fixed-Xt,Er,Pi.stretch,xe),Aa=Hr(Tn.stretch-St,It,$,s.top),Ua=ni(Tn.fixed-kr,mn,Tn.stretch,Se),Mo=Hr(zi.stretch-et,ut,N,s.left),Po=ni(zi.fixed-Xt,Er,zi.stretch,xe),Es=Hr(Sa.stretch-St,It,$,s.top),Vo=ni(Sa.fixed-kr,mn,Sa.stretch,Se),Ss=new m(Na,Aa),Wa=new m(Mo,Aa),jo=new m(Mo,Es),xi=new m(Na,Es),ia=new m(Fa/T,Ua/T),qi=new m(Po/T,Vo/T),Fi=l*Math.PI/180;if(Fi){var ks=Math.sin(Fi),ls=Math.cos(Fi),ya=[ls,-ks,ks,ls];Ss._matMult(ya),Wa._matMult(ya),xi._matMult(ya),jo._matMult(ya)}var ho=Pi.stretch+Pi.fixed,cs=Tn.stretch+Tn.fixed;return{tl:Ss,tr:Wa,bl:xi,br:jo,tex:{x:E.paddedRect.x+1+ho,y:E.paddedRect.y+1+cs,w:zi.stretch+zi.fixed-ho,h:Sa.stretch+Sa.fixed-cs},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:ia,pixelOffsetBR:qi,minFontScaleX:Er/T/N,minFontScaleY:mn/T/$,isSDF:h}};if(g&&(E.stretchX||E.stretchY))for(var Zr=pt(H,ze,xe),li=pt(q,Oe,Se),Ln=0;Ln0&&(re=Math.max(10,re),this.circleDiameter=re)}else{var xe=E.top*T-M,Se=E.bottom*T+M,ze=E.left*T-M,Oe=E.right*T+M,et=E.collisionPadding;if(et&&(ze-=et[0]*T,xe-=et[1]*T,Oe+=et[2]*T,Se+=et[3]*T),N){var ut=new m(ze,xe),St=new m(Oe,xe),It=new m(ze,Se),Xt=new m(Oe,Se),Er=N*Math.PI/180;ut._rotate(Er),St._rotate(Er),It._rotate(Er),Xt._rotate(Er),ze=Math.min(ut.x,St.x,It.x,Xt.x),Oe=Math.max(ut.x,St.x,It.x,Xt.x),xe=Math.min(ut.y,St.y,It.y,Xt.y),Se=Math.max(ut.y,St.y,It.y,Xt.y)}s.emplaceBack(l.x,l.y,ze,xe,Oe,Se,h,g,x)}this.boxEndIndex=s.length},te=function(s,l){if(s===void 0&&(s=[]),l===void 0&&(l=me),this.data=s,this.length=this.data.length,this.compare=l,this.length>0)for(var h=(this.length>>1)-1;h>=0;h--)this._down(h)};function me(s,l){return sl?1:0}function Pe(s,l,h){l===void 0&&(l=1),h===void 0&&(h=!1);for(var g=1/0,x=1/0,E=-1/0,T=-1/0,M=s[0],D=0;DE)&&(E=N.x),(!D||N.y>T)&&(T=N.y)}var $=Math.min(E-g,T-x),H=$/2,q=new te([],vt);if($===0)return new m(g,x);for(var re=g;reSe.d||!Se.d)&&(Se=Oe,h&&console.log("found best %d after %d probes",Math.round(1e4*Oe.d)/1e4,ze)),Oe.max-Se.d<=l||(q.push(new ht(Oe.p.x-(H=Oe.h/2),Oe.p.y-H,H,s)),q.push(new ht(Oe.p.x+H,Oe.p.y-H,H,s)),q.push(new ht(Oe.p.x-H,Oe.p.y+H,H,s)),q.push(new ht(Oe.p.x+H,Oe.p.y+H,H,s)),ze+=4)}return h&&(console.log("num probes: "+ze),console.log("best distance: "+Se.d)),Se.p}function vt(s,l){return l.max-s.max}function ht(s,l,h,g){this.p=new m(s,l),this.h=h,this.d=function(x,E){for(var T=!1,M=1/0,D=0;Dx.y!=xe.y>x.y&&x.x<(xe.x-re.x)*(x.y-re.y)/(xe.y-re.y)+re.x&&(T=!T),M=Math.min(M,Dl(x,re,xe))}return(T?1:-1)*Math.sqrt(M)}(this.p,g),this.max=this.d+this.h*Math.SQRT2}te.prototype.push=function(s){this.data.push(s),this.length++,this._up(this.length-1)},te.prototype.pop=function(){if(this.length!==0){var s=this.data[0],l=this.data.pop();return this.length--,this.length>0&&(this.data[0]=l,this._down(0)),s}},te.prototype.peek=function(){return this.data[0]},te.prototype._up=function(s){for(var l=this.data,h=this.compare,g=l[s];s>0;){var x=s-1>>1,E=l[x];if(h(g,E)>=0)break;l[s]=E,s=x}l[s]=g},te.prototype._down=function(s){for(var l=this.data,h=this.compare,g=this.length>>1,x=l[s];s=0)break;l[s]=T,s=E}l[s]=x};var Le=Number.POSITIVE_INFINITY;function We(s,l){return l[1]!==Le?function(h,g,x){var E=0,T=0;switch(g=Math.abs(g),x=Math.abs(x),h){case"top-right":case"top-left":case"top":T=x-7;break;case"bottom-right":case"bottom-left":case"bottom":T=7-x}switch(h){case"top-right":case"bottom-right":case"right":E=-g;break;case"top-left":case"bottom-left":case"left":E=g}return[E,T]}(s,l[0],l[1]):function(h,g){var x=0,E=0;g<0&&(g=0);var T=g/Math.sqrt(2);switch(h){case"top-right":case"top-left":E=T-7;break;case"bottom-right":case"bottom-left":E=7-T;break;case"bottom":E=7-g;break;case"top":E=g-7}switch(h){case"top-right":case"bottom-right":x=-T;break;case"top-left":case"bottom-left":x=T;break;case"left":x=g;break;case"right":x=-g}return[x,E]}(s,l[0])}function Ze(s){switch(s){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Te(s,l,h,g,x,E,T,M,D,N,$,H,q,re,xe){var Se=function(St,It,Xt,Er,kr,mn,Gr,An){for(var Zr=Er.layout.get("text-rotate").evaluate(mn,{})*Math.PI/180,li=[],Ln=0,sn=It.positionedLines;Ln32640&&ye(s.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):ze.kind==="composite"&&((Oe=[128*re.compositeTextSizes[0].evaluate(T,{},xe),128*re.compositeTextSizes[1].evaluate(T,{},xe)])[0]>32640||Oe[1]>32640)&&ye(s.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),s.addSymbols(s.text,Se,Oe,M,E,T,N,l,D.lineStartIndex,D.lineLength,q,xe);for(var et=0,ut=$;et=0;T--)if(g.dist(E[T])0)&&(E.value.kind!=="constant"||E.value.value.length>0),N=M.value.kind!=="constant"||!!M.value.value||Object.keys(M.parameters).length>0,$=x.get("symbol-sort-key");if(this.features=[],D||N){for(var H=l.iconDependencies,q=l.glyphDependencies,re=l.availableImages,xe=new Zn(this.zoom),Se=0,ze=s;Se=0;for(var di=0,Qn=kr.sections;di=0;M--)E[M]={x:l[M].x,y:l[M].y,tileUnitDistanceFromAnchor:x},M>0&&(x+=l[M-1].dist(l[M]));for(var D=0;D0},Jr.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Jr.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Jr.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Jr.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Jr.prototype.addIndicesForPlacedSymbol=function(s,l){for(var h=s.placedSymbolArray.get(l),g=h.vertexStartIndex+4*h.numGlyphs,x=h.vertexStartIndex;x1||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(var h=0,g=this.symbolInstanceIndexes;h=0&&M.indexOf(E)===T&&l.addIndicesForPlacedSymbol(l.text,E)}),x.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,x.verticalPlacedTextSymbolIndex),x.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,x.placedIconSymbolIndex),x.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,x.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Kr("SymbolBucket",Jr,{omit:["layers","collisionBoxArray","features","compareText"]}),Jr.MAX_GLYPHS=65535,Jr.addDynamicAttributes=ir;var on=new ga({"symbol-placement":new dn(ie.layout_symbol["symbol-placement"]),"symbol-spacing":new dn(ie.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new dn(ie.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new nn(ie.layout_symbol["symbol-sort-key"]),"symbol-z-order":new dn(ie.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new dn(ie.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new dn(ie.layout_symbol["icon-ignore-placement"]),"icon-optional":new dn(ie.layout_symbol["icon-optional"]),"icon-rotation-alignment":new dn(ie.layout_symbol["icon-rotation-alignment"]),"icon-size":new nn(ie.layout_symbol["icon-size"]),"icon-text-fit":new dn(ie.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new dn(ie.layout_symbol["icon-text-fit-padding"]),"icon-image":new nn(ie.layout_symbol["icon-image"]),"icon-rotate":new nn(ie.layout_symbol["icon-rotate"]),"icon-padding":new dn(ie.layout_symbol["icon-padding"]),"icon-keep-upright":new dn(ie.layout_symbol["icon-keep-upright"]),"icon-offset":new nn(ie.layout_symbol["icon-offset"]),"icon-anchor":new nn(ie.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new dn(ie.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new dn(ie.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new dn(ie.layout_symbol["text-rotation-alignment"]),"text-field":new nn(ie.layout_symbol["text-field"]),"text-font":new nn(ie.layout_symbol["text-font"]),"text-size":new nn(ie.layout_symbol["text-size"]),"text-max-width":new nn(ie.layout_symbol["text-max-width"]),"text-line-height":new dn(ie.layout_symbol["text-line-height"]),"text-letter-spacing":new nn(ie.layout_symbol["text-letter-spacing"]),"text-justify":new nn(ie.layout_symbol["text-justify"]),"text-radial-offset":new nn(ie.layout_symbol["text-radial-offset"]),"text-variable-anchor":new dn(ie.layout_symbol["text-variable-anchor"]),"text-anchor":new nn(ie.layout_symbol["text-anchor"]),"text-max-angle":new dn(ie.layout_symbol["text-max-angle"]),"text-writing-mode":new dn(ie.layout_symbol["text-writing-mode"]),"text-rotate":new nn(ie.layout_symbol["text-rotate"]),"text-padding":new dn(ie.layout_symbol["text-padding"]),"text-keep-upright":new dn(ie.layout_symbol["text-keep-upright"]),"text-transform":new nn(ie.layout_symbol["text-transform"]),"text-offset":new nn(ie.layout_symbol["text-offset"]),"text-allow-overlap":new dn(ie.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new dn(ie.layout_symbol["text-ignore-placement"]),"text-optional":new dn(ie.layout_symbol["text-optional"])}),Pn={paint:new ga({"icon-opacity":new nn(ie.paint_symbol["icon-opacity"]),"icon-color":new nn(ie.paint_symbol["icon-color"]),"icon-halo-color":new nn(ie.paint_symbol["icon-halo-color"]),"icon-halo-width":new nn(ie.paint_symbol["icon-halo-width"]),"icon-halo-blur":new nn(ie.paint_symbol["icon-halo-blur"]),"icon-translate":new dn(ie.paint_symbol["icon-translate"]),"icon-translate-anchor":new dn(ie.paint_symbol["icon-translate-anchor"]),"text-opacity":new nn(ie.paint_symbol["text-opacity"]),"text-color":new nn(ie.paint_symbol["text-color"],{runtimeType:Pr,getOverride:function(s){return s.textColor},hasOverride:function(s){return!!s.textColor}}),"text-halo-color":new nn(ie.paint_symbol["text-halo-color"]),"text-halo-width":new nn(ie.paint_symbol["text-halo-width"]),"text-halo-blur":new nn(ie.paint_symbol["text-halo-blur"]),"text-translate":new dn(ie.paint_symbol["text-translate"]),"text-translate-anchor":new dn(ie.paint_symbol["text-translate-anchor"])}),layout:on},zn=function(s){this.type=s.property.overrides?s.property.overrides.runtimeType:qr,this.defaultValue=s};zn.prototype.evaluate=function(s){if(s.formattedSection){var l=this.defaultValue.property.overrides;if(l&&l.hasOverride(s.formattedSection))return l.getOverride(s.formattedSection)}return s.feature&&s.featureState?this.defaultValue.evaluate(s.feature,s.featureState):this.defaultValue.property.specification.default},zn.prototype.eachChild=function(s){this.defaultValue.isConstant()||s(this.defaultValue.value._styleExpression.expression)},zn.prototype.outputDefined=function(){return!1},zn.prototype.serialize=function(){return null},Kr("FormatSectionOverride",zn,{omit:["defaultValue"]});var Ui=function(s){function l(h){s.call(this,h,Pn)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.recalculate=function(h,g){if(s.prototype.recalculate.call(this,h,g),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")),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"){var x=this.layout.get("text-writing-mode");if(x){for(var E=[],T=0,M=x;T",targetMapId:g,sourceMapId:E.mapId})}}},nd.prototype.receive=function(s){var l=s.data,h=l.id;if(h&&(!l.targetMapId||this.mapId===l.targetMapId))if(l.type===""){delete this.tasks[h];var g=this.cancelCallbacks[h];delete this.cancelCallbacks[h],g&&g()}else Lt()||l.mustQueue?(this.tasks[h]=l,this.taskQueue.push(h),this.invoker.trigger()):this.processTask(h,l)},nd.prototype.process=function(){if(this.taskQueue.length){var s=this.taskQueue.shift(),l=this.tasks[s];delete this.tasks[s],this.taskQueue.length&&this.invoker.trigger(),l&&this.processTask(s,l)}},nd.prototype.processTask=function(s,l){var h=this;if(l.type===""){var g=this.callbacks[s];delete this.callbacks[s],g&&(l.error?g(Yi(l.error)):g(null,Yi(l.data)))}else{var x=!1,E=st(this.globalScope)?void 0:[],T=l.hasCallback?function($,H){x=!0,delete h.cancelCallbacks[s],h.target.postMessage({id:s,type:"",sourceMapId:h.mapId,error:$?Wo($):null,data:Wo(H,E)},E)}:function($){x=!0},M=null,D=Yi(l.data);if(this.parent[l.type])M=this.parent[l.type](l.sourceMapId,D,T);else if(this.parent.getWorkerSource){var N=l.type.split(".");M=this.parent.getWorkerSource(l.sourceMapId,N[0],D.source)[N[1]](D,T)}else T(new Error("Could not find function "+l.type));!x&&M&&M.cancel&&(this.cancelCallbacks[s]=M.cancel)}},nd.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var bo=function(s,l){s&&(l?this.setSouthWest(s).setNorthEast(l):s.length===4?this.setSouthWest([s[0],s[1]]).setNorthEast([s[2],s[3]]):this.setSouthWest(s[0]).setNorthEast(s[1]))};bo.prototype.setNorthEast=function(s){return this._ne=s instanceof Ea?new Ea(s.lng,s.lat):Ea.convert(s),this},bo.prototype.setSouthWest=function(s){return this._sw=s instanceof Ea?new Ea(s.lng,s.lat):Ea.convert(s),this},bo.prototype.extend=function(s){var l,h,g=this._sw,x=this._ne;if(s instanceof Ea)l=s,h=s;else{if(!(s instanceof bo))return Array.isArray(s)?s.length===4||s.every(Array.isArray)?this.extend(bo.convert(s)):this.extend(Ea.convert(s)):this;if(h=s._ne,!(l=s._sw)||!h)return this}return g||x?(g.lng=Math.min(l.lng,g.lng),g.lat=Math.min(l.lat,g.lat),x.lng=Math.max(h.lng,x.lng),x.lat=Math.max(h.lat,x.lat)):(this._sw=new Ea(l.lng,l.lat),this._ne=new Ea(h.lng,h.lat)),this},bo.prototype.getCenter=function(){return new Ea((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},bo.prototype.getSouthWest=function(){return this._sw},bo.prototype.getNorthEast=function(){return this._ne},bo.prototype.getNorthWest=function(){return new Ea(this.getWest(),this.getNorth())},bo.prototype.getSouthEast=function(){return new Ea(this.getEast(),this.getSouth())},bo.prototype.getWest=function(){return this._sw.lng},bo.prototype.getSouth=function(){return this._sw.lat},bo.prototype.getEast=function(){return this._ne.lng},bo.prototype.getNorth=function(){return this._ne.lat},bo.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},bo.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},bo.prototype.isEmpty=function(){return!(this._sw&&this._ne)},bo.prototype.contains=function(s){var l=Ea.convert(s),h=l.lng,g=l.lat,x=this._sw.lng<=h&&h<=this._ne.lng;return this._sw.lng>this._ne.lng&&(x=this._sw.lng>=h&&h>=this._ne.lng),this._sw.lat<=g&&g<=this._ne.lat&&x},bo.convert=function(s){return!s||s instanceof bo?s:new bo(s)};var Ea=function(s,l){if(isNaN(s)||isNaN(l))throw new Error("Invalid LngLat object: ("+s+", "+l+")");if(this.lng=+s,this.lat=+l,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Ea.prototype.wrap=function(){return new Ea(k(this.lng,-180,180),this.lat)},Ea.prototype.toArray=function(){return[this.lng,this.lat]},Ea.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Ea.prototype.distanceTo=function(s){var l=Math.PI/180,h=this.lat*l,g=s.lat*l,x=Math.sin(h)*Math.sin(g)+Math.cos(h)*Math.cos(g)*Math.cos((s.lng-this.lng)*l);return 63710088e-1*Math.acos(Math.min(x,1))},Ea.prototype.toBounds=function(s){s===void 0&&(s=0);var l=360*s/40075017,h=l/Math.cos(Math.PI/180*this.lat);return new bo(new Ea(this.lng-h,this.lat-l),new Ea(this.lng+h,this.lat+l))},Ea.convert=function(s){if(s instanceof Ea)return s;if(Array.isArray(s)&&(s.length===2||s.length===3))return new Ea(Number(s[0]),Number(s[1]));if(!Array.isArray(s)&&typeof s=="object"&&s!==null)return new Ea(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: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Ib=2*Math.PI*63710088e-1;function Mb(s){return Ib*Math.cos(s*Math.PI/180)}function Pb(s){return(180+s)/360}function Ob(s){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+s*Math.PI/360)))/360}function kb(s,l){return s/Mb(l)}function Ny(s){return 360/Math.PI*Math.atan(Math.exp((180-360*s)*Math.PI/180))-90}var Kp=function(s,l,h){h===void 0&&(h=0),this.x=+s,this.y=+l,this.z=+h};Kp.fromLngLat=function(s,l){l===void 0&&(l=0);var h=Ea.convert(s);return new Kp(Pb(h.lng),Ob(h.lat),kb(l,h.lat))},Kp.prototype.toLngLat=function(){return new Ea(360*this.x-180,Ny(this.y))},Kp.prototype.toAltitude=function(){return this.z*Mb(Ny(this.y))},Kp.prototype.meterInMercatorCoordinateUnits=function(){return 1/Ib*(s=Ny(this.y),1/Math.cos(s*Math.PI/180));var s};var Qp=function(s,l,h){this.z=s,this.x=l,this.y=h,this.key=W0(0,s,s,l,h)};Qp.prototype.equals=function(s){return this.z===s.z&&this.x===s.x&&this.y===s.y},Qp.prototype.url=function(s,l){var h,g,x,E,T,M=(g=this.y,x=this.z,E=Rb(256*(h=this.x),256*(g=Math.pow(2,x)-g-1),x),T=Rb(256*(h+1),256*(g+1),x),E[0]+","+E[1]+","+T[0]+","+T[1]),D=function(N,$,H){for(var q,re="",xe=N;xe>0;xe--)re+=($&(q=1<this.canonical.z?new Eo(s,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Eo(s,this.wrap,s,this.canonical.x>>l,this.canonical.y>>l)},Eo.prototype.calculateScaledKey=function(s,l){var h=this.canonical.z-s;return s>this.canonical.z?W0(this.wrap*+l,s,this.canonical.z,this.canonical.x,this.canonical.y):W0(this.wrap*+l,s,s,this.canonical.x>>h,this.canonical.y>>h)},Eo.prototype.isChildOf=function(s){if(s.wrap!==this.wrap)return!1;var l=this.canonical.z-s.canonical.z;return s.overscaledZ===0||s.overscaledZ>l&&s.canonical.y===this.canonical.y>>l},Eo.prototype.children=function(s){if(this.overscaledZ>=s)return[new Eo(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var l=this.canonical.z+1,h=2*this.canonical.x,g=2*this.canonical.y;return[new Eo(l,this.wrap,l,h,g),new Eo(l,this.wrap,l,h+1,g),new Eo(l,this.wrap,l,h,g+1),new Eo(l,this.wrap,l,h+1,g+1)]},Eo.prototype.isLessThan=function(s){return this.wraps.wrap)&&(this.overscaledZs.overscaledZ)&&(this.canonical.xs.canonical.x)&&this.canonical.y=this.dim+1||l<-1||l>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(l+1)*this.stride+(s+1)},jf.prototype._unpackMapbox=function(s,l,h){return(256*s*256+256*l+h)/10-1e4},jf.prototype._unpackTerrarium=function(s,l,h){return 256*s+l+h/256-32768},jf.prototype.getPixels=function(){return new os({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},jf.prototype.backfillBorder=function(s,l,h){if(this.dim!==s.dim)throw new Error("dem dimension mismatch");var g=l*this.dim,x=l*this.dim+this.dim,E=h*this.dim,T=h*this.dim+this.dim;switch(l){case-1:g=x-1;break;case 1:x=g+1}switch(h){case-1:E=T-1;break;case 1:T=E+1}for(var M=-l*this.dim,D=-h*this.dim,N=E;N=0&&$[3]>=0&&M.insert(T,$[0],$[1],$[2],$[3])}},Hf.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new jc.VectorTile(new xt(this.rawTileData)).layers,this.sourceLayerCoder=new y2(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Hf.prototype.query=function(s,l,h,g){var x=this;this.loadVTLayers();for(var E=s.params||{},T=8192/s.tileSize/s.scale,M=Cl(E.filter),D=s.queryGeometry,N=s.queryPadding*T,$=Bb(D),H=this.grid.query($.minX-N,$.minY-N,$.maxX+N,$.maxY+N),q=Bb(s.cameraQueryGeometry),re=this.grid3D.query(q.minX-N,q.minY-N,q.maxX+N,q.maxY+N,function(St,It,Xt,Er){return function(kr,mn,Gr,An,Zr){for(var li=0,Ln=kr;li=sn.x&&Zr>=sn.y)return!0}var di=[new m(mn,Gr),new m(mn,Zr),new m(An,Zr),new m(An,Gr)];if(kr.length>2){for(var Qn=0,Pi=di;Qn=0)return!0;return!1}(E,H)){var q=this.sourceLayerCoder.decode(h),re=this.vtLayers[q].feature(g);if(x.needGeometry){var xe=ba(re,!0);if(!x.filter(new Zn(this.tileID.overscaledZ),xe,this.tileID.canonical))return}else if(!x.filter(new Zn(this.tileID.overscaledZ),re))return;for(var Se=this.getId(re,q),ze=0;zeg)x=!1;else if(l)if(this.expirationTimeqe&&(s.getActor().send("enforceCacheSizeLimit",Ne),Jn=0)},a.clamp=P,a.clearTileCache=function(s){var l=b.caches.delete("mapbox-tiles");s&&l.catch(s).then(function(){return s()})},a.clipLine=il,a.clone=function(s){var l=new vi(16);return l[0]=s[0],l[1]=s[1],l[2]=s[2],l[3]=s[3],l[4]=s[4],l[5]=s[5],l[6]=s[6],l[7]=s[7],l[8]=s[8],l[9]=s[9],l[10]=s[10],l[11]=s[11],l[12]=s[12],l[13]=s[13],l[14]=s[14],l[15]=s[15],l},a.clone$1=se,a.clone$2=function(s){var l=new vi(3);return l[0]=s[0],l[1]=s[1],l[2]=s[2],l},a.collisionCircleLayout=U,a.config=Je,a.create=function(){var s=new vi(16);return vi!=Float32Array&&(s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[11]=0,s[12]=0,s[13]=0,s[14]=0),s[0]=1,s[5]=1,s[10]=1,s[15]=1,s},a.create$1=function(){var s=new vi(9);return vi!=Float32Array&&(s[1]=0,s[2]=0,s[3]=0,s[5]=0,s[6]=0,s[7]=0),s[0]=1,s[4]=1,s[8]=1,s},a.create$2=function(){var s=new vi(4);return vi!=Float32Array&&(s[1]=0,s[2]=0),s[0]=1,s[3]=1,s},a.createCommonjsModule=u,a.createExpression=Cc,a.createLayout=ao,a.createStyleLayer=function(s){return s.type==="custom"?new g2(s):new hc[s.type](s)},a.cross=function(s,l,h){var g=l[0],x=l[1],E=l[2],T=h[0],M=h[1],D=h[2];return s[0]=x*D-E*M,s[1]=E*T-g*D,s[2]=g*M-x*T,s},a.deepEqual=function s(l,h){if(Array.isArray(l)){if(!Array.isArray(h)||l.length!==h.length)return!1;for(var g=0;g0&&(E=1/Math.sqrt(E)),s[0]=l[0]*E,s[1]=l[1]*E,s[2]=l[2]*E,s},a.number=Ra,a.offscreenCanvasSupported=Ri,a.ortho=function(s,l,h,g,x,E,T){var M=1/(l-h),D=1/(g-x),N=1/(E-T);return s[0]=-2*M,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=-2*D,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=2*N,s[11]=0,s[12]=(l+h)*M,s[13]=(x+g)*D,s[14]=(T+E)*N,s[15]=1,s},a.parseGlyphPBF=function(s){return new xt(s).readFields(er,[])},a.pbf=xt,a.performSymbolLayout=function(s,l,h,g,x,E,T){s.createArrays(),s.tilePixelRatio=8192/(512*s.overscaling),s.compareText={},s.iconsNeedLinear=!1;var M=s.layers[0].layout,D=s.layers[0]._unevaluatedLayout._values,N={};if(s.textSizeData.kind==="composite"){var $=s.textSizeData,H=$.maxZoom;N.compositeTextSizes=[D["text-size"].possiblyEvaluate(new Zn($.minZoom),T),D["text-size"].possiblyEvaluate(new Zn(H),T)]}if(s.iconSizeData.kind==="composite"){var q=s.iconSizeData,re=q.maxZoom;N.compositeIconSizes=[D["icon-size"].possiblyEvaluate(new Zn(q.minZoom),T),D["icon-size"].possiblyEvaluate(new Zn(re),T)]}N.layoutTextSize=D["text-size"].possiblyEvaluate(new Zn(s.zoom+1),T),N.layoutIconSize=D["icon-size"].possiblyEvaluate(new Zn(s.zoom+1),T),N.textMaxSize=D["text-size"].possiblyEvaluate(new Zn(18));for(var xe=24*M.get("text-line-height"),Se=M.get("text-rotation-alignment")==="map"&&M.get("symbol-placement")!=="point",ze=M.get("text-keep-upright"),Oe=M.get("text-size"),et=function(){var It=St[ut],Xt=M.get("text-font").evaluate(It,{},T).join(","),Er=Oe.evaluate(It,{},T),kr=N.layoutTextSize.evaluate(It,{},T),mn=N.layoutIconSize.evaluate(It,{},T),Gr={horizontal:{},vertical:void 0},An=It.text,Zr=[0,0];if(An){var li=An.toString(),Ln=24*M.get("text-letter-spacing").evaluate(It,{},T),sn=function(xi){for(var ia=0,qi=xi;ia=8192||rv.y<0||rv.y>=8192||function(Ya,pc,ik,jh,jy,zb,I2,Xc,M2,nv,P2,O2,Hy,$b,iv,Vb,jb,Hb,Gb,Wb,ku,k2,Xb,Yc,ak){var Yb,t1,dd,vd,md,gd=Ya.addToLineVertexArray(pc,ik),Zb=0,qb=0,Kb=0,Qb=0,Gy=-1,Wy=-1,Xf={},Jb=_e(""),Xy=0,Yy=0;if(Xc._unevaluatedLayout.getValue("text-radial-offset")===void 0?(Xy=(Yb=Xc.layout.get("text-offset").evaluate(ku,{},Yc).map(function(ov){return 24*ov}))[0],Yy=Yb[1]):(Xy=24*Xc.layout.get("text-radial-offset").evaluate(ku,{},Yc),Yy=Le),Ya.allowVerticalPlacement&&jh.vertical){var e7=Xc.layout.get("text-rotate").evaluate(ku,{},Yc)+90;vd=new Zi(M2,pc,nv,P2,O2,jh.vertical,Hy,$b,iv,e7),I2&&(md=new Zi(M2,pc,nv,P2,O2,I2,jb,Hb,iv,e7))}if(jy){var Zy=Xc.layout.get("icon-rotate").evaluate(ku,{}),t7=Xc.layout.get("icon-text-fit")!=="none",r7=Ae(jy,Zy,Xb,t7),qy=I2?Ae(I2,Zy,Xb,t7):void 0;dd=new Zi(M2,pc,nv,P2,O2,jy,jb,Hb,!1,Zy),Zb=4*r7.length;var n7=Ya.iconSizeData,av=null;n7.kind==="source"?(av=[128*Xc.layout.get("icon-size").evaluate(ku,{})])[0]>32640&&ye(Ya.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):n7.kind==="composite"&&((av=[128*k2.compositeIconSizes[0].evaluate(ku,{},Yc),128*k2.compositeIconSizes[1].evaluate(ku,{},Yc)])[0]>32640||av[1]>32640)&&ye(Ya.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),Ya.addSymbols(Ya.icon,r7,av,Wb,Gb,ku,!1,pc,gd.lineStartIndex,gd.lineLength,-1,Yc),Gy=Ya.icon.placedSymbolArray.length-1,qy&&(qb=4*qy.length,Ya.addSymbols(Ya.icon,qy,av,Wb,Gb,ku,Sn.vertical,pc,gd.lineStartIndex,gd.lineLength,-1,Yc),Wy=Ya.icon.placedSymbolArray.length-1)}for(var i7 in jh.horizontal){var D2=jh.horizontal[i7];if(!t1){Jb=_e(D2.text);var ok=Xc.layout.get("text-rotate").evaluate(ku,{},Yc);t1=new Zi(M2,pc,nv,P2,O2,D2,Hy,$b,iv,ok)}var a7=D2.positionedLines.length===1;if(Kb+=Te(Ya,pc,D2,zb,Xc,iv,ku,Vb,gd,jh.vertical?Sn.horizontal:Sn.horizontalOnly,a7?Object.keys(jh.horizontal):[i7],Xf,Gy,k2,Yc),a7)break}jh.vertical&&(Qb+=Te(Ya,pc,jh.vertical,zb,Xc,iv,ku,Vb,gd,Sn.vertical,["vertical"],Xf,Wy,k2,Yc));var sk=t1?t1.boxStartIndex:Ya.collisionBoxArray.length,uk=t1?t1.boxEndIndex:Ya.collisionBoxArray.length,lk=vd?vd.boxStartIndex:Ya.collisionBoxArray.length,ck=vd?vd.boxEndIndex:Ya.collisionBoxArray.length,fk=dd?dd.boxStartIndex:Ya.collisionBoxArray.length,hk=dd?dd.boxEndIndex:Ya.collisionBoxArray.length,pk=md?md.boxStartIndex:Ya.collisionBoxArray.length,dk=md?md.boxEndIndex:Ya.collisionBoxArray.length,Zc=-1,F2=function(ov,s7){return ov&&ov.circleDiameter?Math.max(ov.circleDiameter,s7):s7};Zc=F2(t1,Zc),Zc=F2(vd,Zc),Zc=F2(dd,Zc);var o7=(Zc=F2(md,Zc))>-1?1:0;o7&&(Zc*=ak/24),Ya.glyphOffsetArray.length>=Jr.MAX_GLYPHS&&ye("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),ku.sortKey!==void 0&&Ya.addToSortKeyRanges(Ya.symbolInstances.length,ku.sortKey),Ya.symbolInstances.emplaceBack(pc.x,pc.y,Xf.right>=0?Xf.right:-1,Xf.center>=0?Xf.center:-1,Xf.left>=0?Xf.left:-1,Xf.vertical||-1,Gy,Wy,Jb,sk,uk,lk,ck,fk,hk,pk,dk,nv,Kb,Qb,Zb,qb,o7,0,Hy,Xy,Yy,Zc)}(xi,rv,nk,qi,Fi,ks,Gc,xi.layers[0],xi.collisionBoxArray,ia.index,ia.sourceLayerIndex,xi.index,Jp,b2,E2,cs,Gf,ud,S2,Wc,ia,ls,$i,Hc,ya)};if(Wf==="line")for(var cd=0,A2=il(ia.geometry,0,0,8192,8192);cd1){var C2=Mi(J0,X0,qi.vertical||Nl,Fi,24,od);C2&&Vh(J0,C2)}}else if(ia.type==="Polygon")for(var fd=0,R2=ed(ia.geometry,0);fd=_i.maxzoom||_i.visibility!=="none"&&(b(oi,this.zoom,J),(Ot[_i.id]=_i.createBucket({index:ie.bucketLayerIDs.length,layers:oi,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:zr,sourceID:this.source})).populate(Rr,ar,this.tileID.canonical),ie.bucketLayerIDs.push(oi.map(function(Ii){return Ii.id})))}}}var Gn=a.mapObject(ar.glyphDependencies,function(Ii){return Object.keys(Ii).map(Number)});Object.keys(Gn).length?ce.send("getGlyphs",{uid:this.uid,stacks:Gn},function(Ii,Wn){Ce||(Ce=Ii,it=Wn,Wi.call(je))}):it={};var ka=Object.keys(ar.iconDependencies);ka.length?ce.send("getImages",{icons:ka,source:this.source,tileID:this.tileID,type:"icons"},function(Ii,Wn){Ce||(Ce=Ii,Nt=Wn,Wi.call(je))}):Nt={};var hi=Object.keys(ar.patternDependencies);function Wi(){if(Ce)return Ee(Ce);if(it&&Nt&&vr){var Ii=new m(it),Wn=new a.ImageAtlas(Nt,vr);for(var si in Ot){var To=Ot[si];To instanceof a.SymbolBucket?(b(To.layers,this.zoom,J),a.performSymbolLayout(To,it,Ii.positions,Nt,Wn.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):To.hasPattern&&(To instanceof a.LineBucket||To instanceof a.FillBucket||To instanceof a.FillExtrusionBucket)&&(b(To.layers,this.zoom,J),To.addFeatures(ar,this.tileID.canonical,Wn.patternPositions))}this.status="done",Ee(null,{buckets:a.values(Ot).filter(function(dl){return!dl.isEmpty()}),featureIndex:ie,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Ii.image,imageAtlas:Wn,glyphMap:this.returnDependencies?it:null,iconMap:this.returnDependencies?Nt:null,glyphPositions:this.returnDependencies?Ii.positions:null})}}hi.length?ce.send("getImages",{icons:hi,source:this.source,tileID:this.tileID,type:"patterns"},function(Ii,Wn){Ce||(Ce=Ii,vr=Wn,Wi.call(je))}):vr={},Wi.call(this)};var w=function(j,Y,J,ce){this.actor=j,this.layerIndex=Y,this.availableImages=J,this.loadVectorData=ce||A,this.loading={},this.loaded={}};w.prototype.loadTile=function(j,Y){var J=this,ce=j.uid;this.loading||(this.loading={});var Ee=!!(j&&j.request&&j.request.collectResourceTiming)&&new a.RequestPerformance(j.request),je=this.loading[ce]=new _(j);je.abort=this.loadVectorData(j,function(Ye,ie){if(delete J.loading[ce],Ye||!ie)return je.status="done",J.loaded[ce]=je,Y(Ye);var Ce=ie.rawData,it={};ie.expires&&(it.expires=ie.expires),ie.cacheControl&&(it.cacheControl=ie.cacheControl);var Nt={};if(Ee){var vr=Ee.finish();vr&&(Nt.resourceTiming=JSON.parse(JSON.stringify(vr)))}je.vectorTile=ie.vectorTile,je.parse(ie.vectorTile,J.layerIndex,J.availableImages,J.actor,function(Ot,ar){if(Ot||!ar)return Y(Ot);Y(null,a.extend({rawTileData:Ce.slice(0)},ar,it,Nt))}),J.loaded=J.loaded||{},J.loaded[ce]=je})},w.prototype.reloadTile=function(j,Y){var J=this,ce=this.loaded,Ee=j.uid,je=this;if(ce&&ce[Ee]){var Ye=ce[Ee];Ye.showCollisionBoxes=j.showCollisionBoxes;var ie=function(Ce,it){var Nt=Ye.reloadCallback;Nt&&(delete Ye.reloadCallback,Ye.parse(Ye.vectorTile,je.layerIndex,J.availableImages,je.actor,Nt)),Y(Ce,it)};Ye.status==="parsing"?Ye.reloadCallback=ie:Ye.status==="done"&&(Ye.vectorTile?Ye.parse(Ye.vectorTile,this.layerIndex,this.availableImages,this.actor,ie):ie())}},w.prototype.abortTile=function(j,Y){var J=this.loading,ce=j.uid;J&&J[ce]&&J[ce].abort&&(J[ce].abort(),delete J[ce]),Y()},w.prototype.removeTile=function(j,Y){var J=this.loaded,ce=j.uid;J&&J[ce]&&delete J[ce],Y()};var R=a.window.ImageBitmap,P=function(){this.loaded={}};function k(j,Y){if(j.length!==0){L(j[0],Y);for(var J=1;J=Math.abs(ie)?J-Ce+ie:ie-Ce+J,J=Ce}J+ce>=0!=!!Y&&j.reverse()}P.prototype.loadTile=function(j,Y){var J=j.uid,ce=j.encoding,Ee=j.rawImageData,je=R&&Ee instanceof R?this.getImageData(Ee):Ee,Ye=new a.DEMData(J,je,ce);this.loaded=this.loaded||{},this.loaded[J]=Ye,Y(null,Ye)},P.prototype.getImageData=function(j){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(j.width,j.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=j.width,this.offscreenCanvas.height=j.height,this.offscreenCanvasContext.drawImage(j,0,0,j.width,j.height);var Y=this.offscreenCanvasContext.getImageData(-1,-1,j.width+2,j.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new a.RGBAImage({width:Y.width,height:Y.height},Y.data)},P.prototype.removeTile=function(j){var Y=this.loaded,J=j.uid;Y&&Y[J]&&delete Y[J]};var B=a.vectorTile.VectorTileFeature.prototype.toGeoJSON,V=function(j){this._feature=j,this.extent=a.EXTENT,this.type=j.type,this.properties=j.tags,"id"in j&&!isNaN(j.id)&&(this.id=parseInt(j.id,10))};V.prototype.loadGeometry=function(){if(this._feature.type===1){for(var j=[],Y=0,J=this._feature.geometry;Y>31}function Zt(j,Y){for(var J=j.loadGeometry(),ce=j.type,Ee=0,je=0,Ye=J.length,ie=0;ie>1;(function zr(Rr,Pr,Hn,Lr,ci,Gi){for(;ci>Lr;){if(ci-Lr>600){var oi=ci-Lr+1,_i=Hn-Lr+1,Gn=Math.log(oi),ka=.5*Math.exp(2*Gn/3),hi=.5*Math.sqrt(Gn*ka*(oi-ka)/oi)*(_i-oi/2<0?-1:1);zr(Rr,Pr,Hn,Math.max(Lr,Math.floor(Hn-_i*ka/oi+hi)),Math.min(ci,Math.floor(Hn+(oi-_i)*ka/oi+hi)),Gi)}var Wi=Pr[2*Hn+Gi],Ii=Lr,Wn=ci;for(tt(Rr,Pr,Lr,Hn),Pr[2*ci+Gi]>Wi&&tt(Rr,Pr,Lr,ci);IiWi;)Wn--}Pr[2*Lr+Gi]===Wi?tt(Rr,Pr,Lr,Wn):tt(Rr,Pr,++Wn,ci),Wn<=Hn&&(Lr=Wn+1),Hn<=Wn&&(ci=Wn-1)}})(Nt,vr,Dt,ar,tn,qr%2),it(Nt,vr,Ot,ar,Dt-1,qr+1),it(Nt,vr,Ot,Dt+1,tn,qr+1)}})(Ye,ie,ce,0,Ye.length-1,0)};Ar.prototype.range=function(j,Y,J,ce){return function(Ee,je,Ye,ie,Ce,it,Nt){for(var vr,Ot,ar=[0,Ee.length-1,0],tn=[];ar.length;){var qr=ar.pop(),Dt=ar.pop(),zr=ar.pop();if(Dt-zr<=Nt)for(var Rr=zr;Rr<=Dt;Rr++)Ot=je[2*Rr+1],(vr=je[2*Rr])>=Ye&&vr<=Ce&&Ot>=ie&&Ot<=it&&tn.push(Ee[Rr]);else{var Pr=Math.floor((zr+Dt)/2);Ot=je[2*Pr+1],(vr=je[2*Pr])>=Ye&&vr<=Ce&&Ot>=ie&&Ot<=it&&tn.push(Ee[Pr]);var Hn=(qr+1)%2;(qr===0?Ye<=vr:ie<=Ot)&&(ar.push(zr),ar.push(Pr-1),ar.push(Hn)),(qr===0?Ce>=vr:it>=Ot)&&(ar.push(Pr+1),ar.push(Dt),ar.push(Hn))}}return tn}(this.ids,this.coords,j,Y,J,ce,this.nodeSize)},Ar.prototype.within=function(j,Y,J){return function(ce,Ee,je,Ye,ie,Ce){for(var it=[0,ce.length-1,0],Nt=[],vr=ie*ie;it.length;){var Ot=it.pop(),ar=it.pop(),tn=it.pop();if(ar-tn<=Ce)for(var qr=tn;qr<=ar;qr++)nt(Ee[2*qr],Ee[2*qr+1],je,Ye)<=vr&&Nt.push(ce[qr]);else{var Dt=Math.floor((tn+ar)/2),zr=Ee[2*Dt],Rr=Ee[2*Dt+1];nt(zr,Rr,je,Ye)<=vr&&Nt.push(ce[Dt]);var Pr=(Ot+1)%2;(Ot===0?je-ie<=zr:Ye-ie<=Rr)&&(it.push(tn),it.push(Dt-1),it.push(Pr)),(Ot===0?je+ie>=zr:Ye+ie>=Rr)&&(it.push(Dt+1),it.push(ar),it.push(Pr))}}return Nt}(this.ids,this.coords,j,Y,J,this.nodeSize)};var Xn={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(j){return j}},pn=function(j){this.options=Be(Object.create(Xn),j),this.trees=new Array(this.options.maxZoom+1)};function gi(j,Y,J,ce,Ee){return{x:j,y:Y,zoom:1/0,id:J,parentId:-1,numPoints:ce,properties:Ee}}function Je(j,Y){var J=j.geometry.coordinates,ce=J[1];return{x:Ut(J[0]),y:ge(ce),zoom:1/0,index:Y,parentId:-1}}function Qt(j){return{type:"Feature",id:j.id,properties:Xr(j),geometry:{type:"Point",coordinates:[(ce=j.x,360*(ce-.5)),(Y=j.y,J=(180-360*Y)*Math.PI/180,360*Math.atan(Math.exp(J))/Math.PI-90)]}};var Y,J,ce}function Xr(j){var Y=j.numPoints,J=Y>=1e4?Math.round(Y/1e3)+"k":Y>=1e3?Math.round(Y/100)/10+"k":Y;return Be(Be({},j.properties),{cluster:!0,cluster_id:j.id,point_count:Y,point_count_abbreviated:J})}function Ut(j){return j/360+.5}function ge(j){var Y=Math.sin(j*Math.PI/180),J=.5-.25*Math.log((1+Y)/(1-Y))/Math.PI;return J<0?0:J>1?1:J}function Be(j,Y){for(var J in Y)j[J]=Y[J];return j}function ft(j){return j.x}function At(j){return j.y}function bt(j,Y,J,ce,Ee,je){var Ye=Ee-J,ie=je-ce;if(Ye!==0||ie!==0){var Ce=((j-J)*Ye+(Y-ce)*ie)/(Ye*Ye+ie*ie);Ce>1?(J=Ee,ce=je):Ce>0&&(J+=Ye*Ce,ce+=ie*Ce)}return(Ye=j-J)*Ye+(ie=Y-ce)*ie}function $t(j,Y,J,ce){var Ee={id:j===void 0?null:j,type:Y,geometry:J,tags:ce,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(je){var Ye=je.geometry,ie=je.type;if(ie==="Point"||ie==="MultiPoint"||ie==="LineString")Mr(je,Ye);else if(ie==="Polygon"||ie==="MultiLineString")for(var Ce=0;Ce0&&(Ye+=ce?(Ee*it-Ce*je)/2:Math.sqrt(Math.pow(Ce-Ee,2)+Math.pow(it-je,2))),Ee=Ce,je=it}var Nt=Y.length-3;Y[2]=1,function vr(Ot,ar,tn,qr){for(var Dt,zr=qr,Rr=tn-ar>>1,Pr=tn-ar,Hn=Ot[ar],Lr=Ot[ar+1],ci=Ot[tn],Gi=Ot[tn+1],oi=ar+3;oizr)Dt=oi,zr=_i;else if(_i===zr){var Gn=Math.abs(oi-Rr);Gnqr&&(Dt-ar>3&&vr(Ot,ar,Dt,qr),Ot[Dt+2]=zr,tn-Dt>3&&vr(Ot,Dt,tn,qr))}(Y,0,Nt,J),Y[Nt+2]=1,Y.size=Math.abs(Ye),Y.start=0,Y.end=Y.size}function Q(j,Y,J,ce){for(var Ee=0;Ee1?1:J}function yt(j,Y,J,ce,Ee,je,Ye,ie){if(ce/=Y,je>=(J/=Y)&&Ye=ce)return null;for(var Ce=[],it=0;it=J&&tn=ce)){var qr=[];if(Ot==="Point"||Ot==="MultiPoint")rr(vr,qr,J,ce,Ee);else if(Ot==="LineString")hr(vr,qr,J,ce,Ee,!1,ie.lineMetrics);else if(Ot==="MultiLineString")rn(vr,qr,J,ce,Ee,!1);else if(Ot==="Polygon")rn(vr,qr,J,ce,Ee,!0);else if(Ot==="MultiPolygon")for(var Dt=0;Dt=J&&Ye<=ce&&(Y.push(j[je]),Y.push(j[je+1]),Y.push(j[je+2]))}}function hr(j,Y,J,ce,Ee,je,Ye){for(var ie,Ce,it=Cn(j),Nt=Ee===0?qe:ct,vr=j.start,Ot=0;OtJ&&(Ce=Nt(it,ar,tn,Dt,zr,J),Ye&&(it.start=vr+ie*Ce)):Rr>ce?Pr=J&&(Ce=Nt(it,ar,tn,Dt,zr,J),Hn=!0),Pr>ce&&Rr<=ce&&(Ce=Nt(it,ar,tn,Dt,zr,ce),Hn=!0),!je&&Hn&&(Ye&&(it.end=vr+ie*Ce),Y.push(it),it=Cn(j)),Ye&&(vr+=ie)}var Lr=j.length-3;ar=j[Lr],tn=j[Lr+1],qr=j[Lr+2],(Rr=Ee===0?ar:tn)>=J&&Rr<=ce&&Ne(it,ar,tn,qr),Lr=it.length-3,je&&Lr>=3&&(it[Lr]!==it[0]||it[Lr+1]!==it[1])&&Ne(it,it[0],it[1],it[2]),it.length&&Y.push(it)}function Cn(j){var Y=[];return Y.size=j.size,Y.start=j.start,Y.end=j.end,Y}function rn(j,Y,J,ce,Ee,je){for(var Ye=0;YeYe.maxX&&(Ye.maxX=Nt),vr>Ye.maxY&&(Ye.maxY=vr)}return Ye}function en(j,Y,J,ce){var Ee=Y.geometry,je=Y.type,Ye=[];if(je==="Point"||je==="MultiPoint")for(var ie=0;ie0&&Y.size<(Ee?Ye:ce))J.numPoints+=Y.length/3;else{for(var ie=[],Ce=0;CeYe)&&(J.numSimplified++,ie.push(Y[Ce]),ie.push(Y[Ce+1])),J.numPoints++;Ee&&function(it,Nt){for(var vr=0,Ot=0,ar=it.length,tn=ar-2;Ot0===Nt)for(Ot=0,ar=it.length;Ot24)throw new Error("maxZoom should be in the 0-24 range");if(Y.promoteId&&Y.generateId)throw new Error("promoteId and generateId cannot be used together.");var ce=function(Ee,je){var Ye=[];if(Ee.type==="FeatureCollection")for(var ie=0;ie=ce;it--){var Nt=+Date.now();ie=this._cluster(ie,it),this.trees[it]=new Ar(ie,ft,At,je,Float32Array),J&&console.log("z%d: %d clusters in %dms",it,ie.length,+Date.now()-Nt)}return J&&console.timeEnd("total time"),this},pn.prototype.getClusters=function(j,Y){var J=((j[0]+180)%360+360)%360-180,ce=Math.max(-90,Math.min(90,j[1])),Ee=j[2]===180?180:((j[2]+180)%360+360)%360-180,je=Math.max(-90,Math.min(90,j[3]));if(j[2]-j[0]>=360)J=-180,Ee=180;else if(J>Ee){var Ye=this.getClusters([J,ce,180,je],Y),ie=this.getClusters([-180,ce,Ee,je],Y);return Ye.concat(ie)}for(var Ce=this.trees[this._limitZoom(Y)],it=[],Nt=0,vr=Ce.range(Ut(J),ge(je),Ut(Ee),ge(ce));NtY&&(Ot+=qr.numPoints||1)}if(Ot>=je){for(var Dt=Ce.x*vr,zr=Ce.y*vr,Rr=Ee&&vr>1?this._map(Ce,!0):null,Pr=(ie<<5)+(Y+1)+this.points.length,Hn=0,Lr=Nt;Hn1)for(var oi=0,_i=Nt;oi<_i.length;oi+=1){var Gn=it.points[_i[oi]];Gn.zoom<=Y||(Gn.zoom=Y,J.push(Gn))}}}return J},pn.prototype._getOriginId=function(j){return j-this.points.length>>5},pn.prototype._getOriginZoom=function(j){return(j-this.points.length)%32},pn.prototype._map=function(j,Y){if(j.numPoints)return Y?Be({},j.properties):j.properties;var J=this.points[j.index].properties,ce=this.options.map(J);return Y&&ce===J?Be({},ce):ce},an.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},an.prototype.splitTile=function(j,Y,J,ce,Ee,je,Ye){for(var ie=[j,Y,J,ce],Ce=this.options,it=Ce.debug;ie.length;){ce=ie.pop(),J=ie.pop(),Y=ie.pop(),j=ie.pop();var Nt=1<1&&console.time("creation"),Ot=this.tiles[vr]=qn(j,Y,J,ce,Ce),this.tileCoords.push({z:Y,x:J,y:ce}),it)){it>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Y,J,ce,Ot.numFeatures,Ot.numPoints,Ot.numSimplified),console.timeEnd("creation"));var ar="z"+Y;this.stats[ar]=(this.stats[ar]||0)+1,this.total++}if(Ot.source=j,Ee){if(Y===Ce.maxZoom||Y===Ee)continue;var tn=1<1&&console.time("clipping");var qr,Dt,zr,Rr,Pr,Hn,Lr=.5*Ce.buffer/Ce.extent,ci=.5-Lr,Gi=.5+Lr,oi=1+Lr;qr=Dt=zr=Rr=null,Pr=yt(j,Nt,J-Lr,J+Gi,0,Ot.minX,Ot.maxX,Ce),Hn=yt(j,Nt,J+ci,J+oi,0,Ot.minX,Ot.maxX,Ce),j=null,Pr&&(qr=yt(Pr,Nt,ce-Lr,ce+Gi,1,Ot.minY,Ot.maxY,Ce),Dt=yt(Pr,Nt,ce+ci,ce+oi,1,Ot.minY,Ot.maxY,Ce),Pr=null),Hn&&(zr=yt(Hn,Nt,ce-Lr,ce+Gi,1,Ot.minY,Ot.maxY,Ce),Rr=yt(Hn,Nt,ce+ci,ce+oi,1,Ot.minY,Ot.maxY,Ce),Hn=null),it>1&&console.timeEnd("clipping"),ie.push(qr||[],Y+1,2*J,2*ce),ie.push(Dt||[],Y+1,2*J,2*ce+1),ie.push(zr||[],Y+1,2*J+1,2*ce),ie.push(Rr||[],Y+1,2*J+1,2*ce+1)}}},an.prototype.getTile=function(j,Y,J){var ce=this.options,Ee=ce.extent,je=ce.debug;if(j<0||j>24)return null;var Ye=1<1&&console.log("drilling down to z%d-%d-%d",j,Y,J);for(var Ce,it=j,Nt=Y,vr=J;!Ce&&it>0;)it--,Nt=Math.floor(Nt/2),vr=Math.floor(vr/2),Ce=this.tiles[un(it,Nt,vr)];return Ce&&Ce.source?(je>1&&console.log("found parent tile z%d-%d-%d",it,Nt,vr),je>1&&console.time("drilling down"),this.splitTile(Ce.source,it,Nt,vr,j,Y,J),je>1&&console.timeEnd("drilling down"),this.tiles[ie]?Jn(this.tiles[ie],Ee):null):null};var Hi=function(j){function Y(J,ce,Ee,je){j.call(this,J,ce,Ee,ti),je&&(this.loadGeoJSON=je)}return j&&(Y.__proto__=j),(Y.prototype=Object.create(j&&j.prototype)).constructor=Y,Y.prototype.loadData=function(J,ce){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=ce,this._pendingLoadDataParams=J,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Y.prototype._loadData=function(){var J=this;if(this._pendingCallback&&this._pendingLoadDataParams){var ce=this._pendingCallback,Ee=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var je=!!(Ee&&Ee.request&&Ee.request.collectResourceTiming)&&new a.RequestPerformance(Ee.request);this.loadGeoJSON(Ee,function(Ye,ie){if(Ye||!ie)return ce(Ye);if(typeof ie!="object")return ce(new Error("Input data given to '"+Ee.source+"' is not a valid GeoJSON object."));(function Ot(ar,tn){var qr,Dt=ar&&ar.type;if(Dt==="FeatureCollection")for(qr=0;qr"u"||typeof document>"u"?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var I,O,z=new Blob([""],{type:"text/javascript"}),X=URL.createObjectURL(z);try{O=new Worker(X),I=!0}catch{I=!1}return O&&O.terminate(),URL.revokeObjectURL(X),I}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var I=document.createElement("canvas");I.width=I.height=1;var O=I.getContext("2d");if(!O)return!1;var z=O.getImageData(0,0,1,1);return z&&z.width===I.width}()?(y[C=S&&S.failIfMajorPerformanceCaveat]===void 0&&(y[C]=function(I){var O=function(X){var ne=document.createElement("canvas"),ae=Object.create(v.webGLContextAttributes);return ae.failIfMajorPerformanceCaveat=X,ne.probablySupportsContext?ne.probablySupportsContext("webgl",ae)||ne.probablySupportsContext("experimental-webgl",ae):ne.supportsContext?ne.supportsContext("webgl",ae)||ne.supportsContext("experimental-webgl",ae):ne.getContext("webgl",ae)||ne.getContext("experimental-webgl",ae)}(I);if(!O)return!1;var z=O.createShader(O.VERTEX_SHADER);return!(!z||O.isContextLost())&&(O.shaderSource(z,"void main() {}"),O.compileShader(z),O.getShaderParameter(z,O.COMPILE_STATUS)===!0)}(C)),y[C]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var C}p.exports?p.exports=v:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=v,window.mapboxgl.notSupportedReason=d);var y={};v.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),c={create:function(p,v,d){var y=a.window.document.createElement(p);return v!==void 0&&(y.className=v),d&&d.appendChild(y),y},createNS:function(p,v){return a.window.document.createElementNS(p,v)}},f=a.window.document&&a.window.document.documentElement.style;function m(p){if(!f)return p[0];for(var v=0;v=0?0:p.button},c.remove=function(p){p.parentNode&&p.parentNode.removeChild(p)};var L=function(p){function v(){p.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.RGBAImage({width:1,height:1}),this.dirty=!0}return p&&(v.__proto__=p),(v.prototype=Object.create(p&&p.prototype)).constructor=v,v.prototype.isLoaded=function(){return this.loaded},v.prototype.setLoaded=function(d){if(this.loaded!==d&&(this.loaded=d,d)){for(var y=0,S=this.requestors;y=0?1.2:1))}function Z(p,v,d,y,S,C,I){for(var O=0;O65535)z(new Error("glyphs > 65535 not supported"));else if(ae.ranges[we])z(null,{stack:X,id:ne,glyph:oe});else{var be=ae.requests[we];be||(be=ae.requests[we]=[],Ie.loadGlyphRange(X,we,d.url,d.requestManager,function(Fe,_e){if(_e){for(var De in _e)d._doesCharSupportLocalGlyph(+De)||(ae.glyphs[+De]=_e[+De]);ae.ranges[we]=!0}for(var Xe=0,ot=be;Xe1&&(O=p[++I]);var X=Math.abs(z-O.left),ne=Math.abs(z-O.right),ae=Math.min(X,ne),oe=void 0,we=S/d*(y+1);if(O.isDash){var be=y-Math.abs(we);oe=Math.sqrt(ae*ae+be*be)}else oe=y-Math.sqrt(ae*ae+we*we);this.data[C+z]=Math.max(0,Math.min(255,oe+128))}},ye.prototype.addRegularDash=function(p){for(var v=p.length-1;v>=0;--v){var d=p[v],y=p[v+1];d.zeroLength?p.splice(v,1):y&&y.isDash===d.isDash&&(y.left=d.left,p.splice(v,1))}var S=p[0],C=p[p.length-1];S.isDash===C.isDash&&(S.left=C.left-this.width,C.right=S.right+this.width);for(var I=this.width*this.nextRow,O=0,z=p[O],X=0;X1&&(z=p[++O]);var ne=Math.abs(X-z.left),ae=Math.abs(X-z.right),oe=Math.min(ne,ae);this.data[I+X]=Math.max(0,Math.min(255,(z.isDash?oe:-oe)+128))}},ye.prototype.addDash=function(p,v){var d=v?7:0,y=2*d+1;if(this.nextRow+y>this.height)return a.warnOnce("LineAtlas out of space"),null;for(var S=0,C=0;C=d&&p.x=y&&p.y0&&(X[new a.OverscaledTileID(d.overscaledZ,I,y.z,C,y.y-1).key]={backfilled:!1},X[new a.OverscaledTileID(d.overscaledZ,d.wrap,y.z,y.x,y.y-1).key]={backfilled:!1},X[new a.OverscaledTileID(d.overscaledZ,z,y.z,O,y.y-1).key]={backfilled:!1}),y.y+10&&(S.resourceTiming=d._resourceTiming,d._resourceTiming=[]),d.fire(new a.Event("data",S))}})},v.prototype.onAdd=function(d){this.map=d,this.load()},v.prototype.setData=function(d){var y=this;return this._data=d,this.fire(new a.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(S){if(S)y.fire(new a.ErrorEvent(S));else{var C={dataType:"source",sourceDataType:"content"};y._collectResourceTiming&&y._resourceTiming&&y._resourceTiming.length>0&&(C.resourceTiming=y._resourceTiming,y._resourceTiming=[]),y.fire(new a.Event("data",C))}}),this},v.prototype.getClusterExpansionZoom=function(d,y){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:d,source:this.id},y),this},v.prototype.getClusterChildren=function(d,y){return this.actor.send("geojson.getClusterChildren",{clusterId:d,source:this.id},y),this},v.prototype.getClusterLeaves=function(d,y,S,C){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:d,limit:y,offset:S},C),this},v.prototype._updateWorkerData=function(d){var y=this;this._loaded=!1;var S=a.extend({},this.workerOptions),C=this._data;typeof C=="string"?(S.request=this.map._requestManager.transformRequest(a.browser.resolveURL(C),a.ResourceType.Source),S.request.collectResourceTiming=this._collectResourceTiming):S.data=JSON.stringify(C),this.actor.send(this.type+".loadData",S,function(I,O){y._removed||O&&O.abandoned||(y._loaded=!0,O&&O.resourceTiming&&O.resourceTiming[y.id]&&(y._resourceTiming=O.resourceTiming[y.id].slice(0)),y.actor.send(y.type+".coalesce",{source:S.source},null),d(I))})},v.prototype.loaded=function(){return this._loaded},v.prototype.loadTile=function(d,y){var S=this,C=d.actor?"reloadTile":"loadTile";d.actor=this.actor,d.request=this.actor.send(C,{type:this.type,uid:d.uid,tileID:d.tileID,zoom:d.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:a.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},function(I,O){return delete d.request,d.unloadVectorData(),d.aborted?y(null):I?y(I):(d.loadVectorData(O,S.map.painter,C==="reloadTile"),y(null))})},v.prototype.abortTile=function(d){d.request&&(d.request.cancel(),delete d.request),d.aborted=!0},v.prototype.unloadTile=function(d){d.unloadVectorData(),this.actor.send("removeTile",{uid:d.uid,type:this.type,source:this.id})},v.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},v.prototype.serialize=function(){return a.extend({},this._options,{type:this.type,data:this._data})},v.prototype.hasTransition=function(){return!1},v}(a.Evented),dt=a.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),nt=function(p){function v(d,y,S,C){p.call(this),this.id=d,this.dispatcher=S,this.coordinates=y.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(C),this.options=y}return p&&(v.__proto__=p),(v.prototype=Object.create(p&&p.prototype)).constructor=v,v.prototype.load=function(d,y){var S=this;this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this.url=this.options.url,a.getImage(this.map._requestManager.transformRequest(this.url,a.ResourceType.Image),function(C,I){S._loaded=!0,C?S.fire(new a.ErrorEvent(C)):I&&(S.image=I,d&&(S.coordinates=d),y&&y(),S._finishLoading())})},v.prototype.loaded=function(){return this._loaded},v.prototype.updateImage=function(d){var y=this;return this.image&&d.url?(this.options.url=d.url,this.load(d.coordinates,function(){y.texture=null}),this):this},v.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})))},v.prototype.onAdd=function(d){this.map=d,this.load()},v.prototype.setCoordinates=function(d){var y=this;this.coordinates=d;var S=d.map(a.MercatorCoordinate.fromLngLat);this.tileID=function(I){for(var O=1/0,z=1/0,X=-1/0,ne=-1/0,ae=0,oe=I;aey.end(0)?this.fire(new a.ErrorEvent(new a.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+y.start(0)+" and "+y.end(0)+"-second mark."))):this.video.currentTime=d}},v.prototype.getVideo=function(){return this.video},v.prototype.onAdd=function(d){this.map||(this.map=d,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},v.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var d=this.map.painter.context,y=d.gl;for(var S in this.boundsBuffer||(this.boundsBuffer=d.createVertexBuffer(this._boundsArray,dt.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(y.LINEAR,y.CLAMP_TO_EDGE),y.texSubImage2D(y.TEXTURE_2D,0,0,0,y.RGBA,y.UNSIGNED_BYTE,this.video)):(this.texture=new a.Texture(d,this.video,y.RGBA),this.texture.bind(y.LINEAR,y.CLAMP_TO_EDGE)),this.tiles){var C=this.tiles[S];C.state!=="loaded"&&(C.state="loaded",C.texture=this.texture)}}},v.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},v.prototype.hasTransition=function(){return this.video&&!this.video.paused},v}(nt),ur=function(p){function v(d,y,S,C){p.call(this,d,y,S,C),y.coordinates?Array.isArray(y.coordinates)&&y.coordinates.length===4&&!y.coordinates.some(function(I){return!Array.isArray(I)||I.length!==2||I.some(function(O){return typeof O!="number"})})||this.fire(new a.ErrorEvent(new a.ValidationError("sources."+d,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.ErrorEvent(new a.ValidationError("sources."+d,null,'missing required property "coordinates"'))),y.animate&&typeof y.animate!="boolean"&&this.fire(new a.ErrorEvent(new a.ValidationError("sources."+d,null,'optional "animate" property must be a boolean value'))),y.canvas?typeof y.canvas=="string"||y.canvas instanceof a.window.HTMLCanvasElement||this.fire(new a.ErrorEvent(new a.ValidationError("sources."+d,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 a.ErrorEvent(new a.ValidationError("sources."+d,null,'missing required property "canvas"'))),this.options=y,this.animate=y.animate===void 0||y.animate}return p&&(v.__proto__=p),(v.prototype=Object.create(p&&p.prototype)).constructor=v,v.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof a.window.HTMLCanvasElement?this.options.canvas:a.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new a.ErrorEvent(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())},v.prototype.getCanvas=function(){return this.canvas},v.prototype.onAdd=function(d){this.map=d,this.load(),this.canvas&&this.animate&&this.play()},v.prototype.onRemove=function(){this.pause()},v.prototype.prepare=function(){var d=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,d=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,d=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var y=this.map.painter.context,S=y.gl;for(var C in this.boundsBuffer||(this.boundsBuffer=y.createVertexBuffer(this._boundsArray,dt.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(d||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new a.Texture(y,this.canvas,S.RGBA,{premultiply:!0}),this.tiles){var I=this.tiles[C];I.state!=="loaded"&&(I.state="loaded",I.texture=this.texture)}}},v.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},v.prototype.hasTransition=function(){return this._playing},v.prototype._hasInvalidDimensions=function(){for(var d=0,y=[this.canvas.width,this.canvas.height];dthis.max){var I=this._getAndRemoveByKey(this.order[0]);I&&this.onRemove(I)}return this},Je.prototype.has=function(p){return p.wrapped().key in this.data},Je.prototype.getAndRemove=function(p){return this.has(p)?this._getAndRemoveByKey(p.wrapped().key):null},Je.prototype._getAndRemoveByKey=function(p){var v=this.data[p].shift();return v.timeout&&clearTimeout(v.timeout),this.data[p].length===0&&delete this.data[p],this.order.splice(this.order.indexOf(p),1),v.value},Je.prototype.getByKey=function(p){var v=this.data[p];return v?v[0].value:null},Je.prototype.get=function(p){return this.has(p)?this.data[p.wrapped().key][0].value:null},Je.prototype.remove=function(p,v){if(!this.has(p))return this;var d=p.wrapped().key,y=v===void 0?0:this.data[d].indexOf(v),S=this.data[d][y];return this.data[d].splice(y,1),S.timeout&&clearTimeout(S.timeout),this.data[d].length===0&&delete this.data[d],this.onRemove(S.value),this.order.splice(this.order.indexOf(d),1),this},Je.prototype.setMaxSize=function(p){for(this.max=p;this.order.length>this.max;){var v=this._getAndRemoveByKey(this.order[0]);v&&this.onRemove(v)}return this},Je.prototype.filter=function(p){var v=[];for(var d in this.data)for(var y=0,S=this.data[d];y1||(Math.abs(ne)>1&&(Math.abs(ne+oe)===1?ne+=oe:Math.abs(ne-oe)===1&&(ne-=oe)),X.dem&&z.dem&&(z.dem.backfillBorder(X.dem,ne,ae),z.neighboringTiles&&z.neighboringTiles[we]&&(z.neighboringTiles[we].backfilled=!0)))}},v.prototype.getTile=function(d){return this.getTileByID(d.key)},v.prototype.getTileByID=function(d){return this._tiles[d]},v.prototype._retainLoadedChildren=function(d,y,S,C){for(var I in this._tiles){var O=this._tiles[I];if(!(C[I]||!O.hasData()||O.tileID.overscaledZ<=y||O.tileID.overscaledZ>S)){for(var z=O.tileID;O&&O.tileID.overscaledZ>y+1;){var X=O.tileID.scaledTo(O.tileID.overscaledZ-1);(O=this._tiles[X.key])&&O.hasData()&&(z=X)}for(var ne=z;ne.overscaledZ>y;)if(d[(ne=ne.scaledTo(ne.overscaledZ-1)).key]){C[z.key]=z;break}}}},v.prototype.findLoadedParent=function(d,y){if(d.key in this._loadedParentTiles){var S=this._loadedParentTiles[d.key];return S&&S.tileID.overscaledZ>=y?S:null}for(var C=d.overscaledZ-1;C>=y;C--){var I=d.scaledTo(C),O=this._getLoadedTile(I);if(O)return O}},v.prototype._getLoadedTile=function(d){var y=this._tiles[d.key];return y&&y.hasData()?y:this._cache.getByKey(d.wrapped().key)},v.prototype.updateCacheSize=function(d){var y=Math.ceil(d.width/this._source.tileSize)+1,S=Math.ceil(d.height/this._source.tileSize)+1,C=Math.floor(y*S*5),I=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,C):C;this._cache.setMaxSize(I)},v.prototype.handleWrapJump=function(d){var y=Math.round((d-(this._prevLng===void 0?d:this._prevLng))/360);if(this._prevLng=d,y){var S={};for(var C in this._tiles){var I=this._tiles[C];I.tileID=I.tileID.unwrapTo(I.tileID.wrap+y),S[I.tileID.key]=I}for(var O in this._tiles=S,this._timers)clearTimeout(this._timers[O]),delete this._timers[O];for(var z in this._tiles)this._setTileReloadTimer(z,this._tiles[z])}},v.prototype.update=function(d){var y=this;if(this.transform=d,this._sourceLoaded&&!this._paused){var S;this.updateCacheSize(d),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?S=d.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(qt){return new a.OverscaledTileID(qt.canonical.z,qt.wrap,qt.canonical.z,qt.canonical.x,qt.canonical.y)}):(S=d.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(S=S.filter(function(qt){return y._source.hasTile(qt)}))):S=[];var C=d.coveringZoomLevel(this._source),I=Math.max(C-v.maxOverzooming,this._source.minzoom),O=Math.max(C+v.maxUnderzooming,this._source.minzoom),z=this._updateRetainedTiles(S,C);if(Nt(this._source.type)){for(var X={},ne={},ae=0,oe=Object.keys(z);aethis._source.maxzoom){var De=Fe.children(this._source.maxzoom)[0],Xe=this.getTile(De);if(Xe&&Xe.hasData()){S[De.key]=De;continue}}else{var ot=Fe.children(this._source.maxzoom);if(S[ot[0].key]&&S[ot[1].key]&&S[ot[2].key]&&S[ot[3].key])continue}for(var Ct=_e.wasRequested(),mt=Fe.overscaledZ-1;mt>=I;--mt){var kt=Fe.scaledTo(mt);if(C[kt.key]||(C[kt.key]=!0,!(_e=this.getTile(kt))&&Ct&&(_e=this._addTile(kt)),_e&&(S[kt.key]=kt,Ct=_e.wasRequested(),_e.hasData())))break}}}return S},v.prototype._updateLoadedParentTileCache=function(){for(var d in this._loadedParentTiles={},this._tiles){for(var y=[],S=void 0,C=this._tiles[d].tileID;C.overscaledZ>0;){if(C.key in this._loadedParentTiles){S=this._loadedParentTiles[C.key];break}y.push(C.key);var I=C.scaledTo(C.overscaledZ-1);if(S=this._getLoadedTile(I))break;C=I}for(var O=0,z=y;O0||(y.hasData()&&y.state!=="reloading"?this._cache.add(y.tileID,y,y.getExpiryTimeout()):(y.aborted=!0,this._abortTile(y),this._unloadTile(y))))},v.prototype.clearTiles=function(){for(var d in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(d);this._cache.reset()},v.prototype.tilesIn=function(d,y,S){var C=this,I=[],O=this.transform;if(!O)return I;for(var z=S?O.getCameraQueryGeometry(d):d,X=d.map(function(mt){return O.pointCoordinate(mt)}),ne=z.map(function(mt){return O.pointCoordinate(mt)}),ae=this.getIds(),oe=1/0,we=1/0,be=-1/0,Fe=-1/0,_e=0,De=ne;_e=0&&$r[1].y+yr>=0){var vn=X.map(function(xn){return qt.getTilePoint(xn)}),bn=ne.map(function(xn){return qt.getTilePoint(xn)});I.push({tile:kt,tileID:qt,queryGeometry:vn,cameraQueryGeometry:bn,scale:Tr})}}},Ct=0;Ct=a.browser.now())return!0}return!1},v.prototype.setFeatureState=function(d,y,S){this._state.updateState(d=d||"_geojsonTileLayer",y,S)},v.prototype.removeFeatureState=function(d,y,S){this._state.removeFeatureState(d=d||"_geojsonTileLayer",y,S)},v.prototype.getFeatureState=function(d,y){return this._state.getState(d=d||"_geojsonTileLayer",y)},v.prototype.setDependencies=function(d,y,S){var C=this._tiles[d];C&&C.setDependencies(y,S)},v.prototype.reloadTilesForDependencies=function(d,y){for(var S in this._tiles)this._tiles[S].hasDependency(d,y)&&this._reloadTile(S,"reloading");this._cache.filter(function(C){return!C.hasDependency(d,y)})},v}(a.Evented);function it(p,v){var d=Math.abs(2*p.wrap)-+(p.wrap<0),y=Math.abs(2*v.wrap)-+(v.wrap<0);return p.overscaledZ-v.overscaledZ||y-d||v.canonical.y-p.canonical.y||v.canonical.x-p.canonical.x}function Nt(p){return p==="raster"||p==="image"||p==="video"}function vr(){return new a.window.Worker(Dh.workerUrl)}Ce.maxOverzooming=10,Ce.maxUnderzooming=3;var Ot="mapboxgl_preloaded_worker_pool",ar=function(){this.active={}};ar.prototype.acquire=function(p){if(!this.workers)for(this.workers=[];this.workers.length0?(y-C)/I:0;return this.points[S].mult(1-O).add(this.points[v].mult(O))};var hi=function(p,v,d){var y=this.boxCells=[],S=this.circleCells=[];this.xCellCount=Math.ceil(p/d),this.yCellCount=Math.ceil(v/d);for(var C=0;C=-v[0]&&d<=v[0]&&y>=-v[1]&&y<=v[1]}function dl(p,v,d,y,S,C,I,O){var z=y?p.textSizeData:p.iconSizeData,X=a.evaluateSizeForZoom(z,d.transform.zoom),ne=[256/d.width*2+1,256/d.height*2+1],ae=y?p.text.dynamicLayoutVertexArray:p.icon.dynamicLayoutVertexArray;ae.clear();for(var oe=p.lineVertexArray,we=y?p.text.placedSymbolArray:p.icon.placedSymbolArray,be=d.transform.width/d.transform.height,Fe=!1,_e=0;_eMath.abs(d.x-v.x)*y?{useVertical:!0}:(p===a.WritingMode.vertical?v.yd.x)?{needsFlipping:!0}:null}function vl(p,v,d,y,S,C,I,O,z,X,ne,ae,oe,we){var be,Fe=v/24,_e=p.lineOffsetX*Fe,De=p.lineOffsetY*Fe;if(p.numGlyphs>1){var Xe=p.glyphStartIndex+p.numGlyphs,ot=p.lineStartIndex,Ct=p.lineStartIndex+p.lineLength,mt=wa(Fe,O,_e,De,d,ne,ae,p,z,C,oe);if(!mt)return{notEnoughRoom:!0};var kt=Wn(mt.first.point,I).point,qt=Wn(mt.last.point,I).point;if(y&&!d){var Tr=fa(p.writingMode,kt,qt,we);if(Tr)return Tr}be=[mt.first];for(var yr=p.glyphStartIndex+1;yr0?xn.point:$s(ae,bn,$r,1,S),Yr=fa(p.writingMode,$r,Si,we);if(Yr)return Yr}var Un=sa(Fe*O.getoffsetX(p.glyphStartIndex),_e,De,d,ne,ae,p.segment,p.lineStartIndex,p.lineStartIndex+p.lineLength,z,C,oe);if(!Un)return{notEnoughRoom:!0};be=[Un]}for(var Kn=0,Bn=be;Kn0?1:-1,be=0;y&&(we*=-1,be=Math.PI),we<0&&(be+=Math.PI);for(var Fe=we>0?O+I:O+I+1,_e=S,De=S,Xe=0,ot=0,Ct=Math.abs(oe),mt=[];Xe+ot<=Ct;){if((Fe+=we)=z)return null;if(De=_e,mt.push(_e),(_e=ae[Fe])===void 0){var kt=new a.Point(X.getx(Fe),X.gety(Fe)),qt=Wn(kt,ne);if(qt.signedDistanceFromCamera>0)_e=ae[Fe]=qt.point;else{var Tr=Fe-we;_e=$s(Xe===0?C:new a.Point(X.getx(Tr),X.gety(Tr)),kt,De,Ct-Xe+1,ne)}}Xe+=ot,ot=De.dist(_e)}var yr=(Ct-Xe)/ot,$r=_e.sub(De),vn=$r.mult(yr)._add(De);vn._add($r._unit()._perp()._mult(d*we));var bn=be+Math.atan2(_e.y-De.y,_e.x-De.x);return mt.push(vn),{point:vn,angle:bn,path:mt}}hi.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},hi.prototype.insert=function(p,v,d,y,S){this._forEachCell(v,d,y,S,this._insertBoxCell,this.boxUid++),this.boxKeys.push(p),this.bboxes.push(v),this.bboxes.push(d),this.bboxes.push(y),this.bboxes.push(S)},hi.prototype.insertCircle=function(p,v,d,y){this._forEachCell(v-y,d-y,v+y,d+y,this._insertCircleCell,this.circleUid++),this.circleKeys.push(p),this.circles.push(v),this.circles.push(d),this.circles.push(y)},hi.prototype._insertBoxCell=function(p,v,d,y,S,C){this.boxCells[S].push(C)},hi.prototype._insertCircleCell=function(p,v,d,y,S,C){this.circleCells[S].push(C)},hi.prototype._query=function(p,v,d,y,S,C){if(d<0||p>this.width||y<0||v>this.height)return!S&&[];var I=[];if(p<=0&&v<=0&&this.width<=d&&this.height<=y){if(S)return!0;for(var O=0;O0:I},hi.prototype._queryCircle=function(p,v,d,y,S){var C=p-d,I=p+d,O=v-d,z=v+d;if(I<0||C>this.width||z<0||O>this.height)return!y&&[];var X=[];return this._forEachCell(C,O,I,z,this._queryCellCircle,X,{hitTest:y,circle:{x:p,y:v,radius:d},seenUids:{box:{},circle:{}}},S),y?X.length>0:X},hi.prototype.query=function(p,v,d,y,S){return this._query(p,v,d,y,!1,S)},hi.prototype.hitTest=function(p,v,d,y,S){return this._query(p,v,d,y,!0,S)},hi.prototype.hitTestCircle=function(p,v,d,y){return this._queryCircle(p,v,d,!0,y)},hi.prototype._queryCell=function(p,v,d,y,S,C,I,O){var z=I.seenUids,X=this.boxCells[S];if(X!==null)for(var ne=this.bboxes,ae=0,oe=X;ae=ne[be+0]&&y>=ne[be+1]&&(!O||O(this.boxKeys[we]))){if(I.hitTest)return C.push(!0),!0;C.push({key:this.boxKeys[we],x1:ne[be],y1:ne[be+1],x2:ne[be+2],y2:ne[be+3]})}}}var Fe=this.circleCells[S];if(Fe!==null)for(var _e=this.circles,De=0,Xe=Fe;DeI*I+O*O},hi.prototype._circleAndRectCollide=function(p,v,d,y,S,C,I){var O=(C-y)/2,z=Math.abs(p-(y+O));if(z>O+d)return!1;var X=(I-S)/2,ne=Math.abs(v-(S+X));if(ne>X+d)return!1;if(z<=O||ne<=X)return!0;var ae=z-O,oe=ne-X;return ae*ae+oe*oe<=d*d};var Hu=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ro(p,v){for(var d=0;d=1;Si--)xn.push(vn.path[Si]);for(var Yr=1;Yr0){for(var On=xn[0].clone(),Yn=xn[0].clone(),kn=1;kn=Tr.x&&Yn.x<=yr.x&&On.y>=Tr.y&&Yn.y<=yr.y?[xn]:Yn.xyr.x||Yn.yyr.y?[]:a.clipLine([xn],Tr.x,Tr.y,yr.x,yr.y)}for(var In=0,$a=Bn;In<$a.length;In+=1){var xa;$r.reset($a[In],.25*qt),xa=$r.length<=.5*qt?1:Math.ceil($r.paddedLength/Un)+1;for(var _o=0;_o=this.screenRightBoundary||y<100||v>this.screenBottomBoundary},Ca.prototype.isInsideGrid=function(p,v,d,y){return d>=0&&p=0&&v0?(this.prevPlacement&&this.prevPlacement.variableOffsets[ae.crossTileID]&&this.prevPlacement.placements[ae.crossTileID]&&this.prevPlacement.placements[ae.crossTileID].text&&(Fe=this.prevPlacement.variableOffsets[ae.crossTileID].anchor),this.variableOffsets[ae.crossTileID]={textOffset:_e,width:d,height:y,anchor:p,textBoxScale:S,prevAnchor:Fe},this.markUsedJustification(oe,p,ae,we),oe.allowVerticalPlacement&&(this.markUsedOrientation(oe,we,ae),this.placedOrientations[ae.crossTileID]=we),{shift:De,placedGlyphBoxes:Xe}):void 0},_t.prototype.placeLayerBucketPart=function(p,v,d){var y=this,S=p.parameters,C=S.bucket,I=S.layout,O=S.posMatrix,z=S.textLabelPlaneMatrix,X=S.labelToScreenMatrix,ne=S.textPixelRatio,ae=S.holdingForFade,oe=S.collisionBoxArray,we=S.partiallyEvaluatedTextSize,be=S.collisionGroup,Fe=I.get("text-optional"),_e=I.get("icon-optional"),De=I.get("text-allow-overlap"),Xe=I.get("icon-allow-overlap"),ot=I.get("text-rotation-alignment")==="map",Ct=I.get("text-pitch-alignment")==="map",mt=I.get("icon-text-fit")!=="none",kt=I.get("symbol-z-order")==="viewport-y",qt=De&&(Xe||!C.hasIconData()||_e),Tr=Xe&&(De||!C.hasTextData()||Fe);!C.collisionArrays&&oe&&C.deserializeCollisionBoxes(oe);var yr=function(Yr,Un){if(!v[Yr.crossTileID])if(ae)y.placements[Yr.crossTileID]=new yf(!1,!1,!1);else{var Kn,Bn=!1,On=!1,Yn=!0,kn=null,In={box:null,offscreen:null},$a={box:null,offscreen:null},xa=null,_o=null,oo=0,_a=0,ba=0;Un.textFeatureIndex?oo=Un.textFeatureIndex:Yr.useRuntimeCollisionCircles&&(oo=Yr.featureIndex),Un.verticalTextFeatureIndex&&(_a=Un.verticalTextFeatureIndex);var Yo=Un.textBox;if(Yo){var Uo=function(vi){var yo=a.WritingMode.horizontal;if(C.allowVerticalPlacement&&!vi&&y.prevPlacement){var Va=y.prevPlacement.placedOrientations[Yr.crossTileID];Va&&(y.placedOrientations[Yr.crossTileID]=Va,y.markUsedOrientation(C,yo=Va,Yr))}return yo},Ru=function(vi,yo){if(C.allowVerticalPlacement&&Yr.numVerticalGlyphVertices>0&&Un.verticalTextBox)for(var Va=0,Mu=C.writingModes;Va0&&(Zo=Zo.filter(function(vi){return vi!==Zs.anchor})).unshift(Zs.anchor)}var bs=function(vi,yo,Va){for(var Mu=vi.x2-vi.x1,Fh=vi.y2-vi.y1,Bl=Yr.textBoxScale,Xp=mt&&!Xe?yo:null,uc={box:[],offscreen:!1},lc=De?2*Zo.length:Zo.length,fu=0;fu=Zo.length,Yr,C,Va,Xp);if(Bh&&(uc=Bh.placedGlyphBoxes)&&uc.box&&uc.box.length){Bn=!0,kn=Bh.shift;break}}return uc};Ru(function(){return bs(Yo,Un.iconBox,a.WritingMode.horizontal)},function(){var vi=Un.verticalTextBox;return C.allowVerticalPlacement&&!(In&&In.box&&In.box.length)&&Yr.numVerticalGlyphVertices>0&&vi?bs(vi,Un.verticalIconBox,a.WritingMode.vertical):{box:null,offscreen:null}}),In&&(Bn=In.box,Yn=In.offscreen);var Bc=Uo(In&&In.box);if(!Bn&&y.prevPlacement){var sc=y.prevPlacement.variableOffsets[Yr.crossTileID];sc&&(y.variableOffsets[Yr.crossTileID]=sc,y.markUsedJustification(C,sc.anchor,Yr,Bc))}}else{var Iu=function(vi,yo){var Va=y.collisionIndex.placeCollisionBox(vi,De,ne,O,be.predicate);return Va&&Va.box&&Va.box.length&&(y.markUsedOrientation(C,yo,Yr),y.placedOrientations[Yr.crossTileID]=yo),Va};Ru(function(){return Iu(Yo,a.WritingMode.horizontal)},function(){var vi=Un.verticalTextBox;return C.allowVerticalPlacement&&Yr.numVerticalGlyphVertices>0&&vi?Iu(vi,a.WritingMode.vertical):{box:null,offscreen:null}}),Uo(In&&In.box&&In.box.length)}}if(Bn=(Kn=In)&&Kn.box&&Kn.box.length>0,Yn=Kn&&Kn.offscreen,Yr.useRuntimeCollisionCircles){var Dl=C.text.placedSymbolArray.get(Yr.centerJustifiedTextSymbolIndex),rl=a.evaluateSizeForFeature(C.textSizeData,we,Dl),lu=I.get("text-padding");xa=y.collisionIndex.placeCollisionCircles(De,Dl,C.lineVertexArray,C.glyphOffsetArray,rl,O,z,X,d,Ct,be.predicate,Yr.collisionCircleDiameter,lu),Bn=De||xa.circles.length>0&&!xa.collisionDetected,Yn=Yn&&xa.offscreen}if(Un.iconFeatureIndex&&(ba=Un.iconFeatureIndex),Un.iconBox){var Fl=function(vi){var yo=mt&&kn?Ue(vi,kn.x,kn.y,ot,Ct,y.transform.angle):vi;return y.collisionIndex.placeCollisionBox(yo,Xe,ne,O,be.predicate)};On=$a&&$a.box&&$a.box.length&&Un.verticalIconBox?(_o=Fl(Un.verticalIconBox)).box.length>0:(_o=Fl(Un.iconBox)).box.length>0,Yn=Yn&&_o.offscreen}var Ro=Fe||Yr.numHorizontalGlyphVertices===0&&Yr.numVerticalGlyphVertices===0,Ma=_e||Yr.numIconVertices===0;if(Ro||Ma?Ma?Ro||(On=On&&Bn):Bn=On&&Bn:On=Bn=On&&Bn,Bn&&Kn&&Kn.box&&y.collisionIndex.insertCollisionBox(Kn.box,I.get("text-ignore-placement"),C.bucketInstanceId,$a&&$a.box&&_a?_a:oo,be.ID),On&&_o&&y.collisionIndex.insertCollisionBox(_o.box,I.get("icon-ignore-placement"),C.bucketInstanceId,ba,be.ID),xa&&(Bn&&y.collisionIndex.insertCollisionCircles(xa.circles,I.get("text-ignore-placement"),C.bucketInstanceId,oo,be.ID),d)){var as=C.bucketInstanceId,qs=y.collisionCircleArrays[as];qs===void 0&&(qs=y.collisionCircleArrays[as]=new vs);for(var cu=0;cu=0;--vn){var bn=$r[vn];yr(C.symbolInstances.get(bn),C.collisionArrays[bn])}else for(var xn=p.symbolInstanceStart;xn=0&&(p.text.placedSymbolArray.get(O).crossTileID=S>=0&&O!==S?0:d.crossTileID)}},_t.prototype.markUsedOrientation=function(p,v,d){for(var y=v===a.WritingMode.horizontal||v===a.WritingMode.horizontalOnly?v:0,S=v===a.WritingMode.vertical?v:0,C=0,I=[d.leftJustifiedTextSymbolIndex,d.centerJustifiedTextSymbolIndex,d.rightJustifiedTextSymbolIndex];C0,Tr=y.placedOrientations[Xe.crossTileID],yr=Tr===a.WritingMode.vertical,$r=Tr===a.WritingMode.horizontal||Tr===a.WritingMode.horizontalOnly;if(ot>0||Ct>0){var vn=B1(kt.text);we(p.text,ot,yr?Tc:vn),we(p.text,Ct,$r?Tc:vn);var bn=kt.text.isHidden();[Xe.rightJustifiedTextSymbolIndex,Xe.centerJustifiedTextSymbolIndex,Xe.leftJustifiedTextSymbolIndex].forEach(function(In){In>=0&&(p.text.placedSymbolArray.get(In).hidden=bn||yr?1:0)}),Xe.verticalPlacedTextSymbolIndex>=0&&(p.text.placedSymbolArray.get(Xe.verticalPlacedTextSymbolIndex).hidden=bn||$r?1:0);var xn=y.variableOffsets[Xe.crossTileID];xn&&y.markUsedJustification(p,xn.anchor,Xe,Tr);var Si=y.placedOrientations[Xe.crossTileID];Si&&(y.markUsedJustification(p,"left",Xe,Si),y.markUsedOrientation(p,Si,Xe))}if(qt){var Yr=B1(kt.icon),Un=!(ae&&Xe.verticalPlacedIconSymbolIndex&&yr);Xe.placedIconSymbolIndex>=0&&(we(p.icon,Xe.numIconVertices,Un?Yr:Tc),p.icon.placedSymbolArray.get(Xe.placedIconSymbolIndex).hidden=kt.icon.isHidden()),Xe.verticalPlacedIconSymbolIndex>=0&&(we(p.icon,Xe.numVerticalIconVertices,Un?Tc:Yr),p.icon.placedSymbolArray.get(Xe.verticalPlacedIconSymbolIndex).hidden=kt.icon.isHidden())}if(p.hasIconCollisionBoxData()||p.hasTextCollisionBoxData()){var Kn=p.collisionArrays[De];if(Kn){var Bn=new a.Point(0,0);if(Kn.textBox||Kn.verticalTextBox){var On=!0;if(z){var Yn=y.variableOffsets[mt];Yn?(Bn=ue(Yn.anchor,Yn.width,Yn.height,Yn.textOffset,Yn.textBoxScale),X&&Bn._rotate(ne?y.transform.angle:-y.transform.angle)):On=!1}Kn.textBox&&Sr(p.textCollisionBox.collisionVertexArray,kt.text.placed,!On||yr,Bn.x,Bn.y),Kn.verticalTextBox&&Sr(p.textCollisionBox.collisionVertexArray,kt.text.placed,!On||$r,Bn.x,Bn.y)}var kn=!!(!$r&&Kn.verticalIconBox);Kn.iconBox&&Sr(p.iconCollisionBox.collisionVertexArray,kt.icon.placed,kn,ae?Bn.x:0,ae?Bn.y:0),Kn.verticalIconBox&&Sr(p.iconCollisionBox.collisionVertexArray,kt.icon.placed,!kn,ae?Bn.x:0,ae?Bn.y:0)}}},Fe=0;Fep},_t.prototype.setStale=function(){this.stale=!0};var hn=Math.pow(2,25),Ei=Math.pow(2,24),La=Math.pow(2,17),mo=Math.pow(2,16),no=Math.pow(2,9),Vs=Math.pow(2,8),F1=Math.pow(2,1);function B1(p){if(p.opacity===0&&!p.placed)return 0;if(p.opacity===1&&p.placed)return 4294967295;var v=p.placed?1:0,d=Math.floor(127*p.opacity);return d*hn+v*Ei+d*La+v*mo+d*no+v*Vs+d*F1+v}var Tc=0,wp=function(p){this._sortAcrossTiles=p.layout.get("symbol-z-order")!=="viewport-y"&&p.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};wp.prototype.continuePlacement=function(p,v,d,y,S){for(var C=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var I=v[p[this._currentPlacementIndex]],O=this.placement.collisionIndex.transform.zoom;if(I.type==="symbol"&&(!I.minzoom||I.minzoom<=O)&&(!I.maxzoom||I.maxzoom>O)){if(this._inProgressLayer||(this._inProgressLayer=new wp(I)),this._inProgressLayer.continuePlacement(d[I.source],this.placement,this._showCollisionBoxes,I,C))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},xf.prototype.commit=function(p){return this.placement.commit(p),this.placement};var L1=512/a.EXTENT/2,hh=function(p,v,d){this.tileID=p,this.indexedSymbolInstances={},this.bucketInstanceId=d;for(var y=0;yp.overscaledZ)for(var O in I){var z=I[O];z.tileID.isChildOf(p)&&z.findMatches(v.symbolInstances,p,S)}else{var X=I[p.scaledTo(Number(C)).key];X&&X.findMatches(v.symbolInstances,p,S)}}for(var ne=0;ne1?"@2x":"",ae=a.getJSON(C.transformRequest(C.normalizeSpriteURL(S,ne,".json"),a.ResourceType.SpriteJSON),function(be,Fe){ae=null,X||(X=be,O=Fe,we())}),oe=a.getImage(C.transformRequest(C.normalizeSpriteURL(S,ne,".png"),a.ResourceType.SpriteImage),function(be,Fe){oe=null,X||(X=be,z=Fe,we())});function we(){if(X)I(X);else if(O&&z){var be=a.browser.getImageData(z),Fe={};for(var _e in O){var De=O[_e],Xe=De.width,ot=De.height,Ct=De.x,mt=De.y,kt=De.sdf,qt=De.pixelRatio,Tr=De.stretchX,yr=De.stretchY,$r=De.content,vn=new a.RGBAImage({width:Xe,height:ot});a.RGBAImage.copy(be,vn,{x:Ct,y:mt},{x:0,y:0},{width:Xe,height:ot}),Fe[_e]={data:vn,pixelRatio:qt,sdf:kt,stretchX:Tr,stretchY:yr,content:$r}}I(null,Fe)}}return{cancel:function(){ae&&(ae.cancel(),ae=null),oe&&(oe.cancel(),oe=null)}}}(d,this.map._requestManager,function(S,C){if(y._spriteRequest=null,S)y.fire(new a.ErrorEvent(S));else if(C)for(var I in C)y.imageManager.addImage(I,C[I]);y.imageManager.setLoaded(!0),y._availableImages=y.imageManager.listImages(),y.dispatcher.broadcast("setImages",y._availableImages),y.fire(new a.Event("data",{dataType:"style"}))})},v.prototype._validateLayer=function(d){var y=this.sourceCaches[d.source];if(y){var S=d.sourceLayer;if(S){var C=y.getSource();(C.type==="geojson"||C.vectorLayerIds&&C.vectorLayerIds.indexOf(S)===-1)&&this.fire(new a.ErrorEvent(new Error('Source layer "'+S+'" does not exist on source "'+C.id+'" as specified by style layer "'+d.id+'"')))}}},v.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var d in this.sourceCaches)if(!this.sourceCaches[d].loaded())return!1;return!!this.imageManager.isLoaded()},v.prototype._serializeLayers=function(d){for(var y=[],S=0,C=d;S0)throw new Error("Unimplemented: "+C.map(function(I){return I.command}).join(", ")+".");return S.forEach(function(I){I.command!=="setTransition"&&y[I.command].apply(y,I.args)}),this.stylesheet=d,!0},v.prototype.addImage=function(d,y){if(this.getImage(d))return this.fire(new a.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(d,y),this._afterImageUpdated(d)},v.prototype.updateImage=function(d,y){this.imageManager.updateImage(d,y)},v.prototype.getImage=function(d){return this.imageManager.getImage(d)},v.prototype.removeImage=function(d){if(!this.getImage(d))return this.fire(new a.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(d),this._afterImageUpdated(d)},v.prototype._afterImageUpdated=function(d){this._availableImages=this.imageManager.listImages(),this._changedImages[d]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new a.Event("data",{dataType:"style"}))},v.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},v.prototype.addSource=function(d,y,S){var C=this;if(S===void 0&&(S={}),this._checkLoaded(),this.sourceCaches[d]!==void 0)throw new Error("There is already a source with this ID");if(!y.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(y).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(y.type)>=0&&this._validate(a.validateStyle.source,"sources."+d,y,null,S))){this.map&&this.map._collectResourceTiming&&(y.collectResourceTiming=!0);var I=this.sourceCaches[d]=new Ce(d,y,this.dispatcher);I.style=this,I.setEventedParent(this,function(){return{isSourceLoaded:C.loaded(),source:I.serialize(),sourceId:d}}),I.onAdd(this.map),this._changed=!0}},v.prototype.removeSource=function(d){if(this._checkLoaded(),this.sourceCaches[d]===void 0)throw new Error("There is no source with this ID");for(var y in this._layers)if(this._layers[y].source===d)return this.fire(new a.ErrorEvent(new Error('Source "'+d+'" cannot be removed while layer "'+y+'" is using it.')));var S=this.sourceCaches[d];delete this.sourceCaches[d],delete this._updatedSources[d],S.fire(new a.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:d})),S.setEventedParent(null),S.clearTiles(),S.onRemove&&S.onRemove(this.map),this._changed=!0},v.prototype.setGeoJSONSourceData=function(d,y){this._checkLoaded(),this.sourceCaches[d].getSource().setData(y),this._changed=!0},v.prototype.getSource=function(d){return this.sourceCaches[d]&&this.sourceCaches[d].getSource()},v.prototype.addLayer=function(d,y,S){S===void 0&&(S={}),this._checkLoaded();var C=d.id;if(this.getLayer(C))this.fire(new a.ErrorEvent(new Error('Layer with id "'+C+'" already exists on this map')));else{var I;if(d.type==="custom"){if(yu(this,a.validateCustomStyleLayer(d)))return;I=a.createStyleLayer(d)}else{if(typeof d.source=="object"&&(this.addSource(C,d.source),d=a.clone$1(d),d=a.extend(d,{source:C})),this._validate(a.validateStyle.layer,"layers."+C,d,{arrayIndex:-1},S))return;I=a.createStyleLayer(d),this._validateLayer(I),I.setEventedParent(this,{layer:{id:C}}),this._serializedLayers[I.id]=I.serialize()}var O=y?this._order.indexOf(y):this._order.length;if(y&&O===-1)this.fire(new a.ErrorEvent(new Error('Layer with id "'+y+'" does not exist on this map.')));else{if(this._order.splice(O,0,C),this._layerOrderChanged=!0,this._layers[C]=I,this._removedLayers[C]&&I.source&&I.type!=="custom"){var z=this._removedLayers[C];delete this._removedLayers[C],z.type!==I.type?this._updatedSources[I.source]="clear":(this._updatedSources[I.source]="reload",this.sourceCaches[I.source].pause())}this._updateLayer(I),I.onAdd&&I.onAdd(this.map)}}},v.prototype.moveLayer=function(d,y){if(this._checkLoaded(),this._changed=!0,this._layers[d]){if(d!==y){var S=this._order.indexOf(d);this._order.splice(S,1);var C=y?this._order.indexOf(y):this._order.length;y&&C===-1?this.fire(new a.ErrorEvent(new Error('Layer with id "'+y+'" does not exist on this map.'))):(this._order.splice(C,0,d),this._layerOrderChanged=!0)}}else this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot be moved.")))},v.prototype.removeLayer=function(d){this._checkLoaded();var y=this._layers[d];if(y){y.setEventedParent(null);var S=this._order.indexOf(d);this._order.splice(S,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[d]=y,delete this._layers[d],delete this._serializedLayers[d],delete this._updatedLayers[d],delete this._updatedPaintProps[d],y.onRemove&&y.onRemove(this.map)}else this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot be removed.")))},v.prototype.getLayer=function(d){return this._layers[d]},v.prototype.hasLayer=function(d){return d in this._layers},v.prototype.setLayerZoomRange=function(d,y,S){this._checkLoaded();var C=this.getLayer(d);C?C.minzoom===y&&C.maxzoom===S||(y!=null&&(C.minzoom=y),S!=null&&(C.maxzoom=S),this._updateLayer(C)):this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot have zoom extent.")))},v.prototype.setFilter=function(d,y,S){S===void 0&&(S={}),this._checkLoaded();var C=this.getLayer(d);if(C){if(!a.deepEqual(C.filter,y))return y==null?(C.filter=void 0,void this._updateLayer(C)):void(this._validate(a.validateStyle.filter,"layers."+C.id+".filter",y,null,S)||(C.filter=a.clone$1(y),this._updateLayer(C)))}else this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot be filtered.")))},v.prototype.getFilter=function(d){return a.clone$1(this.getLayer(d).filter)},v.prototype.setLayoutProperty=function(d,y,S,C){C===void 0&&(C={}),this._checkLoaded();var I=this.getLayer(d);I?a.deepEqual(I.getLayoutProperty(y),S)||(I.setLayoutProperty(y,S,C),this._updateLayer(I)):this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot be styled.")))},v.prototype.getLayoutProperty=function(d,y){var S=this.getLayer(d);if(S)return S.getLayoutProperty(y);this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style.")))},v.prototype.setPaintProperty=function(d,y,S,C){C===void 0&&(C={}),this._checkLoaded();var I=this.getLayer(d);I?a.deepEqual(I.getPaintProperty(y),S)||(I.setPaintProperty(y,S,C)&&this._updateLayer(I),this._changed=!0,this._updatedPaintProps[d]=!0):this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot be styled.")))},v.prototype.getPaintProperty=function(d,y){return this.getLayer(d).getPaintProperty(y)},v.prototype.setFeatureState=function(d,y){this._checkLoaded();var S=d.source,C=d.sourceLayer,I=this.sourceCaches[S];if(I!==void 0){var O=I.getSource().type;O==="geojson"&&C?this.fire(new a.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):O!=="vector"||C?(d.id===void 0&&this.fire(new a.ErrorEvent(new Error("The feature id parameter must be provided."))),I.setFeatureState(C,d.id,y)):this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new a.ErrorEvent(new Error("The source '"+S+"' does not exist in the map's style.")))},v.prototype.removeFeatureState=function(d,y){this._checkLoaded();var S=d.source,C=this.sourceCaches[S];if(C!==void 0){var I=C.getSource().type,O=I==="vector"?d.sourceLayer:void 0;I!=="vector"||O?y&&typeof d.id!="string"&&typeof d.id!="number"?this.fire(new a.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):C.removeFeatureState(O,d.id,y):this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new a.ErrorEvent(new Error("The source '"+S+"' does not exist in the map's style.")))},v.prototype.getFeatureState=function(d){this._checkLoaded();var y=d.source,S=d.sourceLayer,C=this.sourceCaches[y];if(C!==void 0){if(C.getSource().type!=="vector"||S)return d.id===void 0&&this.fire(new a.ErrorEvent(new Error("The feature id parameter must be provided."))),C.getFeatureState(S,d.id);this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new a.ErrorEvent(new Error("The source '"+y+"' does not exist in the map's style.")))},v.prototype.getTransition=function(){return a.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},v.prototype.serialize=function(){return a.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:a.mapObject(this.sourceCaches,function(d){return d.serialize()}),layers:this._serializeLayers(this._order)},function(d){return d!==void 0})},v.prototype._updateLayer=function(d){this._updatedLayers[d.id]=!0,d.source&&!this._updatedSources[d.source]&&this.sourceCaches[d.source].getSource().type!=="raster"&&(this._updatedSources[d.source]="reload",this.sourceCaches[d.source].pause()),this._changed=!0},v.prototype._flattenAndSortRenderedFeatures=function(d){for(var y=this,S=function(Tr){return y._layers[Tr].type==="fill-extrusion"},C={},I=[],O=this._order.length-1;O>=0;O--){var z=this._order[O];if(S(z)){C[z]=O;for(var X=0,ne=d;X=0;Fe--){var _e=this._order[Fe];if(S(_e))for(var De=I.length-1;De>=0;De--){var Xe=I[De].feature;if(C[Xe.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),U1=Xi("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);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);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;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;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),z1=Xi("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),O0=Xi(`#pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity gl_FragColor=color*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec2 a_pos;uniform mat4 u_matrix; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity gl_Position=u_matrix*vec4(a_pos,0,1);}`),Ef=Xi(`varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),bu=Xi(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to vec2 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=texture2D(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=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 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=u_matrix*vec4(a_pos,0,1);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;}`),$1=Xi(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to vec2 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=texture2D(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=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 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;gl_Position=u_matrix*vec4(a_pos,0,1);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);}`),Co=Xi(`varying vec4 v_color;void main() {gl_FragColor=v_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color; #pragma mapbox: define highp float base #pragma mapbox: define highp float height #pragma mapbox: define highp vec4 color void main() { #pragma mapbox: initialize highp float base #pragma mapbox: initialize highp float height #pragma mapbox: initialize highp vec4 color vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float 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;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=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;}`),Ql=Xi(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 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=texture2D(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=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;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 vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 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;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos : vec2(edgedistance,z*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;}`),yl=Xi(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;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))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying 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;}"),Cs=Xi(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; #define PI 3.141592653589793 void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;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_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),xl=Xi(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity 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);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float 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);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),js=Xi(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity 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);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float 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);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),Xu=Xi(`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity vec2 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(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float gapwidth #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to float 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);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),Rs=Xi(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth 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 sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(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);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;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;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float 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);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_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);}`),Yu=Xi(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying 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=texture2D(u_image0,v_pos0);vec4 color1=texture2D(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);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),bl=Xi(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute 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_matrix;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;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity vec2 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;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;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_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=u_matrix*vec4(a_pos+vec2(1,0),0,1);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=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);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;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`),V1=Xi(`#define SDF_PX 8.0 uniform 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;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float 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 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=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute 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_matrix;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;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 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;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;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_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=u_matrix*vec4(a_pos+vec2(1,0),0,1);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=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),j1=Xi(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform 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;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif return;}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=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute 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_matrix;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;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 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;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;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_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=u_matrix*vec4(a_pos+vec2(1,0),0,1);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=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,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);}`);function Xi(p,v){var d=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,y=v.match(/attribute ([\w]+) ([\w]+)/g),S=p.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),C=v.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),I=C?C.concat(S):S,O={};return{fragmentSource:p=p.replace(d,function(z,X,ne,ae,oe){return O[oe]=!0,X==="define"?` #ifndef HAS_UNIFORM_u_`+oe+` varying `+ne+" "+ae+" "+oe+`; #else uniform `+ne+" "+ae+" u_"+oe+`; #endif `:` #ifdef HAS_UNIFORM_u_`+oe+` `+ne+" "+ae+" "+oe+" = u_"+oe+`; #endif `}),vertexSource:v=v.replace(d,function(z,X,ne,ae,oe){var we=ae==="float"?"vec2":"vec4",be=oe.match(/color/)?"color":we;return O[oe]?X==="define"?` #ifndef HAS_UNIFORM_u_`+oe+` uniform lowp float u_`+oe+`_t; attribute `+ne+" "+we+" a_"+oe+`; varying `+ne+" "+ae+" "+oe+`; #else uniform `+ne+" "+ae+" u_"+oe+`; #endif `:be==="vec4"?` #ifndef HAS_UNIFORM_u_`+oe+` `+oe+" = a_"+oe+`; #else `+ne+" "+ae+" "+oe+" = u_"+oe+`; #endif `:` #ifndef HAS_UNIFORM_u_`+oe+` `+oe+" = unpack_mix_"+be+"(a_"+oe+", u_"+oe+`_t); #else `+ne+" "+ae+" "+oe+" = u_"+oe+`; #endif `:X==="define"?` #ifndef HAS_UNIFORM_u_`+oe+` uniform lowp float u_`+oe+`_t; attribute `+ne+" "+we+" a_"+oe+`; #else uniform `+ne+" "+ae+" u_"+oe+`; #endif `:be==="vec4"?` #ifndef HAS_UNIFORM_u_`+oe+` `+ne+" "+ae+" "+oe+" = a_"+oe+`; #else `+ne+" "+ae+" "+oe+" = u_"+oe+`; #endif `:` #ifndef HAS_UNIFORM_u_`+oe+` `+ne+" "+ae+" "+oe+" = unpack_mix_"+be+"(a_"+oe+", u_"+oe+`_t); #else `+ne+" "+ae+" "+oe+" = u_"+oe+`; #endif `}),staticAttributes:y,staticUniforms:I}}var k0=Object.freeze({__proto__:null,prelude:_l,background:Wu,backgroundPattern:ph,circle:N1,clippingMask:dh,heatmap:Cp,heatmapTexture:Rp,collisionBox:Ip,collisionCircle:U1,debug:z1,fill:O0,fillOutline:Ef,fillOutlinePattern:bu,fillPattern:$1,fillExtrusion:Co,fillExtrusionPattern:Ql,hillshadePrepare:yl,hillshade:Cs,line:xl,lineGradient:js,linePattern:Xu,lineSDF:Rs,raster:Yu,symbolIcon:bl,symbolSDF:V1,symbolTextAndIcon:j1}),vh=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function Mp(p){for(var v=[],d=0;d>16,O>>16],u_pixel_coord_lower:[65535&I,65535&O]}}Ia.prototype.draw=function(p,v,d,y,S,C,I,O,z,X,ne,ae,oe,we,be,Fe){var _e,De=p.gl;if(!this.failedToCreate){for(var Xe in p.program.set(this.program),p.setDepthMode(d),p.setStencilMode(y),p.setColorMode(S),p.setCullFace(C),this.fixedUniforms)this.fixedUniforms[Xe].set(I[Xe]);we&&we.setUniforms(p,this.binderUniforms,ae,{zoom:oe});for(var ot=(_e={},_e[De.LINES]=2,_e[De.TRIANGLES]=3,_e[De.LINE_STRIP]=1,_e)[v],Ct=0,mt=ne.get();Ct0?1-1/(1.001-I):-I),u_contrast_factor:(C=S.paint.get("raster-contrast"),C>0?1/(1-C):1+C),u_spin_weights:_h(S.paint.get("raster-hue-rotate"))};var C,I};function _h(p){p*=Math.PI/180;var v=Math.sin(p),d=Math.cos(p);return[(2*d+1)/3,(-Math.sqrt(3)*v-d+1)/3,(Math.sqrt(3)*v-d+1)/3]}var Ku,Tl=function(p,v,d,y,S,C,I,O,z,X){var ne=S.transform;return{u_is_size_zoom_constant:+(p==="constant"||p==="source"),u_is_size_feature_constant:+(p==="constant"||p==="camera"),u_size_t:v?v.uSizeT:0,u_size:v?v.uSize:0,u_camera_to_center_distance:ne.cameraToCenterDistance,u_pitch:ne.pitch/360*2*Math.PI,u_rotate_symbol:+d,u_aspect_ratio:ne.width/ne.height,u_fade_change:S.options.fadeDuration?S.symbolFadeChange:1,u_matrix:C,u_label_plane_matrix:I,u_coord_matrix:O,u_is_text:+z,u_pitch_with_map:+y,u_texsize:X,u_texture:0}},Jl=function(p,v,d,y,S,C,I,O,z,X,ne){var ae=S.transform;return a.extend(Tl(p,v,d,y,S,C,I,O,z,X),{u_gamma_scale:y?Math.cos(ae._pitch)*ae.cameraToCenterDistance:1,u_device_pixel_ratio:a.browser.devicePixelRatio,u_is_halo:+ne})},Cc=function(p,v,d,y,S,C,I,O,z,X){return a.extend(Jl(p,v,d,y,S,C,I,O,!0,z,!0),{u_texsize_icon:X,u_texture_icon:1})},ec=function(p,v,d){return{u_matrix:p,u_opacity:v,u_color:d}},tc=function(p,v,d,y,S,C){return a.extend(function(I,O,z,X){var ne=z.imageManager.getPattern(I.from.toString()),ae=z.imageManager.getPattern(I.to.toString()),oe=z.imageManager.getPixelSize(),we=oe.width,be=oe.height,Fe=Math.pow(2,X.tileID.overscaledZ),_e=X.tileSize*Math.pow(2,z.transform.tileZoom)/Fe,De=_e*(X.tileID.canonical.x+X.tileID.wrap*Fe),Xe=_e*X.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ne.tl,u_pattern_br_a:ne.br,u_pattern_tl_b:ae.tl,u_pattern_br_b:ae.br,u_texsize:[we,be],u_mix:O.t,u_pattern_size_a:ne.displaySize,u_pattern_size_b:ae.displaySize,u_scale_a:O.fromScale,u_scale_b:O.toScale,u_tile_units_to_pixels:1/Qi(X,1,z.transform.tileZoom),u_pixel_coord_upper:[De>>16,Xe>>16],u_pixel_coord_lower:[65535&De,65535&Xe]}}(y,C,d,S),{u_matrix:p,u_opacity:v})},Dp={fillExtrusion:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_lightpos:new a.Uniform3f(p,v.u_lightpos),u_lightintensity:new a.Uniform1f(p,v.u_lightintensity),u_lightcolor:new a.Uniform3f(p,v.u_lightcolor),u_vertical_gradient:new a.Uniform1f(p,v.u_vertical_gradient),u_opacity:new a.Uniform1f(p,v.u_opacity)}},fillExtrusionPattern:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_lightpos:new a.Uniform3f(p,v.u_lightpos),u_lightintensity:new a.Uniform1f(p,v.u_lightintensity),u_lightcolor:new a.Uniform3f(p,v.u_lightcolor),u_vertical_gradient:new a.Uniform1f(p,v.u_vertical_gradient),u_height_factor:new a.Uniform1f(p,v.u_height_factor),u_image:new a.Uniform1i(p,v.u_image),u_texsize:new a.Uniform2f(p,v.u_texsize),u_pixel_coord_upper:new a.Uniform2f(p,v.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(p,v.u_pixel_coord_lower),u_scale:new a.Uniform3f(p,v.u_scale),u_fade:new a.Uniform1f(p,v.u_fade),u_opacity:new a.Uniform1f(p,v.u_opacity)}},fill:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix)}},fillPattern:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_image:new a.Uniform1i(p,v.u_image),u_texsize:new a.Uniform2f(p,v.u_texsize),u_pixel_coord_upper:new a.Uniform2f(p,v.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(p,v.u_pixel_coord_lower),u_scale:new a.Uniform3f(p,v.u_scale),u_fade:new a.Uniform1f(p,v.u_fade)}},fillOutline:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_world:new a.Uniform2f(p,v.u_world)}},fillOutlinePattern:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_world:new a.Uniform2f(p,v.u_world),u_image:new a.Uniform1i(p,v.u_image),u_texsize:new a.Uniform2f(p,v.u_texsize),u_pixel_coord_upper:new a.Uniform2f(p,v.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(p,v.u_pixel_coord_lower),u_scale:new a.Uniform3f(p,v.u_scale),u_fade:new a.Uniform1f(p,v.u_fade)}},circle:function(p,v){return{u_camera_to_center_distance:new a.Uniform1f(p,v.u_camera_to_center_distance),u_scale_with_map:new a.Uniform1i(p,v.u_scale_with_map),u_pitch_with_map:new a.Uniform1i(p,v.u_pitch_with_map),u_extrude_scale:new a.Uniform2f(p,v.u_extrude_scale),u_device_pixel_ratio:new a.Uniform1f(p,v.u_device_pixel_ratio),u_matrix:new a.UniformMatrix4f(p,v.u_matrix)}},collisionBox:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_camera_to_center_distance:new a.Uniform1f(p,v.u_camera_to_center_distance),u_pixels_to_tile_units:new a.Uniform1f(p,v.u_pixels_to_tile_units),u_extrude_scale:new a.Uniform2f(p,v.u_extrude_scale),u_overscale_factor:new a.Uniform1f(p,v.u_overscale_factor)}},collisionCircle:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_inv_matrix:new a.UniformMatrix4f(p,v.u_inv_matrix),u_camera_to_center_distance:new a.Uniform1f(p,v.u_camera_to_center_distance),u_viewport_size:new a.Uniform2f(p,v.u_viewport_size)}},debug:function(p,v){return{u_color:new a.UniformColor(p,v.u_color),u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_overlay:new a.Uniform1i(p,v.u_overlay),u_overlay_scale:new a.Uniform1f(p,v.u_overlay_scale)}},clippingMask:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix)}},heatmap:function(p,v){return{u_extrude_scale:new a.Uniform1f(p,v.u_extrude_scale),u_intensity:new a.Uniform1f(p,v.u_intensity),u_matrix:new a.UniformMatrix4f(p,v.u_matrix)}},heatmapTexture:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_world:new a.Uniform2f(p,v.u_world),u_image:new a.Uniform1i(p,v.u_image),u_color_ramp:new a.Uniform1i(p,v.u_color_ramp),u_opacity:new a.Uniform1f(p,v.u_opacity)}},hillshade:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_image:new a.Uniform1i(p,v.u_image),u_latrange:new a.Uniform2f(p,v.u_latrange),u_light:new a.Uniform2f(p,v.u_light),u_shadow:new a.UniformColor(p,v.u_shadow),u_highlight:new a.UniformColor(p,v.u_highlight),u_accent:new a.UniformColor(p,v.u_accent)}},hillshadePrepare:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_image:new a.Uniform1i(p,v.u_image),u_dimension:new a.Uniform2f(p,v.u_dimension),u_zoom:new a.Uniform1f(p,v.u_zoom),u_unpack:new a.Uniform4f(p,v.u_unpack)}},line:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_ratio:new a.Uniform1f(p,v.u_ratio),u_device_pixel_ratio:new a.Uniform1f(p,v.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(p,v.u_units_to_pixels)}},lineGradient:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_ratio:new a.Uniform1f(p,v.u_ratio),u_device_pixel_ratio:new a.Uniform1f(p,v.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(p,v.u_units_to_pixels),u_image:new a.Uniform1i(p,v.u_image),u_image_height:new a.Uniform1f(p,v.u_image_height)}},linePattern:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_texsize:new a.Uniform2f(p,v.u_texsize),u_ratio:new a.Uniform1f(p,v.u_ratio),u_device_pixel_ratio:new a.Uniform1f(p,v.u_device_pixel_ratio),u_image:new a.Uniform1i(p,v.u_image),u_units_to_pixels:new a.Uniform2f(p,v.u_units_to_pixels),u_scale:new a.Uniform3f(p,v.u_scale),u_fade:new a.Uniform1f(p,v.u_fade)}},lineSDF:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_ratio:new a.Uniform1f(p,v.u_ratio),u_device_pixel_ratio:new a.Uniform1f(p,v.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(p,v.u_units_to_pixels),u_patternscale_a:new a.Uniform2f(p,v.u_patternscale_a),u_patternscale_b:new a.Uniform2f(p,v.u_patternscale_b),u_sdfgamma:new a.Uniform1f(p,v.u_sdfgamma),u_image:new a.Uniform1i(p,v.u_image),u_tex_y_a:new a.Uniform1f(p,v.u_tex_y_a),u_tex_y_b:new a.Uniform1f(p,v.u_tex_y_b),u_mix:new a.Uniform1f(p,v.u_mix)}},raster:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_tl_parent:new a.Uniform2f(p,v.u_tl_parent),u_scale_parent:new a.Uniform1f(p,v.u_scale_parent),u_buffer_scale:new a.Uniform1f(p,v.u_buffer_scale),u_fade_t:new a.Uniform1f(p,v.u_fade_t),u_opacity:new a.Uniform1f(p,v.u_opacity),u_image0:new a.Uniform1i(p,v.u_image0),u_image1:new a.Uniform1i(p,v.u_image1),u_brightness_low:new a.Uniform1f(p,v.u_brightness_low),u_brightness_high:new a.Uniform1f(p,v.u_brightness_high),u_saturation_factor:new a.Uniform1f(p,v.u_saturation_factor),u_contrast_factor:new a.Uniform1f(p,v.u_contrast_factor),u_spin_weights:new a.Uniform3f(p,v.u_spin_weights)}},symbolIcon:function(p,v){return{u_is_size_zoom_constant:new a.Uniform1i(p,v.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(p,v.u_is_size_feature_constant),u_size_t:new a.Uniform1f(p,v.u_size_t),u_size:new a.Uniform1f(p,v.u_size),u_camera_to_center_distance:new a.Uniform1f(p,v.u_camera_to_center_distance),u_pitch:new a.Uniform1f(p,v.u_pitch),u_rotate_symbol:new a.Uniform1i(p,v.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(p,v.u_aspect_ratio),u_fade_change:new a.Uniform1f(p,v.u_fade_change),u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(p,v.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(p,v.u_coord_matrix),u_is_text:new a.Uniform1i(p,v.u_is_text),u_pitch_with_map:new a.Uniform1i(p,v.u_pitch_with_map),u_texsize:new a.Uniform2f(p,v.u_texsize),u_texture:new a.Uniform1i(p,v.u_texture)}},symbolSDF:function(p,v){return{u_is_size_zoom_constant:new a.Uniform1i(p,v.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(p,v.u_is_size_feature_constant),u_size_t:new a.Uniform1f(p,v.u_size_t),u_size:new a.Uniform1f(p,v.u_size),u_camera_to_center_distance:new a.Uniform1f(p,v.u_camera_to_center_distance),u_pitch:new a.Uniform1f(p,v.u_pitch),u_rotate_symbol:new a.Uniform1i(p,v.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(p,v.u_aspect_ratio),u_fade_change:new a.Uniform1f(p,v.u_fade_change),u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(p,v.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(p,v.u_coord_matrix),u_is_text:new a.Uniform1i(p,v.u_is_text),u_pitch_with_map:new a.Uniform1i(p,v.u_pitch_with_map),u_texsize:new a.Uniform2f(p,v.u_texsize),u_texture:new a.Uniform1i(p,v.u_texture),u_gamma_scale:new a.Uniform1f(p,v.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(p,v.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(p,v.u_is_halo)}},symbolTextAndIcon:function(p,v){return{u_is_size_zoom_constant:new a.Uniform1i(p,v.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(p,v.u_is_size_feature_constant),u_size_t:new a.Uniform1f(p,v.u_size_t),u_size:new a.Uniform1f(p,v.u_size),u_camera_to_center_distance:new a.Uniform1f(p,v.u_camera_to_center_distance),u_pitch:new a.Uniform1f(p,v.u_pitch),u_rotate_symbol:new a.Uniform1i(p,v.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(p,v.u_aspect_ratio),u_fade_change:new a.Uniform1f(p,v.u_fade_change),u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(p,v.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(p,v.u_coord_matrix),u_is_text:new a.Uniform1i(p,v.u_is_text),u_pitch_with_map:new a.Uniform1i(p,v.u_pitch_with_map),u_texsize:new a.Uniform2f(p,v.u_texsize),u_texsize_icon:new a.Uniform2f(p,v.u_texsize_icon),u_texture:new a.Uniform1i(p,v.u_texture),u_texture_icon:new a.Uniform1i(p,v.u_texture_icon),u_gamma_scale:new a.Uniform1f(p,v.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(p,v.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(p,v.u_is_halo)}},background:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_opacity:new a.Uniform1f(p,v.u_opacity),u_color:new a.UniformColor(p,v.u_color)}},backgroundPattern:function(p,v){return{u_matrix:new a.UniformMatrix4f(p,v.u_matrix),u_opacity:new a.Uniform1f(p,v.u_opacity),u_image:new a.Uniform1i(p,v.u_image),u_pattern_tl_a:new a.Uniform2f(p,v.u_pattern_tl_a),u_pattern_br_a:new a.Uniform2f(p,v.u_pattern_br_a),u_pattern_tl_b:new a.Uniform2f(p,v.u_pattern_tl_b),u_pattern_br_b:new a.Uniform2f(p,v.u_pattern_br_b),u_texsize:new a.Uniform2f(p,v.u_texsize),u_mix:new a.Uniform1f(p,v.u_mix),u_pattern_size_a:new a.Uniform2f(p,v.u_pattern_size_a),u_pattern_size_b:new a.Uniform2f(p,v.u_pattern_size_b),u_scale_a:new a.Uniform1f(p,v.u_scale_a),u_scale_b:new a.Uniform1f(p,v.u_scale_b),u_pixel_coord_upper:new a.Uniform2f(p,v.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(p,v.u_pixel_coord_lower),u_tile_units_to_pixels:new a.Uniform1f(p,v.u_tile_units_to_pixels)}}};function rc(p,v,d,y,S,C,I){for(var O=p.context,z=O.gl,X=p.useProgram("collisionBox"),ne=[],ae=0,oe=0,we=0;we0){var Ct=a.create(),mt=De;a.mul(Ct,_e.placementInvProjMatrix,p.transform.glCoordMatrix),a.mul(Ct,Ct,_e.placementViewportMatrix),ne.push({circleArray:ot,circleOffset:oe,transform:mt,invTransform:Ct}),oe=ae+=ot.length/4}Xe&&X.draw(O,z.LINES,ce.disabled,Ee.disabled,p.colorModeForRenderPass(),Ye.disabled,ou(De,p.transform,Fe),d.id,Xe.layoutVertexBuffer,Xe.indexBuffer,Xe.segments,null,p.transform.zoom,null,null,Xe.collisionVertexBuffer)}}if(I&&ne.length){var kt=p.useProgram("collisionCircle"),qt=new a.StructArrayLayout2f1f2i16;qt.resize(4*ae),qt._trim();for(var Tr=0,yr=0,$r=ne;yr<$r.length;yr+=1)for(var vn=$r[yr],bn=0;bn=0&&(be[_e.associatedIconIndex]={shiftedAnchor:qt,angle:Tr})}else ro(_e.numGlyphs,oe)}if(ne){we.clear();for(var $r=p.icon.placedSymbolArray,vn=0;vn<$r.length;vn++){var bn=$r.get(vn);if(bn.hidden)ro(bn.numGlyphs,we);else{var xn=be[vn];if(xn)for(var Si=0;Si0){var I=a.browser.now(),O=(I-p.timeAdded)/C,z=v?(I-v.timeAdded)/C:-1,X=d.getSource(),ne=S.coveringZoomLevel({tileSize:X.tileSize,roundZoom:X.roundZoom}),ae=!v||Math.abs(v.tileID.overscaledZ-ne)>Math.abs(p.tileID.overscaledZ-ne),oe=ae&&p.refreshedUponExpiration?1:a.clamp(ae?O:1-z,0,1);return p.refreshedUponExpiration&&O>=1&&(p.refreshedUponExpiration=!1),v?{opacity:1,mix:1-oe}:{opacity:oe,mix:0}}return{opacity:1,mix:0}}var Np=new a.Color(1,0,0,1),xh=new a.Color(0,1,0,1),G1=new a.Color(0,0,1,1),bh=new a.Color(1,0,1,1),Up=new a.Color(0,1,1,1);function Cf(p,v,d,y){nc(p,0,v+d/2,p.transform.width,d,y)}function zp(p,v,d,y){nc(p,v-d/2,0,d,p.transform.height,y)}function nc(p,v,d,y,S,C){var I=p.context,O=I.gl;O.enable(O.SCISSOR_TEST),O.scissor(v*a.browser.devicePixelRatio,d*a.browser.devicePixelRatio,y*a.browser.devicePixelRatio,S*a.browser.devicePixelRatio),I.clear({color:C}),O.disable(O.SCISSOR_TEST)}function $p(p,v,d){var y=p.context,S=y.gl,C=d.posMatrix,I=p.useProgram("debug"),O=ce.disabled,z=Ee.disabled,X=p.colorModeForRenderPass();y.activeTexture.set(S.TEXTURE0),p.emptyTexture.bind(S.LINEAR,S.CLAMP_TO_EDGE),I.draw(y,S.LINE_STRIP,O,z,X,Ye.disabled,Sl(C,a.Color.red),"$debug",p.debugBuffer,p.tileBorderIndexBuffer,p.debugSegments);var ne=v.getTileByID(d.key).latestRawTileData,ae=Math.floor((ne&&ne.byteLength||0)/1024),oe=v.getTile(d).tileSize,we=512/Math.min(oe,512)*(d.overscaledZ/p.transform.zoom)*.5,be=d.canonical.toString();d.overscaledZ!==d.canonical.z&&(be+=" => "+d.overscaledZ),function(Fe,_e){Fe.initDebugOverlayCanvas();var De=Fe.debugOverlayCanvas,Xe=Fe.context.gl,ot=Fe.debugOverlayCanvas.getContext("2d");ot.clearRect(0,0,De.width,De.height),ot.shadowColor="white",ot.shadowBlur=2,ot.lineWidth=1.5,ot.strokeStyle="white",ot.textBaseline="top",ot.font="bold 36px Open Sans, sans-serif",ot.fillText(_e,5,5),ot.strokeText(_e,5,5),Fe.debugOverlayTexture.update(De),Fe.debugOverlayTexture.bind(Xe.LINEAR,Xe.CLAMP_TO_EDGE)}(p,be+" "+ae+"kb"),I.draw(y,S.TRIANGLES,O,z,je.alphaBlended,Ye.disabled,Sl(C,a.Color.transparent,we),"$debug",p.debugBuffer,p.quadTriangleIndexBuffer,p.debugSegments)}var Rl={symbol:function(p,v,d,y,S){if(p.renderPass==="translucent"){var C=Ee.disabled,I=p.colorModeForRenderPass();d.layout.get("text-variable-anchor")&&function(O,z,X,ne,ae,oe,we){for(var be=z.transform,Fe=ae==="map",_e=oe==="map",De=0,Xe=O;De256&&this.clearStencil(),d.setColorMode(je.disabled),d.setDepthMode(ce.disabled);var S=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var C=0,I=v;C256&&this.clearStencil();var p=this.nextStencilID++,v=this.context.gl;return new Ee({func:v.NOTEQUAL,mask:255},p,255,v.KEEP,v.KEEP,v.REPLACE)},ra.prototype.stencilModeForClipping=function(p){var v=this.context.gl;return new Ee({func:v.EQUAL,mask:255},this._tileClippingMaskIDs[p.key],0,v.KEEP,v.KEEP,v.REPLACE)},ra.prototype.stencilConfigForOverlap=function(p){var v,d=this.context.gl,y=p.sort(function(z,X){return X.overscaledZ-z.overscaledZ}),S=y[y.length-1].overscaledZ,C=y[0].overscaledZ-S+1;if(C>1){this.currentStencilSource=void 0,this.nextStencilID+C>256&&this.clearStencil();for(var I={},O=0;O=0;this.currentLayer--){var ot=this.style._layers[y[this.currentLayer]],Ct=S[ot.source],mt=X[ot.source];this._renderTileClippingMasks(ot,mt),this.renderLayer(this,Ct,ot,mt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?v.pop():null},ra.prototype.isPatternMissing=function(p){if(!p)return!1;if(!p.from||!p.to)return!0;var v=this.imageManager.getPattern(p.from.toString()),d=this.imageManager.getPattern(p.to.toString());return!v||!d},ra.prototype.useProgram=function(p,v){this.cache=this.cache||{};var d=""+p+(v?v.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[d]||(this.cache[d]=new Ia(this.context,p,k0[p],v,Dp[p],this._showOverdrawInspector)),this.cache[d]},ra.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},ra.prototype.setBaseState=function(){var p=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(p.FUNC_ADD)},ra.prototype.initDebugOverlayCanvas=function(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=a.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new a.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},ra.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Eh=function(p,v){this.points=p,this.planes=v};Eh.fromInvProjectionMatrix=function(p,v,d){var y=Math.pow(2,d),S=[[-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(function(I){return a.transformMat4([],I,p)}).map(function(I){return a.scale$1([],I,1/I[3]/v*y)}),C=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(I){var O=a.sub([],S[I[0]],S[I[1]]),z=a.sub([],S[I[2]],S[I[1]]),X=a.normalize([],a.cross([],O,z)),ne=-a.dot(X,S[I[1]]);return X.concat(ne)});return new Eh(S,C)};var Au=function(p,v){this.min=p,this.max=v,this.center=a.scale$2([],a.add([],this.min,this.max),.5)};Au.prototype.quadrant=function(p){for(var v=[p%2==0,p<2],d=a.clone$2(this.min),y=a.clone$2(this.max),S=0;S=0;if(C===0)return 0;C!==v.length&&(d=!1)}if(d)return 2;for(var O=0;O<3;O++){for(var z=Number.MAX_VALUE,X=-Number.MAX_VALUE,ne=0;nethis.max[O]-this.min[O])return 0}return 1};var Il=function(p,v,d,y){if(p===void 0&&(p=0),v===void 0&&(v=0),d===void 0&&(d=0),y===void 0&&(y=0),isNaN(p)||p<0||isNaN(v)||v<0||isNaN(d)||d<0||isNaN(y)||y<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=p,this.bottom=v,this.left=d,this.right=y};Il.prototype.interpolate=function(p,v,d){return v.top!=null&&p.top!=null&&(this.top=a.number(p.top,v.top,d)),v.bottom!=null&&p.bottom!=null&&(this.bottom=a.number(p.bottom,v.bottom,d)),v.left!=null&&p.left!=null&&(this.left=a.number(p.left,v.left,d)),v.right!=null&&p.right!=null&&(this.right=a.number(p.right,v.right,d)),this},Il.prototype.getCenter=function(p,v){var d=a.clamp((this.left+p-this.right)/2,0,p),y=a.clamp((this.top+v-this.bottom)/2,0,v);return new a.Point(d,y)},Il.prototype.equals=function(p){return this.top===p.top&&this.bottom===p.bottom&&this.left===p.left&&this.right===p.right},Il.prototype.clone=function(){return new Il(this.top,this.bottom,this.left,this.right)},Il.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var yi=function(p,v,d,y,S){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=S===void 0||S,this._minZoom=p||0,this._maxZoom=v||22,this._minPitch=d??0,this._maxPitch=y??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new a.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Il,this._posMatrixCache={},this._alignedPosMatrixCache={}},na={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};yi.prototype.clone=function(){var p=new yi(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return p.tileSize=this.tileSize,p.latRange=this.latRange,p.width=this.width,p.height=this.height,p._center=this._center,p.zoom=this.zoom,p.angle=this.angle,p._fov=this._fov,p._pitch=this._pitch,p._unmodified=this._unmodified,p._edgeInsets=this._edgeInsets.clone(),p._calcMatrices(),p},na.minZoom.get=function(){return this._minZoom},na.minZoom.set=function(p){this._minZoom!==p&&(this._minZoom=p,this.zoom=Math.max(this.zoom,p))},na.maxZoom.get=function(){return this._maxZoom},na.maxZoom.set=function(p){this._maxZoom!==p&&(this._maxZoom=p,this.zoom=Math.min(this.zoom,p))},na.minPitch.get=function(){return this._minPitch},na.minPitch.set=function(p){this._minPitch!==p&&(this._minPitch=p,this.pitch=Math.max(this.pitch,p))},na.maxPitch.get=function(){return this._maxPitch},na.maxPitch.set=function(p){this._maxPitch!==p&&(this._maxPitch=p,this.pitch=Math.min(this.pitch,p))},na.renderWorldCopies.get=function(){return this._renderWorldCopies},na.renderWorldCopies.set=function(p){p===void 0?p=!0:p===null&&(p=!1),this._renderWorldCopies=p},na.worldSize.get=function(){return this.tileSize*this.scale},na.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},na.size.get=function(){return new a.Point(this.width,this.height)},na.bearing.get=function(){return-this.angle/Math.PI*180},na.bearing.set=function(p){var v=-a.wrap(p,-180,180)*Math.PI/180;this.angle!==v&&(this._unmodified=!1,this.angle=v,this._calcMatrices(),this.rotationMatrix=a.create$2(),a.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},na.pitch.get=function(){return this._pitch/Math.PI*180},na.pitch.set=function(p){var v=a.clamp(p,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==v&&(this._unmodified=!1,this._pitch=v,this._calcMatrices())},na.fov.get=function(){return this._fov/Math.PI*180},na.fov.set=function(p){p=Math.max(.01,Math.min(60,p)),this._fov!==p&&(this._unmodified=!1,this._fov=p/180*Math.PI,this._calcMatrices())},na.zoom.get=function(){return this._zoom},na.zoom.set=function(p){var v=Math.min(Math.max(p,this.minZoom),this.maxZoom);this._zoom!==v&&(this._unmodified=!1,this._zoom=v,this.scale=this.zoomScale(v),this.tileZoom=Math.floor(v),this.zoomFraction=v-this.tileZoom,this._constrain(),this._calcMatrices())},na.center.get=function(){return this._center},na.center.set=function(p){p.lat===this._center.lat&&p.lng===this._center.lng||(this._unmodified=!1,this._center=p,this._constrain(),this._calcMatrices())},na.padding.get=function(){return this._edgeInsets.toJSON()},na.padding.set=function(p){this._edgeInsets.equals(p)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,p,1),this._calcMatrices())},na.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},yi.prototype.isPaddingEqual=function(p){return this._edgeInsets.equals(p)},yi.prototype.interpolatePadding=function(p,v,d){this._unmodified=!1,this._edgeInsets.interpolate(p,v,d),this._constrain(),this._calcMatrices()},yi.prototype.coveringZoomLevel=function(p){var v=(p.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/p.tileSize));return Math.max(0,v)},yi.prototype.getVisibleUnwrappedCoordinates=function(p){var v=[new a.UnwrappedTileID(0,p)];if(this._renderWorldCopies)for(var d=this.pointCoordinate(new a.Point(0,0)),y=this.pointCoordinate(new a.Point(this.width,0)),S=this.pointCoordinate(new a.Point(this.width,this.height)),C=this.pointCoordinate(new a.Point(0,this.height)),I=Math.floor(Math.min(d.x,y.x,S.x,C.x)),O=Math.floor(Math.max(d.x,y.x,S.x,C.x)),z=I-1;z<=O+1;z++)z!==0&&v.push(new a.UnwrappedTileID(z,p));return v},yi.prototype.coveringTiles=function(p){var v=this.coveringZoomLevel(p),d=v;if(p.minzoom!==void 0&&vp.maxzoom&&(v=p.maxzoom);var y=a.MercatorCoordinate.fromLngLat(this.center),S=Math.pow(2,v),C=[S*y.x,S*y.y,0],I=Eh.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,v),O=p.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(O=v);var z=function(yr){return{aabb:new Au([yr*S,0,0],[(yr+1)*S,S,0]),zoom:0,x:0,y:0,wrap:yr,fullyVisible:!1}},X=[],ne=[],ae=v,oe=p.reparseOverscaled?d:v;if(this._renderWorldCopies)for(var we=1;we<=3;we++)X.push(z(-we)),X.push(z(we));for(X.push(z(0));X.length>0;){var be=X.pop(),Fe=be.x,_e=be.y,De=be.fullyVisible;if(!De){var Xe=be.aabb.intersects(I);if(Xe===0)continue;De=Xe===2}var ot=be.aabb.distanceX(C),Ct=be.aabb.distanceY(C),mt=Math.max(Math.abs(ot),Math.abs(Ct));if(be.zoom===ae||mt>3+(1<=O)ne.push({tileID:new a.OverscaledTileID(be.zoom===ae?oe:be.zoom,be.wrap,be.zoom,Fe,_e),distanceSq:a.sqrLen([C[0]-.5-Fe,C[1]-.5-_e])});else for(var kt=0;kt<4;kt++){var qt=(Fe<<1)+kt%2,Tr=(_e<<1)+(kt>>1);X.push({aabb:be.aabb.quadrant(kt),zoom:be.zoom+1,x:qt,y:Tr,wrap:be.wrap,fullyVisible:De})}}return ne.sort(function(yr,$r){return yr.distanceSq-$r.distanceSq}).map(function(yr){return yr.tileID})},yi.prototype.resize=function(p,v){this.width=p,this.height=v,this.pixelsToGLUnits=[2/p,-2/v],this._constrain(),this._calcMatrices()},na.unmodified.get=function(){return this._unmodified},yi.prototype.zoomScale=function(p){return Math.pow(2,p)},yi.prototype.scaleZoom=function(p){return Math.log(p)/Math.LN2},yi.prototype.project=function(p){var v=a.clamp(p.lat,-this.maxValidLatitude,this.maxValidLatitude);return new a.Point(a.mercatorXfromLng(p.lng)*this.worldSize,a.mercatorYfromLat(v)*this.worldSize)},yi.prototype.unproject=function(p){return new a.MercatorCoordinate(p.x/this.worldSize,p.y/this.worldSize).toLngLat()},na.point.get=function(){return this.project(this.center)},yi.prototype.setLocationAtPoint=function(p,v){var d=this.pointCoordinate(v),y=this.pointCoordinate(this.centerPoint),S=this.locationCoordinate(p),C=new a.MercatorCoordinate(S.x-(d.x-y.x),S.y-(d.y-y.y));this.center=this.coordinateLocation(C),this._renderWorldCopies&&(this.center=this.center.wrap())},yi.prototype.locationPoint=function(p){return this.coordinatePoint(this.locationCoordinate(p))},yi.prototype.pointLocation=function(p){return this.coordinateLocation(this.pointCoordinate(p))},yi.prototype.locationCoordinate=function(p){return a.MercatorCoordinate.fromLngLat(p)},yi.prototype.coordinateLocation=function(p){return p.toLngLat()},yi.prototype.pointCoordinate=function(p){var v=[p.x,p.y,0,1],d=[p.x,p.y,1,1];a.transformMat4(v,v,this.pixelMatrixInverse),a.transformMat4(d,d,this.pixelMatrixInverse);var y=v[3],S=d[3],C=v[1]/y,I=d[1]/S,O=v[2]/y,z=d[2]/S,X=O===z?0:(0-O)/(z-O);return new a.MercatorCoordinate(a.number(v[0]/y,d[0]/S,X)/this.worldSize,a.number(C,I,X)/this.worldSize)},yi.prototype.coordinatePoint=function(p){var v=[p.x*this.worldSize,p.y*this.worldSize,0,1];return a.transformMat4(v,v,this.pixelMatrix),new a.Point(v[0]/v[3],v[1]/v[3])},yi.prototype.getBounds=function(){return new a.LngLatBounds().extend(this.pointLocation(new a.Point(0,0))).extend(this.pointLocation(new a.Point(this.width,0))).extend(this.pointLocation(new a.Point(this.width,this.height))).extend(this.pointLocation(new a.Point(0,this.height)))},yi.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new a.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},yi.prototype.setMaxBounds=function(p){p?(this.lngRange=[p.getWest(),p.getEast()],this.latRange=[p.getSouth(),p.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},yi.prototype.calculatePosMatrix=function(p,v){v===void 0&&(v=!1);var d=p.key,y=v?this._alignedPosMatrixCache:this._posMatrixCache;if(y[d])return y[d];var S=p.canonical,C=this.worldSize/this.zoomScale(S.z),I=S.x+Math.pow(2,S.z)*p.wrap,O=a.identity(new Float64Array(16));return a.translate(O,O,[I*C,S.y*C,0]),a.scale(O,O,[C/a.EXTENT,C/a.EXTENT,1]),a.multiply(O,v?this.alignedProjMatrix:this.projMatrix,O),y[d]=new Float32Array(O),y[d]},yi.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},yi.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var p,v,d,y,S=-90,C=90,I=-180,O=180,z=this.size,X=this._unmodified;if(this.latRange){var ne=this.latRange;S=a.mercatorYfromLat(ne[1])*this.worldSize,p=(C=a.mercatorYfromLat(ne[0])*this.worldSize)-SC&&(y=C-Fe)}if(this.lngRange){var _e=oe.x,De=z.x/2;_e-DeO&&(d=O-De)}d===void 0&&y===void 0||(this.center=this.unproject(new a.Point(d!==void 0?d:oe.x,y!==void 0?y:oe.y))),this._unmodified=X,this._constraining=!1}},yi.prototype._calcMatrices=function(){if(this.height){var p=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var v=Math.PI/2+this._pitch,d=this._fov*(.5+p.y/this.height),y=Math.sin(d)*this.cameraToCenterDistance/Math.sin(a.clamp(Math.PI-v-d,.01,Math.PI-.01)),S=this.point,C=S.x,I=S.y,O=1.01*(Math.cos(Math.PI/2-this._pitch)*y+this.cameraToCenterDistance),z=this.height/50,X=new Float64Array(16);a.perspective(X,this._fov,this.width/this.height,z,O),X[8]=2*-p.x/this.width,X[9]=2*p.y/this.height,a.scale(X,X,[1,-1,1]),a.translate(X,X,[0,0,-this.cameraToCenterDistance]),a.rotateX(X,X,this._pitch),a.rotateZ(X,X,this.angle),a.translate(X,X,[-C,-I,0]),this.mercatorMatrix=a.scale([],X,[this.worldSize,this.worldSize,this.worldSize]),a.scale(X,X,[1,1,a.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=X,this.invProjMatrix=a.invert([],this.projMatrix);var ne=this.width%2/2,ae=this.height%2/2,oe=Math.cos(this.angle),we=Math.sin(this.angle),be=C-Math.round(C)+oe*ne+we*ae,Fe=I-Math.round(I)+oe*ae+we*ne,_e=new Float64Array(X);if(a.translate(_e,_e,[be>.5?be-1:be,Fe>.5?Fe-1:Fe,0]),this.alignedProjMatrix=_e,X=a.create(),a.scale(X,X,[this.width/2,-this.height/2,1]),a.translate(X,X,[1,-1,0]),this.labelPlaneMatrix=X,X=a.create(),a.scale(X,X,[1,-1,1]),a.translate(X,X,[-1,-1,0]),a.scale(X,X,[2/this.width,2/this.height,1]),this.glCoordMatrix=X,this.pixelMatrix=a.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(X=a.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=X,this._posMatrixCache={},this._alignedPosMatrixCache={}}},yi.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var p=this.pointCoordinate(new a.Point(0,0)),v=[p.x*this.worldSize,p.y*this.worldSize,0,1];return a.transformMat4(v,v,this.pixelMatrix)[3]/this.cameraToCenterDistance},yi.prototype.getCameraPoint=function(){var p=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.Point(0,p))},yi.prototype.getCameraQueryGeometry=function(p){var v=this.getCameraPoint();if(p.length===1)return[p[0],v];for(var d=v.x,y=v.y,S=v.x,C=v.y,I=0,O=p;I=3&&!p.some(function(d){return isNaN(d)})){var v=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(p[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+p[2],+p[1]],zoom:+p[0],bearing:v,pitch:+(p[4]||0)}),!0}return!1},Is.prototype._updateHashUnthrottled=function(){var p=a.window.location.href.replace(/(#.+)?$/,this.getHashString());try{a.window.history.replaceState(a.window.history.state,null,p)}catch{}};var Rf={linearity:.3,easing:a.bezier(0,0,.3,1)},Ic=a.extend({deceleration:2500,maxSpeed:1400},Rf),If=a.extend({deceleration:20,maxSpeed:1400},Rf),W1=a.extend({deceleration:1e3,maxSpeed:360},Rf),Sh=a.extend({deceleration:1e3,maxSpeed:90},Rf),Mf=function(p){this._map=p,this.clear()};function Ml(p,v){(!p.duration||p.duration0&&v-p[0].time>160;)p.shift()},Mf.prototype._onMoveEnd=function(p){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var v={zoom:0,bearing:0,pitch:0,pan:new a.Point(0,0),pinchAround:void 0,around:void 0},d=0,y=this._inertiaBuffer;d=this._clickTolerance||this._map.fire(new ma(p.type,this._map,p))},Da.prototype.dblclick=function(p){return this._firePreventable(new ma(p.type,this._map,p))},Da.prototype.mouseover=function(p){this._map.fire(new ma(p.type,this._map,p))},Da.prototype.mouseout=function(p){this._map.fire(new ma(p.type,this._map,p))},Da.prototype.touchstart=function(p){return this._firePreventable(new Mc(p.type,this._map,p))},Da.prototype.touchmove=function(p){this._map.fire(new Mc(p.type,this._map,p))},Da.prototype.touchend=function(p){this._map.fire(new Mc(p.type,this._map,p))},Da.prototype.touchcancel=function(p){this._map.fire(new Mc(p.type,this._map,p))},Da.prototype._firePreventable=function(p){if(this._map.fire(p),p.defaultPrevented)return{}},Da.prototype.isEnabled=function(){return!0},Da.prototype.isActive=function(){return!1},Da.prototype.enable=function(){},Da.prototype.disable=function(){};var Kr=function(p){this._map=p};Kr.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Kr.prototype.mousemove=function(p){this._map.fire(new ma(p.type,this._map,p))},Kr.prototype.mousedown=function(){this._delayContextMenu=!0},Kr.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ma("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Kr.prototype.contextmenu=function(p){this._delayContextMenu?this._contextMenuEvent=p:this._map.fire(new ma(p.type,this._map,p)),this._map.listens("contextmenu")&&p.preventDefault()},Kr.prototype.isEnabled=function(){return!0},Kr.prototype.isActive=function(){return!1},Kr.prototype.enable=function(){},Kr.prototype.disable=function(){};var is=function(p,v){this._map=p,this._el=p.getCanvasContainer(),this._container=p.getContainer(),this._clickTolerance=v.clickTolerance||1};function Pf(p,v){for(var d={},y=0;ythis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=p.timeStamp),d.length===this.numTouches&&(this.centroid=function(y){for(var S=new a.Point(0,0),C=0,I=y;C30)&&(this.aborted=!0)}}},Pc.prototype.touchend=function(p,v,d){if((!this.centroid||p.timeStamp-this.startTime>500)&&(this.aborted=!0),d.length===0){var y=!this.aborted&&this.centroid;if(this.reset(),y)return y}};var Wo=function(p){this.singleTap=new Pc(p),this.numTaps=p.numTaps,this.reset()};Wo.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Wo.prototype.touchstart=function(p,v,d){this.singleTap.touchstart(p,v,d)},Wo.prototype.touchmove=function(p,v,d){this.singleTap.touchmove(p,v,d)},Wo.prototype.touchend=function(p,v,d){var y=this.singleTap.touchend(p,v,d);if(y){var S=p.timeStamp-this.lastTime<500,C=!this.lastTap||this.lastTap.dist(y)<30;if(S&&C||this.reset(),this.count++,this.lastTime=p.timeStamp,this.lastTap=y,this.count===this.numTaps)return this.reset(),y}};var Yi=function(){this._zoomIn=new Wo({numTouches:1,numTaps:2}),this._zoomOut=new Wo({numTouches:2,numTaps:1}),this.reset()};Yi.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Yi.prototype.touchstart=function(p,v,d){this._zoomIn.touchstart(p,v,d),this._zoomOut.touchstart(p,v,d)},Yi.prototype.touchmove=function(p,v,d){this._zoomIn.touchmove(p,v,d),this._zoomOut.touchmove(p,v,d)},Yi.prototype.touchend=function(p,v,d){var y=this,S=this._zoomIn.touchend(p,v,d),C=this._zoomOut.touchend(p,v,d);return S?(this._active=!0,p.preventDefault(),setTimeout(function(){return y.reset()},0),{cameraAnimation:function(I){return I.easeTo({duration:300,zoom:I.getZoom()+1,around:I.unproject(S)},{originalEvent:p})}}):C?(this._active=!0,p.preventDefault(),setTimeout(function(){return y.reset()},0),{cameraAnimation:function(I){return I.easeTo({duration:300,zoom:I.getZoom()-1,around:I.unproject(C)},{originalEvent:p})}}):void 0},Yi.prototype.touchcancel=function(){this.reset()},Yi.prototype.enable=function(){this._enabled=!0},Yi.prototype.disable=function(){this._enabled=!1,this.reset()},Yi.prototype.isEnabled=function(){return this._enabled},Yi.prototype.isActive=function(){return this._active};var Ah={0:1,2:2},Dr=function(p){this.reset(),this._clickTolerance=p.clickTolerance||1};Dr.prototype.blur=function(){this.reset()},Dr.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Dr.prototype._correctButton=function(p,v){return!1},Dr.prototype._move=function(p,v){return{}},Dr.prototype.mousedown=function(p,v){if(!this._lastPoint){var d=c.mouseButton(p);this._correctButton(p,d)&&(this._lastPoint=v,this._eventButton=d)}},Dr.prototype.mousemoveWindow=function(p,v){var d=this._lastPoint;if(d){if(p.preventDefault(),function(y,S){var C=Ah[S];return y.buttons===void 0||(y.buttons&C)!==C}(p,this._eventButton))this.reset();else if(this._moved||!(v.dist(d)0&&(this._active=!0);var y=Pf(d,v),S=new a.Point(0,0),C=new a.Point(0,0),I=0;for(var O in y){var z=y[O],X=this._touches[O];X&&(S._add(z),C._add(z.sub(X)),I++,y[O]=z)}if(this._touches=y,!(IMath.abs(p.x)}var Rh=function(p){function v(){p.apply(this,arguments)}return p&&(v.__proto__=p),(v.prototype=Object.create(p&&p.prototype)).constructor=v,v.prototype.reset=function(){p.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},v.prototype._start=function(d){this._lastPoints=d,Oc(d[0].sub(d[1]))&&(this._valid=!1)},v.prototype._move=function(d,y,S){var C=d[0].sub(this._lastPoints[0]),I=d[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(C,I,S.timeStamp),this._valid)return this._lastPoints=d,this._active=!0,{pitchDelta:(C.y+I.y)/2*-.5}},v.prototype.gestureBeginsVertically=function(d,y,S){if(this._valid!==void 0)return this._valid;var C=d.mag()>=2,I=y.mag()>=2;if(C||I){if(!C||!I)return this._firstMove===void 0&&(this._firstMove=S),S-this._firstMove<100&&void 0;var O=d.y>0==y.y>0;return Oc(d)&&Oc(y)&&O}},v}(gs),jp={panStep:100,bearingStep:15,pitchStep:10},_s=function(){var p=jp;this._panStep=p.panStep,this._bearingStep=p.bearingStep,this._pitchStep=p.pitchStep,this._rotationDisabled=!1};function Ms(p){return p*(2-p)}_s.prototype.blur=function(){this.reset()},_s.prototype.reset=function(){this._active=!1},_s.prototype.keydown=function(p){var v=this;if(!(p.altKey||p.ctrlKey||p.metaKey)){var d=0,y=0,S=0,C=0,I=0;switch(p.keyCode){case 61:case 107:case 171:case 187:d=1;break;case 189:case 109:case 173:d=-1;break;case 37:p.shiftKey?y=-1:(p.preventDefault(),C=-1);break;case 39:p.shiftKey?y=1:(p.preventDefault(),C=1);break;case 38:p.shiftKey?S=1:(p.preventDefault(),I=-1);break;case 40:p.shiftKey?S=-1:(p.preventDefault(),I=1);break;default:return}return this._rotationDisabled&&(y=0,S=0),{cameraAnimation:function(O){var z=O.getZoom();O.easeTo({duration:300,easeId:"keyboardHandler",easing:Ms,zoom:d?Math.round(z)+d*(p.shiftKey?2:1):z,bearing:O.getBearing()+y*v._bearingStep,pitch:O.getPitch()+S*v._pitchStep,offset:[-C*v._panStep,-I*v._panStep],center:O.getCenter()},{originalEvent:p})}}}},_s.prototype.enable=function(){this._enabled=!0},_s.prototype.disable=function(){this._enabled=!1,this.reset()},_s.prototype.isEnabled=function(){return this._enabled},_s.prototype.isActive=function(){return this._active},_s.prototype.disableRotation=function(){this._rotationDisabled=!0},_s.prototype.enableRotation=function(){this._rotationDisabled=!1};var Zn=function(p,v){this._map=p,this._el=p.getCanvasContainer(),this._handler=v,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,a.bindAll(["_onTimeout"],this)};Zn.prototype.setZoomRate=function(p){this._defaultZoomRate=p},Zn.prototype.setWheelZoomRate=function(p){this._wheelZoomRate=p},Zn.prototype.isEnabled=function(){return!!this._enabled},Zn.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Zn.prototype.isZooming=function(){return!!this._zooming},Zn.prototype.enable=function(p){this.isEnabled()||(this._enabled=!0,this._aroundCenter=p&&p.around==="center")},Zn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Zn.prototype.wheel=function(p){if(this.isEnabled()){var v=p.deltaMode===a.window.WheelEvent.DOM_DELTA_LINE?40*p.deltaY:p.deltaY,d=a.browser.now(),y=d-(this._lastWheelEventTime||0);this._lastWheelEventTime=d,v!==0&&v%4.000244140625==0?this._type="wheel":v!==0&&Math.abs(v)<4?this._type="trackpad":y>400?(this._type=null,this._lastValue=v,this._timeout=setTimeout(this._onTimeout,40,p)):this._type||(this._type=Math.abs(y*v)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,v+=this._lastValue)),p.shiftKey&&v&&(v/=4),this._type&&(this._lastWheelEvent=p,this._delta-=v,this._active||this._start(p)),p.preventDefault()}},Zn.prototype._onTimeout=function(p){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(p)},Zn.prototype._start=function(p){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var v=c.mousePos(this._el,p);this._around=a.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(v)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Zn.prototype.renderFrame=function(){var p=this;if(this._frameId&&(this._frameId=null,this.isActive())){var v=this._map.transform;if(this._delta!==0){var d=this._type==="wheel"&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,y=2/(1+Math.exp(-Math.abs(this._delta*d)));this._delta<0&&y!==0&&(y=1/y);var S=typeof this._targetZoom=="number"?v.zoomScale(this._targetZoom):v.scale;this._targetZoom=Math.min(v.maxZoom,Math.max(v.minZoom,v.scaleZoom(S*y))),this._type==="wheel"&&(this._startZoom=v.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var C,I=typeof this._targetZoom=="number"?this._targetZoom:v.zoom,O=this._startZoom,z=this._easing,X=!1;if(this._type==="wheel"&&O&&z){var ne=Math.min((a.browser.now()-this._lastWheelEventTime)/200,1),ae=z(ne);C=a.number(O,I,ae),ne<1?this._frameId||(this._frameId=!0):X=!0}else C=I,X=!0;return this._active=!0,X&&(this._active=!1,this._finishTimeout=setTimeout(function(){p._zooming=!1,p._handler._triggerRenderFrame(),delete p._targetZoom,delete p._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!X,zoomDelta:C-v.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Zn.prototype._smoothOutEasing=function(p){var v=a.ease;if(this._prevEase){var d=this._prevEase,y=(a.browser.now()-d.start)/d.duration,S=d.easing(y+.01)-d.easing(y),C=.27/Math.sqrt(S*S+1e-4)*.01,I=Math.sqrt(.0729-C*C);v=a.bezier(C,I,.25,1)}return this._prevEase={start:a.browser.now(),duration:p,easing:v},v},Zn.prototype.blur=function(){this.reset()},Zn.prototype.reset=function(){this._active=!1};var Ps=function(p,v){this._clickZoom=p,this._tapZoom=v};Ps.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Ps.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Ps.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Ps.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Os=function(){this.reset()};Os.prototype.reset=function(){this._active=!1},Os.prototype.blur=function(){this.reset()},Os.prototype.dblclick=function(p,v){return p.preventDefault(),{cameraAnimation:function(d){d.easeTo({duration:300,zoom:d.getZoom()+(p.shiftKey?-1:1),around:d.unproject(v)},{originalEvent:p})}}},Os.prototype.enable=function(){this._enabled=!0},Os.prototype.disable=function(){this._enabled=!1,this.reset()},Os.prototype.isEnabled=function(){return this._enabled},Os.prototype.isActive=function(){return this._active};var go=function(){this._tap=new Wo({numTouches:1,numTaps:1}),this.reset()};go.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},go.prototype.touchstart=function(p,v,d){this._swipePoint||(this._tapTime&&p.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?d.length>0&&(this._swipePoint=v[0],this._swipeTouch=d[0].identifier):this._tap.touchstart(p,v,d))},go.prototype.touchmove=function(p,v,d){if(this._tapTime){if(this._swipePoint){if(d[0].identifier!==this._swipeTouch)return;var y=v[0],S=y.y-this._swipePoint.y;return this._swipePoint=y,p.preventDefault(),this._active=!0,{zoomDelta:S/128}}}else this._tap.touchmove(p,v,d)},go.prototype.touchend=function(p,v,d){this._tapTime?this._swipePoint&&d.length===0&&this.reset():this._tap.touchend(p,v,d)&&(this._tapTime=p.timeStamp)},go.prototype.touchcancel=function(){this.reset()},go.prototype.enable=function(){this._enabled=!0},go.prototype.disable=function(){this._enabled=!1,this.reset()},go.prototype.isEnabled=function(){return this._enabled},go.prototype.isActive=function(){return this._active};var Pl=function(p,v,d){this._el=p,this._mousePan=v,this._touchPan=d};Pl.prototype.enable=function(p){this._inertiaOptions=p||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Pl.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Pl.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Pl.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Ju=function(p,v,d){this._pitchWithRotate=p.pitchWithRotate,this._mouseRotate=v,this._mousePitch=d};Ju.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Ju.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Ju.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Ju.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Ws=function(p,v,d,y){this._el=p,this._touchZoom=v,this._touchRotate=d,this._tapDragZoom=y,this._rotationDisabled=!1,this._enabled=!0};Ws.prototype.enable=function(p){this._touchZoom.enable(p),this._rotationDisabled||this._touchRotate.enable(p),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Ws.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Ws.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Ws.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Ws.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Ws.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Lo=function(p){return p.zoom||p.drag||p.pitch||p.rotate},kc=function(p){function v(){p.apply(this,arguments)}return p&&(v.__proto__=p),(v.prototype=Object.create(p&&p.prototype)).constructor=v,v}(a.Event);function dn(p){return p.panDelta&&p.panDelta.mag()||p.zoomDelta||p.bearingDelta||p.pitchDelta}var nn=function(p,v){this._map=p,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Mf(p),this._bearingSnap=v.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(v),a.bindAll(["handleEvent","handleWindowEvent"],this);var d=this._el;this._listeners=[[d,"touchstart",{passive:!0}],[d,"touchmove",{passive:!1}],[d,"touchend",void 0],[d,"touchcancel",void 0],[d,"mousedown",void 0],[d,"mousemove",void 0],[d,"mouseup",void 0],[a.window.document,"mousemove",{capture:!0}],[a.window.document,"mouseup",void 0],[d,"mouseover",void 0],[d,"mouseout",void 0],[d,"dblclick",void 0],[d,"click",void 0],[d,"keydown",{capture:!1}],[d,"keyup",void 0],[d,"wheel",{passive:!1}],[d,"contextmenu",void 0],[a.window,"blur",void 0]];for(var y=0,S=this._listeners;yI?Math.min(2,kt):Math.max(.5,kt),vn=Math.pow($r,1-Tr),bn=C.unproject(Ct.add(mt.mult(Tr*vn)).mult(yr));C.setLocationAtPoint(C.renderWorldCopies?bn.wrap():bn,Fe)}S._fireMoveEvents(y)},function(Tr){S._afterEase(y,Tr)},d),this},v.prototype._prepareEase=function(d,y,S){S===void 0&&(S={}),this._moving=!0,y||S.moving||this.fire(new a.Event("movestart",d)),this._zooming&&!S.zooming&&this.fire(new a.Event("zoomstart",d)),this._rotating&&!S.rotating&&this.fire(new a.Event("rotatestart",d)),this._pitching&&!S.pitching&&this.fire(new a.Event("pitchstart",d))},v.prototype._fireMoveEvents=function(d){this.fire(new a.Event("move",d)),this._zooming&&this.fire(new a.Event("zoom",d)),this._rotating&&this.fire(new a.Event("rotate",d)),this._pitching&&this.fire(new a.Event("pitch",d))},v.prototype._afterEase=function(d,y){if(!this._easeId||!y||this._easeId!==y){delete this._easeId;var S=this._zooming,C=this._rotating,I=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,S&&this.fire(new a.Event("zoomend",d)),C&&this.fire(new a.Event("rotateend",d)),I&&this.fire(new a.Event("pitchend",d)),this.fire(new a.Event("moveend",d))}},v.prototype.flyTo=function(d,y){var S=this;if(!d.essential&&a.browser.prefersReducedMotion){var C=a.pick(d,["center","zoom","bearing","pitch","around"]);return this.jumpTo(C,y)}this.stop(),d=a.extend({offset:[0,0],speed:1.2,curve:1.42,easing:a.ease},d);var I=this.transform,O=this.getZoom(),z=this.getBearing(),X=this.getPitch(),ne=this.getPadding(),ae="zoom"in d?a.clamp(+d.zoom,I.minZoom,I.maxZoom):O,oe="bearing"in d?this._normalizeBearing(d.bearing,z):z,we="pitch"in d?+d.pitch:X,be="padding"in d?d.padding:I.padding,Fe=I.zoomScale(ae-O),_e=a.Point.convert(d.offset),De=I.centerPoint.add(_e),Xe=I.pointLocation(De),ot=a.LngLat.convert(d.center||Xe);this._normalizeCenter(ot);var Ct=I.project(Xe),mt=I.project(ot).sub(Ct),kt=d.curve,qt=Math.max(I.width,I.height),Tr=qt/Fe,yr=mt.mag();if("minZoom"in d){var $r=a.clamp(Math.min(d.minZoom,O,ae),I.minZoom,I.maxZoom),vn=qt/I.zoomScale($r-O);kt=Math.sqrt(vn/yr*2)}var bn=kt*kt;function xn(kn){var In=(Tr*Tr-qt*qt+(kn?-1:1)*bn*bn*yr*yr)/(2*(kn?Tr:qt)*bn*yr);return Math.log(Math.sqrt(In*In+1)-In)}function Si(kn){return(Math.exp(kn)-Math.exp(-kn))/2}function Yr(kn){return(Math.exp(kn)+Math.exp(-kn))/2}var Un=xn(0),Kn=function(kn){return Yr(Un)/Yr(Un+kt*kn)},Bn=function(kn){return qt*((Yr(Un)*(Si(In=Un+kt*kn)/Yr(In))-Si(Un))/bn)/yr;var In},On=(xn(1)-Un)/kt;if(Math.abs(yr)<1e-6||!isFinite(On)){if(Math.abs(qt-Tr)<1e-6)return this.easeTo(d,y);var Yn=Trd.maxDuration&&(d.duration=0),this._zooming=!0,this._rotating=z!==oe,this._pitching=we!==X,this._padding=!I.isPaddingEqual(be),this._prepareEase(y,!1),this._ease(function(kn){var In=kn*On,$a=1/Kn(In);I.zoom=kn===1?ae:O+I.scaleZoom($a),S._rotating&&(I.bearing=a.number(z,oe,kn)),S._pitching&&(I.pitch=a.number(X,we,kn)),S._padding&&(I.interpolatePadding(ne,be,kn),De=I.centerPoint.add(_e));var xa=kn===1?ot:I.unproject(Ct.add(mt.mult(Bn(In))).mult($a));I.setLocationAtPoint(I.renderWorldCopies?xa.wrap():xa,De),S._fireMoveEvents(y)},function(){return S._afterEase(y)},d),this},v.prototype.isEasing=function(){return!!this._easeFrameId},v.prototype.stop=function(){return this._stop()},v.prototype._stop=function(d,y){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var S=this._onEaseEnd;delete this._onEaseEnd,S.call(this,y)}if(!d){var C=this.handlers;C&&C.stop(!1)}return this},v.prototype._ease=function(d,y,S){S.animate===!1||S.duration===0?(d(1),y()):(this._easeStart=a.browser.now(),this._easeOptions=S,this._onEaseFrame=d,this._onEaseEnd=y,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},v.prototype._renderFrameCallback=function(){var d=Math.min((a.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(d)),d<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},v.prototype._normalizeBearing=function(d,y){d=a.wrap(d,-180,180);var S=Math.abs(d-y);return Math.abs(d-360-y)180?-360:S<-180?360:0}},v}(a.Evented),No=function(p){p===void 0&&(p={}),this.options=p,a.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};No.prototype.getDefaultPosition=function(){return"bottom-right"},No.prototype.onAdd=function(p){var v=this.options&&this.options.compact;return this._map=p,this._container=c.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=c.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=c.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),v&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),v===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},No.prototype.onRemove=function(){c.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},No.prototype._setElementTitle=function(p,v){var d=this._map._getUIString("AttributionControl."+v);p.title=d,p.setAttribute("aria-label",d)},No.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},No.prototype._updateEditLink=function(){var p=this._editLink;p||(p=this._editLink=this._container.querySelector(".mapbox-improve-map"));var v=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||a.config.ACCESS_TOKEN}];if(p){var d=v.reduce(function(y,S,C){return S.value&&(y+=S.key+"="+S.value+(C=0)return!1;return!0})).join(" | ");I!==this._attribHTML&&(this._attribHTML=I,p.length?(this._innerContainer.innerHTML=I,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},No.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var su=function(){a.bindAll(["_updateLogo"],this),a.bindAll(["_updateCompact"],this)};su.prototype.onAdd=function(p){this._map=p,this._container=c.create("div","mapboxgl-ctrl");var v=c.create("a","mapboxgl-ctrl-logo");return v.target="_blank",v.rel="noopener nofollow",v.href="https://www.mapbox.com/",v.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),v.setAttribute("rel","noopener nofollow"),this._container.appendChild(v),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},su.prototype.onRemove=function(){c.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},su.prototype.getDefaultPosition=function(){return"bottom-left"},su.prototype._updateLogo=function(p){p&&p.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},su.prototype._logoRequired=function(){if(this._map.style){var p=this._map.style.sourceCaches;for(var v in p)if(p[v].getSource().mapbox_logo)return!0;return!1}},su.prototype._updateCompact=function(){var p=this._container.children;if(p.length){var v=p[0];this._map.getCanvasContainer().offsetWidth<250?v.classList.add("mapboxgl-compact"):v.classList.remove("mapboxgl-compact")}};var ga=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};ga.prototype.add=function(p){var v=++this._id;return this._queue.push({callback:p,id:v,cancelled:!1}),v},ga.prototype.remove=function(p){for(var v=this._currentlyRunning,d=0,y=v?this._queue.concat(v):this._queue;dy.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(y.minPitch!=null&&y.maxPitch!=null&&y.minPitch>y.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(y.minPitch!=null&&y.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(y.maxPitch!=null&&y.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var C=new yi(y.minZoom,y.maxZoom,y.minPitch,y.maxPitch,y.renderWorldCopies);if(p.call(this,C,y),this._interactive=y.interactive,this._maxTileCacheSize=y.maxTileCacheSize,this._failIfMajorPerformanceCaveat=y.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=y.preserveDrawingBuffer,this._antialias=y.antialias,this._trackResize=y.trackResize,this._bearingSnap=y.bearingSnap,this._refreshExpiredTiles=y.refreshExpiredTiles,this._fadeDuration=y.fadeDuration,this._crossSourceCollisions=y.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=y.collectResourceTiming,this._renderTaskQueue=new ga,this._controls=[],this._mapId=a.uniqueId(),this._locale=a.extend({},Xs,y.locale),this._clickTolerance=y.clickTolerance,this._requestManager=new a.RequestManager(y.transformRequest,y.accessToken),typeof y.container=="string"){if(this._container=a.window.document.getElementById(y.container),!this._container)throw new Error("Container '"+y.container+"' not found.")}else{if(!(y.container instanceof ic))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=y.container}if(y.maxBounds&&this.setMaxBounds(y.maxBounds),a.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return S._update(!1)}),this.on("moveend",function(){return S._update(!1)}),this.on("zoom",function(){return S._update(!0)}),a.window!==void 0&&(a.window.addEventListener("online",this._onWindowOnline,!1),a.window.addEventListener("resize",this._onWindowResize,!1),a.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new nn(this,y),this._hash=y.hash&&new Is(typeof y.hash=="string"&&y.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:y.center,zoom:y.zoom,bearing:y.bearing,pitch:y.pitch}),y.bounds&&(this.resize(),this.fitBounds(y.bounds,a.extend({},y.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=y.localIdeographFontFamily,y.style&&this.setStyle(y.style,{localIdeographFontFamily:y.localIdeographFontFamily}),y.attributionControl&&this.addControl(new No({customAttribution:y.customAttribution})),this.addControl(new su,y.logoPosition),this.on("style.load",function(){S.transform.unmodified&&S.jumpTo(S.style.stylesheet)}),this.on("data",function(I){S._update(I.dataType==="style"),S.fire(new a.Event(I.dataType+"data",I))}),this.on("dataloading",function(I){S.fire(new a.Event(I.dataType+"dataloading",I))})}p&&(v.__proto__=p),(v.prototype=Object.create(p&&p.prototype)).constructor=v;var d={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return v.prototype._getMapId=function(){return this._mapId},v.prototype.addControl=function(y,S){if(S===void 0&&(S=y.getDefaultPosition?y.getDefaultPosition():"top-right"),!y||!y.onAdd)return this.fire(new a.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var C=y.onAdd(this);this._controls.push(y);var I=this._controlPositions[S];return S.indexOf("bottom")!==-1?I.insertBefore(C,I.firstChild):I.appendChild(C),this},v.prototype.removeControl=function(y){if(!y||!y.onRemove)return this.fire(new a.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var S=this._controls.indexOf(y);return S>-1&&this._controls.splice(S,1),y.onRemove(this),this},v.prototype.hasControl=function(y){return this._controls.indexOf(y)>-1},v.prototype.resize=function(y){var S=this._containerDimensions(),C=S[0],I=S[1];if(C===this.transform.width&&I===this.transform.height)return this;this._resizeCanvas(C,I),this.transform.resize(C,I),this.painter.resize(C,I);var O=!this._moving;return O&&this.fire(new a.Event("movestart",y)).fire(new a.Event("move",y)),this.fire(new a.Event("resize",y)),O&&this.fire(new a.Event("moveend",y)),this},v.prototype.getBounds=function(){return this.transform.getBounds()},v.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},v.prototype.setMaxBounds=function(y){return this.transform.setMaxBounds(a.LngLatBounds.convert(y)),this._update()},v.prototype.setMinZoom=function(y){if((y=y??-2)>=-2&&y<=this.transform.maxZoom)return this.transform.minZoom=y,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=y,this._update(),this.getZoom()>y&&this.setZoom(y),this;throw new Error("maxZoom must be greater than the current minZoom")},v.prototype.getMaxZoom=function(){return this.transform.maxZoom},v.prototype.setMinPitch=function(y){if((y=y??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(y>=0&&y<=this.transform.maxPitch)return this.transform.minPitch=y,this._update(),this.getPitch()60)throw new Error("maxPitch must be less than or equal to 60");if(y>=this.transform.minPitch)return this.transform.maxPitch=y,this._update(),this.getPitch()>y&&this.setPitch(y),this;throw new Error("maxPitch must be greater than the current minPitch")},v.prototype.getMaxPitch=function(){return this.transform.maxPitch},v.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},v.prototype.setRenderWorldCopies=function(y){return this.transform.renderWorldCopies=y,this._update()},v.prototype.project=function(y){return this.transform.locationPoint(a.LngLat.convert(y))},v.prototype.unproject=function(y){return this.transform.pointLocation(a.Point.convert(y))},v.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},v.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},v.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},v.prototype._createDelegatedListener=function(y,S,C){var I,O=this;if(y==="mouseenter"||y==="mouseover"){var z=!1;return{layer:S,listener:C,delegates:{mousemove:function(ne){var ae=O.getLayer(S)?O.queryRenderedFeatures(ne.point,{layers:[S]}):[];ae.length?z||(z=!0,C.call(O,new ma(y,O,ne.originalEvent,{features:ae}))):z=!1},mouseout:function(){z=!1}}}}if(y==="mouseleave"||y==="mouseout"){var X=!1;return{layer:S,listener:C,delegates:{mousemove:function(ne){(O.getLayer(S)?O.queryRenderedFeatures(ne.point,{layers:[S]}):[]).length?X=!0:X&&(X=!1,C.call(O,new ma(y,O,ne.originalEvent)))},mouseout:function(ne){X&&(X=!1,C.call(O,new ma(y,O,ne.originalEvent)))}}}}return{layer:S,listener:C,delegates:(I={},I[y]=function(ne){var ae=O.getLayer(S)?O.queryRenderedFeatures(ne.point,{layers:[S]}):[];ae.length&&(ne.features=ae,C.call(O,ne),delete ne.features)},I)}},v.prototype.on=function(y,S,C){if(C===void 0)return p.prototype.on.call(this,y,S);var I=this._createDelegatedListener(y,S,C);for(var O in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[y]=this._delegatedListeners[y]||[],this._delegatedListeners[y].push(I),I.delegates)this.on(O,I.delegates[O]);return this},v.prototype.once=function(y,S,C){if(C===void 0)return p.prototype.once.call(this,y,S);var I=this._createDelegatedListener(y,S,C);for(var O in I.delegates)this.once(O,I.delegates[O]);return this},v.prototype.off=function(y,S,C){var I=this;return C===void 0?p.prototype.off.call(this,y,S):(this._delegatedListeners&&this._delegatedListeners[y]&&function(O){for(var z=O[y],X=0;X180;){var I=d.locationPoint(p);if(I.x>=0&&I.y>=0&&I.x<=d.width&&I.y<=d.height)break;p.lng>d.center.lng?p.lng-=360:p.lng+=360}return p}xs.prototype.down=function(p,v){this.mouseRotate.mousedown(p,v),this.mousePitch&&this.mousePitch.mousedown(p,v),c.disableDrag()},xs.prototype.move=function(p,v){var d=this.map,y=this.mouseRotate.mousemoveWindow(p,v);if(y&&y.bearingDelta&&d.setBearing(d.getBearing()+y.bearingDelta),this.mousePitch){var S=this.mousePitch.mousemoveWindow(p,v);S&&S.pitchDelta&&d.setPitch(d.getPitch()+S.pitchDelta)}},xs.prototype.off=function(){var p=this.element;c.removeEventListener(p,"mousedown",this.mousedown),c.removeEventListener(p,"touchstart",this.touchstart,{passive:!1}),c.removeEventListener(p,"touchmove",this.touchmove),c.removeEventListener(p,"touchend",this.touchend),c.removeEventListener(p,"touchcancel",this.reset),this.offTemp()},xs.prototype.offTemp=function(){c.enableDrag(),c.removeEventListener(a.window,"mousemove",this.mousemove),c.removeEventListener(a.window,"mouseup",this.mouseup)},xs.prototype.mousedown=function(p){this.down(a.extend({},p,{ctrlKey:!0,preventDefault:function(){return p.preventDefault()}}),c.mousePos(this.element,p)),c.addEventListener(a.window,"mousemove",this.mousemove),c.addEventListener(a.window,"mouseup",this.mouseup)},xs.prototype.mousemove=function(p){this.move(p,c.mousePos(this.element,p))},xs.prototype.mouseup=function(p){this.mouseRotate.mouseupWindow(p),this.mousePitch&&this.mousePitch.mouseupWindow(p),this.offTemp()},xs.prototype.touchstart=function(p){p.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=c.touchPos(this.element,p.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return p.preventDefault()}},this._startPos))},xs.prototype.touchmove=function(p){p.targetTouches.length!==1?this.reset():(this._lastPos=c.touchPos(this.element,p.targetTouches)[0],this.move({preventDefault:function(){return p.preventDefault()}},this._lastPos))},xs.prototype.touchend=function(p){p.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)=y}this._isDragging&&(this._pos=d.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 a.Event("dragstart"))),this.fire(new a.Event("drag")))},v.prototype._onUp=function(){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 a.Event("dragend")),this._state="inactive"},v.prototype._addDragHandler=function(d){this._element.contains(d.originalEvent.target)&&(d.preventDefault(),this._positionDelta=d.point.sub(this._pos).add(this._offset),this._pointerdownPos=d.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))},v.prototype.setDraggable=function(d){return this._draggable=!!d,this._map&&(d?(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},v.prototype.isDraggable=function(){return this._draggable},v.prototype.setRotation=function(d){return this._rotation=d||0,this._update(),this},v.prototype.getRotation=function(){return this._rotation},v.prototype.setRotationAlignment=function(d){return this._rotationAlignment=d||"auto",this._update(),this},v.prototype.getRotationAlignment=function(){return this._rotationAlignment},v.prototype.setPitchAlignment=function(d){return this._pitchAlignment=d&&d!=="auto"?d:this._rotationAlignment,this._update(),this},v.prototype.getPitchAlignment=function(){return this._pitchAlignment},v}(a.Evented),Ph={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ac=0,oc=!1,Gp=function(p){function v(d){p.call(this),this.options=a.extend({},Ph,d),a.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return p&&(v.__proto__=p),(v.prototype=Object.create(p&&p.prototype)).constructor=v,v.prototype.onAdd=function(d){var y;return this._map=d,this._container=c.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),y=this._setupUI,Fc!==void 0?y(Fc):a.window.navigator.permissions!==void 0?a.window.navigator.permissions.query({name:"geolocation"}).then(function(S){y(Fc=S.state!=="denied")}):y(Fc=!!a.window.navigator.geolocation),this._container},v.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(a.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(),c.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ac=0,oc=!1},v.prototype._isOutOfMapMaxBounds=function(d){var y=this._map.getMaxBounds(),S=d.coords;return y&&(S.longitudey.getEast()||S.latitudey.getNorth())},v.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},v.prototype._onSuccess=function(d){if(this._map){if(this._isOutOfMapMaxBounds(d))return this._setErrorState(),this.fire(new a.Event("outofmaxbounds",d)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=d,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(d),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(d),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new a.Event("geolocate",d)),this._finish()}},v.prototype._updateCamera=function(d){var y=new a.LngLat(d.coords.longitude,d.coords.latitude),S=d.coords.accuracy,C=this._map.getBearing(),I=a.extend({bearing:C},this.options.fitBoundsOptions);this._map.fitBounds(y.toBounds(S),I,{geolocateSource:!0})},v.prototype._updateMarker=function(d){if(d){var y=new a.LngLat(d.coords.longitude,d.coords.latitude);this._accuracyCircleMarker.setLngLat(y).addTo(this._map),this._userLocationDotMarker.setLngLat(y).addTo(this._map),this._accuracy=d.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},v.prototype._updateCircleRadius=function(){var d=this._map._container.clientHeight/2,y=this._map.unproject([0,d]),S=this._map.unproject([1,d]),C=y.distanceTo(S),I=Math.ceil(2*this._accuracy/C);this._circleElement.style.width=I+"px",this._circleElement.style.height=I+"px"},v.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},v.prototype._onError=function(d){if(this._map){if(this.options.trackUserLocation)if(d.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var y=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=y,this._geolocateButton.setAttribute("aria-label",y),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(d.code===3&&oc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new a.Event("error",d)),this._finish()}},v.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},v.prototype._setupUI=function(d){var y=this;if(this._container.addEventListener("contextmenu",function(I){return I.preventDefault()}),this._geolocateButton=c.create("button","mapboxgl-ctrl-geolocate",this._container),c.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",d===!1){a.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var S=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=S,this._geolocateButton.setAttribute("aria-label",S)}else{var C=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=C,this._geolocateButton.setAttribute("aria-label",C)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=c.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new kf(this._dotElement),this._circleElement=c.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new kf({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(I){I.geolocateSource||y._watchState!=="ACTIVE_LOCK"||I.originalEvent&&I.originalEvent.type==="resize"||(y._watchState="BACKGROUND",y._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),y._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),y.fire(new a.Event("trackuserlocationend")))})},v.prototype.trigger=function(){if(!this._setup)return a.warnOnce("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 a.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ac--,oc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new a.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new a.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var d;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++ac>1?(d={maximumAge:6e5,timeout:0},oc=!0):(d=this.options.positionOptions,oc=!1),this._geolocationWatchID=a.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,d)}}else a.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},v.prototype._clearWatch=function(){a.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},v}(a.Evented),Cu={maxWidth:100,unit:"metric"},uu=function(p){this.options=a.extend({},Cu,p),a.bindAll(["_onMove","setUnit"],this)};function Oh(p,v,d){var y=d&&d.maxWidth||100,S=p._container.clientHeight/2,C=p.unproject([0,S]),I=p.unproject([y,S]),O=C.distanceTo(I);if(d&&d.unit==="imperial"){var z=3.2808*O;z>5280?kl(v,y,z/5280,p._getUIString("ScaleControl.Miles")):kl(v,y,z,p._getUIString("ScaleControl.Feet"))}else d&&d.unit==="nautical"?kl(v,y,O/1852,p._getUIString("ScaleControl.NauticalMiles")):O>=1e3?kl(v,y,O/1e3,p._getUIString("ScaleControl.Kilometers")):kl(v,y,O,p._getUIString("ScaleControl.Meters"))}function kl(p,v,d,y){var S,C,I,O=(S=d,(C=Math.pow(10,(""+Math.floor(S)).length-1))*(I=(I=S/C)>=10?10:I>=5?5:I>=3?3:I>=2?2:I>=1?1:function(z){var X=Math.pow(10,Math.ceil(-Math.log(z)/Math.LN10));return Math.round(z*X)/X}(I)));p.style.width=v*(O/d)+"px",p.innerHTML=O+" "+y}uu.prototype.getDefaultPosition=function(){return"bottom-left"},uu.prototype._onMove=function(){Oh(this._map,this._container,this.options)},uu.prototype.onAdd=function(p){return this._map=p,this._container=c.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",p.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},uu.prototype.onRemove=function(){c.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},uu.prototype.setUnit=function(p){this.options.unit=p,Oh(this._map,this._container,this.options)};var Ys=function(p){this._fullscreen=!1,p&&p.container&&(p.container instanceof a.window.HTMLElement?this._container=p.container:a.warnOnce("Full screen control 'container' must be a DOM element.")),a.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in a.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in a.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in a.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in a.window.document&&(this._fullscreenchange="MSFullscreenChange")};Ys.prototype.onAdd=function(p){return this._map=p,this._container||(this._container=this._map.getContainer()),this._controlContainer=c.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",a.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Ys.prototype.onRemove=function(){c.remove(this._controlContainer),this._map=null,a.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Ys.prototype._checkFullscreenSupport=function(){return!!(a.window.document.fullscreenEnabled||a.window.document.mozFullScreenEnabled||a.window.document.msFullscreenEnabled||a.window.document.webkitFullscreenEnabled)},Ys.prototype._setupUI=function(){var p=this._fullscreenButton=c.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);c.create("span","mapboxgl-ctrl-icon",p).setAttribute("aria-hidden",!0),p.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),a.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Ys.prototype._updateTitle=function(){var p=this._getTitle();this._fullscreenButton.setAttribute("aria-label",p),this._fullscreenButton.title=p},Ys.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Ys.prototype._isFullscreen=function(){return this._fullscreen},Ys.prototype._changeIcon=function(){(a.window.document.fullscreenElement||a.window.document.mozFullScreenElement||a.window.document.webkitFullscreenElement||a.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Ys.prototype._onClickFullscreen=function(){this._isFullscreen()?a.window.document.exitFullscreen?a.window.document.exitFullscreen():a.window.document.mozCancelFullScreen?a.window.document.mozCancelFullScreen():a.window.document.msExitFullscreen?a.window.document.msExitFullscreen():a.window.document.webkitCancelFullScreen&&a.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Wp={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Df=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),kh=function(p){function v(d){p.call(this),this.options=a.extend(Object.create(Wp),d),a.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return p&&(v.__proto__=p),(v.prototype=Object.create(p&&p.prototype)).constructor=v,v.prototype.addTo=function(d){return this._map&&this.remove(),this._map=d,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("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new a.Event("open")),this},v.prototype.isOpen=function(){return!!this._map},v.prototype.remove=function(){return this._content&&c.remove(this._content),this._container&&(c.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),delete this._map),this.fire(new a.Event("close")),this},v.prototype.getLngLat=function(){return this._lngLat},v.prototype.setLngLat=function(d){return this._lngLat=a.LngLat.convert(d),this._pos=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("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},v.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=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("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},v.prototype.getElement=function(){return this._container},v.prototype.setText=function(d){return this.setDOMContent(a.window.document.createTextNode(d))},v.prototype.setHTML=function(d){var y,S=a.window.document.createDocumentFragment(),C=a.window.document.createElement("body");for(C.innerHTML=d;y=C.firstChild;)S.appendChild(y);return this.setDOMContent(S)},v.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},v.prototype.setMaxWidth=function(d){return this.options.maxWidth=d,this._update(),this},v.prototype.setDOMContent=function(d){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=c.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(d),this._createCloseButton(),this._update(),this._focusFirstElement(),this},v.prototype.addClassName=function(d){this._container&&this._container.classList.add(d)},v.prototype.removeClassName=function(d){this._container&&this._container.classList.remove(d)},v.prototype.setOffset=function(d){return this.options.offset=d,this._update(),this},v.prototype.toggleClassName=function(d){if(this._container)return this._container.classList.toggle(d)},v.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=c.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},v.prototype._onMouseUp=function(d){this._update(d.point)},v.prototype._onMouseMove=function(d){this._update(d.point)},v.prototype._onDrag=function(d){this._update(d.point)},v.prototype._update=function(d){var y=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=c.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=c.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(ae){return y._container.classList.add(ae)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Dc(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||d)){var S=this._pos=this._trackPointer&&d?d:this._map.project(this._lngLat),C=this.options.anchor,I=function ae(oe){if(oe){if(typeof oe=="number"){var we=Math.round(Math.sqrt(.5*Math.pow(oe,2)));return{center:new a.Point(0,0),top:new a.Point(0,oe),"top-left":new a.Point(we,we),"top-right":new a.Point(-we,we),bottom:new a.Point(0,-oe),"bottom-left":new a.Point(we,-we),"bottom-right":new a.Point(-we,-we),left:new a.Point(oe,0),right:new a.Point(-oe,0)}}if(oe instanceof a.Point||Array.isArray(oe)){var be=a.Point.convert(oe);return{center:be,top:be,"top-left":be,"top-right":be,bottom:be,"bottom-left":be,"bottom-right":be,left:be,right:be}}return{center:a.Point.convert(oe.center||[0,0]),top:a.Point.convert(oe.top||[0,0]),"top-left":a.Point.convert(oe["top-left"]||[0,0]),"top-right":a.Point.convert(oe["top-right"]||[0,0]),bottom:a.Point.convert(oe.bottom||[0,0]),"bottom-left":a.Point.convert(oe["bottom-left"]||[0,0]),"bottom-right":a.Point.convert(oe["bottom-right"]||[0,0]),left:a.Point.convert(oe.left||[0,0]),right:a.Point.convert(oe.right||[0,0])}}return ae(new a.Point(0,0))}(this.options.offset);if(!C){var O,z=this._container.offsetWidth,X=this._container.offsetHeight;O=S.y+I.bottom.ythis._map.transform.height-X?["bottom"]:[],S.xthis._map.transform.width-z/2&&O.push("right"),C=O.length===0?"bottom":O.join("-")}var ne=S.add(I[C]).round();c.setTransform(this._container,wu[C]+" translate("+ne.x+"px,"+ne.y+"px)"),Mh(this._container,C,"popup")}},v.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var d=this._container.querySelector(Df);d&&d.focus()}},v.prototype._onClose=function(){this.remove()},v}(a.Evented),Dh={version:a.version,supported:u,setRTLTextPlugin:a.setRTLTextPlugin,getRTLTextPluginStatus:a.getRTLTextPluginStatus,Map:Hp,NavigationControl:tl,GeolocateControl:Gp,AttributionControl:No,ScaleControl:uu,FullscreenControl:Ys,Popup:kh,Marker:kf,Style:ms,LngLat:a.LngLat,LngLatBounds:a.LngLatBounds,Point:a.Point,MercatorCoordinate:a.MercatorCoordinate,Evented:a.Evented,config:a.config,prewarm:function(){Dt().acquire(Ot)},clearPrewarmedResources:function(){var p=tn;p&&(p.isPreloaded()&&p.numActive()===1?(p.release(Ot),tn=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()"))},get accessToken(){return a.config.ACCESS_TOKEN},set accessToken(p){a.config.ACCESS_TOKEN=p},get baseApiUrl(){return a.config.API_URL},set baseApiUrl(p){a.config.API_URL=p},get workerCount(){return ar.workerCount},set workerCount(p){ar.workerCount=p},get maxParallelImageRequests(){return a.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(p){a.config.MAX_PARALLEL_IMAGE_REQUESTS=p},clearStorage:function(p){a.clearTileCache(p)},workerUrl:""};return Dh}),i})})(kO);var ame=kO.exports;const qv=oa(ame);var ome=function(){function e(){Ht(this,e)}return jt(e,[{key:"syncWithMapCamera",value:function(r){var n=r.center,i=r.zoom,o=r.pitch,a=r.bearing,u=r.viewportHeight,c=r.viewportWidth;this.viewport=new OO({width:c,height:u,longitude:n&&n[0],latitude:n&&n[1],zoom:i,pitch:o,bearing:a})}},{key:"getZoom",value:function(){return this.viewport.zoom}},{key:"getZoomScale",value:function(){return Math.pow(2,this.getZoom())}},{key:"getCenter",value:function(){return[this.viewport.longitude,this.viewport.latitude]}},{key:"getProjectionMatrix",value:function(){return this.viewport.projectionMatrix}},{key:"getModelMatrix",value:function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}},{key:"getViewMatrix",value:function(){return this.viewport.viewMatrix}},{key:"getViewMatrixUncentered",value:function(){return this.viewport.viewMatrixUncentered}},{key:"getViewProjectionMatrix",value:function(){return this.viewport.viewProjectionMatrix}},{key:"getViewProjectionMatrixUncentered",value:function(){return this.viewport.viewProjectionMatrix}},{key:"getFocalDistance",value:function(){return 1}},{key:"projectFlat",value:function(r,n){return this.viewport.projectFlat(r,n)}}]),e}(),sme=["id","attributionControl","style","token","rotation","mapInstance"],x9,b9;function ume(e){var t=lme();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function lme(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cme(e,t){var r=typeof my<"u"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,n=typeof wx<"u"&&wx!==null&&(typeof wx.request<"u"||typeof wx.miniProgram<"u");if(!(r||n)&&(t||(t=document),!!t)){var i=t.head||t.getElementsByTagName("head")[0];if(!i){i=t.createElement("head");var o=t.body||t.getElementsByTagName("body")[0];o?o.parentNode.insertBefore(i,o):t.documentElement.appendChild(i)}var a=t.createElement("style");return a.type="text/css",a.styleSheet?a.styleSheet.cssText=e:a.appendChild(t.createTextNode(e)),i.appendChild(a),a}}cme(`.mapboxgl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mapboxgl-canvas{position:absolute;left:0;top:0}.mapboxgl-map:-webkit-full-screen{width:100%;height:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass{cursor:-webkit-grab;cursor:grab;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer{cursor:pointer}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active{cursor:-webkit-grabbing;cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{-ms-touch-action:pinch-zoom;touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{-ms-touch-action:none;touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{position:absolute;pointer-events:none;z-index:2}.mapboxgl-ctrl-top-left{top:0;left:0}.mapboxgl-ctrl-top-right{top:0;right:0}.mapboxgl-ctrl-bottom-left{bottom:0;left:0}.mapboxgl-ctrl-bottom-right{right:0;bottom:0}.mapboxgl-ctrl{clear:both;pointer-events:auto;-webkit-transform:translate(0);transform:translate(0)}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{margin:10px 0 0 10px;float:left}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{margin:10px 10px 0 0;float:right}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{margin:0 0 10px 10px;float:left}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{margin:0 10px 10px 0;float:right}.mapboxgl-ctrl-group{border-radius:4px;background:#fff}.mapboxgl-ctrl-group:not(:empty){-webkit-box-shadow:0 0 2px rgba(0,0,0,.1);box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (-ms-high-contrast:active){.mapboxgl-ctrl-group:not(:empty){-webkit-box-shadow:0 0 0 2px ButtonText;box-shadow:0 0 0 2px ButtonText}}.mapboxgl-ctrl-group button{width:29px;height:29px;display:block;padding:0;outline:none;border:0;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:transparent;cursor:pointer}.mapboxgl-ctrl-group button+button{border-top:1px solid #ddd}.mapboxgl-ctrl button .mapboxgl-ctrl-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50%}@media (-ms-high-contrast:active){.mapboxgl-ctrl-icon{background-color:transparent}.mapboxgl-ctrl-group button+button{border-top:1px solid ButtonText}}.mapboxgl-ctrl button::-moz-focus-inner{border:0;padding:0}.mapboxgl-ctrl-attrib-button:focus,.mapboxgl-ctrl-group button:focus{-webkit-box-shadow:0 0 2px 2px #0096ff;box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl button:disabled{cursor:not-allowed}.mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon{opacity:.25}.mapboxgl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-group button:focus:focus-visible{-webkit-box-shadow:0 0 2px 2px #0096ff;box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl-group button:focus:not(:focus-visible){-webkit-box-shadow:none;box-shadow:none}.mapboxgl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.mapboxgl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.mapboxgl-ctrl-group button:focus:only-child{border-radius:inherit}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23999'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23aaa'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting .mapboxgl-ctrl-icon{-webkit-animation:mapboxgl-spin 2s linear infinite;animation:mapboxgl-spin 2s linear infinite}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23999'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23666'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E")}}@-webkit-keyframes mapboxgl-spin{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes mapboxgl-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}a.mapboxgl-ctrl-logo{width:88px;height:23px;margin:0 0 -4px -4px;display:block;background-repeat:no-repeat;cursor:pointer;overflow:hidden;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg opacity='.3' stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cg opacity='.9' fill='%23fff'%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/g%3E%3C/svg%3E")}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:23px}@media (-ms-high-contrast:active){a.mapboxgl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/g%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){a.mapboxgl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg stroke='%23fff' stroke-width='3' fill='%23fff'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/svg%3E")}}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{padding:0 5px;background-color:hsla(0,0%,100%,.5);margin:0}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{min-height:20px;padding:2px 24px 2px 0;margin:10px;position:relative;background-color:#fff;border-radius:12px}.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 8px 2px 28px;border-radius:12px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib-button{display:none;cursor:pointer;position:absolute;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E");background-color:hsla(0,0%,100%,.5);width:24px;height:24px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:12px;outline:none;top:0;right:0;border:0}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-top-left .mapboxgl-ctrl-attrib-button{left:0}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner,.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;right:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;left:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' fill='%23fff'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E")}}@media screen and (-ms-high-contrast:black-on-white){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E")}}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:hsla(0,0%,100%,.75);font-size:10px;border:2px solid #333;border-top:#333;padding:0 5px;color:#333;-webkit-box-sizing:border-box;box-sizing:border-box}.mapboxgl-popup{position:absolute;top:0;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;will-change:transform;pointer-events:none}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.mapboxgl-popup-anchor-left{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.mapboxgl-popup-anchor-right{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.mapboxgl-popup-tip{width:0;height:0;border:10px solid transparent;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-top:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-right:none;border-left-color:#fff}.mapboxgl-popup-close-button{position:absolute;right:0;top:0;border:0;border-radius:0 3px 0 0;cursor:pointer;background-color:transparent}.mapboxgl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-popup-content{position:relative;background:#fff;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-popup-track-pointer{display:none}.mapboxgl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mapboxgl-map:hover .mapboxgl-popup-track-pointer{display:-webkit-box;display:-ms-flexbox;display:flex}.mapboxgl-map:active .mapboxgl-popup-track-pointer{display:none}.mapboxgl-marker{position:absolute;top:0;left:0;will-change:transform}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.mapboxgl-user-location-dot:before{content:"";position:absolute;-webkit-animation:mapboxgl-user-location-dot-pulse 2s infinite;animation:mapboxgl-user-location-dot-pulse 2s infinite}.mapboxgl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 0 3px rgba(0,0,0,.35);box-shadow:0 0 3px rgba(0,0,0,.35)}@-webkit-keyframes mapboxgl-user-location-dot-pulse{0%{-webkit-transform:scale(1);opacity:1}70%{-webkit-transform:scale(3);opacity:0}to{-webkit-transform:scale(1);opacity:0}}@keyframes mapboxgl-user-location-dot-pulse{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}70%{-webkit-transform:scale(3);transform:scale(3);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:0}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-user-location-accuracy-circle{background-color:rgba(29,161,242,.2);width:1px;height:1px;border-radius:100%}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}@media print{.mapbox-improve-map{display:none}}`);window.mapboxgl=qv;var fme=0,E9="101MlGsZ2AmmA&access_token=pk.eyJ1IjoiZXhhbXBsZXMiLCJhIjoiY2p0MG01MXRqMW45cjQzb2R6b2ptc3J4MSJ9.zA2W0IkI0c6KaAhJfk9bWg",hme=(x9=ai(),x9(b9=function(e){_n(r,e);var t=ume(r);function r(){var n;Ht(this,r);for(var i=arguments.length,o=new Array(i),a=0;a1&&arguments[1]!==void 0?arguments[1]:{x:0,y:0,z:0},a=this.lngLatToMercator(i,0),u=a.x,c=a.y;return[u-o.x,c-o.y]}},{key:"lngLatToMercator",value:function(i,o){var a=window.mapboxgl.MercatorCoordinate.fromLngLat(i,o),u=a.x,c=u===void 0?0:u,f=a.y,m=f===void 0?0:f,_=a.z,b=_===void 0?0:_;return{x:c,y:m,z:b}}},{key:"getModelMatrix",value:function(i,o,a){var u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[1,1,1],c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{x:0,y:0,z:0},f=window.mapboxgl.MercatorCoordinate.fromLngLat(i,o),m=f.meterInMercatorCoordinateUnits(),_=v1();return Em(_,_,Gl(f.x-c.x,f.y-c.y,f.z||0-c.z)),Sm(_,_,Gl(m*u[0],-m*u[1],m*u[2])),sy(_,_,a[0]),j5(_,_,a[1]),H5(_,_,a[2]),_}},{key:"init",value:function(){var n=Mt(he.mark(function o(){var a=this,u,c,f,m,_,b,A,w,R,P,k,L,B;return he.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:u=this.config,c=u.id,f=c===void 0?"map":c,m=u.attributionControl,_=m===void 0?!1:m,b=u.style,A=b===void 0?"light":b,w=u.token,R=w===void 0?E9:w,P=u.rotation,k=P===void 0?0:P,L=u.mapInstance,B=hl(u,sme),this.viewport=new ome,!L&&!window.mapboxgl&&console.error(this.configService.getSceneWarninfo("SDK")),R===E9&&A!=="blank"&&!window.mapboxgl.accessToken&&!L&&console.warn(this.configService.getSceneWarninfo("MapToken")),!L&&!window.mapboxgl.accessToken&&(window.mapboxgl.accessToken=R),L?(this.map=L,this.$mapContainer=this.map.getContainer()):(this.$mapContainer=this.creatMapContainer(f),this.map=new window.mapboxgl.Map(Qe({container:this.$mapContainer,style:this.getMapStyleValue(A),attributionControl:_,bearing:k},B))),this.map.on("load",function(){a.handleCameraChanged()}),this.map.on("move",this.handleCameraChanged),this.handleCameraChanged();case 9:case"end":return G.stop()}},o,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"destroy",value:function(){var i;(i=this.$mapContainer)===null||i===void 0||(i=i.parentNode)===null||i===void 0||i.removeChild(this.$mapContainer),this.eventEmitter.removeAllListeners(),this.map&&(this.map.remove(),this.$mapContainer=null)}},{key:"emit",value:function(i){for(var o,a=arguments.length,u=new Array(a>1?a-1:0),c=1;c1?a-1:0),c=1;c"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vme(e,t){var r=typeof my<"u"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,n=typeof wx<"u"&&wx!==null&&(typeof wx.request<"u"||typeof wx.miniProgram<"u");if(!(r||n)&&(t||(t=document),!!t)){var i=t.head||t.getElementsByTagName("head")[0];if(!i){i=t.createElement("head");var o=t.body||t.getElementsByTagName("body")[0];o?o.parentNode.insertBefore(i,o):t.documentElement.appendChild(i)}var a=t.createElement("style");return a.type="text/css",a.styleSheet?a.styleSheet.cssText=e:a.appendChild(t.createTextNode(e)),i.appendChild(a),a}}vme(`.mapboxgl-ctrl-logo { display: none !important; } `);var mme=function(e){_n(r,e);var t=pme(r);function r(){return Ht(this,r),t.apply(this,arguments)}return jt(r,[{key:"getServiceConstructor",value:function(){return hme}}]),r}(Wve),gme=function(e){return e==null};const Xl=gme;var _me={}.toString,yme=function(e,t){return _me.call(e)==="[object "+t+"]"},xme=function(e,t,r){return er?r:e};const bme=xme;var jd=function(e){return yme(e,"Number")},Lx=function(e,t){return Lx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Lx(e,t)};function to(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Lx(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Ka=function(){return Ka=Object.assign||function(t){for(var r,n=1,i=arguments.length;n0&&o[o.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function af(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function Pv(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n>>8&255}function _f(e){return e>>>16&255}function g0(e){return e&255}function BO(e){switch(e){case Kt.F32:case Kt.U32:case Kt.S32:return 4;case Kt.U16:case Kt.S16:case Kt.F16:return 2;case Kt.U8:case Kt.S8:return 1;default:throw new Error("whoops")}}function LO(e){return BO(_f(e))}function Ame(e){var t=BO(_f(e)),r=bb(e);return t*r}function NO(e){var t=g0(e);if(t&Wr.Depth)return Qa.Depth;if(t&Wr.Normalized)return Qa.Float;var r=_f(e);if(r===Kt.F16||r===Kt.F32)return Qa.Float;if(r===Kt.U8||r===Kt.U16||r===Kt.U32)return Qa.Uint;if(r===Kt.S8||r===Kt.S16||r===Kt.S32)return Qa.Sint;throw new Error("whoops")}function ii(e,t){if(t===void 0&&(t=""),!e)throw new Error("Assert fail: ".concat(t))}function g1(e){if(e!=null)return e;throw new Error("Missing object")}function UO(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}function zO(e,t){e.r=t.r,e.g=t.g,e.b=t.b,e.a=t.a}function $O(e){var t=e.r,r=e.g,n=e.b,i=e.a;return{r:t,g:r,b:n,a:i}}function Jm(e,t,r,n){return n===void 0&&(n=1),{r:e,g:t,b:r,a:n}}var xy=Jm(0,0,0,0);Jm(0,0,0,1);var Tme=Jm(1,1,1,0);Jm(1,1,1,1);function b_(e){return!!(e&&!(e&e-1))}function Pd(e,t){return e??t}function wme(e){return e===void 0?null:e}function E_(e,t){var r=t-1;return e+r&~r}function Cme(e,t){for(var r=new Array(e),n=0;n1,c=r.replace(`\r `,` `).split(` `).map(function(K){return K.replace(/[/][/].*$/,"")}).filter(function(K){var Z=!K||/^\s+$/.test(K);return!Z}),f="";n!==null&&(f=Object.keys(n).map(function(K){return Ov(K,n[K])}).join(` `));var m=c.find(function(K){return K.startsWith("precision")})||"precision mediump float;",_=i?c.filter(function(K){return!K.startsWith("precision")}).join(` `):c.join(` `),b="";if(e.viewportOrigin===vf.UPPER_LEFT&&(b+="".concat(Ov("VIEWPORT_ORIGIN_TL","1"),` `)),e.clipSpaceNearZ===m0.ZERO&&(b+="".concat(Ov("CLIPSPACE_NEAR_ZERO","1"),` `)),e.explicitBindingLocations){var A=0,w=0,R=0;_=_.replace(/^\s*(layout\((.*)\))?\s*uniform(.+{)$/gm,function(K,Z,ve,Ie){var de=ve?"".concat(ve,", "):"";return"layout(".concat(de,"set = ").concat(A,", binding = ").concat(w++,") uniform ").concat(Ie)}),A++,w=0,ii(e.separateSamplerTextures),_=_.replace(/^\s*(layout\((.*)\))?\s*uniform sampler(\w+) (.*);/gm,function(K,Z,ve,Ie,de){var se=P9(ve);se===null&&(se=w++);var le=af(a2e(Ie),2),ye=le[0],ke=le[1];return t==="frag"?` layout(set = `.concat(A,", binding = ").concat(se*2+0,") uniform texture").concat(ye," T_").concat(de,`; layout(set = `).concat(A,", binding = ").concat(se*2+1,") uniform sampler").concat(ke," S_").concat(de,";").trim():""}),_=_.replace(t==="frag"?/^\s*\b(varying|in)\b/gm:/^\s*\b(varying|out)\b/gm,function(K,Z){return"layout(location = ".concat(R++,") ").concat(Z)}),b+="".concat(Ov("gl_VertexID","gl_VertexIndex"),` `),b+="".concat(Ov("gl_InstanceID","gl_InstanceIndex"),` `),m=m.replace(/^precision (.*) sampler(.*);$/gm,"")}else{var P=0;_=_.replace(/^\s*(layout\((.*)\))?\s*uniform sampler(\w+) (.*);/gm,function(K,Z,ve,Ie,de){var se=P9(ve);return se===null&&(se=P++),"uniform sampler".concat(Ie," ").concat(de,"; // BINDING=").concat(se)})}if(e.separateSamplerTextures)_=_.replace(/\bSAMPLER_(\w+)\((.*?)\)/g,function(K,Z,ve){return"sampler".concat(Z,"(T_").concat(ve,", S_").concat(ve,")")}),_=_.replace(/\bTEXTURE\((.*?)\)/g,function(K,Z){return"T_".concat(Z)});else{var k=[];_=_.replace(/\bSAMPLER_(\w+)\((.*?)\)/g,function(K,Z,ve){return k.push([ve,Z]),ve}),a&&k.forEach(function(K){var Z=af(K,2),ve=Z[0],Ie=Z[1];_=_.replace(new RegExp("texture\\(".concat(ve),"g"),function(){return"texture".concat(Ie,"(").concat(ve)})}),_=_.replace(/\bTEXTURE\((.*?)\)/g,function(K,Z){return Z})}var L="".concat(a?"":e.glslVersion,` `).concat(a&&u?`#extension GL_EXT_draw_buffers : require `:"",` `).concat(a&&t==="frag"?`#extension GL_OES_standard_derivatives : enable `:"").concat(i?m:"",` `).concat(b||"").concat(f?f+` `:"",` `).concat(_,` `).trim();if(e.explicitBindingLocations&&t==="frag"&&(L=L.replace(/^\b(out)\b/g,function(K,Z){return"layout(location = 0) ".concat(Z)})),a){if(t==="frag"&&(L=L.replace(/^\s*in\s+(\S+)\s*(.*);$/gm,function(K,Z,ve){return"varying ".concat(Z," ").concat(ve,`; `)})),t==="vert"&&(L=L.replace(/^\s*out\s+(\S+)\s*(.*);$/gm,function(K,Z,ve){return"varying ".concat(Z," ").concat(ve,`; `)}),L=L.replace(/^\s*layout\(location\s*=\s*\S*\)\s*in\s+(\S+)\s*(.*);$/gm,function(K,Z,ve){return"attribute ".concat(Z," ").concat(ve,`; `)})),L=L.replace(/\s*uniform\s*.*\s*{((?:\s*.*\s*)*?)};/g,function(K,Z){return Z.trim().replace(/^.*$/gm,function(ve){var Ie=ve.trim();return Ie.startsWith("#")?Ie:ve?"uniform ".concat(Ie):""})}),t==="frag")if(u){var B=[];L=L.replace(/^\s*layout\(location\s*=\s*\d*\)\s*out\s+vec4\s*(.*);$/gm,function(K,Z){return B.push(Z),"vec4 ".concat(Z,`; `)});var V=L.lastIndexOf("}");L=L.substring(0,V)+` `.concat(B.map(function(K,Z){return"gl_FragData[".concat(Z,"] = ").concat(K,`; `)}).join(` `))+L.substring(V)}else{var G;if(L=L.replace(/^\s*out\s+(\S+)\s*(.*);$/gm,function(K,Z,ve){return G=ve,"".concat(Z," ").concat(ve,`; `)}),G){var V=L.lastIndexOf("}");L=L.substring(0,V)+` gl_FragColor = vec4(`.concat(G,`); `)+L.substring(V)}}L=L.replace(/^\s*layout\((.*)\)/gm,"")}return L}var Kl=function(e){to(t,e);function t(r){var n=r.id,i=r.device,o=e.call(this)||this;return o.id=n,o.device=i,o.device.resourceCreationTracker!==null&&o.device.resourceCreationTracker.trackResourceCreated(o),o}return t.prototype.destroy=function(){this.device.resourceCreationTracker!==null&&this.device.resourceCreationTracker.trackResourceDestroyed(this)},t}(FO),o2e=function(e){to(t,e);function t(r){var n=r.id,i=r.device,o=r.descriptor,a=e.call(this,{id:n,device:i})||this;a.type=ji.Bindings;var u=o.uniformBufferBindings,c=o.samplerBindings;return a.uniformBufferBindings=u||[],a.samplerBindings=c||[],a.bindingLayouts=a.createBindingLayouts(),a}return t.prototype.createBindingLayouts=function(){var r=0,n=0,i=[],o=this.uniformBufferBindings.length,a=this.samplerBindings.length;return i.push({firstUniformBuffer:r,numUniformBuffers:o,firstSampler:n,numSamplers:a}),r+=o,n+=a,{numUniformBuffers:r,numSamplers:n,bindingLayoutTables:i}},t}(Kl);function gn(e){return typeof WebGL2RenderingContext<"u"&&e instanceof WebGL2RenderingContext?!0:!!(e&&e._version===2)}function WO(e){var t=_f(e);switch(t){case Kt.BC1:case Kt.BC2:case Kt.BC3:case Kt.BC4_UNORM:case Kt.BC4_SNORM:case Kt.BC5_UNORM:case Kt.BC5_SNORM:return!0;default:return!1}}function XO(e){var t=g0(e);if(t&Wr.Normalized)return!1;var r=_f(e);return r===Kt.S8||r===Kt.S16||r===Kt.S32||r===Kt.U8||r===Kt.U16||r===Kt.U32}function s2e(e){switch(e){case Ec.STATIC:return Re.STATIC_DRAW;case Ec.DYNAMIC:return Re.DYNAMIC_DRAW}}function O9(e){if(e&da.INDEX)return Re.ELEMENT_ARRAY_BUFFER;if(e&da.VERTEX)return Re.ARRAY_BUFFER;if(e&da.UNIFORM)return Re.UNIFORM_BUFFER}function u2e(e){switch(e){case Fo.TRIANGLES:return Re.TRIANGLES;case Fo.POINTS:return Re.POINTS;case Fo.TRIANGLE_STRIP:return Re.TRIANGLE_STRIP;case Fo.LINES:return Re.LINES;case Fo.LINE_STRIP:return Re.LINE_STRIP;default:throw new Error("Unknown primitive topology mode")}}function l2e(e){switch(e){case Kt.U8:return Re.UNSIGNED_BYTE;case Kt.U16:return Re.UNSIGNED_SHORT;case Kt.U32:return Re.UNSIGNED_INT;case Kt.S8:return Re.BYTE;case Kt.S16:return Re.SHORT;case Kt.S32:return Re.INT;case Kt.F16:return Re.HALF_FLOAT;case Kt.F32:return Re.FLOAT;default:throw new Error("whoops")}}function c2e(e){switch(e){case ln.R:return 1;case ln.RG:return 2;case ln.RGB:return 3;case ln.RGBA:return 4;default:return 1}}function f2e(e){var t=_f(e),r=bb(e),n=g0(e),i=l2e(t),o=c2e(r),a=!!(n&Wr.Normalized);return{size:o,type:i,normalized:a}}function h2e(e){switch(e){case Ke.U8_R:return Re.UNSIGNED_BYTE;case Ke.U16_R:return Re.UNSIGNED_SHORT;case Ke.U32_R:return Re.UNSIGNED_INT;default:throw new Error("whoops")}}function kv(e){switch(e){case gu.CLAMP_TO_EDGE:return Re.CLAMP_TO_EDGE;case gu.REPEAT:return Re.REPEAT;case gu.MIRRORED_REPEAT:return Re.MIRRORED_REPEAT;default:throw new Error("whoops")}}function og(e,t){if(t===ts.LINEAR&&e===vo.BILINEAR)return Re.LINEAR_MIPMAP_LINEAR;if(t===ts.LINEAR&&e===vo.POINT)return Re.NEAREST_MIPMAP_LINEAR;if(t===ts.NEAREST&&e===vo.BILINEAR)return Re.LINEAR_MIPMAP_NEAREST;if(t===ts.NEAREST&&e===vo.POINT)return Re.NEAREST_MIPMAP_NEAREST;if(t===ts.NO_MIP&&e===vo.BILINEAR)return Re.LINEAR;if(t===ts.NO_MIP&&e===vo.POINT)return Re.NEAREST;throw new Error("Unknown texture filter mode")}function n0(e,t){t===void 0&&(t=0);var r=e;return r.gl_buffer_pages[t/r.pageByteSize|0]}function Nd(e){var t=e;return t.gl_texture}function Nx(e){var t=e;return t.gl_sampler}function Dv(e,t){e.name=t,e.__SPECTOR_Metadata={name:t}}function k9(e,t){for(var r=[];;){var n=t.exec(e);if(!n)break;r.push(n)}return r}function tp(e){return e.blendMode==hs.ADD&&e.blendSrcFactor==Ai.ONE&&e.blendDstFactor===Ai.ZERO}function p2e(e){switch(e){case x_.OcclusionConservative:return Re.ANY_SAMPLES_PASSED_CONSERVATIVE;default:throw new Error("whoops")}}function d2e(e){if(e===Ti.TEXTURE_2D)return Re.TEXTURE_2D;if(e===Ti.TEXTURE_2D_ARRAY)return Re.TEXTURE_2D_ARRAY;if(e===Ti.TEXTURE_CUBE_MAP)return Re.TEXTURE_CUBE_MAP;if(e===Ti.TEXTURE_3D)return Re.TEXTURE_3D;throw new Error("whoops")}function h6(e,t,r,n){return!(e%r!==0||t%n!==0)}var v2e=function(e){to(t,e);function t(r){var n=r.id,i=r.device,o=r.descriptor,a=e.call(this,{id:n,device:i})||this;a.type=ji.Buffer;var u=o.viewOrSize,c=o.usage,f=o.hint,m=f===void 0?Ec.STATIC:f,_=i.uniformBufferMaxPageByteSize,b=i.gl,A=c&da.UNIFORM;A||(gn(b)?b.bindVertexArray(null):i.OES_vertex_array_object.bindVertexArrayOES(null));var w=jd(u)?E_(u,4):E_(u.byteLength,4);a.gl_buffer_pages=[];var R;if(A){for(var P=w;P>0;)a.gl_buffer_pages.push(a.createBufferPage(Math.min(P,_),c,m)),P-=_;R=_}else a.gl_buffer_pages.push(a.createBufferPage(w,c,m)),R=w;return a.pageByteSize=R,a.byteSize=w,a.usage=c,a.gl_target=O9(c),jd(u)||a.setSubData(0,new Uint8Array(u.buffer)),A||(gn(b)?b.bindVertexArray(a.device.currentBoundVAO):i.OES_vertex_array_object.bindVertexArrayOES(a.device.currentBoundVAO)),a}return t.prototype.setSubData=function(r,n,i,o){i===void 0&&(i=0),o===void 0&&(o=n.byteLength-i);for(var a=this.device.gl,u=this.pageByteSize,c=r+o,f=r,m=r%u;f=1,!a){m=u.device.ensureResourceExists(c.createTexture());var b=u.device.translateTextureType(o.format),A=u.device.translateTextureInternalFormat(o.format);if(u.device.setActiveTexture(c.TEXTURE0),u.device.currentTextures[0]=null,u.preprocessImage(),o.dimension===Ti.TEXTURE_2D){if(f=Re.TEXTURE_2D,c.bindTexture(f,m),u.immutable)if(gn(c))c.texStorage2D(f,_,A,o.width,o.height);else{var w=(A===Re.DEPTH_COMPONENT||u.isNPOT(),0);(u.format===Ke.D32F||u.format===Ke.D24_S8)&&!gn(c)&&!i.WEBGL_depth_texture||(c.texImage2D(f,w,A,o.width,o.height,0,A,b,null),u.mipmaps&&(u.mipmaps=!1,c.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_MIN_FILTER,Re.LINEAR),c.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_WRAP_S,Re.CLAMP_TO_EDGE),c.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_WRAP_T,Re.CLAMP_TO_EDGE)))}ii(o.depthOrArrayLayers===1)}else if(o.dimension===Ti.TEXTURE_2D_ARRAY)f=Re.TEXTURE_2D_ARRAY,c.bindTexture(f,m),u.immutable&&gn(c)&&c.texStorage3D(f,_,A,o.width,o.height,o.depthOrArrayLayers);else if(o.dimension===Ti.TEXTURE_3D)f=Re.TEXTURE_3D,c.bindTexture(f,m),u.immutable&&gn(c)&&c.texStorage3D(f,_,A,o.width,o.height,o.depthOrArrayLayers);else if(o.dimension===Ti.TEXTURE_CUBE_MAP)f=Re.TEXTURE_CUBE_MAP,c.bindTexture(f,m),u.immutable&&gn(c)&&c.texStorage2D(f,_,A,o.width,o.height),ii(o.depthOrArrayLayers===6);else throw new Error("whoops")}return u.gl_texture=m,u.gl_target=f,u.mipLevelCount=_,u}return t.prototype.setImageData=function(r,n){n===void 0&&(n=0);var i=this.device.gl;WO(this.format);var o=this.gl_target===Re.TEXTURE_3D||this.gl_target===Re.TEXTURE_2D_ARRAY,a=this.gl_target===Re.TEXTURE_CUBE_MAP,u=r2e(r[0]);this.device.setActiveTexture(i.TEXTURE0),this.device.currentTextures[0]=null;var c=r[0],f,m;u?(f=this.width,m=this.height):(f=c.width,m=c.height,this.width=f,this.height=m),i.bindTexture(this.gl_target,this.gl_texture);var _=this.device.translateTextureFormat(this.format),b=gn(i)?this.device.translateInternalTextureFormat(this.format):_,A=this.device.translateTextureType(this.format);this.preprocessImage();for(var w=0;w1){var n=_f(r.format);if(n===Kt.BC1)for(var i=r.width,o=r.height,a=0;a1?u.renderbufferStorageMultisample(Re.RENDERBUFFER,b,R,f,m):u.renderbufferStorage(Re.RENDERBUFFER,R,f,m)}return a.format=c,a.width=f,a.height=m,a.sampleCount=b,a}return t.prototype.destroy=function(){e.prototype.destroy.call(this),this.gl_renderbuffer!==null&&this.device.gl.deleteRenderbuffer(this.gl_renderbuffer),this.texture&&this.texture.destroy()},t}(Kl),Lu;(function(e){e[e.NeedsCompile=0]="NeedsCompile",e[e.Compiling=1]="Compiling",e[e.NeedsBind=2]="NeedsBind",e[e.ReadyToUse=3]="ReadyToUse"})(Lu||(Lu={}));var _2e=function(e){to(t,e);function t(r,n){var i=r.id,o=r.device,a=r.descriptor,u=e.call(this,{id:i,device:o})||this;u.rawVertexGLSL=n,u.type=ji.Program,u.uniformSetters={},u.attributes=[];var c=u.device.gl;return u.descriptor=a,u.gl_program=u.device.ensureResourceExists(c.createProgram()),u.gl_shader_vert=null,u.gl_shader_frag=null,u.compileState=Lu.NeedsCompile,u.tryCompileProgram(),u}return t.prototype.destroy=function(){e.prototype.destroy.call(this),this.device.gl.deleteProgram(this.gl_program),this.device.gl.deleteShader(this.gl_shader_vert),this.device.gl.deleteShader(this.gl_shader_frag)},t.prototype.tryCompileProgram=function(){ii(this.compileState===Lu.NeedsCompile);var r=this.descriptor,n=r.vertex,i=r.fragment,o=this.device.gl;n!=null&&n.glsl&&(i!=null&&i.glsl)&&(this.gl_shader_vert=this.compileShader(n.postprocess?n.postprocess(n.glsl):n.glsl,o.VERTEX_SHADER),this.gl_shader_frag=this.compileShader(i.postprocess?i.postprocess(i.glsl):i.glsl,o.FRAGMENT_SHADER),o.attachShader(this.gl_program,this.gl_shader_vert),o.attachShader(this.gl_program,this.gl_shader_frag),o.linkProgram(this.gl_program),this.compileState=Lu.Compiling,gn(o)||(this.readUniformLocationsFromLinkedProgram(),this.readAttributesFromLinkedProgram()))},t.prototype.readAttributesFromLinkedProgram=function(){for(var r,n=this.device.gl,i=n.getProgramParameter(this.gl_program,n.ACTIVE_ATTRIBUTES),o=n2e(this.descriptor.vertex.glsl),a=i2e(this.rawVertexGLSL,o),u=function(m){var _=n.getActiveAttrib(c.gl_program,m),b=_.name,A=_.type,w=_.size,R=n.getAttribLocation(c.gl_program,b),P=(r=a.find(function(k){return k.name===b}))===null||r===void 0?void 0:r.location;R>=0&&!Xl(P)&&(c.attributes[P]={name:b,location:R,type:A,size:w})},c=this,f=0;f1)for(var c=0;c1&&c.device.EXT_texture_filter_anisotropic!==null&&(ii(o.minFilter===vo.BILINEAR&&o.magFilter===vo.BILINEAR&&o.mipmapFilter===ts.LINEAR),f.samplerParameterf(m,c.device.EXT_texture_filter_anisotropic.TEXTURE_MAX_ANISOTROPY_EXT,_)),c.gl_sampler=m}else c.descriptor=o;return c}return t.prototype.setTextureParameters=function(r,n,i){var o,a=this.device.gl,u=this.descriptor;this.isNPOT(n,i)?a.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_MIN_FILTER,Re.LINEAR):a.texParameteri(r,Re.TEXTURE_MIN_FILTER,og(u.minFilter,u.mipmapFilter)),a.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_WRAP_S,kv(u.addressModeU)),a.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_WRAP_T,kv(u.addressModeV)),a.texParameteri(r,Re.TEXTURE_MAG_FILTER,og(u.magFilter,ts.NO_MIP));var c=(o=u.maxAnisotropy)!==null&&o!==void 0?o:1;c>1&&this.device.EXT_texture_filter_anisotropic!==null&&(ii(u.minFilter===vo.BILINEAR&&u.magFilter===vo.BILINEAR&&u.mipmapFilter===ts.LINEAR),a.texParameteri(r,this.device.EXT_texture_filter_anisotropic.TEXTURE_MAX_ANISOTROPY_EXT,c))},t.prototype.destroy=function(){e.prototype.destroy.call(this),gn(this.device.gl)&&this.device.gl.deleteSampler(Nx(this))},t.prototype.isNPOT=function(r,n){return!b_(r)||!b_(n)},t}(Kl),T2e=function(){function e(){}return e.prototype.dispatchWorkgroups=function(t,r,n){},e.prototype.dispatchWorkgroupsIndirect=function(t,r){},e.prototype.setPipeline=function(t){},e.prototype.setBindings=function(t){},e.prototype.pushDebugGroup=function(t){},e.prototype.popDebugGroup=function(){},e.prototype.insertDebugMarker=function(t){},e}(),w2e=function(e){to(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=ji.RenderBundle,r.commands=[],r}return t.prototype.push=function(r){this.commands.push(r)},t.prototype.replay=function(){this.commands.forEach(function(r){return r()})},t}(Kl),D9=65536,C2e=/uniform(?:\s+)(\w+)(?:\s?){([^]*?)}/g,R2e=function(){function e(t,r){r===void 0&&(r={}),this.shaderDebug=!1,this.OES_vertex_array_object=null,this.ANGLE_instanced_arrays=null,this.OES_texture_float=null,this.OES_draw_buffers_indexed=null,this.WEBGL_draw_buffers=null,this.WEBGL_depth_texture=null,this.WEBGL_color_buffer_float=null,this.EXT_color_buffer_half_float=null,this.WEBGL_compressed_texture_s3tc=null,this.WEBGL_compressed_texture_s3tc_srgb=null,this.EXT_texture_compression_rgtc=null,this.EXT_texture_filter_anisotropic=null,this.KHR_parallel_shader_compile=null,this.EXT_texture_norm16=null,this.EXT_color_buffer_float=null,this.OES_texture_float_linear=null,this.OES_texture_half_float_linear=null,this.scTexture=null,this.scPlatformFramebuffer=null,this.currentActiveTexture=null,this.currentBoundVAO=null,this.currentProgram=null,this.resourceCreationTracker=null,this.resourceUniqueId=0,this.currentColorAttachments=[],this.currentColorAttachmentLevels=[],this.currentColorResolveTos=[],this.currentColorResolveToLevels=[],this.currentSampleCount=-1,this.currentIndexBufferByteOffset=null,this.currentMegaState=_0(y0),this.currentSamplers=[],this.currentTextures=[],this.currentUniformBuffers=[],this.currentUniformBufferByteOffsets=[],this.currentUniformBufferByteSizes=[],this.currentScissorEnabled=!1,this.currentStencilRef=null,this.currentRenderPassDescriptor=null,this.currentRenderPassDescriptorStack=[],this.debugGroupStack=[],this.resolveColorAttachmentsChanged=!1,this.resolveDepthStencilAttachmentsChanged=!1,this.explicitBindingLocations=!1,this.separateSamplerTextures=!1,this.viewportOrigin=vf.LOWER_LEFT,this.clipSpaceNearZ=m0.NEGATIVE_ONE,this.supportMRT=!1,this.inBlitRenderPass=!1,this.supportedSampleCounts=[],this.occlusionQueriesRecommended=!1,this.computeShadersSupported=!1,this.gl=t,this.contextAttributes=g1(t.getContextAttributes()),gn(t)?(this.EXT_texture_norm16=t.getExtension("EXT_texture_norm16"),this.EXT_color_buffer_float=t.getExtension("EXT_color_buffer_float")):(this.OES_vertex_array_object=t.getExtension("OES_vertex_array_object"),this.ANGLE_instanced_arrays=t.getExtension("ANGLE_instanced_arrays"),this.OES_texture_float=t.getExtension("OES_texture_float"),this.WEBGL_draw_buffers=t.getExtension("WEBGL_draw_buffers"),this.WEBGL_depth_texture=t.getExtension("WEBGL_depth_texture"),this.WEBGL_color_buffer_float=t.getExtension("WEBGL_color_buffer_float"),this.EXT_color_buffer_half_float=t.getExtension("EXT_color_buffer_half_float"),t.getExtension("EXT_frag_depth"),t.getExtension("OES_element_index_uint"),t.getExtension("OES_standard_derivatives")),this.WEBGL_compressed_texture_s3tc=t.getExtension("WEBGL_compressed_texture_s3tc"),this.WEBGL_compressed_texture_s3tc_srgb=t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),this.EXT_texture_compression_rgtc=t.getExtension("EXT_texture_compression_rgtc"),this.EXT_texture_filter_anisotropic=t.getExtension("EXT_texture_filter_anisotropic"),this.EXT_texture_norm16=t.getExtension("EXT_texture_norm16"),this.OES_texture_float_linear=t.getExtension("OES_texture_float_linear"),this.OES_texture_half_float_linear=t.getExtension("OES_texture_half_float_linear"),this.KHR_parallel_shader_compile=t.getExtension("KHR_parallel_shader_compile"),gn(t)?(this.platformString="WebGL2",this.glslVersion="#version 300 es"):(this.platformString="WebGL1",this.glslVersion="#version 100"),this.scTexture=new Ux({id:this.getNextUniqueId(),device:this,descriptor:{width:0,height:0,depthOrArrayLayers:1,dimension:Ti.TEXTURE_2D,mipLevelCount:1,usage:nu.RENDER_TARGET,format:this.contextAttributes.alpha===!1?Ke.U8_RGB_RT:Ke.U8_RGBA_RT},fake:!0}),this.scTexture.formatKind=Qa.Float,this.scTexture.gl_target=null,this.scTexture.gl_texture=null,this.resolveColorReadFramebuffer=this.ensureResourceExists(t.createFramebuffer()),this.resolveColorDrawFramebuffer=this.ensureResourceExists(t.createFramebuffer()),this.resolveDepthStencilReadFramebuffer=this.ensureResourceExists(t.createFramebuffer()),this.resolveDepthStencilDrawFramebuffer=this.ensureResourceExists(t.createFramebuffer()),this.renderPassDrawFramebuffer=this.ensureResourceExists(t.createFramebuffer()),this.readbackFramebuffer=this.ensureResourceExists(t.createFramebuffer()),this.fallbackTexture2D=this.createFallbackTexture(Ti.TEXTURE_2D,Qa.Float),this.fallbackTexture2DDepth=this.createFallbackTexture(Ti.TEXTURE_2D,Qa.Depth),this.fallbackVertexBuffer=this.createBuffer({viewOrSize:1,usage:da.VERTEX,hint:Ec.STATIC}),gn(t)&&(this.fallbackTexture2DArray=this.createFallbackTexture(Ti.TEXTURE_2D_ARRAY,Qa.Float),this.fallbackTexture3D=this.createFallbackTexture(Ti.TEXTURE_3D,Qa.Float),this.fallbackTextureCube=this.createFallbackTexture(Ti.TEXTURE_CUBE_MAP,Qa.Float)),this.currentMegaState.depthCompare=Ki.LESS,this.currentMegaState.depthWrite=!1,this.currentMegaState.attachmentsState[0].channelWriteMask=fs.ALL,t.enable(t.DEPTH_TEST),t.enable(t.STENCIL_TEST),this.checkLimits(),r.shaderDebug&&(this.shaderDebug=!0),r.trackResources&&(this.resourceCreationTracker=new S2e)}return e.prototype.destroy=function(){this.blitBindings&&this.blitBindings.destroy(),this.blitInputLayout&&this.blitInputLayout.destroy(),this.blitRenderPipeline&&this.blitRenderPipeline.destroy(),this.blitVertexBuffer&&this.blitVertexBuffer.destroy(),this.blitProgram&&this.blitProgram.destroy()},e.prototype.createFallbackTexture=function(t,r){var n=t===Ti.TEXTURE_CUBE_MAP?6:1,i=r===Qa.Depth?Ke.D32F:Ke.U8_RGBA_NORM,o=this.createTexture({dimension:t,format:i,usage:nu.SAMPLED,width:1,height:1,depthOrArrayLayers:n,mipLevelCount:1});return r===Qa.Float&&o.setImageData([new Uint8Array(4*n)]),Nd(o)},e.prototype.getNextUniqueId=function(){return++this.resourceUniqueId},e.prototype.checkLimits=function(){var t=this.gl;if(this.maxVertexAttribs=t.getParameter(Re.MAX_VERTEX_ATTRIBS),gn(t)){this.uniformBufferMaxPageByteSize=Math.min(t.getParameter(Re.MAX_UNIFORM_BLOCK_SIZE),D9),this.uniformBufferWordAlignment=t.getParameter(t.UNIFORM_BUFFER_OFFSET_ALIGNMENT)/4;var r=t.getInternalformatParameter(t.RENDERBUFFER,t.DEPTH32F_STENCIL8,t.SAMPLES);this.supportedSampleCounts=r?Pv([],af(r),!1):[],this.occlusionQueriesRecommended=!0}else this.uniformBufferWordAlignment=64,this.uniformBufferMaxPageByteSize=D9;this.uniformBufferMaxPageWordSize=this.uniformBufferMaxPageByteSize/4,this.supportedSampleCounts.includes(1)||this.supportedSampleCounts.push(1),this.supportedSampleCounts.sort(function(n,i){return n-i})},e.prototype.configureSwapChain=function(t,r,n){var i=this.scTexture;i.width=t,i.height=r,this.scPlatformFramebuffer=wme(n)},e.prototype.getDevice=function(){return this},e.prototype.getCanvas=function(){return this.gl.canvas},e.prototype.getOnscreenTexture=function(){return this.scTexture},e.prototype.beginFrame=function(){},e.prototype.endFrame=function(){},e.prototype.translateTextureInternalFormat=function(t,r){switch(r===void 0&&(r=!1),t){case Ke.ALPHA:return Re.ALPHA;case Ke.U8_LUMINANCE:case Ke.F16_LUMINANCE:case Ke.F32_LUMINANCE:return Re.LUMINANCE;case Ke.F16_R:return Re.R16F;case Ke.F16_RG:return Re.RG16F;case Ke.F16_RGB:return Re.RGB16F;case Ke.F16_RGBA:return Re.RGBA16F;case Ke.F32_R:return Re.R32F;case Ke.F32_RG:return Re.RG32F;case Ke.F32_RGB:return Re.RGB32F;case Ke.F32_RGBA:return gn(this.gl)?Re.RGBA32F:r?this.WEBGL_color_buffer_float.RGBA32F_EXT:Re.RGBA;case Ke.U8_R_NORM:return Re.R8;case Ke.U8_RG_NORM:return Re.RG8;case Ke.U8_RGB_NORM:case Ke.U8_RGB_RT:return Re.RGB8;case Ke.U8_RGB_SRGB:return Re.SRGB8;case Ke.U8_RGBA_NORM:case Ke.U8_RGBA_RT:return gn(this.gl)?Re.RGBA8:r?Re.RGBA4:Re.RGBA;case Ke.U8_RGBA:return Re.RGBA;case Ke.U8_RGBA_SRGB:case Ke.U8_RGBA_RT_SRGB:return Re.SRGB8_ALPHA8;case Ke.U16_R:return Re.R16UI;case Ke.U16_R_NORM:return this.EXT_texture_norm16.R16_EXT;case Ke.U16_RG_NORM:return this.EXT_texture_norm16.RG16_EXT;case Ke.U16_RGBA_NORM:return this.EXT_texture_norm16.RGBA16_EXT;case Ke.U16_RGBA_5551:return Re.RGB5_A1;case Ke.U16_RGB_565:return Re.RGB565;case Ke.U32_R:return Re.R32UI;case Ke.S8_RGBA_NORM:return Re.RGBA8_SNORM;case Ke.S8_RG_NORM:return Re.RG8_SNORM;case Ke.BC1:return this.WEBGL_compressed_texture_s3tc.COMPRESSED_RGBA_S3TC_DXT1_EXT;case Ke.BC1_SRGB:return this.WEBGL_compressed_texture_s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;case Ke.BC2:return this.WEBGL_compressed_texture_s3tc.COMPRESSED_RGBA_S3TC_DXT3_EXT;case Ke.BC2_SRGB:return this.WEBGL_compressed_texture_s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;case Ke.BC3:return this.WEBGL_compressed_texture_s3tc.COMPRESSED_RGBA_S3TC_DXT5_EXT;case Ke.BC3_SRGB:return this.WEBGL_compressed_texture_s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;case Ke.BC4_UNORM:return this.EXT_texture_compression_rgtc.COMPRESSED_RED_RGTC1_EXT;case Ke.BC4_SNORM:return this.EXT_texture_compression_rgtc.COMPRESSED_SIGNED_RED_RGTC1_EXT;case Ke.BC5_UNORM:return this.EXT_texture_compression_rgtc.COMPRESSED_RED_GREEN_RGTC2_EXT;case Ke.BC5_SNORM:return this.EXT_texture_compression_rgtc.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;case Ke.D32F_S8:return gn(this.gl)?Re.DEPTH32F_STENCIL8:this.WEBGL_depth_texture?Re.DEPTH_STENCIL:Re.DEPTH_COMPONENT16;case Ke.D24_S8:return gn(this.gl)?Re.DEPTH24_STENCIL8:this.WEBGL_depth_texture?Re.DEPTH_STENCIL:Re.DEPTH_COMPONENT16;case Ke.D32F:return gn(this.gl)?Re.DEPTH_COMPONENT32F:this.WEBGL_depth_texture?Re.DEPTH_COMPONENT:Re.DEPTH_COMPONENT16;case Ke.D24:return gn(this.gl)?Re.DEPTH_COMPONENT24:this.WEBGL_depth_texture?Re.DEPTH_COMPONENT:Re.DEPTH_COMPONENT16;default:throw new Error("whoops")}},e.prototype.translateTextureType=function(t){var r=_f(t);switch(r){case Kt.U8:return Re.UNSIGNED_BYTE;case Kt.U16:return Re.UNSIGNED_SHORT;case Kt.U32:return Re.UNSIGNED_INT;case Kt.S8:return Re.BYTE;case Kt.F16:return Re.HALF_FLOAT;case Kt.F32:return Re.FLOAT;case Kt.U16_PACKED_5551:return Re.UNSIGNED_SHORT_5_5_5_1;case Kt.D32F:return gn(this.gl)?Re.FLOAT:this.WEBGL_depth_texture?Re.UNSIGNED_INT:Re.UNSIGNED_BYTE;case Kt.D24:return gn(this.gl)?Re.UNSIGNED_INT_24_8:this.WEBGL_depth_texture?Re.UNSIGNED_SHORT:Re.UNSIGNED_BYTE;case Kt.D24S8:return gn(this.gl)?Re.UNSIGNED_INT_24_8:this.WEBGL_depth_texture?Re.UNSIGNED_INT_24_8_WEBGL:Re.UNSIGNED_BYTE;case Kt.D32FS8:return Re.FLOAT_32_UNSIGNED_INT_24_8_REV;default:throw new Error("whoops")}},e.prototype.translateInternalTextureFormat=function(t){switch(t){case Ke.F32_R:return Re.R32F;case Ke.F32_RG:return Re.RG32F;case Ke.F32_RGB:return Re.RGB32F;case Ke.F32_RGBA:return Re.RGBA32F;case Ke.F16_R:return Re.R16F;case Ke.F16_RG:return Re.RG16F;case Ke.F16_RGB:return Re.RGB16F;case Ke.F16_RGBA:return Re.RGBA16F}return this.translateTextureFormat(t)},e.prototype.translateTextureFormat=function(t){if(WO(t)||t===Ke.F32_LUMINANCE||t===Ke.U8_LUMINANCE)return this.translateTextureInternalFormat(t);var r=gn(this.gl)||!gn(this.gl)&&!!this.WEBGL_depth_texture;switch(t){case Ke.D24_S8:case Ke.D32F_S8:return r?Re.DEPTH_STENCIL:Re.RGBA;case Ke.D24:case Ke.D32F:return r?Re.DEPTH_COMPONENT:Re.RGBA}var n=XO(t),i=bb(t);switch(i){case ln.A:return Re.ALPHA;case ln.R:return n?Re.RED_INTEGER:Re.RED;case ln.RG:return n?Re.RG_INTEGER:Re.RG;case ln.RGB:return n?Re.RGB_INTEGER:Re.RGB;case ln.RGBA:return Re.RGBA}},e.prototype.setActiveTexture=function(t){this.currentActiveTexture!==t&&(this.gl.activeTexture(t),this.currentActiveTexture=t)},e.prototype.bindVAO=function(t){this.currentBoundVAO!==t&&(gn(this.gl)?this.gl.bindVertexArray(t):this.OES_vertex_array_object.bindVertexArrayOES(t),this.currentBoundVAO=t)},e.prototype.programCompiled=function(t){ii(t.compileState!==Lu.NeedsCompile),t.compileState===Lu.Compiling&&(t.compileState=Lu.NeedsBind,this.shaderDebug&&this.checkProgramCompilationForErrors(t))},e.prototype.useProgram=function(t){this.currentProgram!==t&&(this.programCompiled(t),this.gl.useProgram(t.gl_program),this.currentProgram=t)},e.prototype.ensureResourceExists=function(t){if(t===null){var r=this.gl.getError();throw new Error("Created resource is null; GL error encountered: ".concat(r))}else return t},e.prototype.createBuffer=function(t){return new v2e({id:this.getNextUniqueId(),device:this,descriptor:t})},e.prototype.createTexture=function(t){return new Ux({id:this.getNextUniqueId(),device:this,descriptor:t})},e.prototype.createSampler=function(t){return new A2e({id:this.getNextUniqueId(),device:this,descriptor:t})},e.prototype.createRenderTarget=function(t){return new g2e({id:this.getNextUniqueId(),device:this,descriptor:t})},e.prototype.createRenderTargetFromTexture=function(t){var r=t,n=r.format,i=r.width,o=r.height,a=r.mipLevelCount;return ii(a===1),this.createRenderTarget({format:n,width:i,height:o,sampleCount:1,texture:t})},e.prototype.createProgram=function(t){var r,n,i,o=(r=t.vertex)===null||r===void 0?void 0:r.glsl;return!((n=t.vertex)===null||n===void 0)&&n.glsl&&(t.vertex.glsl=x0(this.queryVendorInfo(),"vert",t.vertex.glsl)),!((i=t.fragment)===null||i===void 0)&&i.glsl&&(t.fragment.glsl=x0(this.queryVendorInfo(),"frag",t.fragment.glsl)),this.createProgramSimple(t,o)},e.prototype.createProgramSimple=function(t,r){var n=new _2e({id:this.getNextUniqueId(),device:this,descriptor:t},r);return n},e.prototype.createBindings=function(t){return new o2e({id:this.getNextUniqueId(),device:this,descriptor:t})},e.prototype.createInputLayout=function(t){return new m2e({id:this.getNextUniqueId(),device:this,descriptor:t})},e.prototype.createRenderPipeline=function(t){return new b2e({id:this.getNextUniqueId(),device:this,descriptor:t})},e.prototype.createComputePass=function(){return new T2e},e.prototype.createComputePipeline=function(t){return new E2e({id:this.getNextUniqueId(),device:this,descriptor:t})},e.prototype.createReadback=function(){return new x2e({id:this.getNextUniqueId(),device:this})},e.prototype.createQueryPool=function(t,r){return new y2e({id:this.getNextUniqueId(),device:this,descriptor:{type:t,elemCount:r}})},e.prototype.formatRenderPassDescriptor=function(t){var r,n,i,o,a,u,c=t.colorAttachment;t.depthClearValue=(r=t.depthClearValue)!==null&&r!==void 0?r:"load",t.stencilClearValue=(n=t.stencilClearValue)!==null&&n!==void 0?n:"load";for(var f=0;f=0;r--)this.debugGroupStack[r].drawCallCount+=t},e.prototype.debugGroupStatisticsBufferUpload=function(t){t===void 0&&(t=1);for(var r=this.debugGroupStack.length-1;r>=0;r--)this.debugGroupStack[r].bufferUploadCount+=t},e.prototype.debugGroupStatisticsTextureBind=function(t){t===void 0&&(t=1);for(var r=this.debugGroupStack.length-1;r>=0;r--)this.debugGroupStack[r].textureBindCount+=t},e.prototype.debugGroupStatisticsTriangles=function(t){for(var r=this.debugGroupStack.length-1;r>=0;r--)this.debugGroupStack[r].triangleCount+=t},e.prototype.reportShaderError=function(t,r){var n=this.gl,i=n.getShaderParameter(t,n.COMPILE_STATUS);if(!i){console.error(Rme(r));var o=n.getExtension("WEBGL_debug_shaders");o&&console.error(o.getTranslatedShaderSource(t)),console.error(n.getShaderInfoLog(t))}return i},e.prototype.checkProgramCompilationForErrors=function(t){var r=this.gl,n=t.gl_program;if(!r.getProgramParameter(n,r.LINK_STATUS)){var i=t.descriptor;if(!this.reportShaderError(t.gl_shader_vert,i.vertex.glsl)||!this.reportShaderError(t.gl_shader_frag,i.fragment.glsl))return;console.error(r.getProgramInfoLog(t.gl_program))}},e.prototype.bindFramebufferAttachment=function(t,r,n,i){var o=this.gl;if(Xl(n))o.framebufferRenderbuffer(t,r,o.RENDERBUFFER,null);else if(n.type===ji.RenderTarget)n.gl_renderbuffer!==null?o.framebufferRenderbuffer(t,r,o.RENDERBUFFER,n.gl_renderbuffer):n.texture!==null&&o.framebufferTexture2D(t,r,Re.TEXTURE_2D,Nd(n.texture),i);else if(n.type===ji.Texture){var a=Nd(n);n.dimension===Ti.TEXTURE_2D?o.framebufferTexture2D(t,r,Re.TEXTURE_2D,a,i):gn(o)&&(n.dimension,Ti.TEXTURE_2D_ARRAY)}},e.prototype.bindFramebufferDepthStencilAttachment=function(t,r){var n=this.gl,i=Xl(r)?Wr.Depth|Wr.Stencil:g0(r.format),o=!!(i&Wr.Depth),a=!!(i&Wr.Stencil);if(o&&a){var u=gn(this.gl)||!gn(this.gl)&&!!this.WEBGL_depth_texture;u?this.bindFramebufferAttachment(t,n.DEPTH_STENCIL_ATTACHMENT,r,0):this.bindFramebufferAttachment(t,n.DEPTH_ATTACHMENT,r,0)}else o?(this.bindFramebufferAttachment(t,n.DEPTH_ATTACHMENT,r,0),this.bindFramebufferAttachment(t,n.STENCIL_ATTACHMENT,null,0)):a&&(this.bindFramebufferAttachment(t,n.STENCIL_ATTACHMENT,r,0),this.bindFramebufferAttachment(t,n.DEPTH_ATTACHMENT,null,0))},e.prototype.validateCurrentAttachments=function(){for(var t=-1,r=-1,n=-1,i=0;i=f.numUniformBuffers),ii(u.length>=f.numSamplers);for(var m=0;m{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&YO.decode();let Kv=null;function Lg(){return(Kv===null||Kv.byteLength===0)&&(Kv=new Uint8Array(Do.memory.buffer)),Kv}function T_(e,t){return e=e>>>0,YO.decode(Lg().subarray(e,e+t))}const eh=new Array(128).fill(void 0);eh.push(void 0,null,!0,!1);let um=eh.length;function M2e(e){um===eh.length&&eh.push(eh.length+1);const t=um;return um=eh[t],eh[t]=e,t}function Ng(e){return eh[e]}function P2e(e){e<132||(eh[e]=um,um=e)}function O2e(e){const t=Ng(e);return P2e(e),t}let Lm=0;const Ug=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},k2e=typeof Ug.encodeInto=="function"?function(e,t){return Ug.encodeInto(e,t)}:function(e,t){const r=Ug.encode(e);return t.set(r),{read:e.length,written:r.length}};function zx(e,t,r){if(r===void 0){const u=Ug.encode(e),c=t(u.length,1)>>>0;return Lg().subarray(c,c+u.length).set(u),Lm=u.length,c}let n=e.length,i=t(n,1)>>>0;const o=Lg();let a=0;for(;a127)break;o[i+a]=u}if(a!==n){a!==0&&(e=e.slice(a)),i=r(i,n,n=a+e.length*3,1)>>>0;const u=Lg().subarray(i+a,i+n),c=k2e(e,u);a+=c.written}return Lm=a,i}let Qv=null;function w_(){return(Qv===null||Qv.byteLength===0)&&(Qv=new Int32Array(Do.memory.buffer)),Qv}function D2e(e,t,r){let n,i;try{const u=Do.__wbindgen_add_to_stack_pointer(-16),c=zx(e,Do.__wbindgen_malloc,Do.__wbindgen_realloc),f=Lm,m=zx(t,Do.__wbindgen_malloc,Do.__wbindgen_realloc),_=Lm;Do.glsl_compile(u,c,f,m,_,r);var o=w_()[u/4+0],a=w_()[u/4+1];return n=o,i=a,T_(o,a)}finally{Do.__wbindgen_add_to_stack_pointer(16),Do.__wbindgen_free(n,i,1)}}class Nm{static __wrap(t){t=t>>>0;const r=Object.create(Nm.prototype);return r.__wbg_ptr=t,r}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,t}free(){const t=this.__destroy_into_raw();Do.__wbg_wgslcomposer_free(t)}constructor(){const t=Do.wgslcomposer_new();return Nm.__wrap(t)}wgsl_compile(t){let r,n;try{const a=Do.__wbindgen_add_to_stack_pointer(-16),u=zx(t,Do.__wbindgen_malloc,Do.__wbindgen_realloc),c=Lm;Do.wgslcomposer_wgsl_compile(a,this.__wbg_ptr,u,c);var i=w_()[a/4+0],o=w_()[a/4+1];return r=i,n=o,T_(i,o)}finally{Do.__wbindgen_add_to_stack_pointer(16),Do.__wbindgen_free(r,n,1)}}}async function F2e(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(n){if(e.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",n);else throw n}const r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{const r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}}function B2e(){const e={};return e.wbg={},e.wbg.__wbindgen_string_new=function(t,r){const n=T_(t,r);return M2e(n)},e.wbg.__wbindgen_object_drop_ref=function(t){O2e(t)},e.wbg.__wbg_log_1d3ae0273d8f4f8a=function(t){console.log(Ng(t))},e.wbg.__wbg_log_576ca876af0d4a77=function(t,r){console.log(Ng(t),Ng(r))},e.wbg.__wbindgen_throw=function(t,r){throw new Error(T_(t,r))},e}function L2e(e,t){return Do=e.exports,ZO.__wbindgen_wasm_module=t,Qv=null,Kv=null,Do}async function ZO(e){if(Do!==void 0)return Do;const t=B2e();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:r,module:n}=await F2e(await e,t);return L2e(r,n)}var es;(function(e){e[e.COPY_SRC=1]="COPY_SRC",e[e.COPY_DST=2]="COPY_DST",e[e.TEXTURE_BINDING=4]="TEXTURE_BINDING",e[e.STORAGE_BINDING=8]="STORAGE_BINDING",e[e.STORAGE=8]="STORAGE",e[e.RENDER_ATTACHMENT=16]="RENDER_ATTACHMENT"})(es||(es={}));var $x;(function(e){e[e.READ=1]="READ",e[e.WRITE=2]="WRITE"})($x||($x={}));function N2e(e){var t=0;return e&nu.SAMPLED&&(t|=es.TEXTURE_BINDING|es.COPY_DST|es.COPY_SRC),e&nu.STORAGE&&(t|=es.TEXTURE_BINDING|es.STORAGE_BINDING|es.COPY_SRC|es.COPY_DST),e&nu.RENDER_TARGET&&(t|=es.RENDER_ATTACHMENT|es.TEXTURE_BINDING|es.COPY_SRC|es.COPY_DST),t}function Sb(e){if(e===Ke.U8_R_NORM)return"r8unorm";if(e===Ke.S8_R_NORM)return"r8snorm";if(e===Ke.U8_RG_NORM)return"rg8unorm";if(e===Ke.S8_RG_NORM)return"rg8snorm";if(e===Ke.U32_R)return"r32uint";if(e===Ke.S32_R)return"r32sint";if(e===Ke.F32_R)return"r32float";if(e===Ke.U16_RG)return"rg16uint";if(e===Ke.S16_RG)return"rg16sint";if(e===Ke.F16_RG)return"rg16float";if(e===Ke.U8_RGBA_RT)return"bgra8unorm";if(e===Ke.U8_RGBA_RT_SRGB)return"bgra8unorm-srgb";if(e===Ke.U8_RGBA_NORM)return"rgba8unorm";if(e===Ke.U8_RGBA_SRGB)return"rgba8unorm-srgb";if(e===Ke.S8_RGBA_NORM)return"rgba8snorm";if(e===Ke.F32_RGB)return"rgb9e5ufloat";if(e===Ke.U32_RG)return"rg32uint";if(e===Ke.S32_RG)return"rg32sint";if(e===Ke.F32_RG)return"rg32float";if(e===Ke.U16_RGBA)return"rgba16uint";if(e===Ke.S16_RGBA)return"rgba16sint";if(e===Ke.F16_RGBA)return"rgba16float";if(e===Ke.F32_RGBA)return"rgba32float";if(e===Ke.U32_RGBA)return"rgba32uint";if(e===Ke.S32_RGBA)return"rgba32sint";if(e===Ke.D24)return"depth24plus";if(e===Ke.D24_S8)return"depth24plus-stencil8";if(e===Ke.D32F)return"depth32float";if(e===Ke.D32F_S8)return"depth32float-stencil8";if(e===Ke.BC1)return"bc1-rgba-unorm";if(e===Ke.BC1_SRGB)return"bc1-rgba-unorm-srgb";if(e===Ke.BC2)return"bc2-rgba-unorm";if(e===Ke.BC2_SRGB)return"bc2-rgba-unorm-srgb";if(e===Ke.BC3)return"bc3-rgba-unorm";if(e===Ke.BC3_SRGB)return"bc3-rgba-unorm-srgb";if(e===Ke.BC4_SNORM)return"bc4-r-snorm";if(e===Ke.BC4_UNORM)return"bc4-r-unorm";if(e===Ke.BC5_SNORM)return"bc5-rg-snorm";if(e===Ke.BC5_UNORM)return"bc5-rg-unorm";throw"whoops"}function U2e(e){if(e===Ti.TEXTURE_2D)return"2d";if(e===Ti.TEXTURE_CUBE_MAP)return"2d";if(e===Ti.TEXTURE_2D_ARRAY)return"2d";if(e===Ti.TEXTURE_3D)return"3d";throw new Error("whoops")}function z2e(e){if(e===Ti.TEXTURE_2D)return"2d";if(e===Ti.TEXTURE_CUBE_MAP)return"cube";if(e===Ti.TEXTURE_2D_ARRAY)return"2d-array";if(e===Ti.TEXTURE_3D)return"3d";throw new Error("whoops")}function $2e(e){var t=0;return e&da.INDEX&&(t|=GPUBufferUsage.INDEX),e&da.VERTEX&&(t|=GPUBufferUsage.VERTEX),e&da.UNIFORM&&(t|=GPUBufferUsage.UNIFORM),e&da.STORAGE&&(t|=GPUBufferUsage.STORAGE),e&da.COPY_SRC&&(t|=GPUBufferUsage.COPY_SRC),e&da.INDIRECT&&(t|=GPUBufferUsage.INDIRECT),t|=GPUBufferUsage.COPY_DST,t}function p6(e){if(e===gu.CLAMP_TO_EDGE)return"clamp-to-edge";if(e===gu.REPEAT)return"repeat";if(e===gu.MIRRORED_REPEAT)return"mirror-repeat";throw new Error("whoops")}function F9(e){if(e===vo.BILINEAR)return"linear";if(e===vo.POINT)return"nearest";throw new Error("whoops")}function V2e(e){if(e===ts.LINEAR)return"linear";if(e===ts.NEAREST)return"nearest";if(e===ts.NO_MIP)return"nearest";throw new Error("whoops")}function Gd(e){var t=e;return t.gpuBuffer}function j2e(e){var t=e;return t.gpuSampler}function H2e(e){var t=e;return t.querySet}function G2e(e){if(e===x_.OcclusionConservative)return"occlusion";throw new Error("whoops")}function W2e(e){switch(e){case Fo.TRIANGLES:return"triangle-list";case Fo.POINTS:return"point-list";case Fo.TRIANGLE_STRIP:return"triangle-strip";case Fo.LINES:return"line-list";case Fo.LINE_STRIP:return"line-strip";default:throw new Error("Unknown primitive topology mode")}}function X2e(e){if(e===Uu.NONE)return"none";if(e===Uu.FRONT)return"front";if(e===Uu.BACK)return"back";throw new Error("whoops")}function Y2e(e){if(e===Bm.CCW)return"ccw";if(e===Bm.CW)return"cw";throw new Error("whoops")}function Z2e(e,t){return{topology:W2e(e),cullMode:X2e(t.cullMode),frontFace:Y2e(t.frontFace)}}function B9(e){if(e===Ai.ZERO)return"zero";if(e===Ai.ONE)return"one";if(e===Ai.SRC)return"src";if(e===Ai.ONE_MINUS_SRC)return"one-minus-src";if(e===Ai.DST)return"dst";if(e===Ai.ONE_MINUS_DST)return"one-minus-dst";if(e===Ai.SRC_ALPHA)return"src-alpha";if(e===Ai.ONE_MINUS_SRC_ALPHA)return"one-minus-src-alpha";if(e===Ai.DST_ALPHA)return"dst-alpha";if(e===Ai.ONE_MINUS_DST_ALPHA)return"one-minus-dst-alpha";if(e===Ai.CONST)return"constant";if(e===Ai.ONE_MINUS_CONSTANT)return"one-minus-constant";if(e===Ai.SRC_ALPHA_SATURATE)return"src-alpha-saturated";throw new Error("whoops")}function q2e(e){if(e===hs.ADD)return"add";if(e===hs.SUBSTRACT)return"subtract";if(e===hs.REVERSE_SUBSTRACT)return"reverse-subtract";if(e===hs.MIN)return"min";if(e===hs.MAX)return"max";throw new Error("whoops")}function L9(e){return{operation:q2e(e.blendMode),srcFactor:B9(e.blendSrcFactor),dstFactor:B9(e.blendDstFactor)}}function N9(e){return e.blendMode===hs.ADD&&e.blendSrcFactor===Ai.ONE&&e.blendDstFactor===Ai.ZERO}function K2e(e){if(!(N9(e.rgbBlendState)&&N9(e.alphaBlendState)))return{color:L9(e.rgbBlendState),alpha:L9(e.alphaBlendState)}}function Q2e(e,t){return{format:Sb(t),blend:K2e(e),writeMask:e.channelWriteMask}}function J2e(e,t){return t.attachmentsState.map(function(r,n){return Q2e(r,e[n])})}function zg(e){if(e===Ki.NEVER)return"never";if(e===Ki.LESS)return"less";if(e===Ki.EQUAL)return"equal";if(e===Ki.LEQUAL)return"less-equal";if(e===Ki.GREATER)return"greater";if(e===Ki.NOTEQUAL)return"not-equal";if(e===Ki.GEQUAL)return"greater-equal";if(e===Ki.ALWAYS)return"always";throw new Error("whoops")}function Od(e){if(e===eo.KEEP)return"keep";if(e===eo.REPLACE)return"replace";if(e===eo.ZERO)return"zero";if(e===eo.DECREMENT_CLAMP)return"decrement-clamp";if(e===eo.DECREMENT_WRAP)return"decrement-wrap";if(e===eo.INCREMENT_CLAMP)return"increment-clamp";if(e===eo.INCREMENT_WRAP)return"increment-wrap";if(e===eo.INVERT)return"invert";throw new Error("whoops")}function ege(e,t){if(!Xl(e))return{format:Sb(e),depthWriteEnabled:!!t.depthWrite,depthCompare:zg(t.depthCompare),depthBias:t.polygonOffset?1:0,depthBiasSlopeScale:t.polygonOffset?1:0,stencilFront:{compare:zg(t.stencilFront.compare),passOp:Od(t.stencilFront.passOp),failOp:Od(t.stencilFront.failOp),depthFailOp:Od(t.stencilFront.depthFailOp)},stencilBack:{compare:zg(t.stencilBack.compare),passOp:Od(t.stencilBack.passOp),failOp:Od(t.stencilBack.failOp),depthFailOp:Od(t.stencilBack.depthFailOp)},stencilReadMask:1,stencilWriteMask:1}}function tge(e){if(e!==null){if(e===Ke.U16_R)return"uint16";if(e===Ke.U32_R)return"uint32";throw new Error("whoops")}}function rge(e){if(e===R1.VERTEX)return"vertex";if(e===R1.INSTANCE)return"instance";throw new Error("whoops")}function nge(e){if(e===Ke.U8_R)return"uint8x2";if(e===Ke.U8_RG)return"uint8x2";if(e===Ke.U8_RGB)return"uint8x4";if(e===Ke.U8_RGBA)return"uint8x4";if(e===Ke.U8_RG_NORM)return"unorm8x2";if(e===Ke.U8_RGBA_NORM)return"unorm8x4";if(e===Ke.S8_RGB_NORM)return"snorm8x4";if(e===Ke.S8_RGBA_NORM)return"snorm8x4";if(e===Ke.U16_RG_NORM)return"unorm16x2";if(e===Ke.U16_RGBA_NORM)return"unorm16x4";if(e===Ke.S16_RG_NORM)return"snorm16x2";if(e===Ke.S16_RGBA_NORM)return"snorm16x4";if(e===Ke.S16_RG)return"uint16x2";if(e===Ke.F16_RG)return"float16x2";if(e===Ke.F16_RGBA)return"float16x4";if(e===Ke.F32_R)return"float32";if(e===Ke.F32_RG)return"float32x2";if(e===Ke.F32_RGB)return"float32x3";if(e===Ke.F32_RGBA)return"float32x4";throw"whoops"}function ige(e){var t=_f(e);switch(t){case Kt.BC1:case Kt.BC2:case Kt.BC3:case Kt.BC4_SNORM:case Kt.BC4_UNORM:case Kt.BC5_SNORM:case Kt.BC5_UNORM:return!0;default:return!1}}function age(e){var t=_f(e);switch(t){case Kt.BC1:case Kt.BC2:case Kt.BC3:case Kt.BC4_SNORM:case Kt.BC4_UNORM:case Kt.BC5_SNORM:case Kt.BC5_UNORM:return 4;default:return 1}}function U9(e,t,r,n){switch(r===void 0&&(r=!1),e){case Ke.S8_R:case Ke.S8_R_NORM:case Ke.S8_RG_NORM:case Ke.S8_RGB_NORM:case Ke.S8_RGBA_NORM:{var i=t instanceof ArrayBuffer?new Int8Array(t):new Int8Array(t);return n&&i.set(new Int8Array(n)),i}case Ke.U8_R:case Ke.U8_R_NORM:case Ke.U8_RG:case Ke.U8_RG_NORM:case Ke.U8_RGB:case Ke.U8_RGB_NORM:case Ke.U8_RGB_SRGB:case Ke.U8_RGBA:case Ke.U8_RGBA_NORM:case Ke.U8_RGBA_SRGB:{var o=t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t);return n&&o.set(new Uint8Array(n)),o}case Ke.S16_R:case Ke.S16_RG:case Ke.S16_RG_NORM:case Ke.S16_RGB_NORM:case Ke.S16_RGBA:case Ke.S16_RGBA_NORM:{var a=t instanceof ArrayBuffer?new Int16Array(t):new Int16Array(r?t/2:t);return n&&a.set(new Int16Array(n)),a}case Ke.U16_R:case Ke.U16_RGB:case Ke.U16_RGBA_5551:case Ke.U16_RGBA_NORM:case Ke.U16_RG_NORM:case Ke.U16_R_NORM:{var u=t instanceof ArrayBuffer?new Uint16Array(t):new Uint16Array(r?t/2:t);return n&&u.set(new Uint16Array(n)),u}case Ke.S32_R:{var c=t instanceof ArrayBuffer?new Int32Array(t):new Int32Array(r?t/4:t);return n&&c.set(new Int32Array(n)),c}case Ke.U32_R:case Ke.U32_RG:{var f=t instanceof ArrayBuffer?new Uint32Array(t):new Uint32Array(r?t/4:t);return n&&f.set(new Uint32Array(n)),f}case Ke.F32_R:case Ke.F32_RG:case Ke.F32_RGB:case Ke.F32_RGBA:{var m=t instanceof ArrayBuffer?new Float32Array(t):new Float32Array(r?t/4:t);return n&&m.set(new Float32Array(n)),m}}var _=t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t);return n&&_.set(new Uint8Array(n)),_}function oge(e){var t=(e&32768)>>15,r=(e&31744)>>10,n=e&1023;return r===0?(t?-1:1)*Math.pow(2,-14)*(n/Math.pow(2,10)):r==31?n?NaN:(t?-1:1)*(1/0):(t?-1:1)*Math.pow(2,r-15)*(1+n/Math.pow(2,10))}function qO(e){switch(e){case"r8unorm":case"r8snorm":case"r8uint":case"r8sint":return{width:1,height:1,length:1};case"r16uint":case"r16sint":case"r16float":case"rg8unorm":case"rg8snorm":case"rg8uint":case"rg8sint":return{width:1,height:1,length:2};case"r32uint":case"r32sint":case"r32float":case"rg16uint":case"rg16sint":case"rg16float":case"rgba8unorm":case"rgba8unorm-srgb":case"rgba8snorm":case"rgba8uint":case"rgba8sint":case"bgra8unorm":case"bgra8unorm-srgb":case"rgb9e5ufloat":case"rgb10a2unorm":case"rg11b10ufloat":return{width:1,height:1,length:4};case"rg32uint":case"rg32sint":case"rg32float":case"rgba16uint":case"rgba16sint":case"rgba16float":return{width:1,height:1,length:8};case"rgba32uint":case"rgba32sint":case"rgba32float":return{width:1,height:1,length:16};case"stencil8":throw new Error("No fixed size for Stencil8 format!");case"depth16unorm":return{width:1,height:1,length:2};case"depth24plus":throw new Error("No fixed size for Depth24Plus format!");case"depth24plus-stencil8":throw new Error("No fixed size for Depth24PlusStencil8 format!");case"depth32float":return{width:1,height:1,length:4};case"depth32float-stencil8":return{width:1,height:1,length:5};case"bc7-rgba-unorm":case"bc7-rgba-unorm-srgb":case"bc6h-rgb-ufloat":case"bc6h-rgb-float":case"bc2-rgba-unorm":case"bc2-rgba-unorm-srgb":case"bc3-rgba-unorm":case"bc3-rgba-unorm-srgb":case"bc5-rg-unorm":case"bc5-rg-snorm":return{width:4,height:4,length:16};case"bc4-r-unorm":case"bc4-r-snorm":case"bc1-rgba-unorm":case"bc1-rgba-unorm-srgb":return{width:4,height:4,length:8};default:return{width:1,height:1,length:4}}}var Ac=function(e){to(t,e);function t(r){var n=r.id,i=r.device,o=e.call(this)||this;return o.id=n,o.device=i,o}return t.prototype.destroy=function(){},t}(FO),sge=function(e){to(t,e);function t(r){var n=r.id,i=r.device,o=r.descriptor,a,u,c=e.call(this,{id:n,device:i})||this;c.type=ji.Bindings;var f=o.pipeline;ii(!!f);var m=o.uniformBufferBindings,_=o.storageBufferBindings,b=o.samplerBindings,A=o.storageTextureBindings;c.numUniformBuffers=(m==null?void 0:m.length)||0;var w=[[],[],[],[]],R=0;if(m&&m.length)for(var P=0;P_;)this.device.device.queue.writeBuffer(a,r+b,n.buffer,u+b,_),b+=_;this.device.device.queue.writeBuffer(a,r+b,n.buffer,u+b,o-b)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.gpuBuffer.destroy()},t}(Ac),z9=function(){function e(){this.gpuComputePassEncoder=null}return e.prototype.dispatchWorkgroups=function(t,r,n){this.gpuComputePassEncoder.dispatchWorkgroups(t,r,n)},e.prototype.dispatchWorkgroupsIndirect=function(t,r){this.gpuComputePassEncoder.dispatchWorkgroupsIndirect(t.gpuBuffer,r)},e.prototype.finish=function(){this.gpuComputePassEncoder.end(),this.gpuComputePassEncoder=null,this.frameCommandEncoder=null},e.prototype.beginComputePass=function(t){ii(this.gpuComputePassEncoder===null),this.frameCommandEncoder=t,this.gpuComputePassEncoder=this.frameCommandEncoder.beginComputePass(this.gpuComputePassDescriptor)},e.prototype.setPipeline=function(t){var r=t,n=g1(r.gpuComputePipeline);this.gpuComputePassEncoder.setPipeline(n)},e.prototype.setBindings=function(t){var r=this,n=t;n.gpuBindGroup.forEach(function(i,o){i&&r.gpuComputePassEncoder.setBindGroup(o,n.gpuBindGroup[o])})},e.prototype.pushDebugGroup=function(t){this.gpuComputePassEncoder.pushDebugGroup(t)},e.prototype.popDebugGroup=function(){this.gpuComputePassEncoder.popDebugGroup()},e.prototype.insertDebugMarker=function(t){this.gpuComputePassEncoder.insertDebugMarker(t)},e}(),lge=function(e){to(t,e);function t(r){var n=r.id,i=r.device,o=r.descriptor,a=e.call(this,{id:n,device:i})||this;a.type=ji.ComputePipeline,a.gpuComputePipeline=null,a.descriptor=o;var u=o.program,c=u.computeStage;if(c===null)return a;var f={layout:"auto",compute:Ka({},c)};return a.gpuComputePipeline=a.device.device.createComputePipeline(f),a.name!==void 0&&(a.gpuComputePipeline.label=a.name),a}return t.prototype.getBindGroupLayout=function(r){return this.gpuComputePipeline.getBindGroupLayout(r)},t}(Ac),cge=function(e){to(t,e);function t(r){var n,i,o,a,u=r.id,c=r.device,f=r.descriptor,m=e.call(this,{id:u,device:c})||this;m.type=ji.InputLayout;var _=[];try{for(var b=C1(f.vertexBufferDescriptors),A=b.next();!A.done;A=b.next()){var w=A.value,R=w.arrayStride,P=w.stepMode,k=w.attributes;_.push({arrayStride:R,stepMode:rge(P),attributes:[]});try{for(var L=(o=void 0,C1(k)),B=L.next();!B.done;B=L.next()){var V=B.value,G=V.shaderLocation,K=V.format,Z=V.offset;_[_.length-1].attributes.push({shaderLocation:G,format:nge(K),offset:Z})}}catch(ve){o={error:ve}}finally{try{B&&!B.done&&(a=L.return)&&a.call(L)}finally{if(o)throw o.error}}}}catch(ve){n={error:ve}}finally{try{A&&!A.done&&(i=b.return)&&i.call(b)}finally{if(n)throw n.error}}return m.indexFormat=tge(f.indexBufferFormat),m.buffers=_,m}return t}(Ac),$9=function(e){to(t,e);function t(r){var n=r.id,i=r.device,o=r.descriptor,a=e.call(this,{id:n,device:i})||this;return a.type=ji.Program,a.vertexStage=null,a.fragmentStage=null,a.computeStage=null,a.descriptor=o,o.vertex&&(a.vertexStage=a.createShaderStage(o.vertex,"vertex")),o.fragment&&(a.fragmentStage=a.createShaderStage(o.fragment,"fragment")),o.compute&&(a.computeStage=a.createShaderStage(o.compute,"compute")),a}return t.prototype.setUniformsLegacy=function(r){},t.prototype.createShaderStage=function(r,n){var i,o,a=r.glsl,u=r.wgsl,c=r.entryPoint,f=r.postprocess,m=!1,_=u;if(!_)try{_=this.device.glsl_compile(a,n,m)}catch(k){throw console.error(k,a),new Error("whoops")}var b=function(k){if(!_.includes(k))return"continue";_=_.replace("var T_".concat(k,": texture_2d;"),"var T_".concat(k,": texture_depth_2d;")),_=_.replace(new RegExp("textureSample\\(T_".concat(k,"(.*)\\);$"),"gm"),function(L,B){return"vec4(textureSample(T_".concat(k).concat(B,"), 0.0, 0.0, 0.0);")})};try{for(var A=C1(["u_TextureFramebufferDepth"]),w=A.next();!w.done;w=A.next()){var R=w.value;b(R)}}catch(k){i={error:k}}finally{try{w&&!w.done&&(o=A.return)&&o.call(A)}finally{if(i)throw i.error}}f&&(_=f(_));var P=this.device.device.createShaderModule({code:_});return{module:P,entryPoint:c||"main"}},t}(Ac),fge=function(e){to(t,e);function t(r){var n=r.id,i=r.device,o=r.descriptor,a=e.call(this,{id:n,device:i})||this;a.type=ji.QueryPool;var u=o.elemCount,c=o.type;return a.querySet=a.device.device.createQuerySet({type:G2e(c),count:u}),a.resolveBuffer=a.device.device.createBuffer({size:u*8,usage:GPUBufferUsage.QUERY_RESOLVE|GPUBufferUsage.COPY_SRC}),a.cpuBuffer=a.device.device.createBuffer({size:u*8,usage:GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ}),a.results=null,a}return t.prototype.queryResultOcclusion=function(r){return this.results===null?null:this.results[r]!==BigInt(0)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.querySet.destroy(),this.resolveBuffer.destroy(),this.cpuBuffer.destroy()},t}(Ac),hge=function(e){to(t,e);function t(r){var n=r.id,i=r.device,o=e.call(this,{id:n,device:i})||this;return o.type=ji.Readback,o}return t.prototype.readTexture=function(r,n,i,o,a,u,c,f){return c===void 0&&(c=0),t0(this,void 0,void 0,function(){var m,_,b,A,w,R,P,k;return r0(this,function(L){return m=r,_=0,b=qO(m.gpuTextureformat),A=Math.ceil(o/b.width)*b.length,w=Math.ceil(A/256)*256,R=w*a,P=this.device.createBuffer({usage:da.STORAGE|da.MAP_READ|da.COPY_DST,hint:Ec.STATIC,viewOrSize:R}),k=this.device.device.createCommandEncoder(),k.copyTextureToBuffer({texture:m.gpuTexture,mipLevel:0,origin:{x:n,y:i,z:Math.max(_,0)}},{buffer:P.gpuBuffer,offset:0,bytesPerRow:w},{width:o,height:a,depthOrArrayLayers:1}),this.device.device.queue.submit([k.finish()]),[2,this.readBuffer(P,0,u.byteLength===R?u:null,c,R,m.format,!0,!1,A,w,a)]})})},t.prototype.readTextureSync=function(r,n,i,o,a,u,c,f){throw new Error("ERROR_MSG_METHOD_NOT_IMPLEMENTED")},t.prototype.readBuffer=function(r,n,i,o,a,u,c,f,m,_,b){var A=this;n===void 0&&(n=0),i===void 0&&(i=null),a===void 0&&(a=0),u===void 0&&(u=Ke.U8_RGB),c===void 0&&(c=!1),m===void 0&&(m=0),_===void 0&&(_=0),b===void 0&&(b=0);var w=r,R=a||w.size,P=i||w.view,k=P&&P.constructor&&P.constructor.BYTES_PER_ELEMENT||LO(u),L=w;if(!(w.usage&da.MAP_READ&&w.usage&da.COPY_DST)){var B=this.device.device.createCommandEncoder();L=this.device.createBuffer({usage:da.STORAGE|da.MAP_READ|da.COPY_DST,hint:Ec.STATIC,viewOrSize:R}),B.copyBufferToBuffer(w.gpuBuffer,n,L.gpuBuffer,0,R),this.device.device.queue.submit([B.finish()])}return new Promise(function(V,G){L.gpuBuffer.mapAsync($x.READ,n,R).then(function(){var K=L.gpuBuffer.getMappedRange(n,R),Z=P;if(c)Z===null?Z=U9(u,R,!0,K):Z=U9(u,Z.buffer,void 0,K);else if(Z===null)switch(k){case 1:Z=new Uint8Array(R),Z.set(new Uint8Array(K));break;case 2:Z=A.getHalfFloatAsFloatRGBAArrayBuffer(R/2,K);break;case 4:Z=new Float32Array(R/4),Z.set(new Float32Array(K));break}else switch(k){case 1:Z=new Uint8Array(Z.buffer),Z.set(new Uint8Array(K));break;case 2:Z=A.getHalfFloatAsFloatRGBAArrayBuffer(R/2,K,P);break;case 4:var ve=P&&P.constructor||Float32Array;Z=new ve(Z.buffer),Z.set(new ve(K));break}if(m!==_){k===1&&!c&&(m*=2,_*=2);for(var Ie=new Uint8Array(Z.buffer),de=m,se=0,le=1;le1?b.resolveTarget=this.getTextureView(_,this.gfxColorResolveToLevel[f]):b.storeOp="store")}else{this.gpuColorAttachments.length=f,this.gfxColorAttachment.length=f,this.gfxColorResolveTo.length=f;break}}if(this.gfxDepthStencilAttachment=t.depthStencilAttachment,this.gfxDepthStencilResolveTo=t.depthStencilResolveTo,t.depthStencilAttachment){var w=t.depthStencilAttachment,b=this.gpuDepthStencilAttachment;b.view=w.gpuTextureView;var R=!!(g0(w.format)&Wr.Depth);R?(t.depthClearValue==="load"?b.depthLoadOp="load":(b.depthLoadOp="clear",b.depthClearValue=t.depthClearValue),t.depthStencilStore||this.gfxDepthStencilResolveTo!==null?b.depthStoreOp="store":b.depthStoreOp="discard"):(b.depthLoadOp=void 0,b.depthStoreOp=void 0);var P=!!(g0(w.format)&Wr.Stencil);P?(t.stencilClearValue==="load"?b.stencilLoadOp="load":(b.stencilLoadOp="clear",b.stencilClearValue=t.stencilClearValue),t.depthStencilStore||this.gfxDepthStencilResolveTo!==null?b.stencilStoreOp="store":b.stencilStoreOp="discard"):(b.stencilLoadOp=void 0,b.stencilStoreOp=void 0),this.gpuRenderPassDescriptor.depthStencilAttachment=this.gpuDepthStencilAttachment}else this.gpuRenderPassDescriptor.depthStencilAttachment=void 0;this.gpuRenderPassDescriptor.occlusionQuerySet=Xl(t.occlusionQueryPool)?void 0:H2e(t.occlusionQueryPool)},e.prototype.beginRenderPass=function(t,r){ii(this.gpuRenderPassEncoder===null),this.setRenderPassDescriptor(r),this.frameCommandEncoder=t,this.gpuRenderPassEncoder=this.frameCommandEncoder.beginRenderPass(this.gpuRenderPassDescriptor)},e.prototype.flipY=function(t,r){var n=this.device.swapChainHeight;return n-t-r},e.prototype.setViewport=function(t,r,n,i,o,a){o===void 0&&(o=0),a===void 0&&(a=1),this.gpuRenderPassEncoder.setViewport(t,this.flipY(r,i),n,i,o,a)},e.prototype.setScissorRect=function(t,r,n,i){this.gpuRenderPassEncoder.setScissorRect(t,this.flipY(r,i),n,i)},e.prototype.setPipeline=function(t){var r=t,n=g1(r.gpuRenderPipeline);this.getEncoder().setPipeline(n)},e.prototype.setVertexInput=function(t,r,n){if(t!==null){var i=this.getEncoder(),o=t;n!==null&&i.setIndexBuffer(Gd(n.buffer),g1(o.indexFormat),n.offset);for(var a=0;a1||this.copyAttachment(this.gfxDepthStencilResolveTo,0,this.gfxDepthStencilAttachment,0)),this.frameCommandEncoder=null},e.prototype.copyAttachment=function(t,r,n,i){ii(n.sampleCount===1);var o={texture:n.gpuTexture,mipLevel:i},a={texture:t.gpuTexture,mipLevel:r};ii(n.width>>>i===t.width>>>r),ii(n.height>>>i===t.height>>>r),ii(!!(n.usage&es.COPY_SRC)),ii(!!(t.usage&es.COPY_DST)),this.frameCommandEncoder.copyTextureToTexture(o,a,[t.width,t.height,1])},e}(),pge=function(e){to(t,e);function t(r){var n=r.id,i=r.device,o=r.descriptor,a=e.call(this,{id:n,device:i})||this;return a.type=ji.RenderPipeline,a.isCreatingAsync=!1,a.gpuRenderPipeline=null,a.descriptor=o,a.device.createRenderPipelineInternal(a,!1),a}return t.prototype.getBindGroupLayout=function(r){return this.gpuRenderPipeline.getBindGroupLayout(r)},t}(Ac),dge=function(e){to(t,e);function t(r){var n=r.id,i=r.device,o=r.descriptor,a,u,c=e.call(this,{id:n,device:i})||this;c.type=ji.Sampler;var f=o.lodMinClamp,m=o.mipmapFilter===ts.NO_MIP?o.lodMinClamp:o.lodMaxClamp,_=(a=o.maxAnisotropy)!==null&&a!==void 0?a:1;return _>1&&ii(o.minFilter===vo.BILINEAR&&o.magFilter===vo.BILINEAR&&o.mipmapFilter===ts.LINEAR),c.gpuSampler=c.device.device.createSampler({addressModeU:p6(o.addressModeU),addressModeV:p6(o.addressModeV),addressModeW:p6((u=o.addressModeW)!==null&&u!==void 0?u:o.addressModeU),lodMinClamp:f,lodMaxClamp:m,minFilter:F9(o.minFilter),magFilter:F9(o.magFilter),mipmapFilter:V2e(o.mipmapFilter),compare:o.compareFunction!==void 0?zg(o.compareFunction):void 0,maxAnisotropy:_}),c}return t}(Ac),sg=function(e){to(t,e);function t(r){var n=r.id,i=r.device,o=r.descriptor,a=r.skipCreate,u=r.sampleCount,c=e.call(this,{id:n,device:i})||this;c.type=ji.Texture,c.flipY=!1;var f=o.format,m=o.dimension,_=o.width,b=o.height,A=o.depthOrArrayLayers,w=o.mipLevelCount,R=o.usage,P=o.pixelStore;return c.flipY=!!(P!=null&&P.unpackFlipY),c.device.createTextureShared({format:f,dimension:m??Ti.TEXTURE_2D,width:_,height:b,depthOrArrayLayers:A??1,mipLevelCount:w??1,usage:R,sampleCount:u??1},c,a),c}return t.prototype.textureFromImageBitmapOrCanvas=function(r,n,i){for(var o=n[0].width,a=n[0].height,u={size:{width:o,height:a,depthOrArrayLayers:i},format:"rgba8unorm",usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.RENDER_ATTACHMENT},c=r.createTexture(u),f=0;f>>2,uniformBufferWordAlignment:this.device.limits.minUniformBufferOffsetAlignment>>>2,supportedSampleCounts:[1],occlusionQueriesRecommended:!0,computeShadersSupported:!0}},e.prototype.queryTextureFormatSupported=function(t,r,n){if(ige(t)){if(!this.featureTextureCompressionBC)return!1;var i=age(t);return r%i!==0||n%i!==0?!1:this.featureTextureCompressionBC}switch(t){case Ke.U16_RGBA_NORM:return!1;case Ke.F32_RGBA:return!1}return!0},e.prototype.queryPlatformAvailable=function(){return!0},e.prototype.queryVendorInfo=function(){return this},e.prototype.queryRenderPass=function(t){var r=t;return r.descriptor},e.prototype.queryRenderTarget=function(t){var r=t;return r},e.prototype.setResourceName=function(t,r){if(t.name=r,t.type===ji.Buffer){var n=t;n.gpuBuffer.label=r}else if(t.type===ji.Texture){var n=t;n.gpuTexture.label=r,n.gpuTextureView.label=r}else if(t.type===ji.RenderTarget){var n=t;n.gpuTexture.label=r,n.gpuTextureView.label=r}else if(t.type===ji.Sampler){var n=t;n.gpuSampler.label=r}else if(t.type===ji.RenderPipeline){var n=t;n.gpuRenderPipeline!==null&&(n.gpuRenderPipeline.label=r)}},e.prototype.setResourceLeakCheck=function(t,r){},e.prototype.checkForLeaks=function(){},e.prototype.programPatched=function(t){},e.prototype.pipelineQueryReady=function(t){var r=t;return r.gpuRenderPipeline!==null},e.prototype.pipelineForceReady=function(t){var r=t;this.createRenderPipelineInternal(r,!1)},e}(),gge=function(){function e(t){this.pluginOptions=t}return e.prototype.createSwapChain=function(t){return t0(this,void 0,void 0,function(){var r,n,i,o,a,u,c,f;return r0(this,function(m){switch(m.label){case 0:if(globalThis.navigator.gpu===void 0)return[2,null];r=null,m.label=1;case 1:return m.trys.push([1,3,,4]),n=this.pluginOptions.xrCompatible,[4,globalThis.navigator.gpu.requestAdapter({xrCompatible:n})];case 2:return r=m.sent(),[3,4];case 3:return i=m.sent(),console.log(i),[3,4];case 4:return r===null?[2,null]:(o=["depth32float-stencil8","texture-compression-bc","float32-filterable"],a=o.filter(function(_){return r.features.has(_)}),[4,r.requestDevice({requiredFeatures:a})]);case 5:if(u=m.sent(),u&&(c=this.pluginOptions.onContextLost,u.lost.then(function(){c&&c()})),u===null)return[2,null];if(f=t.getContext("webgpu"),!f)return[2,null];m.label=6;case 6:return m.trys.push([6,8,,9]),[4,ZO(this.pluginOptions.shaderCompilerPath)];case 7:return m.sent(),[3,9];case 8:return m.sent(),[3,9];case 9:return[2,new mge(r,u,t,f,D2e,Nm&&new Nm)]}})})},e}(),_ge=function(){function e(t,r){Ht(this,e);var n=r.buffer,i=r.offset,o=r.stride,a=r.normalized,u=r.size,c=r.divisor,f=r.shaderLocation;this.buffer=n,this.attribute={shaderLocation:f,buffer:n.get(),offset:i||0,stride:o||0,normalized:a||!1,divisor:c||0},u&&(this.attribute.size=u)}return jt(e,[{key:"get",value:function(){return this.buffer}},{key:"updateBuffer",value:function(r){this.buffer.subData(r)}},{key:"destroy",value:function(){this.buffer.destroy()}}]),e}(),rp,qf,kd,Fv,Bv,Kc,ug,c1,Fs,Qc,Jc,C_=(rp={},F(rp,W.FLOAT,Float32Array),F(rp,W.UNSIGNED_BYTE,Uint8Array),F(rp,W.SHORT,Int16Array),F(rp,W.UNSIGNED_SHORT,Uint16Array),F(rp,W.INT,Int32Array),F(rp,W.UNSIGNED_INT,Uint32Array),rp),yge=(qf={},F(qf,W.POINTS,Fo.POINTS),F(qf,W.LINES,Fo.LINES),F(qf,W.LINE_LOOP,Fo.LINES),F(qf,W.LINE_STRIP,Fo.LINE_STRIP),F(qf,W.TRIANGLES,Fo.TRIANGLES),F(qf,W.TRIANGLE_FAN,Fo.TRIANGLES),F(qf,W.TRIANGLE_STRIP,Fo.TRIANGLE_STRIP),qf),xge=(kd={},F(kd,1,Ke.F32_R),F(kd,2,Ke.F32_RG),F(kd,3,Ke.F32_RGB),F(kd,4,Ke.F32_RGBA),kd),bge=(Fv={},F(Fv,W.STATIC_DRAW,Ec.STATIC),F(Fv,W.DYNAMIC_DRAW,Ec.DYNAMIC),F(Fv,W.STREAM_DRAW,Ec.DYNAMIC),Fv),j9=(Bv={},F(Bv,W.REPEAT,gu.REPEAT),F(Bv,W.CLAMP_TO_EDGE,gu.CLAMP_TO_EDGE),F(Bv,W.MIRRORED_REPEAT,gu.MIRRORED_REPEAT),Bv),Ege=(Kc={},F(Kc,W.NEVER,Ki.NEVER),F(Kc,W.ALWAYS,Ki.ALWAYS),F(Kc,W.LESS,Ki.LESS),F(Kc,W.LEQUAL,Ki.LEQUAL),F(Kc,W.GREATER,Ki.GREATER),F(Kc,W.GEQUAL,Ki.GEQUAL),F(Kc,W.EQUAL,Ki.EQUAL),F(Kc,W.NOTEQUAL,Ki.NOTEQUAL),Kc),Sge=(ug={},F(ug,W.FRONT,Uu.FRONT),F(ug,W.BACK,Uu.BACK),ug),H9=(c1={},F(c1,W.FUNC_ADD,hs.ADD),F(c1,W.MIN_EXT,hs.MIN),F(c1,W.MAX_EXT,hs.MAX),F(c1,W.FUNC_SUBTRACT,hs.SUBSTRACT),F(c1,W.FUNC_REVERSE_SUBTRACT,hs.REVERSE_SUBSTRACT),c1),lg=(Fs={},F(Fs,W.ZERO,Ai.ZERO),F(Fs,W.ONE,Ai.ONE),F(Fs,W.SRC_COLOR,Ai.SRC),F(Fs,W.ONE_MINUS_SRC_COLOR,Ai.ONE_MINUS_SRC),F(Fs,W.SRC_ALPHA,Ai.SRC_ALPHA),F(Fs,W.ONE_MINUS_SRC_ALPHA,Ai.ONE_MINUS_SRC_ALPHA),F(Fs,W.DST_COLOR,Ai.DST),F(Fs,W.ONE_MINUS_DST_COLOR,Ai.ONE_MINUS_DST),F(Fs,W.DST_ALPHA,Ai.DST_ALPHA),F(Fs,W.ONE_MINUS_DST_ALPHA,Ai.ONE_MINUS_DST_ALPHA),F(Fs,W.CONSTANT_COLOR,Ai.CONST),F(Fs,W.ONE_MINUS_CONSTANT_COLOR,Ai.ONE_MINUS_CONSTANT),F(Fs,W.CONSTANT_ALPHA,Ai.CONST),F(Fs,W.ONE_MINUS_CONSTANT_ALPHA,Ai.ONE_MINUS_CONSTANT),F(Fs,W.SRC_ALPHA_SATURATE,Ai.SRC_ALPHA_SATURATE),Fs),Dd=(Qc={},F(Qc,W.REPLACE,eo.REPLACE),F(Qc,W.KEEP,eo.KEEP),F(Qc,W.ZERO,eo.ZERO),F(Qc,W.INVERT,eo.INVERT),F(Qc,W.INCR,eo.INCREMENT_CLAMP),F(Qc,W.DECR,eo.DECREMENT_CLAMP),F(Qc,W.INCR_WRAP,eo.INCREMENT_WRAP),F(Qc,W.DECR_WRAP,eo.DECREMENT_WRAP),Qc),Age=(Jc={},F(Jc,W.ALWAYS,Ki.ALWAYS),F(Jc,W.EQUAL,Ki.EQUAL),F(Jc,W.GEQUAL,Ki.GEQUAL),F(Jc,W.GREATER,Ki.GREATER),F(Jc,W.LEQUAL,Ki.LEQUAL),F(Jc,W.LESS,Ki.LESS),F(Jc,W.NEVER,Ki.NEVER),F(Jc,W.NOTEQUAL,Ki.NOTEQUAL),Jc),Tge={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121};function R_(e){return Object.prototype.toString.call(e)in Tge}function wge(e,t){for(var r=e.length,n=Math.ceil(r/3),i=r+n,o=new Float32Array(i),a=0;a=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function Rge(e,t){if(e){if(typeof e=="string")return W9(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return W9(e,t)}}function W9(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:0;return e+=t,e+=e<<10,e+=e>>>6,e>>>0}function KO(e){return e+=e<<3,e^=e>>>11,e+=e<<15,e>>>0}function X9(e){return 0}var Ige=jt(function e(){Ht(this,e),F(this,"keys",[]),F(this,"values",[])}),cg=function(){function e(t,r){Ht(this,e),F(this,"buckets",new Map),this.keyEqualFunc=t,this.keyHashFunc=r}return jt(e,[{key:"findBucketIndex",value:function(r,n){for(var i=0;i=0)){u.next=12;break}return u.next=9,i.values[o];case 9:o--,u.next=6;break;case 12:u.next=3;break;case 14:u.next=19;break;case 16:u.prev=16,u.t0=u.catch(1),r.e(u.t0);case 19:return u.prev=19,r.f(),u.finish(19);case 22:case"end":return u.stop()}},t,this,[[1,16,19,22]])})}]),e}();function fg(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Mge(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function Mge(e,t){if(e){if(typeof e=="string")return Y9(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Y9(e,t)}}function Y9(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0}),n=this.device.createBindings(o),this.bindingsCache.add(o,n)}return n}},{key:"createRenderPipeline",value:function(r){var n=this.renderPipelinesCache.get(r);if(n===null){var i=Gme(r);i.colorAttachmentFormats=i.colorAttachmentFormats.filter(function(o){return o}),n=this.device.createRenderPipeline(i),this.renderPipelinesCache.add(i,n)}return n}},{key:"createInputLayout",value:function(r){r.vertexBufferDescriptors=r.vertexBufferDescriptors.filter(function(o){return!!o});var n=this.inputLayoutsCache.get(r);if(n===null){var i=Yme(r);n=this.device.createInputLayout(i),this.inputLayoutsCache.add(i,n)}return n}},{key:"createProgram",value:function(r){var n=this.programCache.get(r);if(n===null){var i=Lge(r);n=this.device.createProgram(r),this.programCache.add(i,n)}return n}},{key:"destroy",value:function(){var r=fg(this.bindingsCache.values()),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;i.destroy()}}catch(w){r.e(w)}finally{r.f()}var o=fg(this.renderPipelinesCache.values()),a;try{for(o.s();!(a=o.n()).done;){var u=a.value;u.destroy()}}catch(w){o.e(w)}finally{o.f()}var c=fg(this.inputLayoutsCache.values()),f;try{for(c.s();!(f=c.n()).done;){var m=f.value;m.destroy()}}catch(w){c.e(w)}finally{c.f()}var _=fg(this.programCache.values()),b;try{for(_.s();!(b=_.n()).done;){var A=b.value;A.destroy()}}catch(w){_.e(w)}finally{_.f()}this.bindingsCache.clear(),this.renderPipelinesCache.clear(),this.inputLayoutsCache.clear(),this.programCache.clear()}}]),e}(),Uge=function(){function e(t,r){Ht(this,e);var n=r.data,i=r.type,o=r.count,a=o===void 0?0:o,u;R_(n)?u=n:u=new C_[this.type||W.UNSIGNED_INT](n),this.type=i,this.count=a,this.indexBuffer=t.createBuffer({viewOrSize:u,usage:da.INDEX})}return jt(e,[{key:"get",value:function(){return this.indexBuffer}},{key:"subData",value:function(r){var n=r.data,i;R_(n)?i=n:i=new C_[this.type||W.UNSIGNED_INT](n),this.indexBuffer.setSubData(0,new Uint8Array(i.buffer))}},{key:"destroy",value:function(){this.indexBuffer.destroy()}}]),e}();function q9(e){return!!(e&&e.texture)}var QO=function(){function e(t,r){Ht(this,e),F(this,"isDestroy",!1),this.device=t,this.options=r;var n=r.wrapS,i=n===void 0?W.CLAMP_TO_EDGE:n,o=r.wrapT,a=o===void 0?W.CLAMP_TO_EDGE:o,u=r.aniso;r.mipmap;var c=r.mag,f=c===void 0?W.NEAREST:c,m=r.min,_=m===void 0?W.NEAREST:m;this.createTexture(r),this.sampler=t.createSampler({addressModeU:j9[i],addressModeV:j9[a],minFilter:_===W.NEAREST?vo.POINT:vo.BILINEAR,magFilter:f===W.NEAREST?vo.POINT:vo.BILINEAR,mipmapFilter:ts.NO_MIP,maxAnisotropy:u})}return jt(e,[{key:"createTexture",value:function(r){var n=r.type,i=n===void 0?W.UNSIGNED_BYTE:n,o=r.width,a=r.height,u=r.flipY,c=u===void 0?!1:u,f=r.format,m=f===void 0?W.RGBA:f;r.aniso;var _=r.alignment,b=_===void 0?1:_,A=r.usage,w=A===void 0?fx.SAMPLED:A,R=r.unorm,P=R===void 0?!1:R,k=r.label,L=r.data;this.width=o,this.height=a;var B=Ke.U8_RGBA_RT;if(i===W.UNSIGNED_BYTE&&m===W.RGBA)B=P?Ke.U8_RGBA_NORM:Ke.U8_RGBA_RT;else if(i===W.UNSIGNED_BYTE&&m===W.LUMINANCE)B=Ke.U8_LUMINANCE;else if(i===W.FLOAT&&m===W.RGB)this.device.queryVendorInfo().platformString==="WebGPU"?(L&&(L=wge(L,0)),B=Ke.F32_RGBA):B=Ke.F32_RGB;else if(i===W.FLOAT&&m===W.RGBA)B=Ke.F32_RGBA;else if(i===W.FLOAT&&m===W.RED)B=Ke.F32_R;else throw new Error("create texture error, type: ".concat(i,", format: ").concat(m));this.texture=this.device.createTexture({format:B,width:o,height:a,usage:w===fx.SAMPLED?nu.SAMPLED:nu.RENDER_TARGET,pixelStore:{unpackFlipY:c,packAlignment:b},mipLevelCount:1}),k&&this.device.setResourceName(this.texture,k),L&&this.texture.setImageData([L])}},{key:"get",value:function(){return this.texture}},{key:"update",value:function(r){var n=r.data;this.texture.setImageData([n])}},{key:"bind",value:function(){}},{key:"resize",value:function(r){var n=r.width,i=r.height;(this.width!==n||this.height!==i)&&this.destroy(),this.options.width=n,this.options.height=i,this.createTexture(this.options),this.isDestroy=!1}},{key:"getSize",value:function(){return[this.width,this.height]}},{key:"destroy",value:function(){if(!this.isDestroy&&!this.texture.destroyed){var r;(r=this.texture)===null||r===void 0||r.destroy()}this.isDestroy=!0}}]),e}(),JO=function(){function e(t,r){Ht(this,e),this.device=t,this.options=r,this.createColorRenderTarget(),this.createDepthRenderTarget()}return jt(e,[{key:"createColorRenderTarget",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.options,i=n.width,o=n.height,a=n.color;a&&(q9(a)?(r&&a.resize({width:i,height:o}),this.colorTexture=a.get(),this.colorRenderTarget=this.device.createRenderTargetFromTexture(this.colorTexture),this.width=a.width,this.height=a.height):i&&o&&(this.colorTexture=this.device.createTexture({format:Ke.U8_RGBA_RT,usage:nu.RENDER_TARGET,width:i,height:o}),this.colorRenderTarget=this.device.createRenderTargetFromTexture(this.colorTexture),this.width=i,this.height=o))}},{key:"createDepthRenderTarget",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.options,i=n.width,o=n.height,a=n.depth;a&&(q9(a)?(r&&a.resize({width:i,height:o}),this.depthTexture=a.get(),this.depthRenderTarget=this.device.createRenderTargetFromTexture(this.depthTexture),this.width=a.width,this.height=a.height):i&&o&&(this.depthTexture=this.device.createTexture({format:Ke.D24_S8,usage:nu.RENDER_TARGET,width:i,height:o}),this.depthRenderTarget=this.device.createRenderTargetFromTexture(this.depthTexture),this.width=i,this.height=o))}},{key:"get",value:function(){return this.colorRenderTarget}},{key:"destroy",value:function(){var r,n;(r=this.colorRenderTarget)===null||r===void 0||r.destroy(),(n=this.depthRenderTarget)===null||n===void 0||n.destroy()}},{key:"resize",value:function(r){var n=r.width,i=r.height;(this.width!==n||this.height!==i)&&(this.destroy(),this.colorTexture.destroyed=!0,this.depthTexture.destroyed=!0,this.options.width=n,this.options.height=i,this.createColorRenderTarget(!0),this.createDepthRenderTarget(!0))}}]),e}(),zge=Ci.isPlainObject,$ge=Ci.isTypedArray,Vge=function(){function e(t,r,n){var i=this;Ht(this,e),F(this,"destroyed",!1),F(this,"uniforms",{}),F(this,"vertexBuffers",[]),this.device=t,this.options=r,this.service=n;var o=r.vs,a=r.fs,u=r.attributes,c=r.uniforms,f=r.count,m=r.elements,_=r.diagnosticDerivativeUniformityEnabled;this.options=r;var b=_?"":this.service.viewportOrigin===vf.UPPER_LEFT?"diagnostic(off,derivative_uniformity);":"";this.program=n.renderCache.createProgram({vertex:{glsl:o},fragment:{glsl:a,postprocess:function(k){return b+k}}}),c&&(this.uniforms=this.extractUniforms(c));var A=[],w=0;Object.keys(u).forEach(function(P){var k=u[P],L=k.get();i.vertexBuffers.push(L.get());var B=k.attribute,V=B.offset,G=V===void 0?0:V,K=B.stride,Z=K===void 0?0:K,ve=B.size,Ie=ve===void 0?1:ve,de=B.divisor,se=de===void 0?0:de,le=B.shaderLocation,ye=le===void 0?0:le;A.push({arrayStride:Z||Ie*4,stepMode:R1.VERTEX,attributes:[{format:xge[Ie],shaderLocation:ye,offset:G,divisor:se}]}),w=L.size/Ie}),f||(this.options.count=w),m&&(this.indexBuffer=m.get());var R=n.renderCache.createInputLayout({vertexBufferDescriptors:A,indexBufferFormat:m?Ke.U32_R:null,program:this.program});this.inputLayout=R,this.pipeline=this.createPipeline(r)}return jt(e,[{key:"createPipeline",value:function(r,n){var i=r.primitive,o=i===void 0?W.TRIANGLES:i,a=r.depth,u=r.cull,c=r.blend,f=r.stencil,m=this.initDepthDrawParams({depth:a}),_=!!(m&&m.enable),b=this.initCullDrawParams({cull:u}),A=!!(b&&b.enable),w=this.getBlendDrawParams({blend:c}),R=!!(w&&w.enable),P=this.getStencilDrawParams({stencil:f}),k=!!(P&&P.enable);return this.device.createRenderPipeline({inputLayout:this.inputLayout,program:this.program,topology:yge[o],colorAttachmentFormats:[Ke.U8_RGBA_RT],depthStencilAttachmentFormat:Ke.D24_S8,megaStateDescriptor:{attachmentsState:[n?{channelWriteMask:fs.ALL,rgbBlendState:{blendMode:hs.ADD,blendSrcFactor:Ai.ONE,blendDstFactor:Ai.ZERO},alphaBlendState:{blendMode:hs.ADD,blendSrcFactor:Ai.ONE,blendDstFactor:Ai.ZERO}}:{channelWriteMask:k&&P.opFront.zpass===eo.REPLACE?fs.NONE:fs.ALL,rgbBlendState:{blendMode:R&&w.equation.rgb||hs.ADD,blendSrcFactor:R&&w.func.srcRGB||Ai.SRC_ALPHA,blendDstFactor:R&&w.func.dstRGB||Ai.ONE_MINUS_SRC_ALPHA},alphaBlendState:{blendMode:R&&w.equation.alpha||hs.ADD,blendSrcFactor:R&&w.func.srcAlpha||Ai.ONE,blendDstFactor:R&&w.func.dstAlpha||Ai.ONE}}],blendConstant:R?xy:void 0,depthWrite:_,depthCompare:_&&m.func||Ki.LESS,cullMode:A&&b.face||Uu.NONE,stencilWrite:k,stencilFront:{compare:k?P.func.cmp:Ki.ALWAYS,passOp:P.opFront.zpass,failOp:P.opFront.fail,depthFailOp:P.opFront.zfail,mask:P.opFront.mask},stencilBack:{compare:k?P.func.cmp:Ki.ALWAYS,passOp:P.opBack.zpass,failOp:P.opBack.fail,depthFailOp:P.opBack.zfail,mask:P.opBack.mask}}})}},{key:"updateAttributesAndElements",value:function(){}},{key:"updateAttributes",value:function(){}},{key:"addUniforms",value:function(r){this.uniforms=Qe(Qe({},this.uniforms),this.extractUniforms(r))}},{key:"draw",value:function(r,n){var i=this,o=Qe(Qe({},this.options),r),a=o.count,u=a===void 0?0:a,c=o.instances,f=o.elements,m=o.uniforms,_=m===void 0?{}:m,b=o.uniformBuffers,A=o.textures;this.uniforms=Qe(Qe({},this.uniforms),this.extractUniforms(_));var w=this.service,R=w.renderPass,P=w.currentFramebuffer,k=w.width,L=w.height,B=w.renderCache;this.pipeline=this.createPipeline(o,n);var V=this.service.device,G=V.swapChainHeight;if(V.swapChainHeight=(P==null?void 0:P.height)||L,R.setViewport(0,0,(P==null?void 0:P.width)||k,(P==null?void 0:P.height)||L),V.swapChainHeight=G,R.setPipeline(this.pipeline),R.setStencilReference(1),R.setVertexInput(this.inputLayout,this.vertexBuffers.map(function(Z){return{buffer:Z}}),f?{buffer:this.indexBuffer,offset:0}:null),b&&(this.bindings=B.createBindings({pipeline:this.pipeline,uniformBufferBindings:b.map(function(Z,ve){var Ie=Z;return{binding:ve,buffer:Ie.get(),size:Ie.size}}),samplerBindings:A==null?void 0:A.map(function(Z){return{texture:Z.texture,sampler:Z.sampler}})})),this.bindings&&(R.setBindings(this.bindings),Object.keys(this.uniforms).forEach(function(Z){var ve=i.uniforms[Z];ve instanceof QO?i.uniforms[Z]=ve.get():ve instanceof JO&&(i.uniforms[Z]=ve.get().texture)}),this.program.setUniformsLegacy(this.uniforms)),f){var K=f.count;K===0?R.draw(u,c):R.drawIndexed(K,c)}else R.draw(u,c)}},{key:"destroy",value:function(){var r,n,i;this.program.destroy(),(r=this.vertexBuffers)===null||r===void 0||r.forEach(function(o){return o.destroy()}),(n=this.indexBuffer)===null||n===void 0||n.destroy(),(i=this.bindings)===null||i===void 0||i.destroy(),this.inputLayout.destroy(),this.pipeline.destroy(),this.destroyed=!0}},{key:"initDepthDrawParams",value:function(r){var n=r.depth;if(n)return{enable:n.enable===void 0?!0:!!n.enable,mask:n.mask===void 0?!0:!!n.mask,func:Ege[n.func||W.LESS],range:n.range||[0,1]}}},{key:"getBlendDrawParams",value:function(r){var n=r.blend,i=n||{},o=i.enable,a=i.func,u=i.equation,c=i.color,f=c===void 0?[0,0,0,0]:c;return{enable:!!o,func:{srcRGB:lg[a&&a.srcRGB||W.SRC_ALPHA],srcAlpha:lg[a&&a.srcAlpha||W.SRC_ALPHA],dstRGB:lg[a&&a.dstRGB||W.ONE_MINUS_SRC_ALPHA],dstAlpha:lg[a&&a.dstAlpha||W.ONE_MINUS_SRC_ALPHA]},equation:{rgb:H9[u&&u.rgb||W.FUNC_ADD],alpha:H9[u&&u.alpha||W.FUNC_ADD]},color:f}}},{key:"getStencilDrawParams",value:function(r){var n=r.stencil,i=n||{},o=i.enable,a=i.mask,u=a===void 0?4294967295:a,c=i.func,f=c===void 0?{cmp:W.ALWAYS,ref:0,mask:4294967295}:c,m=i.opFront,_=m===void 0?{fail:W.KEEP,zfail:W.KEEP,zpass:W.KEEP}:m,b=i.opBack,A=b===void 0?{fail:W.KEEP,zfail:W.KEEP,zpass:W.KEEP}:b;return{enable:!!o,mask:u,func:Qe(Qe({},f),{},{cmp:Age[f.cmp]}),opFront:{fail:Dd[_.fail],zfail:Dd[_.zfail],zpass:Dd[_.zpass],mask:f.mask},opBack:{fail:Dd[A.fail],zfail:Dd[A.zfail],zpass:Dd[A.zpass],mask:f.mask}}}},{key:"initCullDrawParams",value:function(r){var n=r.cull;if(n){var i=n.enable,o=n.face,a=o===void 0?W.BACK:o;return{enable:!!i,face:Sge[a]}}}},{key:"extractUniforms",value:function(r){var n=this,i={};return Object.keys(r).forEach(function(o){n.extractUniformsRecursively(o,r[o],i,"")}),i}},{key:"extractUniformsRecursively",value:function(r,n,i,o){var a=this;if(n===null||typeof n=="number"||typeof n=="boolean"||Array.isArray(n)&&typeof n[0]=="number"||$ge(n)||n===""||"resize"in n){i["".concat(o&&o+".").concat(r)]=n;return}zge(n)&&Object.keys(n).forEach(function(u){a.extractUniformsRecursively(u,n[u],i,"".concat(o&&o+".").concat(r))}),Array.isArray(n)&&n.forEach(function(u,c){Object.keys(u).forEach(function(f){a.extractUniformsRecursively(f,u[f],i,"".concat(o&&o+".").concat(r,"[").concat(c,"]"))})})}}]),e}();function jge(e){return typeof WebGL2RenderingContext<"u"&&e instanceof WebGL2RenderingContext?!0:!!(e&&e._version===2)}var K9,Q9,hg=Ci.isUndefined,Hge=(K9=ai(),K9(Q9=function(){function e(){var t=this;Ht(this,e),F(this,"uniformBuffers",[]),F(this,"queryVerdorInfo",function(){return t.device.queryVendorInfo().platformString}),F(this,"createModel",function(r){return new Vge(t.device,r,t)}),F(this,"createAttribute",function(r){return new _ge(t.device,r)}),F(this,"createBuffer",function(r){return new Cge(t.device,r)}),F(this,"createElements",function(r){return new Uge(t.device,r)}),F(this,"createTexture2D",function(r){return new QO(t.device,r)}),F(this,"createFramebuffer",function(r){return new JO(t.device,r)}),F(this,"useFramebuffer",function(r,n){t.currentFramebuffer=r,t.beginFrame(),n(),t.endFrame(),t.currentFramebuffer=null}),F(this,"useFramebufferAsync",function(){var r=Mt(he.mark(function n(i,o){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return t.currentFramebuffer=i,t.preRenderPass=t.renderPass,t.beginFrame(),u.next=5,o();case 5:t.endFrame(),t.currentFramebuffer=null,t.renderPass=t.preRenderPass;case 8:case"end":return u.stop()}},n)}));return function(n,i){return r.apply(this,arguments)}}()),F(this,"clear",function(r){var n=r.color,i=r.depth,o=r.stencil,a=r.framebuffer,u=a===void 0?null:a;if(u)u.clearOptions={color:n,depth:i,stencil:o};else{var c=t.queryVerdorInfo();if(c==="WebGL1"){var f=t.getGLContext();hg(o)?hg(i)||(f.clearDepth(i),f.clear(f.DEPTH_BUFFER_BIT)):(f.clearStencil(o),f.clear(f.STENCIL_BUFFER_BIT))}else if(c==="WebGL2"){var m=t.getGLContext();hg(o)?hg(i)||m.clearBufferfv(m.DEPTH,0,[i]):m.clearBufferiv(m.STENCIL,0,[o])}}}),F(this,"viewport",function(r){var n=r.width,i=r.height;t.swapChain.configureSwapChain(n,i),t.createMainColorDepthRT(n,i),t.width=n,t.height=i}),F(this,"readPixels",function(r){var n=r.framebuffer,i=r.x,o=r.y,a=r.width,u=r.height,c=t.device.createReadback(),f=n.colorTexture,m=c.readTextureSync(f,i,t.viewportOrigin===vf.LOWER_LEFT?o:t.height-o,a,u,new Uint8Array(a*u*4));return c.destroy(),m}),F(this,"readPixelsAsync",function(){var r=Mt(he.mark(function n(i){var o,a,u,c,f,m,_,b,A,w;return he.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return o=i.framebuffer,a=i.x,u=i.y,c=i.width,f=i.height,m=t.device.createReadback(),_=o.colorTexture,P.next=5,m.readTexture(_,a,t.viewportOrigin===vf.LOWER_LEFT?u:t.height-u,c,f,new Uint8Array(c*f*4));case 5:if(b=P.sent,t.viewportOrigin!==vf.LOWER_LEFT)for(A=0;A"u";case"symbol":return typeof U=="symbol"}}function b(U,fe,Me){_(U,fe)||a("invalid parameter type"+c(Me)+". expected "+fe+", got "+typeof U)}function A(U,fe){U>=0&&(U|0)===U||a("invalid parameter type, ("+U+")"+c(fe)+". must be a nonnegative integer")}function w(U,fe,Me){fe.indexOf(U)<0&&a("invalid value"+c(Me)+". must be one of: "+fe)}var R=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function P(U){Object.keys(U).forEach(function(fe){R.indexOf(fe)<0&&a('invalid regl constructor argument "'+fe+'". must be one of '+R)})}function k(U,fe){for(U=U+"";U.length0&&fe.push(new V("unknown",0,Me))}}),fe}function Ie(U,fe){fe.forEach(function(Me){var gt=U[Me.file];if(gt){var zt=gt.index[Me.line];if(zt){zt.errors.push(Me),gt.hasErrors=!0;return}}U.unknown.hasErrors=!0,U.unknown.lines[0].errors.push(Me)})}function de(U,fe,Me,gt,zt){if(!U.getShaderParameter(fe,U.COMPILE_STATUS)){var xt=U.getShaderInfoLog(fe),lt=gt===U.FRAGMENT_SHADER?"fragment":"vertex";Gt(Me,"string",lt+" shader source must be a string",zt);var gr=Z(Me,zt),sr=ve(xt);Ie(gr,sr),Object.keys(gr).forEach(function(Ir){var xr=gr[Ir];if(!xr.hasErrors)return;var wr=[""],Or=[""];function cr(Cr,rt){wr.push(Cr),Or.push(rt||"")}cr("file number "+Ir+": "+xr.name+` `,"color:red;text-decoration:underline;font-weight:bold"),xr.lines.forEach(function(Cr){if(Cr.errors.length>0){cr(k(Cr.number,4)+"| ","background-color:yellow; font-weight:bold"),cr(Cr.line+i,"color:red; background-color:yellow; font-weight:bold");var rt=0;Cr.errors.forEach(function(Pt){var _r=Pt.message,Nr=/^\s*'(.*)'\s*:\s*(.*)$/.exec(_r);if(Nr){var Jt=Nr[1];switch(_r=Nr[2],Jt){case"assign":Jt="=";break}rt=Math.max(Cr.line.indexOf(Jt,rt),0)}else rt=0;cr(k("| ",6)),cr(k("^^^",rt+3)+i,"font-weight:bold"),cr(k("| ",6)),cr(_r+i,"font-weight:bold")}),cr(k("| ",6)+i)}else cr(k(Cr.number,4)+"| "),cr(Cr.line+i,"color:red")}),typeof document<"u"&&!window.chrome?(Or[0]=wr.join("%c"),console.log.apply(console,Or)):console.log(wr.join(""))}),u.raise("Error compiling "+lt+" shader, "+gr[0].name)}}function se(U,fe,Me,gt,zt){if(!U.getProgramParameter(fe,U.LINK_STATUS)){var xt=U.getProgramInfoLog(fe),lt=Z(Me,zt),gr=Z(gt,zt),sr='Error linking program with vertex shader, "'+gr[0].name+'", and fragment shader "'+lt[0].name+'"';typeof document<"u"?console.log("%c"+sr+i+"%c"+xt,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(sr+i+xt),u.raise(sr)}}function le(U){U._commandRef=G()}function ye(U,fe,Me,gt){le(U);function zt(sr){return sr?gt.id(sr):0}U._fragId=zt(U.static.frag),U._vertId=zt(U.static.vert);function xt(sr,Ir){Object.keys(Ir).forEach(function(xr){sr[gt.id(xr)]=!0})}var lt=U._uniformSet={};xt(lt,fe.static),xt(lt,fe.dynamic);var gr=U._attributeSet={};xt(gr,Me.static),xt(gr,Me.dynamic),U._hasCount="count"in U.static||"count"in U.dynamic||"elements"in U.static||"elements"in U.dynamic}function ke(U,fe){var Me=K();a(U+" in command "+(fe||G())+(Me==="unknown"?"":" called from "+Me))}function Rt(U,fe,Me){U||ke(fe,Me||G())}function Lt(U,fe,Me,gt){U in fe||ke("unknown parameter ("+U+")"+c(Me)+". possible values: "+Object.keys(fe).join(),gt||G())}function Gt(U,fe,Me,gt){_(U,fe)||ke("invalid parameter type"+c(Me)+". expected "+fe+", got "+typeof U,gt||G())}function Zt(U){U()}function st(U,fe,Me){U.texture?w(U.texture._texture.internalformat,fe,"unsupported texture format for attachment"):w(U.renderbuffer._renderbuffer.format,Me,"unsupported renderbuffer format for attachment")}var tt=33071,dt=9728,nt=9984,pr=9985,ur=9986,Ar=9987,Xn=5120,pn=5121,gi=5122,Je=5123,Qt=5124,Xr=5125,Ut=5126,ge=32819,Be=32820,ft=33635,At=34042,bt=36193,$t={};$t[Xn]=$t[pn]=1,$t[gi]=$t[Je]=$t[bt]=$t[ft]=$t[ge]=$t[Be]=2,$t[Qt]=$t[Xr]=$t[Ut]=$t[At]=4;function Mr(U,fe){return U===Be||U===ge||U===ft?2:U===At?4:$t[U]*fe}function tr(U){return!(U&U-1)&&!!U}function lr(U,fe,Me){var gt,zt=fe.width,xt=fe.height,lt=fe.channels;u(zt>0&&zt<=Me.maxTextureSize&&xt>0&&xt<=Me.maxTextureSize,"invalid texture shape"),(U.wrapS!==tt||U.wrapT!==tt)&&u(tr(zt)&&tr(xt),"incompatible wrap mode for texture, both width and height must be power of 2"),fe.mipmask===1?zt!==1&&xt!==1&&u(U.minFilter!==nt&&U.minFilter!==ur&&U.minFilter!==pr&&U.minFilter!==Ar,"min filter requires mipmap"):(u(tr(zt)&&tr(xt),"texture must be a square power of 2 to support mipmapping"),u(fe.mipmask===(zt<<1)-1,"missing or incomplete mipmap data")),fe.type===Ut&&(Me.extensions.indexOf("oes_texture_float_linear")<0&&u(U.minFilter===dt&&U.magFilter===dt,"filter not supported, must enable oes_texture_float_linear"),u(!U.genMipmaps,"mipmap generation not supported with float textures"));var gr=fe.images;for(gt=0;gt<16;++gt)if(gr[gt]){var sr=zt>>gt,Ir=xt>>gt;u(fe.mipmask&1<0&&zt<=gt.maxTextureSize&&xt>0&&xt<=gt.maxTextureSize,"invalid texture shape"),u(zt===xt,"cube map must be square"),u(fe.wrapS===tt&&fe.wrapT===tt,"wrap mode not supported by cube map");for(var gr=0;gr>xr,cr=xt>>xr;u(sr.mipmask&1<1&&fe===Me&&(fe==='"'||fe==="'"))return['"'+rr(U.substr(1,U.length-2))+'"'];var gt=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(U);if(gt)return hr(U.substr(0,gt.index)).concat(hr(gt[1])).concat(hr(U.substr(gt.index+gt[0].length)));var zt=U.split(".");if(zt.length===1)return['"'+rr(U)+'"'];for(var xt=[],lt=0;lt"u"?1:window.devicePixelRatio,xr=!1,wr=function(Cr){Cr&&Q.raise(Cr)},Or=function(){};if(typeof fe=="string"?(Q(typeof document<"u","selector queries only supported in DOM enviroments"),Me=document.querySelector(fe),Q(Me,"invalid query string for element")):typeof fe=="object"?en(fe)?Me=fe:fn(fe)?(xt=fe,zt=xt.canvas):(Q.constructor(fe),"gl"in fe?xt=fe.gl:"canvas"in fe?zt=un(fe.canvas):"container"in fe&&(gt=un(fe.container)),"attributes"in fe&&(lt=fe.attributes,Q.type(lt,"object","invalid context attributes")),"extensions"in fe&&(gr=an(fe.extensions)),"optionalExtensions"in fe&&(sr=an(fe.optionalExtensions)),"onDone"in fe&&(Q.type(fe.onDone,"function","invalid or missing onDone callback"),wr=fe.onDone),"profile"in fe&&(xr=!!fe.profile),"pixelRatio"in fe&&(Ir=+fe.pixelRatio,Q(Ir>0,"invalid pixel ratio"))):Q.raise("invalid arguments to regl"),Me&&(Me.nodeName.toLowerCase()==="canvas"?zt=Me:gt=Me),!xt){if(!zt){Q(typeof document<"u","must manually specify webgl context outside of DOM environments");var cr=Ri(gt||document.body,wr,Ir);if(!cr)return null;zt=cr.canvas,Or=cr.onDestroy}lt.premultipliedAlpha===void 0&&(lt.premultipliedAlpha=!0),xt=qn(zt,lt)}return xt?{gl:xt,canvas:zt,container:gt,extensions:gr,optionalExtensions:sr,pixelRatio:Ir,profile:xr,onDone:wr,onDestroy:Or}:(Or(),wr("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function Hi(U,fe){var Me={};function gt(lt){Q.type(lt,"string","extension name must be string");var gr=lt.toLowerCase(),sr;try{sr=Me[gr]=U.getExtension(gr)}catch{}return!!sr}for(var zt=0;zt65535)<<4,U>>>=fe,Me=(U>255)<<3,U>>>=Me,fe|=Me,Me=(U>15)<<2,U>>>=Me,fe|=Me,Me=(U>3)<<1,U>>>=Me,fe|=Me,fe|U>>1}function it(){var U=Fn(8,function(){return[]});function fe(xt){var lt=ie(xt),gr=U[Ce(lt)>>2];return gr.length>0?gr.pop():new ArrayBuffer(lt)}function Me(xt){U[Ce(xt.byteLength)>>2].push(xt)}function gt(xt,lt){var gr=null;switch(xt){case j:gr=new Int8Array(fe(lt),0,lt);break;case Y:gr=new Uint8Array(fe(lt),0,lt);break;case J:gr=new Int16Array(fe(2*lt),0,lt);break;case ce:gr=new Uint16Array(fe(2*lt),0,lt);break;case Ee:gr=new Int32Array(fe(4*lt),0,lt);break;case je:gr=new Uint32Array(fe(4*lt),0,lt);break;case Ye:gr=new Float32Array(fe(4*lt),0,lt);break;default:return null}return gr.length!==lt?gr.subarray(0,lt):gr}function zt(xt){Me(xt.buffer)}return{alloc:fe,free:Me,allocType:gt,freeType:zt}}var Nt=it();Nt.zero=it();var vr=3408,Ot=3410,ar=3411,tn=3412,qr=3413,Dt=3414,zr=3415,Rr=33901,Pr=33902,Hn=3379,Lr=3386,ci=34921,Gi=36347,oi=36348,_i=35661,Gn=35660,ka=34930,hi=36349,Wi=34076,Ii=34024,Wn=7936,si=7937,To=7938,dl=35724,wa=34047,fa=36063,vl=34852,$s=3553,sa=34067,Hu=34069,ro=33984,ua=6408,Ca=5126,Qi=5121,Go=36160,Bo=36053,yf=36064,vs=16384,Tp=function(U,fe){var Me=1;fe.ext_texture_filter_anisotropic&&(Me=U.getParameter(wa));var gt=1,zt=1;fe.webgl_draw_buffers&&(gt=U.getParameter(vl),zt=U.getParameter(fa));var xt=!!fe.oes_texture_float;if(xt){var lt=U.createTexture();U.bindTexture($s,lt),U.texImage2D($s,0,ua,1,1,0,ua,Ca,null);var gr=U.createFramebuffer();if(U.bindFramebuffer(Go,gr),U.framebufferTexture2D(Go,yf,$s,lt,0),U.bindTexture($s,null),U.checkFramebufferStatus(Go)!==Bo)xt=!1;else{U.viewport(0,0,1,1),U.clearColor(1,0,0,1),U.clear(vs);var sr=Nt.allocType(Ca,4);U.readPixels(0,0,1,1,ua,Ca,sr),U.getError()?xt=!1:(U.deleteFramebuffer(gr),U.deleteTexture(lt),xt=sr[0]===1),Nt.freeType(sr)}}var Ir=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),xr=!0;if(!Ir){var wr=U.createTexture(),Or=Nt.allocType(Qi,36);U.activeTexture(ro),U.bindTexture(sa,wr),U.texImage2D(Hu,0,ua,3,3,0,ua,Qi,Or),Nt.freeType(Or),U.bindTexture(sa,null),U.deleteTexture(wr),xr=!U.getError()}return{colorBits:[U.getParameter(Ot),U.getParameter(ar),U.getParameter(tn),U.getParameter(qr)],depthBits:U.getParameter(Dt),stencilBits:U.getParameter(zr),subpixelBits:U.getParameter(vr),extensions:Object.keys(fe).filter(function(cr){return!!fe[cr]}),maxAnisotropic:Me,maxDrawbuffers:gt,maxColorAttachments:zt,pointSizeDims:U.getParameter(Rr),lineWidthDims:U.getParameter(Pr),maxViewportDims:U.getParameter(Lr),maxCombinedTextureUnits:U.getParameter(_i),maxCubeMapSize:U.getParameter(Wi),maxRenderbufferSize:U.getParameter(Ii),maxTextureUnits:U.getParameter(ka),maxTextureSize:U.getParameter(Hn),maxAttributes:U.getParameter(ci),maxVertexUniforms:U.getParameter(Gi),maxVertexTextureUnits:U.getParameter(Gn),maxVaryingVectors:U.getParameter(oi),maxFragmentUniforms:U.getParameter(hi),glsl:U.getParameter(dl),renderer:U.getParameter(si),vendor:U.getParameter(Wn),version:U.getParameter(To),readFloat:xt,npotTextureCube:xr}};function ee(U){return!!U&&typeof U=="object"&&Array.isArray(U.shape)&&Array.isArray(U.stride)&&typeof U.offset=="number"&&U.shape.length===U.stride.length&&(Array.isArray(U.data)||r(U.data))}var ue=function(U){return Object.keys(U).map(function(fe){return U[fe]})},Ue={shape:mo,flatten:La};function _t(U,fe,Me){for(var gt=0;gt0){var Ur;if(Array.isArray(Pt[0])){dr=Gu(Pt);for(var er=1,Fr=1;Fr0)if(typeof er[0]=="number"){var Br=Nt.allocType(Jt.dtype,er.length);N1(Br,er),dr(Br,En),Nt.freeType(Br)}else if(Array.isArray(er[0])||r(er[0])){jn=Gu(er);var mr=xu(er,jn,Jt.dtype);dr(mr,En),Nt.freeType(mr)}else Q.raise("invalid buffer data")}else if(ee(er)){jn=er.shape;var Wt=er.stride,Sn=0,ui=0,jr=0,ri=0;jn.length===1?(Sn=jn[0],ui=1,jr=Wt[0],ri=0):jn.length===2?(Sn=jn[0],ui=jn[1],jr=Wt[0],ri=Wt[1]):Q.raise("invalid shape");var $n=Array.isArray(er.data)?Jt.dtype:ph(er.data),Dn=Nt.allocType($n,Sn*ui);dh(Dn,er.data,Sn,ui,jr,ri,er.offset),dr(Dn,En),Nt.freeType(Dn)}else Q.raise("invalid data for buffer subdata");return Vr}return _r||Vr(rt),Vr._reglType="buffer",Vr._buffer=Jt,Vr.subdata=Ur,Me.profile&&(Vr.stats=Jt.stats),Vr.destroy=function(){Or(Jt)},Vr}function Cr(){ue(xt).forEach(function(rt){rt.buffer=U.createBuffer(),U.bindBuffer(rt.type,rt.buffer),U.bufferData(rt.type,rt.persistentData||rt.byteLength,rt.usage)})}return Me.profile&&(fe.getTotalBufferSize=function(){var rt=0;return Object.keys(xt).forEach(function(Pt){rt+=xt[Pt].stats.size}),rt}),{create:cr,createStream:sr,destroyStream:Ir,clear:function(){ue(xt).forEach(Or),gr.forEach(Or)},getBuffer:function(rt){return rt&&rt._buffer instanceof lt?rt._buffer:null},restore:Cr,_initBuffer:wr}}var Rp=0,Ip=0,U1=1,z1=1,O0=4,Ef=4,bu={points:Rp,point:Ip,lines:U1,line:z1,triangles:O0,triangle:Ef,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},$1=0,Co=1,Ql=4,yl=5120,Cs=5121,xl=5122,js=5123,Xu=5124,Rs=5125,Yu=34963,bl=35040,V1=35044;function j1(U,fe,Me,gt){var zt={},xt=0,lt={uint8:Cs,uint16:js};fe.oes_element_index_uint&&(lt.uint32=Rs);function gr(Cr){this.id=xt++,zt[this.id]=this,this.buffer=Cr,this.primType=Ql,this.vertCount=0,this.type=0}gr.prototype.bind=function(){this.buffer.bind()};var sr=[];function Ir(Cr){var rt=sr.pop();return rt||(rt=new gr(Me.create(null,Yu,!0,!1)._buffer)),wr(rt,Cr,bl,-1,-1,0,0),rt}function xr(Cr){sr.push(Cr)}function wr(Cr,rt,Pt,_r,Nr,Jt,Vr){Cr.buffer.bind();var dr;if(rt){var Ur=Vr;!Vr&&(!r(rt)||ee(rt)&&!r(rt.data))&&(Ur=fe.oes_element_index_uint?Rs:js),Me._initBuffer(Cr.buffer,rt,Pt,Ur,3)}else U.bufferData(Yu,Jt,Pt),Cr.buffer.dtype=dr||Cs,Cr.buffer.usage=Pt,Cr.buffer.dimension=3,Cr.buffer.byteLength=Jt;if(dr=Vr,!Vr){switch(Cr.buffer.dtype){case Cs:case yl:dr=Cs;break;case js:case xl:dr=js;break;case Rs:case Xu:dr=Rs;break;default:Q.raise("unsupported type for element array")}Cr.buffer.dtype=dr}Cr.type=dr,Q(dr!==Rs||!!fe.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var er=Nr;er<0&&(er=Cr.buffer.byteLength,dr===js?er>>=1:dr===Rs&&(er>>=2)),Cr.vertCount=er;var Fr=_r;if(_r<0){Fr=Ql;var En=Cr.buffer.dimension;En===1&&(Fr=$1),En===2&&(Fr=Co),En===3&&(Fr=Ql)}Cr.primType=Fr}function Or(Cr){gt.elementsCount--,Q(Cr.buffer!==null,"must not double destroy elements"),delete zt[Cr.id],Cr.buffer.destroy(),Cr.buffer=null}function cr(Cr,rt){var Pt=Me.create(null,Yu,!0),_r=new gr(Pt._buffer);gt.elementsCount++;function Nr(Jt){if(!Jt)Pt(),_r.primType=Ql,_r.vertCount=0,_r.type=Cs;else if(typeof Jt=="number")Pt(Jt),_r.primType=Ql,_r.vertCount=Jt|0,_r.type=Cs;else{var Vr=null,dr=V1,Ur=-1,er=-1,Fr=0,En=0;Array.isArray(Jt)||r(Jt)||ee(Jt)?Vr=Jt:(Q.type(Jt,"object","invalid arguments for elements"),"data"in Jt&&(Vr=Jt.data,Q(Array.isArray(Vr)||r(Vr)||ee(Vr),"invalid data for element buffer")),"usage"in Jt&&(Q.parameter(Jt.usage,yu,"invalid element buffer usage"),dr=yu[Jt.usage]),"primitive"in Jt&&(Q.parameter(Jt.primitive,bu,"invalid element buffer primitive"),Ur=bu[Jt.primitive]),"count"in Jt&&(Q(typeof Jt.count=="number"&&Jt.count>=0,"invalid vertex count for elements"),er=Jt.count|0),"type"in Jt&&(Q.parameter(Jt.type,lt,"invalid buffer type"),En=lt[Jt.type]),"length"in Jt?Fr=Jt.length|0:(Fr=er,En===js||En===xl?Fr*=2:(En===Rs||En===Xu)&&(Fr*=4))),wr(_r,Vr,dr,Ur,er,Fr,En)}return Nr}return Nr(Cr),Nr._reglType="elements",Nr._elements=_r,Nr.subdata=function(Jt,Vr){return Pt.subdata(Jt,Vr),Nr},Nr.destroy=function(){Or(_r)},Nr}return{create:cr,createStream:Ir,destroyStream:xr,getElements:function(Cr){return typeof Cr=="function"&&Cr._elements instanceof gr?Cr._elements:null},clear:function(){ue(zt).forEach(Or)}}}var Xi=new Float32Array(1),k0=new Uint32Array(Xi.buffer),vh=5123;function Mp(U){for(var fe=Nt.allocType(vh,U.length),Me=0;Me>>31<<15,xt=(gt<<1>>>24)-127,lt=gt>>13&1023;if(xt<-24)fe[Me]=zt;else if(xt<-14){var gr=-14-xt;fe[Me]=zt+(lt+1024>>gr)}else xt>15?fe[Me]=zt+31744:fe[Me]=zt+(xt+15<<10)+lt}return fe}function Ia(U){return Array.isArray(U)||r(U)}var Pp=function(U){return!(U&U-1)&&!!U},H1=34467,ns=3553,Zu=34067,Eu=34069,El=6408,mh=6406,wc=6407,ou=6409,Sf=6410,Sl=32854,qu=32855,Op=36194,Af=32819,ta=32820,gh=33635,D0=34042,Al=6402,Tf=34041,kp=35904,_h=35906,Ku=36193,Tl=33776,Jl=33777,Cc=33778,ec=33779,tc=35986,Dp=35987,rc=34798,Hs=35840,Fp=35841,Bp=35842,Lp=35843,wl=36196,Su=5121,Rc=5123,wf=5125,Cl=5126,F0=10242,yh=10243,Np=10497,xh=33071,G1=33648,bh=10240,Up=10241,Cf=9728,zp=9729,nc=9984,$p=9985,Rl=9986,ra=9987,Eh=33170,Au=4352,Il=4353,yi=4354,na=34046,Is=3317,Rf=37440,Ic=37441,If=37443,W1=37444,Sh=33984,Mf=[nc,Rl,$p,ra],Ml=[0,ou,Sf,wc,El],io={};io[ou]=io[mh]=io[Al]=1,io[Tf]=io[Sf]=2,io[wc]=io[kp]=3,io[El]=io[_h]=4;function ma(U){return"[object "+U+"]"}var Mc=ma("HTMLCanvasElement"),Vp=ma("OffscreenCanvas"),Da=ma("CanvasRenderingContext2D"),Kr=ma("ImageBitmap"),is=ma("HTMLImageElement"),Pf=ma("HTMLVideoElement"),Pc=Object.keys(no).concat([Mc,Vp,Da,Kr,is,Pf]),Wo=[];Wo[Su]=1,Wo[Cl]=4,Wo[Ku]=2,Wo[Rc]=2,Wo[wf]=4;var Yi=[];Yi[Sl]=2,Yi[qu]=2,Yi[Op]=2,Yi[Tf]=4,Yi[Tl]=.5,Yi[Jl]=.5,Yi[Cc]=1,Yi[ec]=1,Yi[tc]=.5,Yi[Dp]=1,Yi[rc]=1,Yi[Hs]=.5,Yi[Fp]=.25,Yi[Bp]=.5,Yi[Lp]=.25,Yi[wl]=.5;function Ah(U){return Array.isArray(U)&&(U.length===0||typeof U[0]=="number")}function Dr(U){if(!Array.isArray(U))return!1;var fe=U.length;return!(fe===0||!Ia(U[0]))}function Qu(U){return Object.prototype.toString.call(U)}function Of(U){return Qu(U)===Mc}function Th(U){return Qu(U)===Vp}function Gs(U){return Qu(U)===Da}function gs(U){return Qu(U)===Kr}function wh(U){return Qu(U)===is}function Ch(U){return Qu(U)===Pf}function Xo(U){if(!U)return!1;var fe=Qu(U);return Pc.indexOf(fe)>=0?!0:Ah(U)||Dr(U)||ee(U)}function Tu(U){return no[Object.prototype.toString.call(U)]|0}function X1(U,fe){var Me=fe.length;switch(U.type){case Su:case Rc:case wf:case Cl:var gt=Nt.allocType(U.type,Me);gt.set(fe),U.data=gt;break;case Ku:U.data=Mp(fe);break;default:Q.raise("unsupported texture type, must specify a typed array")}}function Oc(U,fe){return Nt.allocType(U.type===Ku?Cl:U.type,fe)}function Rh(U,fe){U.type===Ku?(U.data=Mp(fe),Nt.freeType(fe)):U.data=fe}function jp(U,fe,Me,gt,zt,xt){for(var lt=U.width,gr=U.height,sr=U.channels,Ir=lt*gr*sr,xr=Oc(U,Ir),wr=0,Or=0;Or=1;)gr+=lt*sr*sr,sr/=2;return gr}else return lt*Me*gt}function Ms(U,fe,Me,gt,zt,xt,lt){var gr={"don't care":Au,"dont care":Au,nice:yi,fast:Il},sr={repeat:Np,clamp:xh,mirror:G1},Ir={nearest:Cf,linear:zp},xr=n({mipmap:ra,"nearest mipmap nearest":nc,"linear mipmap nearest":$p,"nearest mipmap linear":Rl,"linear mipmap linear":ra},Ir),wr={none:0,browser:W1},Or={uint8:Su,rgba4:Af,rgb565:gh,"rgb5 a1":ta},cr={alpha:mh,luminance:ou,"luminance alpha":Sf,rgb:wc,rgba:El,rgba4:Sl,"rgb5 a1":qu,rgb565:Op},Cr={};fe.ext_srgb&&(cr.srgb=kp,cr.srgba=_h),fe.oes_texture_float&&(Or.float32=Or.float=Cl),fe.oes_texture_half_float&&(Or.float16=Or["half float"]=Ku),fe.webgl_depth_texture&&(n(cr,{depth:Al,"depth stencil":Tf}),n(Or,{uint16:Rc,uint32:wf,"depth stencil":D0})),fe.webgl_compressed_texture_s3tc&&n(Cr,{"rgb s3tc dxt1":Tl,"rgba s3tc dxt1":Jl,"rgba s3tc dxt3":Cc,"rgba s3tc dxt5":ec}),fe.webgl_compressed_texture_atc&&n(Cr,{"rgb atc":tc,"rgba atc explicit alpha":Dp,"rgba atc interpolated alpha":rc}),fe.webgl_compressed_texture_pvrtc&&n(Cr,{"rgb pvrtc 4bppv1":Hs,"rgb pvrtc 2bppv1":Fp,"rgba pvrtc 4bppv1":Bp,"rgba pvrtc 2bppv1":Lp}),fe.webgl_compressed_texture_etc1&&(Cr["rgb etc1"]=wl);var rt=Array.prototype.slice.call(U.getParameter(H1));Object.keys(Cr).forEach(function(Ae){var Et=Cr[Ae];rt.indexOf(Et)>=0&&(cr[Ae]=Et)});var Pt=Object.keys(cr);Me.textureFormats=Pt;var _r=[];Object.keys(cr).forEach(function(Ae){var Et=cr[Ae];_r[Et]=Ae});var Nr=[];Object.keys(Or).forEach(function(Ae){var Et=Or[Ae];Nr[Et]=Ae});var Jt=[];Object.keys(Ir).forEach(function(Ae){var Et=Ir[Ae];Jt[Et]=Ae});var Vr=[];Object.keys(xr).forEach(function(Ae){var Et=xr[Ae];Vr[Et]=Ae});var dr=[];Object.keys(sr).forEach(function(Ae){var Et=sr[Ae];dr[Et]=Ae});var Ur=Pt.reduce(function(Ae,Et){var pt=cr[Et];return pt===ou||pt===mh||pt===ou||pt===Sf||pt===Al||pt===Tf||fe.ext_srgb&&(pt===kp||pt===_h)?Ae[pt]=pt:pt===qu||Et.indexOf("rgba")>=0?Ae[pt]=El:Ae[pt]=wc,Ae},{});function er(){this.internalformat=El,this.format=El,this.type=Su,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=W1,this.width=0,this.height=0,this.channels=0}function Fr(Ae,Et){Ae.internalformat=Et.internalformat,Ae.format=Et.format,Ae.type=Et.type,Ae.compressed=Et.compressed,Ae.premultiplyAlpha=Et.premultiplyAlpha,Ae.flipY=Et.flipY,Ae.unpackAlignment=Et.unpackAlignment,Ae.colorSpace=Et.colorSpace,Ae.width=Et.width,Ae.height=Et.height,Ae.channels=Et.channels}function En(Ae,Et){if(!(typeof Et!="object"||!Et)){if("premultiplyAlpha"in Et&&(Q.type(Et.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),Ae.premultiplyAlpha=Et.premultiplyAlpha),"flipY"in Et&&(Q.type(Et.flipY,"boolean","invalid texture flip"),Ae.flipY=Et.flipY),"alignment"in Et&&(Q.oneOf(Et.alignment,[1,2,4,8],"invalid texture unpack alignment"),Ae.unpackAlignment=Et.alignment),"colorSpace"in Et&&(Q.parameter(Et.colorSpace,wr,"invalid colorSpace"),Ae.colorSpace=wr[Et.colorSpace]),"type"in Et){var pt=Et.type;Q(fe.oes_texture_float||!(pt==="float"||pt==="float32"),"you must enable the OES_texture_float extension in order to use floating point textures."),Q(fe.oes_texture_half_float||!(pt==="half float"||pt==="float16"),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),Q(fe.webgl_depth_texture||!(pt==="uint16"||pt==="uint32"||pt==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),Q.parameter(pt,Or,"invalid texture type"),Ae.type=Or[pt]}var Hr=Ae.width,ni=Ae.height,Zi=Ae.channels,te=!1;"shape"in Et?(Q(Array.isArray(Et.shape)&&Et.shape.length>=2,"shape must be an array"),Hr=Et.shape[0],ni=Et.shape[1],Et.shape.length===3&&(Zi=Et.shape[2],Q(Zi>0&&Zi<=4,"invalid number of channels"),te=!0),Q(Hr>=0&&Hr<=Me.maxTextureSize,"invalid width"),Q(ni>=0&&ni<=Me.maxTextureSize,"invalid height")):("radius"in Et&&(Hr=ni=Et.radius,Q(Hr>=0&&Hr<=Me.maxTextureSize,"invalid radius")),"width"in Et&&(Hr=Et.width,Q(Hr>=0&&Hr<=Me.maxTextureSize,"invalid width")),"height"in Et&&(ni=Et.height,Q(ni>=0&&ni<=Me.maxTextureSize,"invalid height")),"channels"in Et&&(Zi=Et.channels,Q(Zi>0&&Zi<=4,"invalid number of channels"),te=!0)),Ae.width=Hr|0,Ae.height=ni|0,Ae.channels=Zi|0;var me=!1;if("format"in Et){var Pe=Et.format;Q(fe.webgl_depth_texture||!(Pe==="depth"||Pe==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),Q.parameter(Pe,cr,"invalid texture format");var vt=Ae.internalformat=cr[Pe];Ae.format=Ur[vt],Pe in Or&&("type"in Et||(Ae.type=Or[Pe])),Pe in Cr&&(Ae.compressed=!0),me=!0}!te&&me?Ae.channels=io[Ae.format]:te&&!me?Ae.channels!==Ml[Ae.format]&&(Ae.format=Ae.internalformat=Ml[Ae.channels]):me&&te&&Q(Ae.channels===io[Ae.format],"number of channels inconsistent with specified format")}}function jn(Ae){U.pixelStorei(Rf,Ae.flipY),U.pixelStorei(Ic,Ae.premultiplyAlpha),U.pixelStorei(If,Ae.colorSpace),U.pixelStorei(Is,Ae.unpackAlignment)}function Br(){er.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function mr(Ae,Et){var pt=null;if(Xo(Et)?pt=Et:Et&&(Q.type(Et,"object","invalid pixel data type"),En(Ae,Et),"x"in Et&&(Ae.xOffset=Et.x|0),"y"in Et&&(Ae.yOffset=Et.y|0),Xo(Et.data)&&(pt=Et.data)),Q(!Ae.compressed||pt instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),Et.copy){Q(!pt,"can not specify copy and data field for the same texture");var Hr=zt.viewportWidth,ni=zt.viewportHeight;Ae.width=Ae.width||Hr-Ae.xOffset,Ae.height=Ae.height||ni-Ae.yOffset,Ae.needsCopy=!0,Q(Ae.xOffset>=0&&Ae.xOffset=0&&Ae.yOffset0&&Ae.width<=Hr&&Ae.height>0&&Ae.height<=ni,"copy texture read out of bounds")}else if(!pt)Ae.width=Ae.width||1,Ae.height=Ae.height||1,Ae.channels=Ae.channels||4;else if(r(pt))Ae.channels=Ae.channels||4,Ae.data=pt,!("type"in Et)&&Ae.type===Su&&(Ae.type=Tu(pt));else if(Ah(pt))Ae.channels=Ae.channels||4,X1(Ae,pt),Ae.alignment=1,Ae.needsFree=!0;else if(ee(pt)){var Zi=pt.data;!Array.isArray(Zi)&&Ae.type===Su&&(Ae.type=Tu(Zi));var te=pt.shape,me=pt.stride,Pe,vt,ht,Le,We,Ze;te.length===3?(ht=te[2],Ze=me[2]):(Q(te.length===2,"invalid ndarray pixel data, must be 2 or 3D"),ht=1,Ze=1),Pe=te[0],vt=te[1],Le=me[0],We=me[1],Ae.alignment=1,Ae.width=Pe,Ae.height=vt,Ae.channels=ht,Ae.format=Ae.internalformat=Ml[ht],Ae.needsFree=!0,jp(Ae,Zi,Le,We,Ze,pt.offset)}else if(Of(pt)||Th(pt)||Gs(pt))Of(pt)||Th(pt)?Ae.element=pt:Ae.element=pt.canvas,Ae.width=Ae.element.width,Ae.height=Ae.element.height,Ae.channels=4;else if(gs(pt))Ae.element=pt,Ae.width=pt.width,Ae.height=pt.height,Ae.channels=4;else if(wh(pt))Ae.element=pt,Ae.width=pt.naturalWidth,Ae.height=pt.naturalHeight,Ae.channels=4;else if(Ch(pt))Ae.element=pt,Ae.width=pt.videoWidth,Ae.height=pt.videoHeight,Ae.channels=4;else if(Dr(pt)){var Te=Ae.width||pt[0].length,Ve=Ae.height||pt.length,pe=Ae.channels;Ia(pt[0][0])?pe=pe||pt[0][0].length:pe=pe||1;for(var He=Ue.shape(pt),Tt=1,Ft=0;Ft=0,"oes_texture_float extension not enabled"):Ae.type===Ku&&Q(Me.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function Wt(Ae,Et,pt){var Hr=Ae.element,ni=Ae.data,Zi=Ae.internalformat,te=Ae.format,me=Ae.type,Pe=Ae.width,vt=Ae.height;jn(Ae),Hr?U.texImage2D(Et,pt,te,te,me,Hr):Ae.compressed?U.compressedTexImage2D(Et,pt,Zi,Pe,vt,0,ni):Ae.needsCopy?(gt(),U.copyTexImage2D(Et,pt,te,Ae.xOffset,Ae.yOffset,Pe,vt,0)):U.texImage2D(Et,pt,te,Pe,vt,0,te,me,ni||null)}function Sn(Ae,Et,pt,Hr,ni){var Zi=Ae.element,te=Ae.data,me=Ae.internalformat,Pe=Ae.format,vt=Ae.type,ht=Ae.width,Le=Ae.height;jn(Ae),Zi?U.texSubImage2D(Et,ni,pt,Hr,Pe,vt,Zi):Ae.compressed?U.compressedTexSubImage2D(Et,ni,pt,Hr,me,ht,Le,te):Ae.needsCopy?(gt(),U.copyTexSubImage2D(Et,ni,pt,Hr,Ae.xOffset,Ae.yOffset,ht,Le)):U.texSubImage2D(Et,ni,pt,Hr,ht,Le,Pe,vt,te)}var ui=[];function jr(){return ui.pop()||new Br}function ri(Ae){Ae.needsFree&&Nt.freeType(Ae.data),Br.call(Ae),ui.push(Ae)}function $n(){er.call(this),this.genMipmaps=!1,this.mipmapHint=Au,this.mipmask=0,this.images=Array(16)}function Dn(Ae,Et,pt){var Hr=Ae.images[0]=jr();Ae.mipmask=1,Hr.width=Ae.width=Et,Hr.height=Ae.height=pt,Hr.channels=Ae.channels=4}function Di(Ae,Et){var pt=null;if(Xo(Et))pt=Ae.images[0]=jr(),Fr(pt,Ae),mr(pt,Et),Ae.mipmask=1;else if(En(Ae,Et),Array.isArray(Et.mipmap))for(var Hr=Et.mipmap,ni=0;ni>=ni,pt.height>>=ni,mr(pt,Hr[ni]),Ae.mipmask|=1<=0&&!("faces"in Et)&&(Ae.genMipmaps=!0)}if("mag"in Et){var Hr=Et.mag;Q.parameter(Hr,Ir),Ae.magFilter=Ir[Hr]}var ni=Ae.wrapS,Zi=Ae.wrapT;if("wrap"in Et){var te=Et.wrap;typeof te=="string"?(Q.parameter(te,sr),ni=Zi=sr[te]):Array.isArray(te)&&(Q.parameter(te[0],sr),Q.parameter(te[1],sr),ni=sr[te[0]],Zi=sr[te[1]])}else{if("wrapS"in Et){var me=Et.wrapS;Q.parameter(me,sr),ni=sr[me]}if("wrapT"in Et){var Pe=Et.wrapT;Q.parameter(Pe,sr),Zi=sr[Pe]}}if(Ae.wrapS=ni,Ae.wrapT=Zi,"anisotropic"in Et){var vt=Et.anisotropic;Q(typeof vt=="number"&&vt>=1&&vt<=Me.maxAnisotropic,"aniso samples must be between 1 and "),Ae.anisotropic=Et.anisotropic}if("mipmap"in Et){var ht=!1;switch(typeof Et.mipmap){case"string":Q.parameter(Et.mipmap,gr,"invalid mipmap hint"),Ae.mipmapHint=gr[Et.mipmap],Ae.genMipmaps=!0,ht=!0;break;case"boolean":ht=Ae.genMipmaps=Et.mipmap;break;case"object":Q(Array.isArray(Et.mipmap),"invalid mipmap type"),Ae.genMipmaps=!1,ht=!0;break;default:Q.raise("invalid mipmap type")}ht&&!("min"in Et)&&(Ae.minFilter=nc)}}function lo(Ae,Et){U.texParameteri(Et,Up,Ae.minFilter),U.texParameteri(Et,bh,Ae.magFilter),U.texParameteri(Et,F0,Ae.wrapS),U.texParameteri(Et,yh,Ae.wrapT),fe.ext_texture_filter_anisotropic&&U.texParameteri(Et,na,Ae.anisotropic),Ae.genMipmaps&&(U.hint(Eh,Ae.mipmapHint),U.generateMipmap(Et))}var Oa=0,xo={},Ko=Me.maxTextureUnits,co=Array(Ko).map(function(){return null});function ei(Ae){er.call(this),this.mipmask=0,this.internalformat=El,this.id=Oa++,this.refCount=1,this.target=Ae,this.texture=U.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new la,lt.profile&&(this.stats={size:0})}function zo(Ae){U.activeTexture(Sh),U.bindTexture(Ae.target,Ae.texture)}function Ni(){var Ae=co[0];Ae?U.bindTexture(Ae.target,Ae.texture):U.bindTexture(ns,null)}function Mn(Ae){var Et=Ae.texture;Q(Et,"must not double destroy texture");var pt=Ae.unit,Hr=Ae.target;pt>=0&&(U.activeTexture(Sh+pt),U.bindTexture(Hr,null),co[pt]=null),U.deleteTexture(Et),Ae.texture=null,Ae.params=null,Ae.pixels=null,Ae.refCount=0,delete xo[Ae.id],xt.textureCount--}n(ei.prototype,{bind:function(){var Ae=this;Ae.bindCount+=1;var Et=Ae.unit;if(Et<0){for(var pt=0;pt0)continue;Hr.unit=-1}co[pt]=Ae,Et=pt;break}Et>=Ko&&Q.raise("insufficient number of texture units"),lt.profile&&xt.maxTextureUnits>We)-ht,Ze.height=Ze.height||(pt.height>>We)-Le,Q(pt.type===Ze.type&&pt.format===Ze.format&&pt.internalformat===Ze.internalformat,"incompatible format for texture.subimage"),Q(ht>=0&&Le>=0&&ht+Ze.width<=pt.width&&Le+Ze.height<=pt.height,"texture.subimage write out of bounds"),Q(pt.mipmask&1<>ht;++ht){var Le=Pe>>ht,We=vt>>ht;if(!Le||!We)break;U.texImage2D(ns,ht,pt.format,Le,We,0,pt.format,pt.type,null)}return Ni(),lt.profile&&(pt.stats.size=_s(pt.internalformat,pt.type,Pe,vt,!1,!1)),Hr}return Hr(Ae,Et),Hr.subimage=ni,Hr.resize=Zi,Hr._reglType="texture2d",Hr._texture=pt,lt.profile&&(Hr.stats=pt.stats),Hr.destroy=function(){pt.decRef()},Hr}function Mi(Ae,Et,pt,Hr,ni,Zi){var te=new ei(Zu);xo[te.id]=te,xt.cubeCount++;var me=new Array(6);function Pe(Le,We,Ze,Te,Ve,pe){var He,Tt=te.texInfo;for(la.call(Tt),He=0;He<6;++He)me[He]=pi();if(typeof Le=="number"||!Le){var Ft=Le|0||1;for(He=0;He<6;++He)Dn(me[He],Ft,Ft)}else if(typeof Le=="object")if(We)Di(me[0],Le),Di(me[1],We),Di(me[2],Ze),Di(me[3],Te),Di(me[4],Ve),Di(me[5],pe);else if(uo(Tt,Le),En(te,Le),"faces"in Le){var ir=Le.faces;for(Q(Array.isArray(ir)&&ir.length===6,"cube faces must be a length 6 array"),He=0;He<6;++He)Q(typeof ir[He]=="object"&&!!ir[He],"invalid input for cube map face"),Fr(me[He],te),Di(me[He],ir[He])}else for(He=0;He<6;++He)Di(me[He],Le);else Q.raise("invalid arguments to cube map");for(Fr(te,me[0]),Me.npotTextureCube||Q(Pp(te.width)&&Pp(te.height),"your browser does not support non power or two texture dimensions"),Tt.genMipmaps?te.mipmask=(me[0].width<<1)-1:te.mipmask=me[0].mipmask,Q.textureCube(te,Tt,me,Me),te.internalformat=me[0].internalformat,Pe.width=me[0].width,Pe.height=me[0].height,zo(te),He=0;He<6;++He)ja(me[He],Eu+He);for(lo(Tt,Zu),Ni(),lt.profile&&(te.stats.size=_s(te.internalformat,te.type,Pe.width,Pe.height,Tt.genMipmaps,!0)),Pe.format=_r[te.internalformat],Pe.type=Nr[te.type],Pe.mag=Jt[Tt.magFilter],Pe.min=Vr[Tt.minFilter],Pe.wrapS=dr[Tt.wrapS],Pe.wrapT=dr[Tt.wrapT],He=0;He<6;++He)Ha(me[He]);return Pe}function vt(Le,We,Ze,Te,Ve){Q(!!We,"must specify image data"),Q(typeof Le=="number"&&Le===(Le|0)&&Le>=0&&Le<6,"invalid face");var pe=Ze|0,He=Te|0,Tt=Ve|0,Ft=jr();return Fr(Ft,te),Ft.width=0,Ft.height=0,mr(Ft,We),Ft.width=Ft.width||(te.width>>Tt)-pe,Ft.height=Ft.height||(te.height>>Tt)-He,Q(te.type===Ft.type&&te.format===Ft.format&&te.internalformat===Ft.internalformat,"incompatible format for texture.subimage"),Q(pe>=0&&He>=0&&pe+Ft.width<=te.width&&He+Ft.height<=te.height,"texture.subimage write out of bounds"),Q(te.mipmask&1<>Te;++Te)U.texImage2D(Eu+Ze,Te,te.format,We>>Te,We>>Te,0,te.format,te.type,null);return Ni(),lt.profile&&(te.stats.size=_s(te.internalformat,te.type,Pe.width,Pe.height,!1,!0)),Pe}}return Pe(Ae,Et,pt,Hr,ni,Zi),Pe.subimage=vt,Pe.resize=ht,Pe._reglType="textureCube",Pe._texture=te,lt.profile&&(Pe.stats=te.stats),Pe.destroy=function(){te.decRef()},Pe}function Ga(){for(var Ae=0;Ae>Hr,pt.height>>Hr,0,pt.internalformat,pt.type,null);else for(var ni=0;ni<6;++ni)U.texImage2D(Eu+ni,Hr,pt.internalformat,pt.width>>Hr,pt.height>>Hr,0,pt.internalformat,pt.type,null);lo(pt.texInfo,pt.target)})}return{create2D:fi,createCube:Mi,clear:Ga,getTexture:function(Ae){return null},restore:il}}var Zn=36161,Ps=32854,Os=32855,go=36194,Pl=33189,Ju=36168,Ws=34041,Lo=35907,kc=34836,dn=34842,nn=34843,ys=[];ys[Ps]=2,ys[Os]=2,ys[go]=2,ys[Pl]=2,ys[Ju]=1,ys[Ws]=4,ys[Lo]=4,ys[kc]=16,ys[dn]=8,ys[nn]=6;function No(U,fe,Me){return ys[U]*fe*Me}var su=function(U,fe,Me,gt,zt){var xt={rgba4:Ps,rgb565:go,"rgb5 a1":Os,depth:Pl,stencil:Ju,"depth stencil":Ws};fe.ext_srgb&&(xt.srgba=Lo),fe.ext_color_buffer_half_float&&(xt.rgba16f=dn,xt.rgb16f=nn),fe.webgl_color_buffer_float&&(xt.rgba32f=kc);var lt=[];Object.keys(xt).forEach(function(cr){var Cr=xt[cr];lt[Cr]=cr});var gr=0,sr={};function Ir(cr){this.id=gr++,this.refCount=1,this.renderbuffer=cr,this.format=Ps,this.width=0,this.height=0,zt.profile&&(this.stats={size:0})}Ir.prototype.decRef=function(){--this.refCount<=0&&xr(this)};function xr(cr){var Cr=cr.renderbuffer;Q(Cr,"must not double destroy renderbuffer"),U.bindRenderbuffer(Zn,null),U.deleteRenderbuffer(Cr),cr.renderbuffer=null,cr.refCount=0,delete sr[cr.id],gt.renderbufferCount--}function wr(cr,Cr){var rt=new Ir(U.createRenderbuffer());sr[rt.id]=rt,gt.renderbufferCount++;function Pt(Nr,Jt){var Vr=0,dr=0,Ur=Ps;if(typeof Nr=="object"&&Nr){var er=Nr;if("shape"in er){var Fr=er.shape;Q(Array.isArray(Fr)&&Fr.length>=2,"invalid renderbuffer shape"),Vr=Fr[0]|0,dr=Fr[1]|0}else"radius"in er&&(Vr=dr=er.radius|0),"width"in er&&(Vr=er.width|0),"height"in er&&(dr=er.height|0);"format"in er&&(Q.parameter(er.format,xt,"invalid renderbuffer format"),Ur=xt[er.format])}else typeof Nr=="number"?(Vr=Nr|0,typeof Jt=="number"?dr=Jt|0:dr=Vr):Nr?Q.raise("invalid arguments to renderbuffer constructor"):Vr=dr=1;if(Q(Vr>0&&dr>0&&Vr<=Me.maxRenderbufferSize&&dr<=Me.maxRenderbufferSize,"invalid renderbuffer size"),!(Vr===rt.width&&dr===rt.height&&Ur===rt.format))return Pt.width=rt.width=Vr,Pt.height=rt.height=dr,rt.format=Ur,U.bindRenderbuffer(Zn,rt.renderbuffer),U.renderbufferStorage(Zn,Ur,Vr,dr),Q(U.getError()===0,"invalid render buffer format"),zt.profile&&(rt.stats.size=No(rt.format,rt.width,rt.height)),Pt.format=lt[rt.format],Pt}function _r(Nr,Jt){var Vr=Nr|0,dr=Jt|0||Vr;return Vr===rt.width&&dr===rt.height||(Q(Vr>0&&dr>0&&Vr<=Me.maxRenderbufferSize&&dr<=Me.maxRenderbufferSize,"invalid renderbuffer size"),Pt.width=rt.width=Vr,Pt.height=rt.height=dr,U.bindRenderbuffer(Zn,rt.renderbuffer),U.renderbufferStorage(Zn,rt.format,Vr,dr),Q(U.getError()===0,"invalid render buffer format"),zt.profile&&(rt.stats.size=No(rt.format,rt.width,rt.height))),Pt}return Pt(cr,Cr),Pt.resize=_r,Pt._reglType="renderbuffer",Pt._renderbuffer=rt,zt.profile&&(Pt.stats=rt.stats),Pt.destroy=function(){rt.decRef()},Pt}zt.profile&&(gt.getTotalRenderbufferSize=function(){var cr=0;return Object.keys(sr).forEach(function(Cr){cr+=sr[Cr].stats.size}),cr});function Or(){ue(sr).forEach(function(cr){cr.renderbuffer=U.createRenderbuffer(),U.bindRenderbuffer(Zn,cr.renderbuffer),U.renderbufferStorage(Zn,cr.format,cr.width,cr.height)}),U.bindRenderbuffer(Zn,null)}return{create:wr,clear:function(){ue(sr).forEach(xr)},restore:Or}},ga=36160,Xs=36161,el=3553,ic=34069,Li=36064,ao=36096,Hp=36128,Ol=33306,Ih=36053,tl=36054,xs=36055,Dc=36057,wu=36061,Mh=36193,Fc=5121,kf=5126,Ph=6407,ac=6408,oc=6402,Gp=[Ph,ac],Cu=[];Cu[ac]=4,Cu[Ph]=3;var uu=[];uu[Fc]=1,uu[kf]=4,uu[Mh]=2;var Oh=32854,kl=32855,Ys=36194,Wp=33189,Df=36168,kh=34041,Dh=35907,p=34836,v=34842,d=34843,y=[Oh,kl,Ys,Dh,v,d,p],S={};S[Ih]="complete",S[tl]="incomplete attachment",S[Dc]="incomplete dimensions",S[xs]="incomplete, missing attachment",S[wu]="unsupported";function C(U,fe,Me,gt,zt,xt){var lt={cur:null,next:null,dirty:!1,setFBO:null},gr=["rgba"],sr=["rgba4","rgb565","rgb5 a1"];fe.ext_srgb&&sr.push("srgba"),fe.ext_color_buffer_half_float&&sr.push("rgba16f","rgb16f"),fe.webgl_color_buffer_float&&sr.push("rgba32f");var Ir=["uint8"];fe.oes_texture_half_float&&Ir.push("half float","float16"),fe.oes_texture_float&&Ir.push("float","float32");function xr(Br,mr,Wt){this.target=Br,this.texture=mr,this.renderbuffer=Wt;var Sn=0,ui=0;mr?(Sn=mr.width,ui=mr.height):Wt&&(Sn=Wt.width,ui=Wt.height),this.width=Sn,this.height=ui}function wr(Br){Br&&(Br.texture&&Br.texture._texture.decRef(),Br.renderbuffer&&Br.renderbuffer._renderbuffer.decRef())}function Or(Br,mr,Wt){if(Br)if(Br.texture){var Sn=Br.texture._texture,ui=Math.max(1,Sn.width),jr=Math.max(1,Sn.height);Q(ui===mr&&jr===Wt,"inconsistent width/height for supplied texture"),Sn.refCount+=1}else{var ri=Br.renderbuffer._renderbuffer;Q(ri.width===mr&&ri.height===Wt,"inconsistent width/height for renderbuffer"),ri.refCount+=1}}function cr(Br,mr){mr&&(mr.texture?U.framebufferTexture2D(ga,Br,mr.target,mr.texture._texture.texture,0):U.framebufferRenderbuffer(ga,Br,Xs,mr.renderbuffer._renderbuffer.renderbuffer))}function Cr(Br){var mr=el,Wt=null,Sn=null,ui=Br;typeof Br=="object"&&(ui=Br.data,"target"in Br&&(mr=Br.target|0)),Q.type(ui,"function","invalid attachment data");var jr=ui._reglType;return jr==="texture2d"?(Wt=ui,Q(mr===el)):jr==="textureCube"?(Wt=ui,Q(mr>=ic&&mr=2,"invalid shape for framebuffer"),Dn=zo[0],Di=zo[1]}else"radius"in ei&&(Dn=Di=ei.radius),"width"in ei&&(Dn=ei.width),"height"in ei&&(Di=ei.height);("color"in ei||"colors"in ei)&&(pi=ei.color||ei.colors,Array.isArray(pi)&&Q(pi.length===1||fe.webgl_draw_buffers,"multiple render targets not supported")),pi||("colorCount"in ei&&(lo=ei.colorCount|0,Q(lo>0,"invalid color buffer count")),"colorTexture"in ei&&(Ha=!!ei.colorTexture,la="rgba4"),"colorType"in ei&&(uo=ei.colorType,Ha?(Q(fe.oes_texture_float||!(uo==="float"||uo==="float32"),"you must enable OES_texture_float in order to use floating point framebuffer objects"),Q(fe.oes_texture_half_float||!(uo==="half float"||uo==="float16"),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):uo==="half float"||uo==="float16"?(Q(fe.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),la="rgba16f"):(uo==="float"||uo==="float32")&&(Q(fe.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),la="rgba32f"),Q.oneOf(uo,Ir,"invalid color type")),"colorFormat"in ei&&(la=ei.colorFormat,gr.indexOf(la)>=0?Ha=!0:sr.indexOf(la)>=0?Ha=!1:Ha?Q.oneOf(ei.colorFormat,gr,"invalid color format for texture"):Q.oneOf(ei.colorFormat,sr,"invalid color format for renderbuffer"))),("depthTexture"in ei||"depthStencilTexture"in ei)&&(co=!!(ei.depthTexture||ei.depthStencilTexture),Q(!co||fe.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in ei&&(typeof ei.depth=="boolean"?ja=ei.depth:(Oa=ei.depth,Io=!1)),"stencil"in ei&&(typeof ei.stencil=="boolean"?Io=ei.stencil:(xo=ei.stencil,ja=!1)),"depthStencil"in ei&&(typeof ei.depthStencil=="boolean"?ja=Io=ei.depthStencil:(Ko=ei.depthStencil,ja=!1,Io=!1))}var Ni=null,Mn=null,fi=null,Mi=null;if(Array.isArray(pi))Ni=pi.map(Cr);else if(pi)Ni=[Cr(pi)];else for(Ni=new Array(lo),$n=0;$n=0||Ni[$n].renderbuffer&&y.indexOf(Ni[$n].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+$n+" is invalid"),Ni[$n]&&Ni[$n].texture){var il=Cu[Ni[$n].texture._texture.format]*uu[Ni[$n].texture._texture.type];Ga===null?Ga=il:Q(Ga===il,"all color attachments much have the same number of bits per pixel.")}return Or(Mn,Dn,Di),Q(!Mn||Mn.texture&&Mn.texture._texture.format===oc||Mn.renderbuffer&&Mn.renderbuffer._renderbuffer.format===Wp,"invalid depth attachment for framebuffer object"),Or(fi,Dn,Di),Q(!fi||fi.renderbuffer&&fi.renderbuffer._renderbuffer.format===Df,"invalid stencil attachment for framebuffer object"),Or(Mi,Dn,Di),Q(!Mi||Mi.texture&&Mi.texture._texture.format===kh||Mi.renderbuffer&&Mi.renderbuffer._renderbuffer.format===kh,"invalid depth-stencil attachment for framebuffer object"),dr(Wt),Wt.width=Dn,Wt.height=Di,Wt.colorAttachments=Ni,Wt.depthAttachment=Mn,Wt.stencilAttachment=fi,Wt.depthStencilAttachment=Mi,Sn.color=Ni.map(Pt),Sn.depth=Pt(Mn),Sn.stencil=Pt(fi),Sn.depthStencil=Pt(Mi),Sn.width=Wt.width,Sn.height=Wt.height,er(Wt),Sn}function ui(jr,ri){Q(lt.next!==Wt,"can not resize a framebuffer which is currently in use");var $n=Math.max(jr|0,1),Dn=Math.max(ri|0||$n,1);if($n===Wt.width&&Dn===Wt.height)return Sn;for(var Di=Wt.colorAttachments,ja=0;ja=2,"invalid shape for framebuffer"),Q(Ha[0]===Ha[1],"cube framebuffer must be square"),$n=Ha[0]}else"radius"in pi&&($n=pi.radius|0),"width"in pi?($n=pi.width|0,"height"in pi&&Q(pi.height===$n,"must be square")):"height"in pi&&($n=pi.height|0);("color"in pi||"colors"in pi)&&(Dn=pi.color||pi.colors,Array.isArray(Dn)&&Q(Dn.length===1||fe.webgl_draw_buffers,"multiple render targets not supported")),Dn||("colorCount"in pi&&(Io=pi.colorCount|0,Q(Io>0,"invalid color buffer count")),"colorType"in pi&&(Q.oneOf(pi.colorType,Ir,"invalid color type"),ja=pi.colorType),"colorFormat"in pi&&(Di=pi.colorFormat,Q.oneOf(pi.colorFormat,gr,"invalid color format for texture"))),"depth"in pi&&(ri.depth=pi.depth),"stencil"in pi&&(ri.stencil=pi.stencil),"depthStencil"in pi&&(ri.depthStencil=pi.depthStencil)}var la;if(Dn)if(Array.isArray(Dn))for(la=[],jr=0;jr0&&(ri.depth=mr[0].depth,ri.stencil=mr[0].stencil,ri.depthStencil=mr[0].depthStencil),mr[jr]?mr[jr](ri):mr[jr]=Fr(ri)}return n(Wt,{width:$n,height:$n,color:la})}function Sn(ui){var jr,ri=ui|0;if(Q(ri>0&&ri<=Me.maxCubeMapSize,"invalid radius for cube fbo"),ri===Wt.width)return Wt;var $n=Wt.color;for(jr=0;jr<$n.length;++jr)$n[jr].resize(ri);for(jr=0;jr<6;++jr)mr[jr].resize(ri);return Wt.width=Wt.height=ri,Wt}return Wt(Br),n(Wt,{faces:mr,resize:Sn,_reglType:"framebufferCube",destroy:function(){mr.forEach(function(ui){ui.destroy()})}})}function jn(){lt.cur=null,lt.next=null,lt.dirty=!0,ue(Jt).forEach(function(Br){Br.framebuffer=U.createFramebuffer(),er(Br)})}return n(lt,{getFramebuffer:function(Br){if(typeof Br=="function"&&Br._reglType==="framebuffer"){var mr=Br._framebuffer;if(mr instanceof Vr)return mr}return null},create:Fr,createCube:En,clear:function(){ue(Jt).forEach(Ur)},restore:jn})}var I=5126,O=34962;function z(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=I,this.offset=0,this.stride=0,this.divisor=0}function X(U,fe,Me,gt,zt){for(var xt=Me.maxAttributes,lt=new Array(xt),gr=0;gr0,"must specify at least one attribute");for(var En=0;En=1&&Wt.size<=4,"size must be between 1 and 4"),Q(Wt.offset>=0,"invalid offset"),Q(Wt.stride>=0&&Wt.stride<=255,"stride must be between 0 and 255"),Q(Wt.divisor>=0,"divisor must be positive"),Q(!Wt.divisor||!!fe.angle_instanced_arrays,"ANGLE_instanced_arrays must be enabled to use divisor")):"x"in mr?(Q(Br>0,"first attribute must not be a constant"),Wt.x=+mr.x||0,Wt.y=+mr.y||0,Wt.z=+mr.z||0,Wt.w=+mr.w||0,Wt.state=2):Q(!1,"invalid attribute spec for location "+Br)}return Ur.refresh(),er}return er.destroy=function(){Ur.destroy()},er._vao=Ur,er._reglType="vao",er(dr)}return xr}var ne=35632,ae=35633,oe=35718,we=35721;function be(U,fe,Me,gt){var zt={},xt={};function lt(rt,Pt,_r,Nr){this.name=rt,this.id=Pt,this.location=_r,this.info=Nr}function gr(rt,Pt){for(var _r=0;_r1)for(var jn=0;jnrt&&(rt=Pt.stats.uniformsCount)}),rt},Me.getMaxAttributesCount=function(){var rt=0;return xr.forEach(function(Pt){Pt.stats.attributesCount>rt&&(rt=Pt.stats.attributesCount)}),rt});function Cr(){zt={},xt={};for(var rt=0;rt=0,"missing vertex shader",_r),Q.command(Pt>=0,"missing fragment shader",_r);var Jt=Ir[Pt];Jt||(Jt=Ir[Pt]={});var Vr=Jt[rt];if(Vr&&!Nr)return Vr;var dr=new Or(Pt,rt);return Me.shaderCount++,cr(dr,_r,Nr),Vr||(Jt[rt]=dr),xr.push(dr),dr},restore:Cr,shader:sr,frag:-1,vert:-1}}var Fe=6408,_e=5121,De=3333,Xe=5126;function ot(U,fe,Me,gt,zt,xt,lt){function gr(xr){var wr;fe.next===null?(Q(zt.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),wr=_e):(Q(fe.next.colorAttachments[0].texture!==null,"You cannot read from a renderbuffer"),wr=fe.next.colorAttachments[0].texture._texture.type,xt.oes_texture_float?(Q(wr===_e||wr===Xe,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"),wr===Xe&&Q(lt.readFloat,"Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")):Q(wr===_e,"Reading from a framebuffer is only allowed for the type 'uint8'"));var Or=0,cr=0,Cr=gt.framebufferWidth,rt=gt.framebufferHeight,Pt=null;r(xr)?Pt=xr:xr&&(Q.type(xr,"object","invalid arguments to regl.read()"),Or=xr.x|0,cr=xr.y|0,Q(Or>=0&&Or=0&&cr0&&Cr+Or<=gt.framebufferWidth,"invalid width for read pixels"),Q(rt>0&&rt+cr<=gt.framebufferHeight,"invalid height for read pixels"),Me();var _r=Cr*rt*4;return Pt||(wr===_e?Pt=new Uint8Array(_r):wr===Xe&&(Pt=Pt||new Float32Array(_r))),Q.isTypedArray(Pt,"data buffer for regl.read() must be a typedarray"),Q(Pt.byteLength>=_r,"data buffer for regl.read() too small"),U.pixelStorei(De,4),U.readPixels(Or,cr,Cr,rt,Fe,wr,Pt),Pt}function sr(xr){var wr;return fe.setFBO({framebuffer:xr.framebuffer},function(){wr=gr(xr)}),wr}function Ir(xr){return!xr||!("framebuffer"in xr)?gr(xr):sr(xr)}return Ir}function Ct(U){return Array.prototype.slice.call(U)}function mt(U){return Ct(U).join("")}function kt(){var U=0,fe=[],Me=[];function gt(wr){for(var Or=0;Or0&&(wr.push(rt,"="),wr.push.apply(wr,Ct(arguments)),wr.push(";")),rt}return n(Or,{def:Cr,toString:function(){return mt([cr.length>0?"var "+cr.join(",")+";":"",mt(wr)])}})}function xt(){var wr=zt(),Or=zt(),cr=wr.toString,Cr=Or.toString;function rt(Pt,_r){Or(Pt,_r,"=",wr.def(Pt,_r),";")}return n(function(){wr.apply(wr,Ct(arguments))},{def:wr.def,entry:wr,exit:Or,save:rt,set:function(Pt,_r,Nr){rt(Pt,_r),wr(Pt,_r,"=",Nr,";")},toString:function(){return cr()+Cr()}})}function lt(){var wr=mt(arguments),Or=xt(),cr=xt(),Cr=Or.toString,rt=cr.toString;return n(Or,{then:function(){return Or.apply(Or,Ct(arguments)),this},else:function(){return cr.apply(cr,Ct(arguments)),this},toString:function(){var Pt=rt();return Pt&&(Pt="else{"+Pt+"}"),mt(["if(",wr,"){",Cr(),"}",Pt])}})}var gr=zt(),sr={};function Ir(wr,Or){var cr=[];function Cr(){var Jt="a"+cr.length;return cr.push(Jt),Jt}Or=Or||0;for(var rt=0;rt":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Vc={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},u2={frag:Ey,vert:Sy},jc={cw:ed,ccw:N0};function td(U){return Array.isArray(U)||r(U)||ee(U)}function rd(U){return U.sort(function(fe,Me){return fe===Ro?-1:Me===Ro?1:fe=1,gt>=2,fe)}else if(Me===Yr){var zt=U.data;return new ss(zt.thisDep,zt.contextDep,zt.propDep,fe)}else return new ss(Me===Si,Me===xn,Me===bn,fe)}var l2=new ss(!1,!1,!1,function(){});function Zp(U,fe,Me,gt,zt,xt,lt,gr,sr,Ir,xr,wr,Or,cr,Cr){var rt=Ir.Record,Pt={add:32774,subtract:32778,"reverse subtract":32779};Me.ext_blend_minmax&&(Pt.min=U0,Pt.max=z0);var _r=Me.angle_instanced_arrays,Nr=Me.webgl_draw_buffers,Jt={dirty:!0,profile:Cr.profile},Vr={},dr=[],Ur={},er={};function Fr(te){return te.replace(".","_")}function En(te,me,Pe){var vt=Fr(te);dr.push(te),Vr[vt]=Jt[vt]=!!Pe,Ur[vt]=me}function jn(te,me,Pe){var vt=Fr(te);dr.push(te),Array.isArray(Pe)?(Jt[vt]=Pe.slice(),Vr[vt]=Pe.slice()):Jt[vt]=Vr[vt]=Pe,er[vt]=me}En(Un,Nc),En(Kn,r2),jn(Bn,"blendColor",[0,0,0,0]),jn(On,"blendEquationSeparate",[o2,o2]),jn(Yn,"blendFuncSeparate",[a2,i2,a2,i2]),En(kn,Ty,!0),jn(In,"depthFunc",s2),jn($a,"depthRange",[0,1]),jn(xa,"depthMask",!0),jn(_o,_o,[!0,!0,!0,!0]),En(oo,Z1),jn(_a,"cullFace",zf),jn(ba,ba,N0),jn(Yo,Yo,1),En(Uo,Cy),jn(Ru,"polygonOffset",[0,0]),En(Zo,Ry),En(Zs,Iy),jn(bs,"sampleCoverage",[1,!1]),En(Bc,Yp),jn(sc,"stencilMask",-1),jn(Iu,"stencilFunc",[nl,0,-1]),jn(Dl,"stencilOpSeparate",[fc,$c,$c,$c]),jn(rl,"stencilOpSeparate",[zf,$c,$c,$c]),En(lu,wy),jn(Fl,"scissor",[0,0,U.drawingBufferWidth,U.drawingBufferHeight]),jn(Ro,Ro,[0,0,U.drawingBufferWidth,U.drawingBufferHeight]);var Br={gl:U,context:Or,strings:fe,next:Vr,current:Jt,draw:wr,elements:xt,buffer:zt,shader:xr,attributes:Ir.state,vao:Ir,uniforms:sr,framebuffer:gr,extensions:Me,timer:cr,isBufferArgs:td},mr={primTypes:bu,compareFuncs:Vf,blendFuncs:Ll,blendEquations:Pt,stencilOps:Vc,glTypes:wo,orientationType:jc};Q.optional(function(){Br.isArrayLike=Ia}),Nr&&(mr.backBuffer=[zf],mr.drawBuffer=Fn(gt.maxDrawbuffers,function(te){return te===0?[0]:Fn(te,function(me){return My+me})}));var Wt=0;function Sn(){var te=kt(),me=te.link,Pe=te.global;te.id=Wt++,te.batchId="0";var vt=me(Br),ht=te.shared={props:"a0"};Object.keys(Br).forEach(function(Ve){ht[Ve]=Pe.def(vt,".",Ve)}),Q.optional(function(){te.CHECK=me(Q),te.commandStr=Q.guessCommand(),te.command=me(te.commandStr),te.assert=function(Ve,pe,He){Ve("if(!(",pe,"))",this.CHECK,".commandRaise(",me(He),",",this.command,");")},mr.invalidBlendCombinations=$0});var Le=te.next={},We=te.current={};Object.keys(er).forEach(function(Ve){Array.isArray(Jt[Ve])&&(Le[Ve]=Pe.def(ht.next,".",Ve),We[Ve]=Pe.def(ht.current,".",Ve))});var Ze=te.constants={};Object.keys(mr).forEach(function(Ve){Ze[Ve]=Pe.def(JSON.stringify(mr[Ve]))}),te.invoke=function(Ve,pe){switch(pe.type){case vn:var He=["this",ht.context,ht.props,te.batchId];return Ve.def(me(pe.data),".call(",He.slice(0,Math.max(pe.data.length+1,4)),")");case bn:return Ve.def(ht.props,pe.data);case xn:return Ve.def(ht.context,pe.data);case Si:return Ve.def("this",pe.data);case Yr:return pe.data.append(te,Ve),pe.data.ref}},te.attribCache={};var Te={};return te.scopeAttrib=function(Ve){var pe=fe.id(Ve);if(pe in Te)return Te[pe];var He=Ir.scope[pe];He||(He=Ir.scope[pe]=new rt);var Tt=Te[pe]=me(He);return Tt},te}function ui(te){var me=te.static,Pe=te.dynamic,vt;if(Ma in me){var ht=!!me[Ma];vt=so(function(We,Ze){return ht}),vt.enable=ht}else if(Ma in Pe){var Le=Pe[Ma];vt=Ks(Le,function(We,Ze){return We.invoke(Ze,Le)})}return vt}function jr(te,me){var Pe=te.static,vt=te.dynamic;if(as in Pe){var ht=Pe[as];return ht?(ht=gr.getFramebuffer(ht),Q.command(ht,"invalid framebuffer object"),so(function(We,Ze){var Te=We.link(ht),Ve=We.shared;Ze.set(Ve.framebuffer,".next",Te);var pe=Ve.context;return Ze.set(pe,"."+lc,Te+".width"),Ze.set(pe,"."+fu,Te+".height"),Te})):so(function(We,Ze){var Te=We.shared;Ze.set(Te.framebuffer,".next","null");var Ve=Te.context;return Ze.set(Ve,"."+lc,Ve+"."+os),Ze.set(Ve,"."+fu,Ve+"."+e2),"null"})}else if(as in vt){var Le=vt[as];return Ks(Le,function(We,Ze){var Te=We.invoke(Ze,Le),Ve=We.shared,pe=Ve.framebuffer,He=Ze.def(pe,".getFramebuffer(",Te,")");Q.optional(function(){We.assert(Ze,"!"+Te+"||"+He,"invalid framebuffer object")}),Ze.set(pe,".next",He);var Tt=Ve.context;return Ze.set(Tt,"."+lc,He+"?"+He+".width:"+Tt+"."+os),Ze.set(Tt,"."+fu,He+"?"+He+".height:"+Tt+"."+e2),He})}else return null}function ri(te,me,Pe){var vt=te.static,ht=te.dynamic;function Le(Te){if(Te in vt){var Ve=vt[Te];Q.commandType(Ve,"object","invalid "+Te,Pe.commandStr);var pe=!0,He=Ve.x|0,Tt=Ve.y|0,Ft,ir;return"width"in Ve?(Ft=Ve.width|0,Q.command(Ft>=0,"invalid "+Te,Pe.commandStr)):pe=!1,"height"in Ve?(ir=Ve.height|0,Q.command(ir>=0,"invalid "+Te,Pe.commandStr)):pe=!1,new ss(!pe&&me&&me.thisDep,!pe&&me&&me.contextDep,!pe&&me&&me.propDep,function(cn,Jr){var on=cn.shared.context,Pn=Ft;"width"in Ve||(Pn=Jr.def(on,".",lc,"-",He));var zn=ir;return"height"in Ve||(zn=Jr.def(on,".",fu,"-",Tt)),[He,Tt,Pn,zn]})}else if(Te in ht){var Yt=ht[Te],fr=Ks(Yt,function(cn,Jr){var on=cn.invoke(Jr,Yt);Q.optional(function(){cn.assert(Jr,on+"&&typeof "+on+'==="object"',"invalid "+Te)});var Pn=cn.shared.context,zn=Jr.def(on,".x|0"),Ui=Jr.def(on,".y|0"),fo=Jr.def('"width" in ',on,"?",on,".width|0:","(",Pn,".",lc,"-",zn,")"),al=Jr.def('"height" in ',on,"?",on,".height|0:","(",Pn,".",fu,"-",Ui,")");return Q.optional(function(){cn.assert(Jr,fo+">=0&&"+al+">=0","invalid "+Te)}),[zn,Ui,fo,al]});return me&&(fr.thisDep=fr.thisDep||me.thisDep,fr.contextDep=fr.contextDep||me.contextDep,fr.propDep=fr.propDep||me.propDep),fr}else return me?new ss(me.thisDep,me.contextDep,me.propDep,function(cn,Jr){var on=cn.shared.context;return[0,0,Jr.def(on,".",lc),Jr.def(on,".",fu)]}):null}var We=Le(Ro);if(We){var Ze=We;We=new ss(We.thisDep,We.contextDep,We.propDep,function(Te,Ve){var pe=Ze.append(Te,Ve),He=Te.shared.context;return Ve.set(He,"."+Bh,pe[2]),Ve.set(He,"."+B0,pe[3]),pe})}return{viewport:We,scissor_box:Le(Fl)}}function $n(te,me){var Pe=te.static,vt=typeof Pe[cu]=="string"&&typeof Pe[qs]=="string";if(vt){if(Object.keys(me.dynamic).length>0)return null;var ht=me.static,Le=Object.keys(ht);if(Le.length>0&&typeof ht[Le[0]]=="number"){for(var We=[],Ze=0;Ze=0,"invalid "+pe,me.commandStr),so(function(ir,Yt){return He&&(ir.OFFSET=Tt),Tt})}else if(pe in vt){var Ft=vt[pe];return Ks(Ft,function(ir,Yt){var fr=ir.invoke(Yt,Ft);return He&&(ir.OFFSET=fr,Q.optional(function(){ir.assert(Yt,fr+">=0","invalid "+pe)})),fr})}else if(He&&Le)return so(function(ir,Yt){return ir.OFFSET="0",0});return null}var Te=Ze(Mu,!0);function Ve(){if(Va in Pe){var pe=Pe[Va]|0;return Q.command(typeof pe=="number"&&pe>=0,"invalid vertex count",me.commandStr),so(function(){return pe})}else if(Va in vt){var He=vt[Va];return Ks(He,function(ir,Yt){var fr=ir.invoke(Yt,He);return Q.optional(function(){ir.assert(Yt,"typeof "+fr+'==="number"&&'+fr+">=0&&"+fr+"===("+fr+"|0)","invalid vertex count")}),fr})}else if(Le)if(qo(Le)){if(Le)return Te?new ss(Te.thisDep,Te.contextDep,Te.propDep,function(ir,Yt){var fr=Yt.def(ir.ELEMENTS,".vertCount-",ir.OFFSET);return Q.optional(function(){ir.assert(Yt,fr+">=0","invalid vertex offset/element buffer too small")}),fr}):so(function(ir,Yt){return Yt.def(ir.ELEMENTS,".vertCount")});var Tt=so(function(){return-1});return Q.optional(function(){Tt.MISSING=!0}),Tt}else{var Ft=new ss(Le.thisDep||Te.thisDep,Le.contextDep||Te.contextDep,Le.propDep||Te.propDep,function(ir,Yt){var fr=ir.ELEMENTS;return ir.OFFSET?Yt.def(fr,"?",fr,".vertCount-",ir.OFFSET,":-1"):Yt.def(fr,"?",fr,".vertCount:-1")});return Q.optional(function(){Ft.DYNAMIC=!0}),Ft}return null}return{elements:Le,primitive:We(),count:Ve(),instances:Ze(Fh,!1),offset:Te}}function ja(te,me){var Pe=te.static,vt=te.dynamic,ht={};return dr.forEach(function(Le){var We=Fr(Le);function Ze(Te,Ve){if(Le in Pe){var pe=Te(Pe[Le]);ht[We]=so(function(){return pe})}else if(Le in vt){var He=vt[Le];ht[We]=Ks(He,function(Tt,Ft){return Ve(Tt,Ft,Tt.invoke(Ft,He))})}}switch(Le){case oo:case Kn:case Un:case Bc:case kn:case lu:case Uo:case Zo:case Zs:case xa:return Ze(function(Te){return Q.commandType(Te,"boolean",Le,me.commandStr),Te},function(Te,Ve,pe){return Q.optional(function(){Te.assert(Ve,"typeof "+pe+'==="boolean"',"invalid flag "+Le,Te.commandStr)}),pe});case In:return Ze(function(Te){return Q.commandParameter(Te,Vf,"invalid "+Le,me.commandStr),Vf[Te]},function(Te,Ve,pe){var He=Te.constants.compareFuncs;return Q.optional(function(){Te.assert(Ve,pe+" in "+He,"invalid "+Le+", must be one of "+Object.keys(Vf))}),Ve.def(He,"[",pe,"]")});case $a:return Ze(function(Te){return Q.command(Ia(Te)&&Te.length===2&&typeof Te[0]=="number"&&typeof Te[1]=="number"&&Te[0]<=Te[1],"depth range is 2d array",me.commandStr),Te},function(Te,Ve,pe){Q.optional(function(){Te.assert(Ve,Te.shared.isArrayLike+"("+pe+")&&"+pe+".length===2&&typeof "+pe+'[0]==="number"&&typeof '+pe+'[1]==="number"&&'+pe+"[0]<="+pe+"[1]","depth range must be a 2d array")});var He=Ve.def("+",pe,"[0]"),Tt=Ve.def("+",pe,"[1]");return[He,Tt]});case Yn:return Ze(function(Te){Q.commandType(Te,"object","blend.func",me.commandStr);var Ve="srcRGB"in Te?Te.srcRGB:Te.src,pe="srcAlpha"in Te?Te.srcAlpha:Te.src,He="dstRGB"in Te?Te.dstRGB:Te.dst,Tt="dstAlpha"in Te?Te.dstAlpha:Te.dst;return Q.commandParameter(Ve,Ll,We+".srcRGB",me.commandStr),Q.commandParameter(pe,Ll,We+".srcAlpha",me.commandStr),Q.commandParameter(He,Ll,We+".dstRGB",me.commandStr),Q.commandParameter(Tt,Ll,We+".dstAlpha",me.commandStr),Q.command($0.indexOf(Ve+", "+He)===-1,"unallowed blending combination (srcRGB, dstRGB) = ("+Ve+", "+He+")",me.commandStr),[Ll[Ve],Ll[He],Ll[pe],Ll[Tt]]},function(Te,Ve,pe){var He=Te.constants.blendFuncs;Q.optional(function(){Te.assert(Ve,pe+"&&typeof "+pe+'==="object"',"invalid blend func, must be an object")});function Tt(on,Pn){var zn=Ve.def('"',on,Pn,'" in ',pe,"?",pe,".",on,Pn,":",pe,".",on);return Q.optional(function(){Te.assert(Ve,zn+" in "+He,"invalid "+Le+"."+on+Pn+", must be one of "+Object.keys(Ll))}),zn}var Ft=Tt("src","RGB"),ir=Tt("dst","RGB");Q.optional(function(){var on=Te.constants.invalidBlendCombinations;Te.assert(Ve,on+".indexOf("+Ft+'+", "+'+ir+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var Yt=Ve.def(He,"[",Ft,"]"),fr=Ve.def(He,"[",Tt("src","Alpha"),"]"),cn=Ve.def(He,"[",ir,"]"),Jr=Ve.def(He,"[",Tt("dst","Alpha"),"]");return[Yt,cn,fr,Jr]});case On:return Ze(function(Te){if(typeof Te=="string")return Q.commandParameter(Te,Pt,"invalid "+Le,me.commandStr),[Pt[Te],Pt[Te]];if(typeof Te=="object")return Q.commandParameter(Te.rgb,Pt,Le+".rgb",me.commandStr),Q.commandParameter(Te.alpha,Pt,Le+".alpha",me.commandStr),[Pt[Te.rgb],Pt[Te.alpha]];Q.commandRaise("invalid blend.equation",me.commandStr)},function(Te,Ve,pe){var He=Te.constants.blendEquations,Tt=Ve.def(),Ft=Ve.def(),ir=Te.cond("typeof ",pe,'==="string"');return Q.optional(function(){function Yt(fr,cn,Jr){Te.assert(fr,Jr+" in "+He,"invalid "+cn+", must be one of "+Object.keys(Pt))}Yt(ir.then,Le,pe),Te.assert(ir.else,pe+"&&typeof "+pe+'==="object"',"invalid "+Le),Yt(ir.else,Le+".rgb",pe+".rgb"),Yt(ir.else,Le+".alpha",pe+".alpha")}),ir.then(Tt,"=",Ft,"=",He,"[",pe,"];"),ir.else(Tt,"=",He,"[",pe,".rgb];",Ft,"=",He,"[",pe,".alpha];"),Ve(ir),[Tt,Ft]});case Bn:return Ze(function(Te){return Q.command(Ia(Te)&&Te.length===4,"blend.color must be a 4d array",me.commandStr),Fn(4,function(Ve){return+Te[Ve]})},function(Te,Ve,pe){return Q.optional(function(){Te.assert(Ve,Te.shared.isArrayLike+"("+pe+")&&"+pe+".length===4","blend.color must be a 4d array")}),Fn(4,function(He){return Ve.def("+",pe,"[",He,"]")})});case sc:return Ze(function(Te){return Q.commandType(Te,"number",We,me.commandStr),Te|0},function(Te,Ve,pe){return Q.optional(function(){Te.assert(Ve,"typeof "+pe+'==="number"',"invalid stencil.mask")}),Ve.def(pe,"|0")});case Iu:return Ze(function(Te){Q.commandType(Te,"object",We,me.commandStr);var Ve=Te.cmp||"keep",pe=Te.ref||0,He="mask"in Te?Te.mask:-1;return Q.commandParameter(Ve,Vf,Le+".cmp",me.commandStr),Q.commandType(pe,"number",Le+".ref",me.commandStr),Q.commandType(He,"number",Le+".mask",me.commandStr),[Vf[Ve],pe,He]},function(Te,Ve,pe){var He=Te.constants.compareFuncs;Q.optional(function(){function Yt(){Te.assert(Ve,Array.prototype.join.call(arguments,""),"invalid stencil.func")}Yt(pe+"&&typeof ",pe,'==="object"'),Yt('!("cmp" in ',pe,")||(",pe,".cmp in ",He,")")});var Tt=Ve.def('"cmp" in ',pe,"?",He,"[",pe,".cmp]",":",$c),Ft=Ve.def(pe,".ref|0"),ir=Ve.def('"mask" in ',pe,"?",pe,".mask|0:-1");return[Tt,Ft,ir]});case Dl:case rl:return Ze(function(Te){Q.commandType(Te,"object",We,me.commandStr);var Ve=Te.fail||"keep",pe=Te.zfail||"keep",He=Te.zpass||"keep";return Q.commandParameter(Ve,Vc,Le+".fail",me.commandStr),Q.commandParameter(pe,Vc,Le+".zfail",me.commandStr),Q.commandParameter(He,Vc,Le+".zpass",me.commandStr),[Le===rl?zf:fc,Vc[Ve],Vc[pe],Vc[He]]},function(Te,Ve,pe){var He=Te.constants.stencilOps;Q.optional(function(){Te.assert(Ve,pe+"&&typeof "+pe+'==="object"',"invalid "+Le)});function Tt(Ft){return Q.optional(function(){Te.assert(Ve,'!("'+Ft+'" in '+pe+")||("+pe+"."+Ft+" in "+He+")","invalid "+Le+"."+Ft+", must be one of "+Object.keys(Vc))}),Ve.def('"',Ft,'" in ',pe,"?",He,"[",pe,".",Ft,"]:",$c)}return[Le===rl?zf:fc,Tt("fail"),Tt("zfail"),Tt("zpass")]});case Ru:return Ze(function(Te){Q.commandType(Te,"object",We,me.commandStr);var Ve=Te.factor|0,pe=Te.units|0;return Q.commandType(Ve,"number",We+".factor",me.commandStr),Q.commandType(pe,"number",We+".units",me.commandStr),[Ve,pe]},function(Te,Ve,pe){Q.optional(function(){Te.assert(Ve,pe+"&&typeof "+pe+'==="object"',"invalid "+Le)});var He=Ve.def(pe,".factor|0"),Tt=Ve.def(pe,".units|0");return[He,Tt]});case _a:return Ze(function(Te){var Ve=0;return Te==="front"?Ve=fc:Te==="back"&&(Ve=zf),Q.command(!!Ve,We,me.commandStr),Ve},function(Te,Ve,pe){return Q.optional(function(){Te.assert(Ve,pe+'==="front"||'+pe+'==="back"',"invalid cull.face")}),Ve.def(pe,'==="front"?',fc,":",zf)});case Yo:return Ze(function(Te){return Q.command(typeof Te=="number"&&Te>=gt.lineWidthDims[0]&&Te<=gt.lineWidthDims[1],"invalid line width, must be a positive number between "+gt.lineWidthDims[0]+" and "+gt.lineWidthDims[1],me.commandStr),Te},function(Te,Ve,pe){return Q.optional(function(){Te.assert(Ve,"typeof "+pe+'==="number"&&'+pe+">="+gt.lineWidthDims[0]+"&&"+pe+"<="+gt.lineWidthDims[1],"invalid line width")}),pe});case ba:return Ze(function(Te){return Q.commandParameter(Te,jc,We,me.commandStr),jc[Te]},function(Te,Ve,pe){return Q.optional(function(){Te.assert(Ve,pe+'==="cw"||'+pe+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),Ve.def(pe+'==="cw"?'+ed+":"+N0)});case _o:return Ze(function(Te){return Q.command(Ia(Te)&&Te.length===4,"color.mask must be length 4 array",me.commandStr),Te.map(function(Ve){return!!Ve})},function(Te,Ve,pe){return Q.optional(function(){Te.assert(Ve,Te.shared.isArrayLike+"("+pe+")&&"+pe+".length===4","invalid color.mask")}),Fn(4,function(He){return"!!"+pe+"["+He+"]"})});case bs:return Ze(function(Te){Q.command(typeof Te=="object"&&Te,We,me.commandStr);var Ve="value"in Te?Te.value:1,pe=!!Te.invert;return Q.command(typeof Ve=="number"&&Ve>=0&&Ve<=1,"sample.coverage.value must be a number between 0 and 1",me.commandStr),[Ve,pe]},function(Te,Ve,pe){Q.optional(function(){Te.assert(Ve,pe+"&&typeof "+pe+'==="object"',"invalid sample.coverage")});var He=Ve.def('"value" in ',pe,"?+",pe,".value:1"),Tt=Ve.def("!!",pe,".invert");return[He,Tt]})}}),ht}function Io(te,me){var Pe=te.static,vt=te.dynamic,ht={};return Object.keys(Pe).forEach(function(Le){var We=Pe[Le],Ze;if(typeof We=="number"||typeof We=="boolean")Ze=so(function(){return We});else if(typeof We=="function"){var Te=We._reglType;Te==="texture2d"||Te==="textureCube"?Ze=so(function(Ve){return Ve.link(We)}):Te==="framebuffer"||Te==="framebufferCube"?(Q.command(We.color.length>0,'missing color attachment for framebuffer sent to uniform "'+Le+'"',me.commandStr),Ze=so(function(Ve){return Ve.link(We.color[0])})):Q.commandRaise('invalid data for uniform "'+Le+'"',me.commandStr)}else Ia(We)?Ze=so(function(Ve){var pe=Ve.global.def("[",Fn(We.length,function(He){return Q.command(typeof We[He]=="number"||typeof We[He]=="boolean","invalid uniform "+Le,Ve.commandStr),We[He]}),"]");return pe}):Q.commandRaise('invalid or missing data for uniform "'+Le+'"',me.commandStr);Ze.value=We,ht[Le]=Ze}),Object.keys(vt).forEach(function(Le){var We=vt[Le];ht[Le]=Ks(We,function(Ze,Te){return Ze.invoke(Te,We)})}),ht}function pi(te,me){var Pe=te.static,vt=te.dynamic,ht={};return Object.keys(Pe).forEach(function(Le){var We=Pe[Le],Ze=fe.id(Le),Te=new rt;if(td(We))Te.state=yr,Te.buffer=zt.getBuffer(zt.create(We,Lh,!1,!0)),Te.type=0;else{var Ve=zt.getBuffer(We);if(Ve)Te.state=yr,Te.buffer=Ve,Te.type=0;else if(Q.command(typeof We=="object"&&We,"invalid data for attribute "+Le,me.commandStr),"constant"in We){var pe=We.constant;Te.buffer="null",Te.state=$r,typeof pe=="number"?Te.x=pe:(Q.command(Ia(pe)&&pe.length>0&&pe.length<=4,"invalid constant for attribute "+Le,me.commandStr),qt.forEach(function(cn,Jr){Jr=0,'invalid offset for attribute "'+Le+'"',me.commandStr);var Tt=We.stride|0;Q.command(Tt>=0&&Tt<256,'invalid stride for attribute "'+Le+'", must be integer betweeen [0, 255]',me.commandStr);var Ft=We.size|0;Q.command(!("size"in We)||Ft>0&&Ft<=4,'invalid size for attribute "'+Le+'", must be 1,2,3,4',me.commandStr);var ir=!!We.normalized,Yt=0;"type"in We&&(Q.commandParameter(We.type,wo,"invalid type for attribute "+Le,me.commandStr),Yt=wo[We.type]);var fr=We.divisor|0;"divisor"in We&&(Q.command(fr===0||_r,'cannot specify divisor for attribute "'+Le+'", instancing not supported',me.commandStr),Q.command(fr>=0,'invalid divisor for attribute "'+Le+'"',me.commandStr)),Q.optional(function(){var cn=me.commandStr,Jr=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(We).forEach(function(on){Q.command(Jr.indexOf(on)>=0,'unknown parameter "'+on+'" for attribute pointer "'+Le+'" (valid parameters are '+Jr+")",cn)})}),Te.buffer=Ve,Te.state=yr,Te.size=Ft,Te.normalized=ir,Te.type=Yt||Ve.dtype,Te.offset=He,Te.stride=Tt,Te.divisor=fr}}ht[Le]=so(function(cn,Jr){var on=cn.attribCache;if(Ze in on)return on[Ze];var Pn={isStream:!1};return Object.keys(Te).forEach(function(zn){Pn[zn]=Te[zn]}),Te.buffer&&(Pn.buffer=cn.link(Te.buffer),Pn.type=Pn.type||Pn.buffer+".dtype"),on[Ze]=Pn,Pn})}),Object.keys(vt).forEach(function(Le){var We=vt[Le];function Ze(Te,Ve){var pe=Te.invoke(Ve,We),He=Te.shared,Tt=Te.constants,Ft=He.isBufferArgs,ir=He.buffer;Q.optional(function(){Te.assert(Ve,pe+"&&(typeof "+pe+'==="object"||typeof '+pe+'==="function")&&('+Ft+"("+pe+")||"+ir+".getBuffer("+pe+")||"+ir+".getBuffer("+pe+".buffer)||"+Ft+"("+pe+'.buffer)||("constant" in '+pe+"&&(typeof "+pe+'.constant==="number"||'+He.isArrayLike+"("+pe+".constant))))",'invalid dynamic attribute "'+Le+'"')});var Yt={isStream:Ve.def(!1)},fr=new rt;fr.state=yr,Object.keys(fr).forEach(function(Pn){Yt[Pn]=Ve.def(""+fr[Pn])});var cn=Yt.buffer,Jr=Yt.type;Ve("if(",Ft,"(",pe,")){",Yt.isStream,"=true;",cn,"=",ir,".createStream(",Lh,",",pe,");",Jr,"=",cn,".dtype;","}else{",cn,"=",ir,".getBuffer(",pe,");","if(",cn,"){",Jr,"=",cn,".dtype;",'}else if("constant" in ',pe,"){",Yt.state,"=",$r,";","if(typeof "+pe+'.constant === "number"){',Yt[qt[0]],"=",pe,".constant;",qt.slice(1).map(function(Pn){return Yt[Pn]}).join("="),"=0;","}else{",qt.map(function(Pn,zn){return Yt[Pn]+"="+pe+".constant.length>"+zn+"?"+pe+".constant["+zn+"]:0;"}).join(""),"}}else{","if(",Ft,"(",pe,".buffer)){",cn,"=",ir,".createStream(",Lh,",",pe,".buffer);","}else{",cn,"=",ir,".getBuffer(",pe,".buffer);","}",Jr,'="type" in ',pe,"?",Tt.glTypes,"[",pe,".type]:",cn,".dtype;",Yt.normalized,"=!!",pe,".normalized;");function on(Pn){Ve(Yt[Pn],"=",pe,".",Pn,"|0;")}return on("size"),on("offset"),on("stride"),on("divisor"),Ve("}}"),Ve.exit("if(",Yt.isStream,"){",ir,".destroyStream(",cn,");","}"),Yt}ht[Le]=Ks(We,Ze)}),ht}function Ha(te,me){var Pe=te.static,vt=te.dynamic;if(Bl in Pe){var ht=Pe[Bl];return ht!==null&&Ir.getVAO(ht)===null&&(ht=Ir.createVAO(ht)),so(function(We){return We.link(Ir.getVAO(ht))})}else if(Bl in vt){var Le=vt[Bl];return Ks(Le,function(We,Ze){var Te=We.invoke(Ze,Le);return Ze.def(We.shared.vao+".getVAO("+Te+")")})}return null}function la(te){var me=te.static,Pe=te.dynamic,vt={};return Object.keys(me).forEach(function(ht){var Le=me[ht];vt[ht]=so(function(We,Ze){return typeof Le=="number"||typeof Le=="boolean"?""+Le:We.link(Le)})}),Object.keys(Pe).forEach(function(ht){var Le=Pe[ht];vt[ht]=Ks(Le,function(We,Ze){return We.invoke(Ze,Le)})}),vt}function uo(te,me,Pe,vt,ht){var Le=te.static,We=te.dynamic;Q.optional(function(){var on=[as,qs,cu,vi,yo,Mu,Va,Fh,Ma,Bl].concat(dr);function Pn(zn){Object.keys(zn).forEach(function(Ui){Q.command(on.indexOf(Ui)>=0,'unknown parameter "'+Ui+'"',ht.commandStr)})}Pn(Le),Pn(We)});var Ze=$n(te,me),Te=jr(te),Ve=ri(te,Te,ht),pe=Di(te,ht),He=ja(te,ht),Tt=Dn(te,ht,Ze);function Ft(on){var Pn=Ve[on];Pn&&(He[on]=Pn)}Ft(Ro),Ft(Fr(Fl));var ir=Object.keys(He).length>0,Yt={framebuffer:Te,draw:pe,shader:Tt,state:He,dirty:ir,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Yt.profile=ui(te),Yt.uniforms=Io(Pe,ht),Yt.drawVAO=Yt.scopeVAO=Ha(te),!Yt.drawVAO&&Tt.program&&!Ze&&Me.angle_instanced_arrays){var fr=!0,cn=Tt.program.attributes.map(function(on){var Pn=me.static[on];return fr=fr&&!!Pn,Pn});if(fr&&cn.length>0){var Jr=Ir.getVAO(Ir.createVAO(cn));Yt.drawVAO=new ss(null,null,null,function(on,Pn){return on.link(Jr)}),Yt.useVAO=!0}}return Ze?Yt.useVAO=!0:Yt.attributes=pi(me,ht),Yt.context=la(vt),Yt}function lo(te,me,Pe){var vt=te.shared,ht=vt.context,Le=te.scope();Object.keys(Pe).forEach(function(We){me.save(ht,"."+We);var Ze=Pe[We];Le(ht,".",We,"=",Ze.append(te,me),";")}),me(Le)}function Oa(te,me,Pe,vt){var ht=te.shared,Le=ht.gl,We=ht.framebuffer,Ze;Nr&&(Ze=me.def(ht.extensions,".webgl_draw_buffers"));var Te=te.constants,Ve=Te.drawBuffer,pe=Te.backBuffer,He;Pe?He=Pe.append(te,me):He=me.def(We,".next"),vt||me("if(",He,"!==",We,".cur){"),me("if(",He,"){",Le,".bindFramebuffer(",$f,",",He,".framebuffer);"),Nr&&me(Ze,".drawBuffersWEBGL(",Ve,"[",He,".colorAttachments.length]);"),me("}else{",Le,".bindFramebuffer(",$f,",null);"),Nr&&me(Ze,".drawBuffersWEBGL(",pe,");"),me("}",We,".cur=",He,";"),vt||me("}")}function xo(te,me,Pe){var vt=te.shared,ht=vt.gl,Le=te.current,We=te.next,Ze=vt.current,Te=vt.next,Ve=te.cond(Ze,".dirty");dr.forEach(function(pe){var He=Fr(pe);if(!(He in Pe.state)){var Tt,Ft;if(He in We){Tt=We[He],Ft=Le[He];var ir=Fn(Jt[He].length,function(fr){return Ve.def(Tt,"[",fr,"]")});Ve(te.cond(ir.map(function(fr,cn){return fr+"!=="+Ft+"["+cn+"]"}).join("||")).then(ht,".",er[He],"(",ir,");",ir.map(function(fr,cn){return Ft+"["+cn+"]="+fr}).join(";"),";"))}else{Tt=Ve.def(Te,".",He);var Yt=te.cond(Tt,"!==",Ze,".",He);Ve(Yt),He in Ur?Yt(te.cond(Tt).then(ht,".enable(",Ur[He],");").else(ht,".disable(",Ur[He],");"),Ze,".",He,"=",Tt,";"):Yt(ht,".",er[He],"(",Tt,");",Ze,".",He,"=",Tt,";")}}}),Object.keys(Pe.state).length===0&&Ve(Ze,".dirty=false;"),me(Ve)}function Ko(te,me,Pe,vt){var ht=te.shared,Le=te.current,We=ht.current,Ze=ht.gl;rd(Object.keys(Pe)).forEach(function(Te){var Ve=Pe[Te];if(!(vt&&!vt(Ve))){var pe=Ve.append(te,me);if(Ur[Te]){var He=Ur[Te];qo(Ve)?pe?me(Ze,".enable(",He,");"):me(Ze,".disable(",He,");"):me(te.cond(pe).then(Ze,".enable(",He,");").else(Ze,".disable(",He,");")),me(We,".",Te,"=",pe,";")}else if(Ia(pe)){var Tt=Le[Te];me(Ze,".",er[Te],"(",pe,");",pe.map(function(Ft,ir){return Tt+"["+ir+"]="+Ft}).join(";"),";")}else me(Ze,".",er[Te],"(",pe,");",We,".",Te,"=",pe,";")}})}function co(te,me){_r&&(te.instancing=me.def(te.shared.extensions,".angle_instanced_arrays"))}function ei(te,me,Pe,vt,ht){var Le=te.shared,We=te.stats,Ze=Le.current,Te=Le.timer,Ve=Pe.profile;function pe(){return typeof performance>"u"?"Date.now()":"performance.now()"}var He,Tt;function Ft(on){He=me.def(),on(He,"=",pe(),";"),typeof ht=="string"?on(We,".count+=",ht,";"):on(We,".count++;"),cr&&(vt?(Tt=me.def(),on(Tt,"=",Te,".getNumPendingQueries();")):on(Te,".beginQuery(",We,");"))}function ir(on){on(We,".cpuTime+=",pe(),"-",He,";"),cr&&(vt?on(Te,".pushScopeStats(",Tt,",",Te,".getNumPendingQueries(),",We,");"):on(Te,".endQuery();"))}function Yt(on){var Pn=me.def(Ze,".profile");me(Ze,".profile=",on,";"),me.exit(Ze,".profile=",Pn,";")}var fr;if(Ve){if(qo(Ve)){Ve.enable?(Ft(me),ir(me.exit),Yt("true")):Yt("false");return}fr=Ve.append(te,me),Yt(fr)}else fr=me.def(Ze,".profile");var cn=te.block();Ft(cn),me("if(",fr,"){",cn,"}");var Jr=te.block();ir(Jr),me.exit("if(",fr,"){",Jr,"}")}function zo(te,me,Pe,vt,ht){var Le=te.shared;function We(Te){switch(Te){case q1:case Q1:case Bf:return 2;case Nh:case Pa:case Lf:return 3;case K1:case Ff:case zc:return 4;default:return 1}}function Ze(Te,Ve,pe){var He=Le.gl,Tt=me.def(Te,".location"),Ft=me.def(Le.attributes,"[",Tt,"]"),ir=pe.state,Yt=pe.buffer,fr=[pe.x,pe.y,pe.z,pe.w],cn=["buffer","normalized","offset","stride"];function Jr(){me("if(!",Ft,".buffer){",He,".enableVertexAttribArray(",Tt,");}");var Pn=pe.type,zn;if(pe.size?zn=me.def(pe.size,"||",Ve):zn=Ve,me("if(",Ft,".type!==",Pn,"||",Ft,".size!==",zn,"||",cn.map(function(fo){return Ft+"."+fo+"!=="+pe[fo]}).join("||"),"){",He,".bindBuffer(",Lh,",",Yt,".buffer);",He,".vertexAttribPointer(",[Tt,zn,Pn,pe.normalized,pe.stride,pe.offset],");",Ft,".type=",Pn,";",Ft,".size=",zn,";",cn.map(function(fo){return Ft+"."+fo+"="+pe[fo]+";"}).join(""),"}"),_r){var Ui=pe.divisor;me("if(",Ft,".divisor!==",Ui,"){",te.instancing,".vertexAttribDivisorANGLE(",[Tt,Ui],");",Ft,".divisor=",Ui,";}")}}function on(){me("if(",Ft,".buffer){",He,".disableVertexAttribArray(",Tt,");",Ft,".buffer=null;","}if(",qt.map(function(Pn,zn){return Ft+"."+Pn+"!=="+fr[zn]}).join("||"),"){",He,".vertexAttrib4f(",Tt,",",fr,");",qt.map(function(Pn,zn){return Ft+"."+Pn+"="+fr[zn]+";"}).join(""),"}")}ir===yr?Jr():ir===$r?on():(me("if(",ir,"===",yr,"){"),Jr(),me("}else{"),on(),me("}"))}vt.forEach(function(Te){var Ve=Te.name,pe=Pe.attributes[Ve],He;if(pe){if(!ht(pe))return;He=pe.append(te,me)}else{if(!ht(l2))return;var Tt=te.scopeAttrib(Ve);Q.optional(function(){te.assert(me,Tt+".state","missing attribute "+Ve)}),He={},Object.keys(new rt).forEach(function(Ft){He[Ft]=me.def(Tt,".",Ft)})}Ze(te.link(Te),We(Te.info.type),He)})}function Ni(te,me,Pe,vt,ht){for(var Le=te.shared,We=Le.gl,Ze,Te=0;Te1?me(Fn(Pn,function(al){return Yt+"["+al+"]"})):me(Yt);me(");")}}function Mn(te,me,Pe,vt){var ht=te.shared,Le=ht.gl,We=ht.draw,Ze=vt.draw;function Te(){var zn=Ze.elements,Ui,fo=me;return zn?((zn.contextDep&&vt.contextDynamic||zn.propDep)&&(fo=Pe),Ui=zn.append(te,fo)):Ui=fo.def(We,".",vi),Ui&&fo("if("+Ui+")"+Le+".bindBuffer("+by+","+Ui+".buffer.buffer);"),Ui}function Ve(){var zn=Ze.count,Ui,fo=me;return zn?((zn.contextDep&&vt.contextDynamic||zn.propDep)&&(fo=Pe),Ui=zn.append(te,fo),Q.optional(function(){zn.MISSING&&te.assert(me,"false","missing vertex count"),zn.DYNAMIC&&te.assert(fo,Ui+">=0","missing vertex count")})):(Ui=fo.def(We,".",Va),Q.optional(function(){te.assert(fo,Ui+">=0","missing vertex count")})),Ui}var pe=Te();function He(zn){var Ui=Ze[zn];return Ui?Ui.contextDep&&vt.contextDynamic||Ui.propDep?Ui.append(te,Pe):Ui.append(te,me):me.def(We,".",zn)}var Tt=He(yo),Ft=He(Mu),ir=Ve();if(typeof ir=="number"){if(ir===0)return}else Pe("if(",ir,"){"),Pe.exit("}");var Yt,fr;_r&&(Yt=He(Fh),fr=te.instancing);var cn=pe+".type",Jr=Ze.elements&&qo(Ze.elements);function on(){function zn(){Pe(fr,".drawElementsInstancedANGLE(",[Tt,ir,cn,Ft+"<<(("+cn+"-"+Tr+")>>1)",Yt],");")}function Ui(){Pe(fr,".drawArraysInstancedANGLE(",[Tt,Ft,ir,Yt],");")}pe?Jr?zn():(Pe("if(",pe,"){"),zn(),Pe("}else{"),Ui(),Pe("}")):Ui()}function Pn(){function zn(){Pe(Le+".drawElements("+[Tt,ir,cn,Ft+"<<(("+cn+"-"+Tr+")>>1)"]+");")}function Ui(){Pe(Le+".drawArrays("+[Tt,Ft,ir]+");")}pe?Jr?zn():(Pe("if(",pe,"){"),zn(),Pe("}else{"),Ui(),Pe("}")):Ui()}_r&&(typeof Yt!="number"||Yt>=0)?typeof Yt=="string"?(Pe("if(",Yt,">0){"),on(),Pe("}else if(",Yt,"<0){"),Pn(),Pe("}")):on():Pn()}function fi(te,me,Pe,vt,ht){var Le=Sn(),We=Le.proc("body",ht);return Q.optional(function(){Le.commandStr=me.commandStr,Le.command=Le.link(me.commandStr)}),_r&&(Le.instancing=We.def(Le.shared.extensions,".angle_instanced_arrays")),te(Le,We,Pe,vt),Le.compile().body}function Mi(te,me,Pe,vt){co(te,me),Pe.useVAO?Pe.drawVAO?me(te.shared.vao,".setVAO(",Pe.drawVAO.append(te,me),");"):me(te.shared.vao,".setVAO(",te.shared.vao,".targetVAO);"):(me(te.shared.vao,".setVAO(null);"),zo(te,me,Pe,vt.attributes,function(){return!0})),Ni(te,me,Pe,vt.uniforms,function(){return!0}),Mn(te,me,me,Pe)}function Ga(te,me){var Pe=te.proc("draw",1);co(te,Pe),lo(te,Pe,me.context),Oa(te,Pe,me.framebuffer),xo(te,Pe,me),Ko(te,Pe,me.state),ei(te,Pe,me,!1,!0);var vt=me.shader.progVar.append(te,Pe);if(Pe(te.shared.gl,".useProgram(",vt,".program);"),me.shader.program)Mi(te,Pe,me,me.shader.program);else{Pe(te.shared.vao,".setVAO(null);");var ht=te.global.def("{}"),Le=Pe.def(vt,".id"),We=Pe.def(ht,"[",Le,"]");Pe(te.cond(We).then(We,".call(this,a0);").else(We,"=",ht,"[",Le,"]=",te.link(function(Ze){return fi(Mi,te,me,Ze,1)}),"(",vt,");",We,".call(this,a0);"))}Object.keys(me.state).length>0&&Pe(te.shared.current,".dirty=true;")}function il(te,me,Pe,vt){te.batchId="a1",co(te,me);function ht(){return!0}zo(te,me,Pe,vt.attributes,ht),Ni(te,me,Pe,vt.uniforms,ht),Mn(te,me,me,Pe)}function Ae(te,me,Pe,vt){co(te,me);var ht=Pe.contextDep,Le=me.def(),We="a0",Ze="a1",Te=me.def();te.shared.props=Te,te.batchId=Le;var Ve=te.scope(),pe=te.scope();me(Ve.entry,"for(",Le,"=0;",Le,"<",Ze,";++",Le,"){",Te,"=",We,"[",Le,"];",pe,"}",Ve.exit);function He(cn){return cn.contextDep&&ht||cn.propDep}function Tt(cn){return!He(cn)}if(Pe.needsContext&&lo(te,pe,Pe.context),Pe.needsFramebuffer&&Oa(te,pe,Pe.framebuffer),Ko(te,pe,Pe.state,He),Pe.profile&&He(Pe.profile)&&ei(te,pe,Pe,!1,!0),vt)Pe.useVAO?Pe.drawVAO?He(Pe.drawVAO)?pe(te.shared.vao,".setVAO(",Pe.drawVAO.append(te,pe),");"):Ve(te.shared.vao,".setVAO(",Pe.drawVAO.append(te,Ve),");"):Ve(te.shared.vao,".setVAO(",te.shared.vao,".targetVAO);"):(Ve(te.shared.vao,".setVAO(null);"),zo(te,Ve,Pe,vt.attributes,Tt),zo(te,pe,Pe,vt.attributes,He)),Ni(te,Ve,Pe,vt.uniforms,Tt),Ni(te,pe,Pe,vt.uniforms,He),Mn(te,Ve,pe,Pe);else{var Ft=te.global.def("{}"),ir=Pe.shader.progVar.append(te,pe),Yt=pe.def(ir,".id"),fr=pe.def(Ft,"[",Yt,"]");pe(te.shared.gl,".useProgram(",ir,".program);","if(!",fr,"){",fr,"=",Ft,"[",Yt,"]=",te.link(function(cn){return fi(il,te,Pe,cn,2)}),"(",ir,");}",fr,".call(this,a0[",Le,"],",Le,");")}}function Et(te,me){var Pe=te.proc("batch",2);te.batchId="0",co(te,Pe);var vt=!1,ht=!0;Object.keys(me.context).forEach(function(Ft){vt=vt||me.context[Ft].propDep}),vt||(lo(te,Pe,me.context),ht=!1);var Le=me.framebuffer,We=!1;Le?(Le.propDep?vt=We=!0:Le.contextDep&&vt&&(We=!0),We||Oa(te,Pe,Le)):Oa(te,Pe,null),me.state.viewport&&me.state.viewport.propDep&&(vt=!0);function Ze(Ft){return Ft.contextDep&&vt||Ft.propDep}xo(te,Pe,me),Ko(te,Pe,me.state,function(Ft){return!Ze(Ft)}),(!me.profile||!Ze(me.profile))&&ei(te,Pe,me,!1,"a1"),me.contextDep=vt,me.needsContext=ht,me.needsFramebuffer=We;var Te=me.shader.progVar;if(Te.contextDep&&vt||Te.propDep)Ae(te,Pe,me,null);else{var Ve=Te.append(te,Pe);if(Pe(te.shared.gl,".useProgram(",Ve,".program);"),me.shader.program)Ae(te,Pe,me,me.shader.program);else{Pe(te.shared.vao,".setVAO(null);");var pe=te.global.def("{}"),He=Pe.def(Ve,".id"),Tt=Pe.def(pe,"[",He,"]");Pe(te.cond(Tt).then(Tt,".call(this,a0,a1);").else(Tt,"=",pe,"[",He,"]=",te.link(function(Ft){return fi(Ae,te,me,Ft,2)}),"(",Ve,");",Tt,".call(this,a0,a1);"))}}Object.keys(me.state).length>0&&Pe(te.shared.current,".dirty=true;")}function pt(te,me){var Pe=te.proc("scope",3);te.batchId="a2";var vt=te.shared,ht=vt.current;lo(te,Pe,me.context),me.framebuffer&&me.framebuffer.append(te,Pe),rd(Object.keys(me.state)).forEach(function(We){var Ze=me.state[We],Te=Ze.append(te,Pe);Ia(Te)?Te.forEach(function(Ve,pe){Pe.set(te.next[We],"["+pe+"]",Ve)}):Pe.set(vt.next,"."+We,Te)}),ei(te,Pe,me,!0,!0),[vi,Mu,Va,Fh,yo].forEach(function(We){var Ze=me.draw[We];Ze&&Pe.set(vt.draw,"."+We,""+Ze.append(te,Pe))}),Object.keys(me.uniforms).forEach(function(We){Pe.set(vt.uniforms,"["+fe.id(We)+"]",me.uniforms[We].append(te,Pe))}),Object.keys(me.attributes).forEach(function(We){var Ze=me.attributes[We].append(te,Pe),Te=te.scopeAttrib(We);Object.keys(new rt).forEach(function(Ve){Pe.set(Te,"."+Ve,Ze[Ve])})}),me.scopeVAO&&Pe.set(vt.vao,".targetVAO",me.scopeVAO.append(te,Pe));function Le(We){var Ze=me.shader[We];Ze&&Pe.set(vt.shader,"."+We,Ze.append(te,Pe))}Le(qs),Le(cu),Object.keys(me.state).length>0&&(Pe(ht,".dirty=true;"),Pe.exit(ht,".dirty=true;")),Pe("a1(",te.shared.context,",a0,",te.batchId,");")}function Hr(te){if(!(typeof te!="object"||Ia(te))){for(var me=Object.keys(te),Pe=0;Pe=0;--Mn){var fi=Wt[Mn];fi&&fi(cr,null,0)}Me.flush(),Ir&&Ir.update()}function Dn(){!ri&&Wt.length>0&&(ri=Vt.next($n))}function Di(){ri&&(Vt.cancel($n),ri=null)}function ja(Mn){Mn.preventDefault(),zt=!0,Di(),Sn.forEach(function(fi){fi()})}function Io(Mn){Me.getError(),zt=!1,xt.restore(),dr.restore(),_r.restore(),Ur.restore(),er.restore(),Fr.restore(),Nr.restore(),Ir&&Ir.restore(),En.procs.refresh(),Dn(),ui.forEach(function(fi){fi()})}mr&&(mr.addEventListener(V0,ja,!1),mr.addEventListener(d2,Io,!1));function pi(){Wt.length=0,Di(),mr&&(mr.removeEventListener(V0,ja),mr.removeEventListener(d2,Io)),dr.clear(),Fr.clear(),er.clear(),Ur.clear(),Vr.clear(),_r.clear(),Nr.clear(),Ir&&Ir.clear(),jr.forEach(function(Mn){Mn()})}function Ha(Mn){Q(!!Mn,"invalid args to regl({...})"),Q.type(Mn,"object","invalid args to regl({...})");function fi(ht){var Le=n({},ht);delete Le.uniforms,delete Le.attributes,delete Le.context,delete Le.vao,"stencil"in Le&&Le.stencil.op&&(Le.stencil.opBack=Le.stencil.opFront=Le.stencil.op,delete Le.stencil.op);function We(Ze){if(Ze in Le){var Te=Le[Ze];delete Le[Ze],Object.keys(Te).forEach(function(Ve){Le[Ze+"."+Ve]=Te[Ve]})}}return We("blend"),We("depth"),We("cull"),We("stencil"),We("polygonOffset"),We("scissor"),We("sample"),"vao"in ht&&(Le.vao=ht.vao),Le}function Mi(ht){var Le={},We={};return Object.keys(ht).forEach(function(Ze){var Te=ht[Ze];ct.isDynamic(Te)?We[Ze]=ct.unbox(Te,Ze):Le[Ze]=Te}),{dynamic:We,static:Le}}var Ga=Mi(Mn.context||{}),il=Mi(Mn.uniforms||{}),Ae=Mi(Mn.attributes||{}),Et=Mi(fi(Mn)),pt={gpuTime:0,cpuTime:0,count:0},Hr=En.compile(Et,Ae,il,Ga,pt),ni=Hr.draw,Zi=Hr.batch,te=Hr.scope,me=[];function Pe(ht){for(;me.length0)return Zi.call(this,Pe(ht|0),ht|0)}else if(Array.isArray(ht)){if(ht.length)return Zi.call(this,ht,ht.length)}else return ni.call(this,ht)}return n(vt,{stats:pt})}var la=Fr.setFBO=Ha({framebuffer:ct.define.call(null,j0,"framebuffer")});function uo(Mn,fi){var Mi=0;En.procs.poll();var Ga=fi.color;Ga&&(Me.clearColor(+Ga[0]||0,+Ga[1]||0,+Ga[2]||0,+Ga[3]||0),Mi|=h2),"depth"in fi&&(Me.clearDepth(+fi.depth),Mi|=us),"stencil"in fi&&(Me.clearStencil(fi.stencil|0),Mi|=Dy),Q(!!Mi,"called regl.clear with no buffer specified"),Me.clear(Mi)}function lo(Mn){if(Q(typeof Mn=="object"&&Mn,"regl.clear() takes an object as input"),"framebuffer"in Mn)if(Mn.framebuffer&&Mn.framebuffer_reglType==="framebufferCube")for(var fi=0;fi<6;++fi)la(n({framebuffer:Mn.framebuffer.faces[fi]},Mn),uo);else la(Mn,uo);else uo(null,Mn)}function Oa(Mn){Q.type(Mn,"function","regl.frame() callback must be a function"),Wt.push(Mn);function fi(){var Mi=v2(Wt,Mn);Q(Mi>=0,"cannot cancel a frame twice");function Ga(){var il=v2(Wt,Ga);Wt[il]=Wt[Wt.length-1],Wt.length-=1,Wt.length<=0&&Di()}Wt[Mi]=Ga}return Dn(),{cancel:fi}}function xo(){var Mn=Br.viewport,fi=Br.scissor_box;Mn[0]=Mn[1]=fi[0]=fi[1]=0,cr.viewportWidth=cr.framebufferWidth=cr.drawingBufferWidth=Mn[2]=fi[2]=Me.drawingBufferWidth,cr.viewportHeight=cr.framebufferHeight=cr.drawingBufferHeight=Mn[3]=fi[3]=Me.drawingBufferHeight}function Ko(){cr.tick+=1,cr.time=ei(),xo(),En.procs.poll()}function co(){xo(),En.procs.refresh(),Ir&&Ir.update()}function ei(){return(Qr()-xr)/1e3}co();function zo(Mn,fi){Q.type(fi,"function","listener callback must be a function");var Mi;switch(Mn){case"frame":return Oa(fi);case"lost":Mi=Sn;break;case"restore":Mi=ui;break;case"destroy":Mi=jr;break;default:Q.raise("invalid event, must be one of frame,lost,restore,destroy")}return Mi.push(fi),{cancel:function(){for(var Ga=0;Ga=0},read:jn,destroy:pi,_gl:Me,_refresh:co,poll:function(){Ko(),Ir&&Ir.update()},now:ei,stats:gr});return fe.onDone(null,Ni),Ni}return m2})})(ek);var Gge=ek.exports;const Wge=oa(Gge);var Xge=function(){function e(t,r){Ht(this,e);var n=r.buffer,i=r.offset,o=r.stride,a=r.normalized,u=r.size,c=r.divisor;this.buffer=n,this.attribute={buffer:n.get(),offset:i||0,stride:o||0,normalized:a||!1,divisor:c||0},u&&(this.attribute.size=u)}return jt(e,[{key:"get",value:function(){return this.attribute}},{key:"updateBuffer",value:function(r){this.buffer.subData(r)}},{key:"destroy",value:function(){this.buffer.destroy()}}]),e}(),Kf,Lv,np,zl,Nv,ip,Uv,pg,ef,f1,Bs,tf,rf,dg,Yge=(Kf={},F(Kf,W.POINTS,"points"),F(Kf,W.LINES,"lines"),F(Kf,W.LINE_LOOP,"line loop"),F(Kf,W.LINE_STRIP,"line strip"),F(Kf,W.TRIANGLES,"triangles"),F(Kf,W.TRIANGLE_FAN,"triangle fan"),F(Kf,W.TRIANGLE_STRIP,"triangle strip"),Kf),tk=(Lv={},F(Lv,W.STATIC_DRAW,"static"),F(Lv,W.DYNAMIC_DRAW,"dynamic"),F(Lv,W.STREAM_DRAW,"stream"),Lv),Ab=(np={},F(np,W.BYTE,"int8"),F(np,W.INT,"int32"),F(np,W.UNSIGNED_BYTE,"uint8"),F(np,W.UNSIGNED_SHORT,"uint16"),F(np,W.UNSIGNED_INT,"uint32"),F(np,W.FLOAT,"float"),np),Zge=(zl={},F(zl,W.ALPHA,"alpha"),F(zl,W.LUMINANCE,"luminance"),F(zl,W.LUMINANCE_ALPHA,"luminance alpha"),F(zl,W.RGB,"rgb"),F(zl,W.RGBA,"rgba"),F(zl,W.RGBA4,"rgba4"),F(zl,W.RGB5_A1,"rgb5 a1"),F(zl,W.RGB565,"rgb565"),F(zl,W.DEPTH_COMPONENT,"depth"),F(zl,W.DEPTH_STENCIL,"depth stencil"),zl),qge=(Nv={},F(Nv,W.DONT_CARE,"dont care"),F(Nv,W.NICEST,"nice"),F(Nv,W.FASTEST,"fast"),Nv),J9=(ip={},F(ip,W.NEAREST,"nearest"),F(ip,W.LINEAR,"linear"),F(ip,W.LINEAR_MIPMAP_LINEAR,"mipmap"),F(ip,W.NEAREST_MIPMAP_LINEAR,"nearest mipmap linear"),F(ip,W.LINEAR_MIPMAP_NEAREST,"linear mipmap nearest"),F(ip,W.NEAREST_MIPMAP_NEAREST,"nearest mipmap nearest"),ip),eC=(Uv={},F(Uv,W.REPEAT,"repeat"),F(Uv,W.CLAMP_TO_EDGE,"clamp"),F(Uv,W.MIRRORED_REPEAT,"mirror"),Uv),Kge=(pg={},F(pg,W.NONE,"none"),F(pg,W.BROWSER_DEFAULT_WEBGL,"browser"),pg),Qge=(ef={},F(ef,W.NEVER,"never"),F(ef,W.ALWAYS,"always"),F(ef,W.LESS,"less"),F(ef,W.LEQUAL,"lequal"),F(ef,W.GREATER,"greater"),F(ef,W.GEQUAL,"gequal"),F(ef,W.EQUAL,"equal"),F(ef,W.NOTEQUAL,"notequal"),ef),tC=(f1={},F(f1,W.FUNC_ADD,"add"),F(f1,W.MIN_EXT,"min"),F(f1,W.MAX_EXT,"max"),F(f1,W.FUNC_SUBTRACT,"subtract"),F(f1,W.FUNC_REVERSE_SUBTRACT,"reverse subtract"),f1),vg=(Bs={},F(Bs,W.ZERO,"zero"),F(Bs,W.ONE,"one"),F(Bs,W.SRC_COLOR,"src color"),F(Bs,W.ONE_MINUS_SRC_COLOR,"one minus src color"),F(Bs,W.SRC_ALPHA,"src alpha"),F(Bs,W.ONE_MINUS_SRC_ALPHA,"one minus src alpha"),F(Bs,W.DST_COLOR,"dst color"),F(Bs,W.ONE_MINUS_DST_COLOR,"one minus dst color"),F(Bs,W.DST_ALPHA,"dst alpha"),F(Bs,W.ONE_MINUS_DST_ALPHA,"one minus dst alpha"),F(Bs,W.CONSTANT_COLOR,"constant color"),F(Bs,W.ONE_MINUS_CONSTANT_COLOR,"one minus constant color"),F(Bs,W.CONSTANT_ALPHA,"constant alpha"),F(Bs,W.ONE_MINUS_CONSTANT_ALPHA,"one minus constant alpha"),F(Bs,W.SRC_ALPHA_SATURATE,"src alpha saturate"),Bs),Jge=(tf={},F(tf,W.NEVER,"never"),F(tf,W.ALWAYS,"always"),F(tf,W.LESS,"less"),F(tf,W.LEQUAL,"lequal"),F(tf,W.GREATER,"greater"),F(tf,W.GEQUAL,"gequal"),F(tf,W.EQUAL,"equal"),F(tf,W.NOTEQUAL,"notequal"),tf),Fd=(rf={},F(rf,W.ZERO,"zero"),F(rf,W.KEEP,"keep"),F(rf,W.REPLACE,"replace"),F(rf,W.INVERT,"invert"),F(rf,W.INCR,"increment"),F(rf,W.DECR,"decrement"),F(rf,W.INCR_WRAP,"increment wrap"),F(rf,W.DECR_WRAP,"decrement wrap"),rf),e_e=(dg={},F(dg,W.FRONT,"front"),F(dg,W.BACK,"back"),dg),t_e=function(){function e(t,r){Ht(this,e),F(this,"isDestroyed",!1);var n=r.data,i=r.usage,o=r.type;this.buffer=t.buffer({data:n,usage:tk[i||W.STATIC_DRAW],type:Ab[o||W.UNSIGNED_BYTE]})}return jt(e,[{key:"get",value:function(){return this.buffer}},{key:"destroy",value:function(){this.isDestroyed||this.buffer.destroy(),this.isDestroyed=!0}},{key:"subData",value:function(r){var n=r.data,i=r.offset;this.buffer.subdata(n,i)}}]),e}(),r_e=function(){function e(t,r){Ht(this,e);var n=r.data,i=r.usage,o=r.type,a=r.count;this.elements=t.elements({data:n,usage:tk[i||W.STATIC_DRAW],type:Ab[o||W.UNSIGNED_BYTE],count:a})}return jt(e,[{key:"get",value:function(){return this.elements}},{key:"subData",value:function(r){var n=r.data;this.elements.subdata(n)}},{key:"destroy",value:function(){}}]),e}(),n_e=function(){function e(t,r){Ht(this,e);var n=r.width,i=r.height,o=r.color,a=r.colors,u={width:n,height:i};Array.isArray(a)&&(u.colors=a.map(function(c){return c.get()})),o&&typeof o!="boolean"&&(u.color=o.get()),this.framebuffer=t.framebuffer(u)}return jt(e,[{key:"get",value:function(){return this.framebuffer}},{key:"destroy",value:function(){this.framebuffer.destroy()}},{key:"resize",value:function(r){var n=r.width,i=r.height;this.framebuffer.resize(n,i)}}]),e}(),i_e=Ci.isPlainObject,a_e=Ci.isTypedArray,o_e=function(){function e(t,r){Ht(this,e),F(this,"destroyed",!1),F(this,"uniforms",{}),this.reGl=t;var n=r.vs,i=r.fs,o=r.attributes,a=r.uniforms,u=r.primitive,c=r.count,f=r.elements,m=r.depth,_=r.cull,b=r.instances,A={platformString:"WebGL1",glslVersion:"#version 100",explicitBindingLocations:!1,separateSamplerTextures:!1,viewportOrigin:vf.LOWER_LEFT,clipSpaceNearZ:m0.NEGATIVE_ONE,supportMRT:!1},w={};this.options=r,a&&(this.uniforms=this.extractUniforms(a),Object.keys(a).forEach(function(B){w[B]=t.prop(B)}));var R={};Object.keys(o).forEach(function(B){R[B]=o[B].get()});var P=LS(x0(A,"frag",i,null,!1)),k=LS(x0(A,"vert",n,null,!1)),L={attributes:R,frag:P,uniforms:w,vert:k,colorMask:t.prop("colorMask"),lineWidth:1,blend:{enable:t.prop("blend.enable"),func:t.prop("blend.func"),equation:t.prop("blend.equation"),color:t.prop("blend.color")},stencil:{enable:t.prop("stencil.enable"),mask:t.prop("stencil.mask"),func:t.prop("stencil.func"),opFront:t.prop("stencil.opFront"),opBack:t.prop("stencil.opBack")},primitive:Yge[u===void 0?W.TRIANGLES:u]};b&&(L.instances=b),c?L.count=c:f&&(L.elements=f.get()),this.initDepthDrawParams({depth:m},L),this.initCullDrawParams({cull:_},L),this.drawCommand=t(L),this.drawParams=L}return jt(e,[{key:"updateAttributesAndElements",value:function(r,n){var i={};Object.keys(r).forEach(function(o){i[o]=r[o].get()}),this.drawParams.attributes=i,this.drawParams.elements=n.get(),this.drawCommand=this.reGl(this.drawParams)}},{key:"updateAttributes",value:function(r){var n={};Object.keys(r).forEach(function(i){n[i]=r[i].get()}),this.drawParams.attributes=n,this.drawCommand=this.reGl(this.drawParams)}},{key:"addUniforms",value:function(r){this.uniforms=Qe(Qe({},this.uniforms),this.extractUniforms(r))}},{key:"draw",value:function(r,n){if(!(this.drawParams.attributes&&Object.keys(this.drawParams.attributes).length===0)){var i=Qe(Qe({},this.uniforms),this.extractUniforms(r.uniforms||{})),o={};Object.keys(i).forEach(function(a){var u=mu(i[a]);u==="boolean"||u==="number"||Array.isArray(i[a])||i[a].BYTES_PER_ELEMENT?o[a]=i[a]:o[a]=i[a].get()}),o.blend=n?this.getBlendDrawParams({blend:{enable:!1}}):this.getBlendDrawParams(r),o.stencil=this.getStencilDrawParams(r),o.colorMask=this.getColorMaskDrawParams(r,n),this.drawCommand(o)}}},{key:"destroy",value:function(){var r;(r=this.drawParams)===null||r===void 0||(r=r.elements)===null||r===void 0||r.destroy(),this.options.attributes&&Object.values(this.options.attributes).forEach(function(n){n==null||n.destroy()}),this.destroyed=!0}},{key:"initDepthDrawParams",value:function(r,n){var i=r.depth;i&&(n.depth={enable:i.enable===void 0?!0:!!i.enable,mask:i.mask===void 0?!0:!!i.mask,func:Qge[i.func||W.LESS],range:i.range||[0,1]})}},{key:"getBlendDrawParams",value:function(r){var n=r.blend,i=n||{},o=i.enable,a=i.func,u=i.equation,c=i.color,f=c===void 0?[0,0,0,0]:c;return{enable:!!o,func:{srcRGB:vg[a&&a.srcRGB||W.SRC_ALPHA],srcAlpha:vg[a&&a.srcAlpha||W.SRC_ALPHA],dstRGB:vg[a&&a.dstRGB||W.ONE_MINUS_SRC_ALPHA],dstAlpha:vg[a&&a.dstAlpha||W.ONE_MINUS_SRC_ALPHA]},equation:{rgb:tC[u&&u.rgb||W.FUNC_ADD],alpha:tC[u&&u.alpha||W.FUNC_ADD]},color:f}}},{key:"getStencilDrawParams",value:function(r){var n=r.stencil,i=n||{},o=i.enable,a=i.mask,u=a===void 0?-1:a,c=i.func,f=c===void 0?{cmp:W.ALWAYS,ref:0,mask:-1}:c,m=i.opFront,_=m===void 0?{fail:W.KEEP,zfail:W.KEEP,zpass:W.KEEP}:m,b=i.opBack,A=b===void 0?{fail:W.KEEP,zfail:W.KEEP,zpass:W.KEEP}:b;return{enable:!!o,mask:u,func:Qe(Qe({},f),{},{cmp:Jge[f.cmp]}),opFront:{fail:Fd[_.fail],zfail:Fd[_.zfail],zpass:Fd[_.zpass]},opBack:{fail:Fd[A.fail],zfail:Fd[A.zfail],zpass:Fd[A.zpass]}}}},{key:"getColorMaskDrawParams",value:function(r,n){var i=r.stencil,o=i!=null&&i.enable&&i.opFront&&!n?[!1,!1,!1,!1]:[!0,!0,!0,!0];return o}},{key:"initCullDrawParams",value:function(r,n){var i=r.cull;if(i){var o=i.enable,a=i.face,u=a===void 0?W.BACK:a;n.cull={enable:!!o,face:e_e[u]}}}},{key:"extractUniforms",value:function(r){var n=this,i={};return Object.keys(r).forEach(function(o){n.extractUniformsRecursively(o,r[o],i,"")}),i}},{key:"extractUniformsRecursively",value:function(r,n,i,o){var a=this;if(n===null||typeof n=="number"||typeof n=="boolean"||Array.isArray(n)&&typeof n[0]=="number"||a_e(n)||n===""||"resize"in n){i["".concat(o&&o+".").concat(r)]=n;return}i_e(n)&&Object.keys(n).forEach(function(u){a.extractUniformsRecursively(u,n[u],i,"".concat(o&&o+".").concat(r))}),Array.isArray(n)&&n.forEach(function(u,c){Object.keys(u).forEach(function(f){a.extractUniformsRecursively(f,u[f],i,"".concat(o&&o+".").concat(r,"[").concat(c,"]"))})})}}]),e}(),s_e=function(){function e(t,r){Ht(this,e),F(this,"isDestroy",!1);var n=r.data,i=r.type,o=i===void 0?W.UNSIGNED_BYTE:i,a=r.width,u=r.height,c=r.flipY,f=c===void 0?!1:c,m=r.format,_=m===void 0?W.RGBA:m,b=r.mipmap,A=b===void 0?!1:b,w=r.wrapS,R=w===void 0?W.CLAMP_TO_EDGE:w,P=r.wrapT,k=P===void 0?W.CLAMP_TO_EDGE:P,L=r.aniso,B=L===void 0?0:L,V=r.alignment,G=V===void 0?1:V,K=r.premultiplyAlpha,Z=K===void 0?!1:K,ve=r.mag,Ie=ve===void 0?W.NEAREST:ve,de=r.min,se=de===void 0?W.NEAREST:de,le=r.colorSpace,ye=le===void 0?W.BROWSER_DEFAULT_WEBGL:le,ke=r.x,Rt=ke===void 0?0:ke,Lt=r.y,Gt=Lt===void 0?0:Lt,Zt=r.copy,st=Zt===void 0?!1:Zt;this.width=a,this.height=u;var tt={width:a,height:u,type:Ab[o],format:Zge[_],wrapS:eC[R],wrapT:eC[k],mag:J9[Ie],min:J9[se],alignment:G,flipY:f,colorSpace:Kge[ye],premultiplyAlpha:Z,aniso:B,x:Rt,y:Gt,copy:st};n&&(tt.data=n),typeof A=="number"?tt.mipmap=qge[A]:typeof A=="boolean"&&(tt.mipmap=A),this.texture=t.texture(tt)}return jt(e,[{key:"get",value:function(){return this.texture}},{key:"update",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.texture(r)}},{key:"bind",value:function(){this.texture._texture.bind()}},{key:"resize",value:function(r){var n=r.width,i=r.height;this.texture.resize(n,i),this.width=n,this.height=i}},{key:"getSize",value:function(){return[this.width,this.height]}},{key:"destroy",value:function(){if(!this.isDestroy){var r;(r=this.texture)===null||r===void 0||r.destroy()}this.isDestroy=!0}}]),e}(),rC,nC,u_e=(rC=ai(),rC(nC=function(){function e(){var t=this;Ht(this,e),F(this,"uniformBuffers",[]),F(this,"queryVerdorInfo",function(){return"WebGL1"}),F(this,"createModel",function(r){return new o_e(t.gl,r)}),F(this,"createAttribute",function(r){return new Xge(t.gl,r)}),F(this,"createBuffer",function(r){return new t_e(t.gl,r)}),F(this,"createElements",function(r){return new r_e(t.gl,r)}),F(this,"createTexture2D",function(r){return new s_e(t.gl,r)}),F(this,"createFramebuffer",function(r){return new n_e(t.gl,r)}),F(this,"useFramebuffer",function(r,n){t.gl({framebuffer:r?r.get():null})(n)}),F(this,"useFramebufferAsync",function(){var r=Mt(he.mark(function n(i,o){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:t.gl({framebuffer:i?i.get():null})(o);case 1:case"end":return u.stop()}},n)}));return function(n,i){return r.apply(this,arguments)}}()),F(this,"clear",function(r){var n,i=r.color,o=r.depth,a=r.stencil,u=r.framebuffer,c=u===void 0?null:u,f={color:i,depth:o,stencil:a};f.framebuffer=c===null?c:c.get(),(n=t.gl)===null||n===void 0||n.clear(f)}),F(this,"viewport",function(r){var n=r.x,i=r.y,o=r.width,a=r.height;t.gl._gl.viewport(n,i,o,a),t.width=o,t.height=a,t.gl._refresh()}),F(this,"readPixels",function(r){var n=r.framebuffer,i=r.x,o=r.y,a=r.width,u=r.height,c={x:i,y:o,width:a,height:u};return n&&(c.framebuffer=n.get()),t.gl.read(c)}),F(this,"readPixelsAsync",function(){var r=Mt(he.mark(function n(i){return he.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",t.readPixels(i));case 1:case"end":return a.stop()}},n)}));return function(n){return r.apply(this,arguments)}}()),F(this,"getViewportSize",function(){return{width:t.gl._gl.drawingBufferWidth,height:t.gl._gl.drawingBufferHeight}}),F(this,"getContainer",function(){var r;return(r=t.canvas)===null||r===void 0?void 0:r.parentElement}),F(this,"getCanvas",function(){return t.canvas}),F(this,"getGLContext",function(){return t.gl._gl}),F(this,"destroy",function(){var r;t.canvas=null,(r=t.gl)===null||r===void 0||(r=r._gl)===null||r===void 0||(r=r.getExtension("WEBGL_lose_context"))===null||r===void 0||r.loseContext(),t.gl.destroy(),t.gl=null})}return jt(e,[{key:"init",value:function(){var t=Mt(he.mark(function n(i,o,a){var u=this;return he.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(this.canvas=i,!a){f.next=5;break}this.gl=a,f.next=8;break;case 5:return f.next=7,new Promise(function(m,_){Wge({canvas:u.canvas,attributes:{alpha:!0,antialias:o.antialias,premultipliedAlpha:!0,preserveDrawingBuffer:o.preserveDrawingBuffer,stencil:o.stencil},extensions:["OES_element_index_uint","OES_standard_derivatives","ANGLE_instanced_arrays"],optionalExtensions:["oes_texture_float_linear","OES_texture_float","EXT_texture_filter_anisotropic","EXT_blend_minmax","WEBGL_depth_texture","WEBGL_lose_context"],profile:!0,onDone:function(A,w){(A||!w)&&_(A),m(w)}})});case 7:this.gl=f.sent;case 8:this.extensionObject={OES_texture_float:this.testExtension("OES_texture_float")};case 9:case"end":return f.stop()}},n,this)}));function r(n,i,o){return t.apply(this,arguments)}return r}()},{key:"getPointSizeRange",value:function(){return this.gl._gl.getParameter(this.gl._gl.ALIASED_POINT_SIZE_RANGE)}},{key:"testExtension",value:function(r){return!!this.getGLContext().getExtension(r)}},{key:"setState",value:function(){this.gl({cull:{enable:!1,face:"back"},viewport:{x:0,y:0,height:this.width,width:this.height},blend:{enable:!0,equation:"add"},framebuffer:null}),this.gl._refresh()}},{key:"setBaseState",value:function(){this.gl({cull:{enable:!1,face:"back"},viewport:{x:0,y:0,height:this.width,width:this.height},blend:{enable:!1,equation:"add"},framebuffer:null}),this.gl._refresh()}},{key:"setCustomLayerDefaults",value:function(){var r=this.getGLContext();r.disable(r.CULL_FACE)}},{key:"setDirty",value:function(r){this.isDirty=r}},{key:"getDirty",value:function(){return this.isDirty}},{key:"beginFrame",value:function(){}},{key:"endFrame",value:function(){}}]),e}())||nC);function l_e(e){var t=c_e();return function(){var n=Bt(e),i;if(t){var o=Bt(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yn(this,i)}}function c_e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var d6=["selectstart","selecting","selectend"],f_e=function(e){_n(r,e);var t=l_e(r);function r(n){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ht(this,r),i=t.call(this),F($e(i),"isEnable",!1),F($e(i),"onDragStart",function(a){i.box.style.display="block",i.startEvent=i.endEvent=a,i.syncBoxBound(),i.emit("selectstart",i.getLngLatBox(),i.startEvent,i.endEvent)}),F($e(i),"onDragging",function(a){i.endEvent=a,i.syncBoxBound(),i.emit("selecting",i.getLngLatBox(),i.startEvent,i.endEvent)}),F($e(i),"onDragEnd",function(a){i.endEvent=a,i.box.style.display="none",i.emit("selectend",i.getLngLatBox(),i.startEvent,i.endEvent)}),i.scene=n,i.options=o,i}return jt(r,[{key:"container",get:function(){return this.scene.getMapService().getMarkerContainer()}},{key:"enable",value:function(){if(!this.isEnable){var i=this.options.className;if(this.scene.setMapStatus({dragEnable:!1}),this.container.style.cursor="crosshair",!this.box){var o=fl("div",void 0,this.container);o.classList.add("l7-select-box"),i&&o.classList.add(i),o.style.display="none",this.box=o}this.scene.on("dragstart",this.onDragStart),this.scene.on("dragging",this.onDragging),this.scene.on("dragend",this.onDragEnd),this.isEnable=!0}}},{key:"disable",value:function(){this.isEnable&&(this.scene.setMapStatus({dragEnable:!0}),this.container.style.cursor="auto",this.scene.off("dragstart",this.onDragStart),this.scene.off("dragging",this.onDragging),this.scene.off("dragend",this.onDragEnd),this.isEnable=!1)}},{key:"syncBoxBound",value:function(){var i=this.startEvent,o=i.x,a=i.y,u=this.endEvent,c=u.x,f=u.y,m=Math.min(o,c),_=Math.min(a,f),b=Math.abs(o-c),A=Math.abs(a-f);this.box.style.top="".concat(_,"px"),this.box.style.left="".concat(m,"px"),this.box.style.width="".concat(b,"px"),this.box.style.height="".concat(A,"px")}},{key:"getLngLatBox",value:function(){var i=this.startEvent.lngLat,o=i.lng,a=i.lat,u=this.endEvent.lngLat,c=u.lng,f=u.lat;return Oee([[o,a],[c,f]])}}]),r}(ju.EventEmitter),h_e=function(){function e(t){Ht(this,e);var r=t.id,n=t.map,i=t.canvas,o=t.renderer,a=o===void 0?"regl":o,u=nle();this.container=u,n.setContainer(u,r,i),u.bind(wt.IRendererService).to(a==="regl"?u_e:Hge).inSingletonScope(),this.sceneService=u.get(wt.ISceneService),this.mapService=u.get(wt.IMapService),this.iconService=u.get(wt.IIconService),this.fontService=u.get(wt.IFontService),this.controlService=u.get(wt.IControlService),this.layerService=u.get(wt.ILayerService),this.debugService=u.get(wt.IDebugService),this.debugService.setEnable(t.debug),this.markerService=u.get(wt.IMarkerService),this.interactionService=u.get(wt.IInteractionService),this.popupService=u.get(wt.IPopupService),this.boxSelect=new f_e(this,{}),this.initComponent(r),this.sceneService.init(t),this.initControl()}return jt(e,[{key:"map",get:function(){return this.mapService.map}},{key:"loaded",get:function(){return this.sceneService.loaded}},{key:"getServiceContainer",value:function(){return this.container}},{key:"getSize",value:function(){return this.mapService.getSize()}},{key:"getMinZoom",value:function(){return this.mapService.getMinZoom()}},{key:"getMaxZoom",value:function(){return this.mapService.getMaxZoom()}},{key:"getType",value:function(){return this.mapService.getType()}},{key:"getMapContainer",value:function(){return this.mapService.getMapContainer()}},{key:"getMapCanvasContainer",value:function(){return this.mapService.getMapCanvasContainer()}},{key:"getMapService",value:function(){return this.mapService}},{key:"getDebugService",value:function(){return this.debugService}},{key:"exportPng",value:function(){var t=Mt(he.mark(function n(i){return he.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",this.sceneService.exportPng(i));case 1:case"end":return a.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"exportMap",value:function(){var t=Mt(he.mark(function n(i){return he.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",this.sceneService.exportPng(i));case 1:case"end":return a.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"registerRenderService",value:function(r){var n=this;if(this.sceneService.loaded){var i=new r(this);i.init()}else this.on("loaded",function(){var o=new r(n);o.init()})}},{key:"setBgColor",value:function(r){this.mapService.setBgColor(r)}},{key:"addLayer",value:function(r){var n=this,i=om(this.container);if(r.setContainer(i,this.container),this.sceneService.addLayer(r),r.inited){var o=this.initMask(r);this.addMask(o,r.id)}else r.on("inited",function(){var a=n.initMask(r);n.addMask(a,r.id)})}},{key:"initMask",value:function(r){var n=r.getLayerConfig(),i=n.mask,o=n.maskfence,a=n.maskColor,u=a===void 0?"#000":a,c=n.maskOpacity,f=c===void 0?0:c;if(!(!i||!o)){var m=new WP().source(o).shape("fill").style({color:u,opacity:f});return m}}},{key:"addMask",value:function(r,n){if(r){var i=this.getLayer(n);if(i){var o=om(this.container);r.setContainer(o,this.container),i.addMaskLayer(r),this.sceneService.addMask(r)}else console.warn("parent layer not find!")}}},{key:"getPickedLayer",value:function(){return this.layerService.pickedLayerId}},{key:"getLayers",value:function(){return this.layerService.getLayers()}},{key:"getLayer",value:function(r){return this.layerService.getLayer(r)}},{key:"getLayerByName",value:function(r){return this.layerService.getLayerByName(r)}},{key:"removeLayer",value:function(){var t=Mt(he.mark(function n(i,o){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,this.layerService.remove(i,o);case 2:case"end":return u.stop()}},n,this)}));function r(n,i){return t.apply(this,arguments)}return r}()},{key:"removeAllLayer",value:function(){var t=Mt(he.mark(function n(){return he.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.layerService.removeAllLayers();case 2:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"render",value:function(){this.sceneService.render()}},{key:"setEnableRender",value:function(r){this.layerService.setEnableRender(r)}},{key:"addIconFont",value:function(r,n){this.fontService.addIconFont(r,n)}},{key:"addIconFonts",value:function(r){var n=this;r.forEach(function(i){var o=Nn(i,2),a=o[0],u=o[1];n.fontService.addIconFont(a,u)})}},{key:"addFontFace",value:function(r,n){var i=this;this.fontService.once("fontloaded",function(o){i.emit("fontloaded",o)}),this.fontService.addFontFace(r,n)}},{key:"addImage",value:function(){var t=Mt(he.mark(function n(i,o){return he.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,this.iconService.addImage(i,o);case 2:case"end":return u.stop()}},n,this)}));function r(n,i){return t.apply(this,arguments)}return r}()},{key:"hasImage",value:function(r){return this.iconService.hasImage(r)}},{key:"removeImage",value:function(r){this.iconService.removeImage(r)}},{key:"addIconFontGlyphs",value:function(r,n){this.fontService.addIconGlyphs(n)}},{key:"addControl",value:function(r){this.controlService.addControl(r,this.container)}},{key:"removeControl",value:function(r){this.controlService.removeControl(r)}},{key:"getControlByName",value:function(r){return this.controlService.getControlByName(r)}},{key:"addMarker",value:function(r){this.markerService.addMarker(r)}},{key:"addMarkerLayer",value:function(r){this.markerService.addMarkerLayer(r)}},{key:"removeMarkerLayer",value:function(r){this.markerService.removeMarkerLayer(r)}},{key:"removeAllMarkers",value:function(){this.markerService.removeAllMarkers()}},{key:"removeAllMakers",value:function(){console.warn("removeAllMakers 已废弃,请使用 removeAllMarkers"),this.markerService.removeAllMarkers()}},{key:"addPopup",value:function(r){this.popupService.addPopup(r)}},{key:"removePopup",value:function(r){this.popupService.removePopup(r)}},{key:"on",value:function(r,n){if(d6.includes(r)){var i;(i=this.boxSelect)===null||i===void 0||i.on(r,n)}else Q2.includes(r)?this.sceneService.on(r,n):this.mapService.on(r,n)}},{key:"once",value:function(r,n){if(d6.includes(r)){var i;(i=this.boxSelect)===null||i===void 0||i.once(r,n)}else Q2.includes(r)?this.sceneService.once(r,n):this.mapService.once(r,n)}},{key:"emit",value:function(r,n){Q2.indexOf(r)===-1?this.mapService.on(r,n):this.sceneService.emit(r,n)}},{key:"off",value:function(r,n){if(d6.includes(r)){var i;(i=this.boxSelect)===null||i===void 0||i.off(r,n)}else Q2.includes(r)?this.sceneService.off(r,n):this.mapService.off(r,n)}},{key:"getZoom",value:function(){return this.mapService.getZoom()}},{key:"getCenter",value:function(r){return this.mapService.getCenter(r)}},{key:"setCenter",value:function(r,n){return this.mapService.setCenter(r,n)}},{key:"getPitch",value:function(){return this.mapService.getPitch()}},{key:"setPitch",value:function(r){return this.mapService.setPitch(r)}},{key:"getRotation",value:function(){return this.mapService.getRotation()}},{key:"getBounds",value:function(){return this.mapService.getBounds()}},{key:"setRotation",value:function(r){this.mapService.setRotation(r)}},{key:"zoomIn",value:function(){this.mapService.zoomIn()}},{key:"zoomOut",value:function(){this.mapService.zoomOut()}},{key:"panTo",value:function(r){this.mapService.panTo(r)}},{key:"panBy",value:function(r,n){this.mapService.panBy(r,n)}},{key:"getContainer",value:function(){return this.mapService.getContainer()}},{key:"setZoom",value:function(r){this.mapService.setZoom(r)}},{key:"fitBounds",value:function(r,n){var i=this.sceneService.getSceneConfig(),o=i.fitBoundsOptions,a=i.animate;this.mapService.fitBounds(r,n||Qe(Qe({},o),{},{animate:a}))}},{key:"setZoomAndCenter",value:function(r,n){this.mapService.setZoomAndCenter(r,n)}},{key:"setMapStyle",value:function(r){this.mapService.setMapStyle(r)}},{key:"setMapStatus",value:function(r){this.mapService.setMapStatus(r)}},{key:"pixelToLngLat",value:function(r){return this.mapService.pixelToLngLat(r)}},{key:"lngLatToPixel",value:function(r){return this.mapService.lngLatToPixel(r)}},{key:"containerToLngLat",value:function(r){return this.mapService.containerToLngLat(r)}},{key:"lngLatToContainer",value:function(r){return this.mapService.lngLatToContainer(r)}},{key:"destroy",value:function(){this.sceneService.destroy()}},{key:"registerPostProcessingPass",value:function(r,n){this.container.bind(wt.IPostProcessingPass).to(r).whenTargetNamed(n)}},{key:"enableShaderPick",value:function(){this.layerService.enableShaderPick()}},{key:"diasbleShaderPick",value:function(){this.layerService.disableShaderPick()}},{key:"enableBoxSelect",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.boxSelect.enable(),n&&this.boxSelect.once("selectend",function(){r.disableBoxSelect()})}},{key:"disableBoxSelect",value:function(){this.boxSelect.disable()}},{key:"getProtocol",value:function(r){return wg.REGISTERED_PROTOCOLS[r]}},{key:"startAnimate",value:function(){this.layerService.startAnimate()}},{key:"stopAnimate",value:function(){this.layerService.stopAnimate()}},{key:"getPointSizeRange",value:function(){return this.sceneService.getPointSizeRange()}},{key:"initComponent",value:function(r){this.controlService.init({container:dee(r)},this.container),this.markerService.init(this.container),this.popupService.init(this.container)}},{key:"initControl",value:function(){var r=this.sceneService.getSceneConfig(),n=r.logoVisible,i=r.logoPosition;n&&this.addControl(new uce({position:i}))}}],[{key:"addProtocol",value:function(r,n){wg.REGISTERED_PROTOCOLS[r]=n}},{key:"removeProtocol",value:function(r){delete wg.REGISTERED_PROTOCOLS[r]}}]),e}();const p_e=""+new URL("弹框背景--kXyqrr2.png",import.meta.url).href,d_e=""+new URL("背景-BcUmP26b.png",import.meta.url).href,v_e={class:"title"},m_e={class:"info"},g_e={class:"name"},__e={class:"val"},y_e={__name:"Tooltip",props:{info:{type:Object,default:()=>({})},projectType:{type:String,default:"photovoltaic"}},setup(e,{expose:t}){const r={站点数量:"zdsl",装机容量:"zjrl",年发电量:"nfdl",发电功率:"fdgl",性能比:"xnb",充电枪数量:"cdqsl",正在充电:"zzcd",今日充电量:"jrcdl",今日充电时长:"jrcdsc",今日充电次数:"jrcdcs"},n=o=>o&&(+o).toFixed(2)||"",i=zv(null);return t({tooltipRef:i}),(o,a)=>(yg(),xg("div",{ref_key:"tooltipRef",ref:i,style:O_({position:"absolute",zIndex:3999,width:"300px",height:e.projectType==="photovoltaic"?"249px":"332px",padding:"10px 20px",boxSizing:"border-box",color:"#ffffff",backgroundImage:`url(${e.projectType==="photovoltaic"?jl(p_e):jl(d_e)})`,backgroundSize:"100% 100%"}),class:"map-tooltip"},[eu("div",v_e,[eu("h3",null,B2(e.info.type===1?e.info.name+"省":e.info.name),1)]),eu("div",m_e,[(yg(!0),xg(mc,null,MD(e.info.data,u=>(yg(),xg("div",{key:u.attrName,class:"info-row"},[eu("span",{class:k_({icon:!0,[r[u.attrName]]:!0})},null,2),eu("span",g_e,B2(u.attrName)+"("+B2(u.attrUnit)+"): ",1),eu("span",__e,B2(n(u.attrValue)),1)]))),128))])],4))}},x_e="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1706079614471'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='4220'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M947.4%20864C893.2%20697.7%20736.2%20578.9%20551%20575.5c-23.1-0.4-44.9%200.1-65.6%201.5v164.3c0.1%200.5%200.2%201%200.2%201.5%200%204-3.3%207.3-7.3%207.3-2.7%200-5-1.4-6.2-3.5v0.7L68.8%20465.4h2.1c-4%200-7.3-3.3-7.3-7.3%200-2.9%201.7-5.4%204.1-6.6L472%20169v0.7c1.3-2.1%203.6-3.5%206.2-3.5%204%200%207.3%203.3%207.3%207.3%200%200.5-0.1%201-0.2%201.5v159.4c18.5-0.9%2037.9-1.2%2058.3-0.8%20230.1%203.9%20416.7%20196.9%20416.7%20427.1%200.1%2035.5-4.5%2070.2-12.9%20103.3z%20m-462-704.4v0.2h-0.4l0.4-0.2z%20m0%20596.9l-0.3-0.2h0.3v0.2z'%20fill='%23376DB8'%20p-id='4221'%3e%3c/path%3e%3c/svg%3e",iC=""+new URL("purplePoint-BscC0hsv.png",import.meta.url).href,aC=""+new URL("yellowPoint-tOz4zFvb.png",import.meta.url).href,b_e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAB1CAYAAADdhbYVAAAH3klEQVR4nO2dCfBVUxzHP/9/9a9/ZYv6GypSJGWyFZIa0RhSjS0jDVpsocEwkyU7g2RpMyo02TWWaKYk2creYkuSEBmhpFKS+psz833mer3/6973znnv3vc/n5k7b7nbOd97lt/5nXvOKStfWT0M6I0nF5oC5cDpdYEDgRO8jHmxU93A2aOBVxIYiTCcBFwINM7h3DuBNzL8Xwm8rO9bgkIuAWa7iUfRqACeBM5QAGYAVwF/hwjQmcBdwH7A9Rn2HxH8ERSyMnk67ZAHJeJa4DKJGpbXdVybGo7vGvxhhKzSd5OE2wKTgfeB6qJEPX8aK/LHA+crHj2AhTleuayG/4YG/6gbEKxC5YjZfgZaAX8VWIR0jgLuADYCk4Bpgf0HAccAzYHVwJESryrtGuNzFHGVPlvr4WwI7GsP7G/KRqAeEvIX7bwROE5Pb0/gZOCFnCXIHxPAqRLKsBiYDnRWlu1Uwx1M+fcDMF9ZOdcK1FzjAz2gccAgYKv2HapP84B3Ia2MNE/1Qwk5BXi1AGJlY4sqhud0zMXApUAj5aKVwCxFeC/gW+BZYLnFYsnc723gXGPiAOcAm5QbUI7dTkgU6OFAH0XiT0sBisquisRpgfN21ucy4ClgFLDOcTjmq7HyInAq8BbQE+ig/ZtTB6YLuVAmkDHQbwcucRzQdEx2vgC4BdhD+9YDd8tmM6lwTYHDNAc4WvfvpOImVaxsSh2ULiRKiR8rK/2kSISxu/KhAXCecsO+uo4xgu8B3oxBpbdYRd4ipUiUOpukDsgk5GfARcAjwK0S9i2ZRJ8D3wPtVKub7DYPmAlsAw4AeskG+zREAFsCQ3S/ZoFA36DsFCdWAMcCl8suvVeptUYhkS2ZSo2HAH211cRS4CEV+teoouisJ5iivmq7Dmrfm+/dgTrabyq6kbIUtsVMxBRfKKemU68mIVGNOEtNpK6KuEmJ+wDfKMUZc6C/UuL9gXNNWTdYqdk8wdNVrtRLu8dm1bTmIcx1EvXC0D2bkCmWa5tSw/6bZXP2U6HcWjXq1RJ9lI7bJvEXKvt+JfFWJ0y0TMwOI+SOMKnyFW3DZCzvonNMefou0AW4VpVHSVJuOVIpd1PvQPmbEm9QqYqIAyE/U81eFfC6T5dh3zZgG5YctoU0PKpPYxM2lMnQUI3+tV7I8ExU+7ezUuIbcjsZL8w/riJSQFoE2tr/4ULIDWpaLpbzwLRKPpHtOCRuquTAGLW7/4eNWjtIhdzyw/UdNf86alsnv2JS6aUEcZZLIY2z82ngYNmMU+Xaai2D3Bjf9yVYxHI1OoYGvT4pbAlp/HQTVKl8LVNnrsrGBTpmVB7u/jhgEseJShzbYaOM7AY8LhEnq22eau711e+V6jJIOhlFxJKQphFfpmw7UO531C5PGeMjA/+XJDaENHYi8mHWD4i7SB1Epk39cCmLiKUyMtW79pRS3Udyj1XLOL8uBo5Z59hIkQPUW7dEpk53+SPPlyttVYhrxJXQr7jYSJEmCw/Q933VrTsz0PuXVOrLK94sTIssXyFNT9/eyr6G70rIy9NeDphQzdp8s/YcecgzvdaRdDqqayEU+Qr5JfC7bMlSY0sNr/NlxEYZmer0KjWeiBIfG0KapmGtx4UbrVbihbSEF9ISXkhLeCEzU5mpXyYbNoVsKQdvKWC8Vs8US8iKEnHeorfs/ohygk0hl8lL3jzEsXGnQaZ+mWzYLiPn6T2fpLMm6uAt292xN6ntnXQWBDrtiiJkmLd0SxJv/ljCC2kJL6QlvJCW8EJmpqlaaqFxIeRpgV7FpDI46qg3F0I2zzJytWRxIeRaDcqsVdg2yFHLZreEi7hEfoPQuBDyzajNqxjyUtQguRByvbZahTd/LOGFtIQX0hJeSEt4ITNTFXUeNRdCmjd2Rzi4biGZEJi7IhQuhGynl0+TzGEa6VtUIc2gxx8TLOKBGkiwLMpJLoRslW1gTwJoERgqHRoXLZuBgZlTkshr2oouZKSO9VLBmz+W8EJawgtpCS+kJWwJWaHaOqkPZlxgltKcsBXxkZpdOa6Tw2Wji+aq+DKfi9gwf8ycaGYG1MMtXKvQlCkRjMh3KLSNFGnmfuxfhJlGbdBCnXVR5ifPiI0UaaasTipmGPEpNsLua21LeCEt4YW0hBfSErVNyN1dDV/JRchGWucliYzVcizWycX86ak+jaRxqqYXGxgXIfskcEmrhlqKq5+ryZyiZu1ytUunhTg2TmxUw+E9V2GKKmS1svYKR+FxyVKXF89FyFo7uisb3o60hBfSEqUqZKtCx60UhTQLv71TaEdzqQlZR1NxTdKEoAUjipDzA6uCxJWLFafbCh2+sEJWaZLNSBNmFIHH1HrZWuhbhxXyV2WbuK/+YVowvxXjxmGF3KYF1JLcP+OUKE6LK5QyPRmIImSSXx51TpLNn+7yL8aCpArZRquTNAlxbEFIopBNtQT+lcGVMotNEoXspkUp837NxCa5ClmmidsrQhxrm+e1tmysyCdF9lDKKIaYsSNXIauVIjdrKEXSR3rlTT4p0qy5fbYW8HYxoXsDB9d0Rr6VTbXW8rLlsqrUavNjtLZiO0vXdY6LAUvpTNT0NSu0cvHowGJC6YzVEtMz5JhNTG9lIYR8QK7/5ioCslVOgwsQHicUQsgvoixnklR8L6IlvJCW8EJaIlhGjtfmyQGfIm0A/Asl/VuWcBpLegAAAABJRU5ErkJggg==",E_e=eu("div",{id:"map",style:{width:"100%",height:"100%"}},null,-1),S_e={class:"map-helpers"},A_e=["src"],T_e=["src"],w_e=["src"],C_e=["src"],R_e=["src"],I_e=["src"],M_e={__name:"App",setup(e){let t=null,r=window.parent?window.parent.location.origin:window.location.origin,n=zv({}),i=zv(!1),o=zv(null);const a=window.location.href.split("?")[1];let c=new URLSearchParams(a).get("projectType")||"charge",f=zv(c),m=c==="photovoltaic"?"/thing/v1/manage/board/map":"/thing/v1/charge/board/map",_="",b=r+m;const A=r+"/changshumap/marker.png";let w=[1e5,{adcode:32e4,name:"江苏省",center:[118.767413,32.041544],centroid:[119.486506,32.983991],childrenNum:13,level:"province",subFeatureIndex:9,acroutes:[1e5]},{adcode:320500,name:"苏州市",center:[120.619585,31.299379],centroid:[120.660806,31.382865],childrenNum:9,level:"city",subFeatureIndex:4,acroutes:[1e5,32e4]},{adcode:320581,name:"常熟市",center:[120.74852,31.658156],centroid:[120.822992,31.658797],childrenNum:0,level:"district",subFeatureIndex:5,acroutes:[1e5,32e4,320500]}],R={center:[120.74852,31.658156],pitch:45,zoom:7,maxZoom:10,minZoom:5,level:"district",mapAdCode:320581,mapSize:12e3,mapRHeight:800,topFaceRHeight:6800,borderLineRHeight:13600},P={cityName:"常熟市",type:4},k=null;function L(le,ye,ke){k=new h_e({id:"map",logoVisible:!1,map:new mme({center:le.center,zoom:le.zoom,maxZoom:le.maxZoom,minZoom:le.minZoom,pitch:le.pitch,style:"blank",interact:!1})}),k.addImage("triangleIcon",A);const Rt=new Om({zIndex:3}).source(t).shape("triangleIcon").size(6).active(!0).style({raisingHeight:50});k.addLayer(Rt),Rt.on("click",nt=>{const pr=nt.target.clientX+300>=window.innerWidth,ur=c==="photovoltaic"?249:332,Ar=nt.target.clientY+ur>=window.innerHeight;pr&&!Ar?(o.value.tooltipRef.style.left=nt.target.clientX-300+"px",o.value.tooltipRef.style.top=nt.target.clientY+"px"):Ar&&!pr?(o.value.tooltipRef.style.left=nt.target.clientX+"px",o.value.tooltipRef.style.top=nt.target.clientY-ur+"px"):Ar&&pr?(o.value.tooltipRef.style.left=nt.target.clientX-300+"px",o.value.tooltipRef.style.top=nt.target.clientY-ur+"px"):(o.value.tooltipRef.style.left=nt.target.clientX+"px",o.value.tooltipRef.style.top=nt.target.clientY+"px"),i.value=!0,n.value=nt.feature.properties,window.parent.postMessage(nt.feature.properties,"*")}),Rt.on("unpick",nt=>{i.value=!1});const Lt=ke===320581?cL:ke===1e5?fL:hL,Gt=new s_({zIndex:0,autoFit:!0}).source(ye).shape("extrude").size(le.mapSize).style({mapTexture:Lt,heightfixed:!0,raisingHeight:le.mapRHeight,sourceColor:"#0096FF",targetColor:"#122C61",opacity:1}),Zt=new s_({zIndex:1,autoFit:!0}).source(ye).shape("fill").color("#022857").style({opacity:.58,heightfixed:!0,raisingHeight:le.topFaceRHeight});ke!==320581&&Zt.active({color:"#56FEB4"}),Zt.on("click",nt=>{const pr=nt.feature.properties;if(pr.level==="district"&&pr.adcode!==320581)if(window.parent.layer)window.parent.layer.msg("无法下探");else return window.alert("无法下探");pr.level==="province"&&!pr.name.includes("省")&&(pr.name=pr.name+"省"),de(pr,pr.adcode),w.push(pr)});const st=new sb({zIndex:2}).source(ye).color("#00ffff").size(.5).style({raisingHeight:le.borderLineRHeight}),tt=ke===320581?lL:ye,dt=new Om({zIndex:4}).source(tt).shape("name","text").size(10).color("#ffffff");k.addLayer(dt),k.addLayer(Gt),k.addLayer(Zt),k.addLayer(st)}const B=window.location.search.split("token="),V=sessionStorage.getItem("v1@CacheToken"),G=JSON.parse(V||"{}"),K=window.iframeNodeToken,Z=Z7.create({timeout:1e3*30,headers:{"Content-Type":"application/json",token:B[1]||G.token||K||"1e1365578832462b7c8ec7def8ecc0f4",tenantCode:localStorage.getItem("v1@CacheTenantCode")||"",companyId:localStorage.getItem("v1@CacheTenantCode")||""}}),ve=async(le,ye,ke,Rt)=>{const Lt=await Z.post(b,le);if(Lt.data.code!==0)return;let Gt={type:"FeatureCollection",features:[]};Lt.data.data.forEach(Zt=>{if(Zt.lon&&Zt.lat)Gt.features.push({type:"Feature",properties:{...Zt},geometry:{type:"Point",coordinates:[Zt.lon,Zt.lat]}});else{let st=[120.74852,31.658156];const tt=le.type===1;if(ke!==1e5){const dt=Rt.features.find(nt=>tt?nt.properties.name+"省"===Zt.name:nt.properties.name===Zt.name);dt&&(st=dt.properties.centroid)}Gt.features.push({type:"Feature",properties:{...Zt},geometry:{type:"Point",coordinates:st}})}}),t=Gt},Ie=async le=>{const ye=window.top!==window?"/changshumap/chinaGeoJson.json":"./chinaGeoJson.json";_||(_=(await Z.get(r+"/thing/sys/oss/getMapBucketUrl")).data.data);const ke=_||"http://58.211.128.22:8100/thingmanager/geojson/";if(ke){const Rt=await Z7.get(le===1e5?ye:`${ke}${le}.json`),{data:Lt}=Rt;return Lt}},de=async(le,ye)=>{const ke=await Ie(ye);k&&(k.removeAllLayer(),k.destroy(),k=null),R.mapAdCode=ye,ye===1e5?(R.minZoom=2,R.zoom=4,R.maxZoom=7,R.mapSize=24e5,R.mapRHeight=16e4,R.topFaceRHeight=136e4,R.borderLineRHeight=272e4,R.pitch=30,P.type=1,P.cityName=""):ye===320581?(R.minZoom=5,R.zoom=7,R.maxZoom=13,R.mapSize=12e3,R.mapRHeight=800,R.topFaceRHeight=6800,R.borderLineRHeight=13600,R.pitch=45,P.type=4,P.cityName="常熟市"):le.level==="city"?(R.minZoom=8,R.zoom=10,R.maxZoom=13,R.mapSize=6e4,R.mapRHeight=4e3,R.topFaceRHeight=34e3,R.borderLineRHeight=68e3,R.pitch=30,P.type=3,P.cityName=le.name):le.level==="province"&&(R.minZoom=2,R.zoom=4,R.maxZoom=7,R.mapSize=12e4,R.mapRHeight=8e3,R.topFaceRHeight=68e3,R.borderLineRHeight=136e3,R.pitch=45,P.type=2,P.cityName=le.name),await ve(P,le,ye,ke),L(R,ye===320581?oL:ke,R.mapAdCode)},se=async()=>{if(w.pop(),w.length===0){w.push(1e5);return}const le=w[w.length-1];let ye=le.adcode;le===1e5&&(ye=1e5),de(le,ye)};return $C(async()=>{de(w[w.length-1],320581)}),(le,ye)=>(yg(),xg(mc,null,[E_e,_D(vp(y_e,{ref_key:"tooltip",ref:o,info:jl(n),projectType:jl(f)},null,8,["info","projectType"]),[[_F,jl(i)]]),eu("div",S_e,[eu("img",{src:jl(x_e),alt:"返回",className:"return-icon",onClick:se},null,8,A_e),eu("img",{alt:"紫色星光1",src:jl(iC),className:"purple-one"},null,8,T_e),eu("img",{alt:"紫色星光2",src:jl(iC),className:"purple-two"},null,8,w_e),eu("img",{alt:"黄色星光1",src:jl(aC),className:"yellow-one"},null,8,C_e),eu("img",{alt:"黄色星光2",src:jl(aC),className:"yellow-two"},null,8,R_e),eu("img",{alt:"南海诸岛",src:jl(b_e),className:"southSea"},null,8,I_e)])],64))}};LF(M_e).mount("#app");