vendor: 15,841 bytes, line 1
1import{g as Sf,c as Tf}from"./client-shared.production.js";function If(vs,Pu){for(var xn=0;xn<Pu.length;xn++){const Di=Pu[xn];if(typeof Di!="string"&&!Array.isArray(Di)){for(const bn in Di)if(bn!=="default"&&!(bn in vs)){const ko=Object.getOwnPropertyDescriptor(Di,bn);ko&&Object.defineProperty(vs,bn,ko.get?ko:{enumerable:!0,get:()=>Di[bn]})}}}return Object.freeze(Object.defineProperty(vs,Symbol.toStringTag,{value:"Module"}))}var jp={exports:{}};(function(vs,Pu){(function(xn,Di){vs.exports=Di()})(Tf,function(){var xn,Di,bn;function ko(u,qr){if(!xn)xn=qr;else if(!Di)Di=qr;else{var ce="var sharedChunk = {}; ("+xn+")(sharedChunk); ("+Di+")(sharedChunk);",$t={};xn($t),bn=qr($t),typeof window<"u"&&(bn.workerUrl=window.URL.createObjectURL(new Blob([ce],{type:"text/javascript"})))}}return ko(["exports"],function(u){function qr(e,t){return e(t={exports:{}},t.exports),t.exports}var ce=$t;function $t(e,t,r,a){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(a-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=a,this.p2x=r,this.p2y=a}$t.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},$t.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},$t.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},$t.prototype.solveCurveX=function(e,t){var r,a,l,c,h;for(t===void 0&&(t=1e-6),l=e,h=0;h<8;h++){if(c=this.sampleCurveX(l)-e,Math.abs(c)<t)return l;var m=this.sampleCurveDerivativeX(l);if(Math.abs(m)<1e-6)break;l-=c/m}if((l=e)<(r=0))return r;if(l>(a=1))return a;for(;r<a;){if(c=this.sampleCurveX(l),Math.abs(c-e)<t)return l;e>c?r=l:a=l,l=.5*(a-r)+r}return l},$t.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var je=Si;function Si(e,t){this.x=e,this.y=t}Si.prototype={clone:function(){return new Si(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=t,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),r=Math.sin(e),a=r*this.x+t*this.y;return this.x=t*this.x-r*this.y,this.y=a,this},_rotateAround:function(e,t){var r=Math.cos(e),a=Math.sin(e),l=t.y+a*(this.x-t.x)+r*(this.y-t.y);return this.x=t.x+r*(this.x-t.x)-a*(this.y-t.y),this.y=l,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Si.convert=function(e){return e instanceof Si?e:Array.isArray(e)?new Si(e[0],e[1]):e};var ze=typeof self<"u"?self:{},xs=Math.pow(2,53)-1;function Hr(e,t,r,a){var l=new ce(e,t,r,a);return function(c){return l.solve(c)}}var wn=Hr(.25,.1,.25,1);function Dr(e,t,r){return Math.min(r,Math.max(t,e))}function Mo(e,t,r){var a=r-t,l=((e-t)%a+a)%a+t;return l===t?r:l}function sr(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var a=0,l=t;a<l.length;a+=1){var c=l[a];for(var h in c)e[h]=c[h]}return e}var _a=1;function to(){return _a++}function Li(){return function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}()}function ro(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function io(e,t){e.forEach(function(r){t[r]&&(t[r]=t[r].bind(t))})}function Sn(e,t){return e.indexOf(t,e.length-t.length)!==-1}function mr(e,t,r){var a={};for(var l in e)a[l]=t.call(r||this,e[l],l,e);return a}function Bi(e,t,r){var a={};for(var l in e)t.call(r||this,e[l],l,e)&&(a[l]=e[l]);return a}function ci(e){return Array.isArray(e)?e.map(ci):typeof e=="object"&&e?mr(e,ci):e}var no={};function kt(e){no[e]||(typeof console<"u"&&console.warn(e),no[e]=!0)}function Lr(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function ga(e){for(var t=0,r=0,a=e.length,l=a-1,c=void 0,h=void 0;r<a;l=r++)t+=((h=e[l]).x-(c=e[r]).x)*(c.y+h.y);return t}function pi(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function oo(e){var t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(a,l,c,h){var m=c||h;return t[l]=!m||m.toLowerCase(),""}),t["max-age"]){var r=parseInt(t["max-age"],10);isNaN(r)?delete t["max-age"]:t["max-age"]=r}return t}var ao=null;function va(e){if(ao==null){var t=e.navigator?e.navigator.userAgent:null;ao=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return ao}function Wi(e){try{var t=ze[e];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch{return!1}}var hi,Ti,Tn,In,Ki=ze.performance&&ze.performance.now?ze.performance.now.bind(ze.performance):Date.now.bind(Date),bs=ze.requestAnimationFrame||ze.mozRequestAnimationFrame||ze.webkitRequestAnimationFrame||ze.msRequestAnimationFrame,yr=ze.cancelAnimationFrame||ze.mozCancelAnimationFrame||ze.webkitCancelAnimationFrame||ze.msCancelAnimationFrame,Ri={now:Ki,frame:function(e){var t=bs(e);return{cancel:function(){return yr(t)}}},getImageData:function(e,t){t===void 0&&(t=0);var r=ze.document.createElement("canvas"),a=r.getContext("2d");if(!a)throw new Error("failed to create canvas 2d context");return r.width=e.width,r.height=e.height,a.drawImage(e,0,0,e.width,e.height),a.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:function(e){return hi||(hi=ze.document.createElement("a")),hi.href=e,hi.href},hardwareConcurrency:ze.navigator&&ze.navigator.hardwareConcurrency||4,get devicePixelRatio(){return ze.devicePixelRatio},get prefersReducedMotion(){return!!ze.matchMedia&&(Ti==null&&(Ti=ze.matchMedia("(prefers-reduced-motion: reduce)")),Ti.matches)}},yt={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Ii={supported:!1,testSupport:function(e){!so&&In&&(fi?$e(e):Tn=e)}},so=!1,fi=!1;function $e(e){var t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,In),e.isContextLost())return;Ii.supported=!0}catch{}e.deleteTexture(t),so=!0}ze.document&&((In=ze.document.createElement("img")).onload=function(){Tn&&$e(Tn),Tn=null,fi=!0},In.onerror=function(){so=!0,Tn=null},In.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var Hi="01",Er=function(e,t){this._transformRequestFn=e,this._customAccessToken=t,this._createSkuToken()};function Jr(e){return e.indexOf("mapbox:")===0}Er.prototype._createSkuToken=function(){var e=function(){for(var t="",r=0;r<10;r++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",Hi,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},Er.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Er.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},Er.prototype.normalizeStyleURL=function(e,t){if(!Jr(e))return e;var r=Yr(e);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},Er.prototype.normalizeGlyphsURL=function(e,t){if(!Jr(e))return e;var r=Yr(e);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},Er.prototype.normalizeSourceURL=function(e,t){if(!Jr(e))return e;var r=Yr(e);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||t)},Er.prototype.normalizeSpriteURL=function(e,t,r,a){var l=Yr(e);return Jr(e)?(l.path="/styles/v1"+l.path+"/sprite"+t+r,this._makeAPIURL(l,this._customAccessToken||a)):(l.path+=""+t+r,En(l))},Er.prototype.normalizeTileURL=function(e,t){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!Jr(e))return e;var r=Yr(e);r.path=r.path.replace(/(\.(png|jpg)\d*)(?=$)/,(Ri.devicePixelRatio>=2||t===512?"@2x":"")+(Ii.supported?".webp":"$1")),r.path=r.path.replace(/^.+\/v4\//,"/"),r.path="/v4"+r.path;var a=this._customAccessToken||function(l){for(var c=0,h=l;c<h.length;c+=1){var m=h[c].match(/^access_token=(.*)$/);if(m)return m[1]}return null}(r.params)||yt.ACCESS_TOKEN;return yt.REQUIRE_ACCESS_TOKEN&&a&&this._skuToken&&r.params.push("sku="+this._skuToken),this._makeAPIURL(r,a)},Er.prototype.canonicalizeTileURL=function(e,t){var r=Yr(e);if(!r.path.match(/(^\/v4\/)/)||!r.path.match(/\.[\w]+$/))return e;var a="mapbox://tiles/";a+=r.path.replace("/v4/","");var l=r.params;return t&&(l=l.filter(function(c){return!c.match(/^access_token=/)})),l.length&&(a+="?"+l.join("&")),a},Er.prototype.canonicalizeTileset=function(e,t){for(var r=!!t&&Jr(t),a=[],l=0,c=e.tiles||[];l<c.length;l+=1){var h=c[l];di(h)?a.push(this.canonicalizeTileURL(h,r)):a.push(h)}return a},Er.prototype._makeAPIURL=function(e,t){var r="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",a=Yr(yt.API_URL);if(e.protocol=a.protocol,e.authority=a.authority,e.protocol==="http"){var l=e.params.indexOf("secure");l>=0&&e.params.splice(l,1)}if(a.path!=="/"&&(e.path=""+a.path+e.path),!yt.REQUIRE_ACCESS_TOKEN)return En(e);if(!(t=t||yt.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+r);if(t[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+r);return e.params=e.params.filter(function(c){return c.indexOf("access_token")===-1}),e.params.push("access_token="+t),En(e)};var ws=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function di(e){return ws.test(e)}var Do=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Yr(e){var t=e.match(Do);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function En(e){var t=e.params.length?"?"+e.params.join("&"):"";return e.protocol+"://"+e.authority+e.path+t}function lo(e){if(!e)return null;var t=e.split(".");if(!t||t.length!==3)return null;try{return JSON.parse(decodeURIComponent(ze.atob(t[1]).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join("")))}catch{return null}}var Qr=function(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};Qr.prototype.getStorageKey=function(e){var t,r=lo(yt.ACCESS_TOKEN);return t=r&&r.u?ze.btoa(encodeURIComponent(r.u).replace(/%([0-9A-F]{2})/g,function(a,l){return String.fromCharCode(+("0x"+l))})):yt.ACCESS_TOKEN||"",e?"mapbox.eventData."+e+":"+t:"mapbox.eventData:"+t},Qr.prototype.fetchEventData=function(){var e=Wi("localStorage"),t=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{var a=ze.localStorage.getItem(t);a&&(this.eventData=JSON.parse(a));var l=ze.localStorage.getItem(r);l&&(this.anonId=l)}catch{kt("Unable to read from LocalStorage")}},Qr.prototype.saveEventData=function(){var e=Wi("localStorage"),t=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{ze.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&ze.localStorage.setItem(t,JSON.stringify(this.eventData))}catch{kt("Unable to write to LocalStorage")}},Qr.prototype.processRequests=function(e){},Qr.prototype.postEvent=function(e,t,r,a){var l=this;if(yt.EVENTS_URL){var c=Yr(yt.EVENTS_URL);c.params.push("access_token="+(a||yt.ACCESS_TOKEN||""));var h={event:this.type,created:new Date(e).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.13.3",skuId:Hi,userId:this.anonId},m=t?sr(h,t):h,_={url:En(c),headers:{"Content-Type":"text/plain"},body:JSON.stringify([m])};this.pendingRequest=Bt(_,function(g){l.pendingRequest=null,r(g),l.saveEventData(),l.processRequests(a)})}},Qr.prototype.queueRequest=function(e,t){this.queue.push(e),this.processRequests(t)};var $r,An,mi=function(e){function t(){e.call(this,"map.load"),this.success={},this.skuToken=""}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.postMapLoadEvent=function(r,a,l,c){this.skuToken=l;var h=!(!c&&!yt.ACCESS_TOKEN),m=Array.isArray(r)&&r.some(function(_){return Jr(_)||di(_)});yt.EVENTS_URL&&h&&m&&this.queueRequest({id:a,timestamp:Date.now()},c)},t.prototype.processRequests=function(r){var a=this;if(!this.pendingRequest&&this.queue.length!==0){var l=this.queue.shift(),c=l.id,h=l.timestamp;c&&this.success[c]||(this.anonId||this.fetchEventData(),ro(this.anonId)||(this.anonId=Li()),this.postEvent(h,{skuToken:this.skuToken},function(m){m||c&&(a.success[c]=!0)},r))}},t}(Qr),xa=new(function(e){function t(r){e.call(this,"appUserTurnstile"),this._customAccessToken=r}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.postTurnstileEvent=function(r,a){yt.EVENTS_URL&&yt.ACCESS_TOKEN&&Array.isArray(r)&&r.some(function(l){return Jr(l)||di(l)})&&this.queueRequest(Date.now(),a)},t.prototype.processRequests=function(r){var a=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var l=lo(yt.ACCESS_TOKEN),c=l?l.u:yt.ACCESS_TOKEN,h=c!==this.eventData.tokenU;ro(this.anonId)||(this.anonId=Li(),h=!0);var m=this.queue.shift();if(this.eventData.lastSuccess){var _=new Date(this.eventData.lastSuccess),g=new Date(m),x=(m-this.eventData.lastSuccess)/864e5;h=h||x>=1||x<-1||_.getDate()!==g.getDate()}else h=!0;if(!h)return this.processRequests();this.postEvent(m,{"enabled.telemetry":!1},function(b){b||(a.eventData.lastSuccess=m,a.eventData.tokenU=c)},r)}},t}(Qr)),ba=xa.postTurnstileEvent.bind(xa),Lo=new mi,Bo=Lo.postMapLoadEvent.bind(Lo),uo=500,wa=50;function co(){ze.caches&&!$r&&($r=ze.caches.open("mapbox-tiles"))}function Ro(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}var zn,Oo=1/0;function Fo(){return zn==null&&(zn=ze.OffscreenCanvas&&new ze.OffscreenCanvas(1,1).getContext("2d")&&typeof ze.createImageBitmap=="function"),zn}var Sa={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(Sa);var Ta=function(e){function t(r,a,l){a===401&&di(l)&&(r+=": you may have provided an invali
1d Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),e.call(this,r),this.status=a,this.url=l,this.name=this.constructor.name,this.message=r}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},t}(Error),Pn=pi()?function(){return self.worker&&self.worker.referrer}:function(){return(ze.location.protocol==="blob:"?ze.parent:ze).location.href},Oi,Fi,po=function(e,t){if(!(/^file:/.test(r=e.url)||/^file:/.test(Pn())&&!/^\w+:/.test(r))){if(ze.fetch&&ze.Request&&ze.AbortController&&ze.Request.prototype.hasOwnProperty("signal"))return function(a,l){var c,h=new ze.AbortController,m=new ze.Request(a.url,{method:a.method||"GET",body:a.body,credentials:a.credentials,headers:a.headers,referrer:Pn(),signal:h.signal}),_=!1,g=!1,x=(c=m.url).indexOf("sku=")>0&&di(c);a.type==="json"&&m.headers.set("Accept","application/json");var b=function(A,L,B){if(!g){if(A&&A.message!=="SecurityError"&&kt(A),L&&B)return I(L);var q=Date.now();ze.fetch(m).then(function(V){if(V.ok){var W=x?V.clone():null;return I(V,W,q)}return l(new Ta(V.statusText,V.status,a.url))}).catch(function(V){V.code!==20&&l(new Error(V.message))})}},I=function(A,L,B){(a.type==="arrayBuffer"?A.arrayBuffer():a.type==="json"?A.json():A.text()).then(function(q){g||(L&&B&&function(V,W,J){if(co(),$r){var Y={status:W.status,statusText:W.statusText,headers:new ze.Headers};W.headers.forEach(function(ne,ue){return Y.headers.set(ue,ne)});var $=oo(W.headers.get("Cache-Control")||"");$["no-store"]||($["max-age"]&&Y.headers.set("Expires",new Date(J+1e3*$["max-age"]).toUTCString()),new Date(Y.headers.get("Expires")).getTime()-J<42e4||function(ne,ue){if(An===void 0)try{new Response(new ReadableStream),An=!0}catch{An=!1}An?ue(ne.body):ne.blob().then(ue)}(W,function(ne){var ue=new ze.Response(ne,Y);co(),$r&&$r.then(function(fe){return fe.put(Ro(V.url),ue)}).catch(function(fe){return kt(fe.message)})}))}}(m,L,B),_=!0,l(null,q,A.headers.get("Cache-Control"),A.headers.get("Expires")))}).catch(function(q){g||l(new Error(q.message))})};return x?function(A,L){if(co(),!$r)return L(null);var B=Ro(A.url);$r.then(function(q){q.match(B).then(function(V){var W=function(J){if(!J)return!1;var Y=new Date(J.headers.get("Expires")||0),$=oo(J.headers.get("Cache-Control")||"");return Y>Date.now()&&!$["no-cache"]}(V);q.delete(B),W&&q.put(B,V.clone()),L(null,V,W)}).catch(L)}).catch(L)}(m,b):b(null,null),{cancel:function(){g=!0,_||h.abort()}}}(e,t);if(pi()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t,void 0,!0)}var r;return function(a,l){var c=new ze.XMLHttpRequest;for(var h in c.open(a.method||"GET",a.url,!0),a.type==="arrayBuffer"&&(c.responseType="arraybuffer"),a.headers)c.setRequestHeader(h,a.headers[h]);return a.type==="json"&&(c.responseType="text",c.setRequestHeader("Accept","application/json")),c.withCredentials=a.credentials==="include",c.onerror=function(){l(new Error(c.statusText))},c.onload=function(){if((c.status>=200&&c.status<300||c.status===0)&&c.response!==null){var m=c.response;if(a.type==="json")try{m=JSON.parse(c.response)}catch(_){return l(_)}l(null,m,c.getResponseHeader("Cache-Control"),c.getResponseHeader("Expires"))}else l(new Ta(c.statusText,c.status,a.url))},c.send(a.body),{cancel:function(){return c.abort()}}}(e,t)},Uo=function(e,t){return po(sr(e,{type:"arrayBuffer"}),t)},Bt=function(e,t){return po(sr(e,{method:"POST"}),t)},w="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";Oi=[],Fi=0;var T=function(e,t){if(Ii.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),Fi>=yt.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:e,callback:t,cancelled:!1,cancel:function(){this.cancelled=!0}};return Oi.push(r),r}Fi++;var a=!1,l=function(){if(!a)for(a=!0,Fi--;Oi.length&&Fi<yt.MAX_PARALLEL_IMAGE_REQUESTS;){var h=Oi.shift();h.cancelled||(h.cancel=T(h.requestParameters,h.callback).cancel)}},c=Uo(e,function(h,m,_,g){l(),h?t(h):m&&(Fo()?function(x,b){var I=new ze.Blob([new Uint8Array(x)],{type:"image/png"});ze.createImageBitmap(I).then(function(A){b(null,A)}).catch(function(A){b(new Error("Could not load image because of "+A.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}(m,t):function(x,b,I,A){var L=new ze.Image,B=ze.URL;L.onload=function(){b(null,L),B.revokeObjectURL(L.src),L.onload=null,ze.requestAnimationFrame(function(){L.src=w})},L.onerror=function(){return b(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var q=new ze.Blob([new Uint8Array(x)],{type:"image/png"});L.cacheControl=I,L.expires=A,L.src=x.byteLength?B.createObjectURL(q):w}(m,t,_,g))});return{cancel:function(){c.cancel(),l()}}};function E(e,t,r){r[e]&&r[e].indexOf(t)!==-1||(r[e]=r[e]||[],r[e].push(t))}function M(e,t,r){if(r&&r[e]){var a=r[e].indexOf(t);a!==-1&&r[e].splice(a,1)}}var O=function(e,t){t===void 0&&(t={}),sr(this,t),this.type=e},Z=function(e){function t(r,a){a===void 0&&(a={}),e.call(this,"error",sr({error:r},a))}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t}(O),X=function(){};X.prototype.on=function(e,t){return this._listeners=this._listeners||{},E(e,t,this._listeners),this},X.prototype.off=function(e,t){return M(e,t,this._listeners),M(e,t,this._oneTimeListeners),this},X.prototype.once=function(e,t){return this._oneTimeListeners=this._oneTimeListeners||{},E(e,t,this._oneTimeListeners),this},X.prototype.fire=function(e,t){typeof e=="string"&&(e=new O(e,t||{}));var r=e.type;if(this.listens(r)){e.target=this;for(var a=0,l=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];a<l.length;a+=1)l[a].call(this,e);for(var c=0,h=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];c<h.length;c+=1){var m=h[c];M(r,m,this._oneTimeListeners),m.call(this,e)}var _=this._eventedParent;_&&(sr(e,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),_.fire(e))}else e instanceof Z&&console.error(e.error);return this},X.prototype.listens=function(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},X.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this};var P
vendor: 19,005 bytes, line 1
1={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}
vendor: 9,823 bytes, line 1
1,"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}}
1,U=function(e,t,r,a){this.message=(e?e+": ":"")+r,a&&(this.identifier=a),t!=null&&t.__line__&&(this.line=t.__line__)};function H(e){var t=e.value;return t?[new U(e.key,t,"constants have been deprecated as of v8")]:[]}function ae(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var a=0,l=t;a<l.length;a+=1){var c=l[a];for(var h in c)e[h]=c[h]}return e}function le(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function re(e){if(Array.isArray(e))return e.map(re);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){var t={};for(var r in e)t[r]=re(e[r]);return t}return le(e)}var se=function(e){function t(r,a){e.call(this,a),this.message=a,this.key=r}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t}(Error),Ie=function(e,t){t===void 0&&(t=[]),this.parent=e,this.bindings={};for(var r=0,a=t;r<a.length;r+=1){var l=a[r];this.bindings[l[0]]=l[1]}};Ie.prototype.concat=function(e){return new Ie(this,e)},Ie.prototype.get=function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(e+" not found in scope.")},Ie.prototype.has=function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)};var Se={kind:"null"},ie={kind:"number"},xe={kind:"string"},de={kind:"boolean"},ye={kind:"color"},We={kind:"object"},ge={kind:"value"},et={kind:"collator"},_t={kind:"formatted"},He={kind:"resolvedImage"};function lt(e,t){return{kind:"array",itemType:e,N:t}}function rt(e){if(e.kind==="array"){var t=rt(e.itemType);return typeof e.N=="number"?"array<"+t+", "+e.N+">":e.itemType.kind==="value"?"array":"array<"+t+">"}return e.kind}var _r=[Se,ie,xe,de,ye,_t,We,lt(ge),He];function pt(e,t){if(t.kind==="error")return null;if(e.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!pt(e.itemType,t.itemType))&&(typeof e.N!="number"||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if(e.kind==="value"){for(var r=0,a=_r;r<a.length;r+=1)if(!pt(a[r],t))return null}}return"Expected "+rt(e)+" but found "+rt(t)+" instead."}function Rt(e,t){return t.some(function(r){return r.kind===e.kind})}function dt(e,t){return t.some(function(r){return r==="null"?e===null:r==="array"?Array.isArray(e):r==="object"?e&&!Array.isArray(e)&&typeof e=="object":r===typeof e})}var Qe=qr(function(e,t){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function a(m){return(m=Math.round(m))<0?0:m>255?255:m}function l(m){return a(m[m.length-1]==="%"?parseFloat(m)/100*255:parseInt(m))}function c(m){return(_=m[m.length-1]==="%"?parseFloat(m)/100:parseFloat(m))<0?0:_>1?1:_;var _}function h(m,_,g){return g<0?g+=1:g>1&&(g-=1),6*g<1?m+(_-m)*g*6:2*g<1?_:3*g<2?m+(_-m)*(2/3-g)*6:m}try{t.parseCSSColor=function(m){var _,g=m.replace(/ /g,"").toLowerCase();if(g in r)return r[g].slice();if(g[0]==="#")return g.length===4?(_=parseInt(g.substr(1),16))>=0&&_<=4095?[(3840&_)>>4|(3840&_)>>8,240&_|(240&_)>>4,15&_|(15&_)<<4,1]:null:g.length===7&&(_=parseInt(g.substr(1),16))>=0&&_<=16777215?[(16711680&_)>>16,(65280&_)>>8,255&_,1]:null;
vendor: 5,702 bytes, line 1
1var x=g.indexOf("("),b=g.indexOf(")");if(x!==-1&&b+1===g.length){var I=g.substr(0,x),A=g.substr(x+1,b-(x+1)).split(","),L=1;switch(I){case"rgba":if(A.length!==4)return null;L=c(A.pop());case"rgb":return A.length!==3?null:[l(A[0]),l(A[1]),l(A[2]),L];case"hsla":if(A.length!==4)return null;L=c(A.pop());case"hsl":if(A.length!==3)return null;var B=(parseFloat(A[0])%360+360)%360/360,q=c(A[1]),V=c(A[2]),W=V<=.5?V*(q+1):V+q-V*q,J=2*V-W;return[a(255*h(J,W,B+1/3)),a(255*h(J,W,B)),a(255*h(J,W,B-1/3)),L];default:return null}}return null}}catch{}}).parseCSSColor,ut=function(e,t,r,a){a===void 0&&(a=1),this.r=e,this.g=t,this.b=r,this.a=a};ut.parse=function(e){if(e){if(e instanceof ut)return e;if(typeof e=="string"){var t=Qe(e);if(t)return new ut(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},ut.prototype.toString=function(){var e=this.toArray(),t=e[1],r=e[2],a=e[3];return"rgba("+Math.round(e[0])+","+Math.round(t)+","+Math.round(r)+","+a+")"},ut.prototype.toArray=function(){var e=this.a;return e===0?[0,0,0,0]:[255*this.r/e,255*this.g/e,255*this.b/e,e]},ut.black=new ut(0,0,0,1),ut.white=new ut(1,1,1,1),ut.transparent=new ut(0,0,0,0),ut.red=new ut(1,0,0,1);var Ar=function(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Ar.prototype.compare=function(e,t){return this.collator.compare(e,t)},Ar.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Vo=function(e,t,r,a,l){this.text=e,this.image=t,this.scale=r,this.fontStack=a,this.textColor=l},er=function(e){this.sections=e};er.fromString=function(e){return new er([new Vo(e,null,null,null,null)])},er.prototype.isEmpty=function(){return this.sections.length===0||!this.sections.some(function(e){return e.text.length!==0||e.image&&e.image.name.length!==0})},er.factory=function(e){return e instanceof er?e:er.fromString(e)},er.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(e){return e.text}).join("")},er.prototype.serialize=function(){for(var e=["format"],t=0,r=this.sections;t<r.length;t+=1){var a=r[t];if(a.image)e.push(["image",a.image.name]);else{e.push(a.text);var l={};a.fontStack&&(l["text-font"]=["literal",a.fontStack.split(",")]),a.scale&&(l["font-scale"]=a.scale),a.textColor&&(l["text-color"]=["rgba"].concat(a.textColor.toArray())),e.push(l)}}return e};var zr=function(e){this.name=e.name,this.available=e.available};function Ss(e,t,r,a){return typeof e=="number"&&e>=0&&e<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof r=="number"&&r>=0&&r<=255?a===void 0||typeof a=="number"&&a>=0&&a<=1?null:"Invalid rgba value ["+[e,t,r,a].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof a=="number"?[e,t,r,a]:[e,t,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function No(e){if(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||e instanceof ut||e instanceof Ar||e instanceof er||e instanceof zr)return!0;if(Array.isArray(e)){for(var t=0,r=e;t<r.length;t+=1)if(!No(r[t]))return!1;return!0}if(typeof e=="object"){for(var a in e)if(!No(e[a]))return!1;return!0}return!1}function Ot(e){if(e===null)return Se;if(typeof e=="string")return xe;if(typeof e=="boolean")return de;if(typeof e=="number")return ie;if(e instanceof ut)return ye;if(e instanceof Ar)return et;if(e instanceof er)return _t;if(e instanceof zr)return He;if(Array.isArray(e)){for(var t,r=e.length,a=0,l=e;a<l.length;a+=1){var c=Ot(l[a]);if(t){if(t===c)continue;t=ge;break}t=c}return lt(t||ge,r)}return We}function jo(e){var t=typeof e;return e===null?"":t==="string"||t==="number"||t==="boolean"?String(e):e instanceof ut||e instanceof er||e instanceof zr?e.toString():JSON.stringify(e)}zr.prototype.toString=function(){return this.name},zr.fromString=function(e){return e?new zr({name:e,available:!1}):null},zr.prototype.serialize=function(){return["image",this.name]};var gr=function(e,t){this.type=e,this.value=t};gr.parse=function(e,t){if(e.length!==2)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!No(e[1]))return t.error("invalid value");var r=e[1],a=Ot(r),l=t.expectedType;return a.kind!=="array"||a.N!==0||!l||l.kind!=="array"||typeof l.N=="number"&&l.N!==0||(a=l),new gr(a,r)},gr.prototype.evaluate=function(){return this.value},gr.prototype.eachChild=function(){},gr.prototype.outputDefined=function(){return!0},gr.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof ut?["rgba"].concat(this.value.toArray()):this.value instanceof er?this.value.serialize():this.value};var tr=function(e){this.name="ExpressionEvaluationError",this.message=e};tr.prototype.toJSON=function(){return this.message};var ei={string:xe,number:ie,boolean:de,object:We},Tt=function(e,t){this.type=e,this.args=t};Tt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r,a=1,l=e[0];if(l==="array"){var c,h;if(e.length>2){var m=e[1];if(typeof m!="string"||!(m in ei)||m==="object")return t.error('The item type argument of "array" must be one of string, number, boolean',1);c=ei[m],a++}else c=ge;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);h=e[2],a++}r=lt(c,h)}else r=ei[l];for(var _=[];a<e.length;a++){var g=t.parse(e[a],a,ge);if(!g)return null;_.push(g)}return new Tt(r,_)},Tt.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var r=this.args[t].evaluate(e);
vendor: 4,378 bytes, line 1
1if(!pt(this.type,Ot(r)))return r;if(t===this.args.length-1)throw new tr("Expected value to be of type "+rt(this.type)+", but found "+rt(Ot(r))+" instead.")}return null},Tt.prototype.eachChild=function(e){this.args.forEach(e)},Tt.prototype.outputDefined=function(){return this.args.every(function(e){return e.outputDefined()})},Tt.prototype.serialize=function(){var e=this.type,t=[e.kind];if(e.kind==="array"){var r=e.itemType;if(r.kind==="string"||r.kind==="number"||r.kind==="boolean"){t.push(r.kind);var a=e.N;(typeof a=="number"||this.args.length>1)&&t.push(a)}}return t.concat(this.args.map(function(l){return l.serialize()}))};var yi=function(e){this.type=_t,this.sections=e};yi.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[1];if(!Array.isArray(r)&&typeof r=="object")return t.error("First argument must be an image or text section.");for(var a=[],l=!1,c=1;c<=e.length-1;++c){var h=e[c];if(l&&typeof h=="object"&&!Array.isArray(h)){l=!1;var m=null;if(h["font-scale"]&&!(m=t.parse(h["font-scale"],1,ie)))return null;var _=null;if(h["text-font"]&&!(_=t.parse(h["text-font"],1,lt(xe))))return null;var g=null;if(h["text-color"]&&!(g=t.parse(h["text-color"],1,ye)))return null;var x=a[a.length-1];x.scale=m,x.font=_,x.textColor=g}else{var b=t.parse(e[c],1,ge);if(!b)return null;var I=b.type.kind;if(I!=="string"&&I!=="value"&&I!=="null"&&I!=="resolvedImage")return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");l=!0,a.push({content:b,scale:null,font:null,textColor:null})}}return new yi(a)},yi.prototype.evaluate=function(e){return new er(this.sections.map(function(t){var r=t.content.evaluate(e);return Ot(r)===He?new Vo("",r,null,null,null):new Vo(jo(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)}))},yi.prototype.eachChild=function(e){for(var t=0,r=this.sections;t<r.length;t+=1){var a=r[t];e(a.content),a.scale&&e(a.scale),a.font&&e(a.font),a.textColor&&e(a.textColor)}},yi.prototype.outputDefined=function(){return!1},yi.prototype.serialize=function(){for(var e=["format"],t=0,r=this.sections;t<r.length;t+=1){var a=r[t];e.push(a.content.serialize());var l={};a.scale&&(l["font-scale"]=a.scale.serialize()),a.font&&(l["text-font"]=a.font.serialize()),a.textColor&&(l["text-color"]=a.textColor.serialize()),e.push(l)}return e};var Zr=function(e){this.type=He,this.input=e};Zr.parse=function(e,t){if(e.length!==2)return t.error("Expected two arguments.");var r=t.parse(e[1],1,xe);return r?new Zr(r):t.error("No image name provided.")},Zr.prototype.evaluate=function(e){var t=this.input.evaluate(e),r=zr.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r},Zr.prototype.eachChild=function(e){e(this.input)},Zr.prototype.outputDefined=function(){return!1},Zr.prototype.serialize=function(){return["image",this.input.serialize()]};var vl={"to-boolean":de,"to-color":ye,"to-number":ie,"to-string":xe},ti=function(e,t){this.type=e,this.args=t};ti.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[0];if((r==="to-boolean"||r==="to-string")&&e.length!==2)return t.error("Expected one argument.");for(var a=vl[r],l=[],c=1;c<e.length;c++){var h=t.parse(e[c],c,ge);if(!h)return null;l.push(h)}return new ti(a,l)},ti.prototype.evaluate=function(e){if(this.type.kind==="boolean")return!!this.args[0].evaluate(e);if(this.type.kind==="color"){for(var t,r,a=0,l=this.args;a<l.length;a+=1){if(r=null,(t=l[a].evaluate(e))instanceof ut)return t;if(typeof t=="string"){var c=e.parseColor(t);if(c)return c}else if(Array.isArray(t)&&!(r=t.length<3||t.length>4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":Ss(t[0],t[1],t[2],t[3])))return new ut(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new tr(r||"Could not parse color from value '"+(typeof t=="string"?t:String(JSON.stringify(t)))+"'")}if(this.type.kind==="number"){for(var h=null,m=0,_=this.args;m<_.length;m+=1){if((h=_[m].evaluate(e))===null)return 0;var g=Number(h);if(!isNaN(g))return g}throw new tr("Could not convert "+JSON.stringify(h)+" to number.")}return this.type.kind==="formatted"?er.fromString(jo(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?zr.fromString(jo(this.args[0].evaluate(e))):jo(this.args[0].evaluate(e))}
vendor: 4,100 bytes, line 1
1,ti.prototype.eachChild=function(e){this.args.forEach(e)},ti.prototype.outputDefined=function(){return this.args.every(function(e){return e.outputDefined()})},ti.prototype.serialize=function(){if(this.type.kind==="formatted")return new yi([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Zr(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild(function(t){e.push(t.serialize())}),e};var Cu=["Unknown","Point","LineString","Polygon"],Ui=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};Ui.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Ui.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?Cu[this.feature.type]:this.feature.type:null},Ui.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Ui.prototype.canonicalID=function(){return this.canonical},Ui.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Ui.prototype.parseColor=function(e){var t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=ut.parse(e)),t};var lr=function(e,t,r,a){this.name=e,this.type=t,this._evaluate=r,this.args=a};lr.prototype.evaluate=function(e){return this._evaluate(e,this.args)},lr.prototype.eachChild=function(e){this.args.forEach(e)},lr.prototype.outputDefined=function(){return!1},lr.prototype.serialize=function(){return[this.name].concat(this.args.map(function(e){return e.serialize()}))},lr.parse=function(e,t){var r,a=e[0],l=lr.definitions[a];if(!l)return t.error('Unknown expression "'+a+'". If you wanted a literal array, use ["literal", [...]].',0);for(var c=Array.isArray(l)?l[0]:l.type,h=Array.isArray(l)?[[l[1],l[2]]]:l.overloads,m=h.filter(function(Me){var ve=Me[0];return!Array.isArray(ve)||ve.length===e.length-1}),_=null,g=0,x=m;g<x.length;g+=1){var b=x[g],I=b[0],A=b[1];_=new $i(t.registry,t.path,null,t.scope);for(var L=[],B=!1,q=1;q<e.length;q++){var V=e[q],W=Array.isArray(I)?I[q-1]:I.type,J=_.parse(V,1+L.length,W);if(!J){B=!0;break}L.push(J)}if(!B)if(Array.isArray(I)&&I.length!==L.length)_.error("Expected "+I.length+" arguments, but found "+L.length+" instead.");else{for(var Y=0;Y<L.length;Y++){var $=Array.isArray(I)?I[Y]:I.type,ne=L[Y];_.concat(Y+1).checkSubtype($,ne.type)}if(_.errors.length===0)return new lr(a,c,A,L)}}if(m.length===1)(r=t.errors).push.apply(r,_.errors);else{for(var ue=(m.length?m:h).map(function(Me){var ve;return ve=Me[0],Array.isArray(ve)?"("+ve.map(rt).join(", ")+")":"("+rt(ve.type)+"...)"}).join(" | "),fe=[],Pe=1;Pe<e.length;Pe++){var _e=t.parse(e[Pe],1+fe.length);if(!_e)return null;fe.push(rt(_e.type))}t.error("Expected arguments of type "+ue+", but found ("+fe.join(", ")+") instead.")}return null},lr.register=function(e,t){for(var r in lr.definitions=t,t)e[r]=lr};var Ei=function(e,t,r){this.type=et,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t};function vr(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function Cn(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function ku(e,t){var r=(180+e[0])/360,a=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e[1]*Math.PI/360)))/360,l=Math.pow(2,t.z);return[Math.round(r*l*8192),Math.round(a*l*8192)]}function Mu(e,t,r){return t[1]>e[1]!=r[1]>e[1]&&e[0]<(r[0]-t[0])*(e[1]-t[1])/(r[1]-t[1])+t[0]}function Ts(e,t){for(var r,a,l,c,h,m,_,g=!1,x=0,b=t.length;x<b;x++)for(var I=t[x],A=0,L=I.length;A<L-1;A++){if((c=(r=e)[0]-(a=I[A])[0])*(_=r[1]-(l=I[A+1])[1])-(m=r[0]-l[0])*(h=r[1]-a[1])==0&&c*m<=0&&h*_<=0)return!1;Mu(e,I[A],I[A+1])&&(g=!g)}return g}function Du(e,t){for(var r=0;r<t.length;r++)if(Ts(e,t[r]))return!0;return!1}function xl(e,t,r,a){var l=a[0]-r[0],c=a[1]-r[1],h=(e[0]-r[0])*c-l*(e[1]-r[1]),m=(t[0]-r[0])*c-l*(t[1]-r[1]);return h>0&&m<0||h<0&&m>0}function Lu(e,t,r){for(var a=0,l=r;a<l.length;a+=1)for(var c=l[a],h=0;h<c.length-1;
vendor: 4,823 bytes, line 1
1++h)if((b=[(x=c[h+1])[0]-(g=c[h])[0],x[1]-g[1]])[0]*(I=[(_=t)[0]-(m=e)[0],_[1]-m[1]])[1]-b[1]*I[0]!=0&&xl(m,_,g,x)&&xl(g,x,m,_))return!0;var m,_,g,x,b,I;return!1}function bl(e,t){for(var r=0;r<e.length;++r)if(!Ts(e[r],t))return!1;for(var a=0;a<e.length-1;++a)if(Lu(e[a],e[a+1],t))return!1;return!0}function wl(e,t){for(var r=0;r<t.length;r++)if(bl(e,t[r]))return!0;return!1}function ho(e,t,r){for(var a=[],l=0;l<e.length;l++){for(var c=[],h=0;h<e[l].length;h++){var m=ku(e[l][h],r);vr(t,m),c.push(m)}a.push(c)}return a}function Is(e,t,r){for(var a=[],l=0;l<e.length;l++){var c=ho(e[l],t,r);a.push(c)}return a}function qo(e,t,r,a){if(e[0]<r[0]||e[0]>r[2]){var l=.5*a,c=e[0]-r[0]>l?-a:r[0]-e[0]>l?a:0;c===0&&(c=e[0]-r[2]>l?-a:r[2]-e[0]>l?a:0),e[0]+=c}vr(t,e)}function Sl(e,t,r,a){for(var l=8192*Math.pow(2,a.z),c=[8192*a.x,8192*a.y],h=[],m=0,_=e;m<_.length;m+=1)for(var g=0,x=_[m];g<x.length;g+=1){var b=x[g],I=[b.x+c[0],b.y+c[1]];qo(I,t,r,l),h.push(I)}return h}function Ia(e,t,r,a){for(var l,c=8192*Math.pow(2,a.z),h=[8192*a.x,8192*a.y],m=[],_=0,g=e;_<g.length;_+=1){for(var x=[],b=0,I=g[_];b<I.length;b+=1){var A=I[b],L=[A.x+h[0],A.y+h[1]];vr(t,L),x.push(L)}m.push(x)}if(t[2]-t[0]<=c/2){(l=t)[0]=l[1]=1/0,l[2]=l[3]=-1/0;for(var B=0,q=m;B<q.length;B+=1)for(var V=0,W=q[B];V<W.length;V+=1)qo(W[V],t,r,c)}return m}Ei.parse=function(e,t){if(e.length!==2)return t.error("Expected one argument.");var r=e[1];if(typeof r!="object"||Array.isArray(r))return t.error("Collator options argument must be an object.");var a=t.parse(r["case-sensitive"]!==void 0&&r["case-sensitive"],1,de);if(!a)return null;var l=t.parse(r["diacritic-sensitive"]!==void 0&&r["diacritic-sensitive"],1,de);if(!l)return null;var c=null;return r.locale&&!(c=t.parse(r.locale,1,xe))?null:new Ei(a,l,c)},Ei.prototype.evaluate=function(e){return new Ar(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},Ei.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},Ei.prototype.outputDefined=function(){return!1},Ei.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var ri=function(e,t){this.type=de,this.geojson=e,this.geometries=t};function Ji(e){if(e instanceof lr&&(e.name==="get"&&e.args.length===1||e.name==="feature-state"||e.name==="has"&&e.args.length===1||e.name==="properties"||e.name==="geometry-type"||e.name==="id"||/^filter-/.test(e.name))||e instanceof ri)return!1;var t=!0;return e.eachChild(function(r){t&&!Ji(r)&&(t=!1)}),t}function Yi(e){if(e instanceof lr&&e.name==="feature-state")return!1;var t=!0;return e.eachChild(function(r){t&&!Yi(r)&&(t=!1)}),t}function kn(e,t){if(e instanceof lr&&t.indexOf(e.name)>=0)return!1;var r=!0;return e.eachChild(function(a){r&&!kn(a,t)&&(r=!1)}),r}ri.parse=function(e,t){if(e.length!==2)return t.error("'within' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(No(e[1])){var r=e[1];if(r.type==="FeatureCollection")for(var a=0;a<r.features.length;++a){var l=r.features[a].geometry.type;if(l==="Polygon"||l==="MultiPolygon")return new ri(r,r.features[a].geometry)}else if(r.type==="Feature"){var c=r.geometry.type;if(c==="Polygon"||c==="MultiPolygon")return new ri(r,r.geometry)}else if(r.type==="Polygon"||r.type==="MultiPolygon")return new ri(r,r)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")},ri.prototype.evaluate=function(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return function(t,r){var a=[1/0,1/0,-1/0,-1/0],l=[1/0,1/0,-1/0,-1/0],c=t.canonicalID();if(r.type==="Polygon"){var h=ho(r.coordinates,l,c),m=Sl(t.geometry(),a,l,c);if(!Cn(a,l))return!1;for(var _=0,g=m;_<g.length;_+=1)if(!Ts(g[_],h))return!1}if(r.type==="MultiPolygon"){var x=Is(r.coordinates,l,c),b=Sl(t.geometry(),a,l,c);if(!Cn(a,l))return!1;for(var I=0,A=b;I<A.length;I+=1)if(!Du(A[I],x))return!1}return!0}(e,this.geometries);if(e.geometryType()==="LineString")return function(t,r){var a=[1/0,1/0,-1/0,-1/0],l=[1/0,1/0,-1/0,-1/0],c=t.canonicalID();if(r.type==="Polygon"){var h=ho(r.coordinates,l,c),m=Ia(t.geometry(),a,l,c);if(!Cn(a,l))return!1;for(var _=0,g=m;_<g.length;_+=1)if(!bl(g[_],h))return!1}if(r.type==="MultiPolygon"){var x=Is(r.coordinates,l,c),b=Ia(t.geometry(),a,l,c);if(!Cn(a,l))return!1;for(var I=0,A=b;I<A.length;I+=1)if(!wl(A[I],x))return!1}return!0}(e,this.geometries)}return!1},ri.prototype.eachChild=function(){},ri.prototype.outputDefined=function(){return!0},ri.prototype.serialize=function(){return["within",this.geojson]};var Qi=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};
1Qi.parse=function(e,t){if(e.length!==2||typeof e[1]!="string")return t.error("'var' expression requires exactly one string literal argument.");var r=e[1];return t.scope.has(r)?new Qi(r,t.scope.get(r)):t.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},Qi.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},Qi.prototype.eachChild=function(){},Qi.prototype.outputDefined=function(){return!1},Qi.prototype.serialize=function(){return["var",this.name]};var $i=function(e,t,r,a,l){t===void 0&&(t=[]),a===void 0&&(a=new Ie),l===void 0&&(l=[]),this.registry=e,this.path=t,this.key=t.map(function(c){return"["+c+"]"}).join(""),this.scope=a,this.errors=l,this.expectedType=r};function Ea(e,t){for(var r,a=e.length-1,l=0,c=a,h=0;l<=c;)if((r=e[h=Math.floor((l+c)/2)])<=t){if(h===a||t<e[h+1])return h;l=h+1}else{if(!(r>t))throw new tr("Input is not a number.");c=h-1}return 0}$i.prototype.parse=function(e,t,r,a,l){return l===void 0&&(l={}),t?this.concat(t,r,a)._parse(e,l):this._parse(e,l)},$i.prototype._parse=function(e,t){function r(g,x,b){return b==="assert"?new Tt(x,[g]):b==="coerce"?new ti(x,[g]):g}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var a=e[0];if(typeof a!="string")return this.error("Expression name must be a string, but found "+typeof a+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var l=this.registry[a];if(l){var c=l.parse(e,this);if(!c)return null;if(this.expectedType){var h=this.expectedType,m=c.type;if(h.kind!=="string"&&h.kind!=="number"&&h.kind!=="boolean"&&h.kind!=="object"&&h.kind!=="array"||m.kind!=="value")if(h.kind!=="color"&&h.kind!=="formatted"&&h.kind!=="resolvedImage"||m.kind!=="value"&&m.kind!=="string"){if(this.checkSubtype(h,m))return null}else c=r(c,h,t.typeAnnotation||"coerce");else c=r(c,h,t.typeAnnotation||"assert")}if(!(c instanceof gr)&&c.type.kind!=="resolvedImage"&&function g(x){if(x instanceof Qi)return g(x.boundExpression);if(x instanceof lr&&x.name==="error"||x instanceof Ei||x instanceof ri)return!1;var b=x instanceof ti||x instanceof Tt,I=!0;return x.eachChild(function(A){I=b?I&&g(A):I&&A instanceof gr}),!!I&&Ji(x)&&kn(x,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(c)){var _=new Ui;try{c=new gr(c.type,c.evaluate(_))}catch(g){return this.error(g.message),null}}return c}return this.error('Unknown expression "'+a+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof e+" instead.")},$i.prototype.concat=function(e,t,r){var a=typeof e=="number"?this.path.concat(e):this.path,l=r?this.scope.concat(r):this.scope;return new $i(this.registry,a,t||null,l,this.errors)},$i.prototype.error=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var a=""+this.key+t.map(function(l){return"["+l+"]"}).join("");this.errors.push(new se(a,e))},$i.prototype.checkSubtype=function(e,t){var r=pt(e,t);return r&&this.error(r),r};var Br=function(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var a=0,l=r;a<l.length;a+=1){var c=l[a],h=c[1];this.labels.push(c[0]),this.outputs.push(h)}};function jt(e,t,r){return e*(1-r)+t*r}Br.parse=function(e,t){if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");var r=t.parse(e[1],1,ie);if(!r)return null;var a=[],l=null;t.expectedType&&t.expectedType.kind!=="value"&&(l=t.expectedType);for(var c=1;c<e.length;c+=2){var h=c===1?-1/0:e[c],m=e[c+1],_=c,g=c+1;if(typeof h!="number")return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',_);if(a.length&&a[a.length-1][0]>=h)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',_);var x=t.parse(m,g,l);if(!x)return null;l=l||x.type,a.push([h,x])}return new Br(l,r,a)},Br.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(t.length===1)return r[0].evaluate(e);var a=this.input.evaluate(e);if(a<=t[0])return r[0].evaluate(e);var l=t.length;return a>=t[l-1]?r[l-1].evaluate(e):r[Ea(t,a)].evaluate(e)},Br.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t<r.length;t+=1)e(r[t])},Br.prototype.outputDefined=function(){return this.outputs.every(function(e){return e.outputDefined()})},Br.prototype.serialize=function(){for(var e=["step",this.input.serialize()],t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var fo=Object.freeze({__proto__:null,number:jt,color:function(e,t,r){return new ut(jt(e.r,t.r,r),jt(e.g,t.g,r),jt(e.b,t.b,r),jt(e.a,t.a,r))},array:function(e,t,r){return e.map(function(a,l){return jt(a,t[l],r)})}}),Tl=6/29*3*(6/29),Bu=Math.PI/180,Ru=180/Math.PI;function Es(e){return e>.008856451679035631?Math.pow(e,1/3):e/Tl+4/29}function As(e){return e>6/29?e*e*e:Tl*(e-4/29)}
vendor: 3,449 bytes, line 1
1function zs(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ps(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Il(e){var t=Ps(e.r),r=Ps(e.g),a=Ps(e.b),l=Es((.4124564*t+.3575761*r+.1804375*a)/.95047),c=Es((.2126729*t+.7151522*r+.072175*a)/1);return{l:116*c-16,a:500*(l-c),b:200*(c-Es((.0193339*t+.119192*r+.9503041*a)/1.08883)),alpha:e.a}}function El(e){var t=(e.l+16)/116,r=isNaN(e.a)?t:t+e.a/500,a=isNaN(e.b)?t:t-e.b/200;return t=1*As(t),r=.95047*As(r),a=1.08883*As(a),new ut(zs(3.2404542*r-1.5371385*t-.4985314*a),zs(-.969266*r+1.8760108*t+.041556*a),zs(.0556434*r-.2040259*t+1.0572252*a),e.alpha)}function Ou(e,t,r){var a=t-e;return e+r*(a>180||a<-180?a-360*Math.round(a/360):a)}var Zo={forward:Il,reverse:El,interpolate:function(e,t,r){return{l:jt(e.l,t.l,r),a:jt(e.a,t.a,r),b:jt(e.b,t.b,r),alpha:jt(e.alpha,t.alpha,r)}}},Go={forward:function(e){var t=Il(e),r=t.l,a=t.a,l=t.b,c=Math.atan2(l,a)*Ru;return{h:c<0?c+360:c,c:Math.sqrt(a*a+l*l),l:r,alpha:e.a}},reverse:function(e){var t=e.h*Bu,r=e.c;return El({l:e.l,a:Math.cos(t)*r,b:Math.sin(t)*r,alpha:e.alpha})},interpolate:function(e,t,r){return{h:Ou(e.h,t.h,r),c:jt(e.c,t.c,r),l:jt(e.l,t.l,r),alpha:jt(e.alpha,t.alpha,r)}}},Al=Object.freeze({__proto__:null,lab:Zo,hcl:Go}),ur=function(e,t,r,a,l){this.type=e,this.operator=t,this.interpolation=r,this.input=a,this.labels=[],this.outputs=[];for(var c=0,h=l;c<h.length;c+=1){var m=h[c],_=m[1];this.labels.push(m[0]),this.outputs.push(_)}};function Cs(e,t,r,a){var l=a-r,c=e-r;return l===0?0:t===1?c/l:(Math.pow(t,c)-1)/(Math.pow(t,l)-1)}ur.interpolationFactor=function(e,t,r,a){var l=0;if(e.name==="exponential")l=Cs(t,e.base,r,a);else if(e.name==="linear")l=Cs(t,1,r,a);else if(e.name==="cubic-bezier"){var c=e.controlPoints;l=new ce(c[0],c[1],c[2],c[3]).solve(Cs(t,1,r,a))}return l},ur.parse=function(e,t){var r=e[0],a=e[1],l=e[2],c=e.slice(3);if(!Array.isArray(a)||a.length===0)return t.error("Expected an interpolation type expression.",1);if(a[0]==="linear")a={name:"linear"};else if(a[0]==="exponential"){var h=a[1];if(typeof h!="number")return t.error("Exponential interpolation requires a numeric base.",1,1);a={name:"exponential",base:h}}else{if(a[0]!=="cubic-bezier")return t.error("Unknown interpolation type "+String(a[0]),1,0);var m=a.slice(1);if(m.length!==4||m.some(function(q){return typeof q!="number"||q<0||q>1}))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);a={name:"cubic-bezier",controlPoints:m}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(l=t.parse(l,2,ie)))return null;var _=[],g=null;r==="interpolate-hcl"||r==="interpolate-lab"?g=ye:t.expectedType&&t.expectedType.kind!=="value"&&(g=t.expectedType);for(var x=0;x<c.length;x+=2){var b=c[x],I=c[x+1],A=x+3,L=x+4;if(typeof b!="number")return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',A);if(_.length&&_[_.length-1][0]>=b)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',A);var B=t.parse(I,L,g);if(!B)return null;g=g||B.type,_.push([b,B])}return g.kind==="number"||g.kind==="color"||g.kind==="array"&&g.itemType.kind==="number"&&typeof g.
vendor: 8,058 bytes, line 1
1N=="number"?new ur(g,r,a,l,_):t.error("Type "+rt(g)+" is not interpolatable.")},ur.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(t.length===1)return r[0].evaluate(e);var a=this.input.evaluate(e);if(a<=t[0])return r[0].evaluate(e);var l=t.length;if(a>=t[l-1])return r[l-1].evaluate(e);var c=Ea(t,a),h=ur.interpolationFactor(this.interpolation,a,t[c],t[c+1]),m=r[c].evaluate(e),_=r[c+1].evaluate(e);return this.operator==="interpolate"?fo[this.type.kind.toLowerCase()](m,_,h):this.operator==="interpolate-hcl"?Go.reverse(Go.interpolate(Go.forward(m),Go.forward(_),h)):Zo.reverse(Zo.interpolate(Zo.forward(m),Zo.forward(_),h))},ur.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t<r.length;t+=1)e(r[t])},ur.prototype.outputDefined=function(){return this.outputs.every(function(e){return e.outputDefined()})},ur.prototype.serialize=function(){var e;e=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var t=[this.operator,e,this.input.serialize()],r=0;r<this.labels.length;r++)t.push(this.labels[r],this.outputs[r].serialize());return t};var en=function(e,t){this.type=e,this.args=t};en.parse=function(e,t){if(e.length<2)return t.error("Expectected at least one argument.");var r=null,a=t.expectedType;a&&a.kind!=="value"&&(r=a);for(var l=[],c=0,h=e.slice(1);c<h.length;c+=1){var m=t.parse(h[c],1+l.length,r,void 0,{typeAnnotation:"omit"});if(!m)return null;r=r||m.type,l.push(m)}var _=a&&l.some(function(g){return pt(a,g.type)});return new en(_?ge:r,l)},en.prototype.evaluate=function(e){for(var t,r=null,a=0,l=0,c=this.args;l<c.length&&(a++,(r=c[l].evaluate(e))&&r instanceof zr&&!r.available&&(t||(t=r.name),r=null,a===this.args.length&&(r=t)),r===null);l+=1);return r},en.prototype.eachChild=function(e){this.args.forEach(e)},en.prototype.outputDefined=function(){return this.args.every(function(e){return e.outputDefined()})},en.prototype.serialize=function(){var e=["coalesce"];return this.eachChild(function(t){e.push(t.serialize())}),e};var tn=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};tn.prototype.evaluate=function(e){return this.result.evaluate(e)},tn.prototype.eachChild=function(e){for(var t=0,r=this.bindings;t<r.length;t+=1)e(r[t][1]);e(this.result)},tn.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found "+(e.length-1)+" instead.");for(var r=[],a=1;a<e.length-1;a+=2){var l=e[a];if(typeof l!="string")return t.error("Expected string, but found "+typeof l+" instead.",a);if(/[^a-zA-Z0-9_]/.test(l))return t.error("Variable names must contain only alphanumeric characters or '_'.",a);var c=t.parse(e[a+1],a+1);if(!c)return null;r.push([l,c])}var h=t.parse(e[e.length-1],e.length-1,t.expectedType,r);return h?new tn(r,h):null},tn.prototype.outputDefined=function(){return this.result.outputDefined()},tn.prototype.serialize=function(){for(var e=["let"],t=0,r=this.bindings;t<r.length;t+=1){var a=r[t];e.push(a[0],a[1].serialize())}return e.push(this.result.serialize()),e};var Mn=function(e,t,r){this.type=e,this.index=t,this.input=r};Mn.parse=function(e,t){if(e.length!==3)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,ie),a=t.parse(e[2],2,lt(t.expectedType||ge));return r&&a?new Mn(a.type.itemType,r,a):null},Mn.prototype.evaluate=function(e){var t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new tr("Array index out of bounds: "+t+" < 0.");if(t>=r.length)throw new tr("Array index out of bounds: "+t+" > "+(r.length-1)+".");if(t!==Math.floor(t))throw new tr("Array index must be an integer, but found "+t+" instead.");return r[t]},Mn.prototype.eachChild=function(e){e(this.index),e(this.input)},Mn.prototype.outputDefined=function(){return!1},Mn.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Dn=function(e,t){this.type=de,this.needle=e,this.haystack=t};Dn.parse=function(e,t){if(e.length!==3)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,ge),a=t.parse(e[2],2,ge);return r&&a?Rt(r.type,[de,xe,ie,Se,ge])?new Dn(r,a):t.error("Expected first argument to be of type boolean, string, number or null, but found "+rt(r.type)+" instead"):null},Dn.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!dt(t,["boolean","string","number","null"]))throw new tr("Expected first argument to be of type boolean, string, number or null, but found "+rt(Ot(t))+" instead.");if(!dt(r,["string","array"]))throw new tr("Expected second argument to be of type array or string, but found "+rt(Ot(r))+" instead.");return r.indexOf(t)>=0},Dn.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},Dn.prototype.outputDefined=function(){return!0},Dn.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var rn=function(e,t,r){this.type=ie,this.needle=e,this.haystack=t,this.fromIndex=r};rn.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,ge),a=t.parse(e[2],2,ge);if(!r||!a)return null;if(!Rt(r.type,[de,xe,ie,Se,ge]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+rt(r.type)+" instead");if(e.length===4){var l=t.parse(e[3],3,ie);return l?new rn(r,a,l):null}return new rn(r,a)},rn.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!dt(t,["boolean","string","number","null"]))throw new tr("Expected first argument to be of type boolean, string, number or null, but found "+rt(Ot(t))+" instead.");if(!dt(r,["string","array"]))throw new tr("Expected second argument to be of type array or string, but found "+rt(Ot(r))+" instead.");if(this.fromIndex){var a=this.fromIndex.evaluate(e);return r.indexOf(t,a)}return r.indexOf(t)},rn.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)},rn.prototype.outputDefined=function(){return!1},rn.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Ln=function(e,t,r,a,l,c){this.inputType=e,this.type=t,this.input=r,this.cases=a,this.outputs=l,this.otherwise=c};Ln.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var r,a;t.expectedType&&t.expectedType.kind!=="value"&&(a=t.expectedType);for(var l={},c=[],h=2;h<e.length-1;h+=2){var m=e[h],_=e[h+1];Array.isArray(m)||(m=[m]);var g=t.concat(h);if(m.length===0)return g.error("Expected at least one branch label.");for(var x=0,b=m;x<b.length;x+=1){var I=b[x];if(typeof I!="number"&&typeof I!="string")return g.error("Branch labels must be numbers or strings.");if(typeof I=="number"&&Math.abs(I)>Number.MAX_SAFE_INTEGER)return g.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof I=="number"&&Math.floor(I)!==I)return g.error("Numeric branch labels must be integer values.");if(r){if(g.checkSubtype(r,Ot(I)))return null}else r=Ot(I);if(l[String(I)]!==void 0)return g.error("Branch labels must be unique.");l[String(I)]=c.length}var A=t.parse(_,h,a);if(!A)return null;a=a||A.type,c.push(A)}var L=t.parse(e[1],1,ge);if(!L)return null;var B=t.parse(e[e.length-1],e.length-1,a);return B?L.type.kind!=="value"&&t.concat(1).checkSubtype(r,L.type)?null:new Ln(r,a,L,l,c,B):null},Ln.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(Ot(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},Ln.prototype.eachChild=function(e){e(this.input),this.outputs.forEac
vendor: 2,998 bytes, line 1
1h(e),e(this.otherwise)},Ln.prototype.outputDefined=function(){return this.outputs.every(function(e){return e.outputDefined()})&&this.otherwise.outputDefined()},Ln.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],r=[],a={},l=0,c=Object.keys(this.cases).sort();l<c.length;l+=1){var h=c[l];(b=a[this.cases[h]])===void 0?(a[this.cases[h]]=r.length,r.push([this.cases[h],[h]])):r[b][1].push(h)}for(var m=function(A){return e.inputType.kind==="number"?Number(A):A},_=0,g=r;_<g.length;_+=1){var x=g[_],b=x[0],I=x[1];t.push(I.length===1?m(I[0]):I.map(m)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var Bn=function(e,t,r){this.type=e,this.branches=t,this.otherwise=r};Bn.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!=0)return t.error("Expected an odd number of arguments.");var r;t.expectedType&&t.expectedType.kind!=="value"&&(r=t.expectedType);for(var a=[],l=1;l<e.length-1;l+=2){var c=t.parse(e[l],l,de);if(!c)return null;var h=t.parse(e[l+1],l+1,r);if(!h)return null;a.push([c,h]),r=r||h.type}var m=t.parse(e[e.length-1],e.length-1,r);return m?new Bn(r,a,m):null},Bn.prototype.evaluate=function(e){for(var t=0,r=this.branches;t<r.length;t+=1){var a=r[t],l=a[1];if(a[0].evaluate(e))return l.evaluate(e)}return this.otherwise.evaluate(e)},Bn.prototype.eachChild=function(e){for(var t=0,r=this.branches;t<r.length;t+=1){var a=r[t],l=a[1];e(a[0]),e(l)}e(this.otherwise)},Bn.prototype.outputDefined=function(){return this.branches.every(function(e){return e[1].outputDefined()})&&this.otherwise.outputDefined()},Bn.prototype.serialize=function(){var e=["case"];return this.eachChild(function(t){e.push(t.serialize())}),e};var nn=function(e,t,r,a){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=a};function zl(e,t){return e==="=="||e==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function Pl(e,t,r,a){return a.compare(t,r)===0}function gt(e,t,r){var a=e!=="=="&&e!=="!=";return function(){function l(c,h,m){this.type=de,this.lhs=c,this.rhs=h,this.collator=m,this.hasUntypedArgument=c.type.kind==="value"||h.type.kind==="value"}return l.parse=function(c,h){if(c.length!==3&&c.length!==4)return h.error("Expected two or three arguments.");var m=c[0],_=h.parse(c[1],1,ge);if(!_)return null;if(!zl(m,_.type))return h.concat(1).error('"'+m+`" comparisons are not supported for type '`+rt(_.type)+"'.");var g=h.parse(c[2],2,ge);if(!g)return null;if(!zl(m,g.type))return h.concat(2).error('"'+m+`" comparisons are not supported for type '`+rt(g.type)+"'.");if(_.type.kind!==g.type.kind&&_.type.kind!=="value"&&g.type.kind!=="value")return h.error("Cannot compare types '"+rt(_.type)+"' and '"+rt(g.type)+"'.");a&&(_.type.kind==="value"&&g.type.kind!=="value"?_=new Tt(g.type,[_]):_.type.kind!=="value"&&g.type.kind==="value"&&(g=ne
vendor: 16,384 bytes, line 1
1w Tt(_.type,[g])));var x=null;if(c.length===4){if(_.type.kind!=="string"&&g.type.kind!=="string"&&_.type.kind!=="value"&&g.type.kind!=="value")return h.error("Cannot use collator to compare non-string types.");if(!(x=h.parse(c[3],3,et)))return null}return new l(_,g,x)},l.prototype.evaluate=function(c){var h=this.lhs.evaluate(c),m=this.rhs.evaluate(c);if(a&&this.hasUntypedArgument){var _=Ot(h),g=Ot(m);if(_.kind!==g.kind||_.kind!=="string"&&_.kind!=="number")throw new tr('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+_.kind+", "+g.kind+") instead.")}if(this.collator&&!a&&this.hasUntypedArgument){var x=Ot(h),b=Ot(m);if(x.kind!=="string"||b.kind!=="string")return t(c,h,m)}return this.collator?r(c,h,m,this.collator.evaluate(c)):t(c,h,m)},l.prototype.eachChild=function(c){c(this.lhs),c(this.rhs),this.collator&&c(this.collator)},l.prototype.outputDefined=function(){return!0},l.prototype.serialize=function(){var c=[e];return this.eachChild(function(h){c.push(h.serialize())}),c},l}()}nn.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,ge),a=t.parse(e[2],2,ie);if(!r||!a)return null;if(!Rt(r.type,[lt(ge),xe,ge]))return t.error("Expected first argument to be of type array or string, but found "+rt(r.type)+" instead");if(e.length===4){var l=t.parse(e[3],3,ie);return l?new nn(r.type,r,a,l):null}return new nn(r.type,r,a)},nn.prototype.evaluate=function(e){var t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!dt(t,["string","array"]))throw new tr("Expected first argument to be of type array or string, but found "+rt(Ot(t))+" instead.");if(this.endIndex){var a=this.endIndex.evaluate(e);return t.slice(r,a)}return t.slice(r)},nn.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)},nn.prototype.outputDefined=function(){return!1},nn.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Fu=gt("==",function(e,t,r){return t===r},Pl),Aa=gt("!=",function(e,t,r){return t!==r},function(e,t,r,a){return!Pl(0,t,r,a)}),Cl=gt("<",function(e,t,r){return t<r},function(e,t,r,a){return a.compare(t,r)<0}),kl=gt(">",function(e,t,r){return t>r},function(e,t,r,a){return a.compare(t,r)>0}),Ml=gt("<=",function(e,t,r){return t<=r},function(e,t,r,a){return a.compare(t,r)<=0}),Dl=gt(">=",function(e,t,r){return t>=r},function(e,t,r,a){return a.compare(t,r)>=0}),Rn=function(e,t,r,a,l){this.type=xe,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=a,this.maxFractionDigits=l};Rn.parse=function(e,t){if(e.length!==3)return t.error("Expected two arguments.");var r=t.parse(e[1],1,ie);if(!r)return null;var a=e[2];if(typeof a!="object"||Array.isArray(a))return t.error("NumberFormat options argument must be an object.");var l=null;if(a.locale&&!(l=t.parse(a.locale,1,xe)))return null;var c=null;if(a.currency&&!(c=t.parse(a.currency,1,xe)))return null;var h=null;if(a["min-fraction-digits"]&&!(h=t.parse(a["min-fraction-digits"],1,ie)))return null;var m=null;return a["max-fraction-digits"]&&!(m=t.parse(a["max-fraction-digits"],1,ie))?null:new Rn(r,l,c,h,m)},Rn.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},Rn.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},Rn.prototype.outputDefined=function(){return!1},Rn.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var on=function(e){this.type=ie,this.input=e};on.parse=function(e,t){if(e.length!==2)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1);return r?r.type.kind!=="array"&&r.type.kind!=="string"&&r.type.kind!=="value"?t.error("Expected argument of type string or array, but found "+rt(r.type)+" instead."):new on(r):null},on.prototype.evaluate=function(e){var t=this.input.evaluate(e);if(typeof t=="string"||Array.isArray(t))return t.length;throw new tr("Expected value to be of type string or array, but found "+rt(Ot(t))+" instead.")},on.prototype.eachChild=function(e){e(this.input)},on.prototype.outputDefined=function(){return!1},on.prototype.serialize=function(){var e=["length"];return this.eachChild(function(t){e.push(t.serialize())}),e};var On={"==":Fu,"!=":Aa,">":kl,"<":Cl,">=":Dl,"<=":Ml,array:Tt,at:Mn,boolean:Tt,case:Bn,coalesce:en,collator:Ei,format:yi,image:Zr,in:Dn,"index-of":rn,interpolate:ur,"interpolate-hcl":ur,"interpolate-lab":ur,length:on,let:tn,literal:gr,match:Ln,number:Tt,"number-format":Rn,object:Tt,slice:nn,step:Br,string:Tt,"to-boolean":ti,"to-color":ti,"to-number":ti,"to-string":ti,var:Qi,within:ri};function Ll(e,t){var r=t[0],a=t[1],l=t[2],c=t[3];r=r.evaluate(e),a=a.evaluate(e),l=l.evaluate(e);var h=c?c.evaluate(e):1,m=Ss(r,a,l,h);if(m)throw new tr(m);return new ut(r/255*h,a/255*h,l/255*h,h)}function Bl(e,t){return e in t}function ks(e,t){var r=t[e];return r===void 0?null:r}function Fn(e){return{type:e}}function Rl(e){return{result:"success",value:e}}function Un(e){return{result:"error",value:e}}function Vn(e){return e["property-type"]==="data-driven"||e["property-type"]==="cross-faded-data-driven"}function Ol(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function Xo(e){return!!e.expression&&e.expression.interpolated}function xt(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":e===null?"null":typeof e}function za(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Uu(e){return e}function mo(e,t,r){return e!==void 0?e:t!==void 0?t:r!==void 0?r:void 0}function Fl(e,t,r,a,l){return mo(typeof r===l?a[r]:void 0,e.default,t.default)}function Vu(e,t,r){if(xt(r)!=="number")return mo(e.default,t.default);var a=e.stops.length;if(a===1||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[a-1][0])return e.stops[a-1][1];var l=Ea(e.stops.map(function(c){return c[0]}),r);return e.stops[l][1]}function Ul(e,t,r){var a=e.base!==void 0?e.base:1;if(xt(r)!=="number")return mo(e.default,t.default);var l=e.stops.length;if(l===1||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[l-1][0])return e.stops[l-1][1];var c=Ea(e.stops.map(function(b){return b[0]}),r),h=function(b,I,A,L){var B=L-A,q=b-A;return B===0?0:I===1?q/B:(Math.pow(I,q)-1)/(Math.pow(I,B)-1)}(r,a,e.stops[c][0],e.stops[c+1][0]),m=e.stops[c][1],_=e.stops[c+1][1],g=fo[t.type]||Uu;if(e.colorSpace&&e.colorSpace!=="rgb"){var x=Al[e.colorSpace];g=function(b,I){return x.reverse(x.interpolate(x.forward(b),x.forward(I),h))}}return typeof m.evaluate=="function"?{evaluate:function(){for(var b=[],I=arguments.length;I--;)b[I]=arguments[I];var A=m.evaluate.apply(void 0,b),L=_.evaluate.apply(void 0,b);if(A!==void 0&&L!==void 0)return g(A,L,h)}}:g(m,_,h)}function Pa(e,t,r){return t.type==="color"?r=ut.parse(r):t.type==="formatted"?r=er.fromString(r.toString()):t.type==="resolvedImage"?r=zr.fromString(r.toString()):xt(r)===t.type||t.type==="enum"&&t.values[r]||(r=void 0),mo(r,e.default,t.default)}lr.register(On,{error:[{kind:"error"},[xe],function(e,t){throw new tr(t[0].evaluate(e))}],typeof:[xe,[ge],function(e,t){return rt(Ot(t[0].evaluate(e)))}],"to-rgba":[lt(ie,4),[ye],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[ye,[ie,ie,ie],Ll],rgba:[ye,[ie,ie,ie,ie],Ll],has:{type:de,overloads:[[[xe],function(e,t){return Bl(t[0].evaluate(e),e.properties())}],[[xe,We],function(e,t){var r=t[1];return Bl(t[0].evaluate(e),r.evaluate(e))}]]},get:{type:ge,overloads:[[[xe],function(e,t){return ks(t[0].evaluate(e),e.properties())}],[[xe,We],function(e,t){var r=t[1];return ks(t[0].evaluate(e),r.evaluate(e))}]]},"feature-state":[ge,[xe],function(e,t){return ks(t[0].evaluate(e),e.featureState||{})}],properties:[We,[],function(e){return e.properties()}],"geometry-type":[xe,[],function(e){return e.geometryType()}],id:[ge,[],function(e){return e.id()}],zoom:[ie,[],function(e){return e.globals.zoom}],"heatmap-density":[ie,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[ie,[],function(e){return e.globals.lineProgress||0}],accumulated:[ge,[],function(e){return e.globals.accumulated===void 0?null:e.globals.accumulated}],"+":[ie,Fn(ie),function(e,t){for(var r=0,a=0,l=t;a<l.length;a+=1)r+=l[a].evaluate(e);return r}],"*":[ie,Fn(ie),function(e,t){for(var r=1,a=0,l=t;a<l.length;a+=1)r*=l[a].evaluate(e);return r}],"-":{type:ie,overloads:[[[ie,ie],function(e,t){var r=t[1];return t[0].evaluate(e)-r.evaluate(e)}],[[ie],function(e,t){return-t[0].evaluate(e)}]]},"/":[ie,[ie,ie],function(e,t){var r=t[1];return t[0].evaluate(e)/r.evaluate(e)}],"%":[ie,[ie,ie],function(e,t){var r=t[1];return t[0].evaluate(e)%r.evaluate(e)}],ln2:[ie,[],function(){return Math.LN2}],pi:[ie,[],function(){return Math.PI}],e:[ie,[],function(){return Math.E}],"^":[ie,[ie,ie],function(e,t){var r=t[1];return Math.pow(t[0].evaluate(e),r.evaluate(e))}],sqrt:[ie,[ie],function(e,t){return Math.sqrt(t[0].evaluate(e))}],log10:[ie,[ie],function(e,t){return Math.log(t[0].evaluate(e))/Math.LN10}],ln:[ie,[ie],function(e,t){return Math.log(t[0].evaluate(e))}],log2:[ie,[ie],function(e,t){return Math.log(t[0].evaluate(e))/Math.LN2}],sin:[ie,[ie],function(e,t){return Math.sin(t[0].evaluate(e))}],cos:[ie,[ie],function(e,t){return Math.cos(t[0].evaluate(e))}],tan:[ie,[ie],function(e,t){return Math.tan(t[0].evaluate(e))}],asin:[ie,[ie],function(e,t){return Math.asin(t[0].evaluate(e))}],acos:[ie,[ie],function(e,t){return Math.acos(t[0].evaluate(e))}],atan:[ie,[ie],function(e,t){return Math.atan(t[0].evaluate(e))}],min:[ie,Fn(ie),function(e,t){return Math.min.apply(Math,t.map(function(r){return r.evaluate(e)}))}],max:[ie,Fn(ie),function(e,t){return Math.max.apply(Math,t.map(function(r){return r.evaluate(e)}))}],abs:[ie,[ie],function(e,t){return Math.abs(t[0].evaluate(e))}],round:[ie,[ie],function(e,t){var r=t[0].evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[ie,[ie],function(e,t){return Math.floor(t[0].evaluate(e))}],ceil:[ie,[ie],function(e,t){return Math.ceil(t[0].evaluate(e))}],"filter-==":[de,[xe,ge],function(e,t){var r=t[0],a=t[1];return e.properties()[r.value]===a.value}],"filter-id-==":[de,[ge],function(e,t){var r=t[0];return e.id()===r.value}],"filter-type-==":[de,[xe],function(e,t){var r=t[0];return e.geometryType()===r.value}],"filter-<":[de,[xe,ge],function(e,t){var r=t[0],a=t[1],l=e.properties()[r.value],c=a.value;return typeof l==typeof c&&l<c}],"filter-id-<":[de,[ge],function(e,t){var r=t[0],a=e.id(),l=r.value;return typeof a==typeof l&&a<l}],"filter->":[de,[xe,ge],function(e,t){var r=t[0],a=t[1],l=e.properties()[r.value],c=a.value;return typeof l==typeof c&&l>c}],"filter-id->":[de,[ge],function(e,t){var r=t[0],a=e.id(),l=r.value;return typeof a==typeof l&&a>l}],"filter-<=":[de,[xe,ge],function(e,t){var r=t[0],a=t[1],l=e.properties()[r.value],c=a.value;return typeof l==typeof c&&l<=c}],"filter-id-<=":[de,[ge],function(e,t){var r=t[0],a=e.id(),l=r.value;return typeof a==typeof l&&a<=l}],"filter->=":[de,[xe,ge],function(e,t){var r=t[0],a=t[1],l=e.properties()[r.value],c=a.value;return typeof l==typeof c&&l>=c}],"filter-id->=":[de,[ge],function(e,t){var r=t[0],a=e.id(),l=r.value;return typeof a==typeof l&&a>=l}],"filter-has":[de,[ge],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[de,[],function(e){return e.id()!==null&&e.id()!==void 0}],"filter-type-in":[de,[lt(xe)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[de,[lt(ge)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[de,[xe,lt(ge)],function(e,t){var r=t[0];return t[1].value.indexOf(e.properties()[r.value])>=0}],"filter-in-large":[de,[xe,lt(ge)],function(e,t){var r=t[0],a=t[1];return function(l,c,h,m){for(;h<=m;){var _=h+m>>1;if(c[_]===l)return!0;c[_]>l?m=_-1:h=_+1}return!1}(e.properties()[r.value],a.value,0,a.value.length-1)}],all:{type:de,overloads:[[[de,de],function(e,t){var r=t[1];return t[0].evaluate(e)&&r.evaluate(e)}],[Fn(de),function(e,t){for(var r=0,a=t;r<a.length;r+=1)if(!a[r].evaluate(e))return!1;return!0}]]},any:{type:de,overloads:[[[de,de],function(e,t){var r=t[1];return t[0].evaluate(e)||r.evaluate(e)}],[Fn(de),function(e,t){for(var r=0,a=t;r<a.length;r+=1)if(a[r].evaluate(e))return!0;return!1}]]},"!":[de,[de],function(e,t){return!t[0].evaluate(e)}],"is-supported-script":[de,[xe],function(e,t){var r=e.globals&&e.globals.isSupportedScript;return!r||r(t[0].evaluate(e))}],upcase:[xe,[xe],function(e,t){return t[0].evaluate(e).toUpperCase()}],downcase:[xe,[xe],function(e,t){return t[0].evaluate(e).toLowerCase()}],concat:[xe,Fn(ge),function(e,t){return t.map(function(r){return jo(r.evaluate(e))}).join("")}],"resolved-locale":[xe,[et],function(e,t){return t[0].evaluate(e).resolvedLocale()}]});var yo=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new Ui,this._defaultValue=t?function(r){return r.type==="color"&&za(r.default)?new ut(0,0,0,0):r.type==="color"?ut.parse(r.default)||null:r.default===void 0?null:r.default}(t):null,this._enumValues=t&&t.type==="enum"?t.values:null};function Wo(e){return Array.isArray(e)&&e.length>0&&typeof e[0]=="string"&&e[0]in On}function Ca(e,t){var r=new $i(On,[],t?function(l){var c={color:ye,string:xe,number:ie,enum:xe,boolean:de,formatted:_t,resolvedImage:He};return l.type==="array"?lt(c[l.value]||ge,l.length):c[l.type]}(t):void 0),a=r.parse(e,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return a?Rl(new yo(a,t)):Un(r.errors)}yo.prototype.evaluateWithoutErrorHandling=function(e,t,r,a,l,c){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=a,this._evaluator.availableImages=l||null,this._evaluator.formattedSection=c,this.expression.evaluate(this._evaluator)},yo.prototype.evaluate=function(e,t,r,a,l,c){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=a,this._evaluator.availableImages=l||null,this._evaluator.formattedSection=c||null;try{var h=this.expression.evaluate(this._evaluator);if(h==null||typeof h=="number"&&h!=h)return this._defaultValue;if(this._enumValues&&!(h in this._enumValues))throw new tr("Expected value to be one of "+Object.keys(this._enumValues).map(function(m){return JSON.stringify(m)}).join(", ")+", but found "+JSON.stringify(h)+" instead.");return h}catch(m){return this._warningHistory[m.message]||(this._warningHistory[m.message]=!0,typeof console<"u"&&console.warn(m.message)),this._defaultValue}};var Ko=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent=e!=="constant"&&!Yi(t.expression)};Ko.prototype.evaluateWithoutErrorHandling=function(e,t,r,a,l,c){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,a,l,c)},Ko.prototype.evaluate=function(e,t,r,a,l,c){return this._styleExpression.evaluate(e,t,r,a,l,c)};var _o=function(e,t,r,a){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent=e!=="camera"&&!Yi(t.expression),this.interpolationType=a};function Vl(e,t){if((e=Ca(e,t)).result==="error")return e;var r=e.value.expression,a=Ji(r);if(!a&&!Vn(t))return Un([new se("","data expressions not supported")]);var l=kn(r,["zoom"]);if(!l&&!Ol(t))return Un([new se("","zoom expressions not supported")]);var c=function h(m){var _=null;if(m instanceof tn)_=h(m.result);else if(m instanceof en)for(var g=0,x=m.args;g<x.length&&!(_=h(x[g]));g+=1);else(m instanceof Br||m instanceof ur)&&m.
vendor: 16,566 bytes, line 1
1input instanceof lr&&m.input.name==="zoom"&&(_=m);return _ instanceof se||m.eachChild(function(b){var I=h(b);I instanceof se?_=I:!_&&I?_=new se("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):_&&I&&_!==I&&(_=new se("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),_}(r);return c||l?c instanceof se?Un([c]):c instanceof ur&&!Xo(t)?Un([new se("",'"interpolate" expressions cannot be used with this property')]):Rl(c?new _o(a?"camera":"composite",e.value,c.labels,c instanceof ur?c.interpolation:void 0):new Ko(a?"constant":"source",e.value)):Un([new se("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}_o.prototype.evaluateWithoutErrorHandling=function(e,t,r,a,l,c){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,a,l,c)},_o.prototype.evaluate=function(e,t,r,a,l,c){return this._styleExpression.evaluate(e,t,r,a,l,c)},_o.prototype.interpolationFactor=function(e,t,r){return this.interpolationType?ur.interpolationFactor(this.interpolationType,e,t,r):0};var go=function(e,t){this._parameters=e,this._specification=t,ae(this,function r(a,l){var c,h,m,_=l.type==="color",g=a.stops&&typeof a.stops[0][0]=="object",x=g||!(g||a.property!==void 0),b=a.type||(Xo(l)?"exponential":"interval");if(_&&((a=ae({},a)).stops&&(a.stops=a.stops.map(function(_e){return[_e[0],ut.parse(_e[1])]})),a.default=ut.parse(a.default?a.default:l.default)),a.colorSpace&&a.colorSpace!=="rgb"&&!Al[a.colorSpace])throw new Error("Unknown color space: "+a.colorSpace);if(b==="exponential")c=Ul;else if(b==="interval")c=Vu;else if(b==="categorical"){c=Fl,h=Object.create(null);for(var I=0,A=a.stops;I<A.length;I+=1){var L=A[I];h[L[0]]=L[1]}m=typeof a.stops[0][0]}else{if(b!=="identity")throw new Error('Unknown function type "'+b+'"');c=Pa}if(g){for(var B={},q=[],V=0;V<a.stops.length;V++){var W=a.stops[V],J=W[0].zoom;B[J]===void 0&&(B[J]={zoom:J,type:a.type,property:a.property,default:a.default,stops:[]},q.push(J)),B[J].stops.push([W[0].value,W[1]])}for(var Y=[],$=0,ne=q;$<ne.length;$+=1){var ue=ne[$];Y.push([B[ue].zoom,r(B[ue],l)])}var fe={name:"linear"};return{kind:"composite",interpolationType:fe,interpolationFactor:ur.interpolationFactor.bind(void 0,fe),zoomStops:Y.map(function(_e){return _e[0]}),evaluate:function(_e,Me){var ve=_e.zoom;return Ul({stops:Y,base:a.base},l,ve).evaluate(ve,Me)}}}if(x){var Pe=b==="exponential"?{name:"exponential",base:a.base!==void 0?a.base:1}:null;return{kind:"camera",interpolationType:Pe,interpolationFactor:ur.interpolationFactor.bind(void 0,Pe),zoomStops:a.stops.map(function(_e){return _e[0]}),evaluate:function(_e){return c(a,l,_e.zoom,h,m)}}}return{kind:"source",evaluate:function(_e,Me){var ve=Me&&Me.properties?Me.properties[a.property]:void 0;return ve===void 0?mo(a.default,l.default):c(a,l,ve,h,m)}}}(this._parameters,this._specification))};function _i(e){var t=e.key,r=e.value,a=e.valueSpec||{},l=e.objectElementValidators||{},c=e.style,h=e.styleSpec,m=[],_=xt(r);if(_!=="object")return[new U(t,r,"object expected, "+_+" found")];for(var g in r){var x=g.split(".")[0],b=a[x]||a["*"],I=void 0;if(l[x])I=l[x];else if(a[x])I=tt;else if(l["*"])I=l["*"];else{if(!a["*"]){m.push(new U(t,r[g],'unknown property "'+g+'"'));continue}I=tt}m=m.concat(I({key:(t&&t+".")+g,value:r[g],valueSpec:b,style:c,styleSpec:h,object:r,objectKey:g},r))}for(var A in a)l[A]||a[A].required&&a[A].default===void 0&&r[A]===void 0&&m.push(new U(t,r,'missing required property "'+A+'"'));return m}function Nl(e){var t=e.value,r=e.valueSpec,a=e.style,l=e.styleSpec,c=e.key,h=e.arrayElementValidator||tt;if(xt(t)!=="array")return[new U(c,t,"array expected, "+xt(t)+" found")];if(r.length&&t.length!==r.length)return[new U(c,t,"array length "+r.length+" expected, length "+t.length+" found")];if(r["min-length"]&&t.length<r["min-length"])return[new U(c,t,"array length at least "+r["min-length"]+" expected, length "+t.length+" found")];var m={type:r.value,values:r.values};l.$version<7&&(m.function=r.function),xt(r.value)==="object"&&(m=r.value);for(var _=[],g=0;g<t.length;g++)_=_.concat(h({array:t,arrayIndex:g,value:t[g],valueSpec:m,style:a,styleSpec:l,key:c+"["+g+"]"}));return _}function jl(e){var t=e.key,r=e.value,a=e.valueSpec,l=xt(r);return l==="number"&&r!=r&&(l="NaN"),l!=="number"?[new U(t,r,"number expected, "+l+" found")]:"minimum"in a&&r<a.minimum?[new U(t,r,r+" is less than the minimum value "+a.minimum)]:"maximum"in a&&r>a.maximum?[new U(t,r,r+" is greater than the maximum value "+a.maximum)]:[]}function ql(e){var t,r,a,l=e.valueSpec,c=le(e.value.type),h={},m=c!=="categorical"&&e.value.property===void 0,_=!m,g=xt(e.value.stops)==="array"&&xt(e.value.stops[0])==="array"&&xt(e.value.stops[0][0])==="object",x=_i({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(A){if(c==="identity")return[new U(A.key,A.value,'identity function may not have a "stops" property')];var L=[],B=A.value;return L=L.concat(Nl({key:A.key,value:B,valueSpec:A.valueSpec,style:A.style,styleSpec:A.styleSpec,arrayElementValidator:b})),xt(B)==="array"&&B.length===0&&L.push(new U(A.key,B,"array must have at least one stop")),L},default:function(A){return tt({key:A.key,value:A.value,valueSpec:l,style:A.style,styleSpec:A.styleSpec})}}});return c==="identity"&&m&&x.push(new U(e.key,e.value,'missing required property "property"')),c==="identity"||e.value.stops||x.push(new U(e.key,e.value,'missing required property "stops"')),c==="exponential"&&e.valueSpec.expression&&!Xo(e.valueSpec)&&x.push(new U(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(_&&!Vn(e.valueSpec)?x.push(new U(e.key,e.value,"property functions not supported")):m&&!Ol(e.valueSpec)&&x.push(new U(e.key,e.value,"zoom functions not supported"))),c!=="categorical"&&!g||e.value.property!==void 0||x.push(new U(e.key,e.value,'"property" property is required')),x;function b(A){var L=[],B=A.value,q=A.key;if(xt(B)!=="array")return[new U(q,B,"array expected, "+xt(B)+" found")];if(B.length!==2)return[new U(q,B,"array length 2 expected, length "+B.length+" found")];if(g){if(xt(B[0])!=="object")return[new U(q,B,"object expected, "+xt(B[0])+" found")];if(B[0].zoom===void 0)return[new U(q,B,"object stop key must have zoom")];if(B[0].value===void 0)return[new U(q,B,"object stop key must have value")];if(a&&a>le(B[0].zoom))return[new U(q,B[0].zoom,"stop zoom values must appear in ascending order")];le(B[0].zoom)!==a&&(a=le(B[0].zoom),r=void 0,h={}),L=L.concat(_i({key:q+"[0]",value:B[0],valueSpec:{zoom:{}},style:A.style,styleSpec:A.styleSpec,objectElementValidators:{zoom:jl,value:I}}))}else L=L.concat(I({key:q+"[0]",value:B[0],style:A.style,styleSpec:A.styleSpec},B));return Wo(re(B[1]))?L.concat([new U(q+"[1]",B[1],"expressions are not allowed in function stops.")]):L.concat(tt({key:q+"[1]",value:B[1],valueSpec:l,style:A.style,styleSpec:A.styleSpec}))}function I(A,L){var B=xt(A.value),q=le(A.value),V=A.value!==null?A.value:L;if(t){if(B!==t)return[new U(A.key,V,B+" stop domain type must match previous stop domain type "+t)]}else t=B;if(B!=="number"&&B!=="string"&&B!=="boolean")return[new U(A.key,V,"stop domain value must be a number, string, or boolean")];if(B!=="number"&&c!=="categorical"){var W="number expected, "+B+" found";return Vn(l)&&c===void 0&&(W+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new U(A.key,V,W)]}return c!=="categorical"||B!=="number"||isFinite(q)&&Math.floor(q)===q?c!=="categorical"&&B==="number"&&r!==void 0&&q<r?[new U(A.key,V,"stop domain values must appear in ascending order")]:(r=q,c==="categorical"&&q in h?[new U(A.key,V,"stop domain values must be unique")]:(h[q]=!0,[])):[new U(A.key,V,"integer expected, found "+q)]}}function Nn(e){var t=(e.expressionContext==="property"?Vl:Ca)(re(e.value),e.valueSpec);if(t.result==="error")return t.value.map(function(a){return new U(""+e.key+a.key,e.value,a.message)});var r=t.value.expression||t.value._styleExpression.expression;if(e.expressionContext==="property"&&e.propertyKey==="text-font"&&!r.outputDefined())return[new U(e.key,e.value,'Invalid data expression for "'+e.propertyKey+'". Output values must be contained as literals within the expression.')];if(e.expressionContext==="property"&&e.propertyType==="layout"&&!Yi(r))return[new U(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if(e.expressionContext==="filter"&&!Yi(r))return[new U(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&e.expressionContext.indexOf("cluster")===0){if(!kn(r,["zoom","feature-state"]))return[new U(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(e.expressionContext==="cluster-initial"&&!Ji(r))return[new U(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ho(e){var t=e.key,r=e.value,a=e.valueSpec,l=[];return Array.isArray(a.values)?a.values.indexOf(le(r))===-1&&l.push(new U(t,r,"expected one of ["+a.values.join(", ")+"], "+JSON.stringify(r)+" found")):Object.keys(a.values).indexOf(le(r))===-1&&l.push(new U(t,r,"expected one of ["+Object.keys(a.values).join(", ")+"], "+JSON.stringify(r)+" found")),l}function ka(e){if(e===!0||e===!1)return!0;if(!Array.isArray(e)||e.length===0)return!1;switch(e[0]){case"has":return e.length>=2&&e[1]!=="$id"&&e[1]!=="$type";case"in":return e.length>=3&&(typeof e[1]!="string"||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return e.length!==3||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,r=e.slice(1);t<r.length;t+=1){var a=r[t];if(!ka(a)&&typeof a!="boolean")return!1}return!0;default:return!0}}go.deserialize=function(e){return new go(e._parameters,e._specification)},go.serialize=function(e){return{_parameters:e._parameters,_specification:e._specification}};var Ms={type:"boolean",default:!1};function Ma(e){if(e==null)return{filter:function(){return!0},needGeometry:!1};ka(e)||(e=Da(e));var t=Ca(e,Ms);if(t.result==="error")throw new Error(t.value.map(function(r){return r.key+": "+r.message}).join(", "));return{filter:function(r,a,l){return t.value.evaluate(r,a,{},l)},needGeometry:function r(a){if(!Array.isArray(a))return!1;if(a[0]==="within")return!0;for(var l=1;l<a.length;l++)if(r(a[l]))return!0;return!1}(e)}}function Nu(e,t){return e<t?-1:e>t?1:0}function Da(e){if(!e)return!0;var t,r=e[0];return e.length<=1?r!=="any":r==="=="?Ds(e[1],e[2],"=="):r==="!="?La(Ds(e[1],e[2],"==")):r==="<"||r===">"||r==="<="||r===">="?Ds(e[1],e[2],r):r==="any"?(t=e.slice(1),["any"].concat(t.map(Da))):r==="all"?["all"].concat(e.slice(1).map(Da)):r==="none"?["all"].concat(e.slice(1).map(Da).map(La)):r==="in"?Zl(e[1],e.slice(2)):r==="!in"?La(Zl(e[1],e.slice(2))):r==="has"?Gl(e[1]):r==="!has"?La(Gl(e[1])):r!=="within"||e}function Ds(e,t,r){switch(e){case"$type":return["filter-type-"+r,t];case"$id":return["filter-id-"+r,t];default:return["filter-"+r,e,t]}}function Zl(e,t){if(t.length===0)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(function(r){return typeof r!=typeof t[0]})?["filter-in-large",e,["literal",t.sort(Nu)]]:["filter-in-small",e,["literal",t]]}}function Gl(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function La(e){return["!",e]}function Ls(e){return ka(re(e.value))?Nn(ae({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(r){var a=r.value,l=r.key;if(xt(a)!=="array")return[new U(l,a,"array expected, "+xt(a)+" found")];var c,h=r.styleSpec,m=[];if(a.length<1)return[new U(l,a,"filter array must have at least 1 element")];switch(m=m.concat(Ho({key:l+"[0]",value:a[0],valueSpec:h.filter_operator,style:r.style,styleSpec:r.styleSpec})),le(a[0])){case"<":case"<=":case">":case">=":a.length>=2&&le(a[1])==="$type"&&m.push(new U(l,a,'"$type" cannot be use with operator "'+a[0]+'"'));case"==":case"!=":a.length!==3&&m.push(new U(l,a,'filter array for operator "'+a[0]+'" must have 3 elements'));case"in":case"!in":a.length>=2&&(c=xt(a[1]))!=="string"&&m.push(new U(l+"[1]",a[1],"string expected, "+c+" found"));for(var _=2;_<a.length;_++)c=xt(a[_]),le(a[1])==="$type"?m=m.concat(Ho({key:l+"["+_+"]",value:a[_],valueSpec:h.geometry_type,style:r.style,styleSpec:r.styleSpec})):c!=="string"&&c!=="number"&&c!=="boolean"&&m.push(new U(l+"["+_+"]",a[_],"string, number, or boolean expected, "+c+" found"));break;case"any":case"all":case"none":for(var g=1;g<a.length;g++)m=m.concat(t({key:l+"["+g+"]",value:a[g],style:r.style,styleSpec:r.styleSpec}));break;case"has":case"!has":c=xt(a[1]),a.length!==2?m.push(new U(l,a,'filter array for "'+a[0]+'" operator must have 2 elements')):c!=="string"&&m.push(new U(l+"[1]",a[1],"string expected, "+c+" found"));break;case"within":c=xt(a[1]),a.length!==2?m.push(new U(l,a,'filter array for "'+a[0]+'" operator must have 2 elements')):c!=="object"&&m.push(new U(l+"[1]",a[1],"object expected, "+c+" found"))}return m}(e)}function Bs(e,t){var r=e.key,a=e.style,l=e.styleSpec,c=e.value,h=e.objectKey,m=l[t+"_"+e.layerType];if(!m)return[];var _=h.match(/^(.*)-transition$/);if(t==="paint"&&_&&m[_[1]]&&m[_[1]].transition)return tt({key:r,value:c,valueSpec:l.transition,style:a,styleSpec:l});var g,x=e.valueSpec||m[h];if(!x)return[new U(r,c,'unknown property "'+h+'"')];if(xt(c)==="string"&&Vn(x)&&!x.tokens&&(g=/^{([^}]+)}$/.exec(c)))return[new U(r,c,'"'+h+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(g[1])+" }`.")];var b=[];return e.layerType==="symbol"&&(h==="text-field"&&a&&!a.glyphs&&b.push(new U(r,c,'use of "text-field" requires a style "glyphs" property')),h==="text-font"&&za(re(c))&&le(c.type)==="identity"&&b.push(new U(r,c,'"text-font" does not support identity functions'))),b.concat(tt({key:e.key,value:c,valueSpec:x,style:a,styleSpec:l,expressionContext:"property",propertyType:t,propertyKey:h}))}function Rs(e){return Bs(e,"paint")}function Jo(e){return Bs(e,"layout")}function Xl(e){var t=[],r=e.value,a=e.key,l=e.style,c=e.styleSpec;r.type||r.ref||t.push(new U(a,r,'either "type" or "ref" is required'));var h,m=le(r.type),_=le(r.ref);if(r.id)for(var g=le(r.id),x=0;x<e.arrayIndex;x++){var b=l.layers[x];le(b.id)===g&&t.push(new U(a,r.id,'duplicate layer id "'+r.id+'", previously used at line '+b.id.__line__))}if("ref"in r)["type","source","source-layer","filter","layout"].forEach(function(L){L in r&&t.push(new U(a,r[L],'"'+L+'" is prohibited for ref layers'))}),l.layers.forEach(function(L){le(L.id)===_&&(h=L)}),h?h.ref?t.push(new U(a,r.ref,"ref cannot reference another ref layer")):m=le(h.type):t.push(new U(a,r.ref,'ref layer "'+_+'" not found'));else if(m!=="background")if(r.source){var I=l.sources&&l.sources[r.source],A=I&&le(I.type);I?A==="vector"&&m==="raster"?t.push(new U(a,r.source,'layer "'+r.id+'" requires a raster source')):A==="raster"&&m!=="raster"?t.push(new U(a,r.source,'layer "'+r.id+'" requires a vector source')):A!=="vector"||r["source-layer"]?A==="raster-dem"&&m!=="hillshade"?t.push(new U(a,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):m!=="line"||!r.paint||!r.paint["line-gradient"]||A==="geojson"&&I.lineMetrics||t.push(new U(a,r,'layer "'+r.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):t.push(new U(a,r,'layer "'+r.id+'" must specify a "source-layer"')):t.push(new U(a,r.source,'source "'+r.source+'" not found'))}else t.push(new U(a,r,'missing required property "source"'));return t=t.concat(_i({key:a,value:r,valueSpec:c.layer,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return tt({key:a+".type",value:r.type,valueSpec:c.layer.type,style:e.style,styleSpec:e.styleSpec,object:r,objectKey:"type"})},filter:Ls,layout:function(L){return _i({layer:r,key:L.key,value:L.value,style:L.style,styleSpec:L.styleSpec,objectElementValidators:{"*":function(B){return Jo(ae({layerType:m},B))}}})},paint:function(L){return _i({layer:r,key:L.key,value:L.value,style:L.style,styleSpec:L.styleSpec,objectElementValidators:{"*":function(B){return Rs(ae({layerType:m},B))}}})}}}))}function jn(e){var t=e.value,r=e.key,a=xt(t);
vendor: 9,391 bytes, line 1
1return a!=="string"?[new U(r,t,"string expected, "+a+" found")]:[]}var It={promoteId:function(e){var t=e.key,r=e.value;if(xt(r)==="string")return jn({key:t,value:r});var a=[];for(var l in r)a.push.apply(a,jn({key:t+"."+l,value:r[l]}));return a}};function Ba(e){var t=e.value,r=e.key,a=e.styleSpec,l=e.style;if(!t.type)return[new U(r,t,'"type" is required')];var c,h=le(t.type);switch(h){case"vector":case"raster":case"raster-dem":return _i({key:r,value:t,valueSpec:a["source_"+h.replace("-","_")],style:e.style,styleSpec:a,objectElementValidators:It});case"geojson":if(c=_i({key:r,value:t,valueSpec:a.source_geojson,style:l,styleSpec:a,objectElementValidators:It}),t.cluster)for(var m in t.clusterProperties){var _=t.clusterProperties[m],g=_[0],x=typeof g=="string"?[g,["accumulated"],["get",m]]:g;c.push.apply(c,Nn({key:r+"."+m+".map",value:_[1],expressionContext:"cluster-map"})),c.push.apply(c,Nn({key:r+"."+m+".reduce",value:x,expressionContext:"cluster-reduce"}))}return c;case"video":return _i({key:r,value:t,valueSpec:a.source_video,style:l,styleSpec:a});case"image":return _i({key:r,value:t,valueSpec:a.source_image,style:l,styleSpec:a});case"canvas":return[new U(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Ho({key:r+".type",value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function qn(e){var t=e.value,r=e.styleSpec,a=r.light,l=e.style,c=[],h=xt(t);if(t===void 0)return c;if(h!=="object")return c.concat([new U("light",t,"object expected, "+h+" found")]);for(var m in t){var _=m.match(/^(.*)-transition$/);c=c.concat(_&&a[_[1]]&&a[_[1]].transition?tt({key:m,value:t[m],valueSpec:r.transition,style:l,styleSpec:r}):a[m]?tt({key:m,value:t[m],valueSpec:a[m],style:l,styleSpec:r}):[new U(m,t[m],'unknown property "'+m+'"')])}return c}var an={"*":function(){return[]},array:Nl,boolean:function(e){var t=e.value,r=e.key,a=xt(t);return a!=="boolean"?[new U(r,t,"boolean expected, "+a+" found")]:[]},number:jl,color:function(e){var t=e.key,r=e.value,a=xt(r);return a!=="string"?[new U(t,r,"color expected, "+a+" found")]:Qe(r)===null?[new U(t,r,'color expected, "'+r+'" found')]:[]},constants:H,enum:Ho,filter:Ls,function:ql,layer:Xl,object:_i,source:Ba,light:qn,string:jn,formatted:function(e){return jn(e).length===0?[]:Nn(e)},resolvedImage:function(e){return jn(e).length===0?[]:Nn(e)}};function tt(e){var t=e.value,r=e.valueSpec,a=e.styleSpec;return r.expression&&za(le(t))?ql(e):r.expression&&Wo(re(t))?Nn(e):r.type&&an[r.type]?an[r.type](e):_i(ae({},e,{valueSpec:r.type?a[r.type]:r}))}function bt(e){var t=e.value,r=e.key,a=jn(e);return a.length||(t.indexOf("{fontstack}")===-1&&a.push(new U(r,t,'"glyphs" url must include a "{fontstack}" token')),t.indexOf("{range}")===-1&&a.push(new U(r,t,'"glyphs" url must include a "{range}" token'))),a}function Gr(e,t){t===void 0&&(t=P);var r=[];return r=r.concat(tt({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,objectElementValidators:{glyphs:bt,"*":function(){return[]}}})),e.constants&&(r=r.concat(H({key:"constants",value:e.constants}))),Yo(r)}function Yo(e){return[].concat(e).sort(function(t,r){return t.line-r.line})}function vo(e){return function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return Yo(e.apply(this,t))}}Gr.source=vo(Ba),Gr.light=vo(qn),Gr.layer=vo(Xl),Gr.filter=vo(Ls),Gr.paintProperty=vo(Rs),Gr.layoutProperty=vo(Jo);var Qo=Gr,ju=Qo.light,qu=Qo.paintProperty,$o=Qo.layoutProperty;function ea(e,t){var r=!1;if(t&&t.length)for(var a=0,l=t;a<l.length;a+=1)e.fire(new Z(new Error(l[a].message))),r=!0;return r}var Vi=Gt;function Gt(e,t,r){var a=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var l=new Int32Array(this.arrayBuffer);e=l[0],this.d=(t=l[1])+2*(r=l[2]);for(var c=0;c<this.d*this.d;c++){var h=l[3+c],m=l[3+c+1];a.push(h===m?null:l.subarray(h,m))}var _=l[3+a.length+1];this.keys=l.subarray(l[3+a.length],_),this.bboxes=l.subarray(_),this.insert=this._insertReadonly}else{this.d=t+2*r;for(var g=0;g<this.d*this.d;g++)a.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=r,this.scale=t/e,this.uid=0;var x=r/t*e;this.min=-x,this.max=e+x}Gt.prototype.insert=function(e,t,r,a,l){this._forEachCell(t,r,a,l,this._insertCell,this.uid++),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(a),this.bboxes.push(l)},Gt.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},Gt.prototype._insertCell=function(e,t,r,a,l,c){this.cells[l].push(c)},Gt.prototype.query=function(e,t,r,a,l){var c=this.min,h=this.max;if(e<=c&&t<=c&&h<=r&&h<=a&&!l)return Array.prototype.slice.call(this.keys);var m=[];return this._forEachCell(e,t,r,a,this._queryCell,m,{},l),m},Gt.prototype._queryCell=function(e,t,r,a,l,c,h,m){var _=this.cells[l];if(_!==null)for(var g=this.keys,x=this.bboxes,b=0;b<_.length;b++){var I=_[b];if(h[I]===void 0){var A=4*I;(m?m(x[A+0],x[A+1],x[A+2],x[A+3]):e<=x[A+2]&&t<=x[A+3]&&r>=x[A+0]&&a>=x[A+1])?(h[I]=!0,c.push(g[I])):h[I]=!1}}},Gt.prototype._forEachCell=function(e,t,r,a,l,c,h,m){for(var _=this._convertToCellCoord(e),g=this._convertToCellCoord(t),x=this._convertToCellCoord(r),b=this._convertToCellCoord(a),I=_;I<=x;I++)for(var A=g;A<=b;A++){var L=this.d*A+I;if((!m||m(this._convertFromCellCoord(I),this._convertFromCellCoord(A),this._convertFromCellCoord(I+1),this._convertFromCellCoord(A+1)))&&l.call(this,e,t,r,a,L,c,h,m))return}},Gt.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},Gt.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},Gt.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=3+this.cells.length+1+1,r=0,a=0;a<this.cells.length;a++)r+=this.cells[a].length;var l=new Int32Array(t+r+this.keys.length+this.bboxes.length);l[0]=this.extent,l[1]=this.n,l[2]=this.padding;for(var c=t,h=0;h<e.length;h++){var m=e[h];l[3+h]=c,l.set(m,c),c+=m.length}return l[3+e.length]=c,l.set(this.keys,c),l[3+e.length+1]=c+=this.keys.length,l.set(this.bboxes,c),c+=this.bboxes.length,l.buffer};var ta=ze.ImageData,Wl=ze.ImageBitmap,qt={};function Te(e,t,r){r===void 0&&(r={}),Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),qt[e]={klass:t,omit:r.omit||[],shallow:r.shallow||[]}}for(var Rr in Te("Object",Object),Vi.serialize=function(e,t){var r=e.toArrayBuffer();return t&&t.push(r),{buffer:r}},Vi.deserialize=function(e){return new Vi(e.buffer)},Te("Grid",Vi),Te("Color",ut),Te("Error",Error),Te("ResolvedImage",zr),Te("StylePropertyFunction",go),Te("StyleExpression",yo,{omit:["_evaluator"]}),Te("ZoomDependentExpression",_o),Te("ZoomConstantExpression",Ko),Te("CompoundExpression",lr,{omit:["_evaluate"]}),On)On[Rr]._classRegistryKey||Te("Expression_"+Rr,On[Rr]);function Ra(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}function xo(e){return Wl&&e instanceof Wl}function gi(e,t){if(e==null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(Ra(e)||xo(e))return t&&t.push(e),e;if(ArrayBuffer.isView(e)){var r=e;return t&&t.push(r.buffer),r}if(e instanceof ta)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){for(var a=[],l=0,c=e;l<c.length;l+=1)a.push(gi(c[l],t));return a}if(typeof e=="object"){var h=e.constructor,m=h._classRegistryKey;if(!m)throw new Error("can't serialize object of unregistered class");var _=h.serialize?h.serialize(e,t):{};if(!h.serialize){for(var g in e)if(e.hasOwnProperty(g)&&!(qt[m].omit.indexOf(g)>=0)){var x=e[g];_[g]=qt[m].shallow.indexOf(g)>=0?x:gi(x,t)}e instanceof Error&&(_.message=e.message)}if(_.$name)throw new Error("$name property is reserved for worker serialization logic.");return m!=="Object"&&(_.$name=m),_}throw new Error("can't serialize object of type "+typeof e)}function Or(e){if(e==null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||Ra(e)||xo(e)||ArrayBuffer.isView(e)||e instanceof ta)return e;if(Array.isArray(e))return e.map(Or);if(typeof e=="object"){var t=e.$name||"Object",r=qt[t].klass;if(!r)throw new Error("can't deserialize unregistered class "+t);if(r.deserialize)return r.deserialize(e);for(var a=Object.create(r.prototype),l=0,c=Object.keys(e);l<c.length;l+=1){var h=c[l];if(h!=="$name"){var m=e[h];a[h]=qt[t].shallow.indexOf(h)>=0?m:Or(m)}}return a}throw new Error("can't deserialize object of type "+typeof e)}var Os=function(){this.first=!0};Os.prototype.update=function(e,t){var r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=r,!0))};var me={"Latin-1 Supplement":function(e){return e>=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>
1=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};function Fs(e){for(var t=0,r=e;t<r.length;t+=1)if(Oa(r[t].charCodeAt(0)))return!0;return!1}function Oa(e){return!(e!==746&&e!==747&&(e<4352||!(me["Bopomofo Extended"](e)||me.Bopomofo(e)||me["CJK Compatibility Forms"](e)&&!(e>=65097&&e<=65103)||me["CJK Compatibility Ideographs"](e)||me["CJK Compatibility"](e)||me["CJK Radicals Supplement"](e)||me["CJK Strokes"](e)||!(!me["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||e===12336)||me["CJK Unified Ideographs Extension A"](e)||me["CJK Unified Ideographs"](e)||me["Enclosed CJK Letters and Months"](e)||me["Hangul Compatibility Jamo"](e)||me["Hangul Jamo Extended-A"](e)||me["Hangul Jamo Extended-B"](e)||me["Hangul Jamo"](e)||me["Hangul Syllables"](e)||me.Hiragana(e)||me["Ideographic Description Characters"](e)||me.Kanbun(e)||me["Kangxi Radicals"](e)||me["Katakana Phonetic Extensions"](e)||me.Katakana(e)&&e!==12540||!(!me["Halfwidth and Fullwidth Forms"](e)||e===65288||e===65289||e===65293||e>=65306&&e<=65310||e===65339||e===65341||e===65343||e>=65371&&e<=65503||e===65507||e>=65512&&e<=65519)||!(!me["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||me["Unified Canadian Aboriginal Syllabics"](e)||me["Unified Canadian Aboriginal Syllabics Extended"](e)||me["Vertical Forms"](e)||me["Yijing Hexagram Symbols"](e)||me["Yi Syllables"](e)||me["Yi Radicals"](e))))}function Us(e){return!(Oa(e)||function(t){return!!(me["Latin-1 Supplement"](t)&&(t===167||t===169||t===174||t===177||t===188||t===189||t===190||t===215||t===247)||me["General Punctuation"](t)&&(t===8214||t===8224||t===8225||t===8240||t===8241||t===8251||t===8252||t===8258||t===8263||t===8264||t===8265||t===8273)||me["Letterlike Symbols"](t)||me["Number Forms"](t)||me["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||t===9003||t>=9085&&t<=9114||t>=9150&&t<=9165||t===9167||t>=9169&&t<=9179||t>=9186&&t<=9215)||me["Control Pictures"](t)&&t!==9251||me["Optical Character Recognition"](t)||me["Enclosed Alphanumerics"](t)||me["Geometric Shapes"](t)||me["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||me["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||me["CJK Symbols and Punctuation"](t)||me.Katakana(t)||me["Private Use Area"](t)||me["CJK Compatibility Forms"](t)||me["Small Form Variants"](t)||me["Halfwidth and Fullwidth Forms"](t)||t===8734||t===8756||t===8757||t>=9984&&t<=10087||t>=10102&&t<=10131||t===65532||t===65533)}(e))}function ii(e){return e>=1424&&e<=2303||me["Arabic Presentation Forms-A"](e)||me["Arabic Presentation Forms-B"](e)}function Fr(e,t){return!(!t&&ii(e)||e>=2304&&e<=3583||e>=3840&&e<=4255||me.Khmer(e))}function Fa(e){for(var t=0,r=e;t<r.length;t+=1)if(ii(r[t].charCodeAt(0)))return!0;return!1}var Ua=null,Ur="unavailable",Ni=null,Kl=function(e){e&&typeof e=="string"&&e.indexOf("NetworkError")>-1&&(Ur="error"),Ua&&Ua(e)};function ra(){Vs.fire(new O("pluginStateChange",{pluginStatus:Ur,pluginURL:Ni}))}var Vs=new X,Ns=function(){return Ur},vi=function(){if(Ur!=="deferred"||!Ni)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Ur="loading",ra(),Ni&&Uo({url:Ni},function(e){e?Kl(e):(Ur="loaded",ra())})},Xr={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Ur==="loaded"||Xr.applyArabicShaping!=null},isLoading:function(){return Ur==="loading"},setState:function(e){Ur=e.pluginStatus,Ni=e.pluginURL},isParsed:function(){return Xr.applyArabicShaping!=null&&Xr.processBidirectionalText!=null&&Xr.processStyledBidirectionalText!=null},getPluginURL:function(){return Ni}},Je=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Os,this.transition={})};Je.prototype.isSupportedScript=function(e){return function(t,r){for(var a=0,l=t;a<l.length;
vendor: 9,459 bytes, line 1
1a+=1)if(!Fr(l[a].charCodeAt(0),r))return!1;return!0}(e,Xr.isLoaded())},Je.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Je.prototype.getCrossfadeParameters=function(){var e=this.zoom,t=e-Math.floor(e),r=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}};var Ai=function(e,t){this.property=e,this.value=t,this.expression=function(r,a){if(za(r))return new go(r,a);if(Wo(r)){var l=Vl(r,a);if(l.result==="error")throw new Error(l.value.map(function(h){return h.key+": "+h.message}).join(", "));return l.value}var c=r;return typeof r=="string"&&a.type==="color"&&(c=ut.parse(r)),{kind:"constant",evaluate:function(){return c}}}(t===void 0?e.specification.default:t,e.specification)};Ai.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Ai.prototype.possiblyEvaluate=function(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)};var ni=function(e){this.property=e,this.value=new Ai(e,void 0)};ni.prototype.transitioned=function(e,t){return new Zn(this.property,this.value,t,sr({},e.transition,this.transition),e.now)},ni.prototype.untransitioned=function(){return new Zn(this.property,this.value,null,{},0)};var cr=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};cr.prototype.getValue=function(e){return ci(this._values[e].value.value)},cr.prototype.setValue=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new ni(this._values[e].property)),this._values[e].value=new Ai(this._values[e].property,t===null?void 0:ci(t))},cr.prototype.getTransition=function(e){return ci(this._values[e].transition)},cr.prototype.setTransition=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new ni(this._values[e].property)),this._values[e].transition=ci(t)||void 0},cr.prototype.serialize=function(){for(var e={},t=0,r=Object.keys(this._values);t<r.length;t+=1){var a=r[t],l=this.getValue(a);l!==void 0&&(e[a]=l);var c=this.getTransition(a);c!==void 0&&(e[a+"-transition"]=c)}return e},cr.prototype.transitioned=function(e,t){for(var r=new sn(this._properties),a=0,l=Object.keys(this._values);a<l.length;a+=1){var c=l[a];r._values[c]=this._values[c].transitioned(e,t._values[c])}return r},cr.prototype.untransitioned=function(){for(var e=new sn(this._properties),t=0,r=Object.keys(this._values);t<r.length;t+=1){var a=r[t];e._values[a]=this._values[a].untransitioned()}return e};var Zn=function(e,t,r,a,l){this.property=e,this.value=t,this.begin=l+a.delay||0,this.end=this.begin+a.duration||0,e.specification.transition&&(a.delay||a.duration)&&(this.prior=r)};Zn.prototype.possiblyEvaluate=function(e,t,r){var a=e.now||0,l=this.value.possiblyEvaluate(e,t,r),c=this.prior;if(c){if(a>this.end)return this.prior=null,l;if(this.value.isDataDriven())return this.prior=null,l;if(a<this.begin)return c.possiblyEvaluate(e,t,r);var h=(a-this.begin)/(this.end-this.begin);return this.property.interpolate(c.possiblyEvaluate(e,t,r),l,function(m){if(m<=0)return 0;if(m>=1)return 1;var _=m*m,g=_*m;return 4*(m<.5?g:3*(m-_)+g-.75)}(h))}return l};var sn=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};sn.prototype.possiblyEvaluate=function(e,t,r){for(var a=new ia(this._properties),l=0,c=Object.keys(this._values);l<c.length;l+=1){var h=c[l];a._values[h]=this._values[h].possiblyEvaluate(e,t,r)}return a},sn.prototype.hasTransition=function(){for(var e=0,t=Object.keys(this._values);e<t.length;e+=1)if(this._values[t[e]].prior)return!0;return!1};var xi=function(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)};xi.prototype.getValue=function(e){return ci(this._values[e].value)},xi.prototype.setValue=function(e,t){this._values[e]=new Ai(this._values[e].property,t===null?void 0:ci(t))},xi.prototype.serialize=function(){for(var e={},t=0,r=Object.keys(this._values);t<r.length;t+=1){var a=r[t],l=this.getValue(a);l!==void 0&&(e[a]=l)}return e},xi.prototype.possiblyEvaluate=function(e,t,r){for(var a=new ia(this._properties),l=0,c=Object.keys(this._values);l<c.length;l+=1){var h=c[l];a._values[h]=this._values[h].possiblyEvaluate(e,t,r)}return a};var xr=function(e,t,r){this.property=e,this.value=t,this.parameters=r};xr.prototype.isConstant=function(){return this.value.kind==="constant"},xr.prototype.constantOr=function(e){return this.value.kind==="constant"?this.value.value:e},xr.prototype.evaluate=function(e,t,r,a){return this.property.evaluate(this.value,this.parameters,e,t,r,a)};var ia=function(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)};ia.prototype.get=function(e){return this._values[e]};var Ce=function(e){this.specification=e};Ce.prototype.possiblyEvaluate=function(e,t){return e.expression.evaluate(t)},Ce.prototype.interpolate=function(e,t,r){var a=fo[this.specification.type];return a?a(e,t,r):e};var Ee=function(e,t){this.specification=e,this.overrides=t};Ee.prototype.possiblyEvaluate=function(e,t,r,a){return new xr(this,e.expression.kind==="constant"||e.expression.kind==="camera"?{kind:"constant",value:e.expression.evaluate(t,null,{},r,a)}:e.expression,t)},Ee.prototype.interpolate=function(e,t,r){if(e.value.kind!=="constant"||t.value.kind!=="constant")return e;if(e.value.value===void 0||t.value.value===void 0)return new xr(this,{kind:"constant",value:void 0},e.parameters);var a=fo[this.specification.type];return a?new xr(this,{kind:"constant",value:a(e.value.value,t.value.value,r)},e.parameters):e},Ee.prototype.evaluate=function(e,t,r,a,l,c){return e.kind==="constant"?e.value:e.evaluate(t,r,a,l,c)};var Va=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.possiblyEvaluate=function(r,a,l,c){if(r.value===void 0)return new xr(this,{kind:"constant",value:void 0},a);if(r.expression.kind==="constant"){var h=r.expression.evaluate(a,null,{},l,c),m=r.property.specification.type==="resolvedImage"&&typeof h!="string"?h.name:h,_=this._calculate(m,m,m,a);return new xr(this,{kind:"constant",value:_},a)}if(r.expression.kind==="camera"){var g=this._calculate(r.expression.evaluate({zoom:a.zoom-1}),r.expression.evaluate({zoom:a.zoom}),r.expression.evaluate({zoom:a.zoom+1}),a);return new xr(this,{kind:"constant",value:g},a)}return new xr(this,r.expression,a)},t.prototype.evaluate=function(r,a,l,c,h,m){if(r.kind==="source"){var _=r.evaluate(a,l,c,h,m);return this._calculate(_,_,_,a)}return r.kind==="composite"?this._calculate(r.evaluate({zoom:Math.floor(a.zoom)-1},l,c),r.evaluate({zoom:Math.floor(a.zoom)},l,c),r.evaluate({zoom:Math.floor(a.zoom)+1},l,c),a):r.value},t.prototype._calculate=function(r,a,l,c){return c.zoom>c.zoomHistory.lastIntegerZoom?{from:r,to:a}:{from:l,to:a}},t.prototype.interpolate=function(r){return r},t}(Ee),br=function(e){this.specification=e};br.prototype.possiblyEvaluate=function(e,t,r,a){if(e.value!==void 0){if(e.expression.kind==="constant"){var l=e.expression.evaluate(t,null,{},r,a);return this._calculate(l,l,l,t)}return this._calculate(e.expression.evaluate(new Je(Math.floor(t.zoom-1),t)),e.expression.evaluate(new Je(Math.floor(t.zoom),t)),e.expression.evaluate(new Je(Math.floor(t.zoom+1),t)),t)}},br.prototype._calculate=function(e,t,r,a){return a.zoom>a.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},br.prototype.interpolate=function(e){return e};var bi=function(e){this.specification=e};bi.prototype.possiblyEvaluate=function(e,t,r,a){return!!e.expression.evaluate(t,null,{},r,a)},bi.prototype.interpolate=function(){return!1};var pr=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var r=e[t];r.specification.overridable&&this.overridableProperties.push(t);var a=this.defaultPropertyValues[t]=new Ai(r,void 0),l=this.defaultTransitionablePropertyValues[t]=new ni(r);this.defaultTransitioningPropertyValues[t]=l.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=a.possiblyEvaluate({})}};Te("DataDrivenProperty",Ee),Te("DataConstantProperty",Ce),Te("CrossFadedDataDrivenProperty",Va),Te("CrossFadedProperty",br),Te("ColorRampProperty",bi);var zi=function(e){function t(r,a){if(e.call(this),this.id=r.id,this.type=r.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},r.type!=="custom"&&(this.metadata=(r=r).metadata,this.minzoom=r.minzoom,this.maxzoom=r.maxzoom,r.type!=="background"&&(this.source=r.source,this.sourceLayer=r["source-layer"],this.filter=r.filter),a.layout&&(this._unevaluatedLayout=new xi(a.layout)),a.paint)){for(var l in this._transitionablePaint=new cr(a.paint),r.paint)this.setPaintProperty(l,r.paint[l],{validate:!1});for(var c in r.layout)this.setLayoutProperty(c,r.layout[c],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new ia(a.paint)}}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},t.prototype.getLayoutProperty=function(r){return r==="visibility"?this.visibility:this._unevaluatedLayout.getValue(r)},t.prototype.setLayoutProperty=function(r,a,l){l===void 0&&(l={}
vendor: 1,676 bytes, line 1
1),a!=null&&this._validate($o,"layers."+this.id+".layout."+r,r,a,l)||(r!=="visibility"?this._unevaluatedLayout.setValue(r,a):this.visibility=a)},t.prototype.getPaintProperty=function(r){return Sn(r,"-transition")?this._transitionablePaint.getTransition(r.slice(0,-11)):this._transitionablePaint.getValue(r)},t.prototype.setPaintProperty=function(r,a,l){if(l===void 0&&(l={}),a!=null&&this._validate(qu,"layers."+this.id+".paint."+r,r,a,l))return!1;if(Sn(r,"-transition"))return this._transitionablePaint.setTransition(r.slice(0,-11),a||void 0),!1;var c=this._transitionablePaint._values[r],h=c.property.specification["property-type"]==="cross-faded-data-driven",m=c.value.isDataDriven(),_=c.value;this._transitionablePaint.setValue(r,a),this._handleSpecialPaintPropertyUpdate(r);var g=this._transitionablePaint._values[r].value;return g.isDataDriven()||m||h||this._handleOverridablePaintPropertyUpdate(r,_,g)},t.prototype._handleSpecialPaintPropertyUpdate=function(r){},t.prototype._handleOverridablePaintPropertyUpdate=function(r,a,l){return!1},t.prototype.isHidden=function(r){return!!(this.minzoom&&r<this.minzoom)||!!(this.maxzoom&&r>=this.maxzoom)||this.visibility==="none"},t.prototype.updateTransitions=function(r){this._transitioningPaint=this._transitionablePaint.transitioned(r,this._transitioningPaint)},t.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},t.prototype.recalculate=function(r,a){r.getCrossfadeParameters&&(this._crossfadeParameters=r.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(r,void 0,a)),this.paint=this._transitioningPaint.possiblyEvaluate(r,void 0,a)}
vendor: 45,091 bytes, line 1
1,t.prototype.serialize=function(){var r={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(r.layout=r.layout||{},r.layout.visibility=this.visibility),Bi(r,function(a,l){return!(a===void 0||l==="layout"&&!Object.keys(a).length||l==="paint"&&!Object.keys(a).length)})},t.prototype._validate=function(r,a,l,c,h){return h===void 0&&(h={}),(!h||h.validate!==!1)&&ea(this,r.call(Qo,{key:a,layerType:this.type,objectKey:l,value:c,styleSpec:P,style:{glyphs:!0,sprite:!0}}))},t.prototype.is3D=function(){return!1},t.prototype.isTileClipped=function(){return!1},t.prototype.hasOffscreenPass=function(){return!1},t.prototype.resize=function(){},t.prototype.isStateDependent=function(){for(var r in this.paint._values){var a=this.paint.get(r);if(a instanceof xr&&Vn(a.property.specification)&&(a.value.kind==="source"||a.value.kind==="composite")&&a.value.isStateDependent)return!0}return!1},t}(X),js={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Na=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},ht=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function rr(e,t){t===void 0&&(t=1);var r=0,a=0;return{members:e.map(function(l){var c=js[l.type].BYTES_PER_ELEMENT,h=r=Hl(r,Math.max(t,c)),m=l.components||1;return a=Math.max(a,c),r+=c*m,{name:l.name,type:l.type,components:m,offset:h}}),size:Hl(r,Math.max(a,t)),alignment:t}}function Hl(e,t){return Math.ceil(e/t)*t}ht.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},ht.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},ht.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ht.prototype.clear=function(){this.length=0},ht.prototype.resize=function(e){this.reserve(e),this.length=e},ht.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}},ht.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Gn=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a){var l=this.length;return this.resize(l+1),this.emplace(l,r,a)},t.prototype.emplace=function(r,a,l){var c=2*r;return this.int16[c+0]=a,this.int16[c+1]=l,r},t}(ht);Gn.prototype.bytesPerElement=4,Te("StructArrayLayout2i4",Gn);var qs=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c){var h=this.length;return this.resize(h+1),this.emplace(h,r,a,l,c)},t.prototype.emplace=function(r,a,l,c,h){var m=4*r;return this.int16[m+0]=a,this.int16[m+1]=l,this.int16[m+2]=c,this.int16[m+3]=h,r},t}(ht);qs.prototype.bytesPerElement=8,Te("StructArrayLayout4i8",qs);var ji=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c,h,m){var _=this.length;return this.resize(_+1),this.emplace(_,r,a,l,c,h,m)},t.prototype.emplace=function(r,a,l,c,h,m,_){var g=6*r;return this.int16[g+0]=a,this.int16[g+1]=l,this.int16[g+2]=c,this.int16[g+3]=h,this.int16[g+4]=m,this.int16[g+5]=_,r},t}(ht);ji.prototype.bytesPerElement=12,Te("StructArrayLayout2i4i12",ji);var Vr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c,h,m){var _=this.length;return this.resize(_+1),this.emplace(_,r,a,l,c,h,m)},t.prototype.emplace=function(r,a,l,c,h,m,_){var g=4*r,x=8*r;return this.int16[g+0]=a,this.int16[g+1]=l,this.uint8[x+4]=c,this.uint8[x+5]=h,this.uint8[x+6]=m,this.uint8[x+7]=_,r},t}(ht);Vr.prototype.bytesPerElement=8,Te("StructArrayLayout2i4ub8",Vr);var bo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a){var l=this.length;return this.resize(l+1),this.emplace(l,r,a)},t.prototype.emplace=function(r,a,l){var c=2*r;return this.float32[c+0]=a,this.float32[c+1]=l,r},t}(ht);bo.prototype.bytesPerElement=8,Te("StructArrayLayout2f8",bo);var Pi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c,h,m,_,g,x,b){var I=this.length;return this.resize(I+1),this.emplace(I,r,a,l,c,h,m,_,g,x,b)},t.prototype.emplace=function(r,a,l,c,h,m,_,g,x,b,I){var A=10*r;return this.uint16[A+0]=a,this.uint16[A+1]=l,this.uint16[A+2]=c,this.uint16[A+3]=h,this.uint16[A+4]=m,this.uint16[A+5]=_,this.uint16[A+6]=g,this.uint16[A+7]=x,this.uint16[A+8]=b,this.uint16[A+9]=I,r},t}(ht);Pi.prototype.bytesPerElement=20,Te("StructArrayLayout10ui20",Pi);var ja=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c,h,m,_,g,x,b,I,A){var L=this.length;return this.resize(L+1),this.emplace(L,r,a,l,c,h,m,_,g,x,b,I,A)},t.prototype.emplace=function(r,a,l,c,h,m,_,g,x,b,I,A,L){var B=12*r;return this.int16[B+0]=a,this.int16[B+1]=l,this.int16[B+2]=c,this.int16[B+3]=h,this.uint16[B+4]=m,this.uint16[B+5]=_,this.uint16[B+6]=g,this.uint16[B+7]=x,this.int16[B+8]=b,this.int16[B+9]=I,this.int16[B+10]=A,this.int16[B+11]=L,r},t}(ht);ja.prototype.bytesPerElement=24,Te("StructArrayLayout4i4ui4i24",ja);var wo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l){var c=this.length;return this.resize(c+1),this.emplace(c,r,a,l)},t.prototype.emplace=function(r,a,l,c){var h=3*r;return this.float32[h+0]=a,this.float32[h+1]=l,this.float32[h+2]=c,r},t}(ht);wo.prototype.bytesPerElement=12,Te("StructArrayLayout3f12",wo);var na=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r){var a=this.length;return this.resize(a+1),this.emplace(a,r)},t.prototype.emplace=function(r,a){return this.uint32[1*r+0]=a,r},t}(ht);na.prototype.bytesPerElement=4,Te("StructArrayLayout1ul4",na);var Zs=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c,h,m,_,g,x){var b=this.length;return this.resize(b+1),this.emplace(b,r,a,l,c,h,m,_,g,x)},t.prototype.emplace=function(r,a,l,c,h,m,_,g,x,b){var I=10*r,A=5*r;return this.int16[I+0]=a,this.int16[I+1]=l,this.int16[I+2]=c,this.int16[I+3]=h,this.int16[I+4]=m,this.int16[I+5]=_,this.uint32[A+3]=g,this.uint16[I+8]=x,this.uint16[I+9]=b,r},t}(ht);Zs.prototype.bytesPerElement=20,Te("StructArrayLayout6i1ul2ui20",Zs);var So=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c,h,m){var _=this.length;return this.resize(_+1),this.emplace(_,r,a,l,c,h,m)},t.prototype.emplace=function(r,a,l,c,h,m,_){var g=6*r;return this.int16[g+0]=a,this.int16[g+1]=l,this.int16[g+2]=c,this.int16[g+3]=h,this.int16[g+4]=m,this.int16[g+5]=_,r},t}(ht);So.prototype.bytesPerElement=12,Te("StructArrayLayout2i2i2i12",So);var Xn=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c,h){var m=this.length;return this.resize(m+1),this.emplace(m,r,a,l,c,h)},t.prototype.emplace=function(r,a,l,c,h,m){var _=4*r,g=8*r;return this.float32[_+0]=a,this.float32[_+1]=l,this.float32[_+2]=c,this.int16[g+6]=h,this.int16[g+7]=m,r},t}(ht);Xn.prototype.bytesPerElement=16,Te("StructArrayLayout2f1f2i16",Xn);var Gs=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c){var h=this.length;return this.resize(h+1),this.emplace(h,r,a,l,c)},t.prototype.emplace=function(r,a,l,c,h){var m=12*r,_=3*r;return this.uint8[m+0]=a,this.uint8[m+1]=l,this.float32[_+1]=c,this.float32[_+2]=h,r},t}(ht);Gs.prototype.bytesPerElement=12,Te("StructArrayLayout2ub2f12",Gs);var ln=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l){var c=this.length;return this.resize(c+1),this.emplace(c,r,a,l)},t.prototype.emplace=function(r,a,l,c){var h=3*r;return this.uint16[h+0]=a,this.uint16[h+1]=l,this.uint16[h+2]=c,r},t}(ht);ln.prototype.bytesPerElement=6,Te("StructArrayLayout3ui6",ln);var un=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c,h,m,_,g,x,b,I,A,L,B,q,V,W){var J=this.length;return this.resize(J+1),this.emplace(J,r,a,l,c,h,m,_,g,x,b,I,A,L,B,q,V,W)},t.prototype.emplace=function(r,a,l,c,h,m,_,g,x,b,I,A,L,B,q,V,W,J){var Y=24*r,$=12*r,ne=48*r;return this.int16[Y+0]=a,this.int16[Y+1]=l,this.uint16[Y+2]=c,this.uint16[Y+3]=h,this.uint32[$+2]=m,this.uint32[$+3]=_,this.uint32[$+4]=g,this.uint16[Y+10]=x,this.uint16[Y+11]=b,this.uint16[Y+12]=I,this.float32[$+7]=A,this.float32[$+8]=L,this.uint8[ne+36]=B,this.uint8[ne+37]=q,this.uint8[ne+38]=V,this.uint32[$+10]=W,this.int16[Y+22]=J,r},t}(ht);un.prototype.bytesPerElement=48,Te("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",un);var qa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c,h,m,_,g,x,b,I,A,L,B,q,V,W,J,Y,$,ne,ue,fe,Pe,_e,Me,ve,Xe){var Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,r,a,l,c,h,m,_,g,x,b,I,A,L,B,q,V,W,J,Y,$,ne,ue,fe,Pe,_e,Me,ve,Xe)},t.prototype.emplace=function(r,a,l,c,h,m,_,g,x,b,I,A,L,B,q,V,W,J,Y,$,ne,ue,fe,Pe,_e,Me,ve,Xe,Oe){var Ae=34*r,Ke=17*r;return this.int16[Ae+0]=a,this.int16[Ae+1]=l,this.int16[Ae+2]=c,this.int16[Ae+3]=h,this.int16[Ae+4]=m,this.int16[Ae+5]=_,this.int16[Ae+6]=g,this.int16[Ae+7]=x,this.uint16[Ae+8]=b,this.uint16[Ae+9]=I,this.uint16[Ae+10]=A,this.uint16[Ae+11]=L,this.uint16[Ae+12]=B,this.uint16[Ae+13]=q,this.uint16[Ae+14]=V,this.uint16[Ae+15]=W,this.uint16[Ae+16]=J,this.uint16[Ae+17]=Y,this.uint16[Ae+18]=$,this.uint16[Ae+19]=ne,this.uint16[Ae+20]=ue,this.uint16[Ae+21]=fe,this.uint16[Ae+22]=Pe,this.uint32[Ke+12]=_e,this.float32[Ke+13]=Me,this.float32[Ke+14]=ve,this.float32[Ke+15]=Xe,this.float32[Ke+16]=Oe,r},t}(ht);qa.prototype.bytesPerElement=68,Te("StructArrayLayout8i15ui1ul4f68",qa);var cn=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r){var a=this.length;return this.resize(a+1),this.emplace(a,r)},t.prototype.emplace=function(r,a){return this.float32[1*r+0]=a,r},t}(ht);cn.prototype.bytesPerElement=4,Te("StructArrayLayout1f4",cn);var oi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l){var c=this.length;return this.resize(c+1),this.emplace(c,r,a,l)},t.prototype.emplace=function(r,a,l,c){var h=3*r;return this.int16[h+0]=a,this.int16[h+1]=l,this.int16[h+2]=c,r},t}(ht);oi.prototype.bytesPerElement=6,Te("StructArrayLayout3i6",oi);var Xs=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l){var c=this.length;return this.resize(c+1),this.emplace(c,r,a,l)},t.prototype.emplace=function(r,a,l,c){var h=4*r;return this.uint32[2*r+0]=a,this.uint16[h+2]=l,this.uint16[h+3]=c,r},t}(ht);Xs.prototype.bytesPerElement=8,Te("StructArrayLayout1ul2ui8",Xs);var oa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a){var l=this.length;return this.resize(l+1),this.emplace(l,r,a)},t.prototype.emplace=function(r,a,l){var c=2*r;return this.uint16[c+0]=a,this.uint16[c+1]=l,r},t}(ht);oa.prototype.bytesPerElement=4,Te("StructArrayLayout2ui4",oa);var Ws=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r){var a=this.length;return this.resize(a+1),this.emplace(a,r)},t.prototype.emplace=function(r,a){return this.uint16[1*r+0]=a,r},t}(ht);Ws.prototype.bytesPerElement=2,Te("StructArrayLayout1ui2",Ws);var Za=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(r,a,l,c){var h=this.length;return this.resize(h+1),this.emplace(h,r,a,l,c)},t.prototype.emplace=function(r,a,l,c,h){var m=4*r;return this.float32[m+0]=a,this.float32[m+1]=l,this.float32[m+2]=c,this.float32[m+3]=h,r},t}(ht);Za.prototype.bytesPerElement=16,Te("StructArrayLayout4f16",Za);var i=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new je(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,r),t}(Na);i.prototype.size=20;var o=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.get=function(r){return new i(this,r)},t}(Zs);Te("CollisionBoxArray",o);var n=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(a){this._structArray.uint8[this._pos1+37]=a},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(a){this._structArray.uint8[this._pos1+38]=a},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(a){this._structArray.uint32[this._pos4+10]=a},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(t.prototype,r),t}(Na);n.prototype.size=48;var s=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.get=function(r){return new n(this,r)},t}(un);Te("PlacedSymbolArray",s);var p=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(a){this._structArray.uint32[this._pos4+12]=a},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(t.prototype,r),t}(Na);p.prototype.size=68;var f=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.get=function(r){return new p(this,r)},t}(qa);Te("SymbolInstanceArray",f);var d=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.getoffsetX=function(r){return this.float32[1*r+0]},t}(cn);Te("GlyphOffsetArray",d);var y=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.getx=function(r){return this.int16[3*r+0]},t.prototype.gety=function(r){return this.int16[3*r+1]},t.prototype.gettileUnitDistanceFromAnchor=function(r){return this.int16[3*r+2]},t}(oi);Te("SymbolLineVertexArray",y);var v=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(t.prototype,r),t}(Na);v.prototype.size=8;var S=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.get=function(r){return new v(this,r)},t}(Xs);Te("FeatureIndexArray",S);var z=rr([{name:"a_pos",components:2,type:"Int16"}],4).members,C=function(e){e===void 0&&(e=[]),this.segments=e};function k(e,t){return 256*(e=Dr(Math.floor(e),0,255))+Dr(Math.floor(t),0,255)}C.prototype.prepareSegment=function(e,t,r,a){var l=this.segments[this.segments.length-1];return e>C.MAX_VERTEX_ARRAY_LENGTH&&kt("Max vertices per segment is "+C.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+e),(!l||l.vertexLength+e>C.MAX_VERTEX_ARRAY_LENGTH||l.sortKey!==a)&&(l={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},a!==void 0&&(l.sortKey=a),this.segments.push(l)),l},C.prototype.get=function(){return this.segments},C.prototype.destroy=function(){for(var e=0,t=this.segments;e<t.length;e+=1){var r=t[e];for(var a in r.vaos)r.vaos[a].destroy()}},C.simpleSegment=function(e,t,r,a){return new C([{vertexOffset:e,primitiveOffset:t,vertexLength:r,primitiveLength:a,vaos:{},sortKey:0}])},C.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Te("SegmentVector",C);var F=rr([{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"}]),R=qr(function(e){e.exports=function(t,r){var a,l,c,h,m,_,g,x;for(l=t.length-(a=3&t.length),c=r,m=3432918353,_=461845907,x=0;x<l;)g=255&t.charCodeAt(x)|(255&t.charCodeAt(++x))<<8|(255&t.charCodeAt(++x))<<16|(255&t.charCodeAt(++x))<<24,++x,c=27492+(65535&(h=5*(65535&(c=(c^=g=(65535&(g=(g=(65535&g)*m+(((g>>>16)*m&65535)<<16)&4294967295)<<15|g>>>17))*_+(((g>>>16)*_&65535)<<16)&4294967295)<<13|c>>>19))+((5*(c>>>16)&65535)<<16)&4294967295))+((58964+(h>>>16)&65535)<<16);switch(g=0,a){case 3:g^=(255&t.charCodeAt(x+2))<<16;case 2:g^=(255&t.charCodeAt(x+1))<<8;case 1:c^=g=(65535&(g=(g=(65535&(g^=255&t.charCodeAt(x)))*m+(((g>>>16)*m&65535)<<16)&4294967295)<<15|g>>>17))*_+(((g>>>16)*_&65535)<<16)&4294967295}return c^=t.length,c=2246822507*(65535&(c^=c>>>16))+((2246822507*(c>>>16)&65535)<<16)&4294967295,c=3266489909*(65535&(c^=c>>>13))+((3266489909*(c>>>16)&65535)<<16)&4294967295,(c^=c>>>16)>>>0}}),j=qr(function(e){e.exports=function(t,r){for(var a,l=t.length,c=r^l,h=0;l>=4;)a=1540483477*(65535&(a=255&t.charCodeAt(h)|(255&t.charCodeAt(++h))<<8|(255&t.charCodeAt(++h))<<16|(255&t.charCodeAt(++h))<<24))+((1540483477*(a>>>16)&65535)<<16),c=1540483477*(65535&c)+((1540483477*(c>>>16)&65535)<<16)^(a=1540483477*(65535&(a^=a>>>24))+((1540483477*(a>>>16)&65535)<<16)),l-=4,++h;switch(l){case 3:c^=(255&t.charCodeAt(h+2))<<16;case 2:c^=(255&t.charCodeAt(h+1))<<8;case 1:c=1540483477*(65535&(c^=255&t.charCodeAt(h)))+((1540483477*(c>>>16)&65535)<<16)}return c=1540483477*(65535&(c^=c>>>13))+((1540483477*(c>>>16)&65535)<<16),(c^=c>>>15)>>>0}}),D=R,N=j;D.murmur3=R,D.murmur2=N;var G=function(){this.ids=[],this.positions=[],this.indexed=!1};G.prototype.add=function(e,t,r,a){this.ids.push(ee(e)),this.positions.push(t,r,a)},G.prototype.getPositions=function(e){for(var t=ee(e),r=0,a=this.ids.length-1;r<a;){var l=r+a>>1;this.ids[l]>=t?a=l:r=l+1}for(var c=[];this.ids[r]===t;)c.push({index:this.positions[3*r],start:this.positions[3*r+1],end:this.positions[3*r+2]}),r++;return c},G.serialize=function(e,t){var r=new Float64Array(e.ids),a=new Uint32Array(e.positions);return function l(c,h,m,_){for(;m<_;){for(var g=c[m+_>>1],x=m-1,b=_+1;;){do x++;while(c[x]<g);do b--;while(c[b]>g);if(x>=b)break;Q(c,x,b),Q(h,3*x,3*b),Q(h,3*x+1,3*b+1),Q(h,3*x+2,3*b+2)}b-m<_-b?(l(c,h,m,b),m=b+1):(l(c,h,b+1,_),_=b)}}(r,a,0,r.length-1),t&&t.push(r.buffer,a.buffer),{ids:r,positions:a}},G.deserialize=function(e){var t=new G;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t};var K=Math.pow(2,53)-1;function ee(e){var t=+e;return!isNaN(t)&&t<=K?t:D(String(e))}function Q(e,t,r){var a=e[t];e[t]=e[r],e[r]=a}Te("FeaturePositionMap",G);var te=function(e,t){this.gl=e.gl,this.location=t},oe=function(e){function t(r,a){e.call(this,r,a),this.current=0}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.set=function(r){this.current!==r&&(this.current=r,this.gl.uniform1i(this.location,r))},t}(te),he=function(e){function t(r,a){e.call(this,r,a),this.current=0}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.set=function(r){this.current!==r&&(this.current=r,this.gl.uniform1f(this.location,r))},t}(te),pe=function(e){function t(r,a){e.call(this,r,a),this.current=[0,0]}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.set=function(r){r[0]===this.current[0]&&r[1]===this.current[1]||(this.current=r,this.gl.uniform2f(this.location,r[0],r[1]))},t}(te),be=function(e){function t(r,a){e.call(this,r,a),this.current=[0,0,0]}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.set=function(r){r[0]===this.current[0]&&r[1]===this.current[1]&&r[2]===this.current[2]||(this.current=r,this.gl.uniform3f(this.location,r[0],r[1],r[2]))},t}(te),ke=function(e){function t(r,a){e.call(this,r,a),this.current=[0,0,0,0]}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.set=function(r){r[0]===this.current[0]&&r[1]===this.current[1]&&r[2]===this.current[2]&&r[3]===this.current[3]||(this.current=r,this.gl.uniform4f(this.location,r[0],r[1],r[2],r[3]))},t}(te),Be=function(e){function t(r,a){e.call(this,r,a),this.current=ut.transparent}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.set=function(r){r.r===this.current.r&&r.g===this.current.g&&r.b===this.current.b&&r.a===this.current.a||(this.current=r,this.gl.uniform4f(this.location,r.r,r.g,r.b,r.a))},t}(te),Le=new Float32Array(16),nt=function(e){function t(r,a){e.call(this,r,a),this.current=Le}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.set=function(r){if(r[12]!==this.current[12]||r[0]!==this.current[0])return this.current=r,void this.gl.uniformMatrix4fv(this.location,!1,r);for(var a=1;a<16;a++)if(r[a]!==this.current[a]){this.current=r,this.gl.uniformMatrix4fv(this.location,!1,r);break}},t}(te);function we(e){return[k(255*e.r,255*e.g),k(255*e.b,255*e.a)]}var Ne=function(e,t,r){this.value=e,this.uniformNames=t.map(function(a){return"u_"+a}),this.type=r};Ne.prototype.setUniform=function(e,t,r){e.set(r.constantOr(this.value))},Ne.prototype.getBinding=function(e,t,r){return this.type==="color"?new Be(e,t):new he(e,t)};var Ge=function(e,t){this.uniformNames=t.map(function(r){return"u_"+r}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};Ge.prototype.setConstantPatternPositions=function(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr},Ge.prototype.setUniform=function(e,t,r,a){var l=a==="u_pattern_to"?this.patternTo:a==="u_pattern_from"?this.patternFrom:a==="u_pixel_ratio_to"?this.pixelRatioTo:a==="u_pixel_ratio_from"?this.pixelRatioFrom:null;l&&e.set(l)},Ge.prototype.getBinding=function(e,t,r){return r.substr(0,9)==="u_pattern"?new ke(e,t):new he(e,t)};var Ve=function(e,t,r,a){this.expression=e,this.type=r,this.maxValue=0,this.paintVertexAttributes=t.map(function(l){return{name:"a_"+l,type:"Float32",components:r==="color"?2:1,offset:0}}),this.paintVertexArray=new a};Ve.prototype.populatePaintArray=function(e,t,r,a,l){var c=this.paintVertexArray.length,h=this.expression.evaluate(new Je(0),t,{},a,[],l);this.paintVertexArray.resize(e),this._setPaintValue(c,e,h)},Ve.prototype.updatePaintArray=function(e,t,r,a){var l=this.expression.evaluate({zoom:0},r,a);this._setPaintValue(e,t,l)},Ve.prototype._setPaintValue=function(e,t,r){if(this.type==="color")for(var a=we(r),l=e;l<t;l++)this.paintVertexArray.emplace(l,a[0],a[1]);else{for(var c=e;c<t;c++)this.paintVertexArray.emplace(c,r);this.maxValue=Math.max(this.maxValue,Math.abs(r))}},Ve.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Ve.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var Ue=function(e,t,r,a,l,c){this.expression=e,this.uniformNames=t.map(function(h){return"u_"+h+"_t"}),this.type=r,this.useIntegerZoom=a,this.zoom=l,this.maxValue=0,this.paintVertexAttributes=t.map(function(h){return{name:"a_"+h,type:"Float32",components:r==="color"?4:2,offset:0}}),this.paintVertexArray=new c};Ue.prototype.populatePaintArray=function(e,t,r,a,l){var c=this.expression.evaluate(new Je(this.zoom),t,{},a,[],l),h=this.expression.evaluate(new Je(this.zoom+1),t,{},a,[],l),m=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(m,e,c,h)},Ue.prototype.updatePaintArray=function(e,t,r,a){var l=this.expression.evaluate({zoom:this.zoom},r,a),c=this.expression.evaluate({zoom:this.zoom+1},r,a);this._setPaintValue(e,t,l,c)},Ue.prototype._setPaintValue=function(e,t,r,a){if(this.type==="color")for(var l=we(r),c=we(a),h=e;h<t;h++)this.paintVertexArray.emplace(h,l[0],l[1],c[0],c[1]);else{for(var m=e;m<t;m++)this.paintVertexArray.emplace(m,r,a);this.maxValue=Math.max(this.maxValue,Math.abs(r),Math.abs(a))}},Ue.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Ue.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Ue.prototype.setUniform=function(e,t){var r=this.useIntegerZoom?Math.floor(t.zoom):t.zoom,a=Dr(this.expression.interpolationFactor(r,this.zoom,this.zoom+1),0,1);e.set(a)},Ue.prototype.getBinding=function(e,t,r){return new he(e,t)};var Ze=function(e,t,r,a,l,c){this.expression=e,this.type=t,this.useIntegerZoom=r,this.zoom=a,this.layerId=c,this.zoomInPaintVertexArray=new l,this.zoomOutPaintVertexArray=new l};Ze.prototype.populatePaintArray=function(e,t,r){var a=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(e),this.zoomOutPaintVertexArray.resize(e),this._setPaintValues(a,e,t.patterns&&t.patterns[this.layerId],r)},Ze.prototype.updatePaintArray=function(e,t,r,a,l){this._setPaintValues(e,t,r.patterns&&r.patterns[this.layerId],l)},Ze.prototype._setPaintValues=function(e,t,r,a){if(a&&r){var l=a[r.min],c=a[r.mid],h=a[r.max];if(l&&c&&h)for(var m=e;m<t;m++)this.zoomInPaintVertexArray.emplace(m,c.tl[0],c.tl[1],c.br[0],c.br[1],l.tl[0],l.tl[1],l.br[0],l.br[1],c.pixelRatio,l.pixelRatio),this.zoomOutPaintVertexArray.emplace(m,c.tl[0],c.tl[1],c.br[0],c.br[1],h.tl[0],h.tl[1],h.br[0],h.br[1],c.pixelRatio,h.pixelRatio)}},Ze.prototype.upload=function(e){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=e.createVertexBuffer(this.zoomInPaintVertexArray,F.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=e.createVertexBuffer(this.zoomOutPaintVertexArray,F.members,this.expression.isStateDependent))},Ze.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var Fe=function(e,t,r){this.binders={},this._buffers=[];var a=[];for(var l in e.paint._values)if(r(l)){var c=e.paint.get(l);if(c instanceof xr&&Vn(c.property.specification)){var h=Ht(l,e.type),m=c.value,_=c.property.specification.type,g=c.property.useIntegerZoom,x=c.property.specification["property-type"],b=x==="cross-faded"||x==="cross-faded-data-driven";if(m.kind==="constant")this.binders[l]=b?new Ge(m.value,h):new Ne(m.value,h,_),a.push("/u_"+l);else if(m.kind==="source"||b){var I=Mt(l,_,"source");this.binders[l]=b?new Ze(m,_,g,t,I,e.id):new Ve(m,h,_,I),a.push("/a_"+l)}else{var A=Mt(l,_,"composite");this.binders[l]=new Ue(m,h,_,g,t,A),a.push("/z_"+l)}}}this.cacheKey=a.sort().join("")};Fe.prototype.getMaxValue=function(e){var t=this.binders[e];return t instanceof Ve||t instanceof Ue?t.maxValue:0},Fe.prototype.populatePaintArrays=function(e,t,r,a,l){for(var c in this.binders){var h=this.binders[c];(h instanceof Ve||h instanceof Ue||h instanceof Ze)&&h.populatePaintArray(e,t,r,a,l)}},Fe.prototype.setConstantPatternPositions=function(e,t){for(var r in this.binders){var a=this.binders[r];a instanceof Ge&&a.setConstantPatternPositions(e,t)}},Fe.prototype.updatePaintArrays=function(e,t,r,a,l){var c=!1;for(var h in e)for(var m=0,_=t.getPositions(h);m<_.length;m+=1){var g=_[m],x=r.feature(g.index);for(var b in this.binders){var I=this.binders[b];if((I instanceof Ve||I instanceof Ue||I instanceof Ze)&&I.expression.isStateDependent===!0){var A=a.paint.get(b);I.expression=A.value,I.updatePaintArray(g.start,g.end,x,e[h],l),c=!0}}}return c},Fe.prototype.defines=function(){var e=[];for(var t in this.binders){var r=this.binders[t];(r instanceof Ne||r instanceof Ge)&&e.push.apply(e,r.uniformNames.map(function(a){return"#define HAS_UNIFORM_"+a}))}return e},Fe.prototype.getBinderAttributes=function(){var e=[];for(var t in this.binders){var r=this.binders[t];if(r instanceof Ve||r instanceof Ue)for(var a=0;a<r.paintVertexAttributes.length;a++)e.push(r.paintVertexAttributes[a].name);else if(r instanceof Ze)for(var l=0;l<F.members.length;l++)e.push(F.members[l].name)}return e},Fe.prototype.getBinderUniforms=function(){var e=[];for(var t in this.binders){var r=this.binders[t];if(r instanceof Ne||r instanceof Ge||r instanceof Ue)for(var a=0,l=r.uniformNames;a<l.length;a+=1)e.push(l[a])}return e},Fe.prototype.getPaintVertexBuffers=function(){return this._buffers},Fe.prototype.getUniforms=function(e,t){var r=[];for(var a in this.binders){var l=this.binders[a];if(l instanceof Ne||l instanceof Ge||l instanceof Ue)for(var c=0,h=l.uniformNames;c<h.length;c+=1){var m=h[c];if(t[m]){var _=l.getBinding(e,t[m],m);r.push({name:m,property:a,binding:_})}}}return r},Fe.prototype.setUniforms=function(e,t,r,a){for(var l=0,c=t;l<c.length;l+=1){var h=c[l],m=h.name,_=h.property;this.binders[_].setUniform(h.binding,a,r.get(_),m)}},Fe.prototype.updatePaintBuffers=function(e){for(var t in this._buffers=[],this.binders){var r=this.binders[t];if(e&&r instanceof Ze){var a=e.fromScale===2?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;a&&this._buffers.push(a)}else(r instanceof Ve||r instanceof Ue)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}},Fe.prototype.upload=function(e){for(var t in this.binders){var r=this.binders[t];(r instanceof Ve||r instanceof Ue||r instanceof Ze)&&r.upload(e)}this.updatePaintBuffers()},Fe.prototype.destroy=function(){for(var e in this.binders){var t=this.binders[e];(t instanceof Ve||t instanceof Ue||t instanceof Ze)&&t.destroy()}};var Re=function(e,t,r){r===void 0&&(r=function(){return!0}),this.programConfigurations={};for(var a=0,l=e;a<l.length;a+=1){var c=l[a];this.programConfigurations[c.id]=new Fe(c,t,r)}this.needsUpload=!1,this._featureMap=new G,this._bufferOffset=0};function Ht(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[e]||[e.replace(t+"-","").replace(/-/g,"_")]}function Mt(e,t,r){var a={color:{source:bo,composite:Za},number:{source:cn,composite:bo}},l=function(c){return{"line-pattern":{source:Pi,composite:Pi},"fill-pattern":{source:Pi,composite:Pi},"fill-extrusion-pattern":{source:Pi,composite:Pi}}[c]}(e);return l&&l[r]||a[t][r]}Re.prototype.populatePaintArrays=function(e,t,r,a,l,c){for(var h in this.programConfigurations)this.programConfigurations[h].populatePaintArrays(e,t,a,l,c);t.id!==void 0&&this._featureMap.add(t.id,r,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0},Re.prototype.updatePaintArrays=function(e,t,r,a){for(var l=0,c=r;l<c.length;l+=1){var h=c[l];this.needsUpload=this.programConfigurations[h.id].updatePaintArrays(e,this._featureMap,t,h,a)||this.needsUpload}},Re.prototype.get=function(e){return this.programConfigurations[e]},Re.prototype.upload=function(e){if(this.needsUpload){for(var t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}},Re.prototype.destroy=function(){for(var e in this.programConfigurations)this.programConfigurations[e].destroy()},Te("ConstantBinder",Ne),Te("CrossFadedConstantBinder",Ge),Te("SourceExpressionBinder",Ve),Te("CrossFadedCompositeBinder",Ze),Te("CompositeExpressionBinder",Ue),Te("ProgramConfiguration",Fe,{omit:["_buffers"]}),Te("ProgramConfigurationSet",Re);var hr=Math.pow(2,14)-1,ir=-hr-1;function Pt(e){for(var t=8192/e.extent,r=e.loadGeometry(),a=0;a<r.length;a++)for(var l=r[a],c=0;c<l.length;c++){var h=l[c],m=Math.round(h.x*t),_=Math.round(h.y*t);h.x=Dr(m,ir,hr),h.y=Dr(_,ir,hr),(m<h.x||m>h.x+1||_<h.y||_>h.y+1)&&kt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function Ft(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?Pt(e):[]}}function Nr(e,t,r,a,l){e.emplaceBack(2*t+(a+1)/2,2*r+(l+1)/2)}var wr=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new Gn,this.indexArray=new ln,this.segments=new C,this.programConfigurations=new Re(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function pn(e,t){for(var r=0;r<e.length;r++)if(Ci(t,e[r]))return!0;for(var a=0;a<t.length;a++)if(Ci(e,t[a]))return!0;return!!aa(e,t)}function Pr(e,t,r){return!!Ci(e,t)||!!hn(t,e,r)}function wi(e,t){if(e.length===1)return sa(t,e[0]);for(var r=0;r<t.length;r++)for(var a=t[r],l=0;l<a.length;l++)if(Ci(e,a[l]))return!0;for(var c=0;c<e.length;
vendor: 4,796 bytes, line 1
1c++)if(sa(t,e[c]))return!0;for(var h=0;h<t.length;h++)if(aa(e,t[h]))return!0;return!1}function ai(e,t,r){if(e.length>1){if(aa(e,t))return!0;for(var a=0;a<t.length;a++)if(hn(t[a],e,r))return!0}for(var l=0;l<e.length;l++)if(hn(e[l],t,r))return!0;return!1}function aa(e,t){if(e.length===0||t.length===0)return!1;for(var r=0;r<e.length-1;r++)for(var a=e[r],l=e[r+1],c=0;c<t.length-1;c++)if(To(a,l,t[c],t[c+1]))return!0;return!1}function To(e,t,r,a){return Lr(e,r,a)!==Lr(t,r,a)&&Lr(e,t,r)!==Lr(e,t,a)}function hn(e,t,r){var a=r*r;if(t.length===1)return e.distSqr(t[0])<a;for(var l=1;l<t.length;l++)if(Io(e,t[l-1],t[l])<a)return!0;return!1}function Io(e,t,r){var a=t.distSqr(r);if(a===0)return e.distSqr(t);var l=((e.x-t.x)*(r.x-t.x)+(e.y-t.y)*(r.y-t.y))/a;return e.distSqr(l<0?t:l>1?r:r.sub(t)._mult(l)._add(t))}function sa(e,t){for(var r,a,l,c=!1,h=0;h<e.length;h++)for(var m=0,_=(r=e[h]).length-1;m<r.length;_=m++)(a=r[m]).y>t.y!=(l=r[_]).y>t.y&&t.x<(l.x-a.x)*(t.y-a.y)/(l.y-a.y)+a.x&&(c=!c);return c}function Ci(e,t){for(var r=!1,a=0,l=e.length-1;a<e.length;l=a++){var c=e[a],h=e[l];c.y>t.y!=h.y>t.y&&t.x<(h.x-c.x)*(t.y-c.y)/(h.y-c.y)+c.x&&(r=!r)}return r}function la(e,t,r){var a=r[0],l=r[2];if(e.x<a.x&&t.x<a.x||e.x>l.x&&t.x>l.x||e.y<a.y&&t.y<a.y||e.y>l.y&&t.y>l.y)return!1;var c=Lr(e,t,r[0]);return c!==Lr(e,t,r[1])||c!==Lr(e,t,r[2])||c!==Lr(e,t,r[3])}function ki(e,t,r){var a=t.paint.get(e).value;return a.kind==="constant"?a.value:r.programConfigurations.get(t.id).getMaxValue(e)}function Jt(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function qi(e,t,r,a,l){if(!t[0]&&!t[1])return e;var c=je.convert(t)._mult(l);r==="viewport"&&c._rotate(-a);for(var h=[],m=0;m<e.length;m++)h.push(e[m].sub(c));return h}wr.prototype.populate=function(e,t,r){var a=this.layers[0],l=[],c=null;a.type==="circle"&&(c=a.layout.get("circle-sort-key"));for(var h=0,m=e;h<m.length;h+=1){var _=m[h],g=_.feature,x=_.id,b=_.index,I=_.sourceLayerIndex,A=this.layers[0]._featureFilter.needGeometry,L=Ft(g,A);if(this.layers[0]._featureFilter.filter(new Je(this.zoom),L,r)){var B=c?c.evaluate(L,{},r):void 0,q={id:x,properties:g.properties,type:g.type,sourceLayerIndex:I,index:b,geometry:A?L.geometry:Pt(g),patterns:{},sortKey:B};l.push(q)}}c&&l.sort(function(fe,Pe){return fe.sortKey-Pe.sortKey});for(var V=0,W=l;V<W.length;V+=1){var J=W[V],Y=J.geometry,$=J.index,ne=J.sourceLayerIndex,ue=e[$].feature;this.addFeature(J,Y,$,r),t.featureIndex.insert(ue,Y,$,ne,this.index)}},wr.prototype.update=function(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)},wr.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},wr.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},wr.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,z),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0},wr.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},wr.prototype.addFeature=function(e,t,r,a){for(var l=0,c=t;l<c.length;l+=1)for(var h=0,m=c[l];h<m.length;h+=1){var _=m[h],g=_.x,x=_.y;if(!(g<0||g>=8192||x<0||x>=8192)){var b=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),I=b.vertexLength;Nr(this.layoutVertexArray,g,x,-1,-1),Nr(this.layoutVertexArray,g,x,1,-1),Nr(this.layoutVertexArray,g,x,1,1),Nr(this.layoutVertexArray,g,x,-1,1),this.indexArray.emplaceBack(I,I+1,I+2),this.indexArray.emplaceBack(I,I+3,I+2),b.vertexLength+=4,b.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{},a)},Te("CircleBucket",wr,{omit:["layers"]});var fn=new pr({"circle-sort-key":new Ee(P.layout_circle["circle-sort-key"])}),Wn={paint:new pr({"circle-radius":new Ee(P.paint_circle["circle-radius"]),"circle-color":new Ee(P.paint_circle["circle-color"]),"circle-blur":new Ee(P.paint_circle["circle-blur"]),"circle-opacity":new Ee(P.paint_circle["circle-opacity"]),"circle-translate":new Ce(P.paint_circle["circle-translate"]),"circle-translate-anchor":new Ce(P.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Ce(P.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Ce(P.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Ee(P.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Ee(P.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Ee(P.paint_circle["circle-stroke-opacity"])}),layout:fn},ct=typeof Float32Array<"u"?Float32Array:Array;function Wr(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10
vendor: 64,868 bytes, line 1
1]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Cr(e,t,r){var a=t[0],l=t[1],c=t[2],h=t[3],m=t[4],_=t[5],g=t[6],x=t[7],b=t[8],I=t[9],A=t[10],L=t[11],B=t[12],q=t[13],V=t[14],W=t[15],J=r[0],Y=r[1],$=r[2],ne=r[3];return e[0]=J*a+Y*m+$*b+ne*B,e[1]=J*l+Y*_+$*I+ne*q,e[2]=J*c+Y*g+$*A+ne*V,e[3]=J*h+Y*x+$*L+ne*W,e[4]=(J=r[4])*a+(Y=r[5])*m+($=r[6])*b+(ne=r[7])*B,e[5]=J*l+Y*_+$*I+ne*q,e[6]=J*c+Y*g+$*A+ne*V,e[7]=J*h+Y*x+$*L+ne*W,e[8]=(J=r[8])*a+(Y=r[9])*m+($=r[10])*b+(ne=r[11])*B,e[9]=J*l+Y*_+$*I+ne*q,e[10]=J*c+Y*g+$*A+ne*V,e[11]=J*h+Y*x+$*L+ne*W,e[12]=(J=r[12])*a+(Y=r[13])*m+($=r[14])*b+(ne=r[15])*B,e[13]=J*l+Y*_+$*I+ne*q,e[14]=J*c+Y*g+$*A+ne*V,e[15]=J*h+Y*x+$*L+ne*W,e}Math.hypot||(Math.hypot=function(){for(var e=arguments,t=0,r=arguments.length;r--;)t+=e[r]*e[r];return Math.sqrt(t)});var Kn,Zu=Cr;function Ga(e,t,r){var a=t[0],l=t[1],c=t[2],h=t[3];return e[0]=r[0]*a+r[4]*l+r[8]*c+r[12]*h,e[1]=r[1]*a+r[5]*l+r[9]*c+r[13]*h,e[2]=r[2]*a+r[6]*l+r[10]*c+r[14]*h,e[3]=r[3]*a+r[7]*l+r[11]*c+r[15]*h,e}Kn=new ct(3),ct!=Float32Array&&(Kn[0]=0,Kn[1]=0,Kn[2]=0),function(){var e=new ct(4);ct!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0)}();var Gu=(function(){var e=new ct(2);ct!=Float32Array&&(e[0]=0,e[1]=0)}(),function(e){function t(r){e.call(this,r,Wn)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.createBucket=function(r){return new wr(r)},t.prototype.queryRadius=function(r){var a=r;return ki("circle-radius",this,a)+ki("circle-stroke-width",this,a)+Jt(this.paint.get("circle-translate"))},t.prototype.queryIntersectsFeature=function(r,a,l,c,h,m,_,g){for(var x=qi(r,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),m.angle,_),b=this.paint.get("circle-radius").evaluate(a,l)+this.paint.get("circle-stroke-width").evaluate(a,l),I=this.paint.get("circle-pitch-alignment")==="map",A=I?x:function(ue,fe){return ue.map(function(Pe){return ua(Pe,fe)})}(x,g),L=I?b*_:b,B=0,q=c;B<q.length;B+=1)for(var V=0,W=q[B];V<W.length;V+=1){var J=W[V],Y=I?J:ua(J,g),$=L,ne=Ga([],[J.x,J.y,0,1],g);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?$*=ne[3]/m.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&($*=m.cameraToCenterDistance/ne[3]),Pr(A,Y,$))return!0}return!1},t}(zi));function ua(e,t){var r=Ga([],[e.x,e.y,0,1],t);return new je(r[0]/r[3],r[1]/r[3])}var Jl=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t}(wr);function Eo(e,t,r,a){var l=t.width,c=t.height;if(a){if(a instanceof Uint8ClampedArray)a=new Uint8Array(a.buffer);else if(a.length!==l*c*r)throw new RangeError("mismatched image size")}else a=new Uint8Array(l*c*r);return e.width=l,e.height=c,e.data=a,e}function Xa(e,t,r){var a=t.width,l=t.height;if(a!==e.width||l!==e.height){var c=Eo({},{width:a,height:l},r);Xu(e,c,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,a),height:Math.min(e.height,l)},r),e.width=a,e.height=l,e.data=c.data}}function Xu(e,t,r,a,l,c){if(l.width===0||l.height===0)return t;if(l.width>e.width||l.height>e.height||r.x>e.width-l.width||r.y>e.height-l.height)throw new RangeError("out of range source coordinates for image copy");if(l.width>t.width||l.height>t.height||a.x>t.width-l.width||a.y>t.height-l.height)throw new RangeError("out of range destination coordinates for image copy");for(var h=e.data,m=t.data,_=0;_<l.height;_++)for(var g=((r.y+_)*e.width+r.x)*c,x=((a.y+_)*t.width+a.x)*c,b=0;b<l.width*c;b++)m[x+b]=h[g+b];return t}Te("HeatmapBucket",Jl,{omit:["layers"]});var ca=function(e,t){Eo(this,e,1,t)};ca.prototype.resize=function(e){Xa(this,e,1)},ca.prototype.clone=function(){return new ca({width:this.width,height:this.height},new Uint8Array(this.data))},ca.copy=function(e,t,r,a,l){Xu(e,t,r,a,l,1)};var jr=function(e,t){Eo(this,e,4,t)};jr.prototype.resize=function(e){Xa(this,e,4)},jr.prototype.replace=function(e,t){t?this.data.set(e):this.data=e instanceof Uint8ClampedArray?new Uint8Array(e.buffer):e},jr.prototype.clone=function(){return new jr({width:this.width,height:this.height},new Uint8Array(this.data))},jr.copy=function(e,t,r,a,l){Xu(e,t,r,a,l,4)},Te("AlphaImage",ca),Te("RGBAImage",jr);var Zp={paint:new pr({"heatmap-radius":new Ee(P.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Ee(P.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ce(P.paint_heatmap["heatmap-intensity"]),"heatmap-color":new bi(P.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ce(P.paint_heatmap["heatmap-opacity"])})};function wc(e){var t={},r=e.resolution||256,a=e.clips?e.clips.length:1,l=e.image||new jr({width:r,height:a}),c=function(L,B,q){t[e.evaluationKey]=q;var V=e.expression.evaluate(t);l.data[L+B+0]=Math.floor(255*V.r/V.a),l.data[L+B+1]=Math.floor(255*V.g/V.a),l.data[L+B+2]=Math.floor(255*V.b/V.a),l.data[L+B+3]=Math.floor(255*V.a)};if(e.clips)for(var h=0,m=0;h<a;++h,m+=4*r)for(var _=0,g=0;_<r;_++,g+=4){var x=_/(r-1),b=e.clips[h];c(m,g,b.start*(1-x)+b.end*x)}else for(var I=0,A=0;I<r;I++,A+=4)c(0,A,I/(r-1));return l}var Gp=function(e){function t(r){e.call(this,r,Zp),this._updateColorRamp()}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.createBucket=function(r){return new Jl(r)},t.prototype._handleSpecialPaintPropertyUpdate=function(r){r==="heatmap-color"&&this._updateColorRamp()},t.prototype._updateColorRamp=function(){this.colorRamp=wc({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},t.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},t.prototype.queryRadius=function(){return 0},t.prototype.queryIntersectsFeature=function(){return!1},t.prototype.hasOffscreenPass=function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"},t}(zi),Xp={paint:new pr({"hillshade-illumination-direction":new Ce(P.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Ce(P.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Ce(P.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Ce(P.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Ce(P.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Ce(P.paint_hillshade["hillshade-accent-color"])})},Wp=function(e){function t(r){e.call(this,r,Xp)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.hasOffscreenPass=function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"},t}(zi),Kp=rr([{name:"a_pos",components:2,type:"Int16"}],4).members,Wu=Yl,Hp=Yl;function Yl(e,t,r){r=r||2;var a,l,c,h,m,_,g,x=t&&t.length,b=x?t[0]*r:e.length,I=Sc(e,0,b,r,!0),A=[];if(!I||I.next===I.prev)return A;if(x&&(I=function(B,q,V,W){var J,Y,$,ne=[];for(J=0,Y=q.length;J<Y;J++)($=Sc(B,q[J]*W,J<Y-1?q[J+1]*W:B.length,W,!1))===$.next&&($.steiner=!0),ne.push(ih($));for(ne.sort(eh),J=0;J<ne.length;J++)th(ne[J],V),V=Ao(V,V.next);return V}(e,t,I,r)),e.length>80*r){a=c=e[0],l=h=e[1];for(var L=r;L<b;L+=r)(m=e[L])<a&&(a=m),(_=e[L+1])<l&&(l=_),m>c&&(c=m),_>h&&(h=_);g=(g=Math.max(c-a,h-l))!==0?1/g:0}return Ks(I,A,r,a,l,g),A}function Sc(e,t,r,a,l){var c,h;if(l===Ju(e,t,r,a)>0)for(c=t;c<r;c+=a)h=Ec(c,e[c],e[c+1],h);else for(c=r-a;c>=t;c-=a)h=Ec(c,e[c],e[c+1],h);return h&&Ql(h,h.next)&&(Js(h),h=h.next),h}function Ao(e,t){if(!e)return e;t||(t=e);var r,a=e;do if(r=!1,a.steiner||!Ql(a,a.next)&&Xt(a.prev,a,a.next)!==0)a=a.next;else{if(Js(a),(a=t=a.prev)===a.next)break;r=!0}while(r||a!==t);return t}function Ks(e,t,r,a,l,c,h){if(e){!h&&c&&function(x,b,I,A){var L=x;do L.z===null&&(L.z=Ku(L.x,L.y,b,I,A)),L.prevZ=L.prev,L.nextZ=L.next,L=L.next;while(L!==x);L.prevZ.nextZ=null,L.prevZ=null,function(B){var q,V,W,J,Y,$,ne,ue,fe=1;do{for(V=B,B=null,Y=null,$=0;V;){for($++,W=V,ne=0,q=0;q<fe&&(ne++,W=W.nextZ);q++);for(ue=fe;ne>0||ue>0&&W;)ne!==0&&(ue===0||!W||V.z<=W.z)?(J=V,V=V.nextZ,ne--):(J=W,W=W.nextZ,ue--),Y?Y.nextZ=J:B=J,J.prevZ=Y,Y=J;V=W}Y.nextZ=null,fe*=2}while($>1)}(L)}(e,a,l,c);for(var m,_,g=e;e.prev!==e.next;)if(m=e.prev,_=e.next,c?Yp(e,a,l,c):Jp(e))t.push(m.i/r),t.push(e.i/r),t.push(_.i/r),Js(e),e=_.next,g=_.next;else if((e=_)===g){h?h===1?Ks(e=Qp(Ao(e),t,r),t,r,a,l,c,2):h===2&&$p(e,t,r,a,l,c):Ks(Ao(e),t,r,a,l,c,1);break}}}function Jp(e){var t=e.prev,r=e,a=e.next;if(Xt(t,r,a)>=0)return!1;for(var l=e.next.next;l!==e.prev;){if(Wa(t.x,t.y,r.x,r.y,a.x,a.y,l.x,l.y)&&Xt(l.prev,l,l.next)>=0)return!1;l=l.next}return!0}function Yp(e,t,r,a){var l=e.prev,c=e,h=e.next;if(Xt(l,c,h)>=0)return!1;for(var m=l.x>c.x?l.x>h.x?l.x:h.x:c.x>h.x?c.x:h.x,_=l.y>c.y?l.y>h.y?l.y:h.y:c.y>h.y?c.y:h.y,g=Ku(l.x<c.x?l.x<h.x?l.x:h.x:c.x<h.x?c.x:h.x,l.y<c.y?l.y<h.y?l.y:h.y:c.y<h.y?c.y:h.y,t,r,a),x=Ku(m,_,t,r,a),b=e.prevZ,I=e.nextZ;b&&b.z>=g&&I&&I.z<=x;){if(b!==e.prev&&b!==e.next&&Wa(l.x,l.y,c.x,c.y,h.x,h.y,b.x,b.y)&&Xt(b.prev,b,b.next)>=0||(b=b.prevZ,I!==e.prev&&I!==e.next&&Wa(l.x,l.y,c.x,c.y,h.x,h.y,I.x,I.y)&&Xt(I.prev,I,I.next)>=0))return!1;I=I.nextZ}for(;b&&b.z>=g;){if(b!==e.prev&&b!==e.next&&Wa(l.x,l.y,c.x,c.y,h.x,h.y,b.x,b.y)&&Xt(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;I&&I.z<=x;){if(I!==e.prev&&I!==e.next&&Wa(l.x,l.y,c.x,c.y,h.x,h.y,I.x,I.y)&&Xt(I.prev,I,I.next)>=0)return!1;I=I.nextZ}return!0}function Qp(e,t,r){var a=e;do{var l=a.prev,c=a.next.next;!Ql(l,c)&&Tc(l,a,a.next,c)&&Hs(l,c)&&Hs(c,l)&&(t.push(l.i/r),t.push(a.i/r),t.push(c.i/r),Js(a),Js(a.next),a=e=c),a=a.next}while(a!==e);return Ao(a)}function $p(e,t,r,a,l,c){var h=e;do{for(var m=h.next.next;m!==h.prev;){if(h.i!==m.i&&nh(h,m)){var _=Ic(h,m);return h=Ao(h,h.next),_=Ao(_,_.next),Ks(h,t,r,a,l,c),void Ks(_,t,r,a,l,c)}m=m.next}h=h.next}while(h!==e)}function eh(e,t){return e.x-t.x}function th(e,t){if(t=function(a,l){var c,h=l,m=a.x,_=a.y,g=-1/0;do{if(_<=h.y&&_>=h.next.y&&h.next.y!==h.y){var x=h.x+(_-h.y)*(h.next.x-h.x)/(h.next.y-h.y);if(x<=m&&x>g){if(g=x,x===m){if(_===h.y)return h;if(_===h.next.y)return h.next}c=h.x<h.next.x?h:h.next}}h=h.next}while(h!==l);if(!c)return null;if(m===g)return c;var b,I=c,A=c.x,L=c.y,B=1/0;h=c;do m>=h.x&&h.x>=A&&m!==h.x&&Wa(_<L?m:g,_,A,L,_<L?g:m,_,h.x,h.y)&&(b=Math.abs(_-h.y)/(m-h.x),Hs(h,a)&&(b<B||b===B&&(h.x>c.x||h.x===c.x&&rh(c,h)))&&(c=h,B=b)),h=h.next;while(h!==I);return c}(e,t)){var r=Ic(t,e);Ao(t,t.next),Ao(r,r.next)}}function rh(e,t){return Xt(e.prev,e,t.prev)<0&&Xt(t.next,e,e.next)<0}function Ku(e,t,r,a,l){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*l)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-a)*l)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function ih(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function Wa(e,t,r,a,l,c,h,m){return(l-h)*(t-m)-(e-h)*(c-m)>=0&&(e-h)*(a-m)-(r-h)*(t-m)>=0&&(r-h)*(c-m)-(l-h)*(a-m)>=0}function nh(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(r,a){var l=r;do{if(l.i!==r.i&&l.next.i!==r.i&&l.i!==a.i&&l.next.i!==a.i&&Tc(l,l.next,r,a))return!0;l=l.next}while(l!==r);return!1}(e,t)&&(Hs(e,t)&&Hs(t,e)&&function(r,a){var l=r,c=!1,h=(r.x+a.x)/2,m=(r.y+a.y)/2;do l.y>m!=l.next.y>m&&l.next.y!==l.y&&h<(l.next.x-l.x)*(m-l.y)/(l.next.y-l.y)+l.x&&(c=!c),l=l.next;while(l!==r);return c}(e,t)&&(Xt(e.prev,e,t.prev)||Xt(e,t.prev,t))||Ql(e,t)&&Xt(e.prev,e,e.next)>0&&Xt(t.prev,t,t.next)>0)}function Xt(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Ql(e,t){return e.x===t.x&&e.y===t.y}function Tc(e,t,r,a){var l=eu(Xt(e,t,r)),c=eu(Xt(e,t,a)),h=eu(Xt(r,a,e)),m=eu(Xt(r,a,t));return l!==c&&h!==m||!(l!==0||!$l(e,r,t))||!(c!==0||!$l(e,a,t))||!(h!==0||!$l(r,e,a))||!(m!==0||!$l(r,t,a))}function $l(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function eu(e){return e>0?1:e<0?-1:0}function Hs(e,t){return Xt(e.prev,e,e.next)<0?Xt(e,t,e.next)>=0&&Xt(e,e.prev,t)>=0:Xt(e,t,e.prev)<0||Xt(e,e.next,t)<0}function Ic(e,t){var r=new Hu(e.i,e.x,e.y),a=new Hu(t.i,t.x,t.y),l=e.next,c=t.prev;return e.next=t,t.prev=e,r.next=l,l.prev=r,a.next=r,r.prev=a,c.next=a,a.prev=c,a}function Ec(e,t,r,a){var l=new Hu(e,t,r);return a?(l.next=a.next,l.prev=a,a.next.prev=l,a.next=l):(l.prev=l,l.next=l),l}function Js(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Hu(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Ju(e,t,r,a){for(var l=0,c=t,h=r-a;c<r;c+=a)l+=(e[h]-e[c])*(e[c+1]+e[h+1]),h=c;return l}function oh(e,t,r,a,l){(function c(h,m,_,g,x){for(;g>_;){if(g-_>600){var b=g-_+1,I=m-_+1,A=Math.log(b),L=.5*Math.exp(2*A/3),B=.5*Math.sqrt(A*L*(b-L)/b)*(I-b/2<0?-1:1);c(h,m,Math.max(_,Math.floor(m-I*L/b+B)),Math.min(g,Math.floor(m+(b-I)*L/b+B)),x)}var q=h[m],V=_,W=g;for(Ys(h,_,m),x(h[g],q)>0&&Ys(h,_,g);V<W;){for(Ys(h,V,W),V++,W--;x(h[V],q)<0;)V++;for(;x(h[W],q)>0;)W--}x(h[_],q)===0?Ys(h,_,W):Ys(h,++W,g),W<=m&&(_=W+1),m<=W&&(g=W-1)}})(e,t,r,a||e.length-1,l||ah)}function Ys(e,t,r){var a=e[t];e[t]=e[r],e[r]=a}function ah(e,t){return e<t?-1:e>t?1:0}function Yu(e,t){var r=e.length;if(r<=1)return[e];for(var a,l,c=[],h=0;h<r;h++){var m=ga(e[h]);m!==0&&(e[h].area=Math.abs(m),l===void 0&&(l=m<0),l===m<0?(a&&c.push(a),a=[e[h]]):a.push(e[h]))}if(a&&c.push(a),t>1)for(var _=0;_<c.length;_++)c[_].length<=t||(oh(c[_],t,1,c[_].length-1,sh),c[_]=c[_].slice(0,t));return c}function sh(e,t){return t.area-e.area}function Qu(e,t,r){for(var a=r.patternDependencies,l=!1,c=0,h=t;c<h.length;c+=1){var m=h[c].paint.get(e+"-pattern");m.isConstant()||(l=!0);var _=m.constantOr(null);_&&(l=!0,a[_.to]=!0,a[_.from]=!0)}return l}function $u(e,t,r,a,l){for(var c=l.patternDependencies,h=0,m=t;h<m.length;h+=1){var _=m[h],g=_.paint.get(e+"-pattern").value;if(g.kind!=="constant"){var x=g.evaluate({zoom:a-1},r,{},l.availableImages),b=g.evaluate({zoom:a},r,{},l.availableImages),I=g.evaluate({zoom:a+1},r,{},l.availableImages);b=b&&b.name?b.name:b,I=I&&I.name?I.name:I,c[x=x&&x.name?x.name:x]=!0,c[b]=!0,c[I]=!0,r.patterns[_.id]={min:x,mid:b,max:I}}}return r}Yl.deviation=function(e,t,r,a){var l=t&&t.length,c=Math.abs(Ju(e,0,l?t[0]*r:e.length,r));if(l)for(var h=0,m=t.length;h<m;h++)c-=Math.abs(Ju(e,t[h]*r,h<m-1?t[h+1]*r:e.length,r));var _=0;for(h=0;h<a.length;h+=3){var g=a[h]*r,x=a[h+1]*r,b=a[h+2]*r;_+=Math.abs((e[g]-e[b])*(e[x+1]-e[g+1])-(e[g]-e[x])*(e[b+1]-e[g+1]))}return c===0&&_===0?0:Math.abs((_-c)/c)},Yl.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},a=0,l=0;l<e.length;l++){for(var c=0;c<e[l].length;c++)for(var h=0;h<t;h++)r.vertices.push(e[l][c][h]);l>0&&r.holes.push(a+=e[l-1].length)}return r},Wu.default=Hp;var Zi=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Gn,this.indexArray=new ln,this.indexArray2=new oa,this.programConfigurations=new Re(e.layers,e.zoom),this.segments=new C,this.segments2=new C,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};Zi.prototype.populate=function(e,t,r){this.hasPattern=Qu("fill",this.layers,t);for(var a=this.layers[0].layout.get("fill-sort-key"),l=[],c=0,h=e;c<h.length;c+=1){var m=h[c],_=m.feature,g=m.id,x=m.index,b=m.sourceLayerIndex,I=this.layers[0]._featureFilter.needGeometry,A=Ft(_,I);if(this.layers[0]._featureFilter.filter(new Je(this.zoom),A,r)){var L=a?a.evaluate(A,{},r,t.availableImages):void 0,B={id:g,properties:_.properties,type:_.type,sourceLayerIndex:b,index:x,geometry:I?A.geometry:Pt(_),patterns:{},sortKey:L};l.push(B)}}a&&l.sort(function(ue,fe){return ue.sortKey-fe.sortKey});for(var q=0,V=l;q<V.length;q+=1){var W=V[q],J=W.geometry,Y=W.index,$=W.sourceLayerIndex;if(this.hasPattern){var ne=$u("fill",this.layers,W,this.zoom,t);this.patternFeatures.push(ne)}else this.addFeature(W,J,Y,r,{});t.featureIndex.insert(e[Y].feature,J,Y,$,this.index)}},Zi.prototype.update=function(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)},Zi.prototype.addFeatures=function(e,t,r){for(var a=0,l=this.patternFeatures;a<l.length;a+=1){var c=l[a];this.addFeature(c,c.geometry,c.index,t,r)}},Zi.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Zi.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Zi.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Kp),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0},Zi.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},Zi.prototype.addFeature=function(e,t,r,a,l){for(var c=0,h=Yu(t,500);c<h.length;c+=1){for(var m=h[c],_=0,g=0,x=m;g<x.length;g+=1)_+=x[g].length;for(var b=this.segments.prepareSegment(_,this.layoutVertexArray,this.indexArray),I=b.vertexLength,A=[],L=[],B=0,q=m;B<q.length;B+=1){var V=q[B];if(V.length!==0){V!==m[0]&&L.push(A.length/2);var W=this.segments2.prepareSegment(V.length,this.layoutVertexArray,this.indexArray2),J=W.vertexLength;this.layoutVertexArray.emplaceBack(V[0].x,V[0].y),this.indexArray2.emplaceBack(J+V.length-1,J),A.push(V[0].x),A.push(V[0].y);for(var Y=1;Y<V.length;Y++)this.layoutVertexArray.emplaceBack(V[Y].x,V[Y].y),this.indexArray2.emplaceBack(J+Y-1,J+Y),A.push(V[Y].x),A.push(V[Y].y);W.vertexLength+=V.length,W.primitiveLength+=V.length}}for(var $=Wu(A,L),ne=0;ne<$.length;ne+=3)this.indexArray.emplaceBack(I+$[ne],I+$[ne+1],I+$[ne+2]);b.vertexLength+=_,b.primitiveLength+=$.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,l,a)},Te("FillBucket",Zi,{omit:["layers","patternFeatures"]});var lh=new pr({"fill-sort-key":new Ee(P.layout_fill["fill-sort-key"])}),uh={paint:new pr({"fill-antialias":new Ce(P.paint_fill["fill-antialias"]),"fill-opacity":new Ee(P.paint_fill["fill-opacity"]),"fill-color":new Ee(P.paint_fill["fill-color"]),"fill-outline-color":new Ee(P.paint_fill["fill-outline-color"]),"fill-translate":new Ce(P.paint_fill["fill-translate"]),"fill-translate-anchor":new Ce(P.paint_fill["fill-translate-anchor"]),"fill-pattern":new Va(P.paint_fill["fill-pattern"])}),layout:lh},ch=function(e){function t(r){e.call(this,r,uh)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.recalculate=function(r,a){e.prototype.recalculate.call(this,r,a);var l=this.paint._values["fill-outline-color"];l.value.kind==="constant"&&l.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},t.prototype.createBucket=function(r){return new Zi(r)},t.prototype.queryRadius=function(){return Jt(this.paint.get("fill-translate"))},t.prototype.queryIntersectsFeature=function(r,a,l,c,h,m,_){return wi(qi(r,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),m.angle,_),c)},t.prototype.isTileClipped=function(){return!0},t}(zi),ph=rr([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,Ac=Ka;function Ka(e,t,r,a,l){this.properties={},this.extent=r,this.type=0,this._pbf=e,this._geometry=-1,this._keys=a,this._values=l,e.readFields(hh,this,t)}function hh(e,t,r){e==1?t.id=r.readVarint():e==2?function(a,l){for(var c=a.readVarint()+a.pos;a.pos<c;){var h=l._keys[a.readVarint()],m=l._values[a.readVarint()];l.properties[h]=m}}(r,t):e==3?t.type=r.readVarint():e==4&&(t._geometry=r.pos)}function fh(e){for(var t,r,a=0,l=0,c=e.length,h=c-1;l<c;h=l++)a+=((r=e[h]).x-(t=e[l]).x)*(t.y+r.y);return a}Ka.types=["Unknown","Point","LineString","Polygon"],Ka.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t,r=e.readVarint()+e.pos,a=1,l=0,c=0,h=0,m=[];e.pos<r;){if(l<=0){var _=e.readVarint();a=7&_,l=_>>3}if(l--,a===1||a===2)c+=e.readSVarint(),h+=e.readSVarint(),a===1&&(t&&m.push(t),t=[]),t.push(new je(c,h));else{if(a!==7)throw new Error("unknown command "+a);t&&t.push(t[0].clone())}}return t&&m.push(t),m},Ka.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,a=0,l=0,c=0,h=1/0,m=-1/0,_=1/0,g=-1/0;e.pos<t;){if(a<=0){var x=e.readVarint();r=7&x,a=x>>3}if(a--,r===1||r===2)(l+=e.readSVarint())<h&&(h=l),l>m&&(m=l),(c+=e.readSVarint())<_&&(_=c),c>g&&(g=c);else if(r!==7)throw new Error("unknown command "+r)}return[h,_,m,g]},Ka.prototype.toGeoJSON=function(e,t,r){var a,l,c=this.extent*Math.pow(2,r),h=this.extent*e,m=this.extent*t,_=this.loadGeometry(),g=Ka.types[this.type];function x(A){for(var L=0;L<A.length;L++){var B=A[L];A[L]=[360*(B.x+h)/c-180,360/Math.PI*Math.atan(Math.exp((180-360*(B.y+m)/c)*Math.PI/180))-90]}}switch(this.type){case 1:var b=[];for(a=0;a<_.length;a++)b[a]=_[a][0];x(_=b);break;case 2:for(a=0;a<_.length;a++)x(_[a]);break;case 3:for(_=function(A){var L=A.length;if(L<=1)return[A];for(var B,q,V=[],W=0;W<L;W++){var J=fh(A[W]);J!==0&&(q===void 0&&(q=J<0),q===J<0?(B&&V.push(B),B=[A[W]]):B.push(A[W]))}return B&&V.push(B),V}(_),a=0;a<_.length;a++)for(l=0;l<_[a].length;l++)x(_[a][l])}_.length===1?_=_[0]:g="Multi"+g;var I={type:"Feature",geometry:{type:g,coordinates:_},properties:this.properties};return"id"in this&&(I.id=this.id),I};var zc=Pc;function Pc(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(dh,this,t),this.length=this._features.length}function dh(e,t,r){e===15?t.version=r.readVarint():e===1?t.name=r.readString():e===5?t.extent=r.readVarint():e===2?t._features.push(r.pos):e===3?t._keys.push(r.readString()):e===4&&t._values.push(function(a){for(var l=null,c=a.readVarint()+a.pos;a.pos<c;){var h=a.readVarint()>>3;l=h===1?a.readString():h===2?a.readFloat():h===3?a.readDouble():h===4?a.readVarint64():h===5?a.readVarint():h===6?a.readSVarint():h===7?a.readBoolean():null}return l}(r))}function mh(e,t,r){if(e===3){var a=new zc(r,r.readVarint()+r.pos);a.length&&(t[a.name]=a)}}Pc.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Ac(this._pbf,t,this.extent,this._keys,this._values)};var Ha={VectorTile:function(e,t){this.layers=e.readFields(mh,{},t)},VectorTileFeature:Ac,VectorTileLayer:zc},yh=Ha.VectorTileFeature.types,ec=Math.pow(2,13);function Qs(e,t,r,a,l,c,h,m){e.emplaceBack(t,r,2*Math.floor(a*ec)+h,l*ec*2,c*ec*2,Math.round(m))}var Gi=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new ji,this.indexArray=new ln,this.programConfigurations=new Re(e.layers,e.zoom),this.segments=new C,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function _h(e,t){return e.x===t.x&&(e.x<0||e.x>8192)||e.y===t.y&&(e.y<0||e.y>8192)}Gi.prototype.populate=function(e,t,r){this.features=[],this.hasPattern=Qu("fill-extrusion",this.layers,t);for(var a=0,l=e;a<l.length;a+=1){var c=l[a],h=c.feature,m=c.id,_=c.index,g=c.sourceLayerIndex,x=this.layers[0]._featureFilter.needGeometry,b=Ft(h,x);if(this.layers[0]._featureFilter.filter(new Je(this.zoom),b,r)){var I={id:m,sourceLayerIndex:g,index:_,geometry:x?b.geometry:Pt(h),properties:h.properties,type:h.type,patterns:{}};this.hasPattern?this.features.push($u("fill-extrusion",this.layers,I,this.zoom,t)):this.addFeature(I,I.geometry,_,r,{}),t.featureIndex.insert(h,I.geometry,_,g,this.index,!0)}}},Gi.prototype.addFeatures=function(e,t,r){for(var a=0,l=this.features;a<l.length;a+=1){var c=l[a];this.addFeature(c,c.geometry,c.index,t,r)}},Gi.prototype.update=function(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)},Gi.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Gi.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Gi.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,ph),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0},Gi.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Gi.prototype.addFeature=function(e,t,r,a,l){for(var c=0,h=Yu(t,500);c<h.length;c+=1){for(var m=h[c],_=0,g=0,x=m;g<x.length;g+=1)_+=x[g].length;for(var b=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),I=0,A=m;I<A.length;I+=1){var L=A[I];if(L.length!==0&&!((Ke=L).every(function(qe){return qe.x<0})||Ke.every(function(qe){return qe.x>8192})||Ke.every(function(qe){return qe.y<0})||Ke.every(function(qe){return qe.y>8192})))for(var B=0,q=0;q<L.length;q++){var V=L[q];if(q>=1){var W=L[q-1];if(!_h(V,W)){b.vertexLength+4>C.MAX_VERTEX_ARRAY_LENGTH&&(b=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var J=V.sub(W)._perp()._unit(),Y=W.dist(V);B+Y>32768&&(B=0),Qs(this.layoutVertexArray,V.x,V.y,J.x,J.y,0,0,B),Qs(this.layoutVertexArray,V.x,V.y,J.x,J.y,0,1,B),Qs(this.layoutVertexArray,W.x,W.y,J.x,J.y,0,0,B+=Y),Qs(this.layoutVertexArray,W.x,W.y,J.x,J.y,0,1,B);var $=b.vertexLength;this.indexArray.emplaceBack($,$+2,$+1),this.indexArray.emplaceBack($+1,$+2,$+3),b.vertexLength+=4,b.primitiveLength+=2}}}}if(b.vertexLength+_>C.MAX_VERTEX_ARRAY_LENGTH&&(b=this.segments.prepareSegment(_,this.layoutVertexArray,this.indexArray)),yh[e.type]==="Polygon"){for(var ne=[],ue=[],fe=b.vertexLength,Pe=0,_e=m;Pe<_e.length;Pe+=1){var Me=_e[Pe];if(Me.length!==0){Me!==m[0]&&ue.push(ne.length/2);for(var ve=0;ve<Me.length;ve++){var Xe=Me[ve];Qs(this.layoutVertexArray,Xe.x,Xe.y,0,0,1,1,0),ne.push(Xe.x),ne.push(Xe.y)}}}for(var Oe=Wu(ne,ue),Ae=0;Ae<Oe.length;Ae+=3)this.indexArray.emplaceBack(fe+Oe[Ae],fe+Oe[Ae+2],fe+Oe[Ae+1]);b.primitiveLength+=Oe.length/3,b.vertexLength+=_}}var Ke;this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,l,a)},Te("FillExtrusionBucket",Gi,{omit:["layers","features"]});var gh={paint:new pr({"fill-extrusion-opacity":new Ce(P["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ee(P["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ce(P["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ce(P["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Va(P["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ee(P["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ee(P["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ce(P["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},vh=function(e){function t(r){e.call(this,r,gh)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.createBucket=function(r){return new Gi(r)},t.prototype.queryRadius=function(){return Jt(this.paint.get("fill-extrusion-translate"))},t.prototype.is3D=function(){return!0},t.prototype.queryIntersectsFeature=function(r,a,l,c,h,m,_,g){var x=qi(r,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),m.angle,_),b=this.paint.get("fill-extrusion-height").evaluate(a,l),I=this.paint.get("fill-extrusion-base").evaluate(a,l),A=function(B,q,V,W){for(var J=[],Y=0,$=B;Y<$.length;Y+=1){var ne=$[Y],ue=[ne.x,ne.y,0,1];Ga(ue,ue,q),J.push(new je(ue[0]/ue[3],ue[1]/ue[3]))}return J}(x,g),L=function(B,q,V,W){for(var J=[],Y=[],$=W[8]*q,ne=W[9]*q,ue=W[10]*q,fe=W[11]*q,Pe=W[8]*V,_e=W[9]*V,Me=W[10]*V,ve=W[11]*V,Xe=0,Oe=B;Xe<Oe.length;Xe+=1){for(var Ae=[],Ke=[],qe=0,it=Oe[Xe];qe<it.length;qe+=1){var De=it[qe],at=De.x,At=De.y,Dt=W[0]*at+W[4]*At+W[12],Ct=W[1]*at+W[5]*At+W[13],zt=W[2]*at+W[6]*At+W[14],Lt=W[3]*at+W[7]*At+W[15],Yt=zt+ue,Qt=Lt+fe,Tr=Dt+Pe,or=Ct+_e,Ir=zt+Me,Ut=Lt+ve,ar=new je((Dt+$)/Qt,(Ct+ne)/Qt);ar.z=Yt/Qt,Ae.push(ar);var Ye=new je(Tr/Ut,or/Ut);Ye.z=Ir/Ut,Ke.push(Ye)}J.push(Ae),Y.push(Ke)}return[J,Y]}(c,I,b,g);return function(B,q,V){var W=1/0;wi(V,q)&&(W=Cc(V,q[0]));for(var J=0;J<q.length;J++)for(var Y=q[J],$=B[J],ne=0;ne<Y.length-1;ne++){var ue=Y[ne],fe=[ue,Y[ne+1],$[ne+1],$[ne],ue];pn(V,fe)&&(W=Math.min(W,Cc(V,fe)))}return W!==1/0&&W}(L[0],L[1],A)},t}(zi);function $s(e,t){return e.x*t.x+e.y*t.y}function Cc(e,t){if(e.length===1){for(var r,a=0,l=t[a++];!r||l.equals(r);)if(!(r=t[a++]))return 1/0;for(;a<t.length;a++){var c=t[a],h=e[0],m=r.sub(l),_=c.sub(l),g=h.sub(l),x=$s(m,m),b=$s(m,_),I=$s(_,_),A=$s(g,m),L=$s(g,_),B=x*I-b*b,q=(I*A-b*L)/B,V=(x*L-b*A)/B,W=l.z*(1-q-V)+r.z*q+c.z*V;if(isFinite(W))return W}return 1/0}for(var J=1/0,Y=0,$=t;Y<$.length;Y+=1)J=Math.min(J,$[Y].z);return J}var xh=rr([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,bh=rr([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]).members,wh=Ha.VectorTileFeature.types,Sh=Math.cos(Math.PI/180*37.5),kc=Math.pow(2,14)/.5,kr=function(e){var t=this;this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(r){return r.id}),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(function(r){t.gradients[r.id]={}}),this.layoutVertexArray=new Vr,this.layoutVertexArray2=new bo,this.indexArray=new ln,this.programConfigurations=new Re(e.layers,e.zoom),this.segments=new C,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(function(r){return r.isStateDependent()}).map(function(r){return r.id})};kr.prototype.populate=function(e,t,r){this.hasPattern=Qu("line",this.layers,t);for(var a=this.layers[0].layout.get("line-sort-key"),l=[],c=0,h=e;c<h.length;c+=1){var m=h[c],_=m.feature,g=m.id,x=m.index,b=m.sourceLayerIndex,I=this.layers[0]._featureFilter.needGeometry,A=Ft(_,I);if(this.layers[0]._featureFilter.filter(new Je(this.zoom),A,r)){var L=a?a.evaluate(A,{},r):void 0,B={id:g,properties:_.properties,type:_.type,sourceLayerIndex:b,index:x,geometry:I?A.geometry:Pt(_),patterns:{},sortKey:L};l.push(B)}}a&&l.sort(function(ue,fe){return ue.sortKey-fe.sortKey});for(var q=0,V=l;q<V.length;q+=1){var W=V[q],J=W.geometry,Y=W.index,$=W.sourceLayerIndex;if(this.hasPattern){var ne=$u("line",this.layers,W,this.zoom,t);this.patternFeatures.push(ne)}else this.addFeature(W,J,Y,r,{});t.featureIndex.insert(e[Y].feature,J,Y,$,this.index)}},kr.prototype.update=function(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)},kr.prototype.addFeatures=function(e,t,r){for(var a=0,l=this.patternFeatures;a<l.length;a+=1){var c=l[a];this.addFeature(c,c.geometry,c.index,t,r)}},kr.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},kr.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},kr.prototype.upload=function(e){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,bh)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,xh),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0},kr.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},kr.prototype.lineFeatureClips=function(e){if(e.properties&&e.properties.hasOwnProperty("mapbox_clip_start")&&e.properties.hasOwnProperty("mapbox_clip_end"))return{start:+e.properties.mapbox_clip_start,end:+e.properties.mapbox_clip_end}},kr.prototype.addFeature=function(e,t,r,a,l){var c=this.layers[0].layout,h=c.get("line-join").evaluate(e,{}),m=c.get("line-cap"),_=c.get("line-miter-limit"),g=c.get("line-round-limit");this.lineClips=this.lineFeatureClips(e);for(var x=0,b=t;x<b.length;x+=1)this.addLine(b[x],e,h,m,_,g);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,l,a)},kr.prototype.addLine=function(e,t,r,a,l,c){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var h=0;h<e.length-1;h++)this.totalDistance+=e[h].dist(e[h+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var m=wh[t.type]==="Polygon",_=e.length;_>=2&&e[_-1].equals(e[_-2]);)_--;for(var g=0;g<_-1&&e[g].equals(e[g+1]);)g++;if(!(_<(m?3:2))){r==="bevel"&&(l=1.05);var x,b=this.overscaling<=16?122880/(512*this.overscaling):0,I=this.segments.prepareSegment(10*_,this.layoutVertexArray,this.indexArray),A=void 0,L=void 0,B=void 0,q=void 0;this.e1=this.e2=-1,m&&(q=e[g].sub(x=e[_-2])._unit()._perp());for(var V=g;V<_;V++)if(!(L=V===_-1?m?e[g+1]:void 0:e[V+1])||!e[V].equals(L)){q&&(B=q),x&&(A=x),x=e[V],q=L?L.sub(x)._unit()._perp():B;var W=(B=B||q).add(q);W.x===0&&W.y===0||W._unit();var J=B.x*q.x+B.y*q.y,Y=W.x*q.x+W.y*q.y,$=Y!==0?1/Y:1/0,ne=2*Math.sqrt(2-2*Y),ue=Y<Sh&&A&&L,fe=B.x*q.y-B.y*q.x>0;if(ue&&V>g){var Pe=x.dist(A);if(Pe>2*b){var _e=x.sub(x.sub(A)._mult(b/Pe)._round());this.updateDistance(A,_e),this.addCurrentVertex(_e,B,0,0,I),A=_e}}var Me=A&&L,ve=Me?r:m?"butt":a;if(Me&&ve==="round"&&($<c?ve="miter":$<=2&&(ve="fakeround")),ve==="miter"&&$>l&&(ve="bevel"),ve==="bevel"&&($>2&&(ve="flipbevel"),$<l&&(ve="miter")),A&&this.updateDistance(A,x),ve==="miter")W._mult($),this.addCurrentVertex(x,W,0,0,I);else if(ve==="flipbevel"){if($>100)W=q.mult(-1);else{var Xe=$*B.add(q).mag()/B.sub(q).mag();W._perp()._mult(Xe*(fe?-1:1))}this.addCurrentVertex(x,W,0,0,I),this.addCurrentVertex(x,W.mult(-1),0,0,I)}else if(ve==="bevel"||ve==="fakeround"){var Oe=-Math.sqrt($*$-1),Ae=fe?Oe:0,Ke=fe?0:Oe;if(A&&this.addCurrentVertex(x,B,Ae,Ke,I),ve==="fakeround")for(var qe=Math.round(180*ne/Math.PI/20),it=1;it<qe;it++){var De=it/qe;if(De!==.5){var at=De-.5;De+=De*at*(De-1)*((1.0904+J*(J*(3.55645-1.43519*J)-3.2452))*at*at+(.848013+J*(.215638*J-1.06021)))}var At=q.sub(B)._mult(De)._add(B)._unit()._mult(fe?-1:1);this.addHalfVertex(x,At.x,At.y,!1,fe,0,I)}L&&this.addCurrentVertex(x,q,-Ae,-Ke,I)}else if(ve==="butt")this.addCurrentVertex(x,W,0,0,I);else if(ve==="square"){var Dt=A?1:-1;this.addCurrentVertex(x,W,Dt,Dt,I)}else ve==="round"&&(A&&(this.addCurrentVertex(x,B,0,0,I),this.addCurrentVertex(x,B,1,1,I,!0)),L&&(this.addCurrentVertex(x,q,-1,-1,I,!0),this.addCurrentVertex(x,q,0,0,I)));if(ue&&V<_-1){var Ct=x.dist(L);if(Ct>2*b){var zt=x.add(L.sub(x)._mult(b/Ct)._round());this.updateDistance(x,zt),this.addCurrentVertex(zt,q,0,0,I),x=zt}}}}},kr.prototype.addCurrentVertex=function(e,t,r,a,l,c){c===void 0&&(c=!1);var h=t.y*a-t.x,m=-t.y-t.x*a;this.addHalfVertex(e,t.x+t.y*r,t.y-t.x*r,c,!1,r,l),this.addHalfVertex(e,h,m,c,!0,-a,l),this.distance>kc/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(e,t,r,a,l,c))},kr.prototype.addHalfVertex=function(e,t,r,a,l,c,h){var m=.5*(this.lineClips?this.scaledDistance*(kc-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((e.x<<1)+(a?1:0),(e.y<<1)+(l?1:0),Math.round(63*t)+128,Math.round(63*r)+128,1+(c===0?0:c<0?-1:1)|(63&m)<<2,m>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);var _=h.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,_),h.primitiveLength++),l?this.e2=_:this.e1=_},kr.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},kr.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.updateScaledDistance()},Te("LineBucket",kr,{omit:["layers","patternFeatures"]});var Th=new pr({"line-cap":new Ce(P.layout_line["line-cap"]),"line-join":new Ee(P.layout_line["line-join"]),"line-miter-limit":new Ce(P.layout_line["line-miter-limit"]),"line-round-limit":new Ce(P.layout_line["line-round-limit"]),"line-sort-key":new Ee(P.layout_line["line-sort-key"])}),Mc={paint:new pr({"line-opacity":new Ee(P.paint_line["line-opacity"]),"line-color":new Ee(P.paint_line["line-color"]),"line-translate":new Ce(P.paint_line["line-translate"]),"line-translate-anchor":new Ce(P.paint_line["line-translate-anchor"]),"line-width":new Ee(P.paint_line["line-width"]),"line-gap-width":new Ee(P.paint_line["line-gap-width"]),"line-offset":new Ee(P.paint_line["line-offset"]),"line-blur":new Ee(P.paint_line["line-blur"]),"line-dasharray":new br(P.paint_line["line-dasharray"]),"line-pattern":new Va(P.paint_line["line-pattern"]),"line-gradient":new bi(P.paint_line["line-gradient"])}),layout:Th},Dc=new(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.possiblyEvaluate=function(r,a){return a=new Je(Math.floor(a.zoom),{now:a.now,fadeDuration:a.fadeDuration,zoomHistory:a.zoomHistory,transition:a.transition}),e.prototype.possiblyEvaluate.call(this,r,a)},t.prototype.evaluate=function(r,a,l,c){return a=sr({},a,{zoom:Math.floor(a.zoom)}),e.prototype.evaluate.call(this,r,a,l,c)},t}(Ee))(Mc.paint.properties["line-width"].specification);Dc.useIntegerZoom=!0;var Ih=function(e){function t(r){e.call(this,r,Mc),this.gradientVersion=0}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._handleSpecialPaintPropertyUpdate=function(r){r==="line-gradient"&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof Br,this.gradientVersion=(this.gradientVersion+1)%xs)},t.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},t.prototype.recalculate=function(r,a){e.prototype.recalculate.call(this,r,a),this.paint._values["line-floorwidth"]=Dc.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,r)},t.prototype.createBucket=function(r){return new kr(r)},t.prototype.queryRadius=function(r){var a=r,l=Lc(ki("line-width",this,a),ki("line-gap-width",this,a)),c=ki("line-offset",this,a);return l/2+Math.abs(c)+Jt(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(r,a,l,c,h,m,_){var g=qi(r,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),m.angle,_),x=_/2*Lc(this.paint.get("line-width").evaluate(a,l),this.paint.get("line-gap-width").evaluate(a,l)),b=this.paint.get("line-offset").evaluate(a,l);return b&&(c=function(I,A){for(var L=[],B=new je(0,0),q=0;q<I.length;q++){for(var V=I[q],W=[],J=0;J<V.length;J++){var Y=V[J],$=V[J+1],ne=J===0?B:Y.sub(V[J-1])._unit()._perp(),ue=J===V.length-1?B:$.sub(Y)._unit()._perp(),fe=ne._add(ue)._unit();fe._mult(1/(fe.x*ue.x+fe.y*ue.y)),W.push(fe._mult(A)._add(Y))}L.push(W)}return L}(c,b*_)),function(I,A,L){for(var B=0;B<A.length;B++){var q=A[B];if(I.length>=3){for(var V=0;V<q.length;V++)if(Ci(I,q[V]))return!0}if(ai(I,q,L))return!0}return!1}(g,c,x)},t.prototype.isTileClipped=function(){return!0},t}(zi);function Lc(e,t){return t>0?t+2*e:e}var Eh=rr([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Ah=rr([{name:"a_projected_pos",components:3,type:"Float32"}],4),zh=(rr([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),rr([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Bc=(rr([{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"}]),rr([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Ph=rr([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Ch(e,t,r){return e.sections.forEach(function(a){a.text=function(l,c,h){var m=c.layout.get("text-transform").evaluate(h,{});return m==="uppercase"?l=l.toLocaleUpperCase():m==="lowercase"&&(l=l.toLocaleLowerCase()),Xr.applyArabicShaping&&(l=Xr.applyArabicShaping(l)),l}(a.text,t,r)}),e}rr([{name:"triangle",components:3,type:"Uint16"}]),rr([{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"}]),rr([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),rr([{type:"Float32",name:"offsetX"}]),rr([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var el={"!":"ï¸","#":"ï¼",$:"ï¼","%":"ï¼
","&":"ï¼","(":"︵",")":"︶","*":"ï¼","+":"ï¼",",":"ï¸","-":"︲",".":"ã»","/":"ï¼",":":"ï¸",";":"ï¸","<":"︿","=":"ï¼",">":"ï¹","?":"ï¸","@":"ï¼ ","[":"ï¹","\\":"ï¼¼","]":"ï¹","^":"ï¼¾",_:"︳","`":"ï½","{":"︷","|":"â","}":"︸","~":"ï½","¢":"ï¿ ","£":"ï¿¡","Â¥":"ï¿¥","¦":"¦","¬":"ï¿¢","¯":"ï¿£","â":"︲","â":"︱","â":"ï¹","â":"ï¹","â":"ï¹","â":"ï¹","â¦":"ï¸","â§":"ã»","â©":"₩","ã":"ï¸","ã":"ï¸","ã":"︿","ã":"ï¹","ã":"︽","ã":"︾","ã":"ï¹","ã":"ï¹","ã":"ï¹","ã":"ï¹","ã":"︻","ã":"︼","ã":"︹","ã":"︺","ã":"ï¸","ã":"ï¸","ï¼":"ï¸","ï¼":"︵","ï¼":"︶","ï¼":"ï¸","ï¼":"︲","ï¼":"ã»","ï¼":"ï¸","ï¼":"ï¸","ï¼":"︿","ï¼":"ï¹","ï¼":"ï¸","ï¼»":"ï¹","ï¼½":"ï¹","_":"︳","ï½":"︷","ï½":"â","ï½":"︸","ï½":"︵","ï½ ":"︶","。":"ï¸","ï½¢":"ï¹","ï½£":"ï¹"},Rc=function(e,t,r,a,l){var c,h,m=8*l-a-1,_=(1<<m)-1,g=_>>1,x=-7,b=l-1,I=-1,A=e[t+b];for(b+=I,c=A&(1<<-x)-1,A>>=-x,x+=m;x>0;c=256*c+e[t+b],b+=I,x-=8);for(h=c&(1<<-x)-1,c>>=-x,x+=a;x>0;h=256*h+e[t+b],b+=I,x-=8);if(c===0)c=1-g;else{if(c===_)return h?NaN:1/0*(A?-1:1);h+=Math.pow(2,a),c-=g}return(A?-1:1)*h*Math.pow(2,c-a)},Oc=function(e,t,r,a,l,c){var h,m,_,g=8*c-l-1,x=(1<<g)-1,b=x>>1,I=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=0,L=1,B=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(m=isNaN(t)?1:0,h=x):(h=Math.floor(Math.log(t)/Math.LN2),t*(_=Math.pow(2,-h))<1&&(h--,_*=2),(t+=h+b>=1?I/_:I*Math.pow(2,1-b))*_>=2&&(h++,_/=2),h+b>=x?(m=0,h=x):h+b>=1?(m=(t*_-1)*Math.pow(2,l),h+=b):(m=t*Math.pow(2,b-1)*Math.pow(2,l),h=0));l>=8;e[r+A]=255&m,A+=L,m/=256,l-=8);for(h=h<<l|m,g+=l;g>0;e[r+A]=255&h,A+=L,h/=256,g-=8);e[r+A-L]|=128*B},tu=wt;function wt(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}wt.Varint=0,wt.Fixed64=1,wt.Bytes=2,wt.Fixed32=5;var Fc=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Hn(e){return e.type===wt.Bytes?e.readVarint()+e.pos:e.pos+1}function Ja(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function Uc(e,t,r){var a=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(a);for(var l=r.pos-1;l>=e;l--)r.buf[l+a]=r.buf[l]}function kh(e,t){for(var r=0;r<e.length;r++)t.writeVarint(e[r])}function Mh(e,t){for(var r=0;r<e.length;r++)t.writeSVarint(e[r])}function Dh(e,t){for(var r=0;r<e.length;r++)t.writeFloat(e[r])}function Lh(e,t){for(var r=0;r<e.length;r++)t.writeDouble(e[r])}function Bh(e,t){for(var r=0;r<e.length;r++)t.writeBoolean(e[r])}function Rh(e,t){for(var r=0;r<e.length;r++)t.writeFixed32(e[r])}function Oh(e,t){for(var r=0;r<e.length;r++)t.writeSFixed32(e[r])}function Fh(e,t){for(var r=0;r<e.length;r++)t.writeFixed64(e[r])}function Uh(e,t){for(var r=0;r<e.length;r++)t.writeSFixed64(e[r])}function ru(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function Ya(e,t,r){e[r]=t,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function Vc(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function Vh(e,t,r){e===1&&r.readMessage(Nh,t)}function Nh(e,t,r){if(e===3){var a=r.readMessage(jh,{}),l=a.width,c=a.height,h=a.left,m=a.top,_=a.advance;t.push({id:a.id,bitmap:new ca({width:l+6,height:c+6},a.bitmap),metrics:{width:l,height:c,left:h,top:m,advance:_}})}}function jh(e,t,r){e===1?t.id=r.readVarint():e===2?t.bitmap=r.readBytes():e===3?t.width=r.readVarint():e===4?t.height=r.readVarint():e===5?t.left=r.readSVarint():e===6?t.top=r.readSVarint():e===7&&(t.advance=r.readVarint())}function Nc(e){for(var t=0,r=0,a=0,l=e;a<l.length;a+=1){var c=l[a];t+=c.w*c.h,r=Math.max(r,c.w)}e.sort(function(B,q){return q.h-B.h});for(var h=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}],m=0,_=0,g=0,x=e;g<x.length;g+=1)for(var b=x[g],I=h.length-1;I>=0;I--){var A=h[I];if(!(b.w>A.w||b.h>A.h)){if(b.x=A.x,b.y=A.y,_=Math.max(_,b.y+b.h),m=Math.max(m,b.x+b.w),b.w===A.w&&b.h===A.h){var L=h.pop();I<h.length&&(h[I]=L)}else b.h===A.h?(A.x+=b.w,A.w-=b.w):b.w===A.w?(A.y+=b.h,A.h-=b.h):(h.push({x:A.x+b.w,y:A.y,w:A.w-b.w,h:b.h}),A.y+=b.h,A.h-=b.h);break}}return{w:m,h:_,fill:t/(m*_)||0}}wt.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos<r;){var a=this.readVarint(),l=a>>3,c=this.pos;this.type=7&a,e(l,t,this),this.pos===c&&this.skip(a)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=ru(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Vc(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=ru(this.buf,this.pos)+4294967296*ru(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=ru(this.buf,this.pos)+4294967296*Vc(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var e=Rc(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=Rc(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,a=this.buf;return t=127&(r=a[this.pos++]),r<128?t:(t|=(127&(r=a[this.pos++]))<<7,r<128?t:(t|=(127&(r=a[this.pos++]))<<14,r<128?t:(t|=(127&(r=a[this.pos++]))<<21,r<128?t:function(l,c,h){var m,_,g=h.buf;if(m=(112&(_=g[h.pos++]))>>4,_<128||(m|=(127&(_=g[h.pos++]))<<3,_<128)||(m|=(127&(_=g[h.pos++]))<<10,_<128)||(m|=(127&(_=g[h.pos++]))<<17,_<128)||(m|=(127&(_=g[h.pos++]))<<24,_<128)||(m|=(1&(_=g[h.pos++]))<<31,_<128))return Ja(l,m,c);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(r=a[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&Fc?function(r,a,l){return Fc.decode(r.subarray(a,l))}(this.buf,t,e):function(r,a,l){for(var c="",h=a;h<l;){var m,_,g,x=r[h],b=null,I=x>239?4:x>223?3:x>191?2:1;if(h+I>l)break;I===1?x<128&&(b=x):I===2?(192&(m=r[h+1]))==128&&(b=(31&x)<<6|63&m)<=127&&(b=null):I===3?(_=r[h+2],(192&(m=r[h+1]))==128&&(192&_)==128&&((b=(15&x)<<12|(63&m)<<6|63&_)<=2047||b>=55296&&b<=57343)&&(b=null)):I===4&&(_=r[h+2],g=r[h+3],(192&(m=r[h+1]))==128&&(192&_)==128&&(192&g)==128&&((b=(15&x)<<18|(63&m)<<12|(63&_)<<6|63&g)<=65535||b>=1114112)&&(b=null)),b===null?(b=65533,I=1):b>65535&&(b-=65536,c+=String.fromCharCode(b>>>10&1023|55296),b=56320|1023&b),c+=String.fromCharCode(b),h+=I}return c}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==wt.Bytes)return e.push(this.readVarint(t));var r=Hn(this);for(e=e||[];this.pos<r;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){if(this.type!==wt.Bytes)return e.push(this.readSVarint());var t=Hn(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==wt.Bytes)return e.push(this.readBoolean());var t=Hn(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==wt.Bytes)return e.push(this.readFloat());var t=Hn(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==wt.Bytes)return e.push(this.readDouble());var t=Hn(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==wt.Bytes)return e.push(this.readFixed32());var t=Hn(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==wt.Bytes)return e.push(this.readSFixed32());var t=Hn(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==wt.Bytes)return e.push(this.readFixed64());var t=Hn(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==wt.Bytes)return e.push(this.readSFixed64());var t=Hn(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===wt.Varint)for(;this.buf[this.pos++]>127;);else if(t===wt.Bytes)this.pos=this.readVarint()+this.pos;else if(t===wt.Fixed32)this.pos+=4;else{if(t!==wt.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var r=new Uint8Array(t);r.set(this.buf),this.buf=r,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),Ya(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),Ya(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),Ya(this.buf,-1&e,this.pos),Ya(this.buf,Math.floor(e*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),Ya(this.buf,-1&e,this.pos),Ya(this.buf,Math.floor(e*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?function(t,r){var a,l;if(t>=0?(a=t%4294967296|0,l=t/4294967296|0):(l=~(-t/4294967296),4294967295^(a=~(-t%4294967296))?a=a+1|0:(a=0,l=l+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");r.realloc(10),function(c,h,m){m.buf[m.pos++]=127&c|128,c>>>=7,m.buf[m.pos++]=127&c|128,c>>>=7,m.buf[m.pos++]=127&c|128,c>>>=7,m.buf[m.pos++]=127&c|128,m.buf[m.pos]=127&(c>>>=7)}(a,0,r),function(c,h){var m=(7&c)<<4;h.buf[h.pos++]|=m|((c>>>=3)?128:0),c&&(h.buf[h.pos++]=127&c|((c>>>=7)?128:0),c&&(h.buf[h.pos++]=127&c|((c>>>=7)?128:0),c&&(h.buf[h.pos++]=127&c|((c>>>=7)?128:0),c&&(h.buf[h.pos++]=127&c|((c>>>=7)?128:0),c&&(h.buf[h.pos++]=127&c)))))}(l,r)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(!!e)},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(a,l,c){for(var h,m,_=0;_<l.length;_++){if((h=l.charCodeAt(_))>55295&&h<57344){if(!m){h>56319||_+1===l.length?(a[c++]=239,a[c++]=191,a[c++]=189):m=h;continue}if(h<56320){a[c++]=239,a[c++]=191,a[c++]=189,m=h;continue}h=m-55296<<10|h-56320|65536,m=null}else m&&(a[c++]=239,a[c++]=191,a[c++]=189,m=null);h<128?a[c++]=h:(h<2048?a[c++]=h>>6|192:(h<65536?a[c++]=h>>12|224:(a[c++]=h>>18|240,a[c++]=h>>12&63|128),a[c++]=h>>6&63|128),a[c++]=63&h|128)}return c}(this.buf,e,this.pos);var r=this.pos-t;r>=128&&Uc(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),Oc(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),Oc(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r<t;r++)this.buf[this.pos++]=e[r]},writeRawMessage:function(e,t){this.pos++;var r=this.pos;e(t,this);var a=this.pos-r;a>=128&&Uc(r,a,this),this.pos=r-1,this.writeVarint(a),this.pos+=a},writeMessage:function(e,t,r){this.writeTag(e,wt.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,kh,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,Mh,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,Bh,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,Dh,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,Lh,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,Rh,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,Oh,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,Fh,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,Uh,t)},writeBytesField:function(e,t){this.writeTag(e,wt.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,wt.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,wt.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,wt.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,wt.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,wt.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,wt.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,wt.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,wt.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,wt.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,!!t)}};var iu=function(e,t){var r=t.pixelRatio,a=t.version,l=t.stretchX,c=t.stretchY,h=t.content;this.paddedRect=e,this.pixelRatio=r,this.stretchX=l,this.stretchY=c,this.content=h,this.version=a},tl={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};tl.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},tl.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},tl.tlbr.get=function(){return this.tl.concat(this.br)},tl.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(iu.prototype,tl);var rl=function(e,t){var r={},a={};this.haveRenderCallbacks=[];var l=[];this.addImages(e,r,l),this.addImages(t,a,l);var c=Nc(l),h=new jr({width:c.w||1,height:c.h||1});for(var m in e){var _=e[m],g=r[m].paddedRect;jr.copy(_.data,h,{x:0,y:0},{x:g.x+1,y:g.y+1},_.data)}for(var x in t){var b=t[x],I=a[x].paddedRect,A=I.x+1,L=I.y+1,B=b.data.width,q=b.data.height;jr.copy(b.data,h,{x:0,y:0},{x:A,y:L},b.data),jr.copy(b.data,h,{x:0,y:q-1},{x:A,y:L-1},{width:B,height:1}),jr.copy(b.data,h,{x:0,y:0},{x:A,y:L+q},{width:B,height:1}),jr.copy(b.data,h,{x:B-1,y:0},{x:A-1,y:L},{width:1,height:q}),jr.copy(b.data,h,{x:0,y:0},{x:A+B,y:L},{width:1,height:q})}this.image=h,this.iconPositions=r,this.patternPositions=a};rl.prototype.addImages=function(e,t,r){for(var a in e){var l=e[a],c={x:0,y:0,w:l.data.width+2,h:l.data.height+2};r.push(c),t[a]=new iu(c,l),l.hasRenderCallback&&this.haveRenderCallbacks.push(a)}},rl.prototype.patchUpdatedImages=function(e,t){for(var r in e.dispatchRenderCallbacks(this.haveRenderCallbacks),e.updatedImages)this.patchUpdatedImage(this.iconPositions[r],e.getImage(r),t),this.patchUpdatedImage(this.patternPositions[r],e.getImage(r),t)},rl.prototype.patchUpdatedImage=function(e,t,r){if(e&&t&&e.version!==t.version){e.version=t.version;var a=e.tl;r.update(t.data,void 0,{x:a[0],y:a[1]})}},Te("ImagePosition",iu),Te("ImageAtlas",rl);var si={horizontal:1,vertical:2,horizontalOnly:3},Qa=function(){this.scale=1,this.fontStack="",this.imageName=null};Qa.forText=function(e,t){var r=new Qa;return r.scale=e||1,r.fontStack=t,r},Qa.forImage=function(e){var t=new Qa;return t.imageName=e,t};var Sr=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function nu(e,t,r,a,l,c,h,m,_,g,x,b,I,A,L,B){var q,V=Sr.fromFeature(e,l);b===si.vertical&&V.verticalizePunctuation();var W=Xr.processBidirectionalText,J=Xr.processStyledBidirectionalText;if(W&&V.sections.length===1){q=[];for(var Y=0,$=W(V.toString(),tc(V,g,c,t,a,A,L));Y<$.length;Y+=1){var ne=$[Y],ue=new Sr;ue.text=ne,ue.sections=V.sections;for(var fe=0;fe<ne.length;fe++)ue.sectionIndex.push(0);q.push(ue)}}else if(J){q=[];for(var Pe=0,_e=J(V.text,V.sectionIndex,tc(V,g,c,t,a,A,L));Pe<_e.length;Pe+=1){var Me=_e[Pe],ve=new Sr;ve.text=Me[0],ve.sectionIndex=Me[1],ve.sections=V.sections,q.push(ve)}}else q=function(Ae,Ke){for(var qe=[],it=Ae.text,De=0,at=0,At=Ke;at<At.length;at+=1){var Dt=At[at];qe.push(Ae.substring(De,Dt)),De=Dt}return De<it.length&&qe.push(Ae.substring(De,it.length)),qe}(V,tc(V,g,c,t,a,A,L));var Xe=[],Oe={positionedLines:Xe,text:V.toString(),top:x[1],bottom:x[1],left:x[0],right:x[0],writingMode:b,iconsInText:!1,verticalizable:!1};return function(Ae,Ke,qe,it,De,at,At,Dt,Ct,zt,Lt,Yt){for(var Qt=0,Tr=-17,or=0,Ir=0,Ut=Dt==="right"?1:Dt==="left"?0:.5,ar=0,Ye=0,vt=De;Ye<vt.length;Ye+=1){var ft=vt[Ye];ft.trim();var ot=ft.getMaxScale(),Mr=24*(ot-1),fr={positionedGlyphs:[],lineOffset:0};Ae.positionedLines[ar]=fr;var St=fr.positionedGlyphs,Zt=0;if(ft.length()){for(var dr=0;dr<ft.length();dr++){var st=ft.getSection(dr),dn=ft.getSectionIndex(dr),li=ft.getCharCode(dr),mn=0,Vt=null,yn=null,Mi=null,as=24,da=!(Ct===si.horizontal||!Lt&&!Oa(li)||Lt&&(ou[li]||($n=li,me.Arabic($n)||me["Arabic Supplement"]($n)||me["Arabic Extended-A"]($n)||me["Arabic Presentation Forms-A"]($n)||me["Arabic Presentation Forms-B"]($n))));if(st.imageName){var ss=it[st.imageName];if(!ss)continue;Mi=st.imageName,Ae.iconsInText=Ae.iconsInText||!0,yn=ss.paddedRect;var Qn=ss.displaySize;st.scale=24*st.scale/Yt,mn=Mr+(24-Qn[1]*st.scale),as=(Vt={width:Qn[0],height:Qn[1],left:1,top:-3,advance:da?Qn[1]:Qn[0]}).advance;var ls=da?Qn[0]*st.scale-24*ot:Qn[1]*st.scale-24*ot;ls>0&&ls>Zt&&(Zt=ls)}else{var du=qe[st.fontStack],us=du&&du[li];if(us&&us.rect)yn=us.rect,Vt=us.metrics;else{var ol=Ke[st.fontStack],mu=ol&&ol[li];if(!mu)continue;Vt=mu.metrics}mn=24*(ot-st.scale)}da?(Ae.verticalizable=!0,St.push({glyph:li,imageName:Mi,x:Qt,y:Tr+mn,vertical:da,scale:st.scale,fontStack:st.fontStack,sectionIndex:dn,metrics:Vt,rect:yn}),Qt+=as*st.scale+zt):(St.push({glyph:li,imageName:Mi,x:Qt,y:Tr+mn,vertical:da,scale:st.scale,fontStack:st.fontStack,sectionIndex:dn,metrics:Vt,rect:yn}),Qt+=Vt.advance*st.scale+zt)}St.length!==0&&(or=Math.max(Qt-zt,or),Zh(St,0,St.length-1,Ut,Zt)),Qt=0;var yu=at*ot+Zt;fr.lineOffset=Math.max(Zt,Mr),Tr+=yu,Ir=Math.max(yu,Ir),++ar}else Tr+=at,++ar}var $n,al=Tr- -17,cs=rc(At),Po=cs.horizontalAlign,ps=cs.verticalAlign;(function(_u,gu,sl,ll,vu,ul,cl,pl,xu){var hs,bu=(gu-sl)*vu;hs=ul!==cl?-pl*ll- -17:(-ll*xu+.5)*cl;for(var fs=0,hl=_u;fs<hl.length;fs+=1)for(var ma=0,fl=hl[fs].positionedGlyphs;ma<fl.length;ma+=1){var ds=fl[ma];ds.x+=bu,ds.y+=hs}})(Ae.positionedLines,Ut,Po,ps,or,Ir,at,al,De.length),Ae.top+=-ps*al,Ae.bottom=Ae.top+al,Ae.left+=-Po*or,Ae.right=Ae.left+or}(Oe,t,r,a,q,h,m,_,b,g,I,B),!function(Ae){for(var Ke=0,qe=Ae;Ke<qe.length;Ke+=1)if(qe[Ke].positionedGlyphs.length!==0)return!1;return!0}(Xe)&&Oe}Sr.fromFeature=function(e,t){for(var r=new Sr,a=0;a<e.sections.length;a++){var l=e.sections[a];l.image?r.addImageSection(l):r.addTextSection(l,t)}return r},Sr.prototype.length=function(){return this.text.length},Sr.prototype.getSection=function(e){return this.sections[this.sectionIndex[e]]},Sr.prototype.getSectionIndex=function(e){return this.sectionIndex[e]},Sr.prototype.getCharCode=function(e){return this.text.charCodeAt(e)},Sr.prototype.verticalizePunctuation=function(){this.text=function(e){for(var t="",r=0;r<e.length;r++){var a=e.charCodeAt(r+1)||null,l=e.charCodeAt(r-1)||null;t+=a&&Us(a)&&!el[e[r+1]]||l&&Us(l)&&!el[e[r-1]]||!el[e[r]]?e[r]:el[e[r]]}return t}(this.text)},Sr.prototype.trim=function(){for(var e=0,t=0;t<this.text.length&&ou[this.text.charCodeAt(t)];t++)e++;for(var r=this.text.length,a=this.text.length-1;a>=0&&a>=e&&ou[this.text.charCodeAt(a)];a--)r--;this.text=this.text.substring(e,r),this.sectionIndex=this.sectionIndex.slice(e,r)},Sr.prototype.substring=function(e,t){var r=new Sr;return r.text=this.text.substring(e,t),r.sectionIndex=this.sectionIndex.slice(e,t),r.sections=this.sections,r},Sr.prototype.toString=function(){return this.text},Sr.prototype.getMaxScale=function(){var e=this;return this.sectionIndex.reduce(function(t,r){return Math.max(t,e.sections[r].scale)},0)},Sr.prototype.addTextSection=function(e,t){this.text+=e.text,this.sections.push(Qa.forText(e.scale,e.fontStack||t));for(var r=this.sections.length-1,a=0;a<e.text.length;++a)this.sectionIndex.push(r)},Sr.prototype.addImageSection=function(e){var t=e.image?e.image.name:"";if(t.length!==0){var r=this.getNextImageSectionCharCode();r?(this.text+=String.fromCharCode(r),this.sections.push(Qa.forImage(t)),this.sectionIndex.push(this.sections.length-1)):kt("Reached maximum number of images 6401")}else kt("Can't add FormattedSection with an empty image.")},Sr.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var ou={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Kr={};function jc(e,t,r,a,l,c){if(t.imageName){var h=a[t.imageName];return h?h.displaySize[0]*t.scale*24/c+l:0}var m=r[t.fontStack],_=m&&m[e];return _?_.metrics.advance*t.scale+l:0}function qc(e,t,r,a){var l=Math.pow(e-t,2);return a?e<t?l/2:2*l:l+Math.abs(r)*r}function qh(e,t,r){var a=0;return e===10&&(a-=1e4),r&&(a+=150),e!==40&&e!==65288||(a+=50),t!==41&&t!==65289||(a+=50),a}function Zc(e,t,r,a,l,c){for(var h=null,m=qc(t,r,l,c),_=0,g=a;_<g.length;_+=1){var x=g[_],b=qc(t-x.x,r,l,c)+x.badness;b<=m&&(h=x,m=b)}return{index:e,x:t,priorBreak:h,badness:m}}function tc(e,t,r,a,l,c,h){if(c!=="point")return[];if(!e)return[];for(var m,_=[],g=function(q,V,W,J,Y,$){for(var ne=0,ue=0;ue<q.length();ue++){var fe=q.getSection(ue);ne+=jc(q.getCharCode(ue),fe,J,Y,V,$)}return ne/Math.max(1,Math.ceil(ne/W))}(e,t,r,a,l,h),x=e.text.indexOf("â")>=0,b=0,I=0;I<e.length();I++){var A=e.getSection(I),L=e.getCharCode(I);if(ou[L]||(b+=jc(L,A,a,l,t,h)),I<e.length()-1){var B=!((m=L)<11904||!(me["Bopomofo Extended"](m)||me.Bopomofo(m)||me["CJK Compatibility Forms"](m)||me["CJK Compatibility Ideographs"](m)||me["CJK Compatibility"](m)||me["CJK Radicals Supplement"](m)||me["CJK Strokes"](m)||me["CJK Symbols and Punctuation"](m)||me["CJK
1Unified Ideographs Extension A"](m)||me["CJK Unified Ideographs"](m)||me["Enclosed CJK Letters and Months"](m)||me["Halfwidth and Fullwidth Forms"](m)||me.Hiragana(m)||me["Ideographic Description Characters"](m)||me["Kangxi Radicals"](m)||me["Katakana Phonetic Extensions"](m)||me.Katakana(m)||me["Vertical Forms"](m)||me["Yi Radicals"](m)||me["Yi Syllables"](m)));(Kr[L]||B||A.imageName)&&_.push(Zc(I+1,b,g,_,qh(L,e.getCharCode(I+1),B&&x),!1))}}return function q(V){return V?q(V.priorBreak).concat(V.index):[]}(Zc(e.length(),b,g,_,0,!0))}function rc(e){var t=.5,r=.5;switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:t,verticalAlign:r}}function Zh(e,t,r,a,l){if(a||l)for(var c=e[r],h=(e[r].x+c.metrics.advance*c.scale)*a,m=t;m<=r;m++)e[m].x-=h,e[m].y+=l}function Gc(e,t,r,a,l,c){var h,m=e.image;if(m.content){var _=m.content,g=m.pixelRatio||1;h=[_[0]/g,_[1]/g,m.displaySize[0]-_[2]/g,m.displaySize[1]-_[3]/g]}var x,b,I,A,L=t.left*c,B=t.right*c;r==="width"||r==="both"?(A=l[0]+L-a[3],b=l[0]+B+a[1]):b=(A=l[0]+(L+B-m.displaySize[0])/2)+m.displaySize[0];var q=t.top*c,V=t.bottom*c;return r==="height"||r==="both"?(x=l[1]+q-a[0],I=l[1]+V+a[2]):I=(x=l[1]+(q+V-m.displaySize[1])/2)+m.displaySize[1],{image:m,top:x,right:b,bottom:I,left:A,collisionPadding:h}}Kr[10]=!0,Kr[32]=!0,Kr[38]=!0,Kr[40]=!0,Kr[41]=!0,Kr[43]=!0,Kr[45]=!0,Kr[47]=!0,Kr[173]=!0,Kr[183]=!0,Kr[8203]=!0,Kr[8208]=!0,Kr[8211]=!0,Kr[8231]=!0;var $a=function(e){function t(r,a,l,c){e.call(this,r,a),this.angle=l,c!==void 0&&(this.segment=c)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.clone=function(){return new t(this.x,this.y,this.angle,this.segment)},t}(je);function ic(e,t){var r=t.expression;if(r.kind==="constant")return{kind:"constant",layoutSize:r.evaluate(new Je(e+1))};if(r.kind==="source")return{kind:"source"};for(var a=r.zoomStops,l=r.interpolationType,c=0;c<a.length&&a[c]<=e;)c++;for(var h=c=Math.max(0,c-1);h<a.length&&a[h]<e+1;)h++;h=Math.min(a.length-1,h);var m=a[c],_=a[h];return r.kind==="composite"?{kind:"composite",minZoom:m,maxZoom:_,interpolationType:l}:{kind:"camera",minZoom:m,maxZoom:_,minSize:r.evaluate(new Je(m)),maxSize:r.evaluate(new Je(_)),interpolationType:l}}function Xc(e,t,r){var a=t.uSize,l=r.lowerSize;return e.kind==="source"?l/128:e.kind==="composite"?jt(l/128,r.upperSize/128,t.uSizeT):a}function Wc(e,t){var r=0,a=0;if(e.kind==="constant")a=e.layoutSize;else if(e.kind!=="source"){var l=e.interpolationType,c=l?Dr(ur.interpolationFactor(l,t,e.minZoom,e.maxZoom),0,1):0;e.kind==="camera"?a=jt(e.minSize,e.maxSize,c):r=c}return{uSizeT:r,uSize:a}}Te("Anchor",$a);var Gh=Object.freeze({__proto__:null,getSizeData:ic,evaluateSizeForFeature:Xc,evaluateSizeForZoom:Wc,SIZE_PACK_FACTOR:128});function Kc(e,t,r,a,l){if(t.segment===void 0)return!0;for(var c=t,h=t.segment+1,m=0;m>-r/2;){if(--h<0)return!1;m-=e[h].dist(c),c=e[h]}m+=e[h].dist(e[h+1]),h++;for(var _=[],g=0;m<r/2;){var x=e[h],b=e[h+1];if(!b)return!1;var I=e[h-1].angleTo(x)-x.angleTo(b);for(I=Math.abs((I+3*Math.PI)%(2*Math.PI)-Math.PI),_.push({distance:m,angleDelta:I}),g+=I;m-_[0].distance>a;)g-=_.shift().angleDelta;if(g>l)return!1;h++,m+=x.dist(b)}return!0}function Hc(e){for(var t=0,r=0;r<e.length-1;r++)t+=e[r].dist(e[r+1]);return t}function Jc(e,t,r){return e?.6*t*r:0}function Yc(e,t){return Math.max(e?e.right-e.left:0,t?t.right-t.left:0)}function Xh(e,t,r,a,l,c){for(var h=Jc(r,l,c),m=Yc(r,a)*c,_=0,g=Hc(e)/2,x=0;x<e.length-1;x++){var b=e[x],I=e[x+1],A=b.dist(I);if(_+A>g){var L=(g-_)/A,B=jt(b.x,I.x,L),q=jt(b.y,I.y,L),V=new $a(B,q,I.angleTo(b),x);return V._round(),!h||Kc(e,V,m,h,t)?V:void 0}_+=A}}function Wh(e,t,r,a,l,c,h,m,_){var g=Jc(a,c,h),x=Yc(a,l),b=x*h,I=e[0].x===0||e[0].x===_||e[0].y===0||e[0].y===_;return t-b<t/4&&(t=b+t/4),function A(L,B,q,V,W,J,Y,$,ne){for(var ue=J/2,fe=Hc(L),Pe=0,_e=B-q,Me=[],ve=0;ve<L.length-1;ve++){for(var Xe=L[ve],Oe=L[ve+1],Ae=Xe.dist(Oe),Ke=Oe.angleTo(Xe);_e+q<Pe+Ae;){var qe=((_e+=q)-Pe)/Ae,it=jt(Xe.x,Oe.x,qe),De=jt(Xe.y,Oe.y,qe);if(it>=0&&it<ne&&De>=0&&De<ne&&_e-ue>=0&&_e+ue<=fe){var at=new $a(it,De,Ke,ve);at._round(),V&&!Kc(L,at,J,V,W)||Me.push(at)}}Pe+=Ae}return $||Me.length||Y||(Me=A(L,Pe/2,q,V,W,J,Y,!0,ne)),Me}(e,I?t/2*m%t:(x/2+2*c)*h*m%t,t,g,r,b,I,!1,_)}function Qc(e,t,r,a,l){for(var c=[],h=0;h<e.length;h++)for(var m=e[h],_=void 0,g=0;g<m.length-1;g++){var x=m[g],b=m[g+1];x.x<t&&b.x<t||(x.x<t?x=new je(t,x.y+(t-x.x)/(b.x-x.x)*(b.y-x.y))._round():b.x<t&&(b=ne
vendor: 46,800 bytes, line 1
1w je(t,x.y+(t-x.x)/(b.x-x.x)*(b.y-x.y))._round()),x.y<r&&b.y<r||(x.y<r?x=new je(x.x+(r-x.y)/(b.y-x.y)*(b.x-x.x),r)._round():b.y<r&&(b=new je(x.x+(r-x.y)/(b.y-x.y)*(b.x-x.x),r)._round()),x.x>=a&&b.x>=a||(x.x>=a?x=new je(a,x.y+(a-x.x)/(b.x-x.x)*(b.y-x.y))._round():b.x>=a&&(b=new je(a,x.y+(a-x.x)/(b.x-x.x)*(b.y-x.y))._round()),x.y>=l&&b.y>=l||(x.y>=l?x=new je(x.x+(l-x.y)/(b.y-x.y)*(b.x-x.x),l)._round():b.y>=l&&(b=new je(x.x+(l-x.y)/(b.y-x.y)*(b.x-x.x),l)._round()),_&&x.equals(_[_.length-1])||c.push(_=[x]),_.push(b)))))}return c}function $c(e,t,r,a){var l=[],c=e.image,h=c.pixelRatio,m=c.paddedRect.w-2,_=c.paddedRect.h-2,g=e.right-e.left,x=e.bottom-e.top,b=c.stretchX||[[0,m]],I=c.stretchY||[[0,_]],A=function(it,De){return it+De[1]-De[0]},L=b.reduce(A,0),B=I.reduce(A,0),q=m-L,V=_-B,W=0,J=L,Y=0,$=B,ne=0,ue=q,fe=0,Pe=V;if(c.content&&a){var _e=c.content;W=au(b,0,_e[0]),Y=au(I,0,_e[1]),J=au(b,_e[0],_e[2]),$=au(I,_e[1],_e[3]),ne=_e[0]-W,fe=_e[1]-Y,ue=_e[2]-_e[0]-J,Pe=_e[3]-_e[1]-$}var Me=function(it,De,at,At){var Dt=su(it.stretch-W,J,g,e.left),Ct=lu(it.fixed-ne,ue,it.stretch,L),zt=su(De.stretch-Y,$,x,e.top),Lt=lu(De.fixed-fe,Pe,De.stretch,B),Yt=su(at.stretch-W,J,g,e.left),Qt=lu(at.fixed-ne,ue,at.stretch,L),Tr=su(At.stretch-Y,$,x,e.top),or=lu(At.fixed-fe,Pe,At.stretch,B),Ir=new je(Dt,zt),Ut=new je(Yt,zt),ar=new je(Yt,Tr),Ye=new je(Dt,Tr),vt=new je(Ct/h,Lt/h),ft=new je(Qt/h,or/h),ot=t*Math.PI/180;if(ot){var Mr=Math.sin(ot),fr=Math.cos(ot),St=[fr,-Mr,Mr,fr];Ir._matMult(St),Ut._matMult(St),Ye._matMult(St),ar._matMult(St)}var Zt=it.stretch+it.fixed,dr=De.stretch+De.fixed;return{tl:Ir,tr:Ut,bl:Ye,br:ar,tex:{x:c.paddedRect.x+1+Zt,y:c.paddedRect.y+1+dr,w:at.stretch+at.fixed-Zt,h:At.stretch+At.fixed-dr},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:vt,pixelOffsetBR:ft,minFontScaleX:ue/h/g,minFontScaleY:Pe/h/x,isSDF:r}};if(a&&(c.stretchX||c.stretchY))for(var ve=ep(b,q,L),Xe=ep(I,V,B),Oe=0;Oe<ve.length-1;Oe++)for(var Ae=ve[Oe],Ke=ve[Oe+1],qe=0;qe<Xe.length-1;qe++)l.push(Me(Ae,Xe[qe],Ke,Xe[qe+1]));else l.push(Me({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:m+1},{fixed:0,stretch:_+1}));return l}function au(e,t,r){for(var a=0,l=0,c=e;l<c.length;l+=1){var h=c[l];a+=Math.max(t,Math.min(r,h[1]))-Math.max(t,Math.min(r,h[0]))}return a}function ep(e,t,r){for(var a=[{fixed:-1,stretch:0}],l=0,c=e;l<c.length;l+=1){var h=c[l],m=h[0],_=h[1],g=a[a.length-1];a.push({fixed:m-g.stretch,stretch:g.stretch}),a.push({fixed:m-g.stretch,stretch:g.stretch+(_-m)})}return a.push({fixed:t+1,stretch:r}),a}function su(e,t,r,a){return e/t*r+a}function lu(e,t,r,a){return e-t*r/a}var uu=function(e,t,r,a,l,c,h,m,_,g){if(this.boxStartIndex=e.length,_){var x=c.top,b=c.bottom,I=c.collisionPadding;I&&(x-=I[1],b+=I[3]);var A=b-x;A>0&&(A=Math.max(10,A),this.circleDiameter=A)}else{var L=c.top*h-m,B=c.bottom*h+m,q=c.left*h-m,V=c.right*h+m,W=c.collisionPadding;if(W&&(q-=W[0]*h,L-=W[1]*h,V+=W[2]*h,B+=W[3]*h),g){var J=new je(q,L),Y=new je(V,L),$=new je(q,B),ne=new je(V,B),ue=g*Math.PI/180;J._rotate(ue),Y._rotate(ue),$._rotate(ue),ne._rotate(ue),q=Math.min(J.x,Y.x,$.x,ne.x),V=Math.max(J.x,Y.x,$.x,ne.x),L=Math.min(J.y,Y.y,$.y,ne.y),B=Math.max(J.y,Y.y,$.y,ne.y)}e.emplaceBack(t.x,t.y,q,L,V,B,r,a,l)}this.boxEndIndex=e.length},es=function(e,t){if(e===void 0&&(e=[]),t===void 0&&(t=Kh),this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function Kh(e,t){return e<t?-1:e>t?1:0}function Hh(e,t,r){r===void 0&&(r=!1);for(var a=1/0,l=1/0,c=-1/0,h=-1/0,m=e[0],_=0;_<m.length;_++){var g=m[_];(!_||g.x<a)&&(a=g.x),(!_||g.y<l)&&(l=g.y),(!_||g.x>c)&&(c=g.x),(!_||g.y>h)&&(h=g.y)}var x=Math.min(c-a,h-l),b=x/2,I=new es([],Jh);if(x===0)return new je(a,l);for(var A=a;A<c;A+=x)for(var L=l;L<h;L+=x)I.push(new ts(A+b,L+b,b,e));for(var B=function(W){for(var J=0,Y=0,$=0,ne=W[0],ue=0,fe=ne.length,Pe=fe-1;ue<fe;Pe=ue++){var _e=ne[ue],Me=ne[Pe],ve=_e.x*Me.y-Me.x*_e.y;Y+=(_e.x+Me.x)*ve,$+=(_e.y+Me.y)*ve,J+=3*ve}return new ts(Y/J,$/J,0,W)}(e),q=I.length;I.length;){var V=I.pop();(V.d>B.d||!B.d)&&(B=V,r&&console.log("found best %d after %d probes",Math.round(1e4*V.d)/1e4,q)),V.max-B.d<=t||(I.push(new ts(V.p.x-(b=V.h/2),V.p.y-b,b,e)),I.push(new ts(V.p.x+b,V.p.y-b,b,e)),I.push(new ts(V.p.x-b,V.p.y+b,b,e)),I.push(new ts(V.p.x+b,V.p.y+b,b,e)),q+=4)}return r&&(console.log("num probes: "+q),console.log("best distance: "+B.d)),B.p}function Jh(e,t){return t.max-e.max}function ts(e,t,r,a){this.p=new je(e,t),this.h=r,this.d=function(l,c){for(var h=!1,m=1/0,_=0;_<c.length;_++)for(var g=c[_],x=0,b=g.length,I=b-1;x<b;I=x++){var A=g[x],L=g[I];A.y>l.y!=L.y>l.y&&l.x<(L.x-A.x)*(l.y-A.y)/(L.y-A.y)+A.x&&(h=!h),m=Math.min(m,Io(l,A,L))}return(h?1:-1)*Math.sqrt(m)}(this.p,a),this.max=this.d+this.h*Math.SQRT2}es.prototype.push=function(e){this.data.push(e),this.length++,this._up(this.length-1)},es.prototype.pop=function(){if(this.length!==0){var e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}},es.prototype.peek=function(){return this.data[0]},es.prototype._up=function(e){for(var t=this.data,r=this.compare,a=t[e];e>0;){var l=e-1>>1,c=t[l];if(r(a,c)>=0)break;t[e]=c,e=l}t[e]=a},es.prototype._down=function(e){for(var t=this.data,r=this.compare,a=this.length>>1,l=t[e];e<a;){var c=1+(e<<1),h=t[c],m=c+1;if(m<this.length&&r(t[m],h)<0&&(c=m,h=t[m]),r(h,l)>=0)break;t[e]=h,e=c}t[e]=l};var nc=Number.POSITIVE_INFINITY;function tp(e,t){return t[1]!==nc?function(r,a,l){var c=0,h=0;switch(a=Math.abs(a),l=Math.abs(l),r){case"top-right":case"top-left":case"top":h=l-7;break;case"bottom-right":case"bottom-left":case"bottom":h=7-l}switch(r){case"top-right":case"bottom-right":case"right":c=-a;break;case"top-left":case"bottom-left":case"left":c=a}return[c,h]}(e,t[0],t[1]):function(r,a){var l=0,c=0;a<0&&(a=0);var h=a/Math.sqrt(2);switch(r){case"top-right":case"top-left":c=h-7;break;case"bottom-right":case"bottom-left":c=7-h;break;case"bottom":c=7-a;break;case"top":c=a-7}switch(r){case"top-right":case"bottom-right":l=-h;break;case"top-left":case"bottom-left":l=h;break;case"left":l=a;break;case"right":l=-a}return[l,c]}(e,t[0])}function oc(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function rp(e,t,r,a,l,c,h,m,_,g,x,b,I,A,L){var B=function(Y,$,ne,ue,fe,Pe,_e,Me){for(var ve=ue.layout.get("text-rotate").evaluate(Pe,{})*Math.PI/180,Xe=[],Oe=0,Ae=$.positionedLines;Oe<Ae.length;Oe+=1)for(var Ke=Ae[Oe],qe=0,it=Ke.positionedGlyphs;qe<it.length;qe+=1){var De=it[qe];if(De.rect){var at=De.rect||{},At=4,Dt=!0,Ct=1,zt=0,Lt=(fe||Me)&&De.vertical,Yt=De.metrics.advance*De.scale/2;if(Me&&$.verticalizable&&(zt=Ke.lineOffset/2-(De.imageName?-(24-De.metrics.width*De.scale)/2:24*(De.scale-1))),De.imageName){var Qt=_e[De.imageName];Dt=Qt.sdf,At=1/(Ct=Qt.pixelRatio)}var Tr=fe?[De.x+Yt,De.y]:[0,0],or=fe?[0,0]:[De.x+Yt+ne[0],De.y+ne[1]-zt],Ir=[0,0];Lt&&(Ir=or,or=[0,0]);var Ut=(De.metrics.left-At)*De.scale-Yt+or[0],ar=(-De.metrics.top-At)*De.scale+or[1],Ye=Ut+at.w*De.scale/Ct,vt=ar+at.h*De.scale/Ct,ft=new je(Ut,ar),ot=new je(Ye,ar),Mr=new je(Ut,vt),fr=new je(Ye,vt);if(Lt){var St=new je(-Yt,Yt- -17),Zt=-Math.PI/2,dr=12-Yt,st=new je(22-dr,-(De.imageName?dr:0)),dn=new(Function.prototype.bind.apply(je,[null].concat(Ir)));ft._rotateAround(Zt,St)._add(st)._add(dn),ot._rotateAround(Zt,St)._add(st)._add(dn),Mr._rotateAround(Zt,St)._add(st)._add(dn),fr._rotateAround(Zt,St)._add(st)._add(dn)}if(ve){var li=Math.sin(ve),mn=Math.cos(ve),Vt=[mn,-li,li,mn];ft._matMult(Vt),ot._matMult(Vt),Mr._matMult(Vt),fr._matMult(Vt)}var yn=new je(0,0),Mi=new je(0,0);Xe.push({tl:ft,tr:ot,bl:Mr,br:fr,tex:at,writingMode:$.writingMode,glyphOffset:Tr,sectionIndex:De.sectionIndex,isSDF:Dt,pixelOffsetTL:yn,pixelOffsetBR:Mi,minFontScaleX:0,minFontScaleY:0})}}return Xe}(0,r,m,l,c,h,a,e.allowVerticalPlacement),q=e.textSizeData,V=null;q.kind==="source"?(V=[128*l.layout.get("text-size").evaluate(h,{})])[0]>32640&&kt(e.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):q.kind==="composite"&&((V=[128*A.compositeTextSizes[0].evaluate(h,{},L),128*A.compositeTextSizes[1].evaluate(h,{},L)])[0]>32640||V[1]>32640)&&kt(e.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),e.addSymbols(e.text,B,V,m,c,h,g,t,_.lineStartIndex,_.lineLength,I,L);for(var W=0,J=x;W<J.length;W+=1)b[J[W]]=e.text.placedSymbolArray.length-1;return 4*B.length}function ip(e){for(var t in e)return e[t];return null}function Yh(e,t,r,a){var l=e.compareText;if(t in l){for(var c=l[t],h=c.length-1;h>=0;h--)if(a.dist(c[h])<r)return!0}else l[t]=[];return l[t].push(a),!1}var Qh=Ha.VectorTileFeature.types,$h=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function cu(e,t,r,a,l,c,h,m,_,g,x,b,I){var A=m?Math.min(32640,Math.round(m[0])):0,L=m?Math.min(32640,Math.round(m[1])):0;e.emplaceBack(t,r,Math.round(32*a),Math.round(32*l),c,h,(A<<1)+(_?1:0),L,16*g,16*x,256*b,256*I)}function ac(e,t,r){e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r)}function ef(e){for(var t=0,r=e.sections;t<r.length;t+=1)if(Fa(r[t].text))return!0;return!1}var rs=function(e){this.layoutVertexArray=new ja,this.indexArray=new ln,this.programConfigurations=e,this.segments=new C,this.dynamicLayoutVertexArray=new wo,this.opacityVertexArray=new na,this.placedSymbolArray=new s};rs.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},rs.prototype.upload=function(e,t,r,a){this.isEmpty()||(r&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Eh.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,Ah.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,$h,!0),this.opacityVertexBuffer.itemSize=1),(r||a)&&this.programConfigurations.upload(e))},rs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},Te("SymbolBuffers",rs);var il=function(e,t,r){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new r,this.segments=new C,this.collisionVertexArray=new Gs};il.prototype.upload=function(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,zh.members,!0)},il.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},Te("CollisionBuffers",il);var mt=function(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(c){return c.id}),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Wr([]),this.placementViewportMatrix=Wr([]);var t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=ic(this.zoom,t["text-size"]),this.iconSizeData=ic(this.zoom,t["icon-size"]);var r=this.layers[0].layout,a=r.get("symbol-sort-key"),l=r.get("symbol-z-order");this.canOverlap=r.get("text-allow-overlap")||r.get("icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey=l!=="viewport-y"&&a.constantOr(1)!==void 0,this.sortFeaturesByY=(l==="viewport-y"||l==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,r.get("symbol-placement")==="point"&&(this.writingModes=r.get("text-writing-mode").map(function(c){return si[c]})),this.stateDependentLayerIds=this.layers.filter(function(c){return c.isStateDependent()}).map(function(c){return c.id}),this.sourceID=e.sourceID};mt.prototype.createArrays=function(){this.text=new rs(new Re(this.layers,this.zoom,function(e){return/^text/.test(e)})),this.icon=new rs(new Re(this.layers,this.zoom,function(e){return/^icon/.test(e)})),this.glyphOffsetArray=new d,this.lineVertexArray=new y,this.symbolInstances=new f},mt.prototype.calculateGlyphDependencies=function(e,t,r,a,l){for(var c=0;c<e.length;c++)if(t[e.charCodeAt(c)]=!0,(r||a)&&l){var h=el[e.charAt(c)];h&&(t[h.charCodeAt(0)]=!0)}},mt.prototype.populate=function(e,t,r){var a=this.layers[0],l=a.layout,c=l.get("text-font"),h=l.get("text-field"),m=l.get("icon-image"),_=(h.value.kind!=="constant"||h.value.value instanceof er&&!h.value.value.isEmpty()||h.value.value.toString().length>0)&&(c.value.kind!=="constant"||c.value.value.length>0),g=m.value.kind!=="constant"||!!m.value.value||Object.keys(m.parameters).length>0,x=l.get("symbol-sort-key");if(this.features=[],_||g){for(var b=t.iconDependencies,I=t.glyphDependencies,A=t.availableImages,L=new Je(this.zoom),B=0,q=e;B<q.length;B+=1){var V=q[B],W=V.feature,J=V.id,Y=V.index,$=V.sourceLayerIndex,ne=a._featureFilter.needGeometry,ue=Ft(W,ne);if(a._featureFilter.filter(L,ue,r)){ne||(ue.geometry=Pt(W));var fe=void 0;if(_){var Pe=a.getValueAndResolveTokens("text-field",ue,r,A),_e=er.factory(Pe);ef(_e)&&(this.hasRTLText=!0),(!this.hasRTLText||Ns()==="unavailable"||this.hasRTLText&&Xr.isParsed())&&(fe=Ch(_e,a,ue))}var Me=void 0;if(g){var ve=a.getValueAndResolveTokens("icon-image",ue,r,A);Me=ve instanceof zr?ve:zr.fromString(ve)}if(fe||Me){var Xe=this.sortFeaturesByKey?x.evaluate(ue,{},r):void 0;if(this.features.push({id:J,text:fe,icon:Me,index:Y,sourceLayerIndex:$,geometry:ue.geometry,properties:W.properties,type:Qh[W.type],sortKey:Xe}),Me&&(b[Me.name]=!0),fe){var Oe=c.evaluate(ue,{},r).join(","),Ae=l.get("text-rotation-alignment")==="map"&&l.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(si.vertical)>=0;for(var Ke=0,qe=fe.sections;Ke<qe.length;Ke+=1){var it=qe[Ke];if(it.image)b[it.image.name]=!0;else{var De=Fs(fe.toString()),at=it.fontStack||Oe,At=I[at]=I[at]||{};this.calculateGlyphDependencies(it.text,At,Ae,this.allowVerticalPlacement,De)}}}}}}l.get("symbol-placement")==="line"&&(this.features=function(Dt){var Ct={},zt={},Lt=[],Yt=0;function Qt(St){Lt.push(Dt[St]),Yt++}function Tr(St,Zt,dr){var st=zt[St];return delete zt[St],zt[Zt]=st,Lt[st].geometry[0].pop(),Lt[st].geometry[0]=Lt[st].geometry[0].concat(dr[0]),st}function or(St,Zt,dr){var st=Ct[Zt];return delete Ct[Zt],Ct[St]=st,Lt[st].geometry[0].shift(),Lt[st].geometry[0]=dr[0].concat(Lt[st].geometry[0]),st}function Ir(St,Zt,dr){var st=dr?Zt[0][Zt[0].length-1]:Zt[0][0];return St+":"+st.x+":"+st.y}for(var Ut=0;Ut<Dt.length;Ut++){var ar=Dt[Ut],Ye=ar.geometry,vt=ar.text?ar.text.toString():null;if(vt){var ft=Ir(vt,Ye),ot=Ir(vt,Ye,!0);if(ft in zt&&ot in Ct&&zt[ft]!==Ct[ot]){var Mr=or(ft,ot,Ye),fr=Tr(ft,ot,Lt[Mr].geometry);delete Ct[ft],delete zt[ot],zt[Ir(vt,Lt[fr].geometry,!0)]=fr,Lt[Mr].geometry=null}else ft in zt?Tr(ft,ot,Ye):ot in Ct?or(ft,ot,Ye):(Qt(Ut),Ct[ft]=Yt-1,zt[ot]=Yt-1)}else Qt(Ut)}return Lt.filter(function(St){return St.geometry})}(this.features)),this.sortFeaturesByKey&&this.features.sort(function(Dt,Ct){return Dt.sortKey-Ct.sortKey})}},mt.prototype.update=function(e,t,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,r),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,r))},mt.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},mt.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},mt.prototype.upload=function(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},mt.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},mt.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},mt.prototype.addToLineVertexArray=function(e,t){var r=this.lineVertexArray.length;if(e.segment!==void 0){for(var a=e.dist(t[e.segment+1]),l=e.dist(t[e.segment]),c={},h=e.segment+1;h<t.length;h++)c[h]={x:t[h].x,y:t[h].y,tileUnitDistanceFromAnchor:a},h<t.length-1&&(a+=t[h+1].dist(t[h]));for(var m=e.segment||0;m>=0;m--)c[m]={x:t[m].x,y:t[m].y,tileUnitDistanceFromAnchor:l},m>0&&(l+=t[m-1].dist(t[m]));for(var _=0;_<t.length;_++){var g=c[_];this.lineVertexArray.emplaceBack(g.x,g.y,g.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},mt.prototype.addSymbols=function(e,t,r,a,l,c,h,m,_,g,x,b){for(var I=e.indexArray,A=e.layoutVertexArray,L=e.segments.prepareSegment(4*t.length,A,I,this.canOverlap?c.sortKey:void 0),B=this.glyphOffsetArray.length,q=L.vertexLength,V=this.allowVerticalPlacement&&h===si.vertical?Math.PI/2:0,W=c.text&&c.text.sections,J=0;J<t.length;J++){var Y=t[J],$=Y.tl,ne=Y.tr,ue=Y.bl,fe=Y.br,Pe=Y.tex,_e=Y.pixelOffsetTL,Me=Y.pixelOffsetBR,ve=Y.minFontScaleX,Xe=Y.minFontScaleY,Oe=Y.glyphOffset,Ae=Y.isSDF,Ke=Y.sectionIndex,qe=L.vertexLength,it=Oe[1];cu(A,m.x,m.y,$.x,it+$.y,Pe.x,Pe.y,r,Ae,_e.x,_e.y,ve,Xe),cu(A,m.x,m.y,ne.x,it+ne.y,Pe.x+Pe.w,Pe.y,r,Ae,Me.x,_e.y,ve,Xe),cu(A,m.x,m.y,ue.x,it+ue.y,Pe.x,Pe.y+Pe.h,r,Ae,_e.x,Me.y,ve,Xe),cu(A,m.x,m.y,fe.x,it+fe.y,Pe.x+Pe.w,Pe.y+Pe.h,r,Ae,Me.x,Me.y,ve,Xe),ac(e.dynamicLayoutVertexArray,m,V),I.emplaceBack(qe,qe+1,qe+2),I.emplaceBack(qe+1,qe+2,qe+3),L.vertexLength+=4,L.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Oe[0]),J!==t.length-1&&Ke===t[J+1].sectionIndex||e.programConfigurations.populatePaintArrays(A.length,c,c.index,{},b,W&&W[Ke])}e.placedSymbolArray.emplaceBack(m.x,m.y,B,this.glyphOffsetArray.length-B,q,_,g,m.segment,r?r[0]:0,r?r[1]:0,a[0],a[1],h,0,!1,0,x)},mt.prototype._addCollisionDebugVertex=function(e,t,r,a,l,c){return t.emplaceBack(0,0),e.emplaceBack(r.x,r.y,a,l,Math.round(c.x),Math.round(c.y))},mt.prototype.addCollisionDebugVertices=function(e,t,r,a,l,c,h){var m=l.segments.prepareSegment(4,l.layoutVertexArray,l.indexArray),_=m.vertexLength,g=l.layoutVertexArray,x=l.collisionVertexArray,b=h.anchorX,I=h.anchorY;this._addCollisionDebugVertex(g,x,c,b,I,new je(e,t)),this._addCollisionDebugVertex(g,x,c,b,I,new je(r,t)),this._addCollisionDebugVertex(g,x,c,b,I,new je(r,a)),this._addCollisionDebugVertex(g,x,c,b,I,new je(e,a)),m.vertexLength+=4;var A=l.indexArray;A.emplaceBack(_,_+1),A.emplaceBack(_+1,_+2),A.emplaceBack(_+2,_+3),A.emplaceBack(_+3,_),m.primitiveLength+=4},mt.prototype.addDebugCollisionBoxes=function(e,t,r,a){for(var l=e;l<t;l++){var c=this.collisionBoxArray.get(l);this.addCollisionDebugVertices(c.x1,c.y1,c.x2,c.y2,a?this.textCollisionBox:this.iconCollisionBox,c.anchorPoint,r)}},mt.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new il(So,Bc.members,oa),this.iconCollisionBox=new il(So,Bc.members,oa);for(var e=0;e<this.symbolInstances.length;e++){var t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t,!1),this.addDebugCollisionBoxes(t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex,t,!1)}},mt.prototype._deserializeCollisionBoxesForSymbol=function(e,t,r,a,l,c,h,m,_){for(var g={},x=t;x<r;x++){var b=e.get(x);g.textBox={x1:b.x1,y1:b.y1,x2:b.x2,y2:b.y2,anchorPointX:b.anchorPointX,anchorPointY:b.anchorPointY},g.textFeatureIndex=b.featureIndex;break}for(var I=a;I<l;I++){var A=e.get(I);g.verticalTextBox={x1:A.x1,y1:A.y1,x2:A.x2,y2:A.y2,anchorPointX:A.anchorPointX,anchorPointY:A.anchorPointY},g.verticalTextFeatureIndex=A.featureIndex;break}for(var L=c;L<h;L++){var B=e.get(L);g.iconBox={x1:B.x1,y1:B.y1,x2:B.x2,y2:B.y2,anchorPointX:B.anchorPointX,anchorPointY:B.anchorPointY},g.iconFeatureIndex=B.featureIndex;break}for(var q=m;q<_;q++){var V=e.get(q);g.verticalIconBox={x1:V.x1,y1:V.y1,x2:V.x2,y2:V.y2,anchorPointX:V.anchorPointX,anchorPointY:V.anchorPointY},g.verticalIconFeatureIndex=V.featureIndex;break}return g},mt.prototype.deserializeCollisionBoxes=function(e){this.collisionArrays=[];for(var t=0;t<this.symbolInstances.length;t++){var r=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,r.textBoxStartIndex,r.textBoxEndIndex,r.verticalTextBoxStartIndex,r.verticalTextBoxEndIndex,r.iconBoxStartIndex,r.iconBoxEndIndex,r.verticalIconBoxStartIndex,r.verticalIconBoxEndIndex))}},mt.prototype.hasTextData=function(){return this.text.segments.get().length>0},mt.prototype.hasIconData=function(){return this.icon.segments.get().length>0},mt.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},mt.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},mt.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},mt.prototype.addIndicesForPlacedSymbol=function(e,t){for(var r=e.placedSymbolArray.get(t),a=r.vertexStartIndex+4*r.numGlyphs,l=r.vertexStartIndex;l<a;l+=4)e.indexArray.emplaceBack(l,l+1,l+2),e.indexArray.emplaceBack(l+1,l+2,l+3)},mt.prototype.getSortedSymbolIndexes=function(e){if(this.sortedAngle===e&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var t=Math.sin(e),r=Math.cos(e),a=[],l=[],c=[],h=0;h<this.symbolInstances.length;++h){c.push(h);var m=this.symbolInstances.get(h);a.push(0|Math.round(t*m.anchorX+r*m.anchorY)),l.push(m.featureIndex)}return c.sort(function(_,g){return a[_]-a[g]||l[g]-l[_]}),c},mt.prototype.addToSortKeyRanges=function(e,t){var r=this.sortKeyRanges[this.sortKeyRanges.length-1];r&&r.sortKey===t?r.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})},mt.prototype.sortFeatures=function(e){var t=this;if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,a=this.symbolInstanceIndexes;r<a.length;r+=1){var l=this.symbolInstances.get(a[r]);this.featureSortOrder.push(l.featureIndex),[l.rightJustifiedTextSymbolIndex,l.centerJustifiedTextSymbolIndex,l.leftJustifiedTextSymbolIndex].forEach(function(c,h,m){c>=0&&m.indexOf(c)===h&&t.addIndicesForPlacedSymbol(t.text,c)}),l.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,l.verticalPlacedTextSymbolIndex),l.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,l.placedIconSymbolIndex),l.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,l.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Te("SymbolBucket",mt,{omit:["layers","collisionBoxArray","features","compareText"]}),mt.MAX_GLYPHS=65535,mt.addDynamicAttributes=ac;var tf=new pr({"symbol-placement":new Ce(P.layout_symbol["symbol-placement"]),"symbol-spacing":new Ce(P.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ce(P.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ee(P.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ce(P.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ce(P.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Ce(P.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ce(P.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ce(P.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ee(P.layout_symbol["icon-size"]),"icon-text-fit":new Ce(P.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ce(P.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ee(P.layout_symbol["icon-image"]),"icon-rotate":new Ee(P.layout_symbol["icon-rotate"]),"icon-padding":new Ce(P.layout_symbol["icon-padding"]),"icon-keep-upright":new Ce(P.layout_symbol["icon-keep-upright"]),"icon-offset":new Ee(P.layout_symbol["icon-offset"]),"icon-anchor":new Ee(P.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ce(P.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ce(P.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ce(P.layout_symbol["text-rotation-alignment"]),"text-field":new Ee(P.layout_symbol["text-field"]),"text-font":new Ee(P.layout_symbol["text-font"]),"text-size":new Ee(P.layout_symbol["text-size"]),"text-max-width":new Ee(P.layout_symbol["text-max-width"]),"text-line-height":new Ce(P.layout_symbol["text-line-height"]),"text-letter-spacing":new Ee(P.layout_symbol["text-letter-spacing"]),"text-justify":new Ee(P.layout_symbol["text-justify"]),"text-radial-offset":new Ee(P.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ce(P.layout_symbol["text-variable-anchor"]),"text-anchor":new Ee(P.layout_symbol["text-anchor"]),"text-max-angle":new Ce(P.layout_symbol["text-max-angle"]),"text-writing-mode":new Ce(P.layout_symbol["text-writing-mode"]),"text-rotate":new Ee(P.layout_symbol["text-rotate"]),"text-padding":new Ce(P.layout_symbol["text-padding"]),"text-keep-upright":new Ce(P.layout_symbol["text-keep-upright"]),"text-transform":new Ee(P.layout_symbol["text-transform"]),"text-offset":new Ee(P.layout_symbol["text-offset"]),"text-allow-overlap":new Ce(P.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Ce(P.layout_symbol["text-ignore-placement"]),"text-optional":new Ce(P.layout_symbol["text-optional"])}),sc={paint:new pr({"icon-opacity":new Ee(P.paint_symbol["icon-opacity"]),"icon-color":new Ee(P.paint_symbol["icon-color"]),"icon-halo-color":new Ee(P.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ee(P.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ee(P.paint_symbol["icon-halo-blur"]),"icon-translate":new Ce(P.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ce(P.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ee(P.paint_symbol["text-opacity"]),"text-color":new Ee(P.paint_symbol["text-color"],{runtimeType:ye,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new Ee(P.paint_symbol["text-halo-color"]),"text-halo-width":new Ee(P.paint_symbol["text-halo-width"]),"text-halo-blur":new Ee(P.paint_symbol["text-halo-blur"]),"text-translate":new Ce(P.paint_symbol["text-translate"]),"text-translate-anchor":new Ce(P.paint_symbol["text-translate-anchor"])}),layout:tf},is=function(e){this.type=e.property.overrides?e.property.overrides.runtimeType:Se,this.defaultValue=e};is.prototype.evaluate=function(e){if(e.formattedSection){var t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default},is.prototype.eachChild=function(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)},is.prototype.outputDefined=function(){return!1},is.prototype.serialize=function(){return null},Te("FormatSectionOverride",is,{omit:["defaultValue"]});var rf=function(e){function t(r){e.call(this,r,sc)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.recalculate=function(r,a){if(e.prototype.recalculate.call(this,r,a),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var l=this.layout.get("text-writing-mode");if(l){for(var c=[],h=0,m=l;h<m.length;h+=1){var _=m[h];c.indexOf(_)<0&&c.push(_)}this.layout._values["text-writing-mode"]=c}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},t.prototype.getValueAndResolveTokens=function(r,a,l,c){var h=this.layout.get(r).evaluate(a,{},l,c),m=this._unevaluatedLayout._values[r];return m.isDataDriven()||Wo(m.value)||!h?h:function(_,g){return g.replace(/{([^{}]+)}/g,function(x,b){return b in _?String(_[b]):""})}(a.properties,h)},t.prototype.createBucket=function(r){return new mt(r)},t.prototype.queryRadius=function(){return 0},t.prototype.queryIntersectsFeature=function(){return!1},t.prototype._setPaintOverrides=function(){for(var r=0,a=sc.paint.overridableProperties;r<a.length;r+=1){var l=a[r];if(t.hasPaintOverride(this.layout,l)){var c,h=this.paint.get(l),m=new is(h),_=new yo(m,h.property.specification);c=h.value.kind==="constant"||h.value.kind==="source"?new Ko("source",_):new _o("composite",_,h.value.zoomStops,h.value._interpolationType),this.paint._values[l]=new xr(h.property,c,h.parameters)}}},t.prototype._handleOverridablePaintPropertyUpdate=function(r,a,l){return!(!this.layout||a.isDataDriven()||l.isDataDriven())&&t.hasPaintOverride(this.layout,r)},t.hasPaintOverride=function(r,a){var l=r.get("text-field"),c=sc.paint.properties[a],h=!1,m=function(x){for(var b=0,I=x;b<I.length;b+=1)if(c.overrides&&c.overrides.hasOverride(I[b]))return void(h=!0)};if(l.value.kind==="constant"&&l.value.value instanceof er)m(l.value.value.sections);else if(l.value.kind==="source"){var _=function(x){h||(x instanceof gr&&Ot(x.value)===_t?m(x.value.sections):x instanceof yi?m(x.sections):x.eachChild(_))},g=l.value;g._styleExpression&&_(g._styleExpression.expression)}return h},t}(zi),nf={paint:new pr({"background-color":new Ce(P.paint_background["background-color"]),"background-pattern":new br(P.paint_background["background-pattern"]),"background-opacity":new Ce(P.paint_background["background-opacity"])})},of=function(e){function t(r){e.call(this,r,nf)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t}(zi),af={paint:new pr({"raster-opacity":new Ce(P.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ce(P.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ce(P.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ce(P.paint_raster["raster-brightness-max"]),"raster-saturation":new Ce(P.paint_raster["raster-saturation"]),"raster-contrast":new Ce(P.paint_raster["raster-contrast"]),"raster-resampling":new Ce(P.paint_raster["raster-resampling"]),"raster-fade-duration":new Ce(P.paint_raster["raster-fade-duration"])})},sf=function(e){function t(r){e.call(this,r,af)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t}(zi),lf=function(e){function t(r){e.call(this,r,{}),this.implementation=r}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.is3D=function(){return this.implementation.renderingMode==="3d"},t.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},t.prototype.recalculate=function(){},t.prototype.updateTransitions=function(){},t.prototype.hasTransition=function(){},t.prototype.serialize=function(){},t.prototype.onAdd=function(r){this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},t.prototype.onRemove=function(r){this.implementation.onRemove&&this.implementation.onRemove(r,r.painter.context.gl)},t}(zi),uf={circle:Gu,heatmap:Gp,hillshade:Wp,fill:ch,"fill-extrusion":vh,line:Ih,symbol:rf,background:of,raster:sf},np=ze.HTMLImageElement,op=ze.HTMLCanvasElement,ap=ze.HTMLVideoElement,sp=ze.ImageData,pu=ze.ImageBitmap,pa=function(e,t,r,a){this.context=e,this.format=r,this.texture=e.gl.createTexture(),this.update(t,a)};pa.prototype.update=function(e,t,r){var a=e.width,l=e.height,c=!(this.size&&this.size[0]===a&&this.size[1]===l||r),h=this.context,m=h.gl;if(this.useMipmap=!!(t&&t.useMipmap),m.bindTexture(m.TEXTURE_2D,this.texture),h.pixelStoreUnpackFlipY.set(!1),h.pixelStoreUnpack.set(1),h.pixelStoreUnpackPremultiplyAlpha.set(this.format===m.RGBA&&(!t||t.premultiply!==!1)),c)this.size=[a,l],e instanceof np||e instanceof op||e instanceof ap||e instanceof sp||pu&&e instanceof pu?m.texImage2D(m.TEXTURE_2D,0,this.format,this.format,m.UNSIGNED_BYTE,e):m.texImage2D(m.TEXTURE_2D,0,this.format,a,l,0,this.format,m.UNSIGNED_BYTE,e.data);else{var _=r||{x:0,y:0},g=_.x,x=_.y;e instanceof np||e instanceof op||e instanceof ap||e instanceof sp||pu&&e instanceof pu?m.texSubImage2D(m.TEXTURE_2D,0,g,x,m.RGBA,m.UNSIGNED_BYTE,e):m.texSubImage2D(m.TEXTURE_2D,0,g,x,a,l,m.RGBA,m.UNSIGNED_BYTE,e.data)}this.useMipmap&&this.isSizePowerOfTwo()&&m.generateMipmap(m.TEXTURE_2D)},pa.prototype.bind=function(e,t,r){var a=this.context.gl;a.bindTexture(a.TEXTURE_2D,this.texture),r!==a.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=a.LINEAR),e!==this.filter&&(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,e),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,r||e),this.filter=e),t!==this.wrap&&(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,t),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,t),this.wrap=t)},pa.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},pa.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var lc=function(e){var t=this;this._callback=e,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){t._triggered=!1,t._callback()})};lc.prototype.trigger=function(){var e=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){e._triggered=!1,e._callback()},0))},lc.prototype.remove=function(){delete this._channel,this._callback=function(){}};var ns=function(e,t,r){this.target=e,this.parent=t,this.mapId=r,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},io(["receive","process"],this),this.invoker=new lc(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=pi()?e:ze};function lp(e,t,r){var a=2*Math.PI*6378137/256/Math.pow(2,r);return[e*a-2*Math.PI*6378137/2,t*a-2*Math.PI*6378137/2]}ns.prototype.send=function(e,t,r,a,l){var c=this;l===void 0&&(l=!1);var h=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(this.callbacks[h]=r);var m=va(this.globalScope)?void 0:[];return this.target.postMessage({id:h,type:e,hasCallback:!!r,targetMapId:a,mustQueue:l,sourceMapId:this.mapId,data:gi(t,m)},m),{cancel:function(){r&&delete c.callbacks[h],c.target.postMessage({id:h,type:"<cancel>",targetMapId:a,sourceMapId:c.mapId})}}},ns.prototype.receive=function(e){var t=e.data,r=t.id;if(r&&(!t.targetMapId||this.mapId===t.targetMapId))if(t.type==="<cancel>"){delete this.tasks[r];var a=this.cancelCallbacks[r];delete this.cancelCallbacks[r],a&&a()}else pi()||t.mustQueue?(this.tasks[r]=t,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,t)},ns.prototype.process=function(){if(this.taskQueue.length){var e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t&&this.processTask(e,t)}},ns.prototype.processTask=function(e,t){var r=this;if(t.type==="<response>"){var a=this.callbacks[e];delete this.callbacks[e],a&&(t.error?a(Or(t.error)):a(null,Or(t.data)))}else{var l=!1,c=va(this.globalScope)?void 0:[],h=t.hasCallback?function(x,b){l=!0,delete r.cancelCallbacks[e],r.target.postMessage({id:e,type:"<response>",sourceMapId:r.mapId,error:x?gi(x):null,data:gi(b,c)},c)}:function(x){l=!0},m=null,_=Or(t.data);if(this.parent[t.type])m=this.parent[t.type](t.sourceMapId,_,h);else if(this.parent.getWorkerSource){var g=t.type.split(".");m=this.parent.getWorkerSource(t.sourceMapId,g[0],_.source)[g[1]](_,h)}else h(new Error("Could not find function "+t.type));!l&&m&&m.cancel&&(this.cancelCallbacks[e]=m.cancel)}},ns.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Wt=function(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):e.length===4?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))};Wt.prototype.setNorthEast=function(e){return this._ne=e instanceof Et?new Et(e.lng,e.lat):Et.convert(e),this},Wt.prototype.setSouthWest=function(e){return this._sw=e instanceof Et?new Et(e.lng,e.lat):Et.convert(e),this},Wt.prototype.extend=function(e){var t,r,a=this._sw,l=this._ne;if(e instanceof Et)t=e,r=e;else{if(!(e instanceof Wt))return Array.isArray(e)?e.length===4||e.every(Array.isArray)?this.extend(Wt.convert(e)):this.extend(Et.convert(e)):this;if(r=e._ne,!(t=e._sw)||!r)return this}return a||l?(a.lng=Math.min(t.lng,a.lng),a.lat=Math.min(t.lat,a.lat),l.lng=Math.max(r.lng,l.lng),l.lat=Math.max(r.lat,l.lat)):(this._sw=new Et(t.lng,t.lat),this._ne=new Et(r.lng,r.lat)),this},Wt.prototype.getCenter=function(){return new Et((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Wt.prototype.getSouthWest=function(){return this._sw},Wt.prototype.getNorthEast=function(){return this._ne},Wt.prototype.getNorthWest=function(){return new Et(this.getWest(),this.getNorth())},Wt.prototype.getSouthEast=function(){return new Et(this.getEast(),this.getSouth())},Wt.prototype.getWest=function(){return this._sw.lng},Wt.prototype.getSouth=function(){return this._sw.lat},Wt.prototype.getEast=function(){return this._ne.lng},Wt.prototype.getNorth=function(){return this._ne.lat},Wt.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Wt.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Wt.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Wt.prototype.contains=function(e){var t=Et.convert(e),r=t.lng,a=t.lat,l=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(l=this._sw.lng>=r&&r>=this._ne.lng),this._sw.lat<=a&&a<=this._ne.lat&&l},Wt.convert=function(e){return!e||e instanceof Wt?e:new Wt(e)};var Et=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Et.prototype.wrap=function(){return new Et(Mo(this.lng,-180,180),this.lat)},Et.prototype.toArray=function(){return[this.lng,this.lat]},Et.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Et.prototype.distanceTo=function(e){var t=Math.PI/180,r=this.lat*t,a=e.lat*t,l=Math.sin(r)*Math.sin(a)+Math.cos(r)*Math.cos(a)*Math.cos((e.lng-this.lng)*t);return 63710088e-1*Math.acos(Math.min(l,1))},Et.prototype.toBounds=function(e){e===void 0&&(e=0);var t=360*e/40075017,r=t/Math.cos(Math.PI/180*this.lat);return new Wt(new Et(this.lng-r,this.lat-t),new Et(this.lng+r,this.lat+t))},Et.convert=function(e){if(e instanceof Et)return e;if(Array.isArray(e)&&(e.length===2||e.length===3))return new Et(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&typeof e=="object"&&e!==null)return new Et(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var up=2*Math.PI*63710088e-1;function cp(e){return up*Math.cos(e*Math.PI/180)}function pp(e){return(180+e)/360}function hp(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function fp(e,t){return e/cp(t)}function uc(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}var ha=function(e,t,r){r===void 0&&(r=0),this.x=+e,this.y=+t,this.z=+r};ha.fromLngLat=function(e,t){t===void 0&&(t=0);var r=Et.convert(e);return new ha(pp(r.lng),hp(r.lat),fp(t,r.lat))},ha.prototype.toLngLat=function(){return new Et(360*this.x-180,uc(this.y))},ha.prototype.toAltitude=function(){return this.z*cp(uc(this.y))},ha.prototype.meterInMercatorCoordinateUnits=function(){return 1/up*(e=uc(this.y),1/Math.cos(e*Math.PI/180));var e};var fa=function(e,t,r){this.z=e,this.x=t,this.y=r,this.key=nl(0,e,e,t,r)};fa.prototype.equals=function(e){return this.z===e.z&&this.x===e.x&&this.y===e.y},fa.prototype.url=function(e,t){var r,a,l,c,h,m=(a=this.y,l=this.z,c=lp(256*(r=this.x),256*(a=Math.pow(2,l)-a-1),l),h=lp(256*(r+1),256*(a+1),l),c[0]+","+c[1]+","+h[0]+","+h[1]),_=function(g,x,b){for(var I,A="",L=g;L>0;L--)A+=(x&(I=1<<L-1)?1:0)+(b&I?2:0);return A}(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(t==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",_).replace("{bbox-epsg-3857}",m)},fa.prototype.getTilePoint=function(e){var t=Math.pow(2,this.z);return new je(8192*(e.x*t-this.x),8192*(e.y*t-this.y))},fa.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var dp=function(e,t){this.wrap=e,this.canonical=t,this.key=nl(e,t.z,t.z,t.x,t.y)},Kt=function(e,t,r,a,l){this.overscaledZ=e,this.wrap=t,this.canonical=new fa(r,+a,+l),this.key=nl(t,e,r,a,l)};function nl(e,t,r,a,l){(e*=2)<0&&(e=-1*e-1);var c=1<<r;return(c*c*e+c*l+a).toString(36)+r.toString(36)+t.toString(36)}Kt.prototype.equals=function(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)},Kt.prototype.scaledTo=function(e){var t=this.canonical.z-e;return e>this.canonical.z?new Kt(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Kt(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)},Kt.prototype.calculateScaledKey=function(e,t){var r=this.canonical.z-e;return e>this.canonical.z?nl(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y):nl(this.wrap*+t,e,e,this.canonical.x>>r,this.canonical.y>>r)},Kt.prototype.isChildOf=function(e){if(e.wrap!==this.wrap)return!1;var t=this.canonical.z-e.canonical.z;return e.overscaledZ===0||e.overscaledZ<this.overscaledZ&&e.canonical.x===this.canonical.x>>t&&e.canonical.y===this.canonical.y>>t},Kt.prototype.children=function(e){if(this.overscaledZ>=e)return[new Kt(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var t=this.canonical.z+1,r=2*this.canonical.x,a=2*this.canonical.y;return[new Kt(t,this.wrap,t,r,a),new Kt(t,this.wrap,t,r+1,a),new Kt(t,this.wrap,t,r,a+1),new Kt(t,this.wrap,t,r+1,a+1)]},Kt.prototype.isLessThan=function(e){return this.wrap<e.wrap||!(this.wrap>e.wrap)&&(this.overscaledZ<e.overscaledZ||!(this.overscaledZ>e.overscaledZ)&&(this.canonical.x<e.canonical.x||!(this.canonical.x>e.canonical.x)&&this.canonical.y<e.canonical.y))},Kt.prototype.wrapped=function(){return new Kt(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Kt.prototype.unwrapTo=function(e){return new Kt(this.overscaledZ,e,this.canonical.z,this.canonical.x,this.canonical.y)},Kt.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Kt.prototype.toUnwrapped=function(){return new dp(this.wrap,this.canonical)},Kt.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},Kt.prototype.getTilePoint=function(e){return this.canonical.getTilePoint(new ha(e.x-this.wrap,e.y))},Te("CanonicalTileID",fa),Te("OverscaledTileID",Kt,{omit:["posMatrix"]});var Jn=function(e,t,r){if(this.uid=e,t.height!==t.width)throw new RangeError("DEM tiles must be square");if(r&&r!=="mapbox"&&r!=="terrarium")return kt('"'+r+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=t.height;var a=this.dim=t.height-2;this.data=new Uint32Array(t.data.buffer),this.encoding=r||"mapbox";for(var l=0;l<a;l++)this.data[this._idx(-1,l)]=this.data[this._idx(0,l)],this.data[this._idx(a,l)]=this.data[this._idx(a-1,l)],this.data[this._idx(l,-1)]=this.data[this._idx(l,0)],this.data[this._idx(l,a)]=this.data[this._idx(l,a-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(a,-1)]=this.data[this._idx(a-1,0)],this.data[this._idx(-1,a)]=this.data[this._idx(0,a-1)],this.data[this._idx(a,a)]=this.data[this._idx(a-1,a-1)]};Jn.prototype.get=function(e,t){var r=new Uint8Array(this.data.buffer),a=4*this._idx(e,t);return(this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox)(r[a],r[a+1],r[a+2])},Jn.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},Jn.prototype._idx=function(e,t){if(e<-1||e>=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)},Jn.prototype._unpackMapbox=function(e,t,r){return(256*e*256+256*t+r)/10-1e4},Jn.prototype._unpackTerrarium=function(e,t,r){return 256*e+t+r/256-32768},Jn.prototype.getPixels=function(){return new jr({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Jn.prototype.backfillBorder=function(e,t,r){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");var a=t*this.dim,l=t*this.dim+this.dim,c=r*this.dim,h=r*this.dim+this.dim;switch(t){case-1:a=l-1;break;case 1:l=a+1}switch(r){case-1:c=h-1;break;case 1:h=c+1}for(var m=-t*this.dim,_=-r*this.dim,g=c;g<h;g++)for(var x=a;x<l;x++)this.data[this._idx(x,g)]=e.data[this._idx(x+m,g+_)]},Te("DEMData",Jn);var hu=function(e){this._stringToNumber={},this._numberToString=[];for(var t=0;t<e.length;t++){var r=e[t];this._stringToNumber[r]=t,this._numberToString[t]=r}};hu.prototype.encode=function(e){return this._stringToNumber[e]},hu.prototype.decode=function(e){return this._numberToString[e]};var fu=function(e,t,r,a,l){this.type="Feature",this._vectorTileFeature=e,e._z=t,e._x=r,e._y=a,this.properties=e.properties,this.id=l},cc={geometry:{configurable:!0}};cc.geometry.get=function(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}
vendor: 6,297 bytes, line 1
1,cc.geometry.set=function(e){this._geometry=e},fu.prototype.toJSON=function(){var e={geometry:this.geometry};for(var t in this)t!=="_geometry"&&t!=="_vectorTileFeature"&&(e[t]=this[t]);return e},Object.defineProperties(fu.prototype,cc);var os=function(){this.state={},this.stateChanges={},this.deletedStates={}};os.prototype.updateState=function(e,t,r){var a=String(t);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][a]=this.stateChanges[e][a]||{},sr(this.stateChanges[e][a],r),this.deletedStates[e]===null)for(var l in this.deletedStates[e]={},this.state[e])l!==a&&(this.deletedStates[e][l]=null);else if(this.deletedStates[e]&&this.deletedStates[e][a]===null)for(var c in this.deletedStates[e][a]={},this.state[e][a])r[c]||(this.deletedStates[e][a][c]=null);else for(var h in r)this.deletedStates[e]&&this.deletedStates[e][a]&&this.deletedStates[e][a][h]===null&&delete this.deletedStates[e][a][h]},os.prototype.removeFeatureState=function(e,t,r){if(this.deletedStates[e]!==null){var a=String(t);if(this.deletedStates[e]=this.deletedStates[e]||{},r&&t!==void 0)this.deletedStates[e][a]!==null&&(this.deletedStates[e][a]=this.deletedStates[e][a]||{},this.deletedStates[e][a][r]=null);else if(t!==void 0)if(this.stateChanges[e]&&this.stateChanges[e][a])for(r in this.deletedStates[e][a]={},this.stateChanges[e][a])this.deletedStates[e][a][r]=null;else this.deletedStates[e][a]=null;else this.deletedStates[e]=null}},os.prototype.getState=function(e,t){var r=String(t),a=sr({},(this.state[e]||{})[r],(this.stateChanges[e]||{})[r]);if(this.deletedStates[e]===null)return{};if(this.deletedStates[e]){var l=this.deletedStates[e][t];if(l===null)return{};for(var c in l)delete a[c]}return a},os.prototype.initializeTileState=function(e,t){e.setFeatureState(this.state,t)},os.prototype.coalesceChanges=function(e,t){var r={};for(var a in this.stateChanges){this.state[a]=this.state[a]||{};var l={};for(var c in this.stateChanges[a])this.state[a][c]||(this.state[a][c]={}),sr(this.state[a][c],this.stateChanges[a][c]),l[c]=this.state[a][c];r[a]=l}for(var h in this.deletedStates){this.state[h]=this.state[h]||{};var m={};if(this.deletedStates[h]===null)for(var _ in this.state[h])m[_]={},this.state[h][_]={};else for(var g in this.deletedStates[h]){if(this.deletedStates[h][g]===null)this.state[h][g]={};else for(var x=0,b=Object.keys(this.deletedStates[h][g]);x<b.length;x+=1)delete this.state[h][g][b[x]];m[g]=this.state[h][g]}r[h]=r[h]||{},sr(r[h],m)}if(this.stateChanges={},this.deletedStates={},Object.keys(r).length!==0)for(var I in e)e[I].setFeatureState(r,t)};var Yn=function(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new Vi(8192,16,0),this.grid3D=new Vi(8192,16,0),this.featureIndexArray=new S,this.promoteId=t};function mp(e,t,r,a,l){return mr(e,function(c,h){var m=t instanceof ia?t.get(h):null;return m&&m.evaluate?m.evaluate(r,a,l):m})}function yp(e){for(var t=1/0,r=1/0,a=-1/0,l=-1/0,c=0,h=e;c<h.length;c+=1){var m=h[c];t=Math.min(t,m.x),r=Math.min(r,m.y),a=Math.max(a,m.x),l=Math.max(l,m.y)}return{minX:t,minY:r,maxX:a,maxY:l}}function cf(e,t){return t-e}Yn.prototype.insert=function(e,t,r,a,l,c){var h=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,a,l);for(var m=c?this.grid3D:this.grid,_=0;_<t.length;_++){for(var g=t[_],x=[1/0,1/0,-1/0,-1/0],b=0;b<g.length;b++){var I=g[b];x[0]=Math.min(x[0],I.x),x[1]=Math.min(x[1],I.y),x[2]=Math.max(x[2],I.x),x[3]=Math.max(x[3],I.y)}x[0]<8192&&x[1]<8192&&x[2]>=0&&x[3]>=0&&m.insert(h,x[0],x[1],x[2],x[3])}},Yn.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ha.VectorTile(new tu(this.rawTileData)).layers,this.sourceLayerCoder=new hu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Yn.prototype.query=function(e,t,r,a){var l=this;this.loadVTLayers();for(var c=e.params||{},h=8192/e.tileSize/e.scale,m=Ma(c.filter),_=e.queryGeometry,g=e.queryPadding*h,x=yp(_),b=this.grid.query(x.minX-g,x.minY-g,x.maxX+g,x.maxY+g),I=yp(e.cameraQueryGeometry),A=this.grid3D.query(I.minX-g,I.minY-g,I.maxX+g,I.maxY+g,function(Y,$,ne,ue){return function(fe,Pe,_e,Me,ve){for(var Xe=0,Oe=fe;Xe<Oe.length;Xe+=1){var Ae=Oe[Xe];if(Pe<=Ae.x&&_e<=Ae.y&&Me>=Ae.x&&ve>=Ae.y)return!0}var Ke=[new je(Pe,_e),new je(Pe,ve),new je(Me,ve),new je(Me,_e)];if(fe.length>2){for(var qe=0,it=Ke;qe<it.length;qe+=1)if(Ci(fe,it[qe]))return!0}for(var De=0;De<fe.length-1;De++)if(la(fe[De],fe[De+1],Ke))return!0;return!1}(e.cameraQueryGeometry,Y-g,$-g,ne+g,ue+g)}),L=0,B=A;L<B.length;L+=1)b.push(B[L]);b.sort(cf);for(var q,V={},W=function(Y){var $=b[Y];if($!==q){q=$;var ne=l.featureIndexArray.get($),ue=null;l.loadMatchingFeature(V,ne.bucketIndex,ne.sourceLayerIndex,ne.featureIndex,m,c.layers,c.availableImages,t,r,a,function(fe,Pe,_e){return ue||(ue=Pt(fe)),Pe.queryIntersectsFeature(_,fe,_e,ue,l.z,e.transform,h,e.pixelPosMatrix)})}},J=0;J<b.length;J++)W(J);return V},Yn.prototype.loadMatchingFeature=function(e,t,r,a,l,c,h,m,_,g,x){var b=this.bucketLayerIDs[t];if(!c||function(fe,Pe){for(var _e=0;_e<fe.length;_e++)if(Pe.indexOf(fe[_e])>=0)return!0;return!1}(c,b)){var I=this.sourceLayerCoder.decode(r),A=this.vtLayers[I].feature(a);if(l.needGeometry){var L=Ft(A,!0);if(!l.filter(new Je(this.tileID.overscaledZ),L,this.tileID.canonical))return}else if(!l.filter(new Je(this.tileID.overscaledZ),A))return;for(var B=this.getId(A,I),q=0;q<b.length;q++){var V=b[q];if(!(c&&c.indexOf(V)<0)){var W=m[V];if(W){var J={};B!==void 0&&g&&(J=g.getState(W.sourceLayer||"_geojsonTileLayer",B));var Y=sr({},_[V]);Y.paint=mp(Y.paint,W.paint,A,J,h),Y.layout=mp(Y.layout,W.layout,A,J,h);var $=!x||x(A,W,J);if($){var ne=new fu(A,this.z,this.x,this.y,B);ne.layer=Y;var ue=e[V];ue===void 0&&(ue=e[V]=[]),ue.push({featureIndex:a,feature:ne,intersectionZ:$})}}}}}},Yn.prototype.lookupSymbolFeatures=function(e,t,r,a,l,c,h,m){var _={};this.loadVTLayers();for(var g=Ma(l),x=0,b=e;x<b.length;x+=1)this.loadMatchingFeature(_,r,a,b[x],g,c,h,m,t);return _},Yn.prototype.hasLayer=function(e){for(var t=0,r=this.bucketLayerIDs;t<r.length;t+=1)for(var a=0,l=r[t];a<l.length;a+=1)if(e===l[a])return!0;return!1},Yn.prototype.getId=function(e,t){var r=e.id;return this.promoteId&&typeof(r=e.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[t]]
vendor: 32,610 bytes, line 1
1)=="boolean"&&(r=Number(r)),r},Te("FeatureIndex",Yn,{omit:["rawTileData","sourceLayerCoder"]});var nr=function(e,t){this.tileID=e,this.uid=to(),this.uses=0,this.tileSize=t,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};nr.prototype.registerFadeDuration=function(e){var t=e+this.timeAdded;t<Ri.now()||this.fadeEndTime&&t<this.fadeEndTime||(this.fadeEndTime=t)},nr.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},nr.prototype.loadVectorData=function(e,t,r){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){for(var a in e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(g,x){var b={};if(!x)return b;for(var I=function(){var B=L[A],q=B.layerIds.map(function(J){return x.getLayer(J)}).filter(Boolean);if(q.length!==0){B.layers=q,B.stateDependentLayerIds&&(B.stateDependentLayers=B.stateDependentLayerIds.map(function(J){return q.filter(function(Y){return Y.id===J})[0]}));for(var V=0,W=q;V<W.length;V+=1)b[W[V].id]=B}},A=0,L=g;A<L.length;A+=1)I();return b}(e.buckets,t.style),this.hasSymbolBuckets=!1,this.buckets){var l=this.buckets[a];if(l instanceof mt){if(this.hasSymbolBuckets=!0,!r)break;l.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var c in this.buckets){var h=this.buckets[c];if(h instanceof mt&&h.hasRTLText){this.hasRTLText=!0,Xr.isLoading()||Xr.isLoaded()||Ns()!=="deferred"||vi();break}}for(var m in this.queryPadding=0,this.buckets){var _=this.buckets[m];this.queryPadding=Math.max(this.queryPadding,t.style.getLayer(m).queryRadius(_))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new o},nr.prototype.unloadVectorData=function(){for(var e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},nr.prototype.getBucket=function(e){return this.buckets[e.id]},nr.prototype.upload=function(e){for(var t in this.buckets){var r=this.buckets[t];r.uploadPending()&&r.upload(e)}var a=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new pa(e,this.imageAtlas.image,a.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new pa(e,this.glyphAtlasImage,a.ALPHA),this.glyphAtlasImage=null)},nr.prototype.prepare=function(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)},nr.prototype.queryRenderedFeatures=function(e,t,r,a,l,c,h,m,_,g){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:a,cameraQueryGeometry:l,scale:c,tileSize:this.tileSize,pixelPosMatrix:g,transform:m,params:h,queryPadding:this.queryPadding*_},e,t,r):{}},nr.prototype.querySourceFeatures=function(e,t){var r=this.latestFeatureIndex;if(r&&r.rawTileData){var a=r.loadVTLayers(),l=t?t.sourceLayer:"",c=a._geojsonTileLayer||a[l];if(c)for(var h=Ma(t&&t.filter),m=this.tileID.canonical,_=m.z,g=m.x,x=m.y,b={z:_,x:g,y:x},I=0;I<c.length;I++){var A=c.feature(I);if(h.needGeometry){var L=Ft(A,!0);if(!h.filter(new Je(this.tileID.overscaledZ),L,this.tileID.canonical))continue}else if(!h.filter(new Je(this.tileID.overscaledZ),A))continue;var B=r.getId(A,l),q=new fu(A,_,g,x,B);q.tile=b,e.push(q)}}},nr.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"},nr.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},nr.prototype.setExpiryData=function(e){var t=this.expirationTime;if(e.cacheControl){var r=oo(e.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){var a=Date.now(),l=!1;if(this.expirationTime>a)l=!1;else if(t)if(this.expirationTime<t)l=!0;else{var c=this.expirationTime-t;c?this.expirationTime=a+Math.max(c,3e4):l=!0}else l=!0;l?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},nr.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)},nr.prototype.setFeatureState=function(e,t){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&Object.keys(e).length!==0){var r=this.latestFeatureIndex.loadVTLayers();for(var a in this.buckets)if(t.style.hasLayer(a)){var l=this.buckets[a],c=l.layers[0].sourceLayer||"_geojsonTileLayer",h=r[c],m=e[c];if(h&&m&&Object.keys(m).length!==0){l.update(m,h,this.imageAtlas&&this.imageAtlas.patternPositions||{});var _=t&&t.style&&t.style.getLayer(a);_&&(this.queryPadding=Math.max(this.queryPadding,_.queryRadius(l)))}}}},nr.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},nr.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<Ri.now()},nr.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},nr.prototype.setHoldDuration=function(e){this.symbolFadeHoldUntil=Ri.now()+e},nr.prototype.setDependencies=function(e,t){for(var r={},a=0,l=t;a<l.length;a+=1)r[l[a]]=!0;this.dependencies[e]=r},nr.prototype.hasDependency=function(e,t){for(var r=0,a=e;r<a.length;r+=1){var l=this.dependencies[a[r]];if(l){for(var c=0,h=t;c<h.length;c+=1)if(l[h[c]])return!0}}return!1};var zo=ze.performance,_p=function(e){this._marks={start:[e.url,"start"].join("#"),end:[e.url,"end"].join("#"),measure:e.url.toString()},zo.mark(this._marks.start)};_p.prototype.finish=function(){zo.mark(this._marks.end);var e=zo.getEntriesByName(this._marks.measure);return e.length===0&&(zo.measure(this._marks.measure,this._marks.start,this._marks.end),e=zo.getEntriesByName(this._marks.measure),zo.clearMarks(this._marks.start),zo.clearMarks(this._marks.end),zo.clearMeasures(this._marks.measure)),e},u.Actor=ns,u.AlphaImage=ca,u.CanonicalTileID=fa,u.CollisionBoxArray=o,u.Color=ut,u.DEMData=Jn,u.DataConstantProperty=Ce,u.DictionaryCoder=hu,u.EXTENT=8192,u.ErrorEvent=Z,u.EvaluationParameters=Je,u.Event=O,u.Evented=X,u.FeatureIndex=Yn,u.FillBucket=Zi,u.FillExtrusionBucket=Gi,u.ImageAtlas=rl,u.ImagePosition=iu,u.LineBucket=kr,u.LngLat=Et,u.LngLatBounds=Wt,u.MercatorCoordinate=ha,u.ONE_EM=24,u.OverscaledTileID=Kt,u.Point=je,u.Point$1=je,u.Properties=pr,u.Protobuf=tu,u.RGBAImage=jr,u.RequestManager=Er,u.RequestPerformance=_p,u.ResourceType=Sa,u.SegmentVector=C,u.SourceFeatureState=os,u.StructArrayLayout1ui2=Ws,u.StructArrayLayout2f1f2i16=Xn,u.StructArrayLayout2i4=Gn,u.StructArrayLayout3ui6=ln,u.StructArrayLayout4i8=qs,u.SymbolBucket=mt,u.Texture=pa,u.Tile=nr,u.Transitionable=cr,u.Uniform1f=he,u.Uniform1i=oe,u.Uniform2f=pe,u.Uniform3f=be,u.Uniform4f=ke,u.UniformColor=Be,u.UniformMatrix4f=nt,u.UnwrappedTileID=dp,u.ValidationError=U,u.WritingMode=si,u.ZoomHistory=Os,u.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e},u.addDynamicAttributes=ac,u.asyncAll=function(e,t,r){if(!e.length)return r(null,[]);var a=e.length,l=new Array(e.length),c=null;e.forEach(function(h,m){t(h,function(_,g){_&&(c=_),l[m]=g,--a==0&&r(c,l)})})},u.bezier=Hr,u.bindAll=io,u.browser=Ri,u.cacheEntryPossiblyAdded=function(e){++Oo>wa&&(e.getActor().send("enforceCacheSizeLimit",uo),Oo=0)},u.clamp=Dr,u.clearTileCache=function(e){var t=ze.caches.delete("mapbox-tiles");e&&t.catch(e).then(function(){return e()})},u.clipLine=Qc,u.clone=function(e){var t=new ct(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},u.clone$1=ci,u.clone$2=function(e){var t=new ct(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},u.collisionCircleLayout=Ph,u.config=yt,u.create=function(){var e=new ct(16);return ct!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},u.create$1=function(){var e=new ct(9);return ct!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e},u.create$2=function(){var e=new ct(4);return ct!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e},u.createCommonjsModule=qr,u.createExpression=Ca,u.createLayout=rr,u.createStyleLayer=function(e){return e.type==="custom"?new lf(e):new uf[e.type](e)},u.cross=function(e,t,r){var a=t[0],l=t[1],c=t[2],h=r[0],m=r[1],_=r[2];return e[0]=l*_-c*m,e[1]=c*h-a*_,e[2]=a*m-l*h,e},u.deepEqual=function e(t,r){if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(var a=0;a<t.length;a++)if(!e(t[a],r[a]))return!1;return!0}if(typeof t=="object"&&t!==null&&r!==null){if(typeof r!="object"||Object.keys(t).length!==Object.keys(r).length)return!1;for(var l in t)if(!e(t[l],r[l]))return!1;return!0}return t===r},u.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},u.dot$1=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},u.ease=wn,u.emitValidationErrors=ea,u.endsWith=Sn,u.enforceCacheSizeLimit=function(e){co(),$r&&$r.then(function(t){t.keys().then(function(r){for(var a=0;a<r.length-e;a++)t.delete(r[a])})})},u.evaluateSizeForFeature=Xc,u.evaluateSizeForZoom=Wc,u.evaluateVariableOffset=tp,u.evented=Vs,u.extend=sr,u.featureFilter=Ma,u.filterObject=Bi,u.fromRotation=function(e,t){var r=Math.sin(t),a=Math.cos(t);return e[0]=a,e[1]=r,e[2]=0,e[3]=-r,e[4]=a,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},u.getAnchorAlignment=rc,u.getAnchorJustification=oc,u.getArrayBuffer=Uo,u.getImage=T,u.getJSON=function(e,t){return po(sr(e,{type:"json"}),t)},u.getRTLTextPluginStatus=Ns,u.getReferrer=Pn,u.getVideo=function(e,t){var r,a,l=ze.document.createElement("video");l.muted=!0,l.onloadstart=function(){t(null,l)};for(var c=0;c<e.length;c++){var h=ze.document.createElement("source");r=e[c],a=void 0,(a=ze.document.createElement("a")).href=r,(a.protocol!==ze.document.location.protocol||a.host!==ze.document.location.host)&&(l.crossOrigin="Anonymous"),h.src=e[c],l.appendChild(h)}return{cancel:function(){}}},u.identity=Wr,u.invert=function(e,t){var r=t[0],a=t[1],l=t[2],c=t[3],h=t[4],m=t[5],_=t[6],g=t[7],x=t[8],b=t[9],I=t[10],A=t[11],L=t[12],B=t[13],q=t[14],V=t[15],W=r*m-a*h,J=r*_-l*h,Y=r*g-c*h,$=a*_-l*m,ne=a*g-c*m,ue=l*g-c*_,fe=x*B-b*L,Pe=x*q-I*L,_e=x*V-A*L,Me=b*q-I*B,ve=b*V-A*B,Xe=I*V-A*q,Oe=W*Xe-J*ve+Y*Me+$*_e-ne*Pe+ue*fe;return Oe?(e[0]=(m*Xe-_*ve+g*Me)*(Oe=1/Oe),e[1]=(l*ve-a*Xe-c*Me)*Oe,e[2]=(B*ue-q*ne+V*$)*Oe,e[3]=(I*ne-b*ue-A*$)*Oe,e[4]=(_*_e-h*Xe-g*Pe)*Oe,e[5]=(r*Xe-l*_e+c*Pe)*Oe,e[6]=(q*Y-L*ue-V*J)*Oe,e[7]=(x*ue-I*Y+A*J)*Oe,e[8]=(h*ve-m*_e+g*fe)*Oe,e[9]=(a*_e-r*ve-c*fe)*Oe,e[10]=(L*ne-B*Y+V*W)*Oe,e[11]=(b*Y-x*ne-A*W)*Oe,e[12]=(m*Pe-h*Me-_*fe)*Oe,e[13]=(r*Me-a*Pe+l*fe)*Oe,e[14]=(B*J-L*$-q*W)*Oe,e[15]=(x*$-b*J+I*W)*Oe,e):null},u.isChar=me,u.isMapboxURL=Jr,u.keysDifference=function(e,t){var r=[];for(var a in e)a in t||r.push(a);return r},u.makeRequest=po,u.mapObject=mr,u.mercatorXfromLng=pp,u.mercatorYfromLat=hp,u.mercatorZfromAltitude=fp,u.mul=Zu,u.multiply=Cr,u.mvt=Ha,u.nextPowerOfTwo=function(e){return e<=1?1:Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},u.normalize=function(e,t){var r=t[0],a=t[1],l=t[2],c=r*r+a*a+l*l;return c>0&&(c=1/Math.sqrt(c)),e[0]=t[0]*c,e[1]=t[1]*c,e[2]=t[2]*c,e},u.number=jt,u.offscreenCanvasSupported=Fo,u.ortho=function(e,t,r,a,l,c,h){var m=1/(t-r),_=1/(a-l),g=1/(c-h);return e[0]=-2*m,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*_,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*g,e[11]=0,e[12]=(t+r)*m,e[13]=(l+a)*_,e[14]=(h+c)*g,e[15]=1,e},u.parseGlyphPBF=function(e){return new tu(e).readFields(Vh,[])},u.pbf=tu,u.performSymbolLayout=function(e,t,r,a,l,c,h){e.createArrays(),e.tilePixelRatio=8192/(512*e.overscaling),e.compareText={},e.iconsNeedLinear=!1;var m=e.layers[0].layout,_=e.layers[0]._unevaluatedLayout._values,g={};if(e.textSizeData.kind==="composite"){var x=e.textSizeData,b=x.maxZoom;g.compositeTextSizes=[_["text-size"].possiblyEvaluate(new Je(x.minZoom),h),_["text-size"].possiblyEvaluate(new Je(b),h)]}if(e.iconSizeData.kind==="composite"){var I=e.iconSizeData,A=I.maxZoom;g.compositeIconSizes=[_["icon-size"].possiblyEvaluate(new Je(I.minZoom),h),_["icon-size"].possiblyEvaluate(new Je(A),h)]}g.layoutTextSize=_["text-size"].possiblyEvaluate(new Je(e.zoom+1),h),g.layoutIconSize=_["icon-size"].possiblyEvaluate(new Je(e.zoom+1),h),g.textMaxSize=_["text-size"].possiblyEvaluate(new Je(18));for(var L=24*m.get("text-line-height"),B=m.get("text-rotation-alignment")==="map"&&m.get("symbol-placement")!=="point",q=m.get("text-keep-upright"),V=m.get("text-size"),W=function(){var $=Y[J],ne=m.get("text-font").evaluate($,{},h).join(","),ue=V.evaluate($,{},h),fe=g.layoutTextSize.evaluate($,{},h),Pe=g.layoutIconSize.evaluate($,{},h),_e={horizontal:{},vertical:void 0},Me=$.text,ve=[0,0];if(Me){var Xe=Me.toString(),Oe=24*m.get("text-letter-spacing").evaluate($,{},h),Ae=function(Ye){for(var vt=0,ft=Ye;vt<ft.length;vt+=1)if(ot=ft[vt].charCodeAt(0),me.Arabic(ot)||me["Arabic Supplement"](ot)||me["Arabic Extended-A"](ot)||me["Arabic Presentation Forms-A"](ot)||me["Arabic Presentation Forms-B"](ot))return!1;var ot;return!0}(Xe)?Oe:0,Ke=m.get("text-anchor").evaluate($,{},h),qe=m.get("text-variable-anchor");if(!qe){var it=m.get("text-radial-offset").evaluate($,{},h);ve=it?tp(Ke,[24*it,nc]):m.get("text-offset").evaluate($,{},h).map(function(Ye){return 24*Ye})}var De=B?"center":m.get("text-justify").evaluate($,{},h),at=m.get("symbol-placement"),At=at==="point"?24*m.get("text-max-width").evaluate($,{},h):0,Dt=function(){e.allowVerticalPlacement&&Fs(Xe)&&(_e.vertical=nu(Me,t,r,l,ne,At,L,Ke,"left",Ae,ve,si.vertical,!0,at,fe,ue))};if(!B&&qe){for(var Ct=De==="auto"?qe.map(function(Ye){return oc(Ye)}):[De],zt=!1,Lt=0;Lt<Ct.length;Lt++){var Yt=Ct[Lt];if(!_e.horizontal[Yt])if(zt)_e.horizontal[Yt]=_e.horizontal[0];else{var Qt=nu(Me,t,r,l,ne,At,L,"center",Yt,Ae,ve,si.horizontal,!1,at,fe,ue);Qt&&(_e.horizontal[Yt]=Qt,zt=Qt.positionedLines.length===1)}}Dt()}else{De==="auto"&&(De=oc(Ke));var Tr=nu(Me,t,r,l,ne,At,L,Ke,De,Ae,ve,si.horizontal,!1,at,fe,ue);Tr&&(_e.horizontal[De]=Tr),Dt(),Fs(Xe)&&B&&q&&(_e.vertical=nu(Me,t,r,l,ne,At,L,Ke,De,Ae,ve,si.vertical,!1,at,fe,ue))}}var or=void 0,Ir=!1;if($.icon&&$.icon.name){var Ut=a[$.icon.name];Ut&&(or=function(Ye,vt,ft){var ot=rc(ft),Mr=vt[0]-Ye.displaySize[0]*ot.horizontalAlign,fr=vt[1]-Ye.displaySize[1]*ot.verticalAlign;return{image:Ye,top:fr,bottom:fr+Ye.displaySize[1],left:Mr,right:Mr+Ye.displaySize[0]}}(l[$.icon.name],m.get("icon-offset").evaluate($,{},h),m.get("icon-anchor").evaluate($,{},h)),Ir=Ut.sdf,e.sdfIcons===void 0?e.sdfIcons=Ut.sdf:e.sdfIcons!==Ut.sdf&&kt("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Ut.pixelRatio!==e.pixelRatio||m.get("icon-rotate").constantOr(1)!==0)&&(e.iconsNeedLinear=!0))}var ar=ip(_e.horizontal)||_e.vertical;e.iconsInText=!!ar&&ar.iconsInText,(ar||or)&&function(Ye,vt,ft,ot,Mr,fr,St,Zt,dr,st,dn){var li=fr.textMaxSize.evaluate(vt,{});li===void 0&&(li=St);var mn,Vt=Ye.layers[0].layout,yn=Vt.get("icon-offset").evaluate(vt,{},dn),Mi=ip(ft.horizontal),as=St/24,da=Ye.tilePixelRatio*as,ss=Ye.tilePixelRatio*li/24,Qn=Ye.tilePixelRatio*Zt,ls=Ye.tilePixelRatio*Vt.get("symbol-spacing"),du=Vt.get("text-padding")*Ye.tilePixelRatio,us=Vt.get("icon-padding")*Ye.tilePixelRatio,ol=Vt.get("text-max-angle")/180*Math.PI,mu=Vt.get("text-rotation-alignment")==="map"&&Vt.get("symbol-placement")!=="point",yu=Vt.get("icon-rotation-alignment")==="map"&&Vt.get("symbol-placement")!=="point",$n=Vt.get("symbol-placement"),al=ls/2,cs=Vt.get("icon-text-fit");ot&&cs!=="none"&&(Ye.allowVerticalPlacement&&ft.vertical&&(mn=Gc(ot,ft.vertical,cs,Vt.get("icon-text-fit-padding"),yn,as)),Mi&&(ot=Gc(ot,Mi,cs,Vt.get("icon-text-fit-padding"),yn,as)));var Po=function(pf,dl){dl.x<0||dl.x>=8192||dl.y<0||dl.y>=8192||function(Nt,Xi,hf,Co,dc,xp,wu,_n,Su,ml,Tu,Iu,mc,bp,yl,wp,Sp,Tp,Ip,Ep,ui,Eu,Ap,gn,ff){var zp,ya,ms,ys,_s,gs=Nt.addToLineVertexArray(Xi,hf),Pp=0,Cp=0,kp=0,Mp=0,yc=-1,_c=-1,eo={},Dp=D(""),gc=0,vc=0;if(_n._unevaluatedLayout.getValue("text-radial-offset")===void 0?(gc=(zp=_n.layout.get("text-offset").evaluate(ui,{},gn).map(function(gl){return 24*gl}))[0],vc=zp[1]):(gc=24*_n.layout.get("text-radial-offset").evaluate(ui,{},gn),vc=nc),Nt.allowVerticalPlacement&&Co.vertical){var Lp=_n.layout.get("text-rotate").evaluate(ui,{},gn)+90;ys=new uu(Su,Xi,ml,Tu,Iu,Co.vertical,mc,bp,yl,Lp),wu&&(_s=new uu(Su,Xi,ml,Tu,Iu,wu,Sp,Tp,yl,Lp))}if(dc){var xc=_n.layout.get("icon-rotate").evaluate(ui,{}),Bp=_n.layout.get("icon-text-fit")!=="none",Rp=$c(dc,xc,Ap,Bp),bc=wu?$c(wu,xc,Ap,Bp):void 0;ms=new uu(Su,Xi,ml,Tu,Iu,dc,Sp,Tp,!1,xc),Pp=4*Rp.length;var Op=Nt.iconSizeData,_l=null;Op.kind==="source"?(_l=[128*_n.layout.get("icon-size").evaluate(ui,{})])[0]>32640&&kt(Nt.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):Op.kind==="composite"&&((_l=[128*Eu.compositeIconSizes[0].evaluate(ui,{},gn),128*Eu.compositeIconSizes[1].evaluate(ui,{},gn)])[0]>32640||_l[1]>32640)&&kt(Nt.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),Nt.addSymbols(Nt.icon,Rp,_l,Ep,Ip,ui,!1,Xi,gs.lineStartIndex,gs.lineLength,-1,gn),yc=Nt.icon.placedSymbolArray.length-1,bc&&(Cp=4*bc.length,Nt.addSymbols(Nt.icon,bc,_l,Ep,Ip,ui,si.vertical,Xi,gs.lineStartIndex,gs.lineLength,-1,gn),_c=Nt.icon.placedSymbolArray.length-1)}for(var Fp in Co.horizontal){var Au=Co.horizontal[Fp];if(!ya){Dp=D(Au.text);var df=_n.layout.get("text-rotate").evaluate(ui,{},gn);ya=new uu(Su,Xi,ml,Tu,Iu,Au,mc,bp,yl,df)}var Up=Au.positionedLines.length===1;if(kp+=rp(Nt,Xi,Au,xp,_n,yl,ui,wp,gs,Co.vertical?si.horizontal:si.horizontalOnly,Up?Object.keys(Co.horizontal):[Fp],eo,yc,Eu,gn),Up)break}Co.vertical&&(Mp+=rp(Nt,Xi,Co.vertical,xp,_n,yl,ui,wp,gs,si.vertical,["vertical"],eo,_c,Eu,gn));var mf=ya?ya.boxStartIndex:Nt.collisionBoxArray.length,yf=ya?ya.boxEndIndex:Nt.collisionBoxArray.length,_f=ys?ys.boxStartIndex:Nt.collisionBoxArray.length,gf=ys?ys.boxEndIndex:Nt.collisionBoxArray.length,vf=ms?ms.boxStartIndex:Nt.collisionBoxArray.length,xf=ms?ms.boxEndIndex:Nt.collisionBoxArray.length,bf=_s?_s.boxStartIndex:Nt.collisionBoxArray.length,wf=_s?_s.boxEndIndex:Nt.collisionBoxArray.length,vn=-1,zu=function(gl,Np){return gl&&gl.circleDiameter?Math.max(gl.circleDiameter,Np):Np};vn=zu(ya,vn),vn=zu(ys,vn),vn=zu(ms,vn);var Vp=(vn=zu(_s,vn))>-1?1:0;Vp&&(vn*=ff/24),Nt.glyphOffsetArray.length>=mt.MAX_GLYPHS&&kt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),ui.sortKey!==void 0&&Nt.addToSortKeyRanges(Nt.symbolInstances.length,ui.sortKey),Nt.symbolInstances.emplaceBack(Xi.x,Xi.y,eo.right>=0?eo.right:-1,eo.center>=0?eo.center:-1,eo.left>=0?eo.left:-1,eo.vertical||-1,yc,_c,Dp,mf,yf,_f,gf,vf,xf,bf,wf,ml,kp,Mp,Pp,Cp,Vp,0,mc,gc,vc,vn)}(Ye,dl,pf,ft,ot,Mr,mn,Ye.layers[0],Ye.collisionBoxArray,vt.index,vt.sourceLayerIndex,Ye.index,da,du,mu,dr,Qn,us,yu,yn,vt,fr,st,dn,St)};if($n==="line")for(var ps=0,_u=Qc(vt.geometry,0,0,8192,8192);ps<_u.length;ps+=1)for(var gu=_u[ps],sl=0,ll=Wh(gu,ls,ol,ft.vertical||Mi,ot,24,ss,Ye.overscaling,8192);sl<ll.length;sl+=1){var vu=ll[sl];Mi&&Yh(Ye,Mi.text,al,vu)||Po(gu,vu)}else if($n==="line-center")for(var ul=0,cl=vt.geometry;ul<cl.length;ul+=1){var pl=cl[ul];if(pl.length>1){var xu=Xh(pl,ol,ft.vertical||Mi,ot,24,ss);xu&&Po(pl,xu)}}else if(vt.type==="Polygon")for(var hs=0,bu=Yu(vt.geometry,0);hs<bu.length;hs+=1){var fs=bu[hs],hl=Hh(fs,16);Po(fs[0],new $a(hl.x,hl.y,0))}else if(vt.type==="LineString")for(var ma=0,fl=vt.geometry;ma<fl.length;ma+=1){var ds=fl[ma];Po(ds,new $a(ds[0].x,ds[0].y,0))}else if(vt.type==="Point")for(var pc=0,gp=vt.geometry;pc<gp.length;pc+=1)for(var hc=0,vp=gp[pc];hc<vp.length;hc+=1){var fc=vp[hc];Po([fc],new $a(fc.x,fc.y,0))}}(e,$,_e,or,a,g,fe,Pe,ve,Ir,h)},J=0,Y=e.features;J<Y.length;J+=1)W();c&&e.generateCollisionDebugBuffers()},u.perspective=function(e,t,r,a,l){var c,h=1/Math.tan(t/2);return e[0]=h/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=h,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,l!=null&&l!==1/0?(e[10]=(l+a)*(c=1/(a-l)),e[14]=2*l*a*c):(e[10]=-1,e[14]=-2*a),e},u.pick=function(e,t){for(var r={},a=0;a<t.length;a++){var l=t[a];l in e&&(r[l]=e[l])}return r},u.plugin=Xr,u.polygonIntersectsPolygon=pn,u.postMapLoadEvent=Bo,u.postTurnstileEvent=ba,u.potpack=Nc,u.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],u.register=Te,u.registerForPluginStateChange=function(e){return e({pluginStatus:Ur,pluginURL:Ni}),Vs.on("pluginStateChange",e),e},u.renderColorRamp=wc,u.rotate=function(e,t,r){var a=t[0],l=t[1],c=t[2],h=t[3],m=Math.sin(r),_=Math.cos(r);return e[0]=a*_+c*m,e[1]=l*_+h*m,e[2]=a*-m+c*_,e[3]=l*-m+h*_,e},u.rotateX=function(e,t,r){var a=Math.sin(r),l=Math.cos(r),c=t[4],h=t[5],m=t[6],_=t[7],g=t[8],x=t[9],b=t[10],I=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=c*l+g*a,e[5]=h*l+x*a,e[6]=m*l+b*a,e[7]=_*l+I*a,e[8]=g*l-c*a,e[9]=x*l-h*a,e[10]=b*l-m*a,e[11]=I*l-_*a,e},u.rotateZ=function(e,t,r){var a=Math.sin(r),l=Math.cos(r),c=t[0],h=t[1],m=t[2],_=t[3],g=t[4],x=t[5],b=t[6],I=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=c*l+g*a,e[1]=h*l+x*a,e[2]=m*l+b*a,e[3]=_*l+I*a,e[4]=g*l-c*a,e[5]=x*l-h*a,e[6]=b*l-m*a,e[7]=I*l-_*a,e},u.scale=function(e,t,r){var a=r[0],l=r[1],c=r[2];return e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e[3]=t[3]*a,e[4]=t[4]*l,e[5]=t[5]*l,e[6]=t[6]*l,e[7]=t[7]*l,e[8]=t[8]*c,e[9]=t[9]*c,e[10]=t[10]*c,e[11]=t[11]*c,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},u.scale$1=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e},u.scale$2=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e},u.setCacheLimits=function(e,t){uo=e,wa=t},u.setRTLTextPlugin=function(e,t,r){if(r===void 0&&(r=!1),Ur==="deferred"||Ur==="loading"||Ur==="loaded")throw new Error("setRTLTextPlugin cannot be called multiple times.");Ni=Ri.resolveURL(e),Ur="deferred",Ua=t,ra(),r||vi()},u.sphericalToCartesian=function(e){var t=e[0],r=e[1],a=e[2];return r+=90,r*=Math.PI/180,a*=Math.PI/180,{x:t*Math.cos(r)*Math.sin(a),y:t*Math.sin(r)*Math.sin(a),z:t*Math.cos(a)}},u.sqrLen=function(e){var t=e[0],r=e[1];return t*t+r*r},u.styleSpec=P,u.sub=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e},u.symbolSize=Gh,u.transformMat3=function(e,t,r){var a=t[0],l=t[1],c=t[2];return e[0]=a*r[0]+l*r[3]+c*r[6],e[1]=a*r[1]+l*r[4]+c*r[7],e[2]=a*r[2]+l*r[5]+c*r[8],e},u.transformMat4=Ga,u.translate=function(e,t,r){var a,l,c,h,m,_,g,x,b,I,A,L,B=r[0],q=r[1],V=r[2];return t===e?(e[12]=t[0]*B+t[4]*q+t[8]*V+t[12],e[13]=t[1]*B+t[5]*q+t[9]*V+t[13],e[14]=t[2]*B+t[6]*q+t[10]*V+t[14],e[15]=t[3]*B+t[7]*q+t[11]*V+t[15]):(l=t[1],c=t[2],h=t[3],m=t[4],_=t[5],g=t[6],x=t[7],b=t[8],I=t[9],A=t[10],L=t[11],e[0]=a=t[0],e[1]=l,e[2]=c,e[3]=h,e[4]=m,e[5]=_,e[6]=g,e[7]=x,e[8]=b,e[9]=I,e[10]=A,e[11]=L,e[12]=a*B+m*q+b*V+t[12],e[13]=l*B+_*q+I*V+t[13],e[14]=c*B+g*q+A*V+t[14],e[15]=h*B+x*q+L*V+t[15]),e},u.triggerPluginCompletionEvent=Kl,u.uniqueId=to,u.validateCustomStyleLayer=function(e){var t=[],r=e.id;return r===void 0&&t.push({message:"layers."+r+': missing required property "id"'}),e.render===void 0&&t.push({message:"layers."+r+': missing required method "render"'}),e.renderingMode&&e.renderingMode!=="2d"&&e.renderingMode!=="3d"&&t.push({message:"layers."+r+': property "renderingMode" must be either "2d" or "3d"'}),t},u.validateLight=ju,u.validateStyle=Qo,u.values=function(e){var t=[];for(var r in e)t.push(e[r]);return t},u.vectorTile=Ha,u.version="1.13.3",u.warnOnce=kt,u.webpSupported=Ii,u.window=ze,u.wrap=Mo}),ko(["./shared"],function(u){function qr(w){var T=typeof w;if(T==="number"||T==="boolean"||T==="string"||w==null)return JSON.stringify(w);if(Array.isArray(w)){for(var E="[",M=0,O=w;M<O.length;M+=1)E+=qr(O[M])+",";return E+"]"}for(var Z=Object.keys(w).sort(),X="{",P=0;P<Z.length;P++)X+=JSON.stringify(Z[P])+":"+qr(w[Z[P]])+",";return X+"}"}function ce(w){for(var T="",E=0,M=u.refProperties;E<M.length;E+=1)T+="/"+qr(w[M[E]]);return T}var $t=function(w){this.keyCache={},w&&this.replace(w)};$t.prototype.replace=function(w){this._layerConfigs={},this._layers={},this.update(w,[])},$t.prototype.update=function(w,T){for(var E=this,M=0,O=w;M<O.length;M+=1){var Z=O[M];this._layerConfigs[Z.id]=Z;var X=this._layers[Z.id]=u.createStyleLayer(Z);X._featureFilter=u.featureFilter(X.filter),this.keyCache[Z.id]&&delete this.keyCache[Z.id]}for(var P=0,U=T;P<U.length;P+=1){var H=U[P];delete this.keyCache[H],delete this._layerConfigs[H],delete this._layers[H]}this.familiesBySource={};for(var ae=0,le=function(de,ye){for(var We={},ge=0;ge<de.length;ge++){var et=ye&&ye[de[ge].id]||ce(de[ge]);ye&&(ye[de[ge].id]=et);var _t=We[et];_t||(_t=We[et]=[]),_t.push(de[ge])}var He=[];for(var lt in We)He.push(We[lt]);return He}(u.values(this._layerConfigs),this.keyCache);ae<le.length;ae+=1){var re=le[ae].map(function(de){return E._layers[de.id]}),se=re[0];if(se.visibility!=="none"){var Ie=se.source||"",Se=this.familiesBySource[Ie];Se||(Se=this.familiesBySource[Ie]={});var ie=se.sourceLayer||"_geojsonTileLayer",xe=Se[ie];xe||(xe=Se[ie]=[]),xe.push(re)}}};var je=function(w){var T={},E=[];for(var M in w){var O=w[M],Z=T[M]={};for(var X in O){var P=O[+X];if(P&&P.bitmap.width!==0&&P.bitmap.height!==0){var U={x:0,y:0,w:P.bitmap.width+2,h:P.bitmap.height+2};E.push(U),Z[X]={rect:U,metrics:P.metrics}}}}var H=u.potpack(E),ae=new u.AlphaImage({width:H.w||1,height:H.h||1});for(var le in w){var re=w[le];for(var se in re){var Ie=re[+se];if(Ie&&Ie.bitmap.width!==0&&Ie.bitmap.height!==0){var Se=T[le][se].rect;u.AlphaImage.copy(Ie.bitmap,ae,{x:0,y:0},{x:Se.x+1,y:Se.y+1},Ie.bitmap)}}}this.image=ae,this.positions=T};u.register("GlyphAtlas",je);var Si=function(w){this.tileID=new u.OverscaledTileID(w.tileID.overscaledZ,w.tileID.wrap,w.tileID.canonical.z,w.tileID.canonical.x,w.tileID.canonical.y),this.uid=w.uid,this.zoom=w.zoom,this.pixelRatio=w.pixelRatio,this.tileSize=w.tileSize,this.source=w.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=w.showCollisionBoxes,this.collectResourceTiming=!!w.collectResourceTiming,this.returnDependencies=!!w.returnDependencies,this.promoteId=w.promoteId};function ze(w,T,E){for(var M=new u.EvaluationParameters(T),O=0,Z=w;O<Z.length;O+=1)Z[O].recalculate(M,E)}function xs(w,T){var E=u.getArrayBuffer(w.request,function(M,O,Z,X){M?T(M):O&&T(null,{vectorTile:new u.vectorTile.VectorTile(new u.pbf(O)),rawData:O,cacheControl:Z,expires:X})});return function(){E.cancel(),T()}}Si.prototype.parse=function(w,T,E,M,O){var Z=this;this.status="parsing",this.data=w,this.collisionBoxArray=new u.CollisionBoxArray;var X=new u.DictionaryCoder(Object.keys(w.layers).sort()),P=new u.FeatureIndex(this.tileID,this.promoteId);P.bucketLayerIDs=[];var U,H,ae,le,re={},se={featureIndex:P,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:E},Ie=T.familiesBySource[this.source];for(var Se in Ie){var ie=w.layers[Se];if(ie){ie.version===1&&u.warnOnce('Vector tile source "'+this.source+'" layer "'+Se+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var xe=X.encode(Se),de=[],ye=0;ye<ie.length;ye++){var We=ie.feature(ye),ge=P.getId(We,Se);de.push({feature:We,id:ge,index:ye,sourceLayerIndex:xe})}for(var et=0,_t=Ie[Se];et<_t.length;et+=1){var He=_t[et],lt=He[0];lt.minzoom&&this.zoom<Math.floor(lt.minzoom)||lt.maxzoom&&this.zoom>=lt.maxzoom||lt.visibility!=="none"&&(ze(He,this.zoom,E),(re[lt.id]=lt.createBucket({index:P.bucketLayerIDs.length,layers:He,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:xe,sourceID:this.source})).populate(de,se,this.tileID.canonical),P.bucketLayerIDs.push(He.map(function(dt){return dt.id})))}}}var rt=u.mapObject(se.glyphDependencies,function(dt){return Object.keys(dt).map(Number)});Object.keys(rt).length?M.send("getGlyphs",{uid:this.uid,stacks:rt},function(dt,Qe){U||(U=dt,H=Qe,Rt.call(Z))}):H={};var _r=Object.keys(se.iconDependencies);_r.length?M.send("getImages",{icons:_r,source:this.source,tileID:this.tileID,type:"icons"},function(dt,Qe){U||(U=dt,ae=Qe,Rt.call(Z))}):ae={};var pt=Object.keys(se.patternDependencies);function Rt(){if(U)return O(U);if(H&&ae&&le){var dt=new je(H),Qe=new u.ImageAtlas(ae,le);for(var ut in re){var Ar=re[ut];Ar instanceof u.SymbolBucket?(ze(Ar.layers,this.zoom,E),u.performSymbolLayout(Ar,H,dt.positions,ae,Qe.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Ar.hasPattern&&(Ar instanceof u.LineBucket||Ar instanceof u.FillBucket||Ar instanceof u.FillExtrusionBucket)&&(ze(Ar.layers,this.zoom,E),Ar.addFeatures(se,this.tileID.canonical,Qe.patternPositions))}this.status="done",O(null,{buckets:u.values(re).filter(function(Vo){return!Vo.isEmpty()}),featureIndex:P,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:dt.image,imageAtlas:Qe,glyphMap:this.returnDependencies?H:null,iconMap:this.returnDependencies?ae:null,glyphPositions:this.returnDependencies?dt.positions:null})}}pt.length?M.send("getImages",{icons:pt,source:this.source,tileID:this.tileID,type:"patterns"},function(dt,Qe){U||(U=dt,le=Qe,Rt.call(Z))}):le={},Rt.call(this)};var Hr=function(w,T,E,M){this.actor=w,this.layerIndex=T,this.availableImages=E,this.loadVectorData=M||xs,this.loading={},this.loaded={}};Hr.prototype.loadTile=function(w,T){var E=this,M=w.uid;this.loading||(this.loading={});var O=!!(w&&w.request&&w.request.collectResourceTiming)&&new u.RequestPerformance(w.request),Z=this.loading[M]=new Si(w);Z.abort=this.loadVectorData(w,function(X,P){if(delete E.loading[M],X||!P)return Z.status="done",E.loaded[M]=Z,T(X);var U=P.rawData,H={};P.expires&&(H.expires=P.expires),P.cacheControl&&(H.cacheControl=P.cacheControl);var ae={};if(O){var le=O.finish();le&&(ae.resourceTiming=JSON.parse(JSON.stringify(le)))}Z.vectorTile=P.vectorTile,Z.parse(P.vectorTile,E.layerIndex,E.availableImages,E.actor,function(re,se){if(re||!se)return T(re);T(null,u.extend({rawTileData:U.slice(0)},se,H,ae))}),E.loaded=E.loaded||{},E.loaded[M]=Z})},Hr.prototype.reloadTile=function(w,T){var E=this,M=this.loaded,O=w.uid,Z=this;if(M&&M[O]){var X=M[O];X.showCollisionBoxes=w.showCollisionBoxes;var P=function(U,H){var ae=X.reloadCallback;ae&&(delete X.reloadCallback,X.parse(X.vectorTile,Z.layerIndex,E.availableImages,Z.actor,ae)),T(U,H)};X.status==="parsing"?X.reloadCallback=P:X.status==="done"&&(X.vectorTile?X.parse(X.vectorTile,this.layerIndex,this.availableImages,this.actor,P):P())}},Hr.prototype.abortTile=function(w,T){var E=this.loading,M=w.uid;E&&E[M]&&E[M].abort&&(E[M].abort(),delete E[M]),T()},Hr.prototype.removeTile=function(w,T){var E=this.loaded,M=w.uid;E&&E[M]&&delete E[M],T()};var wn=u.window.ImageBitmap,Dr=function(){this.loaded={}};function Mo(w,T){if(w.length!==0){sr(w[0],T);for(var E=1;E<w.length;E++)sr(w[E],!T)}}function sr(w,T){for(var E=0,M=0,O=0,Z=w.length,X=Z-1;O<Z;X=O++){var P=(w[O][0]-w[X][0])*(w[X][1]+w[O][1]),U=E+P;M+=Math.abs(E)>=Math.abs(P)?E-U+P:P-U+E,E=U}E+M>=0!=!!T&&w.reverse()}Dr.prototype.loadTile=function(w,T){var E=w.uid,M=w.encoding,O=w.rawImageData,Z=wn&&O instanceof wn?this.getImageData(O):O,X=new u.DEMData(E,Z,M);this.loaded=this.loaded||{},this.loaded[E]=X,T(null,X)},Dr.prototype.getImageData=function(w){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(w.width,w.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=w.width,this.offscreenCanvas.height=w.height,this.offscreenCanvasContext.drawImage(w,0,0,w.width,w.height);var T=this.offscreenCanvasContext.getImageData(-1,-1,w.width+2,w.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new u.RGBAImage({width:T.width,height:T.height},T.data)},Dr.prototype.removeTile=function(w){var T=this.loaded,E=w.uid;T&&T[E]&&delete T[E]};var _a=u.vectorTile.VectorTileFeature.prototype.toGeoJSON,to=function(w){this._feature=w,this.extent=u.EXTENT,this.type=w.type,this.properties=w.tags,"id"in w&&!isNaN(w.id)&&(this.id=p
vendor: 3,051 bytes, line 1
1arseInt(w.id,10))};to.prototype.loadGeometry=function(){if(this._feature.type===1){for(var w=[],T=0,E=this._feature.geometry;T<E.length;T+=1){var M=E[T];w.push([new u.Point$1(M[0],M[1])])}return w}for(var O=[],Z=0,X=this._feature.geometry;Z<X.length;Z+=1){for(var P=[],U=0,H=X[Z];U<H.length;U+=1){var ae=H[U];P.push(new u.Point$1(ae[0],ae[1]))}O.push(P)}return O},to.prototype.toGeoJSON=function(w,T,E){return _a.call(this,w,T,E)};var Li=function(w){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=u.EXTENT,this.length=w.length,this._features=w};Li.prototype.feature=function(w){return new to(this._features[w])};var ro=u.vectorTile.VectorTileFeature,io=Sn;function Sn(w,T){this.options=T||{},this.features=w,this.length=w.length}function mr(w,T){this.id=typeof w.id=="number"?w.id:void 0,this.type=w.type,this.rawGeometry=w.type===1?[w.geometry]:w.geometry,this.properties=w.tags,this.extent=T||4096}Sn.prototype.feature=function(w){return new mr(this.features[w],this.options.extent)},mr.prototype.loadGeometry=function(){var w=this.rawGeometry;this.geometry=[];for(var T=0;T<w.length;T++){for(var E=w[T],M=[],O=0;O<E.length;O++)M.push(new u.Point$1(E[O][0],E[O][1]));this.geometry.push(M)}return this.geometry},mr.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var w=this.geometry,T=1/0,E=-1/0,M=1/0,O=-1/0,Z=0;Z<w.length;Z++)for(var X=w[Z],P=0;P<X.length;P++){var U=X[P];T=Math.min(T,U.x),E=Math.max(E,U.x),M=Math.min(M,U.y),O=Math.max(O,U.y)}return[T,M,E,O]},mr.prototype.toGeoJSON=ro.prototype.toGeoJSON;var Bi=no,ci=io;function no(w){var T=new u.pbf;return function(E,M){for(var O in E.layers)M.writeMessage(3,kt,E.layers[O])}(w,T),T.finish()}function kt(w,T){var E;T.writeVarintField(15,w.version||1),T.writeStringField(1,w.name||""),T.writeVarintField(5,w.extent||4096);var M={keys:[],values:[],keycache:{},valuecache:{}};for(E=0;E<w.length;E++)M.feature=w.feature(E),T.writeMessage(2,Lr,M);var O=M.keys;for(E=0;E<O.length;E++)T.writeStringField(3,O[E]);var Z=M.values;for(E=0;E<Z.length;E++)T.writeMessage(4,va,Z[E])}function Lr(w,T){var E=w.feature;E.id!==void 0&&T.writeVarintField(1,E.id),T.writeMessage(2,ga,w),T.writeVarintField(3,E.type),T.writeMessage(4,ao,E)}function ga(w,T){var E=w.feature,M=w.keys,O=w.values,Z=w.keycache,X=w.valuecache;for(var P in E.properties){var U=Z[P];U===void 0&&(M.push(P),Z[P]=U=M.length-1),T.writeVarint(U);var H=E.properties[P],ae=typeof H;ae!=="string"&&ae!=="boolean"&&ae!=="number"&&(H=JSON.stringify(H));var le=ae+":"+H,re=X[le];re===void 0&&(O.push(H),X[le]=re=O.length-1),T.writeVarint(re)}}function pi(w,T){return(T<<3)+(7&w)}function oo(w){return w<<1^w>>31}function ao(w,T){for(var E=w.loadGeometry(),M=w.type,O=0,Z=0,X=E.length,P=0;P<X;P++){var U=E[P],H=1;M===1&&(H=U.length),T.writeVarint(pi(1,H));for(var ae=M===3?U.length-1:U.length,le=0;le<ae;le++){le===1&&M!==1&&T.writeVarint(pi(2,ae-1));var re=U[le].x-O,se=U[le].y-Z;T.writeVarint(oo(re)),T.writeVarint(oo(se)),O+=re,Z+=se}M===3&&T.writeVarint(pi(7,1))}}function va(w,T){var E=typeof w;
vendor: 4,467 bytes, line 1
1E==="string"?T.writeStringField(1,w):E==="boolean"?T.writeBooleanField(7,w):E==="number"&&(w%1!=0?T.writeDoubleField(3,w):w<0?T.writeSVarintField(6,w):T.writeVarintField(5,w))}function Wi(w,T,E,M){hi(w,E,M),hi(T,2*E,2*M),hi(T,2*E+1,2*M+1)}function hi(w,T,E){var M=w[T];w[T]=w[E],w[E]=M}function Ti(w,T,E,M){var O=w-E,Z=T-M;return O*O+Z*Z}Bi.fromVectorTileJs=no,Bi.fromGeojsonVt=function(w,T){T=T||{};var E={};for(var M in w)E[M]=new io(w[M].features,T),E[M].name=M,E[M].version=T.version,E[M].extent=T.extent;return no({layers:E})},Bi.GeoJSONWrapper=ci;var Tn=function(w){return w[0]},In=function(w){return w[1]},Ki=function(w,T,E,M,O){T===void 0&&(T=Tn),E===void 0&&(E=In),M===void 0&&(M=64),O===void 0&&(O=Float64Array),this.nodeSize=M,this.points=w;for(var Z=w.length<65536?Uint16Array:Uint32Array,X=this.ids=new Z(w.length),P=this.coords=new O(2*w.length),U=0;U<w.length;U++)X[U]=U,P[2*U]=T(w[U]),P[2*U+1]=E(w[U]);(function H(ae,le,re,se,Ie,Se){if(!(Ie-se<=re)){var ie=se+Ie>>1;(function xe(de,ye,We,ge,et,_t){for(;et>ge;){if(et-ge>600){var He=et-ge+1,lt=We-ge+1,rt=Math.log(He),_r=.5*Math.exp(2*rt/3),pt=.5*Math.sqrt(rt*_r*(He-_r)/He)*(lt-He/2<0?-1:1);xe(de,ye,We,Math.max(ge,Math.floor(We-lt*_r/He+pt)),Math.min(et,Math.floor(We+(He-lt)*_r/He+pt)),_t)}var Rt=ye[2*We+_t],dt=ge,Qe=et;for(Wi(de,ye,ge,We),ye[2*et+_t]>Rt&&Wi(de,ye,ge,et);dt<Qe;){for(Wi(de,ye,dt,Qe),dt++,Qe--;ye[2*dt+_t]<Rt;)dt++;for(;ye[2*Qe+_t]>Rt;)Qe--}ye[2*ge+_t]===Rt?Wi(de,ye,ge,Qe):Wi(de,ye,++Qe,et),Qe<=We&&(ge=Qe+1),We<=Qe&&(et=Qe-1)}})(ae,le,ie,se,Ie,Se%2),H(ae,le,re,se,ie-1,Se+1),H(ae,le,re,ie+1,Ie,Se+1)}})(X,P,M,0,X.length-1,0)};Ki.prototype.range=function(w,T,E,M){return function(O,Z,X,P,U,H,ae){for(var le,re,se=[0,O.length-1,0],Ie=[];se.length;){var Se=se.pop(),ie=se.pop(),xe=se.pop();if(ie-xe<=ae)for(var de=xe;de<=ie;de++)re=Z[2*de+1],(le=Z[2*de])>=X&&le<=U&&re>=P&&re<=H&&Ie.push(O[de]);else{var ye=Math.floor((xe+ie)/2);re=Z[2*ye+1],(le=Z[2*ye])>=X&&le<=U&&re>=P&&re<=H&&Ie.push(O[ye]);var We=(Se+1)%2;(Se===0?X<=le:P<=re)&&(se.push(xe),se.push(ye-1),se.push(We)),(Se===0?U>=le:H>=re)&&(se.push(ye+1),se.push(ie),se.push(We))}}return Ie}(this.ids,this.coords,w,T,E,M,this.nodeSize)},Ki.prototype.within=function(w,T,E){return function(M,O,Z,X,P,U){for(var H=[0,M.length-1,0],ae=[],le=P*P;H.length;){var re=H.pop(),se=H.pop(),Ie=H.pop();if(se-Ie<=U)for(var Se=Ie;Se<=se;Se++)Ti(O[2*Se],O[2*Se+1],Z,X)<=le&&ae.push(M[Se]);else{var ie=Math.floor((Ie+se)/2),xe=O[2*ie],de=O[2*ie+1];Ti(xe,de,Z,X)<=le&&ae.push(M[ie]);var ye=(re+1)%2;(re===0?Z-P<=xe:X-P<=de)&&(H.push(Ie),H.push(ie-1),H.push(ye)),(re===0?Z+P>=xe:X+P>=de)&&(H.push(ie+1),H.push(se),H.push(ye))}}return ae}(this.ids,this.coords,w,T,E,this.nodeSize)};var bs={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(w){return w}},yr=function(w){this.options=Hi(Object.create(bs),w),this.trees=new Array(this.options.maxZoom+1)};function Ri(w,T,E,M,O){return{x:w,y:T,zoom:1/0,id:E,parentId:-1,numPoints:M,properties:O}}function yt(w,T){var E=w.geometry.coordinates,M=E[1];return{x:fi(E[0]),y:$e(M),zoom:1/0,index:T,parentId:-1}}function Ii(w){return{type:"Feature",id:w.id,properties:so(w),geometry:{type:"Point",coordinates:[(M=w.x,360*(M-.5)),(T=w.y,E=(180-360*T)*Math.PI/180,360*Math.atan(Math.exp(E))/Math.PI-90)]}};var T,E,M}function so(w){var T=w.numPoints,E=T>=1e4?Math.round(T/1e3)+"k":T>=1e3?Math.round(T/100)/10+"k":T;return Hi(Hi({},w.properties),{cluster:!0,cluster_id:w.id,point_count:T,point_count_abbreviated:E})}function fi(w){return w/360+.5}function $e(w){var T=Math.sin(w*Math.PI/180),E=.5-.25*Math.log((1+T)/(1-T))/Math.PI;return E<0?0:E>1?1:E}function Hi(w,T){for(var E in T)w[E]=T[E];return w}function Er(w){return w.x}function Jr(w){return w.y}function ws(w,T,E,M,O,Z){var X=O-E,P=Z-M;if(X!==0||P!==0){var U=((w-E)*X+(T-M)*P)/(X*X+P*P);U>1?(E=O,M=Z):U>0&&(E+=X*U,M+=P*U)}return(X=w-E)*X+(P=T-M)*P}function di(w,T,E,M){var O={id:w===void 0?null:w,type:T,geometry:E,tags:M,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(Z){var X=Z.geometry,P=Z.type;if(P==="Point"||P==="MultiPoint"||P==="LineString")Do(Z,X);else if(P==="Polygon"||P==="MultiLineString")for(var U=0;U<X.length;U++)Do(Z,X[U]);else if(P==="MultiPolygon")for(U=0;U<X.length;U++)for(var H=0;H<X[U].length;H++)Do(Z,X[U][H])}(O),O}function Do(w,T){for(var E=0;E<T.length;E+=3)w.minX=Math.min(w.minX,T[E]),w.minY=Math.min(w.minY,T[E+1]),w.maxX=Math.max(w.maxX,T[E]),w.maxY=M
vendor: 5,911 bytes, line 1
1ath.max(w.maxY,T[E+1])}function Yr(w,T,E,M){if(T.geometry){var O=T.geometry.coordinates,Z=T.geometry.type,X=Math.pow(E.tolerance/((1<<E.maxZoom)*E.extent),2),P=[],U=T.id;if(E.promoteId?U=T.properties[E.promoteId]:E.generateId&&(U=M||0),Z==="Point")En(O,P);else if(Z==="MultiPoint")for(var H=0;H<O.length;H++)En(O[H],P);else if(Z==="LineString")lo(O,P,X,!1);else if(Z==="MultiLineString"){if(E.lineMetrics){for(H=0;H<O.length;H++)lo(O[H],P=[],X,!1),w.push(di(U,"LineString",P,T.properties));return}Qr(O,P,X,!1)}else if(Z==="Polygon")Qr(O,P,X,!0);else{if(Z!=="MultiPolygon"){if(Z==="GeometryCollection"){for(H=0;H<T.geometry.geometries.length;H++)Yr(w,{id:U,geometry:T.geometry.geometries[H],properties:T.properties},E,M);return}throw new Error("Input data is not a valid GeoJSON object.")}for(H=0;H<O.length;H++){var ae=[];Qr(O[H],ae,X,!0),P.push(ae)}}w.push(di(U,Z,P,T.properties))}}function En(w,T){T.push($r(w[0])),T.push(An(w[1])),T.push(0)}function lo(w,T,E,M){for(var O,Z,X=0,P=0;P<w.length;P++){var U=$r(w[P][0]),H=An(w[P][1]);T.push(U),T.push(H),T.push(0),P>0&&(X+=M?(O*H-U*Z)/2:Math.sqrt(Math.pow(U-O,2)+Math.pow(H-Z,2))),O=U,Z=H}var ae=T.length-3;T[2]=1,function le(re,se,Ie,Se){for(var ie,xe=Se,de=Ie-se>>1,ye=Ie-se,We=re[se],ge=re[se+1],et=re[Ie],_t=re[Ie+1],He=se+3;He<Ie;He+=3){var lt=ws(re[He],re[He+1],We,ge,et,_t);if(lt>xe)ie=He,xe=lt;else if(lt===xe){var rt=Math.abs(He-de);rt<ye&&(ie=He,ye=rt)}}xe>Se&&(ie-se>3&&le(re,se,ie,Se),re[ie+2]=xe,Ie-ie>3&&le(re,ie,Ie,Se))}(T,0,ae,E),T[ae+2]=1,T.size=Math.abs(X),T.start=0,T.end=T.size}function Qr(w,T,E,M){for(var O=0;O<w.length;O++){var Z=[];lo(w[O],Z,E,M),T.push(Z)}}function $r(w){return w/360+.5}function An(w){var T=Math.sin(w*Math.PI/180),E=.5-.25*Math.log((1+T)/(1-T))/Math.PI;return E<0?0:E>1?1:E}function mi(w,T,E,M,O,Z,X,P){if(M/=T,Z>=(E/=T)&&X<M)return w;if(X<E||Z>=M)return null;for(var U=[],H=0;H<w.length;H++){var ae=w[H],le=ae.geometry,re=ae.type,se=O===0?ae.minX:ae.minY,Ie=O===0?ae.maxX:ae.maxY;if(se>=E&&Ie<M)U.push(ae);else if(!(Ie<E||se>=M)){var Se=[];if(re==="Point"||re==="MultiPoint")xa(le,Se,E,M,O);else if(re==="LineString")ba(le,Se,E,M,O,!1,P.lineMetrics);else if(re==="MultiLineString")Bo(le,Se,E,M,O,!1);else if(re==="Polygon")Bo(le,Se,E,M,O,!0);else if(re==="MultiPolygon")for(var ie=0;ie<le.length;ie++){var xe=[];Bo(le[ie],xe,E,M,O,!0),xe.length&&Se.push(xe)}if(Se.length){if(P.lineMetrics&&re==="LineString"){for(ie=0;ie<Se.length;ie++)U.push(di(ae.id,re,Se[ie],ae.tags));continue}re!=="LineString"&&re!=="MultiLineString"||(Se.length===1?(re="LineString",Se=Se[0]):re="MultiLineString"),re!=="Point"&&re!=="MultiPoint"||(re=Se.length===3?"Point":"MultiPoint"),U.push(di(ae.id,re,Se,ae.tags))}}}return U.length?U:null}function xa(w,T,E,M,O){for(var Z=0;Z<w.length;Z+=3){var X=w[Z+O];X>=E&&X<=M&&(T.push(w[Z]),T.push(w[Z+1]),T.push(w[Z+2]))}}function ba(w,T,E,M,O,Z,X){for(var P,U,H=Lo(w),ae=O===0?wa:co,le=w.start,re=0;re<w.length-3;re+=3){var se=w[re],Ie=w[re+1],Se=w[re+2],ie=w[re+3],xe=w[re+4],de=O===0?se:Ie,ye=O===0?ie:xe,We=!1;X&&(P=Math.sqrt(Math.pow(se-ie,2)+Math.pow(Ie-xe,2))),de<E?ye>E&&(U=ae(H,se,Ie,ie,xe,E),X&&(H.start=le+P*U)):de>M?ye<M&&(U=ae(H,se,Ie,ie,xe,M),X&&(H.start=le+P*U)):uo(H,se,Ie,Se),ye<E&&de>=E&&(U=ae(H,se,Ie,ie,xe,E),We=!0),ye>M&&de<=M&&(U=ae(H,se,Ie,ie,xe,M),We=!0),!Z&&We&&(X&&(H.end=le+P*U),T.push(H),H=Lo(w)),X&&(le+=P)}var ge=w.length-3;se=w[ge],Ie=w[ge+1],Se=w[ge+2],(de=O===0?se:Ie)>=E&&de<=M&&uo(H,se,Ie,Se),ge=H.length-3,Z&&ge>=3&&(H[ge]!==H[0]||H[ge+1]!==H[1])&&uo(H,H[0],H[1],H[2]),H.length&&T.push(H)}function Lo(w){var T=[];return T.size=w.size,T.start=w.start,T.end=w.end,T}function Bo(w,T,E,M,O,Z){for(var X=0;X<w.length;X++)ba(w[X],T,E,M,O,Z,!1)}function uo(w,T,E,M){w.push(T),w.push(E),w.push(M)}function wa(w,T,E,M,O,Z){var X=(Z-T)/(M-T);return w.push(Z),w.push(E+(O-E)*X),w.push(1),X}function co(w,T,E,M,O,Z){var X=(Z-E)/(O-E);return w.push(T+(M-T)*X),w.push(Z),w.push(1),X}function Ro(w,T){for(var E=[],M=0;M<w.length;M++){var O,Z=w[M],X=Z.type;if(X==="Point"||X==="MultiPoint"||X==="LineString")O=zn(Z.geometry,T);else if(X==="MultiLineString"||X==="Polygon"){O=[];for(var P=0;P<Z.geometry.length;P++)O.push(zn(Z.geometry[P],T))}else if(X==="MultiPolygon")for(O=[],P=0;P<Z.geometry.length;P++){for(var U=[],H=0;H<Z.geometry[P].length;H++)U.push(zn(Z.geometry[P][H],T));O.push(U)}E.push(di(Z.id,X,O,Z.tags))}return E}function zn(w,T){var E=[];E.size=w.size,w.start!==void 0&&(E.start=w.start,E.end=w.end);for(var M=0;M<w.length;M+=3)E.push(w[M]+T,w[M+1],w[M+2]);return E}function Oo(w,T){if(w.transformed)return w;var E,M,O,Z=1<<w.z,X=w.x,P=w.y;for(E=0;E<w.features.length;E++){var U=w.features[E],H=U.geometry,ae=U.type;if(U.geometry=[],ae===1)for(M=0;M<H.length;M+=2)U.geometry.push(Fo(H[M],H[M+1],T,Z,X,P));else for(M=0;M<H.length;M++){var le=[];for(O=0;O<H[M].length;O+=2)le.push(Fo(H[M][O],H[M][O+1],T,Z,X,P));U.geometry.push(le)}}return w.transformed=!0,w}function Fo(w,T,E,M,O,Z){return[Math.round(E*(w*M-O)),Math.round(E*(T*M-Z))]}function Sa(w,T,E,M,O){for(var Z=T===O.maxZoom?0:O.tolerance/((1<<T)*O.extent),X={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:E,y:M,z:T,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},P=0;P<w.length;P++){X.numFeatures++,Ta(X,w[P],Z,O);var U=w[P].minX,H=w[P].minY,ae=w[P].maxX,le=w[P].maxY;U<X.minX&&(X.minX=U),H<X.minY&&(X.minY=H),ae>X.maxX&&(X.maxX=ae),le>X.maxY&&(X.maxY=le)}return X}function Ta(w,T,E,M){var O=T.geometry,Z=T.type,X=[];if(Z==="Point"||Z==="MultiPoint")for(var P=0;P<O.length;P+=3)X.push(O[P]),X.push(O[P+1]),w.numPoints++,w.numSimplified++;else if(Z==="LineString")Pn(X,O,w,E,!1,!1);else if(Z==="MultiLineString"||Z==="Polygon")for(P=0;P<O.length;P++)Pn(X,O[P],w,E,Z==="Polygon",P===0);else if(Z==="MultiPolygon")for(var U=0;U<O.length;U++){var H=O[U];for(P=0;P<H.length;P++)Pn(X,H[P],w,E,!0,P===0)}if(X.length){var ae=T.tags||null;if(Z==="LineString"&&M.lineMetrics){for(var le in ae={}
vendor: 35,915 bytes, line 1
1,T.tags)ae[le]=T.tags[le];ae.mapbox_clip_start=O.start/O.size,ae.mapbox_clip_end=O.end/O.size}var re={geometry:X,type:Z==="Polygon"||Z==="MultiPolygon"?3:Z==="LineString"||Z==="MultiLineString"?2:1,tags:ae};T.id!==null&&(re.id=T.id),w.features.push(re)}}function Pn(w,T,E,M,O,Z){var X=M*M;if(M>0&&T.size<(O?X:M))E.numPoints+=T.length/3;else{for(var P=[],U=0;U<T.length;U+=3)(M===0||T[U+2]>X)&&(E.numSimplified++,P.push(T[U]),P.push(T[U+1])),E.numPoints++;O&&function(H,ae){for(var le=0,re=0,se=H.length,Ie=se-2;re<se;Ie=re,re+=2)le+=(H[re]-H[Ie])*(H[re+1]+H[Ie+1]);if(le>0===ae)for(re=0,se=H.length;re<se/2;re+=2){var Se=H[re],ie=H[re+1];H[re]=H[se-2-re],H[re+1]=H[se-1-re],H[se-2-re]=Se,H[se-1-re]=ie}}(P,Z),w.push(P)}}function Oi(w,T){var E=(T=this.options=function(O,Z){for(var X in Z)O[X]=Z[X];return O}(Object.create(this.options),T)).debug;if(E&&console.time("preprocess data"),T.maxZoom<0||T.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(T.promoteId&&T.generateId)throw new Error("promoteId and generateId cannot be used together.");var M=function(O,Z){var X=[];if(O.type==="FeatureCollection")for(var P=0;P<O.features.length;P++)Yr(X,O.features[P],Z,P);else Yr(X,O.type==="Feature"?O:{geometry:O},Z);return X}(w,T);this.tiles={},this.tileCoords=[],E&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",T.indexMaxZoom,T.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(M=function(O,Z){var X=Z.buffer/Z.extent,P=O,U=mi(O,1,-1-X,X,0,-1,2,Z),H=mi(O,1,1-X,2+X,0,-1,2,Z);return(U||H)&&(P=mi(O,1,-X,1+X,0,-1,2,Z)||[],U&&(P=Ro(U,1).concat(P)),H&&(P=P.concat(Ro(H,-1)))),P}(M,T)).length&&this.splitTile(M,0,0,0),E&&(M.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)))}function Fi(w,T,E){return 32*((1<<w)*E+T)+w}function po(w,T){var E=w.tileID.canonical;if(!this._geoJSONIndex)return T(null,null);var M=this._geoJSONIndex.getTile(E.z,E.x,E.y);if(!M)return T(null,null);var O=new Li(M.features),Z=Bi(O);Z.byteOffset===0&&Z.byteLength===Z.buffer.byteLength||(Z=new Uint8Array(Z)),T(null,{vectorTile:O,rawData:Z.buffer})}yr.prototype.load=function(w){var T=this.options,E=T.log,M=T.minZoom,O=T.maxZoom,Z=T.nodeSize;E&&console.time("total time");var X="prepare "+w.length+" points";E&&console.time(X),this.points=w;for(var P=[],U=0;U<w.length;U++)w[U].geometry&&P.push(yt(w[U],U));this.trees[O+1]=new Ki(P,Er,Jr,Z,Float32Array),E&&console.timeEnd(X);for(var H=O;H>=M;H--){var ae=+Date.now();P=this._cluster(P,H),this.trees[H]=new Ki(P,Er,Jr,Z,Float32Array),E&&console.log("z%d: %d clusters in %dms",H,P.length,+Date.now()-ae)}return E&&console.timeEnd("total time"),this},yr.prototype.getClusters=function(w,T){var E=((w[0]+180)%360+360)%360-180,M=Math.max(-90,Math.min(90,w[1])),O=w[2]===180?180:((w[2]+180)%360+360)%360-180,Z=Math.max(-90,Math.min(90,w[3]));if(w[2]-w[0]>=360)E=-180,O=180;else if(E>O){var X=this.getClusters([E,M,180,Z],T),P=this.getClusters([-180,M,O,Z],T);return X.concat(P)}for(var U=this.trees[this._limitZoom(T)],H=[],ae=0,le=U.range(fi(E),$e(Z),fi(O),$e(M));ae<le.length;ae+=1){var re=U.points[le[ae]];H.push(re.numPoints?Ii(re):this.points[re.index])}return H},yr.prototype.getChildren=function(w){var T=this._getOriginId(w),E=this._getOriginZoom(w),M="No cluster with the specified id.",O=this.trees[E];if(!O)throw new Error(M);var Z=O.points[T];if(!Z)throw new Error(M);for(var X=this.options.radius/(this.options.extent*Math.pow(2,E-1)),P=[],U=0,H=O.within(Z.x,Z.y,X);U<H.length;U+=1){var ae=O.points[H[U]];ae.parentId===w&&P.push(ae.numPoints?Ii(ae):this.points[ae.index])}if(P.length===0)throw new Error(M);return P},yr.prototype.getLeaves=function(w,T,E){var M=[];return this._appendLeaves(M,w,T=T||10,E=E||0,0),M},yr.prototype.getTile=function(w,T,E){var M=this.trees[this._limitZoom(w)],O=Math.pow(2,w),Z=this.options,X=Z.radius/Z.extent,P=(E-X)/O,U=(E+1+X)/O,H={features:[]};return this._addTileFeatures(M.range((T-X)/O,P,(T+1+X)/O,U),M.points,T,E,O,H),T===0&&this._addTileFeatures(M.range(1-X/O,P,1,U),M.points,O,E,O,H),T===O-1&&this._addTileFeatures(M.range(0,P,X/O,U),M.points,-1,E,O,H),H.features.length?H:null},yr.prototype.getClusterExpansionZoom=function(w){for(var T=this._getOriginZoom(w)-1;T<=this.options.maxZoom;){var E=this.getChildren(w);if(T++,E.length!==1)break;w=E[0].properties.cluster_id}return T},yr.prototype._appendLeaves=function(w,T,E,M,O){for(var Z=0,X=this.getChildren(T);Z<X.length;Z+=1){var P=X[Z],U=P.properties;if(U&&U.cluster?O+U.point_count<=M?O+=U.point_count:O=this._appendLeaves(w,U.cluster_id,E,M,O):O<M?O++:w.push(P),w.length===E)break}return O},yr.prototype._addTileFeatures=function(w,T,E,M,O,Z){for(var X=0,P=w;X<P.length;X+=1){var U=T[P[X]],H=U.numPoints,ae={type:1,geometry:[[Math.round(this.options.extent*(U.x*O-E)),Math.round(this.options.extent*(U.y*O-M))]],tags:H?so(U):this.points[U.index].properties},le=void 0;H?le=U.id:this.options.generateId?le=U.index:this.points[U.index].id&&(le=this.points[U.index].id),le!==void 0&&(ae.id=le),Z.features.push(ae)}},yr.prototype._limitZoom=function(w){return Math.max(this.options.minZoom,Math.min(+w,this.options.maxZoom+1))},yr.prototype._cluster=function(w,T){for(var E=[],M=this.options,O=M.reduce,Z=M.minPoints,X=M.radius/(M.extent*Math.pow(2,T)),P=0;P<w.length;P++){var U=w[P];if(!(U.zoom<=T)){U.zoom=T;for(var H=this.trees[T+1],ae=H.within(U.x,U.y,X),le=U.numPoints||1,re=le,se=0,Ie=ae;se<Ie.length;se+=1){var Se=H.points[Ie[se]];Se.zoom>T&&(re+=Se.numPoints||1)}if(re>=Z){for(var ie=U.x*le,xe=U.y*le,de=O&&le>1?this._map(U,!0):null,ye=(P<<5)+(T+1)+this.points.length,We=0,ge=ae;We<ge.length;We+=1){var et=H.points[ge[We]];if(!(et.zoom<=T)){et.zoom=T;var _t=et.numPoints||1;ie+=et.x*_t,xe+=et.y*_t,et.parentId=ye,O&&(de||(de=this._map(U,!0)),O(de,this._map(et)))}}U.parentId=ye,E.push(Ri(ie/re,xe/re,ye,re,de))}else if(E.push(U),re>1)for(var He=0,lt=ae;He<lt.length;He+=1){var rt=H.points[lt[He]];rt.zoom<=T||(rt.zoom=T,E.push(rt))}}}return E},yr.prototype._getOriginId=function(w){return w-this.points.length>>5},yr.prototype._getOriginZoom=function(w){return(w-this.points.length)%32},yr.prototype._map=function(w,T){if(w.numPoints)return T?Hi({},w.properties):w.properties;var E=this.points[w.index].properties,M=this.options.map(E);return T&&M===E?Hi({},M):M},Oi.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Oi.prototype.splitTile=function(w,T,E,M,O,Z,X){for(var P=[w,T,E,M],U=this.options,H=U.debug;P.length;){M=P.pop(),E=P.pop(),T=P.pop(),w=P.pop();var ae=1<<T,le=Fi(T,E,M),re=this.tiles[le];if(!re&&(H>1&&console.time("creation"),re=this.tiles[le]=Sa(w,T,E,M,U),this.tileCoords.push({z:T,x:E,y:M}),H)){H>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",T,E,M,re.numFeatures,re.numPoints,re.numSimplified),console.timeEnd("creation"));var se="z"+T;this.stats[se]=(this.stats[se]||0)+1,this.total++}if(re.source=w,O){if(T===U.maxZoom||T===O)continue;var Ie=1<<O-T;if(E!==Math.floor(Z/Ie)||M!==Math.floor(X/Ie))continue}else if(T===U.indexMaxZoom||re.numPoints<=U.indexMaxPoints)continue;if(re.source=null,w.length!==0){H>1&&console.time("clipping");var Se,ie,xe,de,ye,We,ge=.5*U.buffer/U.extent,et=.5-ge,_t=.5+ge,He=1+ge;Se=ie=xe=de=null,ye=mi(w,ae,E-ge,E+_t,0,re.minX,re.maxX,U),We=mi(w,ae,E+et,E+He,0,re.minX,re.maxX,U),w=null,ye&&(Se=mi(ye,ae,M-ge,M+_t,1,re.minY,re.maxY,U),ie=mi(ye,ae,M+et,M+He,1,re.minY,re.maxY,U),ye=null),We&&(xe=mi(We,ae,M-ge,M+_t,1,re.minY,re.maxY,U),de=mi(We,ae,M+et,M+He,1,re.minY,re.maxY,U),We=null),H>1&&console.timeEnd("clipping"),P.push(Se||[],T+1,2*E,2*M),P.push(ie||[],T+1,2*E,2*M+1),P.push(xe||[],T+1,2*E+1,2*M),P.push(de||[],T+1,2*E+1,2*M+1)}}},Oi.prototype.getTile=function(w,T,E){var M=this.options,O=M.extent,Z=M.debug;if(w<0||w>24)return null;var X=1<<w,P=Fi(w,T=(T%X+X)%X,E);if(this.tiles[P])return Oo(this.tiles[P],O);Z>1&&console.log("drilling down to z%d-%d-%d",w,T,E);for(var U,H=w,ae=T,le=E;!U&&H>0;)H--,ae=Math.floor(ae/2),le=Math.floor(le/2),U=this.tiles[Fi(H,ae,le)];return U&&U.source?(Z>1&&console.log("found parent tile z%d-%d-%d",H,ae,le),Z>1&&console.time("drilling down"),this.splitTile(U.source,H,ae,le,w,T,E),Z>1&&console.timeEnd("drilling down"),this.tiles[P]?Oo(this.tiles[P],O):null):null};var Uo=function(w){function T(E,M,O,Z){w.call(this,E,M,O,po),Z&&(this.loadGeoJSON=Z)}return w&&(T.__proto__=w),(T.prototype=Object.create(w&&w.prototype)).constructor=T,T.prototype.loadData=function(E,M){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=M,this._pendingLoadDataParams=E,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},T.prototype._loadData=function(){var E=this;if(this._pendingCallback&&this._pendingLoadDataParams){var M=this._pendingCallback,O=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var Z=!!(O&&O.request&&O.request.collectResourceTiming)&&new u.RequestPerformance(O.request);this.loadGeoJSON(O,function(X,P){if(X||!P)return M(X);if(typeof P!="object")return M(new Error("Input data given to '"+O.source+"' is not a valid GeoJSON object."));(function re(se,Ie){var Se,ie=se&&se.type;if(ie==="FeatureCollection")for(Se=0;Se<se.features.length;Se++)re(se.features[Se],Ie);else if(ie==="GeometryCollection")for(Se=0;Se<se.geometries.length;Se++)re(se.geometries[Se],Ie);else if(ie==="Feature")re(se.geometry,Ie);else if(ie==="Polygon")Mo(se.coordinates,Ie);else if(ie==="MultiPolygon")for(Se=0;Se<se.coordinates.length;Se++)Mo(se.coordinates[Se],Ie);return se})(P,!0);try{if(O.filter){var U=u.createExpression(O.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(U.result==="error")throw new Error(U.value.map(function(re){return re.key+": "+re.message}).join(", "));var H=P.features.filter(function(re){return U.value.evaluate({zoom:0},re)});P={type:"FeatureCollection",features:H}}E._geoJSONIndex=O.cluster?new yr(function(re){var se=re.superclusterOptions,Ie=re.clusterProperties;if(!Ie||!se)return se;for(var Se={},ie={},xe={accumulated:null,zoom:0},de={properties:null},ye=Object.keys(Ie),We=0,ge=ye;We<ge.length;We+=1){var et=ge[We],_t=Ie[et],He=_t[0],lt=u.createExpression(_t[1]),rt=u.createExpression(typeof He=="string"?[He,["accumulated"],["get",et]]:He);Se[et]=lt.value,ie[et]=rt.value}return se.map=function(_r){de.properties=_r;for(var pt={},Rt=0,dt=ye;Rt<dt.length;Rt+=1){var Qe=dt[Rt];pt[Qe]=Se[Qe].evaluate(xe,de)}return pt},se.reduce=function(_r,pt){de.properties=pt;for(var Rt=0,dt=ye;Rt<dt.length;Rt+=1){var Qe=dt[Rt];xe.accumulated=_r[Qe],_r[Qe]=ie[Qe].evaluate(xe,de)}},se}(O)).load(P.features):function(re,se){return new Oi(re,se)}(P,O.geojsonVtOptions)}catch(re){return M(re)}E.loaded={};var ae={};if(Z){var le=Z.finish();le&&(ae.resourceTiming={},ae.resourceTiming[O.source]=JSON.parse(JSON.stringify(le)))}M(null,ae)})}},T.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},T.prototype.reloadTile=function(E,M){var O=this.loaded;return O&&O[E.uid]?w.prototype.reloadTile.call(this,E,M):this.loadTile(E,M)},T.prototype.loadGeoJSON=function(E,M){if(E.request)u.getJSON(E.request,M);else{if(typeof E.data!="string")return M(new Error("Input data given to '"+E.source+"' is not a valid GeoJSON object."));try{return M(null,JSON.parse(E.data))}catch{return M(new Error("Input data given to '"+E.source+"' is not a valid GeoJSON object."))}}},T.prototype.removeSource=function(E,M){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),M()},T.prototype.getClusterExpansionZoom=function(E,M){try{M(null,this._geoJSONIndex.getClusterExpansionZoom(E.clusterId))}catch(O){M(O)}},T.prototype.getClusterChildren=function(E,M){try{M(null,this._geoJSONIndex.getChildren(E.clusterId))}catch(O){M(O)}},T.prototype.getClusterLeaves=function(E,M){try{M(null,this._geoJSONIndex.getLeaves(E.clusterId,E.limit,E.offset))}catch(O){M(O)}},T}(Hr),Bt=function(w){var T=this;this.self=w,this.actor=new u.Actor(w,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:Hr,geojson:Uo},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(E,M){if(T.workerSourceTypes[E])throw new Error('Worker source with name "'+E+'" already registered.');T.workerSourceTypes[E]=M},this.self.registerRTLTextPlugin=function(E){if(u.plugin.isParsed())throw new Error("RTL text plugin already registered.");u.plugin.applyArabicShaping=E.applyArabicShaping,u.plugin.processBidirectionalText=E.processBidirectionalText,u.plugin.processStyledBidirectionalText=E.processStyledBidirectionalText}};return Bt.prototype.setReferrer=function(w,T){this.referrer=T},Bt.prototype.setImages=function(w,T,E){for(var M in this.availableImages[w]=T,this.workerSources[w]){var O=this.workerSources[w][M];for(var Z in O)O[Z].availableImages=T}E()},Bt.prototype.setLayers=function(w,T,E){this.getLayerIndex(w).replace(T),E()},Bt.prototype.updateLayers=function(w,T,E){this.getLayerIndex(w).update(T.layers,T.removedIds),E()},Bt.prototype.loadTile=function(w,T,E){this.getWorkerSource(w,T.type,T.source).loadTile(T,E)},Bt.prototype.loadDEMTile=function(w,T,E){this.getDEMWorkerSource(w,T.source).loadTile(T,E)},Bt.prototype.reloadTile=function(w,T,E){this.getWorkerSource(w,T.type,T.source).reloadTile(T,E)},Bt.prototype.abortTile=function(w,T,E){this.getWorkerSource(w,T.type,T.source).abortTile(T,E)},Bt.prototype.removeTile=function(w,T,E){this.getWorkerSource(w,T.type,T.source).removeTile(T,E)},Bt.prototype.removeDEMTile=function(w,T){this.getDEMWorkerSource(w,T.source).removeTile(T)},Bt.prototype.removeSource=function(w,T,E){if(this.workerSources[w]&&this.workerSources[w][T.type]&&this.workerSources[w][T.type][T.source]){var M=this.workerSources[w][T.type][T.source];delete this.workerSources[w][T.type][T.source],M.removeSource!==void 0?M.removeSource(T,E):E()}},Bt.prototype.loadWorkerSource=function(w,T,E){try{this.self.importScripts(T.url),E()}catch(M){E(M.toString())}},Bt.prototype.syncRTLPluginState=function(w,T,E){try{u.plugin.setState(T);var M=u.plugin.getPluginURL();if(u.plugin.isLoaded()&&!u.plugin.isParsed()&&M!=null){this.self.importScripts(M);var O=u.plugin.isParsed();E(O?void 0:new Error("RTL Text Plugin failed to import scripts from "+M),O)}}catch(Z){E(Z.toString())}},Bt.prototype.getAvailableImages=function(w){var T=this.availableImages[w];return T||(T=[]),T},Bt.prototype.getLayerIndex=function(w){var T=this.layerIndexes[w];return T||(T=this.layerIndexes[w]=new $t),T},Bt.prototype.getWorkerSource=function(w,T,E){var M=this;return this.workerSources[w]||(this.workerSources[w]={}),this.workerSources[w][T]||(this.workerSources[w][T]={}),this.workerSources[w][T][E]||(this.workerSources[w][T][E]=new this.workerSourceTypes[T]({send:function(O,Z,X){M.actor.send(O,Z,X,w)}},this.getLayerIndex(w),this.getAvailableImages(w))),this.workerSources[w][T][E]},Bt.prototype.getDEMWorkerSource=function(w,T){return this.demWorkerSources[w]||(this.demWorkerSources[w]={}),this.demWorkerSources[w][T]||(this.demWorkerSources[w][T]=new Dr),this.demWorkerSources[w][T]},Bt.prototype.enforceCacheSizeLimit=function(w,T){u.enforceCacheSizeLimit(T)},typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope&&(self.worker=new Bt(self)),Bt}),ko(["./shared"],function(u){var qr=u.createCommonjsModule(function(i){function o(p){return!n(p)}function n(p){return typeof window>"u"||typeof document>"u"?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var d,y,v=new Blob([""],{type:"text/javascript"}),S=URL.createObjectURL(v);try{y=new Worker(S),d=!0}catch{d=!1}return y&&y.terminate(),URL.revokeObjectURL(S),d}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var d=document.createElement("canvas");d.width=d.height=1;var y=d.getContext("2d");if(!y)return!1;var v=y.getImageData(0,0,1,1);return v&&v.width===d.width}()?(s[f=p&&p.failIfMajorPerformanceCaveat]===void 0&&(s[f]=function(d){var y=function(S){var z=document.createElement("canvas"),C=Object.create(o.webGLContextAttributes);return C.failIfMajorPerformanceCaveat=S,z.probablySupportsContext?z.probablySupportsContext("webgl",C)||z.probablySupportsContext("experimental-webgl",C):z.supportsContext?z.supportsContext("webgl",C)||z.supportsContext("experimental-webgl",C):z.getContext("webgl",C)||z.getContext("experimental-webgl",C)}(d);if(!y)return!1;var v=y.createShader(y.VERTEX_SHADER);return!(!v||y.isContextLost())&&(y.shaderSource(v,"void main() {}"),y.compileShader(v),y.getShaderParameter(v,y.COMPILE_STATUS)===!0)}(f)),s[f]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var f}i.exports?i.exports=o:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=o,window.mapboxgl.notSupportedReason=n);var s={};o.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),ce={create:function(i,o,n){var s=u.window.document.createElement(i);return o!==void 0&&(s.className=o),n&&n.appendChild(s),s},createNS:function(i,o){return u.window.document.createElementNS(i,o)}},$t=u.window.document&&u.window.document.documentElement.style;function je(i){if(!$t)return i[0];for(var o=0;o<i.length;o++)if(i[o]in $t)return i[o];return i[0]}var Si,ze=je(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);ce.disableDrag=function(){$t&&ze&&(Si=$t[ze],$t[ze]="none")},ce.enableDrag=function(){$t&&ze&&($t[ze]=Si)};var xs=je(["transform","WebkitTransform"]);ce.setTransform=function(i,o){i.style[xs]=o};var Hr=!1;try{var wn=Object.defineProperty({},"passive",{get:function(){Hr=!0}});u.window.addEventListener("test",wn,wn),u.window.removeEventListener("test",wn,wn)}catch{Hr=!1}ce.addEventListener=function(i,o,n,s){s===void 0&&(s={}),i.addEventListener(o,n,"passive"in s&&Hr?s:s.capture)},ce.removeEventListener=function(i,o,n,s){s===void 0&&(s={}),i.removeEventListener(o,n,"passive"in s&&Hr?s:s.capture)};var Dr=function(i){i.preventDefault(),i.stopPropagation(),u.window.removeEventListener("click",Dr,!0)};function Mo(i){var o=i.userImage;return!!(o&&o.render&&o.render())&&(i.data.replace(new Uint8Array(o.data.buffer)),!0)}ce.suppressClick=function(){u.window.addEventListener("click",Dr,!0),u.window.setTimeout(function(){u.window.removeEventListener("click",Dr,!0)},0)},ce.mousePos=function(i,o){var n=i.getBoundingClientRect();return new u.Point(o.clientX-n.left-i.clientLeft,o.clientY-n.top-i.clientTop)},ce.touchPos=function(i,o){for(var n=i.getBoundingClientRect(),s=[],p=0;p<o.length;p++)s.push(new u.Point(o[p].clientX-n.left-i.clientLeft,o[p].clientY-n.top-i.clientTop));return s},ce.mouseButton=function(i){return u.window.InstallTrigger!==void 0&&i.button===2&&i.ctrlKey&&u.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:i.button},ce.remove=function(i){i.parentNode&&i.parentNode.removeChild(i)};var sr=function(i){function o(){i.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new u.RGBAImage({width:1,height:1}),this.dirty=!0}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.isLoaded=function(){return this.loaded},o.prototype.setLoaded=function(n){if(this.loaded!==n&&(this.loaded=n,n)){for(var s=0,p=this.requestors;s<p.length;s+=1){var f=p[s];this._notify(f.ids,f.callback)}this.requestors=[]}},o.prototype.getImage=function(n){return this.images[n]},o.prototype.addImage=function(n,s){this._validate(n,s)&&(this.images[n]=s)},o.prototype._validate=function(n,s){var p=!0;return this._validateStretch(s.stretchX,s.data&&s.data.width)||(this.fire(new u.ErrorEvent(new Error('Image "'+n+'" has invalid "stretchX" value'))),p=!1),this._validateStretch(s.stretchY,s.data&&s.data.height)||(this.fire(new u.ErrorEvent(new Error('Image "'+n+'" has invalid "stretchY" value'))),p=!1),this._validateContent(s.content,s)||(this.fire(new u.ErrorEvent(new Error('Image "'+n+'" has invalid "content" value'))),p=!1),p},o.prototype._validateStretch=function(n,s){if(!n)return!0;for(var p=0,f=0,d=n;f<d.length;f+=1){var y=d[f];if(y[0]<p||y[1]<y[0]||s<y[1])return!1;p=y[1]}return!0},o.prototype._validateContent=function(n,s){return!(n&&(n.length!==4||n[0]<0||s.data.width<n[0]||n[1]<0||s.data.height<n[1]||n[2]<0||s.data.width<n[2]||n[3]<0||s.data.height<n[3]||n[2]<n[0]||n[3]<n[1]))},o.prototype.updateImage=function(n,s){s.version=this.images[n].version+1,this.images[n]=s,this.updatedImages[n]=!0},o.prototype.removeImage=function(n){var s=this.images[n];delete this.images[n],delete this.patterns[n],s.userImage&&s.userImage.onRemove&&s.userImage.onRemove()},o.prototype.listImages=function(){return Object.keys(this.images)},o.prototype.getImages=function(n,s){var p=!0;if(!this.isLoaded())for(var f=0,d=n;f<d.length;f+=1)this.images[d[f]]||(p=!1);this.isLoaded()||p?this._notify(n,s):this.requestors.push({ids:n,callback:s})},o.prototype._notify=function(n,s){for(var p={},f=0,d=n;f<d.length;f+=1){var y=d[f];this.images[y]||this.fire(new u.Event("styleimagemissing",{id:y}));var v=this.images[y];v?p[y]={data:v.data.clone(),pixelRatio:v.pixelRatio,sdf:v.sdf,version:v.version,stretchX:v.stretchX,stretchY:v.stretchY,content:v.content,hasRenderCallback:!!(v.userImage&&v.userImage.render)}:u.warnOnce('Image "'+y+'" 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.')}s(null,p)},o.prototype.getPixelSize=function(){var n=this.atlasImage;return{width:n.width,height:n.height}},o.prototype.getPattern=function(n){var s=this.patterns[n],p=this.getImage(n);if(!p)return null;if(s&&s.position.version===p.version)return s.position;if(s)s.position.version=p.version;else{var f={w:p.data.width+2,h:p.data.height+2,x:0,y:0},d=new u.ImagePosition(f,p);this.patterns[n]={bin:f,position:d}}return this._updatePatternAtlas(),this.patterns[n].position},o.prototype.bind=function(n){var s=n.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new u.Texture(n,this.atlasImage,s.RGBA),this.atlasTexture.bind(s.LINEAR,s.CLAMP_TO_EDGE)},o.prototype._updatePatternAtlas=function(){var n=[];for(var s in this.patterns)n.push(this.patterns[s].bin);var p=u.potpack(n),f=p.w,d=p.h,y=this.atlasImage;for(var v in y.resize({width:f||1,height:d||1}),this.patterns){var S=this.patterns[v].bin,z=S.x+1,C=S.y+1,k=this.images[v].data,F=k.width,R=k.height;u.RGBAImage.copy(k,y,{x:0,y:0},{x:z,y:C},{width:F,height:R}),u.RGBAImage.copy(k,y,{x:0,y:R-1},{x:z,y:C-1},{width:F,height:1}),u.RGBAImage.copy(k,y,{x:0,y:0},{x:z,y:C+R},{width:F,height:1}),u.RGBAImage.copy(k,y,{x:F-1,y:0},{x:z-1,y:C},{width:1,height:R}),u.RGBAImage.copy(k,y,{x:0,y:0},{x:z+F,y:C},{width:1,height:R})}this.dirty=!0},o.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},o.prototype.dispatchRenderCallbacks=function(n){for(var s=0,p=n;s<p.length;s+=1){var f=p[s];if(!this.callbackDispatchedThisFrame[f]){this.callbackDispatchedThisFrame[f]=!0;var d=this.images[f];Mo(d)&&this.updateImage(f,d)}}},o}(u.Evented),_a=ro,to=ro,Li=1e20;function ro(i,o,n,s,p,f){this.fontSize=i||24,this.buffer=o===void 0?3:o,this.cutoff=s||.25,this.fontFamily=p||"sans-serif",this.fontWeight=f||"normal",this.radius=n||8;var d=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=d,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(d*d),this.gridInner=new Float64Array(d*d),this.f=new Float64Array(d),this.d=new Float64Array(d),this.z=new Float64Array(d+1),this.v=new Int16Array(d),this.middle=Math.round(d/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function io(i,o,n,s,p,f,d){for(var y=0;y<o;y++){for(var v=0;v<n;v++)s[v]=i[v*o+y];for(Sn(s,p,f,d,n),v=0;v<n;v++)i[v*o+y]=p[v]}for(v=0;v<n;v++){for(y=0;y<o;y++)s[y]=i[v*o+y];for(Sn(s,p,f,d,o),y=0;y<o;y++)i[v*o+y]=Math.sqrt(p[y])}}function Sn(i,o,n,s,p){n[0]=0,s[0]=-Li,s[1]=+Li;for(var f=1,d=0;f<p;f++){for(var y=(i[f]+f*f-(i[n[d]]+n[d]*n[d]))/(2*f-2*n[d]);y<=s[d];)d--,y=(i[f]+f*f-(i[n[d]]+n[d]*n[d]))/(2*f-2*n[d]);n[++d]=f,s[d]=y,s[d+1]=+Li}for(f=0,d=0;f<p;f++){for(;s[d+1]<f;)d++;o[f]=(f-n[d])*(f-n[d])+i[n[d]]}}ro.prototype.draw=function(i){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(i,this.buffer,this.middle);for(var o=this.ctx.getImageData(0,0,this.size,this.size),n=new Uint8ClampedArray(this.size*this.size),s=0;s<this.size*this.size;s++){var p=o.data[4*s+3]/255;this.gridOuter[s]=p===1?0:p===0?Li:Math.pow(Math.max(0,.5-p),2),this.gridInner[s]=p===1?Li:p===0?0:Math.pow(Math.max(0,p-.5),2)}for(io(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),io(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),s=0;s<this.size*this.size;s++)n[s]=Math.max(0,Math.min(255,Math.round(255-255*((this.gridOuter[s]-this.gridInner[s])/this.radius+this.cutoff))));return n},_a.default=to;var mr=function(i,o){this.requestManager=i,this.localIdeographFontFamily=o,this.entries={}};mr.prototype.setURL=function(i){this.url=i},mr.prototype.getGlyphs=function(i,o){var n=this,s=[];for(var p in i)for(var f=0,d=i[p];f<d.length;f+=1)s.push({stack:p,id:d[f]});u.asyncAll(s,function(y,v){var S=y.stack,z=y.id,C=n.entries[S];C||(C=n.entries[S]={glyphs:{},requests:{},ranges:{}});var k=C.glyphs[z];if(k===void 0){if(k=n._tinySDF(C,S,z))return C.glyphs[z]=k,void v(null,{stack:S,id:z,glyph:k});var F=Math.floor(z/256);if(256*F>65535)v(new Error("glyphs > 65535 not supported"));else if(C.ranges[F])v(null,{stack:S,id:z,glyph:k});else{var R=C.requests[F];R||(R=C.requests[F]=[],mr.loadGlyphRange(S,F,n.url,n.requestManager,function(j,D){if(D){for(var N in D)n._doesCharSupportLocalGlyph(+N)||(C.glyphs[+N]=D[+N]);C.ranges[F]=!0}for(var G=0,K=R;G<K.length;G+=1)(0,K[G])(j,D);delete C.requests[F]})),R.push(function(j,D){j?v(j):D&&v(null,{stack:S,id:z,glyph:D[z]||null})})}}else v(null,{stack:S,id:z,glyph:k})},function(y,v){if(y)o(y);else if(v){for(var S={},z=0,C=v;z<C.length;z+=1){var k=C[z],F=k.stack,R=k.id,j=k.glyph;(S[F]||(S[F]={}))[R]=j&&{id:j.id,bitmap:j.bitmap.clone(),metrics:j.metrics}}o(null,S)}})},mr.prototype._doesCharSupportLocalGlyph=function(i){return!!this.localIdeographFontFamily&&(u.isChar["CJK Unified Ideographs"](i)||u.isChar["Hangul Syllables"](i)||u.isChar.Hiragana(i)||u.isChar.Katakana(i))},mr.prototype._tinySDF=function(i,o,n){var s=this.localIdeographFontFamily;if(s&&this._doesCharSupportLocalGlyph(n)){var p=i.tinySDF;if(!p){var f="400";/bold/i.test(o)?f="900":/medium/i.test(o)?f="500":/light/i.test(o)&&(f="200"),p=i.tinySDF=new mr.TinySDF(24,3,8,.25,s,f)}return{id:n,bitmap:new u.AlphaImage({width:30,height:30},p.draw(String.fromCharCode(n))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},mr.loadGlyphRange=function(i,o,n,s,p){var f=256*o,d=f+255,y=s.transformRequest(s.normalizeGlyphsURL(n).replace("{fontstack}",i).replace("{range}",f+"-"+d),u.ResourceType.Glyphs);u.getArrayBuffer(y,function(v,S){if(v)p(v);else if(S){for(var z={},C=0,k=u.parseGlyphPBF(S);C<k.length;C+=1){var F=k[C];z[F.id]=F}p(null,z)}})},mr.TinySDF=_a;var Bi=function(){this.specification=u.styleSpec.light.position};Bi.prototype.possiblyEvaluate=function(i,o){return u.sphericalToCartesian(i.expression.evaluate(o))},Bi.prototype.interpolate=function(i,o,n){return{x:u.number(i.x,o.x,n),y:u.number(i.y,o.y,n),z:u.number(i.z,o.z,n)}};var ci=new u.Properties({anchor:new u.DataConstantProperty(u.styleSpec.light.anchor),position:new Bi,color:new u.DataConstantProperty(u.styleSpec.light.color),intensity:new u.DataConstantProperty(u.styleSpec.light.intensity)}),no=function(i){function o(n){i.call(this),this._transitionable=new u.Transitionable(ci),this.setLight(n),this._transitioning=this._transitionable.untransitioned()}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getLight=function(){return this._transitionable.serialize()},o.prototype.setLight=function(n,s){if(s===void 0&&(s={}),!this._validate(u.validateLight,n,s))for(var p in n){var f=n[p];u.endsWith(p,"-transition")?this._transitionable.setTransition(p.slice(0,-11),f):this._transitionable.setValue(p,f)}},o.prototype.updateTransitions=function(n){this._transitioning=this._transitionable.transitioned(n,this._transitioning)},o.prototype.hasTransition=function(){return this._transitioning.hasTransition()},o.prototype.recalculate=function(n){this.properties=this._transitioning.possiblyEvaluate(n)},o.prototype._validate=function(n,s,p){return(!p||p.validate!==!1)&&u.emitValidationErrors(this,n.call(u.validateStyle,u.extend({value:s,style:{glyphs:!0,sprite:!0},styleSpec:u.styleSpec})))},o}(u.Evented),kt=function(i,o){this.width=i,this.height=o,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};kt.prototype.getDash=function(i,o){var n=i.join(",")+String(o);return this.dashEntry[n]||(this.dashEntry[n]=this.addDash(i,o)),this.dashEntry[n]},kt.prototype.getDashRanges=function(i,o,n){var s=[],p=i.length%2==1?-i[i.length-1]*n:0,f=i[0]*n,d=!0;s.push({left:p,right:f,isDash:d,zeroLength:i[0]===0});for(var y=i[0],v=1;v<i.length;v++){var S=i[v];s.push({left:p=y*n,right:f=(y+=S)*n,isDash:d=!d,zeroLength:S===0})}return s},kt.prototype.addRoundDash=function(i,o,n){for(var s=o/2,p=-n;p<=n;p++)for(var f=this.width*(this.nextRow+n+p),d=0,y=i[d],v=0;v<this.width;v++){v/y.right>1&&(y=i[++d]);var S=Math.abs(v-y.left),z=Math.abs(v-y.right),C=Math.min(S,z),k=void 0,F=p/n*(s+1);if(y.isDash){var R=s-Math.abs(F);k=Math.sqrt(C*C+R*R)}else k=s-Math.sqrt(C*C+F*F);this.data[f+v]=Math.max(0,Math.min(255,k+128))}},kt.prototype.addRegularDash=function(i){for(var o=i.length-1;o>=0;--o){var n=i[o],s=i[o+1];n.zeroLength?i.splice(o,1):s&&s.isDash===n.isDash&&(s.left=n.left,i.splice(o,1))}var p=i[0],f=i[i.length-1];p.isDash===f.isDash&&(p.left=f.left-this.width,f.right=p.right+this.width);for(var d=this.width*this.nextRow,y=0,v=i[y],S=0;S<this.width;S++){S/v.right>1&&(v=i[++y]);var z=Math.abs(S-v.left),C=Math.abs(S-v.right),k=Math.min(z,C);this.data[d+S]=Math.max(0,Math.min(255,(v.isDash?k:-k)+128))}},kt.prototype.addDash=function(i,o){var n=o?7:0,s=2*n+1;if(this.nextRow+s>this.height)return u.warnOnce("LineAtlas out of space"),null;for(var p=0,f=0;f<i.length;f++)p+=i[f];if(p!==0){var d=this.width/p,y=this.getDashRanges(i,this.width,d);o?this.addRoundDash(y,d,n):this.addRegularDash(y)}var v={y:(this.nextRow+n+.5)/this.height,height:2*n/this.height,width:p};return this.nextRow+=s,this.dirty=!0,v},kt.prototype.bind=function(i){var o=i.gl;this.texture?(o.bindTexture(o.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,o.texSubImage2D(o.TEXTURE_2D,0,0,0,this.width,this.height,o.ALPHA,o.UNSIGNED_BYTE,this.data))):(this.texture=o.createTexture(),o.bindTexture(o.TEXTURE_2D,this.texture),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.REPEAT),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.REPEAT),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texImage2D(o.TEXTURE_2D,0,o.ALPHA,this.width,this.height,0,o.ALPHA,o.UNSIGNED_BYTE,this.data))};var Lr=function i(o,n){this.workerPool=o,this.actors=[],this.currentActor=0,this.id=u.uniqueId();for(var s=this.workerPool.acquire(this.id),p=0;p<s.length;p++){var f=new i.Actor(s[p],n,this.id);f.name="Worker "+p,this.actors.push(f)}};function ga(i,o,n){var s=function(p,f){if(p)return n(p);if(f){var d=u.pick(u.extend(f,i),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);f.vector_layers&&(d.vectorLayers=f.vector_layers,d.vectorLayerIds=d.vectorLayers.map(function(y){return y.id})),d.tiles=o.canonicalizeTileset(d,i.url),n(null,d)}};return i.url?u.getJSON(o.transformRequest(o.normalizeSourceURL(i.url),u.ResourceType.Source),s):u.browser.frame(function(){return s(null,i)})}Lr.prototype.broadcast=function(i,o,n){u.asyncAll(this.actors,function(s,p){s.send(i,o,p)},n=n||function(){})},Lr.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},Lr.prototype.remove=function(){this.actors.forEach(function(i){i.remove()}),this.actors=[],this.workerPool.release(this.id)},Lr.Actor=u.Actor;var pi=function(i,o,n){this.bounds=u.LngLatBounds.convert(this.validateBounds(i)),this.minzoom=o||0,this.maxzoom=n||24};pi.prototype.validateBounds=function(i){return Array.isArray(i)&&i.length===4?[Math.max(-180,i[0]),Math.max(-90,i[1]),Math.min(180,i[2]),Math.min(90,i[3])]:[-180,-90,180,90]},pi.prototype.contains=function(i){var o=Math.pow(2,i.z),n=Math.floor(u.mercatorXfromLng(this.bounds.getWest())*o),s=Math.floor(u.mercatorYfromLat(this.bounds.getNorth())*o),p=Math.ceil(u.mercatorXfromLng(this.bounds.getEast())*o),f=Math.ceil(u.mercatorYfromLat(this.bounds.getSouth())*o);return i.x>=n&&i.x<p&&i.y>=s&&i.y<f};var oo=function(i){function o(n,s,p,f){if(i.call(this),this.id=n,this.dispatcher=p,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,u.extend(this,u.pick(s,["url","scheme","tileSize","promoteId"])),this._options=u.extend({type:"vector"},s),this._collectResourceTiming=s.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(f)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.load=function(){var n=this;this._loaded=!1,this.fire(new u.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=ga(this._options,this.map._requestManager,function(s,p){n._tileJSONRequest=null,n._loaded=!0,s?n.fire(new u.ErrorEvent(s)):p&&(u.extend(n,p),p.bounds&&(n.tileBounds=new pi(p.bounds,n.minzoom,n.maxzoom)),u.postTurnstileEvent(p.tiles,n.map._requestManager._customAccessToken),u.postMapLoadEvent(p.tiles,n.map._getMapId(),n.map._requestManager._skuToken,n.map._requestManager._customAccessToken),n.fire(new u.Event("data",{dataType:"source",sourceDataType:"metadata"})),n.fire(new u.Event("data",{dataType:"source",sourceDataType:"content"})))})},o.prototype.loaded=function(){return this._loaded},o.prototype.hasTile=function(n){return!this.tileBounds||this.tileBounds.contains(n.canonical)},o.prototype.onAdd=function(n){this.map=n,this.load()},o.prototype.setSourceProperty=function(n){this._tileJSONRequest&&this._tileJSONRequest.cancel(),n(),this.map.style.sourceCaches[this.id].clearTiles(),this.load()},o.prototype.setTiles=function(n){var s=this;return this.setSourceProperty(function(){s._options.tiles=n}
vendor: 1,528 bytes, line 1
1),this},o.prototype.setUrl=function(n){var s=this;return this.setSourceProperty(function(){s.url=n,s._options.url=n}),this},o.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},o.prototype.serialize=function(){return u.extend({},this._options)},o.prototype.loadTile=function(n,s){var p=this.map._requestManager.normalizeTileURL(n.tileID.canonical.url(this.tiles,this.scheme)),f={request:this.map._requestManager.transformRequest(p,u.ResourceType.Tile),uid:n.uid,tileID:n.tileID,zoom:n.tileID.overscaledZ,tileSize:this.tileSize*n.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:u.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function d(y,v){return delete n.request,n.aborted?s(null):y&&y.status!==404?s(y):(v&&v.resourceTiming&&(n.resourceTiming=v.resourceTiming),this.map._refreshExpiredTiles&&v&&n.setExpiryData(v),n.loadVectorData(v,this.map.painter),u.cacheEntryPossiblyAdded(this.dispatcher),s(null),void(n.reloadCallback&&(this.loadTile(n,n.reloadCallback),n.reloadCallback=null)))}f.request.collectResourceTiming=this._collectResourceTiming,n.actor&&n.state!=="expired"?n.state==="loading"?n.reloadCallback=s:n.request=n.actor.send("reloadTile",f,d.bind(this)):(n.actor=this.dispatcher.getActor(),n.request=n.actor.send("loadTile",f,d.bind(this)))},o.prototype.abortTile=function(n){n.request&&(n.request.cancel(),delete n.request),n.actor&&n.actor.send("abortTile",{uid:n.uid,type:this.t
vendor: 40,280 bytes, line 1
1ype,source:this.id},void 0)},o.prototype.unloadTile=function(n){n.unloadVectorData(),n.actor&&n.actor.send("removeTile",{uid:n.uid,type:this.type,source:this.id},void 0)},o.prototype.hasTransition=function(){return!1},o}(u.Evented),ao=function(i){function o(n,s,p,f){i.call(this),this.id=n,this.dispatcher=p,this.setEventedParent(f),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=u.extend({type:"raster"},s),u.extend(this,u.pick(s,["url","scheme","tileSize"]))}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.load=function(){var n=this;this._loaded=!1,this.fire(new u.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=ga(this._options,this.map._requestManager,function(s,p){n._tileJSONRequest=null,n._loaded=!0,s?n.fire(new u.ErrorEvent(s)):p&&(u.extend(n,p),p.bounds&&(n.tileBounds=new pi(p.bounds,n.minzoom,n.maxzoom)),u.postTurnstileEvent(p.tiles),u.postMapLoadEvent(p.tiles,n.map._getMapId(),n.map._requestManager._skuToken),n.fire(new u.Event("data",{dataType:"source",sourceDataType:"metadata"})),n.fire(new u.Event("data",{dataType:"source",sourceDataType:"content"})))})},o.prototype.loaded=function(){return this._loaded},o.prototype.onAdd=function(n){this.map=n,this.load()},o.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},o.prototype.serialize=function(){return u.extend({},this._options)},o.prototype.hasTile=function(n){return!this.tileBounds||this.tileBounds.contains(n.canonical)},o.prototype.loadTile=function(n,s){var p=this,f=this.map._requestManager.normalizeTileURL(n.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);n.request=u.getImage(this.map._requestManager.transformRequest(f,u.ResourceType.Tile),function(d,y){if(delete n.request,n.aborted)n.state="unloaded",s(null);else if(d)n.state="errored",s(d);else if(y){p.map._refreshExpiredTiles&&n.setExpiryData(y),delete y.cacheControl,delete y.expires;var v=p.map.painter.context,S=v.gl;n.texture=p.map.painter.getTileTexture(y.width),n.texture?n.texture.update(y,{useMipmap:!0}):(n.texture=new u.Texture(v,y,S.RGBA,{useMipmap:!0}),n.texture.bind(S.LINEAR,S.CLAMP_TO_EDGE,S.LINEAR_MIPMAP_NEAREST),v.extTextureFilterAnisotropic&&S.texParameterf(S.TEXTURE_2D,v.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,v.extTextureFilterAnisotropicMax)),n.state="loaded",u.cacheEntryPossiblyAdded(p.dispatcher),s(null)}})},o.prototype.abortTile=function(n,s){n.request&&(n.request.cancel(),delete n.request),s()},o.prototype.unloadTile=function(n,s){n.texture&&this.map.painter.saveTileTexture(n.texture),s()},o.prototype.hasTransition=function(){return!1},o}(u.Evented),va=function(i){function o(n,s,p,f){i.call(this,n,s,p,f),this.type="raster-dem",this.maxzoom=22,this._options=u.extend({type:"raster-dem"},s),this.encoding=s.encoding||"mapbox"}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},o.prototype.loadTile=function(n,s){var p=this.map._requestManager.normalizeTileURL(n.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);function f(d,y){d&&(n.state="errored",s(d)),y&&(n.dem=y,n.needsHillshadePrepare=!0,n.state="loaded",s(null))}n.request=u.getImage(this.map._requestManager.transformRequest(p,u.ResourceType.Tile),(function(d,y){if(delete n.request,n.aborted)n.state="unloaded",s(null);else if(d)n.state="errored",s(d);else if(y){this.map._refreshExpiredTiles&&n.setExpiryData(y),delete y.cacheControl,delete y.expires;var v=u.window.ImageBitmap&&y instanceof u.window.ImageBitmap&&u.offscreenCanvasSupported()?y:u.browser.getImageData(y,1),S={uid:n.uid,coord:n.tileID,source:this.id,rawImageData:v,encoding:this.encoding};n.actor&&n.state!=="expired"||(n.actor=this.dispatcher.getActor(),n.actor.send("loadDEMTile",S,f.bind(this)))}}).bind(this)),n.neighboringTiles=this._getNeighboringTiles(n.tileID)},o.prototype._getNeighboringTiles=function(n){var s=n.canonical,p=Math.pow(2,s.z),f=(s.x-1+p)%p,d=s.x===0?n.wrap-1:n.wrap,y=(s.x+1+p)%p,v=s.x+1===p?n.wrap+1:n.wrap,S={};return S[new u.OverscaledTileID(n.overscaledZ,d,s.z,f,s.y).key]={backfilled:!1},S[new u.OverscaledTileID(n.overscaledZ,v,s.z,y,s.y).key]={backfilled:!1},s.y>0&&(S[new u.OverscaledTileID(n.overscaledZ,d,s.z,f,s.y-1).key]={backfilled:!1},S[new u.OverscaledTileID(n.overscaledZ,n.wrap,s.z,s.x,s.y-1).key]={backfilled:!1},S[new u.OverscaledTileID(n.overscaledZ,v,s.z,y,s.y-1).key]={backfilled:!1}),s.y+1<p&&(S[new u.OverscaledTileID(n.overscaledZ,d,s.z,f,s.y+1).key]={backfilled:!1},S[new u.OverscaledTileID(n.overscaledZ,n.wrap,s.z,s.x,s.y+1).key]={backfilled:!1},S[new u.OverscaledTileID(n.overscaledZ,v,s.z,y,s.y+1).key]={backfilled:!1}),S},o.prototype.unloadTile=function(n){n.demTexture&&this.map.painter.saveTileTexture(n.demTexture),n.fbo&&(n.fbo.destroy(),delete n.fbo),n.dem&&delete n.dem,delete n.neighboringTiles,n.state="unloaded",n.actor&&n.actor.send("removeDEMTile",{uid:n.uid,source:this.id})},o}(ao),Wi=function(i){function o(n,s,p,f){i.call(this),this.id=n,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=p.getActor(),this.setEventedParent(f),this._data=s.data,this._options=u.extend({},s),this._collectResourceTiming=s.collectResourceTiming,this._resourceTiming=[],s.maxzoom!==void 0&&(this.maxzoom=s.maxzoom),s.type&&(this.type=s.type),s.attribution&&(this.attribution=s.attribution),this.promoteId=s.promoteId;var d=u.EXTENT/this.tileSize;this.workerOptions=u.extend({source:this.id,cluster:s.cluster||!1,geojsonVtOptions:{buffer:(s.buffer!==void 0?s.buffer:128)*d,tolerance:(s.tolerance!==void 0?s.tolerance:.375)*d,extent:u.EXTENT,maxZoom:this.maxzoom,lineMetrics:s.lineMetrics||!1,generateId:s.generateId||!1},superclusterOptions:{maxZoom:s.clusterMaxZoom!==void 0?Math.min(s.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,s.clusterMinPoints||2),extent:u.EXTENT,radius:(s.clusterRadius||50)*d,log:!1,generateId:s.generateId||!1},clusterProperties:s.clusterProperties,filter:s.filter},s.workerOptions)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.load=function(){var n=this;this.fire(new u.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(s){if(s)n.fire(new u.ErrorEvent(s));else{var p={dataType:"source",sourceDataType:"metadata"};n._collectResourceTiming&&n._resourceTiming&&n._resourceTiming.length>0&&(p.resourceTiming=n._resourceTiming,n._resourceTiming=[]),n.fire(new u.Event("data",p))}})},o.prototype.onAdd=function(n){this.map=n,this.load()},o.prototype.setData=function(n){var s=this;return this._data=n,this.fire(new u.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(p){if(p)s.fire(new u.ErrorEvent(p));else{var f={dataType:"source",sourceDataType:"content"};s._collectResourceTiming&&s._resourceTiming&&s._resourceTiming.length>0&&(f.resourceTiming=s._resourceTiming,s._resourceTiming=[]),s.fire(new u.Event("data",f))}}),this},o.prototype.getClusterExpansionZoom=function(n,s){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:n,source:this.id},s),this},o.prototype.getClusterChildren=function(n,s){return this.actor.send("geojson.getClusterChildren",{clusterId:n,source:this.id},s),this},o.prototype.getClusterLeaves=function(n,s,p,f){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:n,limit:s,offset:p},f),this},o.prototype._updateWorkerData=function(n){var s=this;this._loaded=!1;var p=u.extend({},this.workerOptions),f=this._data;typeof f=="string"?(p.request=this.map._requestManager.transformRequest(u.browser.resolveURL(f),u.ResourceType.Source),p.request.collectResourceTiming=this._collectResourceTiming):p.data=JSON.stringify(f),this.actor.send(this.type+".loadData",p,function(d,y){s._removed||y&&y.abandoned||(s._loaded=!0,y&&y.resourceTiming&&y.resourceTiming[s.id]&&(s._resourceTiming=y.resourceTiming[s.id].slice(0)),s.actor.send(s.type+".coalesce",{source:p.source},null),n(d))})},o.prototype.loaded=function(){return this._loaded},o.prototype.loadTile=function(n,s){var p=this,f=n.actor?"reloadTile":"loadTile";n.actor=this.actor,n.request=this.actor.send(f,{type:this.type,uid:n.uid,tileID:n.tileID,zoom:n.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:u.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},function(d,y){return delete n.request,n.unloadVectorData(),n.aborted?s(null):d?s(d):(n.loadVectorData(y,p.map.painter,f==="reloadTile"),s(null))})},o.prototype.abortTile=function(n){n.request&&(n.request.cancel(),delete n.request),n.aborted=!0},o.prototype.unloadTile=function(n){n.unloadVectorData(),this.actor.send("removeTile",{uid:n.uid,type:this.type,source:this.id})},o.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},o.prototype.serialize=function(){return u.extend({},this._options,{type:this.type,data:this._data})},o.prototype.hasTransition=function(){return!1},o}(u.Evented),hi=u.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Ti=function(i){function o(n,s,p,f){i.call(this),this.id=n,this.dispatcher=p,this.coordinates=s.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(f),this.options=s}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.load=function(n,s){var p=this;this._loaded=!1,this.fire(new u.Event("dataloading",{dataType:"source"})),this.url=this.options.url,u.getImage(this.map._requestManager.transformRequest(this.url,u.ResourceType.Image),function(f,d){p._loaded=!0,f?p.fire(new u.ErrorEvent(f)):d&&(p.image=d,n&&(p.coordinates=n),s&&s(),p._finishLoading())})},o.prototype.loaded=function(){return this._loaded},o.prototype.updateImage=function(n){var s=this;return this.image&&n.url?(this.options.url=n.url,this.load(n.coordinates,function(){s.texture=null}),this):this},o.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new u.Event("data",{dataType:"source",sourceDataType:"metadata"})))},o.prototype.onAdd=function(n){this.map=n,this.load()},o.prototype.setCoordinates=function(n){var s=this;this.coordinates=n;var p=n.map(u.MercatorCoordinate.fromLngLat);this.tileID=function(d){for(var y=1/0,v=1/0,S=-1/0,z=-1/0,C=0,k=d;C<k.length;C+=1){var F=k[C];y=Math.min(y,F.x),v=Math.min(v,F.y),S=Math.max(S,F.x),z=Math.max(z,F.y)}var R=Math.max(S-y,z-v),j=Math.max(0,Math.floor(-Math.log(R)/Math.LN2)),D=Math.pow(2,j);return new u.CanonicalTileID(j,Math.floor((y+S)/2*D),Math.floor((v+z)/2*D))}(p),this.minzoom=this.maxzoom=this.tileID.z;var f=p.map(function(d){return s.tileID.getTilePoint(d)._round()});return this._boundsArray=new u.StructArrayLayout4i8,this._boundsArray.emplaceBack(f[0].x,f[0].y,0,0),this._boundsArray.emplaceBack(f[1].x,f[1].y,u.EXTENT,0),this._boundsArray.emplaceBack(f[3].x,f[3].y,0,u.EXTENT),this._boundsArray.emplaceBack(f[2].x,f[2].y,u.EXTENT,u.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new u.Event("data",{dataType:"source",sourceDataType:"content"})),this},o.prototype.prepare=function(){if(Object.keys(this.tiles).length!==0&&this.image){var n=this.map.painter.context,s=n.gl;for(var p in this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,hi.members)),this.boundsSegments||(this.boundsSegments=u.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new u.Texture(n,this.image,s.RGBA),this.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE)),this.tiles){var f=this.tiles[p];f.state!=="loaded"&&(f.state="loaded",f.texture=this.texture)}}},o.prototype.loadTile=function(n,s){this.tileID&&this.tileID.equals(n.tileID.canonical)?(this.tiles[String(n.tileID.wrap)]=n,n.buckets={},s(null)):(n.state="errored",s(null))},o.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},o.prototype.hasTransition=function(){return!1},o}(u.Evented),Tn=function(i){function o(n,s,p,f){i.call(this,n,s,p,f),this.roundZoom=!0,this.type="video",this.options=s}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.load=function(){var n=this;this._loaded=!1;var s=this.options;this.urls=[];for(var p=0,f=s.urls;p<f.length;p+=1)this.urls.push(this.map._requestManager.transformRequest(f[p],u.ResourceType.Source).url);u.getVideo(this.urls,function(d,y){n._loaded=!0,d?n.fire(new u.ErrorEvent(d)):y&&(n.video=y,n.video.loop=!0,n.video.setAttribute("playsinline",""),n.video.addEventListener("playing",function(){n.map.triggerRepaint()}),n.map&&n.video.play(),n._finishLoading())})},o.prototype.pause=function(){this.video&&this.video.pause()},o.prototype.play=function(){this.video&&this.video.play()},o.prototype.seek=function(n){if(this.video){var s=this.video.seekable;n<s.start(0)||n>s.end(0)?this.fire(new u.ErrorEvent(new u.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+s.start(0)+" and "+s.end(0)+"-second mark."))):this.video.currentTime=n}},o.prototype.getVideo=function(){return this.video},o.prototype.onAdd=function(n){this.map||(this.map=n,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},o.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var n=this.map.painter.context,s=n.gl;for(var p in this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,hi.members)),this.boundsSegments||(this.boundsSegments=u.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE),s.texSubImage2D(s.TEXTURE_2D,0,0,0,s.RGBA,s.UNSIGNED_BYTE,this.video)):(this.texture=new u.Texture(n,this.video,s.RGBA),this.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE)),this.tiles){var f=this.tiles[p];f.state!=="loaded"&&(f.state="loaded",f.texture=this.texture)}}},o.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},o.prototype.hasTransition=function(){return this.video&&!this.video.paused},o}(Ti),In=function(i){function o(n,s,p,f){i.call(this,n,s,p,f),s.coordinates?Array.isArray(s.coordinates)&&s.coordinates.length===4&&!s.coordinates.some(function(d){return!Array.isArray(d)||d.length!==2||d.some(function(y){return typeof y!="number"})})||this.fire(new u.ErrorEvent(new u.ValidationError("sources."+n,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new u.ErrorEvent(new u.ValidationError("sources."+n,null,'missing required property "coordinates"'))),s.animate&&typeof s.animate!="boolean"&&this.fire(new u.ErrorEvent(new u.ValidationError("sources."+n,null,'optional "animate" property must be a boolean value'))),s.canvas?typeof s.canvas=="string"||s.canvas instanceof u.window.HTMLCanvasElement||this.fire(new u.ErrorEvent(new u.ValidationError("sources."+n,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new u.ErrorEvent(new u.ValidationError("sources."+n,null,'missing required property "canvas"'))),this.options=s,this.animate=s.animate===void 0||s.animate}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof u.window.HTMLCanvasElement?this.options.canvas:u.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new u.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},o.prototype.getCanvas=function(){return this.canvas},o.prototype.onAdd=function(n){this.map=n,this.load(),this.canvas&&this.animate&&this.play()},o.prototype.onRemove=function(){this.pause()},o.prototype.prepare=function(){var n=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,n=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,n=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var s=this.map.painter.context,p=s.gl;for(var f in this.boundsBuffer||(this.boundsBuffer=s.createVertexBuffer(this._boundsArray,hi.members)),this.boundsSegments||(this.boundsSegments=u.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(n||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new u.Texture(s,this.canvas,p.RGBA,{premultiply:!0}),this.tiles){var d=this.tiles[f];d.state!=="loaded"&&(d.state="loaded",d.texture=this.texture)}}},o.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},o.prototype.hasTransition=function(){return this._playing},o.prototype._hasInvalidDimensions=function(){for(var n=0,s=[this.canvas.width,this.canvas.height];n<s.length;n+=1){var p=s[n];if(isNaN(p)||p<=0)return!0}return!1},o}(Ti),Ki={vector:oo,raster:ao,"raster-dem":va,geojson:Wi,video:Tn,image:Ti,canvas:In};function bs(i,o){var n=u.identity([]);return u.translate(n,n,[1,1,0]),u.scale(n,n,[.5*i.width,.5*i.height,1]),u.multiply(n,n,i.calculatePosMatrix(o.toUnwrapped()))}function yr(i,o,n,s,p,f){var d=function(j,D,N){if(j)for(var G=0,K=j;G<K.length;G+=1){var ee=D[K[G]];if(ee&&ee.source===N&&ee.type==="fill-extrusion")return!0}else for(var Q in D){var te=D[Q];if(te.source===N&&te.type==="fill-extrusion")return!0}return!1}(p&&p.layers,o,i.id),y=f.maxPitchScaleFactor(),v=i.tilesIn(s,y,d);v.sort(Ri);for(var S=[],z=0,C=v;z<C.length;z+=1){var k=C[z];S.push({wrappedTileID:k.tileID.wrapped().key,queryResults:k.tile.queryRenderedFeatures(o,n,i._state,k.queryGeometry,k.cameraQueryGeometry,k.scale,p,f,y,bs(i.transform,k.tileID))})}var F=function(j){for(var D={},N={},G=0,K=j;G<K.length;G+=1){var ee=K[G],Q=ee.queryResults,te=ee.wrappedTileID,oe=N[te]=N[te]||{};for(var he in Q)for(var pe=Q[he],be=oe[he]=oe[he]||{},ke=D[he]=D[he]||[],Be=0,Le=pe;Be<Le.length;Be+=1){var nt=Le[Be];be[nt.featureIndex]||(be[nt.featureIndex]=!0,ke.push(nt))}}return D}(S);for(var R in F)F[R].forEach(function(j){var D=j.feature,N=i.getFeatureState(D.layer["source-layer"],D.id);D.source=D.layer.source,D.layer["source-layer"]&&(D.sourceLayer=D.layer["source-layer"]),D.state=N});return F}function Ri(i,o){var n=i.tileID,s=o.tileID;return n.overscaledZ-s.overscaledZ||n.canonical.y-s.canonical.y||n.wrap-s.wrap||n.canonical.x-s.canonical.x}var yt=function(i,o){this.max=i,this.onRemove=o,this.reset()};yt.prototype.reset=function(){for(var i in this.data)for(var o=0,n=this.data[i];o<n.length;o+=1){var s=n[o];s.timeout&&clearTimeout(s.timeout),this.onRemove(s.value)}return this.data={},this.order=[],this},yt.prototype.add=function(i,o,n){var s=this,p=i.wrapped().key;this.data[p]===void 0&&(this.data[p]=[]);var f={value:o,timeout:void 0};if(n!==void 0&&(f.timeout=setTimeout(function(){s.remove(i,f)},n)),this.data[p].push(f),this.order.push(p),this.order.length>this.max){var d=this._getAndRemoveByKey(this.order[0]);d&&this.onRemove(d)}return this},yt.prototype.has=function(i){return i.wrapped().key in this.data},yt.prototype.getAndRemove=function(i){return this.has(i)?this._getAndRemoveByKey(i.wrapped().key):null},yt.prototype._getAndRemoveByKey=function(i){var o=this.data[i].shift();return o.timeout&&clearTimeout(o.timeout),this.data[i].length===0&&delete this.data[i],this.order.splice(this.order.indexOf(i),1),o.value},yt.prototype.getByKey=function(i){var o=this.data[i];return o?o[0].value:null},yt.prototype.get=function(i){return this.has(i)?this.data[i.wrapped().key][0].value:null},yt.prototype.remove=function(i,o){if(!this.has(i))return this;var n=i.wrapped().key,s=o===void 0?0:this.data[n].indexOf(o),p=this.data[n][s];return this.data[n].splice(s,1),p.timeout&&clearTimeout(p.timeout),this.data[n].length===0&&delete this.data[n],this.onRemove(p.value),this.order.splice(this.order.indexOf(n),1),this},yt.prototype.setMaxSize=function(i){for(this.max=i;this.order.length>this.max;){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},yt.prototype.filter=function(i){var o=[];for(var n in this.data)for(var s=0,p=this.data[n];s<p.length;s+=1){var f=p[s];i(f.value)||o.push(f)}for(var d=0,y=o;d<y.length;d+=1){var v=y[d];this.remove(v.value.tileID,v)}};var Ii=function(i,o,n){this.context=i;var s=i.gl;this.buffer=s.createBuffer(),this.dynamicDraw=!!n,this.context.unbindVAO(),i.bindElementBuffer.set(this.buffer),s.bufferData(s.ELEMENT_ARRAY_BUFFER,o.arrayBuffer,this.dynamicDraw?s.DYNAMIC_DRAW:s.STATIC_DRAW),this.dynamicDraw||delete o.arrayBuffer};Ii.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},Ii.prototype.updateData=function(i){var o=this.context.gl;this.context.unbindVAO(),this.bind(),o.bufferSubData(o.ELEMENT_ARRAY_BUFFER,0,i.arrayBuffer)},Ii.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var so={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},fi=function(i,o,n,s){this.length=o.length,this.attributes=n,this.itemSize=o.bytesPerElement,this.dynamicDraw=s,this.context=i;var p=i.gl;this.buffer=p.createBuffer(),i.bindVertexBuffer.set(this.buffer),p.bufferData(p.ARRAY_BUFFER,o.arrayBuffer,this.dynamicDraw?p.DYNAMIC_DRAW:p.STATIC_DRAW),this.dynamicDraw||delete o.arrayBuffer};fi.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},fi.prototype.updateData=function(i){var o=this.context.gl;this.bind(),o.bufferSubData(o.ARRAY_BUFFER,0,i.arrayBuffer)},fi.prototype.enableAttributes=function(i,o){for(var n=0;n<this.attributes.length;n++){var s=o.attributes[this.attributes[n].name];s!==void 0&&i.enableVertexAttribArray(s)}},fi.prototype.setVertexAttribPointers=function(i,o,n){for(var s=0;s<this.attributes.length;s++){var p=this.attributes[s],f=o.attributes[p.name];f!==void 0&&i.vertexAttribPointer(f,p.components,i[so[p.type]],!1,this.itemSize,p.offset+this.itemSize*(n||0))}},fi.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var $e=function(i){this.gl=i.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};$e.prototype.get=function(){return this.current},$e.prototype.set=function(i){},$e.prototype.getDefault=function(){return this.default},$e.prototype.setDefault=function(){this.set(this.default)};var Hi=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return u.Color.transparent},o.prototype.set=function(n){var s=this.current;(n.r!==s.r||n.g!==s.g||n.b!==s.b||n.a!==s.a||this.dirty)&&(this.gl.clearColor(n.r,n.g,n.b,n.a),this.current=n,this.dirty=!1)},o}($e),Er=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return 1},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.clearDepth(n),this.current=n,this.dirty=!1)},o}($e),Jr=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return 0},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.clearStencil(n),this.current=n,this.dirty=!1)},o}($e),ws=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return[!0,!0,!0,!0]},o.prototype.set=function(n){var s=this.current;(n[0]!==s[0]||n[1]!==s[1]||n[2]!==s[2]||n[3]!==s[3]||this.dirty)&&(this.gl.colorMask(n[0],n[1],n[2],n[3]),this.current=n,this.dirty=!1)},o}($e),di=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return!0},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.depthMask(n),this.current=n,this.dirty=!1)},o}($e),Do=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return 255},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.stencilMask(n),this.current=n,this.dirty=!1)},o}($e),Yr=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},o.prototype.set=function(n){var s=this.current;(n.func!==s.func||n.ref!==s.ref||n.mask!==s.mask||this.dirty)&&(this.gl.stencilFunc(n.func,n.ref,n.mask),this.current=n,this.dirty=!1)},o}($e),En=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){var n=this.gl;return[n.KEEP,n.KEEP,n.KEEP]},o.prototype.set=function(n){var s=this.current;(n[0]!==s[0]||n[1]!==s[1]||n[2]!==s[2]||this.dirty)&&(this.gl.stencilOp(n[0],n[1],n[2]),this.current=n,this.dirty=!1)},o}($e),lo=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;n?s.enable(s.STENCIL_TEST):s.disable(s.STENCIL_TEST),this.current=n,this.dirty=!1}},o}($e),Qr=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return[0,1]},o.prototype.set=function(n){var s=this.current;(n[0]!==s[0]||n[1]!==s[1]||this.dirty)&&(this.gl.depthRange(n[0],n[1]),this.current=n,this.dirty=!1)},o}($e),$r=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;n?s.enable(s.DEPTH_TEST):s.disable(s.DEPTH_TEST),this.current=n,this.dirty=!1}},o}($e),An=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return this.gl.LESS},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.depthFunc(n),this.current=n,this.dirty=!1)},o}($e),mi=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;n?s.enable(s.BLEND):s.disable(s.BLEND),this.current=n,this.dirty=!1}},o}($e),xa=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){var n=this.gl;return[n.ONE,n.ZERO]},o.prototype.set=function(n){var s=this.current;(n[0]!==s[0]||n[1]!==s[1]||this.dirty)&&(this.gl.blendFunc(n[0],n[1]),this.current=n,this.dirty=!1)},o}($e),ba=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return u.Color.transparent},o.prototype.set=function(n){var s=this.current;(n.r!==s.r||n.g!==s.g||n.b!==s.b||n.a!==s.a||this.dirty)&&(this.gl.blendColor(n.r,n.g,n.b,n.a),this.current=n,this.dirty=!1)},o}($e),Lo=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return this.gl.FUNC_ADD},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.blendEquation(n),this.current=n,this.dirty=!1)},o}($e),Bo=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;n?s.enable(s.CULL_FACE):s.disable(s.CULL_FACE),this.current=n,this.dirty=!1}},o}($e),uo=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return this.gl.BACK},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.cullFace(n),this.current=n,this.dirty=!1)},o}($e),wa=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return this.gl.CCW},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.frontFace(n),this.current=n,this.dirty=!1)},o}($e),co=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.useProgram(n),this.current=n,this.dirty=!1)},o}($e),Ro=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return this.gl.TEXTURE0},o.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.activeTexture(n),this.current=n,this.dirty=!1)},o}($e),zn=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){var n=this.gl;return[0,0,n.drawingBufferWidth,n.drawingBufferHeight]},o.prototype.set=function(n){var s=this.current;(n[0]!==s[0]||n[1]!==s[1]||n[2]!==s[2]||n[3]!==s[3]||this.dirty)&&(this.gl.viewport(n[0],n[1],n[2],n[3]),this.current=n,this.dirty=!1)},o}($e),Oo=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;s.bindFramebuffer(s.FRAMEBUFFER,n),this.current=n,this.dirty=!1}},o}($e),Fo=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;s.bindRenderbuffer(s.RENDERBUFFER,n),this.current=n,this.dirty=!1}},o}($e),Sa=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;s.bindTexture(s.TEXTURE_2D,n),this.current=n,this.dirty=!1}},o}($e),Ta=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;s.bindBuffer(s.ARRAY_BUFFER,n),this.current=n,this.dirty=!1}},o}($e),Pn=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(n){var s=this.gl;s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,n),this.current=n,this.dirty=!1},o}($e),Oi=function(i){function o(n){i.call(this,n),this.vao=n.extVertexArrayObject}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(n){this.vao&&(n!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(n),this.current=n,this.dirty=!1)},o}($e),Fi=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return 4},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;s.pixelStorei(s.UNPACK_ALIGNMENT,n),this.current=n,this.dirty=!1}},o}($e),po=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n),this.current=n,this.dirty=!1}},o}($e),Uo=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(n){if(n!==this.current||this.dirty){var s=this.gl;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,n),this.current=n,this.dirty=!1}},o}($e),Bt=function(i){function o(n,s){i.call(this,n),this.context=n,this.parent=s}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o}($e),w=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.setDirty=function(){this.dirty=!0},o.prototype.set=function(n){if(n!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var s=this.gl;s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,n,0),this.current=n,this.dirty=!1}},o}(Bt),T=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.set=function(n){if(n!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var s=this.gl;s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.RENDERBUFFER,n),this.current=n,this.dirty=!1}},o}(Bt),E=function(i,o,n,s){this.context=i,this.width=o,this.height=n;var p=this.framebuffer=i.gl.createFramebuffer();this.colorAttachment=new w(i,p),s&&(this.depthAttachment=new T(i,p))};E.prototype.destroy=function(){var i=this.context.gl,o=this.colorAttachment.get();if(o&&i.deleteTexture(o),this.depthAttachment){var n=this.depthAttachment.get();n&&i.deleteRenderbuffer(n)}i.deleteFramebuffer(this.framebuffer)};var M=function(i,o,n){this.func=i,this.mask=o,this.range=n};M.ReadOnly=!1,M.ReadWrite=!0,M.disabled=new M(519,M.ReadOnly,[0,1]);var O=function(i,o,n,s,p,f){this.test=i,this.ref=o,this.mask=n,this.fail=s,this.depthFail=p,this.pass=f};O.disabled=new O({func:519,mask:0},0,0,7680,7680,7680);var Z=function(i,o,n){this.blendFunction=i,this.blendColor=o,this.mask=n};Z.disabled=new Z(Z.Replace=[1,0],u.Color.transparent,[!1,!1,!1,!1]),Z.unblended=new Z(Z.Replace,u.Color.transparent,[!0,!0,!0,!0]),Z.alphaBlended=new Z([1,771],u.Color.transparent,[!0,!0,!0,!0]);var X=function(i,o,n){this.enable=i,this.mode=o,this.frontFace=n};X.disabled=new X(!1,1029,2305),X.backCCW=new X(!0,1029,2305);var P=function(i){this.gl=i,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new Hi(this),this.clearDepth=new Er(this),this.clearStencil=new Jr(this),this.colorMask=new ws(this),this.depthMask=new di(this),this.stencilMask=new Do(this),this.stencilFunc=new Yr(this),this.stencilOp=new En(this),this.stencilTest=new lo(this),this.depthRange=new Qr(this),this.depthTest=new $r(this),this.depthFunc=new An(this),this.blend=new mi(this),this.blendFunc=new xa(this),this.blendColor=new ba(this),this.blendEquation=new Lo(this),this.cullFace=new Bo(this),this.cullFaceSide=new uo(this),this.frontFace=new wa(this),this.program=new co(this),this.activeTexture=new Ro(this),this.viewport=new zn(this),this.bindFramebuffer=new Oo(this),this.bindRenderbuffer=new Fo(this),this.bindTexture=new Sa(this),this.bindVertexBuffer=new Ta(this),this.bindElementBuffer=new Pn(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Oi(this),this.pixelStoreUnpack=new Fi(this),this.pixelStoreUnpackPremultiplyAlpha=new po(this),this.pixelStoreUnpackFlipY=new Uo(this),this.extTextureFilterAnisotropic=i.getExtension("EXT_texture_filter_anisotropic")||i.getExtension("MOZ_EXT_texture_filter_anisotropic")||i.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=i.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=i.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(i.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=i.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=i.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE)};P.prototype.setDefault=function(){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()},P.prototype.setDirty=function(){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.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},P.prototype.createIndexBuffer=function(i,o){return new Ii(this,i,o)},P.prototype.createVertexBuffer=function(i,o,n){return new fi(this,i,o,n)},P.prototype.createRenderbuffer=function(i,o,n){var s=this.gl,p=s.createRenderbuffer();return this.bindRenderbuffer.set(p),s.renderbufferStorage(s.RENDERBUFFER,i,o,n),this.bindRenderbuffer.set(null),p},P.prototype.createFramebuffer=function(i,o,n){return new E(this,i,o,n)},P.prototype.clear=function(i){var o=i.color,n=i.depth,s=this.gl,p=0;o&&(p|=s.COLOR_BUFFER_BIT,this.clearColor.set(o),this.colorMask.set([!0,!0,!0,!0])),n!==void 0&&(p|=s.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(n),this.depthMask.set(!0)),s.clear(p)},P.prototype.setCullFace=function(i){i.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(i.mode),this.frontFace.set(i.frontFace))},P.prototype.setDepthMode=function(i){i.func!==this.gl.ALWAYS||i.mask?(this.depthTest.set(!0),this.depthFunc.set(i.func),this.depthMask.set(i.mask),this.depthRange.set(i.range)):this.depthTest.set(!1)},P.prototype.setStencilMode=function(i){i.test.func!==this.gl.ALWAYS||i.mask?(this.stencilTest.set(!0),this.stencilMask.set(i.mask),this.stencilOp.set([i.fail,i.depthFail,i.pass
1]),this.stencilFunc.set({func:i.test.func,ref:i.ref,mask:i.test.mask})):this.stencilTest.set(!1)},P.prototype.setColorMode=function(i){u.deepEqual(i.blendFunction,Z.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(i.blendFunction),this.blendColor.set(i.blendColor)),this.colorMask.set(i.mask)},P.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var U=function(i){function o(n,s,p){var f=this;i.call(this),this.id=n,this.dispatcher=p,this.on("data",function(d){d.dataType==="source"&&d.sourceDataType==="metadata"&&(f._sourceLoaded=!0),f._sourceLoaded&&!f._paused&&d.dataType==="source"&&d.sourceDataType==="content"&&(f.reload(),f.transform&&f.update(f.transform))}),this.on("error",function(){f._sourceErrored=!0}),this._source=function(d,y,v,S){var z=new Ki[y.type](d,y,v,S);if(z.id!==d)throw new Error("Expected Source id to be "+d+" instead of "+z.id);return u.bindAll(["load","abort","unload","serialize","prepare"],z),z}(n,s,p,this),this._tiles={},this._cache=new yt(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new u.SourceFeatureState}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.onAdd=function(n){this.map=n,this._maxTileCacheSize=n?n._maxTileC
vendor: 62,449 bytes, line 1
1acheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(n)},o.prototype.onRemove=function(n){this._source&&this._source.onRemove&&this._source.onRemove(n)},o.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var n in this._tiles){var s=this._tiles[n];if(s.state!=="loaded"&&s.state!=="errored")return!1}return!0},o.prototype.getSource=function(){return this._source},o.prototype.pause=function(){this._paused=!0},o.prototype.resume=function(){if(this._paused){var n=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,n&&this.reload(),this.transform&&this.update(this.transform)}},o.prototype._loadTile=function(n,s){return this._source.loadTile(n,s)},o.prototype._unloadTile=function(n){if(this._source.unloadTile)return this._source.unloadTile(n,function(){})},o.prototype._abortTile=function(n){if(this._source.abortTile)return this._source.abortTile(n,function(){})},o.prototype.serialize=function(){return this._source.serialize()},o.prototype.prepare=function(n){for(var s in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var p=this._tiles[s];p.upload(n),p.prepare(this.map.style.imageManager)}},o.prototype.getIds=function(){return u.values(this._tiles).map(function(n){return n.tileID}).sort(H).map(function(n){return n.key})},o.prototype.getRenderableIds=function(n){var s=this,p=[];for(var f in this._tiles)this._isIdRenderable(f,n)&&p.push(this._tiles[f]);return n?p.sort(function(d,y){var v=d.tileID,S=y.tileID,z=new u.Point(v.canonical.x,v.canonical.y)._rotate(s.transform.angle),C=new u.Point(S.canonical.x,S.canonical.y)._rotate(s.transform.angle);return v.overscaledZ-S.overscaledZ||C.y-z.y||C.x-z.x}).map(function(d){return d.tileID.key}):p.map(function(d){return d.tileID}).sort(H).map(function(d){return d.key})},o.prototype.hasRenderableParent=function(n){var s=this.findLoadedParent(n,0);return!!s&&this._isIdRenderable(s.tileID.key)},o.prototype._isIdRenderable=function(n,s){return this._tiles[n]&&this._tiles[n].hasData()&&!this._coveredTiles[n]&&(s||!this._tiles[n].holdingForFade())},o.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var n in this._cache.reset(),this._tiles)this._tiles[n].state!=="errored"&&this._reloadTile(n,"reloading")},o.prototype._reloadTile=function(n,s){var p=this._tiles[n];p&&(p.state!=="loading"&&(p.state=s),this._loadTile(p,this._tileLoaded.bind(this,p,n,s)))},o.prototype._tileLoaded=function(n,s,p,f){if(f)return n.state="errored",void(f.status!==404?this._source.fire(new u.ErrorEvent(f,{tile:n})):this.update(this.transform));n.timeAdded=u.browser.now(),p==="expired"&&(n.refreshedUponExpiration=!0),this._setTileReloadTimer(s,n),this.getSource().type==="raster-dem"&&n.dem&&this._backfillDEM(n),this._state.initializeTileState(n,this.map?this.map.painter:null),this._source.fire(new u.Event("data",{dataType:"source",tile:n,coord:n.tileID}))},o.prototype._backfillDEM=function(n){for(var s=this.getRenderableIds(),p=0;p<s.length;p++){var f=s[p];if(n.neighboringTiles&&n.neighboringTiles[f]){var d=this.getTileByID(f);y(n,d),y(d,n)}}function y(v,S){v.needsHillshadePrepare=!0;var z=S.tileID.canonical.x-v.tileID.canonical.x,C=S.tileID.canonical.y-v.tileID.canonical.y,k=Math.pow(2,v.tileID.canonical.z),F=S.tileID.key;z===0&&C===0||Math.abs(C)>1||(Math.abs(z)>1&&(Math.abs(z+k)===1?z+=k:Math.abs(z-k)===1&&(z-=k)),S.dem&&v.dem&&(v.dem.backfillBorder(S.dem,z,C),v.neighboringTiles&&v.neighboringTiles[F]&&(v.neighboringTiles[F].backfilled=!0)))}},o.prototype.getTile=function(n){return this.getTileByID(n.key)},o.prototype.getTileByID=function(n){return this._tiles[n]},o.prototype._retainLoadedChildren=function(n,s,p,f){for(var d in this._tiles){var y=this._tiles[d];if(!(f[d]||!y.hasData()||y.tileID.overscaledZ<=s||y.tileID.overscaledZ>p)){for(var v=y.tileID;y&&y.tileID.overscaledZ>s+1;){var S=y.tileID.scaledTo(y.tileID.overscaledZ-1);(y=this._tiles[S.key])&&y.hasData()&&(v=S)}for(var z=v;z.overscaledZ>s;)if(n[(z=z.scaledTo(z.overscaledZ-1)).key]){f[v.key]=v;break}}}},o.prototype.findLoadedParent=function(n,s){if(n.key in this._loadedParentTiles){var p=this._loadedParentTiles[n.key];return p&&p.tileID.overscaledZ>=s?p:null}for(var f=n.overscaledZ-1;f>=s;f--){var d=n.scaledTo(f),y=this._getLoadedTile(d);if(y)return y}},o.prototype._getLoadedTile=function(n){var s=this._tiles[n.key];return s&&s.hasData()?s:this._cache.getByKey(n.wrapped().key)},o.prototype.updateCacheSize=function(n){var s=Math.ceil(n.width/this._source.tileSize)+1,p=Math.ceil(n.height/this._source.tileSize)+1,f=Math.floor(s*p*5),d=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,f):f;this._cache.setMaxSize(d)},o.prototype.handleWrapJump=function(n){var s=Math.round((n-(this._prevLng===void 0?n:this._prevLng))/360);if(this._prevLng=n,s){var p={};for(var f in this._tiles){var d=this._tiles[f];d.tileID=d.tileID.unwrapTo(d.tileID.wrap+s),p[d.tileID.key]=d}for(var y in this._tiles=p,this._timers)clearTimeout(this._timers[y]),delete this._timers[y];for(var v in this._tiles)this._setTileReloadTimer(v,this._tiles[v])}},o.prototype.update=function(n){var s=this;if(this.transform=n,this._sourceLoaded&&!this._paused){var p;this.updateCacheSize(n),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?p=n.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(oe){return new u.OverscaledTileID(oe.canonical.z,oe.wrap,oe.canonical.z,oe.canonical.x,oe.canonical.y)}):(p=n.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(p=p.filter(function(oe){return s._source.hasTile(oe)}))):p=[];var f=n.coveringZoomLevel(this._source),d=Math.max(f-o.maxOverzooming,this._source.minzoom),y=Math.max(f+o.maxUnderzooming,this._source.minzoom),v=this._updateRetainedTiles(p,f);if(ae(this._source.type)){for(var S={},z={},C=0,k=Object.keys(v);C<k.length;C+=1){var F=k[C],R=v[F],j=this._tiles[F];if(j&&!(j.fadeEndTime&&j.fadeEndTime<=u.browser.now())){var D=this.findLoadedParent(R,d);D&&(this._addTile(D.tileID),S[D.tileID.key]=D.tileID),z[F]=R}}for(var N in this._retainLoadedChildren(z,f,y,v),S)v[N]||(this._coveredTiles[N]=!0,v[N]=S[N])}for(var G in v)this._tiles[G].clearFadeHold();for(var K=0,ee=u.keysDifference(this._tiles,v);K<ee.length;K+=1){var Q=ee[K],te=this._tiles[Q];te.hasSymbolBuckets&&!te.holdingForFade()?te.setHoldDuration(this.map._fadeDuration):te.hasSymbolBuckets&&!te.symbolFadeFinished()||this._removeTile(Q)}this._updateLoadedParentTileCache()}},o.prototype.releaseSymbolFadeTiles=function(){for(var n in this._tiles)this._tiles[n].holdingForFade()&&this._removeTile(n)},o.prototype._updateRetainedTiles=function(n,s){for(var p={},f={},d=Math.max(s-o.maxOverzooming,this._source.minzoom),y=Math.max(s+o.maxUnderzooming,this._source.minzoom),v={},S=0,z=n;S<z.length;S+=1){var C=z[S],k=this._addTile(C);p[C.key]=C,k.hasData()||s<this._source.maxzoom&&(v[C.key]=C)}this._retainLoadedChildren(v,s,y,p);for(var F=0,R=n;F<R.length;F+=1){var j=R[F],D=this._tiles[j.key];if(!D.hasData()){if(s+1>this._source.maxzoom){var N=j.children(this._source.maxzoom)[0],G=this.getTile(N);if(G&&G.hasData()){p[N.key]=N;continue}}else{var K=j.children(this._source.maxzoom);if(p[K[0].key]&&p[K[1].key]&&p[K[2].key]&&p[K[3].key])continue}for(var ee=D.wasRequested(),Q=j.overscaledZ-1;Q>=d;--Q){var te=j.scaledTo(Q);if(f[te.key]||(f[te.key]=!0,!(D=this.getTile(te))&&ee&&(D=this._addTile(te)),D&&(p[te.key]=te,ee=D.wasRequested(),D.hasData())))break}}}return p},o.prototype._updateLoadedParentTileCache=function(){for(var n in this._loadedParentTiles={},this._tiles){for(var s=[],p=void 0,f=this._tiles[n].tileID;f.overscaledZ>0;){if(f.key in this._loadedParentTiles){p=this._loadedParentTiles[f.key];break}s.push(f.key);var d=f.scaledTo(f.overscaledZ-1);if(p=this._getLoadedTile(d))break;f=d}for(var y=0,v=s;y<v.length;y+=1)this._loadedParentTiles[v[y]]=p}},o.prototype._addTile=function(n){var s=this._tiles[n.key];if(s)return s;(s=this._cache.getAndRemove(n))&&(this._setTileReloadTimer(n.key,s),s.tileID=n,this._state.initializeTileState(s,this.map?this.map.painter:null),this._cacheTimers[n.key]&&(clearTimeout(this._cacheTimers[n.key]),delete this._cacheTimers[n.key],this._setTileReloadTimer(n.key,s)));var p=!!s;return p||(s=new u.Tile(n,this._source.tileSize*n.overscaleFactor()),this._loadTile(s,this._tileLoaded.bind(this,s,n.key,s.state))),s?(s.uses++,this._tiles[n.key]=s,p||this._source.fire(new u.Event("dataloading",{tile:s,coord:s.tileID,dataType:"source"})),s):null},o.prototype._setTileReloadTimer=function(n,s){var p=this;n in this._timers&&(clearTimeout(this._timers[n]),delete this._timers[n]);var f=s.getExpiryTimeout();f&&(this._timers[n]=setTimeout(function(){p._reloadTile(n,"expired"),delete p._timers[n]},f))},o.prototype._removeTile=function(n){var s=this._tiles[n];s&&(s.uses--,delete this._tiles[n],this._timers[n]&&(clearTimeout(this._timers[n]),delete this._timers[n]),s.uses>0||(s.hasData()&&s.state!=="reloading"?this._cache.add(s.tileID,s,s.getExpiryTimeout()):(s.aborted=!0,this._abortTile(s),this._unloadTile(s))))},o.prototype.clearTiles=function(){for(var n in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(n);this._cache.reset()},o.prototype.tilesIn=function(n,s,p){var f=this,d=[],y=this.transform;if(!y)return d;for(var v=p?y.getCameraQueryGeometry(n):n,S=n.map(function(Q){return y.pointCoordinate(Q)}),z=v.map(function(Q){return y.pointCoordinate(Q)}),C=this.getIds(),k=1/0,F=1/0,R=-1/0,j=-1/0,D=0,N=z;D<N.length;D+=1){var G=N[D];k=Math.min(k,G.x),F=Math.min(F,G.y),R=Math.max(R,G.x),j=Math.max(j,G.y)}for(var K=function(Q){var te=f._tiles[C[Q]];if(!te.holdingForFade()){var oe=te.tileID,he=Math.pow(2,y.zoom-te.tileID.overscaledZ),pe=s*te.queryPadding*u.EXTENT/te.tileSize/he,be=[oe.getTilePoint(new u.MercatorCoordinate(k,F)),oe.getTilePoint(new u.MercatorCoordinate(R,j))];if(be[0].x-pe<u.EXTENT&&be[0].y-pe<u.EXTENT&&be[1].x+pe>=0&&be[1].y+pe>=0){var ke=S.map(function(Le){return oe.getTilePoint(Le)}),Be=z.map(function(Le){return oe.getTilePoint(Le)});d.push({tile:te,tileID:oe,queryGeometry:ke,cameraQueryGeometry:Be,scale:he})}}},ee=0;ee<C.length;ee++)K(ee);return d},o.prototype.getVisibleCoordinates=function(n){for(var s=this,p=this.getRenderableIds(n).map(function(v){return s._tiles[v].tileID}),f=0,d=p;f<d.length;f+=1){var y=d[f];y.posMatrix=this.transform.calculatePosMatrix(y.toUnwrapped())}return p},o.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(ae(this._source.type))for(var n in this._tiles){var s=this._tiles[n];if(s.fadeEndTime!==void 0&&s.fadeEndTime>=u.browser.now())return!0}return!1},o.prototype.setFeatureState=function(n,s,p){this._state.updateState(n=n||"_geojsonTileLayer",s,p)},o.prototype.removeFeatureState=function(n,s,p){this._state.removeFeatureState(n=n||"_geojsonTileLayer",s,p)},o.prototype.getFeatureState=function(n,s){return this._state.getState(n=n||"_geojsonTileLayer",s)},o.prototype.setDependencies=function(n,s,p){var f=this._tiles[n];f&&f.setDependencies(s,p)},o.prototype.reloadTilesForDependencies=function(n,s){for(var p in this._tiles)this._tiles[p].hasDependency(n,s)&&this._reloadTile(p,"reloading");this._cache.filter(function(f){return!f.hasDependency(n,s)})},o}(u.Evented);function H(i,o){var n=Math.abs(2*i.wrap)-+(i.wrap<0),s=Math.abs(2*o.wrap)-+(o.wrap<0);return i.overscaledZ-o.overscaledZ||s-n||o.canonical.y-i.canonical.y||o.canonical.x-i.canonical.x}function ae(i){return i==="raster"||i==="image"||i==="video"}function le(){return new u.window.Worker(Za.workerUrl)}U.maxOverzooming=10,U.maxUnderzooming=3;var re="mapboxgl_preloaded_worker_pool",se=function(){this.active={}};se.prototype.acquire=function(i){if(!this.workers)for(this.workers=[];this.workers.length<se.workerCount;)this.workers.push(new le);return this.active[i]=!0,this.workers.slice()},se.prototype.release=function(i){delete this.active[i],this.numActive()===0&&(this.workers.forEach(function(o){o.terminate()}),this.workers=null)},se.prototype.isPreloaded=function(){return!!this.active[re]},se.prototype.numActive=function(){return Object.keys(this.active).length};var Ie,Se=Math.floor(u.browser.hardwareConcurrency/2);function ie(){return Ie||(Ie=new se),Ie}function xe(i,o){var n={};for(var s in i)s!=="ref"&&(n[s]=i[s]);return u.refProperties.forEach(function(p){p in o&&(n[p]=o[p])}),n}function de(i){i=i.slice();for(var o=Object.create(null),n=0;n<i.length;n++)o[i[n].id]=i[n];for(var s=0;s<i.length;s++)"ref"in i[s]&&(i[s]=xe(i[s],o[i[s].ref]));return i}se.workerCount=Math.max(Math.min(Se,6),1);var ye={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function We(i,o,n){n.push({command:ye.addSource,args:[i,o[i]]})}function ge(i,o,n){o.push({command:ye.removeSource,args:[i]}),n[i]=!0}function et(i,o,n,s){ge(i,n,s),We(i,o,n)}function _t(i,o,n){var s;for(s in i[n])if(i[n].hasOwnProperty(s)&&s!=="data"&&!u.deepEqual(i[n][s],o[n][s]))return!1;for(s in o[n])if(o[n].hasOwnProperty(s)&&s!=="data"&&!u.deepEqual(i[n][s],o[n][s]))return!1;return!0}function He(i,o,n,s,p,f){var d;for(d in o=o||{},i=i||{})i.hasOwnProperty(d)&&(u.deepEqual(i[d],o[d])||n.push({command:f,args:[s,d,o[d],p]}));for(d in o)o.hasOwnProperty(d)&&!i.hasOwnProperty(d)&&(u.deepEqual(i[d],o[d])||n.push({command:f,args:[s,d,o[d],p]}))}function lt(i){return i.id}function rt(i,o){return i[o.id]=o,i}var _r=function(i,o){this.reset(i,o)};_r.prototype.reset=function(i,o){this.points=i||[],this._distances=[0];for(var n=1;n<this.points.length;n++)this._distances[n]=this._distances[n-1]+this.points[n].dist(this.points[n-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(o||0,.5*this.length),this.paddedLength=this.length-2*this.padding},_r.prototype.lerp=function(i){if(this.points.length===1)return this.points[0];i=u.clamp(i,0,1);for(var o=1,n=this._distances[o],s=i*this.paddedLength+this.padding;n<s&&o<this._distances.length;)n=this._distances[++o];var p=o-1,f=this._distances[p],d=n-f,y=d>0?(s-f)/d:0;return this.points[p].mult(1-y).add(this.points[o].mult(y))};var pt=function(i,o,n){var s=this.boxCells=[],p=this.circleCells=[];this.xCellCount=Math.ceil(i/n),this.yCellCount=Math.ceil(o/n);for(var f=0;f<this.xCellCount*this.yCellCount;f++)s.push([]),p.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=i,this.height=o,this.xScale=this.xCellCount/i,this.yScale=this.yCellCount/o,this.boxUid=0,this.circleUid=0};function Rt(i,o,n,s,p){var f=u.create();return o?(u.scale(f,f,[1/p,1/p,1]),n||u.rotateZ(f,f,s.angle)):u.multiply(f,s.labelPlaneMatrix,i),f}function dt(i,o,n,s,p){if(o){var f=u.clone(i);return u.scale(f,f,[p,p,1]),n||u.rotateZ(f,f,-s.angle),f}return s.glCoordMatrix}function Qe(i,o){var n=[i.x,i.y,0,1];tr(n,n,o);var s=n[3];return{point:new u.Point(n[0]/s,n[1]/s),signedDistanceFromCamera:s}}function ut(i,o){return .5+i/o*.5}function Ar(i,o){var n=i[0]/i[3],s=i[1]/i[3];return n>=-o[0]&&n<=o[0]&&s>=-o[1]&&s<=o[1]}function Vo(i,o,n,s,p,f,d,y){var v=s?i.textSizeData:i.iconSizeData,S=u.evaluateSizeForZoom(v,n.transform.zoom),z=[256/n.width*2+1,256/n.height*2+1],C=s?i.text.dynamicLayoutVertexArray:i.icon.dynamicLayoutVertexArray;C.clear();for(var k=i.lineVertexArray,F=s?i.text.placedSymbolArray:i.icon.placedSymbolArray,R=n.transform.width/n.transform.height,j=!1,D=0;D<F.length;D++){var N=F.get(D);if(N.hidden||N.writingMode===u.WritingMode.vertical&&!j)gr(N.numGlyphs,C);else{j=!1;var G=[N.anchorX,N.anchorY,0,1];if(u.transformMat4(G,G,o),Ar(G,z)){var K=ut(n.transform.cameraToCenterDistance,G[3]),ee=u.evaluateSizeForFeature(v,S,N),Q=d?ee/K:ee*K,te=new u.Point(N.anchorX,N.anchorY),oe=Qe(te,p).point,he={},pe=Ss(N,Q,!1,y,o,p,f,i.glyphOffsetArray,k,C,oe,te,he,R);j=pe.useVertical,(pe.notEnoughRoom||j||pe.needsFlipping&&Ss(N,Q,!0,y,o,p,f,i.glyphOffsetArray,k,C,oe,te,he,R).notEnoughRoom)&&gr(N.numGlyphs,C)}else gr(N.numGlyphs,C)}}s?i.text.dynamicLayoutVertexBuffer.updateData(C):i.icon.dynamicLayoutVertexBuffer.updateData(C)}function er(i,o,n,s,p,f,d,y,v,S,z){var C=y.glyphStartIndex+y.numGlyphs,k=y.lineStartIndex,F=y.lineStartIndex+y.lineLength,R=o.getoffsetX(y.glyphStartIndex),j=o.getoffsetX(C-1),D=Ot(i*R,n,s,p,f,d,y.segment,k,F,v,S,z);if(!D)return null;var N=Ot(i*j,n,s,p,f,d,y.segment,k,F,v,S,z);return N?{first:D,last:N}:null}function zr(i,o,n,s){return i===u.WritingMode.horizontal&&Math.abs(n.y-o.y)>Math.abs(n.x-o.x)*s?{useVertical:!0}:(i===u.WritingMode.vertical?o.y<n.y:o.x>n.x)?{needsFlipping:!0}:null}function Ss(i,o,n,s,p,f,d,y,v,S,z,C,k,F){var R,j=o/24,D=i.lineOffsetX*j,N=i.lineOffsetY*j;if(i.numGlyphs>1){var G=i.glyphStartIndex+i.numGlyphs,K=i.lineStartIndex,ee=i.lineStartIndex+i.lineLength,Q=er(j,y,D,N,n,z,C,i,v,f,k);if(!Q)return{notEnoughRoom:!0};var te=Qe(Q.first.point,d).point,oe=Qe(Q.last.point,d).point;if(s&&!n){var he=zr(i.writingMode,te,oe,F);if(he)return he}R=[Q.first];for(var pe=i.glyphStartIndex+1;pe<G-1;pe++)R.push(Ot(j*y.getoffsetX(pe),D,N,n,z,C,i.segment,K,ee,v,f,k));R.push(Q.last)}else{if(s&&!n){var be=Qe(C,p).point,ke=i.lineStartIndex+i.segment+1,Be=new u.Point(v.getx(ke),v.gety(ke)),Le=Qe(Be,p),nt=Le.signedDistanceFromCamera>0?Le.point:No(C,Be,be,1,p),we=zr(i.writingMode,be,nt,F);if(we)return we}var Ne=Ot(j*y.getoffsetX(i.glyphStartIndex),D,N,n,z,C,i.segment,i.lineStartIndex,i.lineStartIndex+i.lineLength,v,f,k);if(!Ne)return{notEnoughRoom:!0};R=[Ne]}for(var Ge=0,Ve=R;Ge<Ve.length;Ge+=1){var Ue=Ve[Ge];u.addDynamicAttributes(S,Ue.point,Ue.angle)}return{}}function No(i,o,n,s,p){var f=Qe(i.add(i.sub(o)._unit()),p).point,d=n.sub(f);return n.add(d._mult(s/d.mag()))}function Ot(i,o,n,s,p,f,d,y,v,S,z,C){var k=s?i-o:i+o,F=k>0?1:-1,R=0;s&&(F*=-1,R=Math.PI),F<0&&(R+=Math.PI);for(var j=F>0?y+d:y+d+1,D=p,N=p,G=0,K=0,ee=Math.abs(k),Q=[];G+K<=ee;){if((j+=F)<y||j>=v)return null;if(N=D,Q.push(D),(D=C[j])===void 0){var te=new u.Point(S.getx(j),S.gety(j)),oe=Qe(te,z);if(oe.signedDistanceFromCamera>0)D=C[j]=oe.point;else{var he=j-F;D=No(G===0?f:new u.Point(S.getx(he),S.gety(he)),te,N,ee-G+1,z)}}G+=K,K=N.dist(D)}var pe=(ee-G)/K,be=D.sub(N),ke=be.mult(pe)._add(N);ke._add(be._unit()._perp()._mult(n*F));var Be=R+Math.atan2(D.y-N.y,D.x-N.x);return Q.push(ke),{point:ke,angle:Be,path:Q}}pt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},pt.prototype.insert=function(i,o,n,s,p){this._forEachCell(o,n,s,p,this._insertBoxCell,this.boxUid++),this.boxKeys.push(i),this.bboxes.push(o),this.bboxes.push(n),this.bboxes.push(s),this.bboxes.push(p)},pt.prototype.insertCircle=function(i,o,n,s){this._forEachCell(o-s,n-s,o+s,n+s,this._insertCircleCell,this.circleUid++),this.circleKeys.push(i),this.circles.push(o),this.circles.push(n),this.circles.push(s)},pt.prototype._insertBoxCell=function(i,o,n,s,p,f){this.boxCells[p].push(f)},pt.prototype._insertCircleCell=function(i,o,n,s,p,f){this.circleCells[p].push(f)},pt.prototype._query=function(i,o,n,s,p,f){if(n<0||i>this.width||s<0||o>this.height)return!p&&[];var d=[];if(i<=0&&o<=0&&this.width<=n&&this.height<=s){if(p)return!0;for(var y=0;y<this.boxKeys.length;y++)d.push({key:this.boxKeys[y],x1:this.bboxes[4*y],y1:this.bboxes[4*y+1],x2:this.bboxes[4*y+2],y2:this.bboxes[4*y+3]});for(var v=0;v<this.circleKeys.length;v++){var S=this.circles[3*v],z=this.circles[3*v+1],C=this.circles[3*v+2];d.push({key:this.circleKeys[v],x1:S-C,y1:z-C,x2:S+C,y2:z+C})}return f?d.filter(f):d}return this._forEachCell(i,o,n,s,this._queryCell,d,{hitTest:p,seenUids:{box:{},circle:{}}},f),p?d.length>0:d},pt.prototype._queryCircle=function(i,o,n,s,p){var f=i-n,d=i+n,y=o-n,v=o+n;if(d<0||f>this.width||v<0||y>this.height)return!s&&[];var S=[];return this._forEachCell(f,y,d,v,this._queryCellCircle,S,{hitTest:s,circle:{x:i,y:o,radius:n},seenUids:{box:{},circle:{}}},p),s?S.length>0:S},pt.prototype.query=function(i,o,n,s,p){return this._query(i,o,n,s,!1,p)},pt.prototype.hitTest=function(i,o,n,s,p){return this._query(i,o,n,s,!0,p)},pt.prototype.hitTestCircle=function(i,o,n,s){return this._queryCircle(i,o,n,!0,s)},pt.prototype._queryCell=function(i,o,n,s,p,f,d,y){var v=d.seenUids,S=this.boxCells[p];if(S!==null)for(var z=this.bboxes,C=0,k=S;C<k.length;C+=1){var F=k[C];if(!v.box[F]){v.box[F]=!0;var R=4*F;if(i<=z[R+2]&&o<=z[R+3]&&n>=z[R+0]&&s>=z[R+1]&&(!y||y(this.boxKeys[F]))){if(d.hitTest)return f.push(!0),!0;f.push({key:this.boxKeys[F],x1:z[R],y1:z[R+1],x2:z[R+2],y2:z[R+3]})}}}var j=this.circleCells[p];if(j!==null)for(var D=this.circles,N=0,G=j;N<G.length;N+=1){var K=G[N];if(!v.circle[K]){v.circle[K]=!0;var ee=3*K;if(this._circleAndRectCollide(D[ee],D[ee+1],D[ee+2],i,o,n,s)&&(!y||y(this.circleKeys[K]))){if(d.hitTest)return f.push(!0),!0;var Q=D[ee],te=D[ee+1],oe=D[ee+2];f.push({key:this.circleKeys[K],x1:Q-oe,y1:te-oe,x2:Q+oe,y2:te+oe})}}}},pt.prototype._queryCellCircle=function(i,o,n,s,p,f,d,y){var v=d.circle,S=d.seenUids,z=this.boxCells[p];if(z!==null)for(var C=this.bboxes,k=0,F=z;k<F.length;k+=1){var R=F[k];if(!S.box[R]){S.box[R]=!0;var j=4*R;if(this._circleAndRectCollide(v.x,v.y,v.radius,C[j+0],C[j+1],C[j+2],C[j+3])&&(!y||y(this.boxKeys[R])))return f.push(!0),!0}}var D=this.circleCells[p];if(D!==null)for(var N=this.circles,G=0,K=D;G<K.length;G+=1){var ee=K[G];if(!S.circle[ee]){S.circle[ee]=!0;var Q=3*ee;if(this._circlesCollide(N[Q],N[Q+1],N[Q+2],v.x,v.y,v.radius)&&(!y||y(this.circleKeys[ee])))return f.push(!0),!0}}},pt.prototype._forEachCell=function(i,o,n,s,p,f,d,y){for(var v=this._convertToXCellCoord(i),S=this._convertToYCellCoord(o),z=this._convertToXCellCoord(n),C=this._convertToYCellCoord(s),k=v;k<=z;k++)for(var F=S;F<=C;F++)if(p.call(this,i,o,n,s,this.xCellCount*F+k,f,d,y))return},pt.prototype._convertToXCellCoord=function(i){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(i*this.xScale)))},pt.prototype._convertToYCellCoord=function(i){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(i*this.yScale)))},pt.prototype._circlesCollide=function(i,o,n,s,p,f){var d=s-i,y=p-o,v=n+f;return v*v>d*d+y*y},pt.prototype._circleAndRectCollide=function(i,o,n,s,p,f,d){var y=(f-s)/2,v=Math.abs(i-(s+y));if(v>y+n)return!1;var S=(d-p)/2,z=Math.abs(o-(p+S));if(z>S+n)return!1;if(v<=y||z<=S)return!0;var C=v-y,k=z-S;return C*C+k*k<=n*n};var jo=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function gr(i,o){for(var n=0;n<i;n++){var s=o.length;o.resize(s+4),o.float32.set(jo,3*s)}}function tr(i,o,n){var s=o[0],p=o[1];return i[0]=n[0]*s+n[4]*p+n[12],i[1]=n[1]*s+n[5]*p+n[13],i[3]=n[3]*s+n[7]*p+n[15],i}var ei=function(i,o,n){o===void 0&&(o=new pt(i.width+200,i.height+200,25)),n===void 0&&(n=new pt(i.width+200,i.height+200,25)),this.transform=i,this.grid=o,this.ignoredGrid=n,this.pitchfactor=Math.cos(i._pitch)*i.cameraToCenterDistance,this.screenRightBoundary=i.width+100,this.screenBottomBoundary=i.height+100,this.gridRightBoundary=i.width+200,this.gridBottomBoundary=i.height+200};function Tt(i,o,n){return o*(u.EXTENT/(i.tileSize*Math.pow(2,n-i.tileID.overscaledZ)))}ei.prototype.placeCollisionBox=function(i,o,n,s,p){var f=this.projectAndGetPerspectiveRatio(s,i.anchorPointX,i.anchorPointY),d=n*f.perspectiveRatio,y=i.x1*d+f.point.x,v=i.y1*d+f.point.y,S=i.x2*d+f.point.x,z=i.y2*d+f.point.y;return!this.isInsideGrid(y,v,S,z)||!o&&this.grid.hitTest(y,v,S,z,p)?{box:[],offscreen:!1}:{box:[y,v,S,z],offscreen:this.isOffscreen(y,v,S,z)}},ei.prototype.placeCollisionCircles=function(i,o,n,s,p,f,d,y,v,S,z,C,k){var F=[],R=new u.Point(o.anchorX,o.anchorY),j=Qe(R,f),D=ut(this.transform.cameraToCenterDistance,j.signedDistanceFromCamera),N=(S?p/D:p*D)/u.ONE_EM,G=Qe(R,d).point,K=er(N,s,o.lineOffsetX*N,o.lineOffsetY*N,!1,G,R,o,n,d,{}),ee=!1,Q=!1,te=!0;if(K){for(var oe=.5*C*D+k,he=new u.Point(-100,-100),pe=new u.Point(this.screenRightBoundary,this.screenBottomBoundary),be=new _r,ke=K.first,Be=K.last,Le=[],nt=ke.path.length-1;nt>=1;nt--)Le.push(ke.path[nt]);for(var we=1;we<Be.path.length;we++)Le.push(Be.path[we]);var Ne=2.5*oe;if(y){var Ge=Le.map(function(ai){return Qe(ai,y)});Le=Ge.some(function(ai){return ai.signedDistanceFromCamera<=0})?[]:Ge.map(function(ai){return ai.point})}var Ve=[];if(Le.length>0){for(var Ue=Le[0].clone(),Ze=Le[0].clone(),Fe=1;Fe<Le.length;Fe++)Ue.x=Math.min(Ue.x,Le[Fe].x),Ue.y=Math.min(Ue.y,Le[Fe].y),Ze.x=Math.max(Ze.x,Le[Fe].x),Ze.y=Math.max(Ze.y,Le[Fe].y);Ve=Ue.x>=he.x&&Ze.x<=pe.x&&Ue.y>=he.y&&Ze.y<=pe.y?[Le]:Ze.x<he.x||Ue.x>pe.x||Ze.y<he.y||Ue.y>pe.y?[]:u.clipLine([Le],he.x,he.y,pe.x,pe.y)}for(var Re=0,Ht=Ve;Re<Ht.length;Re+=1){var Mt;be.reset(Ht[Re],.25*oe),Mt=be.length<=.5*oe?1:Math.ceil(be.paddedLength/Ne)+1;for(var hr=0;hr<Mt;hr++){var ir=hr/Math.max(Mt-1,1),Pt=be.lerp(ir),Ft=Pt.x+100,Nr=Pt.y+100;F.push(Ft,Nr,oe,0);var wr=Ft-oe,pn=Nr-oe,Pr=Ft+oe,wi=Nr+oe;if(te=te&&this.isOffscreen(wr,pn,Pr,wi),Q=Q||this.isInsideGrid(wr,pn,Pr,wi),!i&&this.grid.hitTestCircle(Ft,Nr,oe,z)&&(ee=!0,!v))return{circles:[],offscreen:!1,collisionDetected:ee}}}}return{circles:!v&&ee||!Q?[]:F,offscreen:te,collisionDetected:ee}},ei.prototype.queryRenderedSymbols=function(i){if(i.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var o=[],n=1/0,s=1/0,p=-1/0,f=-1/0,d=0,y=i;d<y.length;d+=1){var v=y[d],S=new u.Point(v.x+100,v.y+100);n=Math.min(n,S.x),s=Math.min(s,S.y),p=Math.max(p,S.x),f=Math.max(f,S.y),o.push(S)}for(var z={},C={},k=0,F=this.grid.query(n,s,p,f).concat(this.ignoredGrid.query(n,s,p,f));k<F.length;k+=1){var R=F[k],j=R.key;if(z[j.bucketInstanceId]===void 0&&(z[j.bucketInstanceId]={}),!z[j.bucketInstanceId][j.featureIndex]){var D=[new u.Point(R.x1,R.y1),new u.Point(R.x2,R.y1),new u.Point(R.x2,R.y2),new u.Point(R.x1,R.y2)];u.polygonIntersectsPolygon(o,D)&&(z[j.bucketInstanceId][j.featureIndex]=!0,C[j.bucketInstanceId]===void 0&&(C[j.bucketInstanceId]=[]),C[j.bucketInstanceId].push(j.featureIndex))}}return C},ei.prototype.insertCollisionBox=function(i,o,n,s,p){(o?this.ignoredGrid:this.grid).insert({bucketInstanceId:n,featureIndex:s,collisionGroupID:p},i[0],i[1],i[2],i[3])},ei.prototype.insertCollisionCircles=function(i,o,n,s,p){for(var f=o?this.ignoredGrid:this.grid,d={bucketInstanceId:n,featureIndex:s,collisionGroupID:p},y=0;y<i.length;y+=4)f.insertCircle(d,i[y],i[y+1],i[y+2])},ei.prototype.projectAndGetPerspectiveRatio=function(i,o,n){var s=[o,n,0,1];return tr(s,s,i),{point:new u.Point((s[0]/s[3]+1)/2*this.transform.width+100,(-s[1]/s[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/s[3]*.5}},ei.prototype.isOffscreen=function(i,o,n,s){return n<100||i>=this.screenRightBoundary||s<100||o>this.screenBottomBoundary},ei.prototype.isInsideGrid=function(i,o,n,s){return n>=0&&i<this.gridRightBoundary&&s>=0&&o<this.gridBottomBoundary},ei.prototype.getViewportMatrix=function(){var i=u.identity([]);return u.translate(i,i,[-100,-100,0]),i};var yi=function(i,o,n,s){this.opacity=i?Math.max(0,Math.min(1,i.opacity+(i.placed?o:-o))):s&&n?1:0,this.placed=n};yi.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var Zr=function(i,o,n,s,p){this.text=new yi(i?i.text:null,o,n,p),this.icon=new yi(i?i.icon:null,o,s,p)};Zr.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var vl=function(i,o,n){this.text=i,this.icon=o,this.skipFade=n},ti=function(){this.invProjMatrix=u.create(),this.viewportMatrix=u.create(),this.circles=[]},Cu=function(i,o,n,s,p){this.bucketInstanceId=i,this.featureIndex=o,this.sourceLayerIndex=n,this.bucketIndex=s,this.tileID=p},Ui=function(i){this.crossSourceCollisions=i,this.maxGroupID=0,this.collisionGroups={}};function lr(i,o,n,s,p){var f=u.getAnchorAlignment(i),d=-(f.horizontalAlign-.5)*o,y=-(f.verticalAlign-.5)*n,v=u.evaluateVariableOffset(i,s);return new u.Point(d+v[0]*p,y+v[1]*p)}function Ei(i,o,n,s,p,f){var d=i.x1,y=i.x2,v=i.y1,S=i.y2,z=i.anchorPointX,C=i.anchorPointY,k=new u.Point(o,n);return s&&k._rotate(p?f:-f),{x1:d+k.x,y1:v+k.y,x2:y+k.x,y2:S+k.y,anchorPointX:z,anchorPointY:C}}Ui.prototype.get=function(i){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[i]){var o=++this.maxGroupID;this.collisionGroups[i]={ID:o,predicate:function(n){return n.collisionGroupID===o}}}return this.collisionGroups[i]};var vr=function(i,o,n,s){this.transform=i.clone(),this.collisionIndex=new ei(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=o,this.retainedQueryData={},this.collisionGroups=new Ui(n),this.collisionCircleArrays={},this.prevPlacement=s,s&&(s.prevPlacement=void 0),this.placedOrientations={}};function Cn(i,o,n,s,p){i.emplaceBack(o?1:0,n?1:0,s||0,p||0),i.emplaceBack(o?1:0,n?1:0,s||0,p||0),i.emplaceBack(o?1:0,n?1:0,s||0,p||0),i.emplaceBack(o?1:0,n?1:0,s||0,p||0)}vr.prototype.getBucketParts=function(i,o,n,s){var p=n.getBucket(o),f=n.latestFeatureIndex;if(p&&f&&o.id===p.layerIds[0]){var d=n.collisionBoxArray,y=p.layers[0].layout,v=Math.pow(2,this.transform.zoom-n.tileID.overscaledZ),S=n.tileSize/u.EXTENT,z=this.transform.calculatePosMatrix(n.tileID.toUnwrapped()),C=y.get("text-pitch-alignment")==="map",k=y.get("text-rotation-alignment")==="map",F=Tt(n,1,this.transform.zoom),R=Rt(z,C,k,this.transform,F),j=null;if(C){var D=dt(z,C,k,this.transform,F);j=u.multiply([],this.transform.labelPlaneMatrix,D)}this.retainedQueryData[p.bucketInstanceId]=new Cu(p.bucketInstanceId,f,p.sourceLayerIndex,p.index,n.tileID);var N={bucket:p,layout:y,posMatrix:z,textLabelPlaneMatrix:R,labelToScreenMatrix:j,scale:v,textPixelRatio:S,holdingForFade:n.holdingForFade(),collisionBoxArray:d,partiallyEvaluatedTextSize:u.evaluateSizeForZoom(p.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(p.sourceID)};if(s)for(var G=0,K=p.sortKeyRanges;G<K.length;G+=1){var ee=K[G];i.push({sortKey:ee.sortKey,symbolInstanceStart:ee.symbolInstanceStart,symbolInstanceEnd:ee.symbolInstanceEnd,parameters:N})}else i.push({symbolInstanceStart:0,symbolInstanceEnd:p.symbolInstances.length,parameters:N})}},vr.prototype.attemptAnchorPlacement=function(i,o,n,s,p,f,d,y,v,S,z,C,k,F,R){var j,D=[C.textOffset0,C.textOffset1],N=lr(i,n,s,D,p),G=this.collisionIndex.placeCollisionBox(Ei(o,N.x,N.y,f,d,this.transform.angle),z,y,v,S.predicate);if(!R||this.collisionIndex.placeCollisionBox(Ei(R,N.x,N.y,f,d,this.transform.angle),z,y,v,S.predicate).box.length!==0)return G.box.length>0?(this.prevPlacement&&this.prevPlacement.variableOffsets[C.crossTileID]&&this.prevPlacement.placements[C.crossTileID]&&this.prevPlacement.placements[C.crossTileID].text&&(j=this.prevPlacement.variableOffsets[C.crossTileID].anchor),this.variableOffsets[C.crossTileID]={textOffset:D,width:n,height:s,anchor:i,textBoxScale:p,prevAnchor:j},this.markUsedJustification(k,i,C,F),k.allowVerticalPlacement&&(this.markUsedOrientation(k,F,C),this.placedOrientations[C.crossTileID]=F),{shift:N,placedGlyphBoxes:G}):void 0},vr.prototype.placeLayerBucketPart=function(i,o,n){var s=this,p=i.parameters,f=p.bucket,d=p.layout,y=p.posMatrix,v=p.textLabelPlaneMatrix,S=p.labelToScreenMatrix,z=p.textPixelRatio,C=p.holdingForFade,k=p.collisionBoxArray,F=p.partiallyEvaluatedTextSize,R=p.collisionGroup,j=d.get("text-optional"),D=d.get("icon-optional"),N=d.get("text-allow-overlap"),G=d.get("icon-allow-overlap"),K=d.get("text-rotation-alignment")==="map",ee=d.get("text-pitch-alignment")==="map",Q=d.get("icon-text-fit")!=="none",te=d.get("symbol-z-order")==="viewport-y",oe=N&&(G||!f.hasIconData()||D),he=G&&(N||!f.hasTextData()||j);!f.collisionArrays&&k&&f.deserializeCollisionBoxes(k);var pe=function(we,Ne){if(!o[we.crossTileID])if(C)s.placements[we.crossTileID]=new vl(!1,!1,!1);else{var Ge,Ve=!1,Ue=!1,Ze=!0,Fe=null,Re={box:null,offscreen:null},Ht={box:null,offscreen:null},Mt=null,hr=null,ir=0,Pt=0,Ft=0;Ne.textFeatureIndex?ir=Ne.textFeatureIndex:we.useRuntimeCollisionCircles&&(ir=we.featureIndex),Ne.verticalTextFeatureIndex&&(Pt=Ne.verticalTextFeatureIndex);var Nr=Ne.textBox;if(Nr){var wr=function(ct){var Wr=u.WritingMode.horizontal;if(f.allowVerticalPlacement&&!ct&&s.prevPlacement){var Cr=s.prevPlacement.placedOrientations[we.crossTileID];Cr&&(s.placedOrientations[we.crossTileID]=Cr,s.markUsedOrientation(f,Wr=Cr,we))}return Wr},pn=function(ct,Wr){if(f.allowVerticalPlacement&&we.numVerticalGlyphVertices>0&&Ne.verticalTextBox)for(var Cr=0,Kn=f.writingModes;Cr<Kn.length&&(Kn[Cr]===u.WritingMode.vertical?(Re=Wr(),Ht=Re):Re=ct(),!(Re&&Re.box&&Re.box.length));Cr+=1);else Re=ct()};if(d.get("text-variable-anchor")){var Pr=d.get("text-variable-anchor");if(s.prevPlacement&&s.prevPlacement.variableOffsets[we.crossTileID]){var wi=s.prevPlacement.variableOffsets[we.crossTileID];Pr.indexOf(wi.anchor)>0&&(Pr=Pr.filter(function(ct){return ct!==wi.anchor})).unshift(wi.anchor)}var ai=function(ct,Wr,Cr){for(var Kn=ct.x2-ct.x1,Zu=ct.y2-ct.y1,Ga=we.textBoxScale,Gu=Q&&!G?Wr:null,ua={box:[],offscreen:!1},Jl=N?2*Pr.length:Pr.length,Eo=0;Eo<Jl;++Eo){var Xa=s.attemptAnchorPlacement(Pr[Eo%Pr.length],ct,Kn,Zu,Ga,K,ee,z,y,R,Eo>=Pr.length,we,f,Cr,Gu);if(Xa&&(ua=Xa.placedGlyphBoxes)&&ua.box&&ua.box.length){Ve=!0,Fe=Xa.shift;break}}return ua};pn(function(){return ai(Nr,Ne.iconBox,u.WritingMode.horizontal)},function(){var ct=Ne.verticalTextBox;return f.allowVerticalPlacement&&!(Re&&Re.box&&Re.box.length)&&we.numVerticalGlyphVertices>0&&ct?ai(ct,Ne.verticalIconBox,u.WritingMode.vertical):{box:null,offscreen:null}}),Re&&(Ve=Re.box,Ze=Re.offscreen);var aa=wr(Re&&Re.box);if(!Ve&&s.prevPlacement){var To=s.prevPlacement.variableOffsets[we.crossTileID];To&&(s.variableOffsets[we.crossTileID]=To,s.markUsedJustification(f,To.anchor,we,aa))}}else{var hn=function(ct,Wr){var Cr=s.collisionIndex.placeCollisionBox(ct,N,z,y,R.predicate);return Cr&&Cr.box&&Cr.box.length&&(s.markUsedOrientation(f,Wr,we),s.placedOrientations[we.crossTileID]=Wr),Cr};pn(function(){return hn(Nr,u.WritingMode.horizontal)},function(){var ct=Ne.verticalTextBox;return f.allowVerticalPlacement&&we.numVerticalGlyphVertices>0&&ct?hn(ct,u.WritingMode.vertical):{box:null,offscreen:null}}),wr(Re&&Re.box&&Re.box.length)}}if(Ve=(Ge=Re)&&Ge.box&&Ge.box.length>0,Ze=Ge&&Ge.offscreen,we.useRuntimeCollisionCircles){var Io=f.text.placedSymbolArray.get(we.centerJustifiedTextSymbolIndex),sa=u.evaluateSizeForFeature(f.textSizeData,F,Io),Ci=d.get("text-padding");Mt=s.collisionIndex.placeCollisionCircles(N,Io,f.lineVertexArray,f.glyphOffsetArray,sa,y,v,S,n,ee,R.predicate,we.collisionCircleDiameter,Ci),Ve=N||Mt.circles.length>0&&!Mt.collisionDetected,Ze=Ze&&Mt.offscreen}if(Ne.iconFeatureIndex&&(Ft=Ne.iconFeatureIndex),Ne.iconBox){var la=function(ct){var Wr=Q&&Fe?Ei(ct,Fe.x,Fe.y,K,ee,s.transform.angle):ct;return s.collisionIndex.placeCollisionBox(Wr,G,z,y,R.predicate)};Ue=Ht&&Ht.box&&Ht.box.length&&Ne.verticalIconBox?(hr=la(Ne.verticalIconBox)).box.length>0:(hr=la(Ne.iconBox)).box.length>0,Ze=Ze&&hr.offscreen}var ki=j||we.numHorizontalGlyphVertices===0&&we.numVerticalGlyphVertices===0,Jt=D||we.numIconVertices===0;if(ki||Jt?Jt?ki||(Ue=Ue&&Ve):Ve=Ue&&Ve:Ue=Ve=Ue&&Ve,Ve&&Ge&&Ge.box&&s.collisionIndex.insertCollisionBox(Ge.box,d.get("text-ignore-placement"),f.bucketInstanceId,Ht&&Ht.box&&Pt?Pt:ir,R.ID),Ue&&hr&&s.collisionIndex.insertCollisionBox(hr.box,d.get("icon-ignore-placement"),f.bucketInstanceId,Ft,R.ID),Mt&&(Ve&&s.collisionIndex.insertCollisionCircles(Mt.circles,d.get("text-ignore-placement"),f.bucketInstanceId,ir,R.ID),n)){var qi=f.bucketInstanceId,fn=s.collisionCircleArrays[qi];fn===void 0&&(fn=s.collisionCircleArrays[qi]=new ti);for(var Wn=0;Wn<Mt.circles.length;Wn+=4)fn.circles.push(Mt.circles[Wn+0]),fn.circles.push(Mt.circles[Wn+1]),fn.circles.push(Mt.circles[Wn+2]),fn.circles.push(Mt.collisionDetected?1:0)}s.placements[we.crossTileID]=new vl(Ve||oe,Ue||he,Ze||f.justReloaded),o[we.crossTileID]=!0}};if(te)for(var be=f.getSortedSymbolIndexes(this.transform.angle),ke=be.length-1;ke>=0;--ke){var Be=be[ke];pe(f.symbolInstances.get(Be),f.collisionArrays[Be])}else for(var Le=i.symbolInstanceStart;Le<i.symbolInstanceEnd;Le++)pe(f.symbolInstances.get(Le),f.collisionArrays[Le]);if(n&&f.bucketInstanceId in this.collisionCircleArrays){var nt=this.collisionCircleArrays[f.bucketInstanceId];u.invert(nt.invProjMatrix,y),nt.viewportMatrix=this.collisionIndex.getViewportMatrix()}f.justReloaded=!1},vr.prototype.markUsedJustification=function(i,o,n,s){var p;p=s===u.WritingMode.vertical?n.verticalPlacedTextSymbolIndex:{left:n.leftJustifiedTextSymbolIndex,center:n.centerJustifiedTextSymbolIndex,right:n.rightJustifiedTextSymbolIndex}[u.getAnchorJustification(o)];for(var f=0,d=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex,n.verticalPlacedTextSymbolIndex];f<d.length;f+=1){var y=d[f];y>=0&&(i.text.placedSymbolArray.get(y).crossTileID=p>=0&&y!==p?0:n.crossTileID)}},vr.prototype.markUsedOrientation=function(i,o,n){for(var s=o===u.WritingMode.horizontal||o===u.WritingMode.horizontalOnly?o:0,p=o===u.WritingMode.vertical?o:0,f=0,d=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];f<d.length;f+=1)i.text.placedSymbolArray.get(d[f]).placedOrientation=s;n.verticalPlacedTextSymbolIndex&&(i.text.placedSymbolArray.get(n.verticalPlacedTextSymbolIndex).placedOrientation=p)},vr.prototype.commit=function(i){this.commitTime=i,this.zoomAtLastRecencyCheck=this.transform.zoom;var o=this.prevPlacement,n=!1;this.prevZoomAdjustment=o?o.zoomAdjustment(this.transform.zoom):0;var s=o?o.symbolFadeChange(i):1,p=o?o.opacities:{},f=o?o.variableOffsets:{},d=o?o.placedOrientations:{};for(var y in this.placements){var v=this.placements[y],S=p[y];S?(this.opacities[y]=new Zr(S,s,v.text,v.icon),n=n||v.text!==S.text.placed||v.icon!==S.icon.placed):(this.opacities[y]=new Zr(null,s,v.text,v.icon,v.skipFade),n=n||v.text||v.icon)}for(var z in p){var C=p[z];if(!this.opacities[z]){var k=new Zr(C,s,!1,!1);k.isHidden()||(this.opacities[z]=k,n=n||C.text.placed||C.icon.placed)}}for(var F in f)this.variableOffsets[F]||!this.opacities[F]||this.opacities[F].isHidden()||(this.variableOffsets[F]=f[F]);for(var R in d)this.placedOrientations[R]||!this.opacities[R]||this.opacities[R].isHidden()||(this.placedOrientations[R]=d[R]);n?this.lastPlacementChangeTime=i:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=o?o.lastPlacementChangeTime:i)},vr.prototype.updateLayerOpacities=function(i,o){for(var n={},s=0,p=o;s<p.length;s+=1){var f=p[s],d=f.getBucket(i);d&&f.latestFeatureIndex&&i.id===d.layerIds[0]&&this.updateBucketOpacities(d,n,f.collisionBoxArray)}},vr.prototype.updateBucketOpacities=function(i,o,n){var s=this;i.hasTextData()&&i.text.opacityVertexArray.clear(),i.hasIconData()&&i.icon.opacityVertexArray.clear(),i.hasIconCollisionBoxData()&&i.iconCollisionBox.collisionVertexArray.clear(),i.hasTextCollisionBoxData()&&i.textCollisionBox.collisionVertexArray.clear();var p=i.layers[0].layout,f=new Zr(null,0,!1,!1,!0),d=p.get("text-allow-overlap"),y=p.get("icon-allow-overlap"),v=p.get("text-variable-anchor"),S=p.get("text-rotation-alignment")==="map",z=p.get("text-pitch-alignment")==="map",C=p.get("icon-text-fit")!=="none",k=new Zr(null,0,d&&(y||!i.hasIconData()||p.get("icon-optional")),y&&(d||!i.hasTextData()||p.get("text-optional")),!0);!i.collisionArrays&&n&&(i.hasIconCollisionBoxData()||i.hasTextCollisionBoxData())&&i.deserializeCollisionBoxes(n);for(var F=function(N,G,K){for(var ee=0;ee<G/4;ee++)N.opacityVertexArray.emplaceBack(K)},R=function(N){var G=i.symbolInstances.get(N),K=G.numHorizontalGlyphVertices,ee=G.numVerticalGlyphVertices,Q=G.crossTileID,te=s.opacities[Q];o[Q]?te=f:te||(s.opacities[Q]=te=k),o[Q]=!0;var oe=G.numIconVertices>0,he=s.placedOrientations[G.crossTileID],pe=he===u.WritingMode.vertical,be=he===u.WritingMode.horizontal||he===u.WritingMode.horizontalOnly;if(K>0||ee>0){var ke=wl(te.text);F(i.text,K,pe?ho:ke),F(i.text,ee,be?ho:ke);var Be=te.text.isHidden();[G.rightJustifiedTextSymbolIndex,G.centerJustifiedTextSymbolIndex,G.leftJustifiedTextSymbolIndex].forEach(function(Re){Re>=0&&(i.text.placedSymbolArray.get(Re).hidden=Be||pe?1:0)}),G.verticalPlacedTextSymbolIndex>=0&&(i.text.placedSymbolArray.get(G.verticalPlacedTextSymbolIndex).hidden=Be||be?1:0);var Le=s.variableOffsets[G.crossTileID];Le&&s.markUsedJustification(i,Le.anchor,G,he);var nt=s.placedOrientations[G.crossTileID];nt&&(s.markUsedJustification(i,"left",G,nt),s.markUsedOrientation(i,nt,G))}if(oe){var we=wl(te.icon),Ne=!(C&&G.verticalPlacedIconSymbolIndex&&pe);G.placedIconSymbolIndex>=0&&(F(i.icon,G.numIconVertices,Ne?we:ho),i.icon.placedSymbolArray.get(G.placedIconSymbolIndex).hidden=te.icon.isHidden()),G.verticalPlacedIconSymbolIndex>=0&&(F(i.icon,G.numVerticalIconVertices,Ne?ho:we),i.icon.placedSymbolArray.get(G.verticalPlacedIconSymbolIndex).hidden=te.icon.isHidden())}if(i.hasIconCollisionBoxData()||i.hasTextCollisionBoxData()){var Ge=i.collisionArrays[N];if(Ge){var Ve=new u.Point(0,0);if(Ge.textBox||Ge.verticalTextBox){var Ue=!0;if(v){var Ze=s.variableOffsets[Q];Ze?(Ve=lr(Ze.anchor,Ze.width,Ze.height,Ze.textOffset,Ze.textBoxScale),S&&Ve._rotate(z?s.transform.angle:-s.transform.angle)):Ue=!1}Ge.textBox&&Cn(i.textCollisionBox.collisionVertexArray,te.text.placed,!Ue||pe,Ve.x,Ve.y),Ge.verticalTextBox&&Cn(i.textCollisionBox.collisionVertexArray,te.text.placed,!Ue||be,Ve.x,Ve.y)}var Fe=!!(!be&&Ge.verticalIconBox);Ge.iconBox&&Cn(i.iconCollisionBox.collisionVertexArray,te.icon.placed,Fe,C?Ve.x:0,C?Ve.y:0),Ge.verticalIconBox&&Cn(i.iconCollisionBox.collisionVertexArray,te.icon.placed,!Fe,C?Ve.x:0,C?Ve.y:0)}}},j=0;j<i.symbolInstances.length;j++)R(j);if(i.sortFeatures(this.transform.angle),this.retainedQueryData[i.bucketInstanceId]&&(this.retainedQueryData[i.bucketInstanceId].featureSortOrder=i.featureSortOrder),i.hasTextData()&&i.text.opacityVertexBuffer&&i.text.opacityVertexBuffer.updateData(i.text.opacityVertexArray),i.hasIconData()&&i.icon.opacityVertexBuffer&&i.icon.opacityVertexBuffer.updateData(i.icon.opacityVertexArray),i.hasIconCollisionBoxData()&&i.iconCollisionBox.collisionVertexBuffer&&i.iconCollisionBox.collisionVertexBuffer.updateData(i.iconCollisionBox.collisionVertexArray),i.hasTextCollisionBoxData()&&i.textCollisionBox.collisionVertexBuffer&&i.textCollisionBox.collisionVertexBuffer.updateData(i.textCollisionBox.collisionVertexArray),i.bucketInstanceId in this.collisionCircleArrays){var D=this.collisionCircleArrays[i.bucketInstanceId];i.placementInvProjMatrix=D.invProjMatrix,i.placementViewportMatrix=D.viewportMatrix,i.collisionCircleArray=D.circles,delete this.collisionCircleArrays[i.bucketInstanceId]}},vr.prototype.symbolFadeChange=function(i){return this.fadeDuration===0?1:(i-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},vr.prototype.zoomAdjustment=function(i){return Math.max(0,(this.transform.zoom-i)/1.5)},vr.prototype.hasTransitions=function(i){return this.stale||i-this.lastPlacementChangeTime<this.fadeDuration},vr.prototype.stillRecent=function(i,o){var n=this.zoomAtLastRecencyCheck===o?1-this.zoomAdjustment(o):1;return this.zoomAtLastRecencyCheck=o,this.commitTime+this.fadeDuration*n>i},vr.prototype.setStale=function(){this.stale=!0};var ku=Math.pow(2,25),Mu=Math.pow(2,24),Ts=Math.pow(2,17),Du=Math.pow(2,16),xl=Math.pow(2,9),Lu=Math.pow(2,8),bl=Math.pow(2,1);function wl(i){if(i.opacity===0&&!i.placed)return 0;if(i.opacity===1&&i.placed)return 4294967295;var o=i.placed?1:0,n=Math.floor(127*i.opacity);return n*ku+o*Mu+n*Ts+o*Du+n*xl+o*Lu+n*bl+o}var ho=0,Is=function(i){this._sortAcrossTiles=i.layout.get("symbol-z-order")!=="viewport-y"&&i.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Is.prototype.continuePlacement=function(i,o,n,s,p){for(var f=this._bucketParts;this._currentTileIndex<i.length;)if(o.getBucketParts(f,s,i[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,p())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,f.sort(function(d,y){return d.sortKey-y.sortKey}));this._currentPartIndex<f.length;)if(o.placeLayerBucketPart(f[this._currentPartIndex],this._seenCrossTileIDs,n),this._currentPartIndex++,p())return!0;return!1};var qo=function(i,o,n,s,p,f,d){this.placement=new vr(i,p,f,d),this._currentPlacementIndex=o.length-1,this._forceFullPlacement=n,this._showCollisionBoxes=s,this._done=!1};qo.prototype.isDone=function(){return this._done},qo.prototype.continuePlacement=function(i,o,n){for(var s=this,p=u.browser.now(),f=function(){var v=u.browser.now()-p;return!s._forceFullPlacement&&v>2};this._currentPlacementIndex>=0;){var d=o[i[this._currentPlacementIndex]],y=this.placement.collisionIndex.transform.zoom;if(d.type==="symbol"&&(!d.minzoom||d.minzoom<=y)&&(!d.maxzoom||d.maxzoom>y)){if(this._inProgressLayer||(this._inProgressLayer=new Is(d)),this._inProgressLayer.continuePlacement(n[d.source],this.placement,this._showCollisionBoxes,d,f))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},qo.prototype.commit=function(i){return this.placement.commit(i),this.placement};var Sl=512/u.EXTENT/2,Ia=function(i,o,n){this.tileID=i,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(var s=0;s<o.length;s++){var p=o.get(s),f=p.key;this.indexedSymbolInstances[f]||(this.indexedSymbolInstances[f]=[]),this.indexedSymbolInstances[f].push({crossTileID:p.crossTileID,coord:this.getScaledCoordinates(p,i)})}};Ia.prototype.getScaledCoordinates=function(i,o){var n=Sl/Math.pow(2,o.canonical.z-this.tileID.canonical.z);return{x:Math.floor((o.canonical.x*u.EXTENT+i.anchorX)*n),y:Math.floor((o.canonical.y*u.EXTENT+i.anchorY)*n)}},Ia.prototype.findMatches=function(i,o,n){for(var s=this.tileID.canonical.z<o.canonical.z?1:Math.pow(2,this.tileID.canonical.z-o.canonical.z),p=0;p<i.length;p++){var f=i.get(p);if(!f.crossTileID){var d=this.indexedSymbolInstances[f.key];if(d)for(var y=this.getScaledCoordinates(f,o),v=0,S=d;v<S.length;v+=1){var z=S[v];if(Math.abs(z.coord.x-y.x)<=s&&Math.abs(z.coord.y-y.y)<=s&&!n[z.crossTileID]){n[z.crossTileID]=!0,f.crossTileID=z.crossTileID;break}}}}};var ri=function(){this.maxCrossTileID=0};ri.prototype.generate=function(){return++this.maxCrossTileID};var Ji=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Ji.prototype.handleWrapJump=function(i){var o=Math.round((i-this.lng)/360);if(o!==0)for(var n in this.indexes){var s=this.indexes[n],p={};for(var f in s){var d=s[f];d.tileID=d.tileID.unwrapTo(d.tileID.wrap+o),p[d.tileID.key]=d}this.indexes[n]=p}this.lng=i},Ji.prototype.addBucket=function(i,o,n){if(this.indexes[i.overscaledZ]&&this.indexes[i.overscaledZ][i.key]){if(this.indexes[i.overscaledZ][i.key].bucketInstanceId===o.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(i.overscaledZ,this.indexes[i.overscaledZ][i.key])}for(var s=0;s<o.symbolInstances.length;s++)o.symbolInstances.get(s).crossTileID=0;this.usedCrossTileIDs[i.overscaledZ]||(this.usedCrossTileIDs[i.overscaledZ]={});var p=this.usedCrossTileIDs[i.overscaledZ];for(var f in this.indexes){var d=this.indexes[f];if(Number(f)>i.overscaledZ)for(var y in d){var v=d[y];v.tileID.isChildOf(i)&&v.findMatches(o.symbolInstances,i,p)}else{var S=d[i.scaledTo(Number(f)).key];S&&S.findMatches(o.symbolInstances,i,p)}}for(var z=0;z<o.symbolInstances.length;z++){var C=o.symbolInstances.get(z);C.crossTileID||(C.crossTileID=n.generate(),p[C.crossTileID]=!0)}return this.indexes[i.overscaledZ]===void 0&&(this.indexes[i.overscaledZ]={}),this.indexes[i.overscaledZ][i.key]=new Ia(i,o.symbolInstances,o.bucketInstanceId),!0},Ji.prototype.removeBucketCrossTileIDs=function(i,o){for(var n in o.indexedSymbolInstances)for(var s=0,p=o.indexedSymbolInstances[n];s<p.length;s+=1)delete this.usedCrossTileIDs[i][p[s].crossTileID]},Ji.prototype.removeStaleBuckets=function(i){var o=!1;for(var n in this.indexes){var s=this.indexes[n];for(var p in s)i[s[p].bucketInstanceId]||(this.removeBucketCrossTileIDs(n,s[p]),delete s[p],o=!0)}return o};var Yi=function(){this.layerIndexes={},this.crossTileIDs=new ri,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Yi.prototype.addLayer=function(i,o,n){var s=this.layerIndexes[i.id];s===void 0&&(s=this.layerIndexes[i.id]=new Ji);var p=!1,f={};s.handleWrapJump(n);for(var d=0,y=o;d<y.length;d+=1){var v=y[d],S=v.getBucket(i);S&&i.id===S.layerIds[0]&&(S.bucketInstanceId||(S.bucketInstanceId=++this.maxBucketInstanceId),s.addBucket(v.tileID,S,this.crossTileIDs)&&(p=!0),f[S.bucketInstanceId]=!0)}return s.removeStaleBuckets(f)&&(p=!0),p},Yi.prototype.pruneUnusedLayers=function(i){var o={};for(var n in i.forEach(function(s){o[s]=!0}),this.layerIndexes)o[n]||delete this.layerIndexes[n]};var kn=function(i,o){return u.emitValidationErrors(i,o&&o.filter(function(n){return n.identifier!=="source.canvas"}))},Qi=u.pick(ye,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),$i=u.pick(ye,["setCenter","setZoom","setBearing","setPitch"]),Ea=function(){var i={},o=u.styleSpec.$version;for(var n in u.styleSpec.$root){var s,p=u.styleSpec.$root[n];p.required&&(s=n==="version"?o:p.type==="array"?[]:{})!=null&&(i[n]=s)}return i}(),Br=function(i){function o(n,s){var p=this;s===void 0&&(s={}),i.call(this),this.map=n,this.dispatcher=new Lr(ie(),this),this.imageManager=new sr,this.imageManager.setEventedParent(this),this.glyphManager=new mr(n._requestManager,s.localIdeographFontFamily),this.lineAtlas=new kt(256,512),this.crossTileSymbolIndex=new Yi,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new u.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",u.getReferrer());var f=this;this._rtlTextPluginCallback=o.registerForPluginStateChange(function(d){f.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:d.pluginStatus,pluginURL:d.pluginURL},function(y,v){if(u.triggerPluginCompletionEvent(y),v&&v.every(function(z){return z}))for(var S in f.sourceCaches)f.sourceCaches[S].reload()})}),this.on("data",function(d){if(d.dataType==="source"&&d.sourceDataType==="metadata"){var y=p.sourceCaches[d.sourceId];if(y){var v=y.getSource();if(v&&v.vectorLayerIds)for(var S in p._layers){var z=p._layers[S];z.source===v.id&&p._validateLayer(z)}}}})}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.loadURL=function(n,s){var p=this;s===void 0&&(s={}),this.fire(new u.Event("dataloading",{dataType:"style"}));var f=typeof s.validate=="boolean"?s.validate:!u.isMapboxURL(n);n=this.map._requestManager.normalizeStyleURL(n,s.accessToken);var d=this.map._requestManager.transformRequest(n,u.ResourceType.Style);this._request=u.getJSON(d,function(y,v){p._request=null,y?p.fire(new u.ErrorEvent(y)):v&&p._load(v,f)})},o.prototype.loadJSON=function(n,s){var p=this;s===void 0&&(s={}),this.fire(new u.Event("dataloading",{dataType:"style"})),this._request=u.browser.frame(function(){p._request=null,p._load(n,s.validate!==!1)})},o.prototype.loadEmpty=function(){this.fire(new u.Event("dataloading",{dataType:"style"})),this._load(Ea,!1)},o.prototype._load=function(n,s){if(!s||!kn(this,u.validateStyle(n))){for(var p in this._loaded=!0,this.stylesheet=n,n.sources)this.addSource(p,n.sources[p],{validate:!1});n.sprite?this._loadSprite(n.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(n.glyphs);var f=de(this.stylesheet.layers);this._order=f.map(function(S){return S.id}),this._layers={},this._serializedLayers={};for(var d=0,y=f;d<y.length;d+=1){var v=y[d];(v=u.createStyleLayer(v)).setEventedParent(this,{layer:{id:v.id}}),this._layers[v.id]=v,this._serializedLayers[v.id]=v.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new no(this.stylesheet.light),this.fire(new u.Event("data",{dataType:"style"})),this.fire(new u.Event("style.load"))}},o.prototype._loadSprite=function(n){var s=this;this._spriteRequest=function(p,f,d){var y,v,S,z=u.browser.devicePixelRatio>1?"@2x":"",C=u.getJSON(f.transformRequest(f.normalizeSpriteURL(p,z,".json"),u.ResourceType.SpriteJSON),function(R,j){C=null,S||(S=R,y=j,F())}),k=u.getImage(f.transformRequest(f.normalizeSpriteURL(p,z,".png"),u.ResourceType.SpriteImage),function(R,j){k=null,S||(S=R,v=j,F())});function F(){if(S)d(S);else if(y&&v){var R=u.browser.getImageData(v),j={};for(var D in y){var N=y[D],G=N.width,K=N.height,ee=N.x,Q=N.y,te=N.sdf,oe=N.pixelRatio,he=N.stretchX,pe=N.stretchY,be=N.content,ke=new u.RGBAImage({width:G,height:K});u.RGBAImage.copy(R,ke,{x:ee,y:Q},{x:0,y:0},{width:G,height:K}),j[D]={data:ke,pixelRatio:oe,sdf:te,stretchX:he,stretchY:pe,content:be}}d(null,j)}}return{cancel:function(){C&&(C.cancel(),C=null),k&&(k.cancel(),k=null)}}}(n,this.map._requestManager,function(p,f){if(s._spriteRequest=null,p)s.fire(new u.ErrorEvent(p));else if(f)for(var d in f)s.imageManager.addImage(d,f[d]);s.imageManager.setLoaded(!0),s._availableImages=s.imageManager.listImages(),s.dispatcher.broadcast("setImages",s._availableImages),s.fire(new u.Event("data",{dataType:"style"}))})},o.prototype._validateLayer=function(n){var s=this.sourceCaches[n.source];if(s){var p=n.sourceLayer;if(p){var f=s.getSource();(f.type==="geojson"||f.vectorLayerIds&&f.vectorLayerIds.indexOf(p)===-1)&&this.fire(new u.ErrorEvent(new Error('Source layer "'+p+'" does not exist on source "'+f.id+'" as specified by style layer "'+n.id+'"')))}}},o.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var n in this.sourceCaches)if(!this.sourceCaches[n].loaded())return!1;return!!this.imageManager.isLoaded()},o.prototype._serializeLayers=function(n){for(var s=[],p=0,f=n;p<f.length;p+=1){var d=this._layers[f[p]];d.type!=="custom"&&s.push(d.serialize())}return s},o.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var n in this.sourceCaches)if(this.sourceCaches[n].hasTransition())return!0;for(var s in this._layers)if(this._layers[s].hasTransition())return!0;return!1},o.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},o.prototype.update=function(n){if(this._loaded){var s=this._changed;if(this._changed){var p=Object.keys(this._updatedLayers),f=Object.keys(this._removedLayers);for(var d in(p.length||f.length)&&this._updateWorkerLayers(p,f),this._updatedSources){var y=this._updatedSources[d];y==="reload"?this._reloadSource(d):y==="clear"&&this._clearSource(d)}for(var v in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[v].updateTransitions(n);this.light.updateTransitions(n),this._resetUpdates()}var S={};for(var z in this.sourceCaches){var C=this.sourceCaches[z];S[z]=C.used,C.used=!1}for(var k=0,F=this._order;k<F.length;k+=1){var R=this._layers[F[k]];R.recalculate(n,this._availableImages),!R.isHidden(n.zoom)&&R.source&&(this.sourceCaches[R.source].used=!0)}for(var j in S){var D=this.sourceCaches[j];S[j]!==D.used&&D.fire(new u.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:j}))}this.light.recalculate(n),this.z=n.zoom,s&&this.fire(new u.Event("data",{dataType:"style"}))}},o.prototype._updateTilesForChangedImages=function(){var n=Object.keys(this._changedImages);if(n.length){for(var s in this.sourceCaches)this.sourceCaches[s].reloadTilesForDependencies(["icons","patterns"],n);this._changedImages={}}},o.prototype._updateWorkerLayers=function(n,s){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(n),removedIds:s})},o.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},o.prototype.setState=function(n){var s=this;if(this._checkLoaded(),kn(this,u.validateStyle(n)))return!1;(n=u.clone$1(n)).layers=de(n.layers);var p=function(d,y){if(!d)return[{command:ye.setStyle,args:[y]}];var v=[];try{if(!u.deepEqual(d.version,y.version))return[{command:ye.setStyle,args:[y]}];u.deepEqual(d.center,y.center)||v.push({command:ye.setCenter,args:[y.center]}),u.deepEqual(d.zoom,y.zoom)||v.push({command:ye.setZoom,args:[y.zoom]}),u.deepEqual(d.bearing,y.bearing)||v.push({command:ye.setBearing,args:[y.bearing]}),u.deepEqual(d.pitch,y.pitch)||v.push({command:ye.setPitch,args:[y.pitch]}),u.deepEqual(d.sprite,y.sprite)||v.push({command:ye.setSprite,args:[y.sprite]}),u.deepEqual(d.glyphs,y.glyphs)||v.push({command:ye.setGlyphs,args:[y.glyphs]}),u.deepEqual(d.transition,y.transition)||v.push({command:ye.setTransition,args:[y.transition]}),u.deepEqual(d.light,y.light)||v.push({command:ye.setLight,args:[y.light]});var S={},z=[];(function(k,F,R,j){var D;for(D in F=F||{},k=k||{})k.hasOwnProperty(D)&&(F.hasOwnProperty(D)||ge(D,R,j));for(D in F)F.hasOwnProperty(D)&&(k.hasOwnProperty(D)?u.deepEqual(k[D],F[D])||(k[D].type==="geojson"&&F[D].type==="geojson"&&_t(k,F,D)?R.push({command:ye.setGeoJSONSourceData,args:[D,F[D].data]}):et(D,F,R,j)):We(D,F,R))})(d.sources,y.sources,z,S);var C=[];d.layers&&d.layers.forEach(function(k){S[k.source]?v.push({command:ye.removeLayer,args:[k.id]}):C.push(k)}),v=v.concat(z),function(k,F,R){F=F||[];var j,D,N,G,K,ee,Q,te=(k=k||[]).map(lt),oe=F.map(lt),he=k.reduce(rt,{}),pe=F.reduce(rt,{}),be=te.slice(),ke=Object.create(null);for(j=0,D=0;j<te.length;j++)pe.hasOwnProperty(N=te[j])?D++:(R.push({command:ye.removeLayer,args:[N]}),be.splice(be.indexOf(N,D),1));for(j=0,D=0;j<oe.length;j++)be[be.length-1-j]!==(N=oe[oe.length-1-j])&&(he.hasOwnProperty(N)?(R.push({command:ye.removeLayer,args:[N]}),be.splice(be.lastIndexOf(N,be.length-D),1)):D++,R.push({command:ye.addLayer,args:[pe[N],ee=be[be.length-j]]}),be.splice(be.length-j,0,N),ke[N]=!0);for(j=0;j<oe.length;j++)if(G=he[N=oe[j]],K=pe[N],!ke[N]&&!u.deepEqual(G,K))if(u.deepEqual(G.source,K.source)&&u.deepEqual(G["source-layer"],K["source-layer"])&&u.deepEqual(G.type,K.type)){for(Q in He(G.layout,K.layout,R,N,null,ye.setLayoutProperty),He(G.paint,K.paint,R,N,null,ye.setPaintProperty),u.deepEqual(G.filter,K.filter)||R.push({command:ye.setFilter,args:[N,K.filter]}),u.deepEqual(G.minzoom,K.minzoom)&&u.deepEqual(G.maxzoom,K.maxzoom)||R.push({command:ye.setLayerZoomRange,args:[N,K.minzoom,K.maxzoom]}),G)G.hasOwnProperty(Q)&&Q!=="layout"&&Q!=="paint"&&Q!=="filter"&&Q!=="metadata"&&Q!=="minzoom"&&Q!=="maxzoom"&&(Q.indexOf("paint.")===0?He(G[Q],K[Q],R,N,Q.slice(6),ye.setPaintProperty):u.deepEqual(G[Q],K[Q])||R.push({command:ye.setLayerProperty,args:[N,Q,K[Q]]}));for(Q in K)K.hasOwnProperty(Q)&&!G.hasOwnProperty(Q)&&Q!=="layout"&&Q!=="paint"&&Q!=="filter"&&Q!=="metadata"&&Q!=="minzoom"&&Q!=="maxzoom"&&(Q.indexOf("paint.")===0?He(G[Q],K[Q],R,N,Q.slice(6),ye.setPaintProperty):u.deepEqual(G[Q],K[Q])||R.push({command:ye.setLayerProperty,args:[N,Q,K[Q]]}))}else R.push({command:ye.removeLayer,args:[N]}),ee=be[be.lastIndexOf(N)+1],R.push({command:ye.addLayer,args:[K,ee]})}(C,y.layers,v)}catch(k){console.warn("Unable to compute style diff:",k),v=[{command:ye.setStyle,args:[y]}]}return v}(this.serialize(),n).filter(function(d){return!(d.command in $i)});if(p.length===0)return!1;var f=p.filter(function(d){return!(d.command in Qi)});if(f.length>0)throw new Error("Unimplemented: "+f.map(function(d){return d.command}).join(", ")+".");return p.forEach(function(d){d.command!=="setTransition"&&s[d.command].apply(s,d.args)}),this.stylesheet=n,!0},o.prototype.addImage=function(n,s){if(this.getImage(n))return this.fire(new u.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(n,s),this._afterImageUpdated(n)},o.prototype.updateImage=function(n,s){this.imageManager.updateImage(n,s)},o.prototype.getImage=function(n){return this.imageManager.getImage(n)},o.prototype.removeImage=function(n){if(!this.getImage(n))return this.fire(new u.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(n),this._afterImageUpdated(n)},o.prototype._afterImageUpdated=function(n){this._availableImages=this.imageManager.listImages(),this._changedImages[n]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new u.Event("data",{dataType:"style"}))},o.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},o.prototype.addSource=function(n,s,p){var f=this;if(p===void 0&&(p={}),this._checkLoaded(),this.sourceCaches[n]!==void 0)throw new Error("There is already a source with this ID");if(!s.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(s).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(s.type)>=0&&this._validate(u.validateStyle.source,"sources."+n,s,null,p))){this.map&&this.map._collectResourceTiming&&(s.collectResourceTiming=!0);var d=this.sourceCaches[n]=new U(n,s,this.dispatcher);d.style=this,d.setEventedParent(this,function(){return{isSourceLoaded:f.loaded(),source:d.serialize(),sourceId:n}}),d.onAdd(this.map),this._changed=!0}},o.prototype.removeSource=function(n){if(this._checkLoaded(),this.sourceCaches[n]===void 0)throw new Error("There is no source with this ID");for(var s in this._layers)if(this._layers[s].source===n)return this.fire(new u.ErrorEvent(new Error('Source "'+n+'" cannot be removed while layer "'+s+'" is using it.')));var p=this.sourceCaches[n];delete this.sourceCaches[n],delete this._updatedSources[n],p.fire(new u.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:n})),p.setEventedParent(null),p.clearTiles(),p.onRemove&&p.onRemove(this.map),this._changed=!0},o.prototype.setGeoJSONSourceData=function(n,s){this._checkLoaded(),this.sourceCaches[n].getSource().setData(s),this._changed=!0},o.prototype.getSource=function(n){return this.sourceCaches[n]&&this.sourceCaches[n].getSource()},o.prototype.addLayer=function(n,s,p){p===void 0&&(p={}),this._checkLoaded();var f=n.id;if(this.getLayer(f))this.fire(new u.ErrorEvent(new Error('Layer with i
1d "'+f+'" already exists on this map')));else{var d;if(n.type==="custom"){if(kn(this,u.validateCustomStyleLayer(n)))return;d=u.createStyleLayer(n)}else{if(typeof n.source=="object"&&(this.addSource(f,n.source),n=u.clone$1(n),n=u.extend(n,{source:f})),this._validate(u.validateStyle.layer,"layers."+f,n,{arrayIndex:-1},p))return;d=u.createStyleLayer(n),this._validateLayer(d),d.setEventedParent(this,{layer:{id:f}}),this._serializedLayers[d.id]=d.serialize()}var y=s?this._order.indexOf(s):this._order.length;if(s&&y===-1)this.fire(new u.ErrorEvent(new Error('Layer with id "'+s+'" does not exist on this map.')));else{if(this._order.splice(y,0,f),this._layerOrderChanged=!0,this._layers[f]=d,this._removedLayers[f]&&d.source&&d.type!=="custom"){var v=this._removedLayers[f];delete this._removedLayers[f],v.type!==d.type?this._updatedSources[d.source]="clear":(this._updatedSources[d.source]="reload",this.sourceCaches[d.source].pause())}this._updateLayer(d),d.onAdd&&d.onAdd(this.map)}}},o.prototype.moveLayer=function(n,s){if(this._checkLoaded(),this._changed=!0,this._layers[n]){if(n!==s){var p=this._order.indexOf(n);this._order.splice(p,1);var f=s?this._order.indexOf(s):this._order.length;
vendor: 6,101 bytes, line 1
1s&&f===-1?this.fire(new u.ErrorEvent(new Error('Layer with id "'+s+'" does not exist on this map.'))):(this._order.splice(f,0,n),this._layerOrderChanged=!0)}}else this.fire(new u.ErrorEvent(new Error("The layer '"+n+"' does not exist in the map's style and cannot be moved.")))},o.prototype.removeLayer=function(n){this._checkLoaded();var s=this._layers[n];if(s){s.setEventedParent(null);var p=this._order.indexOf(n);this._order.splice(p,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[n]=s,delete this._layers[n],delete this._serializedLayers[n],delete this._updatedLayers[n],delete this._updatedPaintProps[n],s.onRemove&&s.onRemove(this.map)}else this.fire(new u.ErrorEvent(new Error("The layer '"+n+"' does not exist in the map's style and cannot be removed.")))},o.prototype.getLayer=function(n){return this._layers[n]},o.prototype.hasLayer=function(n){return n in this._layers},o.prototype.setLayerZoomRange=function(n,s,p){this._checkLoaded();var f=this.getLayer(n);f?f.minzoom===s&&f.maxzoom===p||(s!=null&&(f.minzoom=s),p!=null&&(f.maxzoom=p),this._updateLayer(f)):this.fire(new u.ErrorEvent(new Error("The layer '"+n+"' does not exist in the map's style and cannot have zoom extent.")))},o.prototype.setFilter=function(n,s,p){p===void 0&&(p={}),this._checkLoaded();var f=this.getLayer(n);if(f){if(!u.deepEqual(f.filter,s))return s==null?(f.filter=void 0,void this._updateLayer(f)):void(this._validate(u.validateStyle.filter,"layers."+f.id+".filter",s,null,p)||(f.filter=u.clone$1(s),this._updateLayer(f)))}else this.fire(new u.ErrorEvent(new Error("The layer '"+n+"' does not exist in the map's style and cannot be filtered.")))},o.prototype.getFilter=function(n){return u.clone$1(this.getLayer(n).filter)},o.prototype.setLayoutProperty=function(n,s,p,f){f===void 0&&(f={}),this._checkLoaded();var d=this.getLayer(n);d?u.deepEqual(d.getLayoutProperty(s),p)||(d.setLayoutProperty(s,p,f),this._updateLayer(d)):this.fire(new u.ErrorEvent(new Error("The layer '"+n+"' does not exist in the map's style and cannot be styled.")))},o.prototype.getLayoutProperty=function(n,s){var p=this.getLayer(n);if(p)return p.getLayoutProperty(s);this.fire(new u.ErrorEvent(new Error("The layer '"+n+"' does not exist in the map's style.")))},o.prototype.setPaintProperty=function(n,s,p,f){f===void 0&&(f={}),this._checkLoaded();var d=this.getLayer(n);d?u.deepEqual(d.getPaintProperty(s),p)||(d.setPaintProperty(s,p,f)&&this._updateLayer(d),this._changed=!0,this._updatedPaintProps[n]=!0):this.fire(new u.ErrorEvent(new Error("The layer '"+n+"' does not exist in the map's style and cannot be styled.")))},o.prototype.getPaintProperty=function(n,s){return this.getLayer(n).getPaintProperty(s)},o.prototype.setFeatureState=function(n,s){this._checkLoaded();var p=n.source,f=n.sourceLayer,d=this.sourceCaches[p];if(d!==void 0){var y=d.getSource().type;y==="geojson"&&f?this.fire(new u.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):y!=="vector"||f?(n.id===void 0&&this.fire(new u.ErrorEvent(new Error("The feature id parameter must be provided."))),d.setFeatureState(f,n.id,s)):this.fire(new u.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new u.ErrorEvent(new Error("The source '"+p+"' does not exist in the map's style.")))},o.prototype.removeFeatureState=function(n,s){this._checkLoaded();var p=n.source,f=this.sourceCaches[p];if(f!==void 0){var d=f.getSource().type,y=d==="vector"?n.sourceLayer:void 0;d!=="vector"||y?s&&typeof n.id!="string"&&typeof n.id!="number"?this.fire(new u.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):f.removeFeatureState(y,n.id,s):this.fire(new u.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new u.ErrorEvent(new Error("The source '"+p+"' does not exist in the map's style.")))},o.prototype.getFeatureState=function(n){this._checkLoaded();var s=n.source,p=n.sourceLayer,f=this.sourceCaches[s];if(f!==void 0){if(f.getSource().type!=="vector"||p)return n.id===void 0&&this.fire(new u.ErrorEvent(new Error("The feature id parameter must be provided."))),f.getFeatureState(p,n.id);this.fire(new u.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new u.ErrorEvent(new Error("The source '"+s+"' does not exist in the map's style.")))},o.prototype.getTransition=function(){return u.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},o.prototype.serialize=function(){return u.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:u.mapObject(this.sourceCaches,function(n){return n.serialize()}),layers:this._serializeLayers(this._order)},function(n){return n!==void 0})},o.prototype._updateLayer=function(n){this._updatedLayers[n.id]=!0,n.source&&!this._updatedSources[n.source]&&this.sourceCaches[n.source].getSource().type!=="raster"&&(this._updatedSources[n.source]="reload",this.sourceCaches[n.source].pause()),this._changed=!0},o.prototype._flattenAndSortRenderedFeatures=function(n){for(var s=this,p=function(he){return s._layers[he].type==="fill-extrusion"},f={},d=[],y=this._order.length-1;y>=0;y--){var v=this._order[y];if(p(v)){f[v]=y;for(var S=0,z=n;S<z.length;S+=1){var C=z[S][v];if(C)for(var k=0,F=C;k<F.length;k+=1)d.push(F[k])}}}d.sort(function(he,pe){return pe.intersectionZ-he.intersectionZ});for(var R=[],j=this._order.length-1;j>=0;j--){var D=this._order[j];if(p(D))for(var N=d.length-1;N>=0;N--){var G=d[N].feature;if(f[G.layer.id]<j)break;R.push(G),d.pop()}else for(var K=0,ee=n;K<ee.length;K+=1){var Q=ee[K][D];if(Q)for(var te=0,oe=Q;te<oe.length;te+=1)R.push(oe[te].feature)}}return R},o.prototype.queryRenderedFeatures=function(n,s,p){s&&s.filter&&this._val
vendor: 5,567 bytes, line 1
1idate(u.validateStyle.filter,"queryRenderedFeatures.filter",s.filter,null,s);var f={};if(s&&s.layers){if(!Array.isArray(s.layers))return this.fire(new u.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var d=0,y=s.layers;d<y.length;d+=1){var v=y[d],S=this._layers[v];if(!S)return this.fire(new u.ErrorEvent(new Error("The layer '"+v+"' does not exist in the map's style and cannot be queried for features."))),[];f[S.source]=!0}}var z=[];for(var C in s.availableImages=this._availableImages,this.sourceCaches)s.layers&&!f[C]||z.push(yr(this.sourceCaches[C],this._layers,this._serializedLayers,n,s,p));return this.placement&&z.push(function(k,F,R,j,D,N,G){for(var K={},ee=N.queryRenderedSymbols(j),Q=[],te=0,oe=Object.keys(ee).map(Number);te<oe.length;te+=1)Q.push(G[oe[te]]);Q.sort(Ri);for(var he=function(){var Le=be[pe],nt=Le.featureIndex.lookupSymbolFeatures(ee[Le.bucketInstanceId],F,Le.bucketIndex,Le.sourceLayerIndex,D.filter,D.layers,D.availableImages,k);for(var we in nt){var Ne=K[we]=K[we]||[],Ge=nt[we];Ge.sort(function(Ze,Fe){var Re=Le.featureSortOrder;if(Re){var Ht=Re.indexOf(Ze.featureIndex);return Re.indexOf(Fe.featureIndex)-Ht}return Fe.featureIndex-Ze.featureIndex});for(var Ve=0,Ue=Ge;Ve<Ue.length;Ve+=1)Ne.push(Ue[Ve])}},pe=0,be=Q;pe<be.length;pe+=1)he();var ke=function(Le){K[Le].forEach(function(nt){var we=nt.feature,Ne=R[k[Le].source].getFeatureState(we.layer["source-layer"],we.id);we.source=we.layer.source,we.layer["source-layer"]&&(we.sourceLayer=we.layer["source-layer"]),we.state=Ne})};for(var Be in K)ke(Be);return K}(this._layers,this._serializedLayers,this.sourceCaches,n,s,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(z)},o.prototype.querySourceFeatures=function(n,s){s&&s.filter&&this._validate(u.validateStyle.filter,"querySourceFeatures.filter",s.filter,null,s);var p=this.sourceCaches[n];return p?function(f,d){for(var y=f.getRenderableIds().map(function(F){return f.getTileByID(F)}),v=[],S={},z=0;z<y.length;z++){var C=y[z],k=C.tileID.canonical.key;S[k]||(S[k]=!0,C.querySourceFeatures(v,d))}return v}(p,s):[]},o.prototype.addSourceType=function(n,s,p){return o.getSourceType(n)?p(new Error('A source type called "'+n+'" already exists.')):(o.setSourceType(n,s),s.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:n,url:s.workerSourceURL},p):p(null,null))},o.prototype.getLight=function(){return this.light.getLight()},o.prototype.setLight=function(n,s){s===void 0&&(s={}),this._checkLoaded();var p=this.light.getLight(),f=!1;for(var d in n)if(!u.deepEqual(n[d],p[d])){f=!0;break}if(f){var y={now:u.browser.now(),transition:u.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(n,s),this.light.updateTransitions(y)}},o.prototype._validate=function(n,s,p,f,d){return d===void 0&&(d={}),(!d||d.validate!==!1)&&kn(this,n.call(u.validateStyle,u.extend({key:s,style:this.serialize(),value:p,styleSpec:u.styleSpec},f)))},o.prototype._remove=function(){for(var n in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),u.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[n].setEventedParent(null);for(var s in this.sourceCaches)this.sourceCaches[s].clearTiles(),this.sourceCaches[s].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},o.prototype._clearSource=function(n){this.sourceCaches[n].clearTiles()},o.prototype._reloadSource=function(n){this.sourceCaches[n].resume(),this.sourceCaches[n].reload()},o.prototype._updateSources=function(n){for(var s in this.sourceCaches)this.sourceCaches[s].update(n)},o.prototype._generateCollisionBoxes=function(){for(var n in this.sourceCaches)this._reloadSource(n)},o.prototype._updatePlacement=function(n,s,p,f,d){d===void 0&&(d=!1);for(var y=!1,v=!1,S={},z=0,C=this._order;z<C.length;z+=1){var k=this._layers[C[z]];if(k.type==="symbol"){if(!S[k.source]){var F=this.sourceCaches[k.source];S[k.source]=F.getRenderableIds(!0).map(function(G){return F.getTileByID(G)}).sort(function(G,K){return K.tileID.overscaledZ-G.tileID.overscaledZ||(G.tileID.isLessThan(K.tileID)?-1:1)})}var R=this.crossTileSymbolIndex.addLayer(k,S[k.source],n.center.lng);y=y||R}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((d=d||this._layerOrderChanged||p===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(u.browser.now(),n.zoom))&&(this.pauseablePlacement=new qo(n,this._order,d,s,p,f,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,S),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(u.browser.now()),v=!0),y&&this.pauseablePlacement.placement.setStale()),v||y)for(var j=0,D=this._order;j<D.length;j+=1){var N=this._layers[D[j]];N.type==="symbol"&&this.placement.updateLayerOpacities(N,S[N.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(u.browser.now())},o.prototype._releaseSymbolFadeTiles=function(){for(var n in this.sourceCaches)this.sourceCaches[n].releaseSymbolFadeTiles()},o.prototype.getImages=function(n,s,p){this.imageManager.getImages(s.icons,p),this._updateTilesForChangedImages();var f=this.sourceCaches[s.source];f&&f.setDependencies(s.tileID.key,s.type,s.icons)},o.prototype.getGlyphs=function(n,s,p){this.glyphManager.getGlyphs(s.stacks,p)}
1,o.prototype.getResource=function(n,s,p){return u.makeRequest(s,p)},o}(u.Evented);Br.getSourceType=function(i){return Ki[i]},Br.setSourceType=function(i,o){Ki[i]=o},Br.registerForPluginStateChange=u.registerForPluginStateChange;var jt=u.createLayout([{name:"a_pos",type:"Int16",components:2}]),fo=gt(`#ifdef GL_ES 2precision mediump float; 3#else 4#if !defined(lowp) 5#define lowp 6#endif 7#if !defined(mediump) 8#define mediump 9#endif 10#if !defined(highp) 11#define highp 12#endif 13#endif`,`#ifdef GL_ES 14precision highp float; 15#else 16#if !defined(lowp) 17#define lowp 18#endif 19#if !defined(mediump) 20#define mediump 21#endif 22#if !defined(highp) 23#define highp 24#endif 25#endif 26vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 27);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}`),Tl=gt(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; 28#ifdef OVERDRAW_INSPECTOR 29gl_FragColor=vec4(1.0); 30#endif 31}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Bu=gt(`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;varying vec2 v_pos_a;varying 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=texture2D(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=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; 32#ifdef OVERDRAW_INSPECTOR 33gl_FragColor=vec4(1.0); 34#endif 35}`,"uniform mat4 u_matrix;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;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);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);}"),Ru=gt(`varying vec3 v_data; 36#pragma mapbox: define highp vec4 color 37#pragma mapbox: define mediump float radius 38#pragma mapbox: define lowp float blur 39#pragma mapbox: define lowp float opacity 40#pragma mapbox: define highp vec4 stroke_color 41#pragma mapbox: define mediump float stroke_width 42#pragma mapbox: define lowp float stroke_opacity 43void main() { 44#pragma mapbox: initialize highp vec4 color 45#pragma mapbox: initialize mediump float radius 46#pragma mapbox: initialize lowp float blur 47#pragma mapbox: initialize lowp float opacity 48#pragma mapbox: initialize highp vec4 stroke_color 49#pragma mapbox: initialize mediump float stroke_width 50#pragma mapbox: initialize lowp float stroke_opacity 51vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);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
51/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); 52#ifdef OVERDRAW_INSPECTOR 53gl_FragColor=vec4(1.0); 54#endif 55}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data; 56#pragma mapbox: define highp vec4 color 57#pragma mapbox: define mediump float radius 58#pragma mapbox: define lowp float blur 59#pragma mapbox: define lowp float opacity 60#pragma mapbox: define highp vec4 stroke_color 61#pragma mapbox: define mediump float stroke_width 62#pragma mapbox: define lowp float stroke_opacity 63void main(void) { 64#pragma mapbox: initialize highp vec4 color 65#pragma mapbox: initialize mediump float radius 66#pragma mapbox: initialize lowp float blur 67#pragma mapbox: initialize lowp float opacity 68#pragma mapbox: initialize highp vec4 stroke_color 69#pragma mapbox: initialize mediump float stroke_width 70#pragma mapbox: initialize lowp float stroke_opacity 71vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);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;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),Es=gt("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),As=gt(`uniform highp float u_intensity;varying vec2 v_extrude; 72#pragma mapbox: define highp float weight 73#define GAUSS_COEF 0.3989422804014327 74void main() { 75#pragma mapbox: initialize highp float weight 76float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); 77#ifdef OVERDRAW_INSPECTOR 78gl_FragColor=vec4(1.0); 79#endif 80}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; 81#pragma mapbox: define highp float weight 82#pragma mapbox: define mediump float radius 83const highp float ZERO=1.0/255.0/16.0; 84#define GAUSS_COEF 0.3989422804014327 85void main(void) { 86#pragma mapbox: initialize highp float weight 87#pragma mapbox: initialize mediump float radius 88vec2 unscaled_extrude=vec2(mod(a_pos,2.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;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`),zs=gt(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; 89#ifdef OVERDRAW_INSPECTOR 90gl_FragColor=vec4(0.0); 91#endif 92}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying 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;}"),Ps=gt("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Il=gt("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),El=gt("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),Ou=gt(`#pragma mapbox: define highp vec4 color 93#pragma mapbox: define lowp float opacity 94void main() { 95#pragma mapbox: initialize highp vec4 color 96#pragma mapbox: initialize lowp float opacity 97gl_FragColor=color*opacity; 98#ifdef OVERDRAW_INSPECTOR 99gl_FragColor=vec4(1.0); 100#endif 101}`,`attribute vec2 a_pos;uniform mat4 u_matrix; 102#pragma mapbox: define highp vec4 color 103#pragma mapbox: define lowp float opacity 104void main() { 105#pragma mapbox: initialize highp vec4 color 106#pragma mapbox: initialize lowp float opacity 107gl_Position=u_matrix*vec4(a_pos,0,1);}`),Zo=gt(`varying vec2 v_pos; 108#pragma mapbox: define highp vec4 outline_color 109#pragma mapbox: define lowp float opacity 110void main() { 111#pragma mapbox: initialize highp vec4 outline_color 112#pragma mapbox: initialize lowp float opacity 113float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); 114#ifdef OVERDRAW_INSPECTOR 115gl_FragColor=vec4(1.0); 116#endif 117}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; 118#pragma mapbox: define highp vec4 outline_color 119#pragma mapbox: define lowp float opacity 120void main() { 121#pragma mapbox: initialize highp vec4 outline_color 122#pragma mapbox: initialize lowp float opacity 123gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),Go=gt(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; 124#pragma mapbox: define lowp float opacity 125#pragma mapbox: define lowp vec4 pattern_from 126#pragma mapbox: define lowp vec4 pattern_to 127void main() { 128#pragma mapbox: initialize lowp float opacity 129#pragma mapbox: initialize mediump vec4 pattern_from 130#pragma mapbox: initialize mediump vec4 pattern_to 131vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; 132#ifdef OVERDRAW_INSPECTOR 133gl_FragColor=vec4(1.0); 134#endif 135}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; 136#pragma mapbox: define lowp float opacity 137#pragma mapbox: define lowp vec4 pattern_from 138#pragma mapbox: define lowp vec4 pattern_to 139#pragma mapbox: define lowp float pixel_ratio_from 140#pragma mapbox: define lowp float pixel_ratio_to 141void main() { 142#pragma mapbox: initialize lowp float opacity 143#pragma mapbox: initialize mediump vec4 pattern_from 144#pragma mapbox: initialize mediump vec4 pattern_to 145#pragma mapbox: initialize lowp float pixel_ratio_from 146#pragma mapbox: initialize lowp float pixel_ratio_to 147vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),Al=gt(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; 148#pragma mapbox: define lowp float opacity 149#pragma mapbox: define lowp vec4 pattern_from 150#pragma mapbox: define lowp vec4 pattern_to 151void main() { 152#pragma mapbox: initialize lowp float opacity 153#pragma mapbox: initialize mediump vec4 pattern_from 154#pragma mapbox: initialize mediump vec4 pattern_to 155vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; 156#ifdef OVERDRAW_INSPECTOR 157gl_FragColor=vec4(1.0); 158#endif 159}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; 160#pragma mapbox: define lowp float opacity 161#pragma mapbox: define lowp vec4 pattern_from 162#pragma mapbox: define lowp vec4 pattern_to 163#pragma mapbox: define lowp float pixel_ratio_from 164#pragma mapbox: define lowp float pixel_ratio_to 165void main() { 166#pragma mapbox: initialize lowp float opacity 167#pragma mapbox: initialize mediump vec4 pattern_from 168#pragma mapbox: initialize mediump vec4 pattern_to 169#pragma mapbox: initialize lowp float pixel_ratio_from 170#pragma mapbox: initialize lowp float pixel_ratio_to 171vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),ur=gt(`varying vec4 v_color;void main() {gl_FragColor=v_color; 172#ifdef OVERDRAW_INSPECTOR 173gl_FragColor=vec4(1.0); 174#endif 175}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color; 176#pragma mapbox: define highp float base 177#pragma mapbox: define highp float height 178#pragma mapbox: define highp vec4 color 179void main() { 180#pragma mapbox: initialize highp float base 181#pragma mapbox: initialize highp float height 182#pragma mapbox: initialize highp vec4 color 183vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),Cs=gt(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; 184#pragma mapbox: define lowp float base 185#pragma mapbox: define lowp float height 186#pragma mapbox: define lowp vec4 pattern_from 187#pragma mapbox: define lowp vec4 pattern_to 188#pragma mapbox: define lowp float pixel_ratio_from 189#pragma mapbox: define lowp float pixel_ratio_to 190void main() { 191#pragma mapbox: initialize lowp float base 192#pragma mapbox: initialize lowp float height 193#pragma mapbox: initialize mediump vec4 pattern_from 194#pragma mapbox: initialize mediump vec4 pattern_to 195#pragma mapbox: initialize lowp float pixel_ratio_from 196#pragma mapbox: initialize lowp float pixel_ratio_to 197vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; 198#ifdef OVERDRAW_INSPECTOR 199gl_FragColor=vec4(1.0); 200#endif 201}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; 202#pragma mapbox: define lowp float base 203#pragma mapbox: define lowp float height 204#pragma mapbox: define lowp vec4 pattern_from 205#pragma mapbox: define lowp vec4 pattern_to 206#pragma mapbox: define lowp float pixel_ratio_from 207#pragma mapbox: define lowp float pixel_ratio_to 208void main() { 209#pragma mapbox: initialize lowp float base 210#pragma mapbox: initialize lowp float height 211#pragma mapbox: initialize mediump vec4 pat
211tern_from 212#pragma mapbox: initialize mediump vec4 pattern_to 213#pragma mapbox: initialize lowp float pixel_ratio_from 214#pragma mapbox: initialize lowp float pixel_ratio_to 215vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 216? a_pos 217: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),en=gt(`#ifdef GL_ES 218precision highp float; 219#endif 220uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); 221#ifdef OVERDRAW_INSPECTOR 222gl_FragColor=vec4(1.0); 223#endif 224}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),tn=gt(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; 225#define PI 3.141592653589793 226void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; 227#ifdef OVERDRAW_INSPECTOR 228gl_FragColor=vec4(1.0); 229#endif 230}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),Mn=gt(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; 231#pragma mapbox: define highp vec4 color 232#pragma mapbox: define lowp float blur 233#pragma mapbox: define lowp float opacity 234void main() { 235#pragma mapbox: initialize highp vec4 color 236#pragma mapbox: initialize lowp float blur 237#pragma mapbox: initialize lowp float opacity 238float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); 239#ifdef OVERDRAW_INSPECTOR 240gl_FragColor=vec4(1.0); 241#endif 242}`,` 243#define scale 0.015873016 244attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; 245#pragma mapbox: define highp vec4 color 246#pragma mapbox: define lowp float blur 247#pragma mapbox: define lowp float opacity 248#pragma mapbox: define mediump float gapwidth 249#pragma mapbox: define lowp float offset 250#pragma mapbox: define mediump float width 251void main() { 252#pragma mapbox: initialize highp vec4 color 253#pragma mapbox: initialize lowp float blur 254#pragma mapbox: initialize lowp float opacity 255#pragma mapbox: initialize mediump float gapwidth 256#pragma mapbox: initialize lowp float offset 257#pragma mapbox: initialize mediump float width 258float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),Dn=gt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; 259#pragma mapbox: define lowp float blur 260#pragma mapbox: define lowp float opacity 261void main() { 262#pragma mapbox: initialize lowp float blur 263#pragma mapbox: initialize lowp float opacity 264float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); 265#ifdef OVERDRAW_INSPECTOR 266gl_FragColor=vec4(1.0); 267#endif 268}`,` 269#define scale 0.015873016 270attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; 271#pragma mapbox: define lowp float blur 272#pragma mapbox: define lowp float opacity 273#pragma mapbox: define mediump float gapwidth 274#pragma mapbox: define lowp float offset 275#pragma mapbox: define mediump float width 276void main() { 277#pragma mapbox: initialize lowp float blur 278#pragma mapbox: initialize lowp float opacity 279#pragma mapbox: initialize mediump float gapwidth 280#pragma mapbox: initialize lowp float offset 281#pragma mapbox: initialize mediump float width 282float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),rn=gt(`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; 283#pragma mapbox: define lowp vec4 pattern_from 284#pragma mapbox: define lowp vec4 pattern_to 285#pragma mapbox: define lowp float pixel_ratio_from 286#pragma mapbox: define lowp float pixel_ratio_to 287#pragma mapbox: define lowp float blur 288#pragma mapbox: define lowp float opacity 289void main() { 290#pragma mapbox: initialize mediump vec4 pattern_from 291#pragma mapbox: initialize mediump vec4 pattern_to 292#pragma mapbox: initialize lowp float pixel_ratio_from 293#pragma mapbox: initialize lowp float pixel_ratio_to 294#pragma mapbox: initialize lowp float blur 295#pragma mapbox: initialize lowp float opacity 296vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; 297#ifdef OVERDRAW_INSPECTOR 298gl_FragColor=vec4(1.0); 299#endif 300}`,` 301#define scale 0.015873016 302#define LINE_DISTANCE_SCALE 2.0 303attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; 304#pragma mapbox: define lowp float blur 305#pragma mapbox: define lowp float opacity 306#pragma mapbox: define lowp float offset 307#pragma mapbox: define mediump float gapwidth 308#pragma mapbox: define mediump float width 309#pragma mapbox: define lowp float floorwidth 310#pragma mapbox: define lowp vec4 pattern_from 311#pragma mapbox: define lowp vec4 pattern_to 312#pragma mapbox: define lowp float pixel_ratio_from 313#pragma mapbox: define lowp float pixel_ratio_to 314void main() { 315#pragma mapbox: initialize lowp float blur 316#pragma mapbox: initialize lowp float opacity 317#pragma mapbox: initialize lowp float offset 318#pragma mapbox: initialize mediump float gapwidth 319#pragma mapbox: initialize mediump float width 320#pragma mapbox: initialize lowp float floorwidth 321#pragma mapbox: initialize mediump vec4 pattern_from 322#pragma mapbox: initialize mediump vec4 pattern_to 323#pragma mapbox: initialize lowp float pixel_ratio_from 324#pragma mapbox: initialize lowp float pixel_ratio_to 325float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),Ln=gt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;
325uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; 326#pragma mapbox: define highp vec4 color 327#pragma mapbox: define lowp float blur 328#pragma mapbox: define lowp float opacity 329#pragma mapbox: define mediump float width 330#pragma mapbox: define lowp float floorwidth 331void main() { 332#pragma mapbox: initialize highp vec4 color 333#pragma mapbox: initialize lowp float blur 334#pragma mapbox: initialize lowp float opacity 335#pragma mapbox: initialize mediump float width 336#pragma mapbox: initialize lowp float floorwidth 337float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); 338#ifdef OVERDRAW_INSPECTOR 339gl_FragColor=vec4(1.0); 340#endif 341}`,` 342#define scale 0.015873016 343#define LINE_DISTANCE_SCALE 2.0 344attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; 345#pragma mapbox: define highp vec4 color 346#pragma mapbox: define lowp float blur 347#pragma mapbox: define lowp float opacity 348#pragma mapbox: define mediump float gapwidth 349#pragma mapbox: define lowp float offset 350#pragma mapbox: define mediump float width 351#pragma mapbox: define lowp float floorwidth 352void main() { 353#pragma mapbox: initialize highp vec4 color 354#pragma mapbox: initialize lowp float blur 355#pragma mapbox: initialize lowp float opacity 356#pragma mapbox: initialize mediump float gapwidth 357#pragma mapbox: initialize lowp float offset 358#pragma mapbox: initialize mediump float width 359#pragma mapbox: initialize lowp float floorwidth 360float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),Bn=gt(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); 361#ifdef OVERDRAW_INSPECTOR 362gl_FragColor=vec4(1.0); 363#endif 364}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),nn=gt(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; 365#pragma mapbox: define lowp float opacity 366void main() { 367#pragma mapbox: initialize lowp float opacity 368lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; 369#ifdef OVERDRAW_INSPECTOR 370gl_FragColor=vec4(1.0); 371#endif 372}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; 373#pragma mapbox: define lowp float opacity 374void main() { 375#pragma mapbox: initialize lowp float opacity 376vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? 377camera_to_anchor_distance/u_camera_to_center_distance : 378u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`),zl=gt(`#define SDF_PX 8.0 379uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; 380#pragma mapbox: define highp vec4 fill_color 381#pragma mapbox: define highp vec4 halo_color 382#pragma mapbox: define lowp float opacity 383#pragma mapbox: define lowp float halo_width 384#pragma mapbox: define lowp float halo_blur 385void main() { 386#pragma mapbox: initialize highp vec4 fill_color 387#pragma mapbox: initialize highp vec4 halo_color 388#pragma mapbox: initialize lowp float opacity 389#pragma mapbox: initialize lowp float halo_width 390#pragma mapbox: initialize lowp float halo_blur 391float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); 392#ifdef OVERDRAW_INSPECTOR 393gl_FragColor=vec4(1.0); 394#endif 395}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; 396#pragma mapbox: define highp vec4 fill_color 397#pragma mapbox: define highp vec4 halo_color 398#pragma mapbox: define lowp float opacity 399#pragma mapbox: define lowp float halo_width 400#pragma mapbox: define lowp float halo_blur 401void main() { 402#pragma mapbox: initialize highp vec4 fill_color 403#pragma mapbox: initialize highp vec4 halo_color 404#pragma mapbox: initialize lowp float opacity 405#pragma mapbox: initialize lowp float halo_width 406#pragma mapbox: initialize lowp float halo_blur 407vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? 408camera_to_anchor_distance/u_camera_to_center_distance : 409u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),Pl=gt(`#define SDF_PX 8.0 410#define SDF 1.0 411#define ICON 0.0 412uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; 413#pragma mapbox: define highp vec4 fill_color 414#pragma mapbox: define highp vec4 halo_color 415#pragma mapbox: define lowp float opacity 416#pragma mapbox: define lowp float halo_width 417#pragma mapbox: define lowp float halo_blur 418void main() { 419#pragma mapbox: initialize highp vec4 fill_color 420#pragma mapbox: initialize highp vec4 halo_color 421#pragma mapbox: initialize lowp float opacity 422#pragma mapbox: initialize lowp float halo_width 423#pragma mapbox: initialize lowp float halo_blur 424float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;
424gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; 425#ifdef OVERDRAW_INSPECTOR 426gl_FragColor=vec4(1.0); 427#endif 428return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); 429#ifdef OVERDRAW_INSPECTOR 430gl_FragColor=vec4(1.0); 431#endif 432}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; 433#pragma mapbox: define highp vec4 fill_color 434#pragma mapbox: define highp vec4 halo_color 435#pragma mapbox: define lowp float opacity 436#pragma mapbox: define lowp float halo_width 437#pragma mapbox: define lowp float halo_blur 438void main() { 439#pragma mapbox: initialize highp vec4 fill_color 440#pragma mapbox: initialize highp vec4 halo_color 441#pragma mapbox: initialize lowp float opacity 442#pragma mapbox: initialize lowp float halo_width 443#pragma mapbox: initialize lowp float halo_blur 444vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? 445camera_to_anchor_distance/u_camera_to_center_distance : 446u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`);function gt(i,o){var n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,s=o.match(/attribute ([\w]+) ([\w]+)/g),p=i.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),f=o.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),d=f?f.concat(p):p,y={};return{fragmentSource:i=i.replace(n,function(v,S,z,C,k){return y[k]=!0,S==="define"?` 447#ifndef HAS_UNIFORM_u_`+k+` 448varying `+z+" "+C+" "+k+`; 449#else 450uniform `+z+" "+C+" u_"+k+`; 451#endif 452`:` 453#ifdef HAS_UNIFORM_u_`+k+` 454 `+z+" "+C+" "+k+" = u_"+k+`; 455#endif 456`}),vertexSource:o=o.replace(n,function(v,S,z,C,k){var F=C==="float"?"vec2":"vec4",R=k.match(/color/)?"color":F;return y[k]?S==="define"?` 457#ifndef HAS_UNIFORM_u_`+k+` 458uniform lowp float u_`+k+`_t; 459attribute `+z+" "+F+" a_"+k+`; 460varying `+z+" "+C+" "+k+`; 461#else 462uniform `+z+" "+C+" u_"+k+`; 463#endif 464`:R==="vec4"?` 465#ifndef HAS_UNIFORM_u_`+k+` 466 `+k+" = a_"+k+`; 467#else 468 `+z+" "+C+" "+k+" = u_"+k+`; 469#endif 470`:` 471#ifndef HAS_UNIFORM_u_`+k+` 472 `+k+" = unpack_mix_"+R+"(a_"+k+", u_"+k+`_t); 473#else 474 `+z+" "+C+" "+k+" = u_"+k+`; 475#endif 476`:S==="define"?` 477#ifndef HAS_UNIFORM_u_`+k+` 478uniform lowp float u_`+k+`_t; 479attribute `+z+" "+F+" a_"+k+`; 480#else 481uniform `+z+" "+C+" u_"+k+`; 482#endif 483`:R==="vec4"?` 484#ifndef HAS_UNIFORM_u_`+k+` 485 `+z+" "+C+" "+k+" = a_"+k+`; 486#else 487 `+z+" "+C+" "+k+" = u_"+k+`; 488#endif 489`:` 490#ifndef HAS_UNIFORM_u_`+k+` 491 `+z+" "+C+" "+k+" = unpack_mix_"+R+"(a_"+k+", u_"+k+`_t); 492#else 493 `+z+" "+C+" "+k+" = u_"+k+`; 494#endif 495`}),staticAttributes:s,staticUniforms:d}}var Fu=Object.freeze({__proto__:null,prelude:fo,background:Tl,backgroundPattern:Bu,circle:Ru,clippingMask:Es,heatmap:As,heatmapTexture:zs,collisionBox:Ps,collisionCircle:Il,debug:El,fill:Ou,fillOutline:Zo,fillOutlinePattern:Go,fillPattern:Al,fillExtrusion:ur,fillExtrusionPattern:Cs,hillshadePrepare:en,hillshade:tn,line:Mn,lineGradient:Dn,linePattern:rn,lineSDF:Ln,raster:Bn,symbolIcon:nn,symbolSDF:zl,symbolTextAndIcon:Pl}),Aa=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function Cl(i){for(var o=[],n=0;n<i.length;n++)if(i[n]!==null){var s=i[n].split(" ");o.push(s.pop())}return o}Aa.prototype.bind=function(i,o,n,s,p,f,d,y){this.context=i;for(var v=this.boundPaintVertexBuffers.length!==s.length,S=0;!v&&S<s.length;S++)this.boundPaintVertexBuffers[S]!==s[S]&&(v=!0);i.extVertexArrayObject&&this.vao&&this.boundProgram===o&&this.boundLayoutVertexBuffer===n&&!v&&this.boundIndexBuffer===p&&this.boundVertexOffset===f&&this.boundDynamicVertexBuffer===d&&this.boundDynamicVertexBuffer2===y?(i.bindVertexArrayOES.set(this.vao),d&&d.bind(),p&&p.dynamicDraw&&p.bind(),y&&y.bind()):this.freshBind(o,n,s,p,f,d,y)}
vendor: 11,358 bytes, lines 495-497
495,Aa.prototype.freshBind=function(i,o,n,s,p,f,d){var y,v=i.numAttributes,S=this.context,z=S.gl;if(S.extVertexArrayObject)this.vao&&this.destroy(),this.vao=S.extVertexArrayObject.createVertexArrayOES(),S.bindVertexArrayOES.set(this.vao),y=0,this.boundProgram=i,this.boundLayoutVertexBuffer=o,this.boundPaintVertexBuffers=n,this.boundIndexBuffer=s,this.boundVertexOffset=p,this.boundDynamicVertexBuffer=f,this.boundDynamicVertexBuffer2=d;else{y=S.currentNumAttributes||0;for(var C=v;C<y;C++)z.disableVertexAttribArray(C)}o.enableAttributes(z,i);for(var k=0,F=n;k<F.length;k+=1)F[k].enableAttributes(z,i);f&&f.enableAttributes(z,i),d&&d.enableAttributes(z,i),o.bind(),o.setVertexAttribPointers(z,i,p);for(var R=0,j=n;R<j.length;R+=1){var D=j[R];D.bind(),D.setVertexAttribPointers(z,i,p)}f&&(f.bind(),f.setVertexAttribPointers(z,i,p)),s&&s.bind(),d&&(d.bind(),d.setVertexAttribPointers(z,i,p)),S.currentNumAttributes=v},Aa.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var kl=function(i,o,n,s,p,f){var d=i.gl;this.program=d.createProgram();for(var y=Cl(n.staticAttributes),v=s?s.getBinderAttributes():[],S=y.concat(v),z=n.staticUniforms?Cl(n.staticUniforms):[],C=s?s.getBinderUniforms():[],k=[],F=0,R=z.concat(C);F<R.length;F+=1){var j=R[F];k.indexOf(j)<0&&k.push(j)}var D=s?s.defines():[];f&&D.push("#define OVERDRAW_INSPECTOR;");var N=D.concat(fo.fragmentSource,n.fragmentSource).join(` 496`),G=D.concat(fo.vertexSource,n.vertexSource).join(` 497`),K=d.createShader(d.FRAGMENT_SHADER);if(d.isContextLost())this.failedToCreate=!0;else{d.shaderSource(K,N),d.compileShader(K),d.attachShader(this.program,K);var ee=d.createShader(d.VERTEX_SHADER);if(d.isContextLost())this.failedToCreate=!0;else{d.shaderSource(ee,G),d.compileShader(ee),d.attachShader(this.program,ee),this.attributes={};var Q={};this.numAttributes=S.length;for(var te=0;te<this.numAttributes;te++)S[te]&&(d.bindAttribLocation(this.program,te,S[te]),this.attributes[S[te]]=te);d.linkProgram(this.program),d.deleteShader(ee),d.deleteShader(K);for(var oe=0;oe<k.length;oe++){var he=k[oe];if(he&&!Q[he]){var pe=d.getUniformLocation(this.program,he);pe&&(Q[he]=pe)}}this.fixedUniforms=p(i,Q),this.binderUniforms=s?s.getUniforms(i,Q):[]}}};function Ml(i,o,n){var s=1/Tt(n,1,o.transform.tileZoom),p=Math.pow(2,n.tileID.overscaledZ),f=n.tileSize*Math.pow(2,o.transform.tileZoom)/p,d=f*(n.tileID.canonical.x+n.tileID.wrap*p),y=f*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[s,i.fromScale,i.toScale],u_fade:i.t,u_pixel_coord_upper:[d>>16,y>>16],u_pixel_coord_lower:[65535&d,65535&y]}}kl.prototype.draw=function(i,o,n,s,p,f,d,y,v,S,z,C,k,F,R,j){var D,N=i.gl;if(!this.failedToCreate){for(var G in i.program.set(this.program),i.setDepthMode(n),i.setStencilMode(s),i.setColorMode(p),i.setCullFace(f),this.fixedUniforms)this.fixedUniforms[G].set(d[G]);F&&F.setUniforms(i,this.binderUniforms,C,{zoom:k});for(var K=(D={},D[N.LINES]=2,D[N.TRIANGLES]=3,D[N.LINE_STRIP]=1,D)[o],ee=0,Q=z.get();ee<Q.length;ee+=1){var te=Q[ee],oe=te.vaos||(te.vaos={});(oe[y]||(oe[y]=new Aa)).bind(i,this,v,F?F.getPaintVertexBuffers():[],S,te.vertexOffset,R,j),N.drawElements(o,te.primitiveLength*K,N.UNSIGNED_SHORT,te.primitiveOffset*K*2)}}};var Dl=function(i,o,n,s){var p=o.style.light,f=p.properties.get("position"),d=[f.x,f.y,f.z],y=u.create$1();p.properties.get("anchor")==="viewport"&&u.fromRotation(y,-o.transform.angle),u.transformMat3(d,d,y);var v=p.properties.get("color");return{u_matrix:i,u_lightpos:d,u_lightintensity:p.properties.get("intensity"),u_lightcolor:[v.r,v.g,v.b],u_vertical_gradient:+n,u_opacity:s}},Rn=function(i,o,n,s,p,f,d){return u.extend(Dl(i,o,n,s),Ml(f,o,d),{u_height_factor:-Math.pow(2,p.overscaledZ)/d.tileSize/8})},on=function(i){return{u_matrix:i}},On=function(i,o,n,s){return u.extend(on(i),Ml(n,o,s))},Ll=function(i,o){return{u_matrix:i,u_world:o}},Bl=function(i,o,n,s,p){return u.extend(On(i,o,n,s),{u_world:p})},ks=function(i,o,n,s){var p,f,d=i.transform;if(s.paint.get("circle-pitch-alignment")==="map"){var y=Tt(n,1,d.zoom);p=!0,f=[y,y]}else p=!1,f=d.pixelsToGLUnits;return{u_camera_to_center_distance:d.cameraToCenterDistance,u_scale_with_map:+(s.paint.get("circle-pitch-scale")==="map"),u_matrix:i.translatePosMatrix(o.posMatrix,n,s.paint.get("circle-translate"),s.paint.get("circle-translate-anchor")),u_pitch_with_map:+p,u_device_pixel_ratio:u.browser.devicePixelRatio,u_extrude_scale:f}},Fn=function(i,o,n){var s=Tt(n,1,o.zoom),p=Math.pow(2,o.zoom-n.tileID.overscaledZ),f=n.tileID.overscaleFactor();return{u_matrix:i,u_camera_to_center_distance:o.cameraToCenterDistance,u_pixels_to_tile_units:s,u_extrude_scale:[o.pixelsToGLUnits[0]/(s*p),o.pixelsToGLUnits[1]/(s*p)],u_overscale_factor:f}},Rl=function(i,o,n){return{u_matrix:i,u_inv_matrix:o,u_camera_to_center_distance:n.cameraToCenterDistance,u_viewport_size:[n.width,n.height]}},Un=function(i,o,n){return n===void 0&&(n=1),{u_matrix:i,u_color:o,u_overlay:0,u_overlay_scale:n}},Vn=function(i){return{u_matrix:i}},Ol=function(i,o,n,s){return{u_matrix:i,u_extrude_scale:Tt(o,1,n),u_intensity:s}},Xo=function(i,o,n){var s=i.transform;return{u_matrix:Fl(i,o,n),u_ratio:1/Tt(o,1,s.zoom),u_device_pixel_ratio:u.browser.devicePixelRatio,u_units_to_pixels:[1/s.pixelsToGLUnits[0],1/s.pixelsToGLUnits[1]]}},xt=function(i,o,n,s){return u.extend(Xo(i,o,n),{u_image:0,u_image_height:s})},za=function(i,o,n,s){var p=i.transform,f=mo(o,p);return{u_matrix:Fl(i,o,n),u_texsize:o.imageAtlasTexture.size,u_ratio:1/Tt(o,1,p.zoom),u_device_pixel_ratio:u.browser.devicePixelRatio,u_image:0,u_scale:[f,s.fromScale,s.toScale],u_fade:s.t,u_units_to_pixels:[1/p.pixelsToGLUnits[0],1/p.pixelsToGLUnits[1]]}},Uu=function(i,o,n,s,p){var f=i.lineAtlas,d=mo(o,i.transform),y=n.layout.get("line-cap")==="round",v=f.getDash(s.from,y),S=f.getDash(s.to,y),z=v.width*p.fromScale,C=S.width*p.toScale;return u.extend(Xo(i,o,n),{u_patternscale_a:[d/z,-v.height/2],u_patternscale_b:[d/C,-S.height/2],u_sdfgamma:f.width/(256*Math.min(z,C)*u.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:v.y,u_tex_y_b:S.y,u_mix:p.t})};function mo(i,o){return 1/Tt(i,1,o.tileZoom)}function Fl(i,o,n){return i.translatePosMatrix(o.tileID.posMatrix,o,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}var Vu=function(i,o,n,s,p){return{u_matrix:i,u_tl_parent:o,u_scale_parent:n,u_buffer_scale:1,u_fade_t:s.mix,u_opacity:s.opacity*p.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:p.paint.get("raster-brightness-min"),u_brightness_high:p.paint.get("raster-brightness-max"),u_saturation_factor:(d=p.paint.get("raster-saturation"),d>0?1-1/(1.001-d):-d),u_contrast_factor:(f=p.paint.get("raster-contrast"),f>0?1/(1-f):1+f),u_spin_weights:Ul(p.paint.get("raster-hue-rotate"))};var f,d};function Ul(i){i*=Math.PI/180;var o=Math.sin(i),n=Math.cos(i);return[(2*n+1)/3,(-Math.sqrt(3)*o-n+1)/3,(Math.sqrt(3)*o-n+1)/3]}var Pa,yo=function(i,o,n,s,p,f,d,y,v,S){var z=p.transform;return{u_is_size_zoom_constant:+(i==="constant"||i==="source"),u_is_size_feature_constant:+(i==="constant"||i==="camera"),u_size_t:o?o.uSizeT:0,u_size:o?o.uSize:0,u_camera_to_center_distance:z.cameraToCenterDistance,u_pitch:z.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:z.width/z.height,u_fade_change:p.options.fadeDuration?p.symbolFadeChange:1,u_matrix:f,u_label_plane_matrix:d,u_coord_matrix:y,u_is_text:+v,u_pitch_with_map:+s,u_texsize:S,u_texture:0}},Wo=function(i,o,n,s,p,f,d,y,v,S,z){var C=p.transform;return u.extend(yo(i,o,n,s,p,f,d,y,v,S),{u_gamma_scale:s?Math.cos(C._pitch)*C.cameraToCenterDistance:1,u_device_pixel_ratio:u.browser.devicePixelRatio,u_is_halo:1})},Ca=function(i,o,n,s,p,f,d,y,v,S){return u.extend(Wo(i,o,n,s,p,f,d,y,!0,v),{u_texsize_icon:S,u_texture_icon:1})},Ko=function(i,o,n){return{u_matrix:i,u_opacity:o,u_color:n}},_o=function(i,o,n,s,p,f){return u.extend(function(d,y,v,S){var z=v.imageManager.getPattern(d.from.toString()),C=v.imageManager.getPattern(d.to.toString()),k=v.imageManager.getPixelSize(),F=k.width,R=k.height,j=Math.pow(2,S.tileID.overscaledZ),D=S.tileSize*Math.pow(2,v.transform.tileZoom)/j,N=D*(S.tileID.canonical.x+S.tileID.wrap*j),G=D*S.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:z.tl,u_pattern_br_a:z.br,u_pattern_tl_b:C.tl,u_pattern_br_b:C.br,u_texsize:[F,R],u_mix:y.t,u_pattern_size_a:z.displaySize,u_pattern_size_b:C.displaySize,u_scale_a:y.fromScale,u_scale_b:y.toScale,u_tile_units_to_pixels:1/Tt(S,1,v.transform.tileZoom),u_pixel_coord_upper:[N>>16,G>>16],u_pixel_coord_lower:[65535&N,65535&G]}}(s,f,n,p),{u_matrix:i,u_opacity:o})},Vl={fillExtrusion:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_lightpos:new u.Uniform3f(i,o.u_lightpos),u_lightintensity:new u.Uniform1f(i,o.u_lightintensity),u_lightcolor:new u.Uniform3f(i,o.u_lightcolor),u_vertical_gradient:new u.Uniform1f(i,o.u_vertical_gradient),u_opacity:new u.Uniform1f(i,o.u_opacity)}},fillExtrusionPattern:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_lightpos:new u.Uniform3f(i,o.u_lightpos),u_lightintensity:new u.Uniform1f(i,o.u_lightintensity),u_lightcolor:new u.Uniform3f(i,o.u_lightcolor),u_vertical_gradient:new u.Uniform1f(i,o.u_vertical_gradient),u_height_factor:new u.Uniform1f(i,o.u_height_factor),u_image:new u.Uniform1i(i,o.u_image),u_texsize:new u.Uniform2f(i,o.u_texsize),u_pixel_coord_upper:new u.Uniform2f(i,o.u_pixel_coord_upper),u_pixel_coord_lower:new u.Uniform2f(i,o.u_pixel_coord_lower),u_scale:new u.Uniform3f(i,o.u_scale),u_fade:new u.Uniform1f(i,o.u_fade),u_opacity:new u.Uniform1f(i,o.u_opacity)}},fill:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix)}},fillPattern:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_image:new u.Uniform1i(i,o.u_image),u_texsize:new u.Uniform2f(i,o.u_texsize),u_pixel_coord_upper:new u.Uniform2f(i,o.u_pixel_coord_upper),u_pixel_coord_lower:new u.Uniform2f(i,o.u_pixel_coord_lower),u_scale:new u.Uniform3f(i,o.u_scale),u_fade:new u.Uniform1f(i,o.u_fade)}},fillOutline:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_world:new u.Uniform2f(i,o.u_world)}},fillOutlinePattern:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_world:new u.Uniform2f(i,o.u_world),u_image:new u.Uniform1i(i,o.u_image),u_texsize:new u.Uniform2f(i,o.u_texsize),u_pixel_coord_upper:new u.Uniform2f(i,o.u_pixel_coord_upper),u_pixel_coord_lower:new u.Uniform2f(i,o.u_pixel_coord_lower),u_scale:new u.Uniform3f(i,o.u_scale),u_fade:new u.Uniform1f(i,o.u_fade)}},circle:function(i,o){return{u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_scale_with_map:new u.Uniform1i(i,o.u_scale_with_map),u_pitch_with_map:new u.Uniform1i(i,o.u_pitch_with_map),u_extrude_scale:new u.Uniform2f(i,o.u_extrude_scale),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_matrix:new u.UniformMatrix4f(i,o.u_matrix)}},collisionBox:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_pixels_to_tile_units:new u.Uniform1f(i,o.u_pixels_to_tile_units),u_extrude_scale:new u.Uniform2f(i,o.u_extrude_scale),u_overscale_factor:new u.Uniform1f(i,o.u_overscale_factor)}},collisionCircle:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_inv_matrix:new u.UniformMatrix4f(i,o.u_inv_matrix
497),u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_viewport_size:new u.Uniform2f(i,o.u_viewport_size)}},debug:function(i,o){return{u_color:new u.UniformColor(i,o.u_color),u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_overlay:new u.Uniform1i(i,o.u_overlay),u_overlay_scale:new u.Uniform1f(i,o.u_overlay_scale)}},clippingMask:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix)}},heatmap:function(i,o){return{u_extrude_scale:new u.Uniform1f(i,o.u_extrude_scale),u_intensity:new u.Uniform1f(i,o.u_intensity),u_matrix:new u.UniformMatrix4f(i,o.u_matrix)}},heatmapTexture:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_world:new u.Uniform2f(i,o.u_world),u_image:new u.Uniform1i(i,o.u_image),u_color_ramp:new u.Uniform1i(i,o.u_color_ramp),u_opacity:new u.Uniform1f(i,o.u_opacity)}},hillshade:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_image:new u.Uniform1i(i,o.u_image),u_latrange:new u.Uniform2f(i,o.u_latrange),u_light:new u.Uniform2f(i,o.u_light),u_shadow:new u.UniformColor(i,o.u_shadow),u_highlight:new u.UniformColor(i,o.u_highlight),u_accent:new u.UniformColor(i,o.u_accent)}},hillshadePrepare:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_image:new u.Uniform1i(i,o.u_image),u_dimension:new u.Uniform2f(i,o.u_dimension),u_zoom:new u.Uniform1f(i,o.u_zoom),u_unpack:new u.Uniform4f(i,o.u_unpack)}},line:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_ratio:new u.Uniform1f(i,o.u_ratio),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_units_to_pixels:new u.Uniform2f(i,o.u_units_to_pixels)}},lineGradient:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_ratio:new u.Uniform1f(i,o.u_ratio),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_units_to_pixels:new u.Uniform2f(i,o.u_units_to_pixels),u_image:new u.Uniform1i(i,o.u_image),u_image_height:new u.Uniform1f(i,o.u_image_height)}},linePattern:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_texsize:new u.Uniform2f(i,o.u_texsize),u_ratio:new u.Uniform1f(i,o.u_ratio),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_image:new u.Uniform1i(i,o.u_image),u_units_to_pixels:new u.Uniform2f(i,o.u_units_to_pixels),u_scale:new u.Uniform3f(i,o.u_scale),u_fade:new u.Uniform1f(i,o.u_fade)}},lineSDF:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_ratio:new u.Uniform1f(i,o.u_ratio),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_units_to_pixels:new u.Uniform2f(i,o.u_units_to_pixels),u_patternscale_a:new u.Uniform2f(i,o.u_patternscale_a),u_patternscale_b:new u.Uniform2f(i,o.u_patternscale_b),u_sdfgamma:new u.Uniform1f(i,o.u_sdfgamma),u_image:new u.Uniform1i(i,o.u_image),u_tex_y_a:new u.Uniform1f(i,o.u_tex_y_a),u_tex_y_b:new u.Uniform1f(i,o.u_tex_y_b),u_mix:new u.Uniform1f(i,o.u_mix)}},raster:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_tl_parent:new u.Uniform2f(i,o.u_tl_parent),u_scale_parent:new u.Uniform1f(i,o.u_scale_parent),u_buffer_scale:new u.Uniform1f(i,o.u_buffer_scale),u_fade_t:new u.Uniform1f(i,o.u_fade_t),u_opacity:new u.Uniform1f(i,o.u_opacity),u_image0:new u.Uniform1i(i,o.u_image0),u_image1:new u.Uniform1i(i,o.u_image1),u_brightness_low:new u.Uniform1f(i,o.u_brightness_low),u_brightness_high:new u.Uniform1f(i,o.u_brightness_high),u_saturation_factor:new u.Uniform1f(i,o.u_saturation_factor),u_contrast_factor:new u.Uniform1f(i,o.u_contrast_factor),u_spin_weights:new u.Uniform3f(i,o.u_spin_weights)}},symbolIcon:function(i,o){return{u_is_size_zoom_constant:new u.Uniform1i(i,o.u_is_size_zoom_constant),u_is_size_feature_constant:new u.Uniform1i(i,o.u_is_size_feature_constant),u_size_t:new u.Uniform1f(i,o.u_size_t),u_size:new u.Uniform1f(i,o.u_size),u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_pitch:new u.Uniform1f(i,o.u_pitch),u_rotate_symbol:new u.Uniform1i(i,o.u_rotate_symbol),u_aspect_ratio:new u.Uniform1f(i,o.u_aspect_ratio),u_fade_change:new u.Uniform1f(i,o.u_fade_change),u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_label_plane_matrix:new u.UniformMatrix4f(i,o.u_label_plane_matrix
vendor: 22,070 bytes, line 497
497),u_coord_matrix:new u.UniformMatrix4f(i,o.u_coord_matrix),u_is_text:new u.Uniform1i(i,o.u_is_text),u_pitch_with_map:new u.Uniform1i(i,o.u_pitch_with_map),u_texsize:new u.Uniform2f(i,o.u_texsize),u_texture:new u.Uniform1i(i,o.u_texture)}},symbolSDF:function(i,o){return{u_is_size_zoom_constant:new u.Uniform1i(i,o.u_is_size_zoom_constant),u_is_size_feature_constant:new u.Uniform1i(i,o.u_is_size_feature_constant),u_size_t:new u.Uniform1f(i,o.u_size_t),u_size:new u.Uniform1f(i,o.u_size),u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_pitch:new u.Uniform1f(i,o.u_pitch),u_rotate_symbol:new u.Uniform1i(i,o.u_rotate_symbol),u_aspect_ratio:new u.Uniform1f(i,o.u_aspect_ratio),u_fade_change:new u.Uniform1f(i,o.u_fade_change),u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_label_plane_matrix:new u.UniformMatrix4f(i,o.u_label_plane_matrix),u_coord_matrix:new u.UniformMatrix4f(i,o.u_coord_matrix),u_is_text:new u.Uniform1i(i,o.u_is_text),u_pitch_with_map:new u.Uniform1i(i,o.u_pitch_with_map),u_texsize:new u.Uniform2f(i,o.u_texsize),u_texture:new u.Uniform1i(i,o.u_texture),u_gamma_scale:new u.Uniform1f(i,o.u_gamma_scale),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_is_halo:new u.Uniform1i(i,o.u_is_halo)}},symbolTextAndIcon:function(i,o){return{u_is_size_zoom_constant:new u.Uniform1i(i,o.u_is_size_zoom_constant),u_is_size_feature_constant:new u.Uniform1i(i,o.u_is_size_feature_constant),u_size_t:new u.Uniform1f(i,o.u_size_t),u_size:new u.Uniform1f(i,o.u_size),u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_pitch:new u.Uniform1f(i,o.u_pitch),u_rotate_symbol:new u.Uniform1i(i,o.u_rotate_symbol),u_aspect_ratio:new u.Uniform1f(i,o.u_aspect_ratio),u_fade_change:new u.Uniform1f(i,o.u_fade_change),u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_label_plane_matrix:new u.UniformMatrix4f(i,o.u_label_plane_matrix),u_coord_matrix:new u.UniformMatrix4f(i,o.u_coord_matrix),u_is_text:new u.Uniform1i(i,o.u_is_text),u_pitch_with_map:new u.Uniform1i(i,o.u_pitch_with_map),u_texsize:new u.Uniform2f(i,o.u_texsize),u_texsize_icon:new u.Uniform2f(i,o.u_texsize_icon),u_texture:new u.Uniform1i(i,o.u_texture),u_texture_icon:new u.Uniform1i(i,o.u_texture_icon),u_gamma_scale:new u.Uniform1f(i,o.u_gamma_scale),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_is_halo:new u.Uniform1i(i,o.u_is_halo)}},background:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_opacity:new u.Uniform1f(i,o.u_opacity),u_color:new u.UniformColor(i,o.u_color)}},backgroundPattern:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_opacity:new u.Uniform1f(i,o.u_opacity),u_image:new u.Uniform1i(i,o.u_image),u_pattern_tl_a:new u.Uniform2f(i,o.u_pattern_tl_a),u_pattern_br_a:new u.Uniform2f(i,o.u_pattern_br_a),u_pattern_tl_b:new u.Uniform2f(i,o.u_pattern_tl_b),u_pattern_br_b:new u.Uniform2f(i,o.u_pattern_br_b),u_texsize:new u.Uniform2f(i,o.u_texsize),u_mix:new u.Uniform1f(i,o.u_mix),u_pattern_size_a:new u.Uniform2f(i,o.u_pattern_size_a),u_pattern_size_b:new u.Uniform2f(i,o.u_pattern_size_b),u_scale_a:new u.Uniform1f(i,o.u_scale_a),u_scale_b:new u.Uniform1f(i,o.u_scale_b),u_pixel_coord_upper:new u.Uniform2f(i,o.u_pixel_coord_upper),u_pixel_coord_lower:new u.Uniform2f(i,o.u_pixel_coord_lower),u_tile_units_to_pixels:new u.Uniform1f(i,o.u_tile_units_to_pixels)}}};function go(i,o,n,s,p,f,d){for(var y=i.context,v=y.gl,S=i.useProgram("collisionBox"),z=[],C=0,k=0,F=0;F<s.length;F++){var R=s[F],j=o.getTile(R),D=j.getBucket(n);if(D){var N=R.posMatrix;p[0]===0&&p[1]===0||(N=i.translatePosMatrix(R.posMatrix,j,p,f));var G=d?D.textCollisionBox:D.iconCollisionBox,K=D.collisionCircleArray;if(K.length>0){var ee=u.create(),Q=N;u.mul(ee,D.placementInvProjMatrix,i.transform.glCoordMatrix),u.mul(ee,ee,D.placementViewportMatrix),z.push({circleArray:K,circleOffset:k,transform:Q,invTransform:ee}),k=C+=K.length/4}G&&S.draw(y,v.LINES,M.disabled,O.disabled,i.colorModeForRenderPass(),X.disabled,Fn(N,i.transform,j),n.id,G.layoutVertexBuffer,G.indexBuffer,G.segments,null,i.transform.zoom,null,null,G.collisionVertexBuffer)}}if(d&&z.length){var te=i.useProgram("collisionCircle"),oe=new u.StructArrayLayout2f1f2i16;oe.resize(4*C),oe._trim();for(var he=0,pe=0,be=z;pe<be.length;pe+=1)for(var ke=be[pe],Be=0;Be<ke.circleArray.length/4;Be++){var Le=4*Be,nt=ke.circleArray[Le+0],we=ke.circleArray[Le+1],Ne=ke.circleArray[Le+2],Ge=ke.circleArray[Le+3];oe.emplace(he++,nt,we,Ne,Ge,0),oe.emplace(he++,nt,we,Ne,Ge,1),oe.emplace(he++,nt,we,Ne,Ge,2),oe.emplace(he++,nt,we,Ne,Ge,3)}(!Pa||Pa.length<2*C)&&(Pa=function(Mt){var hr=2*Mt,ir=new u.StructArrayLayout3ui6;ir.resize(hr),ir._trim();for(var Pt=0;Pt<hr;Pt++){var Ft=6*Pt;ir.uint16[Ft+0]=4*Pt+0,ir.uint16[Ft+1]=4*Pt+1,ir.uint16[Ft+2]=4*Pt+2,ir.uint16[Ft+3]=4*Pt+2,ir.uint16[Ft+4]=4*Pt+3,ir.uint16[Ft+5]=4*Pt+0}return ir}(C));for(var Ve=y.createIndexBuffer(Pa,!0),Ue=y.createVertexBuffer(oe,u.collisionCircleLayout.members,!0),Ze=0,Fe=z;Ze<Fe.length;Ze+=1){var Re=Fe[Ze],Ht=Rl(Re.transform,Re.invTransform,i.transform);te.draw(y,v.TRIANGLES,M.disabled,O.disabled,i.colorModeForRenderPass(),X.disabled,Ht,n.id,Ue,Ve,u.SegmentVector.simpleSegment(0,2*Re.circleOffset,Re.circleArray.length,Re.circleArray.length/2),null,i.transform.zoom,null,null,null)}Ue.destroy(),Ve.destroy()}}var _i=u.identity(new Float32Array(16));function Nl(i,o,n,s,p,f){var d=u.getAnchorAlignment(i),y=-(d.horizontalAlign-.5)*o,v=-(d.verticalAlign-.5)*n,S=u.evaluateVariableOffset(i,s);return new u.Point((y/p+S[0])*f,(v/p+S[1])*f)}function jl(i,o,n,s,p,f,d,y,v,S,z){var C=i.text.placedSymbolArray,k=i.text.dynamicLayoutVertexArray,F=i.icon.dynamicLayoutVertexArray,R={};k.clear();for(var j=0;j<C.length;j++){var D=C.get(j),N=D.hidden||!D.crossTileID||i.allowVerticalPlacement&&!D.placedOrientation?null:s[D.crossTileID];if(N){var G=new u.Point(D.anchorX,D.anchorY),K=Qe(G,n?y:d),ee=ut(f.cameraToCenterDistance,K.signedDistanceFromCamera),Q=p.evaluateSizeForFeature(i.textSizeData,S,D)*ee/u.ONE_EM;n&&(Q*=i.tilePixelRatio/v);for(var te=Nl(N.anchor,N.width,N.height,N.textOffset,N.textBoxScale,Q),oe=n?Qe(G.add(te),d).point:K.point.add(o?te.rotate(-f.angle):te),he=i.allowVerticalPlacement&&D.placedOrientation===u.WritingMode.vertical?Math.PI/2:0,pe=0;pe<D.numGlyphs;pe++)u.addDynamicAttributes(k,oe,he);z&&D.associatedIconIndex>=0&&(R[D.associatedIconIndex]={shiftedAnchor:oe,angle:he})}else gr(D.numGlyphs,k)}if(z){F.clear();for(var be=i.icon.placedSymbolArray,ke=0;ke<be.length;ke++){var Be=be.get(ke);if(Be.hidden)gr(Be.numGlyphs,F);else{var Le=R[ke];if(Le)for(var nt=0;nt<Be.numGlyphs;nt++)u.addDynamicAttributes(F,Le.shiftedAnchor,Le.angle);else gr(Be.numGlyphs,F)}}i.icon.dynamicLayoutVertexBuffer.updateData(F)}i.text.dynamicLayoutVertexBuffer.updateData(k)}function ql(i,o,n){return n.iconsInText&&o?"symbolTextAndIcon":i?"symbolSDF":"symbolIcon"}function Nn(i,o,n,s,p,f,d,y,v,S,z,C){for(var k=i.context,F=k.gl,R=i.transform,j=y==="map",D=v==="map",N=j&&n.layout.get("symbol-placement")!=="point",G=j&&!D&&!N,K=n.layout.get("symbol-sort-key").constantOr(1)!==void 0,ee=!1,Q=i.depthModeForSublayer(0,M.ReadOnly),te=n.layout.get("text-variable-anchor"),oe=[],he=0,pe=s;he<pe.length;he+=1){var be=pe[he],ke=o.getTile(be),Be=ke.getBucket(n);if(Be){var Le=p?Be.text:Be.icon;if(Le&&Le.segments.get().length){var nt=Le.programConfigurations.get(n.id),we=p||Be.sdfIcons,Ne=p?Be.textSizeData:Be.iconSizeData,Ge=D||R.pitch!==0,Ve=i.useProgram(ql(we,p,Be),nt),Ue=u.evaluateSizeForZoom(Ne,R.zoom),Ze=void 0,Fe=[0,0],Re=void 0,Ht=void 0,Mt=null,hr=void 0;if(p)Re=ke.glyphAtlasTexture,Ht=F.LINEAR,Ze=ke.glyphAtlasTexture.size,Be.iconsInText&&(Fe=ke.imageAtlasTexture.size,Mt=ke.imageAtlasTexture,hr=Ge||i.options.rotating||i.options.zooming||Ne.kind==="composite"||Ne.kind==="camera"?F.LINEAR:F.NEAREST);else{var ir=n.layout.get("icon-size").constantOr(0)!==1||Be.iconsNeedLinear;Re=ke.imageAtlasTexture,Ht=we||i.options.rotating||i.options.zooming||ir||Ge?F.LINEAR:F.NEAREST,Ze=ke.imageAtlasTexture.size}var Pt=Tt(ke,1,i.transform.zoom),Ft=Rt(be.posMatrix,D,j,i.transform,Pt),Nr=dt(be.posMatrix,D,j,i.transform,Pt),wr=te&&Be.hasTextData(),pn=n.layout.get("icon-text-fit")!=="none"&&wr&&Be.hasIconData();N&&Vo(Be,be.posMatrix,i,p,Ft,Nr,D,S);var Pr=i.translatePosMatrix(be.posMatrix,ke,f,d),wi=N||p&&te||pn?_i:Ft,ai=i.translatePosMatrix(Nr,ke,f,d,!0),aa=we&&n.paint.get(p?"text-halo-width":"icon-halo-width").constantOr(1)!==0,To={program:Ve,buffers:Le,uniformValues:we?Be.iconsInText?Ca(Ne.kind,Ue,G,D,i,Pr,wi,ai,Ze,Fe):Wo(Ne.kind,Ue,G,D,i,Pr,wi,ai,p,Ze):yo(Ne.kind,Ue,G,D,i,Pr,wi,ai,p,Ze),atlasTexture:Re,atlasTextureIcon:Mt,atlasInterpolation:Ht,atlasInterpolationIcon:hr,isSDF:we,hasHalo:aa};if(K&&Be.canOverlap){ee=!0;for(var hn=0,Io=Le.segments.get();hn<Io.length;hn+=1){var sa=Io[hn];oe.push({segments:new u.SegmentVector([sa]),sortKey:sa.sortKey,state:To})}}else oe.push({segments:Le.segments,sortKey:0,state:To})}}}ee&&oe.sort(function(fn,Wn){return fn.sortKey-Wn.sortKey});for(var Ci=0,la=oe;Ci<la.length;Ci+=1){var ki=la[Ci],Jt=ki.state;if(k.activeTexture.set(F.TEXTURE0),Jt.atlasTexture.bind(Jt.atlasInterpolation,F.CLAMP_TO_EDGE),Jt.atlasTextureIcon&&(k.activeTexture.set(F.TEXTURE1),Jt.atlasTextureIcon&&Jt.atlasTextureIcon.bind(Jt.atlasInterpolationIcon,F.CLAMP_TO_EDGE)),Jt.isSDF){var qi=Jt.uniformValues;Jt.hasHalo&&(qi.u_is_halo=1,Ho(Jt.buffers,ki.segments,n,i,Jt.program,Q,z,C,qi)),qi.u_is_halo=0}Ho(Jt.buffers,ki.segments,n,i,Jt.program,Q,z,C,Jt.uniformValues)}}function Ho(i,o,n,s,p,f,d,y,v){var S=s.context;p.draw(S,S.gl.TRIANGLES,f,d,y,X.disabled,v,n.id,i.layoutVertexBuffer,i.indexBuffer,o,n.paint,s.transform.zoom,i.programConfigurations.get(n.id),i.dynamicLayoutVertexBuffer,i.opacityVertexBuffer)}function ka(i,o,n,s,p,f,d){var y,v,S,z,C,k=i.context.gl,F=n.paint.get("fill-pattern"),R=F&&F.constantOr(1),j=n.getCrossfadeParameters();d?(v=R&&!n.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",y=k.LINES):(v=R?"fillPattern":"fill",y=k.TRIANGLES);for(var D=0,N=s;D<N.length;D+=1){var G=N[D],K=o.getTile(G);if(!R||K.patternsLoaded()){var ee=K.getBucket(n);if(ee){var Q=ee.programConfigurations.get(n.id),te=i.useProgram(v,Q);R&&(i.context.activeTexture.set(k.TEXTURE0),K.imageAtlasTexture.bind(k.LINEAR,k.CLAMP_TO_EDGE),Q.updatePaintBuffers(j));var oe=F.constantOr(null);if(oe&&K.imageAtlas){var he=K.imageAtlas,pe=he.patternPositions[oe.to.toString()],be=he.patternPositions[oe.from.toString()];pe&&be&&Q.setConstantPatternPositions(pe,be)}var ke=i.translatePosMatrix(G.posMatrix,K,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"));if(d){z=ee.indexBuffer2,C=ee.segments2;var Be=[k.drawingBufferWidth,k.drawingBufferHeight];S=v==="fillOutlinePattern"&&R?Bl(ke,i,j,K,Be):Ll(ke,Be)}else z=ee.indexBuffer,C=ee.segments,S=R?On(ke,i,j,K):on(ke);te.draw(i.context,y,p,i.stencilModeForClipping(G),f,X.disabled,S,n.id,ee.layoutVertexBuffer,z,C,n.paint,i.transform.zoom,Q)}}}}function Ms(i,o,n,s,p,f,d){for(var y=i.context,v=y.gl,S=n.paint.get("fill-extrusion-pattern"),z=S.constantOr(1),C=n.getCrossfadeParameters(),k=n.paint.get("fill-extrusion-opacity"),F=0,R=s;F<R.length;F+=1){var j=R[F],D=o.getTile(j),N=D.getBucket(n);if(N){var G=N.programConfigurations.get(n.id),K=i.useProgram(z?"fillExtrusionPattern":"fillExtrusion",G);z&&(i.context.activeTexture.set(v.TEXTURE0),D.imageAtlasTexture.bind(v.LINEAR,v.CLAMP_TO_EDGE),G.updatePaintBuffers(C));var ee=S.constantOr(null);if(ee&&D.imageAtlas){var Q=D.imageAtlas,te=Q.patternPositions[ee.to.toString()],oe=Q.patternPositions[ee.from.toString()];te&&oe&&G.setConstantPatternPositions(te,oe)}var he=i.translatePosMatrix(j.posMatrix,D,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor")),pe=n.paint.get("fill-extrusion-vertical-gradient"),be=z?Rn(he,i,pe,k,j,C,D):Dl(he,i,pe,k);K.draw(y,y.gl.TRIANGLES,p,f,d,X.backCCW,be,n.id,N.layoutVertexBuffer,N.indexBuffer,N.segments,n.paint,i.transform.zoom,G)}}}function Ma(i,o,n,s,p,f){var d=i.context,y=d.gl,v=o.fbo;if(v){var S=i.useProgram("hillshade");d.activeTexture.set(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,v.colorAttachment.get());var z=function(C,k,F){var R=F.paint.get("hillshade-shadow-color"),j=F.paint.get("hillshade-highlight-color"),D=F.paint.get("hillshade-accent-color"),N=F.paint.get("hillshade-illumination-direction")*(Math.PI/180);F.paint.get("hillshade-illumination-anchor")==="viewport"&&(N-=C.transform.angle);var G,K,ee,Q=!C.options.moving;return{u_matrix:C.transform.calculatePosMatrix(k.tileID.toUnwrapped(),Q),u_image:0,u_latrange:(G=k.tileID,K=Math.pow(2,G.canonical.z),ee=G.canonical.y,[new u.MercatorCoordinate(0,ee/K).toLngLat().lat,new u.MercatorCoordinate(0,(ee+1)/K).toLngLat().lat]),u_light:[F.paint.get("hillshade-exaggeration"),N],u_shadow:R,u_highlight:j,u_accent:D}}(i,o,n);S.draw(d,y.TRIANGLES,s,p,f,X.disabled,z,n.id,i.rasterBoundsBuffer,i.quadTriangleIndexBuffer,i.rasterBoundsSegments)}}function Nu(i,o,n,s,p,f){var d=i.context,y=d.gl,v=o.dem;if(v&&v.data){var S=v.dim,z=v.stride,C=v.getPixels();if(d.activeTexture.set(y.TEXTURE1),d.pixelStoreUnpackPremultiplyAlpha.set(!1),o.demTexture=o.demTexture||i.getTileTexture(z),o.demTexture){var k=o.demTexture;k.update(C,{premultiply:!1}),k.bind(y.NEAREST,y.CLAMP_TO_EDGE)}else o.demTexture=new u.Texture(d,C,y.RGBA,{premultiply:!1}),o.demTexture.bind(y.NEAREST,y.CLAMP_TO_EDGE);d.activeTexture.set(y.TEXTURE0);var F=o.fbo;if(!F){var R=new u.Texture(d,{width:S,height:S,data:null},y.RGBA);R.bind(y.LINEAR,y.CLAMP_TO_EDGE),(F=o.fbo=d.createFramebuffer(S,S,!0)).colorAttachment.set(R.texture)}d.bindFramebuffer.set(F.framebuffer),d.viewport.set([0,0,S,S]),i.useProgram("hillshadePrepare").draw(d,y.TRIANGLES,s,p,f,X.disabled,function(j,D){var N=D.stride,G=u.create();return u.ortho(G,0,u.EXTENT,-u.EXTENT,0,0,1),u.translate(G,G,[0,-u.EXTENT,0]),{u_matrix:G,u_image:1,u_dimension:[N,N],u_zoom:j.overscaledZ,u_unpack:D.getUnpackVector()}}(o.tileID,v),n.id,i.rasterBoundsBuffer,i.quadTriangleIndexBuffer,i.rasterBoundsSegments),o.needsHillshadePrepare=!1}}function Da(i,o,n,s,p){var f=s.paint.get("raster-fade-duration");if(f>0){var d=u.browser.now(),y=(d-i.timeAdded)/f,v=o?(d-o.timeAdded)/f:-1,S=n.getSource(),z=p.coveringZoomLevel({tileSize:S.tileSize,roundZoom:S.roundZoom}),C=!o||Math.abs(o.tileID.overscaledZ-z)>Math.abs(i.tileID.overscaledZ-z),k=C&&i.refreshedUponExpiration?1:u.clamp(C?y:1-v,0,1);return i.refreshedUponExpiration&&y>=1&&(i.refreshedUponExpiration=!1),o?{opacity:1,mix:1-k}:{opacity:k,mix:0}}return{opacity:1,mix:0}}var Ds=new u.Color(1,0,0,1),Zl=new u.Color(0,1,0,1),Gl=new u.Color(0,0,1,1),La=new u.Color(1,0,1,1),Ls=new u.Color(0,1,1,1);function Bs(i,o,n,s){Jo(i,0,o+n/2,i.transform.width,n,s)}function Rs(i,o,n,s){Jo(i,o-n/2,0,n,i.transform.height,s)}function Jo(i,o,n,s,p,f){var d=i.context,y=d.gl;y.enable(y.SCISSOR_TEST),y.scissor(o*u.browser.devicePixelRatio,n*u.browser.devicePixelRatio,s*u.browser.devicePixelRatio,p*u.browser.devicePixelRatio),d.clear({color:f}),y.disable(y.SCISSOR_TEST)}function Xl(i,o,n){var s=i.context,p=s.gl,f=n.posMatrix,d=i.useProgram("debug"),y=M.disabled,v=O.disabled,S=i.colorModeForRenderPass();s.activeTexture.set(p.TEXTURE0),i.emptyTexture.bind(p.LINEAR,p.CLAMP_TO_EDGE),d.draw(s,p.LINE_STRIP,y,v,S,X.disabled,Un(f,u.Color.red),"$debug",i.debugBuffer,i.tileBorderIndexBuffer,i.debugSegments);var z=o.getTileByID(n.key).latestRawTileData,C=Math.floor((z&&z.byteLength||0)/1024),k=o.getTile(n).tileSize,F=512/Math.min(k,512)*(n.overscaledZ/i.transform.zoom)*.5,R=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(R+=" => "+n.overscaledZ),function(j,D){j.initDebugOverlayCanvas();var N=j.debugOverlayCanvas,G=j.context.gl,K=j.debugOverlayCanvas.getContext("2d");K.clearRect(0,0,N.width,N.height),K.shadowColor="white",K.shadowBlur=2,K.lineWidth=1.5,K.strokeStyle="white",K.textBaseline="top",K.font="bold 36px Open Sans, sans-serif",K.fillText(D,5,5),K.strokeText(D,5,5),j.debugOverlayTexture.update(N),j.debugOverlayTexture.bind(G.LINEAR,G.CLAMP_TO_EDGE)}(i,R+" "+C+"kb"),d.draw(s,p.TRIANGLES,y,v,Z.alphaBlended,X.disabled,Un(f,u.Color.transparent,F),"$debug",i.debugBuffer,i.quadTriangleIndexBuffer,i.debugSegments)}var jn={symbol:function(i,o,n,s,p){if(i.renderPass==="translucent"){var f=O.disabled,d=i.colorModeForRenderPass();n.layout.get("text-variable-anchor")&&function(y,v,S,z,C,k,F){for(var R=v.transform,j=C==="map",D=k==="map",N=0,G=y;N<G.length;N+=1){var K=G[N],ee=z.getTile(K),Q=ee.getBucket(S);if(Q&&Q.text&&Q.text.segments.get().length){var te=u.evaluateSizeForZoom(Q.textSizeData,R.zoom),oe=Tt(ee,1,v.transform.zoom),he=Rt(K.posMatrix,D,j,v.transform,oe),pe=S.layout.get("icon-text-fit")!=="none"&&Q.hasIconData();if(te){var be=Math.pow(2,R.zoom-ee.tileID.overscaledZ);jl(Q,j,D,F,u.symbolSize,R,he,K.posMatrix,be,te,pe)}}}}(s,i,n,o,n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),p),n.paint.get("icon-opacity").constantOr(1)!==0&&Nn(i,o,n,s,!1,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),n.layout.get("icon-rotation-alignment"),n.layout.get("icon-pitch-alignment"),n.layout.get("icon-keep-upright"),f,d),n.paint.get("text-opacity").constantOr(1)!==0&&Nn(i,o,n,s,!0,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),n.layout.get("text-keep-upright"),f,d),o.map.showCollisionBoxes&&(go(i,o,n,s,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),!0),go(i,o,n,s,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),!1))}},circle:function(i,o,n,s){if(i.renderPass==="translucent"){var p=n.paint.get("circle-opacity"),f=n.paint.get("circle-stroke-width"),d=n.paint.get("circle-stroke-opacity"),y=n.layout.get("circle-sort-key").constantOr(1)!==void 0;if(p.constantOr(1)!==0||f.constantOr(1)!==0&&d.constantOr(1)!==0){for(var v=i.context,S=v.gl,z=i.depthModeForSublayer(0,M.ReadOnly),C=O.disabled,k=i.colorModeForRenderPass(),F=[],R=0;R<s.length;R++){var j=s[R],D=o.getTile(j),N=D.getBucket(n);if(N){var G=N.programConfigurations.get(n.id),K={programConfiguration:G,program:i.useProgram("circle",G),layoutVertexBuffer:N.layoutVertexBuffer,indexBuffer:N.indexBuffer,uniformValues:ks(i,j,D,n)};if(y)for(var ee=0,Q=N.segments.get();ee<Q.length;ee+=1){var te=Q[ee];F.push({segments:new u.SegmentVector([te]),sortKey:te.sortKey,state:K})}else F.push({segments:N.segments,sortKey:0,state:K})}}y&&F.sort(function(ke,Be){return ke.sortKey-Be.sortKey});for(var oe=0,he=F;oe<he.length;oe+=1){var pe=he[oe],be=pe.state;be.program.draw(v,S.TRIANGLES,z,C,k,X.disabled,be.uniformValues,n.id,be.layoutVertexBuffer,be.indexBuffer,pe.segments,n.paint,i.transform.zoom,be.programConfiguration)}}}},heatmap:function(i,o,n,s){if(n.paint.get("heatmap-opacity")!==0)if(i.renderPass==="offscreen"){var p=i.context,f=p.gl,d=O.disabled,y=new Z([f.ONE,f.ONE],u.Color.transparent,[!0,!0,!0,!0]);(function(F,R,j){var D=F.gl;F.activeTexture.set(D.TEXTURE1),F.viewport.set([0,0,R.width/4,R.height/4]);var N=j.heatmapFbo;if(N)D.bindTexture(D.TEXTURE_2D,N.colorAttachment.get()),F.bindFramebuffer.set(N.framebuffer);else{var G=D.createTexture();D.bindTexture(D.TEXTURE_2D,G),D.texParameteri(D.TEXTURE_2D,D.TEXTURE_WRAP_S,D.CLAMP_TO_EDGE),D.texParameteri(D.TEXTURE_2D,D.TEXTURE_WRAP_T,D.CLAMP_TO_EDGE),D.texParameteri(D.TEXTURE_2D,D.TEXTURE_MIN_FILTER,D.LINEAR),D.texParameteri(D.TEXTURE_2D,D.TEXTURE_MAG_FILTER,D.LINEAR),N=j.heatmapFbo=F.createFramebuffer(R.width/4,R.height/4,!1),function(K,ee,Q,te){var oe=K.gl;oe.texImage2D(oe.TEXTURE_2D,0,oe.RGBA,ee.width/4,ee.height/4,0,oe.RGBA,K.extRenderToTextureHalfFloat?K.extTextureHalfFloat.HALF_FLOAT_OES:oe.UNSIGNED_BYTE,null),te.colorAttachment.set(Q)}(F,R,G,N)}})(p,i,n),p.clear({color:u.Color.transparent});for(var v=0;v<s.length;v++){var S=s[v];if(!o.hasRenderableParent(S)){var z=o.getTile(S),C=z.getBucket(n);if(C){var k=C.programConfigurations.get(n.id);i.useProgram("heatmap",k).draw(p,f.TRIANGLES,M.disabled,d,y,X.disabled,Ol(S.posMatrix,z,i.transform.zoom,n.paint.get("heatmap-intensity")),n.id,C.layoutVertexBuffer,C.indexBuffer,C.segments,n.paint,i.transform.zoom,k)}}}p.viewport.set([0,0,i.width,i.height])}else i.renderPass==="translucent"&&(i.context.setColorMode(i.colorModeForRenderPass()),function(F,R){var j=F.context,D=j.gl,N=R.heatmapFbo;if(N){j.activeTexture.set(D.TEXTURE0),D.bindTexture(D.TEXTURE_2D,N.colorAttachment.get()),j.activeTexture.set(D.TEXTURE1);var G=R.colorRampTexture;G||(G=R.colorRampTexture=new u.Texture(j,R.colorRamp,D.RGBA)),G.bind(D.LINEAR,D.CLAMP_TO_EDGE),F.useProgram("heatmapTexture").draw(j,D.TRIANGLES,M.disabled,O.disabled,F.colorModeForRenderPass(),X.disabled,function(K,ee,Q,te){var oe=u.create();u.ortho(oe,0,K.width,K.height,0,0,1);var he=K.context.gl;return{u_matrix:oe,u_world:[he.drawingBufferWidth,he.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:ee.paint.get("heatmap-opacity")}}(F,R),R.id,F.viewportBuffer,F.quadTriangleIndexBuffer,F.viewportSegments,R.paint,F.transform.zoom)}}(i,n))},line:function(i,o,n,s){if(i.renderPass==="translucent"){var p=n.paint.get("line-opacity"),f=n.paint.get("line-width");if(p.constantOr(1)!==0&&f.constantOr(1)!==0)for(var d=i.depthModeForSublayer(0,M.ReadOnly),y=i.colorModeForRenderPass(),v=n.paint.get("line-dasharray"),S=n.paint.get("line-pattern"),z=S.constantOr(1),C=n.paint.get("line-gradient"),k=n.getCrossfadeParameters(),F=z?"linePattern":v?"lineSDF":C?"lineGradient":"line",R=i.context,j=R.gl,D=!0,N=0,G=s;N<G.length;N+=1){var K=G[N],ee=o.getTile(K);if(!z||ee.patternsLoaded()){var Q=ee.getBucket(n);if(Q){var te=Q.programConfigurations.get(n.id),oe=i.context.program.get(),he=i.useProgram(F,te),pe=D||he.program!==oe,be=S.constantOr(null);if(be&&ee.imageAtlas){var ke=ee.imageAtlas,Be=ke.patternPositions[be.to.toString()],Le=ke.patternPositions[be.from.toString()];Be&&Le&&te.setConstantPatternPositions(Be,Le)}var nt=z?za(i,ee,n,k):v?Uu(i,ee,n,v,k):C?xt(i,ee,n,Q.lineClipsArray.length):Xo(i,ee,n);if(z)R.activeTexture.set(j.TEXTURE0),ee.imageAtlasTexture.bind(j.LINEAR,j.CLAMP_TO_EDGE),te.updatePaintBuffers(k);
vendor: 5,295 bytes, line 497
497else if(v&&(pe||i.lineAtlas.dirty))R.activeTexture.set(j.TEXTURE0),i.lineAtlas.bind(R);else if(C){var we=Q.gradients[n.id],Ne=we.texture;if(n.gradientVersion!==we.version){var Ge=256;if(n.stepInterpolant){var Ve=o.getSource().maxzoom,Ue=K.canonical.z===Ve?Math.ceil(1<<i.transform.maxZoom-K.canonical.z):1;Ge=u.clamp(u.nextPowerOfTwo(Q.maxLineLength/u.EXTENT*1024*Ue),256,R.maxTextureSize)}we.gradient=u.renderColorRamp({expression:n.gradientExpression(),evaluationKey:"lineProgress",resolution:Ge,image:we.gradient||void 0,clips:Q.lineClipsArray}),we.texture?we.texture.update(we.gradient):we.texture=new u.Texture(R,we.gradient,j.RGBA),we.version=n.gradientVersion,Ne=we.texture}R.activeTexture.set(j.TEXTURE0),Ne.bind(n.stepInterpolant?j.NEAREST:j.LINEAR,j.CLAMP_TO_EDGE)}he.draw(R,j.TRIANGLES,d,i.stencilModeForClipping(K),y,X.disabled,nt,n.id,Q.layoutVertexBuffer,Q.indexBuffer,Q.segments,n.paint,i.transform.zoom,te,Q.layoutVertexBuffer2),D=!1}}}}},fill:function(i,o,n,s){var p=n.paint.get("fill-color"),f=n.paint.get("fill-opacity");if(f.constantOr(1)!==0){var d=i.colorModeForRenderPass(),y=n.paint.get("fill-pattern"),v=i.opaquePassEnabledForLayer()&&!y.constantOr(1)&&p.constantOr(u.Color.transparent).a===1&&f.constantOr(0)===1?"opaque":"translucent";if(i.renderPass===v){var S=i.depthModeForSublayer(1,i.renderPass==="opaque"?M.ReadWrite:M.ReadOnly);ka(i,o,n,s,S,d,!1)}if(i.renderPass==="translucent"&&n.paint.get("fill-antialias")){var z=i.depthModeForSublayer(n.getPaintProperty("fill-outline-color")?2:0,M.ReadOnly);ka(i,o,n,s,z,d,!0)}}},"fill-extrusion":function(i,o,n,s){var p=n.paint.get("fill-extrusion-opacity");if(p!==0&&i.renderPass==="translucent"){var f=new M(i.context.gl.LEQUAL,M.ReadWrite,i.depthRangeFor3D);if(p!==1||n.paint.get("fill-extrusion-pattern").constantOr(1))Ms(i,o,n,s,f,O.disabled,Z.disabled),Ms(i,o,n,s,f,i.stencilModeFor3D(),i.colorModeForRenderPass());else{var d=i.colorModeForRenderPass();Ms(i,o,n,s,f,O.disabled,d)}}},hillshade:function(i,o,n,s){if(i.renderPass==="offscreen"||i.renderPass==="translucent"){for(var p=i.context,f=i.depthModeForSublayer(0,M.ReadOnly),d=i.colorModeForRenderPass(),y=i.renderPass==="translucent"?i.stencilConfigForOverlap(s):[{},s],v=y[0],S=0,z=y[1];S<z.length;S+=1){var C=z[S],k=o.getTile(C);k.needsHillshadePrepare&&i.renderPass==="offscreen"?Nu(i,k,n,f,O.disabled,d):i.renderPass==="translucent"&&Ma(i,k,n,f,v[C.overscaledZ],d)}p.viewport.set([0,0,i.width,i.height])}},raster:function(i,o,n,s){if(i.renderPass==="translucent"&&n.paint.get("raster-opacity")!==0&&s.length)for(var p=i.context,f=p.gl,d=o.getSource(),y=i.useProgram("raster"),v=i.colorModeForRenderPass(),S=d instanceof Ti?[{},s]:i.stencilConfigForOverlap(s),z=S[0],C=S[1],k=C[C.length-1].overscaledZ,F=!i.options.moving,R=0,j=C;R<j.length;R+=1){var D=j[R],N=i.depthModeForSublayer(D.overscaledZ-k,n.paint.get("raster-opacity")===1?M.ReadWrite:M.ReadOnly,f.LESS),G=o.getTile(D),K=i.transform.calculatePosMatrix(D.toUnwrapped(),F);G.registerFadeDuration(n.paint.get("raster-fade-duration"));var ee=o.findLoadedParent(D,0),Q=Da(G,ee,o,n,i.transform),te=void 0,oe=void 0,he=n.paint.get("raster-resampling")==="nearest"?f.NEAREST:f.LINEAR;p.activeTexture.set(f.TEXTURE0),G.texture.bind(he,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST),p.activeTexture.set(f.TEXTURE1),ee?(ee.texture.bind(he,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST),te=Math.pow(2,ee.tileID.overscaledZ-G.tileID.overscaledZ),oe=[G.tileID.canonical.x*te%1,G.tileID.canonical.y*te%1]):G.texture.bind(he,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST);var pe=Vu(K,oe||[0,0],te||1,Q,n);d instanceof Ti?y.draw(p,f.TRIANGLES,N,O.disabled,v,X.disabled,pe,n.id,d.boundsBuffer,i.quadTriangleIndexBuffer,d.boundsSegments):y.draw(p,f.TRIANGLES,N,z[D.overscaledZ],v,X.disabled,pe,n.id,i.rasterBoundsBuffer,i.quadTriangleIndexBuffer,i.rasterBoundsSegments)}},background:function(i,o,n){var s=n.paint.get("background-color"),p=n.paint.get("background-opacity");if(p!==0){var f=i.context,d=f.gl,y=i.transform,v=y.tileSize,S=n.paint.get("background-pattern");if(!i.isPatternMissing(S)){var z=!S&&s.a===1&&p===1&&i.opaquePassEnabledForLayer()?"opaque":"translucent";if(i.renderPass===z){var C=O.disabled,k=i.depthModeForSublayer(0,z==="opaque"?M.ReadWrite:M.ReadOnly),F=i.colorModeForRenderPass(),R=i.useProgram(S?"backgroundPattern":"background"),j=y.coveringTiles({tileSize:v});S&&(f.activeTexture.set(d.TEXTURE0),i.imageManager.bind(i.context));for(var D=n.getCrossfadeParameters(),N=0,G=j;N<G.length;N+=1){var K=G[N],ee=i.transform.calculatePosMatrix(K.toUnwrapped()),Q=S?_o(ee,p,i,S,{tileID:K,tileSize:v},D):Ko(ee,p,s);R.draw(f,d.TRIANGLES,k,C,F,X.disabled,Q,n.id,i.tileExtentBuffer,i.quadTriangleIndexBuffer,i.tileExtentSegments)}}}}},debug:function(i,o,n){for(var s=0;s<n.length;s++)Xl(i,o,n[s])},custom:function(i,o,n){var s=i.context,p=n.implementation;if(i.renderPass==="offscreen"){var f=p.prerender;f&&(i.setCustomLayerDefaults(),s.setColorMode(i.colorModeForRenderPass()),f.call(p,s.gl,i.transform.customLayerMatrix()),s.setDirty(),i.setBaseState())}else if(i.renderPass==="translucent"){i.setCustomLayerDefaults(),s.setColorMode(i.colorModeForRenderPass()),s.setStencilMode(O.disabled);var d=p.renderingMode==="3d"?new M(i.context.gl.LEQUAL,M.ReadWrite,i.depthRangeFor3D):i.depthModeForSublayer(0,M.ReadOnly);
vendor: 73,002 bytes, line 497
497s.setDepthMode(d),p.render(s.gl,i.transform.customLayerMatrix()),s.setDirty(),i.setBaseState(),s.bindFramebuffer.set(null)}}},It=function(i,o){this.context=new P(i),this.transform=o,this._tileTextures={},this.setup(),this.numSublayers=U.maxUnderzooming+U.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Yi,this.gpuTimers={}};It.prototype.resize=function(i,o){if(this.width=i*u.browser.devicePixelRatio,this.height=o*u.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,s=this.style._order;n<s.length;n+=1)this.style._layers[s[n]].resize()},It.prototype.setup=function(){var i=this.context,o=new u.StructArrayLayout2i4;o.emplaceBack(0,0),o.emplaceBack(u.EXTENT,0),o.emplaceBack(0,u.EXTENT),o.emplaceBack(u.EXTENT,u.EXTENT),this.tileExtentBuffer=i.createVertexBuffer(o,jt.members),this.tileExtentSegments=u.SegmentVector.simpleSegment(0,0,4,2);var n=new u.StructArrayLayout2i4;n.emplaceBack(0,0),n.emplaceBack(u.EXTENT,0),n.emplaceBack(0,u.EXTENT),n.emplaceBack(u.EXTENT,u.EXTENT),this.debugBuffer=i.createVertexBuffer(n,jt.members),this.debugSegments=u.SegmentVector.simpleSegment(0,0,4,5);var s=new u.StructArrayLayout4i8;s.emplaceBack(0,0,0,0),s.emplaceBack(u.EXTENT,0,u.EXTENT,0),s.emplaceBack(0,u.EXTENT,0,u.EXTENT),s.emplaceBack(u.EXTENT,u.EXTENT,u.EXTENT,u.EXTENT),this.rasterBoundsBuffer=i.createVertexBuffer(s,hi.members),this.rasterBoundsSegments=u.SegmentVector.simpleSegment(0,0,4,2);var p=new u.StructArrayLayout2i4;p.emplaceBack(0,0),p.emplaceBack(1,0),p.emplaceBack(0,1),p.emplaceBack(1,1),this.viewportBuffer=i.createVertexBuffer(p,jt.members),this.viewportSegments=u.SegmentVector.simpleSegment(0,0,4,2);var f=new u.StructArrayLayout1ui2;f.emplaceBack(0),f.emplaceBack(1),f.emplaceBack(3),f.emplaceBack(2),f.emplaceBack(0),this.tileBorderIndexBuffer=i.createIndexBuffer(f);var d=new u.StructArrayLayout3ui6;d.emplaceBack(0,1,2),d.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=i.createIndexBuffer(d),this.emptyTexture=new u.Texture(i,{width:1,height:1,data:new Uint8Array([0,0,0,0])},i.gl.RGBA);var y=this.context.gl;this.stencilClearMode=new O({func:y.ALWAYS,mask:0},0,255,y.ZERO,y.ZERO,y.ZERO)},It.prototype.clearStencil=function(){var i=this.context,o=i.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var n=u.create();u.ortho(n,0,this.width,this.height,0,0,1),u.scale(n,n,[o.drawingBufferWidth,o.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(i,o.TRIANGLES,M.disabled,this.stencilClearMode,Z.disabled,X.disabled,Vn(n),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},It.prototype._renderTileClippingMasks=function(i,o){if(this.currentStencilSource!==i.source&&i.isTileClipped()&&o&&o.length){this.currentStencilSource=i.source;var n=this.context,s=n.gl;this.nextStencilID+o.length>256&&this.clearStencil(),n.setColorMode(Z.disabled),n.setDepthMode(M.disabled);var p=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var f=0,d=o;f<d.length;f+=1){var y=d[f],v=this._tileClippingMaskIDs[y.key]=this.nextStencilID++;p.draw(n,s.TRIANGLES,M.disabled,new O({func:s.ALWAYS,mask:0},v,255,s.KEEP,s.KEEP,s.REPLACE),Z.disabled,X.disabled,Vn(y.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},It.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var i=this.nextStencilID++,o=this.context.gl;return new O({func:o.NOTEQUAL,mask:255},i,255,o.KEEP,o.KEEP,o.REPLACE)},It.prototype.stencilModeForClipping=function(i){var o=this.context.gl;return new O({func:o.EQUAL,mask:255},this._tileClippingMaskIDs[i.key],0,o.KEEP,o.KEEP,o.REPLACE)},It.prototype.stencilConfigForOverlap=function(i){var o,n=this.context.gl,s=i.sort(function(v,S){return S.overscaledZ-v.overscaledZ}),p=s[s.length-1].overscaledZ,f=s[0].overscaledZ-p+1;if(f>1){this.currentStencilSource=void 0,this.nextStencilID+f>256&&this.clearStencil();for(var d={},y=0;y<f;y++)d[y+p]=new O({func:n.GEQUAL,mask:255},y+this.nextStencilID,255,n.KEEP,n.KEEP,n.REPLACE);return this.nextStencilID+=f,[d,s]}return[(o={},o[p]=O.disabled,o),s]},It.prototype.colorModeForRenderPass=function(){var i=this.context.gl;return this._showOverdrawInspector?new Z([i.CONSTANT_COLOR,i.ONE],new u.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Z.unblended:Z.alphaBlended},It.prototype.depthModeForSublayer=function(i,o,n){if(!this.opaquePassEnabledForLayer())return M.disabled;var s=1-((1+this.currentLayer)*this.numSublayers+i)*this.depthEpsilon;return new M(n||this.context.gl.LEQUAL,o,[s,s])},It.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},It.prototype.render=function(i,o){var n=this;this.style=i,this.options=o,this.lineAtlas=i.lineAtlas,this.imageManager=i.imageManager,this.glyphManager=i.glyphManager,this.symbolFadeChange=i.placement.symbolFadeChange(u.browser.now()),this.imageManager.beginFrame();var s=this.style._order,p=this.style.sourceCaches;for(var f in p){var d=p[f];d.used&&d.prepare(this.context)}var y,v,S={},z={},C={};for(var k in p){var F=p[k];S[k]=F.getVisibleCoordinates(),z[k]=S[k].slice().reverse(),C[k]=F.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var R=0;R<s.length;R++)if(this.style._layers[s[R]].is3D()){this.opaquePassCutoff=R;break}this.renderPass="offscreen";for(var j=0,D=s;j<D.length;j+=1){var N=this.style._layers[D[j]];if(N.hasOffscreenPass()&&!N.isHidden(this.transform.zoom)){var G=z[N.source];(N.type==="custom"||G.length)&&this.renderLayer(this,p[N.source],N,G)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:o.showOverdrawInspector?u.Color.black:u.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=o.showOverdrawInspector,this.depthRangeFor3D=[0,1-(i._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=s.length-1;this.currentLayer>=0;this.currentLayer--){var K=this.style._layers[s[this.currentLayer]],ee=p[K.source],Q=S[K.source];this._renderTileClippingMasks(K,Q),this.renderLayer(this,ee,K,Q)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<s.length;this.currentLayer++){var te=this.style._layers[s[this.currentLayer]],oe=p[te.source],he=(te.type==="symbol"?C:z)[te.source];this._renderTileClippingMasks(te,S[te.source]),this.renderLayer(this,oe,te,he)}this.options.showTileBoundaries&&(u.values(this.style._layers).forEach(function(pe){pe.source&&!pe.isHidden(n.transform.zoom)&&(pe.source!==(v&&v.id)&&(v=n.style.sourceCaches[pe.source]),(!y||y.getSource().maxzoom<v.getSource().maxzoom)&&(y=v))}),y&&jn.debug(this,y,y.getVisibleCoordinates())),this.options.showPadding&&function(pe){var be=pe.transform.padding;Bs(pe,pe.transform.height-(be.top||0),3,Ds),Bs(pe,be.bottom||0,3,Zl),Rs(pe,be.left||0,3,Gl),Rs(pe,pe.transform.width-(be.right||0),3,La);var ke=pe.transform.centerPoint;(function(Be,Le,nt,we){Jo(Be,Le-1,nt-10,2,20,we),Jo(Be,Le-10,nt-1,20,2,we)})(pe,ke.x,pe.transform.height-ke.y,Ls)}(this),this.context.setDefault()},It.prototype.renderLayer=function(i,o,n,s){n.isHidden(this.transform.zoom)||(n.type==="background"||n.type==="custom"||s.length)&&(this.id=n.id,this.gpuTimingStart(n),jn[n.type](i,o,n,s,this.style.placement.variableOffsets),this.gpuTimingEnd())},It.prototype.gpuTimingStart=function(i){if(this.options.gpuTiming){var o=this.context.extTimerQuery,n=this.gpuTimers[i.id];n||(n=this.gpuTimers[i.id]={calls:0,cpuTime:0,query:o.createQueryEXT()}),n.calls++,o.beginQueryEXT(o.TIME_ELAPSED_EXT,n.query)}},It.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var i=this.context.extTimerQuery;i.endQueryEXT(i.TIME_ELAPSED_EXT)}},It.prototype.collectGpuTimers=function(){var i=this.gpuTimers;return this.gpuTimers={},i},It.prototype.queryGpuTimers=function(i){var o={};for(var n in i){var s=i[n],p=this.context.extTimerQuery,f=p.getQueryObjectEXT(s.query,p.QUERY_RESULT_EXT)/1e6;p.deleteQueryEXT(s.query),o[n]=f}return o},It.prototype.translatePosMatrix=function(i,o,n,s,p){if(!n[0]&&!n[1])return i;var f=p?s==="map"?this.transform.angle:0:s==="viewport"?-this.transform.angle:0;if(f){var d=Math.sin(f),y=Math.cos(f);n=[n[0]*y-n[1]*d,n[0]*d+n[1]*y]}var v=[p?n[0]:Tt(o,n[0],this.transform.zoom),p?n[1]:Tt(o,n[1],this.transform.zoom),0],S=new Float32Array(16);return u.translate(S,i,v),S},It.prototype.saveTileTexture=function(i){var o=this._tileTextures[i.size[0]];o?o.push(i):this._tileTextures[i.size[0]]=[i]},It.prototype.getTileTexture=function(i){var o=this._tileTextures[i];return o&&o.length>0?o.pop():null},It.prototype.isPatternMissing=function(i){if(!i)return!1;if(!i.from||!i.to)return!0;var o=this.imageManager.getPattern(i.from.toString()),n=this.imageManager.getPattern(i.to.toString());return!o||!n},It.prototype.useProgram=function(i,o){this.cache=this.cache||{};var n=""+i+(o?o.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[n]||(this.cache[n]=new kl(this.context,i,Fu[i],o,Vl[i],this._showOverdrawInspector)),this.cache[n]},It.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},It.prototype.setBaseState=function(){var i=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(i.FUNC_ADD)},It.prototype.initDebugOverlayCanvas=function(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=u.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new u.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},It.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Ba=function(i,o){this.points=i,this.planes=o};Ba.fromInvProjectionMatrix=function(i,o,n){var s=Math.pow(2,n),p=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(function(d){return u.transformMat4([],d,i)}).map(function(d){return u.scale$1([],d,1/d[3]/o*s)}),f=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(d){var y=u.sub([],p[d[0]],p[d[1]]),v=u.sub([],p[d[2]],p[d[1]]),S=u.normalize([],u.cross([],y,v)),z=-u.dot(S,p[d[1]]);return S.concat(z)});return new Ba(p,f)};var qn=function(i,o){this.min=i,this.max=o,this.center=u.scale$2([],u.add([],this.min,this.max),.5)};qn.prototype.quadrant=function(i){for(var o=[i%2==0,i<2],n=u.clone$2(this.min),s=u.clone$2(this.max),p=0;p<o.length;p++)n[p]=o[p]?this.min[p]:this.center[p],s[p]=o[p]?this.center[p]:this.max[p];return s[2]=this.max[2],new qn(n,s)},qn.prototype.distanceX=function(i){return Math.max(Math.min(this.max[0],i[0]),this.min[0])-i[0]},qn.prototype.distanceY=function(i){return Math.max(Math.min(this.max[1],i[1]),this.min[1])-i[1]},qn.prototype.intersects=function(i){for(var o=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],n=!0,s=0;s<i.planes.length;s++){for(var p=i.planes[s],f=0,d=0;d<o.length;d++)f+=u.dot$1(p,o[d])>=0;if(f===0)return 0;f!==o.length&&(n=!1)}if(n)return 2;for(var y=0;y<3;y++){for(var v=Number.MAX_VALUE,S=-Number.MAX_VALUE,z=0;z<i.points.length;z++){var C=i.points[z][y]-this.min[y];v=Math.min(v,C),S=Math.max(S,C)}if(S<0||v>this.max[y]-this.min[y])return 0}return 1};var an=function(i,o,n,s){if(i===void 0&&(i=0),o===void 0&&(o=0),n===void 0&&(n=0),s===void 0&&(s=0),isNaN(i)||i<0||isNaN(o)||o<0||isNaN(n)||n<0||isNaN(s)||s<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=i,this.bottom=o,this.left=n,this.right=s};an.prototype.interpolate=function(i,o,n){return o.top!=null&&i.top!=null&&(this.top=u.number(i.top,o.top,n)),o.bottom!=null&&i.bottom!=null&&(this.bottom=u.number(i.bottom,o.bottom,n)),o.left!=null&&i.left!=null&&(this.left=u.number(i.left,o.left,n)),o.right!=null&&i.right!=null&&(this.right=u.number(i.right,o.right,n)),this},an.prototype.getCenter=function(i,o){var n=u.clamp((this.left+i-this.right)/2,0,i),s=u.clamp((this.top+o-this.bottom)/2,0,o);return new u.Point(n,s)},an.prototype.equals=function(i){return this.top===i.top&&this.bottom===i.bottom&&this.left===i.left&&this.right===i.right},an.prototype.clone=function(){return new an(this.top,this.bottom,this.left,this.right)},an.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var tt=function(i,o,n,s,p){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=p===void 0||p,this._minZoom=i||0,this._maxZoom=o||22,this._minPitch=n??0,this._maxPitch=s??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new u.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new an,this._posMatrixCache={},this._alignedPosMatrixCache={}},bt={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};tt.prototype.clone=function(){var i=new tt(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return i.tileSize=this.tileSize,i.latRange=this.latRange,i.width=this.width,i.height=this.height,i._center=this._center,i.zoom=this.zoom,i.angle=this.angle,i._fov=this._fov,i._pitch=this._pitch,i._unmodified=this._unmodified,i._edgeInsets=this._edgeInsets.clone(),i._calcMatrices(),i},bt.minZoom.get=function(){return this._minZoom},bt.minZoom.set=function(i){this._minZoom!==i&&(this._minZoom=i,this.zoom=Math.max(this.zoom,i))},bt.maxZoom.get=function(){return this._maxZoom},bt.maxZoom.set=function(i){this._maxZoom!==i&&(this._maxZoom=i,this.zoom=Math.min(this.zoom,i))},bt.minPitch.get=function(){return this._minPitch},bt.minPitch.set=function(i){this._minPitch!==i&&(this._minPitch=i,this.pitch=Math.max(this.pitch,i))},bt.maxPitch.get=function(){return this._maxPitch},bt.maxPitch.set=function(i){this._maxPitch!==i&&(this._maxPitch=i,this.pitch=Math.min(this.pitch,i))},bt.renderWorldCopies.get=function(){return this._renderWorldCopies},bt.renderWorldCopies.set=function(i){i===void 0?i=!0:i===null&&(i=!1),this._renderWorldCopies=i},bt.worldSize.get=function(){return this.tileSize*this.scale},bt.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},bt.size.get=function(){return new u.Point(this.width,this.height)},bt.bearing.get=function(){return-this.angle/Math.PI*180},bt.bearing.set=function(i){var o=-u.wrap(i,-180,180)*Math.PI/180;this.angle!==o&&(this._unmodified=!1,this.angle=o,this._calcMatrices(),this.rotationMatrix=u.create$2(),u.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},bt.pitch.get=function(){return this._pitch/Math.PI*180},bt.pitch.set=function(i){var o=u.clamp(i,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==o&&(this._unmodified=!1,this._pitch=o,this._calcMatrices())},bt.fov.get=function(){return this._fov/Math.PI*180},bt.fov.set=function(i){i=Math.max(.01,Math.min(60,i)),this._fov!==i&&(this._unmodified=!1,this._fov=i/180*Math.PI,this._calcMatrices())},bt.zoom.get=function(){return this._zoom},bt.zoom.set=function(i){var o=Math.min(Math.max(i,this.minZoom),this.maxZoom);this._zoom!==o&&(this._unmodified=!1,this._zoom=o,this.scale=this.zoomScale(o),this.tileZoom=Math.floor(o),this.zoomFraction=o-this.tileZoom,this._constrain(),this._calcMatrices())},bt.center.get=function(){return this._center},bt.center.set=function(i){i.lat===this._center.lat&&i.lng===this._center.lng||(this._unmodified=!1,this._center=i,this._constrain(),this._calcMatrices())},bt.padding.get=function(){return this._edgeInsets.toJSON()},bt.padding.set=function(i){this._edgeInsets.equals(i)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,i,1),this._calcMatrices())},bt.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},tt.prototype.isPaddingEqual=function(i){return this._edgeInsets.equals(i)},tt.prototype.interpolatePadding=function(i,o,n){this._unmodified=!1,this._edgeInsets.interpolate(i,o,n),this._constrain(),this._calcMatrices()},tt.prototype.coveringZoomLevel=function(i){var o=(i.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/i.tileSize));return Math.max(0,o)},tt.prototype.getVisibleUnwrappedCoordinates=function(i){var o=[new u.UnwrappedTileID(0,i)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new u.Point(0,0)),s=this.pointCoordinate(new u.Point(this.width,0)),p=this.pointCoordinate(new u.Point(this.width,this.height)),f=this.pointCoordinate(new u.Point(0,this.height)),d=Math.floor(Math.min(n.x,s.x,p.x,f.x)),y=Math.floor(Math.max(n.x,s.x,p.x,f.x)),v=d-1;v<=y+1;v++)v!==0&&o.push(new u.UnwrappedTileID(v,i));return o},tt.prototype.coveringTiles=function(i){var o=this.coveringZoomLevel(i),n=o;if(i.minzoom!==void 0&&o<i.minzoom)return[];i.maxzoom!==void 0&&o>i.maxzoom&&(o=i.maxzoom);var s=u.MercatorCoordinate.fromLngLat(this.center),p=Math.pow(2,o),f=[p*s.x,p*s.y,0],d=Ba.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,o),y=i.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(y=o);var v=function(pe){return{aabb:new qn([pe*p,0,0],[(pe+1)*p,p,0]),zoom:0,x:0,y:0,wrap:pe,fullyVisible:!1}},S=[],z=[],C=o,k=i.reparseOverscaled?n:o;if(this._renderWorldCopies)for(var F=1;F<=3;F++)S.push(v(-F)),S.push(v(F));for(S.push(v(0));S.length>0;){var R=S.pop(),j=R.x,D=R.y,N=R.fullyVisible;if(!N){var G=R.aabb.intersects(d);if(G===0)continue;N=G===2}var K=R.aabb.distanceX(f),ee=R.aabb.distanceY(f),Q=Math.max(Math.abs(K),Math.abs(ee));if(R.zoom===C||Q>3+(1<<C-R.zoom)-2&&R.zoom>=y)z.push({tileID:new u.OverscaledTileID(R.zoom===C?k:R.zoom,R.wrap,R.zoom,j,D),distanceSq:u.sqrLen([f[0]-.5-j,f[1]-.5-D])});else for(var te=0;te<4;te++){var oe=(j<<1)+te%2,he=(D<<1)+(te>>1);S.push({aabb:R.aabb.quadrant(te),zoom:R.zoom+1,x:oe,y:he,wrap:R.wrap,fullyVisible:N})}}return z.sort(function(pe,be){return pe.distanceSq-be.distanceSq}).map(function(pe){return pe.tileID})},tt.prototype.resize=function(i,o){this.width=i,this.height=o,this.pixelsToGLUnits=[2/i,-2/o],this._constrain(),this._calcMatrices()},bt.unmodified.get=function(){return this._unmodified},tt.prototype.zoomScale=function(i){return Math.pow(2,i)},tt.prototype.scaleZoom=function(i){return Math.log(i)/Math.LN2},tt.prototype.project=function(i){var o=u.clamp(i.lat,-this.maxValidLatitude,this.maxValidLatitude);return new u.Point(u.mercatorXfromLng(i.lng)*this.worldSize,u.mercatorYfromLat(o)*this.worldSize)},tt.prototype.unproject=function(i){return new u.MercatorCoordinate(i.x/this.worldSize,i.y/this.worldSize).toLngLat()},bt.point.get=function(){return this.project(this.center)},tt.prototype.setLocationAtPoint=function(i,o){var n=this.pointCoordinate(o),s=this.pointCoordinate(this.centerPoint),p=this.locationCoordinate(i),f=new u.MercatorCoordinate(p.x-(n.x-s.x),p.y-(n.y-s.y));this.center=this.coordinateLocation(f),this._renderWorldCopies&&(this.center=this.center.wrap())},tt.prototype.locationPoint=function(i){return this.coordinatePoint(this.locationCoordinate(i))},tt.prototype.pointLocation=function(i){return this.coordinateLocation(this.pointCoordinate(i))},tt.prototype.locationCoordinate=function(i){return u.MercatorCoordinate.fromLngLat(i)},tt.prototype.coordinateLocation=function(i){return i.toLngLat()},tt.prototype.pointCoordinate=function(i){var o=[i.x,i.y,0,1],n=[i.x,i.y,1,1];u.transformMat4(o,o,this.pixelMatrixInverse),u.transformMat4(n,n,this.pixelMatrixInverse);var s=o[3],p=n[3],f=o[1]/s,d=n[1]/p,y=o[2]/s,v=n[2]/p,S=y===v?0:(0-y)/(v-y);return new u.MercatorCoordinate(u.number(o[0]/s,n[0]/p,S)/this.worldSize,u.number(f,d,S)/this.worldSize)},tt.prototype.coordinatePoint=function(i){var o=[i.x*this.worldSize,i.y*this.worldSize,0,1];return u.transformMat4(o,o,this.pixelMatrix),new u.Point(o[0]/o[3],o[1]/o[3])},tt.prototype.getBounds=function(){return new u.LngLatBounds().extend(this.pointLocation(new u.Point(0,0))).extend(this.pointLocation(new u.Point(this.width,0))).extend(this.pointLocation(new u.Point(this.width,this.height))).extend(this.pointLocation(new u.Point(0,this.height)))},tt.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new u.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},tt.prototype.setMaxBounds=function(i){i?(this.lngRange=[i.getWest(),i.getEast()],this.latRange=[i.getSouth(),i.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},tt.prototype.calculatePosMatrix=function(i,o){o===void 0&&(o=!1);var n=i.key,s=o?this._alignedPosMatrixCache:this._posMatrixCache;if(s[n])return s[n];var p=i.canonical,f=this.worldSize/this.zoomScale(p.z),d=p.x+Math.pow(2,p.z)*i.wrap,y=u.identity(new Float64Array(16));return u.translate(y,y,[d*f,p.y*f,0]),u.scale(y,y,[f/u.EXTENT,f/u.EXTENT,1]),u.multiply(y,o?this.alignedProjMatrix:this.projMatrix,y),s[n]=new Float32Array(y),s[n]},tt.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},tt.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var i,o,n,s,p=-90,f=90,d=-180,y=180,v=this.size,S=this._unmodified;if(this.latRange){var z=this.latRange;p=u.mercatorYfromLat(z[1])*this.worldSize,i=(f=u.mercatorYfromLat(z[0])*this.worldSize)-p<v.y?v.y/(f-p):0}if(this.lngRange){var C=this.lngRange;d=u.mercatorXfromLng(C[0])*this.worldSize,o=(y=u.mercatorXfromLng(C[1])*this.worldSize)-d<v.x?v.x/(y-d):0}var k=this.point,F=Math.max(o||0,i||0);if(F)return this.center=this.unproject(new u.Point(o?(y+d)/2:k.x,i?(f+p)/2:k.y)),this.zoom+=this.scaleZoom(F),this._unmodified=S,void(this._constraining=!1);if(this.latRange){var R=k.y,j=v.y/2;R-j<p&&(s=p+j),R+j>f&&(s=f-j)}if(this.lngRange){var D=k.x,N=v.x/2;D-N<d&&(n=d+N),D+N>y&&(n=y-N)}n===void 0&&s===void 0||(this.center=this.unproject(new u.Point(n!==void 0?n:k.x,s!==void 0?s:k.y))),this._unmodified=S,this._constraining=!1}},tt.prototype._calcMatrices=function(){if(this.height){var i=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var o=Math.PI/2+this._pitch,n=this._fov*(.5+i.y/this.height),s=Math.sin(n)*this.cameraToCenterDistance/Math.sin(u.clamp(Math.PI-o-n,.01,Math.PI-.01)),p=this.point,f=p.x,d=p.y,y=1.01*(Math.cos(Math.PI/2-this._pitch)*s+this.cameraToCenterDistance),v=this.height/50,S=new Float64Array(16);u.perspective(S,this._fov,this.width/this.height,v,y),S[8]=2*-i.x/this.width,S[9]=2*i.y/this.height,u.scale(S,S,[1,-1,1]),u.translate(S,S,[0,0,-this.cameraToCenterDistance]),u.rotateX(S,S,this._pitch),u.rotateZ(S,S,this.angle),u.translate(S,S,[-f,-d,0]),this.mercatorMatrix=u.scale([],S,[this.worldSize,this.worldSize,this.worldSize]),u.scale(S,S,[1,1,u.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=S,this.invProjMatrix=u.invert([],this.projMatrix);var z=this.width%2/2,C=this.height%2/2,k=Math.cos(this.angle),F=Math.sin(this.angle),R=f-Math.round(f)+k*z+F*C,j=d-Math.round(d)+k*C+F*z,D=new Float64Array(S);if(u.translate(D,D,[R>.5?R-1:R,j>.5?j-1:j,0]),this.alignedProjMatrix=D,S=u.create(),u.scale(S,S,[this.width/2,-this.height/2,1]),u.translate(S,S,[1,-1,0]),this.labelPlaneMatrix=S,S=u.create(),u.scale(S,S,[1,-1,1]),u.translate(S,S,[-1,-1,0]),u.scale(S,S,[2/this.width,2/this.height,1]),this.glCoordMatrix=S,this.pixelMatrix=u.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(S=u.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=S,this._posMatrixCache={},this._alignedPosMatrixCache={}}},tt.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var i=this.pointCoordinate(new u.Point(0,0)),o=[i.x*this.worldSize,i.y*this.worldSize,0,1];return u.transformMat4(o,o,this.pixelMatrix)[3]/this.cameraToCenterDistance},tt.prototype.getCameraPoint=function(){var i=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new u.Point(0,i))},tt.prototype.getCameraQueryGeometry=function(i){var o=this.getCameraPoint();if(i.length===1)return[i[0],o];for(var n=o.x,s=o.y,p=o.x,f=o.y,d=0,y=i;d<y.length;d+=1){var v=y[d];n=Math.min(n,v.x),s=Math.min(s,v.y),p=Math.max(p,v.x),f=Math.max(f,v.y)}return[new u.Point(n,s),new u.Point(p,s),new u.Point(p,f),new u.Point(n,f),new u.Point(n,s)]},Object.defineProperties(tt.prototype,bt);var Gr=function(i){var o,n,s,p;this._hashName=i&&encodeURIComponent(i),u.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(o=this._updateHashUnthrottled.bind(this),n=!1,s=null,p=function(){s=null,n&&(o(),s=setTimeout(p,300),n=!1)},function(){return n=!0,s||p(),s})};Gr.prototype.addTo=function(i){return this._map=i,u.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Gr.prototype.remove=function(){return u.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Gr.prototype.getHashString=function(i){var o=this._map.getCenter(),n=Math.round(100*this._map.getZoom())/100,s=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),p=Math.pow(10,s),f=Math.round(o.lng*p)/p,d=Math.round(o.lat*p)/p,y=this._map.getBearing(),v=this._map.getPitch(),S="";if(S+=i?"/"+f+"/"+d+"/"+n:n+"/"+d+"/"+f,(y||v)&&(S+="/"+Math.round(10*y)/10),v&&(S+="/"+Math.round(v)),this._hashName){var z=this._hashName,C=!1,k=u.window.location.hash.slice(1).split("&").map(function(F){var R=F.split("=")[0];return R===z?(C=!0,R+"="+S):F}).filter(function(F){return F});return C||k.push(z+"="+S),"#"+k.join("&")}return"#"+S},Gr.prototype._getCurrentHash=function(){var i,o=this,n=u.window.location.hash.replace("#","");return this._hashName?(n.split("&").map(function(s){return s.split("=")}).forEach(function(s){s[0]===o._hashName&&(i=s)}),(i&&i[1]||"").split("/")):n.split("/")},Gr.prototype._onHashChange=function(){var i=this._getCurrentHash();if(i.length>=3&&!i.some(function(n){return isNaN(n)})){var o=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(i[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+i[2],+i[1]],zoom:+i[0],bearing:o,pitch:+(i[4]||0)}),!0}return!1},Gr.prototype._updateHashUnthrottled=function(){var i=u.window.location.href.replace(/(#.+)?$/,this.getHashString());try{u.window.history.replaceState(u.window.history.state,null,i)}catch{}};var Yo={linearity:.3,easing:u.bezier(0,0,.3,1)},vo=u.extend({deceleration:2500,maxSpeed:1400},Yo),Qo=u.extend({deceleration:20,maxSpeed:1400},Yo),ju=u.extend({deceleration:1e3,maxSpeed:360},Yo),qu=u.extend({deceleration:1e3,maxSpeed:90},Yo),$o=function(i){this._map=i,this.clear()};function ea(i,o){(!i.duration||i.duration<o.duration)&&(i.duration=o.duration,i.easing=o.easing)}function Vi(i,o,n){var s=n.maxSpeed,p=n.linearity,f=n.deceleration,d=u.clamp(i*p/(o/1e3),-s,s),y=Math.abs(d)/(f*p);return{easing:n.easing,duration:1e3*y,amount:d*(y/2)}}$o.prototype.clear=function(){this._inertiaBuffer=[]},$o.prototype.record=function(i){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:u.browser.now(),settings:i})},$o.prototype._drainInertiaBuffer=function(){for(var i=this._inertiaBuffer,o=u.browser.now();i.length>0&&o-i[0].time>160;)i.shift()},$o.prototype._onMoveEnd=function(i){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var o={zoom:0,bearing:0,pitch:0,pan:new u.Point(0,0),pinchAround:void 0,around:void 0},n=0,s=this._inertiaBuffer;n<s.length;n+=1){var p=s[n].settings;o.zoom+=p.zoomDelta||0,o.bearing+=p.bearingDelta||0,o.pitch+=p.pitchDelta||0,p.panDelta&&o.pan._add(p.panDelta),p.around&&(o.around=p.around),p.pinchAround&&(o.pinchAround=p.pinchAround)}var f=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,d={};if(o.pan.mag()){var y=Vi(o.pan.mag(),f,u.extend({},vo,i||{}));d.offset=o.pan.mult(y.amount/o.pan.mag()),d.center=this._map.transform.center,ea(d,y)}if(o.zoom){var v=Vi(o.zoom,f,Qo);d.zoom=this._map.transform.zoom+v.amount,ea(d,v)}if(o.bearing){var S=Vi(o.bearing,f,ju);d.bearing=this._map.transform.bearing+u.clamp(S.amount,-179,179),ea(d,S)}if(o.pitch){var z=Vi(o.pitch,f,qu);d.pitch=this._map.transform.pitch+z.amount,ea(d,z)}if(d.zoom||d.bearing){var C=o.pinchAround===void 0?o.around:o.pinchAround;d.around=C?this._map.unproject(C):this._map.getCenter()}return this.clear(),u.extend(d,{noMoveStart:!0})}};var Gt=function(i){function o(s,p,f,d){d===void 0&&(d={});var y=ce.mousePos(p.getCanvasContainer(),f),v=p.unproject(y);i.call(this,s,u.extend({point:y,lngLat:v,originalEvent:f},d)),this._defaultPrevented=!1,this.target=p}i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o;var n={defaultPrevented:{configurable:!0}};return o.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(o.prototype,n),o}(u.Event),ta=function(i){function o(s,p,f){var d=s==="touchend"?f.changedTouches:f.touches,y=ce.touchPos(p.getCanvasContainer(),d),v=y.map(function(C){return p.unproject(C)}),S=y.reduce(function(C,k,F,R){return C.add(k.div(R.length))},new u.Point(0,0)),z=p.unproject(S);i.call(this,s,{points:y,point:S,lngLats:v,lngLat:z,originalEvent:f}),this._defaultPrevented=!1}i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o;var n={defaultPrevented:{configurable:!0}};return o.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(o.prototype,n),o}(u.Event),Wl=function(i){function o(s,p,f){i.call(this,s,{originalEvent:f}),this._defaultPrevented=!1}i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o;var n={defaultPrevented:{configurable:!0}};return o.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(o.prototype,n),o}(u.Event),qt=function(i,o){this._map=i,this._clickTolerance=o.clickTolerance};qt.prototype.reset=function(){delete this._mousedownPos},qt.prototype.wheel=function(i){return this._firePreventable(new Wl(i.type,this._map,i))},qt.prototype.mousedown=function(i,o){return this._mousedownPos=o,this._firePreventable(new Gt(i.type,this._map,i))},qt.prototype.mouseup=function(i){this._map.fire(new Gt(i.type,this._map,i))},qt.prototype.click=function(i,o){this._mousedownPos&&this._mousedownPos.dist(o)>=this._clickTolerance||this._map.fire(new Gt(i.type,this._map,i))},qt.prototype.dblclick=function(i){return this._firePreventable(new Gt(i.type,this._map,i))},qt.prototype.mouseover=function(i){this._map.fire(new Gt(i.type,this._map,i))},qt.prototype.mouseout=function(i){this._map.fire(new Gt(i.type,this._map,i))},qt.prototype.touchstart=function(i){return this._firePreventable(new ta(i.type,this._map,i))},qt.prototype.touchmove=function(i){this._map.fire(new ta(i.type,this._map,i))},qt.prototype.touchend=function(i){this._map.fire(new ta(i.type,this._map,i))},qt.prototype.touchcancel=function(i){this._map.fire(new ta(i.type,this._map,i))},qt.prototype._firePreventable=function(i){if(this._map.fire(i),i.defaultPrevented)return{}},qt.prototype.isEnabled=function(){return!0},qt.prototype.isActive=function(){return!1},qt.prototype.enable=function(){},qt.prototype.disable=function(){};var Te=function(i){this._map=i};Te.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Te.prototype.mousemove=function(i){this._map.fire(new Gt(i.type,this._map,i))},Te.prototype.mousedown=function(){this._delayContextMenu=!0},Te.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Gt("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Te.prototype.contextmenu=function(i){this._delayContextMenu?this._contextMenuEvent=i:this._map.fire(new Gt(i.type,this._map,i)),this._map.listens("contextmenu")&&i.preventDefault()},Te.prototype.isEnabled=function(){return!0},Te.prototype.isActive=function(){return!1},Te.prototype.enable=function(){},Te.prototype.disable=function(){};var Rr=function(i,o){this._map=i,this._el=i.getCanvasContainer(),this._container=i.getContainer(),this._clickTolerance=o.clickTolerance||1};function Ra(i,o){for(var n={},s=0;s<i.length;s++)n[i[s].identifier]=o[s];return n}Rr.prototype.isEnabled=function(){return!!this._enabled},Rr.prototype.isActive=function(){return!!this._active},Rr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Rr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Rr.prototype.mousedown=function(i,o){this.isEnabled()&&i.shiftKey&&i.button===0&&(ce.disableDrag(),this._startPos=this._lastPos=o,this._active=!0)},Rr.prototype.mousemoveWindow=function(i,o){if(this._active){var n=o;if(!(this._lastPos.equals(n)||!this._box&&n.dist(this._startPos)<this._clickTolerance)){var s=this._startPos;this._lastPos=n,this._box||(this._box=ce.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",i));var p=Math.min(s.x,n.x),f=Math.max(s.x,n.x),d=Math.min(s.y,n.y),y=Math.max(s.y,n.y);ce.setTransform(this._box,"translate("+p+"px,"+d+"px)"),this._box.style.width=f-p+"px",this._box.style.height=y-d+"px"}}},Rr.prototype.mouseupWindow=function(i,o){var n=this;if(this._active&&i.button===0){var s=this._startPos,p=o;if(this.reset(),ce.suppressClick(),s.x!==p.x||s.y!==p.y)return this._map.fire(new u.Event("boxzoomend",{originalEvent:i})),{cameraAnimation:function(f){return f.fitScreenCoordinates(s,p,n._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",i)}},Rr.prototype.keydown=function(i){this._active&&i.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",i))},Rr.prototype.blur=function(){this.reset()},Rr.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(ce.remove(this._box),this._box=null),ce.enableDrag(),delete this._startPos,delete this._lastPos},Rr.prototype._fireEvent=function(i,o){return this._map.fire(new u.Event(i,{originalEvent:o}))};var xo=function(i){this.reset(),this.numTouches=i.numTouches};xo.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},xo.prototype.touchstart=function(i,o,n){(this.centroid||n.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=i.timeStamp),n.length===this.numTouches&&(this.centroid=function(s){for(var p=new u.Point(0,0),f=0,d=s;f<d.length;f+=1)p._add(d[f]);return p.div(s.length)}(o),this.touches=Ra(n,o)))},xo.prototype.touchmove=function(i,o,n){if(!this.aborted&&this.centroid){var s=Ra(n,o);for(var p in this.touches){var f=s[p];(!f||f.dist(this.touches[p])>30)&&(this.aborted=!0)}}},xo.prototype.touchend=function(i,o,n){if((!this.centroid||i.timeStamp-this.startTime>500)&&(this.aborted=!0),n.length===0){var s=!this.aborted&&this.centroid;if(this.reset(),s)return s}};var gi=function(i){this.singleTap=new xo(i),this.numTaps=i.numTaps,this.reset()};gi.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},gi.prototype.touchstart=function(i,o,n){this.singleTap.touchstart(i,o,n)},gi.prototype.touchmove=function(i,o,n){this.singleTap.touchmove(i,o,n)},gi.prototype.touchend=function(i,o,n){var s=this.singleTap.touchend(i,o,n);if(s){var p=i.timeStamp-this.lastTime<500,f=!this.lastTap||this.lastTap.dist(s)<30;if(p&&f||this.reset(),this.count++,this.lastTime=i.timeStamp,this.lastTap=s,this.count===this.numTaps)return this.reset(),s}};var Or=function(){this._zoomIn=new gi({numTouches:1,numTaps:2}),this._zoomOut=new gi({numTouches:2,numTaps:1}),this.reset()};Or.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Or.prototype.touchstart=function(i,o,n){this._zoomIn.touchstart(i,o,n),this._zoomOut.touchstart(i,o,n)},Or.prototype.touchmove=function(i,o,n){this._zoomIn.touchmove(i,o,n),this._zoomOut.touchmove(i,o,n)},Or.prototype.touchend=function(i,o,n){var s=this,p=this._zoomIn.touchend(i,o,n),f=this._zoomOut.touchend(i,o,n);return p?(this._active=!0,i.preventDefault(),setTimeout(function(){return s.reset()},0),{cameraAnimation:function(d){return d.easeTo({duration:300,zoom:d.getZoom()+1,around:d.unproject(p)},{originalEvent:i})}}):f?(this._active=!0,i.preventDefault(),setTimeout(function(){return s.reset()},0),{cameraAnimation:function(d){return d.easeTo({duration:300,zoom:d.getZoom()-1,around:d.unproject(f)},{originalEvent:i})}}):void 0},Or.prototype.touchcancel=function(){this.reset()},Or.prototype.enable=function(){this._enabled=!0},Or.prototype.disable=function(){this._enabled=!1,this.reset()},Or.prototype.isEnabled=function(){return this._enabled},Or.prototype.isActive=function(){return this._active};var Os={0:1,2:2},me=function(i){this.reset(),this._clickTolerance=i.clickTolerance||1};me.prototype.blur=function(){this.reset()},me.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},me.prototype._correctButton=function(i,o){return!1},me.prototype._move=function(i,o){return{}},me.prototype.mousedown=function(i,o){if(!this._lastPoint){var n=ce.mouseButton(i);this._correctButton(i,n)&&(this._lastPoint=o,this._eventButton=n)}},me.prototype.mousemoveWindow=function(i,o){var n=this._lastPoint;if(n){if(i.preventDefault(),function(s,p){var f=Os[p];return s.buttons===void 0||(s.buttons&f)!==f}(i,this._eventButton))this.reset();else if(this._moved||!(o.dist(n)<this._clickTolerance))return this._moved=!0,this._lastPoint=o,this._move(n,o)}},me.prototype.mouseupWindow=function(i){this._lastPoint&&ce.mouseButton(i)===this._eventButton&&(this._moved&&ce.suppressClick(),this.reset())},me.prototype.enable=function(){this._enabled=!0},me.prototype.disable=function(){this._enabled=!1,this.reset()},me.prototype.isEnabled=function(){return this._enabled},me.prototype.isActive=function(){return this._active};var Fs=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.mousedown=function(n,s){i.prototype.mousedown.call(this,n,s),this._lastPoint&&(this._active=!0)},o.prototype._correctButton=function(n,s){return s===0&&!n.ctrlKey},o.prototype._move=function(n,s){return{around:s,panDelta:s.sub(n)}},o}(me),Oa=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype._correctButton=function(n,s){return s===0&&n.ctrlKey||s===2},o.prototype._move=function(n,s){var p=.8*(s.x-n.x);if(p)return this._active=!0,{bearingDelta:p}},o.prototype.contextmenu=function(n){n.preventDefault()},o}(me),Us=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype._correctButton=function(n,s){return s===0&&n.ctrlKey||s===2},o.prototype._move=function(n,s){var p=-.5*(s.y-n.y);if(p)return this._active=!0,{pitchDelta:p}},o.prototype.contextmenu=function(n){n.preventDefault()},o}(me),ii=function(i){this._minTouches=1,this._clickTolerance=i.clickTolerance||1,this.reset()};ii.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new u.Point(0,0)},ii.prototype.touchstart=function(i,o,n){return this._calculateTransform(i,o,n)},ii.prototype.touchmove=function(i,o,n){if(this._active&&!(n.length<this._minTouches))return i.preventDefault(),this._calculateTransform(i,o,n)},ii.prototype.touchend=function(i,o,n){this._calculateTransform(i,o,n),this._active&&n.length<this._minTouches&&this.reset()},ii.prototype.touchcancel=function(){this.reset()},ii.prototype._calculateTransform=function(i,o,n){n.length>0&&(this._active=!0);var s=Ra(n,o),p=new u.Point(0,0),f=new u.Point(0,0),d=0;for(var y in s){var v=s[y],S=this._touches[y];S&&(p._add(v),f._add(v.sub(S)),d++,s[y]=v)}if(this._touches=s,!(d<this._minTouches)&&f.mag()){var z=f.div(d);if(this._sum._add(z),!(this._sum.mag()<this._clickTolerance))return{around:p.div(d),panDelta:z}}},ii.prototype.enable=function(){this._enabled=!0},ii.prototype.disable=function(){this._enabled=!1,this.reset()},ii.prototype.isEnabled=function(){return this._enabled},ii.prototype.isActive=function(){return this._active};var Fr=function(){this.reset()};function Fa(i,o,n){for(var s=0;s<i.length;s++)if(i[s].identifier===n)return o[s]}function Ua(i,o){return Math.log(i/o)/Math.LN2}Fr.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Fr.prototype._start=function(i){},Fr.prototype._move=function(i,o,n){return{}},Fr.prototype.touchstart=function(i,o,n){this._firstTwoTouches||n.length<2||(this._firstTwoTouches=[n[0].identifier,n[1].identifier],this._start([o[0],o[1]]))},Fr.prototype.touchmove=function(i,o,n){if(this._firstTwoTouches){i.preventDefault();var s=this._firstTwoTouches,p=s[1],f=Fa(n,o,s[0]),d=Fa(n,o,p);if(f&&d){var y=this._aroundCenter?null:f.add(d).div(2);return this._move([f,d],y,i)}}},Fr.prototype.touchend=function(i,o,n){if(this._firstTwoTouches){var s=this._firstTwoTouches,p=s[1],f=Fa(n,o,s[0]),d=Fa(n,o,p);f&&d||(this._active&&ce.suppressClick(),this.reset())}},Fr.prototype.touchcancel=function(){this.reset()},Fr.prototype.enable=function(i){this._enabled=!0,this._aroundCenter=!!i&&i.around==="center"},Fr.prototype.disable=function(){this._enabled=!1,this.reset()},Fr.prototype.isEnabled=function(){return this._enabled},Fr.prototype.isActive=function(){return this._active};var Ur=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.reset=function(){i.prototype.reset.call(this),delete this._distance,delete this._startDistance},o.prototype._start=function(n){this._startDistance=this._distance=n[0].dist(n[1])},o.prototype._move=function(n,s){var p=this._distance;if(this._distance=n[0].dist(n[1]),this._active||!(Math.abs(Ua(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Ua(this._distance,p),pinchAround:s}},o}(Fr);function Ni(i,o){return 180*i.angleWith(o)/Math.PI}var Kl=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.reset=function(){i.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},o.prototype._start=function(n){this._startVector=this._vector=n[0].sub(n[1]),this._minDiameter=n[0].dist(n[1])},o.prototype._move=function(n,s){var p=this._vector;if(this._vector=n[0].sub(n[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ni(this._vector,p),pinchAround:s}},o.prototype._isBelowThreshold=function(n){this._minDiameter=Math.min(this._minDiameter,n.mag());var s=25/(Math.PI*this._minDiameter)*360,p=Ni(n,this._startVector);return Math.abs(p)<s},o}(Fr);function ra(i){return Math.abs(i.y)>Math.abs(i.x)}var Vs=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.reset=function(){i.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},o.prototype._start=function(n){this._lastPoints=n,ra(n[0].sub(n[1]))&&(this._valid=!1)},o.prototype._move=function(n,s,p){var f=n[0].sub(this._lastPoints[0]),d=n[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(f,d,p.timeStamp),this._valid)return this._lastPoints=n,this._active=!0,{pitchDelta:(f.y+d.y)/2*-.5}},o.prototype.gestureBeginsVertically=function(n,s,p){if(this._valid!==void 0)return this._valid;var f=n.mag()>=2,d=s.mag()>=2;if(f||d){if(!f||!d)return this._firstMove===void 0&&(this._firstMove=p),p-this._firstMove<100&&void 0;var y=n.y>0==s.y>0;return ra(n)&&ra(s)&&y}},o}(Fr),Ns={panStep:100,bearingStep:15,pitchStep:10},vi=function(){var i=Ns;this._panStep=i.panStep,this._bearingStep=i.bearingStep,this._pitchStep=i.pitchStep,this._rotationDisabled=!1};function Xr(i){return i*(2-i)}vi.prototype.blur=function(){this.reset()},vi.prototype.reset=function(){this._active=!1},vi.prototype.keydown=function(i){var o=this;if(!(i.altKey||i.ctrlKey||i.metaKey)){var n=0,s=0,p=0,f=0,d=0;switch(i.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:i.shiftKey?s=-1:(i.preventDefault(),f=-1);break;case 39:i.shiftKey?s=1:(i.preventDefault(),f=1);break;case 38:i.shiftKey?p=1:(i.preventDefault(),d=-1);break;case 40:i.shiftKey?p=-1:(i.preventDefault(),d=1);break;default:return}return this._rotationDisabled&&(s=0,p=0),{cameraAnimation:function(y){var v=y.getZoom();y.easeTo({duration:300,easeId:"keyboardHandler",easing:Xr,zoom:n?Math.round(v)+n*(i.shiftKey?2:1):v,bearing:y.getBearing()+s*o._bearingStep,pitch:y.getPitch()+p*o._pitchStep,offset:[-f*o._panStep,-d*o._panStep],center:y.getCenter()},{originalEvent:i})}}}},vi.prototype.enable=function(){this._enabled=!0},vi.prototype.disable=function(){this._enabled=!1,this.reset()},vi.prototype.isEnabled=function(){return this._enabled},vi.prototype.isActive=function(){return this._active},vi.prototype.disableRotation=function(){this._rotationDisabled=!0},vi.prototype.enableRotation=function(){this._rotationDisabled=!1};var Je=function(i,o){this._map=i,this._el=i.getCanvasContainer(),this._handler=o,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,u.bindAll(["_onTimeout"],this)};Je.prototype.setZoomRate=function(i){this._defaultZoomRate=i},Je.prototype.setWheelZoomRate=function(i){this._wheelZoomRate=i},Je.prototype.isEnabled=function(){return!!this._enabled},Je.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Je.prototype.isZooming=function(){return!!this._zooming},Je.prototype.enable=function(i){this.isEnabled()||(this._enabled=!0,this._aroundCenter=i&&i.around==="center")},Je.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Je.prototype.wheel=function(i){if(this.isEnabled()){var o=i.deltaMode===u.window.WheelEvent.DOM_DELTA_LINE?40*i.deltaY:i.deltaY,n=u.browser.now(),s=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,o!==0&&o%4.000244140625==0?this._type="wheel":o!==0&&Math.abs(o)<4?this._type="trackpad":s>400?(this._type=null,this._lastValue=o,this._timeout=setTimeout(this._onTimeout,40,i)):this._type||(this._type=Math.abs(s*o)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,o+=this._lastValue)),i.shiftKey&&o&&(o/=4),this._type&&(this._lastWheelEvent=i,this._delta-=o,this._active||this._start(i)),i.preventDefault()}},Je.prototype._onTimeout=function(i){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(i)},Je.prototype._start=function(i){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var o=ce.mousePos(this._el,i);this._around=u.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(o)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Je.prototype.renderFrame=function(){var i=this;if(this._frameId&&(this._frameId=null,this.isActive())){var o=this._map.transform;if(this._delta!==0){var n=this._type==="wheel"&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,s=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&s!==0&&(s=1/s);var p=typeof this._targetZoom=="number"?o.zoomScale(this._targetZoom):o.scale;this._targetZoom=Math.min(o.maxZoom,Math.max(o.minZoom,o.scaleZoom(p*s))),this._type==="wheel"&&(this._startZoom=o.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var f,d=typeof this._targetZoom=="number"?this._targetZoom:o.zoom,y=this._startZoom,v=this._easing,S=!1;if(this._type==="wheel"&&y&&v){var z=Math.min((u.browser.now()-this._lastWheelEventTime)/200,1),C=v(z);f=u.number(y,d,C),z<1?this._frameId||(this._frameId=!0):S=!0}else f=d,S=!0;return this._active=!0,S&&(this._active=!1,this._finishTimeout=setTimeout(function(){i._zooming=!1,i._handler._triggerRenderFrame(),delete i._targetZoom,delete i._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!S,zoomDelta:f-o.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Je.prototype._smoothOutEasing=function(i){var o=u.ease;if(this._prevEase){var n=this._prevEase,s=(u.browser.now()-n.start)/n.duration,p=n.easing(s+.01)-n.easing(s),f=.27/Math.sqrt(p*p+1e-4)*.01,d=Math.sqrt(.0729-f*f);o=u.bezier(f,d,.25,1)}return this._prevEase={start:u.browser.now(),duration:i,easing:o},o},Je.prototype.blur=function(){this.reset()},Je.prototype.reset=function(){this._active=!1};var Ai=function(i,o){this._clickZoom=i,this._tapZoom=o};Ai.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Ai.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Ai.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Ai.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ni=function(){this.reset()};ni.prototype.reset=function(){this._active=!1},ni.prototype.blur=function(){this.reset()},ni.prototype.dblclick=function(i,o){return i.preventDefault(),{cameraAnimation:function(n){n.easeTo({duration:300,zoom:n.getZoom()+(i.shiftKey?-1:1),around:n.unproject(o)},{originalEvent:i})}}},ni.prototype.enable=function(){this._enabled=!0},ni.prototype.disable=function(){this._enabled=!1,this.reset()},ni.prototype.isEnabled=function(){return this._enabled},ni.prototype.isActive=function(){return this._active};var cr=function(){this._tap=new gi({numTouches:1,numTaps:1}),this.reset()};cr.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},cr.prototype.touchstart=function(i,o,n){this._swipePoint||(this._tapTime&&i.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?n.length>0&&(this._swipePoint=o[0],this._swipeTouch=n[0].identifier):this._tap.touchstart(i,o,n))},cr.prototype.touchmove=function(i,o,n){if(this._tapTime){if(this._swipePoint){if(n[0].identifier!==this._swipeTouch)return;var s=o[0],p=s.y-this._swipePoint.y;return this._swipePoint=s,i.preventDefault(),this._active=!0,{zoomDelta:p/128}}}else this._tap.touchmove(i,o,n)},cr.prototype.touchend=function(i,o,n){this._tapTime?this._swipePoint&&n.length===0&&this.reset():this._tap.touchend(i,o,n)&&(this._tapTime=i.timeStamp)},cr.prototype.touchcancel=function(){this.reset()},cr.prototype.enable=function(){this._enabled=!0},cr.prototype.disable=function(){this._enabled=!1,this.reset()},cr.prototype.isEnabled=function(){return this._enabled},cr.prototype.isActive=function(){return this._active};var Zn=function(i,o,n){this._el=i,this._mousePan=o,this._touchPan=n};Zn.prototype.enable=function(i){this._inertiaOptions=i||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Zn.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Zn.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Zn.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var sn=function(i,o,n){this._pitchWithRotate=i.pitchWithRotate,this._mouseRotate=o,this._mousePitch=n};sn.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},sn.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},sn.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},sn.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var xi=function(i,o,n,s){this._el=i,this._touchZoom=o,this._touchRotate=n,this._tapDragZoom=s,this._rotationDisabled=!1,this._enabled=!0};xi.prototype.enable=function(i){this._touchZoom.enable(i),this._rotationDisabled||this._touchRotate.enable(i),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},xi.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},xi.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},xi.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},xi.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},xi.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var xr=function(i){return i.zoom||i.drag||i.pitch||i.rotate},ia=function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o}(u.Event);function Ce(i){return i.panDelta&&i.panDelta.mag()||i.zoomDelta||i.bearingDelta||i.pitchDelta}var Ee=function(i,o){this._map=i,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new $o(i),this._bearingSnap=o.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(o),u.bindAll(["handleEvent","handleWindowEvent"],this);var n=this._el;this._listeners=[[n,"touchstart",{passive:!0}],[n,"touchmove",{passive:!1}],[n,"touchend",void 0],[n,"touchcancel",void 0],[n,"mousedown",void 0],[n,"mousemove",void 0],[n,"mouseup",void 0],[u.window.document,"mousemove",{capture:!0}],[u.window.document,"mouseup",void 0],[n,"mouseover",void 0],[n,"mouseout",void 0],[n,"dblclick",void 0],[n,"click",void 0],[n,"keydown",{capture:!1}],[n,"keyup",void 0],[n,"wheel",{passive:!1}],[n,"contextmenu",void 0],[u.window,"blur",void 0]];for(var s=0,p=this._listeners;s<p.length;s+=1){var f=p[s],d=f[0];ce.addEventListener(d,f[1],d===u.window.document?this.handleWindowEvent:this.handleEvent,f[2])}};Ee.prototype.destroy=function(){for(var i=0,o=this._listeners;i<o.length;i+=1){var n=o[i],s=n[0];ce.removeEventListener(s,n[1],s===u.window.document?this.handleWindowEvent:this.handleEvent,n[2])}},Ee.prototype._addDefaultHandlers=function(i){var o=this._map,n=o.getCanvasContainer();this._add("mapEvent",new qt(o,i));var s=o.boxZoom=new Rr(o,i);this._add("boxZoom",s);var p=new Or,f=new ni;o.doubleClickZoom=new Ai(f,p),this._add("tapZoom",p),this._add("clickZoom",f);var d=new cr;this._add("tapDragZoom",d);var y=o.touchPitch=new Vs;this._add("touchPitch",y);var v=new Oa(i),S=new Us(i);o.dragRotate=new sn(i,v,S),this._add("mouseRotate",v,["mousePitch"]),this._add("mousePitch",S,["mouseRotate"]);var z=new Fs(i),C=new ii(i);o.dragPan=new Zn(n,z,C),this._add("mousePan",z),this._add("touchPan",C,["touchZoom","touchRotate"]);var k=new Kl,F=new Ur;o.touchZoomRotate=new xi(n,F,k,d),this._add("touchRotate",k,["touchPan","touchZoom"]),this._add("touchZoom",F,["touchPan","touchRotate"]);var R=o.scrollZoom=new Je(o,this);this._add("scrollZoom",R,["mousePan"]);var j=o.keyboard=new vi;this._add("keyboard",j),this._add("blockableMapEvent",new Te(o));for(var D=0,N=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];D<N.length;D+=1){var G=N[D];i.interactive&&i[G]&&o[G].enable(i[G])}},Ee.prototype._add=function(i,o,n){this._handlers.push({handlerName:i,handler:o,allowed:n}),this._handlersById[i]=o},Ee.prototype.stop=function(i){if(!this._updatingCamera){for(var o=0,n=this._handlers;o<n.length;o+=1)n[o].handler.reset();this._inertia.clear(),this._fireEvents({},{},i),this._changes=[]}},Ee.prototype.isActive=function(){for(var i=0,o=this._handlers;i<o.length;i+=1)if(o[i].handler.isActive())return!0;return!1},Ee.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},Ee.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},Ee.prototype.isMoving=function(){return!!xr(this._eventsInProgress)||this.isZooming()},Ee.prototype._blockedByActive=function(i,o,n){for(var s in i)if(s!==n&&(!o||o.indexOf(s)<0))return!0;return!1},Ee.prototype.handleWindowEvent=function(i){this.handleEvent(i,i.type+"Window")},Ee.prototype._getMapTouches=function(i){for(var o=[],n=0,s=i;n<s.length;n+=1){var p=s[n];this._el.contains(p.target)&&o.push(p)}return o},Ee.prototype.handleEvent=function(i,o){this._updatingCamera=!0;for(var n=i.type==="renderFrame"?void 0:i,s={needsRenderFrame:!1},p={},f={},d=i.touches?this._getMapTouches(i.touches):void 0,y=d?ce.touchPos(this._el,d):ce.mousePos(this._el,i),v=0,S=this._handlers;v<S.length;v+=1){var z=S[v],C=z.handlerName,k=z.handler,F=z.allowed;if(k.isEnabled()){var R=void 0;this._blockedByActive(f,F,C)?k.reset():k[o||i.type]&&(R=k[o||i.type](i,y,d),this.mergeHandlerResult(s,p,R,C,n),R&&R.needsRenderFrame&&this._triggerRenderFrame()),(R||k.isActive())&&(f[C]=k)}}var j={};for(var D in this._previousActiveHandlers)f[D]||(j[D]=n);this._previousActiveHandlers=f,(Object.keys(j).length||Ce(s))&&(this._changes.push([s,p,j]),this._triggerRenderFrame()),(Object.keys(f).length||Ce(s))&&this._map._stop(!0),this._updatingCamera=!1;var N=s.cameraAnimation;N&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],N(this._map))},Ee.prototype.mergeHandlerResult=function(i,o,n,s,p){if(n){u.extend(i,n);var f={handlerName:s,originalEvent:n.originalEvent||p};n.zoomDelta!==void 0&&(o.zoom=f),n.panDelta!==void 0&&(o.drag=f),n.pitchDelta!==void 0&&(o.pitch=f),n.bearingDelta!==void 0&&(o.rotate=f)}},Ee.prototype._applyChanges=function(){for(var i={},o={},n={},s=0,p=this._changes;s<p.length;s+=1){var f=p[s],d=f[0],y=f[1],v=f[2];d.panDelta&&(i.panDelta=(i.panDelta||new u.Point(0,0))._add(d.panDelta)),d.zoomDelta&&(i.zoomDelta=(i.zoomDelta||0)+d.zoomDelta),d.bearingDelta&&(i.bearingDelta=(i.bearingDelta||0)+d.bearingDelta),d.pitchDelta&&(i.pitchDelta=(i.pitchDelta||0)+d.pitchDelta),d.around!==void 0&&(i.around=d.around),d.pinchAround!==void 0&&(i.pinchAround=d.pinchAround),d.noInertia&&(i.noInertia=d.noInertia),u.extend(o,y),u.extend(n,v)}this._updateMapTransform(i,o,n),this._changes=[]},Ee.prototype._updateMapTransform=function(i,o,n){var s=this._map,p=s.transform;if(!Ce(i))return this._fireEvents(o,n,!0);var f=i.panDelta,d=i.zoomDelta,y=i.bearingDelta,v=i.pitchDelta,S=i.around,z=i.pinchAround;z!==void 0&&(S=z),s._stop(!0),S=S||s.transform.centerPoint;var C=p.pointLocation(f?S.sub(f):S);y&&(p.bearing+=y),v&&(p.pitch+=v),d&&(p.zoom+=d),p.setLocationAtPoint(C,S),this._map._update(),i.noInertia||this._inertia.record(i),this._fireEvents(o,n,!0)},Ee.prototype._fireEvents=function(i,o,n){var s=this,p=xr(this._eventsInProgress),f=xr(i),d={};for(var y in i)this._eventsInProgress[y]||(d[y+"start"]=i[y].originalEvent),this._eventsInProgress[y]=i[y];for(var v in!p&&f&&this._fireEvent("movestart",f.originalEvent),d)this._fireEvent(v,d[v]);for(var S in f&&this._fireEvent("move",f.originalEvent),i)this._fireEvent(S,i[S].originalEvent);var z,C={};for(var k in this._eventsInProgress){var F=this._eventsInProgress[k],R=F.handlerName,j=F.originalEvent;this._handlersById[R].isActive()||(delete this._eventsInProgress[k],C[k+"end"]=z=o[R]||j)}for(var D in C)this._fireEvent(D,C[D]);var N=xr(this._eventsInProgress);if(n&&(p||f)&&!N){this._updatingCamera=!0;var G=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),K=function(ee){return ee!==0&&-s._bearingSnap<ee&&ee<s._bearingSnap};G?(K(G.bearing||this._map.getBearing())&&(G.bearing=0),this._map.easeTo(G,{originalEvent:z})):(this._map.fire(new u.Event("moveend",{originalEvent:z})),K(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},Ee.prototype._fireEvent=function(i,o){this._map.fire(new u.Event(i,o?{originalEvent:o}:{}))},Ee.prototype._requestFrame=function(){var i=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(o){delete i._frameId,i.handleEvent(new ia("renderFrame",{timeStamp:o})),i._applyChanges()})},Ee.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var Va=function(i){function o(n,s){i.call(this),this._moving=!1,this._zooming=!1,this.transform=n,this._bearingSnap=s.bearingSnap,u.bindAll(["_renderFrameCallback"],this)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getCenter=function(){return new u.LngLat(this.transform.center.lng,this.transform.center.lat)},o.prototype.setCenter=function(n,s){return this.jumpTo({center:n},s)},o.prototype.panBy=function(n,s,p){return n=u.Point.convert(n).mult(-1),this.panTo(this.transform.center,u.extend({offset:n},s),p)},o.prototype.panTo=function(n,s,p){return this.easeTo(u.extend({center:n},s),p)},o.prototype.getZoom=function(){return this.transform.zoom},o.prototype.setZoom=function(n,s){return this.jumpTo({zoom:n},s),this},o.prototype.zoomTo=function(n,s,p){return this.easeTo(u.extend({zoom:n},s),p)},o.prototype.zoomIn=function(n,s){return this.zoomTo(this.getZoom()+1,n,s),this},o.prototype.zoomOut=function(n,s){return this.zoomTo(this.getZoom()-1,n,s),this},o.prototype.getBearing=function(){return this.transform.bearing},o.prototype.setBearing=function(n,s){return this.jumpTo({bearing:n},s),this},o.prototype.getPadding=function(){return this.transform.padding},o.prototype.setPadding=function(n,s){return this.jumpTo({padding:n},s),this},o.prototype.rotateTo=function(n,s,p){return this.easeTo(u.extend({bearing:n},s),p)},o.prototype.resetNorth=function(n,s){return this.rotateTo(0,u.extend({duration:1e3},n),s),this},o.prototype.resetNorthPitch=function(n,s){return this.easeTo(u.extend({bearing:0,pitch:0,duration:1e3},n),s),this},o.prototype.snapToNorth=function(n,s){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(n,s):this},o.prototype.getPitch=function(){return this.transform.pitch},o.prototype.setPitch=function(n,s){return this.jumpTo({pitch:n},s),this},o.prototype.cameraForBounds=function(n,s){n=u.LngLatBounds.convert(n);var p=s&&s.bearing||0;return this._cameraForBoxAndBearing(n.getNorthWest(),n.getSouthEast(),p,s)},o.prototype._cameraForBoxAndBearing=function(n,s,p,f){var d={top:0,bottom:0,right:0,left:0};if(typeof(f=u.extend({padding:d,offset:[0,0],maxZoom:this.transform.maxZoom},f)).padding=="number"){var y=f.padding;f.padding={top:y,bottom:y,right:y,left:y}}f.padding=u.extend(d,f.padding);var v=this.transform,S=v.padding,z=v.project(u.LngLat.convert(n)),C=v.project(u.LngLat.convert(s)),k=z.rotate(-p*Math.PI/180),F=C.rotate(-p*Math.PI/180),R=new u.Point(Math.max(k.x,F.x),Math.max(k.y,F.y)),j=new u.Point(Math.min(k.x,F.x),Math.min(k.y,F.y)),D=R.sub(j),N=(v.width-(S.left+S.right+f.padding.left+f.padding.right))/D.x,G=(v.height-(S.top+S.bottom+f.padding.top+f.padding.bottom))/D.y;if(!(G<0||N<0)){var K=Math.min(v.scaleZoom(v.scale*Math.min(N,G)),f.maxZoom),ee=typeof f.offset.x=="number"?new u.Point(f.offset.x,f.offset.y):u.Point.convert(f.offset),Q=new u.Point((f.padding.left-f.padding.right)/2,(f.padding.top-f.padding.bottom)/2).rotate(p*Math.PI/180),te=ee.add(Q).mult(v.scale/v.zoomScale(K));return{center:v.unproject(z.add(C).div(2).sub(te)),zoom:K,bearing:p}}u.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},o.prototype.fitBounds=function(n,s,p){return this._fitInternal(this.cameraForBounds(n,s),s,p)},o.prototype.fitScreenCoordinates=function(n,s,p,f,d){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(u.Point.convert(n)),this.transform.pointLocation(u.Point.convert(s)),p,f),f,d)},o.prototype._fitInternal=function(n,s,p){return n?(delete(s=u.extend(n,s)).padding,s.linear?this.easeTo(s,p):this.flyTo(s,p)):this},o.prototype.jumpTo=function(n,s){this.stop();var p=this.transform,f=!1,d=!1,y=!1;return"zoom"in n&&p.zoom!==+n.zoom&&(f=!0,p.zoom=+n.zoom),n.center!==void 0&&(p.center=u.LngLat.convert(n.center)),"bearing"in n&&p.bearing!==+n.bearing&&(d=!0,p.bearing=+n.bearing),"pitch"in n&&p.pitch!==+n.pitch&&(y=!0,p.pitch=+n.pitch),n.padding==null||p.isPaddingEqual(n.padding)||(p.padding=n.padding),this.fire(new u.Event("movestart",s)).fire(new u.Event("move",s)),f&&this.fire(new u.Event("zoomstart",s)).fire(new u.Event("zoom",s)).fire(new u.Event("zoomend",s)),d&&this.fire(new u.Event("rotatestart",s)).fire(new u.Event("rotate",s)).fire(new u.Event("rotateend",s)),y&&this.fire(new u.Event("pitchstart",s)).fire(new u.Event("pitch",s)).fire(new u.Event("pitchend",s)),this.fire(new u.Event("moveend",s))},o.prototype.easeTo=function(n,s){var p=this;this._stop(!1,n.easeId),((n=u.extend({offset:[0,0],duration:500,easing:u.ease},n)).animate===!1||!n.essential&&u.browser.prefersReducedMotion)&&(n.duration=0);var f=this.transform,d=this.getZoom(),y=this.getBearing(),v=this.getPitch(),S=this.getPadding(),z="zoom"in n?+n.zoom:d,C="bearing"in n?this._normalizeBearing(n.bearing,y):y,k="pitch"in n?+n.pitch:v,F="padding"in n?n.padding:f.padding,R=u.Point.convert(n.offset),j=f.centerPoint.add(R),D=f.pointLocation(j),N=u.LngLat.convert(n.center||D);this._normalizeCenter(N);var G,K,ee=f.project(D),Q=f.project(N).sub(ee),te=f.zoomScale(z-d);n.around&&(G=u.LngLat.convert(n.around),K=f.locationPoint(G));var oe={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||z!==d,this._rotating=this._rotating||y!==C,this._pitching=this._pitching||k!==v,this._padding=!f.isPaddingEqual(F),this._easeId=n.easeId,this._prepareEase(s,n.noMoveStart,oe),this._ease(function(he){if(p._zooming&&(f.zoom=u.number(d,z,he)),p._rotating&&(f.bearing=u.number(y,C,he)),p._pitching&&(f.pitch=u.number(v,k,he)),p._padding&&(f.interpolatePadding(S,F,he),j=f.centerPoint.add(R)),G)f.setLocationAtPoint(G,K);else{var pe=f.zoomScale(f.zoom-d),be=z>d?Math.min(2,te):Math.max(.5,te),ke=Math.pow(be,1-he),Be=f.unproject(ee.add(Q.mult(he*ke)).mult(pe));f.setLocationAtPoint(f.renderWorldCopies?Be.wrap():Be,j)}p._fireMoveEvents(s)},function(he){p._afterEase(s,he)},n),this},o.prototype._prepareEase=function(n,s,p){p===void 0&&(p={}),this._moving=!0,s||p.moving||this.fire(new u.Event("movestart",n)),this._zooming&&!p.zooming&&this.fire(new u.Event("zoomstart",n)),this._rotating&&!p.rotating&&this.fire(new u.Event("rotatestart",n)),this._pitching&&!p.pitching&&this.fire(new u.Event("pitchstart",n))},o.prototype._fireMoveEvents=function(n){this.fire(new u.Event("move",n)),this._zooming&&this.fire(new u.Event("zoom",n)),this._rotating&&this.fire(new u.Event("rotate",n)),this._pitching&&this.fire(new u.Event("pitch",n))},o.prototype._afterEase=function(n,s){if(!this._easeId||!s||this._easeId!==s){delete this._easeId;var p=this._zooming,f=this._rotating,d=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,p&&this.fire(new u.Event("zoomend",n)),f&&this.fire(new u.Event("rotateend",n)),d&&this.fire(new u.Event("pitchend",n)),this.fire(new u.Event("moveend",n))}},o.prototype.flyTo=function(n,s){var p=this;if(!n.essential&&u.browser.prefersReducedMotion){var f=u.pick(n,["center","zoom","bearing","pitch","around"]);return this.jumpTo(f,s)}this.stop(),n=u.extend({offset:[0,0],speed:1.2,curve:1.42,easing:u.ease},n);var d=this.transform,y=this.getZoom(),v=this.getBearing(),S=this.getPitch(),z=this.getPadding(),C="zoom"in n?u.clamp(+n.zoom,d.minZoom,d.maxZoom):y,k="bearing"in n?this._normalizeBearing(n.bearing,v):v,F="pitch"in n?+n.pitch:S,R="padding"in n?n.padding:d.padding,j=d.zoomScale(C-y),D=u.Point.convert(n.offset),N=d.centerPoint.add(D),G=d.pointLocation(N),K=u.LngLat.convert(n.center||G);this._normalizeCenter(K);var ee=d.project(G),Q=d.project(K).sub(ee),te=n.curve,oe=Math.max(d.width,d.height),he=oe/j,pe=Q.mag();if("minZoom"in n){var be=u.clamp(Math.min(n.minZoom,y,C),d.minZoom,d.maxZoom),ke=oe/d.zoomScale(be-y);te=Math.sqrt(ke/pe*2)}var Be=te*te;function Le(Fe){var Re=(he*he-oe*oe+(Fe?-1:1)*Be*Be*pe*pe)/(2*(Fe?he:oe)*Be*pe);return Math.log(Math.sqrt(Re*Re+1)-Re)}function nt(Fe){return(Math.exp(Fe)-Math.exp(-Fe))/2}function we(Fe){return(Math.exp(Fe)+Math.exp(-Fe))/2}var Ne=Le(0),Ge=function(Fe){return we(Ne)/we(Ne+te*Fe)},Ve=function(Fe){return oe*((we(Ne)*(nt(Re=Ne+te*Fe)/we(Re))-nt(Ne))/Be)/pe;var Re},Ue=(Le(1)-Ne)/te;if(Math.abs(pe)<1e-6||!isFinite(Ue)){if(Math.abs(oe-he)<1e-6)return this.easeTo(n,s);var Ze=he<oe?-1:1;Ue=Math.abs(Math.log(he/oe))/te,Ve=function(){return 0},Ge=function(Fe){return Math.exp(Ze*te*Fe)}}return n.duration="duration"in n?+n.duration:1e3*Ue/("screenSpeed"in n?+n.screenSpeed/te:+n.speed),n.maxDuration&&n.duration>n.maxDuration&&(n.duration=0),this._zooming=!0,this._rotating=v!==k,this._pitching=F!==S,this._padding=!d.isPaddingEqual(R),this._prepareEase(s,!1),this._ease(function(Fe){var Re=Fe*Ue,Ht=1/Ge(Re);d.zoom=Fe===1?C:y+d.scaleZoom(Ht),p._rotating&&(d.bearing=u.number(v,k,Fe)),p._pitching&&(d.pitch=u.number(S,F,Fe)),p._padding&&(d.interpolatePadding(z,R,Fe),N=d.centerPoint.add(D));var Mt=Fe===1?K:d.unproject(ee.add(Q.mult(Ve(Re))).mult(Ht));d.setLocationAtPoint(d.renderWorldCopies?Mt.wrap():Mt,N),p._fireMoveEvents(s)},function(){return p._afterEase(s)},n),this},o.prototype.isEasing=function(){return!!this._easeFrameId},o.prototype.stop=function(){return this._stop()},o.prototype._stop=function(n,s){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var p=this._onEaseEnd;delete this._onEaseEnd,p.call(this,s)}if(!n){var f=this.handlers;f&&f.stop(!1)}return this},o.prototype._ease=function(n,s,p){p.animate===!1||p.duration===0?(n(1),s()):(this._easeStart=u.browser.now(),this._easeOptions=p,this._onEaseFrame=n,this._onEaseEnd=s,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},o.prototype._renderFrameCallback=function(){var n=Math.min((u.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(n)),n<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},o.prototype._normalizeBearing=function(n,s){n=u.wrap(n,-180,180);var p=Math.abs(n-s);return Math.abs(n-360-s)<p&&(n-=360),Math.abs(n+360-s)<p&&(n+=360),n},o.prototype._normalizeCenter=function(n){var s=this.transform;if(s.renderWorldCopies&&!s.lngRange){var p=n.lng-s.center.lng;n.lng+=p>180?-360:p<-180?360:0}},o}(u.Evented),br=function(i){i===void 0&&(i={}),this.options=i,u.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};br.prototype.getDefaultPosition=function(){return"bottom-right"},br.prototype.onAdd=function(i){var o=this.options&&this.options.compact;return this._map=i,this._container=ce.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=ce.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=ce.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),o&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),o===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},br.prototype.onRemove=function(){ce.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},br.prototype._setElementTitle=function(i,o){var n=this._map._getUIString("AttributionControl."+o);i.title=n,i.setAttribute("aria-label",n)},br.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","fal
497se")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},br.prototype._updateEditLink=function(){var i=this._editLink;i||(i=this._editLink=this._container.querySelector(".mapbox-improve-map"));var o=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||u.config.ACCESS_TOKEN}];if(i){var n=o.reduce(function(s,p,f){return p.value&&(s+=p.key+"="+p.value+(f<o.length-1?"&":"")),s},"?");i.href=u.config.FEEDBACK_URL+"/"+n+(this._map._hash?this._map._hash.getHashString(!0):""),i.rel="noopener nofollow",this._setElementTitle(i,"MapFeedback")}},br.prototype._updateData=function(i){!i||i.sourceDataType!=="metadata"&&i.sourceDataType!=="visibility"&&i.dataType!=="style"||(this._updateAttributions(),this._updateEditLink())},br.prototype._updateAttributions=function(){if(this._map.style){var i=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?i=i.concat(this.options.customAttribution.map(function(y){return typeof y!="string"?"":y})):typeof this.options.customAttribution=="string"&&i.push(this.options.customAttribution)),this._map.style.stylesheet){var o=this._map.style.stylesheet;this.styleOwner=o.owner,this.styleId=o.id}var n=this._map.style.sourceCaches;for(var s in n){var p=n[s];if(p.used){var f=p.getSource();f.attribution&&i.indexOf(f.attribution)<0&&i.push(f.attribution)}}i.sort(function(y,v){return y.length-v.length});var d=(i=i.filter(function(y,v){for(var S=v+1;S<i.length;S++)if(i[S].indexOf(y)>=0)return!1;return!0})).join(" | ");d!==this._attribHTML&&(this._attribHTML=d,i.length?(this._innerContainer.innerHTML=d,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},br.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var bi=function(){u.bindAll(["_updateLogo"],this),u.bindAll(["_updateCompact"],this)};bi.prototype.onAdd=function(i){this._map=i,this._container=ce.create("div","mapboxgl-ctrl");var o=ce.create("a","mapboxgl-ctrl-logo");return o.target="_blank",o.rel="noopener nofollow",o.href="https://www.mapbox.com/",o.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),o.setAttribute("rel","noopener nofollow"),this._container.appendChild(o),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},bi.prototype.onRemove=function(){ce.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},bi.prototype.getDefaultPosition=function(){return"bottom-left"},bi.prototype._updateLogo=function(i){i&&i.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},bi.prototype._logoRequired=function(){if(this._map.style){var i=this._map.style.sourceCaches;for(var o in i)if(i[o].getSource().mapbox_logo)return!0;return!1}},bi.prototype._updateCompact=function(){var i=this._container.children;if(i.length){var o=i[0];this._map.getCanvasContainer().offsetWidth<250?o.classList.add("mapboxgl-compact"):o.classList.remove("mapboxgl-compact")}};var pr=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};pr.prototype.add=function(i){var o=++this._id;return this._queue.push({callback:i,id:o,cancelled:!1}),o},pr.prototype.remove=function(i){for(var o=this._currentlyRunning,n=0,s=o?this._queue.concat(o):this._queue;n<s.length;n+=1){var p=s[n];if(p.id===i)return void(p.cancelled=!0)}},pr.prototype.run=function(i){i===void 0&&(i=0);var o=this._currentlyRunning=this._queue;this._queue=[];for(var n=0,s=o;n<s.length;n+=1){var p=s[n];if(!p.cancelled&&(p.callback(i),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},pr.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var zi={"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":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},js=u.window.HTMLImageElement,Na=u.window.HTMLElement,ht=u.window.ImageBitmap,rr={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileC
497acheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},Hl=function(i){function o(s){var p=this;if((s=u.extend({},rr,s)).minZoom!=null&&s.maxZoom!=null&&s.minZoom>s.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(s.minPitch!=null&&s.maxPitch!=null&&s.minPitch>s.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(s.minPitch!=null&&s.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(s.maxPitch!=null&&s.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var f=new tt(s.minZoom,s.maxZoom,s.minPitch,s.maxPitch,s.renderWorldCopies);if(i.call(this,f,s),this._interactive=s.interactive,this._maxTileCacheSize=s.maxTileCacheSize,this._failIfMajorPerformanceCaveat=s.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=s.preserveDrawingBuffer,this._antialias=s.antialias,this._trackResize=s.trackResize,this._bearingSnap=s.bearingSnap,this._refreshExpiredTiles=s.refreshExpiredTiles,this._fadeDuration=s.fadeDuration,this._crossSourceCollisions=s.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=s.collectResourceTiming,this._renderTaskQueue=new pr,this._controls=[],this._mapId=u.uniqueId(),this._locale=u.extend({},zi,s.locale),this._clickTolerance=s.clickTolerance,this._requestManager=new u.RequestManager(s.transformRequest,s.accessToken),typeof s.container=="string"){if(this._container=u.window.document.getElementById(s.container),!this._container)throw new Error("Container '"+s.container+"' not found.")}else{if(!(s.container instanceof Na))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=s.container}if(s.maxBounds&&this.setMaxBounds(s.maxBounds),u.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return p._update(!1)}),this.on("moveend",function(){return p._update(!1)}),this.on("zoom",function(){return p._update(!0)}),u.window!==void 0&&(u.window.addEventListener("online",this._onWindowOnline,!1),u.window.addEventListener("resize",this._onWindowResize,!1),u.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Ee(this,s),this._hash=s.hash&&new Gr(typeof s.hash=="string"&&s.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:s.center,zoom:s.zoom,bearing:s.bearing,pitch:s.pitch}),s.bounds&&(this.resize(),this.fitBounds(s.bounds,u.extend({},s.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=s.localIdeographFontFamily,s.style&&this.setStyle(s.style,{localIdeographFontFamily:s.localIdeographFontFamily}),s.attributionControl&&this.addControl(new br({customAttribution:s.customAttribution})),this.addControl(new bi,s.logoPosition),this.on("style.load",function(){p.transform.unmodified&&p.jumpTo(p.style.stylesheet)}),this.on("data",function(d){p._update(d.dataType==="style"),p.fire(new u.Event(d.dataType+"data",d))}),this.on("dataloading",function(d){p.fire(new u.Event(d.dataType+"dataloading",d))})}i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o;var n={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return o.prototype._getMapId=function(){return this._mapId},o.prototype.addControl=function(s,p){if(p===void 0&&(p=s.getDefaultPosition?s.getDefaultPosition():"top-right"),!s||!s.onAdd)return this.fire(new u.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var f=s.onAdd(this);this._controls.push(s);var d=this._controlPositions[p];return p.indexOf("bottom")!==-1?d.insertBefore(f,d.firstChild):d.appendChild(f),this},o.prototype.removeControl=function(s){if(!s||!s.onRemove)return this.fire(new u.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var p=this._controls.indexOf(s);return p>-1&&this._controls.splice(p,1),s.onRemove(this),this}
vendor: 11,787 bytes, line 497
497,o.prototype.hasControl=function(s){return this._controls.indexOf(s)>-1},o.prototype.resize=function(s){var p=this._containerDimensions(),f=p[0],d=p[1];if(f===this.transform.width&&d===this.transform.height)return this;this._resizeCanvas(f,d),this.transform.resize(f,d),this.painter.resize(f,d);var y=!this._moving;return y&&this.fire(new u.Event("movestart",s)).fire(new u.Event("move",s)),this.fire(new u.Event("resize",s)),y&&this.fire(new u.Event("moveend",s)),this},o.prototype.getBounds=function(){return this.transform.getBounds()},o.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},o.prototype.setMaxBounds=function(s){return this.transform.setMaxBounds(u.LngLatBounds.convert(s)),this._update()},o.prototype.setMinZoom=function(s){if((s=s??-2)>=-2&&s<=this.transform.maxZoom)return this.transform.minZoom=s,this._update(),this.getZoom()<s&&this.setZoom(s),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")},o.prototype.getMinZoom=function(){return this.transform.minZoom},o.prototype.setMaxZoom=function(s){if((s=s??22)>=this.transform.minZoom)return this.transform.maxZoom=s,this._update(),this.getZoom()>s&&this.setZoom(s),this;throw new Error("maxZoom must be greater than the current minZoom")},o.prototype.getMaxZoom=function(){return this.transform.maxZoom},o.prototype.setMinPitch=function(s){if((s=s??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(s>=0&&s<=this.transform.maxPitch)return this.transform.minPitch=s,this._update(),this.getPitch()<s&&this.setPitch(s),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")},o.prototype.getMinPitch=function(){return this.transform.minPitch},o.prototype.setMaxPitch=function(s){if((s=s??60)>60)throw new Error("maxPitch must be less than or equal to 60");if(s>=this.transform.minPitch)return this.transform.maxPitch=s,this._update(),this.getPitch()>s&&this.setPitch(s),this;throw new Error("maxPitch must be greater than the current minPitch")},o.prototype.getMaxPitch=function(){return this.transform.maxPitch},o.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},o.prototype.setRenderWorldCopies=function(s){return this.transform.renderWorldCopies=s,this._update()},o.prototype.project=function(s){return this.transform.locationPoint(u.LngLat.convert(s))},o.prototype.unproject=function(s){return this.transform.pointLocation(u.Point.convert(s))},o.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},o.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},o.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},o.prototype._createDelegatedListener=function(s,p,f){var d,y=this;if(s==="mouseenter"||s==="mouseover"){var v=!1;return{layer:p,listener:f,delegates:{mousemove:function(z){var C=y.getLayer(p)?y.queryRenderedFeatures(z.point,{layers:[p]}):[];C.length?v||(v=!0,f.call(y,new Gt(s,y,z.originalEvent,{features:C}))):v=!1},mouseout:function(){v=!1}}}}if(s==="mouseleave"||s==="mouseout"){var S=!1;return{layer:p,listener:f,delegates:{mousemove:function(z){(y.getLayer(p)?y.queryRenderedFeatures(z.point,{layers:[p]}):[]).length?S=!0:S&&(S=!1,f.call(y,new Gt(s,y,z.originalEvent)))},mouseout:function(z){S&&(S=!1,f.call(y,new Gt(s,y,z.originalEvent)))}}}}return{layer:p,listener:f,delegates:(d={},d[s]=function(z){var C=y.getLayer(p)?y.queryRenderedFeatures(z.point,{layers:[p]}):[];C.length&&(z.features=C,f.call(y,z),delete z.features)},d)}},o.prototype.on=function(s,p,f){if(f===void 0)return i.prototype.on.call(this,s,p);var d=this._createDelegatedListener(s,p,f);for(var y in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[s]=this._delegatedListeners[s]||[],this._delegatedListeners[s].push(d),d.delegates)this.on(y,d.delegates[y]);return this},o.prototype.once=function(s,p,f){if(f===void 0)return i.prototype.once.call(this,s,p);var d=this._createDelegatedListener(s,p,f);for(var y in d.delegates)this.once(y,d.delegates[y]);return this},o.prototype.off=function(s,p,f){var d=this;return f===void 0?i.prototype.off.call(this,s,p):(this._delegatedListeners&&this._delegatedListeners[s]&&function(y){for(var v=y[s],S=0;S<v.length;S++){var z=v[S];if(z.layer===p&&z.listener===f){for(var C in z.delegates)d.off(C,z.delegates[C]);return v.splice(S,1),d}}}(this._delegatedListeners),this)},o.prototype.queryRenderedFeatures=function(s,p){if(!this.style)return[];var f;if(p!==void 0||s===void 0||s instanceof u.Point||Array.isArray(s)||(p=s,s=void 0),p=p||{},(s=s||[[0,0],[this.transform.width,this.transform.height]])instanceof u.Point||typeof s[0]=="number")f=[u.Point.convert(s)];else{var d=u.Point.convert(s[0]),y=u.Point.convert(s[1]);f=[d,new u.Point(y.x,d.y),y,new u.Point(d.x,y.y),d]}return this.style.queryRenderedFeatures(f,p,this.transform)},o.prototype.querySourceFeatures=function(s,p){return this.style.querySourceFeatures(s,p)},o.prototype.setStyle=function(s,p){return(p=u.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},p)).diff!==!1&&p.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&s?(this._diffStyle(s,p),this):(this._localIdeographFontFamily=p.localIdeographFontFamily,this._updateStyle(s,p))},o.prototype._getUIString=function(s){var p=this._locale[s];if(p==null)throw new Error("Missing UI string '"+s+"'");return p},o.prototype._updateStyle=function(s,p){return this.style&&(this.style.setEventedParent(null),this.style._remove()),s?(this.style=new Br(this,p||{}),this.style.setEventedParent(this,{style:this.style}),typeof s=="string"?this.style.loadURL(s):this.style.loadJSON(s),this):(delete this.style,this)},o.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new Br(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},o.prototype._diffStyle=function(s,p){var f=this;if(typeof s=="string"){var d=this._requestManager.normalizeStyleURL(s),y=this._requestManager.transformRequest(d,u.ResourceType.Style);u.getJSON(y,function(v,S){v?f.fire(new u.ErrorEvent(v)):S&&f._updateDiff(S,p)})}else typeof s=="object"&&this._updateDiff(s,p)},o.prototype._updateDiff=function(s,p){try{this.style.setState(s)&&this._update(!0)}catch(f){u.warnOnce("Unable to perform style diff: "+(f.message||f.error||f)+". Rebuilding the style from scratch."),this._updateStyle(s,p)}},o.prototype.getStyle=function(){if(this.style)return this.style.serialize()},o.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():u.warnOnce("There is no style added to the map.")},o.prototype.addSource=function(s,p){return this._lazyInitEmptyStyle(),this.style.addSource(s,p),this._update(!0)},o.prototype.isSourceLoaded=function(s){var p=this.style&&this.style.sourceCaches[s];if(p!==void 0)return p.loaded();this.fire(new u.ErrorEvent(new Error("There is no source with ID '"+s+"'")))},o.prototype.areTilesLoaded=function(){var s=this.style&&this.style.sourceCaches;for(var p in s){var f=s[p]._tiles;for(var d in f){var y=f[d];if(y.state!=="loaded"&&y.state!=="errored")return!1}}return!0},o.prototype.addSourceType=function(s,p,f){return this._lazyInitEmptyStyle(),this.style.addSourceType(s,p,f)},o.prototype.removeSource=function(s){return this.style.removeSource(s),this._update(!0)},o.prototype.getSource=function(s){return this.style.getSource(s)},o.prototype.addImage=function(s,p,f){f===void 0&&(f={});var d=f.pixelRatio;d===void 0&&(d=1);var y=f.sdf;y===void 0&&(y=!1);var v=f.stretchX,S=f.stretchY,z=f.content;if(this._lazyInitEmptyStyle(),p instanceof js||ht&&p instanceof ht){var C=u.browser.getImageData(p);this.style.addImage(s,{data:new u.RGBAImage({width:C.width,height:C.height},C.data),pixelRatio:d,stretchX:v,stretchY:S,content:z,sdf:y,version:0})}else{if(p.width===void 0||p.height===void 0)return this.fire(new u.ErrorEvent(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`")));var k=p;this.style.addImage(s,{data:new u.RGBAImage({width:p.width,height:p.height},new Uint8Array(p.data)),pixelRatio:d,stretchX:v,stretchY:S,content:z,sdf:y,version:0,userImage:k}),k.onAdd&&k.onAdd(this,s)}},o.prototype.updateImage=function(s,p){var f=this.style.getImage(s);if(!f)return this.fire(new u.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var d=p instanceof js||ht&&p instanceof ht?u.browser.getImageData(p):p,y=d.width,v=d.height,S=d.data;return y===void 0||v===void 0?this.fire(new u.ErrorEvent(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`"))):y!==f.data.width||v!==f.data.height?this.fire(new u.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image"))):(f.data.replace(S,!(p instanceof js||ht&&p instanceof ht)),void this.style.updateImage(s,f))},o.prototype.hasImage=function(s){return s?!!this.style.getImage(s):(this.fire(new u.ErrorEvent(new Error("Missing required image id"))),!1)},o.prototype.removeImage=function(s){this.style.removeImage(s)},o.prototype.loadImage=function(s,p){u.getImage(this._requestManager.transformRequest(s,u.ResourceType.Image),p)},o.prototype.listImages=function(){return this.style.listImages()},o.prototype.addLayer=function(s,p){return this._lazyInitEmptyStyle(),this.style.addLayer(s,p),this._update(!0)},o.prototype.moveLayer=function(s,p){return this.style.moveLayer(s,p),this._update(!0)},o.prototype.removeLayer=function(s){return this.style.removeLayer(s),this._update(!0)},o.prototype.getLayer=function(s){return this.style.getLayer(s)},o.prototype.setLayerZoomRange=function(s,p,f){return this.style.setLayerZoomRange(s,p,f),this._update(!0)},o.prototype.setFilter=function(s,p,f){return f===void 0&&(f={}),this.style.setFilter(s,p,f),this._update(!0)},o.prototype.getFilter=function(s){return this.style.getFilter(s)},o.prototype.setPaintProperty=function(s,p,f,d){return d===void 0&&(d={}),this.style.setPaintProperty(s,p,f,d),this._update(!0)},o.prototype.getPaintProperty=function(s,p){return this.style.getPaintProperty(s,p)},o.prototype.setLayoutProperty=function(s,p,f,d){return d===void 0&&(d={}),this.style.setLayoutProperty(s,p,f,d),this._update(!0)},o.prototype.getLayoutProperty=function(s,p){return this.style.getLayoutProperty(s,p)},o.prototype.setLight=function(s,p){return p===void 0&&(p={}),this._lazyInitEmptyStyle(),this.style.setLight(s,p),this._update(!0)},o.prototype.getLight=function(){return this.style.getLight()},o.prototype.setFeatureState=function(s,p){return this.style.setFeatureState(s,p),this._update()},o.prototype.removeFeatureState=function(s,p){return this.style.removeFeatureState(s,p),this._update()},o.prototype.getFeatureState=function(s){return this.style.getFeatureState(s)},o.prototype.getContainer=function(){return this._container},o.prototype.getCanvasContainer=function(){return this._canvasContainer},o.prototype.getCanvas=function(){return this._canvas},o.prototype._containerDimensions=function(){var s=0,p=0;return this._container&&(s=this._container.clientWidth||400,p=this._container.clientHeight||300),[s,p]},o.prototype._detectMissingCSS=function(){u.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&u.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described
497in https://www.mapbox.com/mapbox-gl-js/api/.")},o.prototype._setupContainer=function(){var s=this._container;s.classList.add("mapboxgl-map"),(this._missingCSSCanary=ce.create("div","mapboxgl-canary",s)).style.visibility="hidden",this._detectMissingCSS();var p=this._canvasContainer=ce.create("div","mapboxgl-canvas-container",s);this._interactive&&p.classList.add("mapboxgl-interactive"),this._canvas=ce.create("canvas","mapboxgl-canvas",p),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");var f=this._containerDimensions();this._resizeCanvas(f[0],f[1]);var d=this._controlContainer=ce.create("div","mapboxgl-control-container",s),y=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(v){y[v]=ce.create("div","mapboxgl-ctrl-"+v,d)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},o.prototype._resizeCanvas=function(s,p){var f=u.browser.devicePixelRatio||1;this._canvas.width=f*s,this._canvas.height=f*p,this._canvas.style.width=s+"px",this._canvas.style.height=p+"px"},o.prototype._setupPainter=function(){var s=u.extend({},qr.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),p=this._canvas.getContext("webgl",s)||this._canvas.getContext("experimental-webgl",s);p?(this.painter=new It(p,this.transform),u.webpSupported.testSupport(p)):this.fire(new u.ErrorEvent(new Error("Failed to initialize WebGL")))},o.prototype._contextLost=function(s){s.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new u.Event("webglcontextlost",{originalEvent:s}))},o.prototype._contextRestored=function(s){this._setupPainter(),this.resize(),this._update(),this.fire(new u.Event("webglcontextrestored",{originalEvent:s}))},o.prototype._onMapScroll=function(s){if(s.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},o.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},o.prototype._update=function(s){return this.style?(this._styleDirty=this._styleDirty||s,this._sourcesDirty=!0,this.triggerRepaint(),this):this},o.prototype._requestRenderFrame=function(s){return this._update(),this._renderTaskQueue.add(s)},o.prototype._cancelRenderFrame=function(s){this._renderTaskQueue.remove(s)},o.prototype._render=function(s){var p,f=this,d=0,y=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(p=y.createQueryEXT(),y.beginQueryEXT(y.TIME_ELAPSED_EXT,p),d=u.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(s),!this._removed){var v=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var S=this.transform.zoom,z=u.browser.now();this.style.zoomHistory.update(S,z);var C=new u.EvaluationParameters(S,{now:z,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),k=C.crossFadingFactor();k===1&&k===this._crossFadingFactor||(v=!0,this._crossFadingFactor=k),this.style.update(C)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new u.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new u.Event("load"))),this.style&&(this.style.hasTransitions()||v)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var F=u.browser.now()-d;y.endQueryEXT(y.TIME_ELAPSED_EXT,p),setTimeout(function(){var D=y.getQueryObjectEXT(p,y.QUERY_RESULT_EXT)/1e6;y.deleteQueryEXT(p),f.fire(new u.Event("gpu-timing-frame",{cpuTime:F,gpuTime:D}))},50)}if(this.listens("gpu-timing-layer")){var R=this.painter.collectGpuTimers();setTimeout(function(){var D=f.painter.queryGpuTimers(R);f.fire(new u.Event("gpu-timing-layer",{layerTimes:D}))},50)}var j=this._sourcesDirty||this._styleDirty||this._placementDirty;return j||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new u.Event("idle")),!this._loaded||this._fullyLoaded||j||(this._fullyLoaded=!0),this}},o.prototype.remove=function(){this._hash&&this._hash.remove();for(var s=0,p=this._controls;s<p.length;s+=1)p[s].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),u.window!==void 0&&(u.window.removeEventListener("resize",this._onWindowResize,!1),u.window.removeEventListener("orientationchange",this._onWindowResize,!1),u.window.removeEventListener("online",this._onWindowOnline,!1));var f=this.painter.context.gl.getExtension("WEBGL_lose_context");f&&f.loseContext(),Gn(this._canvasContainer),Gn(this._controlContainer),Gn(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new u.Event("remove"))},o.prototype.triggerRepaint=function(){var s=this;this.style&&!this._frame&&(this._frame=u.browser.frame(function(p){s._frame=null,s._render(p)}))},o.prototype._onWindowOnline=function(){this._update()},o.prototype._onWindowResize=function(s){this._trackResize&&this.resize({originalEvent:s})._update()},n.showTileBoundaries.get=function(){return!!this._showTileBoundaries},n.showTileBoundaries.set=function(s){this._showTileBoundaries!==s&&(this._showTileBoundaries=s,this._update())},n.showPadding.get=function(){return!!this._showPadding},n.showPadding.set=function(s){this._showPadding!==s&&(this._showPadding=s,this._update())},n.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},n.showCollisionBoxes.set=function(s){this._showCollisionBoxes!==s&&(this._showCollisionBoxes=s,s?this.style._generateCollisionBoxes():this._update())},n.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},n.showOverdrawInspector.set=function(s){this._showOverdrawInspector!==s&&(this._showOverdrawInspector=s,this._update())},n.repaint.get=function(){return!!this._repaint},n.repaint.set=function(s){this._repaint!==s&&(this._repaint=s,this.triggerRepaint())},n.vertices.get=function(){return!!this._vertices}
vendor: 18,232 bytes, line 497
497,n.vertices.set=function(s){this._vertices=s,this._update()},o.prototype._setCacheLimits=function(s,p){u.setCacheLimits(s,p)},n.version.get=function(){return u.version},Object.defineProperties(o.prototype,n),o}(Va);function Gn(i){i.parentNode&&i.parentNode.removeChild(i)}var qs={showCompass:!0,showZoom:!0,visualizePitch:!1},ji=function(i){var o=this;this.options=u.extend({},qs,i),this._container=ce.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(n){return n.preventDefault()}),this.options.showZoom&&(u.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(n){return o._map.zoomIn({},{originalEvent:n})}),ce.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(n){return o._map.zoomOut({},{originalEvent:n})}),ce.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(u.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(n){o.options.visualizePitch?o._map.resetNorthPitch({},{originalEvent:n}):o._map.resetNorth({},{originalEvent:n})}),this._compassIcon=ce.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};ji.prototype._updateZoomButtons=function(){var i=this._map.getZoom(),o=i===this._map.getMaxZoom(),n=i===this._map.getMinZoom();this._zoomInButton.disabled=o,this._zoomOutButton.disabled=n,this._zoomInButton.setAttribute("aria-disabled",o.toString()),this._zoomOutButton.setAttribute("aria-disabled",n.toString())},ji.prototype._rotateCompassArrow=function(){var i=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=i},ji.prototype.onAdd=function(i){return this._map=i,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._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Vr(this._map,this._compass,this.options.visualizePitch)),this._container},ji.prototype.onRemove=function(){ce.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},ji.prototype._createButton=function(i,o){var n=ce.create("button",i,this._container);return n.type="button",n.addEventListener("click",o),n},ji.prototype._setButtonTitle=function(i,o){var n=this._map._getUIString("NavigationControl."+o);i.title=n,i.setAttribute("aria-label",n)};var Vr=function(i,o,n){n===void 0&&(n=!1),this._clickTolerance=10,this.element=o,this.mouseRotate=new Oa({clickTolerance:i.dragRotate._mouseRotate._clickTolerance}),this.map=i,n&&(this.mousePitch=new Us({clickTolerance:i.dragRotate._mousePitch._clickTolerance})),u.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),ce.addEventListener(o,"mousedown",this.mousedown),ce.addEventListener(o,"touchstart",this.touchstart,{passive:!1}),ce.addEventListener(o,"touchmove",this.touchmove),ce.addEventListener(o,"touchend",this.touchend),ce.addEventListener(o,"touchcancel",this.reset)};function bo(i,o,n){if(i=new u.LngLat(i.lng,i.lat),o){var s=new u.LngLat(i.lng-360,i.lat),p=new u.LngLat(i.lng+360,i.lat),f=n.locationPoint(i).distSqr(o);n.locationPoint(s).distSqr(o)<f?i=s:n.locationPoint(p).distSqr(o)<f&&(i=p)}for(;Math.abs(i.lng-n.center.lng)>180;){var d=n.locationPoint(i);if(d.x>=0&&d.y>=0&&d.x<=n.width&&d.y<=n.height)break;i.lng>n.center.lng?i.lng-=360:i.lng+=360}return i}Vr.prototype.down=function(i,o){this.mouseRotate.mousedown(i,o),this.mousePitch&&this.mousePitch.mousedown(i,o),ce.disableDrag()},Vr.prototype.move=function(i,o){var n=this.map,s=this.mouseRotate.mousemoveWindow(i,o);if(s&&s.bearingDelta&&n.setBearing(n.getBearing()+s.bearingDelta),this.mousePitch){var p=this.mousePitch.mousemoveWindow(i,o);p&&p.pitchDelta&&n.setPitch(n.getPitch()+p.pitchDelta)}},Vr.prototype.off=function(){var i=this.element;ce.removeEventListener(i,"mousedown",this.mousedown),ce.removeEventListener(i,"touchstart",this.touchstart,{passive:!1}),ce.removeEventListener(i,"touchmove",this.touchmove),ce.removeEventListener(i,"touchend",this.touchend),ce.removeEventListener(i,"touchcancel",this.reset),this.offTemp()},Vr.prototype.offTemp=function(){ce.enableDrag(),ce.removeEventListener(u.window,"mousemove",this.mousemove),ce.removeEventListener(u.window,"mouseup",this.mouseup)},Vr.prototype.mousedown=function(i){this.down(u.extend({},i,{ctrlKey:!0,preventDefault:function(){return i.preventDefault()}}),ce.mousePos(this.element,i)),ce.addEventListener(u.window,"mousemove",this.mousemove),ce.addEventListener(u.window,"mouseup",this.mouseup)},Vr.prototype.mousemove=function(i){this.move(i,ce.mousePos(this.element,i))},Vr.prototype.mouseup=function(i){this.mouseRotate.mouseupWindow(i),this.mousePitch&&this.mousePitch.mouseupWindow(i),this.offTemp()},Vr.prototype.touchstart=function(i){i.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=ce.touchPos(this.element,i.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return i.preventDefault()}},this._startPos))},Vr.prototype.touchmove=function(i){i.targetTouches.length!==1?this.reset():(this._lastPos=ce.touchPos(this.element,i.targetTouches)[0],this.move({preventDefault:function(){return i.preventDefault()}},this._lastPos))},Vr.prototype.touchend=function(i){i.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Vr.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var Pi={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function ja(i,o,n){var s=i.classList;for(var p in Pi)s.remove("mapboxgl-"+n+"-anchor-"+p);s.add("mapboxgl-"+n+"-anchor-"+o)}var wo,na=function(i){function o(n,s){if(i.call(this),(n instanceof u.window.HTMLElement||s)&&(n=u.extend({element:n},s)),u.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=n&&n.anchor||"center",this._color=n&&n.color||"#3FB1CE",this._scale=n&&n.scale||1,this._draggable=n&&n.draggable||!1,this._clickTolerance=n&&n.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=n&&n.rotation||0,this._rotationAlignment=n&&n.rotationAlignment||"auto",this._pitchAlignment=n&&n.pitchAlignment&&n.pitchAlignment!=="auto"?n.pitchAlignment:this._rotationAlignment,n&&n.element)this._element=n.element,this._offset=u.Point.convert(n&&n.offset||[0,0]);else{this._defaultMarker=!0,this._element=ce.create("div"),this._element.setAttribute("aria-label","Map marker");var p=ce.createNS("http://www.w3.org/2000/svg","svg");p.setAttributeNS(null,"display","block"),p.setAttributeNS(null,"height","41px"),p.setAttributeNS(null,"width","27px"),p.setAttributeNS(null,"viewBox","0 0 27 41");var f=ce.createNS("http://www.w3.org/2000/svg","g");f.setAttributeNS(null,"stroke","none"),f.setAttributeNS(null,"stroke-width","1"),f.setAttributeNS(null,"fill","none"),f.setAttributeNS(null,"fill-rule","evenodd");var d=ce.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"fill-rule","nonzero");var y=ce.createNS("http://www.w3.org/2000/svg","g");y.setAttributeNS(null,"transform","translate(3.0, 29.0)"),y.setAttributeNS(null,"fill","#000000");for(var v=0,S=[{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"}];v<S.length;v+=1){var z=S[v],C=ce.createNS("http://www.w3.org/2000/svg","ellipse");C.setAttributeNS(null,"opacity","0.04"),C.setAttributeNS(null,"cx","10.5"),C.setAttributeNS(null,"cy","5.80029008"),C.setAttributeNS(null,"rx",z.rx),C.setAttributeNS(null,"ry",z.ry),y.appendChild(C)}var k=ce.createNS("http://www.w3.org/2000/svg","g");k.setAttributeNS(null,"fill",this._color);var F=ce.createNS("http://www.w3.org/2000/svg","path");F.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),k.appendChild(F);var R=ce.createNS("http://www.w3.org/2000/svg","g");R.setAttributeNS(null,"opacity","0.25"),R.setAttributeNS(null,"fill","#000000");var j=ce.createNS("http://www.w3.org/2000/svg","path");j.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"),R.appendChild(j);var D=ce.createNS("http://www.w3.org/2000/svg","g");D.setAttributeNS(null,"transform","translate(6.0, 7.0)"),D.setAttributeNS(null,"fill","#FFFFFF");var N=ce.createNS("http://www.w3.org/2000/svg","g");N.setAttributeNS(null,"transform","translate(8.0, 8.0)");var G=ce.createNS("http://www.w3.org/2000/svg","circle");G.setAttributeNS(null,"fill","#000000"),G.setAttributeNS(null,"opacity","0.25"),G.setAttributeNS(null,"cx","5.5"),G.setAttributeNS(null,"cy","5.5"),G.setAttributeNS(null,"r","5.4999962");var K=ce.createNS("http://www.w3.org/2000/svg","circle");K.setAttributeNS(null,"fill","#FFFFFF"),K.setAttributeNS(null,"cx","5.5"),K.setAttributeNS(null,"cy","5.5"),K.setAttributeNS(null,"r","5.4999962"),N.appendChild(G),N.appendChild(K),d.appendChild(y),d.appendChild(k),d.appendChild(R),d.appendChild(D),d.appendChild(N),p.appendChild(d),p.setAttributeNS(null,"height",41*this._scale+"px"),p.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(p),this._offset=u.Point.convert(n&&n.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(ee){ee.preventDefault()}),this._element.addEventListener("mousedown",function(ee){ee.preventDefault()}),ja(this._element,this._anchor,"marker"),this._popup=null}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.addTo=function(n){return this.remove(),this._map=n,n.getCanvasContainer().appendChild(this._element),n.on("move",this._update),n.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},o.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",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),ce.remove(this._element),this._popup&&this._popup.remove(),this},o.prototype.getLngLat=function(){return this._lngLat},o.prototype.setLngLat=function(n){return this._lngLat=u.LngLat.convert(n),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},o.prototype.getElement=function(){return this._element},o.prototype.setPopup=function(n){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),n){if(!("offset"in n.options)){var s=Math.sqrt(Math.pow(13.5,2)/2);n.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[s,-1*(24.6+s)],"bottom-right":[-s,-1*(24.6+s)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=n,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},o.prototype._onKeyPress=function(n){var s=n.code,p=n.charCode||n.keyCode;s!=="Space"&&s!=="Enter"&&p!==32&&p!==13||this.togglePopup()},o.prototype._onMapClick=function(n){var s=n.originalEvent.target,p=this._element;this._popup&&(s===p||p.contains(s))&&this.togglePopup()},o.prototype.getPopup=function(){return this._popup},o.prototype.togglePopup=function(){var n=this._popup;return n?(n.isOpen()?n.remove():n.addTo(this._map),this):this},o.prototype._update=function(n){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=bo(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var s="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?s="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(s="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var p="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?p="rotateX(0deg)":this._pitchAlignment==="map"&&(p="rotateX("+this._map.getPitch()+"deg)"),n&&n.type!=="moveend"||(this._pos=this._pos.round()),ce.setTransform(this._element,Pi[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+p+" "+s)}},o.prototype.getOffset=function(){return this._offset},o.prototype.setOffset=function(n){return this._offset=u.Point.convert(n),this._update(),this},o.prototype._onMove=function(n){if(!this._isDragging){var s=this._clickTolerance||this._map._clickTolerance;this._isDragging=n.point.dist(this._pointerdownPos)>=s}this._isDragging&&(this._pos=n.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new u.Event("dragstart"))),this.fire(new u.Event("drag")))},o.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new u.Event("dragend")),this._state="inactive"},o.prototype._addDragHandler=function(n){this._element.contains(n.originalEvent.target)&&(n.preventDefault(),this._positionDelta=n.point.sub(this._pos).add(this._offset),this._pointerdownPos=n.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))},o.prototype.setDraggable=function(n){return this._draggable=!!n,this._map&&(n?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},o.prototype.isDraggable=function(){return this._draggable},o.prototype.setRotation=function(n){return this._rotation=n||0,this._update(),this},o.prototype.getRotation=function(){return this._rotation},o.prototype.setRotationAlignment=function(n){return this._rotationAlignment=n||"auto",this._update(),this},o.prototype.getRotationAlignment=function(){return this._rotationAlignment},o.prototype.setPitchAlignment=function(n){return this._pitchAlignment=n&&n!=="auto"?n:this._rotationAlignment,this._update(),this},o.prototype.getPitchAlignment=function(){return this._pitchAlignment},o}(u.Evented),Zs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},So=0,Xn=!1,Gs=function(i){function o(n){i.call(this),this.options=u.extend({},Zs,n),u.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.onAdd=function(n){var s;return this._map=n,this._container=ce.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),s=this._setupUI,wo!==void 0?s(wo):u.window.navigator.permissions!==void 0?u.window.navigator.permissions.query({name:"geolocation"}).then(function(p){s(wo=p.state!=="denied")}):s(wo=!!u.window.navigator.geolocation),this._container},o.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(u.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(),ce.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,So=0,Xn=!1},o.prototype._isOutOfMapMaxBounds=function(n){var s=this._map.getMaxBounds(),p=n.coords;return s&&(p.longitude<s.getWest()||p.longitude>s.getEast()||p.latitude<s.getSouth()||p.latitude>s.getNorth())},o.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_E
497RROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},o.prototype._onSuccess=function(n){if(this._map){if(this._isOutOfMapMaxBounds(n))return this._setErrorState(),this.fire(new u.Event("outofmaxbounds",n)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=n,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(n),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(n),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new u.Event("geolocate",n)),this._finish()}},o.prototype._updateCamera=function(n){var s=new u.LngLat(n.coords.longitude,n.coords.latitude),p=n.coords.accuracy,f=this._map.getBearing(),d=u.extend({bearing:f},this.options.fitBoundsOptions);this._map.fitBounds(s.toBounds(p),d,{geolocateSource:!0})},o.prototype._updateMarker=function(n){if(n){var s=new u.LngLat(n.coords.longitude,n.coords.latitude);this._accuracyCircleMarker.setLngLat(s).addTo(this._map),this._userLocationDotMarker.setLngLat(s).addTo(this._map),this._accuracy=n.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},o.prototype._updateCircleRadius=function(){var n=this._map._container.clientHeight/2,s=this._map.unproject([0,n]),p=this._map.unproject([1,n]),f=s.distanceTo(p),d=Math.ceil(2*this._accuracy/f);this._circleElement.style.width=d+"px",this._circleElement.style.height=d+"px"},o.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},o.prototype._onError=function(n){if(this._map){if(this.options.trackUserLocation)if(n.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var s=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(n.code===3&&Xn)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new u.Event("error",n)),this._finish()}},o.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},o.prototype._setupUI=function(n){var s=this;if(this._container.addEventListener("contextmenu",function(d){return d.preventDefault()}),this._geolocateButton=ce.create("button","mapboxgl-ctrl-geolocate",this._container),ce.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",n===!1){u.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var p=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=p,this._geolocateButton.setAttribute("aria-label",p)}else{var f=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=f,this._geolocateButton.setAttribute("aria-label",f)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","fal
497se"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=ce.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new na(this._dotElement),this._circleElement=ce.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new na({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(d){d.geolocateSource||s._watchState!=="ACTIVE_LOCK"||d.originalEvent&&d.originalEvent.type==="resize"||(s._watchState="BACKGROUND",s._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),s._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),s.fire(new u.Event("trackuserlocationend")))})},o.prototype.trigger=function(){if(!this._setup)return u.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new u.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":So--,Xn=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new u.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new u.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var n;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++So>1?(n={maximumAge:6e5,timeout:0},Xn=!0):(n=this.options.positionOptions,Xn=!1),this._geolocationWatchID=u.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,n)}}else u.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},o.prototype._clearWatch=function(){u.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},o}(u.Evented),ln={maxWidth:100,unit:"metric"},un=function(i){this.options=u.extend({},ln,i),u.bindAll(["_onMove","setUnit"],this)};function qa(i,o,n){var s=n&&n.maxWidth||100,p=i._container.clientHeight/2,f=i.unproject([0,p]),d=i.unproject([s,p]),y=f.distanceTo(d);if(n&&n.unit==="imperial"){var v=3.2808*y;v>5280?cn(o,s,v/5280,i._getUIString("ScaleControl.Miles")):cn(o,s,v,i._getUIString("ScaleControl.Feet"))}else n&&n.unit==="nautical"?cn(o,s,y/1852,i._getUIString("ScaleControl.NauticalMiles")):y>=1e3?cn(o,s,y/1e3,i._getUIString("ScaleControl.Kilometers")):cn(o,s,y,i._getUIString("ScaleControl.Meters"))}
vendor: 12,085 bytes, lines 497-498
497function cn(i,o,n,s){var p,f,d,y=(p=n,(f=Math.pow(10,(""+Math.floor(p)).length-1))*(d=(d=p/f)>=10?10:d>=5?5:d>=3?3:d>=2?2:d>=1?1:function(v){var S=Math.pow(10,Math.ceil(-Math.log(v)/Math.LN10));return Math.round(v*S)/S}(d)));i.style.width=o*(y/n)+"px",i.innerHTML=y+" "+s}un.prototype.getDefaultPosition=function(){return"bottom-left"},un.prototype._onMove=function(){qa(this._map,this._container,this.options)},un.prototype.onAdd=function(i){return this._map=i,this._container=ce.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",i.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},un.prototype.onRemove=function(){ce.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},un.prototype.setUnit=function(i){this.options.unit=i,qa(this._map,this._container,this.options)};var oi=function(i){this._fullscreen=!1,i&&i.container&&(i.container instanceof u.window.HTMLElement?this._container=i.container:u.warnOnce("Full screen control 'container' must be a DOM element.")),u.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in u.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in u.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in u.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in u.window.document&&(this._fullscreenchange="MSFullscreenChange")};oi.prototype.onAdd=function(i){return this._map=i,this._container||(this._container=this._map.getContainer()),this._controlContainer=ce.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",u.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},oi.prototype.onRemove=function(){ce.remove(this._controlContainer),this._map=null,u.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},oi.prototype._checkFullscreenSupport=function(){return!!(u.window.document.fullscreenEnabled||u.window.document.mozFullScreenEnabled||u.window.document.msFullscreenEnabled||u.window.document.webkitFullscreenEnabled)},oi.prototype._setupUI=function(){var i=this._fullscreenButton=ce.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);ce.create("span","mapboxgl-ctrl-icon",i).setAttribute("aria-hidden",!0),i.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),u.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},oi.prototype._updateTitle=function(){var i=this._getTitle();this._fullscreenButton.setAttribute("aria-label",i),this._fullscreenButton.title=i},oi.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},oi.prototype._isFullscreen=function(){return this._fullscreen},oi.prototype._changeIcon=function(){(u.window.document.fullscreenElement||u.window.document.mozFullScreenElement||u.window.document.webkitFullscreenElement||u.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},oi.prototype._onClickFullscreen=function(){this._isFullscreen()?u.window.document.exitFullscreen?u.window.document.exitFullscreen():u.window.document.mozCancelFullScreen?u.window.document.mozCancelFullScreen():u.window.document.msExitFullscreen?u.window.document.msExitFullscreen():u.window.document.webkitCancelFullScreen&&u.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Xs={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},oa=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Ws=function(i){function o(n){i.call(this),this.options=u.extend(Object.create(Xs),n),u.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.addTo=function(n){return this._map&&this.remove(),this._map=n,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new u.Event("open")),this},o.prototype.isOpen=function(){return!!this._map},o.prototype.remove=function(){return this._content&&ce.remove(this._content),this._container&&(ce.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new u.Event("close")),this},o.prototype.getLngLat=function(){return this._lngLat},o.prototype.setLngLat=function(n){return this._lngLat=u.LngLat.convert(n),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},o.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},o.prototype.getElement=function(){return this._container},o.prototype.setText=function(n){return this.setDOMContent(u.window.document.createTextNode(n))},o.prototype.setHTML=function(n){var s,p=u.window.document.createDocumentFragment(),f=u.window.document.createElement("body");for(f.innerHTML=n;s=f.firstChild;)p.appendChild(s);return this.setDOMContent(p)},o.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},o.prototype.setMaxWidth=function(n){return this.options.maxWidth=n,this._update(),this},o.prototype.setDOMContent=function(n){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=ce.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(n),this._createCloseButton(),this._update(),this._focusFirstElement(),this},o.prototype.addClassName=function(n){this._container&&this._container.classList.add(n)},o.prototype.removeClassName=function(n){this._container&&this._container.classList.remove(n)},o.prototype.setOffset=function(n){return this.options.offset=n,this._update(),this},o.prototype.toggleClassName=function(n){if(this._container)return this._container.classList.toggle(n)},o.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=ce.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},o.prototype._onMouseUp=function(n){this._update(n.point)},o.prototype._onMouseMove=function(n){this._update(n.point)},o.prototype._onDrag=function(n){this._update(n.point)},o.prototype._update=function(n){var s=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=ce.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=ce.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(C){return s._container.classList.add(C)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=bo(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||n)){var p=this._pos=this._trackPointer&&n?n:this._map.project(this._lngLat),f=this.options.anchor,d=function C(k){if(k){if(typeof k=="number"){var F=Math.round(Math.sqrt(.5*Math.pow(k,2)));return{center:new u.Point(0,0),top:new u.Point(0,k),"top-left":new u.Point(F,F),"top-right":new u.Point(-F,F),bottom:new u.Point(0,-k),"bottom-left":new u.Point(F,-F),"bottom-right":new u.Point(-F,-F),left:new u.Point(k,0),right:new u.Point(-k,0)}}if(k instanceof u.Point||Array.isArray(k)){var R=u.Point.convert(k);return{center:R,top:R,"top-left":R,"top-right":R,bottom:R,"bottom-left":R,"bottom-right":R,left:R,right:R}}return{center:u.Point.convert(k.center||[0,0]),top:u.Point.convert(k.top||[0,0]),"top-left":u.Point.convert(k["top-left"]||[0,0]),"top-right":u.Point.convert(k["top-right"]||[0,0]),bottom:u.Point.convert(k.bottom||[0,0]),"bottom-left":u.Point.convert(k["bottom-left"]||[0,0]),"bottom-right":u.Point.convert(k["bottom-right"]||[0,0]),left:u.Point.convert(k.left||[0,0]),right:u.Point.convert(k.right||[0,0])}}return C(new u.Point(0,0))}(this.options.offset);if(!f){var y,v=this._container.offsetWidth,S=this._container.offsetHeight;y=p.y+d.bottom.y<S?["top"]:p.y>this._map.transform.height-S?["bottom"]:[],p.x<v/2?y.push("left"):p.x>this._map.transform.width-v/2&&y.push("right"),f=y.length===0?"bottom":y.join("-")}var z=p.add(d[f]).round();ce.setTransform(this._container,Pi[f]+" translate("+z.x+"px,"+z.y+"px)"),ja(this._container,f,"popup")}},o.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var n=this._container.querySelector(oa);n&&n.focus()}},o.prototype._onClose=function(){this.remove()},o}(u.Evented),Za={version:u.version,supported:qr,setRTLTextPlugin:u.setRTLTextPlugin,getRTLTextPluginStatus:u.getRTLTextPluginStatus,Map:Hl,NavigationControl:ji,GeolocateControl:Gs,AttributionControl:br,ScaleControl:un,FullscreenControl:oi,Popup:Ws,Marker:na,Style:Br,LngLat:u.LngLat,LngLatBounds:u.LngLatBounds,Point:u.Point,MercatorCoordinate:u.MercatorCoordinate,Evented:u.Evented,config:u.config,prewarm:function(){ie().acquire(re)},clearPrewarmedResources:function(){var i=Ie;i&&(i.isPreloaded()&&i.numActive()===1?(i.release(re),Ie=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return u.config.ACCESS_TOKEN},set accessToken(i){u.config.ACCESS_TOKEN=i},get baseApiUrl(){return u.config.API_URL},set baseApiUrl(i){u.config.API_URL=i},get workerCount(){return se.workerCount},set workerCount(i){se.workerCount=i},get maxParallelImageRequests(){return u.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(i){u.config.MAX_PARALLEL_IMAGE_REQUESTS=i},clearStorage:function(i){u.clearTileCache(i)},workerUrl:""};return Za}),bn})})(jp);var qp=jp.exports;const Ef=Sf(qp),zf=If({__proto__:null,default:Ef},[qp]);export{zf as m}; 498//# sourceMappingURL=mapbox-gl.production.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.