var I18n;OSM={MapLibre:{}},function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).maplibregl=e()}(this,function(){"use strict";function t(t,r,o){if(i[t]=o,"index"===t){var n="var sharedModule = {}; ("+i.shared+")(sharedModule); ("+i.worker+")(sharedModule);",a={};return i.shared(a),i.index(e,a),"undefined"!=typeof window&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([n],{type:"text/javascript"}))),e}}var e={},i={};return t("shared",["exports"],function(t){function e(t,e,i,r){return new(i||(i=Promise))(function(o,n){function a(t){try{l(r.next(t))}catch(t){n(t)}}function s(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,s)}l((r=r.apply(t,e||[])).next())})}function i(t,e){this.x=t,this.y=e}function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function o(){return null!=pl||(pl="undefined"!=typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),pl}function n(){if(null==dl&&(dl=!1,o())){const t=5,e=new OffscreenCanvas(t,t).getContext("2d",{willReadFrequently:!0});if(e){for(let i=0;i4&&void 0!==arguments[4]?arguments[4]:"zyx",n=Math.PI/360;e*=n,r*=n,i*=n;var a=Math.sin(e),s=Math.cos(e),l=Math.sin(i),c=Math.cos(i),u=Math.sin(r),h=Math.cos(r);switch(o){case"xyz":t[0]=a*c*h+s*l*u,t[1]=s*l*h-a*c*u,t[2]=s*c*u+a*l*h,t[3]=s*c*h-a*l*u;break;case"xzy":t[0]=a*c*h-s*l*u,t[1]=s*l*h-a*c*u,t[2]=s*c*u+a*l*h,t[3]=s*c*h+a*l*u;break;case"yxz":t[0]=a*c*h+s*l*u,t[1]=s*l*h-a*c*u,t[2]=s*c*u-a*l*h,t[3]=s*c*h+a*l*u;break;case"yzx":t[0]=a*c*h+s*l*u,t[1]=s*l*h+a*c*u,t[2]=s*c*u-a*l*h,t[3]=s*c*h-a*l*u;break;case"zxy":t[0]=a*c*h-s*l*u,t[1]=s*l*h+a*c*u,t[2]=s*c*u+a*l*h,t[3]=s*c*h-a*l*u;break;case"zyx":t[0]=a*c*h-s*l*u,t[1]=s*l*h+a*c*u,t[2]=s*c*u-a*l*h,t[3]=s*c*h+a*l*u;break;default:throw new Error("Unknown angle order "+o)}return t}function g(){var t=new _l(2);return _l!=Float32Array&&(t[0]=0,t[1]=0),t}function y(t,e){var i=new _l(2);return i[0]=t,i[1]=e,i}function v(t,e,i){return e*(yl/(t.tileSize*Math.pow(2,i-t.tileID.overscaledZ)))}function b(t){return t instanceof Error?t:new Error("string"==typeof t?t:String(t))}function x(t,e){return(t%e+e)%e}function w(t,e,i){return t*(1-i)+e*i}function T(t){if(t<=0)return 0;if(t>=1)return 1;const e=t*t,i=e*t;return 4*(t<.5?i:3*(t-e)+i-.75)}function k(t,e,i,r){const o=new hl(t,e,i,r);return t=>o.solve(t)}function M(t,e,i){return Math.min(i,Math.max(e,t))}function S(t,e,i){const r=i-e,o=((t-e)%r+r)%r+e;return o===e?i:o}function P(t,...e){for(const i of e)for(const e in i)t[e]=i[e];return t}function A(t,e){const i={};for(const r in t)i[r]=e.call(this,t[r],r,t);return i}function I(t,e){const i={};for(const r in t)e.call(this,t[r],r,t)&&(i[r]=t[r]);return i}function C(t){return Array.isArray(t)?t.map(C):"object"==typeof t&&t?A(t,C):t}function E(t){xl[t]||("undefined"!=typeof console&&console.warn(t),xl[t]=!0)}function z(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}function D(t){return"undefined"!=typeof WorkerGlobalScope&&void 0!==t&&t instanceof WorkerGlobalScope}function O(t){return"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap}function L(t,i,r,o,n){return e(this,void 0,void 0,function*(){if("undefined"==typeof VideoFrame)throw new Error("VideoFrame not supported");const e=new VideoFrame(t,{timestamp:0});try{const a=null==e?void 0:e.format;if(!a||!a.startsWith("BGR")&&!a.startsWith("RGB"))throw new Error(`Unrecognized format ${a}`);const s=a.startsWith("BGR"),l=new Uint8ClampedArray(o*n*4);if(yield e.copyTo(l,function(t,e,i,r,o){const n=4*Math.max(-e,0),a=(Math.max(0,i)-i)*r*4+n,s=4*r,l=Math.max(0,e),c=Math.max(0,i);return{rect:{x:l,y:c,width:Math.min(t.width,e+r)-l,height:Math.min(t.height,i+o)-c},layout:[{offset:a,stride:s}]}}(t,i,r,o,n)),s)for(let t=0;t{t.removeEventListener(e,i,r)}}}function F(t){return t*Math.PI/180}function B(t){return t/Math.PI*180}function j(t){return t instanceof Error&&t.name===Al}function V(t){if(t.aborted)throw new Il(t.reason)}function N(t){return Cl.REGISTERED_PROTOCOLS[t.substring(0,t.indexOf("://"))]}function U(t){if(!t||t.indexOf("://")<=0||t.startsWith("data:image/")||t.startsWith("blob:"))return!0;const e=new URL(t),i=window.location;return e.protocol===i.protocol&&e.host===i.host}function G(t,e,i){var r;(null===(r=i[t])||void 0===r?void 0:r.includes(e))||(i[t]||(i[t]=[]),i[t].push(e))}function Z(t,e,i){if(null==i?void 0:i[t]){const r=i[t].indexOf(e);-1!==r&&i[t].splice(r,1)}}function $(t,e){const i={};for(const e in t)"ref"!==e&&(i[e]=t[e]);return jl.forEach(t=>{t in e&&(i[t]=e[t])}),i}function q(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let i=0;i`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}function ot(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!ot(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(const t of oc)if(!ot(t,e))return null}return`Expected ${rt(t)} but found ${rt(e)} instead.`}function nt(t,e){return e.some(e=>e.kind===t.kind)}function at(t,e){return e.some(e=>"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t)}function st(t,e){return"array"===t.kind&&"array"===e.kind?t.itemType.kind===e.itemType.kind&&"number"==typeof t.N:t.kind===e.kind}function lt(t){return(t%=360)<0&&(t+=360),t}function ct([t,e,i,r]){let o,n;const a=ht((.2225045*(t=ut(t))+.7168786*(e=ut(e))+.0606169*(i=ut(i)))/1);t===e&&e===i?o=n=a:(o=ht((.4360747*t+.3850649*e+.1430804*i)/nc),n=ht((.0139322*t+.0971045*e+.7141733*i)/ac));const s=116*a-16;return[s<0?0:s,500*(o-a),200*(a-n),r]}function ut(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ht(t){return t>uc?Math.pow(t,1/3):t/cc+sc}function pt([t,e,i,r]){let o=(t+16)/116,n=isNaN(e)?o:o+e/500,a=isNaN(i)?o:o-i/200;return o=1*mt(o),n=nc*mt(n),a=ac*mt(a),[dt(3.1338561*n-1.6168667*o-.4906146*a),dt(-.9787684*n+1.9161415*o+.033454*a),dt(.0719453*n-.2289914*o+1.4052427*a),r]}function dt(t){return(t=t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055)<0?0:t>1?1:t}function mt(t){return t>lc?t*t*t:cc*(t-sc)}function ft(t,e){return dc(t,e)?t[e]:void 0}function _t(t){return parseInt(t.padEnd(2,t),16)/255}function gt(t,e){return yt(e?t/100:t,0,1)}function yt(t,e,i){return Math.min(Math.max(e,t),i)}function vt(t){return!t.some(Number.isNaN)}function bt(t,e,i){return t+i*(e-t)}function xt(t,e,i){return t.map((t,r)=>bt(t,e[r],i))}function wt(t,e,i,r){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:`Invalid rgba value [${[t,e,i,r].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof r?[t,e,i,r]:[t,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Tt(t){if(null===t||"string"==typeof t||"boolean"==typeof t||"number"==typeof t||t instanceof Pc||t instanceof fc||t instanceof _c||t instanceof vc||t instanceof bc||t instanceof xc||t instanceof wc||t instanceof Mc||t instanceof Sc)return!0;if(Array.isArray(t)){for(const e of t)if(!Tt(e))return!1;return!0}if("object"==typeof t){for(const e in t)if(!Tt(t[e]))return!1;return!0}return!1}function kt(t){if(null===t)return Gl;if("string"==typeof t)return $l;if("boolean"==typeof t)return ql;if("number"==typeof t)return Zl;if(t instanceof fc)return Wl;if(t instanceof Pc)return Hl;if(t instanceof _c)return Kl;if(t instanceof vc)return Jl;if(t instanceof bc)return Ql;if(t instanceof xc)return ec;if(t instanceof wc)return tc;if(t instanceof Mc)return rc;if(t instanceof Sc)return ic;if(Array.isArray(t)){const e=t.length;let i;for(const e of t){const t=kt(e);if(i){if(i===t)continue;i=Xl;break}i=t}return it(i||Xl,e)}return Yl}function Mt(t){const e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof fc||t instanceof Pc||t instanceof vc||t instanceof bc||t instanceof xc||t instanceof wc||t instanceof Mc||t instanceof Sc?t.toString():JSON.stringify(t)}function St(t,e){const i=t.length-1;let r,o,n=0,a=i,s=0;for(;n<=a;)if(s=Math.floor((n+a)/2),r=t[s],o=t[s+1],r<=e){if(s===i||ee))throw new Tc("Input is not a number.");a=s-1}return 0}function Pt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function At(t,e,i,r){const o=r-i,n=t-i;return 0===o?0:1===e?n/o:(Math.pow(e,n)-1)/(Math.pow(e,o)-1)}function It(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function Ct(t,e,i,r){return 0===r.compare(e,i)}function Et(t,e,i){const r="=="!==t&&"!="!==t;return class o{constructor(t,e,i){this.type=ql,this.lhs=t,this.rhs=e,this.collator=i,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}static parse(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");const i=t[0];let n=e.parse(t[1],1,Xl);if(!n)return null;if(!It(i,n.type))return e.concat(1).error(`"${i}" comparisons are not supported for type '${rt(n.type)}'.`);let a=e.parse(t[2],2,Xl);if(!a)return null;if(!It(i,a.type))return e.concat(2).error(`"${i}" comparisons are not supported for type '${rt(a.type)}'.`);if(n.type.kind!==a.type.kind&&"value"!==n.type.kind&&"value"!==a.type.kind)return e.error(`Cannot compare types '${rt(n.type)}' and '${rt(a.type)}'.`);r&&("value"===n.type.kind&&"value"!==a.type.kind?n=new Cc(a.type,[n]):"value"!==n.type.kind&&"value"===a.type.kind&&(a=new Cc(n.type,[a])));let s=null;if(4===t.length){if("string"!==n.type.kind&&"string"!==a.type.kind&&"value"!==n.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(s=e.parse(t[3],3,Kl),!s)return null}return new o(n,a,s)}evaluate(o){const n=this.lhs.evaluate(o),a=this.rhs.evaluate(o);if(r&&this.hasUntypedArgument){const e=kt(n),i=kt(a);if(e.kind!==i.kind||"string"!==e.kind&&"number"!==e.kind)throw new Tc(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${e.kind}, ${i.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){const t=kt(n),i=kt(a);if("string"!==t.kind||"string"!==i.kind)return e(o,n,a)}return this.collator?i(o,n,a,this.collator.evaluate(o)):e(o,n,a)}eachChild(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}outputDefined(){return!0}}}function zt(t,e){const i=(180+t[0])/360,r=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,o=Math.pow(2,e.z);return[Math.round(i*o*cu),Math.round(r*o*cu)]}function Dt(t,e){const i=Math.pow(2,e.z);return[(o=(t[0]/cu+e.x)/i,360*o-180),(r=(t[1]/cu+e.y)/i,360/Math.PI*Math.atan(Math.exp((180-360*r)*Math.PI/180))-90)];var r,o}function Ot(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function Lt(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function Rt(t,e,i){const r=t[0]-e[0],o=t[1]-e[1],n=t[0]-i[0],a=t[1]-i[1];return r*a-n*o==0&&r*n<=0&&o*a<=0}function Ft(t,e,i,r){return 0!=(o=[r[0]-i[0],r[1]-i[1]])[0]*(n=[e[0]-t[0],e[1]-t[1]])[1]-o[1]*n[0]&&!(!Gt(t,e,i,r)||!Gt(i,r,t,e));var o,n}function Bt(t,e,i){for(const r of i)for(let i=0;i(o=t)[1]!=(a=s[e+1])[1]>o[1]&&o[0]<(a[0]-n[0])*(o[1]-n[1])/(a[1]-n[1])+n[0]&&(r=!r)}var o,n,a;return r}function Vt(t,e){for(const i of e)if(jt(t,i))return!0;return!1}function Nt(t,e){for(const i of t)if(!jt(i,e))return!1;for(let i=0;i0&&s<0||a<0&&s>0}function Zt(t,e,i){const r=[];for(let o=0;oi[2]){const e=.5*r;let o=t[0]-i[0]>e?-r:i[0]-t[0]>e?r:0;0===o&&(o=t[0]-i[2]>e?-r:i[2]-t[0]>e?r:0),t[0]+=o}Ot(e,t)}function Wt(t,e,i,r){const o=Math.pow(2,r.z)*cu,n=[r.x*cu,r.y*cu],a=[];for(const r of t)for(const t of r){const r=[t.x+n[0],t.y+n[1]];qt(r,e,i,o),a.push(r)}return a}function Ht(t,e,i,r){const o=Math.pow(2,r.z)*cu,n=[r.x*cu,r.y*cu],a=[];for(const i of t){const t=[];for(const r of i){const i=[r.x+n[0],r.y+n[1]];Ot(e,i),t.push(i)}a.push(t)}if(e[2]-e[0]<=o/2){(s=e)[0]=s[1]=1/0,s[2]=s[3]=-1/0;for(const t of a)for(const r of t)qt(r,e,i,o)}var s;return a}function Yt(t,e,i=0,r=t.length-1,o=Kt){for(;r>i;){if(r-i>600){const n=r-i+1,a=e-i+1,s=Math.log(n),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(n-l)/n)*(a-n/2<0?-1:1);Yt(t,e,Math.max(i,Math.floor(e-a*l/n+c)),Math.min(r,Math.floor(e+(n-a)*l/n+c)),o)}const n=t[e];let a=i,s=r;for(Xt(t,i,e),o(t[r],n)>0&&Xt(t,i,r);a0;)s--}0===o(t[i],n)?Xt(t,i,s):(s++,Xt(t,s,r)),s<=e&&(i=s+1),e<=s&&(r=s-1)}}function Xt(t,e,i){const r=t[e];t[e]=t[i],t[i]=r}function Kt(t,e){return te?1:0}function Jt(t,e){if(t.length<=1)return[t];const i=[];let r,o;for(const e of t){const t=te(e);0!==t&&(e.area=Math.abs(t),void 0===o&&(o=t<0),o===t<0?(r&&i.push(r),r=[e]):r.push(e))}if(r&&i.push(r),e>1)for(let t=0;t=t[0]&&t[1]t[1])return[null,null];const i=ie(t);if(e){if(2===i)return[t,null];const e=Math.floor(i/2);return[[t[0],t[0]+e],[t[0]+e,t[1]]]}if(1===i)return[t,null];const r=Math.floor(i/2)-1;return[[t[0],t[0]+r],[t[0]+r+1,t[1]]]}function ne(t,e){if(!re(e,t.length))return[1/0,1/0,-1/0,-1/0];const i=[1/0,1/0,-1/0,-1/0];for(let r=e[0];r<=e[1];++r)Ot(i,t[r]);return i}function ae(t){const e=[1/0,1/0,-1/0,-1/0];for(const i of t)for(const t of i)Ot(e,t);return e}function se(t){return t[0]!==-1/0&&t[1]!==-1/0&&t[2]!==1/0&&t[3]!==1/0}function le(t,e,i){if(!se(t)||!se(e))return NaN;let r=0,o=0;return t[2]e[2]&&(r=t[0]-e[2]),t[1]>e[3]&&(o=t[1]-e[3]),t[3]=r)return r;if(Lt(o,n)){if(fe(t,e))return 0}else if(fe(e,t))return 0;let a=1/0;for(const r of t)for(let t=0,o=r.length,n=o-1;t0;){const o=a.pop();if(o[0]>=n)continue;const l=o[1],c=e?50:100;if(ie(l)<=c){if(!re(l,t.length))return NaN;if(e){const e=me(t,l,i,r);if(isNaN(e)||0===e)return e;n=Math.min(n,e)}else for(let e=l[0];e<=l[1];++e){const o=de(t[e],i,r);if(n=Math.min(n,o),0===n)return 0}}else{const i=oe(l,e);ge(a,n,r,t,s,i[0]),ge(a,n,r,t,s,i[1])}}return n}function be(t,e,i,r,o,n=1/0){let a=Math.min(n,o.distance(t[0],i[0]));if(0===a)return a;const s=new hu([[0,[0,t.length-1],[0,i.length-1]]],ee);for(;s.length>0;){const n=s.pop();if(n[0]>=a)continue;const l=n[1],c=n[2],u=e?50:100,h=r?50:100;if(ie(l)<=u&&ie(c)<=h){if(!re(l,t.length)&&re(c,i.length))return NaN;let n;if(e&&r)n=he(t,l,i,c,o),a=Math.min(a,n);else if(e&&!r){const e=t.slice(l[0],l[1]+1);for(let t=c[0];t<=c[1];++t)if(n=ce(i[t],e,o),a=Math.min(a,n),0===a)return a}else if(!e&&r){const e=i.slice(c[0],c[1]+1);for(let i=l[0];i<=l[1];++i)if(n=ce(t[i],e,o),a=Math.min(a,n),0===a)return a}else n=pe(t,l,i,c,o),a=Math.min(a,n)}else{const n=oe(l,e),u=oe(c,r);ye(s,a,o,t,i,n[0],u[0]),ye(s,a,o,t,i,n[0],u[1]),ye(s,a,o,t,i,n[1],u[0]),ye(s,a,o,t,i,n[1],u[1])}}return a}function xe(t){return"MultiPolygon"===t.type?t.coordinates.map(t=>({type:"Polygon",coordinates:t})):"MultiLineString"===t.type?t.coordinates.map(t=>({type:"LineString",coordinates:t})):"MultiPoint"===t.type?t.coordinates.map(t=>({type:"Point",coordinates:t})):[t]}function we(t,[e,i,r,o]){e=e.evaluate(t),i=i.evaluate(t),r=r.evaluate(t);const n=o?o.evaluate(t):1,a=wt(e,i,r,n);if(a)throw new Tc(a);return new fc(e/255,i/255,r/255,n,!1)}function Te(t,e){return t in e}function ke(t,e){const i=e[t];return void 0===i?null:i}function Me(t){return{type:t}}function Se(t){if(t instanceof Fc)return Se(t.boundExpression);if(t instanceof vu&&"error"===t.name)return!1;if(t instanceof ou)return!1;if(t instanceof uu)return!1;if(t instanceof _u)return!1;if(t instanceof gu)return!1;const e=t instanceof zc||t instanceof Cc;let i=!0;return t.eachChild(t=>{i=e?i&&Se(t):i&&t instanceof Ac}),!!i&&Pe(t)&&Ie(t,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function Pe(t){if(t instanceof vu){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof uu)return!1;if(t instanceof _u)return!1;let e=!0;return t.eachChild(t=>{e&&!Pe(t)&&(e=!1)}),e}function Ae(t){if(t instanceof vu&&"feature-state"===t.name)return!1;let e=!0;return t.eachChild(t=>{e&&!Ae(t)&&(e=!1)}),e}function Ie(t,e){if(t instanceof vu&&e.indexOf(t.name)>=0)return!1;let i=!0;return t.eachChild(t=>{i&&!Ie(t,e)&&(i=!1)}),i}function Ce(t){return{result:"success",value:t}}function Ee(t){return{result:"error",value:t}}function ze(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function De(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Oe(t){return!!t.expression&&t.expression.interpolated}function Le(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Re(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)&&kt(t)===Yl}function Fe(t){return t}function Be(t,e){const i=t.stops&&"object"==typeof t.stops[0][0],r=i||!(i||void 0!==t.property),o=t.type||(Oe(e)?"exponential":"interval"),n=function(t){switch(t.type){case"color":return fc.parse;case"padding":return bc.parse;case"numberArray":return xc.parse;case"colorArray":return wc.parse;default:return null}}(e);if(n&&((t=et({},t)).stops&&(t.stops=t.stops.map(t=>[t[0],n(t[1])])),t.default=n(t.default?t.default:e.default)),t.colorSpace&&"rgb"!==(a=t.colorSpace)&&"hcl"!==a&&"lab"!==a)throw new Error(`Unknown color space: "${t.colorSpace}"`);var a;const s=function(t){switch(t){case"exponential":return Ue;case"interval":return Ne;case"categorical":return Ve;case"identity":return Ge;default:throw new Error(`Unknown function type "${t}"`)}}(o);let l,c;if("categorical"===o){l=Object.create(null);for(const e of t.stops)l[e[0]]=e[1];c=typeof t.stops[0][0]}if(i){const i={},r=[];for(let e=0;et[0]),evaluate:({zoom:i},r)=>Ue({stops:o,base:t.base},e,i).evaluate(i,r)}}if(r){const i="exponential"===o?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:i,interpolationFactor:Yc.interpolationFactor.bind(void 0,i),zoomStops:t.stops.map(t=>t[0]),evaluate:({zoom:i})=>s(t,e,i,l,c)}}return{kind:"source",evaluate(i,r){const o=r&&r.properties?r.properties[t.property]:void 0;return void 0===o?je(t.default,e.default):s(t,e,o,l,c)}}}function je(t,e,i){return void 0!==t?t:void 0!==e?e:void 0!==i?i:void 0}function Ve(t,e,i,r,o){return je(typeof i===o?r[i]:void 0,t.default,e.default)}function Ne(t,e,i){if("number"!==Le(i))return je(t.default,e.default);const r=t.stops.length;if(1===r)return t.stops[0][1];if(i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[r-1][0])return t.stops[r-1][1];const o=St(t.stops.map(t=>t[0]),i);return t.stops[o][1]}function Ue(t,e,i){const r=void 0!==t.base?t.base:1;if("number"!==Le(i))return je(t.default,e.default);const o=t.stops.length;if(1===o)return t.stops[0][1];if(i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[o-1][0])return t.stops[o-1][1];const n=St(t.stops.map(t=>t[0]),i),a=function(t,e,i,r){const o=r-i,n=t-i;return 0===o?0:1===e?n/o:(Math.pow(e,n)-1)/(Math.pow(e,o)-1)}(i,r,t.stops[n][0],t.stops[n+1][0]),s=t.stops[n][1],l=t.stops[n+1][1],c=Xc[e.type]||Fe;return"function"==typeof s.evaluate?{evaluate(...e){const i=s.evaluate.apply(void 0,e),r=l.evaluate.apply(void 0,e);if(void 0!==i&&void 0!==r)return c(i,r,a,t.colorSpace)}}:c(s,l,a,t.colorSpace)}function Ge(t,e,i){switch(e.type){case"color":i=fc.parse(i);break;case"formatted":i=vc.fromString(i.toString());break;case"resolvedImage":i=Sc.fromString(i.toString());break;case"padding":i=bc.parse(i);break;case"colorArray":i=wc.parse(i);break;case"numberArray":i=xc.parse(i);break;default:Le(i)===e.type||"enum"===e.type&&e.values[i]||(i=void 0)}return je(i,t.default,e.default)}function Ze(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in yu}function $e(t,e,i){const r=new Lc(yu,Se,[],e?function(t){const e={color:Wl,string:$l,number:Zl,enum:$l,boolean:ql,formatted:Jl,padding:Ql,numberArray:ec,colorArray:tc,projectionDefinition:Hl,resolvedImage:ic,variableAnchorOffsetCollection:rc};return"array"===t.type?it(e[t.value]||Xl,t.length):e[t.type]}(e):void 0),o=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return o?Ce(new bu(o,e,i)):Ee(r.errors)}function qe(t,e,i){const r=$e(t,e,i);if("error"===r.result)return r;const o=r.value.expression,n=Pe(o);if(!n&&!ze(e))return Ee([new Nl("","data expressions not supported")]);const a=Ie(o,["zoom"]);if(!a&&!De(e))return Ee([new Nl("","zoom expressions not supported")]);const s=We(o);return s||a?s instanceof Nl?Ee([s]):s instanceof Yc&&!Oe(e)?Ee([new Nl("",'"interpolate" expressions cannot be used with this property')]):Ce(s?new wu(n?"camera":"composite",r.value,s.labels,s instanceof Yc?s.interpolation:void 0,i):new xu(n?"constant":"source",r.value,i)):Ee([new Nl("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}function We(t){let e=null;if(t instanceof Rc)e=We(t.result);else if(t instanceof Kc){for(const i of t.args)if(e=We(i),e)break}else(t instanceof Zc||t instanceof Yc)&&t.input instanceof vu&&"zoom"===t.input.name&&(e=t);return e instanceof Nl||t.eachChild(t=>{const i=We(t);i instanceof Nl?e=i:!e&&i?e=new Nl("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&i&&e!==i&&(e=new Nl("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function He(t,e=new Set){return t instanceof gu&&e.add(t.key),t.eachChild(t=>{He(t,e)}),e}function Ye(t,e){const{zoom:i,heatmapDensity:r,elevation:o,lineProgress:n,isSupportedScript:a,accumulated:s}=null!=t?t:{};return{zoom:i,heatmapDensity:r,elevation:o,lineProgress:n,isSupportedScript:a,accumulated:s,globalState:e}}function Xe(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!Xe(e)&&"boolean"!=typeof e)return!1;return!0;default:return!0}}function Ke(t,e){if(null==t)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Xe(t)||(t=ti(t));const i=$e(t,ku,e);if("error"===i.result)throw new Error(i.value.map(t=>`${t.key}: ${t.message}`).join(", "));return{filter:(t,e,r)=>i.value.evaluate(t,e,{},r),needGeometry:Qe(t),getGlobalStateRefs:()=>He(i.value.expression)}}function Je(t,e){return te?1:0}function Qe(t){if(!Array.isArray(t))return!1;if("within"===t[0]||"distance"===t[0])return!0;for(let e=1;e"===e||"<="===e||">="===e?ei(t[1],t[2],e):"any"===e?(i=t.slice(1),["any"].concat(i.map(ti))):"all"===e?["all"].concat(t.slice(1).map(ti)):"none"===e?["all"].concat(t.slice(1).map(ti).map(oi)):"in"===e?ii(t[1],t.slice(2)):"!in"===e?oi(ii(t[1],t.slice(2))):"has"===e?ri(t[1]):"!has"!==e||oi(ri(t[1]));var i}function ei(t,e,i){switch(t){case"$type":return[`filter-type-${i}`,e];case"$id":return[`filter-id-${i}`,e];default:return[`filter-${i}`,t,e]}}function ii(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(t=>typeof t!=typeof e[0])?["filter-in-large",t,["literal",e.sort(Je)]]:["filter-in-small",t,["literal",e]]}}function ri(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function oi(t){return["!",t]}function ni(t){const e=typeof t;if("number"===e||"boolean"===e||"string"===e||null==t)return JSON.stringify(t);if(Array.isArray(t)){let e="[";for(const i of t)e+=`${ni(i)},`;return`${e}]`}const i=Object.keys(t).sort();let r="{";for(let e=0;er.maximum?[new Vl(e,i,`${i} is greater than the maximum value ${r.maximum}`)]:[]}function di(t){function e(t){let e=[];const o=t.value,n=t.key;if("array"!==Le(o))return[new Vl(n,o,`array expected, ${Le(o)} found`)] ;if(2!==o.length)return[new Vl(n,o,`array length 2 expected, length ${o.length} found`)];if(h){if("object"!==Le(o[0]))return[new Vl(n,o,`object expected, ${Le(o[0])} found`)];if(void 0===o[0].zoom)return[new Vl(n,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new Vl(n,o,"object stop key must have value")];if(s&&s>li(o[0].zoom))return[new Vl(n,o[0].zoom,"stop zoom values must appear in ascending order")];li(o[0].zoom)!==s&&(s=li(o[0].zoom),a=void 0,l={}),e=e.concat(ui({key:`${n}[0]`,value:o[0],valueSpec:{zoom:{}},validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:pi,value:i}}))}else e=e.concat(i({key:`${n}[0]`,value:o[0],validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec},o));return Ze(ci(o[1]))?e.concat([new Vl(`${n}[1]`,o[1],"expressions are not allowed in function stops.")]):e.concat(t.validateSpec({key:`${n}[1]`,value:o[1],valueSpec:r,validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec}))}function i(t,e){const i=Le(t.value),s=li(t.value),c=null!==t.value?t.value:e;if(n){if(i!==n)return[new Vl(t.key,c,`${i} stop domain type must match previous stop domain type ${n}`)]}else n=i;if("number"!==i&&"string"!==i&&"boolean"!==i)return[new Vl(t.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==i&&"categorical"!==o){let e=`number expected, ${i} found`;return ze(r)&&void 0===o&&(e+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Vl(t.key,c,e)]}return"categorical"!==o||"number"!==i||isFinite(s)&&Math.floor(s)===s?"categorical"!==o&&"number"===i&&void 0!==a&&s=8&&(u&&!ze(t.valueSpec)?p.push(new Vl(t.key,t.value,"property functions not supported")):c&&!De(t.valueSpec)&&p.push(new Vl(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!h||void 0!==t.value.property||p.push(new Vl(t.key,t.value,'"property" property is required')),p}function mi(t){const e=("property"===t.expressionContext?qe:$e)(ci(t.value),t.valueSpec);if("error"===e.result)return e.value.map(e=>new Vl(`${t.key}${e.key}`,t.value,e.message));const i=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!i.outputDefined())return[new Vl(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===t.expressionContext&&"layout"===t.propertyType&&!Ae(i))return[new Vl(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!Ae(i))return[new Vl(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!Ie(i,["zoom","feature-state"]))return[new Vl(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!Pe(i))return[new Vl(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function fi(t){const e=t.key,i=t.value,r=Le(i);return"string"!==r?[new Vl(e,i,`color expected, ${r} found`)]:fc.parse(String(i))?[]:[new Vl(e,i,`color expected, "${i}" found`)]}function _i(t){const e=t.key,i=t.value,r=t.valueSpec,o=[];return Array.isArray(r.values)?-1===r.values.indexOf(li(i))&&o.push(new Vl(e,i,`expected one of [${r.values.join(", ")}], ${JSON.stringify(i)} found`)):-1===Object.keys(r.values).indexOf(li(i))&&o.push(new Vl(e,i,`expected one of [${Object.keys(r.values).join(", ")}], ${JSON.stringify(i)} found`)),o}function gi(t){return Xe(ci(t.value))?mi(et({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):yi(t)}function yi(t){const e=t.value,i=t.key;if("array"!==Le(e))return[new Vl(i,e,`array expected, ${Le(e)} found`)];const r=t.styleSpec;let o,n=[];if(e.length<1)return[new Vl(i,e,"filter array must have at least 1 element")];switch(n=n.concat(_i({key:`${i}[0]`,value:e[0],valueSpec:r.filter_operator,style:t.style,styleSpec:t.styleSpec})),li(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&"$type"===li(e[1])&&n.push(new Vl(i,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":3!==e.length&&n.push(new Vl(i,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(o=Le(e[1]),"string"!==o&&n.push(new Vl(`${i}[1]`,e[1],`string expected, ${o} found`)));for(let a=2;a{t in o&&r.push(new Vl(n,o[t],`"${t}" is prohibited for ref layers`))}),a.layers.forEach(e=>{li(e.id)===c&&(t=e)}),t?t.ref?r.push(new Vl(n,o.ref,"ref cannot reference another ref layer")):l=li(t.type):r.push(new Vl(n,o.ref,`ref layer "${c}" not found`))}else if("background"!==l)if(o.source){const t=a.sources&&a.sources[o.source],e=t&&li(t.type);t?"vector"===e&&"raster"===l?r.push(new Vl(n,o.source,`layer "${o.id}" requires a raster source`)):"raster-dem"!==e&&"hillshade"===l||"raster-dem"!==e&&"color-relief"===l?r.push(new Vl(n,o.source,`layer "${o.id}" requires a raster-dem source`)):"raster"===e&&"raster"!==l?r.push(new Vl(n,o.source,`layer "${o.id}" requires a vector source`)):"vector"!==e||o["source-layer"]?"raster-dem"===e&&"hillshade"!==l&&"color-relief"!==l?r.push(new Vl(n,o.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):"line"!==l||!o.paint||!o.paint["line-gradient"]||"geojson"===e&&t.lineMetrics||r.push(new Vl(n,o,`layer "${o.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):r.push(new Vl(n,o,`layer "${o.id}" must specify a "source-layer"`)):r.push(new Vl(n,o.source,`source "${o.source}" not found`))}else r.push(new Vl(n,o,'missing required property "source"'));return"raster"===l&&(null===(e=o.paint)||void 0===e?void 0:e.resampling)&&(null===(i=o.paint)||void 0===i?void 0:i["raster-resampling"])&&r.push(new Vl(n,o.paint,`layer "${o.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),r=r.concat(ui({key:n,value:o,valueSpec:s.layer,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,objectElementValidators:{"*":()=>[],type:()=>t.validateSpec({key:`${n}.type`,value:o.type,valueSpec:s.layer.type,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,object:o,objectKey:"type"}),filter:gi,layout:t=>ui({layer:o,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,objectElementValidators:{"*":t=>xi(et({layerType:l},t))}}),paint:t=>ui({layer:o,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,objectElementValidators:{"*":t=>bi(et({layerType:l},t))}})}})),r}function Ti(t){const e=t.value,i=t.key,r=Le(e);return"string"!==r?[new Vl(i,e,`string expected, ${r} found`)]:[]}function ki(t){const e=t.value,i=t.key,r=t.styleSpec,o=t.style,n=t.validateSpec;if(!e.type)return[new Vl(i,e,'"type" is required')];const a=li(e.type);let s;switch(a){case"vector":case"raster":return s=ui({key:i,value:e,valueSpec:r[`source_${a.replace("-","_")}`],style:t.style,styleSpec:r,objectElementValidators:Mu,validateSpec:n}),s;case"raster-dem":return s=function(t){var e;const i=null!==(e=t.sourceName)&&void 0!==e?e:"",r=t.value,o=t.styleSpec,n=o.source_raster_dem,a=t.style;let s=[];const l=Le(r);if(void 0===r)return s;if("object"!==l)return s.push(new Vl("source_raster_dem",r,`object expected, ${l} found`)),s;const c="custom"===li(r.encoding),u=["redFactor","greenFactor","blueFactor","baseShift"],h=t.value.encoding?`"${t.value.encoding}"`:"Default";for(const e in r)!c&&u.includes(e)?s.push(new Vl(e,r[e],`In "${i}": "${e}" is only valid when "encoding" is set to "custom". ${h} encoding found`)):n[e]?s=s.concat(t.validateSpec({key:e,value:r[e],valueSpec:n[e],validateSpec:t.validateSpec,style:a,styleSpec:o})):s.push(new Vl(e,r[e],`unknown property "${e}"`));return s}({sourceName:i,value:e,style:t.style,styleSpec:r,validateSpec:n}),s;case"geojson":if(s=ui({key:i,value:e,valueSpec:r.source_geojson,style:o,styleSpec:r,validateSpec:n,objectElementValidators:Mu}),e.cluster)for(const t in e.clusterProperties){const[r,o]=e.clusterProperties[t],n="string"==typeof r?[r,["accumulated"],["get",t]]:r;s.push(...mi({key:`${i}.${t}.map`,value:o,expressionContext:"cluster-map"})),s.push(...mi({key:`${i}.${t}.reduce`,value:n,expressionContext:"cluster-reduce"}))}return s;case"video":return ui({key:i,value:e,valueSpec:r.source_video,style:o,validateSpec:n,styleSpec:r});case"image":return ui({key:i,value:e,valueSpec:r.source_image,style:o,validateSpec:n,styleSpec:r});case"canvas":return[new Vl(i,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return _i({key:`${i}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Mi(t){const e=t.value,i=t.styleSpec,r=i.light,o=t.style;let n=[];const a=Le(e);if(void 0===e)return n;if("object"!==a)return n=n.concat([new Vl("light",e,`object expected, ${a} found`)]),n;for(const a in e){const s=a.match(/^(.*)-transition$/);n=n.concat(s&&r[s[1]]&&r[s[1]].transition?t.validateSpec({key:a,value:e[a],valueSpec:i.transition,validateSpec:t.validateSpec,style:o,styleSpec:i}):r[a]?t.validateSpec({key:a,value:e[a],valueSpec:r[a],validateSpec:t.validateSpec,style:o,styleSpec:i}):[new Vl(a,e[a],`unknown property "${a}"`)])}return n}function Si(t){const e=t.value,i=t.styleSpec,r=i.sky,o=t.style,n=Le(e);if(void 0===e)return[];if("object"!==n)return[new Vl("sky",e,`object expected, ${n} found`)];let a=[];for(const n in e)a=a.concat(r[n]?t.validateSpec({key:n,value:e[n],valueSpec:r[n],style:o,styleSpec:i}):[new Vl(n,e[n],`unknown property "${n}"`)]);return a}function Pi(t){const e=t.value,i=t.styleSpec,r=i.terrain,o=t.style;let n=[];const a=Le(e);if(void 0===e)return n;if("object"!==a)return n=n.concat([new Vl("terrain",e,`object expected, ${a} found`)]),n;for(const a in e)n=n.concat(r[a]?t.validateSpec({key:a,value:e[a],valueSpec:r[a],validateSpec:t.validateSpec,style:o,styleSpec:i}):[new Vl(a,e[a],`unknown property "${a}"`)]);return n}function Ai(t){let e=[];const i=t.value,r=t.key;if(Array.isArray(i)){const o=[],n=[];for(const a in i)i[a].id&&o.includes(i[a].id)&&e.push(new Vl(r,i,`all the sprites' ids must be unique, but ${i[a].id} is duplicated`)),o.push(i[a].id),i[a].url&&n.includes(i[a].url)&&e.push(new Vl(r,i,`all the sprites' URLs must be unique, but ${i[a].url} is duplicated`)),n.push(i[a].url),e=e.concat(ui({key:`${r}[${a}]`,value:i[a],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:t.validateSpec}));return e}return Ti({key:r,value:i})}function Ii(t){return Boolean(t)&&t.constructor===Object}function Ci(t){return Ii(t.value)?[]:[new Vl(t.key,t.value,`object expected, ${Le(t.value)} found`)]}function Ei(t){const e=t.value,i=t.valueSpec,r=t.styleSpec;return t.validateSpec=Ei,i.expression&&Re(li(e))?di(t):i.expression&&Ze(ci(e))?mi(t):i.type&&Su[i.type]?Su[i.type](t):ui(et({},t,{valueSpec:i.type?r[i.type]:i}))}function zi(t){const e=t.value,i=t.key,r=Ti(t);return r.length||(-1===e.indexOf("{fontstack}")&&r.push(new Vl(i,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&r.push(new Vl(i,e,'"glyphs" url must include a "{range}" token'))),r}function Di(t,e=Bl){let i=[];return i=i.concat(Ei({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,validateSpec:Ei,objectElementValidators:{glyphs:zi,"*":()=>[]}})),t.constants&&(i=i.concat(si({key:"constants",value:t.constants}))),Li(i)}function Oi(t){return function(e){return t(Object.assign({},e,{validateSpec:Ei}))}}function Li(t){return[].concat(t).sort((t,e)=>t.line-e.line)}function Ri(t){return function(...e){return Li(t.apply(this,e))}}function Fi(t,e){let i=!1;if(null==e?void 0:e.length)for(const r of e)t.fire(new Rl(new Error(r.message))),i=!0;return i}function Bi(t,e,i={}){if(Ru[t])throw new Error(`${t} is already registered.`);Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),Ru[t]={klass:e,omit:i.omit||[],shallow:i.shallow||[]}}function ji(t){var e;return t&&"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||"ArrayBuffer"===(null===(e=t.constructor)||void 0===e?void 0:e.name))}function Vi(t){return t.$name||t.constructor._classRegistryKey}function Ni(t){return!function(t){if(null===t||"object"!=typeof t)return!1;const e=Vi(t);return e&&"Object"!==e}(t)&&(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof Blob||t instanceof Error||ji(t)||O(t)||ArrayBuffer.isView(t)||t instanceof ImageData)}function Ui(t,e){if(Ni(t))return(ji(t)||O(t))&&e&&e.push(t),ArrayBuffer.isView(t)&&e&&e.push(t.buffer),t instanceof ImageData&&e&&e.push(t.data.buffer),t;if(Array.isArray(t)){const i=[];for(const r of t)i.push(Ui(r,e));return i}if("object"!=typeof t)throw new Error("can't serialize object of type "+typeof t);const i=Vi(t);if(!i)throw new Error(`can't serialize object of unregistered class ${t.constructor.name}`);if(!Ru[i])throw new Error(`${i} is not registered.`);const{klass:r}=Ru[i],o=r.serialize?r.serialize(t,e):{};if(r.serialize){if(o===(null==e?void 0:e[e.length-1]))throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const r in t){if(!t.hasOwnProperty(r))continue;if(Ru[i].omit.includes(r))continue;const n=t[r];o[r]=Ru[i].shallow.includes(r)?n:Ui(n,e)}t instanceof Error&&(o.message=t.message)}if(o.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==i&&(o.$name=i),o}function Gi(t){if(Ni(t))return t;if(Array.isArray(t))return t.map(Gi);if("object"!=typeof t)throw new Error("can't deserialize object of type "+typeof t);const e=Vi(t)||"Object";if(!Ru[e])throw new Error(`can't deserialize unregistered class ${e}`);const{klass:i}=Ru[e];if(!i)throw new Error(`can't deserialize unregistered class ${e}`);if(i.deserialize)return i.deserialize(t);const r=Object.create(i.prototype);for(const i of Object.keys(t)){if("$name"===i)continue;const o=t[i];r[i]=Ru[e].shallow.includes(i)?o:Gi(o)}return r}function Zi(t){return/[\u02EA\u02EB\u2E80-\u2FDF\u2FF0-\u303F\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FD-\u30FF\u3105-\u312F\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(t))}function $i(t){return/[\u02EA\u02EB\u1100-\u11FF\u1400-\u167F\u18B0-\u18F5\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u3007\u3012\u3013\u3020-\u302F\u3031-\u303F\u3041-\u3096\u309D-\u30FB\u30FD-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE48\uFE50-\uFE57\uFE5F-\uFE62\uFE67-\uFE6F\uFF00-\uFF07\uFF0A-\uFF0C\uFF0E-\uFF19\uFF1F-\uFF3A\uFF3C\uFF3E\uFF40-\uFF5A\uFFE0-\uFFE2\uFFE4-\uFFE7]|\uD802[\uDD80-\uDD9F]|\uD805[\uDD80-\uDDFF]|\uD806[\uDE00-\uDEBF]|\uD811[\uDC00-\uDE7F]|\uD81B[\uDFE0-\uDFE4\uDFF0-\uDFF6]|[\uD81C-\uD822\uD83D\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD30-\uDEFB]|\uD833[\uDEC0-\uDFCF]|\uD834[\uDC00-\uDDFF\uDEE0-\uDF7F]|\uD836[\uDC00-\uDEAF]|\uD83C[\uDC00-\uDE00\uDF00-\uDFFF]|\uD83E[\uDD00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(t))}function qi(t){return/\s/u.test(String.fromCodePoint(t))}function Wi(t){for(const e of t)if($i(e.codePointAt(0)))return!0;return!1}function Hi(t){for(const e of t)if(!Xi(e.codePointAt(0)))return!1;return!0}function Yi(t){const e=t.map(t=>{try{return new RegExp(`\\p{sc=${t}}`,"u").source}catch(t){return null}}).filter(t=>t);return new RegExp(e.join("|"),"u")}function Xi(t){return!Bu.test(String.fromCodePoint(t))}function Ki(t){return!($i(t)||(e=t,/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(e))));var e}function Ji(t){return ju.test(String.fromCodePoint(t))}function Qi(t,e){return!(!e&&Ji(t)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(t)))}function tr(t){for(const e of t)if(Ji(e.codePointAt(0)))return!0;return!1}function er(t){return function(t,e){for(const i of t)if(!Qi(i.codePointAt(0),e))return!1;return!0}(t,"loaded"===Vu.getRTLTextPluginStatus())}function ir(t,e=1){let i=0,r=0;return{members:t.map(t=>{const o=ch[t.type].BYTES_PER_ELEMENT,n=i=rr(i,Math.max(e,o)),a=t.components||1;return r=Math.max(r,o),i+=o*a,{name:t.name,type:t.type,components:a,offset:n}}),size:rr(i,Math.max(r,e)),alignment:e}}function rr(t,e){return Math.ceil(t/e)*e}function or(t,e){return 256*(t=M(Math.floor(t),0,255))+M(Math.floor(e),0,255)}function nr(t){const e=+t;return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e:xp(String(t))}function ar(t,e,i,r){for(;i>1];let n=i-1,a=r+1;for(;;){do{n++}while(t[n]o);if(n>=a)break;sr(t,n,a),sr(e,3*n,3*a),sr(e,3*n+1,3*a+1),sr(e,3*n+2,3*a+2)}a-ii.x+1||ri.y+1)&&E("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return i}function pr(t,e){return{type:t.type,id:t.id,properties:t.properties,geometry:e?hr(t):[]}}function dr(t,e,i,r,o){t.emplaceBack(jp+8*e+r,jp+8*i+o)}function mr(t,e){for(const i of t)if(Tr(e,i))return!0;for(const i of e)if(Tr(t,i))return!0;return yr(t,e)}function fr(t,e,i){return!!Tr(t,e)||br(e,t,i)}function _r(t,e){if(1===t.length)return wr(e,t[0]);for(const i of e)for(const e of i)if(Tr(t,e))return!0;for(const i of t)if(wr(e,i))return!0;for(const i of e)if(yr(t,i))return!0;return!1}function gr(t,e,i){if(t.length>1){if(yr(t,e))return!0;for(const r of e)if(br(r,t,i))return!0}for(const r of t)if(br(r,e,i))return!0;return!1}function yr(t,e){if(0===t.length||0===e.length)return!1;for(let i=0;i1?i:i.sub(e)._mult(o)._add(e))}function wr(t,e){let i,r,o,n=!1;for(const a of t){i=a;for(let t=0,a=i.length-1;te.y!=o.y>e.y&&e.x<(o.x-r.x)*(e.y-r.y)/(o.y-r.y)+r.x&&(n=!n)}return n}function Tr(t,e){let i=!1;for(let r=0,o=t.length-1;re.y!=a.y>e.y&&e.x<(a.x-n.x)*(e.y-n.y)/(a.y-n.y)+n.x&&(i=!i)}return i}function kr(t,e,i){const r=i[0],o=i[2];if(t.xo.x&&e.x>o.x||t.yo.y&&e.y>o.y)return!1;const n=z(t,e,i[0]);return n!==z(t,e,i[1])||n!==z(t,e,i[2])||n!==z(t,e,i[3])}function Mr(t,e,i){const r=e.paint.get(t).value;return"constant"===r.kind?r.value:i.programConfigurations.get(e.id).getMaxValue(t)}function Sr(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Pr(t,e,r,o,n){if(!e[0]&&!e[1])return t;const a=i.convert(e)._mult(n);"viewport"===r&&a._rotate(-o);const s=[];for(const e of t)s.push(e.sub(a));return s}function Ar(t){const e=[];for(let i=0;it.width||o.height>t.height||i.x>t.width-o.width||i.y>t.height-o.height)throw new RangeError("out of range source coordinates for image copy");if(o.width>e.width||o.height>e.height||r.x>e.width-o.width||r.y>e.height-o.height)throw new RangeError("out of range destination coordinates for image copy");const a=t.data,s=e.data;if(a===s)throw new Error("srcData equals dstData, so image is already copied");for(let l=0;l{e[t.evaluationKey]=a;const s=t.expression.evaluate(e);o.setPixel(r/4/i,n/4,s)};if(t.clips)for(let e=0,o=0;e0)for(let o=e;o=e;o-=r)n=po(o/r|0,t[o],t[o+1],n);return n&&ao(n,n.next)&&(mo(n),n=n.next),n}function $r(t,e){if(!t)return t;e||(e=t);let i,r=t;do{if(i=!1,r.steiner||!ao(r,r.next)&&0!==no(r.prev,r,r.next))r=r.next;else{if(mo(r),r=e=r.prev,r===r.next)break;i=!0}}while(i||r!==e);return e}function qr(t,e,i,r,o,n,a){if(!t)return;!a&&n&&function(t,e,i,r){let o=t;do{0===o.z&&(o.z=to(o.x,o.y,e,i,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==t);o.prevZ.nextZ=null,o.prevZ=null,function(t){let e,i=1;do{let r,o=t;t=null;let n=null;for(e=0;o;){e++;let a=o,s=0;for(let t=0;t0||l>0&&a;)0!==s&&(0===l||!a||o.z<=a.z)?(r=o,o=o.nextZ,s--):(r=a,a=a.nextZ,l--),n?n.nextZ=r:t=r,r.prevZ=n,n=r;o=a}n.nextZ=null,i*=2}while(e>1)}(o)}(t,r,o,n);let s=t;for(;t.prev!==t.next;){const l=t.prev,c=t.next;if(n?Hr(t,r,o,n):Wr(t))e.push(l.i,t.i,c.i),mo(t),t=c.next,s=c.next;else if((t=c)===s){a?1===a?qr(t=Yr($r(t),e),e,i,r,o,n,2):2===a&&Xr(t,e,i,r,o,n):qr($r(t),e,i,r,o,n,1);break}}}function Wr(t){const e=t.prev,i=t,r=t.next;if(no(e,i,r)>=0)return!1;const o=e.x,n=i.x,a=r.x,s=e.y,l=i.y,c=r.y,u=Math.min(o,n,a),h=Math.min(s,l,c),p=Math.max(o,n,a),d=Math.max(s,l,c);let m=r.next;for(;m!==e;){if(m.x>=u&&m.x<=p&&m.y>=h&&m.y<=d&&ro(o,s,n,l,a,c,m.x,m.y)&&no(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function Hr(t,e,i,r){const o=t.prev,n=t,a=t.next;if(no(o,n,a)>=0)return!1;const s=o.x,l=n.x,c=a.x,u=o.y,h=n.y,p=a.y,d=Math.min(s,l,c),m=Math.min(u,h,p),f=Math.max(s,l,c),_=Math.max(u,h,p),g=to(d,m,e,i,r),y=to(f,_,e,i,r);let v=t.prevZ,b=t.nextZ;for(;v&&v.z>=g&&b&&b.z<=y;){if(v.x>=d&&v.x<=f&&v.y>=m&&v.y<=_&&v!==o&&v!==a&&ro(s,u,l,h,c,p,v.x,v.y)&&no(v.prev,v,v.next)>=0)return!1;if(v=v.prevZ,b.x>=d&&b.x<=f&&b.y>=m&&b.y<=_&&b!==o&&b!==a&&ro(s,u,l,h,c,p,b.x,b.y)&&no(b.prev,b,b.next)>=0)return!1;b=b.nextZ}for(;v&&v.z>=g;){if(v.x>=d&&v.x<=f&&v.y>=m&&v.y<=_&&v!==o&&v!==a&&ro(s,u,l,h,c,p,v.x,v.y)&&no(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;b&&b.z<=y;){if(b.x>=d&&b.x<=f&&b.y>=m&&b.y<=_&&b!==o&&b!==a&&ro(s,u,l,h,c,p,b.x,b.y)&&no(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function Yr(t,e){let i=t;do{const r=i.prev,o=i.next.next;!ao(r,o)&&so(r,i,i.next,o)&&uo(r,o)&&uo(o,r)&&(e.push(r.i,i.i,o.i),mo(i),mo(i.next),i=t=o),i=i.next}while(i!==t);return $r(i)}function Xr(t,e,i,r,o,n){let a=t;do{let t=a.next.next;for(;t!==a.prev;){if(a.i!==t.i&&oo(a,t)){let s=ho(a,t);return a=$r(a,a.next),s=$r(s,s.next),qr(a,e,i,r,o,n,0),void qr(s,e,i,r,o,n,0)}t=t.next}a=a.next}while(a!==t)}function Kr(t,e){let i=t.x-e.x;return 0===i&&(i=t.y-e.y,0===i)&&(i=(t.next.y-t.y)/(t.next.x-t.x)-(e.next.y-e.y)/(e.next.x-e.x)),i}function Jr(t,e){const i=function(t,e){let i=e;const r=t.x,o=t.y;let n,a=-1/0;if(ao(t,i))return i;do{if(ao(t,i.next))return i.next;if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){const t=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(t<=r&&t>a&&(a=t,n=i.x=i.x&&i.x>=l&&r!==i.x&&io(on.x||i.x===n.x&&Qr(n,i)))&&(n=i,u=e)}i=i.next}while(i!==s);return n}(t,e);if(!i)return e;const r=ho(i,t);return $r(r,r.next),$r(i,i.next)}function Qr(t,e){ return no(t.prev,t,e.prev)<0&&no(e.next,t,t.next)<0}function to(t,e,i,r,o){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*o|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*o|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function eo(t){let e=t,i=t;do{(e.x=(t-a)*(n-s)&&(t-a)*(r-s)>=(i-a)*(e-s)&&(i-a)*(n-s)>=(o-a)*(r-s)}function ro(t,e,i,r,o,n,a,s){return!(t===a&&e===s)&&io(t,e,i,r,o,n,a,s)}function oo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&so(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(uo(t,e)&&uo(e,t)&&function(t,e){let i=t,r=!1;const o=(t.x+e.x)/2,n=(t.y+e.y)/2;do{i.y>n!=i.next.y>n&&i.next.y!==i.y&&o<(i.next.x-i.x)*(n-i.y)/(i.next.y-i.y)+i.x&&(r=!r),i=i.next}while(i!==t);return r}(t,e)&&(no(t.prev,t,e.prev)||no(t,e.prev,e))||ao(t,e)&&no(t.prev,t,t.next)>0&&no(e.prev,e,e.next)>0)}function no(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function ao(t,e){return t.x===e.x&&t.y===e.y}function so(t,e,i,r){const o=co(no(t,e,i)),n=co(no(t,e,r)),a=co(no(i,r,t)),s=co(no(i,r,e));return o!==n&&a!==s||!(0!==o||!lo(t,i,e))||!(0!==n||!lo(t,r,e))||!(0!==a||!lo(i,t,r))||!(0!==s||!lo(i,e,r))}function lo(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function co(t){return t>0?1:t<0?-1:0}function uo(t,e){return no(t.prev,t,t.next)<0?no(t,e,t.next)>=0&&no(t,t.prev,e)>=0:no(t,e,t.prev)<0||no(t,t.next,e)<0}function ho(t,e){const i=fo(t.i,t.x,t.y),r=fo(e.i,e.x,e.y),o=t.next,n=e.prev;return t.next=e,e.prev=t,i.next=o,o.prev=i,r.next=i,i.prev=r,n.next=r,r.prev=n,r}function po(t,e,i,r){const o=fo(t,e,i);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function mo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function fo(t,e,i){return{i:t,x:e,y:i,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function _o(t,e,i,r=!0){return new pd(i,e).subdividePolygonInternal(t,r)}function go(t,e,r=!1){if(!t||t.length<1)return[];if(t.length<2)return[];const o=t[0],n=t[t.length-1],a=r&&(o.x!==n.x||o.y!==n.y);if(e<2)return a?[...t,t[0]]:[...t];const s=Math.floor(yl/e),l=[];l.push(new i(t[0].x,t[0].y));const c=t.length,u=a?c:c-1;for(let e=0;e0?(Math.floor(y/s)+1)*s:(Math.ceil(y/s)-1)*s,e=f>0?(Math.floor(v/s)+1)*s:(Math.ceil(v/s)-1)*s,r=Math.abs(y-t),o=Math.abs(v-e),n=Math.abs(y-u),a=Math.abs(v-h),c=p?r/_:Number.POSITIVE_INFINITY,b=d?o/g:Number.POSITIVE_INFINITY;if((n<=r||!p)&&(a<=o||!d))break;if(c=0?a-1:n-1,o=(s+1)%n,l=t[2*e[r]],c=t[2*e[o]],u=t[2*e[a]],h=t[2*e[a]+1],p=t[2*e[s]+1];let d=!1;if(lc)d=!1;else{const i=p-h,n=-(t[2*e[s]]-u),a=h((c-u)*i+(t[2*e[o]+1]-h)*n)*a&&(d=!0)}if(d){const t=e[r],o=e[a],l=e[s];t!==o&&t!==l&&o!==l&&i.push(l,o,t),a--,a<0&&(a=n-1)}else{const t=e[o],r=e[a],l=e[s];t!==r&&t!==l&&r!==l&&i.push(l,r,t),s++,s>=n&&(s=0)}if(r===o)break}}function vo(t,e,i,r,o,n,a,s,l){const c=o.length/2,u=a&&s&&l;if(chp.MAX_VERTEX_ARRAY_LENGTH&&(c=t.createNewSegment(e,i),l=s.count,f=!0,_=!0,g=!0,u=0);const y=bo(a,r,n,s,p,f,c),v=bo(a,r,n,s,d,_,c),b=bo(a,r,n,s,m,g,c);i.emplaceBack(u+y-l,u+v-l,u+b-l),c.primitiveLength++}}(e,i,r,o,n,t),u&&function(t,e,i,r,o,n){const a=[];for(let t=0;thp.MAX_VERTEX_ARRAY_LENGTH&&(c=t.createNewSegment(e,i),l=s.count,m=!0,f=!0,u=0);const _=bo(a,r,n,s,p,m,c),g=bo(a,r,n,s,d,f,c);i.emplaceBack(u+_-l,u+g-l),c.primitiveLength++}}(a,i,s,o,l,t),e.forceNewSegmentOnNextPrepare(),null==a||a.forceNewSegmentOnNextPrepare()}function bo(t,e,i,r,o,n,a){if(n){const n=r.count;return i(e[2*o],e[2*o+1]),t[o]=r.count,r.count++,a.vertexLength++,n}return t[o]}function xo(t,e,i){1===t?e.id=i.readVarint():2===t?function(t,e){const i=t.readVarint()+t.pos;for(;t.pos>3;e=1===i?t.readString():2===i?t.readFloat():3===i?t.readDouble():4===i?t.readVarint64():5===i?t.readVarint():6===i?t.readSVarint():7===i?t.readBoolean():null}if(null==e)throw new Error("unknown feature value");return e}(i))}function Mo(t,e,i){if(3===t){const t=new wd(i,i.readVarint()+i.pos);t.length&&(e[t.name]=t)}}function So(t,e,i,r,o,n,a,s){t.emplaceBack(e,i,2*Math.floor(r*kd)+a,o*kd*2,n*kd*2,Math.round(s))}function Po(t,e){for(let i=0;iyl)||t.y===e.y&&(t.y<0||t.y>yl)}function Io(t){return t.every(t=>t.x<0)||t.every(t=>t.x>yl)||t.every(t=>t.y<0)||t.every(t=>t.y>yl)}function Co(t,e){return t.x*e.x+t.y*e.y}function Eo(t,e){if(1===t.length){let i=0;const r=e[i++];let o;for(;!o||r.equals(o);)if(o=e[i++],!o)return 1/0;for(;i>1;Do(t,e,a,r,o,n),zo(t,e,i,r,a-1,1-n),zo(t,e,i,a+1,o,1-n)}function Do(t,e,i,r,o,n){for(;o>r;){if(o-r>600){const a=o-r+1,s=i-r+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(s-a/2<0?-1:1);Do(t,e,i,Math.max(r,Math.floor(i-s*c/a+u)),Math.min(o,Math.floor(i+(a-s)*c/a+u)),n)}const a=e[2*i+n];let s=r,l=o;for(Oo(t,e,r,i),e[2*o+n]>a&&Oo(t,e,r,o);sa;)l--}e[2*r+n]===a?Oo(t,e,r,l):(l++,Oo(t,e,l,o)),l<=i&&(r=l+1),i<=l&&(o=l-1)}}function Oo(t,e,i,r){Lo(t,i,r),Lo(e,2*i,2*r),Lo(e,2*i+1,2*r+1)}function Lo(t,e,i){const r=t[e];t[e]=t[i],t[i]=r}function Ro(t,e,i,r){const o=t-i,n=e-r;return o*o+n*n}function Fo(t,e,i,r){let o=r;const n=e+(i-e>>1);let a,s=i-e;const l=t[e],c=t[e+1],u=t[i],h=t[i+1];for(let r=e+3;ro)a=r,o=e;else if(e===o){const t=Math.abs(r-n);tr&&(a-e>3&&Fo(t,e,a,r),t[a+2]=o,i-a>3&&Fo(t,a,i,r))}function Bo(t,e,i,r,o,n){let a=o-i,s=n-r;if(0!==a||0!==s){const l=((t-i)*a+(e-r)*s)/(a*a+s*s);l>1?(i=o,r=n):l>0&&(i+=a*l,r+=s*l)}return a=t-i,s=e-r,a*a+s*s}function jo(t,e,i,r){const o={type:e,geom:i},n={id:null==t?null:t,type:o.type,geometry:o.geom,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(o.type){case"Point":case"MultiPoint":No(n,o.geom);break;case"LineString":No(n,o.geom.points);break;case"Polygon":No(n,o.geom[0].points);break;case"MultiLineString":for(const t of o.geom)No(n,t.points);break;case"MultiPolygon":for(const t of o.geom)No(n,t[0].points)}return n}function Vo(t){t.points.length>64&&(t.points=new Float64Array(t.points))}function No(t,e){for(let i=0;i0&&(a+=r?(o*l-s*n)/2:Math.sqrt(Math.pow(s-o,2)+Math.pow(l-n,2))),o=s,n=l}const s=e.points.length-3;e.points[2]=1,i>0&&Fo(e.points,0,s,i),e.points[s+2]=1,Vo(e),e.size=Math.abs(a),e.start=0,e.end=e.size}function $o(t,e,i,r){for(let o=0;o1?1:i}function Ho(t){const e={type:"Feature",geometry:Yo(t),properties:t.tags};return null!=t.id&&(e.id=t.id),e}function Yo(t){const{type:e,geometry:i}=t;switch(e){case"Point":return{type:e,coordinates:Ko(i[0],i[1])};case"MultiPoint":return{type:e,coordinates:Xo(i)};case"LineString":return{type:e,coordinates:Xo(i.points)};case"MultiLineString":case"Polygon":return{type:e,coordinates:i.map(t=>Xo(t.points))};case"MultiPolygon":return{type:e,coordinates:i.map(t=>t.map(t=>Xo(t.points)))}}}function Xo(t){const e=[];for(let i=0;i=(i/=e)&&a=r)return null;const l=[];for(const e of t){const t=o===Ed.X?e.minX:e.minY,n=o===Ed.X?e.maxX:e.maxY;if(t>=i&&n=r))switch(e.type){case"Point":case"MultiPoint":en(e,l,i,r,o);continue;case"LineString":rn(e,l,i,r,o,s);continue;case"MultiLineString":on(e,l,i,r,o);continue;case"Polygon":nn(e,l,i,r,o);continue;case"MultiPolygon":an(e,l,i,r,o);continue}}return l.length?l:null}function en(t,e,i,r,o){const n=[];(function(t,e,i,r,o){for(let n=0;n=i&&a<=r&&un(e,t[n],t[n+1],t[n+2])}})(t.geometry,n,i,r,o),n.length&&e.push(jo(t.id,3===n.length?"Point":"MultiPoint",n,t.tags))}function rn(t,e,i,r,o,n){const a=[];if(sn(t.geometry,a,i,r,o,!1,n.lineMetrics),a.length)if(n.lineMetrics)for(const i of a)e.push(jo(t.id,"LineString",i,t.tags));else e.push(a.length>1?jo(t.id,"MultiLineString",a,t.tags):jo(t.id,"LineString",a[0],t.tags))}function on(t,e,i,r,o){const n=[];cn(t.geometry,n,i,r,o,!1),n.length&&e.push(1!==n.length?jo(t.id,"MultiLineString",n,t.tags):jo(t.id,"LineString",n[0],t.tags))}function nn(t,e,i,r,o){const n=[];cn(t.geometry,n,i,r,o,!0),n.length&&e.push(jo(t.id,"Polygon",n,t.tags))}function an(t,e,i,r,o){const n=[];for(const e of t.geometry){const t=[];cn(e,t,i,r,o,!0),t.length&&n.push(t)}n.length&&e.push(jo(t.id,"MultiPolygon",n,t.tags))}function sn(t,e,i,r,o,n,a){let s=ln(t);const l=o===Ed.X?hn:pn;let c,u,h=t.start;for(let p=0;pi&&(u=l(s,d,m,_,g,i),a&&(s.start=h+c*u)):y>r?v=i&&(u=l(s,d,m,_,g,i),b=!0),v>r&&y<=r&&(u=l(s,d,m,_,g,r),b=!0),!n&&b&&(a&&(s.end=h+c*u),e.push(s),s=ln(t)),a&&(h+=c)}let p=t.points.length-3;const d=t.points[p],m=t.points[p+1],f=o===Ed.X?d:m;f>=i&&f<=r&&un(s.points,d,m,t.points[p+2]),p=s.points.length-3,n&&p>=3&&(s.points[p]!==s.points[0]||s.points[p+1]!==s.points[1])&&un(s.points,s.points[0],s.points[1],s.points[2]),s.points.length&&(Vo(s),e.push(s))}function ln(t){return{points:[],size:t.size,start:t.start,end:t.end}}function cn(t,e,i,r,o,n){for(const a of t)sn(a,e,i,r,o,n,!1)}function un(t,e,i,r){t.push(e,i,r)}function hn(t,e,i,r,o,n){const a=(n-e)/(r-e);return un(t.points,n,i+(o-i)*a,1),a}function pn(t,e,i,r,o,n){const a=(n-i)/(o-i);return un(t.points,e+(r-e)*a,n,1),a}function dn(t,e){const i=e.buffer/e.extent;let r=t;const o=tn(t,1,-1-i,i,Ed.X,-1,2,e),n=tn(t,1,1-i,2+i,Ed.X,-1,2,e);return o||n?(r=tn(t,1,-i,1+i,Ed.X,-1,2,e)||[],o&&(r=mn(o,1).concat(r)),n&&(r=r.concat(mn(n,-1))),r):r}function mn(t,e){const i=[];for(const r of t)switch(r.type){case"Point":case"MultiPoint":{const t=fn(r.geometry,e);i.push(jo(r.id,r.type,t,r.tags));continue}case"LineString":{const t=_n(r.geometry,e);i.push(jo(r.id,r.type,t,r.tags));continue}case"MultiLineString":case"Polygon":{const t=[];for(const i of r.geometry)t.push(_n(i,e));i.push(jo(r.id,r.type,t,r.tags));continue}case"MultiPolygon":{const t=[];for(const i of r.geometry){const r=[];for(const t of i)r.push(_n(t,e));t.push(r)}i.push(jo(r.id,r.type,t,r.tags));continue}}return i}function fn(t,e){const i=[];for(let r=0;r0||e.addOrUpdateProperties?.length>0;if(r){const r=t[0];let n=Uo({type:"FeatureCollection",features:[{type:"Feature",id:r.id,geometry:e.newGeometry,properties:o?yn(r.tags,e):r.tags}]},i);return n=dn(n,i),n}if(o){const i=[];for(const r of t){const t={...r};t.tags=yn(t.tags,e),i.push(t)}return i}return t}function yn(t,e){if(e.removeAllProperties)return{};const i={...t||{}};if(e.removeProperties)for(const t of e.removeProperties)delete i[t];if(e.addOrUpdateProperties)for(const{key:t,value:r}of e.addOrUpdateProperties)i[t]=r;return i}function vn(t,e,i){return{id:t[e+3],type:"Point",tags:xn(t,e,i),geometry:[t[e],t[e+1]]}}function bn(t,e,i){return{type:"Feature",id:t[e+3],properties:xn(t,e,i),geometry:{type:"Point",coordinates:[Jo(t[e]),Qo(t[e+1])]}}}function xn(t,e,i){const r=t[e+5],o=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?Math.round(r/100)/10+"k":r,n=t[e+6],a=-1===n?{}:Object.assign({},i[n]);return Object.assign(a,{cluster:!0,cluster_id:t[e+3],point_count:r,point_count_abbreviated:o})}function wn(t,e,i,r,o){const n=e===o.maxZoom?0:o.tolerance/((1<0&&e.size<(o?a:r))return void(i.numPoints+=e.points.length/3);const s=[];for(let t=0;ta)&&(i.numSimplified++,s.push(e.points[t],e.points[t+1])),i.numPoints++;o&&function(t,e){let i=0;for(let e=0,r=t.length,o=r-2;e0===e)for(let e=0,i=t.length;e0?e+2*t:t}function En(t,e,i){const r=e.layout.get("text-transform").evaluate(i,{});return"uppercase"===r?t=t.toLocaleUpperCase():"lowercase"===r&&(t=t.toLocaleLowerCase()),Vu.applyArabicShaping&&(t=Vu.applyArabicShaping(t)),t}function zn(t,e,i){for(const r of t.sections)r.text=En(r.text,e,i);return t}function Dn(t,e,i,r,o,n){if("fontStack"in e){const r=i[e.fontStack],n=null==r?void 0:r[t];return n?n.metrics.advance*e.scale+o:0}{const t=r[e.imageName];return t?t.displaySize[0]*e.scale*im/n+o:0}}function On(t,e,i,r){const o=Math.pow(t-e,2);return r?t>>0):4294967296*(e>>>0)+(t>>>0)}function jn(t,e,i){const r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));i.realloc(r);for(let e=i.pos-1;e>=t;e--)i.buf[e+r]=i.buf[e]}function Vn(t,e){for(let i=0;ie.h-t.h);const r=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),i),h:1/0}];let o=0,n=0;for(const e of t)for(let t=r.length-1;t>=0;t--){const i=r[t];if(!(e.w>i.w||e.h>i.h)){if(e.x=i.x,e.y=i.y,n=Math.max(n,e.y+e.h),o=Math.max(o,e.x+e.w),e.w===i.w&&e.h===i.h){const e=r.pop();e&&t_.toCodeUnitIndex(t));const t=v(_.toString(),y);for(const e of t){const t=[...e].map(()=>0);g.push(new am(e,_.sections,t))}}else if(b){g=[],y=y.map(t=>_.toCodeUnitIndex(t));let t=0;const e=[];for(const i of _.text)e.push(...Array(i.length).fill(_.sectionIndex[t])),t++;const i=b(_.text,e,y);for(const t of i){const e=[];let i="";for(const r of t[0])e.push(t[1][i.length]),i+=r;g.push(new am(t[0],_.sections,e))}}else g=function(t,e){const i=[];let r=0;for(const o of e)i.push(t.substring(r,o)),r=o;return rc){const t=Math.ceil(n/c);o*=t/a,a=t}return{x1:r,y1:o,x2:r+n,y2:o+a}}function ca(t,e,i,r,o,n){const a=t.image;let s;if(a.content){const t=a.content,e=a.pixelRatio||1;s=[t[0]/e,t[1]/e,a.displaySize[0]-t[2]/e,a.displaySize[1]-t[3]/e]}const l=e.left*n,c=e.right*n;let u,h,p,d;"width"===i||"both"===i?(d=o[0]+l-r[3],h=o[0]+c+r[1]):(d=o[0]+(l+c-a.displaySize[0])/2,h=d+a.displaySize[0]);const m=e.top*n,f=e.bottom*n;return"height"===i||"both"===i?(u=o[1]+m-r[0],p=o[1]+f+r[2]):(u=o[1]+(m+f-a.displaySize[1])/2,p=u+a.displaySize[1]),{image:a,top:u,right:h,bottom:p,left:d,collisionPadding:s}}function ua(t,e){const{expression:i}=e;if("constant"===i.kind)return{kind:"constant",layoutSize:i.evaluate(new Nu(t+1))};if("source"===i.kind)return{kind:"source"};{const{zoomStops:e,interpolationType:r}=i;let o=0;for(;o>>0;return((255&e)<<24|(65280&e)<<8|e>>>8&65280|e>>>24&255)>>>0}function Sa(){const t=new Uint8Array(rf);return{dataToBePacked:new Array(33),dataPointers:new Int32Array(33),byteContainer:t,byteContainerI32:new Int32Array(t.buffer,t.byteOffset,t.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function Pa(t,e,i,r,o){switch(o){case 1:!function(t,e,i,r){let o=r,n=e;for(let e=0;e<8;e++){const e=t[n++]>>>0;i[o++]=e>>>0&1,i[o++]=e>>>1&1,i[o++]=e>>>2&1,i[o++]=e>>>3&1,i[o++]=e>>>4&1,i[o++]=e>>>5&1,i[o++]=e>>>6&1,i[o++]=e>>>7&1,i[o++]=e>>>8&1,i[o++]=e>>>9&1,i[o++]=e>>>10&1,i[o++]=e>>>11&1,i[o++]=e>>>12&1,i[o++]=e>>>13&1,i[o++]=e>>>14&1,i[o++]=e>>>15&1,i[o++]=e>>>16&1,i[o++]=e>>>17&1,i[o++]=e>>>18&1,i[o++]=e>>>19&1,i[o++]=e>>>20&1,i[o++]=e>>>21&1,i[o++]=e>>>22&1,i[o++]=e>>>23&1,i[o++]=e>>>24&1,i[o++]=e>>>25&1,i[o++]=e>>>26&1,i[o++]=e>>>27&1,i[o++]=e>>>28&1,i[o++]=e>>>29&1,i[o++]=e>>>30&1,i[o++]=e>>>31&1}}(t,e,i,r);break;case 2:!function(t,e,i,r){let o=r,n=e;for(let e=0;e<8;e++){const e=t[n++]>>>0,r=t[n++]>>>0;i[o++]=e>>>0&3,i[o++]=e>>>2&3,i[o++]=e>>>4&3,i[o++]=e>>>6&3,i[o++]=e>>>8&3,i[o++]=e>>>10&3,i[o++]=e>>>12&3,i[o++]=e>>>14&3,i[o++]=e>>>16&3,i[o++]=e>>>18&3,i[o++]=e>>>20&3,i[o++]=e>>>22&3,i[o++]=e>>>24&3,i[o++]=e>>>26&3,i[o++]=e>>>28&3,i[o++]=e>>>30&3,i[o++]=r>>>0&3,i[o++]=r>>>2&3,i[o++]=r>>>4&3,i[o++]=r>>>6&3,i[o++]=r>>>8&3,i[o++]=r>>>10&3,i[o++]=r>>>12&3,i[o++]=r>>>14&3,i[o++]=r>>>16&3,i[o++]=r>>>18&3,i[o++]=r>>>20&3,i[o++]=r>>>22&3,i[o++]=r>>>24&3,i[o++]=r>>>26&3,i[o++]=r>>>28&3,i[o++]=r>>>30&3}}(t,e,i,r);break;case 3:!function(t,e,i,r){let o=r,n=e;for(let e=0;e<8;e++){const e=t[n++]>>>0,r=t[n++]>>>0,a=t[n++]>>>0;i[o++]=e>>>0&7,i[o++]=e>>>3&7,i[o++]=e>>>6&7,i[o++]=e>>>9&7,i[o++]=e>>>12&7,i[o++]=e>>>15&7,i[o++]=e>>>18&7,i[o++]=e>>>21&7,i[o++]=e>>>24&7,i[o++]=e>>>27&7,i[o++]=7&(e>>>30|(1&r)<<2),i[o++]=r>>>1&7,i[o++]=r>>>4&7,i[o++]=r>>>7&7,i[o++]=r>>>10&7,i[o++]=r>>>13&7,i[o++]=r>>>16&7,i[o++]=r>>>19&7,i[o++]=r>>>22&7,i[o++]=r>>>25&7,i[o++]=r>>>28&7,i[o++]=7&(r>>>31|(3&a)<<1),i[o++]=a>>>2&7,i[o++]=a>>>5&7,i[o++]=a>>>8&7,i[o++]=a>>>11&7,i[o++]=a>>>14&7,i[o++]=a>>>17&7,i[o++]=a>>>20&7,i[o++]=a>>>23&7,i[o++]=a>>>26&7,i[o++]=a>>>29&7}}(t,e,i,r);break;case 4:!function(t,e,i,r){let o=r,n=e;for(let e=0;e<8;e++){const e=t[n++]>>>0,r=t[n++]>>>0,a=t[n++]>>>0,s=t[n++]>>>0;i[o++]=e>>>0&15,i[o++]=e>>>4&15,i[o++]=e>>>8&15,i[o++]=e>>>12&15,i[o++]=e>>>16&15,i[o++]=e>>>20&15,i[o++]=e>>>24&15,i[o++]=e>>>28&15,i[o++]=r>>>0&15,i[o++]=r>>>4&15,i[o++]=r>>>8&15,i[o++]=r>>>12&15,i[o++]=r>>>16&15,i[o++]=r>>>20&15,i[o++]=r>>>24&15,i[o++]=r>>>28&15,i[o++]=a>>>0&15,i[o++]=a>>>4&15,i[o++]=a>>>8&15,i[o++]=a>>>12&15,i[o++]=a>>>16&15,i[o++]=a>>>20&15,i[o++]=a>>>24&15,i[o++]=a>>>28&15,i[o++]=s>>>0&15,i[o++]=s>>>4&15,i[o++]=s>>>8&15,i[o++]=s>>>12&15,i[o++]=s>>>16&15,i[o++]=s>>>20&15,i[o++]=s>>>24&15,i[o++]=s>>>28&15}}(t,e,i,r);break;case 5:!function(t,e,i,r){let o=r,n=e;for(let e=0;e<8;e++){const e=t[n++]>>>0,r=t[n++]>>>0,a=t[n++]>>>0,s=t[n++]>>>0,l=t[n++]>>>0;i[o++]=e>>>0&31,i[o++]=e>>>5&31,i[o++]=e>>>10&31,i[o++]=e>>>15&31,i[o++]=e>>>20&31,i[o++]=e>>>25&31,i[o++]=31&(e>>>30|(7&r)<<2), i[o++]=r>>>3&31,i[o++]=r>>>8&31,i[o++]=r>>>13&31,i[o++]=r>>>18&31,i[o++]=r>>>23&31,i[o++]=31&(r>>>28|(1&a)<<4),i[o++]=a>>>1&31,i[o++]=a>>>6&31,i[o++]=a>>>11&31,i[o++]=a>>>16&31,i[o++]=a>>>21&31,i[o++]=a>>>26&31,i[o++]=31&(a>>>31|(15&s)<<1),i[o++]=s>>>4&31,i[o++]=s>>>9&31,i[o++]=s>>>14&31,i[o++]=s>>>19&31,i[o++]=s>>>24&31,i[o++]=31&(s>>>29|(3&l)<<3),i[o++]=l>>>2&31,i[o++]=l>>>7&31,i[o++]=l>>>12&31,i[o++]=l>>>17&31,i[o++]=l>>>22&31,i[o++]=l>>>27&31}}(t,e,i,r);break;case 6:!function(t,e,i,r){let o=r,n=e;for(let e=0;e<8;e++){const e=t[n++]>>>0,r=t[n++]>>>0,a=t[n++]>>>0,s=t[n++]>>>0,l=t[n++]>>>0,c=t[n++]>>>0;i[o++]=e>>>0&63,i[o++]=e>>>6&63,i[o++]=e>>>12&63,i[o++]=e>>>18&63,i[o++]=e>>>24&63,i[o++]=63&(e>>>30|(15&r)<<2),i[o++]=r>>>4&63,i[o++]=r>>>10&63,i[o++]=r>>>16&63,i[o++]=r>>>22&63,i[o++]=63&(r>>>28|(3&a)<<4),i[o++]=a>>>2&63,i[o++]=a>>>8&63,i[o++]=a>>>14&63,i[o++]=a>>>20&63,i[o++]=a>>>26&63,i[o++]=s>>>0&63,i[o++]=s>>>6&63,i[o++]=s>>>12&63,i[o++]=s>>>18&63,i[o++]=s>>>24&63,i[o++]=63&(s>>>30|(15&l)<<2),i[o++]=l>>>4&63,i[o++]=l>>>10&63,i[o++]=l>>>16&63,i[o++]=l>>>22&63,i[o++]=63&(l>>>28|(3&c)<<4),i[o++]=c>>>2&63,i[o++]=c>>>8&63,i[o++]=c>>>14&63,i[o++]=c>>>20&63,i[o++]=c>>>26&63}}(t,e,i,r);break;case 7:!function(t,e,i,r){let o=r,n=e;for(let e=0;e<8;e++){const e=t[n++]>>>0,r=t[n++]>>>0,a=t[n++]>>>0,s=t[n++]>>>0,l=t[n++]>>>0,c=t[n++]>>>0,u=t[n++]>>>0;i[o++]=e>>>0&127,i[o++]=e>>>7&127,i[o++]=e>>>14&127,i[o++]=e>>>21&127,i[o++]=127&(e>>>28|(7&r)<<4),i[o++]=r>>>3&127,i[o++]=r>>>10&127,i[o++]=r>>>17&127,i[o++]=r>>>24&127,i[o++]=127&(r>>>31|(63&a)<<1),i[o++]=a>>>6&127,i[o++]=a>>>13&127,i[o++]=a>>>20&127,i[o++]=127&(a>>>27|(3&s)<<5),i[o++]=s>>>2&127,i[o++]=s>>>9&127,i[o++]=s>>>16&127,i[o++]=s>>>23&127,i[o++]=127&(s>>>30|(31&l)<<2),i[o++]=l>>>5&127,i[o++]=l>>>12&127,i[o++]=l>>>19&127,i[o++]=127&(l>>>26|(1&c)<<6),i[o++]=c>>>1&127,i[o++]=c>>>8&127,i[o++]=c>>>15&127,i[o++]=c>>>22&127,i[o++]=127&(c>>>29|(15&u)<<3),i[o++]=u>>>4&127,i[o++]=u>>>11&127,i[o++]=u>>>18&127,i[o++]=u>>>25&127}}(t,e,i,r);break;case 8:!function(t,e,i,r){let o=r,n=e;for(let e=0;e<8;e++){const e=t[n++]>>>0,r=t[n++]>>>0,a=t[n++]>>>0,s=t[n++]>>>0,l=t[n++]>>>0,c=t[n++]>>>0,u=t[n++]>>>0,h=t[n++]>>>0;i[o++]=e>>>0&255,i[o++]=e>>>8&255,i[o++]=e>>>16&255,i[o++]=e>>>24&255,i[o++]=r>>>0&255,i[o++]=r>>>8&255,i[o++]=r>>>16&255,i[o++]=r>>>24&255,i[o++]=a>>>0&255,i[o++]=a>>>8&255,i[o++]=a>>>16&255,i[o++]=a>>>24&255,i[o++]=s>>>0&255,i[o++]=s>>>8&255,i[o++]=s>>>16&255,i[o++]=s>>>24&255,i[o++]=l>>>0&255,i[o++]=l>>>8&255,i[o++]=l>>>16&255,i[o++]=l>>>24&255,i[o++]=c>>>0&255,i[o++]=c>>>8&255,i[o++]=c>>>16&255,i[o++]=c>>>24&255,i[o++]=u>>>0&255,i[o++]=u>>>8&255,i[o++]=u>>>16&255,i[o++]=u>>>24&255,i[o++]=h>>>0&255,i[o++]=h>>>8&255,i[o++]=h>>>16&255,i[o++]=h>>>24&255}}(t,e,i,r);break;case 16:!function(t,e,i,r){let o=r,n=e;for(let e=0;e<128;e++){const e=t[n++]>>>0;i[o++]=65535&e,i[o++]=e>>>16&65535}}(t,e,i,r);break;default:!function(t,e,i,r,o){const n=Qm[o]>>>0;let a=e,s=0,l=t[a]>>>0,c=r;for(let e=0;e<8;e++){for(let e=0;e<32;e++)if(s+o<=32)i[c+e]=l>>>s&n,s+=o,32===s&&(s=0,a++,31!==e&&(l=t[a]>>>0));else{const r=32-s,u=l>>>s;a++,l=t[a]>>>0;const h=o-r;i[c+e]=(u|(l&-1>>>32-h>>>0)<>>0)}}(t,e,i,r,o)}return e+(o<<3)|0}function Aa(t,e,i,r){if(i+2>e)throw new Error(`FastPFOR decode: byteContainer underflow at block=${r} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${i}, byteSize=${e})`);const o=t[i++],n=t[i++];if(o>32)throw new Error(`FastPFOR decode: invalid bitWidth=${o} at block=${r} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:o,exceptionCount:n,bytePosIn:i}}function Ia(t,e,i,r,o,n,a,s,l){const{maxBits:c,exceptionBitWidth:u,bytePosIn:h}=function(t,e,i,r,o,n){if(i+1>e)throw new Error(`FastPFOR decode: exception header underflow at block=${n} (need 1 byte for maxBits, bytePos=${i}, byteSize=${e})`);const a=t[i++];if(a32)throw new Error(`FastPFOR decode: invalid maxBits=${a} at block=${n} (bitWidth=${r}, expected ${r}..32)`);const s=a-r|0;if(s<1||s>32)throw new Error(`FastPFOR decode: invalid exceptionBitWidth=${s} at block=${n} (bitWidth=${r}, maxBits=${a})`);if(i+o>e)throw new Error(`FastPFOR decode: exception positions underflow at block=${n} (need=${o}, have=${e-i})`);return{maxBits:a,exceptionBitWidth:s,bytePosIn:i}}(o,n,a,i,r,l);if(a=h,1===u){const n=1<f)throw new Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${u} (ptr=${m}, need ${r}, size=${f}) at block ${l}`);for(let n=0;nt.length-1)throw new Error(`FastPFOR decode: invalid whereMeta=${s} at pageStart=${a} (expected > 0 and pageStart+whereMeta < encoded.length=${t.length})`);const l=a+1|0,c=a+s|0,u=t[c]>>>0,h=u+3>>>2,p=c+1,d=p+h;if(d>=t.length)throw new Error(`FastPFOR decode: invalid byteSize=${u} (metaInts=${h}, pageStart=${a}, packedEnd=${c}, byteContainerStart=${p}) causes bitmapPos=${d} out of bounds (encoded.length=${t.length})`);const m=function(t,e,i,r){r.byteContainer.length>>2;if(3&o.byteOffset)for(let i=0;i>>8&255,o[n+2|0]=r>>>16&255,o[n+3|0]=r>>>24&255}else{let i=r.byteContainerI32;(!i||i.buffer!==o.buffer||i.byteOffset!==o.byteOffset||i.length>>2)),i.set(t.subarray(e,e+n))}const a=3&i;if(a>0){const i=0|t[e+n|0],r=n<<2;for(let t=0;t>>(t<<3)&255}return o}(t,p,u,n),f=u,_=function(t,e,i){const r=0|t[e++],o=i.dataToBePacked;for(let n=2;n<=32;n=n+1|0){if(!(r>>>n-1&1))continue;if(e>=t.length)throw new Error(`FastPFOR decode: truncated exception stream header (bitWidth=${n}, streamWordIndex=${e}, needWords=1, availableWords=${t.length-e}, encodedWords=${t.length})`);const a=t[e++]>>>0,s=ka(a+31,32),l=a*n+31>>>5;if(e+l>t.length)throw new Error(`FastPFOR decode: truncated exception stream (bitWidth=${n}, size=${a}, streamWordIndex=${e}, needWords=${l}, availableWords=${t.length-e}, encodedWords=${t.length})`);let c=o[n];(!c||c.length>>5)|0,i.exceptionSizes[n]=a}return e}(t,d,n);return n.dataPointers.fill(0),function(t,e,i,r,o,n,a,s,l,c){let u=0|i,h=0;for(let e=0;e0&&(h=Ia(o,p,r,a,s,l,h,c,e))}if(u!==r)throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${e}, packedStart=${i}, consumedPackedEnd=${u}, expectedPackedEnd=${r}, packedWords=${r-i}, encoded.length=${t.length})`)}(t,a,l,c,e,0|r,o/tf|0,m,f,n),_}function Ea(t,e,i,r,o){switch(o){case 2:return void function(t,e,i,r){let o=r;const n=t[e]>>>0,a=t[e+1]>>>0;i[o++]=n>>>0&3,i[o++]=n>>>2&3,i[o++]=n>>>4&3,i[o++]=n>>>6&3,i[o++]=n>>>8&3,i[o++]=n>>>10&3,i[o++]=n>>>12&3,i[o++]=n>>>14&3,i[o++]=n>>>16&3,i[o++]=n>>>18&3,i[o++]=n>>>20&3,i[o++]=n>>>22&3,i[o++]=n>>>24&3,i[o++]=n>>>26&3,i[o++]=n>>>28&3,i[o++]=n>>>30&3,i[o++]=a>>>0&3,i[o++]=a>>>2&3,i[o++]=a>>>4&3,i[o++]=a>>>6&3,i[o++]=a>>>8&3,i[o++]=a>>>10&3,i[o++]=a>>>12&3,i[o++]=a>>>14&3,i[o++]=a>>>16&3,i[o++]=a>>>18&3,i[o++]=a>>>20&3,i[o++]=a>>>22&3,i[o++]=a>>>24&3,i[o++]=a>>>26&3,i[o++]=a>>>28&3,i[o]=a>>>30&3}(t,e,i,r);case 3:return void function(t,e,i,r){let o=r;const n=t[e]>>>0,a=t[e+1]>>>0,s=t[e+2]>>>0;i[o++]=n>>>0&7,i[o++]=n>>>3&7,i[o++]=n>>>6&7,i[o++]=n>>>9&7,i[o++]=n>>>12&7,i[o++]=n>>>15&7,i[o++]=n>>>18&7,i[o++]=n>>>21&7,i[o++]=n>>>24&7,i[o++]=n>>>27&7,i[o++]=7&(n>>>30|(1&a)<<2),i[o++]=a>>>1&7,i[o++]=a>>>4&7,i[o++]=a>>>7&7,i[o++]=a>>>10&7,i[o++]=a>>>13&7,i[o++]=a>>>16&7,i[o++]=a>>>19&7,i[o++]=a>>>22&7,i[o++]=a>>>25&7,i[o++]=a>>>28&7,i[o++]=7&(a>>>31|(3&s)<<1),i[o++]=s>>>2&7,i[o++]=s>>>5&7,i[o++]=s>>>8&7,i[o++]=s>>>11&7,i[o++]=s>>>14&7,i[o++]=s>>>17&7,i[o++]=s>>>20&7,i[o++]=s>>>23&7,i[o++]=s>>>26&7,i[o]=s>>>29&7}(t,e,i,r);case 4:return void function(t,e,i,r){let o=r;const n=t[e]>>>0,a=t[e+1]>>>0,s=t[e+2]>>>0,l=t[e+3]>>>0;i[o++]=n>>>0&15,i[o++]=n>>>4&15,i[o++]=n>>>8&15,i[o++]=n>>>12&15,i[o++]=n>>>16&15,i[o++]=n>>>20&15,i[o++]=n>>>24&15,i[o++]=n>>>28&15,i[o++]=a>>>0&15,i[o++]=a>>>4&15,i[o++]=a>>>8&15,i[o++]=a>>>12&15,i[o++]=a>>>16&15,i[o++]=a>>>20&15,i[o++]=a>>>24&15,i[o++]=a>>>28&15,i[o++]=s>>>0&15,i[o++]=s>>>4&15,i[o++]=s>>>8&15,i[o++]=s>>>12&15,i[o++]=s>>>16&15,i[o++]=s>>>20&15,i[o++]=s>>>24&15,i[o++]=s>>>28&15,i[o++]=l>>>0&15,i[o++]=l>>>4&15,i[o++]=l>>>8&15,i[o++]=l>>>12&15,i[o++]=l>>>16&15,i[o++]=l>>>20&15,i[o++]=l>>>24&15,i[o]=l>>>28&15}(t,e,i,r);case 5:return void function(t,e,i,r){let o=r;const n=t[e]>>>0,a=t[e+1]>>>0,s=t[e+2]>>>0,l=t[e+3]>>>0,c=t[e+4]>>>0;i[o++]=n>>>0&31,i[o++]=n>>>5&31,i[o++]=n>>>10&31,i[o++]=n>>>15&31,i[o++]=n>>>20&31,i[o++]=n>>>25&31,i[o++]=31&(n>>>30|(7&a)<<2),i[o++]=a>>>3&31,i[o++]=a>>>8&31,i[o++]=a>>>13&31,i[o++]=a>>>18&31,i[o++]=a>>>23&31,i[o++]=31&(a>>>28|(1&s)<<4),i[o++]=s>>>1&31,i[o++]=s>>>6&31,i[o++]=s>>>11&31,i[o++]=s>>>16&31,i[o++]=s>>>21&31,i[o++]=s>>>26&31,i[o++]=31&(s>>>31|(15&l)<<1),i[o++]=l>>>4&31,i[o++]=l>>>9&31,i[o++]=l>>>14&31,i[o++]=l>>>19&31,i[o++]=l>>>24&31,i[o++]=31&(l>>>29|(3&c)<<3),i[o++]=c>>>2&31,i[o++]=c>>>7&31,i[o++]=c>>>12&31,i[o++]=c>>>17&31,i[o++]=c>>>22&31,i[o]=c>>>27&31}(t,e,i,r);case 6:return void function(t,e,i,r){let o=r;const n=t[e]>>>0,a=t[e+1]>>>0,s=t[e+2]>>>0,l=t[e+3]>>>0,c=t[e+4]>>>0,u=t[e+5]>>>0;i[o++]=n>>>0&63,i[o++]=n>>>6&63,i[o++]=n>>>12&63,i[o++]=n>>>18&63,i[o++]=n>>>24&63,i[o++]=63&(n>>>30|(15&a)<<2),i[o++]=a>>>4&63,i[o++]=a>>>10&63,i[o++]=a>>>16&63,i[o++]=a>>>22&63,i[o++]=63&(a>>>28|(3&s)<<4),i[o++]=s>>>2&63,i[o++]=s>>>8&63,i[o++]=s>>>14&63,i[o++]=s>>>20&63,i[o++]=s>>>26&63,i[o++]=l>>>0&63,i[o++]=l>>>6&63,i[o++]=l>>>12&63,i[o++]=l>>>18&63,i[o++]=l>>>24&63,i[o++]=63&(l>>>30|(15&c)<<2),i[o++]=c>>>4&63,i[o++]=c>>>10&63,i[o++]=c>>>16&63,i[o++]=c>>>22&63,i[o++]=63&(c>>>28|(3&u)<<4),i[o++]=u>>>2&63,i[o++]=u>>>8&63,i[o++]=u>>>14&63,i[o++]=u>>>20&63,i[o]=u>>>26&63}(t,e,i,r);case 7:return void function(t,e,i,r){let o=r;const n=t[e]>>>0,a=t[e+1]>>>0,s=t[e+2]>>>0,l=t[e+3]>>>0,c=t[e+4]>>>0,u=t[e+5]>>>0,h=t[e+6]>>>0;i[o++]=n>>>0&127,i[o++]=n>>>7&127,i[o++]=n>>>14&127,i[o++]=n>>>21&127,i[o++]=127&(n>>>28|(7&a)<<4),i[o++]=a>>>3&127,i[o++]=a>>>10&127,i[o++]=a>>>17&127,i[o++]=a>>>24&127,i[o++]=127&(a>>>31|(63&s)<<1),i[o++]=s>>>6&127,i[o++]=s>>>13&127,i[o++]=s>>>20&127,i[o++]=127&(s>>>27|(3&l)<<5),i[o++]=l>>>2&127,i[o++]=l>>>9&127,i[o++]=l>>>16&127,i[o++]=l>>>23&127,i[o++]=127&(l>>>30|(31&c)<<2),i[o++]=c>>>5&127,i[o++]=c>>>12&127,i[o++]=c>>>19&127,i[o++]=127&(c>>>26|(1&u)<<6),i[o++]=u>>>1&127,i[o++]=u>>>8&127,i[o++]=u>>>15&127,i[o++]=u>>>22&127,i[o++]=127&(u>>>29|(15&h)<<3),i[o++]=h>>>4&127,i[o++]=h>>>11&127,i[o++]=h>>>18&127,i[o]=h>>>25&127}(t,e,i,r);case 8:return void function(t,e,i,r){let o=r;const n=t[e]>>>0,a=t[e+1]>>>0,s=t[e+2]>>>0,l=t[e+3]>>>0,c=t[e+4]>>>0,u=t[e+5]>>>0,h=t[e+6]>>>0,p=t[e+7]>>>0;i[o++]=n>>>0&255,i[o++]=n>>>8&255,i[o++]=n>>>16&255,i[o++]=n>>>24&255,i[o++]=a>>>0&255,i[o++]=a>>>8&255,i[o++]=a>>>16&255,i[o++]=a>>>24&255,i[o++]=s>>>0&255,i[o++]=s>>>8&255,i[o++]=s>>>16&255,i[o++]=s>>>24&255,i[o++]=l>>>0&255,i[o++]=l>>>8&255,i[o++]=l>>>16&255,i[o++]=l>>>24&255,i[o++]=c>>>0&255,i[o++]=c>>>8&255,i[o++]=c>>>16&255,i[o++]=c>>>24&255,i[o++]=u>>>0&255,i[o++]=u>>>8&255,i[o++]=u>>>16&255,i[o++]=u>>>24&255,i[o++]=h>>>0&255,i[o++]=h>>>8&255,i[o++]=h>>>16&255,i[o++]=h>>>24&255,i[o++]=p>>>0&255,i[o++]=p>>>8&255,i[o++]=p>>>16&255,i[o]=p>>>24&255}(t,e,i,r);case 9:return void function(t,e,i,r){let o=r;const n=t[e]>>>0,a=t[e+1]>>>0,s=t[e+2]>>>0,l=t[e+3]>>>0,c=t[e+4]>>>0,u=t[e+5]>>>0,h=t[e+6]>>>0,p=t[e+7]>>>0,d=t[e+8]>>>0;i[o++]=n>>>0&511,i[o++]=n>>>9&511,i[o++]=n>>>18&511,i[o++]=511&(n>>>27|(15&a)<<5),i[o++]=a>>>4&511,i[o++]=a>>>13&511,i[o++]=a>>>22&511,i[o++]=511&(a>>>31|(255&s)<<1),i[o++]=s>>>8&511,i[o++]=s>>>17&511,i[o++]=511&(s>>>26|(7&l)<<6),i[o++]=l>>>3&511,i[o++]=l>>>12&511,i[o++]=l>>>21&511,i[o++]=511&(l>>>30|(127&c)<<2),i[o++]=c>>>7&511,i[o++]=c>>>16&511,i[o++]=511&(c>>>25|(3&u)<<7),i[o++]=u>>>2&511,i[o++]=u>>>11&511,i[o++]=u>>>20&511,i[o++]=511&(u>>>29|(63&h)<<3),i[o++]=h>>>6&511,i[o++]=h>>>15&511,i[o++]=511&(h>>>24|(1&p)<<8),i[o++]=p>>>1&511,i[o++]=p>>>10&511,i[o++]=p>>>19&511,i[o++]=511&(p>>>28|(31&d)<<4),i[o++]=d>>>5&511,i[o++]=d>>>14&511,i[o]=d>>>23&511}(t,e,i,r);case 10:return void function(t,e,i,r){let o=r;const n=t[e]>>>0,a=t[e+1]>>>0,s=t[e+2]>>>0,l=t[e+3]>>>0,c=t[e+4]>>>0,u=t[e+5]>>>0,h=t[e+6]>>>0,p=t[e+7]>>>0,d=t[e+8]>>>0,m=t[e+9]>>>0;i[o++]=n>>>0&1023,i[o++]=n>>>10&1023,i[o++]=n>>>20&1023,i[o++]=1023&(n>>>30|(255&a)<<2),i[o++]=a>>>8&1023,i[o++]=a>>>18&1023,i[o++]=1023&(a>>>28|(63&s)<<4),i[o++]=s>>>6&1023,i[o++]=s>>>16&1023,i[o++]=1023&(s>>>26|(15&l)<<6),i[o++]=l>>>4&1023,i[o++]=l>>>14&1023,i[o++]=1023&(l>>>24|(3&c)<<8),i[o++]=c>>>2&1023,i[o++]=c>>>12&1023,i[o++]=c>>>22&1023,i[o++]=u>>>0&1023,i[o++]=u>>>10&1023,i[o++]=u>>>20&1023,i[o++]=1023&(u>>>30|(255&h)<<2),i[o++]=h>>>8&1023,i[o++]=h>>>18&1023,i[o++]=1023&(h>>>28|(63&p)<<4),i[o++]=p>>>6&1023,i[o++]=p>>>16&1023,i[o++]=1023&(p>>>26|(15&d)<<6),i[o++]=d>>>4&1023,i[o++]=d>>>14&1023,i[o++]=1023&(d>>>24|(3&m)<<8),i[o++]=m>>>2&1023,i[o++]=m>>>12&1023,i[o]=m>>>22&1023}(t,e,i,r);case 11:return void function(t,e,i,r){let o=r;const n=t[e]>>>0,a=t[e+1]>>>0,s=t[e+2]>>>0,l=t[e+3]>>>0,c=t[e+4]>>>0,u=t[e+5]>>>0,h=t[e+6]>>>0,p=t[e+7]>>>0,d=t[e+8]>>>0,m=t[e+9]>>>0,f=t[e+10]>>>0;i[o++]=n>>>0&2047,i[o++]=n>>>11&2047,i[o++]=2047&(n>>>22|(1&a)<<10),i[o++]=a>>>1&2047,i[o++]=a>>>12&2047,i[o++]=2047&(a>>>23|(3&s)<<9),i[o++]=s>>>2&2047,i[o++]=s>>>13&2047,i[o++]=2047&(s>>>24|(7&l)<<8),i[o++]=l>>>3&2047,i[o++]=l>>>14&2047,i[o++]=2047&(l>>>25|(15&c)<<7),i[o++]=c>>>4&2047,i[o++]=c>>>15&2047,i[o++]=2047&(c>>>26|(31&u)<<6),i[o++]=u>>>5&2047,i[o++]=u>>>16&2047,i[o++]=2047&(u>>>27|(63&h)<<5),i[o++]=h>>>6&2047,i[o++]=h>>>17&2047,i[o++]=2047&(h>>>28|(127&p)<<4),i[o++]=p>>>7&2047,i[o++]=p>>>18&2047,i[o++]=2047&(p>>>29|(255&d)<<3),i[o++]=d>>>8&2047,i[o++]=d>>>19&2047,i[o++]=2047&(d>>>30|(511&m)<<2),i[o++]=m>>>9&2047,i[o++]=m>>>20&2047,i[o++]=2047&(m>>>31|(1023&f)<<1),i[o++]=f>>>10&2047,i[o]=f>>>21&2047}(t,e,i,r);case 12:return void function(t,e,i,r){let o=r;const n=t[e]>>>0,a=t[e+1]>>>0,s=t[e+2]>>>0,l=t[e+3]>>>0,c=t[e+4]>>>0,u=t[e+5]>>>0,h=t[e+6]>>>0,p=t[e+7]>>>0,d=t[e+8]>>>0,m=t[e+9]>>>0,f=t[e+10]>>>0,_=t[e+11]>>>0;i[o++]=n>>>0&4095,i[o++]=n>>>12&4095,i[o++]=4095&(n>>>24|(15&a)<<8),i[o++]=a>>>4&4095,i[o++]=a>>>16&4095,i[o++]=4095&(a>>>28|(255&s)<<4),i[o++]=s>>>8&4095,i[o++]=s>>>20&4095,i[o++]=l>>>0&4095,i[o++]=l>>>12&4095,i[o++]=4095&(l>>>24|(15&c)<<8),i[o++]=c>>>4&4095,i[o++]=c>>>16&4095,i[o++]=4095&(c>>>28|(255&u)<<4),i[o++]=u>>>8&4095,i[o++]=u>>>20&4095,i[o++]=h>>>0&4095,i[o++]=h>>>12&4095,i[o++]=4095&(h>>>24|(15&p)<<8),i[o++]=p>>>4&4095,i[o++]=p>>>16&4095,i[o++]=4095&(p>>>28|(255&d)<<4),i[o++]=d>>>8&4095,i[o++]=d>>>20&4095,i[o++]=m>>>0&4095,i[o++]=m>>>12&4095,i[o++]=4095&(m>>>24|(15&f)<<8),i[o++]=f>>>4&4095,i[o++]=f>>>16&4095,i[o++]=4095&(f>>>28|(255&_)<<4),i[o++]=_>>>8&4095,i[o]=_>>>20&4095}(t,e,i,r);case 16:return void function(t,e,i,r){let o=r;const n=t[e]>>>0,a=t[e+1]>>>0,s=t[e+2]>>>0,l=t[e+3]>>>0,c=t[e+4]>>>0,u=t[e+5]>>>0,h=t[e+6]>>>0,p=t[e+7]>>>0,d=t[e+8]>>>0,m=t[e+9]>>>0,f=t[e+10]>>>0,_=t[e+11]>>>0,g=t[e+12]>>>0,y=t[e+13]>>>0,v=t[e+14]>>>0,b=t[e+15]>>>0;i[o++]=n>>>0&65535,i[o++]=n>>>16&65535,i[o++]=a>>>0&65535,i[o++]=a>>>16&65535,i[o++]=s>>>0&65535,i[o++]=s>>>16&65535,i[o++]=l>>>0&65535,i[o++]=l>>>16&65535,i[o++]=c>>>0&65535,i[o++]=c>>>16&65535,i[o++]=u>>>0&65535,i[o++]=u>>>16&65535,i[o++]=h>>>0&65535,i[o++]=h>>>16&65535,i[o++]=p>>>0&65535,i[o++]=p>>>16&65535,i[o++]=d>>>0&65535,i[o++]=d>>>16&65535,i[o++]=m>>>0&65535,i[o++]=m>>>16&65535,i[o++]=f>>>0&65535,i[o++]=f>>>16&65535,i[o++]=_>>>0&65535,i[o++]=_>>>16&65535,i[o++]=g>>>0&65535,i[o++]=g>>>16&65535,i[o++]=y>>>0&65535,i[o++]=y>>>16&65535,i[o++]=v>>>0&65535,i[o++]=v>>>16&65535,i[o++]=b>>>0&65535,i[o]=b>>>16&65535}(t,e,i,r);case 32:for(let o=0;o<32;o=o+1|0)i[r+o|0]=0|t[e+o|0];return}const n=Qm[o]>>>0;let a=e,s=0,l=t[a]>>>0;for(let e=0;e<32;e++)if(s+o<=32)i[r+e]=l>>>s&n,s+=o,32===s&&(s=0,a++,31!==e&&(l=t[a]>>>0));else{const c=32-s,u=l>>>s;a++,l=t[a]>>>0,i[r+e]=(u|(l&Qm[o-c]>>>0)<=64)throw new Error("Varint too long")}return e.set(o),i}function La(t,e){let i,r;return r=t[e.get()],e.increment(),i=127&r,r<128?i:(r=t[e.get()],e.increment(),i|=(127&r)<<7,r<128?i:(r=t[e.get()],e.increment(),i|=(127&r)<<14,r<128?i:(r=t[e.get()],e.increment(),i|=(127&r)<<21,r<128?i:(r=t[e.get()],i|=(15&r)<<28,function(t,e,i){let r,o;if(o=e[i.get()],i.increment(),r=(112&o)>>4,o<128)return 4294967296*r+(t>>>0);if(o=e[i.get()],i.increment(),r|=(127&o)<<3,o<128)return 4294967296*r+(t>>>0);if(o=e[i.get()],i.increment(),r|=(127&o)<<10,o<128)return 4294967296*r+(t>>>0);if(o=e[i.get()],i.increment(),r|=(127&o)<<17,o<128)return 4294967296*r+(t>>>0);if(o=e[i.get()],i.increment(),r|=(127&o)<<24,o<128)return 4294967296*r+(t>>>0);if(o=e[i.get()],i.increment(),r|=(1&o)<<31,o<128)return 4294967296*r+(t>>>0);throw new Error("Expected varint not more than 10 bytes")}(i,t,e)))))}function Ra(t){return t>>>1^-(1&t)}function Fa(t){return t>>1n^-(1n&t)}function Ba(t){return t%2==1?(t+1)/-2:t/2}function ja(t,e,i){if(void 0===i){i=0;for(let r=0;r=4)for(;r=4)for(;r=4)for(let r=t[0];i>4];let o=null;switch(r){case of.DATA:o={dictionaryType:Object.values(nf)[15&i]};break;case of.OFFSET:o={offsetType:Object.values(af)[15&i]};break;case of.LENGTH:o={lengthType:Object.values(sf)[15&i]}}e.increment();const n=t[e.get()],a=Object.values(Xm)[n>>5],s=Object.values(Xm)[n>>2&7],l=Object.values(Km)[3&n];e.increment();const c=za(t,e,2),u=c[0];return{physicalStreamType:r,logicalStreamType:o,logicalLevelTechnique1:a,logicalLevelTechnique2:s,physicalLevelTechnique:l,numValues:u,byteLength:c[1],decompressedCount:u}}(t,e);return i.logicalLevelTechnique1===Xm.MORTON?function(t,e,i){const r=za(e,i,2);return{physicalStreamType:t.physicalStreamType,logicalStreamType:t.logicalStreamType,logicalLevelTechnique1:t.logicalLevelTechnique1,logicalLevelTechnique2:t.logicalLevelTechnique2,physicalLevelTechnique:t.physicalLevelTechnique,numValues:t.numValues,byteLength:t.byteLength,decompressedCount:t.decompressedCount,numBits:r[0],coordinateShift:r[1]}}(i,t,e):Xm.RLE!==i.logicalLevelTechnique1&&Xm.RLE!==i.logicalLevelTechnique2||Km.NONE===i.physicalLevelTechnique?i:function(t,e,i){const r=za(e,i,2);return{physicalStreamType:t.physicalStreamType,logicalStreamType:t.logicalStreamType,logicalLevelTechnique1:t.logicalLevelTechnique1,logicalLevelTechnique2:t.logicalLevelTechnique2,physicalLevelTechnique:t.physicalLevelTechnique,numValues:t.numValues,byteLength:t.byteLength,decompressedCount:r[1],runs:r[0],numRleValues:r[1]}}(i,t,e)}function qa(t,e,i){if(!e)return t;const r=e.size(),o=new(0,t.constructor)(r);let n=0;for(let a=0;a=4)for(;r>>0;for(let i=1;i>>0;return e}(e.logicalLevelTechnique2===Xm.RLE?ja(t,e.runs,e.numRleValues):t);break;case Xm.RLE:o=ja(t,e.runs,e.numRleValues);break;case Xm.MORTON:Za(t),o=t;break;case Xm.COMPONENTWISE_DELTA:o=function(t){if(t.length<2)return new Uint32Array(t);const e=new Uint32Array(t.length);e[0]=Ra(t[0])>>>0,e[1]=Ra(t[1])>>>0;for(let i=2;i>>0,e[i+1]=e[i-1]+Ra(t[i+1])>>>0;return e}(t);break;case Xm.NONE:o=t;break;default:throw new Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return r?qa(o,r,0):o}(Xa(t,e,i),i,0,o)}function Ya(t,e,i){return function(t,e){if(e.logicalLevelTechnique1===Xm.DELTA&&e.logicalLevelTechnique2===Xm.NONE)return function(t){const e=new Int32Array(t.length+1);e[0]=0,e[1]=Ra(t[0]);let i=e[1];for(let r=2;r!==e.length;++r)i+=Ra(t[r-1]),e[r]=e[r-1]+i;return new Uint32Array(e)}(t);if(e.logicalLevelTechnique1===Xm.RLE&&e.logicalLevelTechnique2===Xm.NONE)return function(t,e,i){const r=new Uint32Array(i+1);r[0]=0;let o=1,n=r[0];for(let i=0;i>>2,s=function(t,e){if(e<=t.encodedWords.length)return t.encodedWords;const i=new Uint32Array(Math.max(16,2*e));return t.encodedWords=i,i}(o,a);!function(t,e,i,r){if(e<0||i<0||e+i>t.length)throw new RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${e}, byteLength=${i}, bytes.length=${t.length})`);const o=Math.floor(i/4),n=i%4!=0,a=n?o+1:o;if(r.length0){const i=t.byteOffset+e;if(3&i)for(let i=0;i0){const e=0|t[r];if(r=r+1|0,255&e)throw new Error(`FastPFOR decode: invalid alignedLength=${e} (expected multiple of 256)`);if(o+e>n.length)throw new Error(`FastPFOR decode: output buffer too small (outPos=${o}, alignedLength=${e}, out.length=${n.length})`);r=function(t,e,i,r,o,n){const a=r+ka(o,tf);let s=r,l=i;for(;s!==a;){const i=Math.min(ef,a-s);l=Ca(t,e,l,s,i,n),s=s+i|0}return l}(t,n,r,o,e,a),o=o+e|0}return function(t,e,i,r,o,n){if(0===n)return e;let a=0,s=e;const l=e+i,c=o;let u=o;const h=o+n;let p=0,d=0;for(;s>>a&255;if(a+=8,s+=a>>>5,a&=31,p|=(127&e)<28)throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${d}, partial=${p}, decoded=${u-c}/${n}, inPos=${s}, inEnd=${l})`)}if(u!==h)throw new Error(`FastPFOR VByte: truncated stream (decoded=${u-c}, expected=${n}, consumedWords=${s-e}/${i}, vbyteStart=${e}, vbyteEnd=${l})`)}(t,r,t.length-r|0,n,o,e-o|0),n}(s.subarray(0,a),e,o.decoderWorkspace);return r.add(i),l}(t,e,i,r,function(t=16){if(t<0)throw new RangeError(`initialEncodedWordCapacity must be >= 0, got ${t}`);const e=Math.max(16,0|t);return{encodedWords:new Uint32Array(e),decoderWorkspace:Sa()}}(i>>>2))}(t,i.numValues,i.byteLength,e);case Km.VARINT:return za(t,e,i.numValues);case Km.NONE:{const r=e.get();e.add(i.byteLength);const o=t.subarray(r,e.get());return new Uint32Array(o)}default:throw new Error(`Specified physicalLevelTechnique ${r} is not supported (yet).`)}}function Ka(t,e,i){const r=Xa(t,e,i);return 1===r.length?r[0]:function(t){return t[1]}(r)}function Ja(t,e,i){return function(t){if(2===t.length){const e=Ra(t[1]);return[e,e]}return[Ra(t[2]),Ra(t[3])]}(Xa(t,e,i))}function Qa(t,e,i){return function(t){if(2===t.length){const e=Fa(t[1]);return[e,e]}return[Fa(t[2]),Fa(t[3])]}(Da(t,e,i.numValues))}function ts(t,e,i,r){return function(t,e,i){let r;switch(e.logicalLevelTechnique1){case Xm.DELTA:r=function(t){const e=new BigUint64Array(t.length);e[0]=BigInt.asUintN(64,Fa(t[0]));for(let i=1;i>1,e)-i}}function os(t,e){let i=0;for(let r=0;r>r;return i}function ns(t,e,r,o,n,a,s){return t===hf.MORTON?function(t,e,r,o,n,a){const s=new Array(n?o+1:o);for(let n=0;ni?e[n++]:1);return r}function hs(t,e,i,r){const o=new Uint32Array(e[e.length-1]+1);let n=0;o[0]=n;let a=1,s=0;for(let l=0;l=a);){const i=t[r.increment()];if(i<=127){const a=i+3,s=t[r.increment()],l=Math.min(n+a,e);o.fill(s,n,l),n=l}else{ const a=256-i;for(let i=0;i=12?kf.decode(t.subarray(e,i)):function(t,e,i){let r="",o=e;for(;o239?4:e>223?3:e>191?2:1;if(o+c>i)break;1===c?e<128&&(l=e):2===c?(n=t[o+1],128==(192&n)&&(l=(31&e)<<6|63&n,l<=127&&(l=null))):3===c?(n=t[o+1],a=t[o+2],128==(192&n)&&128==(192&a)&&(l=(15&e)<<12|(63&n)<<6|63&a,(l<=2047||l>=55296&&l<=57343)&&(l=null))):4===c&&(n=t[o+1],a=t[o+2],s=t[o+3],128==(192&n)&&128==(192&a)&&128==(192&s)&&(l=(15&e)<<18|(63&n)<<12|(63&a)<<6|63&s,(l<=65535||l>=1114112)&&(l=null))),null===l?(l=65533,c=1):l>65535&&(l-=65536,r+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),r+=String.fromCharCode(l),o+=c}return r}(t,e,i)}function ms(t,e,i,r,o){return"scalarType"===i.type?function(t,e,i,r,o,n){let a=null;if(0===t)return null;if(n.nullable){const t=$a(e,i),r=t.numValues,o=i.get(),n=ps(e,r,t.byteLength,i);i.set(o+t.byteLength),a=new pf(n,t.numValues)}const s=a??r;switch(o.physicalType){case 4:case 3:return function(t,e,i,r,o){const n=$a(t,e),a=is(n,o,t,e),s=3===r.physicalType;if(a===lf.FLAT){const r=fs(o)?o:void 0,a=s?Wa(t,e,n,0,r):Ha(t,e,n,0,r);return new Gm(i.name,a,o)}if(a===lf.SEQUENCE){const r=Ja(t,e,n);return new qm(i.name,r[0],r[1],n.numRleValues)}const l=s?function(t,e,i){const r=Xa(t,e,i);return 1===r.length?Ra(r[0]):function(t){return Ra(t[1])}(r)}(t,e,n):Ka(t,e,n);return new Wm(i.name,l,o,s)}(e,i,n,o,s);case 9:return function(t,e,i,r,o){let n=null,a=null,s=null,l=null,c=null,u=o??null,h=null,p=null;for(let t=0;t=10}function ys(t){return 30===t}function vs(t){if("scalarType"===t.type){const e=t.scalarType;if("physicalType"===e.type)switch(e.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if("logicalType"===e.type)return!1}else if("complexType"===t.type){const e=t.complexType;if("physicalType"===e.type)switch(e.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",t),!1}function bs(t){return"complexType"===t.type&&"physicalType"===t.complexType?.type&&0===t.complexType.physicalType}function xs(t,e){const i=za(t,e,1)[0];if(0===i)return"";const r=e.get(),o=t.subarray(r,r+i);return e.add(i),If.decode(o)}function ws(t,e){const i=za(t,e,1)[0]>>>0;if(i<10||i>30)throw new Error(`Unsupported field type code ${i}. Supported: 10-29(scalars), 30(STRUCT)`);const r=_s(i);if(gs(i)&&(r.name=xs(t,e)),ys(i)){const i=za(t,e,1)[0]>>>0;r.complexType.children=new Array(i);for(let o=0;o>>0,r=_s(i);if(!r)throw new Error(`Unsupported column type code ${i}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(gs(i)?r.name=xs(t,e):i>=0&&i<=3?r.name="id":4===i&&(r.name="geometry"),ys(i)){const i=za(t,e,1)[0]>>>0,o=r.complexType;o.children=new Array(i);for(let r=0;r>>0,n=za(t,e,1)[0]>>>0;r.columns=new Array(n);for(let i=0;i=4)for(;i>31}function Es(t,e){const i=t.loadGeometry(),r=t.type;let o=0,n=0;for(const a of i){let i=1;1===r&&(i=a.length),e.writeVarint(Is(1,i));const s=3===r?a.length-1:a.length;for(let t=0;t{const a=e instanceof Xu?e.get(n):null;return(null==a?void 0:a.evaluate)?a.evaluate(i,r,o):a})}function Os(t,e){return e-t}function Ls(t,e,r,o,n){const a=[];for(const s of t){let t;for(let l=0;l=o&&u.x>=o||(c.x>=o?c=new i(o,c.y+(o-c.x)/(u.x-c.x)*(u.y-c.y))._round():u.x>=o&&(u=new i(o,c.y+(o-c.x)/(u.x-c.x)*(u.y-c.y))._round()),c.y>=n&&u.y>=n||(c.y>=n?c=new i(c.x+(n-c.y)/(u.y-c.y)*(u.x-c.x),n)._round():u.y>=n&&(u=new i(c.x+(n-c.y)/(u.y-c.y)*(u.x-c.x),n)._round()),t&&c.equals(t[t.length-1])||(t=[c],a.push(t)),t.push(u)))))}}return a}function Rs(t,e,i,r,o){switch(e){case 1:return function(t,e,i,r){const o=[];for(const n of t)for(const t of n){const n=0===r?t.x:t.y;n>=e&&n<=i&&o.push([t])}return o}(t,i,r,o);case 2:return Bs(t,i,r,o,!1);case 3:return Bs(t,i,r,o,!0)}return[]}function Fs(t,e,r,o,n){const a=0===o?js:Vs;let s=[];const l=[];for(let i=0;ie&&s.push(a(c,u,e)):h>r?p=e&&(s.push(a(c,u,e)),d=!0),p>r&&h<=r&&(s.push(a(c,u,r)),d=!0),!n&&d&&(l.push(s),s=[])}const c=t.length-1,u=0===o?t[c].x:t[c].y;return u>=e&&u<=r&&s.push(t[c]),n&&s.length>0&&!s[0].equals(s[s.length-1])&&s.push(new i(s[0].x,s[0].y)),s.length>0&&l.push(s),l}function Bs(t,e,i,r,o){const n=[];for(const a of t){const t=Fs(a,e,i,r,o);t.length>0&&n.push(...t)}return n}function js(t,e,r){return new i(r,t.y+(r-t.x)/(e.x-t.x)*(e.y-t.y))}function Vs(t,e,r){return new i(t.x+(r-t.y)/(e.y-t.y)*(e.x-t.x),r)}function Ns(t,e,i,r,o){if(void 0===e.segment||0===i)return!0;let n=e,a=e.segment+1,s=0;for(;s>-i/2;){if(a--,a<0)return!1;s-=t[a].dist(n),n=t[a]}s+=t[a].dist(t[a+1]),a++;const l=[];let c=0;for(;sr;)c-=l.shift().angleDelta;if(c>o)return!1;a++,s+=e.dist(i)}return!0}function Us(t){let e=0;for(let i=0;ic){const u=(c-l)/n,h=Xc.number(r.x,o.x,u),p=Xc.number(r.y,o.y,u),d=new Rf(h,p,o.angleTo(r),i);return d._round(),!a||Ns(t,d,s,a,e)?d:void 0}l+=n}}function qs(t,e,i,r,o,n,a,s,l){const c=Gs(r,n,a),u=Zs(r,o),h=u*a,p=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-h=0&&g=0&&y=0&&p+c<=u){const i=new Rf(g,y,f,e);i._round(),r&&!Ns(t,i,n,r,o)||d.push(i)}}h+=m}return s||d.length||a||(d=Ws(t,h/2,i,r,o,n,a,!0,l)),d}function Hs(t,e,r,o){const n=[],a=t.image,s=a.pixelRatio,l=a.paddedRect.w-2,c=a.paddedRect.h-2;let u={x1:t.left,y1:t.top,x2:t.right,y2:t.bottom};const h=a.stretchX||[[0,l]],p=a.stretchY||[[0,c]],d=(t,e)=>t+e[1]-e[0],m=h.reduce(d,0),f=p.reduce(d,0),_=l-m,g=c-f;let y=0,v=m,b=0,x=f,w=0,T=_,k=0,M=g;if(a.content&&o){const e=a.content,i=e[2]-e[0],r=e[3]-e[1];(a.textFitWidth||a.textFitHeight)&&(u=la(t)),y=Ys(h,0,e[0]),b=Ys(p,0,e[1]),v=Ys(h,e[0],e[2]),x=Ys(p,e[1],e[3]),w=e[0]-y,k=e[1]-b,T=i-v,M=r-x}const S=u.x1,P=u.y1,A=u.x2-S,I=u.y2-P,C=(t,o,n,l)=>{const c=Ks(t.stretch-y,v,A,S),u=Js(t.fixed-w,T,t.stretch,m),h=Ks(o.stretch-b,x,I,P),p=Js(o.fixed-k,M,o.stretch,f),d=Ks(n.stretch-y,v,A,S),_=Js(n.fixed-w,T,n.stretch,m),g=Ks(l.stretch-b,x,I,P),C=Js(l.fixed-k,M,l.stretch,f),E=new i(c,h),z=new i(d,h),D=new i(d,g),O=new i(c,g),L=new i(u/s,p/s),R=new i(_/s,C/s),F=e*Math.PI/180;if(F){const t=Math.sin(F),e=Math.cos(F),i=[e,-t,t,e];E._matMult(i),z._matMult(i),O._matMult(i),D._matMult(i)}const B=t.stretch+t.fixed,j=o.stretch+o.fixed;return{tl:E,tr:z,bl:O,br:D,tex:{x:a.paddedRect.x+1+B,y:a.paddedRect.y+1+j,w:n.stretch+n.fixed-B,h:l.stretch+l.fixed-j},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:L,pixelOffsetBR:R,minFontScaleX:T/s/A,minFontScaleY:M/s/I,isSDF:r}};if(o&&(a.stretchX||a.stretchY)){const t=Xs(h,_,m),e=Xs(p,g,f);for(let i=0;ip.d||!p.d)&&(p=i),i.max-p.d<=e||(n=i.h/2,a.push(new jf(i.p.x-n,i.p.y-n,n,t)),a.push(new jf(i.p.x+n,i.p.y-n,n,t)),a.push(new jf(i.p.x-n,i.p.y+n,n,t)),a.push(new jf(i.p.x+n,i.p.y+n,n,t)))}return h.d>0&&p.d-h.d<=e?h.p:p.p}function tl(t,e){return e.max-t.max}function el(t,e){return e[1]!==Nf?function(t,e,i){let r=0,o=0;switch(e=Math.abs(e),i=Math.abs(i),t){case"top-right":case"top-left":case"top":o=i-7;break;case"bottom-right":case"bottom-left":case"bottom":o=7-i}switch(t){case"top-right":case"bottom-right":case"right":r=-e;break;case"top-left":case"bottom-left":case"left":r=e}return[r,o]}(t,e[0],e[1]):function(t,e){let i=0,r=0;e<0&&(e=0);const o=e/Math.SQRT2;switch(t){case"top-right":case"top-left":r=o-7;break;case"bottom-right":case"bottom-left":r=7-o;break;case"bottom":r=7-e;break;case"top":r=e-7}switch(t){case"top-right":case"bottom-right":i=-o;break;case"top-left":case"bottom-left":i=o;break;case"left":i=e;break;case"right":i=-e}return[i,r]}(t,e[0])}function il(t,e,i){var r;const o=t.layout,n=null===(r=o.get("text-variable-anchor-offset"))||void 0===r?void 0:r.evaluate(e,{},i);if(n){const t=n.values,e=[];for(let i=0;it*im);r.startsWith("top")?o[1]-=7:r.startsWith("bottom")&&(o[1]+=7),e[i+1]=o}return new Mc(e)}const a=o.get("text-variable-anchor");if(a){let r;r=void 0!==t._unevaluatedLayout.getValue("text-radial-offset")?[o.get("text-radial-offset").evaluate(e,{},i)*im,Nf]:o.get("text-offset").evaluate(e,{},i).map(t=>t*im);const n=[];for(const t of a)n.push(t,el(t,r));return new Mc(n)}return null}function rl(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function ol(e,i,r,o,n,a,s,l,c,u,h,p){let d=a.textMaxSize.evaluate(i,{});void 0===d&&(d=s);const m=e.layers[0].layout,f=m.get("icon-offset").evaluate(i,{},h),_=al(r.horizontal),g=s/24,y=e.tilePixelRatio*g,v=e.tilePixelRatio*d/24,b=e.tilePixelRatio*l,x=e.tilePixelRatio*m.get("symbol-spacing"),w=m.get("text-padding")*e.tilePixelRatio,T=function(t,e,i,r=1){const o=t.get("icon-padding").evaluate(e,{},i),n=null==o?void 0:o.values;return[n[0]*r,n[1]*r,n[2]*r,n[3]*r]}(m,i,h,e.tilePixelRatio),k=m.get("text-max-angle")/180*Math.PI,M="viewport"!==m.get("text-rotation-alignment")&&"point"!==m.get("symbol-placement"),S="map"===m.get("icon-rotation-alignment")&&"point"!==m.get("symbol-placement"),P=m.get("symbol-placement"),A=x/2,I=m.get("icon-text-fit");let C;o&&"none"!==I&&(e.allowVerticalPlacement&&r.vertical&&(C=ca(o,r.vertical,I,m.get("icon-text-fit-padding"),f,g)),_&&(o=ca(o,_,I,m.get("icon-text-fit-padding"),f,g)));const z=h?p.line.getGranularityForZoomLevel(h.z):1,D=(l,p)=>{p.x<0||p.x>=yl||p.y<0||p.y>=yl||function(e,i,r,o,n,a,s,l,c,u,h,p,d,m,f,_,g,y,v,b,x,w,T,k,M){const S=e.addToLineVertexArray(i,r);let P,A,I,C,z=0,D=0,O=0,L=0,R=-1,F=-1;const B={};let j=xp("");if(e.allowVerticalPlacement&&o.vertical){const t=l.layout.get("text-rotate").evaluate(x,{},k)+90;I=new Ff(c,i,u,h,p,o.vertical,d,m,f,t),s&&(C=new Ff(c,i,u,h,p,s,g,y,f,t))}if(n){const r=l.layout.get("icon-rotate").evaluate(x,{}),o="none"!==l.layout.get("icon-text-fit"),a=Hs(n,r,T,o),d=s?Hs(s,r,T,o):void 0;A=new Ff(c,i,u,h,p,n,g,y,!1,r),z=4*a.length;const m=e.iconSizeData;let f=null;"source"===m.kind?(f=[mm*l.layout.get("icon-size").evaluate(x,{})],f[0]>fm&&E(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):"composite"===m.kind&&(f=[mm*w.compositeIconSizes[0].evaluate(x,{},k),mm*w.compositeIconSizes[1].evaluate(x,{},k)],(f[0]>fm||f[1]>fm)&&E(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),e.addSymbols(e.icon,a,f,b,v,x,t.ax.none,i,S.lineStartIndex,S.lineLength,-1,k),R=e.icon.placedSymbolArray.length-1,d&&(D=4*d.length,e.addSymbols(e.icon,d,f,b,v,x,t.ax.vertical,i,S.lineStartIndex,S.lineLength,-1,k),F=e.icon.placedSymbolArray.length-1)}const V=Object.keys(o.horizontal);for(const r of V){const n=o.horizontal[r];if(!P){j=xp(n.text);const t=l.layout.get("text-rotate").evaluate(x,{},k);P=new Ff(c,i,u,h,p,n,d,m,f,t)}const s=1===n.positionedLines.length;if(O+=nl(e,i,n,a,l,f,x,_,S,o.vertical?t.ax.horizontal:t.ax.horizontalOnly,s?V:[r],B,R,w,k),s)break}o.vertical&&(L+=nl(e,i,o.vertical,a,l,f,x,_,S,t.ax.vertical,["vertical"],B,F,w,k));const N=P?P.boxStartIndex:e.collisionBoxArray.length,U=P?P.boxEndIndex:e.collisionBoxArray.length,G=I?I.boxStartIndex:e.collisionBoxArray.length,Z=I?I.boxEndIndex:e.collisionBoxArray.length,$=A?A.boxStartIndex:e.collisionBoxArray.length,q=A?A.boxEndIndex:e.collisionBoxArray.length,W=C?C.boxStartIndex:e.collisionBoxArray.length,H=C?C.boxEndIndex:e.collisionBoxArray.length;let Y=-1;const X=(t,e)=>(null==t?void 0:t.circleDiameter)?Math.max(t.circleDiameter,e):e;Y=X(P,Y),Y=X(I,Y),Y=X(A,Y),Y=X(C,Y);const K=Y>-1?1:0;K&&(Y*=M/im),e.glyphOffsetArray.length>=vm.MAX_GLYPHS&&E("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==x.sortKey&&e.addToSortKeyRanges(e.symbolInstances.length,x.sortKey);const J=il(l,x,k),[Q,tt]=function(e,i){const r=e.length,o=null==i?void 0:i.values;if((null==o?void 0:o.length)>0)for(let i=0;i=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,R,F,j,N,U,G,Z,$,q,W,H,u,O,L,z,D,K,0,d,Y,Q,tt)}(e,p,l,r,o,n,C,e.layers[0],e.collisionBoxArray,i.index,i.sourceLayerIndex,e.index,y,[w,w,w,w],M,c,b,T,S,f,i,a,u,h,s)};if("line"===P)for(const t of Ls(i.geometry,0,0,yl,yl)){const i=go(t,z),n=qs(i,x,k,r.vertical||_,o,24,v,e.overscaling,yl);for(const t of n)_&&sl(e,_.text,A,t)||D(i,t)}else if("line-center"===P){for(const t of i.geometry)if(t.length>1){const e=go(t,z),i=$s(e,k,r.vertical||_,o,24,v);i&&D(e,i)}}else if("Polygon"===i.type)for(const t of Jt(i.geometry,0)){const e=Qs(t,16);D(go(t[0],z,!0),new Rf(e.x,e.y,0))}else if("LineString"===i.type)for(const t of i.geometry){const e=go(t,z);D(e,new Rf(e[0].x,e[0].y,0))}else if("Point"===i.type)for(const t of i.geometry)for(const e of t)D([e],new Rf(e.x,e.y,0))}function nl(t,e,r,o,n,a,s,l,c,u,h,p,d,m,f){const _=function(t,e,r,o,n,a,s,l){const c=o.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,u=[];for(const t of e.positionedLines)for(const o of t.positionedGlyphs){if(!o.rect)continue;const a=o.rect||{};let h=4,p=!0,d=1,m=0;const f=(n||l)&&o.vertical,_=o.metrics.advance*o.scale/2;if(l&&e.verticalizable&&(m=t.lineOffset/2-(o.imageName?-(im-o.metrics.width*o.scale)/2:(o.scale-1)*im)),o.imageName){const t=s[o.imageName];p=t.sdf,d=t.pixelRatio,h=1/d}const g=n?[o.x+_,o.y]:[0,0];let y=n?[0,0]:[o.x+_+r[0],o.y+r[1]-m],v=[0,0];f&&(v=y,y=[0,0]);const b=o.metrics.isDoubleResolution?2:1,x=(o.metrics.left-h)*o.scale-_+y[0],w=(-o.metrics.top-h)*o.scale+y[1],T=x+a.w/b*o.scale/d,k=w+a.h/b*o.scale/d,M=new i(x,w),S=new i(T,w),P=new i(x,k),A=new i(T,k);if(f){const t=new i(-_,_- -17),e=-Math.PI/2,r=12-_,n=new i(22-r,-(o.imageName?r:0)),a=new i(...v);M._rotateAround(e,t)._add(n)._add(a),S._rotateAround(e,t)._add(n)._add(a),P._rotateAround(e,t)._add(n)._add(a),A._rotateAround(e,t)._add(n)._add(a)}if(c){const t=Math.sin(c),e=Math.cos(c),i=[e,-t,t,e];M._matMult(i),S._matMult(i),P._matMult(i),A._matMult(i)}const I=new i(0,0),C=new i(0,0);u.push({tl:M,tr:S,bl:P,br:A,tex:a,writingMode:e.writingMode,glyphOffset:g,sectionIndex:o.sectionIndex,isSDF:p,pixelOffsetTL:I,pixelOffsetBR:C,minFontScaleX:0,minFontScaleY:0})}return u}(0,r,l,n,a,s,o,t.allowVerticalPlacement),g=t.textSizeData;let y=null;"source"===g.kind?(y=[mm*n.layout.get("text-size").evaluate(s,{})],y[0]>fm&&E(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):"composite"===g.kind&&(y=[mm*m.compositeTextSizes[0].evaluate(s,{},f),mm*m.compositeTextSizes[1].evaluate(s,{},f)],(y[0]>fm||y[1]>fm)&&E(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),t.addSymbols(t.text,_,y,l,a,s,u,e,c.lineStartIndex,c.lineLength,d,f);for(const e of h)p[e]=t.text.placedSymbolArray.length-1;return 4*_.length}function al(t){for(const e in t)return t[e];return null}function sl(t,e,i,r){const o=t.compareText;if(e in o){const t=o[e];for(let e=t.length-1;e>=0;e--)if(r.dist(t[e])1)return 1;for(var i=t,r=0;r<8;r++){var o=this.sampleCurveX(i)-t;if(Math.abs(o)o?a=i:s=i,i=.5*(s-a)+a;return i},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}}),ll}(),hl=r(ul);let pl,dl;var ml,fl=1e-6,_l="undefined"!=typeof Float32Array?Float32Array:Array,gl=c;l(),ml=new _l(4),_l!=Float32Array&&(ml[0]=0,ml[1]=0,ml[2]=0,ml[3]=0),l(),u(1,0,0),u(0,1,0),f(),f(),a(),g();const yl=8192,vl=k(.25,.1,.25,1);let bl=1;const xl={};let wl=null;const Tl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let kl,Ml;const Sl={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},Pl={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},Al="AbortError";class Il extends Error{constructor(t=Al){super(t instanceof Error?t.message:t),this.name=Al,t instanceof Error&&t.stack&&(this.stack=t.stack)}}const Cl={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""},El="global-dispatcher";class zl extends Error{constructor(t,e,i,r){super(`AJAXError: ${e} (${t}): ${i}`),this.status=t,this.statusText=e,this.url=i,this.body=r}}const Dl=()=>{var t;return D(self)?null===(t=self.worker)||void 0===t?void 0:t.referrer:("blob:"===window.location.protocol?window.parent:window).location.href},Ol=function(t,i){return e(this,void 0,void 0,function*(){var r,o;if(t.url.includes("://")&&!/^https?:|^file:/.test(t.url)){const e=N(t.url);if(e){const r=yield e(t,i);return r.data||"arrayBuffer"!==t.type?r:P(r,{data:new ArrayBuffer(0)})}if(D(self)&&(null===(r=self.worker)||void 0===r?void 0:r.actor))return self.worker.actor.sendAsync({type:"GR",data:t,targetMapId:El},i)}if(!(t=>{var e;return t.startsWith("file:")||(null===(e=Dl())||void 0===e?void 0:e.startsWith("file:"))&&!/^\w+:/.test(t)})(t.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return function(t,i){return e(this,void 0,void 0,function*(){const e=new Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,cache:t.cache,referrer:Dl(),referrerPolicy:t.referrerPolicy,signal:i.signal});let r,o;"json"!==t.type||e.headers.has("Accept")||e.headers.set("Accept","application/json");try{r=yield fetch(e)}catch(e){if(j(e))throw e;throw new zl(0,b(e).message,t.url,new Blob)}if(!r.ok){const e=yield r.blob();throw new zl(r.status,r.statusText,t.url,e)}o="arrayBuffer"===t.type||"image"===t.type?r.arrayBuffer():"json"===t.type?r.json():r.text();const n=yield o;return V(i.signal),{data:n,cacheControl:r.headers.get("Cache-Control"),expires:r.headers.get("Expires"),etag:r.headers.get("ETag")}})}(t,i);if(D(self)&&(null===(o=self.worker)||void 0===o?void 0:o.actor))return self.worker.actor.sendAsync({type:"GR",data:t,mustQueue:!0,targetMapId:El},i)}return function(t,e){return new Promise((i,r)=>{var o;const n=new XMLHttpRequest;n.open(t.method||"GET",t.url,!0),"arrayBuffer"!==t.type&&"image"!==t.type||(n.responseType="arraybuffer");for(const e in t.headers)n.setRequestHeader(e,t.headers[e]);"json"===t.type&&(n.responseType="text",(null===(o=t.headers)||void 0===o?void 0:o.Accept)||n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===t.credentials,n.onerror=()=>{r(new Error(n.statusText))},n.onload=()=>{if(!e.signal.aborted)if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){let e=n.response;if("json"===t.type)try{e=JSON.parse(n.response)}catch(t){return void r(t)}i({data:e,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires"),etag:n.getResponseHeader("ETag")})}else{const e=new Blob([n.response],{type:n.getResponseHeader("Content-Type")});r(new zl(n.status,n.statusText,t.url,e))}},e.signal.addEventListener("abort",()=>{ n.abort(),r(new Il(e.signal.reason))}),n.send(t.body)})}(t,i)})};class Ll{constructor(t,e={}){P(this,e),this.type=t}}class Rl extends Ll{constructor(t,e={}){super("error",P({error:t},e))}}class Fl{on(t,e){return this._listeners||(this._listeners={}),G(t,e,this._listeners),{unsubscribe:()=>{this.off(t,e)}}}off(t,e){return Z(t,e,this._listeners),Z(t,e,this._oneTimeListeners),this}once(t,e){return e?(this._oneTimeListeners||(this._oneTimeListeners={}),G(t,e,this._oneTimeListeners),this):new Promise(e=>this.once(t,e))}fire(t,e){var i,r;"string"==typeof t&&(t=new Ll(t,e||{}));const o=t.type;if(this.listens(o)){t.target=this;const e=(null===(i=this._listeners)||void 0===i?void 0:i[o])?this._listeners[o].slice():[];for(const i of e)i.call(this,t);const n=(null===(r=this._oneTimeListeners)||void 0===r?void 0:r[o])?this._oneTimeListeners[o].slice():[];for(const e of n)Z(o,e,this._oneTimeListeners),e.call(this,t);const a=this._eventedParent;a&&(P(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),a.fire(t))}else t instanceof Rl&&console.error(t.error);return this}listens(t){var e,i,r,o,n;return(null===(i=null===(e=this._listeners)||void 0===e?void 0:e[t])||void 0===i?void 0:i.length)>0||(null===(o=null===(r=this._oneTimeListeners)||void 0===r?void 0:r[t])||void 0===o?void 0:o.length)>0||(null===(n=this._eventedParent)||void 0===n?void 0:n.listens(t))}setEventedParent(t,e){return this._eventedParent=t,this._eventedParentData=e,this}}var Bl={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},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},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"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","feature"]},"property-type":"cross-faded-data-driven"},"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"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,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:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}, "property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,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"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};const jl=["type","source","source-layer","minzoom","maxzoom","filter","layout"];class Vl{constructor(t,e,i,r){this.message=(t?`${t}: `:"")+i,r&&(this.identifier=r),null!=e&&e.__line__&&(this.line=e.__line__)}}class Nl extends Error{constructor(t,e){super(e),this.message=e,this.key=t}}class Ul{constructor(t,e=[]){this.parent=t,this.bindings={};for(const[t,i]of e)this.bindings[t]=i}concat(t){return new Ul(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}const Gl={kind:"null"},Zl={kind:"number"},$l={kind:"string"},ql={kind:"boolean"},Wl={kind:"color"},Hl={kind:"projectionDefinition"},Yl={kind:"object"},Xl={kind:"value"},Kl={kind:"collator"},Jl={kind:"formatted"},Ql={kind:"padding"},tc={kind:"colorArray"},ec={kind:"numberArray"},ic={kind:"resolvedImage"},rc={kind:"variableAnchorOffsetCollection"},oc=[Gl,Zl,$l,ql,Wl,Hl,Jl,Yl,it(Xl),Ql,ec,tc,ic,rc],nc=.96422,ac=.82521,sc=4/29,lc=6/29,cc=3*lc*lc,uc=lc*lc*lc,hc=Math.PI/180,pc=180/Math.PI,dc=Object.hasOwn||function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},mc={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class fc{constructor(t,e,i,r=1,o=!0){this.r=t,this.g=e,this.b=i,this.a=r,o||(this.r*=r,this.g*=r,this.b*=r,r||this.overwriteGetter("rgb",[t,e,i,r]))}static parse(t){if(t instanceof fc)return t;if("string"!=typeof t)return;const e=function(t){if("transparent"===(t=t.toLowerCase().trim()))return[0,0,0,0];const e=ft(mc,t);if(e){const[t,i,r]=e;return[t/255,i/255,r/255,1]}if(t.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(t)){const e=t.length<6?1:2;let i=1;return[_t(t.slice(i,i+=e)),_t(t.slice(i,i+=e)),_t(t.slice(i,i+=e)),_t(t.slice(i,i+e)||"ff")]}if(t.startsWith("rgb")){const e=t.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(e){const[t,i,r,o,n,a,s,l,c,u,h,p]=e,d=[o||" ",s||" ",u].join("");if(" "===d||" /"===d||",,"===d||",,,"===d){const t=[r,a,c].join(""),e="%%%"===t?100:""===t?255:0;if(e){const t=[yt(+i/e,0,1),yt(+n/e,0,1),yt(+l/e,0,1),h?gt(+h,p):1];if(vt(t))return t}}return}}const i=t.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(i){const[t,e,r,o,n,a,s,l,c]=i,u=[r||" ",n||" ",s].join("");if(" "===u||" /"===u||",,"===u||",,,"===u){const t=[+e,yt(+o,0,100),yt(+a,0,100),l?gt(+l,c):1];if(vt(t))return function([t,e,i,r]){function o(r){const o=(r+t/30)%12,n=e*Math.min(i,1-i);return i-n*Math.max(-1,Math.min(o-3,9-o,1))}return t=lt(t),e/=100,i/=100,[o(0),o(8),o(4),r]}(t)}}}(t);return e?new fc(...e,!1):void 0}get rgb(){const{r:t,g:e,b:i,a:r}=this,o=r||1/0;return this.overwriteGetter("rgb",[t/o,e/o,i/o,r])}get hcl(){return this.overwriteGetter("hcl",function(t){const[e,i,r,o]=ct(t),n=Math.sqrt(i*i+r*r);return[Math.round(1e4*n)?lt(Math.atan2(r,i)*pc):NaN,n,e,o]}(this.rgb))}get lab(){return this.overwriteGetter("lab",ct(this.rgb))}overwriteGetter(t,e){return Object.defineProperty(this,t,{value:e}),e}toString(){const[t,e,i,r]=this.rgb;return`rgba(${[t,e,i].map(t=>Math.round(255*t)).join(",")},${r})`}static interpolate(t,e,i,r="rgb"){switch(r){case"rgb":{const[r,o,n,a]=xt(t.rgb,e.rgb,i);return new fc(r,o,n,a,!1)}case"hcl":{const[r,o,n,a]=t.hcl,[s,l,c,u]=e.hcl;let h,p;if(isNaN(r)||isNaN(s))isNaN(r)?isNaN(s)?h=NaN:(h=s,1!==n&&0!==n||(p=l)):(h=r,1!==c&&0!==c||(p=o));else{let t=s-r;s>r&&t>180?t-=360:s180&&(t+=360),h=r+i*t}const[d,m,f,_]=function([t,e,i,r]){return t=isNaN(t)?0:t*hc,pt([i,Math.cos(t)*e,Math.sin(t)*e,r])}([h,null!=p?p:bt(o,l,i),bt(n,c,i),bt(a,u,i)]);return new fc(d,m,f,_,!1)}case"lab":{const[r,o,n,a]=pt(xt(t.lab,e.lab,i));return new fc(r,o,n,a,!1)}}}}fc.black=new fc(0,0,0,1),fc.white=new fc(1,1,1,1),fc.transparent=new fc(0,0,0,0),fc.red=new fc(1,0,0,1);class _c{constructor(t,e,i){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const gc=["bottom","center","top"];class yc{constructor(t,e,i,r,o,n){this.text=t,this.image=e,this.scale=i,this.fontStack=r,this.textColor=o,this.verticalAlign=n}}class vc{constructor(t){this.sections=t}static fromString(t){return new vc([new yc(t,null,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(t=>0!==t.text.length||t.image&&0!==t.image.name.length)}static factory(t){return t instanceof vc?t:vc.fromString(t)}toString(){return 0===this.sections.length?"":this.sections.map(t=>t.text).join("")}}class bc{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof bc)return t;if("number"==typeof t)return new bc([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const e of t)if("number"!=typeof e)return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new bc(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,e,i){return new bc(xt(t.values,e.values,i))}}class xc{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof xc)return t;if("number"==typeof t)return new xc([t]);if(Array.isArray(t)){for(const e of t)if("number"!=typeof e)return;return new xc(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,e,i){return new xc(xt(t.values,e.values,i))}}class wc{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof wc)return t;if("string"==typeof t){const e=fc.parse(t);if(!e)return;return new wc([e])}if(!Array.isArray(t))return;const e=[];for(const i of t){if("string"!=typeof i)return;const t=fc.parse(i);if(!t)return;e.push(t)}return new wc(e)}toString(){return JSON.stringify(this.values)}static interpolate(t,e,i,r="rgb"){const o=[];if(t.values.length!=e.values.length)throw new Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${e.values.length}), cannot interpolate.`);for(let n=0;n2){const i=t[1];if("string"!=typeof i||!(i in Ic)||"object"===i)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=Ic[i],r++}else o=Xl;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);n=t[2],r++}i=it(o,n)}else{if(!Ic[o])throw new Error(`Types doesn't contain name = ${o}`);i=Ic[o]}const n=[];for(;rt.outputDefined())}}const Ec={"to-boolean":ql,"to-color":Wl,"to-number":Zl,"to-string":$l};class zc{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const i=t[0];if(!Ec[i])throw new Error(`Can't parse ${i} as it is not part of the known types`);if(("to-boolean"===i||"to-string"===i)&&2!==t.length)return e.error("Expected one argument.");const r=Ec[i],o=[];for(let i=1;i4?`Invalid rgba value ${JSON.stringify(e)}: expected an array containing either three or four numeric values.`:wt(e[0],e[1],e[2],e[3]),!i))return new fc(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Tc(i||`Could not parse color from value '${"string"==typeof e?e:JSON.stringify(e)}'`)}case"padding":{let e;for(const i of this.args){e=i.evaluate(t);const r=bc.parse(e);if(r)return r}throw new Tc(`Could not parse padding from value '${"string"==typeof e?e:JSON.stringify(e)}'`)}case"numberArray":{let e;for(const i of this.args){e=i.evaluate(t);const r=xc.parse(e);if(r)return r}throw new Tc(`Could not parse numberArray from value '${"string"==typeof e?e:JSON.stringify(e)}'`)}case"colorArray":{let e;for(const i of this.args){e=i.evaluate(t);const r=wc.parse(e);if(r)return r}throw new Tc(`Could not parse colorArray from value '${"string"==typeof e?e:JSON.stringify(e)}'`)}case"variableAnchorOffsetCollection":{let e;for(const i of this.args){e=i.evaluate(t);const r=Mc.parse(e);if(r)return r}throw new Tc(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof e?e:JSON.stringify(e)}'`)}case"number":{let e=null;for(const i of this.args){if(e=i.evaluate(t),null===e)return 0;const r=Number(e);if(!isNaN(r))return r}throw new Tc(`Could not convert ${JSON.stringify(e)} to number.`)}case"formatted":return vc.fromString(Mt(this.args[0].evaluate(t)));case"resolvedImage":return Sc.fromString(Mt(this.args[0].evaluate(t)));case"projectionDefinition":return this.args[0].evaluate(t);default:return Mt(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const Dc=["Unknown","Point","LineString","Polygon"];class Oc{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?Dc[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let e=this._parseColorCache.get(t);return e||(e=fc.parse(t),this._parseColorCache.set(t,e)),e}}class Lc{constructor(t,e,i=[],r,o=new Ul,n=[]){this.registry=t,this.path=i,this.key=i.map(t=>`[${t}]`).join(""),this.scope=o,this.errors=n,this.expectedType=r,this._isConstant=e}parse(t,e,i,r,o={}){return e?this.concat(e,i,r)._parse(t,o):this._parse(t,o)}_parse(t,e){function i(t,e,i){return"assert"===i?new Cc(e,[t]):"coerce"===i?new zc(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const r=t[0];if("string"!=typeof r)return this.error(`Expression name must be a string, but found ${typeof r} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const o=this.registry[r];if(o){let r=o.parse(t,this);if(!r)return null;if(this.expectedType){const t=this.expectedType,o=r.type;if("string"!==t.kind&&"number"!==t.kind&&"boolean"!==t.kind&&"object"!==t.kind&&"array"!==t.kind||"value"!==o.kind){if("projectionDefinition"===t.kind&&["string","array"].includes(o.kind)||["color","formatted","resolvedImage"].includes(t.kind)&&["value","string"].includes(o.kind)||["padding","numberArray"].includes(t.kind)&&["value","number","array"].includes(o.kind)||"colorArray"===t.kind&&["value","string","array"].includes(o.kind)||"variableAnchorOffsetCollection"===t.kind&&["value","array"].includes(o.kind))r=i(r,t,e.typeAnnotation||"coerce");else if(this.checkSubtype(t,o))return null}else r=i(r,t,e.typeAnnotation||"assert")}if(!(r instanceof Ac)&&"resolvedImage"!==r.type.kind&&this._isConstant(r)){const e=new Oc;try{r=new Ac(r.type,r.evaluate(e))}catch(t){return this.error(t.message),null}}return r}return this.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===t?"'undefined' value invalid. Use null instead.":"object"==typeof t?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof t} instead.`)}concat(t,e,i){const r="number"==typeof t?this.path.concat(t):this.path,o=i?this.scope.concat(i):this.scope;return new Lc(this.registry,this._isConstant,r,e||null,o,this.errors)}error(t,...e){const i=`${this.key}${e.map(t=>`[${t}]`).join("")}`;this.errors.push(new Nl(i,t))}checkSubtype(t,e){const i=ot(t,e);return i&&this.error(i),i}}class Rc{constructor(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const e of this.bindings)t(e[1]);t(this.result)}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const i=[];for(let r=1;r=i.length)throw new Tc(`Array index out of bounds: ${e} > ${i.length-1}.`);if(e!==Math.floor(e))throw new Tc(`Array index must be an integer, but found ${e} instead.`);return i[e]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class jc{constructor(t,e){this.type=ql,this.needle=t,this.haystack=e}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,Xl),r=e.parse(t[2],2,Xl);return i&&r?nt(i.type,[ql,$l,Zl,Gl,Xl])?new jc(i,r):e.error(`Expected first argument to be of type boolean, string, number or null, but found ${rt(i.type)} instead`):null}evaluate(t){const e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!i)return!1;if(!at(e,["boolean","string","number","null"]))throw new Tc(`Expected first argument to be of type boolean, string, number or null, but found ${rt(kt(e))} instead.`);if(!at(i,["string","array"]))throw new Tc(`Expected second argument to be of type array or string, but found ${rt(kt(i))} instead.`);return i.indexOf(e)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class Vc{constructor(t,e,i){this.type=Zl,this.needle=t,this.haystack=e,this.fromIndex=i}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,Xl),r=e.parse(t[2],2,Xl);if(!i||!r)return null;if(!nt(i.type,[ql,$l,Zl,Gl,Xl]))return e.error(`Expected first argument to be of type boolean, string, number or null, but found ${rt(i.type)} instead`);if(4===t.length){const o=e.parse(t[3],3,Zl);return o?new Vc(i,r,o):null}return new Vc(i,r)}evaluate(t){const e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!at(e,["boolean","string","number","null"]))throw new Tc(`Expected first argument to be of type boolean, string, number or null, but found ${rt(kt(e))} instead.`);let r;if(this.fromIndex&&(r=this.fromIndex.evaluate(t)),at(i,["string"])){const t=i.indexOf(e,r);return-1===t?-1:[...i.slice(0,t)].length}if(at(i,["array"]))return i.indexOf(e,r);throw new Tc(`Expected second argument to be of type array or string, but found ${rt(kt(i))} instead.`)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class Nc{constructor(t,e,i,r,o,n){this.inputType=t,this.type=e,this.input=i,this.cases=r,this.outputs=o,this.otherwise=n}static parse(t,e){if(t.length<5)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return e.error("Expected an even number of arguments.");let i,r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);const o={},n=[];for(let a=2;aNumber.MAX_SAFE_INTEGER)return c.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof t&&Math.floor(t)!==t)return c.error("Numeric branch labels must be integer values.");if(i){if(c.checkSubtype(i,kt(t)))return null}else i=kt(t);if(void 0!==o[String(t)])return c.error("Branch labels must be unique.");o[String(t)]=n.length}const u=e.parse(l,a,r);if(!u)return null;r=r||u.type,n.push(u)}const a=e.parse(t[1],1,Xl);if(!a)return null;const s=e.parse(t[t.length-1],t.length-1,r);return s?"value"!==a.type.kind&&e.concat(1).checkSubtype(i,a.type)?null:new Nc(i,r,a,o,n,s):null}evaluate(t){const e=this.input.evaluate(t);return(kt(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every(t=>t.outputDefined())&&this.otherwise.outputDefined()}}class Uc{constructor(t,e,i){this.type=t,this.branches=e,this.otherwise=i}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return e.error("Expected an odd number of arguments.");let i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);const r=[];for(let o=1;oe.outputDefined())&&this.otherwise.outputDefined()}}class Gc{constructor(t,e,i,r){this.type=t,this.input=e,this.beginIndex=i,this.endIndex=r}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,Xl),r=e.parse(t[2],2,Zl);if(!i||!r)return null;if(!nt(i.type,[it(Xl),$l,Xl]))return e.error(`Expected first argument to be of type array or string, but found ${rt(i.type)} instead`);if(4===t.length){const o=e.parse(t[3],3,Zl);return o?new Gc(i.type,i,r,o):null}return new Gc(i.type,i,r)}evaluate(t){const e=this.input.evaluate(t),i=this.beginIndex.evaluate(t);let r;if(this.endIndex&&(r=this.endIndex.evaluate(t)),at(e,["string"]))return[...e].slice(i,r).join("");if(at(e,["array"]))return e.slice(i,r);throw new Tc(`Expected first argument to be of type array or string, but found ${rt(kt(e))} instead.`)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}class Zc{constructor(t,e,i){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(const[t,e]of i)this.labels.push(t),this.outputs.push(e)}static parse(t,e){if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");const i=e.parse(t[1],1,Zl);if(!i)return null;const r=[];let o=null;e.expectedType&&"value"!==e.expectedType.kind&&(o=e.expectedType);for(let i=1;i=n)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);const c=e.parse(a,l,o);if(!c)return null;o=o||c.type,r.push([n,c])}return new Zc(o,i,r)}evaluate(t){const e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);const r=this.input.evaluate(t);if(r<=e[0])return i[0].evaluate(t);const o=e.length;return r>=e[o-1]?i[o-1].evaluate(t):i[St(e,r)].evaluate(t)}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}var $c,qc,Wc=function(){function t(t,e,i,r){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=e,this.p2x=i,this.p2y=r}return qc||(qc=1,$c=t,t.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,e){if(void 0===e&&(e=1e-6),t<0)return 0;if(t>1)return 1;for(var i=t,r=0;r<8;r++){var o=this.sampleCurveX(i)-t;if(Math.abs(o)o?a=i:s=i,i=.5*(s-a)+a;return i},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}}),$c}(),Hc=Pt(Wc);class Yc{constructor(t,e,i,r,o){this.type=t,this.operator=e,this.interpolation=i,this.input=r,this.labels=[],this.outputs=[];for(const[t,e]of o)this.labels.push(t),this.outputs.push(e)}static interpolationFactor(t,e,i,r){let o=0;if("exponential"===t.name)o=At(e,t.base,i,r);else if("linear"===t.name)o=At(e,1,i,r);else if("cubic-bezier"===t.name){const n=t.controlPoints;o=new Hc(n[0],n[1],n[2],n[3]).solve(At(e,1,i,r))}return o}static parse(t,e){let[i,r,o,...n]=t;if(!Array.isArray(r)||0===r.length)return e.error("Expected an interpolation type expression.",1);if("linear"===r[0])r={name:"linear"};else if("exponential"===r[0]){const t=r[1];if("number"!=typeof t)return e.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:t}}else{if("cubic-bezier"!==r[0])return e.error(`Unknown interpolation type ${String(r[0])}`,1,0);{const t=r.slice(1);if(4!==t.length||t.some(t=>"number"!=typeof t||t<0||t>1))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:t}}}if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(o=e.parse(o,2,Zl),!o)return null;const a=[];let s=null;"interpolate-hcl"!==i&&"interpolate-lab"!==i||e.expectedType==tc?e.expectedType&&"value"!==e.expectedType.kind&&(s=e.expectedType):s=Wl;for(let t=0;t=i)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',o);const c=e.parse(r,l,s);if(!c)return null;s=s||c.type,a.push([i,c])} return st(s,Zl)||st(s,Hl)||st(s,Wl)||st(s,Ql)||st(s,ec)||st(s,tc)||st(s,rc)||st(s,it(Zl))?new Yc(s,i,r,o,a):e.error(`Type ${rt(s)} is not interpolatable.`)}evaluate(t){const e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);const r=this.input.evaluate(t);if(r<=e[0])return i[0].evaluate(t);const o=e.length;if(r>=e[o-1])return i[o-1].evaluate(t);const n=St(e,r),a=Yc.interpolationFactor(this.interpolation,r,e[n],e[n+1]),s=i[n].evaluate(t),l=i[n+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return bt(s,l,a);case"color":return fc.interpolate(s,l,a);case"padding":return bc.interpolate(s,l,a);case"colorArray":return wc.interpolate(s,l,a);case"numberArray":return xc.interpolate(s,l,a);case"variableAnchorOffsetCollection":return Mc.interpolate(s,l,a);case"array":return xt(s,l,a);case"projectionDefinition":return Pc.interpolate(s,l,a)}case"interpolate-hcl":switch(this.type.kind){case"color":return fc.interpolate(s,l,a,"hcl");case"colorArray":return wc.interpolate(s,l,a,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return fc.interpolate(s,l,a,"lab");case"colorArray":return wc.interpolate(s,l,a,"lab")}}}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}const Xc={color:fc.interpolate,number:bt,padding:bc.interpolate,numberArray:xc.interpolate,colorArray:wc.interpolate,variableAnchorOffsetCollection:Mc.interpolate,array:xt};class Kc{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let i=null;const r=e.expectedType;r&&"value"!==r.kind&&(i=r);const o=[];for(const r of t.slice(1)){const t=e.parse(r,1+o.length,i,void 0,{typeAnnotation:"omit"});if(!t)return null;i=i||t.type,o.push(t)}if(!i)throw new Error("No output type");const n=r&&o.some(t=>ot(r,t.type));return new Kc(n?Xl:i,o)}evaluate(t){let e,i=null,r=0;for(const o of this.args)if(r++,i=o.evaluate(t),i&&i instanceof Sc&&!i.available&&(e||(e=i.name),i=null,r===this.args.length&&(i=e)),null!==i)break;return i}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const Jc=Et("==",function(t,e,i){return e===i},Ct),Qc=Et("!=",function(t,e,i){return e!==i},function(t,e,i,r){return!Ct(0,e,i,r)}),tu=Et("<",function(t,e,i){return e",function(t,e,i){return e>i},function(t,e,i,r){return r.compare(e,i)>0}),iu=Et("<=",function(t,e,i){return e<=i},function(t,e,i,r){return r.compare(e,i)<=0}),ru=Et(">=",function(t,e,i){return e>=i},function(t,e,i,r){return r.compare(e,i)>=0});class ou{constructor(t,e,i){this.type=Kl,this.locale=i,this.caseSensitive=t,this.diacriticSensitive=e}static parse(t,e){if(2!==t.length)return e.error("Expected one argument.");const i=t[1];if("object"!=typeof i||Array.isArray(i))return e.error("Collator options argument must be an object.");const r=e.parse(void 0!==i["case-sensitive"]&&i["case-sensitive"],1,ql);if(!r)return null;const o=e.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,ql);if(!o)return null;let n=null;return i.locale&&(n=e.parse(i.locale,1,$l),!n)?null:new ou(r,o,n)}evaluate(t){return new _c(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}}class nu{constructor(t,e,i,r,o,n){this.type=$l,this.number=t,this.locale=e,this.currency=i,this.unit=r,this.minFractionDigits=o,this.maxFractionDigits=n}static parse(t,e){if(3!==t.length)return e.error("Expected two arguments.");const i=e.parse(t[1],1,Zl);if(!i)return null;const r=t[2];if("object"!=typeof r||Array.isArray(r))return e.error("NumberFormat options argument must be an object.");let o=null;if(r.locale&&(o=e.parse(r.locale,1,$l),!o))return null;let n=null;if(r.currency&&(n=e.parse(r.currency,1,$l),!n))return null;let a=null;if(r.unit&&(a=e.parse(r.unit,1,$l),!a))return null;if(n&&a)return e.error("NumberFormat options `currency` and `unit` are mutually exclusive");let s=null;if(r["min-fraction-digits"]&&(s=e.parse(r["min-fraction-digits"],1,Zl),!s))return null;let l=null;return r["max-fraction-digits"]&&(l=e.parse(r["max-fraction-digits"],1,Zl),!l)?null:new nu(i,o,n,a,s,l)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,unit:this.unit?this.unit.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.unit&&t(this.unit),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}}class au{constructor(t){this.type=Jl,this.sections=t}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const i=t[1];if(!Array.isArray(i)&&"object"==typeof i)return e.error("First argument must be an image or text section.");const r=[];let o=!1;for(let i=1;i<=t.length-1;++i){const n=t[i];if(o&&"object"==typeof n&&!Array.isArray(n)){o=!1;let t=null;if(n["font-scale"]&&(t=e.parse(n["font-scale"],1,Zl),!t))return null;let i=null;if(n["text-font"]&&(i=e.parse(n["text-font"],1,it($l)),!i))return null;let a=null;if(n["text-color"]&&(a=e.parse(n["text-color"],1,Wl),!a))return null;let s=null;if(n["vertical-align"]){if("string"==typeof n["vertical-align"]&&!gc.includes(n["vertical-align"]))return e.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${n["vertical-align"]}' instead.`);if(s=e.parse(n["vertical-align"],1,$l),!s)return null}const l=r[r.length-1];l.scale=t,l.font=i,l.textColor=a,l.verticalAlign=s}else{const n=e.parse(t[i],1,Xl);if(!n)return null;const a=n.type.kind;if("string"!==a&&"value"!==a&&"null"!==a&&"resolvedImage"!==a)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,r.push({content:n,scale:null,font:null,textColor:null,verticalAlign:null})}}return new au(r)}evaluate(t){return new vc(this.sections.map(e=>{const i=e.content.evaluate(t);return kt(i)===ic?new yc("",i,null,null,null,e.verticalAlign?e.verticalAlign.evaluate(t):null):new yc(Mt(i),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null,e.verticalAlign?e.verticalAlign.evaluate(t):null)}))}eachChild(t){for(const e of this.sections)t(e.content),e.scale&&t(e.scale),e.font&&t(e.font),e.textColor&&t(e.textColor),e.verticalAlign&&t(e.verticalAlign)}outputDefined(){return!1}}class su{constructor(t){this.type=ic,this.input=t}static parse(t,e){if(2!==t.length)return e.error("Expected two arguments.");const i=e.parse(t[1],1,$l);return i?new su(i):e.error("No image name provided.")}evaluate(t){const e=this.input.evaluate(t),i=Sc.fromString(e);return i&&t.availableImages&&(i.available=t.availableImages.indexOf(e)>-1),i}eachChild(t){t(this.input)}outputDefined(){return!1}}class lu{constructor(t){this.type=Zl,this.input=t}static parse(t,e){if(2!==t.length)return e.error(`Expected 1 argument, but found ${t.length-1} instead.`);const i=e.parse(t[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?e.error(`Expected argument of type string or array, but found ${rt(i.type)} instead.`):new lu(i):null}evaluate(t){const e=this.input.evaluate(t);if("string"==typeof e)return[...e].length;if(Array.isArray(e))return e.length;throw new Tc(`Expected value to be of type string or array, but found ${rt(kt(e))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}const cu=8192;class uu{constructor(t,e){this.type=ql,this.geojson=t,this.geometries=e}static parse(t,e){if(2!==t.length)return e.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Tt(t[1])){const e=t[1];if("FeatureCollection"===e.type){const t=[];for(const i of e.features){const{type:e,coordinates:r}=i.geometry;"Polygon"===e&&t.push(r),"MultiPolygon"===e&&t.push(...r)}if(t.length)return new uu(e,{type:"MultiPolygon",coordinates:t})}else if("Feature"===e.type){const t=e.geometry.type;if("Polygon"===t||"MultiPolygon"===t)return new uu(e,e.geometry)}else if("Polygon"===e.type||"MultiPolygon"===e.type)return new uu(e,e)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){const i=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],o=t.canonicalID();if("Polygon"===e.type){const n=Zt(e.coordinates,r,o),a=Wt(t.geometry(),i,r,o);if(!Lt(i,r))return!1;for(const t of a)if(!jt(t,n))return!1}if("MultiPolygon"===e.type){const n=$t(e.coordinates,r,o),a=Wt(t.geometry(),i,r,o);if(!Lt(i,r))return!1;for(const t of a)if(!Vt(t,n))return!1}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){const i=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],o=t.canonicalID();if("Polygon"===e.type){const n=Zt(e.coordinates,r,o),a=Ht(t.geometry(),i,r,o);if(!Lt(i,r))return!1;for(const t of a)if(!Nt(t,n))return!1}if("MultiPolygon"===e.type){const n=$t(e.coordinates,r,o),a=Ht(t.geometry(),i,r,o);if(!Lt(i,r))return!1;for(const t of a)if(!Ut(t,n))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let hu=class{constructor(t=[],e=(t,e)=>te?1:0){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:i}=this,r=e[t];for(;t>0;){const o=t-1>>1,n=e[o];if(i(r,n)>=0)break;e[t]=n,t=o}e[t]=r}_down(t){const{data:e,compare:i}=this,r=this.length>>1,o=e[t];for(;t=0)break;e[t]=e[r],t=r}e[t]=o}};const pu=1/298.257223563,du=pu*(2-pu),mu=Math.PI/180;class fu{constructor(t){const e=6378.137*mu*1e3,i=Math.cos(t*mu),r=1/(1-du*(1-i*i)),o=Math.sqrt(r);this.kx=e*o*i,this.ky=e*o*r*(1-du)}distance(t,e){const i=this.wrap(t[0]-e[0])*this.kx,r=(t[1]-e[1])*this.ky;return Math.sqrt(i*i+r*r)}pointOnLine(t,e){let i,r,o,n,a=1/0;for(let s=0;s1?(l=t[s+1][0],c=t[s+1][1]):p>0&&(l+=u/this.kx*p,c+=h/this.ky*p)),u=this.wrap(e[0]-l)*this.kx,h=(e[1]-c)*this.ky;const d=u*u+h*h;d180;)t-=360;return t}}class _u{constructor(t,e){this.type=Zl,this.geojson=t,this.geometries=e}static parse(t,e){if(2!==t.length)return e.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Tt(t[1])){const e=t[1];if("FeatureCollection"===e.type)return new _u(e,e.features.map(t=>xe(t.geometry)).flat());if("Feature"===e.type)return new _u(e,xe(e.geometry));if("type"in e&&"coordinates"in e)return new _u(e,xe(e))}return e.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){const i=t.geometry(),r=i.flat().map(e=>Dt([e.x,e.y],t.canonical));if(0===i.length)return NaN;const o=new fu(r[0][1]);let n=1/0;for(const t of e){switch(t.type){case"Point":n=Math.min(n,be(r,!1,[t.coordinates],!1,o,n));break;case"LineString":n=Math.min(n,be(r,!1,t.coordinates,!0,o,n));break;case"Polygon":n=Math.min(n,ve(r,!1,t.coordinates,o,n))}if(0===n)return n}return n}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){const i=t.geometry(),r=i.flat().map(e=>Dt([e.x,e.y],t.canonical));if(0===i.length)return NaN;const o=new fu(r[0][1]);let n=1/0;for(const t of e){switch(t.type){case"Point":n=Math.min(n,be(r,!0,[t.coordinates],!1,o,n));break;case"LineString":n=Math.min(n,be(r,!0,t.coordinates,!0,o,n));break;case"Polygon":n=Math.min(n,ve(r,!0,t.coordinates,o,n))}if(0===n)return n}return n}(t,this.geometries);if("Polygon"===t.geometryType())return function(t,e){const i=t.geometry();if(0===i.length||0===i[0].length)return NaN;const r=Jt(i,0).map(e=>e.map(e=>e.map(e=>Dt([e.x,e.y],t.canonical)))),o=new fu(r[0][0][0][1]);let n=1/0;for(const t of e)for(const e of r){switch(t.type){case"Point":n=Math.min(n,ve([t.coordinates],!1,e,o,n));break;case"LineString":n=Math.min(n,ve(t.coordinates,!0,e,o,n));break;case"Polygon":n=Math.min(n,_e(e,t.coordinates,o,n))}if(0===n)return n}return n}(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class gu{constructor(t){this.type=Xl,this.key=t}static parse(t,e){if(2!==t.length)return e.error(`Expected 1 argument, but found ${t.length-1} instead.`);const i=t[1];return null==i?e.error("Global state property must be defined."):"string"!=typeof i?e.error(`Global state property must be string, but found ${typeof t[1]} instead.`):new gu(i)}evaluate(t){var e;const i=null===(e=t.globals)||void 0===e?void 0:e.globalState;return i&&0!==Object.keys(i).length?ft(i,this.key):null}eachChild(){}outputDefined(){return!1}}const yu={"==":Jc,"!=":Qc,">":eu,"<":tu,">=":ru,"<=":iu,array:Cc,at:Bc,boolean:Cc,case:Uc,coalesce:Kc,collator:ou,format:au,image:su,in:jc,"index-of":Vc,interpolate:Yc,"interpolate-hcl":Yc,"interpolate-lab":Yc,length:lu,let:Rc,literal:Ac,match:Nc,number:Cc,"number-format":nu,object:Cc,slice:Gc,step:Zc,string:Cc,"to-boolean":zc,"to-color":zc,"to-number":zc,"to-string":zc,var:Fc,within:uu,distance:_u,"global-state":gu};class vu{constructor(t,e,i,r){this.name=t,this.type=e,this._evaluate=i,this.args=r}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,e){const i=t[0],r=vu.definitions[i];if(!r)return e.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);const o=Array.isArray(r)?r[0]:r.type,n=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,a=n.filter(([e])=>!Array.isArray(e)||e.length===t.length-1);let s=null;for(const[r,n]of a){s=new Lc(e.registry,Se,e.path,null,e.scope);const a=[];let l=!1;for(let e=1;e{return e=t,Array.isArray(e)?`(${e.map(rt).join(", ")})`:`(${rt(e.type)}...)`;var e}).join(" | "),r=[];for(let i=1;i{throw new Tc(e.evaluate(t))}],typeof:[$l,[Xl],(t,[e])=>rt(kt(e.evaluate(t)))],"to-rgba":[it(Zl,4),[Wl],(t,[e])=>{const[i,r,o,n]=e.evaluate(t).rgb;return[255*i,255*r,255*o,n]}],rgb:[Wl,[Zl,Zl,Zl],we],rgba:[Wl,[Zl,Zl,Zl,Zl],we],has:{type:ql,overloads:[[[$l],(t,[e])=>Te(e.evaluate(t),t.properties())],[[$l,Yl],(t,[e,i])=>Te(e.evaluate(t),i.evaluate(t))]]},get:{type:Xl,overloads:[[[$l],(t,[e])=>ke(e.evaluate(t),t.properties())],[[$l,Yl],(t,[e,i])=>ke(e.evaluate(t),i.evaluate(t))]]},"feature-state":[Xl,[$l],(t,[e])=>ke(e.evaluate(t),t.featureState||{})],properties:[Yl,[],t=>t.properties()],"geometry-type":[$l,[],t=>t.geometryType()],id:[Xl,[],t=>t.id()],zoom:[Zl,[],t=>t.globals.zoom],"heatmap-density":[Zl,[],t=>t.globals.heatmapDensity||0],elevation:[Zl,[],t=>t.globals.elevation||0],"line-progress":[Zl,[],t=>t.globals.lineProgress||0],accumulated:[Xl,[],t=>void 0===t.globals.accumulated?null:t.globals.accumulated],"+":[Zl,Me(Zl),(t,e)=>{let i=0;for(const r of e)i+=r.evaluate(t);return i}],"*":[Zl,Me(Zl),(t,e)=>{let i=1;for(const r of e)i*=r.evaluate(t);return i}],"-":{type:Zl,overloads:[[[Zl,Zl],(t,[e,i])=>e.evaluate(t)-i.evaluate(t)],[[Zl],(t,[e])=>-e.evaluate(t)]]},"/":[Zl,[Zl,Zl],(t,[e,i])=>e.evaluate(t)/i.evaluate(t)],"%":[Zl,[Zl,Zl],(t,[e,i])=>e.evaluate(t)%i.evaluate(t)],ln2:[Zl,[],()=>Math.LN2],pi:[Zl,[],()=>Math.PI],e:[Zl,[],()=>Math.E],"^":[Zl,[Zl,Zl],(t,[e,i])=>Math.pow(e.evaluate(t),i.evaluate(t))],sqrt:[Zl,[Zl],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[Zl,[Zl],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[Zl,[Zl],(t,[e])=>Math.log(e.evaluate(t))],log2:[Zl,[Zl],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[Zl,[Zl],(t,[e])=>Math.sin(e.evaluate(t))],cos:[Zl,[Zl],(t,[e])=>Math.cos(e.evaluate(t))],tan:[Zl,[Zl],(t,[e])=>Math.tan(e.evaluate(t))],asin:[Zl,[Zl],(t,[e])=>Math.asin(e.evaluate(t))],acos:[Zl,[Zl],(t,[e])=>Math.acos(e.evaluate(t))],atan:[Zl,[Zl],(t,[e])=>Math.atan(e.evaluate(t))],min:[Zl,Me(Zl),(t,e)=>Math.min(...e.map(e=>e.evaluate(t)))],max:[Zl,Me(Zl),(t,e)=>Math.max(...e.map(e=>e.evaluate(t)))],abs:[Zl,[Zl],(t,[e])=>Math.abs(e.evaluate(t))],round:[Zl,[Zl],(t,[e])=>{const i=e.evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[Zl,[Zl],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[Zl,[Zl],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[ql,[$l,Xl],(t,[e,i])=>t.properties()[e.value]===i.value],"filter-id-==":[ql,[Xl],(t,[e])=>t.id()===e.value],"filter-type-==":[ql,[$l],(t,[e])=>t.geometryType()===e.value],"filter-<":[ql,[$l,Xl],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r{const i=t.id(),r=e.value;return typeof i==typeof r&&i":[ql,[$l,Xl],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r>o}],"filter-id->":[ql,[Xl],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i>r}],"filter-<=":[ql,[$l,Xl],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r<=o}],"filter-id-<=":[ql,[Xl],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i<=r}],"filter->=":[ql,[$l,Xl],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r>=o}],"filter-id->=":[ql,[Xl],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i>=r}],"filter-has":[ql,[Xl],(t,[e])=>e.value in t.properties()],"filter-has-id":[ql,[],t=>null!==t.id()&&void 0!==t.id()],"filter-type-in":[ql,[it($l)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[ql,[it(Xl)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[ql,[$l,it(Xl)],(t,[e,i])=>i.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[ql,[$l,it(Xl)],(t,[e,i])=>function(t,e,i,r){for(;i<=r;){const o=i+r>>1;if(e[o]===t)return!0;e[o]>t?r=o-1:i=o+1}return!1}(t.properties()[e.value],i.value,0,i.value.length-1)],all:{type:ql,overloads:[[[ql,ql],(t,[e,i])=>e.evaluate(t)&&i.evaluate(t)],[Me(ql),(t,e)=>{for(const i of e)if(!i.evaluate(t))return!1;return!0}]]},any:{type:ql,overloads:[[[ql,ql],(t,[e,i])=>e.evaluate(t)||i.evaluate(t)],[Me(ql),(t,e)=>{for(const i of e)if(i.evaluate(t))return!0;return!1}]]},"!":[ql,[ql],(t,[e])=>!e.evaluate(t)],"is-supported-script":[ql,[$l],(t,[e])=>{const i=t.globals&&t.globals.isSupportedScript;return!i||i(e.evaluate(t))}],upcase:[$l,[$l],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[$l,[$l],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[$l,Me(Xl),(t,e)=>e.map(e=>Mt(e.evaluate(t))).join("")],split:[it($l),[$l,$l],(t,[e,i])=>e.evaluate(t).split(i.evaluate(t))],join:[$l,[it($l),$l],(t,[e,i])=>e.evaluate(t).join(i.evaluate(t))],"resolved-locale":[$l,[Kl],(t,[e])=>e.evaluate(t).resolvedLocale()]});class bu{constructor(t,e,i){this.expression=t,this._warningHistory={},this._evaluator=new Oc,this._defaultValue=e?function(t){if("color"===t.type&&Re(t.default))return new fc(0,0,0,0);switch(t.type){case"color":return fc.parse(t.default)||null;case"padding":return bc.parse(t.default)||null;case"numberArray":return xc.parse(t.default)||null;case"colorArray":return wc.parse(t.default)||null;case"variableAnchorOffsetCollection":return Mc.parse(t.default)||null;case"projectionDefinition":return Pc.parse(t.default)||null;default:return void 0===t.default?null:t.default}}(e):null,this._enumValues=e&&"enum"===e.type?e.values:null,this._globalState=i}evaluateWithoutErrorHandling(t,e,i,r,o,n){return this._globalState&&(t=Ye(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=i,this._evaluator.canonical=r,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=n,this.expression.evaluate(this._evaluator)}evaluate(t,e,i,r,o,n){this._globalState&&(t=Ye(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=i||null,this._evaluator.canonical=r,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=n||null;try{const t=this.expression.evaluate(this._evaluator);if(null==t||"number"==typeof t&&t!=t)return this._defaultValue;if(this._enumValues&&!(t in this._enumValues))throw new Tc(`Expected value to be one of ${Object.keys(this._enumValues).map(t=>JSON.stringify(t)).join(", ")}, but found ${JSON.stringify(t)} instead.`);return t}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}class xu{constructor(t,e,i){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Ae(e.expression),this.globalStateRefs=He(e.expression),this._globalState=i}evaluateWithoutErrorHandling(t,e,i,r,o,n){return this._globalState&&(t=Ye(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,e,i,r,o,n)}evaluate(t,e,i,r,o,n){return this._globalState&&(t=Ye(t,this._globalState)),this._styleExpression.evaluate(t,e,i,r,o,n)}}class wu{constructor(t,e,i,r,o){this.kind=t,this.zoomStops=i,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Ae(e.expression),this.globalStateRefs=He(e.expression),this.interpolationType=r,this._globalState=o}evaluateWithoutErrorHandling(t,e,i,r,o,n){return this._globalState&&(t=Ye(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,e,i,r,o,n)}evaluate(t,e,i,r,o,n){return this._globalState&&(t=Ye(t,this._globalState)),this._styleExpression.evaluate(t,e,i,r,o,n)}interpolationFactor(t,e,i){return this.interpolationType?Yc.interpolationFactor(this.interpolationType,t,e,i):0}}class Tu{constructor(t,e){this._parameters=t,this._specification=e,et(this,Be(this._parameters,this._specification))}static deserialize(t){return new Tu(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}const ku={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},Mu={promoteId:function({key:t,value:e}){if("string"===Le(e))return Ti({key:t,value:e});{const i=[];for(const r in e)i.push(...Ti({key:`${t}.${r}`,value:e[r]}));return i}}},Su={"*":()=>[],array:hi,boolean:function(t){const e=t.value,i=t.key,r=Le(e);return"boolean"!==r?[new Vl(i,e,`boolean expected, ${r} found`)]:[]},number:pi,color:fi,constants:si,enum:_i,filter:gi,function:di,layer:wi,object:ui,source:ki,light:Mi,sky:Si,terrain:Pi,projection:function(t){const e=t.value,i=t.styleSpec,r=i.projection,o=t.style,n=Le(e);if(void 0===e)return[];if("object"!==n)return[new Vl("projection",e,`object expected, ${n} found`)];let a=[];for(const n in e)a=a.concat(r[n]?t.validateSpec({key:n,value:e[n],valueSpec:r[n],style:o,styleSpec:i}):[new Vl(n,e[n],`unknown property "${n}"`)]);return a},projectionDefinition:function(t){const e=t.key;let i=t.value;i=i instanceof String?i.valueOf():i;const r=Le(i);return"array"!==r||function(t){return Array.isArray(t)&&3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]&&"number"==typeof t[2]}(i)||function(t){return!!["interpolate","step","literal"].includes(t[0])}(i)?["array","string"].includes(r)?[]:[new Vl(e,i,`projection expected, invalid type "${r}" found`)]:[new Vl(e,i,`projection expected, invalid array ${JSON.stringify(i)} found`)]},string:Ti,formatted:function(t){return 0===Ti(t).length?[]:mi(t)},resolvedImage:function(t){return 0===Ti(t).length?[]:mi(t)},padding:function(t){const e=t.key,i=t.value;if("array"===Le(i)){if(i.length<1||i.length>4)return[new Vl(e,i,`padding requires 1 to 4 values; ${i.length} values found`)];const r={type:"number"};let o=[];for(let n=0;n`${t.key}: ${t.message}`).join(", "));this._literalValue=void 0,this._compiledValue=e.value,this._globalStateRefs=He(e.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}const Iu=Bl,Cu=Di,Eu=Cu.light,zu=Cu.sky,Du=Cu.paintProperty,Ou=Cu.layoutProperty;class Lu{constructor(t,e,i){const r=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;const o=new Int32Array(this.arrayBuffer);t=o[0],this.d=(e=o[1])+2*(i=o[2]);for(let t=0;t=c[l+0]&&r>=c[l+1])?(a[u]=!0,n.push(o[u])):a[u]=!1}}}_forEachCell(t,e,i,r,o,n,a,s){const l=this._convertToCellCoord(t),c=this._convertToCellCoord(e),u=this._convertToCellCoord(i),h=this._convertToCellCoord(r);for(let p=l;p<=u;p++)for(let l=c;l<=h;l++){const c=this.d*l+p;if((!s||s(this._convertFromCellCoord(p),this._convertFromCellCoord(l),this._convertFromCellCoord(p+1),this._convertFromCellCoord(l+1)))&&o.call(this,t,e,i,r,c,n,a,s))return}}_convertFromCellCoord(t){return(t-this.padding)/this.scale}_convertToCellCoord(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const t=this.cells,e=3+this.cells.length+1+1;let i=0;for(const t of this.cells)i+=t.length;const r=new Int32Array(e+i+this.keys.length+this.bboxes.length);r[0]=this.extent,r[1]=this.n,r[2]=this.padding;let o=e;for(let e=0;ei?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=e):this.lastFloorZoom{}}setState(t){this.pluginStatus=t.pluginStatus,this.pluginURL=t.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(t){if(Vu.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=t.applyArabicShaping,this.processBidirectionalText=t.processBidirectionalText,this.processStyledBidirectionalText=t.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getRTLTextPluginStatus(){return this.pluginStatus}syncState(t,i){return e(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if("loading"!==t.pluginStatus)return this.setState(t),t ;const e=t.pluginURL,r=new Promise(t=>{this.loadScriptResolve=t});i(e);const o=new Promise(t=>setTimeout(()=>t(),this.TIMEOUT));if(yield Promise.race([r,o]),this.isParsed()){const t={pluginStatus:"loaded",pluginURL:e};return this.setState(t),t}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${e}`)})}};class Nu{constructor(t,e){this.isSupportedScript=er,this.zoom=t,e?(this.now=e.now||0,this.fadeDuration=e.fadeDuration||0,this.zoomHistory=e.zoomHistory||new Fu,this.transition=e.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Fu,this.transition={})}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const t=this.zoom,e=t-Math.floor(t),i=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*i}:{fromScale:.5,toScale:1,t:1-(1-i)*e}}}const Uu="-transition";class Gu{constructor(t,e,i){this.property=t,this.value=e,this.expression=function(t,e,i){if(Re(t))return new Tu(t,e);if(Ze(t)){const r=qe(t,e,i);if("error"===r.result)throw new Error(r.value.map(t=>`${t.key}: ${t.message}`).join(", "));return r.value}{let i=t;return"color"===e.type&&"string"==typeof t?i=fc.parse(t):"padding"!==e.type||"number"!=typeof t&&!Array.isArray(t)?"numberArray"!==e.type||"number"!=typeof t&&!Array.isArray(t)?"colorArray"!==e.type||"string"!=typeof t&&!Array.isArray(t)?"variableAnchorOffsetCollection"===e.type&&Array.isArray(t)?i=Mc.parse(t):"projectionDefinition"===e.type&&"string"==typeof t&&(i=Pc.parse(t)):i=wc.parse(t):i=xc.parse(t):i=bc.parse(t),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>i}}}(void 0===e?t.specification.default:e,t.specification,i)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(t,e,i){return this.property.possiblyEvaluate(this,t,e,i)}}class Zu{constructor(t,e){this.property=t,this.value=new Gu(t,void 0,e)}transitioned(t,e){return new qu(this.property,this.value,e,P({},t.transition,this.transition),t.now)}untransitioned(){return new qu(this.property,this.value,null,{},0)}}class $u{constructor(t,e){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues),this._globalState=e}hasProperty(t){return t in this._properties.defaultTransitionablePropertyValues}getValue(t){return C(this._values[t].value.value)}setValue(t,e){Object.hasOwn(this._values,t)||(this._values[t]=new Zu(this._values[t].property,this._globalState)),this._values[t].value=new Gu(this._values[t].property,null===e?void 0:C(e),this._globalState)}getTransition(t){return C(this._values[t].transition)}setTransition(t,e){Object.hasOwn(this._values,t)||(this._values[t]=new Zu(this._values[t].property,this._globalState)),this._values[t].transition=C(e)||void 0}serialize(){const t={};for(const e of Object.keys(this._values)){const i=this.getValue(e);void 0!==i&&(t[e]=i);const r=this.getTransition(e);void 0!==r&&(t[`${e}${Uu}`]=r)}return t}transitioned(t,e){const i=new Wu(this._properties);for(const r of Object.keys(this._values))i._values[r]=this._values[r].transitioned(t,e._values[r]);return i}untransitioned(){const t=new Wu(this._properties);for(const e of Object.keys(this._values))t._values[e]=this._values[e].untransitioned();return t}}class qu{constructor(t,e,i,r,o){this.property=t,this.value=e,this.begin=o+r.delay||0,this.end=this.begin+r.duration||0,t.specification.transition&&(r.delay||r.duration)&&(this.prior=i)}possiblyEvaluate(t,e,i){const r=t.now||0,o=this.value.possiblyEvaluate(t,e,i),n=this.prior;if(n){if(r>this.end)return this.prior=null,o;if(this.value.isDataDriven())return this.prior=null,o;if(rr.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:i,to:e}}interpolate(t){return t}}class th{constructor(t){this.specification=t}possiblyEvaluate(t,e,i,r){if(void 0!==t.value){if("constant"===t.expression.kind){const o=t.expression.evaluate(e,null,{},i,r);return this._calculate(o,o,o,e)}return this._calculate(t.expression.evaluate(new Nu(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Nu(Math.floor(e.zoom),e)),t.expression.evaluate(new Nu(Math.floor(e.zoom+1),e)),e)}}_calculate(t,e,i,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:i,to:e}}interpolate(t){return t}}class eh{constructor(t){this.specification=t}possiblyEvaluate(t,e,i,r){return!!t.expression.evaluate(e,null,{},i,r)}interpolate(){return!1}}class ih{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const e in t){const i=t[e];i.specification.overridable&&this.overridableProperties.push(e);const r=this.defaultPropertyValues[e]=new Gu(i,void 0,void 0),o=this.defaultTransitionablePropertyValues[e]=new Zu(i,void 0);this.defaultTransitioningPropertyValues[e]=o.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=r.possiblyEvaluate({})}}}Bi("DataDrivenProperty",Ju),Bi("DataConstantProperty",Ku),Bi("CrossFadedDataDrivenProperty",Qu),Bi("CrossFadedProperty",th),Bi("ColorRampProperty",eh);const rh=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",oh=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class nh extends Fl{constructor(t,e,i){if(super(),this.id=t.id,this.type=t.type,this._globalState=i,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=function(t,e){return new Au(t,e)}(this.visibility,i),"custom"!==t.type&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter,this._featureFilter=Ke(t.filter,i)),e.layout&&(this._unevaluatedLayout=new Hu(e.layout,i)),e.paint)){this._transitionablePaint=new $u(e.paint,i);for(const e in t.paint)this.setPaintProperty(e,t.paint[e],{validate:!1});for(const e in t.layout)this.setLayoutProperty(e,t.layout[e],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Xu(e.paint)}}setFilter(t){this.filter=t,this._featureFilter=Ke(t,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){var e;if("visibility"===t)return this.visibility;if(null===(e=this._transitionablePaint)||void 0===e?void 0:e.hasProperty(t))throw new Error(t+rh);if(!this._unevaluatedLayout)throw new Error(`Cannot get layout property "${t}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(t)}getLayoutAffectingGlobalStateRefs(){const t=new Set;for(const e of this._visibilityExpression.getGlobalStateRefs())t.add(e);if(this._unevaluatedLayout)for(const e in this._unevaluatedLayout._values){const i=this._unevaluatedLayout._values[e];for(const e of i.getGlobalStateRefs())t.add(e)}for(const e of this._featureFilter.getGlobalStateRefs())t.add(e);return t}getPaintAffectingGlobalStateRefs(){var t;const e=new globalThis.Map;if(this._transitionablePaint)for(const i in this._transitionablePaint._values){const r=this._transitionablePaint._values[i].value;for(const o of r.getGlobalStateRefs()){const n=null!==(t=e.get(o))&&void 0!==t?t:[];n.push({name:i,value:r.value}),e.set(o,n)}}return e}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(t,e,i={}){var r;if("visibility"===t)return this.visibility=e,this._visibilityExpression.setValue(e),void this.recalculateVisibility();(null===(r=this._transitionablePaint)||void 0===r?void 0:r.hasProperty(t))?this.fire(new Rl(new Error(t+rh))):null!=e&&this._validate(Ou,`layers.${this.id}.layout.${t}`,t,e,i)||this._unevaluatedLayout.setValue(t,e)}getPaintProperty(t){var e,i;if(t.endsWith(Uu)){const i=t.slice(0,-11);if("visibility"===i||(null===(e=this._unevaluatedLayout)||void 0===e?void 0:e.hasProperty(i)))throw new Error(t+oh);return this._transitionablePaint.getTransition(i)}if("visibility"===t||(null===(i=this._unevaluatedLayout)||void 0===i?void 0:i.hasProperty(t)))throw new Error(t+oh);return this._transitionablePaint.getValue(t)}setPaintProperty(t,e,i={}){var r;if("visibility"===t||(null===(r=this._unevaluatedLayout)||void 0===r?void 0:r.hasProperty(t)))return this.fire(new Rl(new Error(t+oh))),!1;if(null!=e&&this._validate(Du,`layers.${this.id}.paint.${t}`,t,e,i))return!1;if(t.endsWith(Uu))return this._transitionablePaint.setTransition(t.slice(0,-11),e||void 0),!1;{const i=this._transitionablePaint._values[t],r="cross-faded-data-driven"===i.property.specification["property-type"],o=i.value.isDataDriven(),n=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);const a=this._transitionablePaint._values[t].value;return a.isDataDriven()||o||r||this._handleOverridablePaintPropertyUpdate(t,n,a)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,e,i){return!1}isHidden(t=this.minzoom,e=!1){return!!(this.minzoom&&t<(e?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this._evaluatedVisibility}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)}serialize(){var t,e;const i={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:null===(t=this._unevaluatedLayout)||void 0===t?void 0:t.serialize(),paint:null===(e=this._transitionablePaint)||void 0===e?void 0:e.serialize()};return this.visibility&&(i.layout||(i.layout={}),i.layout.visibility=this.visibility),I(i,(t,e)=>!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length))}_validate(t,e,i,r,o={}){return!1!==(null==o?void 0:o.validate)&&Fi(this,t.call(Cu,{key:e,layerType:this.type,objectKey:i,value:r,styleSpec:Bl,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const t in this.paint._values){const e=this.paint.get(t);if(e instanceof Yu&&ze(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1}}let ah;var sh={get paint(){return ah=ah||new ih({"raster-opacity":new Ku(Bl.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ku(Bl.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ku(Bl.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ku(Bl.paint_raster["raster-brightness-max"]),"raster-saturation":new Ku(Bl.paint_raster["raster-saturation"]),"raster-contrast":new Ku(Bl.paint_raster["raster-contrast"]),resampling:new Ku(Bl.paint_raster.resampling),"raster-resampling":new Ku(Bl.paint_raster["raster-resampling"]),"raster-fade-duration":new Ku(Bl.paint_raster["raster-fade-duration"])})}};class lh extends nh{constructor(t,e){super(t,sh,e)}}const ch={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class uh{constructor(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class hh{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){const e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}class ph extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e){const i=this.length;return this.resize(i+1),this.emplace(i,t,e)}emplace(t,e,i){const r=2*t;return this.int16[r+0]=e,this.int16[r+1]=i,t}}ph.prototype.bytesPerElement=4,Bi("StructArrayLayout2i4",ph);class dh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)}emplace(t,e,i,r){const o=3*t;return this.int16[o+0]=e,this.int16[o+1]=i,this.int16[o+2]=r,t}}dh.prototype.bytesPerElement=6,Bi("StructArrayLayout3i6",dh);class mh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i,r){const o=this.length;return this.resize(o+1),this.emplace(o,t,e,i,r)}emplace(t,e,i,r,o){const n=4*t;return this.int16[n+0]=e,this.int16[n+1]=i,this.int16[n+2]=r,this.int16[n+3]=o,t}}mh.prototype.bytesPerElement=8,Bi("StructArrayLayout4i8",mh);class fh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,i,r,o,n)}emplace(t,e,i,r,o,n,a){const s=6*t;return this.int16[s+0]=e,this.int16[s+1]=i,this.int16[s+2]=r,this.int16[s+3]=o,this.int16[s+4]=n,this.int16[s+5]=a,t}}fh.prototype.bytesPerElement=12,Bi("StructArrayLayout2i4i12",fh);class _h extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,i,r,o,n)}emplace(t,e,i,r,o,n,a){const s=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=i,this.uint8[l+4]=r,this.uint8[l+5]=o,this.uint8[l+6]=n,this.uint8[l+7]=a,t}}_h.prototype.bytesPerElement=8,Bi("StructArrayLayout2i4ub8",_h);class gh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e){const i=this.length;return this.resize(i+1),this.emplace(i,t,e)}emplace(t,e,i){const r=2*t;return this.float32[r+0]=e,this.float32[r+1]=i,t}}gh.prototype.bytesPerElement=8,Bi("StructArrayLayout2f8",gh);class yh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n,a,s,l,c){const u=this.length;return this.resize(u+1),this.emplace(u,t,e,i,r,o,n,a,s,l,c)}emplace(t,e,i,r,o,n,a,s,l,c,u){const h=10*t;return this.uint16[h+0]=e,this.uint16[h+1]=i,this.uint16[h+2]=r,this.uint16[h+3]=o,this.uint16[h+4]=n,this.uint16[h+5]=a,this.uint16[h+6]=s,this.uint16[h+7]=l,this.uint16[h+8]=c,this.uint16[h+9]=u,t}}yh.prototype.bytesPerElement=20,Bi("StructArrayLayout10ui20",yh);class vh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n,a,s){const l=this.length;return this.resize(l+1),this.emplace(l,t,e,i,r,o,n,a,s)}emplace(t,e,i,r,o,n,a,s,l){const c=8*t;return this.uint16[c+0]=e,this.uint16[c+1]=i,this.uint16[c+2]=r,this.uint16[c+3]=o,this.uint16[c+4]=n,this.uint16[c+5]=a,this.uint16[c+6]=s,this.uint16[c+7]=l,t}}vh.prototype.bytesPerElement=16,Bi("StructArrayLayout8ui16",vh);class bh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n,a,s,l,c,u,h){const p=this.length;return this.resize(p+1),this.emplace(p,t,e,i,r,o,n,a,s,l,c,u,h)}emplace(t,e,i,r,o,n,a,s,l,c,u,h,p){const d=12*t;return this.int16[d+0]=e,this.int16[d+1]=i,this.int16[d+2]=r,this.int16[d+3]=o,this.uint16[d+4]=n,this.uint16[d+5]=a,this.uint16[d+6]=s,this.uint16[d+7]=l,this.int16[d+8]=c,this.int16[d+9]=u,this.int16[d+10]=h,this.int16[d+11]=p,t}}bh.prototype.bytesPerElement=24,Bi("StructArrayLayout4i4ui4i24",bh);class xh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)}emplace(t,e,i,r){const o=3*t;return this.float32[o+0]=e,this.float32[o+1]=i,this.float32[o+2]=r,t}}xh.prototype.bytesPerElement=12,Bi("StructArrayLayout3f12",xh);class wh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){return this.uint32[1*t+0]=e,t}}wh.prototype.bytesPerElement=4,Bi("StructArrayLayout1ul4",wh);class Th extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n,a,s,l){const c=this.length;return this.resize(c+1),this.emplace(c,t,e,i,r,o,n,a,s,l)}emplace(t,e,i,r,o,n,a,s,l,c){const u=10*t,h=5*t;return this.int16[u+0]=e,this.int16[u+1]=i,this.int16[u+2]=r,this.int16[u+3]=o,this.int16[u+4]=n,this.int16[u+5]=a,this.uint32[h+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,t}}Th.prototype.bytesPerElement=20,Bi("StructArrayLayout6i1ul2ui20",Th);class kh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,i,r,o,n)}emplace(t,e,i,r,o,n,a){const s=6*t;return this.int16[s+0]=e,this.int16[s+1]=i,this.int16[s+2]=r,this.int16[s+3]=o,this.int16[s+4]=n,this.int16[s+5]=a,t}}kh.prototype.bytesPerElement=12,Bi("StructArrayLayout2i2i2i12",kh);class Mh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o){const n=this.length;return this.resize(n+1),this.emplace(n,t,e,i,r,o)}emplace(t,e,i,r,o,n){const a=4*t,s=8*t;return this.float32[a+0]=e,this.float32[a+1]=i,this.float32[a+2]=r,this.int16[s+6]=o,this.int16[s+7]=n,t}}Mh.prototype.bytesPerElement=16,Bi("StructArrayLayout2f1f2i16",Mh);class Sh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,i,r,o,n)}emplace(t,e,i,r,o,n,a){const s=16*t,l=4*t,c=8*t;return this.uint8[s+0]=e,this.uint8[s+1]=i,this.float32[l+1]=r,this.float32[l+2]=o,this.int16[c+6]=n,this.int16[c+7]=a,t}}Sh.prototype.bytesPerElement=16,Bi("StructArrayLayout2ub2f2i16",Sh);class Ph extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)}emplace(t,e,i,r){const o=3*t;return this.uint16[o+0]=e,this.uint16[o+1]=i,this.uint16[o+2]=r,t}}Ph.prototype.bytesPerElement=6,Bi("StructArrayLayout3ui6",Ph);class Ah extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n,a,s,l,c,u,h,p,d,m,f,_){const g=this.length;return this.resize(g+1),this.emplace(g,t,e,i,r,o,n,a,s,l,c,u,h,p,d,m,f,_)}emplace(t,e,i,r,o,n,a,s,l,c,u,h,p,d,m,f,_,g){const y=24*t,v=12*t,b=48*t;return this.int16[y+0]=e,this.int16[y+1]=i,this.uint16[y+2]=r,this.uint16[y+3]=o,this.uint32[v+2]=n,this.uint32[v+3]=a,this.uint32[v+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=c,this.uint16[y+12]=u,this.float32[v+7]=h,this.float32[v+8]=p,this.uint8[b+36]=d,this.uint8[b+37]=m,this.uint8[b+38]=f,this.uint32[v+10]=_,this.int16[y+22]=g,t}}Ah.prototype.bytesPerElement=48,Bi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ah);class Ih extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n,a,s,l,c,u,h,p,d,m,f,_,g,y,v,b,x,w,T,k,M,S,P){const A=this.length;return this.resize(A+1),this.emplace(A,t,e,i,r,o,n,a,s,l,c,u,h,p,d,m,f,_,g,y,v,b,x,w,T,k,M,S,P)}emplace(t,e,i,r,o,n,a,s,l,c,u,h,p,d,m,f,_,g,y,v,b,x,w,T,k,M,S,P,A){const I=32*t,C=16*t;return this.int16[I+0]=e,this.int16[I+1]=i,this.int16[I+2]=r,this.int16[I+3]=o,this.int16[I+4]=n,this.int16[I+5]=a,this.int16[I+6]=s,this.int16[I+7]=l,this.uint16[I+8]=c,this.uint16[I+9]=u,this.uint16[I+10]=h,this.uint16[I+11]=p,this.uint16[I+12]=d,this.uint16[I+13]=m,this.uint16[I+14]=f,this.uint16[I+15]=_,this.uint16[I+16]=g,this.uint16[I+17]=y,this.uint16[I+18]=v,this.uint16[I+19]=b,this.uint16[I+20]=x,this.uint16[I+21]=w,this.uint16[I+22]=T,this.uint32[C+12]=k,this.float32[C+13]=M,this.float32[C+14]=S,this.uint16[I+30]=P,this.uint16[I+31]=A,t}}Ih.prototype.bytesPerElement=64,Bi("StructArrayLayout8i15ui1ul2f2ui64",Ih);class Ch extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){return this.float32[1*t+0]=e,t}}Ch.prototype.bytesPerElement=4,Bi("StructArrayLayout1f4",Ch);class Eh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)}emplace(t,e,i,r){const o=3*t;return this.uint16[6*t+0]=e,this.float32[o+1]=i,this.float32[o+2]=r,t}}Eh.prototype.bytesPerElement=12,Bi("StructArrayLayout1ui2f12",Eh);class zh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)}emplace(t,e,i,r){const o=4*t;return this.uint32[2*t+0]=e,this.uint16[o+2]=i,this.uint16[o+3]=r,t}}zh.prototype.bytesPerElement=8,Bi("StructArrayLayout1ul2ui8",zh);class Dh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e){const i=this.length;return this.resize(i+1),this.emplace(i,t,e)}emplace(t,e,i){const r=2*t;return this.uint16[r+0]=e,this.uint16[r+1]=i,t}}Dh.prototype.bytesPerElement=4,Bi("StructArrayLayout2ui4",Dh);class Oh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){return this.uint16[1*t+0]=e,t}}Oh.prototype.bytesPerElement=2,Bi("StructArrayLayout1ui2",Oh);class Lh extends hh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i,r){const o=this.length;return this.resize(o+1),this.emplace(o,t,e,i,r)}emplace(t,e,i,r,o){const n=4*t;return this.float32[n+0]=e,this.float32[n+1]=i,this.float32[n+2]=r,this.float32[n+3]=o,t}}Lh.prototype.bytesPerElement=16,Bi("StructArrayLayout4f16",Lh);class Rh extends uh{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new i(this.anchorPointX,this.anchorPointY)}}Rh.prototype.size=20;class Fh extends Th{get(t){return new Rh(this,t)}}Bi("CollisionBoxArray",Fh);class Bh extends uh{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(t){this._structArray.uint8[this._pos1+37]=t}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(t){this._structArray.uint8[this._pos1+38]=t}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(t){this._structArray.uint32[this._pos4+10]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Bh.prototype.size=48;class jh extends Ah{get(t){return new Bh(this,t)}}Bi("PlacedSymbolArray",jh);class Vh extends uh{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(t){this._structArray.uint32[this._pos4+12]=t}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Vh.prototype.size=64;class Nh extends Ih{get(t){return new Vh(this,t)}}Bi("SymbolInstanceArray",Nh);class Uh extends Ch{getoffsetX(t){return this.float32[1*t+0]}}Bi("GlyphOffsetArray",Uh);class Gh extends dh{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}Bi("SymbolLineVertexArray",Gh);class Zh extends uh{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Zh.prototype.size=12;class $h extends Eh{get(t){return new Zh(this,t)}}Bi("TextAnchorOffsetArray",$h);class qh extends uh{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]} get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}qh.prototype.size=8;class Wh extends zh{get(t){return new qh(this,t)}}Bi("FeatureIndexArray",Wh);class Hh extends ph{}class Yh extends ph{}class Xh extends ph{}class Kh extends fh{}class Jh extends _h{}class Qh extends gh{}class tp extends yh{}class ep extends vh{}class ip extends bh{}class rp extends xh{}class op extends wh{}class np extends kh{}class ap extends Sh{}class sp extends Ph{}class lp extends Dh{}const cp=ir([{name:"a_pos",components:2,type:"Int16"}],4),{members:up}=cp;class hp{constructor(t=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=t}prepareSegment(t,e,i,r){const o=this.segments[this.segments.length-1];return t>hp.MAX_VERTEX_ARRAY_LENGTH&&E(`Max vertices per segment is ${hp.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${hp.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!o||o.vertexLength+t>hp.MAX_VERTEX_ARRAY_LENGTH||o.sortKey!==r?this.createNewSegment(e,i,r):o}createNewSegment(t,e,i){const r={vertexOffset:t.length,primitiveOffset:e.length,vertexLength:0,primitiveLength:0,vaos:{}};return void 0!==i&&(r.sortKey=i),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(r),r}getOrCreateLatestSegment(t,e,i){return this.prepareSegment(0,t,e,i)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(const t of this.segments)for(const e in t.vaos)t.vaos[e].destroy()}static simpleSegment(t,e,i,r){return new hp([{vertexOffset:t,primitiveOffset:e,vertexLength:i,primitiveLength:r,vaos:{},sortKey:0}])}}hp.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Bi("SegmentVector",hp);const pp=ir([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),dp=ir([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var mp,fp,_p,gp={exports:{}},yp={exports:{}},vp={exports:{}},bp=function(){if(_p)return gp.exports;_p=1;var t=(mp||(mp=1,yp.exports=function(t,e){var i,r,o,n,a,s,l,c;for(r=t.length-(i=3&t.length),o=e,a=3432918353,s=461845907,c=0;c>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|o>>>19))+((5*(o>>>16)&65535)<<16)&4294967295))+((58964+(n>>>16)&65535)<<16);switch(l=0,i){case 3:l^=(255&t.charCodeAt(c+2))<<16;case 2:l^=(255&t.charCodeAt(c+1))<<8;case 1:o^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(c)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return o^=t.length,o=2246822507*(65535&(o^=o>>>16))+((2246822507*(o>>>16)&65535)<<16)&4294967295,o=3266489909*(65535&(o^=o>>>13))+((3266489909*(o>>>16)&65535)<<16)&4294967295,(o^=o>>>16)>>>0}),yp.exports),e=(fp||(fp=1,vp.exports=function(t,e){for(var i,r=t.length,o=e^r,n=0;r>=4;)i=1540483477*(65535&(i=255&t.charCodeAt(n)|(255&t.charCodeAt(++n))<<8|(255&t.charCodeAt(++n))<<16|(255&t.charCodeAt(++n))<<24))+((1540483477*(i>>>16)&65535)<<16),o=1540483477*(65535&o)+((1540483477*(o>>>16)&65535)<<16)^(i=1540483477*(65535&(i^=i>>>24))+((1540483477*(i>>>16)&65535)<<16)),r-=4,++n;switch(r){case 3:o^=(255&t.charCodeAt(n+2))<<16;case 2:o^=(255&t.charCodeAt(n+1))<<8;case 1:o=1540483477*(65535&(o^=255&t.charCodeAt(n)))+((1540483477*(o>>>16)&65535)<<16)}return o=1540483477*(65535&(o^=o>>>13))+((1540483477*(o>>>16)&65535)<<16),(o^=o>>>15)>>>0}),vp.exports);return gp.exports=t,gp.exports.murmur3=t,gp.exports.murmur2=e,gp.exports}(),xp=r(bp);class wp{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,e,i,r){this.ids.push(nr(t)),this.positions.push(e,i,r)}getPositions(t){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const e=nr(t);let i=0,r=this.ids.length-1;for(;i>1;this.ids[t]>=e?r=t:i=t+1}const o=[];for(;this.ids[i]===e;)o.push({index:this.positions[3*i],start:this.positions[3*i+1],end:this.positions[3*i+2]}),i++;return o}static serialize(t,e){const i=new Float64Array(t.ids),r=new Uint32Array(t.positions);return ar(i,r,0,i.length-1),e&&e.push(i.buffer,r.buffer),{ids:i,positions:r}}static deserialize(t){const e=new wp;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e}}Bi("FeaturePositionMap",wp);class Tp{constructor(t,e){this.gl=t.gl,this.location=e}}class kp extends Tp{constructor(t,e){super(t,e),this.current=0}set(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))}}class Mp extends Tp{constructor(t,e){super(t,e),this.current=[0,0,0,0]}set(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))}}class Sp extends Tp{constructor(t,e){super(t,e),this.current=fc.transparent}set(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))}}const Pp=new Float32Array(16);class Ap{constructor(t,e,i){this.value=t,this.uniformNames=e.map(t=>`u_${t}`),this.type=i}setUniform(t,e,i){t.set(i.constantOr(this.value))}getBinding(t,e,i){return"color"===this.type?new Sp(t,e):new kp(t,e)}}class Ip{constructor(t,e){this.uniformNames=e.map(t=>`u_${t}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr}setConstantDashPositions(t,e){this.dashTo=[0,t.y,t.height,t.width],this.dashFrom=[0,e.y,e.height,e.width]}setUniform(t,e,i,r){let o=null;"u_pattern_to"===r?o=this.patternTo:"u_pattern_from"===r?o=this.patternFrom:"u_dasharray_to"===r?o=this.dashTo:"u_dasharray_from"===r?o=this.dashFrom:"u_pixel_ratio_to"===r?o=this.pixelRatioTo:"u_pixel_ratio_from"===r&&(o=this.pixelRatioFrom),null!==o&&t.set(o)}getBinding(t,e,i){return i.startsWith("u_pattern")||i.startsWith("u_dasharray_")?new Mp(t,e):new kp(t,e)}}class Cp{constructor(t,e,i,r){this.expression=t,this.type=i,this.maxValue=0,this.paintVertexAttributes=e.map(t=>({name:`a_${t}`,type:"Float32",components:"color"===i?2:1,offset:0})),this.paintVertexArray=new r}populatePaintArray(t,e,i){const r=this.paintVertexArray.length,o=this.expression.evaluate(new Nu(0,i),e,{},i.canonical,[],i.formattedSection);this.paintVertexArray.resize(t),this._setPaintValue(r,t,o)}updatePaintArray(t,e,i,r,o){const n=this.expression.evaluate(new Nu(0,o),i,r);this._setPaintValue(t,e,n)}_setPaintValue(t,e,i){if("color"===this.type){const r=lr(i);for(let i=t;i`u_${t}_t`),this.type=i,this.useIntegerZoom=r,this.zoom=o,this.maxValue=0,this.paintVertexAttributes=e.map(t=>({name:`a_${t}`,type:"Float32",components:"color"===i?4:2,offset:0})),this.paintVertexArray=new n}populatePaintArray(t,e,i){const r=this.expression.evaluate(new Nu(this.zoom,i),e,{},i.canonical,[],i.formattedSection),o=this.expression.evaluate(new Nu(this.zoom+1,i),e,{},i.canonical,[],i.formattedSection),n=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(n,t,r,o)}updatePaintArray(t,e,i,r,o){const n=this.expression.evaluate(new Nu(this.zoom,o),i,r),a=this.expression.evaluate(new Nu(this.zoom+1,o),i,r);this._setPaintValue(t,e,n,a)}_setPaintValue(t,e,i,r){if("color"===this.type){const o=lr(i),n=lr(r);for(let i=t;i`#define HAS_UNIFORM_${t}`))}return t}getBinderAttributes(){const t=[];for(const e in this.binders){const i=this.binders[e];if(i instanceof Cp||i instanceof Ep)for(const e of i.paintVertexAttributes)t.push(e.name);else if(i instanceof zp){const e=i.getVertexAttributes();for(const i of e)t.push(i.name)}}return t}getBinderUniforms(){const t=[];for(const e in this.binders){const i=this.binders[e];if(i instanceof Ap||i instanceof Ip||i instanceof Ep)for(const e of i.uniformNames)t.push(e)}return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t,e){const i=[];for(const r in this.binders){const o=this.binders[r];if(o instanceof Ap||o instanceof Ip||o instanceof Ep)for(const n of o.uniformNames)if(e[n]){const a=o.getBinding(t,e[n],n);i.push({name:n,property:r,binding:a})}}return i}setUniforms(t,e,i,r){for(const{name:t,property:o,binding:n}of e)this.binders[o].setUniform(n,r,i.get(o),t)}updatePaintBuffers(t){this._buffers=[];for(const e in this.binders){const i=this.binders[e];if(t&&i instanceof zp){const e=2===t.fromScale?i.zoomInPaintVertexBuffer:i.zoomOutPaintVertexBuffer;e&&this._buffers.push(e)}else(i instanceof Cp||i instanceof Ep)&&i.paintVertexBuffer&&this._buffers.push(i.paintVertexBuffer)}}upload(t){for(const e in this.binders){const i=this.binders[e];(i instanceof Cp||i instanceof Ep||i instanceof zp)&&i.upload(t)}this.updatePaintBuffers()}destroy(){for(const t in this.binders){const e=this.binders[t];(e instanceof Cp||e instanceof Ep||e instanceof zp)&&e.destroy()}}}class Rp{constructor(t,e,i=()=>!0){this.programConfigurations={};for(const r of t)this.programConfigurations[r.id]=new Lp(r,e,i);this.needsUpload=!1,this._featureMap=new wp,this._bufferOffset=0}populatePaintArrays(t,e,i,r){for(const i in this.programConfigurations)this.programConfigurations[i].populatePaintArrays(t,e,r);void 0!==e.id&&this._featureMap.add(e.id,i,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,e,i,r){for(const o of i)this.needsUpload=this.programConfigurations[o.id].updatePaintArrays(t,this._featureMap,e,o,r)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy()}}Bi("ConstantBinder",Ap),Bi("CrossFadedConstantBinder",Ip),Bi("SourceExpressionBinder",Cp),Bi("CrossFadedPatternBinder",Dp),Bi("CrossFadedDasharrayBinder",Op),Bi("CompositeExpressionBinder",Ep),Bi("ProgramConfiguration",Lp,{omit:["_buffers"]}),Bi("ProgramConfigurationSet",Rp);const Fp=Math.pow(2,14)-1,Bp=-Fp-1,jp=-32768;class Vp{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(t=>t.id),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new Yh,this.indexArray=new sp,this.segments=new hp,this.programConfigurations=new Rp(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(t,e,i){const r=this.layers[0],o=[];let n=null,a=!1,s="heatmap"===r.type;if("circle"===r.type){const t=r;n=t.layout.get("circle-sort-key"),a=!n.isConstant(),s||(s="map"===t.paint.get("circle-pitch-alignment"))}const l=s?e.subdivisionGranularity.circle:1;for(const{feature:e,id:r,index:s,sourceLayerIndex:l}of t){const t=this.layers[0]._featureFilter.needGeometry,c=pr(e,t);if(!this.layers[0]._featureFilter.filter(new Nu(this.zoom),c,i))continue;const u=a?n.evaluate(c,{},i):void 0,h={id:r,properties:e.properties,type:e.type,sourceLayerIndex:l,index:s,geometry:t?c.geometry:hr(e),patterns:{},sortKey:u};o.push(h)}a&&o.sort((t,e)=>t.sortKey-e.sortKey);for(const r of o){const{geometry:o,index:n,sourceLayerIndex:a}=r,s=t[n].feature;this.addFeature(r,o,n,i,l),e.featureIndex.insert(s,o,n,a,this.index)}}update(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:i})}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,up),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,e,i,r,o=1){let n;switch(o){case 1:n=[0,7];break;case 3:n=[0,2,5,7];break;case 5:n=[0,1,3,4,6,7];break;case 7:n=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${o}; valid values are 1, 3, 5, 7.`)}const a=n.length;for(const i of e)for(const e of i){const i=e.x,r=e.y;if(i<0||i>=yl||r<0||r>=yl)continue;const o=this.segments.prepareSegment(a*a,this.layoutVertexArray,this.indexArray,t.sortKey),s=o.vertexLength;for(let t=0;tOr(t,e,i,r))}(l,o,a,s),d=c),Dr({queryGeometry:p,size:d,transform:o,unwrappedTileID:a,getElevation:s,pitchAlignment:h,pitchScale:u},r)}}class $p extends Vp{}let qp;Bi("HeatmapBucket",$p,{omit:["layers"]});var Wp={get paint(){return qp=qp||new ih({"heatmap-radius":new Ju(Bl.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Ju(Bl.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ku(Bl.paint_heatmap["heatmap-intensity"]),"heatmap-color":new eh(Bl.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ku(Bl.paint_heatmap["heatmap-opacity"])})}};class Hp{constructor(t,e){Lr(this,t,1,e)}resize(t){Rr(this,t,1)}clone(){return new Hp({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,e,i,r,o){Fr(t,e,i,r,o,1)}}class Yp{constructor(t,e){Lr(this,t,4,e)}resize(t){Rr(this,t,4)}replace(t,e){e?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t}clone(){return new Yp({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,e,i,r,o){Fr(t,e,i,r,o,4)}setPixel(t,e,i){const r=4*(t*this.width+e);this.data[r+0]=Math.round(255*i.r/i.a),this.data[r+1]=Math.round(255*i.g/i.a),this.data[r+2]=Math.round(255*i.b/i.a),this.data[r+3]=Math.round(255*i.a)}}Bi("AlphaImage",Hp),Bi("RGBAImage",Yp);const Xp="big-fb";class Kp extends nh{createBucket(t){return new $p(t)}constructor(t,e){super(t,Wp,e),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(t){"heatmap-color"===t&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=jr({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(Xp)&&this.heatmapFbos.delete(Xp)}queryRadius(t){return Mr("heatmap-radius",this,t)}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:i,geometry:r,transform:o,pixelsToTileUnits:n,unwrappedTileID:a,getElevation:s}){return Dr({queryGeometry:t,size:this.paint.get("heatmap-radius").evaluate(e,i)*n,transform:o,unwrappedTileID:a,getElevation:s},r)}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&!this.isHidden()}}let Jp;var Qp={get paint(){return Jp=Jp||new ih({"hillshade-illumination-direction":new Ku(Bl.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-altitude":new Ku(Bl.paint_hillshade["hillshade-illumination-altitude"]),"hillshade-illumination-anchor":new Ku(Bl.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Ku(Bl.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Ku(Bl.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Ku(Bl.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Ku(Bl.paint_hillshade["hillshade-accent-color"]),"hillshade-method":new Ku(Bl.paint_hillshade["hillshade-method"]),resampling:new Ku(Bl.paint_hillshade.resampling)})}};class td extends nh{constructor(t,e){super(t,Qp,e),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let t=this.paint.get("hillshade-illumination-direction").values,e=this.paint.get("hillshade-illumination-altitude").values,i=this.paint.get("hillshade-highlight-color").values,r=this.paint.get("hillshade-shadow-color").values;const o=Math.max(t.length,e.length,i.length,r.length);t=t.concat(Array(o-t.length).fill(t.at(-1))),e=e.concat(Array(o-e.length).fill(e.at(-1))),i=i.concat(Array(o-i.length).fill(i.at(-1))),r=r.concat(Array(o-r.length).fill(r.at(-1)));const n=e.map(F);return{directionRadians:t.map(F),altitudeRadians:n,shadowColor:r,highlightColor:i}}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&!this.isHidden()}}let ed;var id={get paint(){return ed=ed||new ih({"color-relief-opacity":new Ku(Bl["paint_color-relief"]["color-relief-opacity"]),"color-relief-color":new eh(Bl["paint_color-relief"]["color-relief-color"]),resampling:new Ku(Bl["paint_color-relief"].resampling)})}};class rd{constructor(t,e,i,r){this.context=t,this.format=i,this.texture=t.gl.createTexture(),this._ownedHandle=this.texture,this.update(e,r)}update(t,e,i){var r;const{width:o,height:n}=t,a=((null===(r=this.size)||void 0===r?void 0:r[0])!==o||this.size[1]!==n)&&!i,{context:s}=this,{gl:l}=s;this.useMipmap=Boolean(null==e?void 0:e.useMipmap),l.bindTexture(l.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1);const c=this.format===l.RGBA&&!1!==(null==e?void 0:e.premultiply);if(a)this.size=[o,n],Vr(t)?(s.pixelStoreUnpackPremultiplyAlpha.set(!1),this._uploadRawData(t,c,o,n,l)):(s.pixelStoreUnpackPremultiplyAlpha.set(c),this._uploadDomImage(t,l));else{const{x:e,y:r}=i||{x:0,y:0};Vr(t)?(s.pixelStoreUnpackPremultiplyAlpha.set(!1),this._updateRawData(t,c,e,r,o,n,l)):(s.pixelStoreUnpackPremultiplyAlpha.set(c),this._updateDomImage(t,e,r,l))}this.useMipmap&&this.isSizePowerOfTwo()&&l.generateMipmap(l.TEXTURE_2D),s.pixelStoreUnpackFlipY.setDefault(),s.pixelStoreUnpack.setDefault(),s.pixelStoreUnpackPremultiplyAlpha.setDefault()}_uploadDomImage(t,e){e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,e.UNSIGNED_BYTE,t)}_uploadRawData(t,e,i,r,o){let{data:n}=t;e&&n&&(n=Br(n)),o.texImage2D(o.TEXTURE_2D,0,this.format,i,r,0,this.format,o.UNSIGNED_BYTE,n)}_updateDomImage(t,e,i,r){r.texSubImage2D(r.TEXTURE_2D,0,e,i,r.RGBA,r.UNSIGNED_BYTE,t)}_updateRawData(t,e,i,r,o,n,a){let{data:s}=t;e&&s&&(s=Br(s)),a.texSubImage2D(a.TEXTURE_2D,0,i,r,o,n,a.RGBA,a.UNSIGNED_BYTE,s)}bind(t,e,i){const{context:r}=this,{gl:o}=r;this.texture!==this._ownedHandle&&(this.texture=this._ownedHandle),o.bindTexture(o.TEXTURE_2D,this.texture),i!==o.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(i=o.LINEAR),t!==this.filter&&(o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,t),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,i||t),this.filter=t),e!==this.wrap&&(o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,e),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,e),this.wrap=e)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null,this._ownedHandle=null}}class od{constructor(t,e,i,r=1,o=1,n=1,a=0){if(this.uid=t,e.height!==e.width)throw new RangeError("DEM tiles must be square");if(i&&!["mapbox","terrarium","custom"].includes(i))return void E(`"${i}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=e.height;const s=this.dim=e.height-2;switch(this.data=new Uint32Array(e.data.buffer),i){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=r,this.greenFactor=o,this.blueFactor=n,this.baseShift=a;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let t=0;tthis.max&&(this.max=i),i=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${t}, y: ${e}, dim: ${this.dim}`);return(e+1)*this.stride+(t+1)}unpack(t,e,i){return t*this.redFactor+e*this.greenFactor+i*this.blueFactor-this.baseShift}pack(t){return Nr(t,this.getUnpackVector())}getPixels(){return new Yp({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(t,e,i){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let r=e*this.dim,o=e*this.dim+this.dim,n=i*this.dim,a=i*this.dim+this.dim;switch(e){case-1:r=o-1;break;case 1:o=r+1}switch(i){case-1:n=a-1;break;case 1:a=n+1}const s=-e*this.dim,l=-i*this.dim;for(let e=n;et)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=t,this._minGranularity=e}getGranularityForZoomLevel(t){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||e>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");const i=0|Math.round(t),r=0|Math.round(e),o=this._getKey(i,r);if(this._vertexDictionary.has(o))return this._vertexDictionary.get(o);const n=this._vertexBuffer.length/2;return this._vertexDictionary.set(o,n),this._vertexBuffer.push(i,r),n}_subdivideTrianglesScanline(t){if(this._granularity<2)return function(t,e){const i=[];for(let r=0;r0?(i.push(o),i.push(a),i.push(n)):(i.push(o),i.push(n),i.push(a))}return i}(this._vertexBuffer,t);const e=[],i=t.length;for(let r=0;r=1||v<=0)||f&&(so)){c>=r&&c<=o&&n.push(i[(t+1)%3]);continue}!f&&y>0&&n.push(this._vertexToIndex(a+p*y,s+d*y));const b=a+p*Math.max(y,0),x=a+p*Math.min(v,1);m||this._generateIntraEdgeVertices(n,a,s,l,c,b,x),!f&&v<1&&n.push(this._vertexToIndex(a+p*v,s+d*v)),(f||c>=r&&c<=o)&&n.push(i[(t+1)%3]),!f&&(c<=r||c>=o)&&this._generateInterEdgeVertices(n,a,s,l,c,u,h,x,r,o)}return n}_generateIntraEdgeVertices(t,e,i,r,o,n,a){const s=r-e,l=o-i,c=0===l,u=c?Math.min(e,r):Math.min(n,a),h=c?Math.max(e,r):Math.max(n,a),p=Math.floor(u/this._granularityCellSize)+1,d=Math.ceil(h/this._granularityCellSize)-1;if(c?e=p;r--){const o=r*this._granularityCellSize;t.push(this._vertexToIndex(o,i+l*(o-e)/s))}}_generateInterEdgeVertices(t,e,i,r,o,n,a,s,l,c){const u=o-i,h=n-r,p=a-o,d=(l-o)/p,m=(c-o)/p,f=Math.min(d,m),_=Math.max(d,m),g=r+h*f;let y=Math.floor(Math.min(g,s)/this._granularityCellSize)+1,v=Math.ceil(Math.max(g,s)/this._granularityCellSize)-1,b=s=1||_<=0){const t=i-a,r=n+(e-n)*Math.min((l-a)/t,(c-a)/t);y=Math.floor(Math.min(r,s)/this._granularityCellSize)+1,v=Math.ceil(Math.max(r,s)/this._granularityCellSize)-1,b=s0?c:l;if(b)for(let e=y;e<=v;e++)t.push(this._vertexToIndex(e*this._granularityCellSize,w));else for(let e=v;e>=y;e--)t.push(this._vertexToIndex(e*this._granularityCellSize,w))}_generateOutline(t){const e=[];for(const i of t){const t=go(i,this._granularity,!0),r=this._pointArrayToIndices(t),o=[];for(let t=1;to!=(n===ud)?(t.push(e),t.push(i),t.push(this._vertexToIndex(r,n)),t.push(i),t.push(this._vertexToIndex(o,n)),t.push(this._vertexToIndex(r,n))):(t.push(i),t.push(e),t.push(this._vertexToIndex(r,n)),t.push(this._vertexToIndex(o,n)),t.push(i),t.push(this._vertexToIndex(r,n)))}_fillPoles(t,e,i){const r=this._vertexBuffer,o=yl,n=t.length;for(let a=2;a80*i){s=t[0],l=t[1];let e=s,r=l;for(let n=i;ne&&(e=i),o>r&&(r=o)}c=Math.max(e-s,r-l),c=0!==c?32767/c:0}return qr(n,a,i,s,l,c,0),a}(i,r),e=this._convertIndices(i,t);o=this._subdivideTrianglesScanline(e)}catch(t){console.error(t)}let n=[];return e&&(n=this._generateOutline(t)),this._ensureNoPoleVertices(),this._handlePoles(o),{verticesFlattened:this._vertexBuffer,indicesTriangles:o,indicesLineList:n}}_convertIndices(t,e){const i=[];for(const r of e)i.push(this._vertexToIndex(t[2*r],t[2*r+1]));return i}_pointArrayToIndices(t){const e=[];for(const i of t)e.push(this._vertexToIndex(i.x,i.y));return e}}class dd{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(t=>t.id),this.index=t.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new Xh,this.indexArray=new sp,this.indexArray2=new lp,this.programConfigurations=new Rp(t.layers,t.zoom),this.segments=new hp,this.segments2=new hp,this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(t,e,i){this.hasDependencies=Ur("fill",this.layers,e);const r=this.layers[0].layout.get("fill-sort-key"),o=!r.isConstant(),n=[];for(const{feature:a,id:s,index:l,sourceLayerIndex:c}of t){const t=this.layers[0]._featureFilter.needGeometry,u=pr(a,t);if(!this.layers[0]._featureFilter.filter(new Nu(this.zoom),u,i))continue;const h=o?r.evaluate(u,{},i,e.availableImages):void 0,p={id:s,properties:a.properties,type:a.type,sourceLayerIndex:c,index:l,geometry:t?u.geometry:hr(a),patterns:{},sortKey:h};n.push(p)}o&&n.sort((t,e)=>t.sortKey-e.sortKey);for(const r of n){const{geometry:o,index:n,sourceLayerIndex:a}=r;if(this.hasDependencies){const t=Gr("fill",this.layers,r,{zoom:this.zoom},e);this.patternFeatures.push(t)}else this.addFeature(r,o,n,i,{},e.subdivisionGranularity);e.featureIndex.insert(t[n].feature,o,n,a,this.index)}}update(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:i})}addFeatures(t,e,i){for(const r of this.patternFeatures)this.addFeature(r,r.geometry,r.index,e,i,t.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,sd),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(t,e,i,r,o,n){for(const t of Jt(e,500)){const e=_o(t,r,n.fill.getGranularityForZoomLevel(r.z)),i=this.layoutVertexArray;vo((t,e)=>{i.emplaceBack(t,e)},this.segments,this.layoutVertexArray,this.indexArray,e.verticesFlattened,e.indicesTriangles,this.segments2,this.indexArray2,e.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,{imagePositions:o,canonical:r})}}let md,fd;Bi("FillBucket",dd,{omit:["layers","patternFeatures"]});var _d={get paint(){return fd=fd||new ih({"fill-antialias":new Ku(Bl.paint_fill["fill-antialias"]),"fill-opacity":new Ju(Bl.paint_fill["fill-opacity"]),"fill-color":new Ju(Bl.paint_fill["fill-color"]),"fill-outline-color":new Ju(Bl.paint_fill["fill-outline-color"]),"fill-translate":new Ku(Bl.paint_fill["fill-translate"]),"fill-translate-anchor":new Ku(Bl.paint_fill["fill-translate-anchor"]),"fill-pattern":new Qu(Bl.paint_fill["fill-pattern"])})},get layout(){return md=md||new ih({"fill-sort-key":new Ju(Bl.layout_fill["fill-sort-key"])})}};class gd extends nh{constructor(t,e){super(t,_d,e)}recalculate(t,e){super.recalculate(t,e);const i=this.paint._values["fill-outline-color"];"constant"===i.value.kind&&void 0===i.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new dd(t)}queryRadius(){return Sr(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:e,transform:i,pixelsToTileUnits:r}){return _r(Pr(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-i.bearingInRadians,r),e)}isTileClipped(){return!0}}const yd=ir([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),vd=ir([{name:"a_centroid",components:2,type:"Int16"}],4),{members:bd}=yd;class xd{constructor(t,e,i,r,o){this.properties={},this.extent=i,this.type=0,this.id=void 0,this._pbf=t,this._geometry=-1,this._keys=r,this._values=o,t.readFields(xo,this,e)}loadGeometry(){const t=this._pbf;t.pos=this._geometry;const e=t.readVarint()+t.pos,r=[];let o,n=1,a=0,s=0,l=0;for(;t.pos>3}if(a--,1===n||2===n)s+=t.readSVarint(),l+=t.readSVarint(),1===n&&(o&&r.push(o),o=[]),o&&o.push(new i(s,l));else{if(7!==n)throw new Error(`unknown command ${n}`);o&&o.push(o[0].clone())}}return o&&r.push(o),r}bbox(){const t=this._pbf;t.pos=this._geometry;const e=t.readVarint()+t.pos;let i=1,r=0,o=0,n=0,a=1/0,s=-1/0,l=1/0,c=-1/0;for(;t.pos>3}if(r--,1===i||2===i)o+=t.readSVarint(),n+=t.readSVarint(),os&&(s=o),nc&&(c=n);else if(7!==i)throw new Error(`unknown command ${i}`)}return[a,l,s,c]}toGeoJSON(t,e,i){function r(t){return[360*(t.x+a)/n-180,360/Math.PI*Math.atan(Math.exp((1-2*(t.y+s)/n)*Math.PI))-90]}function o(t){return t.map(r)}const n=this.extent*Math.pow(2,i),a=this.extent*t,s=this.extent*e,l=this.loadGeometry();let c;if(1===this.type){const t=[];for(const e of l)t.push(e[0]);const e=o(t);c=1===t.length?{type:"Point",coordinates:e[0]}:{type:"MultiPoint",coordinates:e}}else if(2===this.type){const t=l.map(o);c=1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t}}else{if(3!==this.type)throw new Error("unknown feature type");{const t=wo(l),e=[];for(const i of t)e.push(i.map(o));c=1===e.length?{type:"Polygon",coordinates:e[0]}:{type:"MultiPolygon",coordinates:e}}}const u={type:"Feature",geometry:c,properties:this.properties};return null!=this.id&&(u.id=this.id),u}}xd.types=["Unknown","Point","LineString","Polygon"];class wd{constructor(t,e){this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(ko,this,e),this.length=this._features.length}feature(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];const e=this._pbf.readVarint()+this._pbf.pos;return new xd(this._pbf,e,this.extent,this._keys,this._values)}}class Td{constructor(t,e){this.layers=t.readFields(Mo,{},e)}}const kd=Math.pow(2,13);class Md{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(t=>t.id),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new Kh,this.centroidVertexArray=new Hh,this.indexArray=new sp,this.programConfigurations=new Rp(t.layers,t.zoom),this.segments=new hp,this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(t,e,i){this.features=[],this.hasDependencies=Ur("fill-extrusion",this.layers,e);for(const{feature:r,id:o,index:n,sourceLayerIndex:a}of t){const t=this.layers[0]._featureFilter.needGeometry,s=pr(r,t);if(!this.layers[0]._featureFilter.filter(new Nu(this.zoom),s,i))continue;const l={id:o,sourceLayerIndex:a,index:n,geometry:t?s.geometry:hr(r),properties:r.properties,type:r.type,patterns:{}};this.hasDependencies?this.features.push(Gr("fill-extrusion",this.layers,l,{zoom:this.zoom},e)):this.addFeature(l,l.geometry,n,i,{},e.subdivisionGranularity),e.featureIndex.insert(r,l.geometry,n,a,this.index,!0)}}addFeatures(t,e,i){for(const r of this.features){const{geometry:o}=r;this.addFeature(r,o,r.index,e,i,t.subdivisionGranularity)}}update(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:i})}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,bd),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,vd.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(t,e,i,r,o,n){for(const i of Jt(e,500)){const e={x:0,y:0,sampleCount:0},o=this.layoutVertexArray.length;this.processPolygon(e,r,t,i,n);const a=this.layoutVertexArray.length-o,s=Math.floor(e.x/e.sampleCount),l=Math.floor(e.y/e.sampleCount);for(let t=0;t{So(c,t,e,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(t,e){let i=0;for(let r=1;rhp.MAX_VERTEX_ARRAY_LENGTH&&(e.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const a=o.sub(n)._perp()._unit(),s=n.dist(o);i+s>32768&&(i=0),So(this.layoutVertexArray,o.x,o.y,a.x,a.y,0,0,i),So(this.layoutVertexArray,o.x,o.y,a.x,a.y,0,1,i),i+=s,So(this.layoutVertexArray,n.x,n.y,a.x,a.y,0,0,i),So(this.layoutVertexArray,n.x,n.y,a.x,a.y,0,1,i);const l=e.segment.vertexLength;this.indexArray.emplaceBack(l,l+2,l+1),this.indexArray.emplaceBack(l+1,l+2,l+3),e.segment.vertexLength+=4,e.segment.primitiveLength+=2}}}let Sd;Bi("FillExtrusionBucket",Md,{omit:["layers","features"]});var Pd={get paint(){return Sd=Sd||new ih({"fill-extrusion-opacity":new Ku(Bl["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ju(Bl["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ku(Bl["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ku(Bl["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Qu(Bl["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ju(Bl["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ju(Bl["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ku(Bl["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Ad extends nh{constructor(t,e){super(t,Pd,e)}createBucket(t){return new Md(t)}queryRadius(){return Sr(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:o,transform:n,pixelsToTileUnits:a,pixelPosMatrix:s}){const l=Pr(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-n.bearingInRadians,a),c=this.paint.get("fill-extrusion-height").evaluate(e,r),u=this.paint.get("fill-extrusion-base").evaluate(e,r),h=function(t,e){const r=[];for(const o of t){const t=[o.x,o.y,0,1];m(t,t,e),r.push(new i(t[0]/t[3],t[1]/t[3]))}return r}(l,s),p=function(t,e,r,o){const n=[],a=[],s=o[8]*e,l=o[9]*e,c=o[10]*e,u=o[11]*e,h=o[8]*r,p=o[9]*r,d=o[10]*r,m=o[11]*r;for(const e of t){const t=[],r=[];for(const n of e){const e=n.x,a=n.y,f=o[0]*e+o[4]*a+o[12],_=o[1]*e+o[5]*a+o[13],g=o[2]*e+o[6]*a+o[14],y=o[3]*e+o[7]*a+o[15],v=g+c,b=y+u,x=f+h,w=_+p,T=g+d,k=y+m,M=new i((f+s)/b,(_+l)/b);M.z=v/b,t.push(M);const S=new i(x/k,w/k);S.z=T/k,r.push(S)}n.push(t),a.push(r)}return[n,a]}(o,u,c,s);return function(t,e,i){let r=1/0;_r(i,e)&&(r=Eo(i,e[0]));for(let o=0;o>4;if(1!==r)throw new Error(`Got v${r} data when expected v1.`);const o=Id[15&i];if(!o)throw new Error("Unrecognized array type.");const[n]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new Cd(a,n,o,t)}constructor(t,e=64,i=Float64Array,r){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=i,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const o=Id.indexOf(this.ArrayType),n=2*t*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,s=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${i}.`);r&&r instanceof ArrayBuffer?(this.data=r,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+a+s,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+n+a+s),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+a+s,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+o]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){const i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=t,this.coords[this._pos++]=e,i}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return zo(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,i,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:n,nodeSize:a}=this,s=[0,o.length-1,0],l=[];for(;s.length;){const c=s.pop()||0,u=s.pop()||0,h=s.pop()||0;if(u-h<=a){for(let a=h;a<=u;a++){const s=n[2*a],c=n[2*a+1];s>=t&&s<=i&&c>=e&&c<=r&&l.push(o[a])}continue}const p=h+u>>1,d=n[2*p],m=n[2*p+1];d>=t&&d<=i&&m>=e&&m<=r&&l.push(o[p]),(0===c?t<=d:e<=m)&&(s.push(h),s.push(p-1),s.push(1-c)),(0===c?i>=d:r>=m)&&(s.push(p+1),s.push(u),s.push(1-c))}return l}within(t,e,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:r,coords:o,nodeSize:n}=this,a=[0,r.length-1,0],s=[],l=i*i;for(;a.length;){const c=a.pop()||0,u=a.pop()||0,h=a.pop()||0;if(u-h<=n){for(let i=h;i<=u;i++)Ro(o[2*i],o[2*i+1],t,e)<=l&&s.push(r[i]);continue}const p=h+u>>1,d=o[2*p],m=o[2*p+1];Ro(d,m,t,e)<=l&&s.push(r[p]),(0===c?t-i<=d:e-i<=m)&&(a.push(h),a.push(p-1),a.push(1-c)),(0===c?t+i>=d:e+i>=m)&&(a.push(p+1),a.push(u),a.push(1-c))}return s}}var Ed;!function(t){t[t.X=0]="X",t[t.Y=1]="Y"}(Ed||(Ed={}));const zd={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t};class Dd{constructor(t){this.options=Object.assign(Object.create(zd),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(t){const e=[];for(const i of t){if(!i.geometry)continue;const[t,r]=i.geometry.coordinates,[o,n]=[qo(t),Wo(r)];e.push({id:i.id,type:"Point",geometry:[o,n],tags:i.properties})}this.createIndex(e)}initialize(t){const e=[];for(const i of t)"Point"===i.type&&e.push(i);this.createIndex(e)}updateIndex(t,e,i){this.options=Object.assign(Object.create(zd),i.clusterOptions),this.initialize(t)}createIndex(t){const{log:e,minZoom:i,maxZoom:r}=this.options;e&&console.time("total time");const o=`prepare ${t.length} points`;e&&console.time(o),this.points=t;const n=[];for(let e=0;e=i;t--){const i=Date.now();a=this.trees[t]=this.createTree(this.cluster(a,t)),e&&console.log("z%d: %d clusters in %dms",t,a.numItems,Date.now()-i)}e&&console.timeEnd("total time")}getClusters(t,e){return this.getClustersInternal(t,e).map(t=>Ho(t))}getClustersInternal(t,e){let i=((t[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,t[1]));let o=180===t[2]?180:((t[2]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)i=-180,o=180;else if(i>o){const t=this.getClustersInternal([i,r,180,n],e),a=this.getClustersInternal([-180,r,o,n],e);return t.concat(a)}const a=this.trees[this.limitZoom(e)],s=a.range(qo(i),Wo(n),qo(o),Wo(r)),l=a.flatData,c=[];for(const t of s){const e=this.stride*t;c.push(l[e+5]>1?vn(l,e,this.clusterProps):this.points[l[e+3]])}return c}getChildren(t){const e=this.getOriginId(t),i=this.getOriginZoom(t),r=new Error("No cluster with the specified id: "+t),o=this.trees[i];if(!o)throw r;const n=o.flatData;if(e*this.stride>=n.length)throw r;const a=this.options.radius/(this.options.extent*Math.pow(2,i-1)),s=o.within(n[e*this.stride],n[e*this.stride+1],a),l=[];for(const e of s){const i=e*this.stride;n[i+4]===t&&l.push(n[i+5]>1?bn(n,i,this.clusterProps):Ho(this.points[n[i+3]]))}if(0===l.length)throw r;return l}getLeaves(t,e,i){const r=[];return this.appendLeaves(r,t,e=e||10,i=i||0,0),r}getTile(t,e,i){const r=this.trees[this.limitZoom(t)];if(!r)return null;const o=Math.pow(2,t),{extent:n,radius:a}=this.options,s=a/n,l=(i-s)/o,c=(i+1+s)/o,u={transformed:!0,features:[],source:null,x:e,y:i,z:t};return this.addTileFeatures(r.range((e-s)/o,l,(e+1+s)/o,c),r.flatData,e,i,o,u),0===e&&this.addTileFeatures(r.range(1-s/o,l,1,c),r.flatData,o,i,o,u),e===o-1&&this.addTileFeatures(r.range(0,l,s/o,c),r.flatData,-1,i,o,u),u}getClusterExpansionZoom(t){return this.getOriginZoom(t)}appendLeaves(t,e,i,r,o){const n=this.getChildren(e);for(const e of n){const n=e.properties;if(n?.cluster?o+n.point_count<=r?o+=n.point_count:o=this.appendLeaves(t,n.cluster_id,i,r,o):o1;let l,c,u;if(s)l=xn(e,t,this.clusterProps),c=e[t],u=e[t+1];else{const i=this.points[e[t+3]];l=i.tags,[c,u]=i.geometry}const h={type:1,geometry:[[Math.round(this.options.extent*(c*o-i)),Math.round(this.options.extent*(u*o-r))]],tags:l};let p;p=s||this.options.generateId?e[t+3]:this.points[e[t+3]].id,void 0!==p&&(h.id=p),n.features.push(h)}}limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}cluster(t,e){const{radius:i,extent:r,reduce:o,minPoints:n}=this.options,a=i/(r*Math.pow(2,e)),s=t.flatData,l=[],c=this.stride;for(let i=0;ie&&(d+=s[i+5])}if(d>p&&d>=n){let t,n=r*p,a=u*p,m=-1;const f=(i/c<<5)+(e+1)+this.points.length;for(const r of h){const l=r*c;if(s[l+2]<=e)continue;s[l+2]=e;const u=s[l+5];n+=s[l]*u,a+=s[l+1]*u,s[l+4]=f,o&&(t||(t=this.map(s,i,!0),m=this.clusterProps.length,this.clusterProps.push(t)),o(t,this.map(s,l)))}s[i+4]=f,l.push(n/d,a/d,1/0,f,-1,d),o&&l.push(m)}else{for(let t=0;t1)for(const t of h){const i=t*c;if(!(s[i+2]<=e)){s[i+2]=e;for(let t=0;t>5}getOriginZoom(t){return(t-this.points.length)%32}map(t,e,i){if(t[e+5]>1){const r=this.clusterProps[t[e+6]];return i?Object.assign({},r):r}const r=this.points[t[e+3]].tags,o=this.options.map(r);return i&&o===r?Object.assign({},o):o}}const Od="geojsonvt_clip_start",Ld="geojsonvt_clip_end";class Rd{constructor(t){this.options=t,this.total=0,this.stats={},this.tiles={},this.tileCoords=[],this.stats={},this.total=0}initialize(t){this.splitTile(t,0,0,0),this.options.debug&&(t.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)))}updateIndex(t,e,i){i.debug>1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(e),i.debug>1&&console.timeEnd("invalidating");const[r,o,n]=[0,0,0],a=wn(t,r,o,n,i);a.source=t;const s=In(r,o,n);if(this.tiles[s]=a,this.tileCoords.push({z:r,x:o,y:n,id:s}),i.debug){const t=`z${r}`;this.stats[t]=(this.stats[t]||0)+1,this.total++}}getClusterExpansionZoom(t){return null}getChildren(t){return null}getLeaves(t,e,i){return null}getTile(t,e,i){const{extent:r,debug:o}=this.options,n=1<1&&console.log("drilling down to z%d-%d-%d",t,e,i);let s,l=t,c=e,u=i;for(;!s&&l>0;)l--,c>>=1,u>>=1,s=this.tiles[In(l,c,u)];return s?.source?(o>1&&(console.log("found parent tile z%d-%d-%d",l,c,u),console.time("drilling down")),this.splitTile(s.source,l,c,u,t,e,i),o>1&&console.timeEnd("drilling down"),this.tiles[a]?Mn(this.tiles[a],r):null):null}splitTile(t,e,i,r,o,n,a){const s=[t,e,i,r],l=this.options,c=l.debug;for(;s.length;){r=s.pop(),i=s.pop(),e=s.pop(),t=s.pop();const u=1<1&&console.time("creation"),p=this.tiles[h]=wn(t,e,i,r,l),this.tileCoords.push({z:e,x:i,y:r,id:h}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,i,r,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));const t=`z${e}`;this.stats[t]=(this.stats[t]||0)+1,this.total++}if(p.source=t,null==o){if(e===l.indexMaxZoom||p.numPoints<=l.indexMaxPoints)continue}else{if(e===l.maxZoom||e===o)continue;if(null!=o){const t=o-e;if(i!==n>>t||r!==a>>t)continue}}if(p.source=null,!t.length)continue;c>1&&console.time("clipping");const d=.5*l.buffer/l.extent,m=.5-d,f=.5+d,_=1+d;let g=null,y=null,v=null,b=null;const x=tn(t,u,i-d,i+f,Ed.X,p.minX,p.maxX,l),w=tn(t,u,i+m,i+_,Ed.X,p.minX,p.maxX,l);x&&(g=tn(x,u,r-d,r+f,Ed.Y,p.minY,p.maxY,l),y=tn(x,u,r+m,r+_,Ed.Y,p.minY,p.maxY,l)),w&&(v=tn(w,u,r-d,r+f,Ed.Y,p.minY,p.maxY,l),b=tn(w,u,r+m,r+_,Ed.Y,p.minY,p.maxY,l)),c>1&&console.timeEnd("clipping"),s.push(g||[],e+1,2*i,2*r),s.push(y||[],e+1,2*i,2*r+1),s.push(v||[],e+1,2*i+1,2*r),s.push(b||[],e+1,2*i+1,2*r+1)}}invalidateTiles(t){if(!t.length)return;const e=this.options,{debug:i}=e;let r=1/0,o=-1/0,n=1/0,a=-1/0;for(const e of t)r=Math.min(r,e.minX),o=Math.max(o,e.maxX),n=Math.min(n,e.minY),a=Math.max(a,e.maxY);const s=e.buffer/e.extent,l=new Set;for(const e in this.tiles){const c=this.tiles[e],u=1<=p||a=m)continue;let f=!1;for(const e of t)if(e.maxX>=h&&e.minX=d&&e.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",c.z,c.x,c.y,c.numFeatures,c.numPoints,c.numSimplified);const t=`z${c.z}`;this.stats[t]=(this.stats[t]||0)-1,this.total--}delete this.tiles[e],l.add(e)}}l.size&&(this.tileCoords=this.tileCoords.filter(t=>!l.has(t.id)))}}const Fd={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,updateable:!1,cluster:!1,clusterOptions:zd,debug:0},Bd=ir([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:jd}=Bd,Vd=ir([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:Nd}=Vd,Ud=Math.cos(Math.PI/180*37.5),Gd=Math.pow(2,14)/.5;class Zd{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(t=>t.id),this.index=t.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(const t of this.layers)this.gradients[t.id]={};this.layoutVertexArray=new Jh,this.layoutVertexArray2=new Qh,this.indexArray=new sp,this.programConfigurations=new Rp(t.layers,t.zoom),this.segments=new hp,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(t,e,i){this.hasDependencies=Ur("line",this.layers,e)||this.hasLineDasharray(this.layers);const r=this.layers[0].layout.get("line-sort-key"),o=!r.isConstant(),n=[];for(const{feature:e,id:a,index:s,sourceLayerIndex:l}of t){const t=this.layers[0]._featureFilter.needGeometry,c=pr(e,t);if(!this.layers[0]._featureFilter.filter(new Nu(this.zoom),c,i))continue;const u=o?r.evaluate(c,{},i):void 0,h={id:a,properties:e.properties,type:e.type,sourceLayerIndex:l,index:s,geometry:t?c.geometry:hr(e),patterns:{},dashes:{},sortKey:u};n.push(h)}o&&n.sort((t,e)=>t.sortKey-e.sortKey);for(const r of n){const{geometry:o,index:n,sourceLayerIndex:a}=r;this.hasDependencies?(Ur("line",this.layers,e)?Gr("line",this.layers,r,{zoom:this.zoom},e):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,r,this.zoom,e),this.patternFeatures.push(r)):this.addFeature(r,o,n,i,{},{},e.subdivisionGranularity),e.featureIndex.insert(t[n].feature,o,n,a,this.index)}}update(t,e,i,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:i,dashPositions:r})}addFeatures(t,e,i,r){for(const o of this.patternFeatures)this.addFeature(o,o.geometry,o.index,e,i,r,t.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,Nd)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,jd),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&Object.hasOwn(t.properties,Od)&&Object.hasOwn(t.properties,Ld))return{start:+t.properties[Od],end:+t.properties[Ld]}}addFeature(t,e,i,r,o,n,a){const s=this.layers[0].layout,l=s.get("line-join").evaluate(t,{}),c=s.get("line-cap").evaluate(t,{}),u=s.get("line-miter-limit").evaluate(t,{}),h=s.get("line-round-limit").evaluate(t,{});this.lineClips=this.lineFeatureClips(t);for(const i of e)this.addLine(i,t,l,c,u,h,r,a);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,{imagePositions:o,dashPositions:n,canonical:r})}addLine(t,e,i,r,o,n,a,s){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t=go(t,a?s.line.getGranularityForZoomLevel(a.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let e=0;e=2&&t[c-1].equals(t[c-2]);)c--;let u=0;for(;u0;if(x&&e>u){const t=d.dist(m);if(t>2*h){const e=d.sub(d.sub(m)._mult(h/t)._round());this.updateDistance(m,e),this.addCurrentVertex(e,_,0,0,p),m=e}}const T=m&&f;let k=T?i:l?"butt":r;if(T&&"round"===k&&(vo&&(k="bevel"),"bevel"===k&&(v>2&&(k="flipbevel"),v100)a=g.mult(-1);else{const t=v*_.add(g).mag()/_.sub(g).mag();a._perp()._mult(t*(w?-1:1))}this.addCurrentVertex(d,a,0,0,p),this.addCurrentVertex(d,a.mult(-1),0,0,p)}else if("bevel"===k||"fakeround"===k){const t=-Math.sqrt(v*v-1),e=w?t:0,i=w?0:t;if(m&&this.addCurrentVertex(d,_,e,i,p),"fakeround"===k){ const t=Math.round(180*b/Math.PI/20);for(let e=1;e2*h){const e=d.add(f.sub(d)._mult(h/t)._round());this.updateDistance(d,e),this.addCurrentVertex(e,g,0,0,p),d=e}}}}addCurrentVertex(t,e,i,r,o,n=!1){const a=e.y*r-e.x,s=-e.y-e.x*r;this.addHalfVertex(t,e.x+e.y*i,e.y-e.x*i,n,!1,i,o),this.addHalfVertex(t,a,s,n,!0,-r,o),this.distance>Gd/2&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,e,i,r,o,n))}addHalfVertex({x:t,y:e},i,r,o,n,a,s){const l=.5*(this.lineClips?this.scaledDistance*(Gd-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t<<1)+(o?1:0),(e<<1)+(n?1:0),Math.round(63*i)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&l)<<2,l>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const c=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,c,this.e2),s.primitiveLength++),n?this.e2=c:this.e1=c}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,e){this.distance+=t.dist(e),this.updateScaledDistance()}hasLineDasharray(t){for(const e of t){const t=e.paint.get("line-dasharray");if(t&&!t.isConstant())return!0}return!1}addLineDashDependencies(t,e,i,r){for(const o of t){const t=o.paint.get("line-dasharray");if(!t||"constant"===t.value.kind)continue;const n="round"===o.layout.get("line-cap").evaluate(e,{}),a={dasharray:t.value.evaluate({zoom:i-1},e,{}),round:n},s={dasharray:t.value.evaluate({zoom:i},e,{}),round:n},l={dasharray:t.value.evaluate({zoom:i+1},e,{}),round:n},c=`${a.dasharray.join(",")},${a.round}`,u=`${s.dasharray.join(",")},${s.round}`,h=`${l.dasharray.join(",")},${l.round}`;r.dashDependencies[c]=a,r.dashDependencies[u]=s,r.dashDependencies[h]=l,e.dashes[o.id]={min:c,mid:u,max:h}}}}let $d,qd;Bi("LineBucket",Zd,{omit:["layers","patternFeatures"]});var Wd={get paint(){return qd=qd||new ih({"line-opacity":new Ju(Bl.paint_line["line-opacity"]),"line-color":new Ju(Bl.paint_line["line-color"]),"line-translate":new Ku(Bl.paint_line["line-translate"]),"line-translate-anchor":new Ku(Bl.paint_line["line-translate-anchor"]),"line-width":new Ju(Bl.paint_line["line-width"]),"line-gap-width":new Ju(Bl.paint_line["line-gap-width"]),"line-offset":new Ju(Bl.paint_line["line-offset"]),"line-blur":new Ju(Bl.paint_line["line-blur"]),"line-dasharray":new Qu(Bl.paint_line["line-dasharray"]),"line-pattern":new Qu(Bl.paint_line["line-pattern"]),"line-gradient":new eh(Bl.paint_line["line-gradient"])})},get layout(){return $d=$d||new ih({"line-cap":new Ju(Bl.layout_line["line-cap"]),"line-join":new Ju(Bl.layout_line["line-join"]),"line-miter-limit":new Ju(Bl.layout_line["line-miter-limit"]),"line-round-limit":new Ju(Bl.layout_line["line-round-limit"]),"line-sort-key":new Ju(Bl.layout_line["line-sort-key"])})}};class Hd extends Ju{possiblyEvaluate(t,e){return e=new Nu(Math.floor(e.zoom),{now:e.now,fadeDuration:e.fadeDuration,zoomHistory:e.zoomHistory,transition:e.transition}),super.possiblyEvaluate(t,e)}evaluate(t,e,i,r){return e=P({},e,{zoom:Math.floor(e.zoom)}),super.evaluate(t,e,i,r)}}let Yd;class Xd extends nh{constructor(t,e){super(t,Wd,e),this.gradientVersion=0,Yd||(Yd=new Hd(Wd.paint.properties["line-width"].specification),Yd.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if("line-gradient"===t){const t=this.gradientExpression();this.stepInterpolant=!!function(t){return void 0!==t._styleExpression}(t)&&t._styleExpression.expression instanceof Zc,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,e){super.recalculate(t,e),this.paint._values["line-floorwidth"]=Yd.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new Zd(t)}queryRadius(t){const e=t,i=Cn(Mr("line-width",this,e),Mr("line-gap-width",this,e)),r=Mr("line-offset",this,e);return i/2+Math.abs(r)+Sr(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:o,transform:n,pixelsToTileUnits:a}){const s=Pr(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-n.bearingInRadians,a),l=a/2*Cn(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),c=this.paint.get("line-offset").evaluate(e,r);return c&&(o=function(t,e){const r=[];for(const o of t){const t=Ar(o),n=[];for(let r=0;r=3)for(const e of r)if(Tr(t,e))return!0;if(gr(t,r,i))return!0}return!1}(s,o,l)}isTileClipped(){return!0}}const Kd=ir([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Jd=ir([{name:"a_projected_pos",components:3,type:"Float32"}],4);ir([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const Qd=ir([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ir([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const tm=ir([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),em=ir([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);ir([{name:"triangle",components:3,type:"Uint16"}]),ir([{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"}]),ir([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ir([{type:"Float32",name:"offsetX"}]),ir([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ir([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var im=24;const rm={"!":"\ufe15","#":"\uff03",$:"\uff04","%":"\uff05","&":"\uff06","(":"\ufe35",")":"\ufe36","*":"\uff0a","+":"\uff0b",",":"\ufe10","-":"\ufe32",".":"\u30fb","/":"\uff0f",":":"\ufe13",";":"\ufe14","<":"\ufe3f","=":"\uff1d",">":"\ufe40","?":"\ufe16","@":"\uff20","[":"\ufe47","\\":"\uff3c","]":"\ufe48","^":"\uff3e",_:"\ufe33","`":"\uff40","{":"\ufe37","|":"\u2015","}":"\ufe38","~":"\uff5e","\xa2":"\uffe0","\xa3":"\uffe1","\xa5":"\uffe5","\xa6":"\uffe4","\xac":"\uffe2","\xaf":"\uffe3","\u2013":"\ufe32","\u2014":"\ufe31","\u2018":"\ufe43","\u2019":"\ufe44","\u201c":"\ufe41","\u201d":"\ufe42","\u2026":"\ufe19","\u22ef":"\ufe19","\u2027":"\u30fb","\u20a9":"\uffe6","\u3001":"\ufe11","\u3002":"\ufe12","\u3008":"\ufe3f","\u3009":"\ufe40","\u300a":"\ufe3d","\u300b":"\ufe3e","\u300c":"\ufe41","\u300d":"\ufe42","\u300e":"\ufe43","\u300f":"\ufe44","\u3010":"\ufe3b","\u3011":"\ufe3c","\u3014":"\ufe39","\u3015":"\ufe3a","\u3016":"\ufe17","\u3017":"\ufe18","\uff01":"\ufe15","\uff08":"\ufe35","\uff09":"\ufe36","\uff0c":"\ufe10","\uff0d":"\ufe32","\uff0e":"\u30fb","\uff1a":"\ufe13","\uff1b":"\ufe14","\uff1c":"\ufe3f","\uff1e":"\ufe40","\uff1f":"\ufe16","\uff3b":"\ufe47","\uff3d":"\ufe48","\uff3f":"\ufe33","\uff5b":"\ufe37","\uff5c":"\u2015","\uff5d":"\ufe38","\uff5f":"\ufe35","\uff60":"\ufe36","\uff61":"\ufe12","\uff62":"\ufe41","\uff63":"\ufe42"},om={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},nm={40:!0};class am{constructor(t="",e=[],i=[]){this.text=t,this.sections=e,this.sectionIndex=i,this.imageSectionID=null}static fromFeature(t,e){const i=new am;for(const r of t.sections)r.image?i.addImageSection(r):i.addTextSection(r,e);return i}length(){return[...this.text].length}getSection(t){return this.sections[this.sectionIndex[t]]}getSectionIndex(t){return this.sectionIndex[t]}verticalizePunctuation(){this.text=function(t){let e="",i={premature:!0,value:void 0};const r=t[Symbol.iterator]();let o=r.next();const n=t[Symbol.iterator]();n.next();let a=n.next();for(;!o.done;)e+=!a.done&&Ki(a.value.codePointAt(0))&&!rm[a.value]||!i.premature&&Ki(i.value.codePointAt(0))&&!rm[i.value]||!rm[o.value]?o.value:rm[o.value],i={value:o.value,premature:!1},o=r.next(),a=n.next();return e}(this.text)}hasZeroWidthSpaces(){return this.text.includes("\u200b")}trim(){const t=this.text.match(/^\s*/),e=t?t[0].length:0,i=this.text.match(/\S\s*$/),r=i?i[0].length-1:0;this.text=this.text.substring(e,this.text.length-r),this.sectionIndex=this.sectionIndex.slice(e,this.sectionIndex.length-r)}substring(t,e){const i=[...this.text].slice(t,e).join(""),r=this.sectionIndex.slice(t,e);return new am(i,this.sections,r)}toCodeUnitIndex(t){return[...this.text].slice(0,t).join("").length}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((t,e)=>Math.max(t,this.sections[e].scale),0)}getMaxImageSize(t){let e=0,i=0;for(let r=0;ri))}addImageSection(t){const e=t.image?t.image.name:"";if(0===e.length)return void E("Can't add FormattedSection with an empty image.");const i=this.getNextImageSectionCharCode();i?(this.text+=String.fromCharCode(i),this.sections.push({scale:1,verticalAlign:t.verticalAlign||"bottom",imageName:e}),this.sectionIndex.push(this.sections.length-1)):E("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(t,e,i,r,o){const n=[],a=this.determineAverageLineWidth(t,e,i,r,o),s=this.hasZeroWidthSpaces();let l=0,c=0;const u=this.text[Symbol.iterator]();let h=u.next();const p=this.text[Symbol.iterator]();p.next();let d=p.next();const m=this.text[Symbol.iterator]();m.next(),m.next();let f=m.next();for(;!h.done;){const e=this.getSection(c),_=h.value.codePointAt(0);if(qi(_)||(l+=Dn(_,e,i,r,t,o)),!d.done){const t=Zi(_),i=d.value.codePointAt(0);(om[_]||t||"imageName"in e||!f.done&&nm[i])&&n.push(Rn(c+1,l,a,n,Ln(_,i,t&&s),!1))}c++,h=u.next(),d=p.next(),f=m.next()}return Fn(Rn(this.length(),l,a,n,0,!0))}determineAverageLineWidth(t,e,i,r,o){let n=0,a=0;for(const e of this.text){const s=this.getSection(a);n+=Dn(e.codePointAt(0),s,i,r,t,o),a++}return n/Math.max(1,Math.ceil(n/e))}}const sm=4294967296,lm=1/sm,cm="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");class um{constructor(t=new Uint8Array(16)){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(t,e,i=this.length){for(;this.pos>3,o=this.pos;this.type=7&i,t(r,e,this),this.pos===o&&this.skip(i)}return e}readMessage(t,e){return this.readFields(t,e,this.readVarint()+this.pos)}readFixed32(){const t=this.dataView.getUint32(this.pos,!0);return this.pos+=4,t}readSFixed32(){const t=this.dataView.getInt32(this.pos,!0);return this.pos+=4,t}readFixed64(){const t=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*sm;return this.pos+=8,t}readSFixed64(){const t=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*sm;return this.pos+=8,t}readFloat(){const t=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,t}readDouble(){const t=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,t}readVarint(t){const e=this.buf;let i,r;return r=e[this.pos++],i=127&r,r<128?i:(r=e[this.pos++],i|=(127&r)<<7,r<128?i:(r=e[this.pos++],i|=(127&r)<<14,r<128?i:(r=e[this.pos++],i|=(127&r)<<21,r<128?i:(r=e[this.pos],i|=(15&r)<<28,function(t,e,i){const r=i.buf;let o,n;if(n=r[i.pos++],o=(112&n)>>4,n<128)return Bn(t,o,e);if(n=r[i.pos++],o|=(127&n)<<3,n<128)return Bn(t,o,e);if(n=r[i.pos++],o|=(127&n)<<10,n<128)return Bn(t,o,e);if(n=r[i.pos++],o|=(127&n)<<17,n<128)return Bn(t,o,e);if(n=r[i.pos++],o|=(127&n)<<24,n<128)return Bn(t,o,e);if(n=r[i.pos++],o|=(1&n)<<31,n<128)return Bn(t,o,e);throw new Error("Expected varint not more than 10 bytes")}(i,t,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){const t=this.readVarint();return t%2==1?(t+1)/-2:t/2}readBoolean(){return Boolean(this.readVarint())}readString(){const t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&cm?cm.decode(this.buf.subarray(e,t)):function(t,e,i){let r="",o=e;for(;o239?4:e>223?3:e>191?2:1;if(o+c>i)break;1===c?e<128&&(l=e):2===c?(n=t[o+1],128==(192&n)&&(l=(31&e)<<6|63&n,l<=127&&(l=null))):3===c?(n=t[o+1],a=t[o+2],128==(192&n)&&128==(192&a)&&(l=(15&e)<<12|(63&n)<<6|63&a,(l<=2047||l>=55296&&l<=57343)&&(l=null))):4===c&&(n=t[o+1],a=t[o+2],s=t[o+3],128==(192&n)&&128==(192&a)&&128==(192&s)&&(l=(15&e)<<18|(63&n)<<12|(63&a)<<6|63&s,(l<=65535||l>=1114112)&&(l=null))),null===l?(l=65533,c=1):l>65535&&(l-=65536,r+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),r+=String.fromCharCode(l),o+=c}return r}(this.buf,e,t)}readBytes(){const t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e}readPackedVarint(t=[],e){const i=this.readPackedEnd();for(;this.pos127;);else if(2===e)this.pos=this.readVarint()+this.pos;else if(5===e)this.pos+=4;else{if(1!==e)throw new Error(`Unimplemented type: ${e}`);this.pos+=8}}writeTag(t,e){this.writeVarint(t<<3|e)}realloc(t){let e=this.length||16;for(;e268435455||t<0?function(t,e){let i,r;if(t>=0?(i=t%4294967296|0,r=t/4294967296|0):(i=~(-t%4294967296),r=~(-t/4294967296),4294967295^i?i=i+1|0:(i=0,r=r+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,i){i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,i.buf[i.pos]=127&(t>>>=7)}(i,0,e),function(t,e){const i=(7&t)<<4;e.buf[e.pos++]|=i|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(r,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))}writeSVarint(t){this.writeVarint(t<0?2*-t-1:2*t)}writeBoolean(t){this.writeVarint(+t)}writeString(t){t=String(t),this.realloc(4*t.length),this.pos++;const e=this.pos;this.pos=function(t,e,i){for(let r,o,n=0;n55295&&r<57344){if(!o){r>56319||n+1===e.length?(t[i++]=239,t[i++]=191,t[i++]=189):o=r;continue}if(r<56320){t[i++]=239,t[i++]=191,t[i++]=189,o=r;continue}r=o-55296<<10|r-56320|65536,o=null}else o&&(t[i++]=239,t[i++]=191,t[i++]=189,o=null);r<128?t[i++]=r:(r<2048?t[i++]=r>>6|192:(r<65536?t[i++]=r>>12|224:(t[i++]=r>>18|240,t[i++]=r>>12&63|128),t[i++]=r>>6&63|128),t[i++]=63&r|128)}return i}(this.buf,t,this.pos);const i=this.pos-e;i>=128&&jn(e,i,this),this.pos=e-1,this.writeVarint(i),this.pos+=i}writeFloat(t){this.realloc(4),this.dataView.setFloat32(this.pos,t,!0),this.pos+=4}writeDouble(t){this.realloc(8),this.dataView.setFloat64(this.pos,t,!0),this.pos+=8}writeBytes(t){const e=t.length;this.writeVarint(e),this.realloc(e);for(let i=0;i=128&&jn(i,r,this),this.pos=i-1,this.writeVarint(r),this.pos+=r}writeMessage(t,e,i){this.writeTag(t,2),this.writeRawMessage(e,i)}writePackedVarint(t,e){e.length&&this.writeMessage(t,Vn,e)}writePackedSVarint(t,e){e.length&&this.writeMessage(t,Nn,e)}writePackedBoolean(t,e){e.length&&this.writeMessage(t,Zn,e)}writePackedFloat(t,e){e.length&&this.writeMessage(t,Un,e)}writePackedDouble(t,e){e.length&&this.writeMessage(t,Gn,e)}writePackedFixed32(t,e){e.length&&this.writeMessage(t,$n,e)}writePackedSFixed32(t,e){e.length&&this.writeMessage(t,qn,e)}writePackedFixed64(t,e){e.length&&this.writeMessage(t,Wn,e)}writePackedSFixed64(t,e){e.length&&this.writeMessage(t,Hn,e)}writeBytesField(t,e){this.writeTag(t,2),this.writeBytes(e)}writeFixed32Field(t,e){this.writeTag(t,5),this.writeFixed32(e)}writeSFixed32Field(t,e){this.writeTag(t,5),this.writeSFixed32(e)}writeFixed64Field(t,e){this.writeTag(t,1),this.writeFixed64(e)}writeSFixed64Field(t,e){this.writeTag(t,1),this.writeSFixed64(e)}writeVarintField(t,e){this.writeTag(t,0),this.writeVarint(e)}writeSVarintField(t,e){this.writeTag(t,0),this.writeSVarint(e)}writeStringField(t,e){this.writeTag(t,2),this.writeString(e)}writeFloatField(t,e){this.writeTag(t,5),this.writeFloat(e)}writeDoubleField(t,e){this.writeTag(t,1),this.writeDouble(e)}writeBooleanField(t,e){this.writeVarintField(t,+e)}}class hm{constructor(t,{pixelRatio:e,version:i,stretchX:r,stretchY:o,content:n,textFitWidth:a,textFitHeight:s}){this.paddedRect=t,this.pixelRatio=e,this.stretchX=r,this.stretchY=o,this.content=n,this.version=i,this.textFitWidth=a,this.textFitHeight=s}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}}class pm{constructor(t,e){const i={},r={};this.haveRenderCallbacks=[];const o=[];this.addImages(t,i,o),this.addImages(e,r,o);const{w:n,h:a}=Jn(o),s=new Yp({width:n||1,height:a||1});for(const e in t){const r=t[e],o=i[e].paddedRect;Yp.copy(r.data,s,{x:0,y:0},{x:o.x+1,y:o.y+1},r.data)}for(const t in e){const i=e[t],o=r[t].paddedRect,n=o.x+1,a=o.y+1,l=i.data.width,c=i.data.height;Yp.copy(i.data,s,{x:0,y:0},{x:n,y:a},i.data),Yp.copy(i.data,s,{x:0,y:c-1},{x:n,y:a-1},{width:l,height:1}),Yp.copy(i.data,s,{x:0,y:0},{x:n,y:a+c},{width:l,height:1}),Yp.copy(i.data,s,{x:l-1,y:0},{x:n-1,y:a},{width:1,height:c}),Yp.copy(i.data,s,{x:0,y:0},{x:n+l,y:a},{width:1,height:c})}this.image=s,this.iconPositions=i,this.patternPositions=r}addImages(t,e,i){for(const r in t){const o=t[r],n={x:0,y:0,w:o.data.width+2,h:o.data.height+2};i.push(n),e[r]=new hm(n,o),o.hasRenderCallback&&this.haveRenderCallbacks.push(r)}}patchUpdatedImages(t,e){t.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const i in t.updatedImages)this.patchUpdatedImage(this.iconPositions[i],t.getImage(i),e),this.patchUpdatedImage(this.patternPositions[i],t.getImage(i),e)}patchUpdatedImage(t,e,i){if(!t||!e)return;if(t.version===e.version)return;t.version=e.version;const[r,o]=t.tl;i.update(e.data,void 0,{x:r,y:o})}}var dm;Bi("ImagePosition",hm),Bi("ImageAtlas",pm),t.ax=void 0,(dm=t.ax||(t.ax={}))[dm.none=0]="none",dm[dm.horizontal=1]="horizontal",dm[dm.vertical=2]="vertical",dm[dm.horizontalOnly=3]="horizontalOnly";const mm=128,fm=32640,_m=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];class gm{constructor(t){this.layoutVertexArray=new ip,this.indexArray=new sp,this.programConfigurations=t,this.segments=new hp,this.dynamicLayoutVertexArray=new rp,this.opacityVertexArray=new op,this.hasVisibleVertices=!1,this.placedSymbolArray=new jh}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(t,e,i,r){this.isEmpty()||(i&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Kd.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,Jd.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,_m,!0),this.opacityVertexBuffer.itemSize=1),(i||r)&&this.programConfigurations.upload(t))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}Bi("SymbolBuffers",gm);class ym{constructor(t,e,i){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new i,this.segments=new hp,this.collisionVertexArray=new ap}upload(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,Qd.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}Bi("CollisionBuffers",ym);class vm{constructor(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(t=>t.id),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];const i=this.layers[0]._unevaluatedLayout._values;this.textSizeData=ua(this.zoom,i["text-size"]),this.iconSizeData=ua(this.zoom,i["icon-size"]);const r=this.layers[0].layout,o=r.get("symbol-sort-key"),n=r.get("symbol-z-order");this.canOverlap="never"!==ha(r,"text-overlap","text-allow-overlap")||"never"!==ha(r,"icon-overlap","icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==n&&!o.isConstant(),this.sortFeaturesByY=("viewport-y"===n||"auto"===n&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===r.get("symbol-placement")&&(this.writingModes=r.get("text-writing-mode").map(e=>t.ax[e])),this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id),this.sourceID=e.sourceID}createArrays(){this.text=new gm(new Rp(this.layers,this.zoom,t=>t.startsWith("text"))),this.icon=new gm(new Rp(this.layers,this.zoom,t=>t.startsWith("icon"))),this.glyphOffsetArray=new Uh,this.lineVertexArray=new Gh,this.symbolInstances=new Nh,this.textAnchorOffsets=new $h}calculateGlyphDependencies(t,e,i,r,o){for(const n of t)if(e[n.codePointAt(0)]=!0,(i||r)&&o){const t=rm[n];t&&(e[t.codePointAt(0)]=!0)}}populate(e,i,r){var o;const n=this.layers[0],a=n.layout,s=a.get("text-font"),l=a.get("text-field"),c=a.get("icon-image"),u=("constant"!==l.value.kind||l.value.value instanceof vc&&!l.value.value.isEmpty()||l.value.value.toString().length>0)&&("constant"!==s.value.kind||s.value.value.length>0),h="constant"!==c.value.kind||!!c.value.value||Object.keys(c.parameters).length>0,p=a.get("symbol-sort-key");if(this.features=[],!u&&!h)return;const d=i.iconDependencies,m=i.glyphDependencies,f=i.availableImages,_=new Nu(this.zoom);for(const{feature:i,id:l,index:c,sourceLayerIndex:g}of e){const e=n._featureFilter.needGeometry,y=pr(i,e);if(!n._featureFilter.filter(_,y,r))continue;let v,b;if(e||(y.geometry=hr(i)),u){const t=n.getValueAndResolveTokens("text-field",y,r,f),e=vc.factory(t);this.hasRTLText||(this.hasRTLText=ma(e)),(!this.hasRTLText||"unavailable"===Vu.getRTLTextPluginStatus()||this.hasRTLText&&Vu.isParsed())&&(v=zn(e,n,y))}if(h){const t=n.getValueAndResolveTokens("icon-image",y,r,f);b=t instanceof Sc?t:Sc.fromString(t)}if(!v&&!b)continue;const x=this.sortFeaturesByKey?p.evaluate(y,{},r):void 0;if(this.features.push({id:l,text:v,icon:b,index:c,sourceLayerIndex:g,geometry:y.geometry,properties:i.properties,type:xd.types[i.type],sortKey:x}),b&&(d[b.name]=!0),v){const e=s.evaluate(y,{},r).join(","),i="viewport"!==a.get("text-rotation-alignment")&&"point"!==a.get("symbol-placement");this.allowVerticalPlacement=null===(o=this.writingModes)||void 0===o?void 0:o.includes(t.ax.vertical);for(const t of v.sections)if(t.image)d[t.image.name]=!0;else{const r=Wi(v.toString()),o=t.fontStack||e;m[o]||(m[o]={}),this.calculateGlyphDependencies(t.text,m[o],i,this.allowVerticalPlacement,r)}}}"line"===a.get("symbol-placement")&&(this.features=function(t){function e(e){s.push(t[e]),l++}function i(t,e,i){const r=a[t];return delete a[t],a[e]=r,s[r].geometry[0].pop(),s[r].geometry[0]=s[r].geometry[0].concat(i[0]),r}function r(t,e,i){const r=n[e];return delete n[e],n[t]=r,s[r].geometry[0].shift(),s[r].geometry[0]=i[0].concat(s[r].geometry[0]),r}function o(t,e,i){const r=i?e[0][e[0].length-1]:e[0][0];return`${t}:${r.x}:${r.y}`}const n={},a={},s=[];let l=0;for(let c=0;ct.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((t,e)=>t.sortKey-e.sortKey)}update(t,e,i){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,{imagePositions:i}),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,{imagePositions:i}))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(t,e){const i=this.lineVertexArray.length;if(void 0!==t.segment){let i=t.dist(e[t.segment+1]),r=t.dist(e[t.segment]);const o={};for(let r=t.segment+1;r=0;i--)o[i]={x:e[i].x,y:e[i].y,tileUnitDistanceFromAnchor:r},i>0&&(r+=e[i-1].dist(e[i]));for(let t=0;t0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(t,e){const i=t.placedSymbolArray.get(e),r=i.vertexStartIndex+4*i.numGlyphs;for(let e=i.vertexStartIndex;er[t]-r[e]||o[e]-o[t]),n}addToSortKeyRanges(t,e){const i=this.sortKeyRanges[this.sortKeyRanges.length-1];(null==i?void 0:i.sortKey)===e?i.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const t of this.symbolInstanceIndexes){const e=this.symbolInstances.get(t);this.featureSortOrder.push(e.featureIndex);const i=[e.rightJustifiedTextSymbolIndex,e.centerJustifiedTextSymbolIndex,e.leftJustifiedTextSymbolIndex];for(let t=0;t=0&&i.indexOf(e)===t&&this.addIndicesForPlacedSymbol(this.text,e)}e.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,e.verticalPlacedTextSymbolIndex),e.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.placedIconSymbolIndex),e.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let bm,xm;Bi("SymbolBucket",vm,{omit:["layers","collisionBoxArray","features","compareText"]}),vm.MAX_GLYPHS=65535,vm.addDynamicAttributes=da;var wm={get paint(){return xm=xm||new ih({"icon-opacity":new Ju(Bl.paint_symbol["icon-opacity"]),"icon-color":new Ju(Bl.paint_symbol["icon-color"]),"icon-halo-color":new Ju(Bl.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ju(Bl.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ju(Bl.paint_symbol["icon-halo-blur"]),"icon-translate":new Ku(Bl.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ku(Bl.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ju(Bl.paint_symbol["text-opacity"]),"text-color":new Ju(Bl.paint_symbol["text-color"],{runtimeType:Wl,getOverride:t=>t.textColor,hasOverride:t=>!!t.textColor}),"text-halo-color":new Ju(Bl.paint_symbol["text-halo-color"]),"text-halo-width":new Ju(Bl.paint_symbol["text-halo-width"]),"text-halo-blur":new Ju(Bl.paint_symbol["text-halo-blur"]),"text-translate":new Ku(Bl.paint_symbol["text-translate"]),"text-translate-anchor":new Ku(Bl.paint_symbol["text-translate-anchor"])})},get layout(){return bm=bm||new ih({"symbol-placement":new Ku(Bl.layout_symbol["symbol-placement"]),"symbol-spacing":new Ku(Bl.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ku(Bl.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ju(Bl.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ku(Bl.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ku(Bl.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Ku(Bl.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Ku(Bl.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ku(Bl.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ku(Bl.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ju(Bl.layout_symbol["icon-size"]),"icon-text-fit":new Ku(Bl.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ku(Bl.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ju(Bl.layout_symbol["icon-image"]),"icon-rotate":new Ju(Bl.layout_symbol["icon-rotate"]),"icon-padding":new Ju(Bl.layout_symbol["icon-padding"]),"icon-keep-upright":new Ku(Bl.layout_symbol["icon-keep-upright"]),"icon-offset":new Ju(Bl.layout_symbol["icon-offset"]),"icon-anchor":new Ju(Bl.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ku(Bl.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ku(Bl.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ku(Bl.layout_symbol["text-rotation-alignment"]),"text-field":new Ju(Bl.layout_symbol["text-field"]),"text-font":new Ju(Bl.layout_symbol["text-font"]),"text-size":new Ju(Bl.layout_symbol["text-size"]),"text-max-width":new Ju(Bl.layout_symbol["text-max-width"]),"text-line-height":new Ku(Bl.layout_symbol["text-line-height"]),"text-letter-spacing":new Ju(Bl.layout_symbol["text-letter-spacing"]),"text-justify":new Ju(Bl.layout_symbol["text-justify"]),"text-radial-offset":new Ju(Bl.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ku(Bl.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Ju(Bl.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Ju(Bl.layout_symbol["text-anchor"]),"text-max-angle":new Ku(Bl.layout_symbol["text-max-angle"]),"text-writing-mode":new Ku(Bl.layout_symbol["text-writing-mode"]),"text-rotate":new Ju(Bl.layout_symbol["text-rotate"]),"text-padding":new Ku(Bl.layout_symbol["text-padding"]),"text-keep-upright":new Ku(Bl.layout_symbol["text-keep-upright"]),"text-transform":new Ju(Bl.layout_symbol["text-transform"]),"text-offset":new Ju(Bl.layout_symbol["text-offset"]),"text-allow-overlap":new Ku(Bl.layout_symbol["text-allow-overlap"]),"text-overlap":new Ku(Bl.layout_symbol["text-overlap"]),"text-ignore-placement":new Ku(Bl.layout_symbol["text-ignore-placement"]),"text-optional":new Ku(Bl.layout_symbol["text-optional"])})}};class Tm{constructor(t){if(void 0===t.property.overrides)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=t.property.overrides?t.property.overrides.runtimeType:Gl,this.defaultValue=t}evaluate(t){if(t.formattedSection){const e=this.defaultValue.property.overrides;if(null==e?void 0:e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Bi("FormatSectionOverride",Tm,{omit:["defaultValue"]});class km extends nh{constructor(t,e){super(t,wm,e)}recalculate(t,e){if(super.recalculate(t,e),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){const t=this.layout.get("text-writing-mode");if(t){const e=[];for(const i of t)e.includes(i)||e.push(i);this.layout._values["text-writing-mode"]=e}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,e,i,r){const o=this.layout.get(t).evaluate(e,{},i,r),n=this._unevaluatedLayout._values[t];return n.isDataDriven()||Ze(n.value)||!o?o:function(t,e){return e.replace(/{([^{}]+)}/g,(e,i)=>t&&i in t?String(t[i]):"")}(e.properties,o)}createBucket(t){return new vm(t)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const t of wm.paint.overridableProperties){if(!km.hasPaintOverride(this.layout,t))continue;const e=this.paint.get(t),i=new Tm(e),r=new bu(i,e.property.specification);let o=null;o="constant"===e.value.kind||"source"===e.value.kind?new xu("source",r):new wu("composite",r,e.value.zoomStops),this.paint._values[t]=new Yu(e.property,o,e.parameters)}}_handleOverridablePaintPropertyUpdate(t,e,i){return!(!this.layout||e.isDataDriven()||i.isDataDriven())&&km.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,e){const i=t.get("text-field"),r=wm.paint.properties[e];let o=!1;const n=t=>{var e;for(const i of t)if(null===(e=r.overrides)||void 0===e?void 0:e.hasOverride(i))return void(o=!0)};if("constant"===i.value.kind&&i.value.value instanceof vc)n(i.value.value.sections);else if("source"===i.value.kind||"composite"===i.value.kind){const t=e=>{o||(e instanceof Ac&&kt(e.value)===Jl?n(e.value.sections):e instanceof au?n(e.sections):e.eachChild(t))},e=i.value;e._styleExpression&&t(e._styleExpression.expression)}return o}}let Mm;var Sm={get paint(){return Mm=Mm||new ih({"background-color":new Ku(Bl.paint_background["background-color"]),"background-pattern":new th(Bl.paint_background["background-pattern"]),"background-opacity":new Ku(Bl.paint_background["background-opacity"])})}};class Pm extends nh{constructor(t,e){super(t,Sm,e)}}class Am extends nh{constructor(t,e){super(t,{},e),this.onAdd=t=>{this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},this.onRemove=t=>{this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)},this.implementation=t}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class Im{constructor(t){this._methodToThrottle=t,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var t;this._triggered||(this._triggered=!0,null===(t=this._channel)||void 0===t||t.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const Cm={once:!0},Em=6371008.8;class zm{constructor(t,e){if(isNaN(t)||isNaN(e))throw new Error(`Invalid LngLat object: (${t}, ${e})`);if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new zm(S(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){const e=Math.PI/180,i=this.lat*e,r=t.lat*e,o=Math.sin(i)*Math.sin(r)+Math.cos(i)*Math.cos(r)*Math.cos((t.lng-this.lng)*e);return Em*Math.acos(Math.min(o,1))}static convert(t){if(t instanceof zm)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new zm(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new zm(Number("lng"in t?t.lng:t.lon),Number(t.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 [, ]")}}const Dm=2*Math.PI*Em;class Om{constructor(t,e,i=0){this.x=+t,this.y=+e,this.z=+i}static fromLngLat(t,e=0){const i=zm.convert(t);return new Om(_a(i.lng),ga(i.lat),ya(e,i.lat))}toLngLat(){return new zm(va(this.x),ba(this.y))}toAltitude(){return xa(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/Dm*(t=ba(this.y),1/Math.cos(t*Math.PI/180));var t}}class Lm{constructor(t,e,i){if(!function(t,e,i){return!(t<0||t>25||i<0||i>=Math.pow(2,t)||e<0||e>=Math.pow(2,t))}(t,e,i))throw new Error(`x=${e}, y=${i}, z=${t} outside of bounds. 0<=x<${Math.pow(2,t)}, 0<=y<${Math.pow(2,t)} 0<=z<=25 `);this.z=t,this.x=e,this.y=i,this.key=Ta(0,t,t,e,i)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,e,i){const r=(n=this.y,a=this.z,s=wa(256*(o=this.x),256*(n=Math.pow(2,a)-n-1),a),l=wa(256*(o+1),256*(n+1),a),s[0]+","+s[1]+","+l[0]+","+l[1]);var o,n,a,s,l;const c=function(t,e,i){let r="";for(let o=t;o>0;o--){const t=1<1?"@2x":"").replace(/{quadkey}/g,c).replace(/{bbox-epsg-3857}/g,r)}isChildOf(t){const e=this.z-t.z;return e>0&&t.x===this.x>>e&&t.y===this.y>>e}getTilePoint(t){const e=Math.pow(2,this.z);return new i((t.x*e-this.x)*yl,(t.y*e-this.y)*yl)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Rm{constructor(t,e){this.wrap=t,this.canonical=e,this.key=Ta(t,e.z,e.z,e.x,e.y)}}class Fm{constructor(t,e,i,r,o){if(this.terrainRttPosMatrix32f=null,t= z; overscaledZ = ${t}; z = ${i}`);this.overscaledZ=t,this.wrap=e,this.canonical=new Lm(i,+r,+o),this.key=Ta(e,t,i,r,o)}clone(){return new Fm(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const e=this.canonical.z-t;return t>this.canonical.z?new Fm(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Fm(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(t,e){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const i=this.canonical.z-t;return t>this.canonical.z?Ta(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):Ta(this.wrap*+e,t,t,this.canonical.x>>i,this.canonical.y>>i)}isChildOf(t){if(t.wrap!==this.wrap)return!1;if(this.overscaledZ-t.overscaledZ<=0)return!1;if(0===t.overscaledZ)return this.overscaledZ>0;const e=this.canonical.z-t.canonical.z;return!(e<0)&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e}children(t){if(this.overscaledZ>=t)return[new Fm(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const e=this.canonical.z+1,i=2*this.canonical.x,r=2*this.canonical.y;return[new Fm(e,this.wrap,e,i,r),new Fm(e,this.wrap,e,i+1,r),new Fm(e,this.wrap,e,i,r+1),new Fm(e,this.wrap,e,i+1,r+1)]}isLessThan(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y=0&&t=0&&e=l)return null;let u=this.canonical.x+r,h=this.wrap;return u<0?(h-=Math.ceil(-u/l),u=(u%l+l)%l):u>=l&&(h+=Math.floor(u/l),u%=l),{tileID:new Fm(this.overscaledZ,h,s,u,c),x:n,y:a}}}Bi("CanonicalTileID",Lm),Bi("OverscaledTileID",Fm,{omit:["terrainRttPosMatrix32f"]});class Bm{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(t){return this.minX=Math.min(this.minX,t.x),this.minY=Math.min(this.minY,t.y),this.maxX=Math.max(this.maxX,t.x),this.maxY=Math.max(this.maxY,t.y),this}expandBy(t){return this.minX-=t,this.minY-=t,this.maxX+=t,this.maxY+=t,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(t){return this.expandBy(-t)}map(t){const e=new Bm;return e.extend(t(new i(this.minX,this.minY))),e.extend(t(new i(this.maxX,this.minY))),e.extend(t(new i(this.minX,this.maxY))),e.extend(t(new i(this.maxX,this.maxY))),e}static fromPoints(t){const e=new Bm;for(const i of t)e.extend(i);return e}contains(t){return t.x>=this.minX&&t.x<=this.maxX&&t.y>=this.minY&&t.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(t){return!this.empty()&&!t.empty()&&t.minX>=this.minX&&t.maxX<=this.maxX&&t.minY>=this.minY&&t.maxY<=this.maxY}intersects(t){return!this.empty()&&!t.empty()&&t.minX<=this.maxX&&t.maxX>=this.minX&&t.minY<=this.maxY&&t.maxY>=this.minY}}class jm{constructor(t){this._stringToNumber={},this._numberToString=[];for(let e=0;e=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${t} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[t]}}class Vm{constructor(t,e,i,r,o){this.type="Feature",this._vectorTileFeature=t,this._x=i,this._y=r,this._z=e,this.properties=t.properties,this.id=o}projectPoint(t,e,i,r){return[360*(t.x+e)/r-180,360/Math.PI*Math.atan(Math.exp((1-2*(t.y+i)/r)*Math.PI))-90]}projectLine(t,e,i,r){return t.map(t=>this.projectPoint(t,e,i,r))}get geometry(){if(this._geometry)return this._geometry;const t=this._vectorTileFeature,e=t.extent*Math.pow(2,this._z),i=t.extent*this._x,r=t.extent*this._y,o=t.loadGeometry();switch(t.type){case 1:{const t=[];for(const e of o)t.push(e[0]);const n=this.projectLine(t,i,r,e);this._geometry=1===t.length?{type:"Point",coordinates:n[0]}:{type:"MultiPoint",coordinates:n};break}case 2:{const t=o.map(t=>this.projectLine(t,i,r,e));this._geometry=1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t};break}case 3:{const t=wo(o),n=[];for(const o of t)n.push(o.map(t=>this.projectLine(t,i,r,e)));this._geometry=1===n.length?{type:"Polygon",coordinates:n[0]}:{type:"MultiPolygon",coordinates:n};break}default:throw new Error(`unknown feature type: ${t.type}`)}return this._geometry}set geometry(t){this._geometry=t}toJSON(){const t={geometry:this.geometry};for(const e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&"_x"!==e&&"_y"!==e&&"_z"!==e&&(t[e]=this[e]);return t}}class Nm{constructor(t,e,i){this._name=t,this.dataBuffer=e,"number"==typeof i?this._size=i:(this.nullabilityBuffer=i,this._size=i.size())}getValue(t){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(t)?null:this.getValueFromBuffer(t)}has(t){return this.nullabilityBuffer?.get(t)||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class Um extends Nm{}class Gm extends Um{getValueFromBuffer(t){return this.dataBuffer[t]}}class Zm extends Um{getValueFromBuffer(t){return this.dataBuffer[t]}}class $m extends Nm{constructor(t,e,i,r){super(t,e,r),this.delta=i}}class qm extends $m{constructor(t,e,i,r){super(t,Int32Array.of(e),i,r)}getValueFromBuffer(t){return this.dataBuffer[0]+t*this.delta}}class Wm extends Nm{constructor(t,e,i,r){super(t,r?Int32Array.of(e):Uint32Array.of(e),i)}getValueFromBuffer(t){return this.dataBuffer[0]}}class Hm{constructor(t,e,i,r,o=4096){this._name=t,this._geometryVector=e,this._idVector=i,this._propertyVectors=r,this._extent=o}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(t){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map(t=>[t.name,t]))),this.propertyVectorsMap.get(t)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){const t=[],e=this.geometryVector.getGeometries();for(let i=0;i>>32-t;const Qm=Jm,tf=256,ef=function(){if(!Number.isFinite(65536))return 65536;const t=ka(Math.floor(65536),tf);return 0===t?tf:t}(),rf=3*ef/tf+ef|0;var of,nf,af,sf,lf,cf,uf,hf;!function(t){t.PRESENT="PRESENT",t.DATA="DATA",t.OFFSET="OFFSET",t.LENGTH="LENGTH"}(of||(of={})),function(t){t.NONE="NONE",t.SINGLE="SINGLE",t.SHARED="SHARED",t.VERTEX="VERTEX",t.MORTON="MORTON",t.FSST="FSST"}(nf||(nf={})),function(t){t.VERTEX="VERTEX",t.INDEX="INDEX",t.STRING="STRING",t.KEY="KEY"}(af||(af={})),function(t){t.VAR_BINARY="VAR_BINARY",t.GEOMETRIES="GEOMETRIES",t.PARTS="PARTS",t.RINGS="RINGS",t.TRIANGLES="TRIANGLES",t.SYMBOL="SYMBOL",t.DICTIONARY="DICTIONARY"}(sf||(sf={})),function(t){t[t.FLAT=0]="FLAT",t[t.CONST=1]="CONST",t[t.SEQUENCE=2]="SEQUENCE",t[t.DICTIONARY=3]="DICTIONARY",t[t.FSST_DICTIONARY=4]="FSST_DICTIONARY"}(lf||(lf={}));class pf{constructor(t,e){this.values=t,this._size=e}get(t){const e=Math.floor(t/8);return 1==(this.values[e]>>t%8&1)}set(t,e){const i=Math.floor(t/8);this.values[i]=this.values[i]|(e?1:0)<>t%8&1}size(){return this._size}getBuffer(){return this.values}}class df extends Um{getValueFromBuffer(t){return this.dataBuffer[t]}}class mf extends $m{constructor(t,e,i,r){super(t,BigInt64Array.of(e),i,r)}getValueFromBuffer(t){return this.dataBuffer[0]+BigInt(t)*this.delta}}!function(t){t[t.POINT=0]="POINT",t[t.LINESTRING=1]="LINESTRING",t[t.POLYGON=2]="POLYGON",t[t.MULTIPOINT=3]="MULTIPOINT",t[t.MULTILINESTRING=4]="MULTILINESTRING",t[t.MULTIPOLYGON=5]="MULTIPOLYGON"}(cf||(cf={})),function(t){t[t.POINT=0]="POINT",t[t.LINESTRING=1]="LINESTRING",t[t.POLYGON=2]="POLYGON"}(uf||(uf={})),function(t){t[t.MORTON=0]="MORTON",t[t.VEC_2=1]="VEC_2",t[t.VEC_3=2]="VEC_3"}(hf||(hf={}));class ff{constructor(t,e,i,r,o){this._vertexBufferType=t,this._topologyVector=e,this._vertexOffsets=i,this._vertexBuffer=r,this._mortonSettings=o}get vertexBufferType(){return this._vertexBufferType}get topologyVector(){return this._topologyVector}get vertexOffsets(){return this._vertexOffsets}get vertexBuffer(){return this._vertexBuffer}getSimpleEncodedVertex(t){const e=this.vertexOffsets?2*this.vertexOffsets[t]:2*t;return[this.vertexBuffer[e],this.vertexBuffer[e+1]]}getVertex(t){if(this.vertexOffsets&&this.mortonSettings){const e=rs(this.vertexBuffer[this.vertexOffsets[t]],this.mortonSettings.numBits,this.mortonSettings.coordinateShift);return[e.x,e.y]}const e=this.vertexOffsets?2*this.vertexOffsets[t]:2*t;return[this.vertexBuffer[e],this.vertexBuffer[e+1]]}getGeometries(){return function(t){const e=new Array(t.numGeometries);let r=1,o=1,n=1,a=0,s=0,l=0;const c=t.mortonSettings,u=t.topologyVector,h=u.geometryOffsets,p=u.partOffsets,d=u.ringOffsets,m=t.vertexOffsets,f=!m||0===m.length,_=t.containsPolygonGeometry(),g=t.vertexBuffer;for(let u=0;u[t]),r+=t,o+=t}break;case cf.LINESTRING:{let i,u;_?(i=d[o]-d[o-1],o++):i=p[r]-p[r-1],r++,f?(u=as(g,s,i,!1),s+=2*i):(u=ns(t.vertexBufferType,g,m,l,i,!1,c),l+=i),e[a++]=[u],h&&n++}break;case cf.POLYGON:{const i=p[r]-p[r-1];r++;const u=new Array(i-1);let _,y=d[o]-d[o-1];if(o++,f){_=as(g,s,y,!0),s+=2*y;for(let t=0;t0&&e.push(e[0]),h.push(e)}t[e]=h,n&&c++}break;case cf.MULTIPOLYGON:{const u=n[c]-n[c-1];c++;const h=[];for(let t=0;t0&&e.push(e[0]),h.push(e)}}t[e]=h}}return t}[Symbol.iterator](){return null}}class vf extends yf{constructor(t,e,i,r,o,n){super(i,r,o,n),this._numGeometries=t,this._geometryType=e}geometryType(t){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}class bf extends yf{constructor(t,e,i,r,o){super(e,i,r,o),this._geometryTypes=t}geometryType(t){return this._geometryTypes[t]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}class xf extends Nm{constructor(t,e,i){super(t,e.getBuffer(),i),this.dataVector=e}getValueFromBuffer(t){return this.dataVector.get(t)}}class wf extends Um{getValueFromBuffer(t){return this.dataBuffer[t]}}class Tf extends Nm{constructor(t,e,i,r){super(t,r?BigInt64Array.of(e):BigUint64Array.of(e),i)}getValueFromBuffer(t){return this.dataBuffer[0]}}const kf=new TextDecoder;class Mf extends Nm{constructor(t,e,i,r){super(t,i,r),this.offsetBuffer=e}}class Sf extends Mf{constructor(t,e,i,r){super(t,e,i,r??e.length-1)}getValueFromBuffer(t){return ds(this.dataBuffer,this.offsetBuffer[t],this.offsetBuffer[t+1])}}class Pf extends Mf{constructor(t,e,i,r,o){super(t,i,r,o??e.length),this.indexBuffer=e,this.indexBuffer=e}getValueFromBuffer(t){const e=this.indexBuffer[t];return ds(this.dataBuffer,this.offsetBuffer[e],this.offsetBuffer[e+1])}}class Af extends Mf{constructor(t,e,i,r,o,n,a){super(t,i,r,a),this.indexBuffer=e,this.symbolOffsetBuffer=o,this.symbolTableBuffer=n}getValueFromBuffer(t){null==this.decodedDictionary&&(null==this.symbolLengthBuffer&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=function(t,e,i){const r=[],o=new Array(e.length).fill(0);for(let t=1;t>>0,a=r.get()+e;if(a>t.length)throw new Error(`Block overruns tile: ${a} > ${t.length}`);if(1!=za(t,r,1)[0]>>>0){r.set(a);continue}const[s,l]=ks(t,r),c=s.featureTables[0];let u=null,h=null;const p=[];let d=0;for(const e of c.columns){const o=e.name;if("scalarType"===(n=e).type&&"logicalType"===n.scalarType?.type&&0===n.scalarType.logicalType){let n=null;if(e.nullable){const e=$a(t,r),i=r.get(),o=ps(t,e.numValues,e.byteLength,r);r.set(i+e.byteLength),n=new pf(o,e.numValues)}const a=$a(t,r);d=n?n.size():a.decompressedCount,u=Ms(t,e,r,o,a,n??d,i)}else if(bs(e)){const e=za(t,r,1)[0];if(0===d){const e=r.get();d=$a(t,r).decompressedCount,r.set(e)}h=cs(t,e,r,d)}else{const i=vs(e)?za(t,r,1)[0]:1;if(0===i)continue;const o=ms(t,r,e,i,d);if(o)if(Array.isArray(o))for(const t of o)p.push(t);else p.push(o)}}const m=new Hm(c.name,h,u,p,l);o.push(m),r.set(a)}var n;return o}(new Uint8Array(t));this.layers=e.reduce((t,e)=>Object.assign(Object.assign({},t),{[e.name]:new Ef(e)}),{})}}class Df{constructor(t,e){this.feature=t,this.type=t.type,this.properties=t.tags?t.tags:{},this.extent=e,"id"in t&&("string"==typeof t.id?this.id=parseInt(t.id,10):"number"!=typeof t.id||isNaN(t.id)||(this.id=t.id))}loadGeometry(){const t=[],e=1===this.feature.type?[this.feature.geometry]:this.feature.geometry;for(const r of e){const e=[];for(const t of r)e.push(new i(t[0],t[1]));t.push(e)}return t}}const Of="_geojsonTileLayer";class Lf{constructor(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Lu(yl,16,0),this.grid3D=new Lu(yl,16,0),this.featureIndexArray=new Wh,this.promoteId=e}insert(t,e,i,r,o,n){const a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(i,r,o);const s=n?this.grid3D:this.grid;for(const t of e){const e=[1/0,1/0,-1/0,-1/0];for(const i of t)e[0]=Math.min(e[0],i.x),e[1]=Math.min(e[1],i.y),e[2]=Math.max(e[2],i.x),e[3]=Math.max(e[3],i.y);e[0]=0&&e[3]>=0&&s.insert(a,e[0],e[1],e[2],e[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers="mlt"!==this.encoding?new Td(new um(this.rawTileData)).layers:new zf(this.rawTileData).layers,this.sourceLayerCoder=new jm(this.vtLayers?Object.keys(this.vtLayers).sort():[Of])),this.vtLayers}query(t,e,r,o){this.loadVTLayers();const n=t.params,a=yl/t.tileSize/t.scale,s=Ke(n.filter,n.globalState),l=t.queryGeometry,c=t.queryPadding*a,u=Bm.fromPoints(l),h=this.grid.query(u.minX-c,u.minY-c,u.maxX+c,u.maxY+c),p=Bm.fromPoints(t.cameraQueryGeometry).expandBy(c),d=this.grid3D.query(p.minX,p.minY,p.maxX,p.maxY,(e,r,o,n)=>function(t,e,r,o,n){for(const i of t)if(e<=i.x&&r<=i.y&&o>=i.x&&n>=i.y)return!0;const a=[new i(e,r),new i(e,n),new i(o,n),new i(o,r)];if(t.length>2)for(const e of a)if(Tr(t,e))return!0;for(let e=0;e(u||(u=hr(e)),i.queryIntersectsFeature({queryGeometry:l,feature:e,featureState:r,geometry:u,zoom:this.z,transform:t.transform,pixelsToTileUnits:a,pixelPosMatrix:t.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:t.getElevation})))}return m}loadMatchingFeature(t,e,i,r,o,n,a,s,l,c,u){const h=this.bucketLayerIDs[e];if(n&&!h.some(t=>n.has(t)))return;const p=this.sourceLayerCoder.decode(i),d=this.vtLayers[p].feature(r);if(o.needGeometry){const t=pr(d,!0);if(!o.filter(new Nu(this.tileID.overscaledZ),t,this.tileID.canonical))return}else if(!o.filter(new Nu(this.tileID.overscaledZ),d))return;const m=this.getId(d,p);for(const e of h){if(n&&!n.has(e))continue;const i=s[e];if(!i)continue;let o={};m&&c&&(o=c.getState(i.sourceLayer||Of,m));const h=P({},l[e]);h.paint=Ds(h.paint,i.paint,d,o,a),h.layout=Ds(h.layout,i.layout,d,o,a);const p=!u||u(d,i,o);if(!p)continue;const f=new Vm(d,this.z,this.x,this.y,m);f.layer=h;let _=t[e];void 0===_&&(_=t[e]=[]),_.push({featureIndex:r,feature:f,intersectionZ:p})}}lookupSymbolFeatures(t,e,i,r,o,n,a,s){const l={};this.loadVTLayers();const c=Ke(o.filterSpec,o.globalState);for(const o of t)this.loadMatchingFeature(l,i,r,o,c,n,a,s,e);return l}hasLayer(t){for(const e of this.bucketLayerIDs)for(const i of e)if(t===i)return!0;return!1}getId(t,e){var i;let r=t.id;return this.promoteId&&(r=t.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[e]],"boolean"==typeof r&&(r=Number(r)),void 0===r&&(null===(i=t.properties)||void 0===i?void 0:i.cluster)&&this.promoteId&&(r=Number(t.properties.cluster_id))),r}}Bi("FeatureIndex",Lf,{omit:["rawTileData","sourceLayerCoder"]});class Rf extends i{constructor(t,e,i,r){super(t,e),this.angle=i,void 0!==r&&(this.segment=r)}clone(){return new Rf(this.x,this.y,this.angle,this.segment)}}Bi("Anchor",Rf);class Ff{constructor(t,e,r,o,n,a,s,l,c,u){var h;if(this.boxStartIndex=t.length,c){let t=a.top,e=a.bottom;const i=a.collisionPadding;i&&(t-=i[1],e+=i[3]);let r=e-t;r>0&&(r=Math.max(10,r),this.circleDiameter=r)}else{const c=(null===(h=a.image)||void 0===h?void 0:h.content)&&(a.image.textFitWidth||a.image.textFitHeight)?la(a):{x1:a.left,y1:a.top,x2:a.right,y2:a.bottom};c.y1=c.y1*s-l[0],c.y2=c.y2*s+l[2],c.x1=c.x1*s-l[3],c.x2=c.x2*s+l[1];const p=a.collisionPadding;if(p&&(c.x1-=p[0]*s,c.y1-=p[1]*s,c.x2+=p[2]*s,c.y2+=p[3]*s),u){const t=new i(c.x1,c.y1),e=new i(c.x2,c.y1),r=new i(c.x1,c.y2),o=new i(c.x2,c.y2),n=u*Math.PI/180;t._rotate(n),e._rotate(n),r._rotate(n),o._rotate(n),c.x1=Math.min(t.x,e.x,r.x,o.x),c.x2=Math.max(t.x,e.x,r.x,o.x),c.y1=Math.min(t.y,e.y,r.y,o.y),c.y2=Math.max(t.y,e.y,r.y,o.y)}t.emplaceBack(e.x,e.y,c.x1,c.y1,c.x2,c.y2,r,o,n)}this.boxEndIndex=t.length}}class Bf{constructor(t=[],e=(t,e)=>te?1:0){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:i}=this,r=e[t];for(;t>0;){const o=t-1>>1,n=e[o];if(i(r,n)>=0)break;e[t]=n,t=o}e[t]=r}_down(t){const{data:e,compare:i}=this,r=this.length>>1,o=e[t];for(;t=0)break;e[t]=e[r],t=r}e[t]=o}}class jf{constructor(t,e,r,o){this.p=new i(t,e),this.h=r,this.d=function(t,e){let i=!1,r=1/0;for(const o of e)for(let e=0,n=o.length,a=n-1;et.y!=s.y>t.y&&t.x<(s.x-n.x)*(t.y-n.y)/(s.y-n.y)+n.x&&(i=!i),r=Math.min(r,xr(t,n,s))}return(i?1:-1)*Math.sqrt(r)}(this.p,o),this.max=this.d+this.h*Math.SQRT2}}var Vf;t.aM=void 0,(Vf=t.aM||(t.aM={}))[Vf.center=1]="center",Vf[Vf.left=2]="left",Vf[Vf.right=3]="right",Vf[Vf.top=4]="top",Vf[Vf.bottom=5]="bottom",Vf[Vf["top-left"]=6]="top-left",Vf[Vf["top-right"]=7]="top-right",Vf[Vf["bottom-left"]=8]="bottom-left",Vf[Vf["bottom-right"]=9]="bottom-right";const Nf=Number.POSITIVE_INFINITY;t.$=j,t.A=_l,t.B=Uu,t.C=Fi,t.D=Ku,t.E=Fl,t.F=Cu,t.G=function([t,e,i]){return e+=90,e*=Math.PI/180,i*=Math.PI/180,{x:t*Math.cos(e)*Math.sin(i),y:t*Math.sin(e)*Math.sin(i),z:t*Math.cos(i)}},t.H=Xc,t.I=hm,t.J=Nu,t.K=zu,t.L=function(t){if(null==wl){const e=t.navigator?t.navigator.userAgent:null;wl=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return wl},t.M=El,t.N=class{constructor(t,e){this.target=t,this.mapId=e,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Im(()=>this.process()),this.subscription=R(this.target,"message",t=>this.receive(t),!1),this.globalScope=D(self)?t:window}registerMessageHandler(t,e){this.messageHandlers[t]=e}unregisterMessageHandler(t){delete this.messageHandlers[t]}sendAsync(t,e){return new Promise((i,r)=>{const o=Math.round(1e18*Math.random()).toString(36).substring(0,10),n=e?R(e.signal,"abort",()=>{null==n||n.unsubscribe(),delete this.resolveRejects[o];const e={id:o,type:"",origin:location.origin,targetMapId:t.targetMapId,sourceMapId:this.mapId};this.target.postMessage(e)},Cm):null;this.resolveRejects[o]={resolve:t=>{null==n||n.unsubscribe(),i(t)},reject:t=>{null==n||n.unsubscribe(),r(t)}};const a=[],s=Object.assign(Object.assign({},t),{id:o,sourceMapId:this.mapId,origin:location.origin,data:Ui(t.data,a)});this.target.postMessage(s,{transfer:a})})}receive(t){const e=t.data,i=e.id,r=["file://","resource://android","null"],o=[e.origin,location.origin],n=e.origin===location.origin,a=o.some(t=>r.includes(t));if((n||a)&&(!e.targetMapId||this.mapId===e.targetMapId)){if(""===e.type){delete this.tasks[i];const t=this.abortControllers[i];return delete this.abortControllers[i],void(t&&t.abort())}if(D(self)||e.mustQueue)return this.tasks[i]=e,this.taskQueue.push(i),void this.invoker.trigger();this.processTask(i,e)}}process(){if(0===this.taskQueue.length)return;const t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length>0&&this.invoker.trigger(),e&&this.processTask(t,e)}processTask(t,i){return e(this,void 0,void 0,function*(){if(""===i.type){const e=this.resolveRejects[t];if(delete this.resolveRejects[t],!e)return;return void(i.error?e.reject(b(Gi(i.error))):e.resolve(Gi(i.data)))}if(!this.messageHandlers[i.type])return void this.completeTask(t,new Error(`Could not find a registered handler for ${i.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const e=Gi(i.data),r=new AbortController;this.abortControllers[t]=r;try{const o=yield this.messageHandlers[i.type](i.sourceMapId,e,r);this.completeTask(t,null,o)}catch(e){this.completeTask(t,b(e))}})}completeTask(t,e,i){const r=[];delete this.abortControllers[t];const o={id:t,type:"",sourceMapId:this.mapId,origin:location.origin,error:e?Ui(e):null,data:Ui(i,r)};this.target.postMessage(o,{transfer:r})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},t.O=function(){var t=new _l(16);return _l!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.P=i,t.Q=function(t,e,i){var r,o,n,a,s,l,c,u,h,p,d,m,f=i[0],_=i[1],g=i[2];return e===t?(t[12]=e[0]*f+e[4]*_+e[8]*g+e[12],t[13]=e[1]*f+e[5]*_+e[9]*g+e[13],t[14]=e[2]*f+e[6]*_+e[10]*g+e[14],t[15]=e[3]*f+e[7]*_+e[11]*g+e[15]):(o=e[1],n=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],p=e[9],d=e[10],m=e[11],t[0]=r=e[0],t[1]=o,t[2]=n,t[3]=a,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=h,t[9]=p,t[10]=d,t[11]=m,t[12]=r*f+s*_+h*g+e[12],t[13]=o*f+l*_+p*g+e[13],t[14]=n*f+c*_+d*g+e[14],t[15]=a*f+u*_+m*g+e[15]),t},t.R=Yp,t.S=function(t,e,i){var r=i[0],o=i[1],n=i[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},t.T=rd,t.U=function(t,e,i){var r=e[0],o=e[1],n=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],p=e[9],d=e[10],m=e[11],f=e[12],_=e[13],g=e[14],y=e[15],v=i[0],b=i[1],x=i[2],w=i[3];return t[0]=v*r+b*s+x*h+w*f,t[1]=v*o+b*l+x*p+w*_,t[2]=v*n+b*c+x*d+w*g,t[3]=v*a+b*u+x*m+w*y,t[4]=(v=i[4])*r+(b=i[5])*s+(x=i[6])*h+(w=i[7])*f,t[5]=v*o+b*l+x*p+w*_,t[6]=v*n+b*c+x*d+w*g,t[7]=v*a+b*u+x*m+w*y,t[8]=(v=i[8])*r+(b=i[9])*s+(x=i[10])*h+(w=i[11])*f,t[9]=v*o+b*l+x*p+w*_,t[10]=v*n+b*c+x*d+w*g,t[11]=v*a+b*u+x*m+w*y,t[12]=(v=i[12])*r+(b=i[13])*s+(x=i[14])*h+(w=i[15])*f,t[13]=v*o+b*l+x*p+w*_,t[14]=v*n+b*c+x*d+w*g,t[15]=v*a+b*u+x*m+w*y,t},t.V=function(t,e){const i={};for(const r of e)r in t&&(i[r]=t[r]);return i},t.W=zm,t.X=S,t.Y=ga,t.Z=_a,t._=e,t.a=Il,t.a$=function(t){var e=new _l(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.a0=o,t.a1=n,t.a2=L,t.a3=Fm,t.a4=va,t.a5=ba,t.a6=yl,t.a7=Om,t.a8=Bm,t.a9=25,t.aA=function(t){var e=t[0],i=t[1];return Math.sqrt(e*e+i*i)},t.aB=function(t){return t[0]=0,t[1]=0,t},t.aC=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},t.aD=da,t.aE=m,t.aF=function(t,e,r,o){const n=e.y-t.y,a=e.x-t.x,s=o.y-r.y,l=o.x-r.x,c=s*a-l*n;if(0===c)return null;const u=(l*(t.y-r.y)-s*(t.x-r.x))/c;return new i(t.x+u*a,t.y+u*n)},t.aG=Ls,t.aH=mr,t.aI=function(t){let e=1/0,i=1/0,r=-1/0,o=-1/0;for(const n of t)e=Math.min(e,n.x),i=Math.min(i,n.y),r=Math.max(r,n.x),o=Math.max(o,n.y);return[e,i,r,o]},t.aJ=im,t.aK=v,t.aL=function(t,e,i,r,o=!1){if(!i[0]&&!i[1])return[0,0];const n=o?"map"===r?-t.bearingInRadians:0:"viewport"===r?t.bearingInRadians:0;if(n){const t=Math.sin(n),e=Math.cos(n);i=[i[0]*e-i[1]*t,i[0]*t+i[1]*e]}return[o?i[0]:v(e,i[0],t.zoom),o?i[1]:v(e,i[1],t.zoom)]},t.aN=ha,t.aO=rl,t.aP=ta,t.aQ=t=>"symbol"===t.type,t.aR=Cd,t.aS=ir,t.aT=cd,t.aU=Hh,t.aV=hp,t.aW=sp,t.aX=B,t.aY=xa,t.aZ=p,t.a_=h,t.aa=Lm,t.ab=t=>{const e=window.document.createElement("video");return e.muted=!0,new Promise(i=>{e.onloadstart=()=>{i(e)};for(const i of t){const t=window.document.createElement("source");U(i)||(e.crossOrigin="Anonymous"),t.src=i,e.appendChild(t)}})},t.ac=Vl,t.ad=function(){return bl++},t.ae=Fh,t.af=vm,t.ag=Of,t.ah=Ke,t.ai=pr,t.aj=Vm,t.ak=function(t){const e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(t,i,r,o)=>{const n=r||o;return e[i]=!n||n.toLowerCase(),""}),e["max-age"]){const t=parseInt(e["max-age"],10);isNaN(t)?delete e["max-age"]:e["max-age"]=t}return e},t.al=M,t.am=85.051129,t.an=F,t.ao=function(t){return Math.pow(2,t)},t.ap=s,t.aq=ya,t.ar=function(t){return Math.log(t)/Math.LN2},t.as=function(t){var e=t[0],i=t[1];return e*e+i*i},t.at=function(t){if(!t.length)return new Set;const e=Math.max(...t.map(t=>t.canonical.z));let i=1/0,r=-1/0,o=1/0,n=-1/0;const a=[];for(const s of t){const{x:t,y:l,z:c}=s.canonical,u=Math.pow(2,e-c),h=t*u,p=l*u;a.push({id:s,x:h,y:p}),hr&&(r=h),pn&&(n=p)}const s=new Set;for(const t of a)t.x!==i&&t.x!==r&&t.y!==o&&t.y!==n||s.add(t.id);return s},t.au=function(t,e){const i=Math.abs(2*t.wrap)-+(t.wrap<0),r=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||r-i||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x},t.av=class{constructor(t,e){this.max=t,this.onRemove=e,this.reset()}reset(){for(const t in this.data)for(const e of this.data[t])e.timeout&&clearTimeout(e.timeout),this.onRemove(e.value);return this.data={},this.order=[],this}add(t,e,i){const r=t.wrapped().key;void 0===this.data[r]&&(this.data[r]=[]);const o={value:e,timeout:void 0};if(void 0!==i&&(o.timeout=setTimeout(()=>{this.remove(t,o)},i)),this.data[r].push(o),this.order.push(r),this.order.length>this.max){const t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this}has(t){return t.wrapped().key in this.data}getAndRemove(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null}_getAndRemoveByKey(t){const e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value}getByKey(t){const e=this.data[t];return e?e[0].value:null}get(t){return this.has(t)?this.data[t.wrapped().key][0].value:null}remove(t,e){if(!this.has(t))return this;const i=t.wrapped().key,r=void 0===e?0:this.data[i].indexOf(e),o=this.data[i][r];return this.data[i].splice(r,1),o.timeout&&clearTimeout(o.timeout),0===this.data[i].length&&delete this.data[i],this.onRemove(o.value),this.order.splice(this.order.indexOf(i),1),this}setMaxSize(t){for(this.max=t;this.order.length>this.max;){const t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this}filter(t){const e=[];for(const i in this.data)for(const r of this.data[i])t(r.value)||e.push(r);for(const t of e)this.remove(t.value.tileID,t)}},t.aw=function(t,e){let i=0,r=0;if("constant"===t.kind)r=t.layoutSize;else if("source"!==t.kind){const{interpolationType:o,minZoom:n,maxZoom:a}=t,s=o?M(Yc.interpolationFactor(o,e,n,a),0,1):0;"camera"===t.kind?r=Xc.number(t.minSize,t.maxSize,s):i=s}return{uSizeT:i,uSize:r}},t.ay=function(t,{uSize:e,uSizeT:i},{lowerSize:r,upperSize:o}){return"source"===t.kind?r/mm:"composite"===t.kind?Xc.number(r/mm,o/mm,i):e},t.az=g,t.b=O,t.b$=Sp,t.b0=function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t},t.b1=function(t,e){var i=e[0],r=e[1],o=e[2],n=i*i+r*r+o*o;return n>0&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t},t.b2=d,t.b3=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},t.b4=function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t[3]=e[3]*i[3],t},t.b5=c,t.b6=function(t,e,i){const r=e[0]*i[0]+e[1]*i[1]+e[2]*i[2];return 0===r?null:(-(t[0]*i[0]+t[1]*i[1]+t[2]*i[2])-i[3])/r},t.b7=gl,t.b8=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t},t.b9=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]},t.bA=_,t.bB=function(t,e,i){var r=i[0],o=i[1],n=i[2],a=i[3],s=e[0],l=e[1],c=e[2],u=o*c-n*l,h=n*s-r*c,p=r*l-o*s;return t[0]=s+a*(u+=u)+o*(p+=p)-n*(h+=h),t[1]=l+a*h+n*u-r*p,t[2]=c+a*p+r*h-o*u,t},t.bC=function(t,e,i){const r=(o=[t[0],t[1],t[2],e[0],e[1],e[2],i[0],i[1],i[2]])[0]*((u=o[8])*(a=o[4])-(s=o[5])*(c=o[7]))+o[1]*(-u*(n=o[3])+s*(l=o[6]))+o[2]*(c*n-a*l);var o,n,a,s,l,c,u;if(0===r)return null;const m=d([],[e[0],e[1],e[2]],[i[0],i[1],i[2]]),f=d([],[i[0],i[1],i[2]],[t[0],t[1],t[2]]),_=d([],[t[0],t[1],t[2]],[e[0],e[1],e[2]]),g=p([],m,-t[3]);return h(g,g,p([],f,-e[3])),h(g,g,p([],_,-i[3])),p(g,g,1/r),g},t.bD=Em,t.bE=function(){return new Float64Array(4)},t.bF=function(t,e,i,r){var o=[],n=[];return o[0]=e[0]-i[0],o[1]=e[1]-i[1],o[2]=e[2]-i[2],n[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),n[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),n[2]=o[2],t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t},t.bG=function(t,e,i,r){var o=[],n=[];return o[0]=e[0]-i[0],o[1]=e[1]-i[1],o[2]=e[2]-i[2],n[0]=o[0],n[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),n[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t},t.bH=function(t,e,i,r){var o=[],n=[];return o[0]=e[0]-i[0],o[1]=e[1]-i[1],o[2]=e[2]-i[2],n[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),n[1]=o[1],n[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t},t.bI=function(t,e,i){var r=Math.sin(i),o=Math.cos(i),n=e[0],a=e[1],s=e[2],l=e[3],c=e[8],u=e[9],h=e[10],p=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=n*o-c*r,t[1]=a*o-u*r,t[2]=s*o-h*r,t[3]=l*o-p*r,t[8]=n*r+c*o,t[9]=a*r+u*o,t[10]=s*r+h*o,t[11]=l*r+p*o,t},t.bJ=function(t,e){const i=x(t,360),r=x(e,360),o=r-i,n=r>i?o-360:o+360;return Math.abs(o)0?a:-a},t.bM=function(t,e){const i=x(t,2*Math.PI),r=x(e,2*Math.PI);return Math.min(Math.abs(i-r),Math.abs(i-r+2*Math.PI),Math.abs(i-r-2*Math.PI))},t.bN=function(){const t={},e=Bl.$version;for(const i in Bl.$root){const r=Bl.$root[i];if(r.required){let o=null;o="version"===i?e:"array"===r.type?[]:{},null!=o&&(t[i]=o)}}return t},t.bO=Dl,t.bP=Fu,t.bQ=function t(e,i){if(Array.isArray(e)){if(!Array.isArray(i)||e.length!==i.length)return!1;for(let r=0;r"raster"===t.type,t.bV=C,t.bW=function(t,e){if(!t)return[{command:"setStyle",args:[e]}];let i=[];try{if(!q(t.version,e.version))return[{command:"setStyle",args:[e]}];q(t.center,e.center)||i.push({command:"setCenter",args:[e.center]}),q(t.state,e.state)||i.push({command:"setGlobalState",args:[e.state]}),q(t.centerAltitude,e.centerAltitude)||i.push({command:"setCenterAltitude",args:[e.centerAltitude]}),q(t.zoom,e.zoom)||i.push({command:"setZoom",args:[e.zoom]}),q(t.bearing,e.bearing)||i.push({command:"setBearing",args:[e.bearing]}),q(t.pitch,e.pitch)||i.push({command:"setPitch",args:[e.pitch]}),q(t.roll,e.roll)||i.push({command:"setRoll",args:[e.roll]}),q(t.sprite,e.sprite)||i.push({command:"setSprite",args:[e.sprite]}),q(t.glyphs,e.glyphs)||i.push({command:"setGlyphs",args:[e.glyphs]}),q(t.transition,e.transition)||i.push({command:"setTransition",args:[e.transition]}),q(t.light,e.light)||i.push({command:"setLight",args:[e.light]}),q(t.terrain,e.terrain)||i.push({command:"setTerrain",args:[e.terrain]}),q(t.sky,e.sky)||i.push({command:"setSky",args:[e.sky]}),q(t.projection,e.projection)||i.push({command:"setProjection",args:[e.projection]});const r={},o=[];!function(t,e,i,r){let o;for(o in e=e||{},t=t||{})Object.prototype.hasOwnProperty.call(t,o)&&(Object.prototype.hasOwnProperty.call(e,o)||Y(o,i,r));for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&(Object.prototype.hasOwnProperty.call(t,o)?q(t[o],e[o])||("geojson"===t[o].type&&"geojson"===e[o].type&&K(t,e,o)?W(i,{command:"setGeoJSONSourceData",args:[o,e[o].data]}):X(o,e,i,r)):H(o,e,i))}(t.sources,e.sources,o,r);const n=[];t.layers&&t.layers.forEach(t=>{"source"in t&&r[t.source]?i.push({command:"removeLayer",args:[t.id]}):n.push(t)}),i=i.concat(o),function(t,e,i){e=e||[];const r=(t=t||[]).map(Q),o=e.map(Q),n=t.reduce(tt,{}),a=e.reduce(tt,{}),s=r.slice(),l=Object.create(null);let c,u,h,p,d;for(let t=0,e=0;tfl?(o=Math.acos(n),a=Math.sin(o),s=Math.sin((1-r)*o)/a,l=Math.sin(r*o)/a):(s=1-r,l=r),t[0]=s*c+l*d,t[1]=s*u+l*m,t[2]=s*h+l*f,t[3]=s*p+l*_,t},t.bm=function(t){const e=new Float64Array(9);var i,r,o,n,a,s,l,c,u,h,p,d,m,f,_,g,y,v;h=(o=(r=t)[0])*(l=o+o),p=(n=r[1])*l,m=(a=r[2])*l,f=a*(c=n+n),g=(s=r[3])*l,y=s*c,v=s*(u=a+a),(i=e)[0]=1-(d=n*c)-(_=a*u),i[3]=p-v,i[6]=m+y,i[1]=p+v,i[4]=1-h-_,i[7]=f-g,i[2]=m-y,i[5]=f+g,i[8]=1-h-d;const b=B(-Math.asin(M(e[2],-1,1)));let x,w;return Math.hypot(e[5],e[8])<.001?(x=0,w=-B(Math.atan2(e[3],e[4]))):(x=B(0===e[5]&&0===e[8]?0:Math.atan2(e[5],e[8])),w=B(0===e[1]&&0===e[0]?0:Math.atan2(e[1],e[0]))),{roll:x,pitch:b+90,bearing:w}},t.bn=function(t,e){return t.roll==e.roll&&t.pitch==e.pitch&&t.bearing==e.bearing},t.bo=fc,t.bp=kp,t.bq=ud,t.br=hd,t.bs=ld,t.bt=w,t.bu=T,t.bv=Pc,t.bw=function(t,e,i,r,o){return w(r,o,M((t-e)/(i-e),0,1))},t.bx=function(t,e,i,r){return t[0]=e[0]+i[0]*r,t[1]=e[1]+i[1]*r,t[2]=e[2]+i[2]*r,t},t.by=x,t.bz=function(){return new Float64Array(3)},t.c=Cl,t.c$=$e,t.c0=class extends Tp{constructor(t,e){super(t,e),this.current=Pp}set(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(let e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}}},t.c1=Mp,t.c2=class extends Tp{constructor(t,e){super(t,e),this.current=[0,0,0]}set(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))}},t.c3=class extends Tp{constructor(t,e){super(t,e),this.current=[0,0]}set(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))}},t.c4=a,t.c5=function(t,e){var i=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=i,t[2]=0,t[3]=-i,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.c6=function(t,e,i){var r=e[0],o=e[1],n=e[2];return t[0]=r*i[0]+o*i[3]+n*i[6],t[1]=r*i[1]+o*i[4]+n*i[7],t[2]=r*i[2]+o*i[5]+n*i[8],t},t.c7=function(t,e,i,r,o,n,a){var s=1/(e-i),l=1/(r-o),c=1/(n-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+i)*s,t[13]=(o+r)*l,t[14]=(a+n)*c,t[15]=1,t},t.c8=class extends Tp{constructor(t,e){super(t,e),this.current=new Array}set(t){if(t!=this.current){this.current=t;const e=new Float32Array(4*t.length);for(let i=0;i25||r<0||r>=1||i<0||i>=1)},t.cE=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.cF=class extends dh{},t.cG=zl,t.cH=function(t,e){Cl.REGISTERED_PROTOCOLS[t]=e},t.cI=function(t){delete Cl.REGISTERED_PROTOCOLS[t]},t.cJ=function(t,e){const i={};for(let r=0;rt*im)}let y=c?"center":n.get("text-justify").evaluate(a,{},e.canonical);const b="point"===n.get("symbol-placement")?n.get("text-max-width").evaluate(a,{},e.canonical)*im:1/0,x=()=>{e.bucket.allowVerticalPlacement&&Wi(i)&&(_.vertical=Qn(g,e.glyphMap,e.glyphPositions,e.imagePositions,p,b,l,h,"left",s,v,t.ax.vertical,!0,m,d))};if(!c&&f){const i=new Set;if("auto"===y)for(let t=0;tSs(t,e,i),t.layers[r])}(t,i,e),i.finish()},t.cT=function(t,e,i,r,o,n){let a=Rs(t,e,i,o,0);return a=Rs(a,e,r,n,1),a},t.cU=class{constructor(t){this.maxEntries=t,this.map=new Map}get(t){const e=this.map.get(t);return void 0!==e&&(this.map.delete(t),this.map.set(t,e)),e}set(t,e){if(this.map.has(t))this.map.delete(t);else if(this.map.size>=this.maxEntries){const t=this.map.keys().next().value;this.map.delete(t)}this.map.set(t,e)}clear(){this.map.clear()}},t.cV=Td,t.cW=um,t.cX=zf,t.cY=function(t,i,r,o,a){return e(this,void 0,void 0,function*(){if(n())try{return yield L(t,i,r,o,a)}catch(t){}return function(t,e,i,r,o){const n=t.width,a=t.height;kl&&Ml||(kl=new OffscreenCanvas(n,a),Ml=kl.getContext("2d",{willReadFrequently:!0})),kl.width=n,kl.height=a,Ml.drawImage(t,0,0,n,a);const s=Ml.getImageData(e,i,r,o);return Ml.clearRect(0,0,n,a),s.data}(t,i,r,o,a)})},t.cZ=od,t.c_=class{constructor(t,e){this.layers={[Of]:this},this.name=Of,this.version=e?e.version:1,this.extent=e?e.extent:4096,this.length=t.length,this.features=t}feature(t){return new Df(this.features[t],this.extent)}},t.ca=class extends Mh{},t.cb=em,t.cc=class extends Ph{},t.cd=Xp,t.ce=function(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},t.cf=jr,t.cg=function(t,e,i){var r=e[0],o=e[1],n=e[2],a=i[3]*r+i[7]*o+i[11]*n+i[15];return t[0]=(i[0]*r+i[4]*o+i[8]*n+i[12])/(a=a||1),t[1]=(i[1]*r+i[5]*o+i[9]*n+i[13])/a,t[2]=(i[2]*r+i[6]*o+i[10]*n+i[14])/a,t},t.ch=class extends mh{},t.ci=class extends Oh{},t.cj=function(t,e){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.ck=function(t,e){var i=t[0],r=t[1],o=t[2],n=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],p=t[10],d=t[11],m=t[12],f=t[13],_=t[14],g=t[15],y=e[0],v=e[1],b=e[2],x=e[3],w=e[4],T=e[5],k=e[6],M=e[7],S=e[8],P=e[9],A=e[10],I=e[11],C=e[12],E=e[13],z=e[14],D=e[15];return Math.abs(i-y)<=fl*Math.max(1,Math.abs(i),Math.abs(y))&&Math.abs(r-v)<=fl*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(o-b)<=fl*Math.max(1,Math.abs(o),Math.abs(b))&&Math.abs(n-x)<=fl*Math.max(1,Math.abs(n),Math.abs(x))&&Math.abs(a-w)<=fl*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(s-T)<=fl*Math.max(1,Math.abs(s),Math.abs(T))&&Math.abs(l-k)<=fl*Math.max(1,Math.abs(l),Math.abs(k))&&Math.abs(c-M)<=fl*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(u-S)<=fl*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(h-P)<=fl*Math.max(1,Math.abs(h),Math.abs(P))&&Math.abs(p-A)<=fl*Math.max(1,Math.abs(p),Math.abs(A))&&Math.abs(d-I)<=fl*Math.max(1,Math.abs(d),Math.abs(I))&&Math.abs(m-C)<=fl*Math.max(1,Math.abs(m),Math.abs(C))&&Math.abs(f-E)<=fl*Math.max(1,Math.abs(f),Math.abs(E))&&Math.abs(_-z)<=fl*Math.max(1,Math.abs(_),Math.abs(z))&&Math.abs(g-D)<=fl*Math.max(1,Math.abs(g),Math.abs(D))},t.cl=function(t,e){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},t.cm=t=>"circle"===t.type,t.cn=t=>"heatmap"===t.type,t.co=t=>"line"===t.type,t.cp=t=>"fill"===t.type,t.cq=t=>"fill-extrusion"===t.type,t.cr=t=>"hillshade"===t.type,t.cs=t=>"color-relief"===t.type,t.ct=t=>"background"===t.type,t.cu=t=>"custom"===t.type,t.cv=k,t.cw=function(t,e,i){if(e<=0)return t;const r=1/e;return void 0===i||Math.abs(i)<1e-10?Math.round(t*r)/r:(i>0?Math.ceil(t*r-1e-9):Math.floor(t*r+1e-10))/r},t.cx=function(t,e,i){const r=y(e.x-i.x,e.y-i.y),o=y(t.x-i.x,t.y-i.y);var n,a;return B(Math.atan2(r[0]*o[1]-r[1]*o[0],(n=r)[0]*(a=o)[0]+n[1]*a[1]))},t.cy=vl,t.cz=function(t,e){var i;if(!Pl[e])return!1;const r=null==t?void 0:t.target,o=(null===(i=null==r?void 0:r.ownerDocument)||void 0===i?void 0:i.defaultView)||window;return t instanceof o.MouseEvent||t instanceof o.WheelEvent},t.d=b,t.d0=class{constructor(t,e){const i=(e=this.options=Object.assign({},Fd,e)).debug;if(i&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");let r=Uo(t,e);i&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles")),r=dn(r,e),e.updateable&&(this.source=r),this.initializeIndex(r,e)}initializeIndex(t,e){this.tileIndex=e.cluster?new Dd(e.clusterOptions):new Rd(e),t.length&&this.tileIndex.initialize(t)}getTile(t,e,i){return e=+e,i=+i,(t=+t)<0||t>24?null:this.tileIndex.getTile(t,e,i)}updateData(t,e){const i=this.options;if(!i.updateable)throw new Error("to update tile geojson `updateable` option must be set to true");let{affected:r,source:o}=function(t,e,i){const r=function(t,e){return t?{removeAll:t.removeAll,remove:new Set(t.remove||[]),add:new Map(t.add?.map(t=>[e.promoteId?t.properties[e.promoteId]:t.id,t])),update:new Map(t.update?.map(t=>[t.id,t]))}:{remove:new Set,add:new Map,update:new Map}}(e,i);let o=[];if(r.removeAll&&(o=t,t=[]),r.remove.size||r.add.size){const e=[];for(const i of t)(r.remove.has(i.id)||r.add.has(i.id))&&e.push(i);if(e.length){o.push(...e);const i=new Set(e.map(t=>t.id));t=t.filter(t=>!i.has(t.id))}if(r.add.size){let e=Uo({type:"FeatureCollection",features:Array.from(r.add.values())},i);e=dn(e,i),o.push(...e),t.push(...e)}}if(r.update.size){const e=new Map,n=[];for(const i of t)r.update.has(i.id)?e.set(i.id,[...e.get(i.id)||[],i]):n.push(i);for(const[t,a]of r.update){const r=e.get(t);if(!r||0===r.length)continue;const s=gn(r,a,i);o.push(...r,...s),n.push(...s)}t=n}return{affected:o,source:t}}(this.source,t,i);e&&({affected:r,source:o}=this.filterUpdate(o,r,e)),r.length&&(this.source=o,this.tileIndex.updateIndex(o,r,i))}filterUpdate(t,e,i){const r=new Set;for(const o of t)null!=o.id&&(i(Ho(o))||(e.push(o),r.add(o.id)));return{affected:e,source:t=t.filter(t=>!r.has(t.id))}}getData(){if(!this.options.updateable)throw new Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map(t=>Ho(t))}}updateClusterOptions(t,e){const i=this.options.cluster;this.options.cluster=t,this.options.clusterOptions=e,i!=t?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(t){return this.tileIndex.getClusterExpansionZoom(t)}getClusterChildren(t){return this.tileIndex.getChildren(t)}getClusterLeaves(t,e,i){return this.tileIndex.getLeaves(t,e,i)}},t.d1=Vu,t.e=P,t.f=U,t.g=N,t.h=t=>e(void 0,void 0,void 0,function*(){if(0===t.byteLength)return createImageBitmap(new ImageData(1,1));const e=new Blob([new Uint8Array(t)],{type:"image/png"});try{return createImageBitmap(e)}catch(t){throw new Error(`Could not load image because of ${b(t).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),t.i=D,t.j=t=>new Promise((e,i)=>{const r=new Image;r.onload=()=>{e(r),URL.revokeObjectURL(r.src),r.onload=null,window.requestAnimationFrame(()=>r.src=Tl)},r.onerror=()=>i(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const o=new Blob([new Uint8Array(t)],{type:"image/png"});r.src=t.byteLength?URL.createObjectURL(o):Tl}),t.k=(t,e)=>Ol(P(t,{type:"json"}),e),t.l=Rl,t.m=Ol,t.n=Ll,t.o=(t,e)=>Ol(P(t,{type:"arrayBuffer"}),e),t.p=Jn,t.q=function(t){return new um(t).readFields(Yn,[])},t.r=function(t){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(t))},t.s=R,t.t=Hp,t.u=ih,t.v=Iu,t.w=E,t.x=Bl,t.y=$u,t.z=Eu}),t("worker",["./shared"],function(t){function e(e,i,r){const o=new t.J(i);for(const t of e)t.recalculate(o,r)}function i(e){let i=t.cS(e);return 0===i.byteOffset&&i.byteLength===i.buffer.byteLength||(i=new Uint8Array(i)),{vectorTile:e,rawData:i.buffer}}function r(e,i,r){const{extent:o}=e,n=Math.pow(2,r.z-i.z),a=(r.x-i.x*n)*o,s=(r.y-i.y*n)*o,l=[];for(let i=0;i{a.properties=t;const e={};for(const t of s)e[t]=r[t].evaluate(n,a);return e},e.clusterOptions.reduce=(t,e)=>{a.properties=e;for(const e of s)n.accumulated=t[e],t[e]=o[e].evaluate(n,a)},e.clusterOptions}class a{constructor(t,e){this.keyCache={},t&&this.replace(t,e)}replace(t,e){this._layerConfigs={},this._layers={},this.update(t,[],e)}update(e,i,r){for(const i of e){this._layerConfigs[i.id]=i;const e=this._layers[i.id]=t.bT(i,r);e._featureFilter=t.ah(e.filter,r),this.keyCache[i.id]&&delete this.keyCache[i.id]}for(const t of i)delete this.keyCache[t],delete this._layerConfigs[t],delete this._layers[t];this.familiesBySource={};const o=t.cJ(Object.values(this._layerConfigs),this.keyCache);for(const e of o){const i=e.map(t=>this._layers[t.id]),r=i[0];if(r.isHidden())continue;const o=r.source||"";let n=this.familiesBySource[o];n||(n=this.familiesBySource[o]={});const a=r.sourceLayer||t.ag;let s=n[a];s||(s=n[a]=[]),s.push(i)}}}class s{constructor(e){const i={},r=[];for(const t in e){const o=e[t],n=i[t]={};for(const t in o){const e=o[+t];if(!e||0===e.bitmap.width||0===e.bitmap.height)continue;const i={x:0,y:0,w:e.bitmap.width+2,h:e.bitmap.height+2};r.push(i),n[t]={rect:i,metrics:e.metrics}}}const{w:o,h:n}=t.p(r),a=new t.t({width:o||1,height:n||1});for(const r in e){const o=e[r];for(const e in o){const n=o[+e];if(!n||0===n.bitmap.width||0===n.bitmap.height)continue;const s=i[r][e].rect;t.t.copy(n.bitmap,a,{x:0,y:0},{x:s.x+1,y:s.y+1},n.bitmap)}}this.image=a,this.positions=i}}t.cK("GlyphAtlas",s);class l{constructor(e){this.tileID=new t.a3(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming,this.returnDependencies=!!e.returnDependencies,this.promoteId=e.promoteId,this.inFlightDependencies=[]}parse(i,r,o,n,a){return t._(this,void 0,void 0,function*(){this.status="parsing",this.data=i,this.collisionBoxArray=new t.ae;const l=new t.cL(Object.keys(i.layers).sort()),c=new t.cM(this.tileID,this.promoteId);c.bucketLayerIDs=[];const u={},h={featureIndex:c,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:o,subdivisionGranularity:a},p=r.familiesBySource[this.source];for(const r in p){const n=i.layers[r];if(!n)continue;1===n.version&&t.w(`Vector tile source "${this.source}" layer "${r}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const a=l.encode(r),s=[];for(let t=0;tt.id)))}}const d=t.bY(h.glyphDependencies,t=>Object.keys(t).map(Number));for(const t of this.inFlightDependencies)null==t||t.abort();this.inFlightDependencies=[];let m=Promise.resolve({});if(Object.keys(d).length){const t=new AbortController;this.inFlightDependencies.push(t),m=n.sendAsync({type:"GG",data:{stacks:d,source:this.source,tileID:this.tileID,type:"glyphs"}},t)}const f=Object.keys(h.iconDependencies);let _=Promise.resolve({});if(f.length){const t=new AbortController;this.inFlightDependencies.push(t),_=n.sendAsync({type:"GI",data:{icons:f,source:this.source,tileID:this.tileID,type:"icons"}},t)}const g=Object.keys(h.patternDependencies);let y=Promise.resolve({});if(g.length){const t=new AbortController;this.inFlightDependencies.push(t),y=n.sendAsync({type:"GI",data:{icons:g,source:this.source,tileID:this.tileID,type:"patterns"}},t)}const v=h.dashDependencies;let b=Promise.resolve({});if(Object.keys(v).length){const t=new AbortController;this.inFlightDependencies.push(t),b=n.sendAsync({type:"GDA",data:{dashes:v}},t)}const[x,w,T,k]=yield Promise.all([m,_,y,b]),M=new s(x),S=new t.cN(w,T);for(const i in u){const r=u[i];r instanceof t.af?(e(r.layers,this.zoom,o),t.cO({bucket:r,glyphMap:x,glyphPositions:M.positions,imageMap:w,imagePositions:S.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:h.subdivisionGranularity})):r.hasDependencies&&(r instanceof t.cP||r instanceof t.cQ||r instanceof t.cR)&&(e(r.layers,this.zoom,o),r.addFeatures(h,this.tileID.canonical,S.patternPositions,k))}return this.status="done",{buckets:Object.values(u).filter(t=>!t.isEmpty()),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:M.image,imageAtlas:S,dashPositions:k,glyphMap:this.returnDependencies?x:null,iconMap:this.returnDependencies?w:null,glyphPositions:this.returnDependencies?M.positions:null}})}}class c{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(t,e){this.loading[t]=e}finishLoading(t){delete this.loading[t]}abort(t){const e=this.loading[t];(null==e?void 0:e.abort)&&(e.abort.abort(),delete this.loading[t])}setParsing(t,e){this.parsing[t]=e}consumeParsing(t){const e=this.parsing[t];if(e)return delete this.parsing[t],e}clearParsing(t){delete this.parsing[t]}markLoaded(t,e){this.loaded[t]=e}getLoaded(t){const e=this.loaded[t];if(e)return e}removeLoaded(t){delete this.loaded[t]}clearLoaded(){this.loaded={}}}class u{constructor(t){this.start=`${t}#start`,this.end=`${t}#end`,this.measure=t,performance.mark(this.start)}finish(){performance.mark(this.end);let t=performance.getEntriesByName(this.measure);return 0===t.length&&(performance.measure(this.measure,this.start,this.end),t=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),t}}class h{constructor(t,e,i,r,o){this.type=t,this.properties=i||{},this.extent=o,this.pointsArray=e,this.id=r}loadGeometry(){return this.pointsArray.map(e=>e.map(e=>new t.P(e.x,e.y)))}}class p{constructor(t,e,i){this.version=2,this._myFeatures=t,this.name=e,this.length=t.length,this.extent=i}feature(t){return this._myFeatures[t]}}class d{constructor(){this.layers={}}addLayer(t){this.layers[t.name]=t}}class m{constructor(e,i,r){this.actor=e,this.layerIndex=i,this.availableImages=r,this.tileState=new c,this.overzoomedTileResultCache=new t.cU(1e3)}loadVectorTile(e,i){try{return{vectorTile:"mlt"!==e.encoding?new t.cV(new t.cW(i)):new t.cX(i),rawData:i}}catch(r){const o=new Uint8Array(i);let n=`Unable to parse the tile at ${e.request.url}, `;throw n+=31===o[0]&&139===o[1]?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${t.d(r).message}`,new Error(n)}}loadTile(e){return t._(this,void 0,void 0,function*(){const{uid:i,overzoomParameters:r}=e;r&&(e.request=r.overzoomRequest);const o=this._startRequestTiming(e),n=new l(e);this.tileState.startLoading(i,n);const a=new AbortController;n.abort=a;try{const s=yield t.o(e.request,a);if(e.etag&&e.etag===s.etag)return this.tileState.finishLoading(i),this._getEtagUnmodifiedResult(s,o);const l=this.loadVectorTile(e,s.data);if(this.tileState.finishLoading(i),!l)return null;let{vectorTile:c,rawData:u}=l;r&&({vectorTile:c,rawData:u}=this._getOverzoomTile(e,c));const h=this._getExpiryData(s),p=this._finishRequestTiming(o);n.vectorTile=c,this.tileState.markLoaded(i,n);const d={rawData:u,cacheControl:h,resourceTiming:p};this.tileState.setParsing(i,d);try{return yield this._parseWorkerTile(n,e,d)}finally{this.tileState.clearParsing(i)}}catch(t){throw this.tileState.finishLoading(i),n.status="done",this.tileState.markLoaded(i,n),t}})}_getEtagUnmodifiedResult(e,i){const r=this._getExpiryData(e),o=this._finishRequestTiming(i);return t.e({etagUnmodified:!0},r,o)}_parseWorkerTile(e,i,r){return t._(this,void 0,void 0,function*(){let o=yield e.parse(e.vectorTile,this.layerIndex,this.availableImages,this.actor,i.subdivisionGranularity);if(r){const{rawData:e,cacheControl:n,resourceTiming:a}=r;o=t.e({rawTileData:e.slice(0),encoding:i.encoding},o,n,a)}return o})}_getExpiryData({expires:t,cacheControl:e,etag:i}){const r={};return t&&(r.expires=t),e&&(r.cacheControl=e),i&&(r.etag=i),r}_startRequestTiming(t){var e;if(null===(e=t.request)||void 0===e?void 0:e.collectResourceTiming)return new u(t.request.url)}_finishRequestTiming(t){const e=null==t?void 0:t.finish();return e?{resourceTiming:JSON.parse(JSON.stringify(e))}:{}}_getOverzoomTile(t,e){var o;const{tileID:n,source:a,overzoomParameters:s}=t,{maxZoomTileID:l}=s,c=`${l.key}_${n.key}_${null===(o=t.request)||void 0===o?void 0:o.url}`,u=this.overzoomedTileResultCache.get(c);if(u)return u;const h=new d,p=this.layerIndex.familiesBySource[a];for(const t in p){const i=e.layers[t];if(!i)continue;const o=r(i,l,n.canonical);o.length>0&&h.addLayer(o)}const m=i(h);return this.overzoomedTileResultCache.set(c,m),m}reloadTile(e){return t._(this,void 0,void 0,function*(){const t=e.uid,i=this.tileState.getLoaded(t);if(!i)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(i.showCollisionBoxes=e.showCollisionBoxes,"parsing"===i.status){const r=this.tileState.consumeParsing(t);return yield this._parseWorkerTile(i,e,r)}if("done"===i.status&&i.vectorTile)return yield this._parseWorkerTile(i,e)})}abortTile(e){return t._(this,void 0,void 0,function*(){this.tileState.abort(e.uid)})}removeTile(e){return t._(this,void 0,void 0,function*(){this.tileState.removeLoaded(e.uid)})}}class f{constructor(){this.loaded={}}loadTile(e){return t._(this,void 0,void 0,function*(){const{uid:i,encoding:r,rawImageData:o,redFactor:n,greenFactor:a,blueFactor:s,baseShift:l}=e,c=o.width+2,u=o.height+2,h=t.b(o)?new t.R({width:c,height:u},yield t.cY(o,-1,-1,c,u)):o,p=new t.cZ(i,h,r,n,a,s,l);return this.loaded||(this.loaded={}),this.loaded[i]=p,p})}removeTile(t){const e=this.loaded,i=t.uid;(null==e?void 0:e[i])&&delete e[i]}}class _{constructor(t,e,i,r=o){this.actor=t,this.layerIndex=e,this.availableImages=i,this.tileState=new c,this._createGeoJSONIndex=r}loadVectorTile(e){if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const{z:r,x:o,y:n}=e.tileID.canonical,a=this._geoJSONIndex.getTile(r,o,n);return a?i(new t.c_(a.features,{version:2,extent:t.a6})):null}loadTile(e){return t._(this,void 0,void 0,function*(){const{uid:t}=e,i=new l(e);i.abort=new AbortController;try{const r=this.loadVectorTile(e);if(!r)return null;const{vectorTile:o,rawData:n}=r;i.vectorTile=o,this.tileState.markLoaded(t,i);const a={rawData:n};this.tileState.setParsing(t,a);try{return yield this._parseWorkerTile(i,e,a)}finally{this.tileState.clearParsing(t)}}catch(e){throw i.status="done",this.tileState.markLoaded(t,i),e}})}_reloadLoadedTile(e){return t._(this,void 0,void 0,function*(){const t=e.uid,i=this.tileState.getLoaded(t);if(!i)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(i.showCollisionBoxes=e.showCollisionBoxes,"parsing"===i.status){const r=this.tileState.consumeParsing(t);return yield this._parseWorkerTile(i,e,r)}if("done"===i.status&&i.vectorTile)return yield this._parseWorkerTile(i,e)})}_parseWorkerTile(e,i,r){return t._(this,void 0,void 0,function*(){let o=yield e.parse(e.vectorTile,this.layerIndex,this.availableImages,this.actor,i.subdivisionGranularity);if(r){const{rawData:e}=r;o=t.e({rawTileData:e.slice(0),encoding:"mvt"},o)}return o})}abortTile(e){return t._(this,void 0,void 0,function*(){this.tileState.abort(e.uid)})}removeTile(e){return t._(this,void 0,void 0,function*(){this.tileState.removeLoaded(e.uid)})}loadData(e){return t._(this,void 0,void 0,function*(){var i;null===(i=this._pendingRequest)||void 0===i||i.abort();const r=this._startRequestTiming(e);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(e,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();const t={};return e.request&&(t.data=e.data),this._finishRequestTiming(r,e,t),t}catch(e){if(delete this._pendingRequest,!t.$(e))throw e;return{abandoned:!0}}})}_startRequestTiming(t){var e;if(null===(e=t.request)||void 0===e?void 0:e.collectResourceTiming)return new u(t.request.url)}_finishRequestTiming(t,e,i){const r=null==t?void 0:t.finish();r&&(i.resourceTiming={[e.source]:JSON.parse(JSON.stringify(r))})}reloadTile(t){return this.tileState.getLoaded(t.uid)?this._reloadLoadedTile(t):this.loadTile(t)}loadAndProcessGeoJSON(e,i){return t._(this,void 0,void 0,function*(){var r;if(e.request&&(e.data=(yield t.k(e.request,i)).data),e.data)return e.data=this._filterGeoJSON(e.data,e.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(e.data,e));if(e.dataDiff)return null!==(r=this._geoJSONIndex)&&void 0!==r||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},e)),void this._geoJSONIndex.updateData(e.dataDiff,this._getFilterPredicate(e.filter));if(e.updateCluster&&this._geoJSONIndex.updateClusterOptions(e.geojsonVtOptions.cluster,n(e)),null==this._geoJSONIndex)throw new Error(`Input data given to '${e.source}' is not a valid GeoJSON object.`)})}_filterGeoJSON(t,e){if("FeatureCollection"!==t.type)return t;const i=this._getFilterPredicate(e);return i?{type:"FeatureCollection",features:t.features.filter(t=>i(t))}:t}_getFilterPredicate(e){if("boolean"!=typeof e&&!(null==e?void 0:e.length))return;const i=t.c$(e,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===i.result)throw new Error(i.value.map(t=>`${t.key}: ${t.message}`).join(", "));return t=>i.value.evaluate({zoom:0},t)}removeSource(e){return t._(this,void 0,void 0,function*(){var t;null===(t=this._pendingRequest)||void 0===t||t.abort()})}getClusterExpansionZoom(t){return this._geoJSONIndex.getClusterExpansionZoom(t.clusterId)}getClusterChildren(t){return this._geoJSONIndex.getClusterChildren(t.clusterId)}getClusterLeaves(t){return this._geoJSONIndex.getClusterLeaves(t.clusterId,t.limit,t.offset)}}class g{constructor(e){this.self=e,this.actor=new t.N(e),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(t,e)=>{if(this.externalWorkerSourceTypes[t])throw new Error(`Worker source with name "${t}" already registered.`);this.externalWorkerSourceTypes[t]=e},this.self.addProtocol=t.cH,this.self.removeProtocol=t.cI,this.self.registerRTLTextPlugin=e=>{t.d1.setMethods(e)},this.self.makeRequest=t.m,this.actor.registerMessageHandler("LDT",(t,e)=>this._getDEMWorkerSource(t,e.source).loadTile(e)),this.actor.registerMessageHandler("RDT",(e,i)=>t._(this,void 0,void 0,function*(){this._getDEMWorkerSource(e,i.source).removeTile(i)})),this.actor.registerMessageHandler("GCEZ",(e,i)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(e,i.type,i.source).getClusterExpansionZoom(i)})),this.actor.registerMessageHandler("GCC",(e,i)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(e,i.type,i.source).getClusterChildren(i)})),this.actor.registerMessageHandler("GCL",(e,i)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(e,i.type,i.source).getClusterLeaves(i)})),this.actor.registerMessageHandler("LD",(t,e)=>this._getWorkerSource(t,e.type,e.source).loadData(e)),this.actor.registerMessageHandler("LT",(t,e)=>this._getWorkerSource(t,e.type,e.source).loadTile(e)),this.actor.registerMessageHandler("RT",(t,e)=>this._getWorkerSource(t,e.type,e.source).reloadTile(e)),this.actor.registerMessageHandler("AT",(t,e)=>this._getWorkerSource(t,e.type,e.source).abortTile(e)),this.actor.registerMessageHandler("RMT",(t,e)=>this._getWorkerSource(t,e.type,e.source).removeTile(e)),this.actor.registerMessageHandler("RS",(e,i)=>t._(this,void 0,void 0,function*(){var t,r;if(!(null===(r=null===(t=this.workerSources[e])||void 0===t?void 0:t[i.type])||void 0===r?void 0:r[i.source]))return;const o=this.workerSources[e][i.type][i.source];delete this.workerSources[e][i.type][i.source],void 0!==o.removeSource&&o.removeSource(i)})),this.actor.registerMessageHandler("RM",e=>t._(this,void 0,void 0,function*(){delete this.layerIndexes[e],delete this.availableImages[e],delete this.workerSources[e],delete this.demWorkerSources[e],this.globalStates.delete(e)})),this.actor.registerMessageHandler("SR",(e,i)=>t._(this,void 0,void 0,function*(){this.referrer=i})),this.actor.registerMessageHandler("SRPS",(t,e)=>this._syncRTLPluginState(t,e)),this.actor.registerMessageHandler("IS",(e,i)=>t._(this,void 0,void 0,function*(){this.self.importScripts(i)})),this.actor.registerMessageHandler("SI",(t,e)=>this._setImages(t,e)),this.actor.registerMessageHandler("UL",(e,i)=>t._(this,void 0,void 0,function*(){this._getLayerIndex(e).update(i.layers,i.removedIds,this._getGlobalState(e))})),this.actor.registerMessageHandler("UGS",(e,i)=>t._(this,void 0,void 0,function*(){const t=this._getGlobalState(e);for(const e in i)t[e]=i[e]})),this.actor.registerMessageHandler("SL",(e,i)=>t._(this,void 0,void 0,function*(){this._getLayerIndex(e).replace(i,this._getGlobalState(e))}))}_getGlobalState(t){let e=this.globalStates.get(t);return e||(e={},this.globalStates.set(t,e)),e}_setImages(e,i){return t._(this,void 0,void 0,function*(){this.availableImages[e]=i;for(const t in this.workerSources[e]){const r=this.workerSources[e][t];for(const t in r)r[t].availableImages=i}})}_syncRTLPluginState(e,i){return t._(this,void 0,void 0,function*(){return yield t.d1.syncState(i,this.self.importScripts)})}_getAvailableImages(t){let e=this.availableImages[t];return e||(e=[]),e}_getLayerIndex(t){let e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new a),e}_getWorkerSource(t,e,i){var r,o;if((r=this.workerSources)[t]||(r[t]={}),(o=this.workerSources[t])[e]||(o[e]={}),!this.workerSources[t][e][i]){const r={sendAsync:(e,i)=>(e.targetMapId=t,this.actor.sendAsync(e,i))};switch(e){case"vector":this.workerSources[t][e][i]=new m(r,this._getLayerIndex(t),this._getAvailableImages(t));break;case"geojson":this.workerSources[t][e][i]=new _(r,this._getLayerIndex(t),this._getAvailableImages(t));break;default:this.workerSources[t][e][i]=new this.externalWorkerSourceTypes[e](r,this._getLayerIndex(t),this._getAvailableImages(t))}}return this.workerSources[t][e][i]}_getDEMWorkerSource(t,e){var i,r;return(i=this.demWorkerSources)[t]||(i[t]={}),(r=this.demWorkerSources[t])[e]||(r[e]=new f),this.demWorkerSources[t][e]}}return t.i(self)&&(self.worker=new g(self)),g}),t("index",["exports","./shared"],function(t,e){function i(){var t=new e.A(4);return e.A!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t}function r(){return De.getCurrentTime()}function o(t){const e=[];if("string"==typeof t)e.push({id:"default",url:t});else if(t&&t.length>0){const i=[];for(const{id:r,url:o}of t){const t=`${r}${o}`;i.includes(t)||(i.push(t),e.push({id:r,url:o}))}}return e}function n(t,e,i){try{const r=new URL(t);return r.pathname+=`${e}${i}`,r.toString()}catch(e){throw new Error(`Invalid sprite URL "${t}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function a(t){const{userImage:e}=t;return!(!(null==e?void 0:e.render)||!e.render()||(t.data.replace(new Uint8Array(e.data.buffer)),0))}function s(t,e,i,r,o,n,a,s,c){for(let u=e;u-1);l++,n[l]=s,a[l]=c,a[l+1]=je}for(let s=0,l=0;se.m(i,r))),Qe}function h(t,i){const r=e.O();return e.Q(r,r,[1,1,0]),e.S(r,r,[.5*t.width,.5*t.height,1]),t.calculatePosMatrix?e.U(r,r,t.calculatePosMatrix(i.toUnwrapped())):r}function p(t,e,i,r,o,n,a){var s;const l=function(t,e,i){if(t)for(const r of t){const t=e[r];if((null==t?void 0:t.source)===i&&"fill-extrusion"===t.type)return!0}else for(const t in e){const r=e[t];if(r.source===i&&"fill-extrusion"===r.type)return!0}return!1}(null!==(s=null==o?void 0:o.layers)&&void 0!==s?s:null,e,t.id),c=n.maxPitchScaleFactor(),u=t.tilesIn(r,c,l);u.sort(d);const p=[];for(const r of u)p.push({wrappedTileID:r.tileID.wrapped().key,queryResults:r.tile.queryRenderedFeatures(e,i,t.getState(),r.queryGeometry,r.cameraQueryGeometry,r.scale,o,n,c,h(n,r.tileID),a?(t,e)=>a(r.tileID,t,e):void 0)});return function(t,e){for(const i in t)for(const r of t[i])m(r,e);return t}(function(t){const e={},i={};for(const{queryResults:r,wrappedTileID:o}of t){i[o]||(i[o]={});const t=i[o];for(const i in r){const o=r[i];t[i]||(t[i]={});const n=t[i];e[i]||(e[i]=[]);for(const t of o)n[t.featureIndex]||(n[t.featureIndex]=!0,e[i].push(t))}}return e}(p),t)}function d(t,e){const i=t.tileID,r=e.tileID;return i.overscaledZ-r.overscaledZ||i.canonical.y-r.canonical.y||i.wrap-r.wrap||i.canonical.x-r.canonical.x}function m(t,e){const i=t.feature,r=e.getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=r}function f(t,i,r,o){return e._(this,void 0,void 0,function*(){let n=t;if(t.url?n=(yield e.k(yield i.transformRequest(t.url,"Source"),r)).data:yield ze.frameAsync(r,o),!n)return null;const a=e.V(e.e(n,t),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in n&&n.vector_layers&&(a.vectorLayerIds=n.vector_layers.map(t=>t.id)),a})}function _(t,e){return e?t.properties[e]:t.id}function g(t,e){const i={id:t.id};if(e.removeAllProperties&&(delete t.removeProperties,delete t.addOrUpdateProperties,delete e.removeProperties),e.removeProperties)for(const i of e.removeProperties){ const e=t.addOrUpdateProperties.findIndex(t=>t.key===i);e>-1&&t.addOrUpdateProperties.splice(e,1)}return(t.removeAllProperties||e.removeAllProperties)&&(i.removeAllProperties=!0),(t.removeProperties||e.removeProperties)&&(i.removeProperties=[...t.removeProperties||[],...e.removeProperties||[]]),(t.addOrUpdateProperties||e.addOrUpdateProperties)&&(i.addOrUpdateProperties=[...t.addOrUpdateProperties||[],...e.addOrUpdateProperties||[]]),(t.newGeometry||e.newGeometry)&&(i.newGeometry=e.newGeometry||t.newGeometry),i}function y(t){var e,i;if(!t)return{};const r={};return r.removeAll=t.removeAll,r.remove=new Set(t.remove||[]),r.add=new Map(null===(e=t.add)||void 0===e?void 0:e.map(t=>[t.id,t])),r.update=new Map(null===(i=t.update)||void 0===i?void 0:i.map(t=>[t.id,t])),r}function v(t){return t&&0!==t.length?"number"==typeof t[0]?[t]:t.flatMap(t=>v(t)):[]}function b(t){return"GeometryCollection"===t.type?t.geometries.flatMap(t=>b(t)):v(t.coordinates)}function x(t){const e=new ei;let i;switch(t.type){case"FeatureCollection":i=t.features.flatMap(t=>b(t.geometry));break;case"Feature":i=b(t.geometry);break;default:i=b(t)}if(0===i.length)return e;for(const t of i){const[i,r]=t;e.extend([i,r])}return e}function w(){return mi||(mi=new di),mi}function T(t,i){const r=e.al(i.lat,-e.am,e.am);return new e.P(e.Z(i.lng)*t,e.Y(r)*t)}function k(t,i){return new e.a7(i.x/t,i.y/t).toLngLat()}function M(t){return t.cameraToCenterDistance*Math.min(.85*Math.tan(e.an(90-t.pitch)),Math.tan(e.an(vi-t.pitch)))}function S(t,i){const r=t.canonical,o=i/e.ao(r.z),n=r.x+Math.pow(2,r.z)*t.wrap,a=e.ap(new Float64Array(16));return e.Q(a,a,[n*o,r.y*o,0]),e.S(a,a,[o/e.a6,o/e.a6,1]),a}function P(t,i,r,o,n){const a=e.a7.fromLngLat(t,i),s=n*e.aq(1,t.lat),{x:l,y:c,z:u}=A(r,o);return new e.a7(a.x+s*-l,a.y+s*-c,a.z+s*-u)}function A(t,i){const r=e.an(t),o=e.an(i),n=Math.cos(-r),a=Math.sin(r);return{x:a*Math.sin(o),y:-a*Math.cos(o),z:n}}function I(t,e,i){const r=e.intersectsFrustum(t);if(!i||0===r)return r;const o=e.intersectsPlane(i);return 0===o?0:2===r&&2===o?2:1}function C(t,e,i){let r=0;const o=(i-e)/10;for(let n=0;n<10;n++)r+=o*Math.pow(Math.cos(e+(n+.5)/10*(i-e)),t);return r}function E(t,i){return function(r,o,n,a,s){const l=2*((t-1)/e.ar(Math.cos(e.an(vi-s))/Math.cos(e.an(vi)))-1),c=Math.acos(n/a),u=2*C(l-1,0,e.an(s/2)),h=Math.min(e.an(vi),c+e.an(s/2)),p=C(l-1,Math.min(h,c-e.an(s/2)),h),d=Math.atan(o/n),m=Math.hypot(o,n);let f=r;return f+=e.ar(a/m/Math.max(.5,Math.cos(e.an(s/2)))),f+=l*e.ar(Math.cos(d))/2,f-=e.ar(Math.max(1,p/u/i))/2,f}}function z(t,i){const r=(i.roundZoom?Math.round:Math.floor)(t.zoom+e.ar(t.tileSize/i.tileSize));return Math.max(0,r)}function D(t,i){const r=t.getCameraFrustum(),o=t.getClippingPlane(),n=t.screenPointToMercatorCoordinate(t.getCameraPoint()),a=e.a7.fromLngLat(t.center,t.elevation);n.z=a.z+Math.cos(t.pitchInRadians)*t.cameraToCenterDistance/t.worldSize;const s=t.getCoveringTilesDetailsProvider(),l=s.allowVariableZoom(t,i),c=z(t,i),u=i.minzoom||0,h=void 0!==i.maxzoom?i.maxzoom:t.maxZoom,p=Math.min(Math.max(0,c),h),d=Math.pow(2,p),m=[d*n.x,d*n.y,0],f=[d*a.x,d*a.y,0],_=Math.hypot(a.x-n.x,a.y-n.y),g=Math.abs(a.z-n.z),y=Math.hypot(_,g),v=t=>({zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}),b=[],x=[];if(t.renderWorldCopies&&s.allowWorldCopies())for(let t=1;t<=3;t++)b.push(v(-t)),b.push(v(t));for(b.push(v(0));b.length>0;){const d=b.pop(),_=d.x,v=d.y;let w=d.fullyVisible;const T={x:_,y:v,z:d.zoom},k=s.getTileBoundingVolume(T,d.wrap,t.elevation,i);if(!w){const t=I(r,k,o);if(0===t)continue;w=2===t}const M=s.distanceToTile2d(n.x,n.y,T,k);let S=c;l&&(S=(i.calculateTileZoom||bi)(t.zoom+e.ar(t.tileSize/i.tileSize),M,g,y,t.fov)),S=(i.roundZoom?Math.round:Math.floor)(S),S=Math.max(0,S);const P=Math.min(S,h);if(d.wrap=s.getWrap(a,T,d.wrap),d.zoom>=P){if(d.zoom>1),wrap:d.wrap,fullyVisible:w})}return x.sort((t,e)=>t.distanceSq-e.distanceSq).map(t=>t.tileID)}function O(t){return"raster"===t||"image"===t||"video"===t}function L(t,e,i,r,o,n,a){if(!e.hasData())return!1;const{tileID:s,fadingRole:l,fadingDirection:c,fadingParentID:u}=e;if(l===fi.Base&&c===_i.Incoming&&u)return i[u.key]=u,!0;const h=Math.max(s.overscaledZ-o,n);for(let o=s.overscaledZ-1;o>=h;o--){const n=s.scaledTo(o),l=t.getLoadedTile(n);if(l)return e.setCrossFadeLogic({fadingRole:fi.Base,fadingDirection:_i.Incoming,fadingParentID:l.tileID,fadeEndTime:r+a}),l.setCrossFadeLogic({fadingRole:fi.Parent,fadingDirection:_i.Departing,fadeEndTime:r+a}),i[n.key]=n,!0}return!1}function R(t,e,i,r,o,n){if(!e.hasData())return!1;const a=e.tileID.children(o);let s=F(t,e,a,i,r,o,n);if(s)return!0;for(const l of a)F(t,e,l.children(o),i,r,o,n)&&(s=!0);return s}function F(t,e,i,r,o,n,a){if(i[0].overscaledZ>=n)return!1;let s=!1;for(const n of i){const i=t.getLoadedTile(n);if(!i)continue;const{fadingRole:l,fadingDirection:c,fadingParentID:u}=i;l===fi.Base&&c===_i.Departing&&u||(i.setCrossFadeLogic({fadingRole:fi.Base,fadingDirection:_i.Departing,fadingParentID:e.tileID,fadeEndTime:o+a}),e.setCrossFadeLogic({fadingRole:fi.Parent,fadingDirection:_i.Incoming,fadeEndTime:o+a})),r[n.key]=n,s=!0}return s}function B(t,e,i,r){const o=t.tileID;return!!t.selfFading||!t.hasData()&&!!e.has(o)&&(t.setSelfFadeLogic(i+r),!0)}function j(t,e){var i;t.needsHillshadePrepare=!0,t.needsTerrainPrepare=!0;let r=e.tileID.canonical.x-t.tileID.canonical.x;const o=e.tileID.canonical.y-t.tileID.canonical.y,n=Math.pow(2,t.tileID.canonical.z),a=e.tileID.key;0===r&&0===o||Math.abs(o)>1||(Math.abs(r)>1&&(1===Math.abs(r+n)?r+=n:1===Math.abs(r-n)&&(r-=n)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,o),(null===(i=t.neighboringTiles)||void 0===i?void 0:i[a])&&(t.neighboringTiles[a].backfilled=!0)))}function V(t,e){let i=!0;return"always"===t||"never"!==t&&"never"!==e||(i=!1),i}function N(t,e){const i=1/(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]),r=1/(e[8]*e[8]+e[9]*e[9]+e[10]*e[10]),o=e[0]*i,n=e[4]*i,a=e[8]*r,s=e[1]*i,l=e[5]*i,c=e[9]*r,u=e[2]*i,h=e[6]*i,p=e[10]*r;t[0]=o,t[1]=n,t[2]=a,t[4]=s,t[5]=l,t[6]=c,t[8]=u,t[9]=h,t[10]=p;const d=e[12],m=e[13],f=e[14];return t[12]=-o*d-s*m-u*f,t[13]=-n*d-l*m-h*f,t[14]=-a*d-c*m-p*f,t[3]=0,t[7]=0,t[11]=0,t[15]=1,t}function U(t,r,o){const n=e.O();if(!t){const{vecSouth:t,vecEast:e}=Z(r),o=i();o[0]=e[0],o[1]=e[1],o[2]=t[0],o[3]=t[1],a=o,(p=(l=(s=o)[0])*(h=s[3])-(u=s[2])*(c=s[1]))&&(a[0]=h*(p=1/p),a[1]=-c*p,a[2]=-u*p,a[3]=l*p),n[0]=o[0],n[1]=o[1],n[4]=o[2],n[5]=o[3]}var a,s,l,c,u,h,p;return e.S(n,n,[1/o,1/o,1]),n}function G(t,i,r,o){if(t){const t=e.O();if(!i){const{vecSouth:e,vecEast:i}=Z(r);t[0]=i[0],t[1]=i[1],t[4]=e[0],t[5]=e[1]}return e.S(t,t,[o,o,1]),t}return r.pixelsToClipSpaceMatrix}function Z(t){const i=Math.cos(t.rollInRadians),r=Math.sin(t.rollInRadians),o=Math.cos(t.pitchInRadians),n=Math.cos(t.bearingInRadians),a=Math.sin(t.bearingInRadians),s=e.az();s[0]=-n*o*r-a*i,s[1]=-a*o*r+n*i;const l=e.aA(s);l<1e-9?e.aB(s):e.aC(s,s,1/l);const c=e.az();c[0]=n*o*i-a*r,c[1]=a*o*i+n*r;const u=e.aA(c);return u<1e-9?e.aB(c):e.aC(c,c,1/u),{vecEast:c,vecSouth:s}}function $(t,i,r,o){let n;o?(n=[t,i,o(t,i),1],e.aE(n,n,r)):(n=[t,i,0,1],st(n,n,r));const a=n[3];return{point:new e.P(n[0]/a,n[1]/a),signedDistanceFromCamera:a,isOccluded:!1}}function q(t,e){return.5+t/e*.5}function W(t,e){return t.x>=-e[0]&&t.x<=e[0]&&t.y>=-e[1]&&t.y<=e[1]}function H(t,i,r,o,n,a,s,l,c,u,h,p,d){const m=r?t.textSizeData:t.iconSizeData,f=e.aw(m,i.transform.zoom),_=[256/i.width*2+1,256/i.height*2+1],g=r?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;g.clear();const y=t.lineVertexArray,v=r?t.text.placedSymbolArray:t.icon.placedSymbolArray,b=i.transform.width/i.transform.height;let x=!1;for(let r=0;rMath.abs(r.x-i.x)*o?{useVertical:!0}:(t===e.ax.vertical?i.yr.x)?{needsFlipping:!0}:null}function K(t){const{projectionContext:i,pitchedLabelPlaneMatrixInverse:r,symbol:o,fontSize:n,flip:a,keepUpright:s,glyphOffsetArray:l,dynamicLayoutVertexArray:c,aspectRatio:u,rotateToLine:h}=t,p=n/24,d=o.lineOffsetX*p,m=o.lineOffsetY*p;let f;if(o.numGlyphs>1){const t=o.glyphStartIndex+o.numGlyphs,e=o.lineStartIndex,n=o.lineStartIndex+o.lineLength,c=Y(p,l,d,m,a,o,h,i);if(!c)return{notEnoughRoom:!0};const _=et(c.first.point.x,c.first.point.y,i,r),g=et(c.last.point.x,c.last.point.y,i,r);if(s&&!a){const t=X(o.writingMode,_,g,u);if(t)return t}f=[c.first];for(let r=o.glyphStartIndex+1;r0?s.point:J(i.tileAnchorPoint,a,t,1,i),c=et(t.x,t.y,i,r),h=et(l.x,l.y,i,r),p=X(o.writingMode,c,h,u);if(p)return p}const t=nt(p*l.getoffsetX(o.glyphStartIndex),d,m,a,o.segment,o.lineStartIndex,o.lineStartIndex+o.lineLength,i,h);if(!t||i.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};f=[t]}for(const t of f)e.aD(c,t.point,t.angle);return{}}function J(t,e,i,r,o){const n=t.add(t.sub(e)._unit()),a=tt(n.x,n.y,o).point,s=i.sub(a);return i.add(s._mult(r/s.mag()))}function Q(t,i,r){const o=i.projectionCache;if(o.projections[t])return o.projections[t];const n=new e.P(i.lineVertexArray.getx(t),i.lineVertexArray.gety(t)),a=tt(n.x,n.y,i);if(a.signedDistanceFromCamera>0)return o.projections[t]=a.point,o.anyProjectionOccluded||(o.anyProjectionOccluded=a.isOccluded),a.point;const s=t-r.direction;return J(0===r.distanceFromAnchor?i.tileAnchorPoint:new e.P(i.lineVertexArray.getx(s),i.lineVertexArray.gety(s)),n,r.previousVertex,r.absOffsetX-r.distanceFromAnchor+1,i)}function tt(t,e,i){const r=t+i.translation[0],o=e+i.translation[1];let n;return i.pitchWithMap?(n=$(r,o,i.pitchedLabelPlaneMatrix,i.getElevation),n.isOccluded=!1):(n=i.transform.projectTileCoordinates(r,o,i.unwrappedTileID,i.getElevation),n.point.x=(.5*n.point.x+.5)*i.width,n.point.y=(.5*-n.point.y+.5)*i.height),n}function et(t,i,r,o){if(r.pitchWithMap){const n=[t,i,0,1];return e.aE(n,n,o),r.transform.projectTileCoordinates(n[0]/n[3],n[1]/n[3],r.unwrappedTileID,r.getElevation).point}return{x:t/r.width*2-1,y:1-i/r.height*2}}function it(t,e,i){return i.transform.projectTileCoordinates(t,e,i.unwrappedTileID,i.getElevation)}function rt(t,e,i){return t._unit()._perp()._mult(e*i)}function ot(t,i,r,o,n,a,s,l,c){if(l.projectionCache.offsets[t])return l.projectionCache.offsets[t];const u=r.add(i);if(t+c.direction=n)return l.projectionCache.offsets[t]=u,u;const h=Q(t+c.direction,l,c),p=rt(h.sub(r),s,c.direction),d=r.add(p),m=h.add(p);return l.projectionCache.offsets[t]=e.aF(a,u,d,m)||u,l.projectionCache.offsets[t]}function nt(t,e,i,r,o,n,a,s,l){const c=r?t-e:t+e;let u=c>0?1:-1,h=0;r&&(u*=-1,h=Math.PI),u<0&&(h+=Math.PI);let p,d=u>0?n+o:n+o+1;s.projectionCache.cachedAnchorPoint?p=s.projectionCache.cachedAnchorPoint:(p=tt(s.tileAnchorPoint.x,s.tileAnchorPoint.y,s).point,s.projectionCache.cachedAnchorPoint=p);let m,f,_=p,g=p,y=0,v=0;const b=Math.abs(c),x=[];let w;for(;y+v<=b;){if(d+=u,d=a)return null;y+=v,g=_,f=m;const t={absOffsetX:b,direction:u,distanceFromAnchor:y,previousVertex:g};if(_=Q(d,s,t),0===i)x.push(g),w=_.sub(g);else{let e;const r=_.sub(g);e=0===r.mag()?rt(Q(d+u,s,t).sub(_),i,u):rt(r,i,u),f||(f=g.add(e)),m=ot(d,e,_,n,a,f,i,s,t),x.push(f),w=m.sub(f)}v=w.mag()}const T=w._mult((b-y)/v)._add(f||g),k=h+Math.atan2(_.y-g.y,_.x-g.x);return x.push(T),{point:T,angle:l?k:0,path:x}}function at(t,e){for(let i=0;i(s[o]=!0,"define"===e?`\n#ifndef HAS_UNIFORM_u_${o}\nin ${i} ${r} ${o};\n#else\nuniform ${i} ${r} u_${o};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${o}\n ${i} ${r} ${o} = u_${o};\n#endif\n`)),vertexSource:e=e.replace(i,(t,e,i,r,o)=>{const n="float"===r?"vec2":"vec4",a=o.match(/color/)?"color":n;return s[o]?"define"===e?`\n#ifndef HAS_UNIFORM_u_${o}\nuniform lowp float u_${o}_t;\nin ${i} ${n} a_${o};\nout ${i} ${r} ${o};\n#else\nuniform ${i} ${r} u_${o};\n#endif\n`:"vec4"===a?`\n#ifndef HAS_UNIFORM_u_${o}\n ${o} = a_${o};\n#else\n ${i} ${r} ${o} = u_${o};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${o}\n ${o} = unpack_mix_${a}(a_${o}, u_${o}_t);\n#else\n ${i} ${r} ${o} = u_${o};\n#endif\n`:"define"===e?`\n#ifndef HAS_UNIFORM_u_${o}\nuniform lowp float u_${o}_t;\nin ${i} ${n} a_${o};\n#else\nuniform ${i} ${r} u_${o};\n#endif\n`:"vec4"===a?`\n#ifndef HAS_UNIFORM_u_${o}\n ${i} ${r} ${o} = a_${o};\n#else\n ${i} ${r} ${o} = u_${o};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${o}\n ${i} ${r} ${o} = unpack_mix_${a}(a_${o}, u_${o}_t);\n#else\n ${i} ${r} ${o} = u_${o};\n#endif\n`}),staticAttributes:r,staticUniforms:a}}function pt(t,e){if(!t.renderWorldCopies||t.lngRange)return;const i=e.lng-t.center.lng;e.lng+=i>180?-360:i<-180?360:0}function dt(t){return Math.max(0,Math.floor(t))}function mt(){e.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function ft(t){if(t.useSlerp)if(t.k<1){const i=e.bk(t.startEulerAngles.roll,t.startEulerAngles.pitch,t.startEulerAngles.bearing),r=e.bk(t.endEulerAngles.roll,t.endEulerAngles.pitch,t.endEulerAngles.bearing),o=new Float64Array(4);e.bl(o,i,r,t.k);const n=e.bm(o);t.tr.setRoll(n.roll),t.tr.setPitch(n.pitch),t.tr.setBearing(n.bearing)}else t.tr.setRoll(t.endEulerAngles.roll),t.tr.setPitch(t.endEulerAngles.pitch),t.tr.setBearing(t.endEulerAngles.bearing);else t.tr.setRoll(e.H.number(t.startEulerAngles.roll,t.endEulerAngles.roll,t.k)),t.tr.setPitch(e.H.number(t.startEulerAngles.pitch,t.endEulerAngles.pitch,t.k)),t.tr.setBearing(e.H.number(t.startEulerAngles.bearing,t.endEulerAngles.bearing,t.k))}function _t(t,i,r,o,n){const a=n.padding,s=T(n.worldSize,r.getNorthWest()),l=T(n.worldSize,r.getNorthEast()),c=T(n.worldSize,r.getSouthEast()),u=T(n.worldSize,r.getSouthWest()),h=e.an(-o),p=s.rotate(h),d=l.rotate(h),m=c.rotate(h),f=u.rotate(h),_=new e.P(Math.max(p.x,d.x,f.x,m.x),Math.max(p.y,d.y,f.y,m.y)),g=new e.P(Math.min(p.x,d.x,f.x,m.x),Math.min(p.y,d.y,f.y,m.y)),y=_.sub(g),v=(n.width-(a.left+a.right+i.left+i.right))/y.x,b=(n.height-(a.top+a.bottom+i.top+i.bottom))/y.y;if(b<0||v<0)return void mt();const x=Math.min(e.ar(n.scale*Math.min(v,b)),t.maxZoom),w=e.P.convert(t.offset),M=new e.P((i.left-i.right)/2,(i.top-i.bottom)/2).rotate(e.an(o)),S=w.add(M).mult(n.scale/e.ao(x));return{center:k(n.worldSize,s.add(c).div(2).sub(S)),zoom:x,bearing:o}}function gt(t){return"undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext}function yt(t,i){const r=void 0!==t.granularity?Math.max(t.granularity,1):1,o=r+(t.generateBorders?2:0),n=r+(t.extendToNorthPole||t.generateBorders?1:0)+(t.extendToSouthPole||t.generateBorders?1:0),a=o+1,s=n+1,l=t.generateBorders?-1:0,c=t.generateBorders||t.extendToNorthPole?-1:0,u=r+(t.generateBorders?1:0),h=r+(t.generateBorders||t.extendToSouthPole?1:0),p=a*s,d=o*n*6,m=a*s>65536;if(m&&"16bit"===i)throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");const f=m||"32bit"===i,_=new Int16Array(2*p);let g=0;for(let i=c;i<=h;i++)for(let o=l;o<=u;o++){let n=o/r*e.a6;-1===o&&(n=-yr),o===r+1&&(n=e.a6+yr);let a=i/r*e.a6;-1===i&&(a=t.extendToNorthPole?e.bq:-yr),i===r+1&&(a=t.extendToSouthPole?e.br:e.a6+yr),_[g++]=n,_[g++]=a}const y=f?new Uint32Array(d):new Uint16Array(d);let v=0;for(let t=0;t1e-6){const o=t[0]/r,n=Math.acos(t[2]/r),a=(o>0?n:-n)/Math.PI*180;return new e.W(e.X(a,-180,180),i)}return new e.W(0,i)}function kt(t){return Math.cos(t*Math.PI/180)}function Mt(t,i){const r=kt(t),o=kt(i);return e.ar(o/r)}function St(t,i){const r=t.rotate(i.bearingInRadians),o=i.zoom+Mt(i.center.lat,0),n=e.bt(1/kt(i.center.lat),1/kt(Math.min(Math.abs(i.center.lat),60)),e.bw(o,7,3,0,1)),a=360/vt({worldSize:i.worldSize,center:{lat:i.center.lat}});return new e.W(i.center.lng-r.x*a*n,e.al(i.center.lat+r.y*a,-e.am,e.am))}function Pt(t){const e=.5*t,i=Math.sin(e),r=Math.cos(e);return Math.log(i+r)-Math.log(r-i)}function At(t,i,r,o){const n=t.lat+r*o;if(Math.abs(r)>1){const a=(Math.sign(t.lat+r)!==Math.sign(t.lat)?-Math.abs(t.lat):Math.abs(t.lat))*Math.PI/180,s=Math.abs(t.lat+r)*Math.PI/180,l=Pt(a+o*(s-a)),c=Pt(a),u=Pt(s);return new e.W(t.lng+i*((l-c)/(u-c)),n)}return new e.W(t.lng+i*o,n)}function It(t,e,i){const r=t-e;return r<0?-r:Math.max(0,r-i)}function Ct(t,e,i,r,o){const n=t-i;let a;return a=n<0?Math.min(-n,1+n-o):n>o?Math.min(Math.max(n-o,0),1-n):0,Math.max(a,It(e,r,o))}function Et(t,i){let r=1/0,o=-1/0;for(const n of i){const i=e.b3(t,n);r=Math.min(r,i),o=Math.max(o,i)}return{min:r,max:o}}function zt(t){const e=[];for(const i of t){if(null===i)continue;const t=i.split(" ");e.push(t.pop())}return e}function Dt(t,i,r){const o=1/e.aK(r,1,i.transform.tileZoom),n=Math.pow(2,r.tileID.overscaledZ),a=r.tileSize*Math.pow(2,i.transform.tileZoom)/n,s=a*(r.tileID.canonical.x+r.tileID.wrap*n),l=a*r.tileID.canonical.y;return{u_image:0,u_texsize:r.imageAtlasTexture.size,u_scale:[o,t.fromScale,t.toScale],u_fade:t.t,u_pixel_coord_upper:[s>>16,l>>16],u_pixel_coord_lower:[65535&s,65535&l]}}function Ot(t,i){const r=Math.pow(2,i.canonical.z),o=i.canonical.y;return[new e.a7(0,o/r).toLngLat().lat,new e.a7(0,(o+1)/r).toLngLat().lat]}function Lt(t,i){return 1/e.aK(t,1,i.tileZoom)}function Rt(t,i,r){return e.aL(t.transform,i,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}function Ft(t){t*=Math.PI/180;const e=Math.sin(t),i=Math.cos(t);return[(2*i+1)/3,(-Math.sqrt(3)*e-i+1)/3,(Math.sqrt(3)*e-i+1)/3]}function Bt(t,i,r,o,n){var a,s;const l=t.context,c=t.transform,u=l.gl,h=t.useProgram("collisionBox"),p=[];let d=0,m=0;for(const e of o){const o=i.getTile(e).getBucket(r);if(!o)continue;const s=n?o.textCollisionBox:o.iconCollisionBox,f=o.collisionCircleArray;f.length>0&&(p.push({circleArray:f,circleOffset:m,coord:e}),d+=f.length/4,m=d),s&&h.draw(l,u.LINES,mr.disabled,_r.disabled,t.colorModeForRenderPass(),dr.disabled,Zr(t.transform),null===(a=t.style.map.terrain)||void 0===a?void 0:a.getTerrainData(e),c.getProjectionData({overscaledTileID:e,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),r.id,s.layoutVertexBuffer,s.indexBuffer,s.segments,null,t.transform.zoom,null,null,s.collisionVertexBuffer)}if(!n||!p.length)return;const f=t.useProgram("collisionCircle"),_=new e.ca;_.resize(4*d),_._trim();let g=0;for(const t of p)for(let e=0;e=0&&(_[g.associatedIconIndex]={shiftedAnchor:A,angle:I})}else at(g.numGlyphs,m)}if(c){f.clear();const i=t.icon.placedSymbolArray;for(let t=0;tt.style.map.terrain.getElevation(l,e,i):null,a="map"===r.layout.get("text-rotation-alignment");H(c,t,n,j,i,b,u,a,l.toUnwrapped(),y.width,y.height,Z,o)}const Y=n&&S||W,X=x||Y?en:b?j:t.transform.clipSpaceToPixelsMatrix,K=f&&0!==r.paint.get(n?"text-halo-width":"icon-halo-width").constantOr(1);let J;J=f?c.iconsInText?ao(_.kind,C,w,b,x,Y,t,X,V,Z,z,R,A):no(_.kind,C,w,b,x,Y,t,X,V,Z,n,z,K,A):oo(_.kind,C,w,b,x,Y,t,X,V,Z,n,z,A);const Q={program:I,buffers:h,uniformValues:J,projectionData:$,atlasTexture:D,atlasTextureIcon:F,atlasInterpolation:O,atlasInterpolationIcon:L,isSDF:f,hasHalo:K};if(T&&c.canOverlap){k=!0;const t=h.segments.get();for(const i of t)P.push({segments:new e.aV([i]),sortKey:i.sortKey,state:Q,terrainData:E})}else P.push({segments:h.segments,sortKey:0,state:Q,terrainData:E})}k&&P.sort((t,e)=>t.sortKey-e.sortKey);const I=null!==(f=r.paint.get(n?"text-halo-width":"icon-halo-width").constantOr(null))&&void 0!==f?f:1/0,C=r.layout.get("text-letter-spacing").constantOr(0)*e.aJ<0||I>1;for(const e of P){const i=e.state;_.activeTexture.set(g.TEXTURE0),i.atlasTexture.bind(i.atlasInterpolation,g.CLAMP_TO_EDGE),i.atlasTextureIcon&&(_.activeTexture.set(g.TEXTURE1),i.atlasTextureIcon&&i.atlasTextureIcon.bind(i.atlasInterpolationIcon,g.CLAMP_TO_EDGE));const o=i.isSDF&&i.hasHalo;if(o){const o=i.uniformValues;o.u_is_halo=1,C&&(o.u_is_plain=0,Zt(i.buffers,e.segments,r,t,i.program,M,h,p,o,i.projectionData,e.terrainData),o.u_is_halo=0,o.u_is_plain=1)}Zt(i.buffers,e.segments,r,t,i.program,M,h,p,i.uniformValues,i.projectionData,e.terrainData),o&&!C&&(i.uniformValues.u_is_halo=0)}}function Zt(t,e,i,r,o,n,a,s,l,c,u){const h=r.context;o.draw(h,h.gl.TRIANGLES,n,a,s,dr.backCCW,l,u,c,i.id,t.layoutVertexBuffer,t.indexBuffer,e,i.paint,r.transform.zoom,t.programConfigurations.get(i.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function $t(t,i,r,o,n){const a=t.context,s=a.gl,l=_r.disabled,c=new hr([s.ONE,s.ONE],e.bo.transparent,[!0,!0,!0,!0]),u=i.getBucket(r);if(!u)return;const h=o.key;let p=r.heatmapFbos.get(h);p||(p=Wt(a,i.tileSize,i.tileSize),r.heatmapFbos.set(h,p)),a.bindFramebuffer.set(p.framebuffer),a.viewport.set([0,0,i.tileSize,i.tileSize]),a.clear({color:e.bo.transparent});const d=u.programConfigurations.get(r.id),m=t.useProgram("heatmap",d,!n),f=t.transform.getProjectionData({overscaledTileID:i.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),_=t.style.map.terrain.getTerrainData(o);m.draw(a,s.TRIANGLES,mr.disabled,l,c,dr.disabled,Wr(i,t.transform.zoom,r.paint.get("heatmap-intensity"),1),_,f,r.id,u.layoutVertexBuffer,u.indexBuffer,u.segments,r.paint,t.transform.zoom,d)}function qt(t,e,i,r,o){const n=t.context,a=n.gl,s=t.transform;n.setColorMode(t.colorModeForRenderPass());const l=Ht(n,e),c=i.key,u=e.heatmapFbos.get(c);if(!u)return;n.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,u.colorAttachment.get()),n.activeTexture.set(a.TEXTURE1),l.bind(a.LINEAR,a.CLAMP_TO_EDGE);const h=s.getProjectionData({overscaledTileID:i,applyTerrainMatrix:o,applyGlobeMatrix:!r});t.useProgram("heatmapTexture").draw(n,a.TRIANGLES,mr.disabled,_r.disabled,t.colorModeForRenderPass(),dr.disabled,Hr(t,e,0,1),null,h,e.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments,e.paint,s.zoom),u.destroy(),e.heatmapFbos.delete(c)}function Wt(t,e,i){var r,o;const n=t.gl,a=n.createTexture();n.bindTexture(n.TEXTURE_2D,a),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR);const s=null!==(r=t.HALF_FLOAT)&&void 0!==r?r:n.UNSIGNED_BYTE,l=null!==(o=t.RGBA16F)&&void 0!==o?o:n.RGBA;n.texImage2D(n.TEXTURE_2D,0,l,e,i,0,n.RGBA,s,null);const c=t.createFramebuffer(e,i,!1,!1);return c.colorAttachment.set(a),c}function Ht(t,i){return i.colorRampTexture||(i.colorRampTexture=new e.T(t,i.colorRamp,t.gl.RGBA)),i.colorRampTexture}function Yt(t,i,r,o,n,a,s,l){let c=256;if(n.stepInterpolant){const o=i.getSource().maxzoom,n=s.canonical.z===o?Math.ceil(1<t.options.anisotropicFilterPitch&&d.texParameterf(d.TEXTURE_2D,p.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,p.extTextureFilterAnisotropicMax);const I=null===(u=t.style.map.terrain)||void 0===u?void 0:u.getTerrainData(T),C=f.getProjectionData({overscaledTileID:T,aligned:y,applyGlobeMatrix:!c,applyTerrainMatrix:!0}),E=ro(P,S,A.fadeMix,i,s),z=_.getMeshFromTileID(p,T.canonical,n,a,"raster");m.draw(p,d.TRIANGLES,r,o?o[T.overscaledZ]:_r.disabled,g,l?dr.frontCCW:dr.backCCW,E,I,C,i.id,z.vertexBuffer,z.indexBuffer,z.segments)}}function ae(t,i,o,n){const a={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(0===o||n)return a;if(t.fadingParentID){const n=i.getLoadedTile(t.fadingParentID);if(!n)return a;const s=Math.pow(2,n.tileID.overscaledZ-t.tileID.overscaledZ),l=[t.tileID.canonical.x*s%1,t.tileID.canonical.y*s%1],c=function(t,i,o){const n=r(),a=(n-i.timeAdded)/o,s=t.fadingDirection===_i.Incoming,l=e.al((n-t.timeAdded)/o,0,1),c=e.al(1-a,0,1),u=s?l:c;return{tileOpacity:u,parentTileOpacity:s?c:l,fadeMix:{opacity:1,mix:1-u}}}(t,n,o);return{parentTile:n,parentScaleBy:s,parentTopLeft:l,fadeValues:c}}if(t.selfFading){const i=function(t,i){const o=(r()-t.timeAdded)/i,n=e.al(o,0,1);return{tileOpacity:n,fadeMix:{opacity:n,mix:0}}}(t,o);return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:i}}return a}function se(t,e,i,r){ce(t,0,e+i/2,t.transform.width,i,r)}function le(t,e,i,r){ce(t,e-i/2,0,i,t.transform.height,r)}function ce(t,e,i,r,o,n){const a=t.context,s=a.gl;s.enable(s.SCISSOR_TEST),s.scissor(e*t.pixelRatio,i*t.pixelRatio,r*t.pixelRatio,o*t.pixelRatio),a.clear({color:n}),s.disable(s.SCISSOR_TEST)}function ue(t,i,r){var o;const n=t.context,a=n.gl,s=t.useProgram("debug"),l=mr.disabled,c=_r.disabled,u=t.colorModeForRenderPass(),h="$debug",p=null===(o=t.style.map.terrain)||void 0===o?void 0:o.getTerrainData(r);n.activeTexture.set(a.TEXTURE0);const d=i.getTileByID(r.key).latestRawTileData,m=Math.floor(((null==d?void 0:d.byteLength)||0)/1024),f=i.getTile(r).tileSize,_=512/Math.min(f,512)*(r.overscaledZ/t.transform.zoom)*.5;let g=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(g+=` => ${r.overscaledZ}`),function(t,e){t.initDebugOverlayCanvas();const i=t.debugOverlayCanvas,r=t.context.gl,o=t.debugOverlayCanvas.getContext("2d");o.clearRect(0,0,i.width,i.height),o.shadowColor="white",o.shadowBlur=2,o.lineWidth=1.5,o.strokeStyle="white",o.textBaseline="top",o.font="bold 36px Open Sans, sans-serif",o.fillText(e,5,5),o.strokeText(e,5,5),t.debugOverlayTexture.update(i),t.debugOverlayTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}(t,`${g} ${m}kB`);const y=t.transform.getProjectionData({overscaledTileID:r,applyGlobeMatrix:!0,applyTerrainMatrix:!0});s.draw(n,a.TRIANGLES,l,c,hr.alphaBlended,dr.disabled,qr(e.bo.transparent,_),null,y,h,t.debugBuffer,t.quadTriangleIndexBuffer,t.debugSegments),s.draw(n,a.LINE_STRIP,l,c,u,dr.disabled,qr(e.bo.red),p,y,h,t.debugBuffer,t.tileBorderIndexBuffer,t.debugSegments)}function he(t,e,i,r){const{isRenderingGlobe:o}=r,n=t.context,a=n.gl,s=t.transform,l=t.colorModeForRenderPass(),c=t.getDepthModeFor3D(),u=t.useProgram("terrain");n.bindFramebuffer.set(null),n.viewport.set([0,0,t.width,t.height]);for(const r of i){const i=e.getTerrainMesh(r.tileID),h=t.renderToTexture.getTexture(r),p=e.getTerrainData(r.tileID);n.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,h.texture);const d=e.getMeshFrameDelta(s.zoom),m=s.calculateFogMatrix(r.tileID.toUnwrapped()),f=Lr(d,m,t.style.sky,s.pitch,o),_=s.getProjectionData({overscaledTileID:r.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});u.draw(n,a.TRIANGLES,c,_r.disabled,l,dr.backCCW,f,p,_,"terrain",i.vertexBuffer,i.indexBuffer,i.segments)}}function pe(t,i){if(!i.mesh){const r=new e.aU;r.emplaceBack(-1,-1),r.emplaceBack(1,-1),r.emplaceBack(1,1),r.emplaceBack(-1,1);const o=new e.aW;o.emplaceBack(0,1,2),o.emplaceBack(0,2,3),i.mesh=new Qi(t.createVertexBuffer(r,tr.members),t.createIndexBuffer(o),e.aV.simpleSegment(0,0,r.length,o.length))}return i.mesh}function de(t,e){let i,r=!1,o=null;const n=()=>{o=null,r&&(t(...i),o=setTimeout(n,e),r=!1)};return(...t)=>(r=!0,i=t,o||n(),o)}function me(t,e){(!t.duration||t.durationMath.abs(t.x)}function xe(t){return t*(2-t)}function we(t){var e;return(null===(e=t.panDelta)||void 0===e?void 0:e.mag())||t.zoomDelta||t.bearingDelta||t.pitchDelta||t.rollDelta}function Te(t,i,r,o=!1){if(o||!r.getCoveringTilesDetailsProvider().allowWorldCopies())return null==t?void 0:t.wrap();const n=new e.W(t.lng,t.lat);if(t=new e.W(t.lng,t.lat),i){const o=new e.W(t.lng-360,t.lat),n=new e.W(t.lng+360,t.lat),a=r.locationToScreenPoint(t).distSqr(i);r.locationToScreenPoint(o).distSqr(i)180;){const e=r.locationToScreenPoint(t);if(e.x>=0&&e.y>=0&&e.x<=r.width&&e.y<=r.height)break;t.lng>r.center.lng?t.lng-=360:t.lng+=360}return t.lng!==n.lng&&r.isPointOnMapSurface(r.locationToScreenPoint(t))?t:n}function ke(t,e,i){const r=t.classList;for(const t in wa)r.remove(`maplibregl-${i}-anchor-${t}`);r.add(`maplibregl-${i}-anchor-${e}`)}function Me(t,e,i){const r=(null==i?void 0:i.maxWidth)||100,o=t._container.clientHeight/2,n=t._container.clientWidth/2,a=t.unproject([n-r/2,o]),s=t.unproject([n+r/2,o]),l=Math.round(t.project(s).x-t.project(a).x),c=Math.min(r,l,t._container.clientWidth),u=a.distanceTo(s);if("imperial"===(null==i?void 0:i.unit)){const i=3.2808*u;i>5280?Se(e,c,i/5280,t._getUIString("ScaleControl.Miles")):Se(e,c,i,t._getUIString("ScaleControl.Feet"))}else"nautical"===(null==i?void 0:i.unit)?Se(e,c,u/1852,t._getUIString("ScaleControl.NauticalMiles")):u>=1e3?Se(e,c,u/1e3,t._getUIString("ScaleControl.Kilometers")):Se(e,c,u,t._getUIString("ScaleControl.Meters"))}function Se(t,e,i,r){const o=function(t){const e=Math.pow(10,`${Math.floor(t)}`.length-1);let i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:i>=1?1:function(t){const e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(i),e*i}(i);t.style.width=e*(o/i)+"px",t.innerHTML=`${o} ${r}`}function Pe(t){if(t){if("number"==typeof t){const i=Math.round(Math.abs(t)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,t),"top-left":new e.P(i,i),"top-right":new e.P(-i,i),bottom:new e.P(0,-t),"bottom-left":new e.P(i,-i),"bottom-right":new e.P(-i,-i),left:new e.P(t,0),right:new e.P(-t,0)}}if(t instanceof e.P||Array.isArray(t)){const i=e.P.convert(t);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:e.P.convert(t.center||[0,0]),top:e.P.convert(t.top||[0,0]),"top-left":e.P.convert(t["top-left"]||[0,0]),"top-right":e.P.convert(t["top-right"]||[0,0]),bottom:e.P.convert(t.bottom||[0,0]),"bottom-left":e.P.convert(t["bottom-left"]||[0,0]),"bottom-right":e.P.convert(t["bottom-right"]||[0,0]),left:e.P.convert(t.left||[0,0]),right:e.P.convert(t.right||[0,0])}}return Pe(new e.P(0,0))}var Ae="5.24.0";let Ie,Ce,Ee;const ze={frame(t,i,r,o){const n=o||window,a=n.requestAnimationFrame(t=>{s(),i(t)}),{unsubscribe:s}=e.s(t.signal,"abort",()=>{s(),n.cancelAnimationFrame(a),r(new e.a(t.signal.reason))},!1)},frameAsync(t,e){return new Promise((i,r)=>{this.frame(t,i,r,e)})},getImageData(t,e=0){return this.getImageCanvasContext(t).getImageData(-e,-e,t.width+2*e,t.height+2*e)},getImageCanvasContext(t){const e=window.document.createElement("canvas"),i=e.getContext("2d",{willReadFrequently:!0});if(!i)throw new Error("failed to create canvas 2d context");return e.width=t.width,e.height=t.height,i.drawImage(t,0,0,t.width,t.height),i},resolveURL:t=>(Ie||(Ie=document.createElement("a")),Ie.href=t,Ie.href),hardwareConcurrency:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return void 0!==Ee?Ee:!!matchMedia&&(null!=Ce||(Ce=matchMedia("(prefers-reduced-motion: reduce)")),Ce.matches)},set prefersReducedMotion(t){Ee=t}},De=new class{constructor(){this._frozenAt=null}getCurrentTime(){return null!==this._frozenAt?this._frozenAt:performance.now()}setNow(t){this._frozenAt=t}restoreNow(){this._frozenAt=null}isFrozen(){return null!==this._frozenAt}};var Oe,Le;class Re{static create(t,e,i){const r=window.document.createElement(t);return void 0!==e&&(r.className=e),i&&i.appendChild(r),r}static createNS(t,e){return window.document.createElementNS(t,e)}static disableDrag(){Re.docStyle&&Re.selectProp&&(Re.userSelect=Re.docStyle[Re.selectProp],Re.docStyle[Re.selectProp]="none")}static enableDrag(){Re.docStyle&&Re.selectProp&&(Re.docStyle[Re.selectProp]=Re.userSelect)}static suppressClickInternal(t){t.preventDefault(),t.stopPropagation(),window.removeEventListener("click",Re.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",Re.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",Re.suppressClickInternal,!0)},0)}static getScale(t){const e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}static getPoint(t,i,r){const o=i.boundingClientRect;return new e.P((r.clientX-o.left)/i.x-t.clientLeft,(r.clientY-o.top)/i.y-t.clientTop)}static mousePos(t,e){const i=Re.getScale(t);return Re.getPoint(t,i,e)}static touchPos(t,e){const i=[],r=Re.getScale(t);for(const o of e)i.push(Re.getPoint(t,r,o));return i}static sanitize(t){const e=(new DOMParser).parseFromString(t,"text/html").body||document.createElement("body"),i=e.querySelectorAll("script");for(const t of i)t.remove();return Re.clean(e),e.innerHTML}static isPossiblyDangerous(t,e){const i=e.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(t)||!i.includes("javascript:")&&!i.includes("data:"))||!!t.startsWith("on")||void 0}static clean(t){const e=t.children;for(const t of e)Re.removeAttributes(t),Re.clean(t)}static removeAttributes(t){for(const{name:e,value:i}of t.attributes)Re.isPossiblyDangerous(e,i)&&t.removeAttribute(e)}}Re.docStyle="undefined"!=typeof window&&(null===(Oe=window.document)||void 0===Oe?void 0:Oe.documentElement.style),Re.selectProp=!Re.docStyle||"userSelect"in Re.docStyle?"userSelect":"webkitUserSelect",function(t){let i,r,o,n;t.resetRequestQueue=()=>{i=[],r=0,o=0,n={}},t.addThrottleControl=t=>{const e=o++;return n[e]=t,e},t.removeThrottleControl=t=>{delete n[t],s()},t.getImage=(t,r,o=!0)=>new Promise((n,a)=>{t.headers||(t.headers={}),t.headers.accept="image/webp,*/*",e.e(t,{type:"image"}),i.push({abortController:r,requestParameters:t,supportImageRefresh:o,state:"queued",onError:t=>{a(t)},onSuccess:t=>{n(t)}}),s()});const a=t=>e._(this,void 0,void 0,function*(){t.state="running";const{requestParameters:i,supportImageRefresh:o,onError:n,onSuccess:a,abortController:c}=t,u=!1===o&&!e.i(self)&&!e.g(i.url)&&(!i.headers||Object.keys(i.headers).reduce((t,e)=>t&&"accept"===e,!0));r++;const h=u?l(i,c):e.m(i,c);try{const i=yield h;delete t.abortController,t.state="completed",i.data instanceof HTMLImageElement||e.b(i.data)?a(i):i.data&&a({data:yield(p=i.data,"function"==typeof createImageBitmap?e.h(p):e.j(p)),cacheControl:i.cacheControl,expires:i.expires})}catch(i){delete t.abortController,n(e.d(i))}finally{r--,s()}var p}),s=()=>{const t=(()=>{for(const t of Object.keys(n))if(n[t]())return!0;return!1})()?e.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let e=r;e0;e++){const t=i.shift();t.abortController.signal.aborted?e--:a(t)}},l=(t,i)=>new Promise((r,o)=>{const n=new Image,a=t.url,s=t.credentials;s&&"include"===s?n.crossOrigin="use-credentials":(s&&"same-origin"===s||!e.f(a))&&(n.crossOrigin="anonymous"),i.signal.addEventListener("abort",()=>{n.src="",o(new e.a(i.signal.reason))}),n.fetchPriority="high",n.onload=()=>{n.onerror=n.onload=null,r({data:n})},n.onerror=()=>{n.onerror=n.onload=null,i.signal.aborted||o(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},n.src=a})}(Le||(Le={})),Le.resetRequestQueue();class Fe{constructor(t){this._transformRequestFn=null!=t?t:null}transformRequest(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}}setTransformRequest(t){this._transformRequestFn=t}}class Be extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(const t of Object.keys(this.images))this.removeImage(t);this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(t){if(this.loaded!==t&&(this.loaded=t,t)){for(const{ids:t,promiseResolve:e}of this.requestors)e(this._getImagesForIds(t));this.requestors=[]}}getImage(t){const i=this.images[t];if(i&&!i.data&&i.spriteData){const t=i.spriteData;i.data=new e.R({width:t.width,height:t.height},t.context.getImageData(t.x,t.y,t.width,t.height).data),i.spriteData=null}return i}addImage(t,e){if(this.images[t])throw new Error(`Image id ${t} already exist, use updateImage instead`);this._validate(t,e)&&(this.images[t]=e)}_validate(t,i){let r=!0;const o=i.data||i.spriteData;return this._validateStretch(i.stretchX,null==o?void 0:o.width)||(this.fire(new e.l(new Error(`Image "${t}" has invalid "stretchX" value`))),r=!1),this._validateStretch(i.stretchY,null==o?void 0:o.height)||(this.fire(new e.l(new Error(`Image "${t}" has invalid "stretchY" value`))),r=!1),this._validateContent(i.content,i)||(this.fire(new e.l(new Error(`Image "${t}" has invalid "content" value`))),r=!1),r}_validateStretch(t,e){if(!t)return!0;let i=0;for(const r of t){if(r[0]=t[1]))}updateImage(t,e,i=!0){const r=this.getImage(t);if(i&&(r.data.width!==e.data.width||r.data.height!==e.data.height))throw new Error(`size mismatch between old image (${r.data.width}x${r.data.height}) and new image (${e.data.width}x${e.data.height}).`);e.version=r.version+1,this.images[t]=e,this.updatedImages[t]=!0}removeImage(t){var e;const i=this.images[t];delete this.images[t],delete this.patterns[t],(null===(e=i.userImage)||void 0===e?void 0:e.onRemove)&&i.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(t){return new Promise(e=>{let i=!0;if(!this.isLoaded())for(const e of t)this.images[e]||(i=!1);this.isLoaded()||i?e(this._getImagesForIds(t)):this.requestors.push({ids:t,promiseResolve:e})})}_getImagesForIds(t){var i;const r={};for(const o of t){let t=this.getImage(o);t||(this.fire(new e.n("styleimagemissing",{id:o})),t=this.getImage(o)),t?r[o]={data:t.data.clone(),pixelRatio:t.pixelRatio,sdf:t.sdf,version:t.version,stretchX:t.stretchX,stretchY:t.stretchY,content:t.content,textFitWidth:t.textFitWidth,textFitHeight:t.textFitHeight,hasRenderCallback:Boolean(null===(i=t.userImage)||void 0===i?void 0:i.render)}:e.w(`Image "${o}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return r}getPixelSize(){const{width:t,height:e}=this.atlasImage;return{width:t,height:e}}getPattern(t){const i=this.patterns[t],r=this.getImage(t);if(!r)return null;if(i&&i.position.version===r.version)return i.position;if(i)i.position.version=r.version;else{const i={w:r.data.width+2,h:r.data.height+2,x:0,y:0},o=new e.I(i,r);this.patterns[t]={bin:i,position:o}}return this._updatePatternAtlas(),this.patterns[t].position}bind(t){const i=t.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.T(t,this.atlasImage,i.RGBA),this.atlasTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)}_updatePatternAtlas(){const t=[];for(const e in this.patterns)t.push(this.patterns[e].bin);const{w:i,h:r}=e.p(t),o=this.atlasImage;o.resize({width:i||1,height:r||1});for(const t in this.patterns){const{bin:i}=this.patterns[t],r=i.x+1,n=i.y+1,a=this.getImage(t).data,s=a.width,l=a.height;e.R.copy(a,o,{x:0,y:0},{x:r,y:n},{width:s,height:l}),e.R.copy(a,o,{x:0,y:l-1},{x:r,y:n-1},{width:s,height:1}),e.R.copy(a,o,{x:0,y:0},{x:r,y:n+l},{width:s,height:1}),e.R.copy(a,o,{x:s-1,y:0},{x:r-1,y:n},{width:1,height:l}),e.R.copy(a,o,{x:0,y:0},{x:r+s,y:n},{width:1,height:l})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(t){for(const i of t){if(this.callbackDispatchedThisFrame[i])continue;this.callbackDispatchedThisFrame[i]=!0;const t=this.getImage(i);t||e.w(`Image with ID: "${i}" was not found`),a(t)&&this.updateImage(i,t)}}cloneImages(){const t={};for(const e in this.images){const i=this.images[e];t[e]=Object.assign(Object.assign({},i),{data:i.data?i.data.clone():null})}return t}}const je=1e20,Ve=new Float64Array(256);for(let t=0;t<256;t++){const e=.5-Math.pow(t/255,1/2.2);Ve[t]=e*Math.abs(e)}Ve[255]=-je;const Ne=e.v.layout_symbol["text-font"].default.join(",");class Ue{constructor(t,e,i){this.requestManager=t,this.localIdeographFontFamily=e,this.entries={},this.lang=i}setURL(t){this.url=t}getGlyphs(t){return e._(this,void 0,void 0,function*(){const e=[];for(const i in t)for(const r of t[i])e.push(this._getAndCacheGlyphsPromise(i,r));const i=yield Promise.all(e),r={};for(const{stack:t,id:e,glyph:o}of i)r[t]||(r[t]={}),r[t][e]=o&&{id:o.id,bitmap:o.bitmap.clone(),metrics:o.metrics};return r})}_getAndCacheGlyphsPromise(t,i){return e._(this,void 0,void 0,function*(){var e,r;null!==(e=(r=this.entries)[t])&&void 0!==e||(r[t]={glyphs:{},requests:{},ranges:{}});const o=this.entries[t];let n=o.glyphs[i];return void 0!==n?{stack:t,id:i,glyph:n}:!this.url||this._charUsesLocalIdeographFontFamily(i)?(n=o.glyphs[i]=this._drawGlyph(o,t,i),{stack:t,id:i,glyph:n}):yield this._downloadAndCacheRangePromise(t,i)})}_downloadAndCacheRangePromise(t,i){return e._(this,void 0,void 0,function*(){var r;const o=this.entries[t],n=Math.floor(i/256);if(o.ranges[n])return{stack:t,id:i,glyph:null};(r=o.requests)[n]||(r[n]=Ue.loadGlyphRange(t,n,this.url,this.requestManager));try{const e=yield o.requests[n];for(const t in e)o.glyphs[+t]=e[+t];return o.ranges[n]=!0,{stack:t,id:i,glyph:e[i]||null}}catch(r){const a=o.glyphs[i]=this._drawGlyph(o,t,i);return this._warnOnMissingGlyphRange(a,n,i,e.d(r)),{stack:t,id:i,glyph:a}}})}_warnOnMissingGlyphRange(t,i,r,o){const n=256*i,a=n+255,s=r.toString(16).padStart(4,"0").toUpperCase();e.w(`Unable to load glyph range ${i}, ${n}-${a}. Rendering codepoint U+${s} locally instead. ${o}`)}_charUsesLocalIdeographFontFamily(t){return!!this.localIdeographFontFamily&&e.r(t)}_drawGlyph(t,i,r){const o=i===Ne&&""!==this.localIdeographFontFamily&&this._charUsesLocalIdeographFontFamily(r),n=o?"ideographTinySDF":"tinySDF";t[n]||(t[n]=this._createTinySDF(o?this.localIdeographFontFamily:i));const a=t[n].draw(String.fromCodePoint(r)),s=/^\p{gc=Cf}+$/u.test(String.fromCodePoint(r));return{id:r,bitmap:new e.t({width:a.width||60,height:a.height||60},a.data),metrics:{width:s?0:a.glyphWidth/2||24,height:a.glyphHeight/2||24,left:a.glyphLeft/2+.5||0,top:a.glyphTop/2-27.5||-8,advance:s?0:a.glyphAdvance/2||24,isDoubleResolution:!0}}}_createTinySDF(t){const e=t?t.split(","):[];e.push("sans-serif");const i=e.map(t=>/[-\w]+/.test(t)?t:`'${CSS.escape(t)}'`).join(",");return new Ue.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:i,fontWeight:this._fontWeight(e[0]),fontStyle:this._fontStyle(e[0]),lang:this.lang})}_fontStyle(t){return/italic/i.test(t)?"italic":/oblique/i.test(t)?"oblique":"normal"}_fontWeight(t){const e={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950};let i;for(const[r,o]of Object.entries(e))new RegExp(`\\b${r}\\b`,"i").test(t)&&(i=`${o}`);return i}destroy(){for(const t in this.entries){const e=this.entries[t];e.tinySDF=null,e.ideographTinySDF=null,e.glyphs={},e.requests={},e.ranges={}}this.entries={}}}Ue.loadGlyphRange=function(t,i,r,o){return e._(this,void 0,void 0,function*(){const n=256*i,a=n+255,s=yield o.transformRequest(r.replace("{fontstack}",t).replace("{range}",`${n}-${a}`),"Glyphs"),l=yield e.o(s,new AbortController);if(!(null==l?void 0:l.data))throw new Error(`Could not load glyph range. range: ${i}, ${n}-${a}`);const c={};for(const t of e.q(l.data))c[t.id]=t;return c})},Ue.TinySDF=class{constructor({fontSize:t=24,buffer:e=3,radius:i=8,cutoff:r=.25,fontFamily:o="sans-serif",fontWeight:n="normal",fontStyle:a="normal",lang:s=null}={}){this.buffer=e,this.radius=i,this.cutoff=r,this.lang=s;const l=this.size=t+4*e,c=this._createCanvas(l),u=this.ctx=c.getContext("2d",{willReadFrequently:!0});u.font=`${a} ${n} ${t}px ${o}`,u.textBaseline="alphabetic",u.textAlign="left",u.fillStyle="black",this.gridOuter=new Float64Array(l*l),this.gridInner=new Float64Array(l*l),this.f=new Float64Array(l),this.z=new Float64Array(l+1),this.v=new Uint16Array(l)}_createCanvas(t){if("undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(t,t);const e=document.createElement("canvas");return e.width=e.height=t,e}draw(t){const{width:e,actualBoundingBoxAscent:i,actualBoundingBoxDescent:r,actualBoundingBoxLeft:o,actualBoundingBoxRight:n}=this.ctx.measureText(t),a=Math.ceil(i),l=Math.floor(o),c=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(n)-l)),u=Math.max(0,Math.min(this.size-this.buffer,a+Math.ceil(r))),h=c+2*this.buffer,p=u+2*this.buffer,d=Math.max(h*p,0),m=new Uint8ClampedArray(d),f={data:m,width:h,height:p,glyphWidth:c,glyphHeight:u,glyphTop:a,glyphLeft:l,glyphAdvance:e};if(0===c||0===u)return f;const{ctx:_,buffer:g,gridInner:y,gridOuter:v}=this;this.lang&&(_.lang=this.lang),_.clearRect(g,g,c,u),_.fillText(t,g-l,g+a);const b=_.getImageData(g,g,c,u);v.fill(je,0,d),y.fill(0,0,d);let x=3;for(let t=0;t1&&(a=t[++n]);const l=Math.abs(s-a.left),c=Math.abs(s-a.right),u=Math.min(l,c);let h;const p=e/i*(r+1);if(a.isDash){const t=r-Math.abs(p);h=Math.sqrt(u*u+t*t)}else h=r-Math.sqrt(u*u+p*p);this.data[o+s]=Math.max(0,Math.min(255,h+128))}}}addRegularDash(t){for(let e=t.length-1;e>=0;--e){const i=t[e],r=t[e+1];i.zeroLength?t.splice(e,1):r&&r.isDash===i.isDash&&(r.left=i.left,t.splice(e,1))}const e=t[0],i=t[t.length-1];e.isDash===i.isDash&&(e.left=i.left-this.width,i.right=e.right+this.width);const r=this.width*this.nextRow;let o=0,n=t[o];for(let e=0;e1&&(n=t[++o]);const i=Math.abs(e-n.left),a=Math.abs(e-n.right),s=Math.min(i,a);this.data[r+e]=Math.max(0,Math.min(255,(n.isDash?s:-s)+128))}}addDash(t,i){const r=i?7:0,o=2*r+1;if(this.nextRow+o>this.height)return e.w("LineAtlas out of space"),null;let n=0;for(const e of t)n+=e;if(0!==n){const e=this.width/n,o=this.getDashRanges(t,this.width,e);i?this.addRoundDash(o,e,r):this.addRegularDash(o)}const a={y:this.nextRow+r,height:2*r,width:n};return this.nextRow+=o,this.dirty=!0,a}bind(t){const e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.ALPHA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,this.width,this.height,0,e.ALPHA,e.UNSIGNED_BYTE,this.data))}}const Ye="maplibre_preloaded_worker_pool";class Xe{constructor(){this.active={}}acquire(t){ if(!this.workers)for(this.workers=[];this.workers.lengththis._ne.lng&&(o=this._sw.lng>=i&&i>=this._ne.lng),this._sw.lat<=r&&r<=this._ne.lat&&o}intersects(t){if(!((t=ei.convert(t)).getNorth()>=this.getSouth()&&t.getSouth()<=this.getNorth()))return!1;const i=Math.abs(this.getEast()-this.getWest()),r=Math.abs(t.getEast()-t.getWest());if(i>=360||r>=360)return!0;const o=e.X(this.getWest(),-180,180),n=e.X(this.getEast(),-180,180),a=e.X(t.getWest(),-180,180),s=e.X(t.getEast(),-180,180),l=o>n,c=a>s;return!(!l||!c)||(l?s>=o||a<=n:c?n>=a||o<=s:a<=n&&s>=o)}static convert(t){return t instanceof ei?t:t?new ei(t):t}static fromLngLat(t,i=0){const r=360*i/40075017,o=r/Math.cos(Math.PI/180*t.lat);return new ei(new e.W(t.lng-o,t.lat-r),new e.W(t.lng+o,t.lat+r))}adjustAntiMeridian(){const t=new e.W(this._sw.lng,this._sw.lat),i=new e.W(this._ne.lng,this._ne.lat);return new ei(t,t.lng>i.lng?new e.W(i.lng+360,i.lat):i)}}class ii{constructor(t,e,i){this.bounds=ei.convert(this.validateBounds(t)),this.minzoom=e||0,this.maxzoom=i||24}validateBounds(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]}contains(t){const i=Math.pow(2,t.z),r=Math.floor(e.Z(this.bounds.getWest())*i),o=Math.floor(e.Y(this.bounds.getNorth())*i),n=Math.ceil(e.Z(this.bounds.getEast())*i),a=Math.ceil(e.Y(this.bounds.getSouth())*i);return t.x>=r&&t.x=o&&t.y{this._options.tiles=t}),this}setUrl(t){return this.setSourceProperty(()=>{this.url=t,this._options.url=t}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(t){return e._(this,void 0,void 0,function*(){const e=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),i={request:yield this.map._requestManager.transformRequest(e,"Tile"),uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,tileSize:this.tileSize*t.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(t),etag:t.etag};i.request.collectResourceTiming=this._collectResourceTiming;let r="RT";if(t.actor&&"expired"!==t.state){if("loading"===t.state)return new Promise((e,i)=>{t.reloadPromise={resolve:e,reject:i}})}else t.actor=this.dispatcher.getActor(),r="LT";t.abortController=new AbortController;try{const e=yield t.actor.sendAsync({type:r,data:i},t.abortController);if(delete t.abortController,t.aborted)return;this._afterTileLoadWorkerResponse(t,e);const o={};return(null==e?void 0:e.etagUnmodified)&&(o.unmodified=!0),o}catch(e){if(delete t.abortController,t.aborted)return;if(e&&404!==e.status)throw e;this._afterTileLoadWorkerResponse(t,null)}})}_getOverzoomParameters(t){return e._(this,void 0,void 0,function*(){if(t.tileID.canonical.z<=this.maxzoom)return;if(void 0===this.map._zoomLevelsToOverscale)return;const e=t.tileID.scaledTo(this.maxzoom).canonical,i=e.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:e,overzoomRequest:yield this.map._requestManager.transformRequest(i,"Tile")}})}_afterTileLoadWorkerResponse(t,e){if((null==e?void 0:e.resourceTiming)&&(t.resourceTiming=e.resourceTiming),e&&this.map._refreshExpiredTiles&&t.setExpiryData(e),t.etag=null==e?void 0:e.etag,t.loadVectorData(e,this.map.painter),t.reloadPromise){const e=t.reloadPromise;t.reloadPromise=null,this.loadTile(t).then(e.resolve).catch(e.reject)}}abortTile(t){return e._(this,void 0,void 0,function*(){t.abortController&&(t.abortController.abort(),delete t.abortController),t.actor&&(yield t.actor.sendAsync({type:"AT",data:{uid:t.uid,type:this.type,source:this.id}}))})}unloadTile(t){return e._(this,void 0,void 0,function*(){t.unloadVectorData(),t.actor&&(yield t.actor.sendAsync({type:"RMT",data:{uid:t.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class oi extends e.E{constructor(t,i,r,o){super(),this.id=t,this.dispatcher=r,this.setEventedParent(o),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},i),e.e(this,e.V(i,["url","scheme","tileSize"]))}load(){return e._(this,arguments,void 0,function*(t=!1){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const i=yield f(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,i&&(e.e(this,i),i.bounds&&(this.tileBounds=new ii(i.bounds,this.minzoom,this.maxzoom)),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:t})))}catch(t){this._tileJSONRequest=null,this._loaded=!0,e.$(t)||this.fire(new e.l(e.d(t)))}})}loaded(){return this._loaded}onAdd(t){this.map=t,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(t){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),t(),this.load(!0)}setTiles(t){return this.setSourceProperty(()=>{this._options.tiles=t}),this}setUrl(t){return this.setSourceProperty(()=>{this.url=t,this._options.url=t}),this}serialize(){return e.e({},this._options)}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}loadTile(t){return e._(this,void 0,void 0,function*(){const i=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);t.abortController=new AbortController;try{const r=yield Le.getImage(yield this.map._requestManager.transformRequest(i,"Tile"),t.abortController,this.map._refreshExpiredTiles);if(delete t.abortController,t.aborted)return void(t.state="unloaded");if(null==r?void 0:r.data){this.map._refreshExpiredTiles&&(r.cacheControl||r.expires)&&t.setExpiryData({cacheControl:r.cacheControl,expires:r.expires});const i=this.map.painter.context,o=i.gl,n=r.data;t.texture=this.map.painter.getTileTexture(n.width),t.texture?t.texture.update(n,{useMipmap:!0}):(t.texture=new e.T(i,n,o.RGBA,{useMipmap:!0}),t.texture.bind(o.LINEAR,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST)),t.state="loaded"}}catch(e){if(delete t.abortController,t.aborted)t.state="unloaded";else if(e)throw t.state="errored",e}})}abortTile(t){return e._(this,void 0,void 0,function*(){t.abortController&&(t.abortController.abort(),delete t.abortController)})}unloadTile(t){return e._(this,void 0,void 0,function*(){t.texture&&this.map.painter.saveTileTexture(t.texture)})}hasTransition(){return!1}}class ni extends oi{constructor(t,i,r,o){super(t,i,r,o),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},i),this.encoding=i.encoding||"mapbox",this.redFactor=i.redFactor,this.greenFactor=i.greenFactor,this.blueFactor=i.blueFactor,this.baseShift=i.baseShift}loadTile(t){return e._(this,void 0,void 0,function*(){const i=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),r=yield this.map._requestManager.transformRequest(i,"Tile");t.neighboringTiles=this._getNeighboringTiles(t.tileID),t.abortController=new AbortController;try{const i=yield Le.getImage(r,t.abortController,this.map._refreshExpiredTiles);if(delete t.abortController,t.aborted)return void(t.state="unloaded");if(null==i?void 0:i.data){const r=i.data;this.map._refreshExpiredTiles&&(i.cacheControl||i.expires)&&t.setExpiryData({cacheControl:i.cacheControl,expires:i.expires});const o=e.b(r)&&e.a0()?r:yield this.readImageNow(r),n={type:this.type,uid:t.uid,source:this.id,rawImageData:o,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(t.actor&&"expired"!==t.state&&"reloading"!==t.state)return;t.actor&&"expired"!==t.state||(t.actor=this.dispatcher.getActor()),t.dem=yield t.actor.sendAsync({type:"LDT",data:n}),t.needsHillshadePrepare=!0,t.needsTerrainPrepare=!0,t.state="loaded"}}catch(e){if(delete t.abortController,t.aborted)t.state="unloaded";else if(e)throw t.state="errored",e}})}readImageNow(t){return e._(this,void 0,void 0,function*(){if("undefined"!=typeof VideoFrame&&e.a1()){const i=t.width+2,r=t.height+2;try{return new e.R({width:i,height:r},yield e.a2(t,-1,-1,i,r))}catch(t){}}return ze.getImageData(t,1)})}_getNeighboringTiles(t){const i=t.canonical,r=Math.pow(2,i.z),o=(i.x-1+r)%r,n=0===i.x?t.wrap-1:t.wrap,a=(i.x+1+r)%r,s=i.x+1===r?t.wrap+1:t.wrap,l={};return l[new e.a3(t.overscaledZ,n,i.z,o,i.y).key]={backfilled:!1},l[new e.a3(t.overscaledZ,s,i.z,a,i.y).key]={backfilled:!1},i.y>0&&(l[new e.a3(t.overscaledZ,n,i.z,o,i.y-1).key]={backfilled:!1},l[new e.a3(t.overscaledZ,t.wrap,i.z,i.x,i.y-1).key]={backfilled:!1},l[new e.a3(t.overscaledZ,s,i.z,a,i.y-1).key]={backfilled:!1}),i.y+10||(null===(o=i.addOrUpdateProperties)||void 0===o?void 0:o.length)>0;if(!a&&!s)continue;n.push(e.geometry);const l=Object.assign({},e);if(t.set(i.id,l),a&&(n.push(i.newGeometry),l.geometry=i.newGeometry),s){if(l.properties=i.removeAllProperties?{}:Object.assign({},l.properties||{}),i.removeProperties)for(const t of i.removeProperties)delete l.properties[t];if(i.addOrUpdateProperties)for(const{key:t,value:e}of i.addOrUpdateProperties)l.properties[t]=e}}return n}(this._data.updateable,t,e);return t.removeAll||this._options.cluster?void 0:i}_getShouldReloadTileOptions(t){if(t)return{affectedBounds:t.filter(Boolean).map(t=>x(t))}}shouldReloadTile(t,{affectedBounds:i}){if("loading"===t.state)return!0;if("unloaded"===t.state)return!1;const{buffer:r,extent:o}=this.workerOptions.geojsonVtOptions,n=function({x:t,y:i,z:r},o=0){const n=e.a4((t-o)/Math.pow(2,r)),a=e.a5((i+1+o)/Math.pow(2,r)),s=e.a4((t+1+o)/Math.pow(2,r)),l=e.a5((i-o)/Math.pow(2,r));return new ei([n,a],[s,l])}(t.tileID.canonical,r/o);for(const t of i)if(n.intersects(t))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(t){return e._(this,void 0,void 0,function*(){const e=t.actor?"RT":"LT";t.actor=this.actor;const i={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};t.abortController=new AbortController;const r=yield this.actor.sendAsync({type:e,data:i},t.abortController);delete t.abortController,t.unloadVectorData(),t.aborted||t.loadVectorData(r,this.map.painter,"RT"===e)})}abortTile(t){return e._(this,void 0,void 0,function*(){t.abortController&&(t.abortController.abort(),delete t.abortController),t.aborted=!0})}unloadTile(t){return e._(this,void 0,void 0,function*(){t.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:t.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return e.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class si extends e.E{constructor(t,e,i,r){super(),this.flippedWindingOrder=!1,this.id=t,this.dispatcher=i,this.coordinates=e.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(r),this.options=e}load(t){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const e=yield Le.getImage(yield this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,(null==e?void 0:e.data)&&(this.image=e.data,t&&(this.coordinates=t),this._finishLoading())}catch(t){this._request=null,this._loaded=!0,e.$(t)||this.fire(new e.l(e.d(t)))}})}loaded(){return this._loaded}updateImage(t){return t.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=t.url,this.load(t.coordinates).finally(()=>this.texture=null),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(t){this.map=t,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(t){this.coordinates=t;const i=t.map(e.a7.fromLngLat);var r;return this.tileID=function(t){const i=e.a8.fromPoints(t),r=i.width(),o=i.height(),n=Math.max(r,o),a=Math.max(0,Math.floor(-Math.log(n)/Math.LN2)),s=Math.pow(2,a);return new e.aa(a,Math.floor((i.minX+i.maxX)/2*s),Math.floor((i.minY+i.maxY)/2*s))}(i),this.terrainTileRanges=this._getOverlappingTileRanges(i),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=i.map(t=>this.tileID.getTilePoint(t)._round()),this.flippedWindingOrder=((r=this.tileCoords)[1].x-r[0].x)*(r[2].y-r[0].y)-(r[1].y-r[0].y)*(r[2].x-r[0].x)<0,this.fire(new e.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;const t=this.map.painter.context,i=t.gl;this.texture||(this.texture=new e.T(t,this.image,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let r=!1;for(const t in this.tiles){const e=this.tiles[t];"loaded"!==e.state&&(e.state="loaded",e.texture=this.texture,r=!0)}r&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(t){return e._(this,void 0,void 0,function*(){var e;(null===(e=this.tileID)||void 0===e?void 0:e.equals(t.tileID.canonical))?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={}):t.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(t){const{minX:i,minY:r,maxX:o,maxY:n}=e.a8.fromPoints(t),a={};for(let t=0;t<=e.a9;t++){const e=Math.pow(2,t),s=Math.floor(i*e),l=Math.floor(r*e),c=Math.floor(o*e),u=Math.floor(n*e),h=(s%e+e)%e,p=c%e,d=Math.floor(s/e),m=Math.floor(c/e);a[t]={minWrap:d,maxWrap:m,minTileXWrapped:h,maxTileXWrapped:p,minTileY:l,maxTileY:u}}return a}}class li extends si{constructor(t,e,i,r){super(t,e,i,r),this._onPlayingHandler=()=>{var t;null===(t=this.map)||void 0===t||t.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=e}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;const t=this.options;this.urls=[];for(const e of t.urls)this.urls.push((yield this.map._requestManager.transformRequest(e,"Source")).url);try{const t=yield e.ab(this.urls);if(this._loaded=!0,!t)return;this.video=t,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(t){this.fire(new e.l(e.d(t)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(t){if(this.video){const i=this.video.seekable;ti.end(0)?this.fire(new e.l(new e.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${i.start(0)} and ${i.end(0)}-second mark.`))):this.video.currentTime=t}}getVideo(){return this.video}onAdd(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;const t=this.map.painter.context,i=t.gl;this.texture?this.video.paused||(this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE),i.texSubImage2D(i.TEXTURE_2D,0,0,0,i.RGBA,i.UNSIGNED_BYTE,this.video)):(this.texture=new e.T(t,this.video,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let r=!1;for(const t in this.tiles){const e=this.tiles[t];"loaded"!==e.state&&(e.state="loaded",e.texture=this.texture,r=!0)}r&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class ci extends si{constructor(t,i,r,o){super(t,i,r,o),i.coordinates?Array.isArray(i.coordinates)&&4===i.coordinates.length&&!i.coordinates.some(t=>!Array.isArray(t)||2!==t.length||t.some(t=>"number"!=typeof t))||this.fire(new e.l(new e.ac(`sources.${t}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.l(new e.ac(`sources.${t}`,null,'missing required property "coordinates"'))),i.animate&&"boolean"!=typeof i.animate&&this.fire(new e.l(new e.ac(`sources.${t}`,null,'optional "animate" property must be a boolean value'))),i.canvas?"string"==typeof i.canvas||i.canvas instanceof HTMLCanvasElement||this.fire(new e.l(new e.ac(`sources.${t}`,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 e.l(new e.ac(`sources.${t}`,null,'missing required property "canvas"'))),this.options=i,this.animate=void 0===i.animate||i.animate}load(){return e._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.l(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),this._hasInvalidDimensions())return;if(0===Object.keys(this.tiles).length)return;const i=this.map.painter.context,r=i.gl;this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new e.T(i,this.canvas,r.RGBA,{premultiply:!0}),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let o=!1;for(const t in this.tiles){const e=this.tiles[t];"loaded"!==e.state&&(e.state="loaded",e.texture=this.texture,o=!0)}o&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const t of[this.canvas.width,this.canvas.height])if(isNaN(t)||t<=0)return!0;return!1}}const ui={},hi=t=>{switch(t){case"geojson":return ai;case"image":return si;case"raster":return oi;case"raster-dem":return ni;case"vector":return ri;case"video":return li;case"canvas":return ci}return ui[t]},pi="RTLPluginLoaded";class di extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=u()}_syncState(t){return this.status=t,this.dispatcher.broadcast("SRPS",{pluginStatus:t,pluginURL:this.url}).catch(t=>{throw this.status="error",t})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(t){return e._(this,arguments,void 0,function*(t,e=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=ze.resolveURL(t),!this.url)throw new Error(`requested url ${t} is invalid`);if("unavailable"===this.status){if(!e)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if("requested"===this.status)return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.n(pi))})}lazyLoad(){"unavailable"===this.status?this.status="requested":"deferred"===this.status&&this._requestImport()}}let mi=null;var fi,_i;!function(t){t[t.Base=0]="Base",t[t.Parent=1]="Parent"}(fi||(fi={})),function(t){t[t.Departing=0]="Departing",t[t.Incoming=1]="Incoming"}(_i||(_i={}));class gi{constructor(t,i){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=t,this.uid=e.ad(),this.uses=0,this.tileSize=i,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(t){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(t||!this.holdingForSymbolFade())} setCrossFadeLogic({fadingRole:t,fadingDirection:e,fadingParentID:i,fadeEndTime:r}){this.resetFadeLogic(),this.fadingRole=t,this.fadingDirection=e,this.fadingParentID=i,this.fadeEndTime=r}setSelfFadeLogic(t){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=t}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=r(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}clearTextures(t){this.demTexture&&t.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(t,i,r){if(!0!==(null==t?void 0:t.etagUnmodified))if(this.hasData()&&this.unloadVectorData(),this.state="loaded",t){t.featureIndex&&(this.latestFeatureIndex=t.featureIndex,t.rawTileData?(this.latestRawTileData=t.rawTileData,this.latestEncoding=t.encoding,this.latestFeatureIndex.rawTileData=t.rawTileData,this.latestFeatureIndex.encoding=t.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=t.collisionBoxArray,this.buckets=function(t,e){const i={};if(!e)return i;for(const r of t){const t=r.layerIds.map(t=>e.getLayer(t)).filter(Boolean);if(0!==t.length){r.layers=t,r.stateDependentLayerIds&&(r.stateDependentLayers=r.stateDependentLayerIds.map(e=>t.filter(t=>t.id===e)[0]));for(const e of t)i[e.id]=r}}return i}(t.buckets,null==i?void 0:i.style),this.hasSymbolBuckets=!1;for(const t in this.buckets){const i=this.buckets[t];if(i instanceof e.af){if(this.hasSymbolBuckets=!0,!r)break;i.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const t in this.buckets){const i=this.buckets[t];if(i instanceof e.af&&i.hasRTLText){this.hasRTLText=!0,w().lazyLoad();break}}this.queryPadding=0;for(const t in this.buckets){const e=this.buckets[t];this.queryPadding=Math.max(this.queryPadding,i.style.getLayer(t).queryRadius(e))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage),this.dashPositions=t.dashPositions}else this.collisionBoxArray=new e.ae;else this.state="loaded"}unloadVectorData(){for(const t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(t){return this.buckets[t.id]}upload(t){for(const e in this.buckets){const i=this.buckets[e];i.uploadPending()&&i.upload(t)}const i=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new e.T(t,this.imageAtlas.image,i.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new e.T(t,this.glyphAtlasImage,i.ALPHA),this.glyphAtlasImage=null)}prepare(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)}queryRenderedFeatures(t,e,i,r,o,n,a,s,l,c,u){var h;return(null===(h=this.latestFeatureIndex)||void 0===h?void 0:h.rawTileData)?this.latestFeatureIndex.query({queryGeometry:r,cameraQueryGeometry:o,scale:n,tileSize:this.tileSize,pixelPosMatrix:c,transform:s,params:a,queryPadding:this.queryPadding*l,getElevation:u},t,e,i):{}}querySourceFeatures(t,i){const r=this.latestFeatureIndex;if(!(null==r?void 0:r.rawTileData))return;const o=r.loadVTLayers(),n=(null==i?void 0:i.sourceLayer)?i.sourceLayer:"",a=o[e.ag]||o[n];if(!a)return;const s=e.ah(null==i?void 0:i.filter,null==i?void 0:i.globalState),{z:l,x:c,y:u}=this.tileID.canonical,h={z:l,x:c,y:u};for(let i=0;it)e=!1;else if(i)if(this.expirationTimet.tileID).sort(e.au).map(t=>t.key):Object.keys(this._tiles)}getTileById(t){return this._tiles[t]}setTile(t,e){this._tiles[t]=e}deleteTileById(t){delete this._tiles[t]}getLoadedTile(t){const e=this.getTileById(t.key);return(null==e?void 0:e.hasData())?e:null}isIdRenderable(t,e=!1){var i;return null===(i=this.getTileById(t))||void 0===i?void 0:i.isRenderable(e)}getRenderableIds(t=0,i){const r=[];for(const t of this.getAllIds())this.isIdRenderable(t,i)&&r.push(this.getTileById(t));return i?r.sort((i,r)=>{const o=i.tileID,n=r.tileID,a=new e.P(o.canonical.x,o.canonical.y)._rotate(-t),s=new e.P(n.canonical.x,n.canonical.y)._rotate(-t);return o.overscaledZ-n.overscaledZ||s.y-a.y||s.x-a.x}).map(t=>t.tileID.key):r.map(t=>t.tileID).sort(e.au).map(t=>t.key)}}class Ti extends e.E{constructor(t,i,r){super(),this.id=t,this.dispatcher=r,this.on("data",t=>{this._dataHandler(t)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((t,e,i,r)=>{const o=new(hi(e.type))(t,e,i,r);if(o.id!==t)throw new Error(`Expected Source id to be ${t} instead of ${o.id}`);return o})(t,i,r,this),this._inViewTiles=new wi,this._outOfViewCache=new e.av(0,t=>this._unloadTile(t)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new yi,this._didEmitContent=!1,this._updated=!1}onAdd(t){var e;this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._maxTileCacheZoomLevels=t?t._maxTileCacheZoomLevels:null,(null===(e=this._source)||void 0===e?void 0:e.onAdd)&&this._source.onAdd(t)}onRemove(t){var e;for(const t of this._inViewTiles.getAllTiles())t.unloadVectorData();this.clearTiles(),(null===(e=this._source)||void 0===e?void 0:e.onRemove)&&this._source.onRemove(t),this._inViewTiles=new wi}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;if(!(void 0===this.used&&void 0===this.usedForTerrain||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const t of this._inViewTiles.getAllTiles())if("loaded"!==t.state&&"errored"!==t.state)return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;const t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(t,i,r){return e._(this,void 0,void 0,function*(){try{const e=yield this._source.loadTile(t);this._tileLoaded(t,i,r,e)}catch(i){t.state="errored",404!==i.status?this._source.fire(new e.l(e.d(i),{tile:t})):this.update(this.transform,this.terrain)}})}_unloadTile(t){this._source.unloadTile&&this._source.unloadTile(t)}_abortTile(t){this._source.abortTile&&this._source.abortTile(t),this._source.fire(new e.n("dataabort",{tile:t,coord:t.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(t){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(const e of this._inViewTiles.getAllTiles())e.upload(t),e.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(t){var e;return this._inViewTiles.getRenderableIds(null===(e=this.transform)||void 0===e?void 0:e.bearingInRadians,t)}hasRenderableParent(t){const e=t.overscaledZ-1;if(e>=this._source.minzoom){const i=this.getLoadedTile(t.scaledTo(e));if(i)return this._inViewTiles.isIdRenderable(i.tileID.key)}return!1}reload(t,e){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(const i of this._inViewTiles.getAllIds()){const r=this._inViewTiles.getTileById(i);e&&!this._source.shouldReloadTile(r,e)||(t?this._reloadTile(i,"expired"):"errored"!==r.state&&this._reloadTile(i,"reloading"))}}}_reloadTile(t,i){return e._(this,void 0,void 0,function*(){const e=this._inViewTiles.getTileById(t);e&&("loading"!==e.state&&(e.state=i),yield this._loadTile(e,t,i))})}_tileLoaded(t,i,o,n){t.timeAdded=r(),t.selfFading&&(t.fadeEndTime=t.timeAdded+this._rasterFadeDuration),"expired"===o&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(i,t),(null==n?void 0:n.unmodified)||("raster-dem"===this.getSource().type&&t.dem&&function(t,e){var i,r,o;const n=e.getRenderableIds();for(const a of n){if(!(null===(i=t.neighboringTiles)||void 0===i?void 0:i[a]))continue;const n=e.getTileById(a);t.neighboringTiles[a].backfilled||j(t,n),(null===(o=null===(r=n.neighboringTiles)||void 0===r?void 0:r[t.tileID.key])||void 0===o?void 0:o.backfilled)||j(n,t)}}(t,this._inViewTiles),this._state.initializeTileState(t,this.map?this.map.painter:null),t.aborted||this._source.fire(new e.n("data",{dataType:"source",tile:t,coord:t.tileID})))}getTile(t){return this.getTileByID(t.key)}getTileByID(t){return this._inViewTiles.getTileById(t)}_retainLoadedChildren(t,e){const i=this._getLoadedDescendents(e),r=new Set;for(const o of e){const e=i[o.key];if(!(null==e?void 0:e.length)){r.add(o);continue}const n=o.overscaledZ+Ti.maxOverzooming,a=e.filter(t=>t.tileID.overscaledZ<=n);if(!a.length){r.add(o);continue}const s=Math.min(...a.map(t=>t.tileID.overscaledZ)),l=a.filter(t=>t.tileID.overscaledZ===s).map(t=>t.tileID);for(const e of l)t[e.key]=e;this._areDescendentsComplete(l,s,o.overscaledZ)||r.add(o)}return r}_getLoadedDescendents(t){var e;const i={};for(const r of this._inViewTiles.getAllTiles().filter(t=>t.hasData()))for(const o of t)r.tileID.isChildOf(o)&&(i[e=o.key]||(i[e]=[]),i[o.key].push(r));return i}_areDescendentsComplete(t,e,i){return 1===t.length&&t[0].isOverscaled()?t[0].overscaledZ===e:Math.pow(4,e-i)===t.length}getLoadedTile(t){return this._inViewTiles.getLoadedTile(t)}updateCacheSize(t){const i=Math.ceil(t.width/this._source.tileSize)+1,r=Math.ceil(t.height/this._source.tileSize)+1,o=Math.floor(i*r*(null===this._maxTileCacheZoomLevels?e.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),n="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,o):o;this._outOfViewCache.setMaxSize(n)}handleWrapJump(t){const e=Math.round((t-(void 0===this._prevLng?t:this._prevLng))/360);this._prevLng=t,e&&(this._inViewTiles.handleWrapJump(e),this._resetTileReloadTimers())}update(t,i){if(!this._sourceLoaded||this._paused)return;let o;this.transform=t,this.terrain=i,this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?o=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(t=>new e.a3(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)):(o=D(t,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:"vector"===this._source.type&&void 0!==this.map._zoomLevelsToOverscale?t.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:i,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(o=o.filter(t=>this._source.hasTile(t)))):o=[],this.usedForTerrain&&(o=this._addTerrainIdealTiles(o));const n=0===o.length&&!this._updated&&this._didEmitContent;this._updated=!0,n&&this.fire(new e.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const a=z(t,this._source),s=this._updateRetainedTiles(o,a),l=O(this._source.type);l&&this._rasterFadeDuration>0&&!i&&function(t,i,o,n,a,s,l){const c=r(),u=e.at(i);for(const e of i){const i=t.getTileById(e.key);i.fadingDirection!==_i.Departing&&0!==i.fadeOpacity||i.resetFadeLogic(),L(t,i,o,c,n,a,l)||R(t,i,o,c,s,l)||B(i,u,c,l)||i.resetFadeLogic()}}(this._inViewTiles,o,s,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),l?this._cleanUpRasterTiles(s):this._cleanUpVectorTiles(s)}_cleanUpRasterTiles(t){for(const e of this._inViewTiles.getAllIds())t[e]||this._removeTile(e)}_cleanUpVectorTiles(t){for(const e of this._inViewTiles.getAllIds()){const i=this._inViewTiles.getTileById(e);t[e]?i.clearSymbolFadeHold():i.hasSymbolBuckets?i.holdingForSymbolFade()?i.symbolFadeFinished()&&this._removeTile(e):i.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(e)}}_addTerrainIdealTiles(t){const e=[];for(const i of t)if(i.canonical.z>this._source.minzoom){const t=i.scaledTo(i.canonical.z-1);e.push(t);const r=i.scaledTo(Math.max(this._source.minzoom,Math.min(i.canonical.z,5)));e.push(r)}return t.concat(e)}releaseSymbolFadeTiles(){for(const t of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(t).holdingForSymbolFade()&&this._removeTile(t)}_updateRetainedTiles(t,e){var i;const r=new Set;for(const e of t)this._addTile(e).hasData()||r.add(e);const o=t.reduce((t,e)=>(t[e.key]=e,t),{}),n=this._retainLoadedChildren(o,r),a={},s=Math.max(e-Ti.maxUnderzooming,this._source.minzoom);for(const t of n){let e=this._inViewTiles.getTileById(t.key),r=null==e?void 0:e.wasRequested();for(let n=t.overscaledZ-1;n>=s;--n){const s=t.scaledTo(n);if(a[s.key])break;if(a[s.key]=!0,e=this.getTile(s),!e&&r&&(e=this._addTile(s)),e){const t=e.hasData();if((t||!(null===(i=this.map)||void 0===i?void 0:i.cancelPendingTileRequestsWhileZooming)||r)&&(o[s.key]=s),r=e.wasRequested(),t)break}}}return o}_addTile(t){let i=this._inViewTiles.getTileById(t.key);if(i)return i;i=this._outOfViewCache.getAndRemove(t),i&&(i.resetFadeLogic(),this._setTileReloadTimer(t.key,i),i.tileID=t,this._state.initializeTileState(i,this.map?this.map.painter:null));const r=i;return i||(i=new gi(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(i,t.key,i.state)),i.uses++,this._inViewTiles.setTile(t.key,i),r||this._source.fire(new e.n("dataloading",{tile:i,coord:i.tileID,dataType:"source"})),i}_setTileReloadTimer(t,e){this._clearTileReloadTimer(t);const i=e.getExpiryTimeout();i&&(this._timers[t]=setTimeout(()=>{this._reloadTile(t,"expired"),delete this._timers[t]},i))}_clearTileReloadTimer(t){const e=this._timers[t];e&&(clearTimeout(e),delete this._timers[t])}_resetTileReloadTimers(){for(const t in this._timers)clearTimeout(this._timers[t]),delete this._timers[t];for(const t of this._inViewTiles.getAllIds()){const e=this._inViewTiles.getTileById(t);this._setTileReloadTimer(t,e)}}refreshTiles(t){for(const e of this._inViewTiles.getAllIds()){const i=this._inViewTiles.getTileById(e);(this._inViewTiles.isIdRenderable(e)||"errored"==i.state)&&t.some(t=>t.equals(i.tileID.canonical))&&this._reloadTile(e,"expired")}}_removeTile(t){const e=this._inViewTiles.getTileById(t);e&&(e.uses--,this._inViewTiles.deleteTileById(t),this._clearTileReloadTimer(t),e.uses>0||(e.hasData()&&"reloading"!==e.state?this._outOfViewCache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))}_dataHandler(t){"source"===t.dataType&&("metadata"!==t.sourceDataType?"content"===t.sourceDataType&&this._sourceLoaded&&!this._paused&&(this.reload(t.sourceDataChanged,t.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const t of this._inViewTiles.getAllIds())this._removeTile(t);this._outOfViewCache.reset()}tilesIn(t,i,r){const o=[],n=this.transform;if(!n)return o;const a=n.getCoveringTilesDetailsProvider().allowWorldCopies(),s=r?n.getCameraQueryGeometry(t):t,l=t=>n.screenPointToMercatorCoordinate(t,this.terrain),c=this.transformBbox(t,l,!a),u=this.transformBbox(s,l,!a),h=this.getIds(),p=e.a8.fromPoints(u);for(const t of h){const r=this._inViewTiles.getTileById(t);if(r.holdingForSymbolFade())continue;const s=a?[r.tileID]:[r.tileID.unwrapTo(-1),r.tileID.unwrapTo(0)],l=Math.pow(2,n.zoom-r.tileID.overscaledZ),h=i*r.queryPadding*e.a6/r.tileSize/l;for(const t of s){const i=p.map(i=>t.getTilePoint(new e.a7(i.x,i.y)));if(i.expandBy(h),i.intersects(xi)){const e=c.map(e=>t.getTilePoint(e)),i=u.map(e=>t.getTilePoint(e));o.push({tile:r,tileID:a?t:t.unwrapTo(0),queryGeometry:e,cameraQueryGeometry:i,scale:l})}}}return o}transformBbox(t,i,r){let o=t.map(i);if(r){const r=e.a8.fromPoints(t);r.shrinkBy(.001*Math.min(r.width(),r.height()));const n=r.map(i);e.a8.fromPoints(o).covers(n)||(o=o.map(t=>t.x>.5?new e.a7(t.x-1,t.y,t.z):t))}return o}getVisibleCoordinates(t){const e=this.getRenderableIds(t).map(t=>this._inViewTiles.getTileById(t).tileID);return this.transform&&this.transform.populateCache(e),e}hasTransition(){return!!this._source.hasTransition()||O(this._source.type)&&function(t,e){if(e<=0)return!1;const i=r();for(const e of t.getAllTiles())if(e.fadeEndTime>=i)return!0;return!1}(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(t){this._rasterFadeDuration=t}setFeatureState(t,i,r){t||(t=e.ag),this._state.updateState(t,i,r)}removeFeatureState(t,i,r){t||(t=e.ag),this._state.removeFeatureState(t,i,r)}getFeatureState(t,i){return t||(t=e.ag),this._state.getState(t,i)}setDependencies(t,e,i){const r=this._inViewTiles.getTileById(t);r&&r.setDependencies(e,i)}reloadTilesForDependencies(t,e){for(const i of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(i).hasDependency(t,e)&&this._reloadTile(i,"reloading");this._outOfViewCache.filter(i=>!i.hasDependency(t,e))}areTilesLoaded(){for(const t of this._inViewTiles.getAllTiles())if("loaded"!==t.state&&"errored"!==t.state)return!1;return!0}}Ti.maxUnderzooming=10,Ti.maxOverzooming=3;class ki{constructor(t,e){this.reset(t,e)}reset(t,e){this.points=t||[],this._distances=[0];for(let t=1;t0?(o-a)/s:0;return this.points[n].mult(1-l).add(this.points[i].mult(l))}}class Mi{constructor(t,e,i){const r=this.boxCells=[],o=this.circleCells=[];this.xCellCount=Math.ceil(t/i),this.yCellCount=Math.ceil(e/i);for(let t=0;tthis.width||r<0||e>this.height)return[];const s=[];if(t<=0&&e<=0&&this.width<=i&&this.height<=r){if(o)return[{key:null,x1:t,y1:e,x2:i,y2:r}];for(let t=0;t0}hitTestCircle(t,e,i,r,o){const n=t-i,a=t+i,s=e-i,l=e+i;if(a<0||n>this.width||l<0||s>this.height)return!1;const c=[];return this._forEachCell(n,s,a,l,this._queryCellCircle,c,{hitTest:!0,overlapMode:r,circle:{x:t,y:e,radius:i},seenUids:{box:{},circle:{}}},o),c.length>0}_queryCell(t,e,i,r,o,n,a,s){const{seenUids:l,hitTest:c,overlapMode:u}=a,h=this.boxCells[o],p=1e-6;if(null!==h){const o=this.bboxes;for(const a of h)if(!l.box[a]){l.box[a]=!0;const h=4*a,d=this.boxKeys[a];if(t<=o[h+2]+p&&e<=o[h+3]+p&&i>=o[h+0]-p&&r>=o[h+1]-p&&(!s||s(d))&&(!c||!V(u,d.overlapMode))&&(n.push({key:d,x1:o[h],y1:o[h+1],x2:o[h+2],y2:o[h+3]}),c))return!0}}const d=this.circleCells[o];if(null!==d){const o=this.circles;for(const a of d)if(!l.circle[a]){l.circle[a]=!0;const h=3*a,p=this.circleKeys[a];if(this._circleAndRectCollide(o[h],o[h+1],o[h+2],t,e,i,r)&&(!s||s(p))&&(!c||!V(u,p.overlapMode))){const t=o[h],e=o[h+1],i=o[h+2];if(n.push({key:p,x1:t-i,y1:e-i,x2:t+i,y2:e+i}),c)return!0}}}return!1}_queryCellCircle(t,e,i,r,o,n,a,s){const{circle:l,seenUids:c,overlapMode:u}=a,h=this.boxCells[o];if(null!==h){const t=this.bboxes;for(const e of h)if(!c.box[e]){c.box[e]=!0;const i=4*e,r=this.boxKeys[e];if(this._circleAndRectCollide(l.x,l.y,l.radius,t[i+0],t[i+1],t[i+2],t[i+3])&&(!s||s(r))&&!V(u,r.overlapMode))return n.push(!0),!0}}const p=this.circleCells[o];if(null!==p){const t=this.circles;for(const e of p)if(!c.circle[e]){c.circle[e]=!0;const i=3*e,r=this.circleKeys[e];if(this._circlesCollide(t[i],t[i+1],t[i+2],l.x,l.y,l.radius)&&(!s||s(r))&&!V(u,r.overlapMode))return n.push(!0),!0}}}_forEachCell(t,e,i,r,o,n,a,s){const l=this._convertToXCellCoord(t),c=this._convertToYCellCoord(e),u=this._convertToXCellCoord(i),h=this._convertToYCellCoord(r);for(let p=l;p<=u;p++)for(let l=c;l<=h;l++)if(o.call(this,t,e,i,r,this.xCellCount*l+p,n,a,s))return}_convertToXCellCoord(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))}_convertToYCellCoord(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))}_circlesCollide(t,e,i,r,o,n){const a=r-t,s=o-e,l=i+n;return l*l>a*a+s*s}_circleAndRectCollide(t,e,i,r,o,n,a){const s=(n-r)/2,l=Math.abs(t-(r+s));if(l>s+i)return!1;const c=(a-o)/2,u=Math.abs(e-(o+c));if(u>c+i)return!1;if(l<=s||u<=c)return!0;const h=l-s,p=u-c;return h*h+p*p<=i*i}}const Si=e.O(),Pi=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]),Ai=100;class Ii{constructor(t,e=new Mi(t.width+200,t.height+200,25),i=new Mi(t.width+200,t.height+200,25)){this.transform=t,this.grid=e,this.ignoredGrid=i,this.pitchFactor=Math.cos(t.pitch*Math.PI/180)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+Ai,this.screenBottomBoundary=t.height+Ai,this.gridRightBoundary=t.width+200,this.gridBottomBoundary=t.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(t,e,i,r,o,n,a,s,l,c,u,h){const p=this.projectAndGetPerspectiveRatio(t.anchorPointX+s[0],t.anchorPointY+s[1],o,c,h),d=i*p.perspectiveRatio;let m;if(n||a)m=this._projectCollisionBox(t,d,r,o,n,a,s,p,c,u,h);else{const e=p.x+(u?u.x*d:0),i=p.y+(u?u.y*d:0);m={allPointsOccluded:!1,box:[e+t.x1*d,i+t.y1*d,e+t.x2*d,i+t.y2*d]}}const[f,_,g,y]=m.box,v=n?m.allPointsOccluded:p.isOccluded;let b=v;return b||(b=p.perspectiveRatio=1;t--)d.push(a.path[t]);for(let t=1;tt.signedDistanceFromCamera<=0)?[]:t.map(t=>t.point)}let _=[];if(d.length>0){const t=d[0].clone(),i=d[0].clone();for(let e=1;e=r.x&&i.x<=o.x&&t.y>=r.y&&i.y<=o.y?[d]:i.xo.x||i.yo.y?[]:e.aG([d],r.x,r.y,o.x,o.y)}for(const e of _){n.reset(e,.25*i);let r=0;r=n.length<=.5*i?1:Math.ceil(n.paddedLength/m)+1;for(let e=0;e{const r=$(t.x,t.y,i,e.getElevation),o=e.transform.projectTileCoordinates(r.point.x,r.point.y,e.unwrappedTileID,e.getElevation);return o.point.x=(.5*o.point.x+.5)*e.width,o.point.y=(.5*-o.point.y+.5)*e.height,o})}(t,e);return function(t){let e=0,i=0,r=0,o=0;for(let n=0;ni&&(i=o,e=r));return t.slice(e,e+i)}(i)}queryRenderedSymbols(t){if(0===t.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};const i=[],r=new e.a8;for(const o of t){const t=new e.P(o.x+Ai,o.y+Ai);r.extend(t),i.push(t)}const{minX:o,minY:n,maxX:a,maxY:s}=r,l=this.grid.query(o,n,a,s).concat(this.ignoredGrid.query(o,n,a,s)),c={},u={};for(const t of l){const r=t.key;if(void 0===c[r.bucketInstanceId]&&(c[r.bucketInstanceId]={}),c[r.bucketInstanceId][r.featureIndex])continue;const o=[new e.P(t.x1,t.y1),new e.P(t.x2,t.y1),new e.P(t.x2,t.y2),new e.P(t.x1,t.y2)];e.aH(i,o)&&(c[r.bucketInstanceId][r.featureIndex]=!0,void 0===u[r.bucketInstanceId]&&(u[r.bucketInstanceId]=[]),u[r.bucketInstanceId].push(r.featureIndex))}return u}insertCollisionBox(t,e,i,r,o,n){(i?this.ignoredGrid:this.grid).insert({bucketInstanceId:r,featureIndex:o,collisionGroupID:n,overlapMode:e},t[0],t[1],t[2],t[3])}insertCollisionCircles(t,e,i,r,o,n){const a=i?this.ignoredGrid:this.grid,s={bucketInstanceId:r,featureIndex:o,collisionGroupID:n,overlapMode:e};for(let e=0;e=this.screenRightBoundary||rthis.screenBottomBoundary}isInsideGrid(t,e,i,r){return i>=0&&t=0&&ethis.projectAndGetPerspectiveRatio(t.x,t.y,o,c,h));I=t.some(t=>!t.isOccluded),A=t.map(t=>new e.P(t.x,t.y))}else I=!0;return{box:e.aI(A),allPointsOccluded:!I}}}class Ci{constructor(t,e,i,r){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):r&&i?1:0,this.placed=i}isHidden(){return 0===this.opacity&&!this.placed}}class Ei{constructor(t,e,i,r,o){this.text=new Ci(t?t.text:null,e,i,o),this.icon=new Ci(t?t.icon:null,e,r,o)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class zi{constructor(t,e,i){this.text=t,this.icon=e,this.skipFade=i}}class Di{constructor(t,e,i,r,o){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=i,this.bucketIndex=r,this.tileID=o}}class Oi{constructor(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}}get(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){const e=++this.maxGroupID;this.collisionGroups[t]={ID:e,predicate:t=>t.collisionGroupID===e}}return this.collisionGroups[t]}}class Li{constructor(t,e,i,r,o){this.transform=t.clone(),this.terrain=e,this.collisionIndex=new Ii(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=i,this.retainedQueryData={},this.collisionGroups=new Oi(r),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=o,o&&(o.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(t){const e=this.terrain;return e?(i,r)=>e.getElevation(t,i,r):null}getBucketParts(t,i,r,o){const n=r.getBucket(i),a=r.latestFeatureIndex;if(!n||!a||i.id!==n.layerIds[0])return;const s=r.collisionBoxArray,l=n.layers[0].layout,c=n.layers[0].paint,u=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),h=r.tileSize/e.a6,p=r.tileID.toUnwrapped(),d="map"===l.get("text-rotation-alignment"),m=e.aK(r,1,this.transform.zoom),f=e.aL(this.collisionIndex.transform,r,c.get("text-translate"),c.get("text-translate-anchor")),_=e.aL(this.collisionIndex.transform,r,c.get("icon-translate"),c.get("icon-translate-anchor")),g=U(d,this.transform,m);this.retainedQueryData[n.bucketInstanceId]=new Di(n.bucketInstanceId,a,n.sourceLayerIndex,n.index,r.tileID);const y={bucket:n,layout:l,translationText:f,translationIcon:_,unwrappedTileID:p,pitchedLabelPlaneMatrix:g,scale:u,textPixelRatio:h,holdingForFade:r.holdingForSymbolFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:e.aw(n.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(n.sourceID)};if(o)for(const e of n.sortKeyRanges){const{sortKey:i,symbolInstanceStart:r,symbolInstanceEnd:o}=e;t.push({sortKey:i,symbolInstanceStart:r,symbolInstanceEnd:o,parameters:y})}else t.push({symbolInstanceStart:0,symbolInstanceEnd:n.symbolInstances.length,parameters:y})}attemptAnchorPlacement(t,i,r,o,n,a,s,l,c,u,h,p,d,m,f,_,g,y,v,b){var x,w,T;const k=e.aM[t.textAnchor],M=[t.textOffset0,t.textOffset1],S=lt(k,r,o,M,n),P=this.collisionIndex.placeCollisionBox(i,p,l,c,u,s,a,_,h.predicate,v,S,b);if((!y||this.collisionIndex.placeCollisionBox(y,p,l,c,u,s,a,g,h.predicate,v,S,b).placeable)&&P.placeable){let t;if((null===(x=this.prevPlacement)||void 0===x?void 0:x.variableOffsets[d.crossTileID])&&(null===(T=null===(w=this.prevPlacement)||void 0===w?void 0:w.placements[d.crossTileID])||void 0===T?void 0:T.text)&&(t=this.prevPlacement.variableOffsets[d.crossTileID].anchor),0===d.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[d.crossTileID]={textOffset:M,width:r,height:o,anchor:k,textBoxScale:n,prevAnchor:t},this.markUsedJustification(m,k,d,f),m.allowVerticalPlacement&&(this.markUsedOrientation(m,f,d),this.placedOrientations[d.crossTileID]=f),{shift:S,placedGlyphBoxes:P}}}placeLayerBucketPart(t,i,r){const{bucket:o,layout:n,translationText:a,translationIcon:s,unwrappedTileID:l,pitchedLabelPlaneMatrix:c,textPixelRatio:u,holdingForFade:h,collisionBoxArray:p,partiallyEvaluatedTextSize:d,collisionGroup:m}=t.parameters,f=n.get("text-optional"),_=n.get("icon-optional"),g=e.aN(n,"text-overlap","text-allow-overlap"),y="always"===g,v=e.aN(n,"icon-overlap","icon-allow-overlap"),b="always"===v,x="map"===n.get("text-rotation-alignment"),w="map"===n.get("text-pitch-alignment"),T="none"!==n.get("icon-text-fit"),k="viewport-y"===n.get("symbol-z-order"),M=y&&(b||!o.hasIconData()||_),S=b&&(y||!o.hasTextData()||f);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p);const P=this.retainedQueryData[o.bucketInstanceId].tileID,A=this._getTerrainElevationFunc(P),I=this.transform.getFastPathSimpleProjectionMatrix(P),C=(t,p,b)=>{var k,C;if(i[t.crossTileID])return;if(h)return void(this.placements[t.crossTileID]=new zi(!1,!1,!1));let E=!1,z=!1,D=!0,O=null,L={box:null,placeable:!1,offscreen:null,occluded:!1},R={placeable:!1},F=null,B=null,j=null,V=0,N=0,U=0;p.textFeatureIndex?V=p.textFeatureIndex:t.useRuntimeCollisionCircles&&(V=t.featureIndex),p.verticalTextFeatureIndex&&(N=p.verticalTextFeatureIndex);const G=p.textBox;if(G){const i=i=>{let r=e.ax.horizontal;if(o.allowVerticalPlacement&&!i&&this.prevPlacement){const e=this.prevPlacement.placedOrientations[t.crossTileID];e&&(this.placedOrientations[t.crossTileID]=e,r=e,this.markUsedOrientation(o,r,t))}return r},n=(i,r)=>{if(o.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&p.verticalTextBox){for(const t of o.writingModes)if(t===e.ax.vertical?(L=r(),R=L):L=i(),null==L?void 0:L.placeable)break}else L=i()},c=t.textAnchorOffsetStartIndex,h=t.textAnchorOffsetEndIndex;if(h===c){const r=(e,i)=>{const r=this.collisionIndex.placeCollisionBox(e,g,u,P,l,w,x,a,m.predicate,A,void 0,I);return(null==r?void 0:r.placeable)&&(this.markUsedOrientation(o,i,t),this.placedOrientations[t.crossTileID]=i),r};n(()=>r(G,e.ax.horizontal),()=>{const i=p.verticalTextBox;return o.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&i?r(i,e.ax.vertical):{box:null,offscreen:null}}),i(null==L?void 0:L.placeable)}else{let d=e.aM[null===(C=null===(k=this.prevPlacement)||void 0===k?void 0:k.variableOffsets[t.crossTileID])||void 0===C?void 0:C.anchor];const f=(e,i,n)=>{const p=e.x2-e.x1,f=e.y2-e.y1,_=t.textBoxScale,y=T&&"never"===v?i:null;let b=null,k="never"===g?1:2,M="never";d&&k++;for(let i=0;if(G,p.iconBox,e.ax.horizontal),()=>{const i=p.verticalTextBox;return o.allowVerticalPlacement&&!(null==L?void 0:L.placeable)&&t.numVerticalGlyphVertices>0&&i?f(i,p.verticalIconBox,e.ax.vertical):{box:null,occluded:!0,offscreen:null}}),L&&(E=L.placeable,D=L.offscreen);const _=i(null==L?void 0:L.placeable);if(!E&&this.prevPlacement){const e=this.prevPlacement.variableOffsets[t.crossTileID];e&&(this.variableOffsets[t.crossTileID]=e,this.markUsedJustification(o,e.anchor,t,_))}}}if(F=L,E=null==F?void 0:F.placeable,D=null==F?void 0:F.offscreen,t.useRuntimeCollisionCircles&&t.centerJustifiedTextSymbolIndex>=0){const i=o.text.placedSymbolArray.get(t.centerJustifiedTextSymbolIndex),s=e.ay(o.textSizeData,d,i),u=n.get("text-padding");B=this.collisionIndex.placeCollisionCircles(g,i,o.lineVertexArray,o.glyphOffsetArray,s,l,c,r,w,m.predicate,t.collisionCircleDiameter,u,a,A),B.circles.length&&B.collisionDetected&&!r&&e.w("Collisions detected, but collision boxes are not shown"),E=y||B.circles.length>0&&!B.collisionDetected,D&&(D=B.offscreen)}if(p.iconFeatureIndex&&(U=p.iconFeatureIndex),p.iconBox){const t=t=>this.collisionIndex.placeCollisionBox(t,v,u,P,l,w,x,s,m.predicate,A,T&&O?O:void 0,I);R&&R.placeable&&p.verticalIconBox?(j=t(p.verticalIconBox),z=j.placeable):(j=t(p.iconBox),z=j.placeable),D&&(D=j.offscreen)}const Z=f||0===t.numHorizontalGlyphVertices&&0===t.numVerticalGlyphVertices,$=_||0===t.numIconVertices;Z||$?$?Z||z&&(z=E):E=z&&E:z=E=z&&E;const q=z&&j.placeable;if(E&&F.placeable&&this.collisionIndex.insertCollisionBox(F.box,g,n.get("text-ignore-placement"),o.bucketInstanceId,R&&R.placeable&&N?N:V,m.ID),q&&this.collisionIndex.insertCollisionBox(j.box,v,n.get("icon-ignore-placement"),o.bucketInstanceId,U,m.ID),B&&E&&this.collisionIndex.insertCollisionCircles(B.circles,g,n.get("text-ignore-placement"),o.bucketInstanceId,V,m.ID),r&&this.storeCollisionData(o.bucketInstanceId,b,p,F,j,B),0===t.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");if(0===o.bucketInstanceId)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[t.crossTileID]=new zi((E||M)&&!(null==F?void 0:F.occluded),(z||S)&&!(null==j?void 0:j.occluded),D||o.justReloaded),i[t.crossTileID]=!0};if(k){if(0!==t.symbolInstanceStart)throw new Error("bucket.bucketInstanceId should be 0");const e=o.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let t=e.length-1;t>=0;--t){const i=e[t];C(o.symbolInstances.get(i),o.collisionArrays[i],i)}}else for(let e=t.symbolInstanceStart;e=0&&(t.text.placedSymbolArray.get(e).crossTileID=n>=0&&e!==n?0:r.crossTileID)}markUsedOrientation(t,i,r){const o=i===e.ax.horizontal||i===e.ax.horizontalOnly?i:0,n=i===e.ax.vertical?i:0,a=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex];for(const e of a)t.text.placedSymbolArray.get(e).placedOrientation=o;r.verticalPlacedTextSymbolIndex&&(t.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).placedOrientation=n)}commit(t){this.commitTime=t,this.zoomAtLastRecencyCheck=this.transform.zoom;const e=this.prevPlacement;let i=!1;this.prevZoomAdjustment=e?e.zoomAdjustment(this.transform.zoom):0;const r=e?e.symbolFadeChange(t):1,o=e?e.opacities:{},n=e?e.variableOffsets:{},a=e?e.placedOrientations:{};for(const t in this.placements){const e=this.placements[t],n=o[t];n?(this.opacities[t]=new Ei(n,r,e.text,e.icon),i||(i=e.text!==n.text.placed),i||(i=e.icon!==n.icon.placed)):(this.opacities[t]=new Ei(null,r,e.text,e.icon,e.skipFade),i||(i=e.text||e.icon))}for(const t in o){const e=o[t];if(!this.opacities[t]){const o=new Ei(e,r,!1,!1);o.isHidden()||(this.opacities[t]=o,i||(i=e.text.placed),i||(i=e.icon.placed))}}for(const t in n)this.variableOffsets[t]||!this.opacities[t]||this.opacities[t].isHidden()||(this.variableOffsets[t]=n[t]);for(const t in a)this.placedOrientations[t]||!this.opacities[t]||this.opacities[t].isHidden()||(this.placedOrientations[t]=a[t]);if(e&&void 0===e.lastPlacementChangeTime)throw new Error("Last placement time for previous placement is not defined");i?this.lastPlacementChangeTime=t:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=e?e.lastPlacementChangeTime:t)}updateLayerOpacities(t,e){const i={};for(const r of e){const e=r.getBucket(t);e&&r.latestFeatureIndex&&t.id===e.layerIds[0]&&this.updateBucketOpacities(e,r.tileID,i,r.collisionBoxArray)}}updateBucketOpacities(t,i,r,o){t.hasTextData()&&(t.text.opacityVertexArray.clear(),t.text.hasVisibleVertices=!1),t.hasIconData()&&(t.icon.opacityVertexArray.clear(),t.icon.hasVisibleVertices=!1),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexArray.clear(),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexArray.clear();const n=t.layers[0],a=n.layout,s=new Ei(null,0,!1,!1,!0),l=a.get("text-allow-overlap"),c=a.get("icon-allow-overlap"),u=n._unevaluatedLayout.hasValue("text-variable-anchor")||n._unevaluatedLayout.hasValue("text-variable-anchor-offset"),h="map"===a.get("text-rotation-alignment"),p="map"===a.get("text-pitch-alignment"),d="none"!==a.get("icon-text-fit"),m=new Ei(null,0,l&&(c||!t.hasIconData()||a.get("icon-optional")),c&&(l||!t.hasTextData()||a.get("text-optional")),!0);!t.collisionArrays&&o&&(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&t.deserializeCollisionBoxes(o);const f=(t,e,i)=>{for(let r=0;r0,y=this.placedOrientations[o.crossTileID],v=y===e.ax.vertical,b=y===e.ax.horizontal||y===e.ax.horizontalOnly;if(n>0||a>0){const e=ut(c.text);f(t.text,n,v?Gi:e),f(t.text,a,b?Gi:e);const i=c.text.isHidden(),r=[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex];for(const e of r)e>=0&&(t.text.placedSymbolArray.get(e).hidden=i||v?1:0);o.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(o.verticalPlacedTextSymbolIndex).hidden=i||b?1:0);const s=this.variableOffsets[o.crossTileID];s&&this.markUsedJustification(t,s.anchor,o,y);const l=this.placedOrientations[o.crossTileID];l&&(this.markUsedJustification(t,"left",o,l),this.markUsedOrientation(t,l,o))}if(g){const e=ut(c.icon),i=!(d&&o.verticalPlacedIconSymbolIndex&&v);o.placedIconSymbolIndex>=0&&(f(t.icon,o.numIconVertices,i?e:Gi),t.icon.placedSymbolArray.get(o.placedIconSymbolIndex).hidden=c.icon.isHidden()),o.verticalPlacedIconSymbolIndex>=0&&(f(t.icon,o.numVerticalIconVertices,i?Gi:e),t.icon.placedSymbolArray.get(o.verticalPlacedIconSymbolIndex).hidden=c.icon.isHidden())}const x=(null==_?void 0:_.has(i))?_.get(i):{text:null,icon:null};if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){const r=t.collisionArrays[i];if(r){let i=new e.P(0,0);if(r.textBox||r.verticalTextBox){let e=!0;if(u){const t=this.variableOffsets[l];t?(i=lt(t.anchor,t.width,t.height,t.textOffset,t.textBoxScale),h&&i._rotate(p?-this.transform.bearingInRadians:this.transform.bearingInRadians)):e=!1}if(r.textBox||r.verticalTextBox){let o;r.textBox&&(o=v),r.verticalTextBox&&(o=b),ct(t.textCollisionBox.collisionVertexArray,c.text.placed,!e||o,x.text,i.x,i.y)}}if(r.iconBox||r.verticalIconBox){const e=Boolean(!b&&r.verticalIconBox);let o;r.iconBox&&(o=e),r.verticalIconBox&&(o=!e),ct(t.iconCollisionBox.collisionVertexArray,c.icon.placed,o,x.icon,d?i.x:0,d?i.y:0)}}}}if(t.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexBuffer&&t.iconCollisionBox.collisionVertexBuffer.updateData(t.iconCollisionBox.collisionVertexArray),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexBuffer&&t.textCollisionBox.collisionVertexBuffer.updateData(t.textCollisionBox.collisionVertexArray),t.text.opacityVertexArray.length!==t.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${t.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${t.text.layoutVertexArray.length}) / 4`);if(t.icon.opacityVertexArray.length!==t.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${t.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${t.icon.layoutVertexArray.length}) / 4`);t.bucketInstanceId in this.collisionCircleArrays&&(t.collisionCircleArray=this.collisionCircleArrays[t.bucketInstanceId],delete this.collisionCircleArrays[t.bucketInstanceId])}symbolFadeChange(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(t){return Math.max(0,(this.transform.zoom-t)/1.5)}hasTransitions(t){return this.stale||t-this.lastPlacementChangeTimet}setStale(){this.stale=!0}}const Ri=Math.pow(2,25),Fi=Math.pow(2,24),Bi=Math.pow(2,17),ji=Math.pow(2,16),Vi=Math.pow(2,9),Ni=Math.pow(2,8),Ui=Math.pow(2,1),Gi=0;class Zi{constructor(t){this._sortAcrossTiles="viewport-y"!==t.layout.get("symbol-z-order")&&!t.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(t,e,i,r,o){const n=this._bucketParts;for(;this._currentTileIndext.sortKey-e.sortKey));this._currentPartIndex!this._forceFullPlacement&&r()-n>2;for(;this._currentPlacementIndex>=0;){const r=i[t[this._currentPlacementIndex]],n=this.placement.collisionIndex.transform.zoom;if(e.aQ(r)&&r.layout&&(!r.minzoom||r.minzoom<=n)&&(!r.maxzoom||r.maxzoom>n)){if(this._inProgressLayer||(this._inProgressLayer=new Zi(r)),this._inProgressLayer.continuePlacement(o[r.source],this.placement,this._showCollisionBoxes,r,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(t){return this.placement.commit(t),this.placement}}const qi=512/e.a6/2;class Wi{constructor(t,i,r){this.tileID=t,this.bucketInstanceId=r,this._symbolsByKey={};const o=new Map;for(let t=0;t({x:Math.floor(t.anchorX*qi),y:Math.floor(t.anchorY*qi)})),crossTileIDs:i.map(t=>t.crossTileID)};if(r.positions.length>128){const t=new e.aR(r.positions.length,16,Uint16Array);for(const{x:e,y:i}of r.positions)t.add(e,i);t.finish(),delete r.positions,r.index=t}this._symbolsByKey[t]=r}}getScaledCoordinates(t,i){const{x:r,y:o,z:n}=this.tileID.canonical,{x:a,y:s,z:l}=i.canonical,c=qi/Math.pow(2,l-n),u=(s*e.a6+t.anchorY)*c,h=o*e.a6*qi;return{x:Math.floor((a*e.a6+t.anchorX)*c-r*e.a6*qi),y:Math.floor(u-h)}}findMatches(t,e,i){const r=this.tileID.canonical.zt)}}class Hi{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Yi{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(t){const e=Math.round((t-this.lng)/360);if(0!==e)for(const t in this.indexes){const i=this.indexes[t],r={};for(const t in i){const o=i[t];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+e),r[o.tileID.key]=o}this.indexes[t]=r}this.lng=t}addBucket(t,e,i){var r,o,n;if(null===(r=this.indexes[t.overscaledZ])||void 0===r?void 0:r[t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(let t=0;tt.overscaledZ)for(const i in r){const o=r[i];o.tileID.isChildOf(t)&&o.findMatches(e.symbolInstances,t,a)}else{const o=r[t.scaledTo(Number(i)).key];o&&o.findMatches(e.symbolInstances,t,a)}}for(let t=0;t 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\n#else\nreturn 1.0;\n#endif\n}float ele(vec2 pos) {\n#ifdef TERRAIN3D\nvec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\n#else\nreturn 0.0;\n#endif\n}float get_elevation(vec2 pos) {\n#ifdef TERRAIN3D\n#ifdef GLOBE\nif ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}\n#endif\nvec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;\n#else\nreturn 0.0;\n#endif\n}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;"),projectionMercator:ht("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:ht("","#define GLOBE_RADIUS 6371008.8\nuniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos\n);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); \nif (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len\n);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}"),background:ht("uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:ht("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"), circle:ht("in vec3 v_data;in float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) {\n#ifdef GLOBE\nvec3 center_vector=projectToSphere(circle_center);\n#endif\nfloat angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else {\n#ifdef GLOBE\nvec4 projected_center=interpolateProjection(circle_center,center_vector,ele);\n#else\nvec4 projected_center=projectTileWithElevation(circle_center,ele);\n#endif\ncorner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);}\n#ifdef GLOBE\nvec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);\n#else\ngl_Position=projectTileWithElevation(corner_position,ele);\n#endif\n} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),clippingMask:ht(Ki,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:ht("uniform highp float u_intensity;in vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0);\n#ifdef GLOBE\nvec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0);\n#else\ngl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));\n#endif\n}"),heatmapTexture:ht("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:ht("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:ht("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:ht("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else\n{l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0));\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:ht("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:ht(Ki,"in vec2 a_pos;void main() {\n#ifdef GLOBE\ngl_Position=projectTileFor3D(a_pos,0.0);\n#else\ngl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);\n#endif\n}"),fill:ht("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\nfragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_fill_translate;in vec2 a_pos;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=projectTile(a_pos+u_fill_translate,a_pos);}"),fillOutline:ht("in vec2 v_pos;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n}"),fillOutlinePattern:ht("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n}"),fillPattern:ht("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),fillExtrusion:ht("in vec4 v_color;void main() {fragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed;\n#ifdef TERRAIN3D\nin vec2 a_centroid;\n#endif\nout vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;\n#ifdef GLOBE\nvec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);\n#else\ngl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);\n#endif\nfloat colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0);\n#ifdef GLOBE\nmat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);\n#endif\ndirectional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),fillExtrusionPattern:ht("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed;\n#ifdef TERRAIN3D\nin vec2 a_centroid;\n#endif\n#ifdef GLOBE\nout vec3 v_sphere_pos;\n#endif\nout vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;\n#ifdef GLOBE\nvec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);\n#else\ngl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);\n#endif\nvec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),hillshadePrepare:ht("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:ht("uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES];\n#define PI 3.141592653589793\n#define STANDARD 0\n#define COMBINED 1\n#define IGOR 2\n#define MULTIDIRECTIONAL 3\n#define BASIC 4\nfloat get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else\n{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else\n{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:ht("uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"), lineGradient:ht("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nin vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),linePattern:ht("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),lineSDF:ht("uniform lowp float u_device_pixel_ratio;uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define mediump vec4 dasharray_from\n#pragma mapbox: define mediump vec4 dasharray_to\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 dasharray_from\n#pragma mapbox: initialize mediump vec4 dasharray_to\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define mediump vec4 dasharray_from\n#pragma mapbox: define mediump vec4 dasharray_to\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 dasharray_from\n#pragma mapbox: initialize mediump vec4 dasharray_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nfloat u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}"),lineGradientSDF:ht("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define mediump vec4 dasharray_from\n#pragma mapbox: define mediump vec4 dasharray_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 dasharray_from\n#pragma mapbox: initialize mediump vec4 dasharray_to\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nin vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define mediump vec4 dasharray_from\n#pragma mapbox: define mediump vec4 dasharray_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 dasharray_from\n#pragma mapbox: initialize mediump vec4 dasharray_to\nfloat 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;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nfloat u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}"),raster:ht("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0);vec4 color1=texture(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5;\n#ifdef GLOBE\nif (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}\n#endif\nv_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:ht("uniform sampler2D u_texture;in vec2 v_tex;in float v_total_opacity;void main() {fragColor=texture(u_texture,v_tex)*v_total_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_total_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_total_opacity=opacity*max(0.0,min(visibility,fade_opacity[0]+fade_change));if (v_total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\n#ifdef GLOBE\nif(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\n#endif\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;}"),symbolSDF:ht("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform bool u_is_plain;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat 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 total_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out_text,color_alpha_out_halo;if (u_is_plain){highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);color_alpha_out_text=total_opacity*alpha*fill_color;}if (u_is_halo) {float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);float inner_edge_halo=inner_edge+gamma_halo*gamma_scale;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(inner_edge_halo-gamma_scaled_halo,inner_edge_halo+gamma_scaled_halo,dist);highp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha_halo= min(smoothstep(halo_edge-gamma_scaled_halo,halo_edge+gamma_scaled_halo,dist),1.0-alpha_halo);color_alpha_out_halo=total_opacity*alpha_halo*halo_color;}if (u_is_plain && u_is_halo) {fragColor=color_alpha_out_text+(1.-color_alpha_out_text.a)*color_alpha_out_halo;} else if (u_is_halo){fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out_text;}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 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/16.0;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\n#ifdef GLOBE\nif(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\n#endif\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,total_opacity);}"), symbolTextAndIcon:ht("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform bool u_is_text;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat total_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;fragColor=texture(u_texture_icon,tex_icon)*total_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\nreturn;}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;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out,color_alpha_out_halo;if (u_is_text) {highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);color_alpha_out=fill_color*(alpha*total_opacity);}if (u_is_halo) {highp float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);lowp float buff_halo=(6.0-halo_width/fontScale)/SDF_PX;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(buff_halo-gamma_scaled_halo,buff_halo+gamma_scaled_halo,dist);color_alpha_out_halo=halo_color*(alpha_halo*total_opacity);}if (u_is_text && u_is_halo) {fragColor=color_alpha_out+(1.-color_alpha_out.a)*color_alpha_out_halo;} else if (u_is_halo) {fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out;}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\n#ifdef GLOBE\nif(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\n#endif\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,total_opacity,is_sdf);}"),terrain:ht("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:ht("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:ht("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:ht("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:ht("#ifdef GL_ES\nprecision highp float;\n#endif\nin vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758\n);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}","in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:ht("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};class Qi{constructor(t,e,i){this.vertexBuffer=t,this.indexBuffer=e,this.segments=i}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var tr=e.aS([{name:"a_pos",type:"Int16",components:2}]);const er="#define PROJECTION_MERCATOR",ir="mercator";class rr{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return ir}get shaderDefine(){return er}get shaderPreludeCode(){return Ji.projectionMercator}get vertexShaderPreludeCode(){return Ji.projectionMercator.vertexSource}get subdivisionGranularity(){return e.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(t){}getMeshFromTileID(t,i,r,o,n){if(this._cachedMesh)return this._cachedMesh;const a=new e.aU;a.emplaceBack(0,0),a.emplaceBack(e.a6,0),a.emplaceBack(0,e.a6),a.emplaceBack(e.a6,e.a6);const s=t.createVertexBuffer(a,tr.members),l=e.aV.simpleSegment(0,0,4,2),c=new e.aW;c.emplaceBack(1,0,2),c.emplaceBack(1,2,3);const u=t.createIndexBuffer(c);return this._cachedMesh=new Qi(s,u,l),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(t){}}class or{constructor(t=0,e=0,i=0,r=0){if(isNaN(t)||t<0||isNaN(e)||e<0||isNaN(i)||i<0||isNaN(r)||r<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=e,this.left=i,this.right=r}interpolate(t,i,r){return null!=i.top&&null!=t.top&&(this.top=e.H.number(t.top,i.top,r)),null!=i.bottom&&null!=t.bottom&&(this.bottom=e.H.number(t.bottom,i.bottom,r)),null!=i.left&&null!=t.left&&(this.left=e.H.number(t.left,i.left,r)),null!=i.right&&null!=t.right&&(this.right=e.H.number(t.right,i.right,r)),this}getCenter(t,i){const r=e.al((this.left+t-this.right)/2,0,t),o=e.al((this.top+i-this.bottom)/2,0,i);return new e.P(r,o)}equals(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right}clone(){return new or(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}class nr{constructor(t,i){var r;this.applyConstrain=(t,e)=>null!==this._constrainOverride?this._constrainOverride(t,e):this._callbacks.defaultConstrain(t,e),this._callbacks=t,this._tileSize=512,this._renderWorldCopies=void 0===(null==i?void 0:i.renderWorldCopies)||!!(null==i?void 0:i.renderWorldCopies),this._minZoom=(null==i?void 0:i.minZoom)||0,this._maxZoom=(null==i?void 0:i.maxZoom)||22,this._minPitch=null==(null==i?void 0:i.minPitch)?0:null==i?void 0:i.minPitch,this._maxPitch=null==(null==i?void 0:i.maxPitch)?60:null==i?void 0:i.maxPitch,this._constrainOverride=null!==(r=null==i?void 0:i.constrainOverride)&&void 0!==r?r:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new e.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=dt(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new or,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(t,i,r){this._constrainOverride=t.constrainOverride,this._latRange=t.latRange,this._lngRange=t.lngRange,this._width=t.width,this._height=t.height,this._center=t.center,this._elevation=t.elevation,this._minElevationForCurrentTile=t.minElevationForCurrentTile,this._zoom=t.zoom,this._tileZoom=dt(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=t.bearingInRadians,this._fovInRadians=t.fovInRadians,this._pitchInRadians=t.pitchInRadians,this._rollInRadians=t.rollInRadians,this._unmodified=t.unmodified,this._edgeInsets=new or(t.padding.top,t.padding.bottom,t.padding.left,t.padding.right),this._minZoom=t.minZoom,this._maxZoom=t.maxZoom,this._minPitch=t.minPitch,this._maxPitch=t.maxPitch,this._renderWorldCopies=t.renderWorldCopies,this._cameraToCenterDistance=t.cameraToCenterDistance,this._nearZ=t.nearZ,this._farZ=t.farZ,this._autoCalculateNearFarZ=!r&&t.autoCalculateNearFarZ,i&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(t){this._minElevationForCurrentTile=t}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(t){this._minZoom!==t&&(this._minZoom=t,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(t){this._maxZoom!==t&&(this._maxZoom=t,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(t){this._minPitch!==t&&(this._minPitch=t,this.setPitch(Math.max(this.pitch,t)))}get maxPitch(){return this._maxPitch}setMaxPitch(t){this._maxPitch!==t&&(this._maxPitch=t,this.setPitch(Math.min(this.pitch,t)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t}get constrainOverride(){return this._constrainOverride}setConstrainOverride(t){void 0===t&&(t=null),this._constrainOverride!==t&&(this._constrainOverride=t,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(t){const r=e.X(t,-180,180)*Math.PI/180;var o,n,a,s,l,c,u,h,p;this._bearingInRadians!==r&&(this._unmodified=!1,this._bearingInRadians=r,this._calcMatrices(),this._rotationMatrix=i(),o=this._rotationMatrix,a=-this._bearingInRadians,s=(n=this._rotationMatrix)[0],l=n[1],c=n[2],u=n[3],h=Math.sin(a),p=Math.cos(a),o[0]=s*p+c*h,o[1]=l*p+u*h,o[2]=s*-h+c*p,o[3]=l*-h+u*p)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(t){const i=e.al(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==i&&(this._unmodified=!1,this._pitchInRadians=i,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(t){const e=t/180*Math.PI;this._rollInRadians!==e&&(this._unmodified=!1,this._rollInRadians=e,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return e.aX(this._fovInRadians)}setFov(t){t=e.al(t,.1,150),this.fov!==t&&(this._unmodified=!1,this._fovInRadians=e.an(t),this._calcMatrices())}get zoom(){return this._zoom}setZoom(t){const i=this.applyConstrain(this._center,t).zoom;this._zoom!==i&&(this._unmodified=!1,this._zoom=i,this._tileZoom=Math.max(0,Math.floor(i)),this._scale=e.ao(i),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(t){t!==this._elevation&&(this._elevation=t,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(t,e){this._autoCalculateNearFarZ=!1,this._nearZ=t,this._farZ=e,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(t){return this._edgeInsets.equals(t)}interpolatePadding(t,e,i){this._unmodified=!1,this._edgeInsets.interpolate(t,e,i),this.constrainInternal(),this._calcMatrices()}resize(t,e,i=!0){this._width=t,this._height=e,i&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var t,e;return 2!==(null===(t=this._latRange)||void 0===t?void 0:t.length)||2!==(null===(e=this._lngRange)||void 0===e?void 0:e.length)?null:new ei([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(t){t?(this._lngRange=[t.getWest(),t.getEast()],this._latRange=[t.getSouth(),t.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-e.am,e.am])}getCameraQueryGeometry(t,i){if(1===i.length)return[i[0],t];{const{minX:r,minY:o,maxX:n,maxY:a}=e.a8.fromPoints(i).extend(t);return[new e.P(r,o),new e.P(n,o),new e.P(n,a),new e.P(r,a),new e.P(r,o)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;const t=this._unmodified,{center:e,zoom:i}=this.applyConstrain(this.center,this.zoom);this.setCenter(e),this.setZoom(i),this._unmodified=t,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let t=e.ap(new Float64Array(16));e.S(t,t,[this._width/2,-this._height/2,1]),e.Q(t,t,[1,-1,0]),this._clipSpaceToPixelsMatrix=t,t=e.ap(new Float64Array(16)),e.S(t,t,[1,-1,1]),e.Q(t,t,[-1,-1,0]),e.S(t,t,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=t,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(t,i,r,o){const n=void 0!==r?r:this.bearing,a=o=void 0!==o?o:this.pitch,{distanceToCenter:s,clampedElevation:l}=this._distanceToCenterFromAltElevationPitch(i,this.elevation,a),{x:c,y:u}=A(a,n),h=e.a7.fromLngLat(t,i);let p,d,m=e.aY(1,h.y),f=0;do{if(f+=1,f>10)break;d=s/m,p=new e.a7(h.x+c*d,h.y+u*d),m=1/p.meterInMercatorCoordinateUnits()}while(Math.abs(s-d*m)>1e-12);return{center:p.toLngLat(),elevation:l,zoom:e.ar(this.height/2/Math.tan(this.fovInRadians/2)/d/this.tileSize)}}recalculateZoomAndCenter(t){if(this.elevation-t==0)return;const i=1/this.worldSize,r=e.aq(1,this.center.lat)*this.worldSize,o=e.a7.fromLngLat(this.center,this.elevation),n=o.x/i,a=o.y/i,s=o.z/i,l=this.pitch,c=this.bearing,{x:u,y:h,z:p}=A(l,c),d=this.cameraToCenterDistance,m=n+d*-u,f=a+d*-h,_=s+d*p,{distanceToCenter:g,clampedElevation:y}=this._distanceToCenterFromAltElevationPitch(_/r,t,l),v=g*r,b=new e.a7((m+u*v)*i,(f+h*v)*i,0).toLngLat(),x=e.aq(1,b.lat),w=e.ar(this.height/2/Math.tan(this.fovInRadians/2)/g/x/this.tileSize);this._elevation=y,this._center=b,this.setZoom(w)}_distanceToCenterFromAltElevationPitch(t,i,r){const o=-Math.cos(e.an(r)),n=t-i;let a,s=i;return o*n>=0||Math.abs(o)<.1?(a=1e4,s=t+a*o):a=-n/o,{distanceToCenter:a,clampedElevation:s}}getCameraPoint(){const t=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(t*Math.sin(this.rollInRadians),t*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){const t=e.aq(1,this.center.lat)*this.worldSize;return P(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/t).toLngLat()}getMercatorTileCoordinates(t){if(!t)return[0,0,1,1];const i=t.canonical.z>=0?1<this.max[0]||t.aabb.min[1]>this.max[1]||t.aabb.min[2]>this.max[2]||t.aabb.max[0]0?(e+=t[r]*this.min[r],i+=t[r]*this.max[r]):(i+=t[r]*this.min[r],e+=t[r]*this.max[r]);return e>=0?2:i<0?0:1}}class sr{distanceToTile2d(t,e,i,r){const o=r,n=o.distanceX([t,e]),a=o.distanceY([t,e]);return Math.hypot(n,a)}getWrap(t,e,i){return i}getTileBoundingVolume(t,i,r,o){var n,a;let s=0,l=0;if(null==o?void 0:o.terrain){const c=new e.a3(t.z,i,t.z,t.x,t.y),u=o.terrain.getMinMaxElevation(c);s=null!==(n=u.minElevation)&&void 0!==n?n:Math.min(0,r),l=null!==(a=u.maxElevation)&&void 0!==a?a:Math.max(0,r)}const c=1<o}allowWorldCopies(){return!0}prepareNextFrame(){}}class lr{constructor(t,e,i){this.points=t,this.planes=e,this.aabb=i}static fromInvProjectionMatrix(t,i=1,r=0,o,n){const a=n?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],s=Math.pow(2,r),l=[[-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(r=>function(t,i,r,o){const n=e.aE([],t,i),a=1/n[3]/r*o;return e.b4(n,n,[a,a,1/n[3],a])}(r,t,i,s));o&&function(t,i,r,o){const n=o?4:0,a=o?0:4;let s=0;const l=[],c=[];for(let i=0;i<4;i++){const r=e.b0([],t[i+a],t[i+n]),o=e.b5(r);e.aZ(r,r,1/o),l.push(o),c.push(r)}for(let i=0;i<4;i++){const o=e.b6(t[i+n],c[i],r);s=null!==o&&o>=0?Math.max(s,o):Math.max(s,l[i])}const u=function(t,i){const r=e.b0([],t[i[0]],t[i[1]]),o=e.b0([],t[i[2]],t[i[1]]),n=[0,0,0,0];return e.b1(n,e.b2([],r,o)),n[3]=-e.b3(n,t[i[0]]),n}(t,i),h=function(t,i){const r=e.b7(t),o=e.b8([],t,1/r),n=e.b0([],i,e.aZ([],o,e.b3(i,o))),a=e.b7(n);if(a>0){const t=Math.sqrt(1-o[3]*o[3]),r=e.aZ([],o,-o[3]),s=e.a_([],r,e.aZ([],n,t/a));return e.b9(i,s)}return null}(r,u);if(null!==h){const t=h/e.b3(c[0],u);s=Math.min(s,t)}for(let e=0;e<4;e++){const i=Math.min(s,l[e]);t[e+a]=[t[e+n][0]+c[e][0]*i,t[e+n][1]+c[e][1]*i,t[e+n][2]+c[e][2]*i,1]}}(l,a[0],o,n);const c=a.map(t=>{const i=e.b0([],l[t[0]],l[t[1]]),r=e.b0([],l[t[2]],l[t[1]]),o=e.b1([],e.b2([],i,r)),n=-e.b3(o,l[t[1]]);return o.concat(n)}),u=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],h=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(const t of l)for(let e=0;e<3;e++)u[e]=Math.min(u[e],t[e]),h[e]=Math.max(h[e],t[e]);return new lr(l,c,new ar(u,h))}}class cr{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(t){this._helper.setMinZoom(t)}setMaxZoom(t){this._helper.setMaxZoom(t)}setMinPitch(t){this._helper.setMinPitch(t)}setMaxPitch(t){this._helper.setMaxPitch(t)}setRenderWorldCopies(t){this._helper.setRenderWorldCopies(t)}setBearing(t){this._helper.setBearing(t)}setPitch(t){this._helper.setPitch(t)}setRoll(t){this._helper.setRoll(t)}setFov(t){this._helper.setFov(t)}setZoom(t){this._helper.setZoom(t)}setCenter(t){this._helper.setCenter(t)}setElevation(t){this._helper.setElevation(t)}setMinElevationForCurrentTile(t){this._helper.setMinElevationForCurrentTile(t)}setPadding(t){this._helper.setPadding(t)}interpolatePadding(t,e,i){this._helper.interpolatePadding(t,e,i)}isPaddingEqual(t){return this._helper.isPaddingEqual(t)}resize(t,e,i=!0){this._helper.resize(t,e,i)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(t){this._helper.setMaxBounds(t)}setConstrainOverride(t){this._helper.setConstrainOverride(t)}overrideNearFarZ(t,e){this._helper.overrideNearFarZ(t,e)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(t){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),t)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(t,e){}constructor(t){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(t,i)=>{i=e.al(+i,this.minZoom,this.maxZoom);const r={center:new e.W(t.lng,t.lat),zoom:i};let o=this._helper._lngRange;if(!this._helper._renderWorldCopies&&null===o){const t=180-1e-10;o=[-t,t]}const n=this.tileSize*e.ao(r.zoom);let a=0,s=n,l=0,c=n,u=0,h=0;const{x:p,y:d}=this.size;if(this._helper._latRange){const t=this._helper._latRange;a=e.Y(t[1])*n,s=e.Y(t[0])*n,s-as&&(g=s-t)}if(o){const t=(l+c)/2;let i=m;this._helper._renderWorldCopies&&(i=e.X(m,t-n/2,t+n/2));const r=p/2;i-rc&&(_=c-r)}if(void 0!==_||void 0!==g){const t=new e.P(null!=_?_:m,null!=g?g:f);r.center=k(n,t).wrap()}return r},this.applyConstrain=(t,e)=>this._helper.applyConstrain(t,e),this._helper=new nr({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(t,e)=>this.defaultConstrain(t,e)},t),this._coveringTilesDetailsProvider=new sr}clone(){const t=new cr;return t.apply(this,!1),t}apply(t,e,i){this._helper.apply(t,e,i)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(t){const i=[new e.ba(0,t)];if(this._helper._renderWorldCopies){ const r=this.screenPointToMercatorCoordinate(new e.P(0,0)),o=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,0)),n=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,this._helper._height)),a=this.screenPointToMercatorCoordinate(new e.P(0,this._helper._height)),s=Math.floor(Math.min(r.x,o.x,n.x,a.x)),l=Math.floor(Math.max(r.x,o.x,n.x,a.x)),c=1;for(let r=s-c;r<=l+c;r++)0!==r&&i.push(new e.ba(r,t))}return i}getCameraFrustum(){return lr.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(t){const e=this.screenPointToLocation(this.centerPoint,t),i=t?t.getElevationForLngLatZoom(e,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(i)}setLocationAtPoint(t,i){const r=e.aq(this.elevation,this.center.lat),o=this.screenPointToMercatorCoordinateAtZ(i,r),n=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,r),a=e.a7.fromLngLat(t),s=new e.a7(a.x-(o.x-n.x),a.y-(o.y-n.y));this.setCenter(null==s?void 0:s.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(t,i){return i?this.coordinatePoint(e.a7.fromLngLat(t),i.getElevationForLngLat(t,this),this._pixelMatrix3D):this.coordinatePoint(e.a7.fromLngLat(t))}screenPointToLocation(t,e){var i;return null===(i=this.screenPointToMercatorCoordinate(t,e))||void 0===i?void 0:i.toLngLat()}screenPointToMercatorCoordinate(t,e){if(e){const i=e.pointCoordinate(t);if(null!=i)return i}return this.screenPointToMercatorCoordinateAtZ(t)}screenPointToMercatorCoordinateAtZ(t,i){const r=i||0,o=[t.x,t.y,0,1],n=[t.x,t.y,1,1];e.aE(o,o,this._pixelMatrixInverse),e.aE(n,n,this._pixelMatrixInverse);const a=o[3],s=n[3],l=o[1]/a,c=n[1]/s,u=o[2]/a,h=n[2]/s,p=u===h?0:(r-u)/(h-u);return new e.a7(e.H.number(o[0]/a,n[0]/s,p)/this.worldSize,e.H.number(l,c,p)/this.worldSize,r)}coordinatePoint(t,i=0,r=this._pixelMatrix){const o=[t.x*this.worldSize,t.y*this.worldSize,i,1];return e.aE(o,o,r),new e.P(o[0]/o[3],o[1]/o[3])}getBounds(){const t=Math.max(0,this._helper._height/2-M(this));return(new ei).extend(this.screenPointToLocation(new e.P(0,t))).extend(this.screenPointToLocation(new e.P(this._helper._width,t))).extend(this.screenPointToLocation(new e.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new e.P(0,this._helper._height)))}isPointOnMapSurface(t,e){return e?null!=e.pointCoordinate(t):t.y>this.height/2-M(this)}calculatePosMatrix(t,i=!1,r){var o;const n=null!==(o=t.key)&&void 0!==o?o:e.bb(t.wrap,t.canonical.z,t.canonical.z,t.canonical.x,t.canonical.y),a=i?this._alignedPosMatrixCache:this._posMatrixCache;if(a.has(n)){const t=a.get(n);return r?t.f32:t.f64}const s=S(t,this.worldSize);e.U(s,i?this._alignedProjMatrix:this._viewProjMatrix,s);const l={f64:s,f32:new Float32Array(s)};return a.set(n,l),r?l.f32:l.f64}calculateFogMatrix(t){const i=t.key,r=this._fogMatrixCacheF32;if(r.has(i))return r.get(i);const o=S(t,this.worldSize);return e.U(o,this._fogMatrix,o),r.set(i,new Float32Array(o)),r.get(i)}calculateCenterFromCameraLngLatAlt(t,e,i,r){return this._helper.calculateCenterFromCameraLngLatAlt(t,e,i,r)}_calculateNearFarZIfNeeded(t,i,r){if(!this._helper.autoCalculateNearFarZ)return;const o=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),n=t-o*this._helper._pixelPerMeter/Math.cos(i),a=o<0?n:t,s=Math.PI/2+this.pitchInRadians,l=e.an(this.fov)*(Math.abs(Math.cos(e.an(this.roll)))*this.height+Math.abs(Math.sin(e.an(this.roll)))*this.width)/this.height*(.5+r.y/this.height),c=Math.sin(l)*a/Math.sin(e.al(Math.PI-s-l,.01,Math.PI-.01)),u=M(this),h=Math.atan(u/this._helper.cameraToCenterDistance),p=e.an(.75),d=h>p?2*h*(.5+r.y/(2*u)):p,m=Math.sin(d)*a/Math.sin(e.al(Math.PI-s-d,.01,Math.PI-.01)),f=Math.min(c,m);this._helper._farZ=1.01*(Math.cos(Math.PI/2-i)*f+a),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;const t=this.centerOffset,i=T(this.worldSize,this.center),r=i.x,o=i.y;this._helper._pixelPerMeter=e.aq(1,this.center.lat)*this.worldSize;const n=e.an(Math.min(this.pitch,vi)),a=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(n));let s;var l,c;this._calculateNearFarZIfNeeded(a,n,t),s=new Float64Array(16),e.bc(s,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(l=this._invProjMatrix)[0]=1/(c=s)[0],l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[5]=1/c[5],l[6]=0,l[7]=0,l[8]=0,l[9]=0,l[10]=0,l[11]=1/c[14],l[12]=0,l[13]=0,l[14]=-1,l[15]=c[10]/c[14],s[8]=2*-t.x/this._helper._width,s[9]=2*t.y/this._helper._height,this._projectionMatrix=e.bd(s),e.S(s,s,[1,-1,1]),e.Q(s,s,[0,0,-this._helper.cameraToCenterDistance]),e.be(s,s,-this.rollInRadians),e.bf(s,s,this.pitchInRadians),e.be(s,s,-this.bearingInRadians),e.Q(s,s,[-r,-o,0]),this._mercatorMatrix=e.S([],s,[this.worldSize,this.worldSize,this.worldSize]),e.S(s,s,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,s),e.Q(s,s,[0,0,-this.elevation]),this._viewProjMatrix=s,this._invViewProjMatrix=e.bg([],s);const u=[0,0,-1,1];e.aE(u,u,this._invViewProjMatrix),this._cameraPosition=[u[0]/u[3],u[1]/u[3],u[2]/u[3]],this._fogMatrix=new Float64Array(16),e.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,a,this._helper._farZ),this._fogMatrix[8]=2*-t.x/this.width,this._fogMatrix[9]=2*t.y/this.height,e.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),e.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),e.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),e.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),e.Q(this._fogMatrix,this._fogMatrix,[-r,-o,0]),e.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,s);const h=this._helper._width%2/2,p=this._helper._height%2/2,d=Math.cos(this.bearingInRadians),m=Math.sin(-this.bearingInRadians),f=r-Math.round(r)+d*h+m*p,_=o-Math.round(o)+d*p+m*h,g=new Float64Array(s);if(e.Q(g,g,[f>.5?f-1:f,_>.5?_-1:_,0]),this._alignedProjMatrix=g,s=e.bg(new Float64Array(16),this._pixelMatrix),!s)throw new Error("failed to invert matrix");this._pixelMatrixInverse=s,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;const t=this.screenPointToMercatorCoordinate(new e.P(0,0)),i=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.aE(i,i,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){const t=e.aq(1,this.center.lat)*this.worldSize;return P(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/t).toLngLat()}lngLatToCameraDepth(t,i){const r=e.a7.fromLngLat(t),o=[r.x*this.worldSize,r.y*this.worldSize,i,1];return e.aE(o,o,this._viewProjMatrix),o[2]/o[3]}getProjectionData(t){const{overscaledTileID:i,aligned:r,applyTerrainMatrix:o}=t,n=this._helper.getMercatorTileCoordinates(i),a=i?this.calculatePosMatrix(i,r,!0):null;let s;return s=(null==i?void 0:i.terrainRttPosMatrix32f)&&o?i.terrainRttPosMatrix32f:a||e.bh(),{mainMatrix:s,tileMercatorCoords:n,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:s}}isLocationOccluded(t){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(t,e,i){return 1}transformLightDirection(t){return e.a$(t)}getRayDirectionFromPixel(t){throw new Error("Not implemented.")}projectTileCoordinates(t,i,r,o){const n=this.calculatePosMatrix(r);let a;o?(a=[t,i,o(t,i),1],e.aE(a,a,n)):(a=[t,i,0,1],st(a,a,n));const s=a[3];return{point:new e.P(a[0]/s,a[1]/s),signedDistanceFromCamera:s,isOccluded:!1}}populateCache(t){for(const e of t)this.calculatePosMatrix(e)}getMatrixForModel(t,i){const r=e.a7.fromLngLat(t,i),o=r.meterInMercatorCoordinateUnits(),n=e.bi();return e.Q(n,n,[r.x,r.y,r.z]),e.be(n,n,Math.PI),e.bf(n,n,Math.PI/2),e.S(n,n,[-o,o,o]),n}getProjectionDataForCustomLayer(t=!0){const i=new e.a3(0,0,0,0,0),r=this.getProjectionData({overscaledTileID:i,applyGlobeMatrix:t}),o=S(i,this.worldSize);e.U(o,this._viewProjMatrix,o),r.tileMercatorCoords=[0,0,1,1];const n=[e.a6,e.a6,this.worldSize/this._helper.pixelsPerMeter],a=e.bj();return e.S(a,o,n),r.fallbackMatrix=a,r.mainMatrix=a,r}getFastPathSimpleProjectionMatrix(t){return this.calculatePosMatrix(t)}}class ur{get useGlobeControls(){return!1}handlePanInertia(t,e){const i=t.mag(),r=Math.abs(M(e));return{easingOffset:t.mult(Math.min(.75*r/i,1)),easingCenter:e.center}}handleMapControlsRollPitchBearingZoom(t,e){t.bearingDelta&&e.setBearing(e.bearing+t.bearingDelta),t.pitchDelta&&e.setPitch(e.pitch+t.pitchDelta),t.rollDelta&&e.setRoll(e.roll+t.rollDelta),t.zoomDelta&&e.setZoom(e.zoom+t.zoomDelta)}handleMapControlsPan(t,e,i){t.around.distSqr(e.centerPoint)<.01||e.setLocationAtPoint(i,t.around)}cameraForBoxAndBearing(t,e,i,r,o){return _t(t,e,i,r,o)}handleJumpToCenterZoom(t,i){t.zoom!==(void 0!==i.zoom?+i.zoom:t.zoom)&&t.setZoom(+i.zoom),void 0!==i.center&&t.setCenter(e.W.convert(i.center))}handleEaseTo(t,i){const r=t.zoom,o=t.padding,n={roll:t.roll,pitch:t.pitch,bearing:t.bearing},a={roll:void 0===i.roll?t.roll:i.roll,pitch:void 0===i.pitch?t.pitch:i.pitch,bearing:void 0===i.bearing?t.bearing:i.bearing},s=void 0!==i.zoom,l=!t.isPaddingEqual(i.padding);let c=!1;const u=s?+i.zoom:t.zoom;let h=t.centerPoint.add(i.offsetAsPoint);const p=t.screenPointToLocation(h),{center:d,zoom:m}=t.applyConstrain(e.W.convert(i.center||p),null!=u?u:r);pt(t,d);const f=T(t.worldSize,p),_=T(t.worldSize,d).sub(f),g=e.ao(m-r);return c=m!==r,{easeFunc:s=>{if(c&&t.setZoom(e.H.number(r,m,s)),e.bn(n,a)||ft({startEulerAngles:n,endEulerAngles:a,tr:t,k:s,useSlerp:n.roll!=a.roll}),l&&(t.interpolatePadding(o,i.padding,s),h=t.centerPoint.add(i.offsetAsPoint)),i.around)t.setLocationAtPoint(i.around,i.aroundPoint);else{const i=e.ao(t.zoom-r),o=m>r?Math.min(2,g):Math.max(.5,g),n=Math.pow(o,1-s),a=k(t.worldSize,f.add(_.mult(s*n)).mult(i));t.setLocationAtPoint(t.renderWorldCopies?a.wrap():a,h)}},isZooming:c,elevationCenter:d}}handleFlyTo(t,i){const r=void 0!==i.zoom,o=t.zoom,n=t.applyConstrain(e.W.convert(i.center||i.locationAtOffset),r?+i.zoom:o),a=n.center,s=n.zoom;pt(t,a);const l=T(t.worldSize,i.locationAtOffset),c=T(t.worldSize,a).sub(l),u=c.mag(),h=e.ao(s-o);let p;if(void 0!==i.minZoom){const r=Math.min(+i.minZoom,o,s),n=t.applyConstrain(a,r).zoom;p=e.ao(n-o)}return{easeFunc:(i,r,n,u)=>{t.setZoom(1===i?s:o+e.ar(r));const h=1===i?a:k(t.worldSize,l.add(c.mult(n)).mult(r));t.setLocationAtPoint(t.renderWorldCopies?h.wrap():h,u)},scaleOfZoom:h,targetCenter:a,scaleOfMinZoom:p,pixelPathLength:u}}}class hr{constructor(t,e,i){this.blendFunction=t,this.blendColor=e,this.mask=i}}hr.Replace=[1,0],hr.disabled=new hr(hr.Replace,e.bo.transparent,[!1,!1,!1,!1]),hr.unblended=new hr(hr.Replace,e.bo.transparent,[!0,!0,!0,!0]),hr.alphaBlended=new hr([1,771],e.bo.transparent,[!0,!0,!0,!0]);const pr=2305;class dr{constructor(t,e,i){this.enable=t,this.mode=e,this.frontFace=i}}dr.disabled=new dr(!1,1029,pr),dr.backCCW=new dr(!0,1029,pr),dr.frontCCW=new dr(!0,1028,pr);class mr{constructor(t,e,i){this.func=t,this.mask=e,this.range=i}}mr.ReadOnly=!1,mr.ReadWrite=!0,mr.disabled=new mr(519,mr.ReadOnly,[0,1]);const fr=7680;class _r{constructor(t,e,i,r,o,n){this.test=t,this.ref=e,this.mask=i,this.fail=r,this.depthFail=o,this.pass=n}}_r.disabled=new _r({func:519,mask:0},0,0,fr,fr,fr);class gr{get awaitingQuery(){return!!this._readbackQueue}constructor(t){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=t;const i=t.context,r=i.gl;this._texFormat=r.RGBA,this._texType=r.UNSIGNED_BYTE;const o=new e.aU;o.emplaceBack(-1,-1),o.emplaceBack(2,-1),o.emplaceBack(-1,2);const n=new e.aW;n.emplaceBack(0,1,2),this._fullscreenTriangle=new Qi(i.createVertexBuffer(o,tr.members),i.createIndexBuffer(n),e.aV.simpleSegment(0,0,o.length,n.length)),this._resultBuffer=new Uint8Array(4),i.activeTexture.set(r.TEXTURE1);const a=r.createTexture();r.bindTexture(r.TEXTURE_2D,a),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texImage2D(r.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=i.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(a),gt(r)&&(this._pbo=r.createBuffer(),r.bindBuffer(r.PIXEL_PACK_BUFFER,this._pbo),r.bufferData(r.PIXEL_PACK_BUFFER,4,r.STREAM_READ),r.bindBuffer(r.PIXEL_PACK_BUFFER,null))}destroy(){const t=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),t.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(t,e){const i=this._updateCount;return this._readbackQueue?i>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():i>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(t,e),this._updateCount++,this._measuredError}_bindFramebuffer(){const t=this._cachedRenderContext.context,e=t.gl;t.activeTexture.set(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,this._fbo.colorAttachment.get()),t.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(t,i){const r=this._cachedRenderContext.context,o=r.gl;if(this._bindFramebuffer(),r.viewport.set([0,0,this._texWidth,this._texHeight]),r.clear({color:e.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(r,o.TRIANGLES,mr.disabled,_r.disabled,hr.unblended,dr.disabled,((t,e)=>({u_input:t,u_output_expected:e}))(t,i),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&>(o)){o.bindBuffer(o.PIXEL_PACK_BUFFER,this._pbo),o.readBuffer(o.COLOR_ATTACHMENT0),o.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),o.bindBuffer(o.PIXEL_PACK_BUFFER,null);const t=o.fenceSync(o.SYNC_GPU_COMMANDS_COMPLETE,0);o.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:t}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){const t=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&>(t)){const i=t.clientWaitSync(this._readbackQueue.sync,0,0);if(i===t.WAIT_FAILED)return e.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(i===t.TIMEOUT_EXPIRED)return;t.bindBuffer(t.PIXEL_PACK_BUFFER,this._pbo),t.getBufferSubData(t.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),t.bindBuffer(t.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),t.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=gr._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(t){let e=0;return e+=t[0]/256,e+=t[1]/65536,e+=t[2]/16777216,t[3]<127&&(e=-e),e/128}}const yr=e.a6/128,vr=new e.aT({fill:new e.bs(128,2),line:new e.bs(512,0),tile:new e.bs(128,32),stencil:new e.bs(128,1),circle:3});class br{constructor(){this._tileMeshCache={},this._errorCorrectionUsable=0,this._errorMeasurementLastValue=0,this._errorCorrectionPreviousValue=0,this._errorMeasurementLastChangeTime=-1e3}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return Ji.projectionGlobe}get vertexShaderPreludeCode(){return Ji.projectionMercator.vertexSource}get subdivisionGranularity(){return vr}get useGlobeControls(){return!0}get latitudeErrorCorrectionRadians(){return this._errorCorrectionUsable}destroy(){this._errorMeasurement&&this._errorMeasurement.destroy()}updateGPUdependent(t){this._errorMeasurement||(this._errorMeasurement=new gr(t));const i=e.Y(this._errorQueryLatitudeDegrees),o=2*Math.atan(Math.exp(Math.PI-i*Math.PI*2))-.5*Math.PI,n=this._errorMeasurement.updateErrorLoop(i,o),a=r();n!==this._errorMeasurementLastValue&&(this._errorCorrectionPreviousValue=this._errorCorrectionUsable,this._errorMeasurementLastValue=n,this._errorMeasurementLastChangeTime=a);const s=Math.min(Math.max((a-this._errorMeasurementLastChangeTime)/1e3/.5,0),1);this._errorCorrectionUsable=e.bt(this._errorCorrectionPreviousValue,-this._errorMeasurementLastValue,e.bu(s))}_getMeshKey(t){return`${t.granularity.toString(36)}_${t.generateBorders?"b":""}${t.extendToNorthPole?"n":""}${t.extendToSouthPole?"s":""}`}getMeshFromTileID(t,e,i,r,o){const n=("stencil"===o?vr.stencil:vr.tile).getGranularityForZoomLevel(e.z);return this._getMesh(t,{granularity:n,generateBorders:i,extendToNorthPole:0===e.y&&r,extendToSouthPole:e.y===(1<0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(t){this._mercatorProjection.updateGPUdependent(t),this._verticalPerspectiveProjection.updateGPUdependent(t)}getMeshFromTileID(t,e,i,r,o){return this.currentProjection.getMeshFromTileID(t,e,i,r,o)}setProjection(t){this._transitionable.setValue("type",(null==t?void 0:t.type)||"mercator")}updateTransitions(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(t){this.properties=this._transitioning.possiblyEvaluate(t)}setErrorQueryLatitudeDegrees(t){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(t),this._mercatorProjection.setErrorQueryLatitudeDegrees(t)}}class Tr{constructor(t){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=t}swapBuffers(){if(!this._hadAnyChanges)return;const t=this._cachePrevious;this._cachePrevious=this._cache,this._cache=t,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(t,e,i,r){const o=`${t.z}_${t.x}_${t.y}_${(null==r?void 0:r.terrain)?"t":""}`,n=this._cache.get(o);if(n)return n;const a=this._cachePrevious.get(o);if(a)return this._cache.set(o,a),a;const s=this._boundingVolumeFactory(t,e,i,r);return this._cache.set(o,s),this._hadAnyChanges=!0,s}}class kr{constructor(t,e,i,r){this.min=i,this.max=r,this.points=t,this.planes=e}static fromAabb(t,e){const i=[];for(let r=0;r<8;r++)i.push([1&~r?t[0]:e[0],1==(r>>1&1)?e[1]:t[1],1==(r>>2&1)?e[2]:t[2]]);return new kr(i,[[-1,0,0,e[0]],[1,0,0,-t[0]],[0,-1,0,e[1]],[0,1,0,-t[1]],[0,0,-1,e[2]],[0,0,1,-t[2]]],t,e)}static fromCenterSizeAngles(t,i,r){const o=e.bA([],r[0],r[1],r[2]),n=e.bB([],[i[0],0,0],o),a=e.bB([],[0,i[1],0],o),s=e.bB([],[0,0,i[2]],o),l=[...t],c=[...t];for(let e=0;e<8;e++)for(let i=0;i<3;i++){const r=t[i]+n[i]*(1&~e?-1:1)+a[i]*(1==(e>>1&1)?1:-1)+s[i]*(1==(e>>2&1)?1:-1);l[i]=Math.min(l[i],r),c[i]=Math.max(c[i],r)}const u=[];for(let i=0;i<8;i++){const r=[...t];e.a_(r,r,e.aZ([],n,1&~i?-1:1)),e.a_(r,r,e.aZ([],a,1==(i>>1&1)?1:-1)),e.a_(r,r,e.aZ([],s,1==(i>>2&1)?1:-1)),u.push(r)}return new kr(u,[[...n,-e.b3(n,u[0])],[...a,-e.b3(a,u[0])],[...s,-e.b3(s,u[0])],[-n[0],-n[1],-n[2],-e.b3(n,u[7])],[-a[0],-a[1],-a[2],-e.b3(a,u[7])],[-s[0],-s[1],-s[2],-e.b3(s,u[7])]],l,c)}intersectsFrustum(t){let e=!0;const i=this.points.length,r=this.planes.length,o=t.planes.length,n=t.points.length;for(let r=0;r=0&&n++}if(0===n)return 0;n=0&&r++}if(0===r)return 0}return 1}intersectsPlane(t){const e=this.points.length;let i=0;for(let r=0;r=0&&i++}return i===e?2:0===i?0:1}}class Mr{constructor(){this._boundingVolumeCache=new Tr(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(t,e,i,r){const o=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(t,e,i,r){return this._boundingVolumeCache.getTileBoundingVolume(t,e,i,r)}_computeTileBoundingVolume(t,i,r,o){var n,a;let s=0,l=0;if(null==o?void 0:o.terrain){const c=new e.a3(t.z,i,t.z,t.x,t.y),u=o.terrain.getMinMaxElevation(c);s=null!==(n=u.minElevation)&&void 0!==n?n:Math.min(0,r),l=null!==(a=u.maxElevation)&&void 0!==a?a:Math.max(0,r)}if(s/=e.bD,l/=e.bD,s+=1,l+=1,t.z<=0)return kr.fromAabb([-l,-l,-l],[l,l,l]);if(1===t.z)return kr.fromAabb([0===t.x?-l:0,0===t.y?0:-l,-l],[0===t.x?0:l,0===t.y?l:0,l]);{const i=[bt(0,0,t.x,t.y,t.z),bt(e.a6,0,t.x,t.y,t.z),bt(e.a6,e.a6,t.x,t.y,t.z),bt(0,e.a6,t.x,t.y,t.z)],r=[];for(const t of i)r.push(e.aZ([],t,l));if(l!==s)for(const t of i)r.push(e.aZ([],t,s));0===t.y&&r.push([0,1,0]),t.y===(1<=(1<{const r=e.al(t.lat,-e.am,e.am),o=e.al(+i,this.minZoom+Mt(0,r),this.maxZoom);return{center:new e.W(t.lng,r),zoom:o}},this.applyConstrain=(t,e)=>this._helper.applyConstrain(t,e),this._helper=new nr({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(t,e)=>this.defaultConstrain(t,e)},t),this._coveringTilesDetailsProvider=new Mr}clone(){const t=new Sr;return t.apply(this,!1),t}apply(t,e,i){this._globeLatitudeErrorCorrectionRadians=i||0,this._helper.apply(t,e)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){const t=e.bz();return t[0]=this._cameraPosition[0],t[1]=this._cameraPosition[1],t[2]=this._cameraPosition[2],t}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(t){const{overscaledTileID:e,applyGlobeMatrix:i}=t,r=this._helper.getMercatorTileCoordinates(e);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:r,clippingPlane:this._cachedClippingPlane,projectionTransition:i?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(t){const i=this.pitchInRadians,r=this.cameraToCenterDistance/t,o=Math.sin(i)*r,n=Math.cos(i)*r+1,a=1/Math.sqrt(o*o+n*n)*1;let s=-o,l=n;const c=Math.sqrt(s*s+l*l);s/=c,l/=c;const u=[0,s,l];e.bF(u,u,[0,0,0],-this.bearingInRadians),e.bG(u,u,[0,0,0],-1*this.center.lat*Math.PI/180),e.bH(u,u,[0,0,0],this.center.lng*Math.PI/180);const h=1/e.b5(u);return e.aZ(u,u,h),[...u,-a*h]}isLocationOccluded(t){return!this.isSurfacePointVisible(xt(t))}transformLightDirection(t){const i=this._helper._center.lng*Math.PI/180,r=this._helper._center.lat*Math.PI/180,o=Math.cos(r),n=[Math.sin(i)*o,Math.sin(r),Math.cos(i)*o],a=[n[2],0,-n[0]],s=[0,0,0];e.b2(s,a,n),e.b1(a,a),e.b1(s,s);const l=[0,0,0];return e.b1(l,[a[0]*t[0]+s[0]*t[1]+n[0]*t[2],a[1]*t[0]+s[1]*t[1]+n[1]*t[2],a[2]*t[0]+s[2]*t[1]+n[2]*t[2]]),l}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(t,i,r){const o=function(t,i,r){const o=1/(1<n&&(n=i),rs&&(s=r)}const u=[c.lng+a,c.lat+l,c.lng+n,c.lat+s];return this.isSurfacePointOnScreen([0,1,0])&&(u[3]=90,u[0]=-180,u[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(u[1]=-90,u[0]=-180,u[2]=180),new ei(u)}calculateCenterFromCameraLngLatAlt(t,e,i,r){return this._helper.calculateCenterFromCameraLngLatAlt(t,e,i,r)}setLocationAtPoint(t,i){const r=xt(this.unprojectScreenPoint(i)),o=xt(t),n=e.bz();e.bK(n);const a=e.bz();e.bH(a,r,n,-this.center.lng*Math.PI/180),e.bG(a,a,n,this.center.lat*Math.PI/180);const s=o[0]*o[0]+o[2]*o[2],l=a[0]*a[0];if(s=-g&&m<=g,v=_>=-g&&_<=g;let b,x;if(y&&v){const t=this.center.lng*Math.PI/180,i=this.center.lat*Math.PI/180;e.bM(h,t)+e.bM(m,i)=0}isSurfacePointOnScreen(t){if(!this.isSurfacePointVisible(t))return!1;const i=e.bE();return e.aE(i,[...t,1],this._globeViewProjMatrixNoCorrection),i[0]/=i[3],i[1]/=i[3],i[2]/=i[3],i[0]>-1&&i[0]<1&&i[1]>-1&&i[1]<1&&i[2]>-1&&i[2]<1}rayPlanetIntersection(t,i){const r=e.b3(t,i),o=e.bz(),n=e.bz();e.aZ(n,i,r),e.b0(o,t,n);const a=1-e.b3(o,o);if(a<0)return null;const s=e.b3(t,t)-1,l=-r+(r<0?1:-1)*Math.sqrt(a),c=s/l,u=l;return{tMin:Math.min(c,u),tMax:Math.max(c,u)}}unprojectScreenPoint(t){const i=this._cameraPosition,r=this.getRayDirectionFromPixel(t),o=this.rayPlanetIntersection(i,r);if(o){const t=e.bz();e.a_(t,i,[r[0]*o.tMin,r[1]*o.tMin,r[2]*o.tMin]);const n=e.bz();return e.b1(n,t),Tt(n)}const n=this._cachedClippingPlane,a=n[0]*r[0]+n[1]*r[1]+n[2]*r[2],s=-e.b9(n,i)/a,l=e.bz();if(s>0)e.a_(l,i,[r[0]*s,r[1]*s,r[2]*s]);else{const t=e.bz();e.a_(t,i,[2*r[0],2*r[1],2*r[2]]);const o=e.b9(this._cachedClippingPlane,t);e.b0(l,t,[this._cachedClippingPlane[0]*o,this._cachedClippingPlane[1]*o,this._cachedClippingPlane[2]*o])}const c=function(t){const i=e.bz();return i[0]=t[0]*-t[3],i[1]=t[1]*-t[3],i[2]=t[2]*-t[3],{center:i,radius:Math.sqrt(1-t[3]*t[3])}}(n);return Tt(function(t,i,r){const o=e.bz();e.b0(o,r,t);const n=e.bz();return e.bx(n,t,o,i/e.b7(o)),n}(c.center,c.radius,l))}getMatrixForModel(t,i){const r=e.W.convert(t),o=1/e.bD,n=e.bi();return e.bI(n,n,r.lng/180*Math.PI),e.bf(n,n,-r.lat/180*Math.PI),e.Q(n,n,[0,0,1+i/e.bD]),e.bf(n,n,.5*Math.PI),e.S(n,n,[o,o,o]),n}getProjectionDataForCustomLayer(t=!0){const i=this.getProjectionData({overscaledTileID:new e.a3(0,0,0,0,0),applyGlobeMatrix:t});return i.tileMercatorCoords=[0,0,1,1],i}getFastPathSimpleProjectionMatrix(t){}}class Pr{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(t){this._helper.setMinZoom(t)}setMaxZoom(t){this._helper.setMaxZoom(t)}setMinPitch(t){this._helper.setMinPitch(t)}setMaxPitch(t){this._helper.setMaxPitch(t)}setRenderWorldCopies(t){this._helper.setRenderWorldCopies(t)}setBearing(t){this._helper.setBearing(t)}setPitch(t){this._helper.setPitch(t)}setRoll(t){this._helper.setRoll(t)}setFov(t){this._helper.setFov(t)}setZoom(t){this._helper.setZoom(t)}setCenter(t){this._helper.setCenter(t)}setElevation(t){this._helper.setElevation(t)}setMinElevationForCurrentTile(t){this._helper.setMinElevationForCurrentTile(t)}setPadding(t){this._helper.setPadding(t)}interpolatePadding(t,e,i){this._helper.interpolatePadding(t,e,i)}isPaddingEqual(t){return this._helper.isPaddingEqual(t)}resize(t,e,i=!0){this._helper.resize(t,e,i)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(t){this._helper.setMaxBounds(t)}setConstrainOverride(t){this._helper.setConstrainOverride(t)}overrideNearFarZ(t,e){this._helper.overrideNearFarZ(t,e)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(t){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),t)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(t,e){this._globeness=t,this._globeLatitudeErrorCorrectionRadians=e,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(t){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(t,e)=>this.currentTransform.defaultConstrain(t,e),this.applyConstrain=(t,e)=>this._helper.applyConstrain(t,e),this._helper=new nr({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(t,e)=>this.defaultConstrain(t,e)},t),this._globeness=1,this._mercatorTransform=new cr,this._verticalPerspectiveTransform=new Sr}clone(){const t=new Pr;return t._globeness=this._globeness,t._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,t.apply(this,!1),t}apply(t,e){this._helper.apply(t,e),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(t){const e=this._mercatorTransform.getProjectionData(t),i=this._verticalPerspectiveTransform.getProjectionData(t);return{mainMatrix:this.isGlobeRendering?i.mainMatrix:e.mainMatrix,clippingPlane:i.clippingPlane,tileMercatorCoords:i.tileMercatorCoords,projectionTransition:t.applyGlobeMatrix?this._globeness:0,fallbackMatrix:e.fallbackMatrix}}isLocationOccluded(t){return this.currentTransform.isLocationOccluded(t)}transformLightDirection(t){return this.currentTransform.transformLightDirection(t)}getPixelScale(){return e.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return e.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(t,i,r){const o=this._mercatorTransform.getPitchedTextCorrection(t,i,r),n=this._verticalPerspectiveTransform.getPitchedTextCorrection(t,i,r);return e.bt(o,n,this._globeness)}projectTileCoordinates(t,e,i,r){return this.currentTransform.projectTileCoordinates(t,e,i,r)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(t){return this.currentTransform.calculateFogMatrix(t)}getVisibleUnwrappedCoordinates(t){return this.currentTransform.getVisibleUnwrappedCoordinates(t)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(t){this._mercatorTransform.recalculateZoomAndCenter(t),this._verticalPerspectiveTransform.recalculateZoomAndCenter(t)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(t,e){return this.currentTransform.lngLatToCameraDepth(t,e)}populateCache(t){this._mercatorTransform.populateCache(t),this._verticalPerspectiveTransform.populateCache(t)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(t,e,i,r){return this._helper.calculateCenterFromCameraLngLatAlt(t,e,i,r)}setLocationAtPoint(t,e){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(t,e),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(t,e),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(t,e){return this.currentTransform.locationToScreenPoint(t,e)}screenPointToMercatorCoordinate(t,e){return this.currentTransform.screenPointToMercatorCoordinate(t,e)}screenPointToLocation(t,e){return this.currentTransform.screenPointToLocation(t,e)}isPointOnMapSurface(t,e){return this.currentTransform.isPointOnMapSurface(t,e)}getRayDirectionFromPixel(t){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(t)}getMatrixForModel(t,e){return this.currentTransform.getMatrixForModel(t,e)}getProjectionDataForCustomLayer(t=!0){const e=this._mercatorTransform.getProjectionDataForCustomLayer(t);if(!this.isGlobeRendering)return e;const i=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(t);return i.fallbackMatrix=e.mainMatrix,i}getFastPathSimpleProjectionMatrix(t){return this.currentTransform.getFastPathSimpleProjectionMatrix(t)}}class Ar{get useGlobeControls(){return!0}handlePanInertia(t,i){const r=St(t,i);return Math.abs(r.lng-i.center.lng)>180&&(r.lng=i.center.lng+179.5*Math.sign(r.lng-i.center.lng)),{easingCenter:r,easingOffset:new e.P(0,0)}}handleMapControlsRollPitchBearingZoom(t,i){const r=t.around,o=i.screenPointToLocation(r);t.bearingDelta&&i.setBearing(i.bearing+t.bearingDelta),t.pitchDelta&&i.setPitch(i.pitch+t.pitchDelta),t.rollDelta&&i.setRoll(i.roll+t.rollDelta);const n=i.zoom;t.zoomDelta&&i.setZoom(i.zoom+t.zoomDelta);const a=i.zoom-n;if(0===a)return;const s=e.bJ(i.center.lng,o.lng),l=s/(Math.abs(s/180)+1),c=e.bJ(i.center.lat,o.lat),u=i.getRayDirectionFromPixel(r),h=i.cameraPosition,p=-1*e.b3(h,u),d=e.bz();e.a_(d,h,[u[0]*p,u[1]*p,u[2]*p]);const m=e.b5(d)-1,f=Math.exp(.5*-Math.max(m-.3,0)),_=wt(i.worldSize,i.center.lat)/Math.min(i.width,i.height),g=e.bw(_,.9,.5,1,.25),y=(1-e.ao(-a))*Math.min(f,g),v=i.center.lat,b=i.zoom,x=new e.W(i.center.lng+l*y,e.al(i.center.lat+c*y,-e.am,e.am));i.setLocationAtPoint(o,r);const w=i.center,T=e.bw(Math.abs(s),45,85,0,1),k=e.bw(_,.75,.35,0,1),M=Math.pow(Math.max(T,k),.25),S=e.bJ(w.lng,x.lng),P=e.bJ(w.lat,x.lat);i.setCenter(new e.W(w.lng+S*M,w.lat+P*M).wrap()),i.setZoom(b+Mt(v,i.center.lat))}handleMapControlsPan(t,e,i){if(!t.panDelta)return;const r=e.center.lat,o=e.zoom;e.setCenter(St(t.panDelta,e).wrap()),e.setZoom(o+Mt(r,e.center.lat))}cameraForBoxAndBearing(t,i,r,o,n){const a=_t(t,i,r,o,n),s=i.left/n.width*2-1,l=(n.width-i.right)/n.width*2-1,c=i.top/n.height*-2+1,u=(n.height-i.bottom)/n.height*-2+1,h=e.bJ(r.getWest(),r.getEast())<0,p=h?r.getEast():r.getWest(),d=h?r.getWest():r.getEast(),m=Math.max(r.getNorth(),r.getSouth()),f=Math.min(r.getNorth(),r.getSouth()),_=p+.5*e.bJ(p,d),g=m+.5*e.bJ(m,f),y=n.clone();y.setCenter(a.center),y.setBearing(a.bearing),y.setPitch(0),y.setRoll(0),y.setZoom(a.zoom);const v=y.modelViewProjectionMatrix,b=[xt(r.getNorthWest()),xt(r.getNorthEast()),xt(r.getSouthWest()),xt(r.getSouthEast()),xt(new e.W(d,g)),xt(new e.W(p,g)),xt(new e.W(_,m)),xt(new e.W(_,f))],x=xt(a.center);let w=Number.POSITIVE_INFINITY;for(const t of b)s<0&&(w=Ar.getLesserNonNegativeNonNull(w,Ar.solveVectorScale(t,x,v,"x",s))),l>0&&(w=Ar.getLesserNonNegativeNonNull(w,Ar.solveVectorScale(t,x,v,"x",l))),c>0&&(w=Ar.getLesserNonNegativeNonNull(w,Ar.solveVectorScale(t,x,v,"y",c))),u<0&&(w=Ar.getLesserNonNegativeNonNull(w,Ar.solveVectorScale(t,x,v,"y",u)));if(Number.isFinite(w)&&0!==w)return a.zoom=Math.min(y.zoom+e.ar(w),t.maxZoom),a;mt()}handleJumpToCenterZoom(t,i){const r=t.center.lat,o=t.applyConstrain(i.center?e.W.convert(i.center):t.center,t.zoom).center;t.setCenter(o.wrap());const n=void 0!==i.zoom?+i.zoom:t.zoom+Mt(r,o.lat);t.zoom!==n&&t.setZoom(n)}handleEaseTo(t,i){const r=t.zoom,o=t.center,n=t.padding,a={roll:t.roll,pitch:t.pitch,bearing:t.bearing},s={roll:void 0===i.roll?t.roll:i.roll,pitch:void 0===i.pitch?t.pitch:i.pitch,bearing:void 0===i.bearing?t.bearing:i.bearing},l=void 0!==i.zoom,c=!t.isPaddingEqual(i.padding);let u=!1;const h=i.center?e.W.convert(i.center):o,p=t.applyConstrain(h,r).center;pt(t,p);const d=t.clone();d.setCenter(p),d.setZoom(l?+i.zoom:r+Mt(o.lat,h.lat)),d.setBearing(i.bearing);const m=new e.P(e.al(t.centerPoint.x+i.offsetAsPoint.x,0,t.width),e.al(t.centerPoint.y+i.offsetAsPoint.y,0,t.height));d.setLocationAtPoint(p,m);const f=(i.offset&&i.offsetAsPoint.mag())>0?d.center:p,_=l?+i.zoom:r+Mt(o.lat,f.lat),g=r+Mt(o.lat,0),y=_+Mt(f.lat,0),v=e.bJ(o.lng,f.lng),b=e.bJ(o.lat,f.lat),x=e.ao(y-g);return u=_!==r,{easeFunc:r=>{if(e.bn(a,s)||ft({startEulerAngles:a,endEulerAngles:s,tr:t,k:r,useSlerp:a.roll!=s.roll}),c&&t.interpolatePadding(n,i.padding,r),i.around)e.w("Easing around a point is not supported under globe projection."),t.setLocationAtPoint(i.around,i.aroundPoint);else{const e=y>g?Math.min(2,x):Math.max(.5,x),i=Math.pow(e,1-r),n=At(o,v,b,r*i);t.setCenter(n.wrap())}if(u){const i=e.H.number(g,y,r)+Mt(0,t.center.lat);t.setZoom(i)}},isZooming:u,elevationCenter:f}}handleFlyTo(t,i){const r=void 0!==i.zoom,o=t.center,n=t.zoom,a=t.padding,s=!t.isPaddingEqual(i.padding),l=t.applyConstrain(e.W.convert(i.center||i.locationAtOffset),n).center,c=r?+i.zoom:t.zoom+Mt(t.center.lat,l.lat),u=t.clone();u.setCenter(l),u.setZoom(c),u.setBearing(i.bearing);const h=new e.P(e.al(t.centerPoint.x+i.offsetAsPoint.x,0,t.width),e.al(t.centerPoint.y+i.offsetAsPoint.y,0,t.height));u.setLocationAtPoint(l,h);const p=u.center;pt(t,p);const d=function(t,i,r){const o=xt(i),n=xt(r),a=e.b3(o,n),s=Math.acos(a),l=vt(t);return s/(2*Math.PI)*l}(t,o,p),m=n+Mt(o.lat,0),f=c+Mt(p.lat,0),_=e.ao(f-m);let g;if("number"==typeof i.minZoom){const r=+i.minZoom+Mt(p.lat,0),o=Math.min(r,m,f)+Mt(0,p.lat),n=t.applyConstrain(p,o).zoom+Mt(p.lat,0);g=e.ao(n-m)}const y=e.bJ(o.lng,p.lng),v=e.bJ(o.lat,p.lat);return{easeFunc:(r,n,l)=>{const u=At(o,y,v,l);s&&t.interpolatePadding(a,i.padding,r);const h=1===r?p:u;t.setCenter(h.wrap());const d=m+e.ar(n);t.setZoom(1===r?c:d+Mt(0,h.lat))},scaleOfZoom:_,targetCenter:p,scaleOfMinZoom:g,pixelPathLength:d}}static solveVectorScale(t,e,i,r,o){const n="x"===r?[i[0],i[4],i[8],i[12]]:[i[1],i[5],i[9],i[13]],a=[i[3],i[7],i[11],i[15]],s=t[0]*n[0]+t[1]*n[1]+t[2]*n[2],l=t[0]*a[0]+t[1]*a[1]+t[2]*a[2],c=e[0]*n[0]+e[1]*n[1]+e[2]*n[2],u=e[0]*a[0]+e[1]*a[1]+e[2]*a[2];return c+o*l===s+o*u||a[3]*(s-c)+n[3]*(u-l)+s*u==c*l?null:(c+n[3]-o*u-o*a[3])/(c-s-o*u+o*l)}static getLesserNonNegativeNonNull(t,e){return null!==e&&e>=0&&ee.C(t,null==i?void 0:i.filter(t=>"source.canvas"!==t.identifier)),Er=e.bN();class zr extends e.E{constructor(t,i={}){var r,o;super(),this._rtlPluginLoaded=()=>{for(const t in this.tileManagers){const e=this.tileManagers[t].getSource().type;"vector"!==e&&"geojson"!==e||this.tileManagers[t].reload()}},this.map=t,this.dispatcher=new ti(c(),t._getMapId()),this.dispatcher.registerMessageHandler("GG",(t,e)=>this.getGlyphs(t,e)),this.dispatcher.registerMessageHandler("GI",(t,e)=>this.getImages(t,e)),this.dispatcher.registerMessageHandler("GDA",(t,e)=>this.getDashes(t,e)),this.imageManager=new Be,this.imageManager.setEventedParent(this);const n=(null===(r=t._container)||void 0===r?void 0:r.lang)||"undefined"!=typeof document&&(null===(o=document.documentElement)||void 0===o?void 0:o.lang)||void 0;this.glyphManager=new Ue(t._requestManager,i.localIdeographFontFamily,n),this.lineAtlas=new He(256,512),this.crossTileSymbolIndex=new Xi,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",e.bO()),w().on(pi,this._rtlPluginLoaded),this.on("data",t=>{if("source"!==t.dataType||"metadata"!==t.sourceDataType)return;const e=this.tileManagers[t.sourceId];if(!e)return;const i=e.getSource();if(null==i?void 0:i.vectorLayerIds)for(const t in this._layers){const e=this._layers[t];e.source===i.id&&this._validateLayer(e)}})}_setInitialValues(){var t;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new e.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new((null===(t=this.crossTileSymbolIndex)||void 0===t?void 0:t.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(t,i){var r,o,n;this._checkLoaded();const a=null===i?null!==(n=null===(o=null===(r=this.stylesheet.state)||void 0===r?void 0:r[t])||void 0===o?void 0:o.default)&&void 0!==n?n:null:i;if(e.bQ(a,this._globalState[t]))return this;this._globalState[t]=a,this._applyGlobalStateChanges([t])}getGlobalState(){return this._globalState}setGlobalState(t){this._checkLoaded();const i=[];for(const r in t)!e.bQ(this._globalState[r],t[r].default)&&(i.push(r),this._globalState[r]=t[r].default);this._applyGlobalStateChanges(i)}_applyGlobalStateChanges(t){if(0===t.length)return;const e=new Set,i={};for(const r of t){i[r]=this._globalState[r];for(const t in this._layers){const i=this._layers[t],o=i.getLayoutAffectingGlobalStateRefs(),n=i.getPaintAffectingGlobalStateRefs(),a=i.getVisibilityAffectingGlobalStateRefs();if(o.has(r)&&e.add(i.source),n.has(r))for(const{name:t,value:e}of n.get(r))this._updatePaintProperty(i,t,e);(null==a?void 0:a.has(r))&&(i.recalculateVisibility(),this._updateLayer(i))}}this.dispatcher.broadcast("UGS",i);for(const t in this.tileManagers)e.has(t)&&(this._reloadSource(t),this._changed=!0)}loadURL(t){return e._(this,arguments,void 0,function*(t,i={},r){this.fire(new e.n("dataloading",{dataType:"style"})),i.validate="boolean"!=typeof i.validate||i.validate,this._loadStyleRequest=new AbortController;const o=this._loadStyleRequest;try{const n=yield this.map._requestManager.transformRequest(t,"Style");e.bR(o.signal);const a=yield e.k(n,o);this._loadStyleRequest===o&&(this._loadStyleRequest=null),this._load(a.data,i,r)}catch(t){this._loadStyleRequest===o&&(this._loadStyleRequest=null),t&&!o.signal.aborted&&this.fire(new e.l(e.d(t)))}})}loadJSON(t,i={},r){this.fire(new e.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,ze.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,i.validate=!1!==i.validate,this._load(t,i,r)}).catch(()=>{})}loadEmpty(){this.fire(new e.n("dataloading",{dataType:"style"})),this._load(Er,{validate:!1})}_load(t,i,r){var o,n;let a=i.transformStyle?i.transformStyle(r,t):t;if(!i.validate||!Cr(this,e.F(a))){a=Object.assign({},a),this._loaded=!0,this.stylesheet=a;for(const t in a.sources)this.addSource(t,a.sources[t],{validate:!1});a.sprite?this._loadSprite(a.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(a.glyphs),this._createLayers(),this.light=new $e(this.stylesheet.light),this._setProjectionInternal((null===(o=this.stylesheet.projection)||void 0===o?void 0:o.type)||"mercator"),this.sky=new We(this.stylesheet.sky),this.map.setTerrain(null!==(n=this.stylesheet.terrain)&&void 0!==n?n:null),this.fire(new e.n("data",{dataType:"style"})),this.fire(new e.n("style.load"))}}_createLayers(){var t,i,r;const o=e.bS(this.stylesheet.layers);this.setGlobalState(null!==(t=this.stylesheet.state)&&void 0!==t?t:null),this.dispatcher.broadcast("SL",o),this._order=o.map(t=>t.id),this._layers={},this._serializedLayers=null;for(const t of o){const o=e.bT(t,this._globalState);if(o.setEventedParent(this,{layer:{id:t.id}}),this._layers[t.id]=o,e.bU(o)&&this.tileManagers[o.source]){const e=null!==(r=null===(i=t.paint)||void 0===i?void 0:i["raster-fade-duration"])&&void 0!==r?r:o.paint.get("raster-fade-duration");this.tileManagers[o.source].setRasterFadeDuration(e)}}}_loadSprite(t,i=!1,r){this.imageManager.setLoaded(!1);const a=new AbortController;let s;this._spriteRequest=a,function(t,i,r,a){return e._(this,void 0,void 0,function*(){const s=o(t),l=r>1?"@2x":"",c={},u={};for(const{id:t,url:r}of s){const o=yield i.transformRequest(n(r,l,".json"),"SpriteJSON");c[t]=e.k(o,a);const s=yield i.transformRequest(n(r,l,".png"),"SpriteImage");u[t]=Le.getImage(s,a)}return yield Promise.all([...Object.values(c),...Object.values(u)]),function(t,i){return e._(this,void 0,void 0,function*(){const e={};for(const r in t){e[r]={};const o=ze.getImageCanvasContext((yield i[r]).data),n=(yield t[r]).data;for(const t in n){const{width:i,height:a,x:s,y:l,sdf:c,pixelRatio:u,stretchX:h,stretchY:p,content:d,textFitWidth:m,textFitHeight:f}=n[t];e[r][t]={data:null,pixelRatio:u,sdf:c,stretchX:h,stretchY:p,content:d,textFitWidth:m,textFitHeight:f,spriteData:{width:i,height:a,x:s,y:l,context:o}}}}return e})}(c,u)})}(t,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(t=>{if(this._spriteRequest=null,t)for(const e in t){this._spritesImagesIds[e]=[];const r=this._spritesImagesIds[e]?this._spritesImagesIds[e].filter(e=>!(e in t)):[];for(const t of r)this.imageManager.removeImage(t),this._changedImages[t]=!0;for(const r in t[e]){const o="default"===e?r:`${e}:${r}`;this._spritesImagesIds[e].push(o),o in this.imageManager.images?this.imageManager.updateImage(o,t[e][r],!1):this.imageManager.addImage(o,t[e][r]),i&&(this._changedImages[o]=!0)}}}).catch(t=>{this._spriteRequest=null,s=t,a.signal.aborted||this.fire(new e.l(s))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),i&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"})),r&&r(s)})}_unloadSprite(){for(const t of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(t),this._changedImages[t]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}_validateLayer(t){const i=this.tileManagers[t.source];if(!i)return;const r=t.sourceLayer;if(!r)return;const o=i.getSource();("geojson"===o.type||o.vectorLayerIds&&!o.vectorLayerIds.includes(r))&&this.fire(new e.l(new Error(`Source layer "${r}" does not exist on source "${o.id}" as specified by style layer "${t.id}".`)))}loaded(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(const t in this.tileManagers)if(!this.tileManagers[t].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(t,i=!1){const r=this._serializedAllLayers();if(!t||0===t.length)return Object.values(i?e.bV(r):r);const o=[];for(const n of t)if(r[n]){const t=i?e.bV(r[n]):r[n];o.push(t)}return o}_serializedAllLayers(){let t=this._serializedLayers;if(t)return t;t=this._serializedLayers={};const e=Object.keys(this._layers);for(const i of e){const e=this._layers[i];"custom"!==e.type&&(t[i]=e.serialize())}return t}hasTransitions(){var t,e,i;if(null===(t=this.light)||void 0===t?void 0:t.hasTransition())return!0;if(null===(e=this.sky)||void 0===e?void 0:e.hasTransition())return!0;if(null===(i=this.projection)||void 0===i?void 0:i.hasTransition())return!0;for(const t in this.tileManagers)if(this.tileManagers[t].hasTransition())return!0;for(const t in this._layers)if(this._layers[t].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(t){if(!this._loaded)return;const i=this._changed;if(i){const e=Object.keys(this._updatedLayers),i=Object.keys(this._removedLayers);(e.length||i.length)&&this._updateWorkerLayers(e,i);for(const t in this._updatedSources){const e=this._updatedSources[t];if("reload"===e)this._reloadSource(t);else{if("clear"!==e)throw new Error(`Invalid action ${e}`);this._clearSource(t)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const e in this._updatedPaintProps)this._layers[e].updateTransitions(t);this.light.updateTransitions(t),this.sky.updateTransitions(t),this._resetUpdates()}const r={};for(const t in this.tileManagers){const e=this.tileManagers[t];r[t]=e.used,e.used=!1}for(const e of this._order){const i=this._layers[e];i.recalculate(t,this._availableImages),!i.isHidden(t.zoom)&&i.source&&(this.tileManagers[i.source].used=!0)}for(const t in r){const i=this.tileManagers[t];!!r[t]!=!!i.used&&i.fire(new e.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:t}))}this.light.recalculate(t),this.sky.recalculate(t),this.projection.recalculate(t),this.z=t.zoom,i&&this.fire(new e.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){const t=Object.keys(this._changedImages);if(t.length){for(const e in this.tileManagers)this.tileManagers[e].reloadTilesForDependencies(["icons","patterns"],t);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const t in this.tileManagers)this.tileManagers[t].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(t,e){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(t,!1),removedIds:e})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(t,i={}){var r;this._checkLoaded();const o=this.serialize();if(t=i.transformStyle?i.transformStyle(o,t):t,(null===(r=i.validate)||void 0===r||r)&&Cr(this,e.F(t)))return!1;(t=e.bV(t)).layers=e.bS(t.layers);const n=e.bW(o,t),a=this._getOperationsToPerform(n);if(a.unimplemented.length>0)throw new Error(`Unimplemented: ${a.unimplemented.join(", ")}.`);if(0===a.operations.length)return!1;for(const t of a.operations)t();return this.stylesheet=t,this._serializedLayers=null,this.fire(new e.n("style.load",{style:this})),!0}_getOperationsToPerform(t){const e=[],i=[];for(const r of t)switch(r.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":e.push(()=>this.addLayer.apply(this,r.args));break;case"removeLayer":e.push(()=>this.removeLayer.apply(this,r.args));break;case"setPaintProperty":e.push(()=>this.setPaintProperty.apply(this,r.args));break;case"setLayoutProperty":e.push(()=>this.setLayoutProperty.apply(this,r.args));break;case"setFilter":e.push(()=>this.setFilter.apply(this,r.args));break;case"addSource":e.push(()=>this.addSource.apply(this,r.args));break;case"removeSource":e.push(()=>this.removeSource.apply(this,r.args));break;case"setLayerZoomRange":e.push(()=>this.setLayerZoomRange.apply(this,r.args));break;case"setLight":e.push(()=>this.setLight.apply(this,r.args));break;case"setGeoJSONSourceData":e.push(()=>this.setGeoJSONSourceData.apply(this,r.args));break;case"setGlyphs":e.push(()=>this.setGlyphs.apply(this,r.args));break;case"setSprite":e.push(()=>this.setSprite.apply(this,r.args));break;case"setTerrain":e.push(()=>this.map.setTerrain.apply(this,r.args));break;case"setSky":e.push(()=>this.setSky.apply(this,r.args));break;case"setProjection":this.setProjection.apply(this,r.args);break;case"setGlobalState": e.push(()=>this.setGlobalState.apply(this,r.args));break;case"setTransition":e.push(()=>{});break;default:i.push(r.command)}return{operations:e,unimplemented:i}}addImage(t,i){if(this.getImage(t))return this.fire(new e.l(new Error(`An image named "${t}" already exists.`)));this.imageManager.addImage(t,i),this._afterImageUpdated(t)}updateImage(t,e){this.imageManager.updateImage(t,e)}getImage(t){return this.imageManager.getImage(t)}removeImage(t){if(!this.getImage(t))return this.fire(new e.l(new Error(`An image named "${t}" does not exist.`)));this.imageManager.removeImage(t),this._afterImageUpdated(t)}_afterImageUpdated(t){this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(t,i,r={}){var o;if(this._checkLoaded(),void 0!==this.tileManagers[t])throw new Error(`Source "${t}" already exists.`);if(!i.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(i).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(i.type)&&this._validate(e.F.source,`sources.${t}`,i,null,r))return;(null===(o=this.map)||void 0===o?void 0:o._collectResourceTiming)&&(i.collectResourceTiming=!0);const n=this.tileManagers[t]=new Ti(t,i,this.dispatcher);n.style=this,n.setEventedParent(this,()=>({isSourceLoaded:n.loaded(),source:n.serialize(),sourceId:t})),n.onAdd(this.map),this._changed=!0}removeSource(t){if(this._checkLoaded(),void 0===this.tileManagers[t])throw new Error(`There is no source with this ID=${t}`);for(const i in this._layers)if(this._layers[i].source===t)return this.fire(new e.l(new Error(`Source "${t}" cannot be removed while layer "${i}" is using it.`)));const i=this.tileManagers[t];delete this.tileManagers[t],delete this._updatedSources[t],i.fire(new e.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),i.setEventedParent(null),i.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(t,e){if(this._checkLoaded(),void 0===this.tileManagers[t])throw new Error(`There is no source with this ID=${t}`);const i=this.tileManagers[t].getSource();if("geojson"!==i.type)throw new Error(`geojsonSource.type is ${i.type}, which is !== 'geojson`);i.setData(e),this._changed=!0}getSource(t){var e;return null===(e=this.tileManagers[t])||void 0===e?void 0:e.getSource()}addLayer(t,i,r={}){this._checkLoaded();const o=t.id;if(this.getLayer(o))return void this.fire(new e.l(new Error(`Layer "${o}" already exists on this map.`)));let n;if("custom"===t.type){if(Cr(this,e.bX(t)))return;n=e.bT(t,this._globalState)}else{if("source"in t&&"object"==typeof t.source&&(this.addSource(o,t.source),t=e.bV(t),t=e.e(t,{source:o})),this._validate(e.F.layer,`layers.${o}`,t,{arrayIndex:-1},r))return;n=e.bT(t,this._globalState),this._validateLayer(n),n.setEventedParent(this,{layer:{id:o}})}const a=i?this._order.indexOf(i):this._order.length;if(i&&-1===a)this.fire(new e.l(new Error(`Cannot add layer "${o}" before non-existing layer "${i}".`)));else{if(this._order.splice(a,0,o),this._layerOrderChanged=!0,this._layers[o]=n,this._removedLayers[o]&&n.source&&"custom"!==n.type){const t=this._removedLayers[o];delete this._removedLayers[o],t.type!==n.type?this._updatedSources[n.source]="clear":(this._updatedSources[n.source]="reload",this.tileManagers[n.source].pause())}this._updateLayer(n),n.onAdd&&n.onAdd(this.map)}}moveLayer(t,i){if(this._checkLoaded(),this._changed=!0,!this._layers[t])return void this.fire(new e.l(new Error(`The layer '${t}' does not exist in the map's style and cannot be moved.`)));if(t===i)return;const r=this._order.indexOf(t);this._order.splice(r,1);const o=i?this._order.indexOf(i):this._order.length;i&&-1===o?this.fire(new e.l(new Error(`Cannot move layer "${t}" before non-existing layer "${i}".`))):(this._order.splice(o,0,t),this._layerOrderChanged=!0)}removeLayer(t){this._checkLoaded();const i=this._layers[t];if(!i)return void this.fire(new e.l(new Error(`Cannot remove non-existing layer "${t}".`)));i.setEventedParent(null);const r=this._order.indexOf(t);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=i,delete this._layers[t],this._serializedLayers&&delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],i.onRemove&&i.onRemove(this.map)}getLayer(t){return this._layers[t]}getLayersOrder(){return[...this._order]}hasLayer(t){return t in this._layers}setLayerZoomRange(t,i,r){this._checkLoaded();const o=this.getLayer(t);o?o.minzoom===i&&o.maxzoom===r||(null!=i&&(o.minzoom=i),null!=r&&(o.maxzoom=r),this._updateLayer(o)):this.fire(new e.l(new Error(`Cannot set the zoom range of non-existing layer "${t}".`)))}setFilter(t,i,r={}){this._checkLoaded();const o=this.getLayer(t);if(o){if(!e.bQ(o.filter,i))return null==i?(o.setFilter(void 0),void this._updateLayer(o)):void(this._validate(e.F.filter,`layers.${o.id}.filter`,i,null,r)||(o.setFilter(e.bV(i)),this._updateLayer(o)))}else this.fire(new e.l(new Error(`Cannot filter non-existing layer "${t}".`)))}getFilter(t){return e.bV(this.getLayer(t).filter)}setLayoutProperty(t,i,r,o={}){this._checkLoaded();const n=this.getLayer(t);n?e.bQ(n.getLayoutProperty(i),r)||(n.setLayoutProperty(i,r,o),this._updateLayer(n)):this.fire(new e.l(new Error(`Cannot style non-existing layer "${t}".`)))}getLayoutProperty(t,i){const r=this.getLayer(t);if(r)return r.getLayoutProperty(i);this.fire(new e.l(new Error(`Cannot get style of non-existing layer "${t}".`)))}setPaintProperty(t,i,r,o={}){this._checkLoaded();const n=this.getLayer(t);n?e.bQ(n.getPaintProperty(i),r)||this._updatePaintProperty(n,i,r,o):this.fire(new e.l(new Error(`Cannot style non-existing layer "${t}".`)))}_updatePaintProperty(t,i,r,o={}){t.setPaintProperty(i,r,o)&&this._updateLayer(t),e.bU(t)&&"raster-fade-duration"===i&&this.tileManagers[t.source].setRasterFadeDuration(r),this._changed=!0,this._updatedPaintProps[t.id]=!0,this._serializedLayers=null}getPaintProperty(t,e){return this.getLayer(t).getPaintProperty(e)}setFeatureState(t,i){this._checkLoaded();const r=t.source,o=t.sourceLayer,n=this.tileManagers[r];if(void 0===n)return void this.fire(new e.l(new Error(`The source '${r}' does not exist in the map's style.`)));const a=n.getSource().type;"geojson"===a&&o?this.fire(new e.l(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==a||o?(void 0===t.id&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),n.setFeatureState(o,t.id,i)):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(t,i){this._checkLoaded();const r=t.source,o=this.tileManagers[r];if(void 0===o)return void this.fire(new e.l(new Error(`The source '${r}' does not exist in the map's style.`)));const n=o.getSource().type,a="vector"===n?t.sourceLayer:void 0;"vector"!==n||a?i&&"string"!=typeof t.id&&"number"!=typeof t.id?this.fire(new e.l(new Error("A feature id is required to remove its specific state property."))):o.removeFeatureState(a,t.id,i):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(t){this._checkLoaded();const i=t.source,r=t.sourceLayer,o=this.tileManagers[i];if(void 0!==o)return"vector"!==o.getSource().type||r?(void 0===t.id&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),o.getFeatureState(r,t.id)):void this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.l(new Error(`The source '${i}' does not exist in the map's style.`)))}getTransition(){var t;return e.e({duration:300,delay:0},null===(t=this.stylesheet)||void 0===t?void 0:t.transition)}serialize(){if(!this._loaded)return;const t=e.bY(this.tileManagers,t=>t.serialize()),i=this._serializeByIds(this._order,!0),r=this.map.getTerrain()||void 0,o=this.stylesheet;return e.bZ({version:o.version,name:o.name,metadata:o.metadata,light:o.light,sky:o.sky,center:o.center,zoom:o.zoom,bearing:o.bearing,pitch:o.pitch,sprite:o.sprite,glyphs:o.glyphs,transition:o.transition,projection:o.projection,sources:t,layers:i,terrain:r},t=>void 0!==t)}_updateLayer(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&"raster"!==this.tileManagers[t.source].getSource().type&&(this._updatedSources[t.source]="reload",this.tileManagers[t.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(t){const e=t=>"fill-extrusion"===this._layers[t].type,i={},r=[];for(let o=this._order.length-1;o>=0;o--){const n=this._order[o];if(e(n)){i[n]=o;for(const e of t){const t=e[n];if(t)for(const e of t)r.push(e)}}}r.sort((t,e)=>e.intersectionZ-t.intersectionZ);const o=[];for(let n=this._order.length-1;n>=0;n--){const a=this._order[n];if(e(a))for(let t=r.length-1;t>=0;t--){const e=r[t].feature;if(i[e.layer.id]this.map.terrain.getElevation(t,e,i):void 0));return this.placement&&n.push(function(t,e,i,r,o,n,a){const s={},l=n.queryRenderedSymbols(r),c=[];for(const t of Object.keys(l).map(Number))c.push(a[t]);c.sort(d);for(const i of c){const r=i.featureIndex.lookupSymbolFeatures(l[i.bucketInstanceId],e,i.bucketIndex,i.sourceLayerIndex,{filterSpec:o.filter,globalState:o.globalState},o.layers,o.availableImages,t);for(const t in r){s[t]||(s[t]=[]);const e=r[t];e.sort((t,e)=>{const r=i.featureSortOrder;if(r){const i=r.indexOf(t.featureIndex);return r.indexOf(e.featureIndex)-i}return e.featureIndex-t.featureIndex});for(const i of e)s[t].push(i)}}return function(t,e,i){for(const r in t)for(const o of t[r])m(o,i[e[r].source]);return t}(s,t,i)}(this._layers,a,this.tileManagers,t,l,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(n)}querySourceFeatures(t,i){(null==i?void 0:i.filter)&&this._validate(e.F.filter,"querySourceFeatures.filter",i.filter,null,i);const r=this.tileManagers[t];return r?function(t,e){const i=t.getRenderableIds().map(e=>t.getTileByID(e)),r=[],o={};for(const t of i){const i=t.tileID.canonical.key;o[i]||(o[i]=!0,t.querySourceFeatures(r,e))}return r}(r,i?Object.assign(Object.assign({},i),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(t,i={}){this._checkLoaded();const o=this.light.getLight();let n=!1;for(const i in t)if(!e.bQ(t[i],o[i])){n=!0;break}if(!n)return;const a={now:r(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(t,i),this.light.updateTransitions(a)}getProjection(){var t;return null===(t=this.stylesheet)||void 0===t?void 0:t.projection}setProjection(t){this._checkLoaded();const e=null!=t?t:{type:"mercator"};if(this.stylesheet.projection=t,this.projection){if(this.projection.name===e.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(e.type)}getSky(){var t;return null===(t=this.stylesheet)||void 0===t?void 0:t.sky}setSky(t,i={}){this._checkLoaded();const o=this.getSky();let n=!1;if(!t&&!o)return;if(t&&!o)n=!0;else if(!t&&o)n=!0;else for(const i in t)if(!e.bQ(t[i],o[i])){n=!0;break}if(!n)return;const a={now:r(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=t,this.sky.setSky(t,i),this.sky.updateTransitions(a)}_setProjectionInternal(t){const i=function(t,i){const r={constrainOverride:i};if(Array.isArray(t)){const e=new wr({type:t});return{projection:e,transform:new Pr(r),cameraHelper:new Ir(e)}}switch(t){case"mercator":return{projection:new rr,transform:new cr(r),cameraHelper:new ur};case"globe":{const t=new wr({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:t,transform:new Pr(r),cameraHelper:new Ir(t)}}case"vertical-perspective":return{projection:new br,transform:new Sr(r),cameraHelper:new Ar};default:return e.w(`Unknown projection name: ${t}. Falling back to mercator projection.`),{projection:new rr,transform:new cr(r),cameraHelper:new ur}}}(t,this.map.transformConstrain);this.projection=i.projection,this.map.migrateProjection(i.transform,i.cameraHelper);for(const t in this.tileManagers)this.tileManagers[t].reload()}_validate(t,i,r,o,n={}){return!1!==(null==n?void 0:n.validate)&&Cr(this,t.call(e.F,e.e({key:i,style:this.serialize(),value:r,styleSpec:e.x},o)))}_remove(t=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),w().off(pi,this._rtlPluginLoaded);for(const t in this._layers)this._layers[t].setEventedParent(null);for(const t in this.tileManagers){const e=this.tileManagers[t];e.setEventedParent(null),e.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),t&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(t)}_clearSource(t){this.tileManagers[t].clearTiles()}_reloadSource(t){this.tileManagers[t].resume(),this.tileManagers[t].reload()}_updateSources(t){for(const e in this.tileManagers)this.tileManagers[e].update(t,this.map.terrain)}_generateCollisionBoxes(){for(const t in this.tileManagers)this._reloadSource(t)}_updatePlacement(t,e,i,o,n=!1){let a=!1,s=!1;const l={};for(const e of this._order){const i=this._layers[e];if("symbol"!==i.type)continue;if(!l[i.source]){const t=this.tileManagers[i.source];l[i.source]=t.getRenderableIds(!0).map(e=>t.getTileByID(e)).sort((t,e)=>e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1))}const r=this.crossTileSymbolIndex.addLayer(i,l[i.source],t.center.lng);a||(a=r)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),n||(n=this._layerOrderChanged||0===i),(n||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(r(),t.zoom))&&(this.pauseablePlacement=new $i(t,this.map.terrain,this._order,n,e,i,o,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(r()),s=!0),a&&this.pauseablePlacement.placement.setStale()),s||a)for(const t of this._order){const e=this._layers[t];"symbol"===e.type&&this.placement.updateLayerOpacities(e,l[e.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(r())}_releaseSymbolFadeTiles(){for(const t in this.tileManagers)this.tileManagers[t].releaseSymbolFadeTiles()}getImages(t,i){return e._(this,void 0,void 0,function*(){const t=yield this.imageManager.getImages(i.icons);this._updateTilesForChangedImages();const e=this.tileManagers[i.source];return e&&e.setDependencies(i.tileID.key,i.type,i.icons),t})}getGlyphs(t,i){return e._(this,void 0,void 0,function*(){const t=yield this.glyphManager.getGlyphs(i.stacks),e=this.tileManagers[i.source];return e&&e.setDependencies(i.tileID.key,i.type,[""]),t})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(t,i={}){this._checkLoaded(),t&&this._validate(e.F.glyphs,"glyphs",t,null,i)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=t,this.glyphManager.entries={},this.glyphManager.setURL(t))}getDashes(t,i){return e._(this,void 0,void 0,function*(){const t={};for(const[e,r]of Object.entries(i.dashes))t[e]=this.lineAtlas.getDash(r.dasharray,r.round);return t})}addSprite(t,i,r={},n){this._checkLoaded();const a=[{id:t,url:i}],s=[...o(this.stylesheet.sprite),...a];this._validate(e.F.sprite,"sprite",s,null,r)||(this.stylesheet.sprite=s,this._loadSprite(a,!0,n))}removeSprite(t){this._checkLoaded();const i=o(this.stylesheet.sprite);if(i.find(e=>e.id===t)){if(this._spritesImagesIds[t])for(const e of this._spritesImagesIds[t])this.imageManager.removeImage(e),this._changedImages[e]=!0;i.splice(i.findIndex(e=>e.id===t),1),this.stylesheet.sprite=i.length>0?i:void 0,delete this._spritesImagesIds[t],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}else this.fire(new e.l(new Error(`Sprite "${t}" doesn't exists on this map.`)))}getSprite(){return o(this.stylesheet.sprite)}setSprite(t,i={},r){this._checkLoaded(),t&&this._validate(e.F.sprite,"sprite",t,null,i)||(this.stylesheet.sprite=t,t?this._loadSprite(t,!0,r):(this._unloadSprite(),r&&r(null)))}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(const t in this.tileManagers){const e=this.tileManagers[t];e.setEventedParent(null),e.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(const t in this._layers){const e=this._layers[t];e.setEventedParent(null),e.onRemove&&e.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var Dr=e.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Or{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(t,e,i,r,o,n,a,s,l){this.context=t;let c=this.boundPaintVertexBuffers.length!==r.length;for(let t=0;!c&&t({u_texture:0,u_ele_delta:t,u_fog_matrix:i,u_fog_color:r?r.properties.get("fog-color"):e.bo.white,u_fog_ground_blend:r?r.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:n?0:r?r.calculateFogBlendOpacity(o):0,u_horizon_color:r?r.properties.get("horizon-color"):e.bo.white,u_horizon_fog_blend:r?r.properties.get("horizon-fog-blend"):1,u_is_globe_mode:n?1:0}),Rr={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};class Fr{constructor(t,i,r,o,n,a,s,l,c=[]){const u=t.gl;this.program=u.createProgram();const h=zt(i.staticAttributes),p=r?r.getBinderAttributes():[],d=h.concat(p),m=Ji.prelude.staticUniforms?zt(Ji.prelude.staticUniforms):[],f=s.staticUniforms?zt(s.staticUniforms):[],_=i.staticUniforms?zt(i.staticUniforms):[],g=r?r.getBinderUniforms():[],y=m.concat(f).concat(_).concat(g),v=[];for(const t of y)v.includes(t)||v.push(t);const b=r?r.defines():[];gt(u)&&b.unshift("#version 300 es"),n&&b.push("#define OVERDRAW_INSPECTOR;"),a&&b.push("#define TERRAIN3D;"),l&&b.push(l),c&&b.push(...c);let x=b.concat(Ji.prelude.fragmentSource,s.fragmentSource,i.fragmentSource).join("\n"),w=b.concat(Ji.prelude.vertexSource,s.vertexSource,i.vertexSource).join("\n");gt(u)||(x=function(t){return t.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(x),w=function(t){return t.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(w));const T=u.createShader(u.FRAGMENT_SHADER);if(u.isContextLost())return void(this.failedToCreate=!0);if(u.shaderSource(T,x),u.compileShader(T),!u.getShaderParameter(T,u.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${u.getShaderInfoLog(T)}`);u.attachShader(this.program,T);const k=u.createShader(u.VERTEX_SHADER);if(u.isContextLost())return void(this.failedToCreate=!0);if(u.shaderSource(k,w),u.compileShader(k),!u.getShaderParameter(k,u.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${u.getShaderInfoLog(k)}`);u.attachShader(this.program,k),this.attributes={};const M={};this.numAttributes=d.length;for(let t=0;t({u_depth:new e.b_(t,i.u_depth),u_terrain:new e.b_(t,i.u_terrain),u_terrain_dim:new e.bp(t,i.u_terrain_dim),u_terrain_matrix:new e.c0(t,i.u_terrain_matrix),u_terrain_unpack:new e.c1(t,i.u_terrain_unpack),u_terrain_exaggeration:new e.bp(t,i.u_terrain_exaggeration)}))(t,M),this.projectionUniforms=((t,i)=>({u_projection_matrix:new e.c0(t,i.u_projection_matrix),u_projection_tile_mercator_coords:new e.c1(t,i.u_projection_tile_mercator_coords),u_projection_clipping_plane:new e.c1(t,i.u_projection_clipping_plane),u_projection_transition:new e.bp(t,i.u_projection_transition),u_projection_fallback_matrix:new e.c0(t,i.u_projection_fallback_matrix)}))(t,M),this.binderUniforms=r?r.getUniforms(t,M):[]}draw(t,e,i,r,o,n,a,s,l,c,u,h,p,d,m,f,_,g,y){var v;const b=t.gl;if(this.failedToCreate)return;if(t.program.set(this.program),t.setDepthMode(i),t.setStencilMode(r),t.setColorMode(o),t.setCullFace(n),s){t.activeTexture.set(b.TEXTURE2),b.bindTexture(b.TEXTURE_2D,s.depthTexture),t.activeTexture.set(b.TEXTURE3),b.bindTexture(b.TEXTURE_2D,s.texture);for(const t in this.terrainUniforms)this.terrainUniforms[t].set(s[t])}if(l)for(const t in l)this.projectionUniforms[Rr[t]].set(l[t]);if(a)for(const t in this.fixedUniforms)this.fixedUniforms[t].set(a[t]);f&&f.setUniforms(t,this.binderUniforms,d,{zoom:m});let x=0;switch(e){case b.LINES:x=2;break;case b.TRIANGLES:x=3;break;case b.LINE_STRIP:x=1}for(const i of p.get())i.vaos||(i.vaos={}),(v=i.vaos)[c]||(v[c]=new Or),i.vaos[c].bind(t,this,u,f?f.getPaintVertexBuffers():[],h,i.vertexOffset,_,g,y),b.drawElements(e,i.primitiveLength*x,b.UNSIGNED_SHORT,i.primitiveOffset*x*2)}}const Br=(t,i,r,o)=>{const n=t.style.light,a=n.properties.get("position"),s=[a.x,a.y,a.z],l=e.c4();"viewport"===n.properties.get("anchor")&&e.c5(l,t.transform.bearingInRadians),e.c6(s,s,l);const c=t.transform.transformLightDirection(s),u=n.properties.get("color");return{u_lightpos:s,u_lightpos_globe:c,u_lightintensity:n.properties.get("intensity"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+i,u_opacity:r,u_fill_translate:o}},jr=(t,i,r,o,n,a,s)=>e.e(Br(t,i,r,o),Dt(a,t,s),{u_height_factor:-Math.pow(2,n.overscaledZ)/s.tileSize/8}),Vr=(t,i,r,o)=>e.e(Dt(i,t,r),{u_fill_translate:o}),Nr=(t,e)=>({u_world:t,u_fill_translate:e}),Ur=(t,i,r,o,n)=>e.e(Vr(t,i,r,n),{u_world:o}),Gr=(t,i,r,o,n)=>{const a=t.transform;let s,l,c=0;if("map"===r.paint.get("circle-pitch-alignment")){const t=e.aK(i,1,a.zoom);s=!0,l=[t,t],c=t/(e.a6*Math.pow(2,i.tileID.overscaledZ))*2*Math.PI*n}else s=!1,l=a.pixelsToGLUnits;return{u_camera_to_center_distance:a.cameraToCenterDistance,u_scale_with_map:+("map"===r.paint.get("circle-pitch-scale")),u_pitch_with_map:+s,u_device_pixel_ratio:t.pixelRatio,u_extrude_scale:l,u_globe_extrude_scale:c,u_translate:o}},Zr=t=>({u_pixel_extrude_scale:[1/t.width,1/t.height]}),$r=t=>({u_viewport_size:[t.width,t.height]}),qr=(t,e=1)=>({u_color:t,u_overlay:0,u_overlay_scale:e}),Wr=(t,i,r,o)=>{const n=e.aK(t,1,i)/(e.a6*Math.pow(2,t.tileID.overscaledZ))*2*Math.PI*o;return{u_extrude_scale:e.aK(t,1,i),u_intensity:r,u_globe_extrude_scale:n}},Hr=(t,i,r,o)=>{const n=e.O();e.c7(n,0,t.width,t.height,0,0,1);const a=t.context.gl;return{u_matrix:n,u_world:[a.drawingBufferWidth,a.drawingBufferHeight],u_image:r,u_color_ramp:o,u_opacity:i.paint.get("heatmap-opacity")}},Yr=(t,e,i)=>{const r=i.paint.get("hillshade-accent-color");let o;switch(i.paint.get("hillshade-method")){case"basic":o=4;break;case"combined":o=1;break;case"igor":o=2;break;case"multidirectional":o=3;break;default:o=0}const n=i.getIlluminationProperties();for(let e=0;e{const r=i.stride,o=e.O();return e.c7(o,0,e.a6,-e.a6,0,0,1),e.Q(o,o,[0,-e.a6,0]),{u_matrix:o,u_image:1,u_dimension:[r,r],u_zoom:t.overscaledZ,u_unpack:i.getUnpackVector()}},Kr=(t,e,i=0)=>({u_image:0,u_unpack:e.getUnpackVector(),u_dimension:[e.stride,e.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:i,u_opacity:t.paint.get("color-relief-opacity")}),Jr=(t,i,r,o)=>{const n=t.transform;return{u_translation:Rt(t,i,r),u_ratio:o/e.aK(i,1,n.zoom),u_device_pixel_ratio:t.pixelRatio,u_units_to_pixels:[1/n.pixelsToGLUnits[0],1/n.pixelsToGLUnits[1]]}},Qr=(t,i,r,o,n)=>e.e(Jr(t,i,r,o),{u_image:0,u_image_height:n}),to=(t,i,r,o,n)=>{const a=t.transform,s=Lt(i,a);return{u_translation:Rt(t,i,r),u_texsize:i.imageAtlasTexture.size,u_ratio:o/e.aK(i,1,a.zoom),u_device_pixel_ratio:t.pixelRatio,u_image:0,u_scale:[s,n.fromScale,n.toScale],u_fade:n.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},eo=(t,i,r,o,n)=>{const a=Lt(i,t.transform);return e.e(Jr(t,i,r,o),{u_tileratio:a,u_crossfade_from:n.fromScale,u_crossfade_to:n.toScale,u_image:0,u_mix:n.t,u_lineatlas_width:t.lineAtlas.width,u_lineatlas_height:t.lineAtlas.height})},io=(t,i,r,o,n,a)=>{const s=Lt(i,t.transform);return e.e(Jr(t,i,r,o),{u_image:0,u_image_height:a,u_tileratio:s,u_crossfade_from:n.fromScale,u_crossfade_to:n.toScale,u_image_dash:1,u_mix:n.t,u_lineatlas_width:t.lineAtlas.width,u_lineatlas_height:t.lineAtlas.height})},ro=(t,e,i,r,o)=>{return{u_tl_parent:t,u_scale_parent:e,u_buffer_scale:1,u_fade_t:i.mix,u_opacity:i.opacity*r.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:r.paint.get("raster-brightness-min"),u_brightness_high:r.paint.get("raster-brightness-max"),u_saturation_factor:(a=r.paint.get("raster-saturation"),a>0?1-1/(1.001-a):-a),u_contrast_factor:(n=r.paint.get("raster-contrast"),n>0?1/(1-n):1+n),u_spin_weights:Ft(r.paint.get("raster-hue-rotate")),u_coords_top:[o[0].x,o[0].y,o[1].x,o[1].y],u_coords_bottom:[o[3].x,o[3].y,o[2].x,o[2].y]};var n,a},oo=(t,e,i,r,o,n,a,s,l,c,u,h,p)=>{const d=a.transform;return{u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:d.cameraToCenterDistance,u_pitch:d.pitch/360*2*Math.PI,u_rotate_symbol:+i,u_aspect_ratio:d.width/d.height,u_fade_change:a.options.fadeDuration?a.symbolFadeChange:1,u_label_plane_matrix:s,u_coord_matrix:l,u_is_text:+u,u_pitch_with_map:+r,u_is_along_line:o,u_is_variable_anchor:n,u_texsize:h,u_texture:0,u_translation:c,u_pitched_scale:p}},no=(t,i,r,o,n,a,s,l,c,u,h,p,d,m)=>{const f=s.transform;return e.e(oo(t,i,r,o,n,a,s,l,c,u,h,p,m),{u_gamma_scale:o?Math.cos(f.pitch*Math.PI/180)*f.cameraToCenterDistance:1,u_device_pixel_ratio:s.pixelRatio,u_is_halo:d?1:0,u_is_plain:1})},ao=(t,i,r,o,n,a,s,l,c,u,h,p,d)=>e.e(no(t,i,r,o,n,a,s,l,c,u,!0,h,!0,d),{u_texsize_icon:p,u_texture_icon:1}),so=(t,e)=>({u_opacity:t,u_color:e}),lo=(t,i,r,o,n)=>e.e(function(t,i,r,o){const n=r.imageManager.getPattern(t.from.toString()),a=r.imageManager.getPattern(t.to.toString()),{width:s,height:l}=r.imageManager.getPixelSize(),c=Math.pow(2,o.tileID.overscaledZ),u=o.tileSize*Math.pow(2,r.transform.tileZoom)/c,h=u*(o.tileID.canonical.x+o.tileID.wrap*c),p=u*o.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:n.tl,u_pattern_br_a:n.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:i.t,u_pattern_size_a:n.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:i.fromScale,u_scale_b:i.toScale,u_tile_units_to_pixels:1/e.aK(o,1,r.transform.tileZoom),u_pixel_coord_upper:[h>>16,p>>16],u_pixel_coord_lower:[65535&h,65535&p]}}(r,n,i,o),{u_opacity:t}),co=()=>{},uo={fillExtrusion:(t,i)=>({u_lightpos:new e.c2(t,i.u_lightpos),u_lightpos_globe:new e.c2(t,i.u_lightpos_globe),u_lightintensity:new e.bp(t,i.u_lightintensity),u_lightcolor:new e.c2(t,i.u_lightcolor),u_vertical_gradient:new e.bp(t,i.u_vertical_gradient),u_opacity:new e.bp(t,i.u_opacity),u_fill_translate:new e.c3(t,i.u_fill_translate)}),fillExtrusionPattern:(t,i)=>({u_lightpos:new e.c2(t,i.u_lightpos),u_lightpos_globe:new e.c2(t,i.u_lightpos_globe),u_lightintensity:new e.bp(t,i.u_lightintensity),u_lightcolor:new e.c2(t,i.u_lightcolor),u_vertical_gradient:new e.bp(t,i.u_vertical_gradient),u_height_factor:new e.bp(t,i.u_height_factor),u_opacity:new e.bp(t,i.u_opacity),u_fill_translate:new e.c3(t,i.u_fill_translate),u_image:new e.b_(t,i.u_image),u_texsize:new e.c3(t,i.u_texsize),u_pixel_coord_upper:new e.c3(t,i.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(t,i.u_pixel_coord_lower),u_scale:new e.c2(t,i.u_scale),u_fade:new e.bp(t,i.u_fade)}),fill:(t,i)=>({u_fill_translate:new e.c3(t,i.u_fill_translate)}),fillPattern:(t,i)=>({u_image:new e.b_(t,i.u_image),u_texsize:new e.c3(t,i.u_texsize),u_pixel_coord_upper:new e.c3(t,i.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(t,i.u_pixel_coord_lower),u_scale:new e.c2(t,i.u_scale),u_fade:new e.bp(t,i.u_fade),u_fill_translate:new e.c3(t,i.u_fill_translate)}),fillOutline:(t,i)=>({u_world:new e.c3(t,i.u_world),u_fill_translate:new e.c3(t,i.u_fill_translate)}),fillOutlinePattern:(t,i)=>({u_world:new e.c3(t,i.u_world),u_image:new e.b_(t,i.u_image),u_texsize:new e.c3(t,i.u_texsize),u_pixel_coord_upper:new e.c3(t,i.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(t,i.u_pixel_coord_lower),u_scale:new e.c2(t,i.u_scale),u_fade:new e.bp(t,i.u_fade),u_fill_translate:new e.c3(t,i.u_fill_translate)}),circle:(t,i)=>({u_camera_to_center_distance:new e.bp(t,i.u_camera_to_center_distance),u_scale_with_map:new e.b_(t,i.u_scale_with_map),u_pitch_with_map:new e.b_(t,i.u_pitch_with_map),u_extrude_scale:new e.c3(t,i.u_extrude_scale),u_device_pixel_ratio:new e.bp(t,i.u_device_pixel_ratio),u_globe_extrude_scale:new e.bp(t,i.u_globe_extrude_scale),u_translate:new e.c3(t,i.u_translate)}), collisionBox:(t,i)=>({u_pixel_extrude_scale:new e.c3(t,i.u_pixel_extrude_scale)}),collisionCircle:(t,i)=>({u_viewport_size:new e.c3(t,i.u_viewport_size)}),debug:(t,i)=>({u_color:new e.b$(t,i.u_color),u_overlay:new e.b_(t,i.u_overlay),u_overlay_scale:new e.bp(t,i.u_overlay_scale)}),depth:co,clippingMask:co,heatmap:(t,i)=>({u_extrude_scale:new e.bp(t,i.u_extrude_scale),u_intensity:new e.bp(t,i.u_intensity),u_globe_extrude_scale:new e.bp(t,i.u_globe_extrude_scale)}),heatmapTexture:(t,i)=>({u_matrix:new e.c0(t,i.u_matrix),u_world:new e.c3(t,i.u_world),u_image:new e.b_(t,i.u_image),u_color_ramp:new e.b_(t,i.u_color_ramp),u_opacity:new e.bp(t,i.u_opacity)}),hillshade:(t,i)=>({u_image:new e.b_(t,i.u_image),u_latrange:new e.c3(t,i.u_latrange),u_exaggeration:new e.bp(t,i.u_exaggeration),u_altitudes:new e.c9(t,i.u_altitudes),u_azimuths:new e.c9(t,i.u_azimuths),u_accent:new e.b$(t,i.u_accent),u_method:new e.b_(t,i.u_method),u_shadows:new e.c8(t,i.u_shadows),u_highlights:new e.c8(t,i.u_highlights)}),hillshadePrepare:(t,i)=>({u_matrix:new e.c0(t,i.u_matrix),u_image:new e.b_(t,i.u_image),u_dimension:new e.c3(t,i.u_dimension),u_zoom:new e.bp(t,i.u_zoom),u_unpack:new e.c1(t,i.u_unpack)}),colorRelief:(t,i)=>({u_image:new e.b_(t,i.u_image),u_unpack:new e.c1(t,i.u_unpack),u_dimension:new e.c3(t,i.u_dimension),u_elevation_stops:new e.b_(t,i.u_elevation_stops),u_color_stops:new e.b_(t,i.u_color_stops),u_color_ramp_size:new e.b_(t,i.u_color_ramp_size),u_opacity:new e.bp(t,i.u_opacity)}),line:(t,i)=>({u_translation:new e.c3(t,i.u_translation),u_ratio:new e.bp(t,i.u_ratio),u_device_pixel_ratio:new e.bp(t,i.u_device_pixel_ratio),u_units_to_pixels:new e.c3(t,i.u_units_to_pixels)}),lineGradient:(t,i)=>({u_translation:new e.c3(t,i.u_translation),u_ratio:new e.bp(t,i.u_ratio),u_device_pixel_ratio:new e.bp(t,i.u_device_pixel_ratio),u_units_to_pixels:new e.c3(t,i.u_units_to_pixels),u_image:new e.b_(t,i.u_image),u_image_height:new e.bp(t,i.u_image_height)}),linePattern:(t,i)=>({u_translation:new e.c3(t,i.u_translation),u_texsize:new e.c3(t,i.u_texsize),u_ratio:new e.bp(t,i.u_ratio),u_device_pixel_ratio:new e.bp(t,i.u_device_pixel_ratio),u_image:new e.b_(t,i.u_image),u_units_to_pixels:new e.c3(t,i.u_units_to_pixels),u_scale:new e.c2(t,i.u_scale),u_fade:new e.bp(t,i.u_fade)}),lineSDF:(t,i)=>({u_translation:new e.c3(t,i.u_translation),u_ratio:new e.bp(t,i.u_ratio),u_device_pixel_ratio:new e.bp(t,i.u_device_pixel_ratio),u_units_to_pixels:new e.c3(t,i.u_units_to_pixels),u_image:new e.b_(t,i.u_image),u_mix:new e.bp(t,i.u_mix),u_tileratio:new e.bp(t,i.u_tileratio),u_crossfade_from:new e.bp(t,i.u_crossfade_from),u_crossfade_to:new e.bp(t,i.u_crossfade_to),u_lineatlas_width:new e.bp(t,i.u_lineatlas_width),u_lineatlas_height:new e.bp(t,i.u_lineatlas_height)}),lineGradientSDF:(t,i)=>({u_translation:new e.c3(t,i.u_translation),u_ratio:new e.bp(t,i.u_ratio),u_device_pixel_ratio:new e.bp(t,i.u_device_pixel_ratio),u_units_to_pixels:new e.c3(t,i.u_units_to_pixels),u_image:new e.b_(t,i.u_image),u_image_height:new e.bp(t,i.u_image_height),u_tileratio:new e.bp(t,i.u_tileratio),u_crossfade_from:new e.bp(t,i.u_crossfade_from),u_crossfade_to:new e.bp(t,i.u_crossfade_to),u_image_dash:new e.b_(t,i.u_image_dash),u_mix:new e.bp(t,i.u_mix),u_lineatlas_width:new e.bp(t,i.u_lineatlas_width),u_lineatlas_height:new e.bp(t,i.u_lineatlas_height)}),raster:(t,i)=>({u_tl_parent:new e.c3(t,i.u_tl_parent),u_scale_parent:new e.bp(t,i.u_scale_parent),u_buffer_scale:new e.bp(t,i.u_buffer_scale),u_fade_t:new e.bp(t,i.u_fade_t),u_opacity:new e.bp(t,i.u_opacity),u_image0:new e.b_(t,i.u_image0),u_image1:new e.b_(t,i.u_image1),u_brightness_low:new e.bp(t,i.u_brightness_low),u_brightness_high:new e.bp(t,i.u_brightness_high),u_saturation_factor:new e.bp(t,i.u_saturation_factor),u_contrast_factor:new e.bp(t,i.u_contrast_factor),u_spin_weights:new e.c2(t,i.u_spin_weights),u_coords_top:new e.c1(t,i.u_coords_top),u_coords_bottom:new e.c1(t,i.u_coords_bottom)}),symbolIcon:(t,i)=>({u_is_size_zoom_constant:new e.b_(t,i.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(t,i.u_is_size_feature_constant),u_size_t:new e.bp(t,i.u_size_t),u_size:new e.bp(t,i.u_size),u_camera_to_center_distance:new e.bp(t,i.u_camera_to_center_distance),u_pitch:new e.bp(t,i.u_pitch),u_rotate_symbol:new e.b_(t,i.u_rotate_symbol),u_aspect_ratio:new e.bp(t,i.u_aspect_ratio),u_fade_change:new e.bp(t,i.u_fade_change),u_label_plane_matrix:new e.c0(t,i.u_label_plane_matrix),u_coord_matrix:new e.c0(t,i.u_coord_matrix),u_is_text:new e.b_(t,i.u_is_text),u_pitch_with_map:new e.b_(t,i.u_pitch_with_map),u_is_along_line:new e.b_(t,i.u_is_along_line),u_is_variable_anchor:new e.b_(t,i.u_is_variable_anchor),u_texsize:new e.c3(t,i.u_texsize),u_texture:new e.b_(t,i.u_texture),u_translation:new e.c3(t,i.u_translation),u_pitched_scale:new e.bp(t,i.u_pitched_scale)}),symbolSDF:(t,i)=>({u_is_size_zoom_constant:new e.b_(t,i.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(t,i.u_is_size_feature_constant),u_size_t:new e.bp(t,i.u_size_t),u_size:new e.bp(t,i.u_size),u_camera_to_center_distance:new e.bp(t,i.u_camera_to_center_distance),u_pitch:new e.bp(t,i.u_pitch),u_rotate_symbol:new e.b_(t,i.u_rotate_symbol),u_aspect_ratio:new e.bp(t,i.u_aspect_ratio),u_fade_change:new e.bp(t,i.u_fade_change),u_label_plane_matrix:new e.c0(t,i.u_label_plane_matrix),u_coord_matrix:new e.c0(t,i.u_coord_matrix),u_is_text:new e.b_(t,i.u_is_text),u_pitch_with_map:new e.b_(t,i.u_pitch_with_map),u_is_along_line:new e.b_(t,i.u_is_along_line),u_is_variable_anchor:new e.b_(t,i.u_is_variable_anchor),u_texsize:new e.c3(t,i.u_texsize),u_texture:new e.b_(t,i.u_texture),u_gamma_scale:new e.bp(t,i.u_gamma_scale),u_device_pixel_ratio:new e.bp(t,i.u_device_pixel_ratio),u_is_halo:new e.b_(t,i.u_is_halo),u_is_plain:new e.b_(t,i.u_is_plain),u_translation:new e.c3(t,i.u_translation),u_pitched_scale:new e.bp(t,i.u_pitched_scale)}),symbolTextAndIcon:(t,i)=>({u_is_size_zoom_constant:new e.b_(t,i.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(t,i.u_is_size_feature_constant),u_size_t:new e.bp(t,i.u_size_t),u_size:new e.bp(t,i.u_size),u_camera_to_center_distance:new e.bp(t,i.u_camera_to_center_distance),u_pitch:new e.bp(t,i.u_pitch),u_rotate_symbol:new e.b_(t,i.u_rotate_symbol),u_aspect_ratio:new e.bp(t,i.u_aspect_ratio),u_fade_change:new e.bp(t,i.u_fade_change),u_label_plane_matrix:new e.c0(t,i.u_label_plane_matrix),u_coord_matrix:new e.c0(t,i.u_coord_matrix),u_is_text:new e.b_(t,i.u_is_text),u_pitch_with_map:new e.b_(t,i.u_pitch_with_map),u_is_along_line:new e.b_(t,i.u_is_along_line),u_is_variable_anchor:new e.b_(t,i.u_is_variable_anchor),u_texsize:new e.c3(t,i.u_texsize),u_texsize_icon:new e.c3(t,i.u_texsize_icon),u_texture:new e.b_(t,i.u_texture),u_texture_icon:new e.b_(t,i.u_texture_icon),u_gamma_scale:new e.bp(t,i.u_gamma_scale),u_device_pixel_ratio:new e.bp(t,i.u_device_pixel_ratio),u_is_halo:new e.b_(t,i.u_is_halo),u_translation:new e.c3(t,i.u_translation),u_pitched_scale:new e.bp(t,i.u_pitched_scale)}),background:(t,i)=>({u_opacity:new e.bp(t,i.u_opacity),u_color:new e.b$(t,i.u_color)}),backgroundPattern:(t,i)=>({u_opacity:new e.bp(t,i.u_opacity),u_image:new e.b_(t,i.u_image),u_pattern_tl_a:new e.c3(t,i.u_pattern_tl_a),u_pattern_br_a:new e.c3(t,i.u_pattern_br_a),u_pattern_tl_b:new e.c3(t,i.u_pattern_tl_b),u_pattern_br_b:new e.c3(t,i.u_pattern_br_b),u_texsize:new e.c3(t,i.u_texsize),u_mix:new e.bp(t,i.u_mix),u_pattern_size_a:new e.c3(t,i.u_pattern_size_a),u_pattern_size_b:new e.c3(t,i.u_pattern_size_b),u_scale_a:new e.bp(t,i.u_scale_a),u_scale_b:new e.bp(t,i.u_scale_b),u_pixel_coord_upper:new e.c3(t,i.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(t,i.u_pixel_coord_lower),u_tile_units_to_pixels:new e.bp(t,i.u_tile_units_to_pixels)}),terrain:(t,i)=>({u_texture:new e.b_(t,i.u_texture),u_ele_delta:new e.bp(t,i.u_ele_delta),u_fog_matrix:new e.c0(t,i.u_fog_matrix),u_fog_color:new e.b$(t,i.u_fog_color),u_fog_ground_blend:new e.bp(t,i.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.bp(t,i.u_fog_ground_blend_opacity),u_horizon_color:new e.b$(t,i.u_horizon_color),u_horizon_fog_blend:new e.bp(t,i.u_horizon_fog_blend),u_is_globe_mode:new e.bp(t,i.u_is_globe_mode)}),terrainDepth:(t,i)=>({u_ele_delta:new e.bp(t,i.u_ele_delta)}),terrainCoords:(t,i)=>({u_texture:new e.b_(t,i.u_texture),u_terrain_coords_id:new e.bp(t,i.u_terrain_coords_id),u_ele_delta:new e.bp(t,i.u_ele_delta)}),projectionErrorMeasurement:(t,i)=>({u_input:new e.bp(t,i.u_input),u_output_expected:new e.bp(t,i.u_output_expected)}),atmosphere:(t,i)=>({u_sun_pos:new e.c2(t,i.u_sun_pos),u_atmosphere_blend:new e.bp(t,i.u_atmosphere_blend),u_globe_position:new e.c2(t,i.u_globe_position),u_globe_radius:new e.bp(t,i.u_globe_radius),u_inv_proj_matrix:new e.c0(t,i.u_inv_proj_matrix)}),sky:(t,i)=>({u_sky_color:new e.b$(t,i.u_sky_color),u_horizon_color:new e.b$(t,i.u_horizon_color),u_horizon:new e.c3(t,i.u_horizon),u_horizon_normal:new e.c3(t,i.u_horizon_normal),u_sky_horizon_blend:new e.bp(t,i.u_sky_horizon_blend),u_sky_blend:new e.bp(t,i.u_sky_blend)})};class ho{constructor(t,e,i){this.context=t;const r=t.gl;this.buffer=r.createBuffer(),this.dynamicDraw=Boolean(i),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||e.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(t){const e=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const po={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class mo{constructor(t,e,i,r){this.length=e.length,this.attributes=i,this.itemSize=e.bytesPerElement,this.dynamicDraw=r,this.context=t;const o=t.gl;this.buffer=o.createBuffer(),t.bindVertexBuffer.set(this.buffer),o.bufferData(o.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?o.DYNAMIC_DRAW:o.STATIC_DRAW),this.dynamicDraw||e.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(t){if(t.length!==this.length)throw new Error(`Length of new data is ${t.length}, which doesn't match current length of ${this.length}`);const e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)}enableAttributes(t,e){for(const i of this.attributes){const r=e.attributes[i.name];void 0!==r&&t.enableVertexAttribArray(r)}}setVertexAttribPointers(t,e,i){for(const r of this.attributes){const o=e.attributes[r.name];void 0!==o&&t.vertexAttribPointer(o,r.components,t[po[r.type]],!1,this.itemSize,r.offset+this.itemSize*(i||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class fo{constructor(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(t){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class _o extends fo{getDefault(){return e.bo.transparent}set(t){const e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)}}class go extends fo{getDefault(){return 1}set(t){(t!==this.current||this.dirty)&&(this.gl.clearDepth(t),this.current=t,this.dirty=!1)}}class yo extends fo{getDefault(){return 0}set(t){(t!==this.current||this.dirty)&&(this.gl.clearStencil(t),this.current=t,this.dirty=!1)}}class vo extends fo{getDefault(){return[!0,!0,!0,!0]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)}}class bo extends fo{getDefault(){return!0}set(t){(t!==this.current||this.dirty)&&(this.gl.depthMask(t),this.current=t,this.dirty=!1)}}class xo extends fo{getDefault(){return 255}set(t){(t!==this.current||this.dirty)&&(this.gl.stencilMask(t),this.current=t,this.dirty=!1)}}class wo extends fo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(t){const e=this.current;(t.func!==e.func||t.ref!==e.ref||t.mask!==e.mask||this.dirty)&&(this.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1)}}class To extends fo{getDefault(){const t=this.gl;return[t.KEEP,t.KEEP,t.KEEP]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||this.dirty)&&(this.gl.stencilOp(t[0],t[1],t[2]),this.current=t,this.dirty=!1)}}class ko extends fo{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1}}class Mo extends fo{getDefault(){return[0,1]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.depthRange(t[0],t[1]),this.current=t,this.dirty=!1)}}class So extends fo{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1}}class Po extends fo{getDefault(){return this.gl.LESS}set(t){(t!==this.current||this.dirty)&&(this.gl.depthFunc(t),this.current=t,this.dirty=!1)}}class Ao extends fo{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1}}class Io extends fo{getDefault(){const t=this.gl;return[t.ONE,t.ZERO]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.blendFunc(t[0],t[1]),this.current=t,this.dirty=!1)}}class Co extends fo{getDefault(){return e.bo.transparent}set(t){const e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)}}class Eo extends fo{getDefault(){return this.gl.FUNC_ADD}set(t){(t!==this.current||this.dirty)&&(this.gl.blendEquation(t),this.current=t,this.dirty=!1)}}class zo extends fo{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1}}class Do extends fo{getDefault(){return this.gl.BACK}set(t){(t!==this.current||this.dirty)&&(this.gl.cullFace(t),this.current=t,this.dirty=!1)}}class Oo extends fo{getDefault(){return this.gl.CCW}set(t){(t!==this.current||this.dirty)&&(this.gl.frontFace(t),this.current=t,this.dirty=!1)}}class Lo extends fo{getDefault(){return null}set(t){(t!==this.current||this.dirty)&&(this.gl.useProgram(t),this.current=t,this.dirty=!1)}}class Ro extends fo{getDefault(){return this.gl.TEXTURE0}set(t){(t!==this.current||this.dirty)&&(this.gl.activeTexture(t),this.current=t,this.dirty=!1)}}class Fo extends fo{getDefault(){const t=this.gl;return[0,0,t.drawingBufferWidth,t.drawingBufferHeight]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)}}class Bo extends fo{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1}}class jo extends fo{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}}class Vo extends fo{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1}}class No extends fo{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}}class Uo extends fo{getDefault(){return null}set(t){const e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1}}class Go extends fo{getDefault(){return null}set(t){var e;if(t===this.current&&!this.dirty)return;const i=this.gl;gt(i)?i.bindVertexArray(t):null===(e=i.getExtension("OES_vertex_array_object"))||void 0===e||e.bindVertexArrayOES(t),this.current=t,this.dirty=!1}}class Zo extends fo{getDefault(){return 4}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}}class $o extends fo{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}}class qo extends fo{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}}class Wo extends fo{constructor(t,e){super(t),this.context=t,this.parent=e}getDefault(){return null}}class Ho extends Wo{setDirty(){this.dirty=!0}set(t){if(t===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}}class Yo extends Wo{set(t){if(t===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const e=this.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t,this.dirty=!1}}class Xo extends Wo{set(t){if(t===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const e=this.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t),this.current=t,this.dirty=!1}}const Ko="Framebuffer is not complete";class Jo{constructor(t,e,i,r,o){this.context=t,this.width=e,this.height=i;const n=t.gl,a=this.framebuffer=n.createFramebuffer();if(this.colorAttachment=new Ho(t,a),r)this.depthAttachment=o?new Xo(t,a):new Yo(t,a);else if(o)throw new Error("Stencil cannot be set without depth");if(n.checkFramebufferStatus(n.FRAMEBUFFER)!==n.FRAMEBUFFER_COMPLETE)throw new Error(Ko)}destroy(){const t=this.context.gl,e=this.colorAttachment.get();if(e&&t.deleteTexture(e),this.depthAttachment){const e=this.depthAttachment.get();e&&t.deleteRenderbuffer(e)}t.deleteFramebuffer(this.framebuffer)}}class Qo{constructor(t){var e,i;if(this.gl=t,this.clearColor=new _o(this),this.clearDepth=new go(this),this.clearStencil=new yo(this),this.colorMask=new vo(this),this.depthMask=new bo(this),this.stencilMask=new xo(this),this.stencilFunc=new wo(this),this.stencilOp=new To(this),this.stencilTest=new ko(this),this.depthRange=new Mo(this),this.depthTest=new So(this),this.depthFunc=new Po(this),this.blend=new Ao(this),this.blendFunc=new Io(this),this.blendColor=new Co(this),this.blendEquation=new Eo(this),this.cullFace=new zo(this),this.cullFaceSide=new Do(this),this.frontFace=new Oo(this),this.program=new Lo(this),this.activeTexture=new Ro(this),this.viewport=new Fo(this),this.bindFramebuffer=new Bo(this),this.bindRenderbuffer=new jo(this),this.bindTexture=new Vo(this),this.bindVertexBuffer=new No(this),this.bindElementBuffer=new Uo(this),this.bindVertexArray=new Go(this),this.pixelStoreUnpack=new Zo(this),this.pixelStoreUnpackPremultiplyAlpha=new $o(this),this.pixelStoreUnpackFlipY=new qo(this),this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=t.getParameter(t.MAX_TEXTURE_SIZE),gt(t)){this.HALF_FLOAT=t.HALF_FLOAT;const r=t.getExtension("EXT_color_buffer_half_float");this.RGBA16F=null!==(e=t.RGBA16F)&&void 0!==e?e:null==r?void 0:r.RGBA16F_EXT,this.RGB16F=null!==(i=t.RGB16F)&&void 0!==i?i:null==r?void 0:r.RGB16F_EXT,t.getExtension("EXT_color_buffer_float")}else{t.getExtension("EXT_color_buffer_half_float"),t.getExtension("OES_texture_half_float_linear");const e=t.getExtension("OES_texture_half_float");this.HALF_FLOAT=null==e?void 0:e.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(t,e){return new ho(this,t,e)}createVertexBuffer(t,e,i){return new mo(this,t,e,i)}createRenderbuffer(t,e,i){const r=this.gl,o=r.createRenderbuffer();return this.bindRenderbuffer.set(o),r.renderbufferStorage(r.RENDERBUFFER,t,e,i),this.bindRenderbuffer.set(null),o}createFramebuffer(t,e,i,r){return new Jo(this,t,e,i,r)}clear({color:t,depth:e,stencil:i}){const r=this.gl;let o=0;t&&(o|=r.COLOR_BUFFER_BIT,this.clearColor.set(t),this.colorMask.set([!0,!0,!0,!0])),void 0!==e&&(o|=r.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(e),this.depthMask.set(!0)),void 0!==i&&(o|=r.STENCIL_BUFFER_BIT,this.clearStencil.set(i),this.stencilMask.set(255)),r.clear(o)}setCullFace(t){!1===t.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(t.mode),this.frontFace.set(t.frontFace))}setDepthMode(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)}setStencilMode(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)}setColorMode(t){e.bQ(t.blendFunction,hr.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(t.blendFunction),this.blendColor.set(t.blendColor)),this.colorMask.set(t.mask)}createVertexArray(){var t;return gt(this.gl)?this.gl.createVertexArray():null===(t=this.gl.getExtension("OES_vertex_array_object"))||void 0===t?void 0:t.createVertexArrayOES()}deleteVertexArray(t){var e;gt(this.gl)?this.gl.deleteVertexArray(t):null===(e=this.gl.getExtension("OES_vertex_array_object"))||void 0===e||e.deleteVertexArrayOES(t)}unbindVAO(){this.bindVertexArray.set(null)}}let tn;const en=e.ap(new Float32Array(16));let rn=0;const on=[new e.P(0,0),new e.P(e.a6,0),new e.P(e.a6,e.a6),new e.P(0,e.a6)],nn=new e.bo(1,0,0,1),an=new e.bo(0,1,0,1),sn=new e.bo(0,0,1,1),ln=new e.bo(1,0,1,1),cn=new e.bo(0,1,1,1),un={symbol:function(t,i,r,o,n,a){if("translucent"!==t.renderPass)return;const{isRenderingToTexture:s}=a,l=_r.disabled,c=t.colorModeForRenderPass();(r._unevaluatedLayout.hasValue("text-variable-anchor")||r._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(t,i,r,o,n,a,s,l,c){var u;const h=i.transform,p=i.style.map.terrain,d="map"===n,m="map"===a;for(const n of t){const t=o.getTile(n),a=t.getBucket(r);if(!(null===(u=null==a?void 0:a.text)||void 0===u?void 0:u.segments.get().length))continue;const f=e.aw(a.textSizeData,h.zoom),_=e.aK(t,1,i.transform.zoom),g=U(d,i.transform,_),y="none"!==r.layout.get("icon-text-fit")&&a.hasIconData();if(f){const i=Math.pow(2,h.zoom-t.tileID.overscaledZ),r=p?(t,e)=>p.getElevation(n,t,e):null;Nt(a,d,m,c,h,g,i,f,y,e.aL(h,t,s,l),n.toUnwrapped(),r)}}}(o,t,r,i,r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),n),0!==r.paint.get("icon-opacity").constantOr(1)&&Gt(t,i,r,o,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),l,c,s),0!==r.paint.get("text-opacity").constantOr(1)&&Gt(t,i,r,o,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),l,c,s),i.map.showCollisionBoxes&&(Bt(t,i,r,o,!0),Bt(t,i,r,o,!1))},circle:function(t,i,r,o,n){var a;if("translucent"!==t.renderPass)return;const{isRenderingToTexture:s}=n,l=r.paint.get("circle-opacity"),c=r.paint.get("circle-stroke-width"),u=r.paint.get("circle-stroke-opacity"),h=!r.layout.get("circle-sort-key").isConstant();if(0===l.constantOr(1)&&(0===c.constantOr(1)||0===u.constantOr(1)))return;const p=t.context,d=p.gl,m=t.transform,f=t.getDepthModeForSublayer(0,mr.ReadOnly),_=_r.disabled,g=t.colorModeForRenderPass(),y=[],v=m.getCircleRadiusCorrection();for(const n of o){const o=i.getTile(n),l=o.getBucket(r);if(!l)continue;const c=r.paint.get("circle-translate"),u=r.paint.get("circle-translate-anchor"),p=e.aL(m,o,c,u),d=l.programConfigurations.get(r.id),f=t.useProgram("circle",d),_=l.layoutVertexBuffer,g=l.indexBuffer,b=null===(a=t.style.map.terrain)||void 0===a?void 0:a.getTerrainData(n),x={programConfiguration:d,program:f,layoutVertexBuffer:_,indexBuffer:g,uniformValues:Gr(t,o,r,p,v),terrainData:b,projectionData:m.getProjectionData({overscaledTileID:n,applyGlobeMatrix:!s,applyTerrainMatrix:!0})};if(h){const t=l.segments.get();for(const i of t)y.push({segments:new e.aV([i]),sortKey:i.sortKey,state:x})}else y.push({segments:l.segments,sortKey:0,state:x})}h&&y.sort((t,e)=>t.sortKey-e.sortKey);for(const e of y){const{programConfiguration:i,program:o,layoutVertexBuffer:n,indexBuffer:a,uniformValues:s,terrainData:l,projectionData:c}=e.state;o.draw(p,d.TRIANGLES,f,_,g,dr.backCCW,s,l,c,r.id,n,a,e.segments,r.paint,t.transform.zoom,i)}},heatmap:function(t,i,r,o,n){if(0===r.paint.get("heatmap-opacity"))return;const a=t.context,{isRenderingToTexture:s,isRenderingGlobe:l}=n;if(t.style.map.terrain){for(const e of o){const o=i.getTile(e);i.hasRenderableParent(e)||("offscreen"===t.renderPass?$t(t,o,r,e,l):"translucent"===t.renderPass&&qt(t,r,e,s,l))}a.viewport.set([0,0,t.width,t.height])}else"offscreen"===t.renderPass?function(t,i,r,o){const n=t.context,a=n.gl,s=t.transform,l=_r.disabled,c=new hr([a.ONE,a.ONE],e.bo.transparent,[!0,!0,!0,!0]);(function(t,i,r){const o=t.gl;t.activeTexture.set(o.TEXTURE1),t.viewport.set([0,0,i.width/4,i.height/4]);let n=r.heatmapFbos.get(e.cd);n?(o.bindTexture(o.TEXTURE_2D,n.colorAttachment.get()),t.bindFramebuffer.set(n.framebuffer)):(n=Wt(t,i.width/4,i.height/4),r.heatmapFbos.set(e.cd,n))})(n,t,r),n.clear({color:e.bo.transparent});for(const e of o){if(i.hasRenderableParent(e))continue;const o=i.getTile(e),u=o.getBucket(r);if(!u)continue;const h=u.programConfigurations.get(r.id),p=t.useProgram("heatmap",h),d=s.getProjectionData({overscaledTileID:e,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),m=s.getCircleRadiusCorrection();p.draw(n,a.TRIANGLES,mr.disabled,l,c,dr.backCCW,Wr(o,s.zoom,r.paint.get("heatmap-intensity"),m),null,d,r.id,u.layoutVertexBuffer,u.indexBuffer,u.segments,r.paint,s.zoom,h)}n.viewport.set([0,0,t.width,t.height])}(t,i,r,o):"translucent"===t.renderPass&&function(t,i){const r=t.context,o=r.gl;r.setColorMode(t.colorModeForRenderPass());const n=i.heatmapFbos.get(e.cd);n&&(r.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,n.colorAttachment.get()),r.activeTexture.set(o.TEXTURE1),Ht(r,i).bind(o.LINEAR,o.CLAMP_TO_EDGE),t.useProgram("heatmapTexture").draw(r,o.TRIANGLES,mr.disabled,_r.disabled,t.colorModeForRenderPass(),dr.disabled,Hr(t,i,0,1),null,null,i.id,t.viewportBuffer,t.quadTriangleIndexBuffer,t.viewportSegments,i.paint,t.transform.zoom))}(t,r)},line:function(t,e,i,r,o){var n;if("translucent"!==t.renderPass)return;const{isRenderingToTexture:a}=o,s=i.paint.get("line-opacity"),l=i.paint.get("line-width");if(0===s.constantOr(1)||0===l.constantOr(1))return;const c=t.getDepthModeForSublayer(0,mr.ReadOnly),u=t.colorModeForRenderPass(),h=i.paint.get("line-dasharray"),p=h.constantOr(1),d=i.paint.get("line-pattern"),m=d.constantOr(1),f=i.paint.get("line-gradient"),_=i.getCrossfadeParameters();let g;g=m?"linePattern":p&&f?"lineGradientSDF":p?"lineSDF":f?"lineGradient":"line";const y=t.context,v=y.gl,b=t.transform;let x=!0;for(const o of r){const r=e.getTile(o);if(m&&!r.patternsLoaded())continue;const s=r.getBucket(i);if(!s)continue;const l=s.programConfigurations.get(i.id),w=t.context.program.get(),T=t.useProgram(g,l),k=x||T.program!==w,M=null===(n=t.style.map.terrain)||void 0===n?void 0:n.getTerrainData(o),S=d.constantOr(null),P=null==h?void 0:h.constantOr(null);if(S&&r.imageAtlas){const t=r.imageAtlas,e=t.patternPositions[S.to.toString()],i=t.patternPositions[S.from.toString()];e&&i&&l.setConstantPatternPositions(e,i)}else if(P){const e="round"===i.layout.get("line-cap").constantOr(null),r=t.lineAtlas.getDash(P.to,e),o=t.lineAtlas.getDash(P.from,e);l.setConstantDashPositions(r,o)}const A=b.getProjectionData({overscaledTileID:o,applyGlobeMatrix:!a,applyTerrainMatrix:!0}),I=b.getPixelScale();let C;m?(C=to(t,r,i,I,_),Xt(y,v,r,l,_)):p&&f?(C=io(t,r,i,I,_,s.lineClipsArray.length),Qt(t,e,y,v,i,s,o,l,_)):p?(C=eo(t,r,i,I,_),Kt(t,y,v,l,k,_)):f?(C=Qr(t,r,i,I,s.lineClipsArray.length),Jt(t,e,y,v,i,s,o)):C=Jr(t,r,i,I);const E=t.stencilModeForClipping(o);T.draw(y,v.TRIANGLES,c,E,u,dr.disabled,C,M,A,i.id,s.layoutVertexBuffer,s.indexBuffer,s.segments,i.paint,t.transform.zoom,l,s.layoutVertexBuffer2),x=!1}},fill:function(t,i,r,o,n){const a=r.paint.get("fill-color"),s=r.paint.get("fill-opacity");if(0===s.constantOr(1))return;const{isRenderingToTexture:l}=n,c=t.colorModeForRenderPass(),u=r.paint.get("fill-pattern"),h=t.opaquePassEnabledForLayer()&&!u.constantOr(1)&&1===a.constantOr(e.bo.transparent).a&&1===s.constantOr(0)?"opaque":"translucent";if(t.renderPass===h){const e=t.getDepthModeForSublayer(1,"opaque"===t.renderPass?mr.ReadWrite:mr.ReadOnly);ee(t,i,r,o,e,c,!1,l)}if("translucent"===t.renderPass&&r.paint.get("fill-antialias")){const e=t.getDepthModeForSublayer(r.getPaintProperty("fill-outline-color")?2:0,mr.ReadOnly);ee(t,i,r,o,e,c,!0,l)}},fillExtrusion:function(t,e,i,r,o){const n=i.paint.get("fill-extrusion-opacity");if(0===n)return;const{isRenderingToTexture:a}=o;if("translucent"===t.renderPass){const o=new mr(t.context.gl.LEQUAL,mr.ReadWrite,t.depthRangeFor3D);if(1!==n||i.paint.get("fill-extrusion-pattern").constantOr(1))ie(t,e,i,r,o,_r.disabled,hr.disabled,a),ie(t,e,i,r,o,t.stencilModeFor3D(),t.colorModeForRenderPass(),a);else{const n=t.colorModeForRenderPass();ie(t,e,i,r,o,_r.disabled,n,a)}}},hillshade:function(t,i,r,o,n){if("offscreen"!==t.renderPass&&"translucent"!==t.renderPass)return;const{isRenderingToTexture:a}=n,s=t.context,l=t.style.projection.useSubdivision,c=t.getDepthModeForSublayer(0,mr.ReadOnly),u=t.colorModeForRenderPass();if("offscreen"===t.renderPass)!function(t,i,r,o,n,a,s){const l=t.context,c=l.gl,u="nearest"===o.paint.get("resampling")?c.NEAREST:c.LINEAR;for(const h of r){const r=i.getTile(h),p=r.dem;if(!(null==p?void 0:p.data))continue;if(!r.needsHillshadePrepare)continue;const d=p.dim,m=p.stride,f=p.getPixels();if(l.activeTexture.set(c.TEXTURE1),l.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture||(r.demTexture=t.getTileTexture(m)),r.demTexture){const t=r.demTexture;t.update(f,{premultiply:!1}),t.bind(c.NEAREST,c.CLAMP_TO_EDGE)}else r.demTexture=new e.T(l,f,c.RGBA,{premultiply:!1}),r.demTexture.bind(c.NEAREST,c.CLAMP_TO_EDGE);l.activeTexture.set(c.TEXTURE0);let _=r.fbo;if(!_){const t=new e.T(l,{width:d,height:d,data:null},c.RGBA);t.bind(u,c.CLAMP_TO_EDGE),_=r.fbo=l.createFramebuffer(d,d,!0,!1),_.colorAttachment.set(t.texture)}l.bindFramebuffer.set(_.framebuffer),l.viewport.set([0,0,d,d]),t.useProgram("hillshadePrepare").draw(l,c.TRIANGLES,n,a,s,dr.disabled,Xr(r.tileID,p),null,null,o.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments),r.needsHillshadePrepare=!1}}(t,i,o,r,c,_r.disabled,u), s.viewport.set([0,0,t.width,t.height]);else if("translucent"===t.renderPass)if(l){const[e,n,s]=t.stencilConfigForOverlapTwoPass(o);re(t,i,r,s,e,c,u,!1,a),re(t,i,r,s,n,c,u,!0,a)}else{const[e,n]=t.getStencilConfigForOverlapAndUpdateStencilID(o);re(t,i,r,n,e,c,u,!1,a)}},colorRelief:function(t,e,i,r,o){if("translucent"!==t.renderPass)return;if(!r.length)return;const{isRenderingToTexture:n}=o,a=t.style.projection.useSubdivision,s=t.getDepthModeForSublayer(0,mr.ReadOnly),l=t.colorModeForRenderPass();if(a){const[o,a,c]=t.stencilConfigForOverlapTwoPass(r);oe(t,e,i,c,o,s,l,!1,n),oe(t,e,i,c,a,s,l,!0,n)}else{const[o,a]=t.getStencilConfigForOverlapAndUpdateStencilID(r);oe(t,e,i,a,o,s,l,!1,n)}},raster:function(t,e,i,r,o){if("translucent"!==t.renderPass)return;if(0===i.paint.get("raster-opacity"))return;if(!r.length)return;const{isRenderingToTexture:n}=o,a=e.getSource(),s=t.style.projection.useSubdivision;if(a instanceof si)ne(t,e,i,r,null,!1,!1,a.tileCoords,a.flippedWindingOrder,n);else if(s){const[o,a,s]=t.stencilConfigForOverlapTwoPass(r);ne(t,e,i,s,o,!1,!0,on,!1,n),ne(t,e,i,s,a,!0,!0,on,!1,n)}else{const[o,a]=t.getStencilConfigForOverlapAndUpdateStencilID(r);ne(t,e,i,a,o,!1,!0,on,!1,n)}},background:function(t,e,i,r,o){var n;const a=i.paint.get("background-color"),s=i.paint.get("background-opacity");if(0===s)return;const{isRenderingToTexture:l}=o,c=t.context,u=c.gl,h=t.style.projection,p=t.transform,d=p.tileSize,m=i.paint.get("background-pattern");if(t.isPatternMissing(m))return;const f=!m&&1===a.a&&1===s&&t.opaquePassEnabledForLayer()?"opaque":"translucent";if(t.renderPass!==f)return;const _=_r.disabled,g=t.getDepthModeForSublayer(0,"opaque"===f?mr.ReadWrite:mr.ReadOnly),y=t.colorModeForRenderPass(),v=t.useProgram(m?"backgroundPattern":"background"),b=r||D(p,{tileSize:d,terrain:t.style.map.terrain});m&&(c.activeTexture.set(u.TEXTURE0),t.imageManager.bind(t.context));const x=i.getCrossfadeParameters();for(const e of b){const r=p.getProjectionData({overscaledTileID:e,applyGlobeMatrix:!l,applyTerrainMatrix:!0}),o=m?lo(s,t,m,{tileID:e,tileSize:d},x):so(s,a),f=null===(n=t.style.map.terrain)||void 0===n?void 0:n.getTerrainData(e),b=h.getMeshFromTileID(c,e.canonical,!1,!0,"raster");v.draw(c,u.TRIANGLES,g,_,y,dr.backCCW,o,f,r,i.id,b.vertexBuffer,b.indexBuffer,b.segments)}},sky:function(t,e){const i=t.context,r=i.gl,o=((t,e,i)=>{const r=Math.cos(e.rollInRadians),o=Math.sin(e.rollInRadians),n=M(e),a=e.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:t.properties.get("sky-color"),u_horizon_color:t.properties.get("horizon-color"),u_horizon:[(e.width/2-n*o)*i,(e.height/2+n*r)*i],u_horizon_normal:[-o,r],u_sky_horizon_blend:t.properties.get("sky-horizon-blend")*e.height/2*i,u_sky_blend:a}})(e,t.style.map.transform,t.pixelRatio),n=new mr(r.LEQUAL,mr.ReadWrite,[0,1]),a=_r.disabled,s=t.colorModeForRenderPass(),l=t.useProgram("sky"),c=pe(i,e);l.draw(i,r.TRIANGLES,n,a,s,dr.disabled,o,null,void 0,"sky",c.vertexBuffer,c.indexBuffer,c.segments)},atmosphere:function(t,i,r){const o=t.context,n=o.gl,a=t.useProgram("atmosphere"),s=new mr(n.LEQUAL,mr.ReadOnly,[0,1]),l=t.transform,c=function(t,i){const r=t.properties.get("position"),o=[-r.x,-r.y,-r.z],n=e.ap(new Float64Array(16));return"map"===t.properties.get("anchor")&&(e.be(n,n,i.rollInRadians),e.bf(n,n,-i.pitchInRadians),e.be(n,n,i.bearingInRadians),e.bf(n,n,i.center.lat*Math.PI/180),e.bI(n,n,-i.center.lng*Math.PI/180)),e.cg(o,o,n),o}(r,t.transform),u=l.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),h=i.properties.get("atmosphere-blend")*u.projectionTransition;if(0===h)return;const p=wt(l.worldSize,l.center.lat),d=l.inverseProjectionMatrix,m=new Float64Array(4);m[3]=1,e.aE(m,m,l.modelViewProjectionMatrix),m[0]/=m[3],m[1]/=m[3],m[2]/=m[3],m[3]=1,e.aE(m,m,d),m[0]/=m[3],m[1]/=m[3],m[2]/=m[3],m[3]=1;const f=((t,e,i,r,o)=>({u_sun_pos:t,u_atmosphere_blend:e,u_globe_position:i,u_globe_radius:r,u_inv_proj_matrix:o}))(c,h,[m[0],m[1],m[2]],p,d),_=pe(o,i);a.draw(o,n.TRIANGLES,s,_r.disabled,hr.alphaBlended,dr.disabled,f,null,null,"atmosphere",_.vertexBuffer,_.indexBuffer,_.segments)},custom:function(t,e,i,r){const{isRenderingGlobe:o}=r,n=t.context,a=i.implementation,s=t.style.projection,l=t.transform,c=l.getProjectionDataForCustomLayer(o),u={farZ:l.farZ,nearZ:l.nearZ,fov:l.fov*Math.PI/180,modelViewProjectionMatrix:l.modelViewProjectionMatrix,projectionMatrix:l.projectionMatrix,shaderData:{variantName:s.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793;\nuniform mat4 u_projection_matrix;\n${s.shaderPreludeCode.vertexSource}`,define:s.shaderDefine},defaultProjectionData:c},h=a.renderingMode?a.renderingMode:"2d";if("offscreen"===t.renderPass){const e=a.prerender;e&&(t.setCustomLayerDefaults(),n.setColorMode(t.colorModeForRenderPass()),e.call(a,n.gl,u),n.setDirty(),t.setBaseState())}else if("translucent"===t.renderPass){t.setCustomLayerDefaults(),n.setColorMode(t.colorModeForRenderPass()),n.setStencilMode(_r.disabled);const e="3d"===h?t.getDepthModeFor3D():t.getDepthModeForSublayer(0,mr.ReadOnly);n.setDepthMode(e),a.render(n.gl,u),n.setDirty(),t.setBaseState(),n.bindFramebuffer.set(null)}},debug:function(t,e,i){for(const r of i)ue(t,e,r)},debugPadding:function(t){const e=t.transform.padding;se(t,t.transform.height-(e.top||0),3,nn),se(t,e.bottom||0,3,an),le(t,e.left||0,3,sn),le(t,t.transform.width-(e.right||0),3,ln);const i=t.transform.centerPoint;!function(t,e,i,r){ce(t,e-1,i-10,2,20,r),ce(t,e-10,i-1,20,2,r)}(t,i.x,t.transform.height-i.y,cn)},terrainDepth:function(t,i){const r=t.context,o=r.gl,n=t.transform,a=hr.unblended,s=new mr(o.LEQUAL,mr.ReadWrite,[0,1]),l=i.tileManager.getRenderableTiles(),c=t.useProgram("terrainDepth");r.bindFramebuffer.set(i.getFramebuffer("depth").framebuffer),r.viewport.set([0,0,t.width/devicePixelRatio,t.height/devicePixelRatio]),r.clear({color:e.bo.transparent,depth:1});for(const t of l){const e=i.getTerrainMesh(t.tileID),l=i.getTerrainData(t.tileID),u=n.getProjectionData({overscaledTileID:t.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),h={u_ele_delta:i.getMeshFrameDelta(n.zoom)};c.draw(r,o.TRIANGLES,s,_r.disabled,a,dr.backCCW,h,l,u,"terrain",e.vertexBuffer,e.indexBuffer,e.segments)}r.bindFramebuffer.set(null),r.viewport.set([0,0,t.width,t.height])},terrainCoords:function(t,i){const r=t.context,o=r.gl,n=t.transform,a=hr.unblended,s=new mr(o.LEQUAL,mr.ReadWrite,[0,1]),l=i.getCoordsTexture(),c=i.tileManager.getRenderableTiles(),u=t.useProgram("terrainCoords");r.bindFramebuffer.set(i.getFramebuffer("coords").framebuffer),r.viewport.set([0,0,t.width/devicePixelRatio,t.height/devicePixelRatio]),r.clear({color:e.bo.transparent,depth:1}),i.coordsIndex=[];for(const t of c){const e=i.getTerrainMesh(t.tileID),c=i.getTerrainData(t.tileID);r.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,l.texture);const h={u_terrain_coords_id:(255-i.coordsIndex.length)/255,u_texture:0,u_ele_delta:i.getMeshFrameDelta(n.zoom)},p=n.getProjectionData({overscaledTileID:t.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});u.draw(r,o.TRIANGLES,s,_r.disabled,a,dr.backCCW,h,c,p,"terrain",e.vertexBuffer,e.indexBuffer,e.segments),i.coordsIndex.push(t.tileID.key)}r.bindFramebuffer.set(null),r.viewport.set([0,0,t.width,t.height])}};class hn{constructor(t,i){this.drawFunctions=un,this.context=new Qo(t),this.transform=i,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:e.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Ti.maxOverzooming+Ti.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Xi}resize(t,e,i){if(this.width=Math.floor(t*i),this.height=Math.floor(e*i),this.pixelRatio=i,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const t of this.style._order)this.style._layers[t].resize()}setup(){const t=this.context,i=new e.aU;i.emplaceBack(0,0),i.emplaceBack(e.a6,0),i.emplaceBack(0,e.a6),i.emplaceBack(e.a6,e.a6),this.tileExtentBuffer=t.createVertexBuffer(i,tr.members),this.tileExtentSegments=e.aV.simpleSegment(0,0,4,2);const r=new e.aU;r.emplaceBack(0,0),r.emplaceBack(e.a6,0),r.emplaceBack(0,e.a6),r.emplaceBack(e.a6,e.a6),this.debugBuffer=t.createVertexBuffer(r,tr.members),this.debugSegments=e.aV.simpleSegment(0,0,4,5);const o=new e.ch;o.emplaceBack(0,0,0,0),o.emplaceBack(e.a6,0,e.a6,0),o.emplaceBack(0,e.a6,0,e.a6),o.emplaceBack(e.a6,e.a6,e.a6,e.a6),this.rasterBoundsBuffer=t.createVertexBuffer(o,Dr.members),this.rasterBoundsSegments=e.aV.simpleSegment(0,0,4,2);const n=new e.aU;n.emplaceBack(0,0),n.emplaceBack(e.a6,0),n.emplaceBack(0,e.a6),n.emplaceBack(e.a6,e.a6),this.rasterBoundsBufferPosOnly=t.createVertexBuffer(n,tr.members),this.rasterBoundsSegmentsPosOnly=e.aV.simpleSegment(0,0,4,5);const a=new e.aU;a.emplaceBack(0,0),a.emplaceBack(1,0),a.emplaceBack(0,1),a.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(a,tr.members),this.viewportSegments=e.aV.simpleSegment(0,0,4,2);const s=new e.ci;s.emplaceBack(0),s.emplaceBack(1),s.emplaceBack(3),s.emplaceBack(2),s.emplaceBack(0),this.tileBorderIndexBuffer=t.createIndexBuffer(s);const l=new e.aW;l.emplaceBack(1,0,2),l.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(l);const c=this.context.gl;this.stencilClearMode=new _r({func:c.ALWAYS,mask:0},0,255,c.ZERO,c.ZERO,c.ZERO),this.tileExtentMesh=new Qi(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){const t=this.context,i=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const r=e.O();e.c7(r,0,this.width,this.height,0,0,1),e.S(r,r,[i.drawingBufferWidth,i.drawingBufferHeight,0]);const o={mainMatrix:r,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:r};this.useProgram("clippingMask",null,!0).draw(t,i.TRIANGLES,mr.disabled,this.stencilClearMode,hr.disabled,dr.disabled,null,null,o,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(t,e,i){if(this.currentStencilSource===t.source||!t.isTileClipped()||!(null==e?void 0:e.length))return;this.currentStencilSource=t.source,this.nextStencilID+e.length>256&&this.clearStencil();const r=this.context;r.setColorMode(hr.disabled),r.setDepthMode(mr.disabled);const o={};for(const t of e)o[t.key]=this.nextStencilID++;this._renderTileMasks(o,e,i,!0),this._renderTileMasks(o,e,i,!1),this._tileClippingMaskIDs=o}_renderTileMasks(t,e,i,r){var o;const n=this.context,a=n.gl,s=this.style.projection,l=this.transform,c=this.useProgram("clippingMask");for(const u of e){const e=t[u.key],h=null===(o=this.style.map.terrain)||void 0===o?void 0:o.getTerrainData(u),p=s.getMeshFromTileID(this.context,u.canonical,r,!0,"stencil"),d=l.getProjectionData({overscaledTileID:u,applyGlobeMatrix:!i,applyTerrainMatrix:!0});c.draw(n,a.TRIANGLES,mr.disabled,new _r({func:a.ALWAYS,mask:0},e,255,a.KEEP,a.KEEP,a.REPLACE),hr.disabled,i?dr.disabled:dr.backCCW,null,h,d,"$clipping",p.vertexBuffer,p.indexBuffer,p.segments)}}_renderTilesDepthBuffer(){var t;const e=this.context,i=e.gl,r=this.style.projection,o=this.transform,n=this.useProgram("depth"),a=this.getDepthModeFor3D(),s=D(o,{tileSize:o.tileSize});for(const l of s){const s=null===(t=this.style.map.terrain)||void 0===t?void 0:t.getTerrainData(l),c=r.getMeshFromTileID(this.context,l.canonical,!0,!0,"raster"),u=o.getProjectionData({overscaledTileID:l,applyGlobeMatrix:!0,applyTerrainMatrix:!0});n.draw(e,i.TRIANGLES,a,_r.disabled,hr.disabled,dr.backCCW,null,s,u,"$clipping",c.vertexBuffer,c.indexBuffer,c.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const t=this.nextStencilID++,e=this.context.gl;return new _r({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)}stencilModeForClipping(t){const e=this.context.gl;return new _r({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(t){const e=this.context.gl,i=t.sort((t,e)=>e.overscaledZ-t.overscaledZ),r=i[i.length-1].overscaledZ,o=i[0].overscaledZ-r+1;if(o>1){this.currentStencilSource=void 0,this.nextStencilID+o>256&&this.clearStencil();const t={};for(let i=0;ie.overscaledZ-t.overscaledZ),r=i[i.length-1].overscaledZ,o=i[0].overscaledZ-r+1;if(this.clearStencil(),o>1){const t={},n={};for(let i=0;i0};for(const t in l){const e=l[t];e.used&&e.prepare(this.context),c[t]=e.getVisibleCoordinates(!1),u[t]=c[t].slice().reverse(),h[t]=e.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let t=0;tthis.useProgram(t)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:i.showOverdrawInspector?e.bo.black:e.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=i.showOverdrawInspector,this.depthRangeFor3D=[0,1-(t._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=s.length-1;this.currentLayer>=0;this.currentLayer--){const t=this.style._layers[s[this.currentLayer]],e=l[t.source],i=c[t.source];this._renderTileClippingMasks(t,i,!1),this.renderLayer(this,e,t,i,p)}this.renderPass="translucent";let d=!1;for(this.currentLayer=0;this.currentLayeri.source&&!i.isHidden(e)?[t.tileManagers[i.source]]:[]),o=r.filter(t=>"vector"===t.getSource().type),n=r.filter(t=>"vector"!==t.getSource().type),a=t=>{(!i||i.getSource().maxzoom0?e.pop():null}isPatternMissing(t){if(!t)return!1;if(!t.from||!t.to)return!0;const e=this.imageManager.getPattern(t.from.toString()),i=this.imageManager.getPattern(t.to.toString());return!e||!i}useProgram(t,e,i=!1,r=[]){var o;this.cache||(this.cache={});const n=!!this.style.map.terrain,a=this.style.projection,s=i?Ji.projectionMercator:a.shaderPreludeCode,l=i?er:a.shaderDefine,c=t+(e?e.cacheKey:"")+`/${i?ir:a.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(n?"/terrain":"")+(r?`/${r.join("/")}`:"");return(o=this.cache)[c]||(o[c]=new Fr(this.context,Ji[t],e,uo[t],this._showOverdrawInspector,n,s,l,r)),this.cache[c]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new e.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var t,e;if(this._tileTextures){for(const t in this._tileTextures){const e=this._tileTextures[t];if(e)for(const t of e)t.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&(null===(t=this.tileExtentMesh.vertexBuffer)||void 0===t||t.destroy()),this.tileExtentMesh&&(null===(e=this.tileExtentMesh.indexBuffer)||void 0===e||e.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(const t in this.cache){const e=this.cache[t];(null==e?void 0:e.program)&&this.context.gl.deleteProgram(e.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){const{drawingBufferWidth:t,drawingBufferHeight:e}=this.context.gl;return this.width!==t||this.height!==e}}hn.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class pn{constructor(t){this._getCurrentHash=()=>{const t=window.location.hash.replace("#","");if(this._hashName){let e;const i=t.split("&").map(t=>t.split("="));for(const t of i)t[0]===this._hashName&&(e=t);return(e&&e[1]||"").split("/")}return t.split("/")},this._onHashChange=()=>{const t=this._getCurrentHash();if(!this._isValidHash(t))return!1;const e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0},this._updateHashUnthrottled=()=>{const t=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,t)},this._removeHash=()=>{const t=this._getCurrentHash();if(0===t.length)return;const e=t.join("/");let i=e;i.split("&").length>0&&(i=i.split("&")[0]),this._hashName&&(i=`${this._hashName}=${e}`);let r=window.location.hash.replace(i,"");r.startsWith("#&")?r=r.slice(0,1)+r.slice(2):"#"===r&&(r="");let o=window.location.href.replace(/(#.+)?$/,r);o=o.replace("&&","&"),window.history.replaceState(window.history.state,null,o)},this._updateHash=de(this._updateHashUnthrottled,300),this._hashName=t&&encodeURIComponent(t)}addTo(t){return this._map=t,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(t){const e=this._map.getCenter(),i=Math.round(100*this._map.getZoom())/100,r=Math.ceil((i*Math.LN2+Math.log(512/360/.5))/Math.LN10),o=Math.pow(10,r),n=Math.round(e.lng*o)/o,a=Math.round(e.lat*o)/o,s=this._map.getBearing(),l=this._map.getPitch();let c="";if(c+=t?`/${n}/${a}/${i}`:`${i}/${a}/${n}`,(s||l)&&(c+="/"+Math.round(10*s)/10),l&&(c+=`/${Math.round(l)}`),this._hashName){const t=this._hashName;let e=!1;const i=window.location.hash.slice(1).split("&").map(i=>{const r=i.split("=")[0];return r===t?(e=!0,`${r}=${c}`):i}).filter(t=>t);return e||i.push(`${t}=${c}`),`#${i.join("&")}`}return`#${c}`}_isValidHash(t){if(t.length<3||t.some(isNaN))return!1;try{new e.W(+t[2],+t[1])}catch(t){return!1}const i=+t[0],r=+(t[3]||0),o=+(t[4]||0);return i>=this._map.getMinZoom()&&i<=this._map.getMaxZoom()&&r>=-180&&r<=180&&o>=this._map.getMinPitch()&&o<=this._map.getMaxPitch()}}const dn={linearity:.3,easing:e.cv(0,0,.3,1)},mn=e.e({deceleration:2500,maxSpeed:1400},dn),fn=e.e({deceleration:20,maxSpeed:1400},dn),_n=e.e({deceleration:1e3,maxSpeed:360},dn),gn=e.e({deceleration:1e3,maxSpeed:90},dn),yn=e.e({deceleration:1e3,maxSpeed:360},dn);class vn{constructor(t){this._map=t,this.clear()}clear(){this._inertiaBuffer=[]}record(t){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:r(),settings:t})}_drainInertiaBuffer(){const t=this._inertiaBuffer,e=r();for(;t.length>0&&e-t[0].time>160;)t.shift()}_onMoveEnd(t){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const i={zoom:0,bearing:0,pitch:0,roll:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:t}of this._inertiaBuffer)i.zoom+=t.zoomDelta||0,i.bearing+=t.bearingDelta||0,i.pitch+=t.pitchDelta||0,i.roll+=t.rollDelta||0,t.panDelta&&i.pan._add(t.panDelta),t.around&&(i.around=t.around),t.pinchAround&&(i.pinchAround=t.pinchAround);const r=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,o={};if(i.pan.mag()){const n=fe(i.pan.mag(),r,e.e({},mn,t||{})),a=i.pan.mult(n.amount/i.pan.mag()),s=this._map.cameraHelper.handlePanInertia(a,this._map.transform);o.center=s.easingCenter,o.offset=s.easingOffset,me(o,n)}if(i.zoom){const t=fe(i.zoom,r,fn);o.zoom=e.cw(this._map.transform.zoom+t.amount,this._map.getZoomSnap(),t.amount),me(o,t)}if(i.bearing){const t=fe(i.bearing,r,_n);o.bearing=this._map.transform.bearing+e.al(t.amount,-179,179),me(o,t)}if(i.pitch){const t=fe(i.pitch,r,gn);o.pitch=this._map.transform.pitch+t.amount,me(o,t)}if(i.roll){const t=fe(i.roll,r,yn);o.roll=this._map.transform.roll+e.al(t.amount,-179,179),me(o,t)}if(o.zoom||o.bearing){const t=void 0===i.pinchAround?i.around:i.pinchAround;o.around=t?this._map.unproject(t):this._map.getCenter()}return this.clear(),e.e(o,{noMoveStart:!0})}}class bn extends e.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,i,r,o={}){r=r instanceof MouseEvent?r:new MouseEvent(t,r);const n=Re.mousePos(i.getCanvas(),r),a=i.unproject(n);super(t,e.e({point:n,lngLat:a,originalEvent:r},o)),this._defaultPrevented=!1,this.target=i}}class xn extends e.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,i,r){const o="touchend"===t?r.changedTouches:r.touches,n=Re.touchPos(i.getCanvasContainer(),o),a=n.map(t=>i.unproject(t)),s=n.reduce((t,e,i,r)=>t.add(e.div(r.length)),new e.P(0,0));super(t,{points:n,point:s,lngLats:a,lngLat:i.unproject(s),originalEvent:r}),this._defaultPrevented=!1}}class wn extends e.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,e,i){super(t,{originalEvent:i}),this._defaultPrevented=!1}}class Tn{constructor(t,e){this._map=t,this._clickTolerance=e.clickTolerance}reset(){delete this._mousedownPos}wheel(t){return this._firePreventable(new wn(t.type,this._map,t))}mousedown(t,e){return this._mousedownPos=e,this._firePreventable(new bn(t.type,this._map,t))}mouseup(t){this._map.fire(new bn(t.type,this._map,t))}click(t,e){this._mousedownPos&&this._mousedownPos.dist(e)>=this._clickTolerance||this._map.fire(new bn(t.type,this._map,t))}dblclick(t){return this._firePreventable(new bn(t.type,this._map,t))}mouseover(t){this._map.fire(new bn(t.type,this._map,t))}mouseout(t){this._map.fire(new bn(t.type,this._map,t))}touchstart(t){return this._firePreventable(new xn(t.type,this._map,t))}touchmove(t){this._map.fire(new xn(t.type,this._map,t))}touchend(t){this._map.fire(new xn(t.type,this._map,t))}touchcancel(t){this._map.fire(new xn(t.type,this._map,t))}_firePreventable(t){if(this._map.fire(t),t.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class kn{constructor(t){this._map=t}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(t){this._map.fire(new bn(t.type,this._map,t))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new bn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(t){this._delayContextMenu?this._contextMenuEvent=t:this._ignoreContextMenu||this._map.fire(new bn(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Mn{constructor(t){this._map=t}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(t){return this.transform.screenPointToLocation(e.P.convert(t),this._map.terrain)}}class Sn{constructor(t,e){this._map=t,this._tr=new Mn(t),this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1,e.boxZoom&&"object"==typeof e.boxZoom&&(this._boxZoomEnd=e.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(t,e){this.isEnabled()&&t.shiftKey&&0===t.button&&(Re.disableDrag(),this._startPos=this._lastPos=e,this._active=!0)}mousemoveWindow(t,e){if(!this._active)return;const i=e;if(this._lastPos.equals(i)||!this._box&&i.dist(this._startPos)t.fitScreenCoordinates(r,o,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",t)}keydown(t){this._active&&27===t.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",t))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),Re.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(t,i){return this._map.fire(new e.n(t,{originalEvent:i}))}}class Pn{constructor(t){this.reset(),this.numTouches=t.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(t,i,r){(this.centroid||r.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=t.timeStamp),r.length===this.numTouches&&(this.centroid=function(t){const i=new e.P(0,0);for(const e of t)i._add(e);return i.div(t.length)}(i),this.touches=_e(r,i)))}touchmove(t,e,i){if(this.aborted||!this.centroid)return;const r=_e(i,e);for(const t in this.touches){const e=r[t];(!e||e.dist(this.touches[t])>30)&&(this.aborted=!0)}}touchend(t,e,i){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===i.length){const t=!this.aborted&&this.centroid;if(this.reset(),t)return t}}}class An{constructor(t){this.singleTap=new Pn(t),this.numTaps=t.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(t,e,i){this.singleTap.touchstart(t,e,i)}touchmove(t,e,i){this.singleTap.touchmove(t,e,i)}touchend(t,e,i){const r=this.singleTap.touchend(t,e,i);if(r){const e=t.timeStamp-this.lastTime<500,i=!this.lastTap||this.lastTap.dist(r)<30;if(e&&i||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=r,this.count===this.numTaps)return this.reset(),r}}}class In{constructor(t){this._tr=new Mn(t),this._zoomIn=new An({numTouches:1,numTaps:2}),this._zoomOut=new An({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(t,e,i){this._zoomIn.touchstart(t,e,i),this._zoomOut.touchstart(t,e,i)}touchmove(t,e,i){this._zoomIn.touchmove(t,e,i),this._zoomOut.touchmove(t,e,i)}touchend(t,i,r){const o=this._zoomIn.touchend(t,i,r),n=this._zoomOut.touchend(t,i,r),a=this._tr;return o?(this._active=!0,t.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:i=>i.easeTo({duration:300,zoom:e.cw(a.zoom+1,i.getZoomSnap()),around:a.unproject(o)},{originalEvent:t})}):n?(this._active=!0,t.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:i=>i.easeTo({duration:300,zoom:e.cw(a.zoom-1,i.getZoomSnap()),around:a.unproject(n)},{originalEvent:t})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Cn{constructor(t){this._enabled=!!t.enable,this._moveStateManager=t.moveStateManager,this._clickTolerance=t.clickTolerance||1,this._moveFunction=t.move,this._activateOnStart=!!t.activateOnStart,t.assignEvents(this),this.reset()}reset(t){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(t)}_move(...t){const e=this._moveFunction(...t);if(e.bearingDelta||e.pitchDelta||e.rollDelta||e.around||e.panDelta)return this._active=!0,e}dragStart(t,e){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(t)&&(this._moveStateManager.startMove(t), this._lastPoint=Array.isArray(e)?e[0]:e,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(t,e){if(!this.isEnabled())return;const i=this._lastPoint;if(!i)return;if(t.preventDefault(),!this._moveStateManager.isValidMoveEvent(t))return void this.reset(t);const r=Array.isArray(e)?e[0]:e;return!this._moved&&r.dist(i)!0}),e=new Ln){this.mouseMoveStateManager=t,this.oneFingerTouchMoveStateManager=e}_executeRelevantHandler(t,e,i){return t instanceof MouseEvent?e(t):"undefined"!=typeof TouchEvent&&t instanceof TouchEvent?i(t):void 0}startMove(t){this._executeRelevantHandler(t,t=>{this.mouseMoveStateManager.startMove(t)},t=>{this.oneFingerTouchMoveStateManager.startMove(t)})}endMove(t){this._executeRelevantHandler(t,t=>{this.mouseMoveStateManager.endMove(t)},t=>{this.oneFingerTouchMoveStateManager.endMove(t)})}isValidStartEvent(t){return this._executeRelevantHandler(t,t=>this.mouseMoveStateManager.isValidStartEvent(t),t=>this.oneFingerTouchMoveStateManager.isValidStartEvent(t))}isValidMoveEvent(t){return this._executeRelevantHandler(t,t=>this.mouseMoveStateManager.isValidMoveEvent(t),t=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(t))}isValidEndEvent(t){return this._executeRelevantHandler(t,t=>this.mouseMoveStateManager.isValidEndEvent(t),t=>this.oneFingerTouchMoveStateManager.isValidEndEvent(t))}}const Fn=t=>{t.mousedown=t.dragStart,t.mousemoveWindow=t.dragMove,t.mouseup=t.dragEnd,t.contextmenu=t=>{t.preventDefault()}};class Bn{constructor(t,e){this._clickTolerance=t.clickTolerance||1,this._map=e,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(t){return t<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(t,e,i){return this._calculateTransform(t,e,i)}touchmove(t,e,i){if(this._active){if(!this._shouldBePrevented(i.length))return t.preventDefault(),this._calculateTransform(t,e,i);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",t)}}touchend(t,e,i){this._calculateTransform(t,e,i),this._active&&this._shouldBePrevented(i.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(t,i,r){r.length>0&&(this._active=!0);const o=_e(r,i),n=new e.P(0,0),a=new e.P(0,0);let s=0;for(const t in o){const e=o[t],i=this._touches[t];i&&(n._add(e),a._add(e.sub(i)),s++,o[t]=e)}if(this._touches=o,this._shouldBePrevented(s)||!a.mag())return;const l=a.div(s);return this._sum._add(l),this._sum.mag()=2,o=e.mag()>=2;if(!r&&!o)return;if(!r||!o)return void 0===this._firstMove&&(this._firstMove=i),i-this._firstMove<100&&void 0;const n=t.y>0==e.y>0;return be(t)&&be(e)&&n}}const Gn={panStep:100,bearingStep:15,pitchStep:10};class Zn{constructor(t){this._tr=new Mn(t);const e=Gn;this._panStep=e.panStep,this._bearingStep=e.bearingStep,this._pitchStep=e.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;let i=0,r=0,o=0,n=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:i=1;break;case 189:case 109:case 173:i=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),n=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),n=1);break;case 38:t.shiftKey?o=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?o=-1:(t.preventDefault(),a=1);break;default:return}return this._rotationDisabled&&(r=0,o=0),{cameraAnimation:s=>{const l=this._tr;s.easeTo({duration:300,easeId:"keyboardHandler",easing:xe,zoom:i?e.cw(l.zoom+i*(t.shiftKey?2:1),s.getZoomSnap()):l.zoom,bearing:l.bearing+r*this._bearingStep,pitch:l.pitch+o*this._pitchStep,offset:[-n*this._panStep,-a*this._panStep],center:l.center},{originalEvent:t})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}const $n=4.000244140625,qn=1/450;class Wn{constructor(t,e){this._onTimeout=t=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)},this._map=t,this._tr=new Mn(t),this._triggerRenderFrame=e,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=qn}setZoomRate(t){this._defaultZoomRate=t}setWheelZoomRate(t){this._wheelZoomRate=t}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around)}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(t){return!!this._map.cooperativeGestures.isEnabled()&&!(t.ctrlKey||this._map.cooperativeGestures.isBypassed(t))}wheel(t){if(!this.isEnabled())return;if(this._shouldBePrevented(t))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",t);let e=t.deltaMode===WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY;const i=r(),o=i-(this._lastWheelEventTime||0);this._lastWheelEventTime=i,0!==e&&e%$n==0?this._type="wheel":0!==e&&Math.abs(e)<4?this._type="trackpad":o>400?(this._type=null,this._lastValue=e,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(o*e)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,e+=this._lastValue)),t.shiftKey&&e&&(e/=4),this._type&&(this._lastWheelEvent=t,this._delta-=e,this._active||this._start(t)),t.preventDefault()}_start(t){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const i=Re.mousePos(this._map.getCanvas(),t),r=this._tr;this._aroundPoint=this._aroundCenter?r.transform.locationToScreenPoint(e.W.convert(r.center)):i,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender)return;if(this._needsRerender=!1,!this.isActive())return;const t=this._tr.transform;if("number"==typeof this._lastExpectedZoom){const e=t.zoom-this._lastExpectedZoom;"number"==typeof this._startZoom&&(this._startZoom+=e),"number"==typeof this._targetZoom&&(this._targetZoom+=e)}if(0!==this._delta){const i="wheel"===this._type&&Math.abs(this._delta)>$n?this._wheelZoomRate:this._defaultZoomRate;let r=2/(1+Math.exp(-Math.abs(this._delta*i)));this._delta<0&&0!==r&&(r=1/r);const o="number"!=typeof this._targetZoom?t.scale:e.ao(this._targetZoom),n=t.applyConstrain(t.getCameraLngLat(),e.ar(o*r)).zoom,a=this._map.getZoomSnap();if("wheel"===this._type&&a>0){const i=e.cw(t.zoom,a);this._targetZoom=e.cw(n,a,n-i)}else this._targetZoom=n;"wheel"===this._type&&(this._startZoom=t.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const i="number"!=typeof this._targetZoom?t.zoom:this._targetZoom,o=this._startZoom,n=this._easing;let a,s=!1;if("wheel"===this._type&&o&&n){const t=r()-this._lastWheelEventTime,l=Math.min((t+5)/200,1),c=n(l);a=e.H.number(o,i,c),l<1?this._needsRerender=!0:s=!0}else a=i,s=!0;return this._active=!0,s&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=a,{noInertia:!0,needsRenderFrame:!s,zoomDelta:a-t.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(t){let i=e.cy;if(this._prevEase){const t=this._prevEase,o=(r()-t.start)/t.duration,n=t.easing(o+.01)-t.easing(o),a=.27/Math.sqrt(n*n+1e-4)*.01,s=Math.sqrt(.0729-a*a);i=e.cv(a,s,.25,1)}return this._prevEase={start:r(),duration:t,easing:i},i}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Hn{constructor(t,e){this._clickZoom=t,this._tapZoom=e}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Yn{constructor(t){this._tr=new Mn(t),this.reset()}reset(){this._active=!1}dblclick(t,i){return t.preventDefault(),{cameraAnimation:r=>{r.easeTo({duration:300,zoom:e.cw(this._tr.zoom+(t.shiftKey?-1:1),r.getZoomSnap()),around:this._tr.unproject(i)},{originalEvent:t})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Xn{constructor(){this._tap=new An({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(t){this._zoomRate=null!=t?t:1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(t,e,i){if(!this._swipePoint)if(this._tapTime){const r=e[0],o=t.timeStamp-this._tapTime<500,n=this._tapPoint.dist(r)<30;o&&n?i.length>0&&(this._swipePoint=r,this._swipeTouch=i[0].identifier):this.reset()}else this._tap.touchstart(t,e,i)}touchmove(t,e,i){if(this._tapTime){if(this._swipePoint){if(i[0].identifier!==this._swipeTouch)return;const r=e[0],o=r.y-this._swipePoint.y;return this._swipePoint=r,t.preventDefault(),this._active=!0,{zoomDelta:o/128*this._zoomRate}}}else this._tap.touchmove(t,e,i)}touchend(t,e,i){if(this._tapTime)this._swipePoint&&0===i.length&&this.reset();else{const r=this._tap.touchend(t,e,i);r&&(this._tapTime=t.timeStamp,this._tapPoint=r)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Kn{constructor(t,e,i){this._el=t,this._mousePan=e,this._touchPan=i}enable(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Jn{constructor(t,e,i,r){this._pitchWithRotate=t.pitchWithRotate,this._rollEnabled=t.rollEnabled,this._mouseRotate=e,this._mousePitch=i,this._mouseRoll=r}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class Qn{constructor(t,e,i,r){this._el=t,this._touchZoom=e,this._touchRotate=i,this._tapDragZoom=r,this._rotationDisabled=!1,this._enabled=!0}enable(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}setZoomRate(t){this._touchZoom.setZoomRate(t),this._tapDragZoom.setZoomRate(t)}setZoomThreshold(t){this._touchZoom.setZoomThreshold(t)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class ta{constructor(t,e){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=t,this._options=e,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const t=this._map.getCanvasContainer();t.classList.add("maplibregl-cooperative-gestures"),this._container=Re.create("div","maplibregl-cooperative-gesture-screen",t);let e=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");"metaKey"===this._bypassKey&&(e=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const i=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),r=document.createElement("div");r.className="maplibregl-desktop-message",r.textContent=e,this._container.appendChild(r);const o=document.createElement("div");o.className="maplibregl-mobile-message",o.textContent=i,this._container.appendChild(o),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(t){return t[this._bypassKey]}notifyGestureBlocked(t,i){this._enabled&&(this._map.fire(new e.n("cooperativegestureprevented",{gestureType:t,originalEvent:i})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const ea=t=>t.zoom||t.drag||t.roll||t.pitch||t.rotate;class ia extends e.n{}class ra{get _ownerDocument(){var t;return(null===(t=this._el)||void 0===t?void 0:t.ownerDocument)||document}get _ownerWindow(){var t,e;return(null===(e=null===(t=this._el)||void 0===t?void 0:t.ownerDocument)||void 0===e?void 0:e.defaultView)||window}constructor(t,i){this.handleWindowEvent=t=>{this.handleEvent(t,`${t.type}Window`)},this.handleEvent=(t,i)=>{if("blur"===t.type)return void this.stop(!0);this._updatingCamera=!0;const r="renderFrame"===t.type?void 0:t,o={needsRenderFrame:!1},n={},a={};for(const{handlerName:s,handler:l,allowed:c}of this._handlers){if(!l.isEnabled())continue;let u;if(this._blockedByActive(a,c,s))l.reset();else if(l[i||t.type]){if(e.cz(t,i||t.type)){const e=Re.mousePos(this._map.getCanvas(),t);u=l[i||t.type](t,e)}else if(e.cA(t,i||t.type)){const e=this._getMapTouches(t.touches),r=Re.touchPos(this._map.getCanvas(),e);u=l[i||t.type](t,r,e)}else e.cB(i||t.type)||(u=l[i||t.type](t));this.mergeHandlerResult(o,n,u,s,r),(null==u?void 0:u.needsRenderFrame)&&this._triggerRenderFrame()}(u||l.isActive())&&(a[s]=l)}const s={};for(const t in this._previousActiveHandlers)a[t]||(s[t]=r);this._previousActiveHandlers=a,(Object.keys(s).length||we(o))&&(this._changes.push([o,n,s]),this._triggerRenderFrame()),(Object.keys(a).length||we(o))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:l}=o;l&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],l(this._map))},this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new vn(t),this._bearingSnap=i.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(i);const r=this._el;this._listeners=[[r,"touchstart",{passive:!0}],[r,"touchmove",{passive:!1}],[r,"touchend",void 0],[r,"touchcancel",void 0],[r,"mousedown",void 0],[r,"mousemove",void 0],[r,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[r,"mouseover",void 0],[r,"mouseout",void 0],[r,"dblclick",void 0],[r,"click",void 0],[r,"keydown",{capture:!1}],[r,"keyup",void 0],[r,"wheel",{passive:!1}],[r,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(const[t,e,i]of this._listeners)t.addEventListener(e,t===this._ownerDocument?this.handleWindowEvent:this.handleEvent,i)}destroy(){for(const[t,e,i]of this._listeners)t.removeEventListener(e,t===this._ownerDocument?this.handleWindowEvent:this.handleEvent,i)}_addDefaultHandlers(t){const i=this._map,r=i.getCanvasContainer();this._add("mapEvent",new Tn(i,t));const o=i.boxZoom=new Sn(i,t);this._add("boxZoom",o),t.interactive&&t.boxZoom&&o.enable();const n=i.cooperativeGestures=new ta(i,t.cooperativeGestures);this._add("cooperativeGestures",n),t.cooperativeGestures&&n.enable();const a=new In(i),s=new Yn(i);i.doubleClickZoom=new Hn(s,a),this._add("tapZoom",a),this._add("clickZoom",s),t.interactive&&t.doubleClickZoom&&i.doubleClickZoom.enable();const l=new Xn;this._add("tapDragZoom",l);const c=i.touchPitch=new Un(i);this._add("touchPitch",c),t.interactive&&t.touchPitch&&i.touchPitch.enable(t.touchPitch);const u=()=>i.project(i.getCenter()),h=function({enable:t,clickTolerance:i,aroundCenter:r=!0,minPixelCenterThreshold:o=100,rotateDegreesPerPixelMoved:n=.8},a){const s=new On({checkCorrectEvent:t=>0===t.button&&t.ctrlKey||2===t.button&&!t.ctrlKey});return new Cn({clickTolerance:i,move:(t,i)=>{const s=a();if(r&&Math.abs(s.y-t.y)>o)return{bearingDelta:e.cx(new e.P(t.x,i.y),i,s)};let l=(i.x-t.x)*n;return r&&i.y0===t.button&&t.ctrlKey||2===t.button});return new Cn({clickTolerance:e,move:(t,e)=>({pitchDelta:(e.y-t.y)*i}),moveStateManager:r,enable:t,assignEvents:Fn})}(t),d=function({enable:t,clickTolerance:e,rollDegreesPerPixelMoved:i=.3},r){const o=new On({checkCorrectEvent:t=>2===t.button&&t.ctrlKey});return new Cn({clickTolerance:e,move:(t,e)=>{const o=r();let n=(e.x-t.x)*i;return e.y0===t.button&&!t.ctrlKey});return new Cn({clickTolerance:e,move:(t,e)=>({around:e,panDelta:e.sub(t)}),activateOnStart:!0,moveStateManager:i,enable:t,assignEvents:Fn})}(t),f=new Bn(t,i);i.dragPan=new Kn(r,m,f),this._add("mousePan",m),this._add("touchPan",f,["touchZoom","touchRotate"]),t.interactive&&t.dragPan&&i.dragPan.enable(t.dragPan);const _=new Nn,g=new Vn;i.touchZoomRotate=new Qn(r,g,_,l),this._add("touchRotate",_,["touchPan","touchZoom"]),this._add("touchZoom",g,["touchPan","touchRotate"]),t.interactive&&t.touchZoomRotate&&i.touchZoomRotate.enable(t.touchZoomRotate),this._add("blockableMapEvent",new kn(i));const y=i.scrollZoom=new Wn(i,()=>this._triggerRenderFrame());this._add("scrollZoom",y,["mousePan"]),t.interactive&&t.scrollZoom&&i.scrollZoom.enable(t.scrollZoom);const v=i.keyboard=new Zn(i);this._add("keyboard",v),t.interactive&&t.keyboard&&i.keyboard.enable()}_add(t,e,i){this._handlers.push({handlerName:t,handler:e,allowed:i}),this._handlersById[t]=e}stop(t){if(!this._updatingCamera){for(const{handler:t}of this._handlers)t.reset();this._inertia.clear(),this._fireEvents({},{},t),this._changes=[]}}isActive(){for(const{handler:t}of this._handlers)if(t.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return Boolean(ea(this._eventsInProgress))||this.isZooming()}_blockedByActive(t,e,i){for(const r in t)if(r!==i&&!(null==e?void 0:e.includes(r)))return!0;return!1}_getMapTouches(t){const e=[];for(const i of t)this._el.contains(i.target)&&e.push(i);return e}mergeHandlerResult(t,i,r,o,n){if(!r)return;e.e(t,r);const a={handlerName:o,originalEvent:r.originalEvent||n};void 0!==r.zoomDelta&&(i.zoom=a),void 0!==r.panDelta&&(i.drag=a),void 0!==r.rollDelta&&(i.roll=a),void 0!==r.pitchDelta&&(i.pitch=a),void 0!==r.bearingDelta&&(i.rotate=a)}_applyChanges(){const t={},i={},r={};for(const[o,n,a]of this._changes)o.panDelta&&(t.panDelta=(t.panDelta||new e.P(0,0))._add(o.panDelta)),o.zoomDelta&&(t.zoomDelta=(t.zoomDelta||0)+o.zoomDelta),o.bearingDelta&&(t.bearingDelta=(t.bearingDelta||0)+o.bearingDelta),o.pitchDelta&&(t.pitchDelta=(t.pitchDelta||0)+o.pitchDelta),o.rollDelta&&(t.rollDelta=(t.rollDelta||0)+o.rollDelta),void 0!==o.around&&(t.around=o.around),void 0!==o.pinchAround&&(t.pinchAround=o.pinchAround),o.noInertia&&(t.noInertia=o.noInertia),e.e(i,n),e.e(r,a);this._updateMapTransform(t,i,r),this._changes=[]}_updateMapTransform(t,e,i){const r=this._map,o=r._getTransformForUpdate(),n=r.terrain;if(!(we(t)||n&&this._terrainMovement))return void this._fireEvents(e,i,!0);r._stop(!0);let{panDelta:a,zoomDelta:s,bearingDelta:l,pitchDelta:c,rollDelta:u,around:h,pinchAround:p}=t;void 0!==p&&(h=p),h||(h=r.transform.centerPoint),n&&!o.isPointOnMapSurface(h)&&(h=o.centerPoint);const d={panDelta:a,zoomDelta:s,rollDelta:u,pitchDelta:c,bearingDelta:l,around:h};this._map.cameraHelper.useGlobeControls&&!o.isPointOnMapSurface(h)&&(h=o.centerPoint);const m=h.distSqr(o.centerPoint)<.01?o.center:o.screenPointToLocation(a?h.sub(a):h);this._handleMapControls({terrain:n,tr:o,deltasForHelper:d,preZoomAroundLoc:m,combinedEventsInProgress:e,panDelta:a}),r._applyUpdatedTransform(o),this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(e,i,!0)}_handleMapControls({terrain:t,tr:e,deltasForHelper:i,preZoomAroundLoc:r,combinedEventsInProgress:o,panDelta:n}){const a=this._map.cameraHelper;if(a.handleMapControlsRollPitchBearingZoom(i,e),t)return a.useGlobeControls?(this._terrainMovement||!o.drag&&!o.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void a.handleMapControlsPan(i,e,r)):this._terrainMovement||!o.drag&&!o.zoom?void(o.drag&&this._terrainMovement&&n?e.setCenter(e.screenPointToLocation(e.centerPoint.sub(n))):a.handleMapControlsPan(i,e,r)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void a.handleMapControlsPan(i,e,r));a.handleMapControlsPan(i,e,r)}_fireEvents(t,i,r){const o=ea(this._eventsInProgress),n=ea(t),a={};for(const e in t){const{originalEvent:i}=t[e];this._eventsInProgress[e]||(a[`${e}start`]=i),this._eventsInProgress[e]=t[e]}!o&&n&&this._fireEvent("movestart",n.originalEvent);for(const t in a)this._fireEvent(t,a[t]);n&&this._fireEvent("move",n.originalEvent);for(const e in t){const{originalEvent:i}=t[e];this._fireEvent(e,i)}const s={};let l;for(const t in this._eventsInProgress){const{handlerName:e,originalEvent:r}=this._eventsInProgress[t];this._handlersById[e].isActive()||(delete this._eventsInProgress[t],l=i[e]||r,s[`${t}end`]=l)}for(const t in s)this._fireEvent(t,s[t]);const c=ea(this._eventsInProgress),u=(o||n)&&!c;if(u&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const t=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&t.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(t)}if(r&&u){this._updatingCamera=!0;const t=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),i=t=>0!==t&&-this._bearingSnap{delete this._frameId,this.handleEvent(new ia("renderFrame",{timeStamp:t})),this._applyChanges()})}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}class oa extends e.E{constructor(t,e,i){super(),this._renderFrameCallback=()=>{const t=Math.min((r()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=t,this._bearingSnap=i.bearingSnap,this._zoomSnap=i.zoomSnap,this.cameraHelper=e,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(t,e){t.apply(this.transform,!0),this.transform=t,this.cameraHelper=e}getCenter(){return new e.W(this.transform.center.lng,this.transform.center.lat)}setCenter(t,e){return this.jumpTo({center:t},e)}getCenterElevation(){return this.transform.elevation}setCenterElevation(t,e){return this.jumpTo({elevation:t},e),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(t){this._centerClampedToGround=t}panBy(t,i,r){return t=e.P.convert(t).mult(-1),this.panTo(this.transform.center,e.e({offset:t},i),r)}panTo(t,i,r){return this.easeTo(e.e({center:t},i),r)}getZoom(){return this.transform.zoom}setZoom(t,e){return this.jumpTo({zoom:t},e),this}zoomTo(t,i,r){return this.easeTo(e.e({zoom:t},i),r)}zoomIn(t,i){return this.zoomTo(e.cw(this.getZoom()+1,this._zoomSnap),t,i),this}zoomOut(t,i){return this.zoomTo(e.cw(this.getZoom()-1,this._zoomSnap),t,i),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(t,i){return t!=this.transform.fov&&(this.transform.setFov(t),this.fire(new e.n("movestart",i)).fire(new e.n("move",i)).fire(new e.n("moveend",i))),this}getBearing(){return this.transform.bearing}setZoomSnap(t){return this._zoomSnap=t,this}getZoomSnap(){return this._zoomSnap}setBearing(t,e){return this.jumpTo({bearing:t},e),this}getPadding(){return this.transform.padding}setPadding(t,e){return this.jumpTo({padding:t},e),this}rotateTo(t,i,r){return this.easeTo(e.e({bearing:t},i),r)}resetNorth(t,i){return this.rotateTo(0,e.e({duration:1e3},t),i),this}resetNorthPitch(t,i){return this.easeTo(e.e({bearing:0,pitch:0,roll:0,duration:1e3},t),i),this}snapToNorth(t,e){return Math.abs(this.getBearing()){f.easeFunc(e),this.terrain&&!t.freezeElevation&&this._updateElevation(e),this._applyUpdatedTransform(r),this._fireMoveEvents(i)},e=>{this.terrain&&t.freezeElevation&&this._finalizeElevation(),this._afterEase(i,e)},t),this}_prepareEase(t,i,r={}){this._moving=!0,i||r.moving||this.fire(new e.n("movestart",t)),this._zooming&&!r.zooming&&this.fire(new e.n("zoomstart",t)),this._rotating&&!r.rotating&&this.fire(new e.n("rotatestart",t)),this._pitching&&!r.pitching&&this.fire(new e.n("pitchstart",t)),this._rolling&&!r.rolling&&this.fire(new e.n("rollstart",t))}_prepareElevation(t){this._elevationCenter=t,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(t,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(t){void 0!==this._elevationStart&&void 0!==this._elevationCenter||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));const i=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(t<1&&i!==this._elevationTarget){const e=this._elevationTarget-this._elevationStart;this._elevationStart+=t*(e-(i-(e*t+this._elevationStart))/(1-t)),this._elevationTarget=i}this.transform.setElevation(e.H.number(this._elevationStart,this._elevationTarget,t))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(t){if(!this.terrain&&t.elevation>=0&&t.pitch<=90)return{};const e=t.getCameraLngLat(),i=t.getCameraAltitude(),r=this.terrain?this.terrain.getElevationForLngLatZoom(e,t.zoom):0;if(ithis._elevateCameraIfInsideTerrain(t)),this.transformCameraUpdate&&e.push(t=>this.transformCameraUpdate(t)),!e.length)return;const i=t.clone();for(const t of e){const e=i.clone(),{center:r,zoom:o,roll:n,pitch:a,bearing:s,elevation:l}=t(e);r&&e.setCenter(r),void 0!==l&&e.setElevation(l),void 0!==o&&e.setZoom(o),void 0!==n&&e.setRoll(n),void 0!==a&&e.setPitch(a),void 0!==s&&e.setBearing(s),i.apply(e,!1)}this.transform.apply(i,!1)}_fireMoveEvents(t){this.fire(new e.n("move",t)),this._zooming&&this.fire(new e.n("zoom",t)),this._rotating&&this.fire(new e.n("rotate",t)),this._pitching&&this.fire(new e.n("pitch",t)),this._rolling&&this.fire(new e.n("roll",t))}_afterEase(t,i){if(this._easeId&&i&&this._easeId===i)return;delete this._easeId;const r=this._zooming,o=this._rotating,n=this._pitching,a=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,r&&this.fire(new e.n("zoomend",t)),o&&this.fire(new e.n("rotateend",t)),n&&this.fire(new e.n("pitchend",t)),a&&this.fire(new e.n("rollend",t)),this.fire(new e.n("moveend",t))}flyTo(t,i){function r(t){const e=(x*x-b*b+(t?-1:1)*T*T*w*w)/(2*(t?x:b)*T*w);return Math.log(Math.sqrt(e*e+1)-e)}function o(t){return(Math.exp(t)-Math.exp(-t))/2}function n(t){return(Math.exp(t)+Math.exp(-t))/2}if(!t.essential&&ze.prefersReducedMotion){const r=e.V(t,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(r,i)}this.stop(),"zoom"in(t=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.cy},t))&&this._zoomSnap&&(t.zoom=e.cw(t.zoom,this._zoomSnap));const a=this._getTransformForUpdate(),s=a.bearing,l=a.pitch,c=a.roll,u=a.padding,h="bearing"in t?this._normalizeBearing(t.bearing,s):s,p="pitch"in t?+t.pitch:l,d="roll"in t?this._normalizeBearing(t.roll,c):c,m="padding"in t?t.padding:a.padding,f=e.P.convert(t.offset);let _=a.centerPoint.add(f);const g=a.screenPointToLocation(_),y=this.cameraHelper.handleFlyTo(a,{bearing:h,pitch:p,roll:d,padding:m,locationAtOffset:g,offsetAsPoint:f,center:t.center,minZoom:t.minZoom,zoom:t.zoom});let v=t.curve;const b=Math.max(a.width,a.height),x=b/y.scaleOfZoom,w=y.pixelPathLength;"number"==typeof y.scaleOfMinZoom&&(v=Math.sqrt(b/y.scaleOfMinZoom/w*2));const T=v*v,k=r(!1);let M=function(t){return n(k)/n(k+v*t)},S=function(t){return b*((n(k)*(o(e=k+v*t)/n(e))-o(k))/T)/w;var e},P=(r(!0)-k)/v;if(Math.abs(w)<2e-6||!isFinite(P)){if(Math.abs(b-x)<1e-6)return this.easeTo(t,i);const e=x0,M=t=>Math.exp(e*v*t)}return t.duration="duration"in t?+t.duration:1e3*P/("screenSpeed"in t?+t.screenSpeed/v:+t.speed),t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=s!==h,this._pitching=p!==l,this._rolling=d!==c,this._padding=!a.isPaddingEqual(m),this._prepareEase(i,!1),this.terrain&&this._prepareElevation(y.targetCenter),this._ease(r=>{const o=r*P,n=1/M(o),g=S(o);this._rotating&&a.setBearing(e.H.number(s,h,r)),this._pitching&&a.setPitch(e.H.number(l,p,r)),this._rolling&&a.setRoll(e.H.number(c,d,r)),this._padding&&(a.interpolatePadding(u,m,r),_=a.centerPoint.add(f)),y.easeFunc(r,n,g,_),this.terrain&&!t.freezeElevation&&this._updateElevation(r),this._applyUpdatedTransform(a),this._fireMoveEvents(i)},()=>{this.terrain&&t.freezeElevation&&this._finalizeElevation(),this._afterEase(i)},t),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(t,e){var i;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const t=this._onEaseEnd;delete this._onEaseEnd,t.call(this,e)}return t||null===(i=this.handlers)||void 0===i||i.stop(!1),this}_ease(t,e,i){!1===i.animate||0===i.duration?(t(1),e()):(this._easeStart=r(),this._easeOptions=i,this._onEaseFrame=t,this._onEaseEnd=e,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(t,i){t=e.X(t,-180,180);const r=Math.abs(t-i);return Math.abs(t-360-i)MapLibre'};class aa{constructor(t=na){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=t=>{!t||"metadata"!==t.sourceDataType&&"visibility"!==t.sourceDataType&&"style"!==t.dataType&&"terrain"!==t.type||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=t}getDefaultPosition(){return"bottom-right"}onAdd(t){return this._map=t,this._compact=this.options.compact,this._container=Re.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=Re.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=Re.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(t,e){const i=this._map._getUIString(`AttributionControl.${e}`);t.title=i,t.setAttribute("aria-label",i)}_updateAttributions(){if(!this._map.style)return;let t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map(t=>"string"!=typeof t?"":t)):"string"==typeof this.options.customAttribution&&t.push(this.options.customAttribution)),this._map.style.stylesheet){const t=this._map.style.stylesheet;this.styleOwner=t.owner,this.styleId=t.id}const e=this._map.style.tileManagers;for(const i in e){const r=e[i];if(r.used||r.usedForTerrain){const e=r.getSource();e.attribution&&!t.includes(e.attribution)&&t.push(e.attribution)}}t=t.filter(t=>String(t).trim()),t.sort((t,e)=>t.length-e.length),t=t.filter((e,i)=>{for(let r=i+1;r{const t=this._container.children;if(t.length){const e=t[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&e.classList.add("maplibregl-compact"):e.classList.remove("maplibregl-compact")}},this.options=t}getDefaultPosition(){return"bottom-left"}onAdd(t){var e;this._map=t,this._compact=null===(e=this.options)||void 0===e?void 0:e.compact,this._container=Re.create("div","maplibregl-ctrl");const i=Re.create("a","maplibregl-ctrl-logo");return i.target="_blank",i.rel="noopener nofollow",i.href="https://maplibre.org/",i.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),i.setAttribute("rel","noopener nofollow"),this._container.appendChild(i),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class la{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(t){const e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e}remove(t){const e=this._currentlyRunning,i=e?this._queue.concat(e):this._queue;for(const e of i)if(e.id===t)return void(e.cancelled=!0)}run(t=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const e=this._currentlyRunning=this._queue;this._queue=[];for(const i of e)if(!i.cancelled&&(i.callback(t),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var ca=e.aS([{name:"a_pos3d",type:"Int16",components:3}]);class ua extends e.E{constructor(t){super(),this._lastTilesetChange=r(),this.tileManager=t,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=t._source.tileSize*2**this.deltaZoom,t.usedForTerrain=!0,t.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(t,i){this.tileManager.update(t,i),this._renderableTilesKeys=[];const o={};for(const n of D(t,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:i,calculateTileZoom:this.tileManager._source.calculateTileZoom}))o[n.key]=!0,this._renderableTilesKeys.push(n.key),this._tiles[n.key]||(n.terrainRttPosMatrix32f=new Float64Array(16),e.c7(n.terrainRttPosMatrix32f,0,e.a6,e.a6,0,0,1),this._tiles[n.key]=new gi(n,this.tileSize),this._lastTilesetChange=r());for(const t in this._tiles)o[t]||delete this._tiles[t]}freeRtt(t){for(const e in this._tiles){const i=this._tiles[e];(!t||i.tileID.equals(t)||i.tileID.isChildOf(t)||t.isChildOf(i.tileID))&&(i.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(t=>this.getTileByID(t))}getTileByID(t){return this._tiles[t]}getTerrainCoords(t,e){return e?this._getTerrainCoordsForTileRanges(t,e):this._getTerrainCoordsForRegularTile(t)}_getTerrainCoordsForRegularTile(t){const i={};for(const r of this._renderableTilesKeys){const o=this._tiles[r].tileID,n=t.clone(),a=e.bj();if(o.canonical.equals(t.canonical))e.c7(a,0,e.a6,e.a6,0,0,1);else if(o.canonical.isChildOf(t.canonical)){const i=o.canonical.z-t.canonical.z,r=o.canonical.x-(o.canonical.x>>i<>i<>i;e.c7(a,0,s,s,0,0,1),e.Q(a,a,[-r*s,-n*s,0])}else{if(!t.canonical.isChildOf(o.canonical))continue;{const i=t.canonical.z-o.canonical.z,r=t.canonical.x-(t.canonical.x>>i<>i<>i;e.c7(a,0,e.a6,e.a6,0,0,1),e.Q(a,a,[r*s,n*s,0]),e.S(a,a,[1/2**i,1/2**i,0])}}n.terrainRttPosMatrix32f=new Float32Array(a),i[r]=n}return i}_getTerrainCoordsForTileRanges(t,i){const r={};for(const o of this._renderableTilesKeys){const n=this._tiles[o].tileID;if(!this._isWithinTileRanges(n,i))continue;const a=t.clone(),s=e.bj();if(n.canonical.z===t.canonical.z){const i=t.canonical.x-n.canonical.x+t.wrap*(1<t.canonical.z){const i=n.canonical.z-t.canonical.z,r=n.canonical.x-(n.canonical.x>>i<>i<>i),l=t.canonical.y-(n.canonical.y>>i),c=e.a6>>i;e.c7(s,0,c,c,0,0,1),e.Q(s,s,[-r*c+a*e.a6,-o*c+l*e.a6,0])}else{const i=t.canonical.z-n.canonical.z,r=t.canonical.x-(t.canonical.x>>i<>i<>i)-n.canonical.x,l=(t.canonical.y>>i)-n.canonical.y,c=e.a6<o.maxzoom&&(n=o.maxzoom),n=o.minzoom&&!(null==a?void 0:a.dem);)a=this.findTileInCaches(t.scaledTo(n--).key);return a}findTileInCaches(t){let e=this.tileManager.getTileByID(t);return e||(e=this.tileManager._outOfViewCache.getByKey(t),e)}anyTilesAfterTime(t=Date.now()){return this._lastTilesetChange>=t}_isWithinTileRanges(t,e){const i=e[t.canonical.z];return!!i&&(t.wrap>i.minWrap||t.wrap=i.minTileXWrapped&&t.canonical.x<=i.maxTileXWrapped&&t.canonical.y>=i.minTileY&&t.canonical.y<=i.maxTileY)}}class ha{constructor(t,e,i){this._meshCache={},this.painter=t,this.tileManager=new ua(e),this.options=i,this.exaggeration="number"==typeof i.exaggeration?i.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null);for(const t in this._meshCache)this._meshCache[t].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(t,i,r,o=e.a6){var n;const a=t.normalizeCoordinates(i,r,o);if(!a)return 0;const s=this.getTerrainData(a.tileID),l=null===(n=s.tile)||void 0===n?void 0:n.dem;if(!l)return 0;const c=e.cC([],[a.x/o*e.a6,a.y/o*e.a6],s.u_terrain_matrix),u=[c[0]*l.dim,c[1]*l.dim],h=Math.floor(u[0]),p=Math.floor(u[1]),d=u[0]-h,m=u[1]-p;return l.get(h,p)*(1-d)*(1-m)+l.get(h+1,p)*d*(1-m)+l.get(h,p+1)*(1-d)*m+l.get(h+1,p+1)*d*m}getElevationForLngLatZoom(t,i){if(!e.cD(i,t.wrap()))return 0;const{tileID:r,mercatorX:o,mercatorY:n}=this._getOverscaledTileIDFromLngLatZoom(t,i);return this.getElevation(r,o%e.a6,n%e.a6,e.a6)}getElevationForLngLat(t,e){const i=D(e,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this});let r=0;for(const t of i)t.canonical.z>r&&(r=Math.min(t.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(t,r)}getElevation(t,i,r,o=e.a6){return this.getDEMElevation(t,i,r,o)*this.exaggeration}getTerrainData(t){var i,r;if(!this._emptyDemTexture){const t=this.painter.context,i=new e.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new e.T(t,i,t.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new e.T(t,new e.R({width:1,height:1}),t.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(t.gl.NEAREST,t.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=e.ap([])}const o=this.tileManager.getSourceTile(t,!0);if((null==o?void 0:o.dem)&&(!o.demTexture||o.needsTerrainPrepare)){const t=this.painter.context;o.demTexture=this.painter.getTileTexture(o.dem.stride),o.demTexture?o.demTexture.update(o.dem.getPixels(),{premultiply:!1}):o.demTexture=new e.T(t,o.dem.getPixels(),t.gl.RGBA,{premultiply:!1}),o.demTexture.bind(t.gl.NEAREST,t.gl.CLAMP_TO_EDGE),o.needsTerrainPrepare=!1}const n=o&&o.toString()+o.tileID.key+t.key;if(n&&!this._demMatrixCache[n]){const i=this.tileManager.getSource().maxzoom;let r=t.canonical.z-o.tileID.canonical.z;t.overscaledZ>t.canonical.z&&(t.canonical.z>=i?r=t.canonical.z-i:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const a=t.canonical.x-(t.canonical.x>>r<>r<>8<<4|t>>8,i[e+3]=0;const r=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(i.buffer)),o=new e.T(t,r,t.gl.RGBA,{premultiply:!1});return o.bind(t.gl.NEAREST,t.gl.CLAMP_TO_EDGE),this._coordsTexture=o,o}pointCoordinate(t){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();const i=new Uint8Array(4),r=this.painter.context,o=r.gl,n=Math.round(t.x*this.painter.pixelRatio/devicePixelRatio),a=Math.round(t.y*this.painter.pixelRatio/devicePixelRatio),s=Math.round(this.painter.height/devicePixelRatio);r.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),o.readPixels(n,s-a-1,1,1,o.RGBA,o.UNSIGNED_BYTE,i),r.bindFramebuffer.set(null);const l=i[0]+(i[2]>>4<<8),c=i[1]+((15&i[2])<<8),u=this.coordsIndex[255-i[3]],h=u&&this.tileManager.getTileByID(u);if(!h)return null;const p=this._coordsTextureSize,d=(1<0,o=r&&0===t.canonical.y,n=r&&t.canonical.y===(1<t.id!==e),this._recentlyUsed.push(t.id)}stampObject(t){t.stamp=++this._stamp}getOrCreateFreeObject(){for(const t of this._recentlyUsed)if(!this._objects[t].inUse)return this._objects[t];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const t=this._createObject(this._objects.length);return this._objects.push(t),t}freeObject(t){t.inUse=!1}freeAllObjects(){for(const t of this._objects)this.freeObject(t)}isFull(){return!(this._objects.length!t.inUse)}}const da={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class ma{constructor(t,e){this.painter=t,this.terrain=e,this.pool=new pa(t.context,30,e.tileManager.tileSize*e.qualityFactor)}destruct(){this.pool.destruct()}getTexture(t){return this.pool.getObjectForId(t.rtt[this._stacks.length-1].id).texture}prepareForRender(t,e){var i,r,o;this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=t._order.filter(i=>!t._layers[i].isHidden(e)),this._coordsAscending={};for(const e in t.tileManagers){this._coordsAscending[e]={};const i=t.tileManagers[e].getVisibleCoordinates(),r=t.tileManagers[e].getSource(),n=r instanceof si?r.terrainTileRanges:null;for(const t of i){const i=this.terrain.tileManager.getTerrainCoords(t,n);for(const t in i)(o=this._coordsAscending[e])[t]||(o[t]=[]),this._coordsAscending[e][t].push(i[t])}}this._rttFingerprints={};for(const e of t._order){const o=t._layers[e],n=o.source;if(da[o.type]&&!this._rttFingerprints[n]){this._rttFingerprints[n]={};const e=null!==(r=null===(i=t.tileManagers[n])||void 0===i?void 0:i.getState().revision)&&void 0!==r?r:0;for(const t in this._coordsAscending[n])this._rttFingerprints[n][t]=`${this._coordsAscending[n][t].map(t=>t.key).sort().join()}#${e}`}}for(const t of this._renderableTiles)for(const e in this._rttFingerprints){const i=this._rttFingerprints[e][t.tileID.key];i&&i!==t.rttFingerprint[e]&&(t.rtt=[])}}renderLayer(t,i){if(t.isHidden(this.painter.transform.zoom))return!1;const r=Object.assign(Object.assign({},i),{isRenderingToTexture:!0}),o=t.type,n=this.painter,a=this._renderableLayerIds[this._renderableLayerIds.length-1]===t.id;if(da[o]&&(this._prevType&&da[this._prevType]||this._stacks.push([]),this._prevType=o,this._stacks[this._stacks.length-1].push(t.id),!a))return!0;if(da[this._prevType]||da[o]&&a){this._prevType=o;const t=this._stacks.length-1,i=this._stacks[t]||[];for(const o of this._renderableTiles){if(this.pool.isFull()&&(he(this.painter,this.terrain,this._rttTiles,r),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(o),o.rtt[t]){const e=this.pool.getObjectForId(o.rtt[t].id);if(e.stamp===o.rtt[t].stamp){this.pool.useObject(e);continue}}const a=this.pool.getOrCreateFreeObject();this.pool.useObject(a),this.pool.stampObject(a),o.rtt[t]={id:a.id,stamp:a.stamp},n.context.bindFramebuffer.set(a.fbo.framebuffer),n.context.clear({color:e.bo.transparent,stencil:0}),n.currentStencilSource=void 0;for(const t of i){const e=n.style._layers[t],i=e.source?this._coordsAscending[e.source][o.tileID.key]:[o.tileID];n.context.viewport.set([0,0,a.fbo.width,a.fbo.height]),n._renderTileClippingMasks(e,i,!0),n.renderLayer(n,n.style.tileManagers[e.source],e,i,r),e.source&&(o.rttFingerprint[e.source]=this._rttFingerprints[e.source][o.tileID.key])}}return he(this.painter,this.terrain,this._rttTiles,r),this._rttTiles=[],this.pool.freeAllObjects(),da[o]}return!1}}const fa={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},_a=Ae,ga={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:na,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:e.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20};let ya=class extends oa{get _ownerWindow(){var t,e;return(null===(e=null===(t=this._container)||void 0===t?void 0:t.ownerDocument)||void 0===e?void 0:e.defaultView)||window}constructor(t){var i,r,o;const n=Object.assign(Object.assign(Object.assign({},ga),t),{canvasContextAttributes:Object.assign(Object.assign({},ga.canvasContextAttributes),t.canvasContextAttributes)});if(null!=n.minZoom&&null!=n.maxZoom&&n.minZoom>n.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=n.minPitch&&null!=n.maxPitch&&n.minPitch>n.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=n.minPitch&&n.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=n.maxPitch&&n.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");const a=new cr,s=new ur;void 0!==n.minZoom&&a.setMinZoom(n.minZoom),void 0!==n.maxZoom&&a.setMaxZoom(n.maxZoom),void 0!==n.minPitch&&a.setMinPitch(n.minPitch),void 0!==n.maxPitch&&a.setMaxPitch(n.maxPitch),void 0!==n.renderWorldCopies&&a.setRenderWorldCopies(n.renderWorldCopies),null!==n.transformConstrain&&a.setConstrainOverride(n.transformConstrain),super(a,s,{bearingSnap:n.bearingSnap,zoomSnap:n.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1, this._renderTaskQueue=new la,this._controls=[],this._mapId=e.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=t=>{if(t.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(const t of Object.values(this.style._layers))if("custom"===t.type&&console.warn(`Custom layer with id '${t.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),t._listeners)for(const[e]of Object.entries(t._listeners))console.warn(`Custom layer with id '${t.id}' had event listeners for event '${e}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new e.n("webglcontextlost",{originalEvent:t}))}else this.fire(new e.n("webglcontextlost",{originalEvent:t}))},this._contextRestored=t=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new e.n("webglcontextrestored",{originalEvent:t}))},this._onMapScroll=t=>{if(t.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=n.interactive,this._maxTileCacheSize=n.maxTileCacheSize,this._maxTileCacheZoomLevels=n.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},n.canvasContextAttributes),this._trackResize=!0===n.trackResize,this._bearingSnap=n.bearingSnap,this._zoomSnap=n.zoomSnap,this._centerClampedToGround=n.centerClampedToGround,this._refreshExpiredTiles=!0===n.refreshExpiredTiles,this._fadeDuration=n.fadeDuration,this._crossSourceCollisions=!0===n.crossSourceCollisions,this._collectResourceTiming=!0===n.collectResourceTiming,this._locale=Object.assign(Object.assign({},fa),n.locale),this._clickTolerance=n.clickTolerance,this._overridePixelRatio=n.pixelRatio,this._maxCanvasSize=n.maxCanvasSize,this._zoomLevelsToOverscale=n.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=n.transformCameraUpdate,this.transformConstrain=n.transformConstrain,this.cancelPendingTileRequestsWhileZooming=!0===n.cancelPendingTileRequestsWhileZooming,this.setAnisotropicFilterPitch(n.anisotropicFilterPitch),void 0!==n.reduceMotion&&(ze.prefersReducedMotion=n.reduceMotion),this._imageQueueHandle=Le.addThrottleControl(()=>this.isMoving()),this._requestManager=new Fe(n.transformRequest),this._container=this._resolveContainer(n.container),n.maxBounds&&this.setMaxBounds(n.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),"undefined"!=typeof window&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new ra(this,n),this._hash=n.hash?new pn("string"==typeof n.hash&&n.hash||void 0).addTo(this):void 0,(null===(i=this._hash)||void 0===i?void 0:i._onHashChange())||(this.jumpTo({center:n.center,elevation:n.elevation,zoom:n.zoom,bearing:n.bearing,pitch:n.pitch,roll:n.roll}),n.bounds&&(this.resize(),this.fitBounds(n.bounds,e.e({},n.fitBoundsOptions,{duration:0}))));const l="string"==typeof n.style||!("globe"===(null===(o=null===(r=n.style)||void 0===r?void 0:r.projection)||void 0===o?void 0:o.type));this.resize(null,l),this._localIdeographFontFamily=n.localIdeographFontFamily,this._validateStyle=n.validateStyle,n.style&&this.setStyle(n.style,{localIdeographFontFamily:n.localIdeographFontFamily}),n.attributionControl&&this.addControl(new aa("boolean"==typeof n.attributionControl?void 0:n.attributionControl)),n.maplibreLogo&&this.addControl(new sa,n.logoPosition),this.on("style.load",()=>{if(l||this._resizeTransform(),this.transform.unmodified){const t=e.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(t)}}),this.on("data",t=>{this._update("style"===t.dataType),this.fire(new e.n(`${t.dataType}data`,t))}),this.on("dataloading",t=>{this.fire(new e.n(`${t.dataType}dataloading`,t))}),this.on("dataabort",t=>{this.fire(new e.n("sourcedataabort",t))})}_getMapId(){return this._mapId}setGlobalStateProperty(t,e){return this.style.setGlobalStateProperty(t,e),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(t,i){if(void 0===i&&(i=t.getDefaultPosition?t.getDefaultPosition():"top-right"),!(null==t?void 0:t.onAdd))return this.fire(new e.l(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const r=t.onAdd(this);this._controls.push(t);const o=this._controlPositions[i];return i.includes("bottom")?o.insertBefore(r,o.firstChild):o.appendChild(r),this}removeControl(t){if(!(null==t?void 0:t.onRemove))return this.fire(new e.l(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const i=this._controls.indexOf(t);return i>-1&&this._controls.splice(i,1),t.onRemove(this),this}hasControl(t){return this._controls.includes(t)}coveringTiles(t){return D(this.transform,t)}calculateCameraOptionsFromTo(t,e,i,r){return null==r&&this.terrain&&(r=this.terrain.getElevationForLngLat(i,this.transform)),super.calculateCameraOptionsFromTo(t,e,i,r)}resize(t,i=!0){if(null!==this._lostContextStyle.style)return this;this._resizeInternal(i);const r=!this._moving;return r&&(this.stop(),this.fire(new e.n("movestart",t)).fire(new e.n("move",t))),this.fire(new e.n("resize",t)),r&&this.fire(new e.n("moveend",t)),this}_resizeInternal(t=!0){const[e,i]=this._containerDimensions(),r=this._getClampedPixelRatio(e,i);if(this._resizeCanvas(e,i,r),this.painter.resize(e,i,r),this.painter.overLimit()){const t=this.painter.context.gl;this._maxCanvasSize=[t.drawingBufferWidth,t.drawingBufferHeight];const r=this._getClampedPixelRatio(e,i);this._resizeCanvas(e,i,r),this.painter.resize(e,i,r)}this._resizeTransform(t)}_resizeTransform(t=!0){var e;const[i,r]=this._containerDimensions();this.transform.resize(i,r,t),null===(e=this._requestedCameraState)||void 0===e||e.resize(i,r,t)}_getClampedPixelRatio(t,e){const{0:i,1:r}=this._maxCanvasSize,o=this.getPixelRatio(),n=t*o,a=e*o;return Math.min(n>i?i/n:1,a>r?r/a:1)*o}getPixelRatio(){var t;return null!==(t=this._overridePixelRatio)&&void 0!==t?t:devicePixelRatio}setPixelRatio(t){this._overridePixelRatio=t,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(t){return this.transform.setMaxBounds(ei.convert(t)),this._update()}setMinZoom(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom){const i=this.transform.zoom,r=this._getTransformForUpdate();return r.setMinZoom(t),this._applyUpdatedTransform(r),this._update(),i!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(t){if((t=null==t?22:t)>=this.transform.minZoom){const i=this.transform.zoom,r=this._getTransformForUpdate();return r.setMaxZoom(t),this._applyUpdatedTransform(r),this._update(),i!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to 0");if(t>=0&&t<=this.transform.maxPitch){const i=this.transform.pitch,r=this._getTransformForUpdate();return r.setMinPitch(t),this._applyUpdatedTransform(r),this._update(),i!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(t){if((t=null==t?60:t)>180)throw new Error("maxPitch must be less than or equal to 180");if(t>=this.transform.minPitch){const i=this.transform.pitch,r=this._getTransformForUpdate();return r.setMaxPitch(t),this._applyUpdatedTransform(r),this._update(),i!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(t){if((t=null==t?20:t)>180)throw new Error("anisotropicFilterPitch must be less than or equal to 180");if(t<0)throw new Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=t,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(t){return this.transform.setRenderWorldCopies(t),this._update()}setTransformConstrain(t){return this.transform.setConstrainOverride(t),this._update()}project(t){return this.transform.locationToScreenPoint(e.W.convert(t),this.style&&this.terrain)}unproject(t){return this.transform.screenPointToLocation(e.P.convert(t),this.terrain)}isMoving(){var t;return this._moving||(null===(t=this.handlers)||void 0===t?void 0:t.isMoving())}isZooming(){var t;return this._zooming||(null===(t=this.handlers)||void 0===t?void 0:t.isZooming())}isRotating(){var t;return this._rotating||(null===(t=this.handlers)||void 0===t?void 0:t.isRotating())}_createDelegatedListener(t,e,i){if("mouseenter"===t||"mouseover"===t){let r=!1;const o=o=>{const n=e.filter(t=>this.getLayer(t)),a=0!==n.length?this.queryRenderedFeatures(o.point,{layers:n}):[];a.length?r||(r=!0,i.call(this,new bn(t,this,o.originalEvent,{features:a}))):r=!1};return{layers:e,listener:i,delegates:{mousemove:o,mouseout:()=>{r=!1}}}}if("mouseleave"===t||"mouseout"===t){let r=!1;const o=o=>{const n=e.filter(t=>this.getLayer(t));(0!==n.length?this.queryRenderedFeatures(o.point,{layers:n}):[]).length?r=!0:r&&(r=!1,i.call(this,new bn(t,this,o.originalEvent)))},n=e=>{r&&(r=!1,i.call(this,new bn(t,this,e.originalEvent)))};return{layers:e,listener:i,delegates:{mousemove:o,mouseout:n}}}{const r=t=>{const r=e.filter(t=>this.getLayer(t)),o=0!==r.length?this.queryRenderedFeatures(t.point,{layers:r}):[];o.length&&(t.features=o,i.call(this,t),delete t.features)};return{layers:e,listener:i,delegates:{[t]:r}}}}_saveDelegatedListener(t,e){var i;this._delegatedListeners||(this._delegatedListeners={}),(i=this._delegatedListeners)[t]||(i[t]=[]),this._delegatedListeners[t].push(e)}_removeDelegatedListener(t,e,i){var r;if(!(null===(r=this._delegatedListeners)||void 0===r?void 0:r[t]))return;const o=this._delegatedListeners[t];for(let t=0;te.includes(t))){for(const t in r.delegates)this.off(t,r.delegates[t]);return void o.splice(t,1)}}}on(t,e,i){if(void 0===i)return super.on(t,e);const r="string"==typeof e?[e]:e,o=this._createDelegatedListener(t,r,i);this._saveDelegatedListener(t,o);for(const t in o.delegates)this.on(t,o.delegates[t]);return{unsubscribe:()=>{this._removeDelegatedListener(t,r,i)}}}once(t,e,i){if(void 0===i)return super.once(t,e);const r="string"==typeof e?[e]:e,o=this._createDelegatedListener(t,r,i);for(const e in o.delegates){const n=o.delegates[e];o.delegates[e]=(...e)=>{this._removeDelegatedListener(t,r,i),n(...e)}}this._saveDelegatedListener(t,o);for(const t in o.delegates)this.once(t,o.delegates[t]);return this}off(t,e,i){return void 0===i?super.off(t,e):(this._removeDelegatedListener(t,"string"==typeof e?[e]:e,i),this)}queryRenderedFeatures(t,i){if(!this.style)return[];let r;const o=t instanceof e.P||Array.isArray(t),n=o?t:[[0,0],[this.transform.width,this.transform.height]];if(i||(i=(o?{}:t)||{}),n instanceof e.P||"number"==typeof n[0])r=[e.P.convert(n)];else{const t=e.P.convert(n[0]),i=e.P.convert(n[1]);r=[t,new e.P(i.x,t.y),i,new e.P(t.x,i.y),t]}return this.style.queryRenderedFeatures(r,i,this.transform)}querySourceFeatures(t,e){return this.style.querySourceFeatures(t,e)}setStyle(t,i){return!1!==(i=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},i)).diff&&i.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&t?(this._diffStyle(t,i),this):(this._localIdeographFontFamily=i.localIdeographFontFamily,this._updateStyle(t,i))}setTransformRequest(t){return this._requestManager.setTransformRequest(t),this}_getUIString(t){const e=this._locale[t];if(null==e)throw new Error(`Missing UI string '${t}'`);return e}_updateStyle(t,e){var i,r,o;if(null===(i=this._diffStyleRequest)||void 0===i||i.abort(),this._diffStyleRequest=null,e.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(t,e));const n=this.style&&e.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!t)),t?(this.style=new zr(this,e||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof t?this.style.loadURL(t,e,n):this.style.loadJSON(t,e,n),this):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),null===(o=null===(r=this.style)||void 0===r?void 0:r.projection)||void 0===o||o.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new zr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(t,i){return e._(this,void 0,void 0,function*(){var r;if(null===(r=this._diffStyleRequest)||void 0===r||r.abort(),"string"==typeof t){const r=t;this._diffStyleRequest=new AbortController;const o=this._diffStyleRequest;try{const t=yield this._requestManager.transformRequest(r,"Style");if(o.signal.aborted)return void(this._diffStyleRequest=null);const n=yield e.k(t,o);this._diffStyleRequest=null,this._updateDiff(n.data,i)}catch(t){this._diffStyleRequest=null,e.$(t)||this.fire(new e.l(e.d(t)))}}else"object"==typeof t&&(this._diffStyleRequest=null,this._updateDiff(t,i))})}_updateDiff(t,i){try{this.style.setState(t,i)&&this._update(!0)}catch(r){e.w(`Unable to perform style diff: ${e.d(r).message}. Rebuilding the style from scratch.`),this._updateStyle(t,i)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();e.w("There is no style added to the map.")}addSource(t,e){return this._lazyInitEmptyStyle(),this.style.addSource(t,e),this._update(!0)}isSourceLoaded(t){var i;const r=null===(i=this.style)||void 0===i?void 0:i.tileManagers[t];if(void 0!==r)return r.loaded();this.fire(new e.l(new Error(`There is no tile manager with ID '${t}'`)))}setTerrain(t){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),t){const i=this.style.tileManagers[t.source];if(!i)throw new Error(`cannot load terrain, because there exists no source with ID: ${t.source}`);null===this.terrain&&i.reload();for(const i in this.style._layers){const r=this.style._layers[i];"hillshade"===r.type&&r.source===t.source&&e.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),"color-relief"===r.type&&r.source===t.source&&e.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new ha(this.painter,i,t),this.painter.renderToTexture=new ma(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=e=>{var i;"style"===e.dataType?this.terrain.tileManager.freeRtt():"source"===e.dataType&&e.tile&&(e.sourceId!==t.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),"image"===(null===(i=e.source)||void 0===i?void 0:i.type)?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(e.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new e.n("terrain",{terrain:t})),this}getTerrain(){var t,e;return null!==(e=null===(t=this.terrain)||void 0===t?void 0:t.options)&&void 0!==e?e:null}areTilesLoaded(){var t;const e=null===(t=this.style)||void 0===t?void 0:t.tileManagers;for(const t of Object.values(e))if(!t.areTilesLoaded())return!1;return!0}removeSource(t){return this.style.removeSource(t),this._update(!0)}getSource(t){return this.style.getSource(t)}setSourceTileLodParams(t,e,i){if(i){const r=this.getSource(i);if(!r)throw new Error(`There is no source with ID "${i}", cannot set LOD parameters`);r.calculateTileZoom=E(Math.max(1,t),Math.max(1,e))}else for(const i in this.style.tileManagers)this.style.tileManagers[i].getSource().calculateTileZoom=E(Math.max(1,t),Math.max(1,e));return this._update(!0),this}refreshTiles(t,i){const r=this.style.tileManagers[t];if(!r)throw new Error(`There is no tile manager with ID "${t}", cannot refresh tile`);void 0===i?r.reload(!0):r.refreshTiles(i.map(t=>new e.aa(t.z,t.x,t.y)))}addImage(t,i,r={}){const{pixelRatio:o=1,sdf:n=!1,stretchX:a,stretchY:s,content:l,textFitWidth:c,textFitHeight:u}=r;if(this._lazyInitEmptyStyle(),!(i instanceof HTMLImageElement||e.b(i))){if(void 0===i.width||void 0===i.height)return this.fire(new e.l(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:r,height:h,data:p}=i,d=i;return this.style.addImage(t,{data:new e.R({width:r,height:h},new Uint8Array(p)),pixelRatio:o,stretchX:a,stretchY:s,content:l,textFitWidth:c,textFitHeight:u,sdf:n,version:0,userImage:d}),d.onAdd&&d.onAdd(this,t),this}}{const{width:r,height:h,data:p}=ze.getImageData(i);this.style.addImage(t,{data:new e.R({width:r,height:h},p),pixelRatio:o,stretchX:a,stretchY:s,content:l,textFitWidth:c,textFitHeight:u,sdf:n,version:0})}}updateImage(t,i){const r=this.style.getImage(t);if(!r)return this.fire(new e.l(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const o=i instanceof HTMLImageElement||e.b(i)?ze.getImageData(i):i,{width:n,height:a,data:s}=o;if(void 0===n||void 0===a)return this.fire(new e.l(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(n!==r.data.width||a!==r.data.height)return this.fire(new e.l(new Error("The width and height of the updated image must be that same as the previous version of the image")));const l=!(i instanceof HTMLImageElement||e.b(i));return r.data.replace(s,l),this.style.updateImage(t,r),this}getImage(t){return this.style.getImage(t)}hasImage(t){return t?!!this.style.getImage(t):(this.fire(new e.l(new Error("Missing required image id"))),!1)}removeImage(t){this.style.removeImage(t)}loadImage(t){return e._(this,void 0,void 0,function*(){return Le.getImage(yield this._requestManager.transformRequest(t,"Image"),new AbortController)})}listImages(){return this.style.listImages()}addLayer(t,e){return this._lazyInitEmptyStyle(),this.style.addLayer(t,e),this._update(!0)}moveLayer(t,e){return this.style.moveLayer(t,e),this._update(!0)}removeLayer(t){return this.style.removeLayer(t),this._update(!0)}getLayer(t){return this.style.getLayer(t)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(t,e,i){return this.style.setLayerZoomRange(t,e,i),this._update(!0)}setFilter(t,e,i={}){return this.style.setFilter(t,e,i),this._update(!0)}getFilter(t){return this.style.getFilter(t)}setPaintProperty(t,e,i,r={}){return this.style.setPaintProperty(t,e,i,r),this._update(!0)}getPaintProperty(t,e){return this.style.getPaintProperty(t,e)}setLayoutProperty(t,e,i,r={}){return this.style.setLayoutProperty(t,e,i,r),this._update(!0)}getLayoutProperty(t,e){return this.style.getLayoutProperty(t,e)}setGlyphs(t,e={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(t,e),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(t,e,i={}){return this._lazyInitEmptyStyle(),this.style.addSprite(t,e,i,t=>{t||this._update(!0)}),this}removeSprite(t){return this._lazyInitEmptyStyle(),this.style.removeSprite(t),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(t,e={}){return this._lazyInitEmptyStyle(),this.style.setSprite(t,e,t=>{t||this._update(!0)}),this}setLight(t,e={}){return this._lazyInitEmptyStyle(),this.style.setLight(t,e),this._update(!0)}getLight(){return this.style.getLight()}setSky(t,e={}){return this._lazyInitEmptyStyle(),this.style.setSky(t,e),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(t,e){return this.style.setFeatureState(t,e),this._update()}removeFeatureState(t,e){return this.style.removeFeatureState(t,e),this._update()}getFeatureState(t){return this.style.getFeatureState(t)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let t=0,e=0;return this._container&&(t=this._container.clientWidth||400,e=this._container.clientHeight||300),[t,e]}_setupResizeObserver(){var t;let e=!1;const i=de(t=>{this._trackResize&&!this._removed&&(this.resize(t),this.redraw())},50),r=null!==(t=this._ownerWindow.ResizeObserver)&&void 0!==t?t:ResizeObserver;this._resizeObserver=new r(t=>{e?i(t):e=!0}),this._resizeObserver.observe(this._container)}_resolveContainer(t){if("string"==typeof t){const e=document.getElementById(t);if(!e)throw new Error(`Container '${t}' not found.`);return e}if(t instanceof HTMLElement)return t;if(t&&"object"==typeof t&&1===t.nodeType)return t;throw new Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){const t=this._container;t.classList.add("maplibregl-map");const e=this._canvasContainer=Re.create("div","maplibregl-canvas-container",t);this._interactive&&e.classList.add("maplibregl-interactive"),this._canvas=Re.create("canvas","maplibregl-canvas",e),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const i=this._containerDimensions(),r=this._getClampedPixelRatio(i[0],i[1]);this._resizeCanvas(i[0],i[1],r);const o=this._controlContainer=Re.create("div","maplibregl-control-container",t),n=this._controlPositions={};for(const t of["top-left","top-right","bottom-left","bottom-right"])n[t]=Re.create("div",`maplibregl-ctrl-${t} `,o);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(t,e,i){this._canvas.width=Math.floor(i*t),this._canvas.height=Math.floor(i*e),this._canvas.style.width=`${t}px`,this._canvas.style.height=`${e}px`}_setupPainter(){const t=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0});let e=null;this._canvas.addEventListener("webglcontextcreationerror",i=>{e={requestedAttributes:t},i&&(e.statusMessage=i.statusMessage,e.type=i.type)},{once:!0});let i=null;if(i=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,t):this._canvas.getContext("webgl2",t)||this._canvas.getContext("webgl",t),!i){const t="Failed to initialize WebGL";throw e?(e.message=t,new Error(JSON.stringify(e))):new Error(t)}this.painter=new hn(i,this.transform)}migrateProjection(t,i){super.migrateProjection(t,i),this.painter.transform=t,this.fire(new e.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(t){var e;return(null===(e=this.style)||void 0===e?void 0:e._loaded)?(this._styleDirty||(this._styleDirty=t),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(t){return this._update(),this._renderTaskQueue.add(t)}_cancelRenderFrame(t){this._renderTaskQueue.remove(t)}_render(t){var i,o,n,a,s,l;const c=this._idleTriggered?this._fadeDuration:0,u=(null===(i=this.style.projection)||void 0===i?void 0:i.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(t),this._removed)return;let h=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const t=this.transform.zoom,i=r();this.style.zoomHistory.update(t,i);const o=new e.J(t,{now:i,fadeDuration:c,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),n=o.crossFadingFactor();1===n&&n===this._crossFadingFactor||(h=!0,this._crossFadingFactor=n),this.style.update(o)}const p=(null===(o=this.style.projection)||void 0===o?void 0:o.transitionState)>0!==u;null===(n=this.style.projection)||void 0===n||n.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState(null===(a=this.style.projection)||void 0===a?void 0:a.transitionState,null===(s=this.style.projection)||void 0===s?void 0:s.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||p)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=null===(l=this.style)||void 0===l?void 0:l._updatePlacement(this.transform,this.showCollisionBoxes,c,this._crossSourceCollisions,p),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:c,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new e.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.n("load"))),this.style&&(this.style.hasTransitions()||h)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const d=this._sourcesDirty||this._styleDirty||this._placementDirty;return d||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.n("idle")),!this._loaded||this._fullyLoaded||d||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var t,i;this._hash&&this._hash.remove();for(const t of this._controls)t.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),null===(t=this._diffStyleRequest)||void 0===t||t.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),"undefined"!=typeof window&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),Le.removeThrottleControl(this._imageQueueHandle),null===(i=this._resizeObserver)||void 0===i||i.disconnect();const r=this.painter.context.gl.getExtension("WEBGL_lose_context");(null==r?void 0:r.loseContext)&&r.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new e.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,ze.frame(this._frameRequest,t=>{this._frameRequest=null;try{this._render(t)}catch(t){if(!e.$(t)&&!function(t){return t.message===Ko}(t))throw t}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())}get showPadding(){return!!this._showPadding}set showPadding(t){this._showPadding!==t&&(this._showPadding=t,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())}get repaint(){return!!this._repaint}set repaint(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(t){this._vertices=t,this._update()}get version(){return _a}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(t){return this._lazyInitEmptyStyle(),this.style.setProjection(t),this._update(!0)}};const va={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class ba{constructor(t,i,r=!1){this.mousedown=t=>{this.startMove(t,Re.mousePos(this.element,t)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=t=>{this.move(t,Re.mousePos(this.element,t))},this.mouseup=t=>{this._rotatePitchHandler.dragEnd(t),this.offTemp()},this.touchstart=t=>{1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=Re.touchPos(this.element,t.targetTouches)[0],this.startMove(t,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=t=>{1!==t.targetTouches.length?this.reset():(this._lastPos=Re.touchPos(this.element,t.targetTouches)[0],this.move(t,this._lastPos))},this.touchend=t=>{0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=i;const o=new Rn;this._rotatePitchHandler=new Cn({clickTolerance:3,move:(t,o)=>{const n=i.getBoundingClientRect(),a=new e.P((n.bottom-n.top)/2,(n.right-n.left)/2);return{bearingDelta:e.cx(new e.P(t.x,o.y),o,a),pitchDelta:r?-.5*(o.y-t.y):void 0}},moveStateManager:o,enable:!0,assignEvents:()=>{}}),this.map=t,i.addEventListener("mousedown",this.mousedown),i.addEventListener("touchstart",this.touchstart,{passive:!1}),i.addEventListener("touchcancel",this.reset)}startMove(t,e){this._rotatePitchHandler.dragStart(t,e),Re.disableDrag()}move(t,e){const i=this.map,{bearingDelta:r,pitchDelta:o}=this._rotatePitchHandler.dragMove(t,e)||{};r&&i.setBearing(i.getBearing()+r),o&&i.setPitch(i.getPitch()+o)}off(){const t=this.element;t.removeEventListener("mousedown",this.mousedown), t.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),t.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){Re.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}let xa;const wa={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};class Ta extends e.E{constructor(t){if(super(),this._onClick=t=>{this.fire(new e.n("click",{originalEvent:t}))},this._onKeyPress=t=>{"Space"!==t.code&&"Enter"!==t.code||this.togglePopup()},this._onMapClick=t=>{const e=t.originalEvent.target,i=this._element;this._popup&&(e===i||i.contains(e))&&this.togglePopup()},this._update=t=>{if(!this._map)return;const e=this._map.loaded()&&!this._map.isMoving();("terrain"===(null==t?void 0:t.type)||"render"===(null==t?void 0:t.type)&&!e)&&this._map.once("render",this._update),this._lngLat=Te(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let i="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?i=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(i=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let r="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?r="rotateX(0deg)":"map"===this._pitchAlignment&&(r=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||t&&"moveend"!==t.type||(this._pos=this._pos.round()),this._element.style.transform=`${wa[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${r} ${i}`,ze.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity("moveend"===(null==t?void 0:t.type))}).catch(()=>{})},this._onMove=t=>{if(!this._isDragging){const e=this._clickTolerance||this._map._clickTolerance;this._isDragging=t.point.dist(this._pointerdownPos)>=e}this._isDragging&&(this._pos=t.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new e.n("dragstart"))),this.fire(new e.n("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new e.n("dragend")),this._state="inactive"},this._addDragHandler=t=>{this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._pointerdownPos=t.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=(null==t?void 0:t.anchor)||"center",this._color=(null==t?void 0:t.color)||"#3FB1CE",this._scale=(null==t?void 0:t.scale)||1,this._draggable=(null==t?void 0:t.draggable)||!1,this._clickTolerance=(null==t?void 0:t.clickTolerance)||0,this._subpixelPositioning=(null==t?void 0:t.subpixelPositioning)||!1,this._isDragging=!1,this._state="inactive",this._rotation=(null==t?void 0:t.rotation)||0,this._rotationAlignment=(null==t?void 0:t.rotationAlignment)||"auto",this._pitchAlignment=(null==t?void 0:t.pitchAlignment)&&"auto"!==t.pitchAlignment?t.pitchAlignment:this._rotationAlignment,this.setOpacity(null==t?void 0:t.opacity,null==t?void 0:t.opacityWhenCovered),null==t?void 0:t.element)this._element=t.element,this._offset=e.P.convert((null==t?void 0:t.offset)||[0,0]);else{this._defaultMarker=!0,this._element=Re.create("div");const i=Re.createNS("http://www.w3.org/2000/svg","svg"),r=41,o=27;i.setAttributeNS(null,"display","block"),i.setAttributeNS(null,"height",`${r}px`),i.setAttributeNS(null,"width",`${o}px`),i.setAttributeNS(null,"viewBox",`0 0 ${o} ${r}`);const n=Re.createNS("http://www.w3.org/2000/svg","g");n.setAttributeNS(null,"stroke","none"),n.setAttributeNS(null,"stroke-width","1"),n.setAttributeNS(null,"fill","none"),n.setAttributeNS(null,"fill-rule","evenodd");const a=Re.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"fill-rule","nonzero");const s=Re.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"transform","translate(3.0, 29.0)"),s.setAttributeNS(null,"fill","#000000");const l=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const t of l){const e=Re.createNS("http://www.w3.org/2000/svg","ellipse");e.setAttributeNS(null,"opacity","0.04"),e.setAttributeNS(null,"cx","10.5"),e.setAttributeNS(null,"cy","5.80029008"),e.setAttributeNS(null,"rx",t.rx),e.setAttributeNS(null,"ry",t.ry),s.appendChild(e)}const c=Re.createNS("http://www.w3.org/2000/svg","g");c.setAttributeNS(null,"fill",this._color);const u=Re.createNS("http://www.w3.org/2000/svg","path");u.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),c.appendChild(u);const h=Re.createNS("http://www.w3.org/2000/svg","g");h.setAttributeNS(null,"opacity","0.25"),h.setAttributeNS(null,"fill","#000000");const p=Re.createNS("http://www.w3.org/2000/svg","path");p.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),h.appendChild(p);const d=Re.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"transform","translate(6.0, 7.0)"),d.setAttributeNS(null,"fill","#FFFFFF");const m=Re.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"transform","translate(8.0, 8.0)");const f=Re.createNS("http://www.w3.org/2000/svg","circle");f.setAttributeNS(null,"fill","#000000"),f.setAttributeNS(null,"opacity","0.25"),f.setAttributeNS(null,"cx","5.5"),f.setAttributeNS(null,"cy","5.5"),f.setAttributeNS(null,"r","5.4999962");const _=Re.createNS("http://www.w3.org/2000/svg","circle");_.setAttributeNS(null,"fill","#FFFFFF"),_.setAttributeNS(null,"cx","5.5"),_.setAttributeNS(null,"cy","5.5"),_.setAttributeNS(null,"r","5.4999962"),m.appendChild(f),m.appendChild(_),a.appendChild(s),a.appendChild(c),a.appendChild(h),a.appendChild(d),a.appendChild(m),i.appendChild(a),i.setAttributeNS(null,"height",r*this._scale+"px"),i.setAttributeNS(null,"width",o*this._scale+"px"),this._element.appendChild(i),this._offset=e.P.convert((null==t?void 0:t.offset)||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",t=>{t.preventDefault()}),this._element.addEventListener("mousedown",t=>{t.preventDefault()}),ke(this._element,this._anchor,"marker"),null==t?void 0:t.className)for(const e of t.className.split(" "))this._element.classList.add(e);this._popup=null}addTo(t){return this.remove(),this._map=t,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",t._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),t.on("terrain",this._update),t.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=e.W.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),t){if(!("offset"in t.options)){const e=38.1,i=13.5,r=Math.abs(i)/Math.SQRT2;t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-e],"bottom-left":[r,-1*(e-i+r)],"bottom-right":[-r,-1*(e-i+r)],left:[i,-1*(e-i)],right:[-i,-1*(e-i)]}:this._offset}this._popup=t,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(t){return this._subpixelPositioning=t,this}getPopup(){return this._popup}togglePopup(){const t=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:t?(t.isOpen()?t.remove():(t.setLngLat(this._lngLat),t.addTo(this._map)),this):this}_updateOpacity(t=!1){var i,r;const o=null===(i=this._map)||void 0===i?void 0:i.terrain,n=this._map.transform.isLocationOccluded(this._lngLat);if(!o||n){const t=n?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==t&&(this._element.style.opacity=t,this._element.classList.toggle("maplibregl-marker-covered",n)))}if(t)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const a=this._map,s=a.terrain.depthAtPoint(this._pos),l=a.terrain.getElevationForLngLat(this._lngLat,a.transform);if(a.transform.lngLatToCameraDepth(this._lngLat,l)-s<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");const c=-this._offset.y/a.transform.pixelsPerMeter,u=Math.sin(a.getPitch()*Math.PI/180)*c,h=a.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),p=a.transform.lngLatToCameraDepth(this._lngLat,l+u)-h>.006;(null===(r=this._popup)||void 0===r?void 0:r.isOpen())&&p&&this._popup.remove(),this._element.style.opacity=p?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",p)}getOffset(){return this._offset}setOffset(t){return this._offset=e.P.convert(t),this._update(),this}addClassName(t){this._element.classList.add(t)}removeClassName(t){this._element.classList.remove(t)}toggleClassName(t){return this._element.classList.toggle(t)}setDraggable(t){return this._draggable=!!t,this._map&&(t?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(t){return this._rotation=t||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(t){return this._rotationAlignment=t||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(t){return this._pitchAlignment=t&&"auto"!==t?t:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(t,e){return(void 0===this._opacity||void 0===t&&void 0===e)&&(this._opacity="1",this._opacityWhenCovered="0.2"),void 0!==t&&(this._opacity=String(t)),void 0!==e&&(this._opacityWhenCovered=String(e)),this._map&&this._updateOpacity(!0),this}}const ka={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Ma=0,Sa=!1;const Pa={maxWidth:100,unit:"metric"},Aa={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},Ia=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Ca=Ae;t.AJAXError=e.cG,t.EXTENT=e.a6,t.Event=e.n,t.Evented=e.E,t.LngLat=e.W,t.MercatorCoordinate=e.a7,t.Point=e.P,t.addProtocol=e.cH,t.config=e.c,t.removeProtocol=e.cI,t.AttributionControl=aa,t.BoxZoomHandler=Sn,t.CanvasSource=ci,t.CooperativeGesturesHandler=ta,t.DoubleClickZoomHandler=Hn,t.DragPanHandler=Kn,t.DragRotateHandler=Jn,t.EdgeInsets=or,t.FullscreenControl=class extends e.E{constructor(t={}){var i;super(),this._onFullscreenChange=()=>{var t;let e=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.fullscreenElement;)e=e.shadowRoot.fullscreenElement;e===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=null!==(i=t.pseudo)&&void 0!==i&&i,(null==t?void 0:t.container)&&(t.container instanceof HTMLElement?this._container=t.container:e.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=Re.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const t=this._fullscreenButton=Re.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);Re.create("span","maplibregl-ctrl-icon",t).setAttribute("aria-hidden","true"),t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new e.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},t.GeoJSONSource=ai,t.GeolocateControl=class extends e.E{constructor(t){super(),this._onSuccess=t=>{if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new e.n("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.n("geolocate",t)),this._finish()}},this._updateCamera=t=>{const i=new e.W(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy,o=this._map.getBearing(),n=e.e({bearing:o},this.options.fitBoundsOptions),a=ei.fromLngLat(i,r);this._map.fitBounds(a,n,{geolocateSource:!0})},this._updateMarker=t=>{if(t){const i=new e.W(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(i).addTo(this._map),this._userLocationDotMarker.setLngLat(i).addTo(this._map),this._accuracy=t.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=t=>{if(this._map){if(1===t.code){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===t.code&&Sa)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.n("error",t)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=t=>{if(!this._map)return;const i=(null==t?void 0:t[0])instanceof ResizeObserverEntry;t.geolocateSource||"ACTIVE_LOCK"!==this._watchState||i||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.n("trackuserlocationend")),this.fire(new e.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",t=>{t.preventDefault()}),this._geolocateButton=Re.create("button","maplibregl-ctrl-geolocate",this._container),Re.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=t=>{if(this._map){if(!1===t){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t)}else{const t=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=Re.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Ta({element:this._dotElement}),this._circleElement=Re.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ta({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=e.e({},ka,t)}onAdd(t){return this._map=t,this._container=Re.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(t=!1){if(void 0!==xa&&!t)return xa;if(void 0===window.navigator.permissions)return xa=!!window.navigator.geolocation,xa;try{const t=yield window.navigator.permissions.query({name:"geolocation"});xa="denied"!==t.state}catch(t){xa=!!window.navigator.geolocation}return xa})}().then(t=>this._finishSetupUI(t)),this._container}onRemove(){void 0!==this._geolocationWatchID&&(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(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,Ma=0,Sa=!1}_isOutOfMapMaxBounds(t){const e=this._map.getMaxBounds(),i=t.coords;return e&&(i.longitudee.getEast()||i.latitudee.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){const t=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&t))return;const e=this._map.project(t),i=this._map.unproject([e.x+100,e.y]),r=t.distanceTo(i)/100,o=2*this._accuracy/r;this._circleElement.style.width=`${o.toFixed(2)}px`,this._circleElement.style.height=`${o.toFixed(2)}px`}trigger(){if(!this._setup)return e.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ma--,Sa=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new e.n("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.n("trackuserlocationstart")),this.fire(new e.n("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let t;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ma++,Ma>1?(t={maximumAge:6e5,timeout:0},Sa=!0):(t=this.options.positionOptions,Sa=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},t.GlobeControl=class{constructor(){this._toggleProjection=()=>{var t;const e=null===(t=this._map.getProjection())||void 0===t?void 0:t.type;this._map.setProjection("mercator"!==e&&e?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var t;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),"globe"===(null===(t=this._map.getProjection())||void 0===t?void 0:t.type)?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(t){return this._map=t,this._container=Re.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=Re.create("button","maplibregl-ctrl-globe",this._container),Re.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},t.Hash=pn,t.ImageSource=si,t.KeyboardHandler=Zn,t.LngLatBounds=ei,t.LogoControl=sa,t.Map=ya,t.MapLibreMap=ya,t.MapMouseEvent=bn,t.MapTouchEvent=xn,t.MapWheelEvent=wn,t.Marker=Ta,t.NavigationControl=class{constructor(t){this._updateZoomButtons=()=>{const t=this._map.getZoom(),e=t===this._map.getMaxZoom(),i=t===this._map.getMinZoom();this._zoomInButton.disabled=e,this._zoomOutButton.disabled=i,this._zoomInButton.setAttribute("aria-disabled",e.toString()),this._zoomOutButton.setAttribute("aria-disabled",i.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(t,e)=>{const i=this._map._getUIString(`NavigationControl.${e}`);t.title=i,t.setAttribute("aria-label",i)},this.options=e.e({},va,t),this._container=Re.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",t=>t.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",t=>this._map.zoomIn({},{originalEvent:t})),Re.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",t=>this._map.zoomOut({},{originalEvent:t})),Re.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",t=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:t}):this._map.resetNorth({},{originalEvent:t})}),this._compassIcon=Re.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(t){return this._map=t,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new ba(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(t,e){const i=Re.create("button",t,this._container);return i.type="button",i.addEventListener("click",e),i}},t.Popup=class extends e.E{constructor(t){super(),this._updateOpacity=()=>{void 0!==this.options.locationOccludedOpacity&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),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("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update), this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.n("close"))),this),this._update=t=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=Re.create("div","maplibregl-popup",this._map.getContainer()),this._tip=Re.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const t of this.options.className.split(" "))this._container.classList.add(t);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}let e;if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Te(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),t&&"point"in t&&t.point&&(e=t.point),this._trackPointer&&!e)return;const i=this._flatPos=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&e?e:this._map.transform.locationToScreenPoint(this._lngLat));let r=this.options.anchor;const o=Pe(this.options.offset);if(!r){const t=this._container.offsetWidth,e=this._container.offsetHeight,n=function(t){var e,i,r,o;return t?{top:null!==(e=t.top)&&void 0!==e?e:0,right:null!==(i=t.right)&&void 0!==i?i:0,bottom:null!==(r=t.bottom)&&void 0!==r?r:0,left:null!==(o=t.left)&&void 0!==o?o:0}:{top:0,right:0,bottom:0,left:0}}(this.options.padding);let a;a=i.y+o.bottom.ythis._map.transform.height-e-n.bottom?["bottom"]:[],i.xthis._map.transform.width-t/2-n.right&&a.push("right"),r=0===a.length?"bottom":a.join("-")}let n=i.add(o[r]);this.options.subpixelPositioning||(n=n.round()),this._container.style.transform=`${wa[r]} translate(${n.x}px,${n.y}px)`,ke(this._container,r,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=e.e(Object.create(Aa),t)}addTo(t){return this._map&&this.remove(),this._map=t,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._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new e.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=e.W.convert(t),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(t){return this.setDOMContent(document.createTextNode(t))}setHTML(t){const e=document.createDocumentFragment(),i=document.createElement("body");let r;for(i.innerHTML=t;r=i.firstChild,r;)e.appendChild(r);return this.setDOMContent(e)}getMaxWidth(){var t;return null===(t=this._container)||void 0===t?void 0:t.style.maxWidth}setMaxWidth(t){return this.options.maxWidth=t,this._update(),this}setDOMContent(t){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=Re.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(t),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(t){return this._container&&this._container.classList.add(t),this}removeClassName(t){return this._container&&this._container.classList.remove(t),this}setOffset(t){return this.options.offset=t,this._update(),this}toggleClassName(t){if(this._container)return this._container.classList.toggle(t)}setSubpixelPositioning(t){this.options.subpixelPositioning=t}setPadding(t){this.options.padding=t,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=Re.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const t=this._container.querySelector(Ia);t&&t.focus()}},t.RasterDEMTileSource=ni,t.RasterTileSource=oi,t.ScaleControl=class{constructor(t){this._onMove=()=>{Me(this._map,this._container,this.options)},this.setUnit=t=>{this.options.unit=t,Me(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Pa),t)}getDefaultPosition(){return"bottom-left"}onAdd(t){return this._map=t,this._container=Re.create("div","maplibregl-ctrl maplibregl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},t.ScrollZoomHandler=Wn,t.Style=zr,t.TerrainControl=class{constructor(t){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=t}onAdd(t){return this._map=t,this._container=Re.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=Re.create("button","maplibregl-ctrl-terrain",this._container),Re.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},t.TwoFingersTouchPitchHandler=Un,t.TwoFingersTouchRotateHandler=Nn,t.TwoFingersTouchZoomHandler=Vn,t.TwoFingersTouchZoomRotateHandler=Qn,t.VectorTileSource=ri,t.VideoSource=li,t.addSourceType=(t,i)=>e._(void 0,void 0,void 0,function*(){if(hi(t))throw new Error(`A source type called "${t}" already exists.`);((t,e)=>{ui[t]=e})(t,i)}),t.clearPrewarmedResources=function(){const t=Je;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(Ye),Je=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()"))},t.createTileMesh=yt,t.getGlobalDispatcher=u,t.getMaxParallelImageRequests=function(){return e.c.MAX_PARALLEL_IMAGE_REQUESTS},t.getRTLTextPluginStatus=function(){return w().getRTLTextPluginStatus()},t.getVersion=function(){return Ca},t.getWorkerCount=function(){return Xe.workerCount},t.getWorkerUrl=function(){return e.c.WORKER_URL},t.importScriptInWorkers=function(t){return u().broadcast("IS",t)},t.isTimeFrozen=function(){return De.isFrozen()},t.now=r,t.prewarm=function(){c().acquire(Ye)},t.restoreNow=function(){De.restoreNow()},t.setMaxParallelImageRequests=function(t){e.c.MAX_PARALLEL_IMAGE_REQUESTS=t},t.setNow=function(t){De.setNow(t)},t.setRTLTextPlugin=function(t,e){return w().setRTLTextPlugin(t,e)},t.setWorkerCount=function(t){Xe.workerCount=t},t.setWorkerUrl=function(t){e.c.WORKER_URL=t}}),e}),(()=>{function t(r){var o=i[r];if(void 0!==o)return o.exports;var n=i[r]={id:r,loaded:!1,exports:{}};return e[r](n,n.exports,t),n.loaded=!0,n.exports}var e={5580(t,e,i){var r=i(6110)(i(9325),"DataView");t.exports=r},1549(t,e,i){function r(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e-1}},9905(t){t.exports=function(t,e,i){for(var r=-1,o=null==t?0:t.length;++r0&&n(u)?i>1?t(u,i-1,n,a,s):r(s,u):a||(s[s.length]=u)}return s}},6649(t,e,i){var r=i(3221)();t.exports=r},641(t,e,i){var r=i(6649),o=i(5950);t.exports=function(t,e){return t&&r(t,e,o)}},7422(t,e,i){var r=i(1769),o=i(7797);t.exports=function(t,e){for(var i=0,n=(e=r(e,t)).length;null!=t&&i9007199254740991)return r;do{i%2&&(r+=t),(i=e(i/2))&&(t+=t)}while(i);return r}},9302(t,e,i){var r=i(3488),o=i(6757),n=i(2865);t.exports=function(t,e){return n(o(t,e,r),t+"")}},9570(t,e,i){var r=i(7334),o=i(3243),n=i(3488),a=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:n;t.exports=a},5160(t){t.exports=function(t,e,i){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(i=i>o?o:i)<0&&(i+=o),o=e>i?0:i-e>>>0,e>>>=0;for(var n=Array(o);++r=200){var f=e?null:s(t);if(f)return l(f);p=!1,u=a,m=new r}else m=e?[]:d;t:for(;++c=o?t:r(t,e,i)}},9653(t,e,i){var r=i(7828);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},3290(t,e,i){t=i.nmd(t);var r=i(9325),o=e&&!e.nodeType&&e,n=o&&t&&!t.nodeType&&t,a=n&&n.exports===o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var i=t.length,r=s?s(i):new t.constructor(i);return t.copy(r),r}},1961(t,e,i){var r=i(9653);t.exports=function(t,e){var i=e?r(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}},3730(t,e,i){var r=i(4394);t.exports=function(t,e){if(t!==e){var i=void 0!==t,o=null===t,n=t==t,a=r(t),s=void 0!==e,l=null===e,c=e==e,u=r(e);if(!l&&!u&&!a&&t>e||a&&s&&c&&!l&&!u||o&&s&&c||!i&&c||!n)return 1;if(!o&&!a&&!u&&t=l?c:c*("desc"==i[o]?-1:1)}return t.index-e.index}},3007(t){t.exports=function(t,e){var i=-1,r=t.length;for(e||(e=Array(r));++i1?i[n-1]:void 0,s=n>2?i[2]:void 0;for(a=t.length>3&&"function"==typeof a?(n--,a):void 0,s&&o(i[0],i[1],s)&&(a=n<3?void 0:a,n=1),e=Object(e);++ru))return!1;var p=l.get(t),d=l.get(e);if(p&&d)return p==e&&d==t;var m=-1,f=!0,_=2&i?new r:void 0;for(l.set(t,e),l.set(e,t);++m-1&&t%1==0&&t-1}},1175(t,e,i){var r=i(6025);t.exports=function(t,e){var i=this.__data__,o=r(i,t);return o<0?(++this.size,i.push([t,e])):i[o][1]=e,this}},3040(t,e,i){var r=i(1549),o=i(79),n=i(8223);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(n||o), string:new r}}},7670(t,e,i){var r=i(2651);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},289(t,e,i){var r=i(2651);t.exports=function(t){return r(this,t).get(t)}},4509(t,e,i){var r=i(2651);t.exports=function(t){return r(this,t).has(t)}},2949(t,e,i){var r=i(2651);t.exports=function(t,e){var i=r(this,t),o=i.size;return i.set(t,e),this.size+=i.size==o?0:1,this}},317(t){t.exports=function(t){var e=-1,i=Array(t.size);return t.forEach(function(t,r){i[++e]=[r,t]}),i}},7197(t){t.exports=function(t,e){return function(i){return null!=i&&i[t]===e&&(void 0!==e||t in Object(i))}}},2224(t,e,i){var r=i(104);t.exports=function(t){var e=r(t,function(t){return 500===i.size&&i.clear(),t}),i=e.cache;return e}},1042(t,e,i){var r=i(6110)(Object,"create");t.exports=r},3650(t,e,i){var r=i(4335)(Object.keys,Object);t.exports=r},181(t){t.exports=function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e}},6009(t,e,i){t=i.nmd(t);var r=i(4840),o=e&&!e.nodeType&&e,n=o&&t&&!t.nodeType&&t,a=n&&n.exports===o&&r.process,s=function(){try{return n&&n.require&&n.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s},9350(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},4335(t){t.exports=function(t,e){return function(i){return t(e(i))}}},6757(t,e,i){var r=i(1033),o=Math.max;t.exports=function(t,e,i){return e=o(void 0===e?t.length-1:e,0),function(){for(var n=arguments,a=-1,s=o(n.length-e,0),l=Array(s);++a0){if(++i>=800)return arguments[0]}else i=0;return t.apply(void 0,arguments)}}},1420(t,e,i){var r=i(79);t.exports=function(){this.__data__=new r,this.size=0}},938(t){t.exports=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}},3605(t){t.exports=function(t){return this.__data__.get(t)}},9817(t){t.exports=function(t){return this.__data__.has(t)}},945(t,e,i){var r=i(79),o=i(8223),n=i(3661);t.exports=function(t,e){var i=this.__data__;if(i instanceof r){var a=i.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++i.size,this;i=this.__data__=new n(a)}return i.set(t,e),this.size=i.size,this}},6959(t){t.exports=function(t,e,i){for(var r=i-1,o=t.length;++r-1&&t%1==0&&t<=9007199254740991}},3805(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},346(t){t.exports=function(t){return null!=t&&"object"==typeof t}},1331(t,e,i){var r=i(2552),o=i(8879),n=i(346),a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,u=l.call(Object);t.exports=function(t){if(!n(t)||"[object Object]"!=r(t))return!1;var e=o(t);if(null===e)return!0;var i=c.call(e,"constructor")&&e.constructor;return"function"==typeof i&&i instanceof i&&l.call(i)==u}},4394(t,e,i){var r=i(2552),o=i(346);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},7167(t,e,i){var r=i(4901),o=i(7301),n=i(6009),a=n&&n.isTypedArray,s=a?o(a):r;t.exports=s},5950(t,e,i){var r=i(695),o=i(8984),n=i(4894);t.exports=function(t){return n(t)?r(t):o(t)}},7241(t,e,i){var r=i(695),o=i(2903),n=i(4894);t.exports=function(t){return n(t)?r(t,!0):o(t)}},104(t,e,i){function r(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var i=function(){var r=arguments,o=e?e.apply(this,r):r[0],n=i.cache;if(n.has(o))return n.get(o);var a=t.apply(this,r);return i.cache=n.set(o,a)||n,a};return i.cache=new(r.Cache||o),i}var o=i(3661);r.Cache=o,t.exports=r},5364(t,e,i){var r=i(5250),o=i(999)(function(t,e,i){r(t,e,i)});t.exports=o},3950(t){t.exports=function(){}},583(t,e,i){var r=i(7237),o=i(7255),n=i(8586),a=i(7797);t.exports=function(t){return n(t)?r(a(t)):o(t)}},3181(t,e,i){var r=i(5508)();t.exports=r},2493(t,e,i){var r=i(4051),o=i(6800),n=i(1489),a=i(3222);t.exports=function(t,e,i){return e=(i?o(t,e,i):void 0===e)?1:n(e),r(a(t),e)}},3031(t,e,i){var r=i(3120),o=i(6155),n=i(9302),a=i(6800),s=n(function(t,e){if(null==t)return[];var i=e.length;return i>1&&a(t,e[0],e[1])?e=[]:i>2&&a(e[0],e[1],e[2])&&(e=[e[0]]),o(t,r(e,1),[])});t.exports=s},3345(t){t.exports=function(){return[]}},9935(t){t.exports=function(){return!1}},7400(t,e,i){var r=i(9374),o=1/0;t.exports=function(t){return t?(t=r(t))===o||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},1489(t,e,i){var r=i(7400);t.exports=function(t){var e=r(t),i=e%1;return e==e?i?e-i:e:0}},9374(t,e,i){var r=i(4128),o=i(3805),n=i(4394),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(n(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var i=s.test(t);return i||l.test(t)?c(t.slice(2),i?2:8):a.test(t)?NaN:+t}},9884(t,e,i){var r=i(1791),o=i(7241);t.exports=function(t){return r(t,o(t))}},3222(t,e,i){var r=i(7556);t.exports=function(t){return null==t?"":r(t)}},3375(t,e,i){var r=i(5765);t.exports=function(t){return t&&t.length?r(t):[]}},5808(t,e,i){var r=i(2507)("toUpperCase");t.exports=r},6645(t,e,i){var r=i(1733),o=i(5434),n=i(3222),a=i(2225);t.exports=function(t,e,i){return t=n(t),void 0===(e=i?void 0:e)?o(t)?a(t):r(t):t.match(e)||[]}},7248(t,e,i){var r=i(6547),o=i(1234);t.exports=function(t,e){return o(t||[],e||[],r)}}},i={};t.n=e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},t.d=(e,i)=>{for(var r in i)t.o(i,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:i[r]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};(()=>{"use strict";function e({pluralizer:t,includeZero:e=!0,ordinal:i=!1}){return function(r,o){return[e&&0===o?"zero":"",t(o,i)].filter(Boolean)}}function i(t){return t?Object.keys(t).reduce((e,i)=>(e[L()(i)]=t[i],e),{}):{}}function o(t){return null!=t}function n(t){var e=0|t;return t>0||t===e?e:e-1}function a(t){for(var e,i,r=1,o=t.length,n=t[0]+"";rc^i?1:-1;for(s=(l=o.length)<(c=n.length)?l:c,a=0;an[a]^i?1:-1;return l==c?0:l>c^i?1:-1}function l(t,e,i,r){if(ti||t!==j(t))throw Error(V+(r||"Argument")+("number"==typeof t?ti?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function c(t){var e=t.c.length-1;return n(t.e/U)==e&&t.c[e]%2!=0}function u(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function h(t,e,i){var r,o;if(e<0){for(o=i+".";++e;o+=i);t=o+t}else if(++e>(r=t.length)){for(o=i,e-=r;--e;o+=i);t+=o}else e0?e-function(t){return t.isZero()?1:Math.floor(Math.log10(t.abs().toNumber())+1)}(t):e}(t,e);if(null===i)return t.toString();const r=p(e.roundMode);if(i>=0)return t.toFixed(i,r);const o=Math.pow(10,Math.abs(i));return(t=new W(t.div(o).toFixed(0,r)).times(o)).toString()}function m(t,e=!1){let i=W(NaN);try{i=new W(t)}catch(r){if(e&&i.isNaN())throw new Error(`"${t}" is not a valid numeric value`)}return i}function f(t,e){var i,r,o;const n=m(t,e.raise),a=d(n,e),s=new W(a),l=s.lt(0),c=s.isZero();let[u,h]=a.split(".");const p=[];let f;const _=null!==(i=e.format)&&void 0!==i?i:"%n",g=null!==(r=e.negativeFormat)&&void 0!==r?r:`-${_}`,y=l&&!c?g:_;for(u=u.replace("-","");u.length>0;)p.unshift(u.substr(Math.max(0,u.length-3),3)),u=u.substr(0,u.length-3);return u=p.join(""),f=p.join(e.delimiter),h=e.significant?function({significand:t,whole:e,precision:i}){if("0"===e||null===i)return t;const r=Math.max(0,i-e.length);return(null!=t?t:"").substr(0,r)}({whole:u,significand:h,precision:e.precision}):null!=h?h:X()("0",null!==(o=e.precision)&&void 0!==o?o:0),e.stripInsignificantZeros&&h&&(h=h.replace(/0+$/,"")),n.isNaN()&&(f=t.toString()),h&&n.isFinite()&&(f+=(e.separator||".")+h),function(t,{formattedNumber:e,unit:i}){return t.replace("%n",e).replace("%u",i)}(y,{formattedNumber:f,unit:e.unit})}function _(t,e,i){let r="";return(e instanceof String||"string"==typeof e)&&(r=e),e instanceof Array&&(r=e.join(t.defaultSeparator)),i.scope&&(r=[i.scope,r].join(t.defaultSeparator)),r}function g(t){var e,i;if(null===t)return"null";const r=typeof t;return"object"!==r?r:(null===(i=null===(e=null==t?void 0:t.constructor)||void 0===e?void 0:e.name)||void 0===i?void 0:i.toLowerCase())||"object"}function y(t,e,i){i=Object.keys(i).reduce((e,r)=>(e[t.transformKey(r)]=i[r],e),{});const r=e.match(t.placeholder);if(!r)return e;for(;r.length;){let n;const a=r.shift(),s=a.replace(t.placeholder,"$1");n=o(i[s])?i[s].toString().replace(/\$/gm,"_#$#_"):s in i?t.nullPlaceholder(t,a,e,i):t.missingPlaceholder(t,a,e,i);const l=new RegExp(a.replace(/\{/gm,"\\{").replace(/\}/gm,"\\}"),"g");e=e.replace(l,n)}return e.replace(/_#\$#_/g,"$")}function v(t,e,i={}){const r="locale"in(i=Object.assign({},i))?i.locale:t.locale,n=g(r),a=t.locales.get("string"===n?r:typeof r).slice(),s=_(t,e,i).split(t.defaultSeparator).map(e=>t.transformKey(e)),l=a.map(e=>s.reduce((t,e)=>t&&t[e],t.translations[e]));return l.push(i.defaultValue),l.find(t=>o(t))}function b(t){if(t instanceof Date)return t;if("number"==typeof t){const e=new Date;return e.setTime(t),e}const e=new String(t).match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2})(?:[.,](\d{1,3}))?)?(Z|\+00:?00)?/);if(e){const t=e.slice(1,8).map(t=>parseInt(t,10)||0);t[1]-=1;const[i,r,o,n,a,s,l]=t;return e[8]?new Date(Date.UTC(i,r,o,n,a,s,l)):new Date(i,r,o,n,a,s,l)}t.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\d+) (\d+:\d+:\d+) ([+-]\d+) (\d+)/)&&(new Date).setTime(Date.parse([RegExp.$1,RegExp.$2,RegExp.$3,RegExp.$6,RegExp.$4,RegExp.$5].join(" ")));const i=new Date;return i.setTime(Date.parse(t)),i}function x({i18n:t,count:e,scope:i,options:r,baseScope:n}){let a,s;if(r=Object.assign({},r),a="object"==typeof i&&i?i:v(t,i,r),!a)return t.missingTranslation.get(i,r);const l=t.pluralization.get(r.locale)(t,e),c=[];for(;l.length;){const t=l.shift();if(o(a[t])){s=a[t];break}c.push(t)}return o(s)?(r.count=e,t.interpolate(t,s,r)):t.missingTranslation.get(n.split(t.defaultSeparator).concat([c[0]]),r)}t.r(r),t.d(r,{I18n:()=>pt,Locales:()=>E,MissingTranslation:()=>ut,Pluralization:()=>D,useMakePlural:()=>e});var w=t(8156),T=t.n(w),k=t(1448),M=t.n(k),S=t(5364),P=t.n(S),A=t(3375),I=t.n(A);const C=(t,e)=>{const i=[],r=[];return i.push(e),e||i.push(t.locale),t.enableFallback&&i.push(t.defaultLocale),i.filter(Boolean).map(t=>t.toString()).forEach(function(e){if(r.includes(e)||r.push(e),!t.enableFallback)return;const i=e.split("-");3===i.length&&r.push(`${i[0]}-${i[1]}`),r.push(i[0])}),I()(r)};class E{constructor(t){this.i18n=t,this.registry={},this.register("default",C)}register(t,e){if("function"!=typeof e){const t=e;e=()=>t}this.registry[t]=e}get(t){let e=this.registry[t]||this.registry[this.i18n.locale]||this.registry.default;return"function"==typeof e&&(e=e(this.i18n,t)),e instanceof Array||(e=[e]),e}}const z=e({pluralizer:(t,e)=>{const i=String(t).split("."),r=!i[1],o=Number(i[0])==t,n=o&&i[0].slice(-1),a=o&&i[0].slice(-2);return e?1==n&&11!=a?"one":2==n&&12!=a?"two":3==n&&13!=a?"few":"other":1==t&&r?"one":"other"},includeZero:!0});class D{constructor(t){this.i18n=t,this.registry={},this.register("default",z)}register(t,e){this.registry[t]=e}get(t){return this.registry[t]||this.registry[this.i18n.locale]||this.registry.default}}var O=t(4058),L=t.n(O),R=function t(e){function i(t,e){var r,n,a,s,c,u,h,p,d=this;if(!(d instanceof i))return new i(t,e);if(p=typeof t,null==e){if(o(t))return d.s=t.s,void(!t.c||t.e>D?d.c=d.e=null:t.e=10;c/=10,s++);return void(s>D?d.c=d.e=null:(d.e=s,d.c=[t]))}h=String(t)}else{if("string"==p){if(h=t,!F.test(h))return y(d,h)}else{if("bigint"!=p)throw Error(V+"Invalid argument: "+t);h=String(t)}d.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}(s=h.indexOf("."))>-1&&(h=h.replace(".","")),(c=h.search(/e/i))>0?(s<0&&(s=c),s+=+h.slice(c+1),h=h.substring(0,c)):s<0&&(s=h.length)}else{if("string"!=p)throw Error(V+"String expected: "+t);for(l(e,2,H.length,"Base"),h=t,d.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1,r=H.slice(0,e),s=c=0,u=h.length;cs){s=u;continue}}else if(!a&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){a=!0,c=-1,s=0;continue}return y(d,t,e)}(s=(h=g(h,e,10,d.s)).indexOf("."))>-1?h=h.replace(".",""):s=h.length}for(c=0;48===h.charCodeAt(c);c++);for(u=h.length;48===h.charCodeAt(--u););if(h=h.slice(c,++u))if(u-=c,(s=s-c-1)>D)d.c=d.e=null;else if(s=E)?u(d,c):h(d,c,"0");else if(s=(t=m(new i(t),e,r)).e,p=(d=a(t.c)).length,1==o||2==o&&(e<=s||s<=C)){for(;pc),d=h(d,s,"0"),s+1>p){if(--e>0)for(d+=".";e--;d+="0");}else if((e+=s-p)>0)for(s+1==p&&(d+=".");e--;d+="0");return t.s<0&&n?"-"+d:d}function o(t){return t instanceof i||!!t&&!0===t._isBigNumber}function p(t,e){for(var r,o,n=1,a=new i(t[0]);n=10;o/=10,r++);return(i=r+i*U-1)>D?t.c=t.e=null:i=10;s/=10,o++);if((n=e-o)<0)n+=U,a=e,l=h[c=0],u=j(l/p[o-a-1]%10);else if((c=B((n+1)/U))>=h.length){if(!r)break t;for(;h.length<=c;h.push(0));l=u=0,o=1,a=(n%=U)-U+1}else{for(l=s=h[c],o=1;s>=10;s/=10,o++);u=(a=(n%=U)-U+o)<0?0:j(l/p[o-a-1]%10)}if(r=r||e<0||null!=h[c+1]||(a<0?l:l%p[o-a-1]),r=i<4?(u||r)&&(0==i||i==(t.s<0?3:2)):u>5||5==u&&(4==i||r||6==i&&(n>0?a>0?l/p[o-a]:0:h[c-1])%10&1||i==(t.s<0?8:7)),e<1||!h[0])return h.length=0,r?(e-=t.e+1,h[0]=p[(U-e%U)%U],t.e=-e||0):h[0]=t.e=0,t;if(0==n?(h.length=c,s=1,c--):(h.length=c+1,s=p[U-n],h[c]=a>0?j(l/p[o-a]%p[a])*s:0),r)for(;;){if(0==c){for(n=1,a=h[0];a>=10;a/=10,n++);for(a=h[0]+=s,s=1;a>=10;a/=10,s++);n!=s&&(t.e++,h[0]==N&&(h[0]=1));break}if(h[c]+=s,h[c]!=N)break;h[c--]=0,s=1}for(n=h.length;0===h[--n];h.pop());}t.e>D?t.c=t.e=null:t.e=E?u(e,i):h(e,i,"0"),t.s<0?"-"+e:e)}var _,g,y,v,b,x,w,T,k,M,S=i.prototype={constructor:i,toString:null,valueOf:null},P=new i(1),A=20,I=4,C=-7,E=21,z=-1e7,D=1e7,O=!1,L=1,R=0,W={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},H="0123456789abcdefghijklmnopqrstuvwxyz";return i.clone=t,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=function(t){var e,i;if(null!=t){if("object"!=typeof t)throw Error(V+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(l(i=t[e],0,q,e),A=i),t.hasOwnProperty(e="ROUNDING_MODE")&&(l(i=t[e],0,8,e),I=i),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((i=t[e])&&i.pop?(l(i[0],-q,0,e),l(i[1],0,q,e),C=i[0],E=i[1]):(l(i,-q,q,e),C=-(E=i<0?-i:i))),t.hasOwnProperty(e="RANGE"))if((i=t[e])&&i.pop)l(i[0],-q,-1,e),l(i[1],1,q,e),z=i[0],D=i[1];else{if(l(i,-q,q,e),!i)throw Error(V+e+" cannot be zero: "+i);z=-(D=i<0?-i:i)}if(t.hasOwnProperty(e="CRYPTO")){if((i=t[e])!==!!i)throw Error(V+e+" not true or false: "+i);if(i){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw O=!i,Error(V+"crypto unavailable");O=i}else O=i}if(t.hasOwnProperty(e="MODULO_MODE")&&(l(i=t[e],0,9,e),L=i),t.hasOwnProperty(e="POW_PRECISION")&&(l(i=t[e],0,q,e),R=i),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(i=t[e]))throw Error(V+e+" not an object: "+i);W=i}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(i=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(i))throw Error(V+e+" invalid: "+i);H=i}}return{DECIMAL_PLACES:A,ROUNDING_MODE:I,EXPONENTIAL_AT:[C,E],RANGE:[z,D],CRYPTO:O,MODULO_MODE:L,POW_PRECISION:R,FORMAT:W,ALPHABET:H}},i.isBigNumber=function(t){if(!o(t))return!1;var e,i,r=t.c,n=t.e,a=t.s;if("[object Array]"!={}.toString.call(r))return null===r&&null===n&&(null===a||1===a||-1===a);if(1!==a&&-1!==a||n<-q||n>q||n!==j(n))return!1;if(0===r[0])return 0===n&&1===r.length;if((e=(n+1)%U)<1&&(e+=U),String(r[0]).length!==e)return!1;for(e=0;e=N||i!==j(i))return!1;return 0!==i},i.maximum=i.max=function(){return p(arguments,-1)},i.minimum=i.min=function(){return p(arguments,1)},i.random=(k=9007199254740992,M=Math.random()*k&2097151?function(){return j(Math.random()*k)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,r,o,n,a,s=0,c=[],u=new i(P);if(null==t?t=A:l(t,0,q),n=B(t/U),O)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(n*=2));s>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[s]=r[0],e[s+1]=r[1]):(c.push(a%1e14),s+=2);s=n/2}else{if(!crypto.randomBytes)throw O=!1,Error(V+"crypto unavailable");for(e=crypto.randomBytes(n*=7);s=9e15?crypto.randomBytes(7).copy(e,s):(c.push(a%1e14),s+=7);s=n/7}if(!O)for(;s=10;a/=10,s++);si-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/i|0,a[o]%=i)}return a.reverse()}var e="0123456789";return function(r,o,n,s,l){var c,u,p,d,m,f,g,y,v=r.indexOf("."),b=A,x=I;for(v>=0&&(d=R,R=0,r=r.replace(".",""),f=(y=new i(o)).pow(r.length-v),R=d,y.c=t(h(a(f.c),f.e,"0"),10,n,e),y.e=y.c.length),p=d=(g=t(r,o,n,l?(c=H,e):(c=e,H))).length;0==g[--d];g.pop());if(!g[0])return c.charAt(0);if(v<0?--p:(f.c=g,f.e=p,f.s=s,g=(f=_(f,y,b,x,n)).c,m=f.r,p=f.e),v=g[u=p+b+1],d=n/2,m=m||u<0||null!=g[u+1],m=x<4?(null!=v||m)&&(0==x||x==(f.s<0?3:2)):v>d||v==d&&(4==x||m||6==x&&1&g[u-1]||x==(f.s<0?8:7)),u<1||!g[0])r=m?h(c.charAt(1),-b,c.charAt(0)):c.charAt(0);else{if(g.length=u,m)for(--n;++g[--u]>n;)g[u]=0,u||(++p,g=[1].concat(g));for(d=g.length;!g[--d];);for(v=0,r="";v<=d;r+=c.charAt(g[v++]));r=h(r,p,c.charAt(0))}return r}}(),_=function(){function t(t,e,i){var r,o,n,a,s=0,l=t.length,c=e%$,u=e/$|0;for(t=t.slice();l--;)s=((o=c*(n=t[l]%$)+(r=u*n+(a=t[l]/$|0)*c)%$*$+s)/i|0)+(r/$|0)+u*a,t[l]=o%i;return s&&(t=[s].concat(t)),t}function e(t,e,i,r){var o,n;if(i!=r)n=i>r?1:-1;else for(o=n=0;oe[o]?1:-1;break}return n}function r(t,e,i,r){for(var o=0;i--;)t[i]-=o,o=t[i]1;t.splice(0,1));}return function(o,a,s,l,c){var u,h,p,d,f,_,g,y,v,b,x,w,T,k,M,S,P,A=o.s==a.s?1:-1,I=o.c,C=a.c;if(!(I&&I[0]&&C&&C[0]))return new i(o.s&&a.s&&(I?!C||I[0]!=C[0]:C)?I&&0==I[0]||!C?0*A:A/0:NaN);for(v=(y=new i(A)).c=[],A=s+(h=o.e-a.e)+1,c||(c=N,h=n(o.e/U)-n(a.e/U),A=A/U|0),p=0;C[p]==(I[p]||0);p++);if(C[p]>(I[p]||0)&&h--,A<0)v.push(1),d=!0;else{for(k=I.length,S=C.length,p=0,A+=2,(f=j(c/(C[0]+1)))>1&&(C=t(C,f,c),I=t(I,f,c),S=C.length,k=I.length),T=S,x=(b=I.slice(0,S)).length;x=c/2&&M++;do{if(f=0,(u=e(C,b,S,x))<0){if(w=b[0],S!=x&&(w=w*c+(b[1]||0)),(f=j(w/M))>1)for(f>=c&&(f=c-1),g=(_=t(C,f,c)).length,x=b.length;1==e(_,b,g,x);)f--,r(_,S=10;A/=10,p++);m(y,s+(y.e=p+h*U-1)+1,l,d)}else y.e=h,y.r=+d;return y}}(),v=/^(-?)0([xbo])(?=\w[\w.]*$)/i,b=/^([^.]+)\.$/,x=/^\.([^.]+)$/,w=/^-?(Infinity|NaN)$/,T=/^\s*\+(?=[\w.])|^\s+|\s+$/g,y=function(t,e,r){var o,n=e.replace(T,"");if(w.test(n))return t.s=isNaN(n)?null:n<0?-1:1,void(t.c=t.e=null);if(n=n.replace(v,function(t,e,i){return o="x"==(i=i.toLowerCase())?16:"b"==i?2:8,r&&r!=o?t:e}),r&&(o=r,n=n.replace(b,"$1").replace(x,"0.$1")),e!=n)return new i(n,o);throw Error(V+"Not a"+(r?" base "+r:"")+" number: "+e)},S.absoluteValue=S.abs=function(){var t=new i(this);return t.s<0&&(t.s=1),t},S.comparedTo=function(t,e){return s(this,new i(t,e))},S.decimalPlaces=S.dp=function(t,e){var r,o,a,s=this;if(null!=t)return l(t,0,q),null==e?e=I:l(e,0,8),m(new i(s),t+s.e+1,e);if(!(r=s.c))return null;if(o=((a=r.length-1)-n(this.e/U))*U,a=r[a])for(;a%10==0;a/=10,o--);return o<0&&(o=0),o},S.dividedBy=S.div=function(t,e){return _(this,new i(t,e),A,I)},S.dividedToIntegerBy=S.idiv=function(t,e){return _(this,new i(t,e),0,1)},S.exponentiatedBy=S.pow=function(t,e){var r,o,n,a,s,l,u,h,p=this;if((t=new i(t)).c&&!t.isInteger())throw Error(V+"Exponent not an integer: "+f(t));if(null!=e&&(e=new i(e)),s=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return h=new i(Math.pow(+f(p),s?t.s*(2-c(t)):+f(t))),e?h.mod(e):h;if(l=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new i(NaN);(o=!l&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||s&&p.c[1]>=24e7:p.c[0]<8e13||s&&p.c[0]<=9999975e7)))return a=p.s<0&&c(t)?-0:0,p.e>-1&&(a=1/a),new i(l?1/a:a);R&&(a=B(R/U+2))}for(s?(r=new i(.5),l&&(t.s=1),u=c(t)):u=(n=Math.abs(+f(t)))%2,h=new i(P);;){if(u){if(!(h=h.times(p)).c)break;a?h.c.length>a&&(h.c.length=a):o&&(h=h.mod(e))}if(n){if(0===(n=j(n/2)))break;u=n%2}else if(m(t=t.times(r),t.e+1,1),t.e>14)u=c(t);else{if(0===(n=+f(t)))break;u=n%2}p=p.times(p),a?p.c&&p.c.length>a&&(p.c.length=a):o&&(p=p.mod(e))}return o?h:(l&&(h=P.div(h)),e?h.mod(e):a?m(h,R,I,void 0):h)},S.integerValue=function(t){var e=new i(this);return null==t?t=I:l(t,0,8),m(e,e.e+1,t)},S.isEqualTo=S.eq=function(t,e){return 0===s(this,new i(t,e))},S.isFinite=function(){return!!this.c},S.isGreaterThan=S.gt=function(t,e){return s(this,new i(t,e))>0},S.isGreaterThanOrEqualTo=S.gte=function(t,e){return 1===(e=s(this,new i(t,e)))||0===e},S.isInteger=function(){return!!this.c&&n(this.e/U)>this.c.length-2},S.isLessThan=S.lt=function(t,e){return s(this,new i(t,e))<0},S.isLessThanOrEqualTo=S.lte=function(t,e){return-1===(e=s(this,new i(t,e)))||0===e},S.isNaN=function(){return!this.s},S.isNegative=function(){return this.s<0},S.isPositive=function(){return this.s>0},S.isZero=function(){return!!this.c&&0==this.c[0]},S.minus=function(t,e){var r,o,a,s,l=this,c=l.s;if(e=(t=new i(t,e)).s,!c||!e)return new i(NaN);if(c!=e)return t.s=-e,l.plus(t);var u=l.e/U,h=t.e/U,p=l.c,m=t.c;if(!u||!h){if(!p||!m)return p?(t.s=-e,t):new i(m?l:NaN);if(!p[0]||!m[0])return m[0]?(t.s=-e,t):new i(p[0]?l:3==I?-0:0)}if(u=n(u),h=n(h),p=p.slice(),c=u-h){for((s=c<0)?(c=-c,a=p):(h=u,a=m),a.reverse(),e=c;e--;a.push(0));a.reverse()}else for(o=(s=(c=p.length)<(e=m.length))?c:e,c=e=0;e0)for(;e--;p[r++]=0);for(e=N-1;o>c;){if(p[--o]=0;){for(r=0,f=w[a]%v,_=w[a]/v|0,s=a+(l=u);s>a;)r=((h=f*(h=x[--l]%v)+(c=_*h+(p=x[l]/v|0)*f)%v*v+g[s]+r)/y|0)+(c/v|0)+_*p,g[s--]=h%y;g[s]=r}return r?++o:g.splice(0,1),d(t,g,o)},S.negated=function(){var t=new i(this);return t.s=-t.s||null,t},S.plus=function(t,e){var r,o=this,a=o.s;if(e=(t=new i(t,e)).s,!a||!e)return new i(NaN);if(a!=e)return t.s=-e,o.minus(t);var s=o.e/U,l=t.e/U,c=o.c,u=t.c;if(!s||!l){if(!c||!u)return new i(a/0);if(!c[0]||!u[0])return u[0]?t:new i(c[0]?o:0*a)}if(s=n(s),l=n(l),c=c.slice(),a=s-l){for(a>0?(l=s,r=u):(a=-a,r=c),r.reverse();a--;r.push(0));r.reverse()}for((a=c.length)-(e=u.length)<0&&(r=u,u=c,c=r,e=a),a=0;e;)a=(c[--e]=c[e]+u[e]+a)/N|0,c[e]=N===c[e]?0:c[e]%N;return a&&(c=[a].concat(c),++l),d(t,c,l)},S.precision=S.sd=function(t,e){var r,o,n,a=this;if(null!=t&&t!==!!t)return l(t,1,q),null==e?e=I:l(e,0,8),m(new i(a),t,e);if(!(r=a.c))return null;if(o=(n=r.length-1)*U+1,n=r[n]){for(;n%10==0;n/=10,o--);for(n=r[0];n>=10;n/=10,o++);}return t&&a.e+1>o&&(o=a.e+1),o},S.shiftedBy=function(t){return l(t,-G,G),this.times("1e"+t)},S.squareRoot=S.sqrt=function(){var t,e,r,o,s,l=this,c=l.c,u=l.s,h=l.e,p=A+4,d=new i("0.5");if(1!==u||!c||!c[0])return new i(!u||u<0&&(!c||c[0])?NaN:c?l:1/0);if(0==(u=Math.sqrt(+f(l)))||u==1/0?(((e=a(c)).length+h)%2==0&&(e+="0"),u=Math.sqrt(+e),h=n((h+1)/2)-(h<0||h%2),r=new i(e=u==1/0?"5e"+h:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+h)):r=new i(u+""),r.c[0])for((u=(h=r.e)+p)<3&&(u=0);;)if(s=r,r=d.times(s.plus(_(l,s,p,1))),a(s.c).slice(0,u)===(e=a(r.c)).slice(0,u)){if(r.e0&&m>0){for(n=m%s||s,u=d.substr(0,n);n0&&(u+=c+d.slice(n)),p&&(u="-"+u)}r=h?u+(i.decimalSeparator||"")+((l=+i.fractionGroupSize)?h.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(i.fractionGroupSeparator||"")):h):u}return(i.prefix||"")+r+(i.suffix||"")},S.toFraction=function(t){var e,r,o,n,s,l,c,u,h,p,d,m,g=this,y=g.c;if(null!=t&&(!(c=new i(t)).isInteger()&&(c.c||1!==c.s)||c.lt(P)))throw Error(V+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+f(c));if(!y)return new i(g);for(e=new i(P),h=r=new i(P),o=u=new i(P),m=a(y),s=e.e=m.length-g.e-1, e.c[0]=Z[(l=s%U)<0?U+l:l],t=!t||c.comparedTo(e)>0?s>0?e:h:c,l=D,D=1/0,c=new i(m),u.c[0]=0;p=_(c,e,0,1),1!=(n=r.plus(p.times(o))).comparedTo(t);)r=o,o=n,h=u.plus(p.times(n=h)),u=n,e=c.minus(p.times(n=e)),c=n;return n=_(t.minus(r),o,0,1),u=u.plus(n.times(h)),r=r.plus(n.times(o)),u.s=h.s=g.s,d=_(h,o,s*=2,I).minus(g).abs().comparedTo(_(u,r,s,I).minus(g).abs())<1?[h,o]:[u,r],D=l,d},S.toNumber=function(){return+f(this)},S.toObject=function(){var t=this;return{c:t.c?t.c.slice():null,e:t.e,s:t.s}},S.toPrecision=function(t,e){return null!=t&&l(t,1,q),r(this,t,e,2)},S.toString=function(t){var e,i=this,r=i.s,o=i.e;return null===o?r?(e="Infinity",r<0&&(e="-"+e)):e="NaN":(null==t?e=o<=C||o>=E?u(a(i.c),o):h(a(i.c),o,"0"):(l(t,2,H.length,"Base"),e=g(h(a(i.c),o,"0"),10,t,r,!0)),r<0&&i.c[0]&&(e="-"+e)),e},S.valueOf=S.toJSON=function(){return f(this)},S._isBigNumber=!0,null!=e&&i.set(e),i}(),F=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,B=Math.ceil,j=Math.floor,V="[BigNumber Error] ",N=1e14,U=14,G=9007199254740991,Z=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],$=1e7,q=1e9;const W=R;var H;!function(t){t[t.up=W.ROUND_UP]="up",t[t.down=W.ROUND_DOWN]="down",t[t.truncate=W.ROUND_DOWN]="truncate",t[t.halfUp=W.ROUND_HALF_UP]="halfUp",t[t.default=W.ROUND_HALF_UP]="default",t[t.halfDown=W.ROUND_HALF_DOWN]="halfDown",t[t.halfEven=W.ROUND_HALF_EVEN]="halfEven",t[t.banker=W.ROUND_HALF_EVEN]="banker",t[t.ceiling=W.ROUND_CEIL]="ceiling",t[t.ceil=W.ROUND_CEIL]="ceil",t[t.floor=W.ROUND_FLOOR]="floor"}(H||(H={}));var Y=t(2493),X=t.n(Y),K=t(3031),J=t.n(K),Q=t(7248);const tt={0:"unit",1:"ten",2:"hundred",3:"thousand",6:"million",9:"billion",12:"trillion",15:"quadrillion","-1":"deci","-2":"centi","-3":"mili","-6":"micro","-9":"nano","-12":"pico","-15":"femto"},et=t.n(Q)()(Object.values(tt),Object.keys(tt).map(t=>parseInt(t,10))),it=["byte","kb","mb","gb","tb","pb","eb"],rt={meridian:{am:"AM",pm:"PM"},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbrDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],monthNames:[null,"January","February","March","April","May","June","July","August","September","October","November","December"],abbrMonthNames:[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};var ot=t(3181),nt=t.n(ot);const at=(t,e,i)=>i>=t&&i<=e,st=function(t,e){e instanceof Array&&(e=e.join(t.defaultSeparator));const i=e.split(t.defaultSeparator).slice(-1)[0];return t.missingTranslationPrefix+i.replace("_"," ").replace(/([a-z])([A-Z])/g,(t,e,i)=>`${e} ${i.toLowerCase()}`)},lt=(t,e,i)=>{const r=_(t,e,i),o="locale"in i?i.locale:t.locale,n=g(o);return`[missing "${["string"==n?o:n,r].join(t.defaultSeparator)}" translation]`},ct=(t,e,i)=>{const r=_(t,e,i),o=[t.locale,r].join(t.defaultSeparator);throw new Error(`Missing translation: ${o}`)};class ut{constructor(t){this.i18n=t,this.registry={},this.register("guess",st),this.register("message",lt),this.register("error",ct)}register(t,e){this.registry[t]=e}get(t,e){var i;return this.registry[null!==(i=e.missingBehavior)&&void 0!==i?i:this.i18n.missingBehavior](this.i18n,t,e)}}const ht={defaultLocale:"en",locale:"en",defaultSeparator:".",placeholder:/(?:\{\{|%\{)(.*?)(?:\}\}?)/gm,enableFallback:!1,missingBehavior:"message",missingTranslationPrefix:"",missingPlaceholder:(t,e)=>`[missing "${e}" value]`,nullPlaceholder:(t,e,i,r)=>t.missingPlaceholder(t,e,i,r),transformKey:t=>t};class pt{constructor(t={},e={}){this._locale=ht.locale,this._defaultLocale=ht.defaultLocale,this._version=0,this.onChangeHandlers=[],this.translations={},this.t=this.translate,this.p=this.pluralize,this.l=this.localize,this.distanceOfTimeInWords=this.timeAgoInWords;const{locale:i,enableFallback:r,missingBehavior:o,missingTranslationPrefix:n,missingPlaceholder:a,nullPlaceholder:s,defaultLocale:l,defaultSeparator:c,placeholder:u,transformKey:h}=Object.assign(Object.assign({},ht),e);this.locale=i,this.defaultLocale=l,this.defaultSeparator=c,this.enableFallback=r,this.locale=i,this.missingBehavior=o,this.missingTranslationPrefix=n,this.missingPlaceholder=a,this.nullPlaceholder=s,this.placeholder=u,this.pluralization=new D(this),this.locales=new E(this),this.missingTranslation=new ut(this),this.transformKey=h,this.interpolate=y,this.store(t)}store(t){P()(this.translations,t),this.hasChanged()}get locale(){return this._locale||this.defaultLocale||"en"}set locale(t){if("string"!=typeof t)throw new Error(`Expected newLocale to be a string; got ${g(t)}`);const e=this._locale!==t;this._locale=t,e&&this.hasChanged()}get defaultLocale(){return this._defaultLocale||"en"}set defaultLocale(t){if("string"!=typeof t)throw new Error(`Expected newLocale to be a string; got ${g(t)}`);const e=this._defaultLocale!==t;this._defaultLocale=t,e&&this.hasChanged()}translate(t,e){const i=function(t,e,i){let r=[{scope:e}];if(o(i.defaults)&&(r=r.concat(i.defaults)),o(i.defaultValue)){const o="function"==typeof i.defaultValue?i.defaultValue(t,e,i):i.defaultValue;r.push({message:o}),delete i.defaultValue}return r}(this,t,e=Object.assign({},e));let r;return i.some(t=>(o(t.scope)?r=v(this,t.scope,e):o(t.message)&&(r=t.message),null!=r))?("string"==typeof r?r=this.interpolate(this,r,e):"object"==typeof r&&r&&o(e.count)&&(r=x({i18n:this,count:e.count||0,scope:r,options:e,baseScope:_(this,t,e)})),e&&r instanceof Array&&(r=r.map(t=>"string"==typeof t?y(this,t,e):t)),r):this.missingTranslation.get(t,e)}pluralize(t,e,i){return x({i18n:this,count:t,scope:e,options:Object.assign({},i),baseScope:_(this,e,null!=i?i:{})})}localize(t,e,i){if(i=Object.assign({},i),null==e)return"";switch(t){case"currency":return this.numberToCurrency(e);case"number":return f(e,Object.assign({delimiter:",",precision:3,separator:".",significant:!1,stripInsignificantZeros:!1},v(this,"number.format")));case"percentage":return this.numberToPercentage(e);default:{let r;return r=t.match(/^(date|time)/)?this.toTime(t,e):e.toString(),y(this,r,i)}}}toTime(t,e){const i=b(e),r=v(this,t);return i.toString().match(/invalid/i)?i.toString():r?this.strftime(i,r):i.toString()}numberToCurrency(t,e={}){return f(t,Object.assign(Object.assign(Object.assign({delimiter:",",format:"%u%n",precision:2,separator:".",significant:!1,stripInsignificantZeros:!1,unit:"$"},i(this.get("number.format"))),i(this.get("number.currency.format"))),e))}numberToPercentage(t,e={}){return f(t,Object.assign(Object.assign(Object.assign({delimiter:"",format:"%n%",precision:3,stripInsignificantZeros:!1,separator:".",significant:!1},i(this.get("number.format"))),i(this.get("number.percentage.format"))),e))}numberToHumanSize(t,e={}){return function(t,e,i){const r=p(i.roundMode),o=1024,n=m(e,i.raise).abs(),a=n.lt(o);let s;const l=((t,e)=>{const i=e.length-1,r=new W(Math.log(t.toNumber())).div(Math.log(o)).integerValue(W.ROUND_DOWN).toNumber();return Math.min(i,r)})(n,it);s=a?n.integerValue():new W(d(n.div(Math.pow(o,l)),{significant:i.significant,precision:i.precision,roundMode:i.roundMode}));const c=t.translate("number.human.storage_units.format",{defaultValue:"%n %u"}),u=t.translate(`number.human.storage_units.units.${a?"byte":it[l]}`,{count:n.integerValue().toNumber()});let h=s.toFixed(i.precision,r);return i.stripInsignificantZeros&&(h=h.replace(/(\..*?)0+$/,"$1").replace(/\.$/,"")),c.replace("%n",h).replace("%u",u)}(this,t,Object.assign(Object.assign(Object.assign({delimiter:"",precision:3,significant:!0,stripInsignificantZeros:!0,units:{billion:"Billion",million:"Million",quadrillion:"Quadrillion",thousand:"Thousand",trillion:"Trillion",unit:""}},i(this.get("number.human.format"))),i(this.get("number.human.storage_units"))),e))}numberToHuman(t,e={}){return function(t,e,i){const r={roundMode:i.roundMode,precision:i.precision,significant:i.significant};let o;if("string"===g(i.units)){const e=i.units;if(o=v(t,e),!o)throw new Error(`The scope "${t.locale}${t.defaultSeparator}${_(t,e,{})}" couldn't be found`)}else o=i.units;let n=d(m(e,i.raise),r);const a=((t,e)=>{const i=t.isZero()?0:Math.floor(Math.log10(t.abs().toNumber()));return(t=>J()(Object.keys(t).map(t=>et[t]),t=>-1*t))(e).find(t=>i>=t)||0})(new W(n),o);let s=((t,e)=>t[tt[e.toString()]]||"")(o,a);n=d(new W(n).div(Math.pow(10,a)),r);let[l,c]=n.split(".");if(i.stripInsignificantZeros&&(c=(c||"").replace(/0+$/,"")),n=l,c&&(n+=`${i.separator}${c}`),s&&"object"==typeof s){const e=parseFloat(n.replace(i.separator,".")),r=t.pluralization.get(t.locale)(t,e);for(const t of r)if(void 0!==s[t]){s=s[t];break}}return i.format.replace("%n",n||"0").replace("%u",s).trim()}(this,t,Object.assign(Object.assign(Object.assign(Object.assign({delimiter:"",separator:".",precision:3,significant:!0,stripInsignificantZeros:!0,format:"%n %u",roundMode:"default",units:{billion:"Billion",million:"Million",quadrillion:"Quadrillion",thousand:"Thousand",trillion:"Trillion",unit:""}},i(this.get("number.format"))),i(this.get("number.human.format"))),i(this.get("number.human.decimal_units"))),e))}numberToRounded(t,e){return f(t,Object.assign({unit:"",precision:3,significant:!1,separator:".",delimiter:"",stripInsignificantZeros:!1},e))}numberToDelimited(t,e={}){return function(t,e){const i=m(t,e.raise);if(!i.isFinite())return t.toString();if(!e.delimiterPattern.global)throw new Error(`options.delimiterPattern must be a global regular expression; received ${e.delimiterPattern}`);let[r,o]=i.toString().split(".");return r=r.replace(e.delimiterPattern,t=>`${t}${e.delimiter}`),[r,o].filter(Boolean).join(e.separator)}(t,Object.assign({delimiterPattern:/(\d)(?=(\d\d\d)+(?!\d))/g,delimiter:",",separator:"."},e))}withLocale(t,e){return i=this,r=void 0,n=function*(){const i=this.locale;try{this.locale=t,yield e()}finally{this.locale=i}},new((o=void 0)||(o=Promise))(function(t,e){function a(t){try{l(n.next(t))}catch(t){e(t)}}function s(t){try{l(n.throw(t))}catch(t){e(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof o?i:new o(function(t){t(i)})).then(a,s)}l((n=n.apply(i,r||[])).next())});var i,r,o,n}strftime(t,e,r={}){return function(t,e,i={}){const{abbrDayNames:r,dayNames:o,abbrMonthNames:n,monthNames:a,meridian:s,utc:l}=Object.assign(Object.assign({},rt),i);if(isNaN(t.getTime()))throw new Error("strftime() requires a valid date object, but received an invalid date.");const c=l?t.getUTCDay():t.getDay(),u=l?t.getUTCDate():t.getDate(),h=l?t.getUTCFullYear():t.getFullYear(),p=(l?t.getUTCMonth():t.getMonth())+1,d=l?t.getUTCHours():t.getHours();let m=d;const f=d>11?"pm":"am",_=l?t.getUTCSeconds():t.getSeconds(),g=l?t.getUTCMinutes():t.getMinutes(),y=l?0:t.getTimezoneOffset(),v=Math.floor(Math.abs(y/60)),b=Math.abs(y)-60*v,x=(y>0?"-":"+")+(v.toString().length<2?"0"+v:v)+(b.toString().length<2?"0"+b:b);return m>12?m-=12:0===m&&(m=12),(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace("%a",r[c])).replace("%A",o[c])).replace("%b",n[p])).replace("%B",a[p])).replace("%d",u.toString().padStart(2,"0"))).replace("%e",u.toString())).replace("%-d",u.toString())).replace("%H",d.toString().padStart(2,"0"))).replace("%-H",d.toString())).replace("%k",d.toString())).replace("%I",m.toString().padStart(2,"0"))).replace("%-I",m.toString())).replace("%l",m.toString())).replace("%m",p.toString().padStart(2,"0"))).replace("%-m",p.toString())).replace("%M",g.toString().padStart(2,"0"))).replace("%-M",g.toString())).replace("%p",s[f])).replace("%P",s[f].toLowerCase())).replace("%S",_.toString().padStart(2,"0"))).replace("%-S",_.toString())).replace("%w",c.toString())).replace("%y",h.toString().padStart(2,"0").substr(-2))).replace("%-y",h.toString().padStart(2,"0").substr(-2).replace(/^0+/,""))).replace("%Y",h.toString())).replace(/%z/i,x)}(t,e,Object.assign(Object.assign(Object.assign({},i(v(this,"date"))),{meridian:{am:v(this,"time.am")||"AM",pm:v(this,"time.pm")||"PM"}}),r))}update(t,e,i={strict:!1}){if(i.strict&&!M()(this.translations,t))throw new Error(`The path "${t}" is not currently defined`);const r=T()(this.translations,t),o=g(r),n=g(e);if(i.strict&&o!==n)throw new Error(`The current type for "${t}" is "${o}", but you're trying to override it with "${n}"`);let a;a="object"===n?Object.assign(Object.assign({},r),e):e;const s=t.split(this.defaultSeparator),l=s.pop();let c=this.translations;for(const t of s)c[t]||(c[t]={}),c=c[t];c[l]=a,this.hasChanged()}toSentence(t,e={}){const{wordsConnector:r,twoWordsConnector:o,lastWordConnector:n}=Object.assign(Object.assign({wordsConnector:", ",twoWordsConnector:" and ",lastWordConnector:", and "},i(v(this,"support.array"))),e),a=t.length;switch(a){case 0:return"";case 1:return`${t[0]}`;case 2:return t.join(o);default:return[t.slice(0,a-1).join(r),n,t[a-1]].join("")}}timeAgoInWords(t,e,i={}){return function(t,e,i,r={}){const o=r.scope||"datetime.distance_in_words",n=(e,i=0)=>t.t(e,{count:i,scope:o});e=b(e),i=b(i);let a=e.getTime()/1e3,s=i.getTime()/1e3;a>s&&([e,i,a,s]=[i,e,s,a]);const l=Math.round(s-a),c=Math.round((s-a)/60),u=c/60/24,h=Math.round(c/60),p=Math.round(u),d=Math.round(p/30);if(at(0,1,c))return r.includeSeconds?at(0,4,l)?n("less_than_x_seconds",5):at(5,9,l)?n("less_than_x_seconds",10):at(10,19,l)?n("less_than_x_seconds",20):at(20,39,l)?n("half_a_minute"):at(40,59,l)?n("less_than_x_minutes",1):n("x_minutes",1):0===c?n("less_than_x_minutes",1):n("x_minutes",c);if(at(2,44,c))return n("x_minutes",c);if(at(45,89,c))return n("about_x_hours",1);if(at(90,1439,c))return n("about_x_hours",h);if(at(1440,2519,c))return n("x_days",1);if(at(2520,43199,c))return n("x_days",p);if(at(43200,86399,c))return n("about_x_months",Math.round(c/43200));if(at(86400,525599,c))return n("x_months",d);let m=e.getFullYear();e.getMonth()+1>=3&&(m+=1);let f=i.getFullYear();i.getMonth()+1<3&&(f-=1);const _=525600,g=c-1440*(m>f?0:nt()(m,f).filter(t=>1==new Date(t,1,29).getMonth()).length),y=Math.trunc(g/_),v=parseFloat((g/_-y).toPrecision(3));return v<.25?n("about_x_years",y):v<.75?n("over_x_years",y):n("almost_x_years",y+1)}(this,t,e,i)}onChange(t){return this.onChangeHandlers.push(t),()=>{this.onChangeHandlers.splice(this.onChangeHandlers.indexOf(t),1)}}get version(){return this._version}formatNumber(t,e={}){return f(t,e=Object.assign(Object.assign({delimiter:",",precision:3,separator:".",unit:"",format:"%u%n",significant:!1,stripInsignificantZeros:!1},i(this.get("number.format"))),e))}get(t){return v(this,t)}runCallbacks(){this.onChangeHandlers.forEach(t=>t(this))}hasChanged(){this._version+=1,this.runCallbacks()}}})(),I18n=r})(),"undefined"==typeof OSM&&(OSM={}),OSM.i18n=new I18n.I18n,OSM.i18n.store({af:{javascripts:{embed:{report_problem:"Rapporteer 'n probleem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Fietskaart",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport Map"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Wys my ligging",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Kaartdata",gps:"Public GPS Traces",header:"Map Layers",notes:"Kaartnotas",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoem in",zoom_out:"Zoem uit"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},aln:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Cikli Harta",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport Map"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Show My Location",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"Map Layers",notes:"Map Notes",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom In",zoom_out:"Zoom Out"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},ar:{javascripts:{embed:{report_problem:"\u0623\u0628\u0644\u063a \u0639\u0646 \u0645\u0634\u0643\u0644\u0629"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u062e\u0631\u064a\u0637\u0629 \u0627\u0644\u062f\u0631\u0627\u062c\u0627\u062a",cyclosm:"CyclOSM",hot:"\u0627\u0644\u062e\u0631\u064a\u0637\u0629 \u0627\u0644\u0625\u0646\u0633\u0627\u0646\u064a\u0629",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u0642\u064a\u0627\u0633\u064a",tracestracktop_topo:"Tracestrack Topo",transport_map:"\u062e\u0631\u064a\u0637\u0629 \u0627\u0644\u0646\u0642\u0644 \u0648 \u0627\u0644\u0645\u0648\u0627\u0635\u0644\u0627\u062a"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{few:"\u0623\u0646\u062a \u0639\u0644\u0649 \u0628\u0639\u062f %{count} \u0642\u062f\u0645 \u0645\u0646 \u0647\u0630\u0647 \u0627\u0644\u0646\u0642\u0637\u0629",many:"\u0623\u0646\u062a \u0639\u0644\u0649 \u0628\u0639\u062f %{count} \u0642\u062f\u0645 \u0645\u0646 \u0647\u0630\u0647 \u0627\u0644\u0646\u0642\u0637\u0629",one:"\u0623\u0646\u062a \u0639\u0644\u0649 \u0628\u0639\u062f \u0642\u062f\u0645 \u0648\u0627\u062d\u062f \u0645\u0646 \u0647\u0630\u0647 \u0627\u0644\u0646\u0642\u0637\u0629",other:"\u0623\u0646\u062a \u0639\u0644\u0649 \u0628\u0639\u062f %{count} \u0642\u062f\u0645 \u0645\u0646 \u0647\u0630\u0647 \u0627\u0644\u0646\u0642\u0637\u0629",two:"\u0623\u0646\u062a \u0639\u0644\u0649 \u0628\u0639\u062f %{count} \u0642\u062f\u0645 \u0645\u0646 \u0647\u0630\u0647 \u0627\u0644\u0646\u0642\u0637\u0629",zero:"\u0623\u0646\u062a \u0639\u0644\u0649 \u0628\u0639\u062f %{count} \u0642\u062f\u0645 \u0645\u0646 \u0647\u0630\u0647 \u0627\u0644\u0646\u0642\u0637\u0629"},find_my_location:"\u0623\u0638\u0647\u0631 \u0645\u0648\u0642\u0639\u064a",location_not_available:"Location not available",metersPopup:{few:"\u0623\u0646\u062a \u0639\u0644\u0649 \u0628\u0639\u062f %{count} \u0645\u062a\u0631 \u0645\u0646 \u0647\u0630\u0647 \u0627\u0644\u0646\u0642\u0637\u0629",many:"\u0623\u0646\u062a \u0639\u0644\u0649 \u0628\u0639\u062f %{count} \u0645\u062a\u0631 \u0645\u0646 \u0647\u0630\u0647 \u0627\u0644\u0646\u0642\u0637\u0629",one:"\u0623\u0646\u062a \u0639\u0644\u0649 \u0628\u0639\u062f \u0645\u062a\u0631 \u0648\u0627\u062d\u062f \u0645\u0646 \u0647\u0630\u0647 \u0627\u0644\u0646\u0642\u0637\u0629",other:"\u0623\u0646\u062a \u0639\u0644\u0649 \u0628\u0639\u062f %{count} \u0645\u062a\u0631 \u0645\u0646 \u0647\u0630\u0647 \u0627\u0644\u0646\u0642\u0637\u0629",two:"\u0623\u0646\u062a \u0639\u0644\u0649 \u0628\u0639\u062f %{count} \u0645\u062a\u0631 \u0645\u0646 \u0647\u0630\u0647 \u0627\u0644\u0646\u0642\u0637\u0629",zero:"\u0623\u0646\u062a \u0639\u0644\u0649 \u0628\u0639\u062f %{count} \u0645\u062a\u0631 \u0645\u0646 \u0647\u0630\u0647 \u0627\u0644\u0646\u0642\u0637\u0629"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u062e\u0631\u064a\u0637\u0629",gps:"\u0622\u062b\u0627\u0631 \u062c\u064a \u0628\u064a \u0623\u0633 \u0627\u0644\u0639\u0645\u0648\u0645\u064a\u0629",header:"\u0637\u0628\u0642\u0627\u062a \u0627\u0644\u062e\u0631\u064a\u0637\u0629",notes:"\u0645\u0644\u0627\u062d\u0638\u0627\u062a \u0627\u0644\u062e\u0631\u064a\u0637\u0629",overlays:"\u062a\u0645\u0643\u064a\u0646 \u0637\u0628\u0642\u0627\u062a \u0644\u0627\u0633\u062a\u0643\u0634\u0627\u0641 \u0627\u0644\u062e\u0631\u064a\u0637\u0629",title:"\u0627\u0644\u0637\u064e\u0628\u0642\u0627\u062a"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u062a\u0642\u0631\u064a\u0628",zoom_out:"\u0628\u064e\u0639\u0650\u0651\u062f\u0652"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},arz:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u062e\u0631\u064a\u0637\u0647 \u0644\u0644\u062f\u0631\u0627\u062c\u0627\u062a",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport Map"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Show My Location",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"Map Layers",notes:"Map Notes",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom In",zoom_out:"Zoom Out"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},ast:{javascripts:{embed:{report_problem:"Informar d'un problema"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Mapa ciclista",cyclosm:"CyclOSM",hot:"Humanitariu",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Est\xe1ndar",tracestracktop_topo:"Tracestrack Topo",transport_map:"Mapa de tresportes"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Tas a menos d'un pie d'esti puntu",other:"Tas a menos de %{count} pies d'esti puntu"},find_my_location:"Ver el mio allugamientu",location_not_available:"Location not available",metersPopup:{one:"Tas a menos d'un metru d'esti puntu",other:"Tas a menos de %{count} metros d'esti puntu"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Datos del mapa",gps:"Traces GPS p\xfabliques",header:"Capes del mapa",notes:"Notes de mapa",overlays:"Activar les superposiciones pa diagnosticar el mapa",title:"Capes"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Ampliar",zoom_out:"Amenorgar"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},az:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Cycle Map",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standart",tracestracktop_topo:"Tracestrack Topo",transport_map:"N\u0259qliyyat X\u0259rit\u0259si"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Yerimi g\xf6st\u0259r",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"Map Layers",notes:"X\u0259rit\u0259 Qeydl\u0259ri",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"\u0130an\u0259 et",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Yax\u0131nla\u015fd\u0131r",zoom_out:"Uzaqla\u015fd\u0131r"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Veb-sayt v\u0259 API \u015f\u0259rtl\u0259ri"}}},ba:{javascripts:{embed:{report_problem:"\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0445\u0430\u04a1\u044b\u043d\u0434\u0430 \u0445\u04d9\u0431\u04d9\u0440 \u0438\u0442\u0435\u0440\u0433\u04d9"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Cycle Map",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport Map"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Show My Location",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"Map Layers",notes:"Map Notes",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom In",zoom_out:"Zoom Out"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},bcl:{javascripts:{embed:{report_problem:"Isumbong an problema"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Mapa nin Bisikleta",cyclosm:"CyclOSM",hot:"Humanitaryo",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Panusugan",tracestracktop_topo:"Tracestrack Topo",transport_map:"Mapa nin Transportasyon"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Yaon ka sa laog nin %{count} pye kan puntong ini",other:"Yaon ka sa laog nin %{count} pye kan puntong ini"},find_my_location:"Ipahiling an Sakong Kinamumugtakan",location_not_available:"Dai makukua an kinamumugtakan",metersPopup:{one:"Yaon ka sa laog nin %{count} metro kan puntong ini",other:"Yaon ka sa laog nin %{count} metro kan puntong ini"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Grupo nin Humanitaryo kan OpenStreetMap",layers:{data:"Datos nin Mapa",gps:"Mga Bakas kan Pampublikong GPS",header:"Mga Patong nin Mapa",notes:"Mga tala nin Mapa",overlays:"I-enable an mga overlay para sa pag-troubleshoot kan mapa",title:"Mga patong"},make_a_donation:"Magdonar",map:{marker:{title:"Map marker"},title:"Mapa"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Padakulaon",zoom_out:"Pasaditon"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Mga paraambag sa OpenStreetMap",osm_france:"OpenStreetMap Pransya",popup:{close:"Isara"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Mga termino sa websityo asin API"}}},be:{javascripts:{embed:{report_problem:"\u041f\u0430\u0432\u0435\u0434\u0430\u043c\u0456\u0446\u044c \u0430\u0431 \u043f\u0440\u0430\u0431\u043b\u0435\u043c\u0435"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u0412\u0435\u043b\u0430\u0441\u0456\u043f\u0435\u0434\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0430",cyclosm:"CyclOSM",hot:"\u0413\u0443\u043c\u0430\u043d\u0456\u0442\u0430\u0440\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0430",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u0417\u0432\u044b\u0447\u0430\u0439\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0430",tracestracktop_topo:"Tracestrack Topo",transport_map:"\u0422\u0440\u0430\u043d\u0441\u043f\u0430\u0440\u0442\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0430"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{few:"\u0412\u044b \u0437\u043d\u0430\u0445\u043e\u0434\u0437\u0456\u0446\u0435\u0441\u044f \u045e %{count} \u0444\u0443\u0442\u0430\u0445 \u0430\u0434 \u0433\u044d\u0442\u0430\u0433\u0430 \u043f\u0443\u043d\u043a\u0442\u0443",many:"\u0412\u044b \u0437\u043d\u0430\u0445\u043e\u0434\u0437\u0456\u0446\u0435\u0441\u044f \u045e %{count} \u0444\u0443\u0442\u0430\u0445 \u0430\u0434 \u0433\u044d\u0442\u0430\u0433\u0430 \u043f\u0443\u043d\u043a\u0442\u0443", one:"\u0412\u044b \u0437\u043d\u0430\u0445\u043e\u0434\u0437\u0456\u0446\u0435\u0441\u044f \u045e \u0430\u0434\u043d\u044b\u043c \u0444\u0443\u0446\u0435 \u0430\u0434 \u0433\u044d\u0442\u0430\u0433\u0430 \u043f\u0443\u043d\u043a\u0442\u0443",other:"\u0412\u044b \u0437\u043d\u0430\u0445\u043e\u0434\u0437\u0456\u0446\u0435\u0441\u044f \u045e %{count} \u0444\u0443\u0442\u0430\u0445 \u0430\u0434 \u0433\u044d\u0442\u0430\u0433\u0430 \u043f\u0443\u043d\u043a\u0442\u0443"},find_my_location:"\u041f\u0430\u043a\u0430\u0437\u0430\u0446\u044c \u043c\u0430\u0451 \u043c\u0435\u0441\u0446\u0430\u0437\u043d\u0430\u0445\u043e\u0434\u0436\u0430\u043d\u043d\u0435",location_not_available:"Location not available",metersPopup:{few:"\u0412\u044b \u0437\u043d\u0430\u0445\u043e\u0434\u0437\u0456\u0446\u0435\u0441\u044f \u045e %{count} \u043c\u0435\u0442\u0440\u0430\u0445 \u0430\u0434 \u0433\u044d\u0442\u0430\u0433\u0430 \u043f\u0443\u043d\u043a\u0442\u0443",many:"\u0412\u044b \u0437\u043d\u0430\u0445\u043e\u0434\u0437\u0456\u0446\u0435\u0441\u044f \u045e %{count} \u043c\u0435\u0442\u0440\u0430\u0445 \u0430\u0434 \u0433\u044d\u0442\u0430\u0433\u0430 \u043f\u0443\u043d\u043a\u0442\u0443",one:"\u0412\u044b \u0437\u043d\u0430\u0445\u043e\u0434\u0437\u0456\u0446\u0435\u0441\u044f \u045e \u0430\u0434\u043d\u044b\u043c \u043c\u0435\u0442\u0440\u044b \u0430\u0434 \u0433\u044d\u0442\u0430\u0433\u0430 \u043f\u0443\u043d\u043a\u0442\u0443",other:"\u0412\u044b \u0437\u043d\u0430\u0445\u043e\u0434\u0437\u0456\u0446\u0435\u0441\u044f \u045e %{count} \u043c\u0435\u0442\u0440\u0430\u0445 \u0430\u0434 \u0433\u044d\u0442\u0430\u0433\u0430 \u043f\u0443\u043d\u043a\u0442\u0443"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u0414\u0430\u043d\u044b\u044f \u043a\u0430\u0440\u0442",gps:"\u0410\u0433\u0443\u043b\u044c\u043d\u044b\u044f GPS-\u0441\u043b\u044f\u0434\u044b",header:"\u0421\u043b\u0430\u0456 \u043a\u0430\u0440\u0442\u044b",notes:"\u0417\u0430\u045e\u0432\u0430\u0433\u0456 \u043d\u0430 \u043a\u0430\u0440\u0446\u0435",overlays:"\u0423\u043a\u043b\u044e\u0447\u044b\u0446\u044c \u043d\u0430\u043a\u043b\u0430\u0434\u043a\u0456 \u0434\u043b\u044f \u043b\u0456\u043a\u0432\u0456\u0434\u0430\u0446\u044b\u0456 \u043f\u0430\u043c\u044b\u043b\u0430\u043a \u043a\u0430\u0440\u0442\u044b",title:"\u0421\u043b\u0430\u0456"},make_a_donation:"\u0417\u0440\u0430\u0431\u0456\u0446\u044c \u0430\u0445\u0432\u044f\u0440\u0430\u0432\u0430\u043d\u043d\u0435",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u041f\u0430\u0432\u044f\u043b\u0456\u0447\u044b\u0446\u044c",zoom_out:"\u041f\u0430\u043c\u0435\u043d\u0448\u044b\u0446\u044c"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap \u0424\u0440\u0430\u043d\u0446\u044b\u044f",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"\u0423\u043c\u043e\u0432\u044b \u0432\u044d\u0431-\u0441\u0430\u0439\u0442\u0430 \u0456 API"}}},"be-tarask":{javascripts:{embed:{report_problem:"\u041f\u0430\u0432\u0435\u0434\u0430\u043c\u0456\u0446\u044c \u043f\u0440\u0430 \u043f\u0440\u0430\u0431\u043b\u0435\u043c\u0443"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"\u041f\u0435\u0440\u0430\u043c\u044b\u043a\u043d\u0443\u0446\u044c \u0430\u0442\u0440\u044b\u0431\u0443\u0446\u044b\u044e"},base:{cycle_map:"\u0420\u043e\u0432\u0430\u0440\u043d\u0430\u044f \u043c\u0430\u043f\u0430",cyclosm:"CyclOSM",hot:"\u0413\u0443\u043c\u0430\u043d\u0456\u0442\u0430\u0440\u043d\u0430\u044f \u043c\u0430\u043f\u0430",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u0417\u0432\u044b\u0447\u0430\u0439\u043d\u0430\u044f \u043c\u0430\u043f\u0430",tracestracktop_topo:"\u0422\u0430\u043f\u0430\u0491\u0440\u0430\u0444\u0456\u0447\u043d\u0430\u044f \u043c\u0430\u043f\u0430",transport_map:"\u0422\u0440\u0430\u043d\u0441\u043f\u0430\u0440\u0442\u043d\u0430\u044f \u043c\u0430\u043f\u0430"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"\u0422\u0430\u0439\u043b\u044b %{cyclosm_link} \u0437\u0430\u0431\u044f\u0441\u044c\u043f\u0435\u0447\u0430\u043d\u044b %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"\u0432\u044b \u045e \u043c\u0435\u0436\u0430\u0445 %{count} \u0444\u0443\u0442\u0443 \u0430\u0434 \u0433\u044d\u0442\u0430\u0433\u0430 \u043f\u0443\u043d\u043a\u0442\u0443",other:"\u0432\u044b \u045e \u043c\u0435\u0436\u0430\u0445 %{count} \u0444\u0443\u0442\u0430\u045e \u0430\u0434 \u0433\u044d\u0442\u0430\u0433\u0430 \u043f\u0443\u043d\u043a\u0442\u0443"},find_my_location:"\u0417\u043d\u0430\u0439\u0441\u044c\u0446\u0456 \u043c\u044f\u043d\u0435",location_not_available:"\u041b\u044f\u043a\u0430\u0446\u044b\u044f \u043d\u0435\u0434\u0430\u0441\u0442\u0443\u043f\u043d\u0430\u044f",metersPopup:{one:"\u0432\u044b \u045e \u043c\u0435\u0436\u0430\u0445 %{count} \u043c\u044d\u0442\u0440\u0443 \u0430\u0434 \u0433\u044d\u0442\u0430\u0433\u0430 \u043f\u0443\u043d\u043a\u0442\u0443",other:"\u0432\u044b \u045e \u043c\u0435\u0436\u0430\u0445 %{count} \u043c\u044d\u0442\u0440\u0430\u045e \u0430\u0434 \u0433\u044d\u0442\u0430\u0433\u0430 \u043f\u0443\u043d\u043a\u0442\u0443"}},hotosm_credit:"\u0422\u0430\u0439\u043b\u044b %{hotosm_link} \u0437\u0430\u0431\u044f\u0441\u044c\u043f\u0435\u0447\u0430\u043d\u044b %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u0417\u044c\u0432\u0435\u0441\u0442\u043a\u0456 \u043c\u0430\u043f\u044b",gps:"\u041f\u0443\u0431\u043b\u0456\u0447\u043d\u044b\u044f GPS-\u0442\u0440\u044d\u043a\u0456",header:"\u041f\u043b\u0430\u0441\u0442\u044b \u043c\u0430\u043f\u044b",notes:"\u0417\u0430\u045e\u0432\u0430\u0433\u0456 \u043d\u0430 \u043c\u0430\u043f\u0435",overlays:"\u041d\u0430\u043a\u043b\u0430\u0434\u043a\u0456 \u0434\u043b\u044f \u043f\u043e\u0448\u0443\u043a\u0443 \u043f\u0440\u0430\u0431\u043b\u0435\u043c\u0430\u045e \u043d\u0430 \u043c\u0430\u043f\u0435",title:"\u041f\u043b\u0430\u0441\u0442\u044b"},make_a_donation:"\u0410\u0445\u0432\u044f\u0440\u0430\u0432\u0430\u0446\u044c",map:{marker:{title:"\u041c\u0430\u0440\u043a\u0435\u0440 \u043c\u0430\u043f\u044b"},title:"\u041c\u0430\u043f\u0430"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u0411\u043b\u0456\u0436\u044d\u0439",zoom_out:"\u0414\u0430\u043b\u0435\u0439"},openmaptiles_credit:"\u0412\u044d\u043a\u0442\u0430\u0440\u043d\u044b\u044f \u0442\u0430\u0439\u043b\u044b \u0437 %{openmaptiles_link} \u0437\u0430\u0431\u044f\u0441\u044c\u043f\u0435\u0447\u0430\u043d\u044b %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"\u0423\u0434\u0437\u0435\u043b\u044c\u043d\u0456\u043a\u0456 OpenStreetMap",osm_france:"OpenStreetMap \u0424\u0440\u0430\u043d\u0446\u044b\u044f",popup:{close:"\u0417\u0430\u043a\u0440\u044b\u0446\u044c"},thunderforest_credit:"\u0422\u0430\u0439\u043b\u044b \u0432\u044b\u0434\u0430\u045e %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"\u041a\u0440\u044b\u043d\u0456\u0446\u0430 \u0442\u0430\u0439\u043b\u0430\u045e %{tracestrack_link}",website_and_api_terms:"\u041f\u0440\u0430\u0432\u0456\u043b\u044b \u0441\u0430\u0439\u0442\u0443 \u0456 API"}}},bg:{javascripts:{embed:{report_problem:"\u0414\u043e\u043a\u043b\u0430\u0434\u0432\u0430\u043d\u0435 \u0437\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u041a\u043e\u043b\u043e\u0435\u0437\u0434\u0430\u0447\u043d\u0430 \u043a\u0430\u0440\u0442\u0430",cyclosm:"CyclOSM",hot:"\u0425\u0443\u043c\u0430\u043d\u0438\u0442\u0430\u0440\u043d\u0430 \u043a\u0430\u0440\u0442\u0430",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430 \u043a\u0430\u0440\u0442\u0430",tracestracktop_topo:"Tracestrack Topo",transport_map:"\u0422\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u0430 \u043a\u0430\u0440\u0442\u0430"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"\u041c\u043e\u0435\u0442\u043e \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u0414\u0430\u043d\u043d\u0438",gps:"\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u0438 \u0441\u043b\u0435\u0434\u0438 \u043e\u0442 GPS",header:"\u0421\u043b\u043e\u0435\u0432\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0430\u0442\u0430",notes:"\u0411\u0435\u043b\u0435\u0436\u043a\u0438",overlays:"\u0421\u043b\u043e\u0435\u0432\u0435 \u0437\u0430 \u043e\u0442\u0441\u0442\u0440\u0430\u043d\u044f\u0432\u0430\u043d\u0435 \u043d\u0430 \u0433\u0440\u0435\u0448\u043a\u0438",title:"\u0421\u043b\u043e\u0435\u0432\u0435"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0430\u0432\u0430\u043d\u0435",zoom_out:"\u041e\u0442\u0434\u0430\u043b\u0435\u0447\u0430\u0432\u0430\u043d\u0435"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},bn:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"\u0985\u09cd\u09af\u09be\u09a8\u09cd\u09a1\u09bf \u0985\u09cd\u09af\u09be\u09b2\u09be\u09a8",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u09b8\u09be\u0987\u0995\u09c7\u09b2 \u09ae\u09be\u09a8\u099a\u09bf\u09a4\u09cd\u09b0",cyclosm:"CyclOSM",hot:"\u09ae\u09be\u09a8\u09ac\u09bf\u0995",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u09ae\u09be\u09a8\u0995",tracestracktop_topo:"\u099f\u09cd\u09b0\u09c7\u09b8\u09c7\u09b8\u099f\u09cd\u09b0\u09cd\u09af\u09be\u0995 \u099f\u09cb\u09aa\u09cb",transport_map:"\u09aa\u09b0\u09bf\u09ac\u09b9\u09a8 \u09ae\u09be\u09a8\u099a\u09bf\u09a4\u09cd\u09b0"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"\u0986\u09ae\u09be\u09b0 \u0985\u09ac\u09b8\u09cd\u09a5\u09be\u09a8 \u09a6\u09c7\u0996\u09be\u09a8",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u09ae\u09be\u09a8\u099a\u09bf\u09a4\u09cd\u09b0 \u0989\u09aa\u09be\u09a4\u09cd\u09a4",gps:"Public GPS Traces",header:"\u09ae\u09be\u09a8\u099a\u09bf\u09a4\u09cd\u09b0\u09c7\u09b0 \u09b8\u09cd\u09a4\u09b0",notes:"\u09ae\u09be\u09a8\u099a\u09bf\u09a4\u09cd\u09b0\u09c7\u09b0 \u09a8\u09cb\u099f",overlays:"Enable overlays for troubleshooting the map",title:"\u09b8\u09cd\u09a4\u09b0"},make_a_donation:"\u09a6\u09be\u09a8 \u0995\u09b0\u09c1\u09a8",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u099c\u09c1\u09ae \u0987\u09a8 \u0995\u09b0\u09c1\u09a8",zoom_out:"\u099c\u09c1\u09ae \u0986\u0989\u099f \u0995\u09b0\u09c1\u09a8"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"\u0993\u09aa\u09c7\u09a8\u09b8\u09cd\u099f\u09cd\u09b0\u09bf\u099f\u09ae\u09cd\u09af\u09be\u09aa \u0985\u09ac\u09a6\u09be\u09a8\u0995\u09be\u09b0\u09c0",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"\u0993\u09af\u09bc\u09c7\u09ac\u09b8\u09be\u0987\u099f \u098f\u09ac\u0982 API \u09b6\u09b0\u09cd\u09a4\u09be\u09ac\u09b2\u09c0"}}},br:{javascripts:{embed:{report_problem:"Menegi\xf1 ur gudenn"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Kartenn marc'ho\xf9-houarn",cyclosm:"CyclOSM",hot:"Denegour",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Topografiezh Tracestrack",transport_map:"Kartenn treuzdougen"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Doare teol gant %{cyclosm_link} herberc'hiet gant %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{few:"Emaoc'h dindan %{count} troad diouzh ar poent-ma\xf1",many:"Emaoc'h dindan %{count} troad diouzh ar poent-ma\xf1",one:"Emaoc'h dindan %{count} troad diouzh ar poent-ma\xf1",other:"Emaoc'h dindan %{count} troad diouzh ar poent-ma\xf1",two:"Emaoc'h dindan %{count} droad diouzh ar poent-ma\xf1"},find_my_location:"Diskouez al lec'h m'emaon",location_not_available:"Al lec'hiadur n'eo ket da gaout",metersPopup:{few:"Emaoc'h dindan %{count} metr diouzh ar poent-ma\xf1",many:"Emaoc'h dindan %{count} metr diouzh ar poent-ma\xf1",one:"Emaoc'h dindan %{count} metr diouzh ar poent-ma\xf1",other:"Emaoc'h dindan %{count} metr diouzh ar poent-ma\xf1",two:"Emaoc'h dindan %{count} vetr diouzh ar poent-ma\xf1"}},hotosm_credit:"Doare teol gant %{hotosm_link} herberc'hiet gant %{osm_france_link}",hotosm_name:"Skipailh dengar OpenStreetMap",layers:{data:"Roadenno\xf9 ar gartenn",gps:"Roudo\xf9 GPS foran",header:"Gwiskado\xf9 ar gartenn",notes:"Notenno\xf9 ar gartenn",overlays:"Gweredekaat an adwiskado\xf9 evit dresa\xf1 ar gartenn",title:"Gwiskado\xf9"},make_a_donation:"Ober un donezon",map:{marker:{title:"Merker war ar gartenn"},title:"Kartenn"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zouma\xf1",zoom_out:"Dizouma\xf1"},openmaptiles_credit:"Teol vektorel gant %{openmaptiles_link} herberc'hiet gant %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Kenlabourerien OpenStreetMap",osm_france:"OpenStreetMap Fra\xf1s",popup:{close:"Serri\xf1"},thunderforest_credit:"Teol pourchaset gant %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Teol pourchaset gant %{tracestrack_link}",website_and_api_terms:"Termeno\xf9-implij al lec'hien hag an API"}}},bs:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Biciklisti\u010dka karta",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standardni",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transportna karta"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Prika\u017ei moju lokaciju",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"Slojevi karte",notes:"Map Notes",overlays:"Enable overlays for troubleshooting the map",title:"Slojevi"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Pribli\u017ei",zoom_out:"Udalji"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},ca:{javascripts:{embed:{report_problem:"Informeu sobre un problema"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Mapa ciclista",cyclosm:"CyclOSM",hot:"Humanitari",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Est\xe0ndard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Mapa de transports"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Estil de tessel\xb7les per %{cyclosm_link}, hostatjades per %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Sou a menys d'un peu del punt",other:"Sou a menys de %{count} peus del punt"},find_my_location:"Mostra la meva ubicaci\xf3",location_not_available:"Ubicaci\xf3 no disponible",metersPopup:{one:"Sou a menys d'un metre del punt",other:"Sou a menys de %{count} metres del punt"}},hotosm_credit:"Estil de tessel\xb7les per %{hotosm_link}, hostatjades per %{osm_france_link}",hotosm_name:"Equip humanitari de l'OpenStreetMap",layers:{data:"Dades del mapa",gps:"Traces GPS p\xfabliques",header:"Capes del mapa",notes:"Notes de mapa",overlays:"Activa capes extra per als problemes del mapa",title:"Capes del mapa"},make_a_donation:"Feu una donaci\xf3",map:{marker:{title:"Marcador de mapa"},title:"Mapa"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Amplia",zoom_out:"Allunya"},openmaptiles_credit:"Tessel\xb7les vectorials de %{openmaptiles_link} allotjades per %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Els col\xb7laboradors de l'OpenStreetMap",osm_france:"OpenStreetMap Fran\xe7a",popup:{close:"Tanca"},thunderforest_credit:"Tessel\xb7les cortesia de %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tessel\xb7les cortesia de %{tracestrack_link}",website_and_api_terms:"Condicions del lloc web i de l'API"}}},ce:{javascripts:{embed:{report_problem:"\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0445 \u043b\u0430\u044c\u0446\u043d\u0430 \u0445\u0430\u0438\u0439\u0442\u0430"},map:{andy_allan:"\u042d\u043d\u0434\u0438 \u0410\u043b\u043b\u0430\u043d",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u0412\u0438\u043b\u0441\u043f\u0435\u0442\u0430\u043d \u043a\u0430\u0440\u0442\u0430",cyclosm:"CyclOSM",hot:"\u0413\u0443\u043c\u0430\u043d\u0438\u0442\u0430\u0440\u0438\u043d",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043d",tracestracktop_topo:"\u0422\u043e\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u043d\u0430 \u043a\u0430\u0440\u0442\u0430",transport_map:"\u0422\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0430\u043d \u043a\u0430\u0440\u0442\u0430"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"\u0422\u0430\u0439\u043b\u0438\u043d \u0441\u0442\u0438\u043b\u044c %{cyclosm_link} \u0439\u0438\u043b\u0438\u043d\u0430 \u0439\u0443 %{osm_france_link} \u0442I\u0435\u0445\u044c",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"\u0425\u044c\u043e \u0447\u043e\u0445\u044c \u0432\u0443 %{count} \u043a\u043e\u0433 \u0431\u0430\u043a\u043a\u0445\u0430\u043b \u043e\u0446\u0443 \u043c\u0435\u0442\u0442\u0438\u0433\u0430\u043d",other:"\u0425\u044c\u043e \u0447\u043e\u0445\u044c \u0432\u0443 %{count} \u043a\u043e\u0433\u0430\u0448 \u0431\u0430\u0445\u0430\u043b \u043e\u0446\u0443 \u043c\u0435\u0442\u0442\u0438\u0433\u0435\u0440\u0430"},find_my_location:"\u0421\u043e \u0432\u043e\u043b\u0443 \u043c\u0435\u0442\u0442\u0438\u0433 \u0433\u0430\u0439\u0442\u0430",location_not_available:"Location not available",metersPopup:{one:"\u0425\u044c\u043e \u043b\u0430\u044c\u0442\u0442\u0430\u0448 \u0432\u0443 %{count} \u043c\u0435\u0442\u0440 \u0446\u0443 \u0442\u043e\u0447\u043a\u0430\u043d",other:"\u0425\u044c\u043e \u043b\u0430\u044c\u0442\u0442\u0430\u0448 \u0432\u0443 %{count} \u043c\u0435\u0442\u0440 \u0446\u0443 \u0442\u043e\u0447\u043a\u0430\u043d"}},hotosm_credit:"\u0422\u0430\u0439\u043b\u0438\u043d \u0441\u0442\u0438\u043b\u044c %{hotosm_link} \u0439\u0438\u043b\u0438\u043d\u0430 \u0439\u0443 %{osm_france_link} \u0442I\u0435\u0445\u044c",hotosm_name:"\u0413\u0443\u043c\u0430\u043d\u0438\u0442\u0430\u0440\u0438\u043d OpenStreetMap \u0442\u043e\u0431\u0430",layers:{data:"\u041a\u0430\u0440\u0442\u0430\u043d \u0445\u0430\u0430\u043c\u0430\u0448",gps:"\u0419\u0443\u043a\u044a\u0430\u0440\u0430 GPS \u0442\u0440\u0435\u043a\u0430\u0448",header:"\u041a\u0430\u0440\u0442\u0430\u043d \u0447\u043a\u044a\u043e\u0440",notes:"\u0411\u0438\u043b\u0433\u0430\u043b\u043e\u043d\u0430\u0448",overlays:"\u0427\u043a\u044a\u043e\u044c\u0440\u0430\u0448 \u043b\u0430\u0442\u0430\u0434\u0435, \u043a\u0430\u0440\u0442\u0435\u0442I\u0435\u0440\u0430 \u0433I\u0430\u043b\u0430\u0442\u0430\u0448 \u0434I\u0430\u0434\u0430\u0445\u0430",title:"\u0427\u043a\u044a\u043e\u0440"},make_a_donation:"\u0413I\u043e \u0434\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043d",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u0419\u043e\u043a\u043a\u0445\u0430 \u0439\u0435",zoom_out:"\u0416\u0438\u043c\u0430 \u0439\u0435"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap-\u0430\u043d \u0430\u0432\u0442\u043e\u0440\u0430\u0448",osm_france:"OpenStreetMap \u0424\u0440\u0430\u043d\u0446\u0438",popup:{close:"Close"},thunderforest_credit:"T\u0430\u0439\u043b\u0430\u0448 \u0435\u043b\u043b\u0430 %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"T\u0430\u0439\u043b\u0430\u0448 \u0435\u043b\u043b\u0430 %{tracestrack_link}",website_and_api_terms:"\u0412\u0435\u0431-\u0441\u0430\u0439\u0442\u0430\u043d \u0430, API-\u043d \u0430 \u043b\u0435\u043b\u043e\u0440\u0430\u043d \u043d\u0438\u0437\u0430\u043c"}}},cs:{javascripts:{embed:{report_problem:"Nahl\xe1sit probl\xe9m"},map:{andy_allan:"Andyho Allana",attribution_control:{toggle_attribution:"P\u0159epnout uveden\xed zdroje"},base:{cycle_map:"Cyklomapa",cyclosm:"CyclOSM",hot:"Humanit\xe1rn\xed",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standardn\xed",tracestracktop_topo:"Tracestrack Topo",transport_map:"Dopravn\xed mapa"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Styl dla\u017edic od %{cyclosm_link} hostuje %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{few:"Od tohoto bodu jste m\xe9n\u011b ne\u017e %{count} stopy",many:"Od tohoto bodu jste m\xe9n\u011b ne\u017e %{count} stopy",one:"Od tohoto bodu jste m\xe9n\u011b ne\u017e %{count} stopu",other:"Od tohoto bodu jste m\xe9n\u011b ne\u017e %{count} stop"},find_my_location:"Uk\xe1zat moji polohu",location_not_available:"Poloha nen\xed k dispozici",metersPopup:{few:"Od tohoto bodu jste m\xe9n\u011b ne\u017e %{count} metry",many:"Od tohoto bodu jste m\xe9n\u011b ne\u017e %{count} metru",one:"Od tohoto bodu jste m\xe9n\u011b ne\u017e %{count} metr",other:"Od tohoto bodu jste m\xe9n\u011b ne\u017e %{count} metr\u016f"}},hotosm_credit:"Styl dla\u017edic od %{hotosm_link} hostuje %{osm_france_link}",hotosm_name:"Humanit\xe1rn\xedho t\xfdmu OpenStreetMap",layers:{data:"Data k map\u011b",gps:"Ve\u0159ejn\xe9 GPS stopy",header:"Mapov\xe9 vrstvy",notes:"Pozn\xe1mky k map\u011b",overlays:"Zapnout vrstvy pro lad\u011bn\xed mapy",title:"Vrstvy"},make_a_donation:"Po\u0161lete p\u0159\xedsp\u011bvek",map:{marker:{title:"Zna\u010dka na map\u011b"},title:"Mapa"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"P\u0159ibl\xed\u017eit",zoom_out:"Odd\xe1lit"},openmaptiles_credit:"Vektorov\xe9 dla\u017edice z\xa0%{openmaptiles_link} hostuje %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"P\u0159isp\u011bvatel\xe9 OpenStreetMap",osm_france:"OpenStreetMap Francie",popup:{close:"Zav\u0159\xedt"},thunderforest_credit:"Dla\u017edice laskavost\xed %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Dla\u017edice laskavost\xed %{tracestrack_link}",website_and_api_terms:"Podm\xednky webu a API"}}},cy:{javascripts:{embed:{report_problem:"Rhoi gwybod am broblem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toglo Priodoliad"},base:{cycle_map:"Map Beicio",cyclosm:"CyclOSM",hot:"Dyngarol",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Safonol",tracestracktop_topo:"Tracestrack Topo",transport_map:"Map Trafnidiaeth"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Arddull teils gan %{cyclosm_link} a gynhelir gan %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{few:"Rydych chi o fewn %{count} throedfedd i'r pwynt hwn",many:"Rydych chi o fewn %{count} troedfedd i'r pwynt hwn",one:"Rydych chi o fewn %{count} troedfedd i'r pwynt hwn",other:"Rydych chi o fewn %{count} troedfedd i'r pwynt hwn",two:"Rydych chi o fewn %{count} droedfedd i'r pwynt hwn",zero:"Rydych chi o fewn %{count} troedfedd i'r pwynt hwn"},find_my_location:"Dangos Fy Lleoliad",location_not_available:"Nid yw'r lleoliad ar gael",metersPopup:{few:"Rydych chi o fewn %{count} metr i'r pwynt hwn",many:"Rydych chi o fewn %{count} metr i'r pwynt hwn",one:"Rydych chi o fewn %{count} metr i'r pwynt hwn",other:"Rydych chi o fewn %{count} metr i'r pwynt hwn",two:"Rydych chi o fewn %{count} fetr i'r pwynt hwn",zero:"Rydych chi o fewn %{count} metr i'r pwynt hwn"}},hotosm_credit:"Arddull teils gan %{hotosm_link} a gynhelir gan %{osm_france_link}",hotosm_name:"T\xeem Dyngarol OpenStreetMap",layers:{data:"Data Map",gps:"Olion GPS Cyhoeddus",header:"Haenau Map",notes:"Nodiadau Map",overlays:"Galluogi troshaenau i ddatrys problemau map",title:"Haenau"},make_a_donation:"Rhoi arian",map:{marker:{title:"Marciwr map"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Chwyddo Mewn",zoom_out:"Chwyddo Allan"},openmaptiles_credit:"Teils fector o %{openmaptiles_link} wedi'u cynnal gan %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Cyfranwyr OpenStreetMap",osm_france:"OpenStreetMap Ffrainc",popup:{close:"Cau"},thunderforest_credit:"Teils trwy garedigrwydd %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Teils trwy garedigrwydd %{tracestrack_link}",website_and_api_terms:"Telerau gwefan ac API"}}},da:{javascripts:{embed:{report_problem:"Rapporter et problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Sl\xe5 tilskrivning til/fra"},base:{cycle_map:"Cykelkort",cyclosm:"CyclOSM",hot:"Humanit\xe6r",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transportkort"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Kortflise-stil af %{cyclosm_link} hostet af %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Du er indenfor %{count} fod fra dette punkt",other:"Du er indenfor %{count} fod fra dette punkt"},find_my_location:"Vis min placering",location_not_available:"Placering ikke tilg\xe6ngelig",metersPopup:{one:"Du er indenfor %{count} meter fra dette punkt",other:"Du er indenfor %{count} meter fra dette punkt"}},hotosm_credit:"Kortflise-stil af %{hotosm_link} hostet af %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Kortdata",gps:"Offentlige GPS-spor",header:"Kortlag",notes:"Kortbem\xe6rkninger",overlays:"Aktiver overlejringer til fejlfinding af kortet",title:"Lag"},make_a_donation:"Don\xe9r",map:{marker:{title:"Kortmark\xf8r"},title:"Kort"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom ind",zoom_out:"Zoom ud"},openmaptiles_credit:"Vektorfliser fra %{openmaptiles_link} hostet af %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap-bidragsydere",osm_france:"OpenStreetMap Frankrig",popup:{close:"Luk"},thunderforest_credit:"Kortfliser stillet til r\xe5dighed af %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Kortfliser stillet til r\xe5dighed af %{tracestrack_link}",website_and_api_terms:"Hjemmeside og API-vilk\xe5r"}}},de:{javascripts:{embed:{report_problem:"Ein Problem melden"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Quellenangabe umschalten"},base:{cycle_map:"Radfahrerkarte",cyclosm:"CyclOSM",hot:"Humanit\xe4r",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Verkehrskarte"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Kachelstil von %{cyclosm_link}, gehostet von %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Du bist weniger als 1 Fu\xdf von diesem Punkt entfernt",other:"Du bist weniger als %{count} Fu\xdf von diesem Punkt entfernt"},find_my_location:"Aktuellen Standort anzeigen",location_not_available:"Standort nicht verf\xfcgbar",metersPopup:{one:"Du bist weniger als 1 Meter von diesem Punkt entfernt",other:"Du bist weniger als %{count} Meter von diesem Punkt entfernt"}},hotosm_credit:"Kachelstil von %{hotosm_link}, gehostet von %{osm_france_link}",hotosm_name:"Humanit\xe4res OpenStreetMap Team",layers:{data:"Kartendaten",gps:"\xd6ffentliche GPS-Tracks",header:"Kartenebenen",notes:"Hinweise/Fehlermeldungen",overlays:"Overlays zur Fehlersuche aktivieren",title:"Ebenen"},make_a_donation:"Spenden",map:{marker:{title:"Kartenmarkierung"},title:"Karte"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Vergr\xf6\xdfern",zoom_out:"Verkleinern"},openmaptiles_credit:"Vektorkacheln von %{openmaptiles_link}, gehostet von %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap Mitwirkende",osm_france:"OpenStreetMap Frankreich",popup:{close:"Schlie\xdfen"},thunderforest_credit:"Kacheln mit freundlicher Genehmigung von %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Kacheln mit freundlicher Genehmigung von %{tracestrack_link}",website_and_api_terms:"Website und API-Bedingungen"}}},diq:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Xeritay Topo\u011frafiki",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Xeritay Resnay\u0131\u015fi"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Show My Location",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"Map Layers",notes:"Map Notes",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"N\xeazdi ke",zoom_out:"D\xfbri fiye"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},dsb:{javascripts:{ embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"K\xf3rta za kolesowarjow",cyclosm:"CyclOSM",hot:"Sobustatkowace humanitarneje pomocy",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Wobchadowa k\xf3rta"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Aktualne m\u011bstno pokaza\u015b",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"K\xf3rtowe daty",gps:"Public GPS Traces",header:"K\xf3rtowe rowniny",notes:"Pokazki k\xf3rty",overlays:"War\u0161ty za pytanje za zm\xf3lkami na k\xf3r\u015be zm\xf3\u017eni\u015b",title:"Rowniny"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"P\xf3w\u011bt\u0161y\u015b",zoom_out:"P\xf3mje\u0144\u0161y\u015b"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},el:{javascripts:{embed:{report_problem:"\u0391\u03bd\u03b1\u03c6\u03bf\u03c1\u03ac \u03c0\u03c1\u03bf\u03b2\u03bb\u03ae\u03bc\u03b1\u03c4\u03bf\u03c2"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"\u0395\u03bd\u03b1\u03bb\u03bb\u03b1\u03b3\u03ae \u03b1\u03bd\u03b1\u03c6\u03bf\u03c1\u03ac\u03c2 \u03b4\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03bf\u03cd"},base:{cycle_map:"\u03a0\u03bf\u03b4\u03b7\u03bb\u03b1\u03c3\u03af\u03b1",cyclosm:"CyclOSM \u03c0\u03bf\u03b4\u03b7\u03bb\u03b1\u03c3\u03af\u03b1",hot:"\u0391\u03bd\u03b8\u03c1\u03c9\u03c0\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u039a\u03b1\u03bd\u03bf\u03bd\u03b9\u03ba\u03cc",tracestracktop_topo:"Tracetrack Topo",transport_map:"\u03a3\u03c5\u03b3\u03ba\u03bf\u03b9\u03bd\u03c9\u03bd\u03af\u03b1"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"\u03a3\u03c4\u03c5\u03bb \u03c0\u03bb\u03b1\u03ba\u03b9\u03b4\u03af\u03c9\u03bd \u03b1\u03c0\u03cc %{cyclosm_link} \u03c6\u03b9\u03bb\u03bf\u03be\u03b5\u03bd\u03b7\u03bc\u03ad\u03bd\u03bf \u03b1\u03c0\u03cc %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"\u0395\u03af\u03c3\u03c4\u03b5 \u03b5\u03bd\u03c4\u03cc\u03c2 %{count} \u03c0\u03bf\u03b4\u03cc\u03c2 \u03b1\u03c0\u03cc \u03c4\u03bf \u03c3\u03b7\u03bc\u03b5\u03af\u03bf",other:"\u0395\u03af\u03c3\u03c4\u03b5 \u03b5\u03bd\u03c4\u03cc\u03c2 %{count} \u03c0\u03bf\u03b4\u03b9\u03ce\u03bd \u03b1\u03c0\u03cc \u03c4\u03bf \u03c3\u03b7\u03bc\u03b5\u03af\u03bf"},find_my_location:"\u03a0\u03c1\u03bf\u03b2\u03bf\u03bb\u03ae \u03c4\u03b7\u03c2 \u03c4\u03bf\u03c0\u03bf\u03b8\u03b5\u03c3\u03af\u03b1\u03c2 \u03bc\u03bf\u03c5",location_not_available:"\u0397 \u03c4\u03bf\u03c0\u03bf\u03b8\u03b5\u03c3\u03af\u03b1 \u03b4\u03b5\u03bd \u03b5\u03af\u03bd\u03b1\u03b9 \u03b4\u03b9\u03b1\u03b8\u03ad\u03c3\u03b9\u03bc\u03b7",metersPopup:{one:"\u0395\u03af\u03c3\u03c4\u03b5 \u03b5\u03bd\u03c4\u03cc\u03c2 %{count} \u03bc\u03ad\u03c4\u03c1\u03bf\u03c5 \u03b1\u03c0\u03cc \u03c4\u03bf \u03c3\u03b7\u03bc\u03b5\u03af\u03bf",other:"\u0395\u03af\u03c3\u03c4\u03b5 \u03b5\u03bd\u03c4\u03cc\u03c2 %{count} \u03bc\u03ad\u03c4\u03c1\u03c9\u03bd \u03b1\u03c0\u03cc \u03c4\u03bf \u03c3\u03b7\u03bc\u03b5\u03af\u03bf"}},hotosm_credit:"\u03a3\u03c4\u03c5\u03bb \u03c0\u03bb\u03b1\u03ba\u03b9\u03b4\u03af\u03c9\u03bd \u03b1\u03c0\u03cc %{hotosm_link} \u03c6\u03b9\u03bb\u03bf\u03be\u03b5\u03bd\u03b7\u03bc\u03ad\u03bd\u03bf \u03b1\u03c0\u03cc %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u0394\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1 \u03c7\u03ac\u03c1\u03c4\u03b7",gps:"\u0394\u03b7\u03bc\u03cc\u03c3\u03b9\u03b1 \u03af\u03c7\u03bd\u03b7 GPS",header:"\u0395\u03c0\u03af\u03c0\u03b5\u03b4\u03b1 \u03c7\u03ac\u03c1\u03c4\u03b7",notes:"\u03a3\u03b7\u03bc\u03b5\u03b9\u03ce\u03c3\u03b5\u03b9\u03c2 \u03c7\u03ac\u03c1\u03c4\u03b7",overlays:"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03b5\u03c0\u03b9\u03ba\u03b1\u03bb\u03cd\u03c8\u03b5\u03c9\u03bd \u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u03b1\u03bd\u03c4\u03b9\u03bc\u03b5\u03c4\u03ce\u03c0\u03b9\u03c3\u03b7 \u03c0\u03c1\u03bf\u03b2\u03bb\u03b7\u03bc\u03ac\u03c4\u03c9\u03bd \u03c4\u03bf\u03c5 \u03c7\u03ac\u03c1\u03c4\u03b7",title:"\u0395\u03c0\u03af\u03c0\u03b5\u03b4\u03b1"},make_a_donation:"\u039a\u03ac\u03bd\u03c4\u03b5 \u03bc\u03b9\u03b1 \u03b4\u03c9\u03c1\u03b5\u03ac",map:{marker:{title:"\u0394\u03b5\u03af\u03ba\u03c4\u03b7\u03c2 \u03c7\u03ac\u03c1\u03c4\u03b7"},title:"\u03a7\u03ac\u03c1\u03c4\u03b7\u03c2"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u039c\u03b5\u03b3\u03ad\u03b8\u03c5\u03bd\u03c3\u03b7",zoom_out:"\u03a3\u03bc\u03af\u03ba\u03c1\u03c5\u03bd\u03c3\u03b7"},openmaptiles_credit:"\u0394\u03b9\u03b1\u03bd\u03c5\u03c3\u03bc\u03b1\u03c4\u03b9\u03ba\u03ac \u03c0\u03bb\u03b1\u03ba\u03af\u03b4\u03b9\u03b1 \u03b1\u03c0\u03cc %{openmaptiles_link} \u03c0\u03bf\u03c5 \u03c6\u03b9\u03bb\u03bf\u03be\u03b5\u03bd\u03bf\u03cd\u03bd\u03c4\u03b1\u03b9 \u03b1\u03c0\u03cc %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"\u03a3\u03c5\u03bd\u03b5\u03b9\u03c3\u03c6\u03ad\u03c1\u03bf\u03bd\u03c4\u03b5\u03c2 OpenStreetMap",osm_france:"OpenStreetMap \u0393\u03b1\u03bb\u03bb\u03af\u03b1\u03c2",popup:{close:"\u039a\u03bb\u03b5\u03af\u03c3\u03b9\u03bc\u03bf"},thunderforest_credit:"\u03a0\u03bb\u03b1\u03ba\u03af\u03b4\u03b9\u03b1 \u03b5\u03c5\u03b3\u03b5\u03bd\u03b9\u03ba\u03ae \u03c0\u03c1\u03bf\u03c3\u03c6\u03bf\u03c1\u03ac \u03c4\u03bf\u03c5 %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"\u03a0\u03bb\u03b1\u03ba\u03af\u03b4\u03b9\u03b1 \u03b5\u03c5\u03b3\u03b5\u03bd\u03b9\u03ba\u03ae \u03c0\u03c1\u03bf\u03c3\u03c6\u03bf\u03c1\u03ac \u03c4\u03bf\u03c5 %{tracestrack_link}",website_and_api_terms:"\u038c\u03c1\u03bf\u03b9 \u03b9\u03c3\u03c4\u03cc\u03c4\u03bf\u03c0\u03bf\u03c5 \u03ba\u03b1\u03b9 API"}}},en:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Cycle Map",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport Map"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Show My Location",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"Map Layers",notes:"Map Notes",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom In",zoom_out:"Zoom Out"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},"en-GB":{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Cycle Map",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport Map"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Show My Location",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"Map Layers",notes:"Map Notes",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom In",zoom_out:"Zoom Out"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},eo:{javascripts:{embed:{report_problem:"Raporti problemon"},map:{andy_allan:"Andy ALLAN",attribution_control:{toggle_attribution:"Baskuligi atribuon"},base:{cycle_map:"Biciklada mapo",cyclosm:"CyclOSM",hot:"Hom-helpa mapo",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Norma mapo",tracestracktop_topo:"Topografia mapo",transport_map:"Transporta mapo"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Stilo de kaheloj: %{cyclosm_link}, retgastigo: %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Vi estas %{count}\xa0futo for de tiu punkto",other:"Vi estas %{count}\xa0futoj for de tiu punkto"},find_my_location:"Montri mian pozicion",location_not_available:"Pozicio ne trovita",metersPopup:{one:"Vi estas %{count}\xa0metro for de tiu punkto",other:"Vi estas %{count}\xa0metroj for de tiu punkto"}},hotosm_credit:"Stilo de kaheloj: %{hotosm_link}, retgastigo: %{osm_france_link}",hotosm_name:"HOTOSM",layers:{data:"Map-datumoj",gps:"Publikaj GPS-spuroj",header:"Tavoloj de mapo",notes:"Map-rimarkoj",overlays:"Aktivigu surtavolojn por solvi problemojn kun la mapo",title:"Tavoloj"},make_a_donation:"Donaci",map:{marker:{title:"Map-markilo"},title:"Mapo"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Pligrandigi",zoom_out:"Malgrandigi"},openmaptiles_credit:"Vektoraj kaheloj %{openmaptiles_link} gastigataj de %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"kontribuintoj de OpenStreetMap",osm_france:"OpenStreetMap France",popup:{close:"Fermi"},thunderforest_credit:"Kaheloj danke al %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Kaheloj danke al %{tracestrack_link}",website_and_api_terms:"Uzkondi\u0109oj"}}},es:{javascripts:{embed:{report_problem:"Reportar un problema"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Alternar atribuci\xf3n"},base:{cycle_map:"Mapa ciclista",cyclosm:"CyclOSM",hot:"Humanitario",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Est\xe1ndar",tracestracktop_topo:"Tracestrack Topo",transport_map:"Mapa de transporte"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Estilo de teselas por %{cyclosm_link} alojados por %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Est\xe1s a %{count} pie desde este punto",other:"Est\xe1s a %{count} pies desde este punto"},find_my_location:"Mostrar Mi Ubicaci\xf3n",location_not_available:"Ubicaci\xf3n no disponible",metersPopup:{one:"Est\xe1s a %{count} metro de este punto",other:"Est\xe1s a %{count} metros de este punto"}},hotosm_credit:"Estilo de teselas por %{hotosm_link} alojados por %{osm_france_link}",hotosm_name:"Equipo humanitario de OpenStreetMap",layers:{data:"Datos del mapa",gps:"Trazas GPS p\xfablicas",header:"Capas del mapa",notes:"Notas del mapa",overlays:"Activar superposiciones para solucionar problemas en el mapa",title:"Capas"},make_a_donation:"Hacer una donaci\xf3n",map:{marker:{title:"Marcadores de mapas"},title:"Mapa"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Acercar",zoom_out:"Alejar"},openmaptiles_credit:"Teselas vectoriales de %{openmaptiles_link} alojadas por %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Colaboradores de OpenStreetMap",osm_france:"OpenStreetMap Francia",popup:{close:"Cerrar"},thunderforest_credit:"Teselas cortes\xeda de %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Teselas cortes\xeda de %{tracestrack_link}",website_and_api_terms:"T\xe9rminos del sitio web y de la API"}}},et:{javascripts:{embed:{report_problem:"Teata probleemist"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Rattakaart",cyclosm:"CyclOSM",hot:"Humanitaarabi",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Tavakaart",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transpordikaart"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"N\xe4ita minu asukohta",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Paanide stiili autor on %{hotosm_link} ning majutusteenust pakub %{osm_france_link}",hotosm_name:"OpenStreetMapi humanitaarabimeeskond",layers:{data:"Kaardi andmed",gps:"Avalikud GPS-rajad",header:"Kaardikihid",notes:"Kaardi m\xe4rkused",overlays:"Luba kattekihte, et kaarti anal\xfc\xfcsida",title:"Kihid"},make_a_donation:"Tee annetus",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Suurenda",zoom_out:"V\xe4henda"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMapi kaast\xf6\xf6lised",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Paanide autor on %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Kaardipaanid teenusepakkujalt %{tracestrack_link}",website_and_api_terms:"Veebisaidi ja API tingimused"}}},eu:{javascripts:{embed:{report_problem:"Arazo baten berri eman"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Bizikletentzako mapa",cyclosm:"CyclOSM",hot:"Humanitarioa",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Arrunta",tracestracktop_topo:"Tracestrack Topo",transport_map:"Garraioen mapa"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Puntu honetatik gehienez oin batera zaude",other:"Puntu honetatik %{count} oinetara zaude"},find_my_location:"Erakutsi nire kokapena",location_not_available:"Location not available",metersPopup:{one:"Puntu honetatik gehienez metro batera zaude",other:"Puntu honetatik %{count} metrora zaude"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"OpenStreetMap Talde humanitarioa",layers:{data:"Maparen datuak",gps:"GPS aztarna publikoak",header:"Maparen geruzak",notes:"Maparen oharrak",overlays:"Gaitu maparen konponketa egiteko gainjartzen direnak",title:"Geruzak"},make_a_donation:"Dohaintza egin",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Handiagotu",zoom_out:"Txikiagotu"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap laguntzaileak",osm_france:"OpenStreetMap Frantzia",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Webgunearen eta APIaren baldintzak"}}},fa:{javascripts:{embed:{report_problem:"\u06af\u0632\u0627\u0631\u0634 \u0645\u0634\u06a9\u0644"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u0646\u0642\u0634\u0647\u0654 \u062f\u0648\u0686\u0631\u062e\u0647",cyclosm:"CyclOSM",hot:"\u0628\u0634\u0631\u062f\u0648\u0633\u062a\u0627\u0646\u0647",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u0627\u0633\u062a\u0627\u0646\u062f\u0627\u0631\u062f",tracestracktop_topo:"Tracestrack Topo",transport_map:"\u0646\u0642\u0634\u0647\u0654 \u062d\u0645\u0644\u200c\u0648\u0646\u0642\u0644"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"\u0634\u0645\u0627 \u062f\u0631 \u06cc\u06a9 \u0641\u0648\u062a\u06cc \u0627\u06cc\u0646 \u0646\u0642\u0637\u0647 \u0647\u0633\u062a\u06cc\u062f",other:"\u0634\u0645\u0627 \u062f\u0631 %{count} \u0641\u0648\u062a\u06cc \u0627\u06cc\u0646 \u0646\u0642\u0637\u0647 \u0647\u0633\u062a\u06cc\u062f"},find_my_location:"\u0646\u0645\u0627\u06cc\u0634 \u0645\u06a9\u0627\u0646 \u0645\u0646",location_not_available:"Location not available",metersPopup:{one:"\u0634\u0645\u0627 \u062f\u0631 \u06cc\u06a9 \u0645\u062a\u0631\u06cc \u0627\u06cc\u0646 \u0646\u0642\u0637\u0647 \u0647\u0633\u062a\u06cc\u062f",other:"\u0634\u0645\u0627 \u062f\u0631 %{count} \u0645\u062a\u0631\u06cc \u0627\u06cc\u0646 \u0646\u0642\u0637\u0647 \u0647\u0633\u062a\u06cc\u062f"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u062f\u0627\u062f\u0647\u0654 \u0646\u0642\u0634\u0647",gps:"\u0631\u062f\u0647\u0627\u06cc GPS \u0639\u0645\u0648\u0645\u06cc",header:"\u0644\u0627\u06cc\u0647\u200c\u0647\u0627\u06cc \u0646\u0642\u0634\u0647",notes:"\u06cc\u0627\u062f\u062f\u0627\u0634\u062a\u200c\u0647\u0627\u06cc \u0646\u0642\u0634\u0647",overlays:"\u0628\u0631\u0627\u06cc \u0627\u0634\u06a9\u0627\u0644\u200c\u0632\u062f\u0627\u06cc\u06cc \u0627\u0632 \u0646\u0642\u0634\u0647 \u0631\u0648\u0644\u0627\u06cc\u0647\u200c\u0647\u0627 \u0631\u0627 \u0641\u0639\u0627\u0644 \u06a9\u0646\u06cc\u062f",title:"\u0644\u0627\u06cc\u0647\u200c\u0647\u0627"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u0628\u0632\u0631\u06af\u200c\u0646\u0645\u0627\u06cc\u06cc",zoom_out:"\u06a9\u0648\u0686\u06a9\u200c\u0646\u0645\u0627\u06cc\u06cc"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},fi:{javascripts:{embed:{report_problem:"Ilmoita ongelmasta"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Py\xf6r\xe4ilykartta",cyclosm:"CyclOSM",hot:"Humanitaarinen",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Perinteinen",tracestracktop_topo:"Tracestrack Topo",transport_map:"Joukkoliikenne"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Laattojen tyyli: %{osm_france_link} yll\xe4pit\xe4m\xe4 %{cyclosm_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Olet %{count} jalan et\xe4isyydell\xe4 t\xe4st\xe4 pisteest\xe4",other:"Olet %{count} jalan et\xe4isyydell\xe4 t\xe4st\xe4 pisteest\xe4"},find_my_location:"N\xe4yt\xe4 oma sijaintini",location_not_available:"Paikkatiedot eiv\xe4t ole k\xe4ytett\xe4viss\xe4",metersPopup:{one:"Olet %{count} metrin et\xe4isyydell\xe4 t\xe4st\xe4 pisteess\xe4",other:"Olet %{count} metrin et\xe4isyydell\xe4 t\xe4st\xe4 pisteest\xe4"}},hotosm_credit:"Laattojen tyyli: %{osm_france_link} yll\xe4pit\xe4m\xe4 %{hotosm_link}",hotosm_name:"Humanitarian OpenStreetMap -tiimi",layers:{data:"Kartta-aineisto",gps:"Julkiset GPS-j\xe4ljet",header:"Karttan\xe4kym\xe4",notes:"Karttailmoitukset",overlays:"N\xe4m\xe4 toiminnot on tarkoitettu karttavirheiden korjaamiseen",title:"Karttan\xe4kym\xe4"},make_a_donation:"Lahjoita",map:{marker:{title:"Karttimerkki"},title:"Kartta"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"L\xe4henn\xe4",zoom_out:"Loitonna"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap-kartoittajat",osm_france:"OpenStreetMap Francen",popup:{close:"Sulje"},thunderforest_credit:"Laattojen tekij\xe4 %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Laatat: %{tracestrack_link}",website_and_api_terms:"Verkkosivusto ja API-ehdot"}}},fr:{javascripts:{embed:{report_problem:"Signaler un probl\xe8me"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Afficher/masquer les cr\xe9dits"},base:{cycle_map:"Carte cyclable",cyclosm:"CyclOSM",hot:"Humanitaire",openmaptiles_osm:"OMT MapTiler",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Topo de Tracestrack",transport_map:"Carte de transport"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Style de tuiles par %{cyclosm_link} h\xe9berg\xe9 par %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Vous \xeates \xe0 moins de %{count} pied de ce point",other:"Vous \xeates \xe0 moins de %{count} pieds de ce point"},find_my_location:"Afficher mon emplacement",location_not_available:"Localisation non disponible",metersPopup:{one:"Vous \xeates \xe0 moins de %{count} m\xe8tre de ce point",other:"Vous \xeates \xe0 moins de %{count} m\xe8tres de ce point"}},hotosm_credit:"Style de tuiles de %{hotosm_link} h\xe9berg\xe9 par %{osm_france_link}",hotosm_name:"L\u2019\xc9quipe OpenStreetMap Humanitaire",layers:{data:"Donn\xe9es de carte",gps:"Traces GPS publiques",header:"Couches de carte",notes:"Notes de carte",overlays:"Activer des surcouches pour corriger des probl\xe8mes de la carte",title:"Couches"},make_a_donation:"Faire un don",map:{marker:{title:"Rep\xe8re sur la carte"},title:"Carte"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Vue rapproch\xe9e",zoom_out:"Vue \xe9loign\xe9e"},openmaptiles_credit:"Tuiles vectorielles de %{openmaptiles_link} h\xe9berg\xe9es par %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Contributeurs OpenStreetMap",osm_france:"OpenStreetMap France",popup:{close:"Fermer"},thunderforest_credit:"Tuiles fournies aimablement par %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tuiles fournies aimablement par %{tracestrack_link}",website_and_api_terms:"Conditions d\u2019utilisation du site web et de l\u2019API"}}},frp:{javascripts:{embed:{report_problem:"Signalar un probl\xe8mo"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Mapa de v\xe8l\xf4s",cyclosm:"CyclOSM",hot:"Humanit\xe8ro",openmaptiles_osm:"OMT MapTiler",shortbread:"Shortbread",standard:"Stand\xe2rd",tracestracktop_topo:"Topo de Tracestrack",transport_map:"Mapa de transp\xf4rts"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Stilo de tioles per %{cyclosm_link} h\xe8b\xe8rgi\xea per %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Vos \xe9te a muens de %{count} pied de c\xe9t pouent",other:"Vos \xe9te a muens de %{count} pieds de c\xe9t pouent"},find_my_location:"Afichi\xe9r mon emplacement",location_not_available:"Localisacion pas disponibla",metersPopup:{one:"Vos \xe9te a muens de %{count} m\xe8tro de c\xe9t pouent",other:"Vos \xe9te a muens de %{count} m\xe8tros de c\xe9t pouent"}},hotosm_credit:"Stilo de tioles de %{hotosm_link} h\xe8b\xe8rgi\xea per %{osm_france_link}",hotosm_name:"L'\xc8quipa OpenStreetMap Humanit\xe8ra",layers:{data:"Baly\xeas de mapa",gps:"Traces GPS publiques",header:"Cuches de mapa",notes:"Notes de mapa",overlays:"Activar de surcuches por adobar de probl\xe8mos de la mapa",title:"Cuches"},make_a_donation:"Baly\xe9r d'argent",map:{marker:{title:"Rep\xe8ro sur la mapa"},title:"Mapa"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"S'aprochi\xe9r",zoom_out:"S'\xe8luegn\xe9r"},openmaptiles_credit:"Tioles v\xe8ctori\xe8les de %{openmaptiles_link} h\xe8b\xe8rgi\xeaes per %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Contributors OpenStreetMap",osm_france:"OpenStreetMap France",popup:{close:"Cll\xf4re"},thunderforest_credit:"Tioles fornies gentament per %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tioles fornies gentament per %{tracestrack_link}",website_and_api_terms:"Condicions d'us\xe2jo du sito vou\xe8be et de l'API"}}},fur:{javascripts:{embed:{report_problem:"Segnale un probleme"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Cycle Map",cyclosm:"CyclOSM",hot:"Umanitari",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Mape dai traspuarts"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"St\xeel dai tassei di %{cyclosm_link} ospit\xe2t di %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Tu s\xeas a mancul di %{count} p\xeet di chest pont",other:"Tu s\xeas a mancul di %{count} p\xeets di chest pont"},find_my_location:"Mostre la m\xea posizion",location_not_available:"Location not available",metersPopup:{one:"Tu s\xeas a mancul di %{count} metri di chest pont",other:"Tu s\xeas a mancul di %{count} metris di chest pont"}},hotosm_credit:"St\xeel dai tassei di %{hotosm_link} ospit\xe2t di %{osm_france_link}",hotosm_name:"La clape umanitare di OpenStreetMap",layers:{data:"D\xe2ts de mape",gps:"Percors GPS publics",header:"Nivei de mape",notes:"Notis de mape",overlays:"Ative i nivei utii par risolvi i problemis de mape",title:"Nivei"},make_a_donation:"Done alc",map:{marker:{title:"Map marker"},title:"Mape"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Aumente zoom",zoom_out:"Diminu\xecs zoom"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Siere"},thunderforest_credit:"Tassei par gent\xeel concession di %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tassei par gent\xeel concession di %{tracestrack_link}",website_and_api_terms:"Tiermins di \xfbs dal s\xeet e des APIs"}}},fy:{javascripts:{embed:{report_problem:"Probleem melde"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Fytskaart",cyclosm:"FytsOSM",hot:"Humanit\xear",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standert",tracestracktop_topo:"Tracestrack Topo",transport_map:"Ferfierskaart"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Jo sitte binnen ien foet fan dit punt",other:"Jo sitte binnen %{count} foet fan dit punt"},find_my_location:"Myn lokaasje oanjaan",location_not_available:"Location not available",metersPopup:{one:"Jo sitte binnen ien meter fan dit punt",other:"Jo sitte binnen %{count} meter fan dit punt"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Kaartdata",gps:"Iepenbiere GPS-trajekten",header:"Kaartlagen",notes:"Kaartnotysjes",overlays:"Boppelagen ynskeakelje ta oplossing fan kaartproblemen",title:"Lagen"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Yns\xfbme",zoom_out:"Uts\xfbme"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},ga:{javascripts:{embed:{report_problem:"Tuairiscigh fadhb"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Athraigh an tAttribution"},base:{cycle_map:"L\xe9arsc\xe1il Rotha\xedochta",cyclosm:"CyclOSM",hot:"Daonn\xfail",openmaptiles_osm:"MapTiler OMT",shortbread:"Brioscar\xe1n",standard:"Caighde\xe1nach",tracestracktop_topo:"Tracestrack Topo",transport_map:"L\xe9arsc\xe1il Iompair"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"St\xedl t\xedleanna le %{cyclosm_link} arna \xf3st\xe1il ag %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{few:"T\xe1 t\xfa laistigh de %{count} troigh \xf3n bpointe seo",many:"T\xe1 t\xfa laistigh de %{count} troigh \xf3n bpointe seo",one:"T\xe1 t\xfa laistigh de %{count} troigh \xf3n bpointe seo",other:"T\xe1 t\xfa laistigh de %{count} troigh \xf3n bpointe seo",two:"T\xe1 t\xfa laistigh de %{count} troigh \xf3n bpointe seo"},find_my_location:"Taispe\xe1in mo shu\xedomh",location_not_available:"N\xedl an su\xedomh ar f\xe1il",metersPopup:{few:"T\xe1 t\xfa laistigh de %{count} m\xe9adar \xf3n bpointe seo",many:"T\xe1 t\xfa laistigh de %{count} m\xe9adar \xf3n bpointe seo",one:"T\xe1 t\xfa laistigh de %{count} mh\xe9adar \xf3n bpointe seo",other:"T\xe1 t\xfa laistigh de %{count} m\xe9adar \xf3n bpointe seo",two:"T\xe1 t\xfa laistigh de %{count} m\xe9adar \xf3n bpointe seo"}},hotosm_credit:"St\xedl t\xedleanna le %{hotosm_link} arna \xf3st\xe1il ag %{osm_france_link}",hotosm_name:"Foireann Dhaonn\xfail OpenStreetMap",layers:{data:"Sonra\xed L\xe9arsc\xe1ile",gps:"Rianta GPS Poibl\xed",header:"Sraitheanna L\xe9arsc\xe1ile",notes:"N\xf3ta\xed L\xe9arsc\xe1ile",overlays:"Cumasaigh forleagan chun fabhtcheart\xfa a dh\xe9anamh ar an l\xe9arsc\xe1il",title:"Sraitheanna"},make_a_donation:"D\xe9an S\xednti\xfas",map:{marker:{title:"Marc\xf3ir l\xe9arsc\xe1ile"},title:"L\xe9arsc\xe1il"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Z\xfam\xe1il isteach",zoom_out:"Z\xfam\xe1il amach"},openmaptiles_credit:"T\xedleanna veicteora \xf3 %{openmaptiles_link} arna \xf3st\xe1il ag %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Rannph\xe1irtithe OpenStreetMap",osm_france:"OpenStreetMap na Fraince",popup:{close:"D\xfan"},thunderforest_credit:"T\xedleanna le caoinchead %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"T\xedleanna le caoinchead %{tracestrack_link}",website_and_api_terms:"T\xe9arma\xed su\xedomh Gr\xe9as\xe1in agus API"}}},gcf:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Cycle Map",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport Map"},copyright_text:"\xa9 %{copyright_link}", cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Montr\xe9 la ou y\xe9",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"Map Layers",notes:"Map Notes",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom In",zoom_out:"Zoom Out"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},gd:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Mapa baidhseagail",cyclosm:"CyclOSM",hot:"Daonnachdach",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\xc0bhaisteach",tracestracktop_topo:"Tracestrack Topo",transport_map:"Mapa c\xf2mhdhalach"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Seall far a bheil mi",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"D\xe0ta a' mhapa",gps:"Public GPS Traces",header:"Breathan a' mhapa",notes:"N\xf2taichean a' mhapa",overlays:"Cuir tar-ch\xf2mhdachaidhean an comas gus duilgheadasan leis a' mhapa fhuasgladh",title:"Breathan"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"S\xf9m a-steach",zoom_out:"S\xf9m a-mach"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},gl:{javascripts:{embed:{report_problem:"Denunciar un problema"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Activar/Desactivar o reco\xf1ecemento"},base:{cycle_map:"Ciclista",cyclosm:"CyclOSM",hot:"Humanitario",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Est\xe1ndar",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transporte"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Estilo de mosaicos de %{cyclosm_link} aloxado por %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Est\xe1s a menos de %{count} p\xe9 deste punto",other:"Est\xe1s a menos de %{count} p\xe9s deste punto"},find_my_location:"Amosar a mi\xf1a localizaci\xf3n",location_not_available:"A localizaci\xf3n non est\xe1 dispo\xf1ible",metersPopup:{one:"Est\xe1s a menos de %{count} metro deste punto",other:"Est\xe1s a menos de %{count} metros deste punto"}},hotosm_credit:"Estilo de mosaicos do %{hotosm_link} aloxado por %{osm_france_link}",hotosm_name:"equipo humanitario do OpenStreetMap",layers:{data:"Datos do mapa",gps:"Pistas GPS p\xfablicas",header:"Capas do mapa",notes:"Notas do mapa",overlays:"Activar as sobreposici\xf3ns para a resoluci\xf3n dos problemas do mapa",title:"Capas"},make_a_donation:"Facer unha doaz\xf3n",map:{marker:{title:"Marcador de mapa"},title:"Mapa"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Achegar",zoom_out:"Afastar"},openmaptiles_credit:"Mosaicos vectoriais de %{openmaptiles_link} aloxados por %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Colaboradores do OpenStreetMap",osm_france:"OpenStreetMap Francia",popup:{close:"Pechar"},thunderforest_credit:"Mosaicos cortes\xeda de %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Mosaicos cortes\xeda de %{tracestrack_link}",website_and_api_terms:"Condici\xf3ns do sitio web e da API"}}},gsw:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Cycle Map",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport Map"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Show My Location",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"Map Layers",notes:"Charte Notize",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom In",zoom_out:"Zoom Out"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},he:{javascripts:{embed:{report_problem:"\u05d3\u05d9\u05d5\u05d5\u05d7 \u05e2\u05dc \u05d1\u05e2\u05d9\u05d4"},map:{andy_allan:"\u05d0\u05e0\u05d3\u05d9 \u05d0\u05dc\u05df",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u05de\u05e4\u05ea \u05d0\u05d5\u05e4\u05e0\u05d9\u05d9\u05dd",cyclosm:"CyclOSM",hot:"\u05d4\u05d5\u05de\u05e0\u05d9\u05d8\u05e8\u05d9\u05ea",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u05ea\u05e7\u05e0\u05d9\u05ea",tracestracktop_topo:"\u05d8\u05d5\u05e4\u05d5\u05d2\u05e8\u05e4\u05d9\u05d4 \u05e9\u05dc Tracestrack",transport_map:"\u05de\u05e4\u05ea \u05ea\u05d7\u05d1\u05d5\u05e8\u05d4"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"\u05e1\u05d2\u05e0\u05d5\u05df \u05d0\u05e8\u05d9\u05d7\u05d9\u05dd \u05de\u05d0\u05ea %{cyclosm_link} \u05de\u05ea\u05d0\u05e8\u05d7 \u05d0\u05e6\u05dc %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{many:"\u05d4\u05de\u05e8\u05d7\u05e7 \u05e9\u05dc\u05da \u05de\u05d4\u05e0\u05e7\u05d5\u05d3\u05d4 \u05d4\u05d6\u05d0\u05ea \u05d4\u05d5\u05d0 \u05e2\u05d3 %{count} \u05e8\u05d2\u05dc",one:"\u05d4\u05de\u05e8\u05d7\u05e7 \u05e9\u05dc\u05da \u05de\u05d4\u05e0\u05e7\u05d5\u05d3\u05d4 \u05d4\u05d6\u05d0\u05ea \u05d4\u05d5\u05d0 \u05e4\u05d7\u05d5\u05ea \u05de\u05e8\u05d2\u05dc",other:"\u05d4\u05de\u05e8\u05d7\u05e7 \u05e9\u05dc\u05da \u05de\u05d4\u05e0\u05e7\u05d5\u05d3\u05d4 \u05d4\u05d6\u05d0\u05ea \u05d4\u05d5\u05d0 \u05e2\u05d3 %{count} \u05e8\u05d2\u05dc",two:"\u05d4\u05de\u05e8\u05d7\u05e7 \u05e9\u05dc\u05da \u05de\u05d4\u05e0\u05e7\u05d5\u05d3\u05d4 \u05d4\u05d6\u05d0\u05ea \u05d4\u05d5\u05d0 \u05e2\u05d3 %{count} \u05e8\u05d2\u05dc"},find_my_location:"\u05d4\u05e6\u05d2\u05ea \u05d4\u05de\u05d9\u05e7\u05d5\u05dd \u05e9\u05dc\u05d9",location_not_available:"\u05d4\u05de\u05e7\u05d5\u05dd \u05dc\u05d0 \u05d6\u05de\u05d9\u05df",metersPopup:{many:"\u05d4\u05de\u05e8\u05d7\u05e7 \u05e9\u05dc\u05da \u05de\u05d4\u05e0\u05e7\u05d5\u05d3\u05d4 \u05d4\u05d6\u05d0\u05ea \u05d4\u05d5\u05d0 \u05e2\u05d3 %{count} \u05de\u05d8\u05e8",one:"\u05d4\u05de\u05e8\u05d7\u05e7 \u05e9\u05dc\u05da \u05de\u05d4\u05e0\u05e7\u05d5\u05d3\u05d4 \u05d4\u05d6\u05d0\u05ea \u05d4\u05d5\u05d0 \u05e4\u05d7\u05d5\u05ea \u05de\u05de\u05d8\u05e8",other:"\u05d4\u05de\u05e8\u05d7\u05e7 \u05e9\u05dc\u05da \u05de\u05d4\u05e0\u05e7\u05d5\u05d3\u05d4 \u05d4\u05d6\u05d0\u05ea \u05d4\u05d5\u05d0 \u05e2\u05d3 %{count} \u05de\u05d8\u05e8\u05d9\u05dd",two:"\u05d4\u05de\u05e8\u05d7\u05e7 \u05e9\u05dc\u05da \u05de\u05d4\u05e0\u05e7\u05d5\u05d3\u05d4 \u05d4\u05d6\u05d0\u05ea \u05d4\u05d5\u05d0 \u05e2\u05d3 %{count} \u05de\u05d8\u05e8\u05d9\u05dd"}},hotosm_credit:"\u05e1\u05d2\u05e0\u05d5\u05df \u05d0\u05e8\u05d9\u05d7\u05d9\u05dd \u05de\u05d0\u05ea %{hotosm_link} \u05de\u05ea\u05d0\u05e8\u05d7 \u05d0\u05e6\u05dc %{osm_france_link}",hotosm_name:"\u05e6\u05d5\u05d5\u05ea OpenStreetMap \u05d4\u05d5\u05de\u05e0\u05d9\u05d8\u05e8\u05d9",layers:{data:"\u05e0\u05ea\u05d5\u05e0\u05d9 \u05d4\u05de\u05e4\u05d4",gps:"\u05de\u05e1\u05dc\u05d5\u05dc\u05d9 GPS \u05e6\u05d9\u05d1\u05d5\u05e8\u05d9\u05d9\u05dd",header:"\u05e9\u05db\u05d1\u05d5\u05ea \u05d1\u05de\u05e4\u05d4",notes:"\u05d4\u05e2\u05e8\u05d5\u05ea \u05d1\u05de\u05e4\u05d4",overlays:"\u05d4\u05e4\u05e2\u05dc\u05ea \u05e9\u05db\u05d1\u05d5\u05ea \u05dc\u05e4\u05ea\u05e8\u05d5\u05df \u05ea\u05e7\u05dc\u05d5\u05ea \u05d1\u05de\u05e4\u05d4",title:"\u05e9\u05db\u05d1\u05d5\u05ea"},make_a_donation:"\u05ea\u05e8\u05d5\u05de\u05d4",map:{marker:{title:"\u05e1\u05de\u05df \u05de\u05e4\u05d4"},title:"\u05de\u05e4\u05d4"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u05d4\u05ea\u05e7\u05e8\u05d1\u05d5\u05ea",zoom_out:"\u05d4\u05ea\u05e8\u05d7\u05e7\u05d5\u05ea"},openmaptiles_credit:"\u05d0\u05e8\u05d9\u05d7\u05d9\u05dd \u05d5\u05e7\u05d8\u05d5\u05e8\u05d9\u05d9\u05dd \u05de\u05ea\u05d5\u05da %{openmaptiles_link} \u05e9\u05de\u05ea\u05d0\u05e8\u05d7\u05d9\u05dd \u05e2\u05dc\u05be\u05d9\u05d3\u05d9 %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"\u05ea\u05d5\u05e8\u05de\u05d9 OpenStreetMap",osm_france:"OpenStreetMap \u05e6\u05e8\u05e4\u05ea",popup:{close:"\u05e1\u05d2\u05d9\u05e8\u05d4"},thunderforest_credit:"\u05d0\u05e8\u05d9\u05d7\u05d9\u05dd \u05d1\u05d0\u05d3\u05d9\u05d1\u05d5\u05ea %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"\u05d4\u05d0\u05e8\u05d9\u05d7\u05d9\u05dd \u05d1\u05d0\u05d3\u05d9\u05d1\u05d5\u05ea %{tracestrack_link}",website_and_api_terms:"\u05ea\u05e0\u05d0\u05d9 \u05d0\u05ea\u05e8 \u05d5\u05beAPI"}}},hi:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Cycle Map",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport Map"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Show My Location",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"Map Layers",notes:"\u092e\u093e\u0928\u091a\u093f\u0924\u094d\u0930 \u0928\u094b\u091f\u094d\u0938",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"\u0928\u0915\u094d\u0936\u093e"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom In",zoom_out:"Zoom Out"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},hr:{javascripts:{embed:{report_problem:"Prijavi problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Uklju\u010divanje atribucije"},base:{cycle_map:"Biciklisti\u010dka karta",cyclosm:"CyclOSM",hot:"Humanitarna",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standardni",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transportna karta"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Stil podloge %{cyclosm_link}, doma\u0107in %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{few:"nalazite se unutar %{count} stope od ove to\u010dke ",one:"Nalazite se unutar %{count} stope od ove to\u010dke",other:"Nalazite se unutar %{count} stopa od ove to\u010dke"},find_my_location:"Prika\u017ei moju lokaciju",location_not_available:"Neostupna lokacija",metersPopup:{few:"nalazite se unutar %{count} metra od ove to\u010dke",one:"Nalazite se unutar %{count} metra od ove to\u010dke",other:" Nalazite se unutar %{count} metara od ove to\u010dke"}},hotosm_credit:"Stil podloga %{hotosm_link}, s uslugom hostiranja %{osm_france_link}",hotosm_name:"Humanitarni OpenStreetMap tim",layers:{data:"Podaci karte",gps:"Javni GNSS tragovi",header:"Slojevi karte",notes:"Bilje\u0161ke na karti",overlays:"Uklju\u010ditde dodatne slojeve za otklanjanje gre\u0161aka na karti",title:"Slojevi"},make_a_donation:"Donirajte",map:{marker:{title:"Oznaka karte"},title:"Karta"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Pribli\u017ei",zoom_out:"Udalji"},openmaptiles_credit:"Vektorske podloge %{openmaptiles_link} pru\u017eatelja usluga hostiranja %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Suradnici OpenStreetMapa",osm_france:"OpenStreetMap Francuska",popup:{close:"Zatvoriti"},thunderforest_credit:"Podloge omogu\u0107io %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Podloge omogu\u0107io %{tracestrack_link}",website_and_api_terms:"Uvjeti web-stranice i API-ja"}}},hsb:{javascripts:{embed:{report_problem:"Problem zd\u017a\u011bli\u0107"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Kolesowa karta",cyclosm:"CyclOSM",hot:"Sobuskutkowacy humanitarneje pomocy",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Wobchadna karta"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{few:"Sy mjenje ha\u010d %{count} stopy wot tutoho dypka zdaleny",one:"Sy mjenje ha\u010d %{count} stopu wot tutoho dypka zdaleny",other:"Sy mjenje ha\u010d %{count} stopow wot tutoho dypka zdaleny",two:"Sy mjenje ha\u010d %{count} stopje wot tutoho dypka zdaleny"},find_my_location:"Aktualne m\u011bstno pokaza\u0107",location_not_available:"Stejni\u0161\u0107o k dispoziciji njeje",metersPopup:{few:"Sy mjenje ha\u010d %{count} metry wot tutoho dypka zdaleny",one:"Sy mjenje ha\u010d %{count} meter wot tutoho dypka zdaleny",other:"Sy mjenje ha\u010d %{count} metrow wot tutoho dypka zdaleny",two:"Sy mjenje ha\u010d %{count} metraj wot tutoho dypka zdaleny"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Kartowe daty",gps:"Zjawne GPS-\u0107\u011brje",header:"Kartowe runiny",notes:"Pokazki",overlays:"Wor\u0161ty za pytanje za zmylkami na kar\u0107e zm\xf3\u017eni\u0107",title:"Runiny"},make_a_donation:"Dari\u0107",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Powjet\u0161i\u0107",zoom_out:"Pomje\u0144\u0161i\u0107"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Sobuskutkowarjo OpenStreetMap",osm_france:"OpenStreetMap Francoska",popup:{close:"Za\u010dini\u0107"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Wum\u011bnjenja websyd\u0142a a API"}}},hu:{javascripts:{embed:{report_problem:"Probl\xe9ma bejelent\xe9se"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Ker\xe9kp\xe1rt\xe9rk\xe9p",cyclosm:"CyclOSM",hot:"Humanit\xe1rius",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Alap\xe9rtelmezett",tracestracktop_topo:"Tracetrack Topo",transport_map:"T\xf6megk\xf6zleked\xe9s"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"A %{cyclosm_link} csempest\xedlusa: %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"%{count} l\xe1bn\xe1l is k\xf6zelebb vagy ehhez a ponthoz",other:"%{count} l\xe1bn\xe1l k\xf6zelebb vagy ehhez a ponthoz"},find_my_location:"Helyzetem megjelen\xedt\xe9se",location_not_available:"Location not available",metersPopup:{one:"%{count} m\xe9tern\xe9l is k\xf6zelebb vagy ehhez a ponthoz",other:"%{count} m\xe9tern\xe9l k\xf6zelebb vagy ehhez a ponthoz"}},hotosm_credit:"A %{hotosm_link} csempest\xedlusa: %{osm_france_link}",hotosm_name:"Humanit\xe1rius OpenStreetMap csapat",layers:{data:"T\xe9rk\xe9padatok",gps:"Nyilv\xe1nos GPS-nyomvonalak",header:"T\xe9rk\xe9pn\xe9zetek",notes:"T\xe9rk\xe9pjegyzetek",overlays:"Tov\xe1bbi r\xe9tegek enged\xe9lyez\xe9se a t\xe9rk\xe9p hib\xe1inak jav\xedt\xe1sa \xe9rdek\xe9ben",title:"R\xe9tegek"},make_a_donation:"Adom\xe1nyozz",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Nagy\xedt\xe1s",zoom_out:"Kicsiny\xedt\xe9s"},openmaptiles_credit:"Vektoros csemp\xe9k: %{openmaptiles_link}, kiszolg\xe1l\xf3: %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap k\xf6zrem\u0171k\xf6d\u0151k",osm_france:"OpenStreetMap Franciaorsz\xe1g",popup:{close:"Close"},thunderforest_credit:"A csemp\xe9k a %{thunderforest_link} j\xf3volt\xe1b\xf3l",tracestrack:"Tracestrack",tracestrack_credit:"A csemp\xe9k a %{tracestrack_link} j\xf3volt\xe1b\xf3l",website_and_api_terms:"Webhely \xe9s API felt\xe9telek"}}},ia:{javascripts:{embed:{report_problem:"Reportar problema"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Alternar attribution"},base:{cycle_map:"Carta cyclista",cyclosm:"CyclOSM",hot:"Humanitario",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Carta de transporto"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Stilo de tegulas per %{cyclosm_link} albergate per %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Tu es minus de %{count} pede distante de iste puncto",other:"Tu es minus de %{count} pedes distante de iste puncto"},find_my_location:"Monstrar mi position",location_not_available:"Position indisponibile",metersPopup:{one:"Tu es minus de %{count} metro distante de iste puncto",other:"Tu es minus de %{count} metros distante de iste puncto"}},hotosm_credit:"Stilo de tegulas per %{hotosm_link} albergate per %{osm_france_link}",hotosm_name:"le Equipa Humanitari de OpenStreetMap",layers:{data:"Datos de carta",gps:"Tracias GPS public",header:"Stratos de carta",notes:"Notas de carta",overlays:"Activar superpositiones pro resolver problemas in le carta",title:"Stratos"},make_a_donation:"Facer un donation",map:{marker:{title:"Marcator sur carta"},title:"Carta"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom avante",zoom_out:"Zoom retro"},openmaptiles_credit:"Tegulas vectorial de %{openmaptiles_link} albergate per %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Contributores de OpenStreetMap",osm_france:"OpenStreetMap Francia",popup:{close:"Clauder"},thunderforest_credit:"Tegulas fornite per %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tegulas fornite per %{tracestrack_link}",website_and_api_terms:"Conditiones del API e sito web"}}},id:{javascripts:{embed:{report_problem:"Laporkan masalah"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Aktifkan Atribusi"},base:{cycle_map:"Peta Sepeda",cyclosm:"CyclOSM",hot:"Kemanusiaan",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standar",tracestracktop_topo:"Tracestrack Topo",transport_map:"Peta Transportasi"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Desain kotak peta oleh %{cyclosm_link}, diproses oleh %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{other:"Anda berjarak %{count} kaki dari titik ini"},find_my_location:"Tampilkan Lokasiku",location_not_available:"Lokasi tidak tersedia",metersPopup:{other:"Anda berjarak %{count} meter dari titik ini"}},hotosm_credit:"Desain kotak peta oleh %{hotosm_link}, diproses oleh %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Data Peta",gps:"Jejak GPS Umum",header:"Layer Peta",notes:"Catatan Peta",overlays:"Menyalakan overlay untuk penyelesaian masalah peta",title:"Lapisan"},make_a_donation:"Urun Dana",map:{marker:{title:"Penanda peta"},title:"Peta"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Perbesar",zoom_out:"Perkecil"},openmaptiles_credit:"Petak vektor dari %{openmaptiles_link}, dihosting oleh %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Kontributor OpenStreetMap",osm_france:"OpenStreetMap France",popup:{close:"Tutup"},thunderforest_credit:"Kotak peta oleh %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Kotak peta oleh %{tracestrack_link}",website_and_api_terms:"Ketentuan Situs Web dan API"}}},is:{javascripts:{embed:{report_problem:"Tilkynna vandam\xe1l"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Hj\xf3lakort",cyclosm:"CyclOSM",hot:"Hj\xe1lparstarf",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Sta\xf0la\xf0",tracestracktop_topo:"Tracestrack Topo",transport_map:"Umfer\xf0arkort"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"St\xedll kortat\xedgla fr\xe1 %{cyclosm_link} h\xfdst af %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"\xde\xfa ert minna en %{count} fet fr\xe1 \xfeessum punkti",other:"\xde\xfa ert minna en %{count} fet fr\xe1 \xfeessum punkti"},find_my_location:"Birta sta\xf0setningu m\xedna",location_not_available:"Location not available",metersPopup:{one:"\xde\xfa ert minna en %{count} metra fr\xe1 \xfeessum punkti",other:"\xde\xfa ert minna en %{count} metra fr\xe1 \xfeessum punkti"}},hotosm_credit:"St\xedll kortat\xedgla fr\xe1 %{hotosm_link} h\xfdst af %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap teyminu",layers:{data:"G\xf6gn korts",gps:"Opinberir GPS-ferlar",header:"\xdeekjur \xe1 korti",notes:"Minnispunktar \xe1 korti",overlays:"Virkja yfirl\xf6g til a\xf0 au\xf0velda lausn vandam\xe1la \xe1 kortinu",title:"\xdeekjur"},make_a_donation:"Styrkja verkefni\xf0",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Renna a\xf0",zoom_out:"Renna fr\xe1"},openmaptiles_credit:"Vektort\xedglar fr\xe1 %{openmaptiles_link} h\xfdstir af %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"\xde\xe1tttakendur \xed OpenStreetMap-verkefninu",osm_france:"OpenStreetMap Frakklandi",popup:{close:"Close"},thunderforest_credit:"Kortat\xedglar fr\xe1 %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Kortat\xedglar fr\xe1 %{tracestrack_link}",website_and_api_terms:"Skilm\xe1lar vefsv\xe6\xf0is og API-kerfisvi\xf0m\xf3ts"}}},it:{javascripts:{embed:{report_problem:"Segnala un problema"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Attiva/disattiva l'attribuzione"},base:{cycle_map:"Mappa ciclabile",cyclosm:"CyclOSM",hot:"Umanitario",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Mappa dei trasporti"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Stile tasselli di %{cyclosm_link} ospitato da %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Ti trovi entro %{count} piede da questo punto",other:"Ti trovi entro %{count} piedi da questo punto"},find_my_location:"Mostra la mia posizione",location_not_available:"Posizione non disponibile",metersPopup:{one:"Ti trovi entro %{count} metro da questo punto",other:"Ti trovi entro %{count} metri da questo punto"}},hotosm_credit:"Stile tasselli di %{hotosm_link} ospitato da %{osm_france_link}",hotosm_name:"La squadra di OpenStreetMap Humanitarian",layers:{data:"Dati della mappa",gps:"Tracciati GPS pubblici",header:"Livelli mappa",notes:"Note sulla mappa",overlays:"Abilita sovrapposizioni per la risoluzione dei problemi della mappa",title:"Livelli"},make_a_donation:"Fai una donazione",map:{marker:{title:"Marcatore sulla mappa"},title:"Mappa"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom avanti",zoom_out:"Zoom indietro"},openmaptiles_credit:"Tasselli vettoriali di %{openmaptiles_link} ospitati da %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Contributori di OpenStreetMap",osm_france:"OpenStreetMap France",popup:{close:"Chiudi"},thunderforest_credit:"Tasselli per gentile concessione di %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tasselli per gentile concessione di %{tracestrack_link}",website_and_api_terms:"Condizioni di utilizzo del sito web e delle API"}}},ja:{javascripts:{embed:{report_problem:"\u554f\u984c\u3092\u5831\u544a"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u30b5\u30a4\u30af\u30ea\u30f3\u30b0\u30de\u30c3\u30d7",cyclosm:"CyclOSM",hot:"\u4eba\u9053\u652f\u63f4",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u6a19\u6e96",tracestracktop_topo:"\u30c8\u30ec\u30fc\u30b9\u30c8\u30e9\u30c3\u30af\u30c8\u30dd",transport_map:"\u4ea4\u901a\u30de\u30c3\u30d7"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"%{cyclosm_link} \u306b\u3088\u308b\u30bf\u30a4\u30eb\u30b9\u30bf\u30a4\u30eb (%{osm_france_link} \u304c\u30db\u30b9\u30c8)",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{other:"\u3053\u306e\u5730\u70b9\u307e\u3067%{count}\u30d5\u30a3\u30fc\u30c8"},find_my_location:"\u73fe\u5728\u5730\u3092\u8868\u793a",location_not_available:"Location not available",metersPopup:{other:"\u3053\u306e\u5730\u70b9\u307e\u3067%{count}\u30e1\u30fc\u30c8\u30eb"}},hotosm_credit:"%{hotosm_link} \u306b\u3088\u308b\u30bf\u30a4\u30eb\u30b9\u30bf\u30a4\u30eb (%{osm_france_link} \u304c\u30db\u30b9\u30c8)",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u5730\u56f3\u30c7\u30fc\u30bf",gps:"\u516c\u958bGPS\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0",header:"\u5730\u56f3\u306e\u30ec\u30a4\u30e4\u30fc",notes:"\u5730\u56f3\u30e1\u30e2",overlays:"\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u7528\u306e\u5730\u56f3\u30aa\u30fc\u30d0\u30fc\u30ec\u30a4",title:"\u30ec\u30a4\u30e4\u30fc"},make_a_donation:"\u5bc4\u4ed8\u3092\u3059\u308b",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u62e1\u5927",zoom_out:"\u7e2e\u5c0f"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap\u306e\u8ca2\u732e\u8005",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"\u30bf\u30a4\u30eb\u63d0\u4f9b\uff1a %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"\u30bf\u30a4\u30eb\u63d0\u4f9b\uff1a %{tracestrack_link}",website_and_api_terms:"\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u304a\u3088\u3073API\u306e\u5229\u7528\u898f\u7d04"}}},ka:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u10d5\u10d4\u10da\u10dd\u10e1\u10d8\u10de\u10d4\u10d3\u10d8\u10e1\u10e2\u10d4\u10d1\u10d8\u10e1 \u10e0\u10e3\u10d9\u10d0",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u10e1\u10e2\u10d0\u10dc\u10d3\u10d0\u10e0\u10e2\u10e3\u10da\u10d8",tracestracktop_topo:"Tracestrack Topo",transport_map:"\u10e2\u10e0\u10d0\u10dc\u10e1\u10de\u10dd\u10e0\u10e2\u10d8\u10e1 \u10e0\u10e3\u10d9\u10d0"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Show My Location",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"Map Layers",notes:"Map Notes",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom In",zoom_out:"Zoom Out"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},kab:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Takar\u1e0da n tesnas\u0263alt",cyclosm:"CyclOSM",hot:"Amdanan",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Aslugan",tracestracktop_topo:"Tracestrack Topo",transport_map:"Takar\u1e0da n umesni"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Sken adig-iw",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Isefka n tkar\u1e0da",gps:"Idsilen GPS izuyaz",header:"Tissa n tkar\u1e0da",notes:"Tizmilin n tkar\u1e0da",overlays:"Enable overlays for troubleshooting the map",title:"Tissa"},make_a_donation:"Mudd tawsa",map:{marker:{title:"Aseddag \u0263ef tkar\u1e0da"},title:"Takar\u1e0da"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Sem\u0263e\u1e5b",zoom_out:"Sim\u1e93i"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap Fransa",popup:{close:"Mdel"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}", website_and_api_terms:"Website and API terms"}}},"kk-Cyrl":{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"\u042d\u043d\u0434\u0438 \u0410\u043b\u043b\u0430\u043d",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u0412\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u043a\u0430\u0440\u0442\u0430\u0441\u044b",cyclosm:"CyclOSM",hot:"\u0413\u0443\u043c\u0430\u043d\u0438\u0442\u0430\u0440\u043b\u044b\u049b",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"C\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0442\u044b",tracestracktop_topo:"\u0422\u043e\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u044f\u043b\u044b\u049b",transport_map:"\u041a\u04e9\u043b\u0456\u043a \u043a\u0430\u0440\u0442\u0430\u0441\u044b"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"\u041e\u0440\u043d\u0430\u043b\u0430\u0441\u049b\u0430\u043d \u0436\u0435\u0440\u0456\u043c\u0434\u0456 \u043a\u04e9\u0440\u0441\u0435\u0442\u0443",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u041a\u0430\u0440\u0442\u0430 \u0434\u0435\u0440\u0435\u043a\u0442\u0435\u0440\u0456",gps:"\u0410\u0448\u044b\u049b GPS-\u0442\u0440\u0435\u043a\u0442\u0435\u0440",header:"\u041a\u0430\u0440\u0442\u0430 \u049b\u0430\u0431\u0430\u0442\u0442\u0430\u0440\u044b",notes:"\u0415\u0441\u043a\u0435\u0440\u0442\u043f\u0435\u043b\u0435\u0440",overlays:"\u041a\u0430\u0440\u0442\u0430\u0434\u0430\u0493\u044b \u049b\u0430\u0442\u0435\u043b\u0456\u043a\u0442\u0435\u0440\u0434\u0456 \u0430\u043d\u044b\u049b\u0442\u0430\u0443 \u04af\u0448\u0456\u043d \u049b\u0430\u0431\u0430\u0442\u0442\u0430\u0441\u0443\u043b\u0430\u0440\u0434\u044b \u049b\u043e\u0441\u044b\u04a3\u044b\u0437",title:"\u049a\u0430\u0431\u0430\u0442\u0442\u0430\u0440"},make_a_donation:"\u049a\u0430\u0439\u044b\u0440\u044b\u043c\u0434\u044b\u043b\u044b\u049b \u0436\u0430\u0441\u0430\u0443",map:{marker:{title:"Map marker"},title:"\u041a\u0430\u0440\u0442\u0430"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u0416\u0430\u049b\u044b\u043d\u0434\u0430\u0442\u0443",zoom_out:"\u0410\u043b\u044b\u0441\u0442\u0430\u0442\u0443"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap-\u049b\u0430 \u04af\u043b\u0435\u0441 \u049b\u043e\u0441\u0443\u0448\u044b\u043b\u0430\u0440",osm_france:"OpenStreetMap \u0424\u0440\u0430\u043d\u0446\u0438\u044f",popup:{close:"\u0416\u0430\u0431\u0443"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"\u0421\u0430\u0439\u0442 \u043f\u0435\u043d API \u0448\u0430\u0440\u0442\u0442\u0430\u0440\u044b"}}},km:{javascripts:{embed:{report_problem:"\u179a\u17b6\u1799\u1780\u17b6\u179a\u178e\u17cd\u200b\u1794\u1789\u17d2\u17a0\u17b6"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u1795\u17c2\u1793\u1791\u17b8\u1795\u17d2\u179b\u17bc\u179c\u1791\u17c4\u1785\u1780\u17d2\u179a\u1799\u17b6\u1793",cyclosm:"CyclOSM",hot:"\u179f\u1780\u1798\u17d2\u1798\u1797\u17b6\u1796\u1798\u1793\u17bb\u179f\u17d2\u179f\u1792\u1798\u17cc",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u179f\u17d2\u178f\u1784\u17cb\u178a\u17b6\u179a",tracestracktop_topo:"Tracestrack Topo",transport_map:"\u1795\u17c2\u1793\u1791\u17b8\u1785\u179a\u17b6\u1785\u179a\u178e\u17cd"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"\u1794\u1784\u17d2\u17a0\u17b6\u1789\u1791\u17b8\u178f\u17b6\u17c6\u1784\u1781\u17d2\u1789\u17bb\u17c6",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"\u179f\u17d2\u179a\u1791\u17b6\u1794\u17cb\u1795\u17c2\u1793\u1791\u17b8",notes:"Map Notes",overlays:"Enable overlays for troubleshooting the map",title:"\u179f\u17d2\u179a\u1791\u17b6\u1794\u17cb"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u1796\u1784\u17d2\u179a\u17b8\u1780\u1785\u17bc\u179b",zoom_out:"\u1794\u1784\u17d2\u179a\u17bd\u1798\u1785\u17c1\u1789"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},ko:{javascripts:{embed:{report_problem:"\ubb38\uc81c\uc810 \ubcf4\uace0"},map:{andy_allan:"\uc564\ub514 \uc568\ub7f0",attribution_control:{toggle_attribution:"\uc800\uc791\uc790\ud45c\uc2dc \uc804\ud658"},base:{cycle_map:"\uc0ac\uc774\ud074 \uc9c0\ub3c4",cyclosm:"CyclOSM",hot:"\uc778\ub3c4\uc8fc\uc758",openmaptiles_osm:"\ub9f5\ud0c0\uc77c\ub7ec OMT",shortbread:"\uc1fc\ud2b8\ube0c\ub808\ub4dc",standard:"\ud45c\uc900",tracestracktop_topo:"\ud2b8\ub808\uc774\uc2a4\ud2b8\ub799 \ud1a0\ud3ec",transport_map:"\uad50\ud1b5 \uc9c0\ub3c4"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"%{osm_france_link}\uc5d0\uc11c \ud638\uc2a4\ud305\ud558\ub294 %{cyclosm_link}\uc758 \ud0c0\uc77c \uc2a4\ud0c0\uc77c",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{other:"\uc774 \uc9c0\uc810\uae4c\uc9c0 %{count}\ubbf8\ud130 \uc774\ub0b4"},find_my_location:"\ub0b4 \uc704\uce58 \ubcf4\uae30",location_not_available:"\uc704\uce58 \uc815\ubcf4\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4",metersPopup:{other:"\uc774 \uc9c0\uc810\uae4c\uc9c0 %{count}\ubbf8\ud130 \uc774\ub0b4"}},hotosm_credit:"%{osm_france_link}\uc5d0\uc11c \ud638\uc2a4\ud305\ud558\ub294 %{hotosm_link}\uc758 \ud0c0\uc77c \uc2a4\ud0c0\uc77c",hotosm_name:"\uc778\ub3c4\uc8fc\uc758 \uc624\ud508\uc2a4\ud2b8\ub9ac\ud2b8\ub9f5 \ud300",layers:{data:"\uc9c0\ub3c4 \ub370\uc774\ud130",gps:"\uacf5\uac1c GPS \uada4\uc801",header:"\uc9c0\ub3c4 \ub808\uc774\uc5b4",notes:"\uc9c0\ub3c4 \ucc38\uace0",overlays:"\uc9c0\ub3c4 \ubb38\uc81c\ub97c \ud574\uacb0\ud558\uae30 \uc704\ud574 \uc624\ubc84\ub808\uc774\ub97c \ud65c\uc131\ud654",title:"\ub808\uc774\uc5b4"},make_a_donation:"\uae30\ubd80\ud558\uae30",map:{marker:{title:"\uc9c0\ub3c4 \ub9c8\ucee4"},title:"\uc9c0\ub3c4"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\ud655\ub300",zoom_out:"\ucd95\uc18c"},openmaptiles_credit:"%{maptiler_link}\uc5d0\uc11c \ud638\uc2a4\ud305\ud558\ub294 %{openmaptiles_link}\uc758 \ubca1\ud130 \ud0c0\uc77c",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"\uc624\ud508\uc2a4\ud2b8\ub9ac\ud2b8\ub9f5 \uae30\uc5ec\uc790",osm_france:"\uc624\ud508\uc2a4\ud2b8\ub9ac\ud2b8\ub9f5 \ud504\ub791\uc2a4",popup:{close:"\ub2eb\uae30"},thunderforest_credit:"%{thunderforest_link} \uc81c\uacf5 \ud0c0\uc77c",tracestrack:"Tracestrack",tracestrack_credit:"%{tracestrack_link} \uc81c\uacf5 \ud0c0\uc77c",website_and_api_terms:"\ud648\ud398\uc774\uc9c0 \ubc0f API \uc57d\uad00"}}},ksh:{javascripts:{embed:{report_problem:"Donn e Problehm m\xe4lde"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Cycle Map",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport Map"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Show My Location",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"Map Layers",notes:"Map Notes",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom In",zoom_out:"Zoom Out"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},"ku-Latn":{javascripts:{embed:{report_problem:"Pirsgir\xeakek rapor bike"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Nex\u015feya bisikl\xeat\xea",cyclosm:"CyclOSM",hot:"Mirovat\xee",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Nex\u015feya transport\xea"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Tu %{count} gav di nava v\xea nuqtey\xea de y\xee",other:"Tu di nava %{count} gav\xean v\xea nuqtey\xea de y\xee"},find_my_location:"Cih\xea min n\xee\u015fan bide",location_not_available:"Location not available",metersPopup:{one:"Tu di nava %{count} metreya v\xea nuqtey\xea de y\xee",other:"Tu di nava %{count} metrey\xean v\xea nuqtey\xea de y\xee"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Daney\xean nex\u015fey\xea",gps:"\u015eop\xean GPS\xea y\xean gi\u015ft\xee",header:"Tebeqey\xean nex\u015fey\xea",notes:"Not\xean nex\u015fey\xea",overlays:"Ji bo ku pirsgir\xeakan \xe7areser bik\xee tebeqeyan bide akt\xeevkirin",title:"Tebeqey\xean nex\u015fey\xea"},make_a_donation:"Bex\u015f bike",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"N\xeaz\xeek bike",zoom_out:"D\xfbr bike"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Be\u015fdar\xean OpenStreetMap\xea",osm_france:"OpenStreetMap Fransa",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Malper \xfb \u015fert\xean APIy\xea"}}},lb:{javascripts:{embed:{report_problem:"E Problem mellen"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"V\xebloskaart",cyclosm:"CyclOSM",hot:"Humanit\xe4r",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Verk\xe9ierskaart"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Dir sidd manner w\xe9i %{count} Fouss vun d\xebsem Punkt ewech",other:"Dir sidd manner w\xe9i %{count} F\xe9iss vun d\xebsem Punkt ewech"},find_my_location:"Weise wou ech sinn",location_not_available:"Location not available",metersPopup:{one:"Dir sidd manner w\xe9i %{count} Meter vun d\xebsem Punkt ewech",other:"Dir sidd manner w\xe9i %{count} Meter vun d\xebsem Punkt ewech"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Kaartendonn\xe9e\xebn",gps:"\xcbffentlech GPS Spueren",header:"Kaartenniveauen",notes:"Kaartennotizen",overlays:"Overlay\xeb fir d\u2019Feelersich aktiv\xe9ieren",title:"Niveauen"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Vergr\xe9isseren",zoom_out:"Verklengeren"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Zoumaachen"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},lkt:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Nagm\xedya\u019epi Mak\u021f\xf3wapi",cyclosm:"CyclOSM",hot:"W\xf3wau\u014b\u0161ila W\xf3e\u010dhu\u014b",openmaptiles_osm:"MapTiler OMT",shortbread:"A\u01e7\xfayapi-pt\xe9\u010dela",standard:"Ik\u010d\xe9",tracestracktop_topo:"Tracestrack Topo",transport_map:"T\u021fok\u0161\xfapi Mak\u021f\xf3wapi"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Show My Location",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Mak\u021f\xf3wapi-Ih\xf3\u0161i",gps:"Public GPS Traces",header:"Map Layers",notes:"Mak\u021f\xf3wapi W\xf3wapi-\u010d\xedstila",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"M\xe1zaska Ki\u010d\u2019\xfa\u014b wo/we",map:{marker:{title:"Map marker"},title:"Mak\u021f\xf3wapi"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Yut\u021f\xe1\u014bka",zoom_out:"Yu\u010d\xeds\u010dila"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap Wa\u0161\xed\u010du Ik\u010d\xe9ka-Mak\u021f\xf3\u010dhe",popup:{close:"E\u010dh\xe9l iy\xe9ya"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},lt:{javascripts:{embed:{report_problem:"Prane\u0161ti apie problem\u0105"},map:{andy_allan:"Endis Alanas",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Dvira\u010di\u0173 \u017eem\u0117lapis",cyclosm:"CyclOSM",hot:"Humanitarinis",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standartinis",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transporto \u017eem\u0117lapis"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{few:"J\u016bs esate %{count} p\u0117d\u0173 atstumu nuo \u0161io ta\u0161ko",many:"J\u016bs esate %{count} p\u0117dos atstumu nuo \u0161io ta\u0161ko",one:"J\u016bs esate %{count} p\u0117dos atstumu nuo \u0161io ta\u0161ko",other:"J\u016bs esate %{count} p\u0117d\u0173 atstumu nuo \u0161io ta\u0161ko"},find_my_location:"Rodyti mano viet\u0105",location_not_available:"Location not available",metersPopup:{few:"J\u016bs esate %{count} metr\u0173 atstumu nuo \u0161io ta\u0161ko",many:"J\u016bs esate %{count} metro atstumu nuo \u0161io ta\u0161ko",one:"J\u016bs esate %{count} metro atstumu nuo \u0161io ta\u0161ko",other:"J\u016bs esate %{count} metr\u0173 atstumu nuo \u0161io ta\u0161ko"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u017dem\u0117lapio duomenys",gps:"Vie\u0161i GPS p\u0117dsakai",header:"\u017dem\u0117lapio sluoksniai",notes:"\u017dem\u0117lapio pastabos",overlays:"\u012ejungti papildomus sluoksnius problem\u0173 prane\u0161imui",title:"Sluoksniai"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Priartinti",zoom_out:"Nutolinti"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap Pranc\u016bzija",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},lv:{javascripts:{embed:{report_problem:"Zi\u0146ot par probl\u0113mu"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Velokarte",cyclosm:"CyclOSM",hot:"Humanit\u0101r\u0101s",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standarta",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transporta karte"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"R\u0101d\u012bt manu atra\u0161an\u0101s vietu",location_not_available:"Atra\u0161an\u0101s vieta nav pieejama",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Kartes dati",gps:"Publisk\u0101s GPS trases",header:"Kartes sl\u0101\u0146i",notes:"Kartes piez\u012bmes",overlays:"Iesp\u0113jot p\u0101rkl\u0101jumus, lai nov\u0113rstu tr\u016bkumus kartei",title:"Sl\u0101\u0146i"},make_a_donation:"Veikt ziedojumu",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Palielin\u0101t",zoom_out:"Samazin\u0101t"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap l\u012bdzstr\u0101dnieki",osm_france:"OpenStreetMap France",popup:{close:"Aizv\u0113rt"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"T\u012bmek\u013ca vietnes un API noteikumi"}}},mk:{javascripts:{embed:{report_problem:"\u041f\u0440\u0438\u0458\u0430\u0432\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c"},map:{andy_allan:"\u0415\u043d\u0434\u0438 \u0410\u043b\u0430\u043d",attribution_control:{toggle_attribution:"\u0412\u043a\u043b./\u0418\u0441\u043a\u043b. \u043f\u0440\u0438\u043f\u0438\u0441"},base:{cycle_map:"\u0412\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0441\u043a\u0430",cyclosm:"CyclOSM",hot:"\u0425\u0443\u043c\u0430\u043d\u0438\u0442\u0430\u0440\u043d\u0430",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0434\u043d\u0430",tracestracktop_topo:"Tracestrack \u0422\u043e\u043f\u043e",transport_map:"\u0421\u043e\u043e\u0431\u0440\u0430\u045c\u0430\u0458\u043d\u0430"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"\u0421\u0442\u0438\u043b\u043e\u0442 \u043d\u0430 \u043f\u043e\u043b\u0438\u045a\u0430\u0442\u0430 \u0435 \u043e\u0434 %{cyclosm_link} \u0432\u0434\u043e\u043c\u0435\u043d\u043e \u043d\u0430 %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"\u0421\u0435 \u043d\u0430\u043e\u0453\u0430\u0442\u0435 \u043d\u0430 %{count} \u0441\u0442\u0430\u043f\u043a\u0430 \u043e\u0434 \u043e\u0432\u0430\u0430 \u0442\u043e\u0447\u043a\u0430",other:"\u0421\u0435 \u043d\u0430\u043e\u0453\u0430\u0442\u0435 \u043d\u0430 %{count} \u0441\u0442\u0430\u043f\u043a\u0438 \u043e\u0434 \u043e\u0432\u0430\u0430 \u0442\u043e\u0447\u043a\u0430"},find_my_location:"\u041f\u0440\u0438\u043a. \u043c\u043e\u0458\u0430 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0431\u0430",location_not_available:"\u041c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0431\u0430\u0442\u0430 \u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u043f\u043d\u0430",metersPopup:{one:"\u0421\u0435 \u043d\u0430\u043e\u0453\u0430\u0442\u0435 \u043d\u0430 %{count} \u043c\u0435\u0442\u0430\u0440 \u043e\u0434 \u043e\u0432\u0430\u0430 \u0442\u043e\u0447\u043a\u0430",other:"\u0421\u0435 \u043d\u0430\u043e\u0453\u0430\u0442\u0435 \u043d\u0430 %{count} \u043c\u0435\u0442\u0440\u0438 \u043e\u0434 \u043e\u0432\u0430\u0430 \u0442\u043e\u0447\u043a\u0430"}},hotosm_credit:"\u0421\u0442\u0438\u043b\u043e\u0442 \u043d\u0430 \u043f\u043e\u043b\u0438\u045a\u0430\u0442\u0430 \u0435 \u043e\u0434 %{hotosm_link} \u0432\u0434\u043e\u043c\u0435\u043d \u043e\u0434 %{osm_france_link}",hotosm_name:"\u0415\u043a\u0438\u043f\u0430 \u043d\u0430 \u0425\u0443\u043c\u0430\u043d\u0438\u0442\u0430\u0440\u043d\u0430\u0442\u0430 OpenStreetMap",layers:{data:"\u041f\u043e\u0434\u0430\u0442\u043e\u0446\u0438 \u0437\u0430 \u043a\u0430\u0440\u0442\u0430\u0442\u0430",gps:"\u0408\u0430\u0432\u043d\u0438 \u0413\u041f\u0421-\u0442\u0440\u0430\u0433\u0438",header:"\u0421\u043b\u043e\u0435\u0432\u0438 \u043d\u0430 \u043a\u0430\u0440\u0442\u0430\u0442\u0430",notes:"\u0411\u0435\u043b\u0435\u0448\u043a\u0438 \u043d\u0430 \u043a\u0430\u0440\u0442\u0430\u0442\u0430",overlays:"\u041e\u0432\u043e\u0437\u043c\u043e\u0436\u0438 \u043e\u0431\u043b\u043e\u0433\u0438 \u0437\u0430 \u0443\u0442\u0432\u0440\u0434\u0443\u0432\u0430\u045a\u0435 \u0433\u0440\u0435\u0448\u043a\u0438",title:"\u0421\u043b\u043e\u0435\u0432\u0438"},make_a_donation:"\u0414\u0430\u0440\u0443\u0432\u0430\u0458\u0442\u0435",map:{marker:{title:"\u041e\u0431\u0435\u043b\u0435\u0436\u0443\u0432\u0430\u0447 \u043d\u0430 \u043a\u0430\u0440\u0442\u0430"},title:"\u041a\u0430\u0440\u0442\u0430"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0438",zoom_out:"\u041e\u0434\u0434\u0430\u043b\u0435\u0447\u0438"},openmaptiles_credit:"\u0412\u0435\u043a\u0442\u043e\u0440\u0441\u043a\u0438 \u043f\u043e\u043b\u0438\u045a\u0430 \u043e\u0434 %{openmaptiles_link} \u0432\u0434\u043e\u043c\u0435\u043d\u0438 \u043e\u0434 %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"\u0423\u0447\u0435\u0441\u043d\u0438\u0446\u0438 \u043d\u0430 OpenStreetMap",osm_france:"OpenStreetMap \u0424\u0440\u0430\u043d\u0446\u0438\u0458\u0430",popup:{close:"\u0417\u0430\u0442\u0432\u043e\u0440\u0438"},thunderforest_credit:"\u041f\u043e\u043b\u0438\u045a\u0430\u0442\u0430 \u0441\u0435 \u0434\u043e\u0441\u0442\u0430\u0432\u0435\u043d\u0438 \u043e\u0434 %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"\u041f\u043e\u043b\u0438\u045a\u0430\u0442\u0430 \u0441\u0435 \u0434\u043e\u0441\u0442\u0430\u0432\u0435\u043d\u0438 \u043e\u0434 %{tracestrack_link}",website_and_api_terms:"\u041c\u0440\u0435\u0436\u043d\u043e \u043c\u0435\u0441\u0442\u043e \u0438 \u0443\u0441\u043b\u043e\u0432\u0438 \u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u043d\u0438\u043a\u043e\u0442"}}},mr:{javascripts:{embed:{report_problem:"\u0938\u092e\u0938\u094d\u092f\u093e \u0915\u0933\u0935\u093e"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u0938\u093e\u092f\u0915\u0932 \u0928\u0915\u093e\u0936\u093e",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"\u092a\u0930\u093f\u0935\u0939\u0928 \u0928\u0915\u093e\u0936\u093e"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"\u092e\u093e\u091d\u0947 \u0920\u093f\u0915\u093e\u0923 \u0926\u093e\u0916\u0935\u093e",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u0928\u0915\u093e\u0936\u093e\u0935\u0930\u0940\u0932 \u092e\u093e\u0939\u093f\u0924\u0940",gps:"\u0938\u093e\u0930\u094d\u0935\u091c\u0928\u093f\u0915 GPS \u0905\u0928\u0941\u0930\u0947\u0916",header:"\u0928\u0915\u093e\u0936\u093e\u091a\u0947 \u0938\u094d\u0924\u0930",notes:"\u0928\u0915\u093e\u0936\u093e\u0935\u0930\u0940\u0932 \u091f\u0940\u092a\u093e",overlays:"\u0928\u0915\u093e\u0936\u093e\u091a\u094d\u092f\u093e \u0938\u092e\u0938\u094d\u092f\u093e\u0928\u093f\u0935\u093e\u0930\u0923\u093e\u0938\u093e\u0920\u0940 \u0906\u091a\u094d\u091b\u093e\u0926\u0928 \u0938\u0915\u094d\u0937\u092e \u0915\u0930\u093e",title:"\u0938\u094d\u0924\u0930"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom In",zoom_out:"Zoom Out"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},ms:{javascripts:{embed:{report_problem:"Laporkan masalah"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Peta Basikal",cyclosm:"CyclOSM",hot:"Kemanusiaan",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Piawai",tracestracktop_topo:"Tracestrack Topo",transport_map:"Peta Pengangkutan"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Paparkan Lokasi Saya",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Data Peta",gps:"Public GPS Traces",header:"Lapisan Peta",notes:"Nota Peta",overlays:"Dayakan tindihan untuk mencari masalah dalam peta",title:"Lapisan"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zum Dekat",zoom_out:"Zum Jauh"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Penyumbang OpenStreetMap",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},nb:{javascripts:{embed:{report_problem:"Rapporter et problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Sykkelkart",cyclosm:"CyclOSM",hot:"Humanit\xe6rt",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport-kart"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Du er innenfor \xe9n fot fra dette punktet",other:"Du er innenfor %{count} fot fra dette punktet"},find_my_location:"Vis posisjonen min",location_not_available:"Location not available",metersPopup:{one:"Du er innenfor \xe9n meter fra dette punktet",other:"Du er innenfor %{count} meter fra dette punktet"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Kartdata",gps:"Offentlige GPS-sporinger",header:"Kartlag",notes:"Kartmerknader",overlays:"Aktiver overlag for \xe5 feils\xf8ke kartet",title:"Lag"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Forst\xf8rr utvalg",zoom_out:"Forminsk utvalg"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},nds:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Radkoort",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport Map"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Show My Location",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"Map Layers",notes:"Map Notes",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom In",zoom_out:"Zoom Out"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},ne:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Cycle Map",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u092e\u093e\u0928\u0915",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport Map"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Show My Location", location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"\u0938\u093e\u0930\u094d\u0935\u091c\u0928\u093f\u0915 GPS \u091f\u094d\u0930\u0947\u0938\u0939\u0930\u0942",header:"\u0928\u0915\u094d\u0938\u093e \u0924\u0939\u0939\u0930\u0942",notes:"\u0928\u0915\u094d\u0938\u093e \u091f\u093f\u092a\u094d\u092a\u0923\u0940\u0939\u0930\u0942",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"\u0926\u093e\u0928 \u0917\u0930\u094d\u0928\u0941\u0939\u094b\u0938\u094d",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u0920\u0941\u0932\u094b \u092a\u093e\u0930\u094d\u0928\u0941\u0939\u094b\u0938",zoom_out:"\u0938\u093e\u0928\u094b \u092a\u093e\u0930\u094d\u0928\u0941\u0939\u094b\u0938"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"\u091f\u094d\u0930\u0947\u0938\u091f\u094d\u0930\u094d\u092f\u093e\u0915",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},nl:{javascripts:{embed:{report_problem:"Een probleem melden"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Attributie weergeven of verbergen"},base:{cycle_map:"Fietskaart",cyclosm:"CyclOSM",hot:"Humanitair",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standaard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transportkaart"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Kaartstijl door %{cyclosm_link} gehost door %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"U bevindt zich binnen %{count} voet van dit punt",other:"U bevindt zich binnen %{count} voet van dit punt"},find_my_location:"Uw locatie weergeven",location_not_available:"Locatie niet beschikbaar",metersPopup:{one:"U bevindt zich binnen %{count} meter van dit punt",other:"U bevindt zich binnen %{count} meter van dit punt"}},hotosm_credit:"Kaartstijl door %{hotosm_link} gehost door %{osm_france_link}",hotosm_name:"Humanitair OpenStreetMap-team",layers:{data:"Kaartgegevens",gps:"Openbare gps-trajecten",header:"Kaartlagen",notes:"Kaartopmerkingen",overlays:"Overlays inschakelen om fouten in de kaart te helpen identificeren",title:"Lagen"},make_a_donation:"Doe een gift",map:{marker:{title:"Kaartmarkering"},title:"Kaart"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Inzoomen",zoom_out:"Uitzoomen"},openmaptiles_credit:"Vectortegels van %{openmaptiles_link} gehost door %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap-bijdragers",osm_france:"OpenStreetMap Frankrijk",popup:{close:"Sluiten"},thunderforest_credit:"Tegels met dank aan %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tegels met dank aan %{tracestrack_link}",website_and_api_terms:"Website- en API-voorwaarden"}}},nn:{javascripts:{embed:{report_problem:"Rapporter eit problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Sykkelkart",cyclosm:"CyclOSM",hot:"Humanit\xe6rt",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport-kart"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Vis plassering",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Kartdata",gps:"Offentlege GPS-sporingar",header:"Kartlag",notes:"Kartmerknadar",overlays:"Aktiver lag for \xe5 feils\xf8ke i kartet",title:"Lag"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Vis st\xf8rre",zoom_out:"Vis mindre"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Lat att"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},nqo:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Cycle Map",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u07db\u07ce\u07e1\u07ca\u07f2\u07d8\u07ca\u07f2\u07d5\u07ca",tracestracktop_topo:"Tracestrack Topo",transport_map:"\u07e1\u07ca\u07ec\u07d8\u07cf\u07ec\u07e3\u07cc\u07f2\u07ec\u07e0\u07cc\u07f2 \u07d4\u07ca\u07ec\u07d4\u07d8\u07ca"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"\u07d2 \u07d8\u07cc\u07f2\u07ec\u07de\u07cc\u07d9\u07ca \u07e6\u07cc\u07ec\u07d8\u07ca\u07ec",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u07d4\u07ca\u07ec\u07d4\u07d8\u07ca \u07df\u07d0\u07f2\u07d5\u07ca",gps:"\u07dc\u07cd\u07d8\u07d0\u07eb GPS \u07dc\u07cb\u07ec\u07d9\u07cb \u07df\u07ce\u07ec",header:"Map Layers",notes:"\u07e1\u07ca\u07d4 \u07e6\u07df\u07cc\u07e3\u07d0 \u07df\u07ce\u07ec",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u07de\u07f5\u07ca\u07ec \u07e1\u07ca\u07db\u07ca\u07ec\u07e1\u07ca\u07f2\u07eb",zoom_out:"\u07ca\u07ec \u07e1\u07ca\u07d3\u07d0\u07eb"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},oc:{javascripts:{embed:{report_problem:"Senhalar un probl\xe8ma"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Mapa ciclista",cyclosm:"CyclOSM",hot:"Umanitari",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Estandard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Mapa de transp\xf2rt"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Siatz a mens d'un p\xe8 dau ponch",other:"Siatz a mens de %{count} de p\xe8s dau ponch"},find_my_location:"Mostrar mon empla\xe7ament",location_not_available:"Location not available",metersPopup:{one:"Siatz a mens d'un m\xe8tre dau ponch",other:"Siatz a mens de %{count} de m\xe8tres dau ponch"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Donadas de mapa",gps:"Tra\xe7as GPS publicas",header:"Ja\xe7as de mapa",notes:"N\xf2tas de la mapa",overlays:"Autorizar las superposicions per reparar la mapa",title:"Ja\xe7as"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom avant",zoom_out:"Zoom arri\xe8r"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},pa:{javascripts:{embed:{report_problem:"\u0a38\u0a2e\u0a71\u0a38\u0a3f\u0a06 \u0a26\u0a40 \u0a07\u0a24\u0a32\u0a3e\u0a39 \u0a26\u0a3f\u0a13"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u0a38\u0a3e\u0a08\u0a15\u0a32 \u0a28\u0a15\u0a38\u0a3c\u0a3e",cyclosm:"CyclOSM",hot:"\u0a32\u0a4b\u0a15 \u0a38\u0a47\u0a35\u0a40",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u0a2e\u0a3f\u0a06\u0a30\u0a40",tracestracktop_topo:"Tracestrack Topo",transport_map:"\u0a22\u0a4b\u0a06-\u0a22\u0a41\u0a06\u0a08 \u0a28\u0a15\u0a38\u0a3c\u0a3e"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"\u0a2e\u0a47\u0a30\u0a3e \u0a1f\u0a3f\u0a15\u0a3e\u0a23\u0a3e \u0a35\u0a3f\u0a16\u0a3e\u0a13",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u0a28\u0a15\u0a38\u0a3c\u0a47 \u0a26\u0a40 \u0a38\u0a2e\u0a71\u0a17\u0a30\u0a40",gps:"\u0a1c\u0a28\u0a24\u0a15 GPS \u0a16\u0a41\u0a30\u0a3e-\u0a16\u0a4b\u0a1c",header:"\u0a28\u0a15\u0a38\u0a3c\u0a47 \u0a26\u0a40\u0a06\u0a02 \u0a24\u0a39\u0a3f\u0a06\u0a02",notes:"\u0a28\u0a15\u0a38\u0a3c\u0a47 \u0a26\u0a47 \u0a28\u0a4b\u0a1f",overlays:"Enable overlays for troubleshooting the map",title:"\u0a24\u0a39\u0a3f\u0a06\u0a02"},make_a_donation:"\u0a26\u0a3e\u0a28 \u0a26\u0a3f\u0a09",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u0a05\u0a70\u0a26\u0a30 \u0a28\u0a42\u0a70 \u0a1c\u0a3e\u0a09",zoom_out:"\u0a2c\u0a3e\u0a39\u0a30 \u0a28\u0a42\u0a70 \u0a06\u0a09"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"\u0a16\u0a41\u0a71\u0a32\u0a4d\u0a39\u0a3e-\u0a17\u0a32\u0a40-\u0a28\u0a15\u0a38\u0a3c\u0a47 (\u0a13\u0a2a\u0a28\u0a38\u0a1f\u0a4d\u0a30\u0a40\u0a1f\u0a2e\u0a48\u0a2a) \u0a24\u0a47 \u0a2f\u0a4b\u0a17\u0a26\u0a3e\u0a28 \u0a2a\u0a3e\u0a09\u0a23 \u0a35\u0a3e\u0a32\u0a47",osm_france:"OpenStreetMap France",popup:{close:"\u0a2c\u0a70\u0a26 \u0a15\u0a30\u0a4b"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"\u0a35\u0a48\u0a71\u0a2c\u0a38\u0a3e\u0a08\u0a1f \u0a05\u0a24\u0a47 API \u0a38\u0a3c\u0a30\u0a24\u0a3e\u0a02"}}},pl:{javascripts:{embed:{report_problem:"Zg\u0142o\u015b b\u0142\u0105d"},map:{andy_allan:"Andy'ego Allana",attribution_control:{toggle_attribution:"Prze\u0142\u0105cz Atrybucj\u0119"},base:{cycle_map:"Rowerowa",cyclosm:"CyclOSM",hot:"Humanitarna",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Podstawowa",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transportu publicznego"},copyright_text:"\xa9%{copyright_link}",cyclosm_credit:"Styl kafelk\xf3w %{cyclosm_link}. Hosting: %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{few:"Jeste\u015b w promieniu %{count} st\xf3p od tego punktu",many:"Jeste\u015b w promieniu %{count} st\xf3p od tego punktu",one:"Jeste\u015b w promieniu 1 stopy od tego punktu",other:"Jeste\u015b w promieniu %{count} stopy od tego punktu"},find_my_location:"Wy\u015bwietl moje aktualne po\u0142o\u017cenie",location_not_available:"Lokalizacja niedost\u0119pna",metersPopup:{few:"Jeste\u015b w promieniu %{count} metr\xf3w od tego punktu",many:"Jeste\u015b w promieniu %{count} metr\xf3w od tego punktu",one:"Jeste\u015b w promieniu 1 metra od tego punktu",other:"Jeste\u015b w promieniu %{count} metra od tego punktu"}},hotosm_credit:"Styl kafelk\xf3w: %{hotosm_link}. Hosting: %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Dane mapy",gps:"Publiczne \u015blady GPS",header:"Warstwy",notes:"Uwagi",overlays:"Nak\u0142adki do rozwi\u0105zywania problem\xf3w na mapie",title:"Warstwy"},make_a_donation:"Przeka\u017c darowizn\u0119",map:{marker:{title:"Znacznik mapy"},title:"Mapa"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Przybli\u017c",zoom_out:"Oddal"},openmaptiles_credit:"Wektorowe kafelki z %{openmaptiles_link}. Hosting: %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"autorzy OpenStreetMap",osm_france:"OpenStreetMap France",popup:{close:"Zamknij"},thunderforest_credit:"Kafelki dzi\u0119ki uprzejmo\u015bci %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Kafelki dzi\u0119ki uprzejmo\u015bci %{tracestrack_link}",website_and_api_terms:"Warunki u\u017cytkowania"}}},pnb:{javascripts:{embed:{report_problem:"\u06a9\u0648\u0626\u06cc \u0645\u0633\u0626\u0644\u06c1 \u0631\u067e\u0648\u0631\u0679 \u06a9\u0631\u06cc\u0648"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u0633\u0627\u0626\u06cc\u06a9\u0644 \u0646\u0642\u0634\u06c1",cyclosm:"\u0633\u0627\u0626\u06cc\u06a9\u0644",hot:"\u0644\u0648\u06a9 \u0633\u06cc\u0648\u06cc",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u0645\u0639\u06cc\u0627\u0631\u06cc",tracestracktop_topo:"Tracestrack Topo",transport_map:"\u0679\u0631\u06cc\u0646\u0633\u067e\u0648\u0631\u0679"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"\u0645\u06cc\u0631\u06cc \u0633\u062a\u06be\u062a\u06cc \u0648\u06cc\u06a9\u06be\u0627\u0624",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u0646\u0642\u0634\u06d2 \u062f\u06d2 \u0688\u06cc\u0679\u0627",gps:"\u0639\u0627\u0645 \u06a9\u06be\u0631\u06d2 \u06a9\u06be\u0648\u062c\u0627\u06ba",header:"\u0646\u0642\u0634\u06d2 \u062f\u06cc\u0627\u06ba \u062a\u06c1\u06cc\u0627\u06ba",notes:"\u0646\u0642\u0634\u06d2 \u062f\u06d2 \u0646\u0648\u0679",overlays:"\u0627\u06cc\u06c1\u06c1 \u0646\u0642\u0634\u06d2 \u062a\u06d2 \u0645\u0633\u0626\u0644\u06cc\u0627\u06ba \u0646\u0628\u06cc\u0691\u06cc\u0627\u06ba \u0644\u0626\u06cc \u06a9\u062c\u0651 \u0686\u0627\u0644\u0648 \u06a9\u0631\u0648",title:"\u062a\u06c1\u0650\u0627\u06ba"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u0648\u0688\u0627 \u06a9\u0631\u0648",zoom_out:"\u0686\u06be\u0648\u0679\u06cc \u06a9\u0631\u0648"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},pt:{javascripts:{embed:{report_problem:"Reportar um problema"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Alternar atribui\xe7\xe3o"},base:{cycle_map:"Cicl\xedstico",cyclosm:"CyclOSM",hot:"Humanit\xe1rio",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Padr\xe3o",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transporte P\xfablico"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Estilo de mosaico por %{cyclosm_link} hospedado por %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Voc\xea est\xe1 dentro de %{count} p\xe9 deste ponto",other:"Voc\xea est\xe1 dentro %{count} p\xe9s deste ponto"},find_my_location:"Exibir minha localiza\xe7\xe3o",location_not_available:"Localiza\xe7\xe3o indispon\xedvel",metersPopup:{one:"Voc\xea est\xe1 dentro de %{count} metro deste ponto",other:"Voc\xea est\xe1 dentro %{count} metros deste ponto"}},hotosm_credit:"Estilo de mosaico por %{hotosm_link} hospedado por %{osm_france_link}",hotosm_name:"Equipa Humanit\xe1ria do OpenStreetMap",layers:{data:"Dados do mapa",gps:"Trilhas de GPS p\xfablicas",header:"Camadas do mapa",notes:"Notas de mapa",overlays:"Ativar sobreposi\xe7\xf5es para solucionar problemas do mapa",title:"Camadas"},make_a_donation:"Fa\xe7a uma doa\xe7\xe3o",map:{marker:{title:"Marcador no mapa"},title:"Mapa"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Aproximar",zoom_out:"Afastar"},openmaptiles_credit:"Mosaicos vetoriais de %{openmaptiles_link} hospedados por %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Contribuidores do OpenStreetMap",osm_france:"OpenStreetMap Fran\xe7a",popup:{close:"Fechar"},thunderforest_credit:"Mosaico cortesia de %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Mosaico cortesia de %{tracestrack_link}",website_and_api_terms:"Termos do site e API"}}},"pt-PT":{javascripts:{embed:{report_problem:"Reportar um problema"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Ativar/desativar Atribui\xe7\xe3o"},base:{cycle_map:"Mapa de Ciclismo",cyclosm:"CyclOSM",hot:"Humanit\xe1rio",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Mapa Padr\xe3o",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transportes P\xfablicos"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Estilo de mosaicos por %{cyclosm_link} hospedado por %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Est\xe1s a menos de %{count} p\xe9 deste ponto",other:"Est\xe1s a menos de %{count} p\xe9s deste ponto"},find_my_location:"Mostrar a minha localiza\xe7\xe3o",location_not_available:"Localiza\xe7\xe3o indispon\xedvel",metersPopup:{one:"Est\xe1s a menos de %{count} metro deste ponto",other:"Est\xe1s a menos de %{count} metros deste ponto"}},hotosm_credit:"Estilo de mosaicos por %{hotosm_link} hospedado por %{osm_france_link}",hotosm_name:"Equipa Humanit\xe1ria do OpenStreetMap",layers:{data:"Dados do mapa",gps:"Rotas de GPS p\xfablicas",header:"Camadas do mapa",notes:"Notas no mapa",overlays:"Ativar camadas para solucionar problemas no mapa",title:"Camadas"},make_a_donation:"Fa\xe7a um donativo",map:{marker:{title:"Marcador no mapa"},title:"Mapa"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Aproximar",zoom_out:"Afastar"},openmaptiles_credit:"Mosaicos vetoriais de %{openmaptiles_link} alojados por %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Contribuidores do OpenStreetMap",osm_france:"OpenStreetMap Fran\xe7a",popup:{close:"Fechar"},thunderforest_credit:"Mosaicos cortesia de %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Mosaicos cortesia de %{tracestrack_link}",website_and_api_terms:"Termos do website e da API"}}},ro:{javascripts:{embed:{report_problem:"Semnalare problem\u0103"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Hart\u0103 de ciclism",cyclosm:"CyclOSM",hot:"Umanitar\u0103",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Hart\u0103 de transport"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Stil de pl\u0103ci de %{cyclosm_link} g\u0103zduit de %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{few:"Sunte\u021bi la %{count} picioare de acest punct",one:"Sunte\u021bi la un picior de acest punct",other:"Sunte\u021bi la %{count} de picioare de acest punct"},find_my_location:"Arat\u0103 loca\u021bia mea",location_not_available:"Location not available",metersPopup:{few:"Sunte\u021bi la %{count} metri de acest punct",one:"Sunte\u021bi la un metru de acest punct",other:"Sunte\u021bi la %{count} de metri de acest punct"}},hotosm_credit:"Stilul tile-urilor creat de %{hotosm_link} g\u0103zduit de %{osm_france_link}",hotosm_name:"Echipa Umanitar\u0103 OpenStreetMap",layers:{data:"Date hart\u0103",gps:"Urmele GPS publice",header:"Straturile h\u0103r\u021bii",notes:"Nota\u021bie hart\u0103",overlays:"Activa\u021bi suprapuneri pentru depanarea h\u0103r\u021bii",title:"Straturi"},make_a_donation:"Face\u021bi o Dona\u021bie",map:{marker:{title:"Marcator de hart\u0103"},title:"Hart\u0103"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"M\u0103re\u0219te",zoom_out:"Mic\u0219oreaz\u0103"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Contribuitorii OpenStreetMap",osm_france:"OpenStreetMap Fran\u021ba",popup:{close:"\xcenchide"},thunderforest_credit:"Pl\u0103ci prin amabilitatea lui %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tile-uri prin amabilitatea lui %{tracestrack_link}",website_and_api_terms:"Termenii site-ului web \u0219i API"}}},ru:{javascripts:{embed:{report_problem:"\u0421\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435"},map:{andy_allan:"\u042d\u043d\u0434\u0438 \u0410\u043b\u043b\u0430\u043d",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u0412\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0430",cyclosm:"CyclOSM",hot:"\u0413\u0443\u043c\u0430\u043d\u0438\u0442\u0430\u0440\u043d\u0430\u044f",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439",tracestracktop_topo:"\u0422\u043e\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f",transport_map:"\u041a\u0430\u0440\u0442\u0430 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0430"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"\u0421\u0442\u0438\u043b\u044c \u0442\u0430\u0439\u043b\u043e\u0432 \u043e\u0442 %{cyclosm_link} \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d \u043d\u0430 %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{few:"\u0412\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u0432 %{count} \u0444\u0443\u0442\u0430\u0445 \u043e\u0442 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0438",many:"\u0412\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u0432 %{count} \u0444\u0443\u0442\u0430\u0445 \u043e\u0442 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0438",one:"\u0412\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u0432 %{count} \u0444\u0443\u0442\u0435 \u043e\u0442 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0438",other:"\u0412\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u0432 %{count} \u0444\u0443\u0442\u0430\u0445 \u043e\u0442 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0438"},find_my_location:"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u043e\u0435 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435",location_not_available:"Location not available",metersPopup:{few:"\u0412\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u0432 %{count} \u043c\u0435\u0442\u0440\u0430\u0445 \u043e\u0442 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 ",many:"\u0412\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u0432 %{count} \u043c\u0435\u0442\u0440\u0430\u0445 \u043e\u0442 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0438",one:"\u0412\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u0432 %{count} \u043c\u0435\u0442\u0440\u0435 \u043e\u0442 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0438",other:"\u0412\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u0432 %{count} \u043c\u0435\u0442\u0440\u0430\u0445 \u043e\u0442 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0438"}},hotosm_credit:"\u0421\u0442\u0438\u043b\u044c \u0442\u0430\u0439\u043b\u043e\u0432 \u043e\u0442 %{hotosm_link} \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d \u043d\u0430 %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u0414\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u0440\u0442\u044b",gps:"\u041e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 GPS-\u0442\u0440\u0435\u043a\u0438",header:"\u0421\u043b\u043e\u0438 \u043a\u0430\u0440\u0442\u044b",notes:"\u0417\u0430\u043c\u0435\u0442\u043a\u0438",overlays:"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u0438\u0441\u043f\u0440\u0430\u0432\u043d\u043e\u0441\u0442\u0435\u0439 \u043a\u0430\u0440\u0442\u044b",title:"\u0421\u043b\u043e\u0438"},make_a_donation:"\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u041f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c",zoom_out:"\u041e\u0442\u0434\u0430\u043b\u0438\u0442\u044c"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"\u0410\u0432\u0442\u043e\u0440\u044b OpenStreetMap",osm_france:"OpenStreetMap \u0424\u0440\u0430\u043d\u0446\u0438\u044f",popup:{close:"\u0417\u0430\u043a\u0440\u044b\u0442\u044c"},thunderforest_credit:"\u0422\u0430\u0439\u043b\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"\u0422\u0430\u0439\u043b\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b %{tracestrack_link}",website_and_api_terms:"\u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0441\u0430\u0439\u0442\u0430 \u0438 API"}}},sat:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u1c65\u1c5f\u1c6d\u1c60\u1c64\u1c5e \u1c71\u1c5a\u1c60\u1c65\u1c5f",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport Map"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"\u1c64\u1c67\u1c6d\u1c5f\u1c5c \u1c61\u1c5f\u1c6d\u1c5c\u1c5f \u1c69\u1c6b\u1c69\u1c5c \u1c5b\u1c64\u1c5d \u1c62\u1c6e",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u1c71\u1c5a\u1c60\u1c65\u1c5f \u1c68\u1c6e\u1c6d\u1c5f\u1c5c \u1c70\u1c5f\u1c74\u1c5f",gps:"Public GPS Traces",header:"\u1c71\u1c5a\u1c60\u1c65\u1c5f \u1c5f\u1c74\u1c5f\u1c5e\u1c60\u1c5a",notes:"\u1c71\u1c5a\u1c60\u1c65\u1c5f \u1c60\u1c77\u1c5f\u1c74\u1c5f\u1c79 \u1c5a\u1c5e\u1c60\u1c5a",overlays:"Enable overlays for troubleshooting the map",title:"\u1c5f\u1c74\u1c5f\u1c5e\u1c60\u1c5a"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u1c5e\u1c5f\u1c79\u1c74\u1c69\u1c6d \u1c62\u1c6e",zoom_out:"\u1c60\u1c5f\u1c79\u1c74\u1c64\u1c61\u1c7d \u1c62\u1c6e"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},sc:{javascripts:{embed:{report_problem:"Sinnala unu problema"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Mapa tzicl\xecstica",cyclosm:"CyclOSM",hot:"Umanit\xe0riu",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Istandard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Mapa de sos trasportos"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Istile de sos tasseddos de %{cyclosm_link} acasagiadu dae %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Ses a %{count} pee dae custu puntu",other:"Ses a %{count} pees dae custu puntu"},find_my_location:"Ammustra sa positzione mea",location_not_available:"Location not available",metersPopup:{one:"Ses a %{count} metru dae custu puntu",other:"Ses a %{count} metros dae custu puntu"}},hotosm_credit:"Istile de sos tasseddos de %{hotosm_link} acasagiadu dae %{osm_france_link}",hotosm_name:"Iscuadra umanit\xe0ria de OpenStreetMap",layers:{data:"Datos de sa mapa",gps:"Rastas GPS p\xf9blicas",header:"Istratos de sa mapa",notes:"Notas de sa mapa",overlays:"Ab\xeclita sas subrapositziones pro sa risolutziones de problemas in sa mapa",title:"Istratos"},make_a_donation:"Faghe una donatzione",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Ism\xe0nnia",zoom_out:"M\xecnima"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Contribuidores de OpenStreetMap",osm_france:"OpenStreetMap Frantza",popup:{close:"Close"},thunderforest_credit:"Tasseddos frunidos pro cortesia dae %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tasseddos frunidos pro cortesia dae %{tracestrack_link}",website_and_api_terms:"Cunditziones de impreu de su situ web e de sas API"}}},scn:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Cartina p\xee bicicletti",cyclosm:"CyclOSM",hot:"Umanitaria",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Mappa d\xee trasporti"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Ammustra unni sugnu",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Dati d\xe2 cartina",gps:"Public GPS Traces",header:"Strati d\xe2 cartina",notes:"Noti d\xe2 cartina",overlays:"Attiva li suprapusizzioni p'arris\xf2rviri li prubblemi d\xe2 cartina",title:"Strati"},make_a_donation:"Make a Donation", map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zumma pi dintra",zoom_out:"Zumma pi fora"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},shn:{javascripts:{embed:{report_problem:"\u101c\u1062\u1086\u1038\u1004\u1062\u107c\u103a\u1038\u1015\u107c\u103a\u1081\u1083"},map:{andy_allan:"\u1022\u1085\u107c\u103a\u1087\u1010\u102e\u1087\u1022\u1084\u1087\u101c\u1085\u107c\u103a\u1087",attribution_control:{toggle_attribution:"\u1015\u102d\u102f\u1010\u103a\u1087/\u1022\u102d\u102f\u1010\u103a\u1038 \u1075\u1062\u107c\u103a\u1015\u107c\u103a\u1075\u102f\u1004\u103a\u1087\u1019\u102f\u107c\u103a"},base:{cycle_map:"\u107d\u1085\u107c\u103a\u1087\u101c\u102d\u107c\u103a\u101c\u1085\u1004\u103a",cyclosm:"CyclOSM",hot:"\u101c\u103d\u1004\u103a\u1088\u1075\u1030\u107c\u103a\u1038",openmaptiles_osm:"MapTiler OMT",shortbread:"\u101e\u103b\u103d\u1010\u103a\u1089\u1015\u101b\u1085\u1010\u103a\u1089",standard:"\u101c\u1075\u103a\u1038\u1078\u1035\u1004\u103a",tracestracktop_topo:"\u1011\u101b\u1035\u1010\u103a\u1089\u101e\u1011\u101b\u1085\u1075\u103a\u1089 \u1010\u1030\u101d\u103a\u1087\u1015\u1030\u101d\u103a\u1087",transport_map:"\u107d\u1085\u107c\u103a\u1087\u101c\u102d\u107c\u103a\u1010\u1031\u1083\u1089\u101e\u1030\u1004\u103a\u1087"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"\u107d\u1062\u1004\u103a\u1081\u1062\u1004\u103a\u1088\u101c\u103d\u1075\u103a\u1038 \u101c\u1030\u107a\u103a\u1088 %{cyclosm_link} \u1022\u107c\u103a\u1081\u1015\u103a\u1089\u101d\u1086\u1089 \u101c\u1030\u107a\u103a\u1088 %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"\u1078\u101d\u103a\u1088\u1075\u101d\u103a\u1087 \u101a\u1030\u1087\u107c\u1082\u103a\u1038\u1075\u1084\u1088 %{count} \u1011\u1010\u103a\u1038 \u1010\u102e\u1088\u1078\u102f\u1010\u103a\u1087\u107c\u1086\u1089",other:"\u1078\u101d\u103a\u1088\u1075\u101d\u103a\u1087 \u101a\u1030\u1087\u107c\u1082\u103a\u1038\u1075\u1084\u1088 %{count} \u1011\u1010\u103a\u1038 \u1010\u102e\u1088\u1078\u102f\u1010\u103a\u1087\u107c\u1086\u1089"},find_my_location:"\u107c\u1084\u1022\u103d\u1004\u103a\u1088\u1010\u102e\u1088\u1075\u101d\u103a\u1076\u1083\u1088",location_not_available:"\u1022\u1019\u103a\u1087\u1019\u102e\u1038\u1022\u103d\u1004\u103a\u1087\u1010\u102e\u1088",metersPopup:{one:"\u1078\u101d\u103a\u1088\u1075\u101d\u103a\u1087\u101a\u1030\u1087\u107c\u1082\u103a\u1038\u1075\u1084\u1088 %{count} \u1019\u102e\u1087\u1010\u1083\u1087 \u1010\u102e\u1088\u1078\u102f\u1010\u103a\u1087\u107c\u1086\u1089",other:"\u1078\u101d\u103a\u1088\u1075\u101d\u103a\u1087\u1019\u102e\u1038\u107c\u1082\u103a\u1038\u1075\u1084\u1088 %{count} \u1019\u102e\u1087\u1010\u1083\u1087 \u1010\u102e\u1088\u1078\u102f\u1010\u103a\u1087\u107c\u1086\u1089"}},hotosm_credit:"\u107d\u1062\u1004\u103a\u1081\u1062\u1004\u103a\u1088\u101c\u103d\u1075\u103a\u1038 \u101c\u1030\u107a\u103a\u1088 %{hotosm_link} \u1022\u107c\u103a\u1081\u1015\u103a\u1089\u101d\u1086\u1089 \u101c\u1030\u107a\u103a\u1088 %{osm_france_link}",hotosm_name:"\u1078\u102f\u1019\u103a\u1038 OpenStreetMap \u1022\u107c\u103a\u1078\u103d\u1086\u1088\u1011\u1085\u1019\u103a\u1075\u1030\u107c\u103a\u1038",layers:{data:"\u1076\u1031\u1083\u1088\u1019\u102f\u107c\u103a\u1038\u107d\u1085\u107c\u103a\u1087\u101c\u102d\u107c\u103a",gps:"\u1011\u1085\u101d\u103a\u1081\u103d\u1086\u1038 GPS \u1010\u1004\u103a\u1038\u101c\u1062\u1086",header:"\u101c\u1031\u1087\u101a\u1083\u1087\u107d\u1085\u107c\u103a\u1087\u101c\u102d\u107c\u103a",notes:"\u1076\u1031\u1083\u1088\u1019\u1062\u1086\u1010\u103d\u1004\u103a\u1038\u107d\u1085\u107c\u103a\u1087\u101c\u102d\u107c\u103a",overlays:"\u1015\u102d\u102f\u1010\u103a\u1087\u1015\u107c\u103a \u101c\u103d\u1004\u103a\u1088\u101e\u1082\u103a\u1087\u107c\u102d\u1030\u101d\u103a \u1010\u1083\u1087\u1075\u1084\u1088\u101c\u102d\u1010\u103a\u1088\u1015\u107c\u103a\u1081\u1083 \u107d\u1085\u107c\u103a\u1087\u101c\u102d\u107c\u103a",title:"\u101c\u1031\u1087\u101a\u1083\u1087"},make_a_donation:"\u101c\u1030\u1087\u1010\u1062\u107c\u103a\u1038\u1004\u102d\u102f\u107c\u103a\u1038\u1075\u103d\u1004\u103a\u1075\u1062\u1004\u103a",map:{marker:{title:"\u1010\u1030\u101d\u103a\u1019\u1062\u1086\u107d\u1085\u107c\u103a\u1087\u101c\u102d\u107c\u103a"},title:"\u107d\u1085\u107c\u103a\u1087\u101c\u102d\u107c\u103a"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u1076\u1082\u1062\u1075\u103a\u1088\u1010\u1030\u107a\u103a\u1038",zoom_out:"\u1081\u102f\u1015\u103a\u1088\u1010\u1030\u107a\u103a\u1038"},openmaptiles_credit:"\u1076\u1085\u1015\u103a\u1038\u1081\u1062\u1004\u103a\u1088 \u101d\u1085\u1075\u103a\u1087\u1010\u1083\u1087 \u1022\u107c\u103a\u101c\u102f\u1075\u103a\u1089\u1010\u102e\u1088 %{openmaptiles_link} \u1022\u107c\u103a %{maptiler_link} \u1081\u1015\u103a\u1089\u101d\u1086\u1089",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"\u107d\u1030\u1088\u1081\u1030\u1019\u103a\u1088\u101e\u1062\u1004\u103a\u1088 OpenStreetMap",osm_france:"OpenStreetMap \u107e\u101b\u1062\u1004\u103a\u1087\u101e\u1035\u1010\u103a\u1088",popup:{close:"\u1022\u102d\u102f\u1010\u103a\u1038"},thunderforest_credit:"\u101c\u103d\u1075\u103a\u1038\u1078\u102d\u1030\u101d\u103a\u1038 \u1022\u107c\u103a\u101c\u1086\u1088\u1019\u1083\u1038\u1010\u102e\u1088 %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"\u101c\u103d\u1075\u103a\u1038\u1078\u102d\u1030\u101d\u103a\u1038 \u1022\u107c\u103a\u101c\u1086\u1088\u1019\u1083\u1038\u1010\u102e\u1088 %{tracestrack_link}",website_and_api_terms:"\u101d\u1085\u1015\u103a\u1089\u101e\u1062\u1086\u1089 \u101c\u1084\u1088 \u1076\u1031\u1083\u1088\u1019\u1075\u103a\u1038\u1019\u107c\u103a\u1088 API"}}},sk:{javascripts:{embed:{report_problem:"Nahl\xe1si\u0165 probl\xe9m"},map:{andy_allan:"Andyho Allana",attribution_control:{toggle_attribution:"Prepn\xfa\u0165 uv\xe1dzanie p\xf4vodu"},base:{cycle_map:"Cyklomapa",cyclosm:"CyclOSM",hot:"Humanit\xe1rna",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u0160tandardn\xe1",tracestracktop_topo:"Tracestrack Topo",transport_map:"Dopravn\xe1 mapa"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"\u0160t\xfdl dla\u017ed\xedc od %{cyclosm_link} poskytuje %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{few:"Ste menej ne\u017e %{count} stopy od tohto bodu",many:"Ste menej ne\u017e %{count} st\xf4p od tohto bodu",one:"Ste menej ne\u017e %{count} stopu od tohto bodu",other:"Ste menej ne\u017e %{count} st\xf4p od tohto bodu"},find_my_location:"Zobrazi\u0165 moju polohu",location_not_available:"Poloha nie je k dispoz\xedcii",metersPopup:{few:"Ste menej ne\u017e %{count} metre od tohto bodu",many:"Ste menej ne\u017e %{count} metrov od tohto bodu",one:"Ste menej ne\u017e %{count} meter od tohto bodu",other:"Ste menej ne\u017e %{count} metrov od tohto bodu"}},hotosm_credit:"\u0160t\xfdl dla\u017ed\xedc od %{hotosm_link} poskytuje %{osm_france_link}",hotosm_name:"Humanit\xe1rneho t\xedmu OpenStreetMap",layers:{data:"Mapov\xe9 podklady",gps:"Verejn\xe9 GPS stopy",header:"Mapov\xe9 vrstvy",notes:"Pozn\xe1mky k mape",overlays:"Zapn\xfa\u0165 vrstvy pre ladenie mapy",title:"Vrstvy"},make_a_donation:"Po\u0161lite pr\xedspevok",map:{marker:{title:"Zna\u010dka na mape"},title:"Mapa"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Pribl\xed\u017ei\u0165",zoom_out:"Oddiali\u0165"},openmaptiles_credit:"Vektorov\xe9 dla\u017edice z %{openmaptiles_link} hostovan\xe9 na %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Prispievatelia OpenStreetMap",osm_france:"OpenStreetMap Franc\xfazsko",popup:{close:"Zatvori\u0165"},thunderforest_credit:"Dla\u017edice s dovolen\xedm od %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Dla\u017edice s l\xe1skav\xfdm dovolen\xedm %{tracestrack_link}",website_and_api_terms:"Podmienky webstr\xe1nky a API"}}},"skr-Arab":{javascripts:{embed:{report_problem:"\u0645\u0633\u0626\u0644\u06d2 \u062f\u06cc \u0631\u067e\u0648\u0631\u0679 \u06a9\u0631\u0648"},map:{andy_allan:"\u0627\u06cc\u0646\u0688\u06cc \u0627\u06cc\u0644\u0646",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u0633\u0627\u0626\u06cc\u06a9\u0644 \u0646\u0642\u0634\u06c1",cyclosm:"CyclOSM",hot:"\u0627\u0646\u0633\u0627\u0646 \u062f\u0648\u0633\u062a",openmaptiles_osm:"\u0645\u06cc\u067e \u0679\u0627\u0626\u0644\u0631 \u0627\u0648 \u0627\u06cc\u0645 \u0679\u06cc",shortbread:"\u0634\u0627\u0631\u0679 \u0628\u0631\u06cc\u0688",standard:"\u0645\u0639\u06cc\u0627\u0631\u06cc",tracestracktop_topo:"\u0679\u0631\u06cc\u0633\u0633\u0679\u0631\u06cc\u06a9 \u0679\u0648\u067e\u0648",transport_map:"\u0679\u0631\u0627\u0646\u0633\u067e\u0648\u0631\u0679 \u062f\u0627 \u0646\u0642\u0634\u06c1"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"\u0679\u0627\u0626\u0644\u0632 \u062f\u0627 \u0627\u0646\u062f\u0627\u0632 %{cyclosm_link} \u062f\u06cc \u0637\u0631\u0641\u0648\u06ba \u06c1\u06d2 \u0627\u062a\u06d2 \u0627\u06cc\u0646\u06a9\u0648\u06ba %{osm_france_link} \u062f\u06cc \u0637\u0631\u0641\u0648\u06ba \u06c1\u0648\u0633\u0679 \u06a9\u06cc\u062a\u0627 \u06b3\u06cc\u0627 \u06c1\u06d2\u06d4",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"\u062a\u0633\u0627\u06ba \u0627\u06cc\u06ba \u0646\u0642\u0637\u06d2 \u062f\u06d2 %{count} \u0645\u06cc\u0679\u0631 \u062f\u06d2 \u0627\u0646\u062f\u0631 \u06c1\u0627\u0624",other:"\u062a\u0633\u0627\u06ba \u0627\u06cc\u06ba \u0646\u0642\u0637\u06d2 \u062f\u06d2 %{count} \u0645\u06cc\u0679\u0631 \u062f\u06d2 \u0627\u0646\u062f\u0631 \u06c1\u0627\u0624"},find_my_location:"\u0645\u06cc\u0759\u06cc \u0644\u0648\u06a9\u06cc\u0634\u0646 \u0759\u06cc\u06a9\u06be\u0627\u0624",location_not_available:"Location not available",metersPopup:{one:"\u062a\u0633\u0627\u06ba \u0627\u06cc\u06ba \u0646\u0642\u0637\u06d2 \u062f\u06d2 %{count} \u0645\u06cc\u0679\u0631 \u062f\u06d2 \u0627\u0646\u062f\u0631 \u06c1\u0627\u0624",other:"\u062a\u0633\u0627\u06ba \u0627\u06cc\u06ba \u0646\u0642\u0637\u06d2 \u062f\u06d2 %{count} \u0645\u06cc\u0679\u0631 \u062f\u06d2 \u0627\u0646\u062f\u0631 \u06c1\u0627\u0624"}},hotosm_credit:"\u0679\u0627\u0626\u0644\u0632 \u062f\u0627 \u0627\u0646\u062f\u0627\u0632 %{hotosm_link} \u062f\u06cc \u0637\u0631\u0641\u0648\u06ba \u06c1\u06d2 \u0627\u062a\u06d2 \u0627\u06cc\u0646\u06a9\u0648\u06ba %{osm_france_link} \u062f\u06cc \u0637\u0631\u0641\u0648\u06ba \u06c1\u0648\u0633\u0679 \u06a9\u06cc\u062a\u0627 \u06b3\u06cc\u0627 \u06c1\u06d2\u06d4",hotosm_name:"\u06c1\u06cc\u0648\u0645\u06cc\u0646\u0679\u06cc\u0631\u06cc\u0646 \u0627\u0648\u067e\u0646 \u0633\u0679\u0631\u06cc\u0679 \u0645\u06cc\u067e \u0679\u06cc\u0645",layers:{data:"\u0646\u0642\u0634\u06d2 \u062f\u0627 \u0688\u06cc\u0679\u0627",gps:"\u0639\u0648\u0627\u0645\u06cc \u062c\u06cc \u067e\u06cc \u0627\u06cc\u0633 \u0679\u0631\u06cc\u0633\u0632",header:"\u0646\u0642\u0634\u06d2 \u062f\u06cc\u0627\u06ba \u067e\u0631\u062a\u0627\u06ba",notes:"\u0646\u0642\u0634\u06d2 \u062f\u06d2 \u0646\u0648\u0679\u0633",overlays:"\u0646\u0642\u0634\u06d2 \u062f\u06cc \u062e\u0631\u0627\u0628\u06cc \u06a9\u0648\u06ba \u0679\u06be\u06cc\u06a9 \u06a9\u0631\u0768 \u06a9\u06cc\u062a\u06d2 \u0627\u0648\u0648\u0631\u0644\u06cc\u0632 \u06a9\u0648\u06ba \u0641\u0639\u0627\u0644 \u06a9\u0631\u0648\u06d4",title:"\u062a\u06c1\u0648\u0627\u06ba"},make_a_donation:"\u0639\u0637\u06cc\u06c1 \u0759\u06cc\u0648\u0648",map:{marker:{title:"Map marker"},title:"\u0646\u0642\u0634\u06c1"},maptiler_name:"\u0645\u06cc\u067e \u0679\u0627\u0626\u0644\u0631",navigation_control:{zoom_in:"\u0648\u0759\u0627 \u06a9\u0631\u0648",zoom_out:"\u0686\u06be\u0648\u0679\u0627 \u06a9\u0631\u0648"},openmaptiles_credit:"%{openmaptiles_link} \u062f\u06cc \u0637\u0631\u0641\u0648\u06ba \u0648\u06cc\u06a9\u0679\u0631 \u0679\u0627\u0626\u0644\u0632 \u0627\u062a\u06d2 \u0627\u06cc\u0646\u06a9\u0648\u06ba %{maptiler_link} \u062f\u06cc \u0637\u0631\u0641\u0648\u06ba \u06c1\u0648\u0633\u0679 \u06a9\u06cc\u062a\u0627 \u06b3\u06cc\u0627 \u06c1\u06d2\u06d4",openmaptiles_name:"\u0627\u0648\u067e\u0646 \u0645\u06cc\u067e \u0679\u0627\u0626\u0644\u0627\u06ba",openstreetmap_contributors:"\u0627\u0648\u067e\u0646 \u0633\u0679\u0631\u06cc\u0679 \u0645\u06cc\u067e \u062f\u06d2 \u062d\u0635\u06c1 \u067e\u0627\u0648\u0768 \u0622\u0644\u06d2",osm_france:"\u0627\u0648\u067e\u0646 \u0633\u0679\u0631\u06cc\u0679 \u0645\u06cc\u067e \u0641\u0631\u0627\u0646\u0633",popup:{close:"\u0628\u0646\u062f \u06a9\u0631\u0648"},thunderforest_credit:"\u0679\u0627\u0626\u0644\u0632 %{thunderforest_link} \u062f\u06cc \u0637\u0631\u0641\u0648\u06ba \u0645\u06c1\u06cc\u0627 \u06a9\u06cc\u062a\u06cc\u0627\u06ba \u06b3\u0626\u06cc\u0627\u06ba \u06c1\u0646\u06d4",tracestrack:"Tracestrack",tracestrack_credit:"\u0679\u0627\u0626\u0644\u0632 %{tracestrack_link} \u062f\u06cc \u0637\u0631\u0641\u0648\u06ba \u0645\u06c1\u06cc\u0627 \u06a9\u06cc\u062a\u06cc\u0627\u06ba \u06b3\u0626\u06cc\u0627\u06ba \u06c1\u0646\u06d4",website_and_api_terms:"\u0648\u06cc\u0628 \u0633\u0627\u0626\u0679 \u0627\u062a\u06d2 \u0627\u06d2 \u067e\u06cc \u0622\u0626\u06cc \u062f\u06cc\u0627\u06ba \u0634\u0631\u0627\u0626\u0637"}}},sl:{javascripts:{embed:{report_problem:"Prijavi te\u017eavo"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Preklopi pripis"},base:{cycle_map:"Kolesarska karta",cyclosm:"CyclOSM",hot:"Humanitarno",openmaptiles_osm:"OMT MapTiler",shortbread:"Shortbread",standard:"Privzeta karta",tracestracktop_topo:"Tracestrack Topo",transport_map:"Prometna karta"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Slog plo\u0161\u010dic %{cyclosm_link}, gosti jih %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{few:"Ste znotraj %{count} \u010devljev od te to\u010dke",one:"Ste znotraj %{count} \u010devlja od te to\u010dke",other:"Ste znotraj %{count} \u010devljev od te to\u010dke",two:"Ste znotraj %{count} \u010devljev od te to\u010dke"},find_my_location:"Poka\u017ei mojo lokacijo",location_not_available:"Polo\u017eaj ni na voljo",metersPopup:{few:"Ste znotraj %{count} metrov od te to\u010dke",one:"Ste znotraj %{count} metra od te to\u010dke",other:"Ste znotraj %{count} metrov od te to\u010dke",two:"Ste znotraj %{count} metrov od te to\u010dke"}},hotosm_credit:"Slog plo\u0161\u010dic %{hotosm_link}, gosti jih %{osm_france_link}",hotosm_name:"Humanitarna ekipa OpenStreetMap",layers:{data:"Podatki zemljevida",gps:"Javne sledi GPS",header:"Sloji zemljevida",notes:"Opombe na zemljevidu",overlays:"Za odpravljanje te\u017eav z zemljevidom omogo\u010dite prekrivke",title:"Sloji"},make_a_donation:"Donirajte",map:{marker:{title:"Oznaka na zemljevidu"},title:"Zemljevid"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Pribli\u017eaj",zoom_out:"Oddalji"},openmaptiles_credit:"Vektorske plo\u0161\u010dice iz %{openmaptiles_link}, ki jih gosti %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Sodelavci OpenStreetMap",osm_france:"OpenStreetMap France",popup:{close:"Zapri"},thunderforest_credit:"Plo\u0161\u010dice z dovoljenjem %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Plo\u0161\u010dice z dovoljenjem %{tracestrack_link}",website_and_api_terms:"Pogoji za spletno mesto in API"}}},sq:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Aktivizo atribuimin"},base:{cycle_map:"Cycle Map",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport Map"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Show My Location",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Gjurm\xebt publike GPS",header:"Map Layers",notes:"Map Notes",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"Make a Donation",map:{marker:{title:"Sh\xebnues i hart\xebs"},title:"Harta"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom In",zoom_out:"Zoom Out"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},sr:{javascripts:{embed:{report_problem:"\u041f\u0440\u0438\u0458\u0430\u0432\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u0411\u0438\u0446\u0438\u043a\u043b\u0438\u0441\u0442\u0438\u0447\u043a\u0430 \u043c\u0430\u043f\u0430",cyclosm:"CyclOSM",hot:"\u0425\u0443\u043c\u0430\u043d\u0438\u0442\u0430\u0440\u043d\u0438",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0434\u043d\u0430",tracestracktop_topo:"Tracestrack Topo",transport_map:"\u0421\u0430\u043e\u0431\u0440\u0430\u045b\u0430\u0458\u043d\u0430 \u043c\u0430\u043f\u0430"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"\u041f\u0440\u0438\u043a\u0430\u0436\u0438 \u043c\u043e\u0458\u0443 \u043f\u043e\u0437\u0438\u0446\u0438\u0458\u0443",location_not_available:"\u041b\u043e\u043a\u0430\u0446\u0438\u0458\u0430 \u043d\u0438\u0458\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u041f\u043e\u0434\u0430\u0446\u0438 \u043a\u0430\u0440\u0442\u0435",gps:"\u0408\u0430\u0432\u043d\u0435 GPS \u0442\u0440\u0430\u0441\u0435",header:"\u0421\u043b\u043e\u0458\u0435\u0432\u0438 \u043a\u0430\u0440\u0442\u0435",notes:"\u0411\u0435\u043b\u0435\u0448\u043a\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438",overlays:"\u041e\u043c\u043e\u0433\u0443\u045b\u0438 \u043f\u0440\u0435\u043a\u043b\u0430\u043f\u0430\u045a\u0435 \u0437\u0430 \u0442\u0440\u0430\u0436\u0435\u045a\u0435 \u0433\u0440\u0435\u0448\u0430\u043a\u0430 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438",title:"\u0421\u043b\u043e\u0458\u0435\u0432\u0438"},make_a_donation:"\u0414\u043e\u043d\u0430\u0446\u0438\u0458\u0430",map:{marker:{title:"Map marker"},title:"\u041a\u0430\u0440\u0442\u0430"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u0423\u0432\u0435\u045b\u0430\u0458",zoom_out:"\u0423\u043c\u0430\u045a\u0438"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap \u0441\u0430\u0440\u0430\u0434\u043d\u0438\u0446\u0438",osm_france:"OpenStreetMap France",popup:{close:"\u0417\u0430\u0442\u0432\u043e\u0440\u0438"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"\u0412\u0435\u0431-\u0441\u0430\u0458\u0442 \u0438 API \u0443\u0441\u043b\u043e\u0432\u0438"}}},"sr-Latn":{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Biciklisti\u010dka mapa",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standardna",tracestracktop_topo:"Tracestrack Topo",transport_map:"Saobra\u0107ajna mapa"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Show My Location",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"Map Layers",notes:"Map Notes",overlays:"Enable overlays for troubleshooting the map",title:"Layers"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom In",zoom_out:"Zoom Out"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},sv:{javascripts:{embed:{report_problem:"Rapportera ett problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Aktivera/inaktivera erk\xe4nnande"},base:{cycle_map:"Cykelkarta",cyclosm:"CyclOSM",hot:"Humanit\xe4rt",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standard",tracestracktop_topo:"Tracetrack Topo",transport_map:"Transportkarta"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Brickstil av %{cyclosm_link} v\xe4rd av %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Du \xe4r inom %{count} fot av denna punkt",other:"Du \xe4r inom %{count} fot av denna punkt"},find_my_location:"Visa min position",location_not_available:"Platsen \xe4r inte tillg\xe4nglig",metersPopup:{one:"Du \xe4r inom %{count} meter av denna punkt",other:"Du \xe4r inom %{count} meter av denna punkt"}},hotosm_credit:"Brickstil av %{hotosm_link} v\xe4rd av %{osm_france_link}",hotosm_name:"Humanit\xe4rt OpenStreetMap-team",layers:{data:"Kartdata",gps:"Offentliga GPS-sp\xe5r",header:"Kartskikt",notes:"Kartanteckningar",overlays:"Aktivera lager f\xf6r fels\xf6kning av kartan",title:"Lager"},make_a_donation:"G\xf6r en donation",map:{marker:{title:"Kortmark\xf6r"},title:"Karta"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zooma in",zoom_out:"Zooma ut"},openmaptiles_credit:"Vektorruta fr\xe5n %{openmaptiles_link} hos %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap-bidragsgivare",osm_france:"OpenStreetMap Frankrike",popup:{close:"St\xe4ng"},thunderforest_credit:"Brickor satt till f\xf6rfogande av %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Brickor satt till f\xf6rfogande av %{tracestrack_link}",website_and_api_terms:"Webbplats och API-villkor"}}},te:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u0c38\u0c48\u0c15\u0c3f\u0c32\u0c41 \u0c2e\u0c4d\u0c2f\u0c3e\u0c2a\u0c41",cyclosm:"CyclOSM",hot:"\u0c2e\u0c3e\u0c28\u0c35\u0c24\u0c4d\u0c35",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u0c2a\u0c4d\u0c30\u0c3e\u0c2e\u0c3e\u0c23\u0c3f\u0c15\u0c02",tracestracktop_topo:"Tracestrack Topo",transport_map:"\u0c30\u0c35\u0c3e\u0c23\u0c3e \u0c2a\u0c1f\u0c02"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"\u0c2e\u0c40\u0c30\u0c41 \u0c08 \u0c2c\u0c3f\u0c02\u0c26\u0c41\u0c35\u0c41 \u0c28\u0c41\u0c02\u0c21\u0c3f \u0c12\u0c15 \u0c05\u0c21\u0c41\u0c17\u0c41 \u0c26\u0c42\u0c30\u0c02 \u0c32\u0c4b\u0c2a\u0c47 \u0c09\u0c28\u0c4d\u0c28\u0c3e\u0c30\u0c41",other:"\u0c2e\u0c40\u0c30\u0c41 \u0c08 \u0c2c\u0c3f\u0c02\u0c26\u0c41\u0c35\u0c41 \u0c28\u0c41\u0c02\u0c21\u0c3f %{count} \u0c05\u0c21\u0c41\u0c17\u0c41\u0c32 \u0c26\u0c42\u0c30\u0c02 \u0c32\u0c4b\u0c2a\u0c47 \u0c09\u0c28\u0c4d\u0c28\u0c3e\u0c30\u0c41"},find_my_location:"\u0c28\u0c47\u0c28\u0c41\u0c28\u0c4d\u0c28 \u0c2a\u0c4d\u0c30\u0c3e\u0c02\u0c24\u0c3e\u0c28\u0c4d\u0c28\u0c3f \u0c1a\u0c42\u0c2a\u0c3f\u0c02\u0c1a\u0c41",location_not_available:"Location not available",metersPopup:{one:"\u0c2e\u0c40\u0c30\u0c41 \u0c08 \u0c2c\u0c3f\u0c02\u0c26\u0c41\u0c35\u0c41 \u0c28\u0c41\u0c02\u0c21\u0c3f \u0c12\u0c15 \u0c2e\u0c40\u0c1f\u0c30\u0c41 \u0c26\u0c42\u0c30\u0c02 \u0c32\u0c4b\u0c2a\u0c47 \u0c09\u0c28\u0c4d\u0c28\u0c3e\u0c30\u0c41",other:"\u0c2e\u0c40\u0c30\u0c41 \u0c08 \u0c2c\u0c3f\u0c02\u0c26\u0c41\u0c35\u0c41 \u0c28\u0c41\u0c02\u0c21\u0c3f %{count} \u0c2e\u0c40\u0c1f\u0c30\u0c4d\u0c32 \u0c26\u0c42\u0c30\u0c02 \u0c32\u0c4b\u0c2a\u0c47 \u0c09\u0c28\u0c4d\u0c28\u0c3e\u0c30\u0c41"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u0c2a\u0c1f\u0c02 \u0c2d\u0c4b\u0c17\u0c1f\u0c4d\u0c1f\u0c3e",gps:"\u0c2c\u0c39\u0c3f\u0c30\u0c02\u0c17 GPS \u0c1f\u0c4d\u0c30\u0c47\u0c38\u0c41\u0c32\u0c41",header:"\u0c2e\u0c4d\u0c2f\u0c3e\u0c2a\u0c41 \u0c2a\u0c4a\u0c30\u0c32\u0c41",notes:"\u0c2a\u0c1f\u0c2a\u0c41 \u0c17\u0c2e\u0c28\u0c3f\u0c15\u0c32\u0c41",overlays:"Enable overlays for troubleshooting the map",title:"\u0c2a\u0c4a\u0c30\u0c32\u0c41"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u0c1c\u0c42\u0c2e\u0c4d \u0c07\u0c28\u0c4d",zoom_out:"\u0c1c\u0c42\u0c2e\u0c4d \u0c14\u0c1f\u0c4d"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},th:{javascripts:{embed:{report_problem:"\u0e41\u0e08\u0e49\u0e07\u0e1b\u0e31\u0e0d\u0e2b\u0e32"},map:{andy_allan:"\u0e41\u0e2d\u0e19\u0e14\u0e35 \u0e2d\u0e31\u0e25\u0e25\u0e31\u0e19",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u0e41\u0e1c\u0e19\u0e17\u0e35\u0e48\u0e08\u0e31\u0e01\u0e23\u0e22\u0e32\u0e19",cyclosm:"CyclOSM",hot:"\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e21\u0e19\u0e38\u0e29\u0e22\u0e18\u0e23\u0e23\u0e21",openmaptiles_osm:"\u0e41\u0e21\u0e1b\u0e44\u0e17\u0e40\u0e25\u0e2d\u0e23\u0e4c OMT",shortbread:"Shortbread",standard:"\u0e1b\u0e01\u0e15\u0e34",tracestracktop_topo:"Tracestrack Topo",transport_map:"\u0e41\u0e1c\u0e19\u0e17\u0e35\u0e48\u0e01\u0e32\u0e23\u0e02\u0e19\u0e2a\u0e48\u0e07"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a\u0e0a\u0e48\u0e2d\u0e07\u0e01\u0e23\u0e30\u0e40\u0e1a\u0e37\u0e49\u0e2d\u0e07\u0e42\u0e14\u0e22 %{cyclosm_link} \u0e40\u0e1b\u0e47\u0e19\u0e40\u0e08\u0e49\u0e32\u0e02\u0e2d\u0e07\u0e42\u0e14\u0e22 %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{other:"\u0e04\u0e38\u0e13\u0e2d\u0e22\u0e39\u0e48\u0e20\u0e32\u0e22\u0e43\u0e19\u0e23\u0e30\u0e22\u0e30 %{count} \u0e1f\u0e38\u0e15\u0e08\u0e32\u0e01\u0e08\u0e38\u0e14\u0e19\u0e35\u0e49"},find_my_location:"\u0e41\u0e2a\u0e14\u0e07\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e02\u0e2d\u0e07\u0e09\u0e31\u0e19",location_not_available:"Location not available",metersPopup:{other:"\u0e04\u0e38\u0e13\u0e2d\u0e22\u0e39\u0e48\u0e20\u0e32\u0e22\u0e43\u0e19\u0e23\u0e30\u0e22\u0e30 %{count} \u0e40\u0e21\u0e15\u0e23\u0e08\u0e32\u0e01\u0e08\u0e38\u0e14\u0e19\u0e35\u0e49"}},hotosm_credit:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a\u0e0a\u0e48\u0e2d\u0e07\u0e01\u0e23\u0e30\u0e40\u0e1a\u0e37\u0e49\u0e2d\u0e07\u0e42\u0e14\u0e22 %{hotosm_link} \u0e40\u0e1b\u0e47\u0e19\u0e40\u0e08\u0e49\u0e32\u0e02\u0e2d\u0e07\u0e42\u0e14\u0e22 %{osm_france_link}",hotosm_name:"\u0e17\u0e35\u0e21 Humanitarian OpenStreetMap",layers:{data:"\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e41\u0e1c\u0e19\u0e17\u0e35\u0e48",gps:"\u0e23\u0e2d\u0e22\u0e17\u0e32\u0e07 GPS \u0e2a\u0e32\u0e18\u0e32\u0e23\u0e13\u0e30",header:"\u0e0a\u0e31\u0e49\u0e19\u0e41\u0e1c\u0e19\u0e17\u0e35\u0e48",notes:"\u0e2b\u0e21\u0e32\u0e22\u0e40\u0e2b\u0e15\u0e38\u0e41\u0e1c\u0e19\u0e17\u0e35\u0e48",overlays:"\u0e0b\u0e49\u0e2d\u0e19\u0e0a\u0e31\u0e49\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e1e\u0e34\u0e40\u0e28\u0e29\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e0a\u0e48\u0e27\u0e22\u0e43\u0e19\u0e01\u0e32\u0e23\u0e41\u0e01\u0e49\u0e1b\u0e31\u0e0d\u0e2b\u0e32\u0e41\u0e1c\u0e19\u0e17\u0e35\u0e48:",title:"\u0e0a\u0e31\u0e49\u0e19\u0e41\u0e1c\u0e19\u0e17\u0e35\u0e48"},make_a_donation:"\u0e1a\u0e23\u0e34\u0e08\u0e32\u0e04",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u0e0b\u0e39\u0e21\u0e40\u0e02\u0e49\u0e32",zoom_out:"\u0e0b\u0e39\u0e21\u0e2d\u0e2d\u0e01"},openmaptiles_credit:"\u0e0a\u0e48\u0e2d\u0e07\u0e01\u0e23\u0e30\u0e40\u0e1a\u0e37\u0e49\u0e2d\u0e07\u0e40\u0e27\u0e01\u0e40\u0e15\u0e2d\u0e23\u0e4c\u0e08\u0e32\u0e01 %{openmaptiles_link} \u0e40\u0e1b\u0e47\u0e19\u0e40\u0e02\u0e49\u0e32\u0e02\u0e2d\u0e07\u0e42\u0e14\u0e22 %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"\u0e1c\u0e39\u0e49\u0e23\u0e48\u0e27\u0e21\u0e43\u0e2b\u0e49\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25 OpenStreetMap",osm_france:"OpenStreetMap \u0e1d\u0e23\u0e31\u0e48\u0e07\u0e40\u0e28\u0e2a",popup:{close:"Close"},thunderforest_credit:"\u0e0a\u0e48\u0e2d\u0e07\u0e01\u0e23\u0e30\u0e40\u0e1a\u0e37\u0e49\u0e2d\u0e07\u0e44\u0e14\u0e49\u0e23\u0e31\u0e1a\u0e04\u0e27\u0e32\u0e21\u0e2d\u0e19\u0e38\u0e40\u0e04\u0e23\u0e32\u0e30\u0e2b\u0e4c\u0e08\u0e32\u0e01 %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"\u0e01\u0e23\u0e30\u0e40\u0e1a\u0e37\u0e49\u0e2d\u0e07\u0e44\u0e14\u0e49\u0e23\u0e31\u0e1a\u0e04\u0e27\u0e32\u0e21\u0e2d\u0e19\u0e38\u0e40\u0e04\u0e23\u0e32\u0e30\u0e2b\u0e4c\u0e08\u0e32\u0e01 %{tracestrack_link}",website_and_api_terms:"\u0e40\u0e07\u0e37\u0e48\u0e2d\u0e19\u0e44\u0e02\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c\u0e41\u0e25\u0e30 API"}}},tl:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Mapa ng Pagbibisikleta",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Pamantayan",tracestracktop_topo:"Tracestrack Topo",transport_map:"Mapa ng Transportasyon"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Ipakita ang Aking Lokasyon",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Dato ng Mapa",gps:"Pangmadlang mga Bakas ng GPS",header:"Map Layers",notes:"Map Notes",overlays:"Paganahin ang mga kalupkop upang ayusin ang mga isyu sa mapa",title:"Mga patong"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Lumapit",zoom_out:"Zoom Out"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles", openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},tr:{javascripts:{embed:{report_problem:"Bir sorunu \u015fikayet et"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"At\u0131f Anahtar\u0131"},base:{cycle_map:"Bisiklet Haritas\u0131",cyclosm:"CyclOSM",hot:"\u0130nsanc\u0131l",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Standart",tracestracktop_topo:"Tracestrack Topo",transport_map:"Ula\u015f\u0131m Haritas\u0131"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"%{osm_france_link} taraf\u0131ndan bar\u0131nd\u0131r\u0131lan %{cyclosm_link} d\xf6\u015feme tarz\u0131",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"Bu noktan\u0131n %{count} ad\u0131m i\xe7indesiniz",other:"Bu noktan\u0131n %{count} ad\u0131m i\xe7indesiniz"},find_my_location:"Konumumu g\xf6ster",location_not_available:"Konum bilgisi mevcut de\u011fil",metersPopup:{one:"Bu noktan\u0131n %{count} metresindesiniz",other:"Bu noktan\u0131n %{count} metresindesiniz"}},hotosm_credit:"%{osm_france_link} taraf\u0131ndan bar\u0131nd\u0131r\u0131lan %{hotosm_link} d\xf6\u015feme tarz\u0131",hotosm_name:"\u0130nsani OpenStreetMap Ekibi",layers:{data:"Harita Verileri",gps:"Herkese A\xe7\u0131k GPS \u0130zleri",header:"Harita Katmanlar\u0131",notes:"Harita Notlar\u0131",overlays:"Haritan\u0131n sorununu gidermek i\xe7in katmanlar\u0131 etkinle\u015ftir",title:"Katmanlar"},make_a_donation:"Ba\u011f\u0131\u015f Yap\u0131n",map:{marker:{title:"Harita imleci"},title:"Harita"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Yak\u0131nla\u015ft\u0131r",zoom_out:"Uzakla\u015ft\u0131r"},openmaptiles_credit:"%{maptiler_link} taraf\u0131ndan bar\u0131nd\u0131r\u0131lan %{openmaptiles_link} vekt\xf6r karolar\u0131",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap'e katk\u0131da bulunanlar",osm_france:"OpenStreetMap Fransa",popup:{close:"Kapat"},thunderforest_credit:"D\xf6\u015femeler, %{thunderforest_link} katk\u0131lar\u0131yla",tracestrack:"Tracestrack",tracestrack_credit:"D\xf6\u015femeler, %{tracestrack_link} katk\u0131lar\u0131yla",website_and_api_terms:"Web sitesi ve API ko\u015fullar\u0131"}}},tt:{javascripts:{embed:{report_problem:"Report a problem"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"Cycle Map",cyclosm:"CyclOSM",hot:"Humanitarian",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442",tracestracktop_topo:"Tracestrack Topo",transport_map:"Transport Map"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Tiles style by %{cyclosm_link} hosted by %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"You are within %{count} foot of this point",other:"You are within %{count} feet of this point"},find_my_location:"Show My Location",location_not_available:"Location not available",metersPopup:{one:"You are within %{count} meter of this point",other:"You are within %{count} meters of this point"}},hotosm_credit:"Tiles style by %{hotosm_link} hosted by %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"Map Data",gps:"Public GPS Traces",header:"Map Layers",notes:"Map Notes",overlays:"Enable overlays for troubleshooting the map",title:"\u041a\u0430\u0442\u043b\u0430\u043c\u043d\u0430\u0440"},make_a_donation:"Make a Donation",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Zoom In",zoom_out:"Zoom Out"},openmaptiles_credit:"Vector tiles from %{openmaptiles_link} hosted by %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap contributors",osm_france:"OpenStreetMap France",popup:{close:"Close"},thunderforest_credit:"Tiles courtesy of %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"Tiles courtesy of %{tracestrack_link}",website_and_api_terms:"Website and API terms"}}},uk:{javascripts:{embed:{report_problem:"\u041f\u043e\u0432\u0456\u0434\u043e\u043c\u0438\u0442\u0438 \u043f\u0440\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443"},map:{andy_allan:"\u0415\u043d\u0434\u0456 \u0410\u043b\u043b\u0430\u043d",attribution_control:{toggle_attribution:"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0446\u0456\u044e"},base:{cycle_map:"\u0412\u0435\u043b\u043e\u041c\u0430\u043f\u0430",cyclosm:"\u0426\u0438\u043a\u043b\u041e\u0421\u041c",hot:"Humanitarian\u200e",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0438\u0439",tracestracktop_topo:"Tracestrack \u0422\u043e\u043f\u043e",transport_map:"\u041c\u0430\u043f\u0430 \u0422\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0443"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"\u0422\u0430\u0439\u043b\u0438 %{cyclosm_link} \u0437 %{osm_france_link}",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{few:"\u0412\u0438 \u043f\u0435\u0440\u0435\u0431\u0443\u0432\u0430\u0454\u0442\u0435 \u0437\u0430 %{count} \u0444\u0443\u0442\u0438 \u0432\u0456\u0434 \u0446\u0456\u0454\u0457 \u0442\u043e\u0447\u043a\u0438",many:"\u0412\u0438 \u043f\u0435\u0440\u0435\u0431\u0443\u0432\u0430\u0454\u0442\u0435 \u0437\u0430 %{count} \u0444\u0443\u0442\u0456\u0432 \u0432\u0456\u0434 \u0446\u0456\u0454\u0457 \u0442\u043e\u0447\u043a\u0438",one:"\u0412\u0438 \u043f\u0435\u0440\u0435\u0431\u0443\u0432\u0430\u0454\u0442\u0435 \u0437\u0430 %{count} \u0444\u0443\u0442 \u0432\u0456\u0434 \u0446\u0456\u0454\u0457 \u0442\u043e\u0447\u043a\u0438",other:""},find_my_location:"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0438 \u043c\u043e\u0454 \u043c\u0456\u0441\u0446\u0435\u0437\u043d\u0430\u0445\u043e\u0434\u0436\u0435\u043d\u043d\u044f",location_not_available:"\u0420\u043e\u0437\u0442\u0430\u0448\u0443\u0432\u0430\u043d\u043d\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0435",metersPopup:{few:"\u0412\u0438 \u043f\u0435\u0440\u0435\u0431\u0443\u0432\u0430\u0454\u0442\u0435 \u0437\u0430 %{count} \u043c\u0435\u0442\u0440\u0438 \u0432\u0456\u0434 \u0446\u0456\u0454\u0457 \u0442\u043e\u0447\u043a\u0438",many:"\u0412\u0438 \u043f\u0435\u0440\u0435\u0431\u0443\u0432\u0430\u0454\u0442\u0435 \u0437\u0430 %{count} \u043c\u0435\u0442\u0440\u0456\u0432 \u0432\u0456\u0434 \u0446\u0456\u0454\u0457 \u0442\u043e\u0447\u043a\u0438",one:"\u0412\u0438 \u043f\u0435\u0440\u0435\u0431\u0443\u0432\u0430\u0454\u0442\u0435 \u0437\u0430 %{count} \u043c\u0435\u0442\u0440 \u0432\u0456\u0434 \u0446\u0456\u0454\u0457 \u0442\u043e\u0447\u043a\u0438",other:""}},hotosm_credit:"\u0422\u0430\u0439\u043b\u0438 %{hotosm_link} \u0437 %{osm_france_link}",hotosm_name:"Humanitarian OpenStreetMap Team",layers:{data:"\u0414\u0430\u043d\u0456",gps:"\u041f\u0443\u0431\u043b\u0456\u0447\u043d\u0456 GPS-\u0442\u0440\u0435\u043a\u0438",header:"\u0428\u0430\u0440\u0438 \u043c\u0430\u043f\u0438",notes:"\u041d\u043e\u0442\u0430\u0442\u043a\u0438",overlays:"\u0423\u0432\u0456\u043c\u043a\u043d\u0456\u0442\u044c \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0456 \u0448\u0430\u0440\u0438 \u0434\u043b\u044f \u043f\u043e\u0448\u0443\u043a\u0443 \u0456 \u0443\u0441\u0443\u043d\u0435\u043d\u043d\u044f \u043f\u043e\u043c\u0438\u043b\u043e\u043a \u043d\u0430 \u043c\u0430\u043f\u0456",title:"\u0428\u0430\u0440\u0438"},make_a_donation:"\u041f\u0456\u0434\u0442\u0440\u0438\u043c\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0454\u043a\u0442",map:{marker:{title:"\u041c\u0456\u0442\u043a\u0430 \u043d\u0430 \u043c\u0430\u043f\u0456"},title:"\u041c\u0430\u043f\u0430"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u0417\u0431\u0456\u043b\u044c\u0448\u0438\u0442\u0438",zoom_out:"\u0417\u043c\u0435\u043d\u0448\u0438\u0442\u0438"},openmaptiles_credit:"\u0412\u0435\u043a\u0442\u043e\u0440\u043d\u0456 \u0442\u0430\u0439\u043b\u0438 \u0432\u0456\u0434 %{openmaptiles_link} \u0440\u043e\u0437\u043c\u0456\u0449\u0435\u043d\u0456 \u043d\u0430 %{maptiler_link}",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"\u0423\u0447\u0430\u0441\u043d\u0438\u043a\u0438 OpenStreetMap",osm_france:"OpenStreetMap France",popup:{close:"\u0417\u0430\u043a\u0440\u0438\u0442\u0438"},thunderforest_credit:"\u0422\u0430\u0439\u043b\u0438 %{thunderforest_link}",tracestrack:"Tracestrack",tracestrack_credit:"\u0422\u0430\u0439\u043b\u0438 \u043d\u0430\u0434\u0430\u044e\u0442\u044c\u0441\u044f %{tracestrack_link}",website_and_api_terms:"\u0423\u043c\u043e\u0432\u0438 \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u043d\u043d\u044f \u0432\u0435\u0431\u0441\u0430\u0439\u0442\u043e\u043c \u0442\u0430 API"}}},vi:{javascripts:{embed:{report_problem:"B\xe1o v\u1ea5n \u0111\u1ec1"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"B\u1eadt t\u1eaft L\u1eddi ghi c\xf4ng"},base:{cycle_map:"B\u1ea3n \u0111\u1ed3 Xe \u0111\u1ea1p",cyclosm:"CyclOSM",hot:"Nh\xe2n \u0111\u1ea1o Ch\u1ee7 ngh\u0129a",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"Chu\u1ea9n",tracestracktop_topo:"Tracestrack \u0110\u1ecba h\xecnh",transport_map:"B\u1ea3n \u0111\u1ed3 Giao th\xf4ng"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"Ki\u1ec3u m\u1ea3nh b\u1ea3n \u0111\u1ed3 do %{cyclosm_link} cung c\u1ea5p v\xe0 %{osm_france_link} l\u01b0u tr\u1eef",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{other:"B\u1ea1n \u0111ang c\xe1ch \u0111\u1ecba \u0111i\u1ec3m n\xe0y trong v\xf2ng %{count} b\u1ed9"},find_my_location:"Bay t\u1edbi V\u1ecb tr\xed c\u1ee7a T\xf4i",location_not_available:"V\u1ecb tr\xed kh\xf4ng c\xf3 s\u1eb5n",metersPopup:{other:"B\u1ea1n \u0111ang c\xe1ch \u0111\u1ecba \u0111i\u1ec3m n\xe0y trong v\xf2ng %{count} m\xe9t"}},hotosm_credit:"Ki\u1ec3u m\u1ea3nh b\u1ea3n \u0111\u1ed3 do %{hotosm_link} cung c\u1ea5p v\xe0 %{osm_france_link} l\u01b0u tr\u1eef",hotosm_name:"T\u1ed5 ch\u1ee9c Nh\xe2n \u0111\u1ea1o OpenStreetMap",layers:{data:"D\u1eef li\u1ec7u B\u1ea3n \u0111\u1ed3",gps:"Tuy\u1ebfn \u0111\u01b0\u1eddng GPS C\xf4ng khai",header:"L\u1edbp B\u1ea3n \u0111\u1ed3",notes:"Ghi ch\xfa B\u1ea3n \u0111\u1ed3",overlays:"B\u1eadt l\u1edbp ph\u1ee7 \u0111\u1ec3 g\u1ee1 l\u1ed7i tr\xean b\u1ea3n \u0111\u1ed3",title:"L\u1edbp"},make_a_donation:"Quy\xean g\xf3p",map:{marker:{title:"Ghim b\u1ea3n \u0111\u1ed3"},title:"B\u1ea3n \u0111\u1ed3"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"Ph\xf3ng to",zoom_out:"Thu nh\u1ecf"},openmaptiles_credit:"M\u1ea3nh b\u1ea3n \u0111\u1ed3 %{openmaptiles_link} do %{maptiler_link} cung c\u1ea5p",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"Ng\u01b0\u1eddi \u0111\xf3ng g\xf3p v\xe0o OpenStreetMap",osm_france:"OpenStreetMap Ph\xe1p",popup:{close:"\u0110\xf3ng"},thunderforest_credit:"M\u1ea3nh b\u1ea3n \u0111\u1ed3 do %{thunderforest_link} cung c\u1ea5p",tracestrack:"Tracestrack",tracestrack_credit:"M\u1ea3nh b\u1ea3n \u0111\u1ed3 do %{tracestrack_link} cung c\u1ea5p",website_and_api_terms:"\u0110i\u1ec1u kho\u1ea3n trang v\xe0 API"}}},"zh-CN":{javascripts:{embed:{report_problem:"\u62a5\u544a\u95ee\u9898"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"\u5207\u6362\u7f72\u540d"},base:{cycle_map:"\u9a91\u884c\u8fd0\u52a8\u5730\u56fe",cyclosm:"\u81ea\u884c\u8f66\u5730\u56fe",hot:"\u4eba\u9053\u6551\u63f4\u5730\u56fe",openmaptiles_osm:"MapTiler OMT",shortbread:"\u9ec4\u6cb9\u9165\u997c",standard:"\u6807\u51c6",tracestracktop_topo:"\u5730\u5f62\u5730\u8c8c\u5730\u56fe",transport_map:"\u4ea4\u901a\u8fd0\u8f93\u5730\u56fe"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"\u7531%{osm_france_link}\u6258\u7ba1\u7684%{cyclosm_link}\u7684\u56fe\u5757\u98ce\u683c",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"\u4f60\u5c31\u5728\u8fd9\u4e2a\u4f4d\u7f6e\u7684%{count}\u82f1\u5c3a\u8303\u56f4\u5185",other:"\u4f60\u5c31\u5728\u8fd9\u4e2a\u4f4d\u7f6e\u7684%{count}\u82f1\u5c3a\u8303\u56f4\u5185"},find_my_location:"\u663e\u793a\u6211\u7684\u4f4d\u7f6e",location_not_available:"\u4f4d\u7f6e\u4e0d\u53ef\u7528",metersPopup:{one:"\u4f60\u8ddd\u79bb\u8be5\u70b9%{count}\u7c73",other:"\u4f60\u8ddd\u79bb\u8be5\u70b9%{count}\u7c73"}},hotosm_credit:"\u7531%{osm_france_link}\u6258\u7ba1\u7684%{hotosm_link}\u56fe\u5757\u98ce\u683c",hotosm_name:"\u4eba\u9053\u4e3b\u4e49\u5f00\u653e\u8857\u56fe\u56e2\u961f",layers:{data:"\u5730\u56fe\u6570\u636e",gps:"\u516c\u5f00 GPS \u8f68\u8ff9",header:"\u5730\u56fe\u56fe\u5c42",notes:"\u5730\u56fe\u6ce8\u8bb0",overlays:"\u542f\u7528\u89e3\u51b3\u5730\u56fe\u95ee\u9898\u7684\u8986\u76d6\u5c42",title:"\u56fe\u5c42"},make_a_donation:"\u6350\u6b3e",map:{marker:{title:"\u5730\u56fe\u6807\u8bb0"},title:"\u5730\u56fe"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u653e\u5927",zoom_out:"\u7f29\u5c0f"},openmaptiles_credit:"\u6765\u81ea%{openmaptiles_link}\u7684\u77e2\u91cf\u56fe\u7816\uff0c\u7531%{maptiler_link}\u6258\u7ba1",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap \u8d21\u732e\u8005",osm_france:"OpenStreetMap \u6cd5\u56fd",popup:{close:"\u5173\u95ed"},thunderforest_credit:"%{thunderforest_link}\u63d0\u4f9b\u7684\u56fe\u5757",tracestrack:"\u8e2a\u8ff9\u5730\u56fe",tracestrack_credit:"%{tracestrack_link}\u63d0\u4f9b\u7684\u56fe\u5757",website_and_api_terms:"\u7f51\u7ad9\u548cAPI\u6761\u6b3e"}}},"zh-HK":{javascripts:{embed:{report_problem:"\u5831\u544a\u554f\u984c"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"Toggle Attribution"},base:{cycle_map:"\u55ae\u8eca\u5730\u5716",cyclosm:"CyclOSM",hot:"\u4eba\u9053\u5730\u5716",openmaptiles_osm:"MapTiler OMT",shortbread:"Shortbread",standard:"\u6a19\u6e96",tracestracktop_topo:"Tracestrack Topo",transport_map:"\u4ea4\u901a\u5730\u5716"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"\u5716\u584a\u7531%{cyclosm_link}\u8a2d\u8a08\uff0c\u4e26\u8499%{osm_france_link}\u5bc4\u5b58",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:"\u4f60\u8eab\u8655\u65bc\u6b64\u4f4d\u7f6e\u7684%{count}\u544e\u4ee5\u5167",find_my_location:"\u986f\u793a\u6211\u7684\u4f4d\u7f6e",location_not_available:"\u672a\u80fd\u63d0\u4f9b\u4f4d\u7f6e",metersPopup:"\u4f60\u8eab\u8655\u65bc\u6b64\u4f4d\u7f6e\u7684%{count}\u7c73\u4ee5\u5167"},hotosm_credit:"\u5716\u584a\u6a23\u5f0f\u7531%{hotosm_link}\u8a2d\u8a08\uff0c\u4e26\u8499%{osm_france_link}\u5bc4\u5b58",hotosm_name:"OpenStreetMap\u4eba\u9053\u4e3b\u7fa9\u5718\u968a",layers:{data:"\u5730\u5716\u6578\u64da",gps:"\u516c\u958bGPS\u8ecc\u8de1",header:"\u5730\u5716\u5716\u5c64",notes:"\u5730\u5716\u8a3b\u8a18",overlays:"\u986f\u793a\u758a\u52a0\u5716\u5c64\u4ee5\u4fbf\u6aa2\u67e5\u53ca\u4fee\u6b63\u5730\u5716",title:"\u5716\u5c64"},make_a_donation:"\u6350\u6b3e",map:{marker:{title:"Map marker"},title:"Map"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u653e\u5927",zoom_out:"\u7e2e\u5c0f"},openmaptiles_credit:"\u5411\u91cf\u5716\u584a\u4f86\u81ea%{openmaptiles_link}\uff0c\u4e26\u7531%{maptiler_link}\u5bc4\u5b58",openmaptiles_name:"OpenMapTiles",openstreetmap_contributors:"OpenStreetMap\u8ca2\u737b\u8005",osm_france:"OpenStreetMap\u6cd5\u570b",popup:{close:"\u95dc\u9589"},thunderforest_credit:"\u9cf4\u8b1d%{thunderforest_link}\u63d0\u4f9b\u5716\u584a",tracestrack:"Tracestrack",tracestrack_credit:"\u9cf4\u8b1d%{tracestrack_link}\u63d0\u4f9b\u5716\u584a",website_and_api_terms:"\u7db2\u7ad9\u53caAPI\u4f7f\u7528\u689d\u6b3e"}}},"zh-TW":{javascripts:{embed:{report_problem:"\u56de\u5831\u554f\u984c"},map:{andy_allan:"Andy Allan",attribution_control:{toggle_attribution:"\u5207\u63db\u7f72\u540d"},base:{cycle_map:"\u81ea\u884c\u8eca\u5730\u5716",cyclosm:"CyclOSM",hot:"\u4eba\u9053\u6551\u63f4",openmaptiles_osm:"MapTiler OMT",shortbread:"\u5976\u6cb9\u9165\u9905",standard:"\u6a19\u6e96",tracestracktop_topo:"\u8e64\u8de1\u5730\u5716\u5730\u5f62",transport_map:"\u4ea4\u901a\u904b\u8f38\u5730\u5716"},copyright_text:"\xa9 %{copyright_link}",cyclosm_credit:"\u7531 %{osm_france_link} \u4ee3\u7ba1\u7684 %{cyclosm_link} \u6240\u63d0\u4f9b\u5716\u78da\u6a23\u5f0f",cyclosm_name:"CyclOSM",geolocate_control:{feetPopup:{one:"\u4f60\u8ddd\u96e2\u6b64\u5730\u9ede\u4e0d\u5230 %{count} \u82f1\u5c3a",other:"\u4f60\u8ddd\u96e2\u6b64\u5730\u9ede\u4e0d\u5230 %{count} \u82f1\u5c3a"},find_my_location:"\u986f\u793a\u6211\u7684\u4f4d\u7f6e",location_not_available:"\u4f4d\u7f6e\u4e0d\u53ef\u7528",metersPopup:{one:"\u4f60\u8ddd\u96e2\u6b64\u5730\u9ede\u4e0d\u5230 %{count} \u516c\u5c3a",other:"\u4f60\u8ddd\u96e2\u6b64\u5730\u9ede\u4e0d\u5230 %{count} \u516c\u5c3a"}},hotosm_credit:"\u7531 %{osm_france_link} \u4ee3\u7ba1\u7684 %{hotosm_link} \u6240\u63d0\u4f9b\u5716\u78da\u6a23\u5f0f",hotosm_name:"\u958b\u653e\u8857\u5716\u4eba\u9053\u4e3b\u7fa9\u5718\u968a",layers:{data:"\u5730\u5716\u8cc7\u6599",gps:"\u516c\u958bGPS\u8ecc\u8de1",header:"\u5730\u5716\u5716\u5c64",notes:"\u5730\u5716\u8a3b\u8a18",overlays:"\u958b\u555f\u8986\u84cb\u5c64\uff0c\u4ee5\u70ba\u5730\u5716\u89e3\u6c7a\u554f\u984c",title:"\u5716\u5c64"},make_a_donation:"\u6350\u6b3e",map:{marker:{title:"\u5730\u5716\u6a19\u8a18"},title:"\u5730\u5716"},maptiler_name:"MapTiler",navigation_control:{zoom_in:"\u653e\u5927",zoom_out:"\u7e2e\u5c0f"},openmaptiles_credit:"\u4f86\u81ea%{openmaptiles_link}\u7684\u5411\u91cf\u5716\u78da\u7531%{maptiler_link}\u63d0\u4f9b",openmaptiles_name:"\u958b\u653e\u5730\u5716\u5716\u78da",openstreetmap_contributors:"\u958b\u653e\u8857\u5716\u8ca2\u737b\u8005",osm_france:"\u958b\u653e\u8857\u5716\u6cd5\u570b",popup:{close:"\u95dc\u9589"},thunderforest_credit:"%{thunderforest_link} \u63d0\u4f9b\u7684\u5716\u78da",tracestrack:"\u8e64\u8de1\u5730\u5716",tracestrack_credit:"%{tracestrack_link} \u63d0\u4f9b\u7684\u5716\u78da",website_and_api_terms:"\u7db2\u7ad9\u548c API \u689d\u6b3e"}}}}),OSM.MapLibre.AttributionControl=class extends maplibregl.AttributionControl{constructor({includeReportLink:t,credit:e,...i}={}){t&&(i.compact=!1),super(i),this._map=null,this._container=null,this._includeReportLink=Boolean(t),this._credit=e}_updateAttributions(){if(!this._map.style)return;let t="";if(this._includeReportLink&&this._map.loaded()){const e=document.createElement("a");e.href="/fixthemap",e.target="_blank",e.rel="noopener noreferrer",e.className="maplibregl-ctrl-attrib-report-link",e.textContent=OSM.i18n.t("javascripts.embed.report_problem"),t+=e.outerHTML+" | "}const e=document.createElement("a");e.href="/copyright",e.textContent=OSM.i18n.t("javascripts.map.openstreetmap_contributors"),t+=OSM.i18n.t("javascripts.map.copyright_text",{copyright_link:e.outerHTML}),this._credit&&(t+=this._credit.donate?" \u2665\ufe0f ":". ",t+=this._buildCreditHtml(this._credit)),t+=". ";const i=document.createElement("a");i.href="https://wiki.osmfoundation.org/wiki/Terms_of_Use",i.target="_blank",i.rel="noopener noreferrer",i.textContent=OSM.i18n.t("javascripts.map.website_and_api_terms"),t+=i.outerHTML,t!==this._attribHTML&&(this._innerContainer.innerHTML=t,this._attribHTML=t,this._updateCompact(),this._includeReportLink&&this._updateReportLink())}_buildCreditHtml(t){const e={};for(const i in t.children)e[i]=this._buildCreditHtml(t.children[i]);const i=OSM.i18n.t(`javascripts.map.${t.id}`,e);if(!t.href)return i;const r=document.createElement("a");return r.href=t.href,r.textContent=i,t.donate?r.className="donate-attr":(r.target="_blank",r.rel="noopener noreferrer"),r.outerHTML}onAdd(t){return this._map=t,this._includeReportLink&&(t.once("load",this._updateAttributions.bind(this)),t.on("moveend",this._updateReportLink.bind(this))),super.onAdd(t)}onRemove(){this._map&&(this._includeReportLink&&this._map.off("moveend",this._updateReportLink.bind(this)),this._map=null,super.onRemove())}_updateReportLink(){if(!this._container)return;const t=this._container.querySelector(".maplibregl-ctrl-attrib-report-link");if(!t)return;const e=this._map.getCenter(),i=new URLSearchParams({lat:e.lat.toFixed(5),lon:e.lng.toFixed(5),zoom:Math.floor(this._map.getZoom())});t.href=`/fixthemap?${i.toString()}`}},OSM.MapLibre.CombinedControlGroup=class{constructor(t){this.controls=t,this.containers=[]}onAdd(t){this._container=document.createElement("div"),this._container.className="maplibregl-ctrl maplibregl-ctrl-group";for(const e of this.controls){const i=e.onAdd(t);this.containers.push(i);const r=i.querySelectorAll("button"),o={"zoom-in":"plus-lg","zoom-out":"dash-lg",geolocate:"cursor-fill"};r.forEach(t=>{const e=t.className.match(/maplibregl-ctrl-([\w-]+)/);if(e){const i=e[1],r=o[i];if(r){const e=document.createElement("i");e.className=`maplibregl-ctrl-icon fs-5 bi bi-${r}`,t.replaceChildren(e)}}this._container.appendChild(t)})}return this._container}onRemove(){for(const t of this.controls)t.onRemove?.();this._container&&this._container.remove()}},OSM.MapLibre.GeolocateControl=class extends maplibregl.GeolocateControl{constructor({positionOptions:t={},...e}={}){super({positionOptions:{enableHighAccuracy:!0,...t},trackUserLocation:!0,...e})}},OSM.MapLibre.NavigationControl=class extends maplibregl.NavigationControl{constructor(t={}){super({showCompass:!1,...t})}},OSM.MapLibre.Marker=class extends maplibregl.Marker{constructor({icon:t="dot",color:e="var(--marker-red)",...i}={}){const r=document.createElement("div");r.className="maplibre-gl-marker",r.style.width="25px",r.style.height="40px";const o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("viewBox","0 0 25 40"),o.setAttribute("width","25"),o.setAttribute("height","40"),o.classList.add("pe-none"),o.style.overflow="visible";const n=document.createElementNS("http://www.w3.org/2000/svg","use");n.setAttribute("href","#pin-shadow");const a=document.createElementNS("http://www.w3.org/2000/svg","use");a.setAttribute("href",`#pin-${t}`),a.setAttribute("color",e),a.classList.add("pe-auto"),o.appendChild(n),o.appendChild(a),r.appendChild(o),super({element:r,anchor:"bottom",offset:[0,0],...i})}},OSM.MapLibre.Popup=class extends maplibregl.Popup{constructor(t){super({offset:{bottom:[0,-45],"bottom-left":[0,-45],"bottom-right":[0,-45],top:[0,5],"top-left":[0,5],"top-right":[0,5],right:[-15,-10],left:[15,-10]},...t})}},maplibregl.Map.prototype._getUIString=function(t){const e=t.replaceAll(/(?<=\w)[A-Z]/g,"_$&").toLowerCase();return OSM.i18n.t(`javascripts.map.${e}`)},OSM.MapLibre.showWebGLError=function(t){const e="string"==typeof t?document.getElementById(t):t;e&&fetch("/panes/webgl_error").then(t=>t.text()).then(t=>e.innerHTML=t)},OSM.MapLibre.Map=class extends maplibregl.Map{constructor({allowRotation:t,...e}={}){const i={};let r;!1===t&&Object.assign(i,{rollEnabled:!1,dragRotate:!1,pitchWithRotate:!1,bearingSnap:180});try{r=super({validateStyle:!1,...i,...e})}catch(t){throw"webglcontextcreationerror"===JSON.parse(t.message).type&&OSM.MapLibre.showWebGLError(e.container),t}return!1===t&&(r.touchZoomRotate.disableRotation(),r.keyboard.disableRotation()),r}},OSM.MapLibre.SecondaryMap=class extends OSM.MapLibre.Map{constructor(t={}){const e=11;super({container:"map",style:OSM.LAYER_DEFINITIONS[0].style,attributionControl:!1,allowRotation:!1,maxPitch:0,center:OSM.home?[OSM.home.lon,OSM.home.lat]:[0,0],zoom:OSM.home?e:0,zoomSnap:1,...t})}},navigator.languages?OSM.i18n.locale=navigator.languages[0]:navigator.language&&(OSM.i18n.locale=navigator.language),OSM.i18n.defaultLocale="en",OSM.i18n.enableFallback=!0,window.onload=function(){const t=new URLSearchParams(location.search),e="dark"===t.get("theme")||"light"!==t.get("theme")&&window.matchMedia("(prefers-color-scheme: dark)").matches,i={mapnik:{style:{version:8,sources:{"raster-tiles-mapnik":{type:"raster",tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256,maxzoom:19}},layers:[{id:"raster-tiles-layer-mapnik",type:"raster",source:"raster-tiles-mapnik"}]},credit:{id:"make_a_donation",href:"https://supporting.openstreetmap.org",donate:!0}},cyclosm:{style:{version:8,sources:{"raster-tiles-cyclosm":{type:"raster",tiles:["https://a.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png","https://b.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png","https://c.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png"],tileSize:256,maxzoom:20}},layers:[{id:"raster-tiles-layer-cyclosm",type:"raster",source:"raster-tiles-cyclosm"}]},credit:{id:"cyclosm_credit",children:{cyclosm_link:{id:"cyclosm_name",href:"https://www.cyclosm.org"},osm_france_link:{id:"osm_france",href:"https://openstreetmap.fr/"}}}},cyclemap:{style:{version:8,sources:{"raster-tiles-cyclemap":{type:"raster",tiles:["https://api.thunderforest.com/cycle/{z}/{x}/{y}{ratio}.png?apikey=6e5478c8a4f54c779f85573c0e399391"],tileSize:256,maxzoom:21}},layers:[{id:"raster-tiles-layer-cyclemap",type:"raster",source:"raster-tiles-cyclemap"}]},credit:{id:"thunderforest_credit",children:{thunderforest_link:{id:"andy_allan",href:"https://www.thunderforest.com/"}}}},transportmap:{style:"https://api.thunderforest.com/styles/transport/style.json?apikey=6e5478c8a4f54c779f85573c0e399391",styleDark:"https://api.thunderforest.com/styles/transport-dark/style.json?apikey=6e5478c8a4f54c779f85573c0e399391",isVectorStyle:!0,credit:{id:"thunderforest_credit",children:{thunderforest_link:{id:"andy_allan",href:"https://www.thunderforest.com/"}}}},hot:{style:{version:8,sources:{"raster-tiles-hot":{type:"raster",tiles:["https://tile-a.openstreetmap.fr/hot/{z}/{x}/{y}.png","https://tile-b.openstreetmap.fr/hot/{z}/{x}/{y}.png","https://tile-c.openstreetmap.fr/hot/{z}/{x}/{y}.png"],tileSize:256,maxzoom:20}},layers:[{id:"raster-tiles-layer-hot",type:"raster",source:"raster-tiles-hot"}]},credit:{id:"hotosm_credit",children:{hotosm_link:{id:"hotosm_name",href:"https://www.hotosm.org/"},osm_france_link:{id:"osm_france",href:"https://openstreetmap.fr/"}}}},shortbread:{style:"https://vector.openstreetmap.org/styles/svwd/svwd03style.json",isVectorStyle:!0,credit:{id:"make_a_donation",href:"https://supporting.openstreetmap.org",donate:!0}}},r=i[(t.get("layer")||"").replaceAll(" ","")]||i.mapnik,o=e&&r.styleDark?r.styleDark:r.style,n=new OSM.MapLibre.Map({container:"map",style:o,attributionControl:!1,allowRotation:r.isVectorStyle,zoomSnap:r.isVectorStyle?0:1}),a=(t.get("bbox")||"-180,-90,180,90").split(",");n.fitBounds([[a[0],a[1]],[a[2],a[3]]],{animate:!1});const s="rtl"===document.documentElement.dir?"left":"right",l=new OSM.MapLibre.AttributionControl({credit:r.credit,includeReportLink:!0});n.addControl(l,`bottom-${s}`);const c=new OSM.MapLibre.NavigationControl;if(n.addControl(new OSM.MapLibre.CombinedControlGroup([c]),`top-${s}`),t.has("marker")){const e=t.get("marker").split(",").map(parseFloat);new OSM.MapLibre.Marker({color:"#9cef11"}).setLngLat([e[1],e[0]]).addTo(n)}};