PageSourceSearch

https://primariavad.ro/_nuxt/DhlRdtTC.js

js primariavad.ro collected 2026-09-25 11:50:46 UTC 943,488 bytes, 506 lines download raw bytes

1import{a as Vy,c as qi}from"./BgqE2USM.js";import{r as Uy,c as zw}from"./Dz0mkqCC.js";import{r as Lw}from"./CbO2Rjsj.js";var mc={exports:{}},Dw=mc.exports,kv;function Ow(){return kv||(kv=1,(function(g,m){(function(v,S){g.exports=S()})(Dw,(function(){var v,S,T;function E(a,_){if(!v)v=_;else if(!S)S=_;else{var w="var sharedChunk = {}; ("+v+")(sharedChunk); ("+S+")(sharedChunk);",k={};v(k),T=_(k),typeof window<"u"&&(T.workerUrl=window.URL.createObjectURL(new Blob([w],{type:"text/javascript"})))}}return E(["exports"],(function(a){function _(e,t){return e(t={exports:{}},t.exports),t.exports}var w=k;function k(e,t,r,s){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*(s-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=s,this.p2x=r,this.p2y=s}k.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},k.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},k.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},k.prototype.solveCurveX=function(e,t){var r,s,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 y=this.sampleCurveDerivativeX(l);if(Math.abs(y)<1e-6)break;l-=c/y}if((l=e)<(r=0))return r;if(l>(s=1))return s;for(;r<s;){if(c=this.sampleCurveX(l),Math.abs(c-e)<t)return l;e>c?r=l:s=l,l=.5*(s-r)+r}return l},k.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var z=O;function O(e,t){this.x=e,this.y=t}O.prototype={clone:function(){return new O(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),s=r*this.x+t*this.y;return this.x=t*this.x-r*this.y,this.y=s,this},_rotateAround:function(e,t){var r=Math.cos(e),s=Math.sin(e),l=t.y+s*(this.x-t.x)+r*(this.y-t.y);return this.x=t.x+r*(this.x-t.x)-s*(this.y-t.y),this.y=l,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},O.convert=function(e){return e instanceof O?e:Array.isArray(e)?new O(e[0],e[1]):e};var F=typeof self<"u"?self:{},W=Math.pow(2,53)-1;function ue(e,t,r,s){var l=new w(e,t,r,s);return function(c){return l.solve(c)}}var ye=ue(.25,.1,.25,1);function ge(e,t,r){return Math.min(r,Math.max(t,e))}function xe(e,t,r){var s=r-t,l=((e-t)%s+s)%s+t;return l===t?r:l}function ce(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var s=0,l=t;s<l.length;s+=1){var c=l[s];for(var h in c)e[h]=c[h]}return e}var $=1;function me(){return $++}function ze(){return(function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)})()}function Fe(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 pe(e,t){e.forEach((function(r){t[r]&&(t[r]=t[r].bind(t))}))}function je(e,t){return e.indexOf(t,e.length-t.length)!==-1}function Re(e,t,r){var s={};for(var l in e)s[l]=t.call(r||this,e[l],l,e);return s}function it(e,t,r){var s={};for(var l in e)t.call(r||this,e[l],l,e)&&(s[l]=e[l]);return s}function se(e){return Array.isArray(e)?e.map(se):typeof e=="object"&&e?Re(e,se):e}var rt={};function pt(e){rt[e]||(typeof console<"u"&&console.warn(e),rt[e]=!0)}function nt(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function Qt(e){for(var t=0,r=0,s=e.length,l=s-1,c=void 0,h=void 0;r<s;l=r++)t+=((h=e[l]).x-(c=e[r]).x)*(c.y+h.y);return t}function Xt(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function Rr(e){var t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(s,l,c,h){var y=c||h;return t[l]=!y||y.toLowerCase(),""})),t["max-age"]){var r=parseInt(t["max-age"],10);isNaN(r)?delete t["max-age"]:t["max-age"]=r}return t}var Wt=null;function zr(e){if(Wt==null){var t=e.navigator?e.navigator.userAgent:null;
1Wt=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return Wt}function Ze(e){try{var t=F[e];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch{return!1}}var lr,Ht,wt,wr,Jr=F.performance&&F.performance.now?F.performance.now.bind(F.performance):Date.now.bind(Date),dr=F.requestAnimationFrame||F.mozRequestAnimationFrame||F.webkitRequestAnimationFrame||F.msRequestAnimationFrame,Sr=F.cancelAnimationFrame||F.mozCancelAnimationFrame||F.webkitCancelAnimationFrame||F.msCancelAnimationFrame,dn={now:Jr,frame:function(e){var t=dr(e);return{cancel:function(){return Sr(t)}}},getImageData:function(e,t){t===void 0&&(t=0);var r=F.document.createElement("canvas"),s=r.getContext("2d");if(!s)throw new Error("failed to create canvas 2d context");return r.width=e.width,r.height=e.height,s.drawImage(e,0,0,e.width,e.height),s.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:function(e){return lr||(lr=F.document.createElement("a")),lr.href=e,lr.href},hardwareConcurrency:F.navigator&&F.navigator.hardwareConcurrency||4,get devicePixelRatio(){return F.devicePixelRatio},get prefersReducedMotion(){return!!F.matchMedia&&(Ht==null&&(Ht=F.matchMedia("(prefers-reduced-motion: reduce)")),Ht.matches)}},Tt={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},zt={supported:!1,testSupport:function(e){!Tr&&wr&&(Kt?yt(e):wt=e)}},Tr=!1,Kt=!1;function yt(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,wr),e.isContextLost())return;zt.supported=!0}
1catch{}e.deleteTexture(t),Tr=!0}F.document&&((wr=F.document.createElement("img")).onload=function(){wt&&yt(wt),wt=null,Kt=!0},wr.onerror=function(){Tr=!0,wt=null},wr.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var Vr="01",Ar=function(e,t){this._transformRequestFn=e,this._customAccessToken=t,this._createSkuToken()};function cr(e){return e.indexOf("mapbox:")===0}Ar.prototype._createSkuToken=function(){var e=(function(){for(var t="",r=0;r<10;r++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",Vr,t].join(""),tokenExpiresAt:Date.now()+432e5}})();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},Ar.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Ar.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},Ar.prototype.normalizeStyleURL=function(e,t){if(!cr(e))return e;var r=Zr(e);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},Ar.prototype.normalizeGlyphsURL=function(e,t){if(!cr(e))return e;var r=Zr(e);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},Ar.prototype.normalizeSourceURL=function(e,t){if(!cr(e))return e;var r=Zr(e);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||t)},Ar.prototype.normalizeSpriteURL=function(e,t,r,s){var l=Zr(e);return cr(e)?(l.path="/styles/v1"+l.path+"/sprite"+t+r,this._makeAPIURL(l,this._customAccessToken||s)):(l.path+=""+t+r,rn(l))},Ar.prototype.normalizeTileURL=function(e,t){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!cr(e))return e;var r=Zr(e);r.path=r.path.replace(/(\.(png|jpg)\d*)(?=$)/,(dn.devicePixelRatio>=2||t===512?"@2x":"")+(zt.supported?".webp":"$1")),r.path=r.path.replace(/^.+\/v4\//,"/"),r.path="/v4"+r.path;var s=this._customAccessToken||(function(l){for(var c=0,h=l;c<h.length;c+=1){var y=h[c].match(/^access_token=(.*)$/);if(y)return y[1]}return null})(r.params)||Tt.ACCESS_TOKEN;return Tt.REQUIRE_ACCESS_TOKEN&&s&&this._skuToken&&r.params.push("sku="+this._skuToken),this._makeAPIURL(r,s)},Ar.prototype.canonicalizeTileURL=function(e,t){var r=Zr(e);if(!r.path.match(/(^\/v4\/)/)||!r.path.match(/\.[\w]+$/))return e;var s="mapbox://tiles/";s+=r.path.replace("/v4/","");var l=r.params;return t&&(l=l.filter((function(c){return!c.match(/^access_token=/)}))),l.length&&(s+="?"+l.join("&")),s},Ar.prototype.canonicalizeTileset=function(e,t){for(var r=!!t&&cr(t),s=[],l=0,c=e.tiles||[];l<c.length;l+=1){var h=c[l];Cr(h)?s.push(this.canonicalizeTileURL(h,r)):s.push(h)}return s},Ar.prototype._makeAPIURL=function(e,t){var r="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",s=Zr(Tt.API_URL);if(e.protocol=s.protocol,e.authority=s.authority,e.protocol==="http"){var l=e.params.indexOf("secure");l>=0&&e.params.splice(l,1)}if(s.path!=="/"&&(e.path=""+s.path+e.path),!Tt.REQUIRE_ACCESS_TOKEN)return rn(e);if(!(t=t||Tt.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),rn(e)};var yn=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Cr(e){return yn.test(e)}var ti=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Zr(e){var t=e.match(ti);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 rn(e){var t=e.params.length?"?"+e.params.join("&"):"";return e.protocol+"://"+e.authority+e.path+t}function Xn(e){if(!e)return null;var t=e.split(".");if(!t||t.length!==3)return null;try{return JSON.parse(decodeURIComponent(F.atob(t[1]).split("").map((function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)})).join("")))}catch{return null}}var nn=function(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};nn.prototype.getStorageKey=function(e){var t,r=Xn(Tt.ACCESS_TOKEN);return t=r&&r.u?F.btoa(encodeURIComponent(r.u).replace(/%([0-9A-F]{2})/g,(function(s,l){return String.fromCharCode(+("0x"+l))}))):Tt.ACCESS_TOKEN||"",e?"mapbox.eventData."+e+":"+t:"mapbox.eventData:"+t},nn.prototype.fetchEventData=function(){var e=Ze("localStorage"),t=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{var s=F.localStorage.getItem(t);s&&(this.eventData=JSON.parse(s));var l=F.localStorage.getItem(r);l&&(this.anonId=l)}catch{pt("Unable to read from LocalStorage")}},nn.prototype.saveEventData=function(){var e=Ze("localStorage"),t=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{F.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&F.localStorage.setItem(t,JSON.stringify(this.eventData))}catch{pt("Unable to write to LocalStorage")}},nn.prototype.processRequests=function(e){},nn.prototype.postEvent=function(e,t,r,s){var l=this;if(Tt.EVENTS_URL){var c=Zr(Tt.EVENTS_URL);c.params.push("access_token="+(s||Tt.ACCESS_TOKEN||""));var h={event:this.type,created:new Date(e).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.13.3",skuId:Vr,userId:this.anonId},y=t?ce(h,t):h,b={url:rn(c),headers:{"Content-Type":"text/plain"},body:JSON.stringify([y])};this.pendingRequest=rr(b,(function(I){l.pendingRequest=null,r(I),l.saveEventData(),l.processRequests(s)}))}},nn.prototype.queueRequest=function(e,t){this.queue.push(e),this.processRequests(t)};var on,Ci,Hn=(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,s,l,c){this.skuToken=l;var h=!(!c&&!Tt.ACCESS_TOKEN),y=Array.isArray(r)&&r.some((function(b){return cr(b)||Cr(b)}));Tt.EVENTS_URL&&h&&y&&this.queueRequest({id:s,timestamp:Date.now()},c)},t.prototype.processRequests=function(r){var s=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(),Fe(this.anonId)||(this.anonId=ze()),this.postEvent(h,{skuToken:this.skuToken}
1,(function(y){y||c&&(s.success[c]=!0)}),r))}},t})(nn),fo=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,s){Tt.EVENTS_URL&&Tt.ACCESS_TOKEN&&Array.isArray(r)&&r.some((function(l){return cr(l)||Cr(l)}))&&this.queueRequest(Date.now(),s)},t.prototype.processRequests=function(r){var s=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var l=Xn(Tt.ACCESS_TOKEN),c=l?l.u:Tt.ACCESS_TOKEN,h=c!==this.eventData.tokenU;Fe(this.anonId)||(this.anonId=ze(),h=!0);var y=this.queue.shift();if(this.eventData.lastSuccess){var b=new Date(this.eventData.lastSuccess),I=new Date(y),C=(y-this.eventData.lastSuccess)/864e5;h=h||C>=1||C<-1||b.getDate()!==I.getDate()}else h=!0;if(!h)return this.processRequests();this.postEvent(y,{"enabled.telemetry":!1},(function(P){P||(s.eventData.lastSuccess=y,s.eventData.tokenU=c)}),r)}},t})(nn)),jo=fo.postTurnstileEvent.bind(fo),fi=new Hn,Pi=fi.postMapLoadEvent.bind(fi),Mi=500,Go=50;function Vi(){F.caches&&!on&&(on=F.caches.open("mapbox-tiles"))}function ki(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}var ri,we=1/0;function Ae(){return ri==null&&(ri=F.OffscreenCanvas&&new F.OffscreenCanvas(1,1).getContext("2d")&&typeof F.createImageBitmap=="function"),ri}var jt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(jt);var or=(function(e){function t(r,s,l){s===401&&Cr(l)&&(r+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),e.call(this,r),this.status=s,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),er=Xt()?function(){return self.worker&&self.worker.referrer}:function(){return(F.location.protocol==="blob:"?F.parent:F).location.href},It,mn,Nn=function(e,t){if(!(/^file:/.test(r=e.url)||/^file:/.test(er())&&!/^\w+:/.test(r))){if(F.fetch&&F.Request&&F.AbortController&&F.Request.prototype.hasOwnProperty("signal"))return(function(s,l){var c,h=new F.AbortController,y=new F.Request(s.url,{method:s.method||"GET",body:s.body,credentials:s.credentials,headers:s.headers,referrer:er(),signal:h.signal}),b=!1,I=!1,C=(c=y.url).indexOf("sku=")>0&&Cr(c);s.type==="json"&&y.headers.set("Accept","application/json");var P=function(N,X,H){if(!I){if(N&&N.message!=="SecurityError"&&pt(N),X&&H)return D(X);var ne=Date.now();F.fetch(y).then((function(ee){if(ee.ok){var le=C?ee.clone():null;return D(ee,le,ne)}return l(new or(ee.statusText,ee.status,s.url))})).catch((function(ee){ee.code!==20&&l(new Error(ee.message))}))}},D=function(N,X,H){(s.type==="arrayBuffer"?N.arrayBuffer():s.type==="json"?N.json():N.text()).then((function(ne){I||(X&&H&&(function(ee,le,de){if(Vi(),on){var ve={status:le.
1status,statusText:le.statusText,headers:new F.Headers};le.headers.forEach((function(Ce,De){return ve.headers.set(De,Ce)}));var be=Rr(le.headers.get("Cache-Control")||"");be["no-store"]||(be["max-age"]&&ve.headers.set("Expires",new Date(de+1e3*be["max-age"]).toUTCString()),new Date(ve.headers.get("Expires")).getTime()-de<42e4||(function(Ce,De){if(Ci===void 0)try{new Response(new ReadableStream),Ci=!0}catch{Ci=!1}Ci?De(Ce.body):Ce.blob().then(De)})(le,(function(Ce){var De=new F.Response(Ce,ve);Vi(),on&&on.then((function(Ue){return Ue.put(ki(ee.url),De)})).catch((function(Ue){return pt(Ue.message)}))})))}})(y,X,H),b=!0,l(null,ne,N.headers.get("Cache-Control"),N.headers.get("Expires")))})).catch((function(ne){I||l(new Error(ne.message))}))};return C?(function(N,X){if(Vi(),!on)return X(null);var H=ki(N.url);on.then((function(ne){ne.match(H).then((function(ee){var le=(function(de){if(!de)return!1;var ve=new Date(de.headers.get("Expires")||0),be=Rr(de.headers.get("Cache-Control")||"");return ve>Date.now()&&!be["no-cache"]})(ee);ne.delete(H),le&&ne.put(H,ee.clone()),X(null,ee,le)})).catch(X)})).catch(X)})(y,P):P(null,null),{cancel:function(){I=!0,b||h.abort()}}})(e,t);if(Xt()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t,void 0,!0)}var r;return(function(s,l){var c=new F.XMLHttpRequest;for(var h in c.open(s.method||"GET",s.url,!0),s.type==="arrayBuffer"&&(c.responseType="arraybuffer"),s.headers)c.setRequestHeader(h,s.headers[h]);return s.type==="json"&&(c.responseType="text",c.setRequestHeader("Accept","application/json")),c.withCredentials=s.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 y=c.response;if(s.type==="json")try{y=JSON.parse(c.response)}catch(b){return l(b)}l(null,y,c.getResponseHeader("Cache-Control"),c.getResponseHeader("Expires"))}else l(new or(c.statusText,c.status,s.url))},c.send(s.body),{cancel:function(){return c.abort()}}})(e,t)},an=function(e,t){return Nn(ce(e,{type:"arrayBuffer"}),t)},rr=function(e,t){return Nn(ce(e,{method:"POST"}),t)},M="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";It=[],mn=0;var L=function(e,t){if(zt.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),mn>=Tt.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:e,callback:t,cancelled:!1,cancel:function(){this.cancelled=!0}};return It.push(r),r}mn++;var s=!1,l=function(){if(!s)for(s=!0,mn--;It.length&&mn<Tt.MAX_PARALLEL_IMAGE_REQUESTS;){var h=It.shift();h.cancelled||(h.cancel=L(h.requestParameters,h.callback).cancel)}},c=an(e,(function(h,y,b,I){l(),h?t(h):y&&(Ae()?(function(C,P){var D=new F.Blob([new Uint8Array(C)],{type:"image/png"});F.createImageBitmap(D).then((function(N){P(null,N)})).catch((function(N){P(new Error("Could not load image because of "+N.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))}))})(y,t):(function(C,P,D,N){var X=new F.Image,H=F.URL;X.onload=function(){P(null,X),H.revokeObjectURL(X.src),X.onload=null,F.requestAnimationFrame((function(){X.src=M}))},X.onerror=function(){return P(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 ne=new F.Blob([new Uint8Array(C)],{type:"image/png"});X.cacheControl=D,X.expires=N,X.src=C.byteLength?H.createObjectURL(ne):M})(y,t,b,I))}));return{cancel:function(){c.cancel(),l()}}};function B(e,t,r){r[e]&&r[e].indexOf(t)!==-1||(r[e]=r[e]||[],r[e].push(t))}function G(e,t,r){if(r&&r[e]){var s=r[e].indexOf(t);s!==-1&&r[e].splice(s,1)}}var K=function(e,t){t===void 0&&(t={}),ce(this,t),this.type=e},ie=(function(e){function t(r,s){s===void 0&&(s={}),e.call(this,"error",ce({error:r},s))}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t})(K),oe=function(){};oe.prototype.on=function(e,t){return this._listeners=this._listeners||{},B(e,t,this._listeners),this},oe.prototype.off=function(e,t){return G(e,t,this._listeners),G(e,t,this._oneTimeListeners),this},oe.prototype.once=function(e,t){return this._oneTimeListeners=this._oneTimeListeners||{},B(e,t,this._oneTimeListeners),this},oe.prototype.fire=function(e,t){typeof e=="string"&&(e=new K(e,t||{}));var r=e.type;if(this.listens(r)){e.target=this;for(var s=0,l=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];s<l.length;s+=1)l[s].call(this,e);for(var c=0,h=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];c<h.length;c+=1){var y=h[c];G(r,y,this._oneTimeListeners),y.call(this,e)}var b=this._eventedParent;b&&(ce(e,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),b.fire(e))}else e instanceof ie&&console.error(e.error);return this},oe.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)},oe.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this};var U
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,Q=function(e,t,r,s){this.message=(e?e+": ":"")+r,s&&(this.identifier=s),t!=null&&t.__line__&&(this.line=t.__line__)};function he(e){var t=e.value;return t?[new Q(e.key,t,"constants have been deprecated as of v8")]:[]}function Pe(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var s=0,l=t;s<l.length;s+=1){var c=l[s];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 Te(e){if(Array.isArray(e))return e.map(Te);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){var t={};for(var r in e)t[r]=Te(e[r]);return t}return Le(e)}var ke=(function(e){function t(r,s){e.call(this,s),this.message=s,this.key=r}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t})(Error),Qe=function(e,t){t===void 0&&(t=[]),this.parent=e,this.bindings={};for(var r=0,s=t;r<s.length;r+=1){var l=s[r];this.bindings[l[0]]=l[1]}};Qe.prototype.concat=function(e){return new Qe(this,e)},Qe.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.")},Qe.prototype.has=function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)};var He={kind:"null"},Ee={kind:"number"},We={kind:"string"},qe={kind:"boolean"},Ne={kind:"color"},xt={kind:"object"},Ge={kind:"value"},Pt={kind:"collator"},ar={kind:"formatted"},Mt={kind:"resolvedImage"};function Gt(e,t){return{kind:"array",itemType:e,N:t}}function Ot(e){if(e.kind==="array"){var t=Ot(e.itemType);return typeof e.N=="number"?"array<"+t+", "+e.N+">":e.itemType.kind==="value"?"array":"array<"+t+">"}return e.kind}var Tn=[He,Ee,We,qe,Ne,ar,xt,Gt(Ge),Mt];function Jt(e,t){if(t.kind==="error")return null;if(e.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!Jt(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,s=Tn;r<s.length;r+=1)if(!Jt(s[r],t))return null}}return"Expected "+Ot(e)+" but found "+Ot(t)+" instead."}function Lr(e,t){return t.some((function(r){return r.kind===e.kind}))}function nr(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 Lt=_((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 s(y){return(y=Math.round(y))<0?0:y>255?255:y}function l(y){return s(y[y.length-1]==="%"?parseFloat(y)/100*255:parseInt(y))}function c(y){return(b=y[y.length-1]==="%"?parseFloat(y)/100:parseFloat(y))<0?0:b>1?1:b;var b}function h(y,b,I){return I<0?I+=1:I>1&&(I-=1),6*I<1?y+(b-y)*I*6:2*I<1?b:3*I<2?y+(b-y)*(2/3-I)*6:y}try{t.parseCSSColor=function(y){var b,I=y.replace(/ /g,"").toLowerCase();if(I in r)return r[I].slice();if(I[0]==="#")return I.length===4?(b=parseInt(I.substr(1),16))>=0&&b<=4095?[(3840&b)>>4|(3840&b)>>8,240&b|(240&b)>>4,15&b|(15&b)<<4,1]:null:I.length===7&&(b=parseInt(I.substr(1),16))>=0&&b<=16777215?[(16711680&b)>>16,(65280&b)>>8,255&b,1]:null;var C=I.indexOf("("),P=I.indexOf(")");if(C!==-1&&P+1===I.length){var D=I.substr(0,C),N=I.substr(C+1,P-(C+1)).split(","),X=1;switch(D){case"rgba":if(N.length!==4)return null;X=c(N.pop());case"rgb":return N.length!==3?null:[l(N[0]),l(N[1]),l(N[2]),X];case"hsla":if(N.length!==4)return null;X=c(N.pop());case"hsl":if(N.length!==3)return null;var H=(parseFloat(N[0])%360+360)%360/360,ne=c(N[1]),ee=c(N[2]),le=ee<=.5?ee*(ne+1):ee+ne-ee*ne,de=2*ee-le;return[s(255*h(de,le,H+1/3)),s(255*h(de,le,H)),s(255*h(de,le,H-1/3)),X];default:return null}}return null}}catch{}})).parseCSSColor,$t=function(e,t,r,s){s===void 0&&(s=1),this.r=e,this.g=t,this.b=r,this.a=s};$t.parse=function(e){if(e){if(e instanceof $t)return e;if(typeof e=="string"){var t=Lt(e);if(t)return new $t(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},$t.prototype.toString=function(){var e=this.toArray(),t=e[1],r=e[2],s=e[3];return"rgba("+Math.round(e[0])+","+Math.round(t)+","+Math.round(r)+","+s+")"},$t.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]},$t.black=new $t(0,0,0,1),$t.white=new $t(1,1,1,1),$t.transparent=new $t(0,0,0,0),$t.red=new $t(1,0,0,1);var zn=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"})};zn.prototype.compare=function(e,t){return this.collator.compare(e,t)},zn.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var ha=function(e,t,r,s,l){this.text=e,this.image=t,this.scale=r,this.fontStack=s,this.textColor=l},sn=function(e){this.sections=e};sn.fromString=function(e){return new sn([new ha(e,null,null,null,null)])},sn.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}))},sn.factory=function(e){return e instanceof sn?e:sn.fromString(e)},sn.prototype.toString=function(){return this.sections.length===0?"":this.sections.map((function(e){return e.text})).join("")},sn.prototype.serialize=function(){for(var e=["format"],t=0,r=this.sections;t<r.length;t+=1){var s=r[t];if(s.image)e.push(["image",s.image.name]);else{e.push(s.text);var l={};s.fontStack&&(l["text-font"]=["literal",s.fontStack.split(",")]),s.scale&&(l["font-scale"]=s.scale),s.textColor&&(l["text-color"]=["rgba"].concat(s.textColor.toArray())),e.push(l)}}return e};var Ln=function(e){this.name=e.name,this.available=e.available};function Hs(e,t,r,s){return typeof e=="number"&&e>=0&&e<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof r=="number"&&r>=0&&r<=255?s===void 0||typeof s=="number"&&s>=0&&s<=1?null:"Invalid rgba value ["+[e,t,r,s].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof s=="number"?[e,t,r,s]:[e,t,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function fa(e){if(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||e instanceof $t||e instanceof zn||e instanceof sn||e instanceof Ln)return!0;
1if(Array.isArray(e)){for(var t=0,r=e;t<r.length;t+=1)if(!fa(r[t]))return!1;return!0}if(typeof e=="object"){for(var s in e)if(!fa(e[s]))return!1;return!0}return!1}function Dr(e){if(e===null)return He;if(typeof e=="string")return We;if(typeof e=="boolean")return qe;if(typeof e=="number")return Ee;if(e instanceof $t)return Ne;if(e instanceof zn)return Pt;if(e instanceof sn)return ar;if(e instanceof Ln)return Mt;if(Array.isArray(e)){for(var t,r=e.length,s=0,l=e;s<l.length;s+=1){var c=Dr(l[s]);if(t){if(t===c)continue;t=Ge;break}t=c}return Gt(t||Ge,r)}return xt}function da(e){var t=typeof e;return e===null?"":t==="string"||t==="number"||t==="boolean"?String(e):e instanceof $t||e instanceof sn||e instanceof Ln?e.toString():JSON.stringify(e)}Ln.prototype.toString=function(){return this.name},Ln.fromString=function(e){return e?new Ln({name:e,available:!1}):null},Ln.prototype.serialize=function(){return["image",this.name]};var In=function(e,t){this.type=e,this.value=t};In.parse=function(e,t){if(e.length!==2)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!fa(e[1]))return t.error("invalid value");var r=e[1],s=Dr(r),l=t.expectedType;return s.kind!=="array"||s.N!==0||!l||l.kind!=="array"||typeof l.N=="number"&&l.N!==0||(s=l),new In(s,r)},In.prototype.evaluate=function(){return this.value},In.prototype.eachChild=function(){},In.prototype.outputDefined=function(){return!0},In.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof $t?["rgba"].concat(this.value.toArray()):this.value instanceof sn?this.value.serialize():this.value};var un=function(e){this.name="ExpressionEvaluationError",this.message=e};un.prototype.toJSON=function(){return this.message};var ni={string:We,number:Ee,boolean:qe,object:xt},vr=function(e,t){this.type=e,this.args=t};vr.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r,s=1,l=e[0];if(l==="array"){var c,h;if(e.length>2){var y=e[1];if(typeof y!="string"||!(y in ni)||y==="object")return t.error('The item type argument of "array" must be one of string, number, boolean',1);c=ni[y],s++}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],s++}r=Gt(c,h)}else r=ni[l];for(var b=[];s<e.length;s++){var I=t.parse(e[s],s,Ge);if(!I)return null;b.push(I)}return new vr(r,b)},vr.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var r=this.args[t].evaluate(e);if(!Jt(this.type,Dr(r)))return r;if(t===this.args.length-1)throw new un("Expected value to be of type "+Ot(this.type)+", but found "+Ot(Dr(r))+" instead.")}return null},vr.prototype.eachChild=function(e){this.args.forEach(e)},vr.prototype.outputDefined=function(){return this.args.every((function(e){return e.outputDefined()}))},vr.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 s=e.N;(typeof s=="number"||this.args.length>1)&&t.push(s)}}return t.concat(this.args.map((function(l){return l.serialize()})))};var di=function(e){this.type=ar,this.sections=e};di.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 s=[],l=!1,c=1;c<=e.length-1;++c){var h=e[c];if(l&&typeof h=="object"&&!Array.isArray(h)){l=!1;var y=null;if(h["font-scale"]&&!(y=t.parse(h["font-scale"],1,Ee)))return null;var b=null;if(h["text-font"]&&!(b=t.parse(h["text-font"],1,Gt(We))))return null;var I=null;if(h["text-color"]&&!(I=t.parse(h["text-color"],1,Ne)))return null;var C=s[s.length-1];C.scale=y,C.font=b,C.textColor=I}else{var P=t.parse(e[c],1,Ge);if(!P)return null;var D=P.type.kind;if(D!=="string"&&D!=="value"&&D!=="null"&&D!=="resolvedImage")return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");l=!0,s.push({content:P,scale:null,font:null,textColor:null})}}return new di(s)},di.prototype.evaluate=function(e){return new sn(this.sections.map((function(t){var r=t.content.evaluate(e);return Dr(r)===Mt?new ha("",r,null,null,null):new ha(da(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},di.prototype.eachChild=function(e){for(var t=0,r=this.sections;t<r.length;t+=1){var s=r[t];e(s.content),s.scale&&e(s.scale),s.font&&e(s.font),s.textColor&&e(s.textColor)}},di.prototype.outputDefined=function(){return!1},di.prototype.serialize=function(){for(var e=["format"],t=0,r=this.sections;t<r.length;t+=1){var s=r[t];e.push(s.content.serialize());var l={};s.scale&&(l["font-scale"]=s.scale.serialize()),s.font&&(l["text-font"]=s.font.serialize()),s.textColor&&(l["text-color"]=s.textColor.serialize()),e.push(l)}return e};var Kn=function(e){this.type=Mt,this.input=e};Kn.parse=function(e,t){if(e.length!==2)return t.error("Expected two arguments.");var r=t.parse(e[1],1,We);
1return r?new Kn(r):t.error("No image name provided.")},Kn.prototype.evaluate=function(e){var t=this.input.evaluate(e),r=Ln.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r},Kn.prototype.eachChild=function(e){e(this.input)},Kn.prototype.outputDefined=function(){return!1},Kn.prototype.serialize=function(){return["image",this.input.serialize()]};var Qu={"to-boolean":qe,"to-color":Ne,"to-number":Ee,"to-string":We},ii=function(e,t){this.type=e,this.args=t};ii.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 s=Qu[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 ii(s,l)},ii.prototype.evaluate=function(e){if(this.type.kind==="boolean")return!!this.args[0].evaluate(e);if(this.type.kind==="color"){for(var t,r,s=0,l=this.args;s<l.length;s+=1){if(r=null,(t=l[s].evaluate(e))instanceof $t)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.":Hs(t[0],t[1],t[2],t[3])))return new $t(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new un(r||"Could not parse color from value '"+(typeof t=="string"?t:String(JSON.stringify(t)))+"'")}if(this.type.kind==="number"){for(var h=null,y=0,b=this.args;y<b.length;y+=1){if((h=b[y].evaluate(e))===null)return 0;var I=Number(h);if(!isNaN(I))return I}throw new un("Could not convert "+JSON.stringify(h)+" to number.")}return this.type.kind==="formatted"?sn.fromString(da(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?Ln.fromString(da(this.args[0].evaluate(e))):da(this.args[0].evaluate(e))},ii.prototype.eachChild=function(e){this.args.forEach(e)},ii.prototype.outputDefined=function(){return this.args.every((function(e){return e.outputDefined()}))},ii.prototype.serialize=function(){if(this.type.kind==="formatted")return new di([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Kn(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild((function(t){e.push(t.serialize())})),e};var Cc=["Unknown","Point","LineString","Polygon"],Ri=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};Ri.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Ri.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?Cc[this.feature.type]:this.feature.type:null},Ri.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Ri.prototype.canonicalID=function(){return this.canonical},Ri.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Ri.prototype.parseColor=function(e){var t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=$t.parse(e)),t};var vn=function(e,t,r,s){this.name=e,this.type=t,this._evaluate=r,this.args=s};vn.prototype.evaluate=function(e){return this._evaluate(e,this.args)},vn.prototype.eachChild=function(e){this.args.forEach(e)},vn.prototype.outputDefined=function(){return!1},vn.prototype.serialize=function(){return[this.name].concat(this.args.map((function(e){return e.serialize()})))},vn.parse=function(e,t){var r,s=e[0],l=vn.definitions[s];if(!l)return t.error('Unknown expression "'+s+'". 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,y=h.filter((function(ut){var Xe=ut[0];return!Array.isArray(Xe)||Xe.length===e.length-1})),b=null,I=0,C=y;I<C.length;I+=1){var P=C[I],D=P[0],N=P[1];b=new Zi(t.registry,t.path,null,t.scope);for(var X=[],H=!1,ne=1;ne<e.length;ne++){var ee=e[ne],le=Array.isArray(D)?D[ne-1]:D.type,de=b.parse(ee,1+X.length,le);if(!de){H=!0;break}X.push(de)}if(!H)if(Array.isArray(D)&&D.length!==X.length)b.error("Expected "+D.length+" arguments, but found "+X.length+" instead.");else{for(var ve=0;ve<X.length;ve++){var be=Array.isArray(D)?D[ve]:D.type,Ce=X[ve];b.concat(ve+1).checkSubtype(be,Ce.type)}if(b.errors.length===0)return new vn(s,c,N,X)}}if(y.length===1)(r=t.errors).push.apply(r,b.errors);else{for(var De=(y.length?y:h).map((function(ut){var Xe;return Xe=ut[0],Array.isArray(Xe)?"("+Xe.map(Ot).join(", ")+")":"("+Ot(Xe.type)+"...)"})).join(" | "),Ue=[],ot=1;ot<e.length;ot++){var $e=t.parse(e[ot],1+Ue.length);if(!$e)return null;Ue.push(Ot($e.type))}t.error("Expected arguments of type "+De+", but found ("+Ue.join(", ")+") instead.")}return null},vn.register=function(e,t){for(var r in vn.definitions=t,t)e[r]=vn};var bi=function(e,t,r){this.type=Pt,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t};function En(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 yo(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function Pc(e,t){var r=(180+e[0])/360,s=(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(s*l*8192)]}function Mc(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 Ks(e,t){for(var r,s,l,c,h,y,b,I=!1,C=0,P=t.length;C<P;C++)for(var D=t[C],N=0,X=D.length;N<X-1;N++){if((c=(r=e)[0]-(s=D[N])[0])*(b=r[1]-(l=D[N+1])[1])-(y=r[0]-l[0])*(h=r[1]-s[1])==0&&c*y<=0&&h*b<=0)return!1;Mc(e,D[N],D[N+1])&&(I=!I)}return I}function kc(e,t){for(var r=0;r<t.length;r++)if(Ks(e,t[r]))return!0;return!1}function el(e,t,r,s){var l=s[0]-r[0],c=s[1]-r[1],h=(e[0]-r[0])*c-l*(e[1]-r[1]),y=(t[0]-r[0])*c-l*(t[1]-r[1]);return h>0&&y<0||h<0&&y>0}function Rc(e,t,r){for(var s=0,l=r;s<l.length;s+=1)for(var c=l[s],h=0;h<c.length-1;++h)if((P=[(C=c[h+1])[0]-(I=c[h])[0],C[1]-I[1]])[0]*(D=[(b=t)[0]-(y=e)[0],b[1]-y[1]])[1]-P[1]*D[0]!=0&&el(y,b,I,C)&&el(I,C,y,b))return!0;var y,b,I,C,P,D;return!1}function tl(e,t){for(var r=0;r<e.length;++r)if(!Ks(e[r],t))return!1;for(var s=0;s<e.length-1;++s)if(Rc(e[s],e[s+1],t))return!1;return!0}function rl(e,t){for(var r=0;r<t.length;r++)if(tl(e,t[r]))return!0;return!1}function $o(e,t,r){for(var s=[],l=0;l<e.length;l++){for(var c=[],h=0;h<e[l].length;h++){var y=Pc(e[l][h],r);En(t,y),c.push(y)}s.push(c)}return s}function Js(e,t,r){for(var s=[],l=0;l<e.length;l++){var c=$o(e[l],t,r);s.push(c)}return s}function ya(e,t,r,s){if(e[0]<r[0]||e[0]>r[2]){var l=.5*s,c=e[0]-r[0]>l?-s:r[0]-e[0]>l?s:0;c===0&&(c=e[0]-r[2]>l?-s:r[2]-e[0]>l?s:0),e[0]+=c}En(t,e)}function nl(e,t,r,s){for(var l=8192*Math.pow(2,s.z),c=[8192*s.x,8192*s.y],h=[],y=0,b=e;y<b.length;y+=1)for(var I=0,C=b[y];I<C.length;I+=1){var P=C[I],D=[P.x+c[0],P.y+c[1]];ya(D,t,r,l),h.push(D)}return h}function Xa(e,t,r,s){for(var l,c=8192*Math.pow(2,s.z),h=[8192*s.x,8192*s.y],y=[],b=0,I=e;b<I.length;b+=1){for(var C=[],P=0,D=I[b];P<D.length;P+=1){var N=D[P],X=[N.x+h[0],N.y+h[1]];En(t,X),C.push(X)}y.push(C)}if(t[2]-t[0]<=c/2){(l=t)[0]=l[1]=1/0,l[2]=l[3]=-1/0;for(var H=0,ne=y;H<ne.length;H+=1)for(var ee=0,le=ne[H];ee<le.length;ee+=1)ya(le[ee],t,r,c)}return y}bi.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 s=t.parse(r["case-sensitive"]!==void 0&&r["case-sensitive"],1,qe);if(!s)return null;var l=t.parse(r["diacritic-sensitive"]!==void 0&&r["diacritic-sensitive"],1,qe);if(!l)return null;var c=null;return r.locale&&!(c=t.parse(r.locale,1,We))?null:new bi(s,l,c)},bi.prototype.evaluate=function(e){return new zn(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},bi.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},bi.prototype.outputDefined=function(){return!1},bi.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 oi=function(e,t){this.type=qe,this.geojson=e,this.geometries=t};function ji(e){if(e instanceof vn&&(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 oi)return!1;var t=!0;return e.eachChild((function(r){t&&!ji(r)&&(t=!1)})),t}function Gi(e){if(e instanceof vn&&e.name==="feature-state")return!1;var t=!0;return e.eachChild((function(r){t&&!Gi(r)&&(t=!1)})),t}function mo(e,t){if(e instanceof vn&&t.indexOf(e.name)>=0)return!1;var r=!0;return e.eachChild((function(s){r&&!mo(s,t)&&(r=!1)})),r}oi.parse=function(e,t){if(e.length!==2)return t.error("'within' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(fa(e[1])){var r=e[1];if(r.type==="FeatureCollection")for(var s=0;s<r.features.length;++s){var l=r.features[s].geometry.type;if(l==="Polygon"||l==="MultiPolygon")return new oi(r,r.features[s].geometry)}else if(r.type==="Feature"){var c=r.geometry.type;if(c==="Polygon"||c==="MultiPolygon")return new oi(r,r.geometry)}else if(r.type==="Polygon"||r.type==="MultiPolygon")return new oi(r,r)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")},oi.prototype.evaluate=function(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return(function(t,r){var s=[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=$o(r.coordinates,l,c),y=nl(t.geometry(),s,l,c);if(!yo(s,l))return!1;for(var b=0,I=y;b<I.length;b+=1)if(!Ks(I[b],h))return!1}if(r.type==="MultiPolygon"){var C=Js(r.coordinates,l,c),P=nl(t.geometry(),s,l,c);if(!yo(s,l))return!1;for(var D=0,N=P;D<N.length;D+=1)if(!kc(N[D],C))return!1}return!0})(e,this.geometries);if(e.geometryType()==="LineString")return(function(t,r){var s=[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=$o(r.coordinates,l,c),y=Xa(t.geometry(),s,l,c);if(!yo(s,l))return!1;for(var b=0,I=y;b<I.length;b+=1)if(!tl(I[b],h))return!1}if(r.type==="MultiPolygon"){var C=Js(r.coordinates,l,c),P=Xa(t.geometry(),s,l,c);if(!yo(s,l))return!1;for(var D=0,N=P;D<N.length;D+=1)if(!rl(N[D],C))return!1}return!0})(e,this.geometries)}return!1},oi.prototype.eachChild=function(){},oi.prototype.outputDefined=function(){return!0},oi.prototype.serialize=function(){return["within",this.geojson]};var $i=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};
1$i.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 $i(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)},$i.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},$i.prototype.eachChild=function(){},$i.prototype.outputDefined=function(){return!1},$i.prototype.serialize=function(){return["var",this.name]};var Zi=function(e,t,r,s,l){t===void 0&&(t=[]),s===void 0&&(s=new Qe),l===void 0&&(l=[]),this.registry=e,this.path=t,this.key=t.map((function(c){return"["+c+"]"})).join(""),this.scope=s,this.errors=l,this.expectedType=r};function Ha(e,t){for(var r,s=e.length-1,l=0,c=s,h=0;l<=c;)if((r=e[h=Math.floor((l+c)/2)])<=t){if(h===s||t<e[h+1])return h;l=h+1}else{if(!(r>t))throw new un("Input is not a number.");c=h-1}return 0}Zi.prototype.parse=function(e,t,r,s,l){return l===void 0&&(l={}),t?this.concat(t,r,s)._parse(e,l):this._parse(e,l)},Zi.prototype._parse=function(e,t){function r(I,C,P){return P==="assert"?new vr(C,[I]):P==="coerce"?new ii(C,[I]):I}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 s=e[0];if(typeof s!="string")return this.error("Expression name must be a string, but found "+typeof s+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var l=this.registry[s];if(l){var c=l.parse(e,this);if(!c)return null;if(this.expectedType){var h=this.expectedType,y=c.type;if(h.kind!=="string"&&h.kind!=="number"&&h.kind!=="boolean"&&h.kind!=="object"&&h.kind!=="array"||y.kind!=="value")if(h.kind!=="color"&&h.kind!=="formatted"&&h.kind!=="resolvedImage"||y.kind!=="value"&&y.kind!=="string"){if(this.checkSubtype(h,y))return null}else c=r(c,h,t.typeAnnotation||"coerce");else c=r(c,h,t.typeAnnotation||"assert")}if(!(c instanceof In)&&c.type.kind!=="resolvedImage"&&(function I(C){if(C instanceof $i)return I(C.boundExpression);if(C instanceof vn&&C.name==="error"||C instanceof bi||C instanceof oi)return!1;var P=C instanceof ii||C instanceof vr,D=!0;return C.eachChild((function(N){D=P?D&&I(N):D&&N instanceof In})),!!D&&ji(C)&&mo(C,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])})(c)){var b=new Ri;try{c=new In(c.type,c.evaluate(b))}catch(I){return this.error(I.message),null}}return c}return this.error('Unknown expression "'+s+'". 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.")},Zi.prototype.concat=function(e,t,r){var s=typeof e=="number"?this.path.concat(e):this.path,l=r?this.scope.concat(r):this.scope;return new Zi(this.registry,s,t||null,l,this.errors)},Zi.prototype.error=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var s=""+this.key+t.map((function(l){return"["+l+"]"})).join("");this.errors.push(new ke(s,e))},Zi.prototype.checkSubtype=function(e,t){var r=Jt(e,t);return r&&this.error(r),r};var qn=function(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var s=0,l=r;s<l.length;s+=1){var c=l[s],h=c[1];this.labels.push(c[0]),this.outputs.push(h)}};function jr(e,t,r){return e*(1-r)+t*r}qn.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,Ee);if(!r)return null;var s=[],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],y=e[c+1],b=c,I=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.',b);if(s.length&&s[s.length-1][0]>=h)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',b);var C=t.parse(y,I,l);if(!C)return null;l=l||C.type,s.push([h,C])}return new qn(l,r,s)},qn.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(t.length===1)return r[0].evaluate(e);var s=this.input.evaluate(e);if(s<=t[0])return r[0].evaluate(e);var l=t.length;return s>=t[l-1]?r[l-1].evaluate(e):r[Ha(t,s)].evaluate(e)},qn.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t<r.length;t+=1)e(r[t])},qn.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))},qn.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 Zo=Object.freeze({__proto__:null,number:jr,color:function(e,t,r){return new $t(jr(e.r,t.r,r),jr(e.g,t.g,r),jr(e.b,t.b,r),jr(e.a,t.a,r))},array:function(e,t,r){return e.map((function(s,l){return jr(s,t[l],r)}))}}),il=6/29*3*(6/29),zc=Math.PI/180,Lc=180/Math.PI;function Ys(e){return e>.008856451679035631?Math.pow(e,1/3):e/il+4/29}function Qs(e){return e>6/29?e*e*e:il*(e-4/29)}
1function eu(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function tu(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ol(e){var t=tu(e.r),r=tu(e.g),s=tu(e.b),l=Ys((.4124564*t+.3575761*r+.1804375*s)/.95047),c=Ys((.2126729*t+.7151522*r+.072175*s)/1);return{l:116*c-16,a:500*(l-c),b:200*(c-Ys((.0193339*t+.119192*r+.9503041*s)/1.08883)),alpha:e.a}}function al(e){var t=(e.l+16)/116,r=isNaN(e.a)?t:t+e.a/500,s=isNaN(e.b)?t:t-e.b/200;return t=1*Qs(t),r=.95047*Qs(r),s=1.08883*Qs(s),new $t(eu(3.2404542*r-1.5371385*t-.4985314*s),eu(-.969266*r+1.8760108*t+.041556*s),eu(.0556434*r-.2040259*t+1.0572252*s),e.alpha)}function Dc(e,t,r){var s=t-e;return e+r*(s>180||s<-180?s-360*Math.round(s/360):s)}var ma={forward:ol,reverse:al,interpolate:function(e,t,r){return{l:jr(e.l,t.l,r),a:jr(e.a,t.a,r),b:jr(e.b,t.b,r),alpha:jr(e.alpha,t.alpha,r)}}},va={forward:function(e){var t=ol(e),r=t.l,s=t.a,l=t.b,c=Math.atan2(l,s)*Lc;return{h:c<0?c+360:c,c:Math.sqrt(s*s+l*l),l:r,alpha:e.a}},reverse:function(e){var t=e.h*zc,r=e.c;return al({l:e.l,a:Math.cos(t)*r,b:Math.sin(t)*r,alpha:e.alpha})},interpolate:function(e,t,r){return{h:Dc(e.h,t.h,r),c:jr(e.c,t.c,r),l:jr(e.l,t.l,r),alpha:jr(e.alpha,t.alpha,r)}}},sl=Object.freeze({__proto__:null,lab:ma,hcl:va}),gn=function(e,t,r,s,l){this.type=e,this.operator=t,this.interpolation=r,this.input=s,this.labels=[],this.outputs=[];for(var c=0,h=l;c<h.length;c+=1){var y=h[c],b=y[1];this.labels.push(y[0]),this.outputs.push(b)}};function ru(e,t,r,s){var l=s-r,c=e-r;return l===0?0:t===1?c/l:(Math.pow(t,c)-1)/(Math.pow(t,l)-1)}gn.interpolationFactor=function(e,t,r,s){var l=0;if(e.name==="exponential")l=ru(t,e.base,r,s);else if(e.name==="linear")l=ru(t,1,r,s);else if(e.name==="cubic-bezier"){var c=e.controlPoints;l=new w(c[0],c[1],c[2],c[3]).solve(ru(t,1,r,s))}return l},gn.parse=function(e,t){var r=e[0],s=e[1],l=e[2],c=e.slice(3);if(!Array.isArray(s)||s.length===0)return t.error("Expected an interpolation type expression.",1);if(s[0]==="linear")s={name:"linear"};else if(s[0]==="exponential"){var h=s[1];if(typeof h!="number")return t.error("Exponential interpolation requires a numeric base.",1,1);s={name:"exponential",base:h}}else{if(s[0]!=="cubic-bezier")return t.error("Unknown interpolation type "+String(s[0]),1,0);var y=s.slice(1);if(y.length!==4||y.some((function(ne){return typeof ne!="number"||ne<0||ne>1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);s={name:"cubic-bezier",controlPoints:y}}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,Ee)))return null;var b=[],I=null;r==="interpolate-hcl"||r==="interpolate-lab"?I=Ne:t.expectedType&&t.expectedType.kind!=="value"&&(I=t.expectedType);for(var C=0;C<c.length;C+=2){var P=c[C],D=c[C+1],N=C+3,X=C+4;if(typeof P!="number")return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',N);if(b.length&&b[b.length-1][0]>=P)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',N);var H=t.parse(D,X,I);if(!H)return null;I=I||H.type,b.push([P,H])}return I.kind==="number"||I.kind==="color"||I.kind==="array"&&I.itemType.kind==="number"&&typeof I.N=="number"?new gn(I,r,s,l,b):t.error("Type "+Ot(I)+" is not interpolatable.")},gn.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(t.length===1)return r[0].evaluate(e);var s=this.input.evaluate(e);if(s<=t[0])return r[0].evaluate(e);var l=t.length;if(s>=t[l-1])return r[l-1].evaluate(e);var c=Ha(t,s),h=gn.interpolationFactor(this.interpolation,s,t[c],t[c+1]),y=r[c].evaluate(e),b=r[c+1].evaluate(e);return this.operator==="interpolate"?Zo[this.type.kind.toLowerCase()](y,b,h):this.operator==="interpolate-hcl"?va.reverse(va.interpolate(va.forward(y),va.forward(b),h)):ma.reverse(ma.interpolate(ma.forward(y),ma.forward(b),h))},gn.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t<r.length;t+=1)e(r[t])},gn.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))},gn.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;
1r++)t.push(this.labels[r],this.outputs[r].serialize());return t};var Wi=function(e,t){this.type=e,this.args=t};Wi.parse=function(e,t){if(e.length<2)return t.error("Expectected at least one argument.");var r=null,s=t.expectedType;s&&s.kind!=="value"&&(r=s);for(var l=[],c=0,h=e.slice(1);c<h.length;c+=1){var y=t.parse(h[c],1+l.length,r,void 0,{typeAnnotation:"omit"});if(!y)return null;r=r||y.type,l.push(y)}var b=s&&l.some((function(I){return Jt(s,I.type)}));return new Wi(b?Ge:r,l)},Wi.prototype.evaluate=function(e){for(var t,r=null,s=0,l=0,c=this.args;l<c.length&&(s++,(r=c[l].evaluate(e))&&r instanceof Ln&&!r.available&&(t||(t=r.name),r=null,s===this.args.length&&(r=t)),r===null);l+=1);return r},Wi.prototype.eachChild=function(e){this.args.forEach(e)},Wi.prototype.outputDefined=function(){return this.args.every((function(e){return e.outputDefined()}))},Wi.prototype.serialize=function(){var e=["coalesce"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Xi=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};Xi.prototype.evaluate=function(e){return this.result.evaluate(e)},Xi.prototype.eachChild=function(e){for(var t=0,r=this.bindings;t<r.length;t+=1)e(r[t][1]);e(this.result)},Xi.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=[],s=1;s<e.length-1;s+=2){var l=e[s];if(typeof l!="string")return t.error("Expected string, but found "+typeof l+" instead.",s);if(/[^a-zA-Z0-9_]/.test(l))return t.error("Variable names must contain only alphanumeric characters or '_'.",s);var c=t.parse(e[s+1],s+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 Xi(r,h):null},Xi.prototype.outputDefined=function(){return this.result.outputDefined()},Xi.prototype.serialize=function(){for(var e=["let"],t=0,r=this.bindings;t<r.length;t+=1){var s=r[t];e.push(s[0],s[1].serialize())}return e.push(this.result.serialize()),e};var vo=function(e,t,r){this.type=e,this.index=t,this.input=r};vo.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,Ee),s=t.parse(e[2],2,Gt(t.expectedType||Ge));return r&&s?new vo(s.type.itemType,r,s):null},vo.prototype.evaluate=function(e){var t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new un("Array index out of bounds: "+t+" < 0.");if(t>=r.length)throw new un("Array index out of bounds: "+t+" > "+(r.length-1)+".");if(t!==Math.floor(t))throw new un("Array index must be an integer, but found "+t+" instead.");return r[t]},vo.prototype.eachChild=function(e){e(this.index),e(this.input)},vo.prototype.outputDefined=function(){return!1},vo.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var go=function(e,t){this.type=qe,this.needle=e,this.haystack=t};go.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),s=t.parse(e[2],2,Ge);return r&&s?Lr(r.type,[qe,We,Ee,He,Ge])?new go(r,s):t.error("Expected first argument to be of type boolean, string, number or null, but found "+Ot(r.type)+" instead"):null},go.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!nr(t,["boolean","string","number","null"]))throw new un("Expected first argument to be of type boolean, string, number or null, but found "+Ot(Dr(t))+" instead.");if(!nr(r,["string","array"]))throw new un("Expected second argument to be of type array or string, but found "+Ot(Dr(r))+" instead.");return r.indexOf(t)>=0},go.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},go.prototype.outputDefined=function(){return!0},go.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Hi=function(e,t,r){this.type=Ee,this.needle=e,this.haystack=t,this.fromIndex=r};Hi.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),s=t.parse(e[2],2,Ge);if(!r||!s)return null;if(!Lr(r.type,[qe,We,Ee,He,Ge]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+Ot(r.type)+" instead");if(e.length===4){var l=t.parse(e[3],3,Ee);return l?new Hi(r,s,l):null}return new Hi(r,s)},Hi.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!nr(t,["boolean","string","number","null"]))throw new un("Expected first argument to be of type boolean, string, number or null, but found "+Ot(Dr(t))+" instead.");if(!nr(r,["string","array"]))throw new un("Expected second argument to be of type array or string, but found "+Ot(Dr(r))+" instead.");if(this.fromIndex){var s=this.fromIndex.evaluate(e);return r.indexOf(t,s)}return r.indexOf(t)},Hi.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)},Hi.prototype.outputDefined=function(){return!1},Hi.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 _o=function(e,t,r,s,l,c){this.inputType=e,this.type=t,this.input=r,this.cases=s,this.outputs=l,this.otherwise=c};_o.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,s;t.expectedType&&t.expectedType.kind!=="value"&&(s=t.expectedType);for(var l={},c=[],h=2;h<e.length-1;h+=2){var y=e[h],b=e[h+1];Array.isArray(y)||(y=[y]);var I=t.concat(h);if(y.length===0)return I.error("Expected at least one branch label.");for(var C=0,P=y;C<P.length;C+=1){var D=P[C];if(typeof D!="number"&&typeof D!="string")return I.error("Branch labels must be numbers or strings.");if(typeof D=="number"&&Math.abs(D)>Number.MAX_SAFE_INTEGER)return I.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof D=="number"&&Math.floor(D)!==D)return I.error("Numeric branch labels must be integer values.");if(r){if(I.checkSubtype(r,Dr(D)))return null}
1else r=Dr(D);if(l[String(D)]!==void 0)return I.error("Branch labels must be unique.");l[String(D)]=c.length}var N=t.parse(b,h,s);if(!N)return null;s=s||N.type,c.push(N)}var X=t.parse(e[1],1,Ge);if(!X)return null;var H=t.parse(e[e.length-1],e.length-1,s);return H?X.type.kind!=="value"&&t.concat(1).checkSubtype(r,X.type)?null:new _o(r,s,X,l,c,H):null},_o.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(Dr(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},_o.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},_o.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))&&this.otherwise.outputDefined()},_o.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],r=[],s={},l=0,c=Object.keys(this.cases).sort();l<c.length;l+=1){var h=c[l];(P=s[this.cases[h]])===void 0?(s[this.cases[h]]=r.length,r.push([this.cases[h],[h]])):r[P][1].push(h)}for(var y=function(N){return e.inputType.kind==="number"?Number(N):N},b=0,I=r;b<I.length;b+=1){var C=I[b],P=C[0],D=C[1];t.push(D.length===1?y(D[0]):D.map(y)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var xo=function(e,t,r){this.type=e,this.branches=t,this.otherwise=r};xo.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 s=[],l=1;l<e.length-1;l+=2){var c=t.parse(e[l],l,qe);if(!c)return null;var h=t.parse(e[l+1],l+1,r);if(!h)return null;s.push([c,h]),r=r||h.type}var y=t.parse(e[e.length-1],e.length-1,r);return y?new xo(r,s,y):null},xo.prototype.evaluate=function(e){for(var t=0,r=this.branches;t<r.length;t+=1){var s=r[t],l=s[1];if(s[0].evaluate(e))return l.evaluate(e)}return this.otherwise.evaluate(e)},xo.prototype.eachChild=function(e){for(var t=0,r=this.branches;t<r.length;t+=1){var s=r[t],l=s[1];e(s[0]),e(l)}e(this.otherwise)},xo.prototype.outputDefined=function(){return this.branches.every((function(e){return e[1].outputDefined()}))&&this.otherwise.outputDefined()},xo.prototype.serialize=function(){var e=["case"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Ki=function(e,t,r,s){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=s};function ul(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 ll(e,t,r,s){return s.compare(t,r)===0}function sr(e,t,r){var s=e!=="=="&&e!=="!=";return(function(){function l(c,h,y){this.type=qe,this.lhs=c,this.rhs=h,this.collator=y,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 y=c[0],b=h.parse(c[1],1,Ge);if(!b)return null;if(!ul(y,b.type))return h.concat(1).error('"'+y+`" comparisons are not supported for type '`+Ot(b.type)+"'.");var I=h.parse(c[2],2,Ge);if(!I)return null;if(!ul(y,I.type))return h.concat(2).error('"'+y+`" comparisons are not supported for type '`+Ot(I.type)+"'.");if(b.type.kind!==I.type.kind&&b.type.kind!=="value"&&I.type.kind!=="value")return h.error("Cannot compare types '"+Ot(b.type)+"' and '"+Ot(I.type)+"'.");s&&(b.type.kind==="value"&&I.type.kind!=="value"?b=new vr(I.type,[b]):b.type.kind!=="value"&&I.type.kind==="value"&&(I=new vr(b.type,[I])));var C=null;if(c.length===4){if(b.type.kind!=="string"&&I.type.kind!=="string"&&b.type.kind!=="value"&&I.type.kind!=="value")return h.error("Cannot use collator to compare non-string types.");if(!(C=h.parse(c[3],3,Pt)))return null}return new l(b,I,C)},l.prototype.evaluate=function(c){var h=this.lhs.evaluate(c),y=this.rhs.evaluate(c);if(s&&this.hasUntypedArgument){var b=Dr(h),I=Dr(y);if(b.kind!==I.kind||b.kind!=="string"&&b.kind!=="number")throw new un('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+b.kind+", "+I.kind+") instead.")}if(this.collator&&!s&&this.hasUntypedArgument){var C=Dr(h),P=Dr(y);if(C.kind!=="string"||P.kind!=="string")return t(c,h,y)}return this.collator?r(c,h,y,this.collator.evaluate(c)):t(c,h,y)},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})()}Ki.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),s=t.parse(e[2],2,Ee);if(!r||!s)return null;if(!Lr(r.type,[Gt(Ge),We,Ge]))return t.error("Expected first argument to be of type array or string, but found "+Ot(r.type)+" instead");if(e.length===4){var l=t.parse(e[3],3,Ee);return l?new Ki(r.type,r,s,l):null}return new Ki(r.type,r,s)},Ki.prototype.evaluate=function(e){var t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!nr(t,["string","array"]))throw new un("Expected first argument to be of type array or string, but found "+Ot(Dr(t))+" instead.");if(this.endIndex){var s=this.endIndex.evaluate(e);return t.slice(r,s)}return t.slice(r)},Ki.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)},Ki.prototype.outputDefined=function(){return!1},Ki.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 Oc=sr("==",(function(e,t,r){return t===r}),ll),Ka=sr("!=",(function(e,t,r){return t!==r}),(function(e,t,r,s){return!ll(0,t,r,s)})),cl=sr("<",(function(e,t,r){return t<r}),(function(e,t,r,s){return s.compare(t,r)<0})),pl=sr(">",(function(e,t,r){return t>r}),(function(e,t,r,s){return s.compare(t,r)>0})),hl=sr("<=",(function(e,t,r){return t<=r}),(function(e,t,r,s){return s.compare(t,r)<=0})),fl=sr(">=",(function(e,t,r){return t>=r}),(function(e,t,r,s){return s.compare(t,r)>=0})),bo=function(e,t,r,s,l){this.type=We,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=s,this.maxFractionDigits=l};bo.parse=function(e,t){if(e.length!==3)return t.error("Expected two arguments.");var r=t.parse(e[1],1,Ee);if(!r)return null;var s=e[2];if(typeof s!="object"||Array.isArray(s))return t.error("NumberFormat options argument must be an object.");var l=null;if(s.locale&&!(l=t.parse(s.locale,1,We)))return null;var c=null;if(s.currency&&!(c=t.parse(s.currency,1,We)))return null;var h=null;if(s["min-fraction-digits"]&&!(h=t.parse(s["min-fraction-digits"],1,Ee)))return null;var y=null;return s["max-fraction-digits"]&&!(y=t.parse(s["max-fraction-digits"],1,Ee))?null:new bo(r,l,c,h,y)},bo.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))},bo.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)},bo.prototype.outputDefined=function(){return!1},bo.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 Ji=function(e){this.type=Ee,this.input=e};Ji.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 "+Ot(r.type)+" instead."):new Ji(r):null},Ji.prototype.evaluate=function(e){var t=this.input.evaluate(e);if(typeof t=="string"||Array.isArray(t))return t.length;throw new un("Expected value to be of type string or array, but found "+Ot(Dr(t))+" instead.")},Ji.prototype.eachChild=function(e){e(this.input)},Ji.prototype.outputDefined=function(){return!1},Ji.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var wo={"==":Oc,"!=":Ka,">":pl,"<":cl,">=":fl,"<=":hl,array:vr,at:vo,boolean:vr,case:xo,coalesce:Wi,collator:bi,format:di,image:Kn,in:go,"index-of":Hi,interpolate:gn,"interpolate-hcl":gn,"interpolate-lab":gn,length:Ji,let:Xi,literal:In,match:_o,number:vr,"number-format":bo,object:vr,slice
1:Ki,step:qn,string:vr,"to-boolean":ii,"to-color":ii,"to-number":ii,"to-string":ii,var:$i,within:oi};function dl(e,t){var r=t[0],s=t[1],l=t[2],c=t[3];r=r.evaluate(e),s=s.evaluate(e),l=l.evaluate(e);var h=c?c.evaluate(e):1,y=Hs(r,s,l,h);if(y)throw new un(y);return new $t(r/255*h,s/255*h,l/255*h,h)}function yl(e,t){return e in t}function nu(e,t){var r=t[e];return r===void 0?null:r}function So(e){return{type:e}}function ml(e){return{result:"success",value:e}}function To(e){return{result:"error",value:e}}function Io(e){return e["property-type"]==="data-driven"||e["property-type"]==="cross-faded-data-driven"}function vl(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function ga(e){return!!e.expression&&e.expression.interpolated}function pr(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":e===null?"null":typeof e}function Ja(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Bc(e){return e}function Wo(e,t,r){return e!==void 0?e:t!==void 0?t:r!==void 0?r:void 0}function gl(e,t,r,s,l){return Wo(typeof r===l?s[r]:void 0,e.default,t.default)}function Fc(e,t,r){if(pr(r)!=="number")return Wo(e.default,t.default);var s=e.stops.length;if(s===1||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[s-1][0])return e.stops[s-1][1];var l=Ha(e.stops.map((function(c){return c[0]})),r);return e.stops[l][1]}function _l(e,t,r){var s=e.base!==void 0?e.base:1;if(pr(r)!=="number")return Wo(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=Ha(e.stops.map((function(P){return P[0]})),r),h=(function(P,D,N,X){var H=X-N,ne=P-N;return H===0?0:D===1?ne/H:(Math.pow(D,ne)-1)/(Math.pow(D,H)-1)})(r,s,e.stops[c][0],e.stops[c+1][0]),y=e.stops[c][1],b=e.stops[c+1][1],I=Zo[t.type]||Bc;if(e.colorSpace&&e.colorSpace!=="rgb"){var C=sl[e.colorSpace];I=function(P,D){return C.reverse(C.interpolate(C.forward(P),C.forward(D),h))}}return typeof y.evaluate=="function"?{evaluate:function(){for(var P=[],D=arguments.length;D--;)P[D]=arguments[D];var N=y.evaluate.apply(void 0,P),X=b.evaluate.apply(void 0,P);if(N!==void 0&&X!==void 0)return I(N,X,h)}}:I(y,b,h)}function Ya(e,t,r){return t.type==="color"?r=$t.parse(r):t.type==="formatted"?r=sn.fromString(r.toString()):t.type==="resolvedImage"?r=Ln.fromString(r.toString()):pr(r)===t.type||t.type==="enum"&&t.values[r]||(r=void 0),Wo(r,e.default,t.default)}vn.register(wo,{error:[{kind:"error"},[We],function(e,t){throw new un(t[0].evaluate(e))}],typeof:[We,[Ge],function(e,t){return Ot(Dr(t[0].evaluate(e)))}],"to-rgba":[Gt(Ee,4),[Ne],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[Ne,[Ee,Ee,Ee],dl],rgba:[Ne,[Ee,Ee,Ee,Ee],dl],has:{type:qe,overloads:[[[We],function(e,t){return yl(t[0].evaluate(e),e.properties())}],[[We,xt],function(e,t){var r=t[1];return yl(t[0].evaluate(e),r.evaluate(e))}]]},get:{type:Ge,overloads:[[[We],function(e,t){return nu(t[0].evaluate(e),e.properties())}],[[We,xt],function(e,t){var r=t[1];return nu(t[0].evaluate(e),r.evaluate(e))}]]},"feature-state":[Ge,[We],function(e,t){return nu(t[0].evaluate(e),e.featureState||{})}],properties:[xt,[],function(e){return e.properties()}],"geometry-type":[We,[],function(e){return e.geometryType()}],id:[Ge,[],function(e){return e.id()}],zoom:[Ee,[],function(e){return e.globals.zoom}],"heatmap-density":[Ee,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[Ee,[],function(e){return e.globals.lineProgress||0}],accumulated:[Ge,[],function(e){return e.globals.accumulated===void 0?null:e.globals.accumulated}],"+":[Ee,So(Ee),function(e,t){for(var r=0,s=0,l=t;s<l.length;s+=1)r+=l[s].evaluate(e);return r}],"*":[Ee,So(Ee),function(e,t){for(var r=1,s=0,l=t;s<l.length;s+=1)r*=l[s].evaluate(e);return r}],"-":{type:Ee,overloads:[[[Ee,Ee],function(e,t){var r=t[1];return t[0].evaluate(e)-r.evaluate(e)}],[[Ee],function(e,t){return-t[0].evaluate(e)}]]},"/":[Ee,[Ee,Ee],function(e,t){var r=t[1];return t[0].evaluate(e)/r.evaluate(e)}],"%":[Ee,[Ee,Ee],function(e,t){var r=t[1];return t[0].evaluate(e)%r.evaluate(e)}],ln2:[Ee,[],function(){return Math.LN2}],pi:[Ee,[],function(){return Math.PI}],e:[Ee,[],function(){return Math.E}],"^":[Ee,[Ee,Ee],function(e,t){var r=t[1];return Math.pow(t[0].evaluate(e),r.evaluate(e))}],sqrt:[Ee,[Ee],function(e,t){return Math.sqrt(t[0].evaluate(e))}],log10:[Ee,[Ee],function(e,t){return Math.log(t[0].evaluate(e))/Math.LN10}],ln:[Ee,[Ee],function(e,t){return Math.log(t[0].evaluate(e))}],log2:[Ee,[Ee],function(e,t){return Math.log(t[0].evaluate(e))/Math.LN2}],sin:[Ee,[Ee],function(e,t){return Math.sin(t[0].evaluate(e))}],cos:[Ee,[Ee],function(e,t){return Math.cos(t[0].evaluate(e))}],tan:[Ee,[Ee],function(e,t){return Math.tan(t[0].evaluate(e))}],asin:[Ee,[Ee],function(e,t){return Math.asin(t[0].evaluate(e))}],acos:[Ee,[Ee],function(e,t){return Math.acos(t[0].evaluate(e))}],atan:[Ee,[Ee],function(e,t){return Math.atan(t[0].evaluate(e))}],min:[Ee,So(Ee),function(e,t){return Math.min.apply(Math,t.map((function(r){return r.evaluate(e)})))}],max:[Ee,So(Ee),function(e,t){return Math.max.apply(Math,t.map((function(r){return r.evaluate(e)})))}],abs:[Ee,[Ee],function(e,t){return Math.abs(t[0].evaluate(e))}],round:[Ee,[Ee],function(e,t){var r=t[0].evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[Ee,[Ee],function(e,t){return Math.floor(t[0].evaluate(e))}],ceil:[Ee,[Ee],function(e,t){return Math.ceil(t[0].evaluate(e))}],"filter-==":[qe,[We,Ge],function(e,t){var r=t[0],s=t[1];return e.properties()[r.value]===s.value}],"filter-id-==":[qe,[Ge],function(e,t){var r=t[0];return e.id()===r.value}],"filter-type-==":[qe,[We],function(e,t){var r=t[0];return e.geometryType()===r.value}],"filter-<":[qe,[We,Ge],function(e,t){var r=t[0],s=t[1],l=e.properties()[r.value],c=s.value;return typeof l==typeof c&&l<c}],"filter-id-<":[qe,[Ge],function(e,t){var r=t[0],s=e.id(),l=r.value;return typeof s==typeof l&&s<l}],"filter->":[qe,[We,Ge],function(e,t){var r=t[0],s=t[1],l=e.properties()[r.value],c=s.value;return typeof l==typeof c&&l>c}],"filter-id->":[qe,[Ge],function(e,t){var r=t[0],s=e.id(),l=r.value;return typeof s==typeof l&&s>l}],"filter-<=":[qe,[We,Ge],function(e,t){var r=t[0],s=t[1],l=e.properties()[r.value],c=s.value;return typeof l==typeof c&&l<=c}],"filter-id-<=":[qe,[Ge],function(e,t){var r=t[0],s=e.id(),l=r.value;return typeof s==typeof l&&s<=l}],"filter->=":[qe,[We,Ge],function(e,t){var r=t[0],s=t[1],l=e.properties()[r.value],c=s.value;return typeof l==typeof c&&l>=c}],"filter-id->=":[qe,[Ge],function(e,t){var r=t[0],s=e.id(),l=r.value;return typeof s==typeof l&&s>=l}],"filter-has":[qe,[Ge],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[qe,[],function(e){return e.id()!==null&&e.id()!==void 0}],"filter-type-in":[qe,[Gt(We)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[qe,[Gt(Ge)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[qe,[We,Gt(Ge)],function(e,t){var r=t[0];return t[1].value.indexOf(e.properties()[r.value])>=0}],"filter-in-large":[qe,[We,Gt(Ge)],function(e,t){var r=t[0],s=t[1];return(function(l,c,h,y){for(;h<=y;){var b=h+y>>1;
1if(c[b]===l)return!0;c[b]>l?y=b-1:h=b+1}return!1})(e.properties()[r.value],s.value,0,s.value.length-1)}],all:{type:qe,overloads:[[[qe,qe],function(e,t){var r=t[1];return t[0].evaluate(e)&&r.evaluate(e)}],[So(qe),function(e,t){for(var r=0,s=t;r<s.length;r+=1)if(!s[r].evaluate(e))return!1;return!0}]]},any:{type:qe,overloads:[[[qe,qe],function(e,t){var r=t[1];return t[0].evaluate(e)||r.evaluate(e)}],[So(qe),function(e,t){for(var r=0,s=t;r<s.length;r+=1)if(s[r].evaluate(e))return!0;return!1}]]},"!":[qe,[qe],function(e,t){return!t[0].evaluate(e)}],"is-supported-script":[qe,[We],function(e,t){var r=e.globals&&e.globals.isSupportedScript;return!r||r(t[0].evaluate(e))}],upcase:[We,[We],function(e,t){return t[0].evaluate(e).toUpperCase()}],downcase:[We,[We],function(e,t){return t[0].evaluate(e).toLowerCase()}],concat:[We,So(Ge),function(e,t){return t.map((function(r){return da(r.evaluate(e))})).join("")}],"resolved-locale":[We,[Pt],function(e,t){return t[0].evaluate(e).resolvedLocale()}]});var Xo=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new Ri,this._defaultValue=t?(function(r){return r.type==="color"&&Ja(r.default)?new $t(0,0,0,0):r.type==="color"?$t.parse(r.default)||null:r.default===void 0?null:r.default})(t):null,this._enumValues=t&&t.type==="enum"?t.values:null};function _a(e){return Array.isArray(e)&&e.length>0&&typeof e[0]=="string"&&e[0]in wo}function Qa(e,t){var r=new Zi(wo,[],t?(function(l){var c={color:Ne,string:We,number:Ee,enum:We,boolean:qe,formatted:ar,resolvedImage:Mt};return l.type==="array"?Gt(c[l.value]||Ge,l.length):c[l.type]})(t):void 0),s=r.parse(e,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return s?ml(new Xo(s,t)):To(r.errors)}Xo.prototype.evaluateWithoutErrorHandling=function(e,t,r,s,l,c){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=s,this._evaluator.availableImages=l||null,this._evaluator.formattedSection=c,this.expression.evaluate(this._evaluator)},Xo.prototype.evaluate=function(e,t,r,s,l,c){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=s,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 un("Expected value to be one of "+Object.keys(this._enumValues).map((function(y){return JSON.stringify(y)})).join(", ")+", but found "+JSON.stringify(h)+" instead.");return h}catch(y){return this._warningHistory[y.message]||(this._warningHistory[y.message]=!0,typeof console<"u"&&console.warn(y.message)),this._defaultValue}};var xa=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent=e!=="constant"&&!Gi(t.expression)};xa.prototype.evaluateWithoutErrorHandling=function(e,t,r,s,l,c){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,s,l,c)},xa.prototype.evaluate=function(e,t,r,s,l,c){return this._styleExpression.evaluate(e,t,r,s,l,c)};var Ho=function(e,t,r,s){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent=e!=="camera"&&!Gi(t.expression),this.interpolationType=s};function xl(e,t){if((e=Qa(e,t)).result==="error")return e;var r=e.value.expression,s=ji(r);if(!s&&!Io(t))return To([new ke("","data expressions not supported")]);var l=mo(r,["zoom"]);if(!l&&!vl(t))return To([new ke("","zoom expressions not supported")]);var c=(function h(y){var b=null;if(y instanceof Xi)b=h(y.result);else if(y instanceof Wi)for(var I=0,C=y.args;I<C.length&&!(b=h(C[I]));I+=1);else(y instanceof qn||y instanceof gn)&&y.input instanceof vn&&y.input.name==="zoom"&&(b=y);return b instanceof ke||y.eachChild((function(P){var D=h(P);D instanceof ke?b=D:!b&&D?b=new ke("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):b&&D&&b!==D&&(b=new ke("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),b})(r);return c||l?c instanceof ke?To([c]):c instanceof gn&&!ga(t)?To([new ke("",'"interpolate" expressions cannot be used with this property')]):ml(c?new Ho(s?"camera":"composite",e.value,c.labels,c instanceof gn?c.interpolation:void 0):new xa(s?"constant":"source",e.value)):To([new ke("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}Ho.prototype.evaluateWithoutErrorHandling=function(e,t,r,s,l,c){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,s,l,c)},Ho.prototype.evaluate=function(e,t,r,s,l,c){return this._styleExpression.evaluate(e,t,r,s,l,c)},Ho.prototype.interpolationFactor=function(e,t,r){return this.interpolationType?gn.interpolationFactor(this.interpolationType,e,t,r):0};var Ko=function(e,t){this._parameters=e,this._specification=t,Pe(this,(function r(s,l){var c,h,y,b=l.type==="color",I=s.stops&&typeof s.stops[0][0]=="object",C=I||
1!(I||s.property!==void 0),P=s.type||(ga(l)?"exponential":"interval");if(b&&((s=Pe({},s)).stops&&(s.stops=s.stops.map((function($e){return[$e[0],$t.parse($e[1])]}))),s.default=$t.parse(s.default?s.default:l.default)),s.colorSpace&&s.colorSpace!=="rgb"&&!sl[s.colorSpace])throw new Error("Unknown color space: "+s.colorSpace);if(P==="exponential")c=_l;else if(P==="interval")c=Fc;else if(P==="categorical"){c=gl,h=Object.create(null);for(var D=0,N=s.stops;D<N.length;D+=1){var X=N[D];h[X[0]]=X[1]}y=typeof s.stops[0][0]}else{if(P!=="identity")throw new Error('Unknown function type "'+P+'"');c=Ya}if(I){for(var H={},ne=[],ee=0;ee<s.stops.length;ee++){var le=s.stops[ee],de=le[0].zoom;H[de]===void 0&&(H[de]={zoom:de,type:s.type,property:s.property,default:s.default,stops:[]},ne.push(de)),H[de].stops.push([le[0].value,le[1]])}for(var ve=[],be=0,Ce=ne;be<Ce.length;be+=1){var De=Ce[be];ve.push([H[De].zoom,r(H[De],l)])}var Ue={name:"linear"};return{kind:"composite",interpolationType:Ue,interpolationFactor:gn.interpolationFactor.bind(void 0,Ue),zoomStops:ve.map((function($e){return $e[0]})),evaluate:function($e,ut){var Xe=$e.zoom;return _l({stops:ve,base:s.base},l,Xe).evaluate(Xe,ut)}}}if(C){var ot=P==="exponential"?{name:"exponential",base:s.base!==void 0?s.base:1}:null;return{kind:"camera",interpolationType:ot,interpolationFactor:gn.interpolationFactor.bind(void 0,ot),zoomStops:s.stops.map((function($e){return $e[0]})),evaluate:function($e){return c(s,l,$e.zoom,h,y)}}}return{kind:"source",evaluate:function($e,ut){var Xe=ut&&ut.properties?ut.properties[s.property]:void 0;return Xe===void 0?Wo(s.default,l.default):c(s,l,Xe,h,y)}}})(this._parameters,this._specification))};function yi(e){var t=e.key,r=e.value,s=e.valueSpec||{},l=e.objectElementValidators||{},c=e.style,h=e.styleSpec,y=[],b=pr(r);if(b!=="object")return[new Q(t,r,"object expected, "+b+" found")];for(var I in r){var C=I.split(".")[0],P=s[C]||s["*"],D=void 0;if(l[C])D=l[C];else if(s[C])D=Dt;else if(l["*"])D=l["*"];else{if(!s["*"]){y.push(new Q(t,r[I],'unknown property "'+I+'"'));continue}D=Dt}y=y.concat(D({key:(t&&t+".")+I,value:r[I],valueSpec:P,style:c,styleSpec:h,object:r,objectKey:I},r))}for(var N in s)l[N]||s[N].required&&s[N].default===void 0&&r[N]===void 0&&y.push(new Q(t,r,'missing required property "'+N+'"'));return y}function bl(e){var t=e.value,r=e.valueSpec,s=e.style,l=e.styleSpec,c=e.key,h=e.arrayElementValidator||Dt;if(pr(t)!=="array")return[new Q(c,t,"array expected, "+pr(t)+" found")];if(r.length&&t.length!==r.length)return[new Q(c,t,"array length "+r.length+" expected, length "+t.length+" found")];if(r["min-length"]&&t.length<r["min-length"])return[new Q(c,t,"array length at least "+r["min-length"]+" expected, length "+t.length+" found")];var y={type:r.value,values:r.values};l.$version<7&&(y.function=r.function),pr(r.value)==="object"&&(y=r.value);for(var b=[],I=0;I<t.length;I++)b=b.concat(h({array:t,arrayIndex:I,value:t[I],valueSpec:y,style:s,styleSpec:l,key:c+"["+I+"]"}));return b}function wl(e){var t=e.key,r=e.value,s=e.valueSpec,l=pr(r);return l==="number"&&r!=r&&(l="NaN"),l!=="number"?[new Q(t,r,"number expected, "+l+" found")]:"minimum"in s&&r<s.minimum?[new Q(t,r,r+" is less than the minimum value "+s.minimum)]:"maximum"in s&&r>s.maximum?[new Q(t,r,r+" is greater than the maximum value "+s.maximum)]:[]}function Sl(e){var t,r,s,l=e.valueSpec,c=Le(e.value.type),h={},y=c!=="categorical"&&e.value.property===void 0,b=!y,I=pr(e.value.stops)==="array"&&pr(e.value.stops[0])==="array"&&pr(e.value.stops[0][0])==="object",C=yi({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(N){if(c==="identity")return[new Q(N.key,N.value,'identity function may not have a "stops" property')];var X=[],H=N.value;return X=X.concat(bl({key:N.key,value:H,valueSpec:N.valueSpec,style:N.style,styleSpec:N.styleSpec,arrayElementValidator:P})),pr(H)==="array"&&H.length===0&&X.push(new Q(N.key,H,"array must have at least one stop")),X},default:function(N){return Dt({key:N.key,value:N.value,valueSpec:l,style:N.style,styleSpec:N.styleSpec})}}});return c==="identity"&&y&&C.push(new Q(e.key,e.value,'missing required property "property"')),c==="identity"||e.value.stops||C.push(new Q(e.key,e.value,'missing required property "stops"')),c==="exponential"&&e.valueSpec.expression&&!ga(e.valueSpec)&&C.push(new Q(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(b&&!Io(e.valueSpec)?C.push(new Q(e.key,e.value,"property functions not supported")):y&&!vl(e.valueSpec)&&C.push(new Q(e.key,e.value,"zoom functions not supported"))),c!=="categorical"&&!I||e.value.property!==void 0||C.push(new Q(e.key,e.value,'"property" property is required')),C;
1function P(N){var X=[],H=N.value,ne=N.key;if(pr(H)!=="array")return[new Q(ne,H,"array expected, "+pr(H)+" found")];if(H.length!==2)return[new Q(ne,H,"array length 2 expected, length "+H.length+" found")];if(I){if(pr(H[0])!=="object")return[new Q(ne,H,"object expected, "+pr(H[0])+" found")];if(H[0].zoom===void 0)return[new Q(ne,H,"object stop key must have zoom")];if(H[0].value===void 0)return[new Q(ne,H,"object stop key must have value")];if(s&&s>Le(H[0].zoom))return[new Q(ne,H[0].zoom,"stop zoom values must appear in ascending order")];Le(H[0].zoom)!==s&&(s=Le(H[0].zoom),r=void 0,h={}),X=X.concat(yi({key:ne+"[0]",value:H[0],valueSpec:{zoom:{}},style:N.style,styleSpec:N.styleSpec,objectElementValidators:{zoom:wl,value:D}}))}else X=X.concat(D({key:ne+"[0]",value:H[0],style:N.style,styleSpec:N.styleSpec},H));return _a(Te(H[1]))?X.concat([new Q(ne+"[1]",H[1],"expressions are not allowed in function stops.")]):X.concat(Dt({key:ne+"[1]",value:H[1],valueSpec:l,style:N.style,styleSpec:N.styleSpec}))}function D(N,X){var H=pr(N.value),ne=Le(N.value),ee=N.value!==null?N.value:X;if(t){if(H!==t)return[new Q(N.key,ee,H+" stop domain type must match previous stop domain type "+t)]}else t=H;if(H!=="number"&&H!=="string"&&H!=="boolean")return[new Q(N.key,ee,"stop domain value must be a number, string, or boolean")];if(H!=="number"&&c!=="categorical"){var le="number expected, "+H+" found";return Io(l)&&c===void 0&&(le+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Q(N.key,ee,le)]}return c!=="categorical"||H!=="number"||isFinite(ne)&&Math.floor(ne)===ne?c!=="categorical"&&H==="number"&&r!==void 0&&ne<r?[new Q(N.key,ee,"stop domain values must appear in ascending order")]:(r=ne,c==="categorical"&&ne in h?[new Q(N.key,ee,"stop domain values must be unique")]:(h[ne]=!0,[])):[new Q(N.key,ee,"integer expected, found "+ne)]}}function Eo(e){var t=(e.expressionContext==="property"?xl:Qa)(Te(e.value),e.valueSpec);if(t.result==="error")return t.value.map((function(s){return new Q(""+e.key+s.key,e.value,s.message)}));var r=t.value.expression||t.value._styleExpression.expression;if(e.expressionContext==="property"&&e.propertyKey==="text-font"&&!r.outputDefined())return[new Q(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"&&!Gi(r))return[new Q(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if(e.expressionContext==="filter"&&!Gi(r))return[new Q(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&e.expressionContext.indexOf("cluster")===0){if(!mo(r,["zoom","feature-state"]))return[new Q(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(e.expressionContext==="cluster-initial"&&!ji(r))return[new Q(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function ba(e){var t=e.key,r=e.value,s=e.valueSpec,l=[];return Array.isArray(s.values)?s.values.indexOf(Le(r))===-1&&l.push(new Q(t,r,"expected one of ["+s.values.join(", ")+"], "+JSON.stringify(r)+" found")):Object.keys(s.values).indexOf(Le(r))===-1&&l.push(new Q(t,r,"expected one of ["+Object.keys(s.values).join(", ")+"], "+JSON.stringify(r)+" found")),l}function es(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 s=r[t];if(!es(s)&&typeof s!="boolean")return!1}return!0;default:return!0}}Ko.deserialize=function(e){return new Ko(e._parameters,e._specification)},Ko.serialize=function(e){return{_parameters:e._parameters,_specification:e._specification}};var iu={type:"boolean",default:!1};function ts(e){if(e==null)return{filter:function(){return!0},needGeometry:!1};es(e)||(e=rs(e));var t=Qa(e,iu);if(t.result==="error")throw new Error(t.value.map((function(r){return r.key+": "+r.message})).join(", "));return{filter:function(r,s,l){return t.value.evaluate(r,s,{},l)},needGeometry:(function r(s){if(!Array.isArray(s))return!1;if(s[0]==="within")return!0;for(var l=1;l<s.length;l++)if(r(s[l]))return!0;return!1})(e)}}function Nc(e,t){return e<t?-1:e>t?1:0}function rs(e){if(!e)return!0;var t,r=e[0];return e.length<=1?r!=="any":r==="=="?ou(e[1],e[2],"=="):r==="!="?ns(ou(e[1],e[2],"==")):r==="<"||r
1===">"||r==="<="||r===">="?ou(e[1],e[2],r):r==="any"?(t=e.slice(1),["any"].concat(t.map(rs))):r==="all"?["all"].concat(e.slice(1).map(rs)):r==="none"?["all"].concat(e.slice(1).map(rs).map(ns)):r==="in"?Tl(e[1],e.slice(2)):r==="!in"?ns(Tl(e[1],e.slice(2))):r==="has"?Il(e[1]):r==="!has"?ns(Il(e[1])):r!=="within"||e}function ou(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 Tl(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(Nc)]]:["filter-in-small",e,["literal",t]]}}function Il(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function ns(e){return["!",e]}function au(e){return es(Te(e.value))?Eo(Pe({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):(function t(r){var s=r.value,l=r.key;if(pr(s)!=="array")return[new Q(l,s,"array expected, "+pr(s)+" found")];var c,h=r.styleSpec,y=[];if(s.length<1)return[new Q(l,s,"filter array must have at least 1 element")];switch(y=y.concat(ba({key:l+"[0]",value:s[0],valueSpec:h.filter_operator,style:r.style,styleSpec:r.styleSpec})),Le(s[0])){case"<":case"<=":case">":case">=":s.length>=2&&Le(s[1])==="$type"&&y.push(new Q(l,s,'"$type" cannot be use with operator "'+s[0]+'"'));case"==":case"!=":s.length!==3&&y.push(new Q(l,s,'filter array for operator "'+s[0]+'" must have 3 elements'));case"in":case"!in":s.length>=2&&(c=pr(s[1]))!=="string"&&y.push(new Q(l+"[1]",s[1],"string expected, "+c+" found"));for(var b=2;b<s.length;b++)c=pr(s[b]),Le(s[1])==="$type"?y=y.concat(ba({key:l+"["+b+"]",value:s[b],valueSpec:h.geometry_type,style:r.style,styleSpec:r.styleSpec})):c!=="string"&&c!=="number"&&c!=="boolean"&&y.push(new Q(l+"["+b+"]",s[b],"string, number, or boolean expected, "+c+" found"));break;case"any":case"all":case"none":for(var I=1;I<s.length;I++)y=y.concat(t({key:l+"["+I+"]",value:s[I],style:r.style,styleSpec:r.styleSpec}));break;case"has":case"!has":c=pr(s[1]),s.length!==2?y.push(new Q(l,s,'filter array for "'+s[0]+'" operator must have 2 elements')):c!=="string"&&y.push(new Q(l+"[1]",s[1],"string expected, "+c+" found"));break;case"within":c=pr(s[1]),s.length!==2?y.push(new Q(l,s,'filter array for "'+s[0]+'" operator must have 2 elements')):c!=="object"&&y.push(new Q(l+"[1]",s[1],"object expected, "+c+" found"))}return y})(e)}function su(e,t){var r=e.key,s=e.style,l=e.styleSpec,c=e.value,h=e.objectKey,y=l[t+"_"+e.layerType];if(!y)return[];var b=h.match(/^(.*)-transition$/);if(t==="paint"&&b&&y[b[1]]&&y[b[1]].transition)return Dt({key:r,value:c,valueSpec:l.transition,style:s,styleSpec:l});var I,C=e.valueSpec||y[h];if(!C)return[new Q(r,c,'unknown property "'+h+'"')];if(pr(c)==="string"&&Io(C)&&!C.tokens&&(I=/^{([^}]+)}$/.exec(c)))return[new Q(r,c,'"'+h+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(I[1])+" }`.")];var P=[];return e.layerType==="symbol"&&(h==="text-field"&&s&&!s.glyphs&&P.push(new Q(r,c,'use of "text-field" requires a style "glyphs" property')),h==="text-font"&&Ja(Te(c))&&Le(c.type)==="identity"&&P.push(new Q(r,c,'"text-font" does not support identity functions'))),P.concat(Dt({key:e.key,value:c,valueSpec:C,style:s,styleSpec:l,expressionContext:"property",propertyType:t,propertyKey:h}))}function uu(e){return su(e,"paint")}function wa(e){return su(e,"layout")}function El(e){var t=[],r=e.value,s=e.key,l=e.style,c=e.styleSpec;r.type||r.ref||t.push(new Q(s,r,'either "type" or "ref" is required'));var h,y=Le(r.type),b=Le(r.ref);if(r.id)for(var I=Le(r.id),C=0;C<e.arrayIndex;C++){var P=l.layers[C];Le(P.id)===I&&t.push(new Q(s,r.id,'duplicate layer id "'+r.id+'", previously used at line '+P.id.__line__))}if("ref"in r)["type","source","source-layer","filter","layout"].forEach((function(X){X in r&&t.push(new Q(s,r[X],'"'+X+'" is prohibited for ref layers'))}
1)),l.layers.forEach((function(X){Le(X.id)===b&&(h=X)})),h?h.ref?t.push(new Q(s,r.ref,"ref cannot reference another ref layer")):y=Le(h.type):t.push(new Q(s,r.ref,'ref layer "'+b+'" not found'));else if(y!=="background")if(r.source){var D=l.sources&&l.sources[r.source],N=D&&Le(D.type);D?N==="vector"&&y==="raster"?t.push(new Q(s,r.source,'layer "'+r.id+'" requires a raster source')):N==="raster"&&y!=="raster"?t.push(new Q(s,r.source,'layer "'+r.id+'" requires a vector source')):N!=="vector"||r["source-layer"]?N==="raster-dem"&&y!=="hillshade"?t.push(new Q(s,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):y!=="line"||!r.paint||!r.paint["line-gradient"]||N==="geojson"&&D.lineMetrics||t.push(new Q(s,r,'layer "'+r.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):t.push(new Q(s,r,'layer "'+r.id+'" must specify a "source-layer"')):t.push(new Q(s,r.source,'source "'+r.source+'" not found'))}else t.push(new Q(s,r,'missing required property "source"'));return t=t.concat(yi({key:s,value:r,valueSpec:c.layer,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Dt({key:s+".type",value:r.type,valueSpec:c.layer.type,style:e.style,styleSpec:e.styleSpec,object:r,objectKey:"type"})},filter:au,layout:function(X){return yi({layer:r,key:X.key,value:X.value,style:X.style,styleSpec:X.styleSpec,objectElementValidators:{"*":function(H){return wa(Pe({layerType:y},H))}}})},paint:function(X){return yi({layer:r,key:X.key,value:X.value,style:X.style,styleSpec:X.styleSpec,objectElementValidators:{"*":function(H){return uu(Pe({layerType:y},H))}}})}}}))}function Ao(e){var t=e.value,r=e.key,s=pr(t);return s!=="string"?[new Q(r,t,"string expected, "+s+" found")]:[]}var gr={promoteId:function(e){var t=e.key,r=e.value;if(pr(r)==="string")return Ao({key:t,value:r});var s=[];for(var l in r)s.push.apply(s,Ao({key:t+"."+l,value:r[l]}));return s}};function is(e){var t=e.value,r=e.key,s=e.styleSpec,l=e.style;if(!t.type)return[new Q(r,t,'"type" is required')];var c,h=Le(t.type);switch(h){case"vector":case"raster":case"raster-dem":return yi({key:r,value:t,valueSpec:s["source_"+h.replace("-","_")],style:e.style,styleSpec:s,objectElementValidators:gr});case"geojson":if(c=yi({key:r,value:t,valueSpec:s.source_geojson,style:l,styleSpec:s,objectElementValidators:gr}),t.cluster)for(var y in t.clusterProperties){var b=t.clusterProperties[y],I=b[0],C=typeof I=="string"?[I,["accumulated"],["get",y]]:I;c.push.apply(c,Eo({key:r+"."+y+".map",value:b[1],expressionContext:"cluster-map"})),c.push.apply(c,Eo({key:r+"."+y+".reduce",value:C,expressionContext:"cluster-reduce"}))}return c;case"video":return yi({key:r,value:t,valueSpec:s.source_video,style:l,styleSpec:s});case"image":return yi({key:r,value:t,valueSpec:s.source_image,style:l,styleSpec:s});case"canvas":return[new Q(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return ba({key:r+".type",value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Co(e){var t=e.value,r=e.styleSpec,s=r.light,l=e.style,c=[],h=pr(t);if(t===void 0)return c;if(h!=="object")return c.concat([new Q("light",t,"object expected, "+h+" found")]);for(var y in t){var b=y.match(/^(.*)-transition$/);c=c.concat(b&&s[b[1]]&&s[b[1]].transition?Dt({key:y,value:t[y],valueSpec:r.transition,style:l,styleSpec:r}):s[y]?Dt({key:y,value:t[y],valueSpec:s[y],style:l,styleSpec:r}):[new Q(y,t[y],'unknown property "'+y+'"')])}return c}var Yi={"*":function(){return[]},array:bl,boolean:function(e){var t=e.value,r=e.key,s=pr(t);return s!=="boolean"?[new Q(r,t,"boolean expected, "+s+" found")]:[]},number:wl,color:function(e){var t=e.key,r=e.value,s=pr(r);return s!=="string"?[new Q(t,r,"color expected, "+s+" found")]:Lt(r)===null?[new Q(t,r,'color expected, "'+r+'" found')]:[]},constants:he,enum:ba,filter:au,function:Sl,layer:El,object:yi,source:is,light:Co,string:Ao,formatted:function(e){return Ao(e).length===0?[]:Eo(e)},resolvedImage:function(e){return Ao(e).length===0?[]:Eo(e)}};function Dt(e){var t=e.value,r=e.valueSpec,s=e.styleSpec;return r.expression&&Ja(Le(t))?Sl(e):r.expression&&_a(Te(t))?Eo(e):r.type&&Yi[r.type]?Yi[r.type](e):yi(Pe({},e,{valueSpec:r.type?s[r.type]:r}))}function hr(e){var t=e.value,r=e.key,s=Ao(e);return s.length||(t.indexOf("{fontstack}")===-1&&s.push(new Q(r,t,'"glyphs" url must include a "{fontstack}" token')),t.indexOf("{range}")===-1&&s.push(new Q(r,t,'"glyphs" url must include a "{range}" token'))),s}
vendor: 4,859 bytes, line 1
1function Jn(e,t){t===void 0&&(t=U);var r=[];return r=r.concat(Dt({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,objectElementValidators:{glyphs:hr,"*":function(){return[]}}})),e.constants&&(r=r.concat(he({key:"constants",value:e.constants}))),Sa(r)}function Sa(e){return[].concat(e).sort((function(t,r){return t.line-r.line}))}function Jo(e){return function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return Sa(e.apply(this,t))}}Jn.source=Jo(is),Jn.light=Jo(Co),Jn.layer=Jo(El),Jn.filter=Jo(au),Jn.paintProperty=Jo(uu),Jn.layoutProperty=Jo(wa);var Ta=Jn,qc=Ta.light,Uc=Ta.paintProperty,Ia=Ta.layoutProperty;function Ea(e,t){var r=!1;if(t&&t.length)for(var s=0,l=t;s<l.length;s+=1)e.fire(new ie(new Error(l[s].message))),r=!0;return r}var zi=Wr;function Wr(e,t,r){var s=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],y=l[3+c+1];s.push(h===y?null:l.subarray(h,y))}var b=l[3+s.length+1];this.keys=l.subarray(l[3+s.length],b),this.bboxes=l.subarray(b),this.insert=this._insertReadonly}else{this.d=t+2*r;for(var I=0;I<this.d*this.d;I++)s.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=r,this.scale=t/e,this.uid=0;var C=r/t*e;this.min=-C,this.max=e+C}Wr.prototype.insert=function(e,t,r,s,l){this._forEachCell(t,r,s,l,this._insertCell,this.uid++),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(s),this.bboxes.push(l)},Wr.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},Wr.prototype._insertCell=function(e,t,r,s,l,c){this.cells[l].push(c)},Wr.prototype.query=function(e,t,r,s,l){var c=this.min,h=this.max;if(e<=c&&t<=c&&h<=r&&h<=s&&!l)return Array.prototype.slice.call(this.keys);var y=[];return this._forEachCell(e,t,r,s,this._queryCell,y,{},l),y},Wr.prototype._queryCell=function(e,t,r,s,l,c,h,y){var b=this.cells[l];if(b!==null)for(var I=this.keys,C=this.bboxes,P=0;P<b.length;P++){var D=b[P];if(h[D]===void 0){var N=4*D;(y?y(C[N+0],C[N+1],C[N+2],C[N+3]):e<=C[N+2]&&t<=C[N+3]&&r>=C[N+0]&&s>=C[N+1])?(h[D]=!0,c.push(I[D])):h[D]=!1}}},Wr.prototype._forEachCell=function(e,t,r,s,l,c,h,y){for(var b=this._convertToCellCoord(e),I=this._convertToCellCoord(t),C=this._convertToCellCoord(r),P=this._convertToCellCoord(s),D=b;D<=C;D++)for(var N=I;N<=P;N++){var X=this.d*N+D;if((!y||y(this._convertFromCellCoord(D),this._convertFromCellCoord(N),this._convertFromCellCoord(D+1),this._convertFromCellCoord(N+1)))&&l.call(this,e,t,r,s,X,c,h,y))return}},Wr.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},Wr.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},Wr.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=3+this.cells.length+1+1,r=0,s=0;s<this.cells.length;s++)r+=this.cells[s].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 y=e[h];l[3+h]=c,l.set(y,c),c+=y.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 Aa=F.ImageData,Al=F.ImageBitmap,Gr={};function Ye(e,t,r){r===void 0&&(r={}),Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),Gr[e]={klass:t,omit:r.omit||[],shallow:r.shallow||[]}}for(var Un in Ye("Object",Object),zi.serialize=function(e,t){var r=e.toArrayBuffer();return t&&t.push(r),{buffer:r}},zi.deserialize=function(e){return new zi(e.buffer)},Ye("Grid",zi),Ye("Color",$t),Ye("Error",Error),Ye("ResolvedImage",Ln),Ye("StylePropertyFunction",Ko),Ye("StyleExpression",Xo,{omit:["_evaluator"]}),Ye("ZoomDependentExpression",Ho),Ye("ZoomConstantExpression",xa),Ye("CompoundExpression",vn,{omit:["_evaluate"]}),wo)wo[Un]._classRegistryKey||Ye("Expression_"+Un,wo[Un]);function os(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}function Yo(e){return Al&&e instanceof Al}function mi(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(os(e)||Yo(e))return t&&t.push(e),e;if(ArrayBuffer.isView(e)){var r=e;return t&&t.push(r.buffer),r}if(e instanceof Aa)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){for(var s=[],l=0,c=e;l<c.length;l+=1)s.push(mi(c[l],t));return s}if(typeof e=="object"){var h=e.constructor,y=h._classRegistryKey;if(!y)throw new Error("can't serialize object of unregistered class");var b=h.serialize?h.serialize(e,t):{};if(!h.serialize){for(var I in e)if(e.hasOwnProperty(I)&&!(Gr[y].omit.indexOf(I)>
1=0)){var C=e[I];b[I]=Gr[y].shallow.indexOf(I)>=0?C:mi(C,t)}e instanceof Error&&(b.message=e.message)}if(b.$name)throw new Error("$name property is reserved for worker serialization logic.");return y!=="Object"&&(b.$name=y),b}throw new Error("can't serialize object of type "+typeof e)}function Vn(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||os(e)||Yo(e)||ArrayBuffer.isView(e)||e instanceof Aa)return e;if(Array.isArray(e))return e.map(Vn);if(typeof e=="object"){var t=e.$name||"Object",r=Gr[t].klass;if(!r)throw new Error("can't deserialize unregistered class "+t);if(r.deserialize)return r.deserialize(e);for(var s=Object.create(r.prototype),l=0,c=Object.keys(e);l<c.length;l+=1){var h=c[l];if(h!=="$name"){var y=e[h];s[h]=Gr[t].shallow.indexOf(h)>=0?y:Vn(y)}}return s}throw new Error("can't deserialize object of type "+typeof e)}var lu=function(){this.first=!0};lu.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 Ve={"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>=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 cu(e){for(var t=0,r=e;t<r.length;t+=1)if(as(r[t].charCodeAt(0)))return!0;return!1}function as(e){return!(e!==746&&e!==747&&(e<4352||!(Ve["Bopomofo Extended"](e)||Ve.Bopomofo(e)||Ve["CJK Compatibility Forms"](e)&&!(e>=65097&&e<=65103)||Ve["CJK Compatibility Ideographs"](e)||Ve["CJK Compatibility"](e)||Ve["CJK Radicals Supplement"](e)||Ve["CJK Strokes"](e)||!(!Ve["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||e===12336)||Ve["CJK Unified Ideographs Extension A"](e)||Ve["CJK Unified Ideographs"](e)||Ve["Enclosed CJK Letters and Months"](e)||Ve["Hangul Compatibility Jamo"](e)||Ve["Hangul Jamo Extended-A"](e)||Ve["Hangul Jamo Extended-B"](e)||Ve["Hangul Jamo"](e)||Ve["Hangul Syllables"](e)||Ve.Hiragana(e)||Ve["Ideographic Description Characters"](e)||Ve.Kanbun(e)||Ve["Kangxi Radicals"](e)||Ve["Katakana Phonet
1ic Extensions"](e)||Ve.Katakana(e)&&e!==12540||!(!Ve["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)||!(!Ve["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||Ve["Unified Canadian Aboriginal Syllabics"](e)||Ve["Unified Canadian Aboriginal Syllabics Extended"](e)||Ve["Vertical Forms"](e)||Ve["Yijing Hexagram Symbols"](e)||Ve["Yi Syllables"](e)||Ve["Yi Radicals"](e))))}function pu(e){return!(as(e)||(function(t){return!!(Ve["Latin-1 Supplement"](t)&&(t===167||t===169||t===174||t===177||t===188||t===189||t===190||t===215||t===247)||Ve["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)||Ve["Letterlike Symbols"](t)||Ve["Number Forms"](t)||Ve["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)||Ve["Control Pictures"](t)&&t!==9251||Ve["Optical Character Recognition"](t)||Ve["Enclosed Alphanumerics"](t)||Ve["Geometric Shapes"](t)||Ve["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||Ve["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||Ve["CJK Symbols and Punctuation"](t)||Ve.Katakana(t)||Ve["Private Use Area"](t)||Ve["CJK Compatibility Forms"](t)||Ve["Small Form Variants"](t)||Ve["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 ai(e){return e>=1424&&e<=2303||Ve["Arabic Presentation Forms-A"](e)||Ve["Arabic Presentation Forms-B"](e)}function jn(e,t){return!(!t&&ai(e)||e>=2304&&e<=3583||e>=3840&&e<=4255||Ve.Khmer(e))}function ss(e){for(var t=0,r=e;t<r.length;t+=1)if(ai(r[t].charCodeAt(0)))return!0;return!1}var us=null,Gn="unavailable",Li=null,Cl=function(e){e&&typeof e=="string"&&e.indexOf("NetworkError")>-1&&(Gn="error"),us&&us(e)};function Ca(){hu.fire(new K("pluginStateChange",{pluginStatus:Gn,pluginURL:Li}))}var hu=new oe,fu=function(){return Gn},vi=function(){if(Gn!=="deferred"||!Li)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Gn="loading",Ca(),Li&&an({url:Li},(function(e){e?Cl(e):(Gn="loaded",Ca())}))},Yn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Gn==="loaded"||Yn.applyArabicShaping!=null},isLoading:function(){return Gn==="loading"},setState:function(e){Gn=e.pluginStatus,Li=e.pluginURL},isParsed:function(){return Yn.applyArabicShaping!=null&&Yn.processBidirectionalText!=null&&Yn.processStyledBidirectionalText!=null},getPluginURL:function(){return Li}},kt=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 lu,this.transition={})};kt.prototype.isSupportedScript=function(e){return(function(t,r){for(var s=0,l=t;s<l.length;s+=1)if(!jn(l[s].charCodeAt(0),r))return!1;return!0})(e,Yn.isLoaded())},kt.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},kt.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 wi=function(e,t){this.property=e,this.value=t,this.expression=(function(r,s){if(Ja(r))return new Ko(r,s);if(_a(r)){var l=xl(r,s);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"&&s.type==="color"&&(c=$t.parse(r)),{kind:"constant",evaluate:function(){return c}}})(t===void 0?e.specification.default:t,e.specification)};wi.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},wi.prototype.possiblyEvaluate=function(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)};var si=function(e){this.property=e,this.value=new wi(e,void 0)};si.prototype.transitioned=function(e,t){return new Po(this.property,this.value,t,ce({},e.transition,this.transition),e.now)},si.prototype.untransitioned=function(){return new Po(this.property,this.value,
1null,{},0)};var _n=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};_n.prototype.getValue=function(e){return se(this._values[e].value.value)},_n.prototype.setValue=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new si(this._values[e].property)),this._values[e].value=new wi(this._values[e].property,t===null?void 0:se(t))},_n.prototype.getTransition=function(e){return se(this._values[e].transition)},_n.prototype.setTransition=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new si(this._values[e].property)),this._values[e].transition=se(t)||void 0},_n.prototype.serialize=function(){for(var e={},t=0,r=Object.keys(this._values);t<r.length;t+=1){var s=r[t],l=this.getValue(s);l!==void 0&&(e[s]=l);var c=this.getTransition(s);c!==void 0&&(e[s+"-transition"]=c)}return e},_n.prototype.transitioned=function(e,t){for(var r=new Qi(this._properties),s=0,l=Object.keys(this._values);s<l.length;s+=1){var c=l[s];r._values[c]=this._values[c].transitioned(e,t._values[c])}return r},_n.prototype.untransitioned=function(){for(var e=new Qi(this._properties),t=0,r=Object.keys(this._values);t<r.length;t+=1){var s=r[t];e._values[s]=this._values[s].untransitioned()}return e};var Po=function(e,t,r,s,l){this.property=e,this.value=t,this.begin=l+s.delay||0,this.end=this.begin+s.duration||0,e.specification.transition&&(s.delay||s.duration)&&(this.prior=r)};Po.prototype.possiblyEvaluate=function(e,t,r){var s=e.now||0,l=this.value.possiblyEvaluate(e,t,r),c=this.prior;if(c){if(s>this.end)return this.prior=null,l;if(this.value.isDataDriven())return this.prior=null,l;if(s<this.begin)return c.possiblyEvaluate(e,t,r);var h=(s-this.begin)/(this.end-this.begin);return this.property.interpolate(c.possiblyEvaluate(e,t,r),l,(function(y){if(y<=0)return 0;if(y>=1)return 1;var b=y*y,I=b*y;return 4*(y<.5?I:3*(y-b)+I-.75)})(h))}return l};var Qi=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};Qi.prototype.possiblyEvaluate=function(e,t,r){for(var s=new Pa(this._properties),l=0,c=Object.keys(this._values);l<c.length;l+=1){var h=c[l];s._values[h]=this._values[h].possiblyEvaluate(e,t,r)}return s},Qi.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 gi=function(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)};gi.prototype.getValue=function(e){return se(this._values[e].value)},gi.prototype.setValue=function(e,t){this._values[e]=new wi(this._values[e].property,t===null?void 0:se(t))},gi.prototype.serialize=function(){for(var e={},t=0,r=Object.keys(this._values);t<r.length;t+=1){var s=r[t],l=this.getValue(s);l!==void 0&&(e[s]=l)}return e},gi.prototype.possiblyEvaluate=function(e,t,r){for(var s=new Pa(this._properties),l=0,c=Object.keys(this._values);l<c.length;l+=1){var h=c[l];s._values[h]=this._values[h].possiblyEvaluate(e,t,r)}return s};var An=function(e,t,r){this.property=e,this.value=t,this.parameters=r};An.prototype.isConstant=function(){return this.value.kind==="constant"},An.prototype.constantOr=function(e){return this.value.kind==="constant"?this.value.value:e},An.prototype.evaluate=function(e,t,r,s){return this.property.evaluate(this.value,this.parameters,e,t,r,s)};var Pa=function(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)};Pa.prototype.get=function(e){return this._values[e]};var at=function(e){this.specification=e};at.prototype.possiblyEvaluate=function(e,t){return e.expression.evaluate(t)},at.prototype.interpolate=function(e,t,r){var s=Zo[this.specification.type];return s?s(e,t,r):e};var et=function(e,t){this.specification=e,this.overrides=t};et.prototype.possiblyEvaluate=function(e,t,r,s){return new An(this,e.expression.kind==="constant"||e.expression.kind==="camera"?{kind:"constant",value:e.expression.evaluate(t,null,{},r,s)}:e.expression,t)},et.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 An(this,{kind:"constant",value:void 0},e.parameters);var s=Zo[this.specification.type];return s?new An(this,{kind:"constant",value:s(e.value.value,t.value.value,r)},e.parameters):e},et.prototype.evaluate=function(e,t,r,s,l,c){return e.kind==="constant"?e.value:e.evaluate(t,r,s,l,c)};var ls=(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,s,l,c){if(r.value===void 0)return new An(this,{kind:"constant",value:void 0},s);if(r.expression.kind==="constant"){var h=r.expression.evaluate(s,null,{},l,c),y=r.property.specification.type==="resolvedImage"&&typeof h!="string"?h.name:h,b=this._calculate(y,y,y,s);return new An(this,{kind:"constant",value:b},s)}if(r.expression.kind==="camera"){var I=this._calculate(r.expression.evaluate({zoom:s.zoom-1}),r.expression.evaluate({zoom:s.zoom}),r.expression.evaluate({zoom:s.zoom+1}),s);return new An(this,{kind:"constant",value:I},s)}return new An(this,r.expression,s)},t.prototype.evaluate=function(r,s,l,c,h,y){if(r.kind==="source"){var b=r.evaluate(s,l,c,h,y);return this._calculate(b,b,b,s)}return r.kind==="composite"?this._calculate(r.evaluate({zoom:Math.floor(s.zoom)-1},l,c),r.evaluate({zoom:Math.floor(s.zoom)},l,c),r.evaluate({zoom:Math.floor(s.zoom)+1},l,c),s):r.value},t.prototype._calculate=function(r,s,l,c){return c.zoom>c.zoomHistory.lastIntegerZoom?{from:r,to:s}:{from:l,to:s}},t.prototype.interpolate=function(r){return r},t})(et),Cn=function(e){this.specification=e};Cn.prototype.possiblyEvaluate=function(e,t,r,s){if(e.value!==void 0){if(e.expression.kind==="constant"){var l=e.expression.evaluate(t,null,{},r,s);return this._calculate(l,l,l,t)}return this._calculate(e.expression.evaluate(new kt(Math.floor(t.zoom-1),t)),e.expression.evaluate(new kt(Math.floor(t.zoom),t)),e.expression.evaluate(new kt(Math.floor(t.zoom+1),t)),t)}},Cn.prototype._calculate=function(e,t,r,s){return s.zoom>s.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},Cn.prototype.interpolate=function(e){return e};var _i=function(e){this.specification=e};_i.prototype.possiblyEvaluate=function(e,t,r,s){return!!e.expression.evaluate(t,null,{},r,s)},_i.prototype.interpolate=function(){return!1};var xn=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 s=this.defaultPropertyValues[t]=new wi(r,void 0),l=this.defaultTransitionablePropertyValues[t]=new si(r);this.defaultTransitioningPropertyValues[t]=l.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=s.possiblyEvaluate({})}};Ye("DataDrivenProperty",et),Ye("DataConstantProperty",at),Ye("CrossFadedDataDrivenProperty",ls),Ye("CrossFadedProperty",Cn),Ye("ColorRampProperty",_i);var Si=(function(e){function t(r,s){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),s.layout&&(this._unevaluatedLayout=new gi(s.layout)),s.paint)){for(var l in this._transitionablePaint=new _n(s.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 Pa(s.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,s,l){l===void 0&&(l={}
1),s!=null&&this._validate(Ia,"layers."+this.id+".layout."+r,r,s,l)||(r!=="visibility"?this._unevaluatedLayout.setValue(r,s):this.visibility=s)},t.prototype.getPaintProperty=function(r){return je(r,"-transition")?this._transitionablePaint.getTransition(r.slice(0,-11)):this._transitionablePaint.getValue(r)},t.prototype.setPaintProperty=function(r,s,l){if(l===void 0&&(l={}),s!=null&&this._validate(Uc,"layers."+this.id+".paint."+r,r,s,l))return!1;if(je(r,"-transition"))return this._transitionablePaint.setTransition(r.slice(0,-11),s||void 0),!1;var c=this._transitionablePaint._values[r],h=c.property.specification["property-type"]==="cross-faded-data-driven",y=c.value.isDataDriven(),b=c.value;this._transitionablePaint.setValue(r,s),this._handleSpecialPaintPropertyUpdate(r);var I=this._transitionablePaint._values[r].value;return I.isDataDriven()||y||h||this._handleOverridablePaintPropertyUpdate(r,b,I)},t.prototype._handleSpecialPaintPropertyUpdate=function(r){},t.prototype._handleOverridablePaintPropertyUpdate=function(r,s,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,s){r.getCrossfadeParameters&&(this._crossfadeParameters=r.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(r,void 0,s)),this.paint=this._transitioningPaint.possiblyEvaluate(r,void 0,s)}
vendor: 16,384 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),it(r,(function(s,l){return!(s===void 0||l==="layout"&&!Object.keys(s).length||l==="paint"&&!Object.keys(s).length)}))},t.prototype._validate=function(r,s,l,c,h){return h===void 0&&(h={}),(!h||h.validate!==!1)&&Ea(this,r.call(Ta,{key:s,layerType:this.type,objectKey:l,value:c,styleSpec:U,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 s=this.paint.get(r);if(s instanceof An&&Io(s.property.specification)&&(s.value.kind==="source"||s.value.kind==="composite")&&s.value.isStateDependent)return!0}return!1},t})(oe),du={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},cs=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},Yt=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function ln(e,t){t===void 0&&(t=1);var r=0,s=0;return{members:e.map((function(l){var c=du[l.type].BYTES_PER_ELEMENT,h=r=Pl(r,Math.max(t,c)),y=l.components||1;return s=Math.max(s,c),r+=c*y,{name:l.name,type:l.type,components:y,offset:h}})),size:Pl(r,Math.max(s,t)),alignment:t}}function Pl(e,t){return Math.ceil(e/t)*t}Yt.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},Yt.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},Yt.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Yt.prototype.clear=function(){this.length=0},Yt.prototype.resize=function(e){this.reserve(e),this.length=e},Yt.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)}},Yt.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Mo=(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,s){var l=this.length;return this.resize(l+1),this.emplace(l,r,s)},t.prototype.emplace=function(r,s,l){var c=2*r;return this.int16[c+0]=s,this.int16[c+1]=l,r},t})(Yt);Mo.prototype.bytesPerElement=4,Ye("StructArrayLayout2i4",Mo);var yu=(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,s,l,c){var h=this.length;return this.resize(h+1),this.emplace(h,r,s,l,c)},t.prototype.emplace=function(r,s,l,c,h){var y=4*r;return this.int16[y+0]=s,this.int16[y+1]=l,this.int16[y+2]=c,this.int16[y+3]=h,r},t})(Yt);yu.prototype.bytesPerElement=8,Ye("StructArrayLayout4i8",yu);var Di=(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,s,l,c,h,y){var b=this.length;return this.resize(b+1),this.emplace(b,r,s,l,c,h,y)},t.prototype.emplace=function(r,s,l,c,h,y,b){var I=6*r;return this.int16[I+0]=s,this.int16[I+1]=l,this.int16[I+2]=c,this.int16[I+3]=h,this.int16[I+4]=y,this.int16[I+5]=b,r},t})(Yt);Di.prototype.bytesPerElement=12,Ye("StructArrayLayout2i4i12",Di);var $n=(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,s,l,c,h,y){var b=this.length;return this.resize(b+1),this.emplace(b,r,s,l,c,h,y)},t.prototype.emplace=function(r,s,l,c,h,y,b){var I=4*r,C=8*r;return this.int16[I+0]=s,this.int16[I+1]=l,this.uint8[C+4]=c,this.uint8[C+5]=h,this.uint8[C+6]=y,this.uint8[C+7]=b,r},t})(Yt);$n.prototype.bytesPerElement=8,Ye("StructArrayLayout2i4ub8",$n);var Qo=(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,s){var l=this.length;return this.resize(l+1),this.emplace(l,r,s)},t.prototype.emplace=function(r,s,l){var c=2*r;return this.float32[c+0]=s,this.float32[c+1]=l,r},t})(Yt);Qo.prototype.bytesPerElement=8,Ye("StructArrayLayout2f8",Qo);var Ti=(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,s,l,c,h,y,b,I,C,P){var D=this.length;return this.resize(D+1),this.emplace(D,r,s,l,c,h,y,b,I,C,P)},t.prototype.emplace=function(r,s,l,c,h,y,b,I,C,P,D){var N=10*r;return this.uint16[N+0]=s,this.uint16[N+1]=l,this.uint16[N+2]=c,this.uint16[N+3]=h,this.uint16[N+4]=y,this.uint16[N+5]=b,this.uint16[N+6]=I,this.uint16[N+7]=C,this.uint16[N+8]=P,this.uint16[N+9]=D,r},t})(Yt);Ti.prototype.bytesPerElement=20,Ye("StructArrayLayout10ui20",Ti);var ps=(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,s,l,c,h,y,b,I,C,P,D,N){var X=this.length;return this.resize(X+1),this.emplace(X,r,s,l,c,h,y,b,I,C,P,D,N)},t.prototype.emplace=function(r,s,l,c,h,y,b,I,C,P,D,N,X){var H=12*r;return this.int16[H+0]=s,this.int16[H+1]=l,this.int16[H+2]=c,this.int16[H+3]=h,this.uint16[H+4]=y,this.uint16[H+5]=b,this.uint16[H+6]=I,this.uint16[H+7]=C,this.int16[H+8]=P,this.int16[H+9]=D,this.int16[H+10]=N,this.int16[H+11]=X,r},t})(Yt);ps.prototype.bytesPerElement=24,Ye("StructArrayLayout4i4ui4i24",ps);var ea=(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,s,l){var c=this.length;return this.resize(c+1),this.emplace(c,r,s,l)},t.prototype.emplace=function(r,s,l,c){var h=3*r;return this.float32[h+0]=s,this.float32[h+1]=l,this.float32[h+2]=c,r},t})(Yt);ea.prototype.bytesPerElement=12,Ye("StructArrayLayout3f12",ea);var Ma=(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 s=this.length;return this.resize(s+1),this.emplace(s,r)},t.prototype.emplace=function(r,s){return this.uint32[1*r+0]=s,r},t})(Yt);Ma.prototype.bytesPerElement=4,Ye("StructArrayLayout1ul4",Ma);var mu=(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,s,l,c,h,y,b,I,C){var P=this.length;return this.resize(P+1),this.emplace(P,r,s,l,c,h,y,b,I,C)},t.prototype.emplace=function(r,s,l,c,h,y,b,I,C,P){var D=10*r,N=5*r;return this.int16[D+0]=s,this.int16[D+1]=l,this.int16[D+2]=c,this.int16[D+3]=h,this.int16[D+4]=y,this.int16[D+5]=b,this.uint32[N+3]=I,this.uint16[D+8]=C,this.uint16[D+9]=P,r},t})(Yt);mu.prototype.bytesPerElement=20,Ye("StructArrayLayout6i1ul2ui20",mu);var ta=(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,s,l,c,h,y){var b=this.length;return this.resize(b+1),this.emplace(b,r,s,l,c,h,y)},t.prototype.emplace=function(r,s,l,c,h,y,b){var I=6*r;return this.int16[I+0]=s,this.int16[I+1]=l,this.int16[I+2]=c,this.int16[I+3]=h,this.int16[I+4]=y,this.int16[I+5]=b,r},t})(Yt);ta.prototype.bytesPerElement=12,Ye("StructArrayLayout2i2i2i12",ta);var ko=(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,s,l,c,h){var y=this.length;return this.resize(y+1),this.emplace(y,r,s,l,c,h)},t.prototype.emplace=function(r,s,l,c,h,y){var b=4*r,I=8*r;return this.float32[b+0]=s,this.float32[b+1]=l,this.float32[b+2]=c,this.int16[I+6]=h,this.int16[I+7]=y,r},t})(Yt);ko.prototype.bytesPerElement=16,Ye("StructArrayLayout2f1f2i16",ko);var vu=(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,s,l,c){var h=this.length;return this.resize(h+1),this.emplace(h,r,s,l,c)},t.prototype.emplace=function(r,s,l,c,h){var y=12*r,b=3*r;return this.uint8[y+0]=s,this.uint8[y+1]=l,this.float32[b+1]=c,this.float32[b+2]=h,r},t})(Yt);vu.prototype.bytesPerElement=12,Ye("StructArrayLayout2ub2f12",vu);var eo=(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,s,l){var c=this.length;return this.resize(c+1),this.emplace(c,r,s,l)},t.prototype.emplace=function(r,s,l,c){var h=3*r;return this.uint16[h+0]=s,this.uint16[h+1]=l,this.uint16[h+2]=c,r},t})(Yt);eo.prototype.bytesPerElement=6,Ye("StructArrayLayout3ui6",eo);var to=(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,s,l,c,h,y,b,I,C,P,D,N,X,H,ne,ee,le){var de=this.length;return this.resize(de+1),this.emplace(de,r,s,l,c,h,y,b,I,C,P,D,N,X,H,ne,ee,le)},t.prototype.emplace=function(r,s,l,c,h,y,b,I,C,P,D,N,X,H,ne,ee,le,de){var ve=24*r,be=12*r,Ce=48*r;return this.int16[ve+0]=s,this.int16[ve+1]=l,this.uint16[ve+2]=c,this.uint16[ve+3]=h,this.uint32[be+2]=y,this.uint32[be+3]=b,this.uint32[be+4]=I,this.uint16[ve+10]=C,this.uint16[ve+11]=P,this.uint16[ve+12]=D,this.float32[be+7]=N,this.float32[be+8]=X,this.uint8[Ce+36]=H,this.uint8[Ce+37]=ne,this.uint8[Ce+38]=ee,this.uint32[be+10]=le,this.int16[ve+22]=de,r},t})(Yt);to.prototype.bytesPerElement=48,Ye("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",to);var hs=(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,s,l,c,h,y,b,I,C,P,D,N,X,H,ne,ee,le,de,ve,be,Ce,De,Ue,ot,$e,ut,Xe,At){var dt=this.length;return this.resize(dt+1),this.emplace(dt,r,s,l,c,h,y,b,I,C,P,D,N,X,H,ne,ee,le,de,ve,be,Ce,De,Ue,ot,$e,ut,Xe,At)},t.prototype.emplace=function(r,s,l,c,h,y,b,I,C,P,D,N,X,H,ne,ee,le,de,ve,be,Ce,De,Ue,ot,$e,ut,Xe,At,dt){var tt=34*r,Ct=17*r;return this.int16[tt+0]=s,this.int16[tt+1]=l,this.int16[tt+2]=c,this.int16[tt+3]=h,this.int16[tt+4]=y,this.int16[tt+5]=b,this.int16[tt+6]=I,this.int16[tt+7]=C,this.uint16[tt+8]=P,this.uint16[tt+9]=D,this.uint16[tt+10]=N,this.uint16[tt+11]=X,this.uint16[tt+12]=H,this.uint16[tt+13]=ne,this.uint16[tt+14]=ee,this.uint16[tt+15]=le,this.uint16[tt+16]=de,this.uint16[tt+17]=ve,this.uint16[tt+18]=be,this.uint16[tt+19]=Ce,this.uint16[tt+20]=De,this.uint16[tt+21]=Ue,this.uint16[tt+22]=ot,this.uint32[Ct+12]=$e,this.float32[Ct+13]=ut,this.float32[Ct+14]=Xe,this.float32[Ct+15]=At,this.float32[Ct+16]=dt,r},t})(Yt);hs.prototype.bytesPerElement=68,Ye("StructArrayLayout8i15ui1ul4f68",hs);var ro=(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 s=this.length;return this.resize(s+1),this.emplace(s,r)},t.prototype.emplace=function(r,s){return this.float32[1*r+0]=s,r},t})(Yt);ro.prototype.bytesPerElement=4,Ye("StructArrayLayout1f4",ro);var ui=(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,s,l){var c=this.length;return this.resize(c+1),this.emplace(c,r,s,l)},t.prototype.emplace=function(r,s,l,c){var h=3*r;return this.int16[h+0]=s,this.int16[h+1]=l,this.int16[h+2]=c,r},t})(Yt);ui.prototype.bytesPerElement=6,Ye("StructArrayLayout3i6",ui);var gu=(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,s,l){var c=this.length;return this.resize(c+1),this.emplace(c,r,s,l)},t.prototype.emplace=function(r,s,l,c){var h=4*r;return this.uint32[2*r+0]=s,this.uint16[h+2]=l,this.uint16[h+3]=c,r},t})(Yt);gu.prototype.bytesPerElement=8,Ye("StructArrayLayout1ul2ui8",gu);var ka=(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,s){var l=this.length;return this.resize(l+1),this.emplace(l,r,s)},t.prototype.emplace=function(r,s,l){var c=2*r;return this.uint16[c+0]=s,this.uint16[c+1]=l,r},t})(Yt);ka.prototype.bytesPerElement=4,Ye("StructArrayLayout2ui4",ka);var _u=(fu
1nction(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 s=this.length;return this.resize(s+1),this.emplace(s,r)},t.prototype.emplace=function(r,s){return this.uint16[1*r+0]=s,r},t})(Yt);_u.prototype.bytesPerElement=2,Ye("StructArrayLayout1ui2",_u);var fs=(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,s,l,c){var h=this.length;return this.resize(h+1),this.emplace(h,r,s,l,c)},t.prototype.emplace=function(r,s,l,c,h){var y=4*r;return this.float32[y+0]=s,this.float32[y+1]=l,this.float32[y+2]=c,this.float32[y+3]=h,r},t})(Yt);fs.prototype.bytesPerElement=16,Ye("StructArrayLayout4f16",fs);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={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 z(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,r),t})(cs);n.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 n(this,r)},t})(mu);Ye("CollisionBoxArray",o);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={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(s){this._structArray.uint8[this._pos1+37]=s},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(s){this._structArray.uint8[this._pos1+38]=s},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(s){this._structArray.uint32[this._pos4+10]=s},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(t.prototype,r),t})(cs);i.prototype.size=48;var u=(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})(to);Ye("PlacedSymbolArray",u);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}
1,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(s){this._structArray.uint32[this._pos4+12]=s},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})(cs);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})(hs);Ye("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})(ro);Ye("GlyphOffsetArray",d);var x=(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})(ui);Ye("SymbolLineVertexArray",x);var A=(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})(cs);A.prototype.size=8;var R=(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 A(this,r)},t})(gu);Ye("FeatureIndexArray",R);var q=ln([{name:"a_pos",components:2,type:"Int16"}],4).members,V=function(e){e===void 0&&(e=[]),this.segments=e};function j(e,t){return 256*(e=ge(Math.floor(e),0,255))+ge(Math.floor(t),0,255)}V.prototype.prepareSegment=function(e,t,r,s){var l=this.segments[this.segments.length-1];return e>V.MAX_VERTEX_ARRAY_LENGTH&&pt("Max vertices per segment is "+V.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+e),(!l||l.vertexLength+e>V.MAX_VERTEX_ARRAY_LENGTH||l.sortKey!==s)&&(l={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0}
vendor: 22,840 bytes, line 1
1,s!==void 0&&(l.sortKey=s),this.segments.push(l)),l},V.prototype.get=function(){return this.segments},V.prototype.destroy=function(){for(var e=0,t=this.segments;e<t.length;e+=1){var r=t[e];for(var s in r.vaos)r.vaos[s].destroy()}},V.simpleSegment=function(e,t,r,s){return new V([{vertexOffset:e,primitiveOffset:t,vertexLength:r,primitiveLength:s,vaos:{},sortKey:0}])},V.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ye("SegmentVector",V);var Y=ln([{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"}]),J=_((function(e){e.exports=function(t,r){var s,l,c,h,y,b,I,C;for(l=t.length-(s=3&t.length),c=r,y=3432918353,b=461845907,C=0;C<l;)I=255&t.charCodeAt(C)|(255&t.charCodeAt(++C))<<8|(255&t.charCodeAt(++C))<<16|(255&t.charCodeAt(++C))<<24,++C,c=27492+(65535&(h=5*(65535&(c=(c^=I=(65535&(I=(I=(65535&I)*y+(((I>>>16)*y&65535)<<16)&4294967295)<<15|I>>>17))*b+(((I>>>16)*b&65535)<<16)&4294967295)<<13|c>>>19))+((5*(c>>>16)&65535)<<16)&4294967295))+((58964+(h>>>16)&65535)<<16);switch(I=0,s){case 3:I^=(255&t.charCodeAt(C+2))<<16;case 2:I^=(255&t.charCodeAt(C+1))<<8;case 1:c^=I=(65535&(I=(I=(65535&(I^=255&t.charCodeAt(C)))*y+(((I>>>16)*y&65535)<<16)&4294967295)<<15|I>>>17))*b+(((I>>>16)*b&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}})),re=_((function(e){e.exports=function(t,r){for(var s,l=t.length,c=r^l,h=0;l>=4;)s=1540483477*(65535&(s=255&t.charCodeAt(h)|(255&t.charCodeAt(++h))<<8|(255&t.charCodeAt(++h))<<16|(255&t.charCodeAt(++h))<<24))+((1540483477*(s>>>16)&65535)<<16),c=1540483477*(65535&c)+((1540483477*(c>>>16)&65535)<<16)^(s=1540483477*(65535&(s^=s>>>24))+((1540483477*(s>>>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}})),Z=J,te=re;Z.murmur3=J,Z.murmur2=te;var ae=function(){this.ids=[],this.positions=[],this.indexed=!1};ae.prototype.add=function(e,t,r,s){this.ids.push(Se(e)),this.positions.push(t,r,s)},ae.prototype.getPositions=function(e){for(var t=Se(e),r=0,s=this.ids.length-1;r<s;){var l=r+s>>1;this.ids[l]>=t?s=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},ae.serialize=function(e,t){var r=new Float64Array(e.ids),s=new Uint32Array(e.positions);return(function l(c,h,y,b){for(;y<b;){for(var I=c[y+b>>1],C=y-1,P=b+1;;){do C++;while(c[C]<I);do P--;while(c[P]>I);if(C>=P)break;_e(c,C,P),_e(h,3*C,3*P),_e(h,3*C+1,3*P+1),_e(h,3*C+2,3*P+2)}P-y<b-P?(l(c,h,y,P),y=P+1):(l(c,h,P+1,b),b=P)}})(r,s,0,r.length-1),t&&t.push(r.buffer,s.buffer),{ids:r,positions:s}},ae.deserialize=function(e){var t=new ae;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t};var fe=Math.pow(2,53)-1;function Se(e){var t=+e;return!isNaN(t)&&t<=fe?t:Z(String(e))}function _e(e,t,r){var s=e[t];e[t]=e[r],e[r]=s}Ye("FeaturePositionMap",ae);var Ie=function(e,t){this.gl=e.gl,this.location=t},Me=(function(e){function t(r,s){e.call(this,r,s),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})(Ie),Be=(function(e){function t(r,s){e.call(this,r,s),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})(Ie),Oe=(function(e){function t(r,s){e.call(this,r,s),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})(Ie),Ke=(function(e){function t(r,s){e.call(this,r,s),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})(Ie),st=(function(e){function t(r,s){e.call(this,r,s),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})(Ie),ht=(function(e){function t(r,s){e.call(this,r,s),this.current=$t.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})(Ie),ct=new Float32Array(16),Ft=(function(e){function t(r,s){e.call(this,r,s),this.current=ct}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 s=1;s<16;s++)if(r[s]!==this.current[s]){this.current=r,this.gl.uniformMatrix4fv(this.location,!1,r);break}},t})(Ie);function Je(e){return[j(255*e.r,255*e.g),j(255*e.b,255*e.a)]}var _t=function(e,t,r){this.value=e,this.uniformNames=t.map((function(s){return"u_"+s})),this.type=r};_t.prototype.setUniform=function(e,t,r){e.set(r.constantOr(this.value))},_t.prototype.getBinding=function(e,t,r){return this.type==="color"?new ht(e,t):new Be(e,t)};var Et=function(e,t){this.uniformNames=t.map((function(r){return"u_"+r})),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};Et.prototype.setConstantPatternPositions=function(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr},Et.prototype.setUniform=function(e,t,r,s){var l=s==="u_pattern_to"?this.patternTo:s==="u_pattern_from"?this.patternFrom:s==="u_pixel_ratio_to"?this.pixelRatioTo:s==="u_pixel_ratio_from"?this.pixelRatioFrom:null;l&&e.set(l)},Et.prototype.getBinding=function(e,t,r){return r.substr(0,9)==="u_pattern"?new st(e,t):new Be(e,t)};var gt=function(e,t,r,s){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 s};gt.prototype.populatePaintArray=function(e,t,r,s,l){var c=this.paintVertexArray.length,h=this.expression.evaluate(new kt(0),t,{},s,[],l);this.paintVertexArray.resize(e),this._setPaintValue(c,e,h)},gt.prototype.updatePaintArray=function(e,t,r,s){var l=this.expression.evaluate({zoom:0},r,s);this._setPaintValue(e,t,l)},gt.prototype._setPaintValue=function(e,t,r){if(this.type==="color")for(var s=Je(r),l=e;l<t;l++)this.paintVertexArray.emplace(l,s[0],s[1]);else{for(var c=e;c<t;c++)this.paintVertexArray.emplace(c,r);this.maxValue=Math.max(this.maxValue,Math.abs(r))}},gt.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))},gt.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var vt=function(e,t,r,s,l,c){this.expression=e,this.uniformNames=t.map((function(h){return"u_"+h+"_t"})),this.type=r,this.useIntegerZoom=s,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};vt.prototype.populatePaintArray=function(e,t,r,s,l){var c=this.expression.evaluate(new kt(this.zoom),t,{},s,[],l),h=this.expression.evaluate(new kt(this.zoom+1),t,{},s,[],l),y=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(y,e,c,h)},vt.prototype.updatePaintArray=function(e,t,r,s){var l=this.expression.evaluate({zoom:this.zoom},r,s),c=this.expression.evaluate({zoom:this.zoom+1},r,s);this._setPaintValue(e,t,l,c)},vt.prototype._setPaintValue=function(e,t,r,s){if(this.type==="color")for(var l=Je(r),c=Je(s),h=e;h<t;h++)this.paintVertexArray.emplace(h,l[0],l[1],c[0],c[1]);else{for(var y=e;y<t;y++)this.paintVertexArray.emplace(y,r,s);this.maxValue=Math.max(this.maxValue,Math.abs(r),Math.abs(s))}},vt.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))},vt.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},vt.prototype.setUniform=function(e,t){var r=this.useIntegerZoom?Math.floor(t.zoom):t.zoom,s=ge(this.expression.interpolationFactor(r,this.zoom,this.zoom+1),0,1);e.set(s)},vt.prototype.getBinding=function(e,t,r){return new Be(e,t)};var St=function(e,t,r,s,l,c){this.expression=e,this.type=t,this.useIntegerZoom=r,this.zoom=s,this.layerId=c,this.zoomInPaintVertexArray=new l,this.zoomOutPaintVertexArray=new l};St.prototype.populatePaintArray=function(e,t,r){var s=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(e),this.zoomOutPaintVertexArray.resize(e),this._setPaintValues(s,e,t.patterns&&t.patterns[this.layerId],r)},St.prototype.updatePaintArray=function(e,t,r,s,l){this._setPaintValues(e,t,r.patterns&&r.patterns[this.layerId],l)},St.prototype._setPaintValues=function(e,t,r,s){if(s&&r){var l=s[r.min],c=s[r.mid],h=s[r.max];if(l&&c&&h)for(var y=e;y<t;y++)this.zoomInPaintVertexArray.emplace(y,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(y,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)}},St.prototype.upload=function(e){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=e.createVertexBuffer(this.zoomInPaintVertexArray,Y.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=e.createVertexBuffer(this.zoomOutPaintVertexArray,Y.members,this.expression.isStateDependent))},St.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var mt=function(e,t,r){this.binders={},this._buffers=[];var s=[];for(var l in e.paint._values)if(r(l)){var c=e.paint.get(l);if(c instanceof An&&Io(c.property.specification)){var h=Yr(l,e.type),y=c.value,b=c.property.specification.type,I=c.property.useIntegerZoom,C=c.property.specification["property-type"],P=C==="cross-faded"||C==="cross-faded-data-driven";if(y.kind==="constant")this.binders[l]=P?new Et(y.value,h):new _t(y.value,h,b),s.push("/u_"+l);else if(y.kind==="source"||P){var D=Pr(l,b,"source");this.binders[l]=P?new St(y,b,I,t,D,e.id):new gt(y,h,b,D),s.push("/a_"+l)}else{var N=Pr(l,b,"composite");this.binders[l]=new vt(y,h,b,I,t,N),s.push("/z_"+l)}}}this.cacheKey=s.sort().join("")};mt.prototype.getMaxValue=function(e){var t=this.binders[e];return t instanceof gt||t instanceof vt?t.maxValue:0},mt.prototype.populatePaintArrays=function(e,t,r,s,l){for(var c in this.binders){var h=this.binders[c];(h instanceof gt||h instanceof vt||h instanceof St)&&h.populatePaintArray(e,t,r,s,l)}},mt.prototype.setConstantPatternPositions=function(e,t){for(var r in this.binders){var s=this.binders[r];s instanceof Et&&s.setConstantPatternPositions(e,t)}},mt.prototype.updatePaintArrays=function(e,t,r,s,l){var c=!1;for(var h in e)for(var y=0,b=t.getPositions(h);y<b.length;y+=1){var I=b[y],C=r.feature(I.index);for(var P in this.binders){var D=this.binders[P];if((D instanceof gt||D instanceof vt||D instanceof St)&&D.expression.isStateDependent===!0){var N=s.paint.get(P);D.expression=N.value,D.updatePaintArray(I.start,I.end,C,e[h],l),c=!0}}}return c},mt.prototype.defines=function(){var e=[];for(var t in this.binders){var r=this.binders[t];(r instanceof _t||r instanceof Et)&&e.push.apply(e,r.uniformNames.map((function(s){return"#define HAS_UNIFORM_"+s})))}return e},mt.prototype.getBinderAttributes=function(){var e=[];for(var t in this.binders){var r=this.binders[t];if(r instanceof gt||r instanceof vt)for(var s=0;s<r.paintVertexAttributes.length;s++)e.push(r.paintVertexAttributes[s].name);else if(r instanceof St)for(var l=0;l<Y.members.length;l++)e.push(Y.members[l].name)}return e},mt.prototype.getBinderUniforms=function(){var e=[];for(var t in this.binders){var r=this.binders[t];if(r instanceof _t||r instanceof Et||r instanceof vt)for(var s=0,l=r.uniformNames;s<l.length;s+=1)e.push(l[s])}return e},mt.prototype.getPaintVertexBuffers=function(){return this._buffers},mt.prototype.getUniforms=function(e,t){var r=[];for(var s in this.binders){var l=this.binders[s];if(l instanceof _t||l instanceof Et||l instanceof vt)for(var c=0,h=l.uniformNames;c<h.length;c+=1){var y=h[c];if(t[y]){var b=l.getBinding(e,t[y],y);r.push({name:y,property:s,binding:b})}}}return r},mt.prototype.setUniforms=function(e,t,r,s){for(var l=0,c=t;l<c.length;l+=1){var h=c[l],y=h.name,b=h.property;this.binders[b].setUniform(h.binding,s,r.get(b),y)}},mt.prototype.updatePaintBuffers=function(e){for(var t in this._buffers=[],this.binders){var r=this.binders[t];if(e&&r instanceof St){var s=e.fromScale===2?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;s&&this._buffers.push(s)}else(r instanceof gt||r instanceof vt)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}},mt.prototype.upload=function(e){for(var t in this.binders){var r=this.binders[t];(r instanceof gt||r instanceof vt||r instanceof St)&&r.upload(e)}this.updatePaintBuffers()},mt.prototype.destroy=function(){for(var e in this.binders){var t=this.binders[e];(t instanceof gt||t instanceof vt||t instanceof St)&&t.destroy()}};var ft=function(e,t,r){r===void 0&&(r=function(){return!0}),this.programConfigurations={};for(var s=0,l=e;s<l.length;s+=1){var c=l[s];this.programConfigurations[c.id]=new mt(c,t,r)}this.needsUpload=!1,this._featureMap=new ae,this._bufferOffset=0};function Yr(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 Pr(e,t,r){var s={color:{source:Qo,composite:fs},number:{source:ro,composite:Qo}},l=(function(c){return{"line-pattern":{source:Ti,composite:Ti},"fill-pattern":{source:Ti,composite:Ti},"fill-extrusion-pattern":{source:Ti,composite:Ti}}[c]})(e);return l&&l[r]||s[t][r]}ft.prototype.populatePaintArrays=function(e,t,r,s,l,c){for(var h in this.programConfigurations)this.programConfigurations[h].populatePaintArrays(e,t,s,l,c);t.id!==void 0&&this._featureMap.add(t.id,r,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0},ft.prototype.updatePaintArrays=function(e,t,r,s){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,s)||this.needsUpload}},ft.prototype.get=function(e){return this.programConfigurations[e]},ft.prototype.upload=function(e){if(this.needsUpload){for(var t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}},ft.prototype.destroy=function(){for(var e in this.programConfigurations)this.programConfigurations[e].destroy()},Ye("ConstantBinder",_t),Ye("CrossFadedConstantBinder",Et),Ye("SourceExpressionBinder",gt),Ye("CrossFadedCompositeBinder",St),Ye("CompositeExpressionBinder",vt),Ye("ProgramConfiguration",mt,{omit:["_buffers"]}),Ye("ProgramConfigurationSet",ft);var bn=Math.pow(2,14)-1,cn=-bn-1;function Ir(e){for(var t=8192/e.extent,r=e.loadGeometry(),s=0;s<r.length;s++)for(var l=r[s],c=0;c<l.length;c++){var h=l[c],y=Math.round(h.x*t),b=Math.round(h.y*t);h.x=ge(y,cn,bn),h.y=ge(b,cn,bn),(y<h.x||y>h.x+1||b<h.y||b>h.y+1)&&pt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function Or(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?Ir(e):[]}}function Zn(e,t,r,s,l){e.emplaceBack(2*t+(s+1)/2,2*r+(l+1)/2)}var Pn=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 Mo,this.indexArray=new eo,this.segments=new V,this.programConfigurations=new ft(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function no(e,t){for(var r=0;r<e.length;r++)if(Ii(t,e[r]))return!0;for(var s=0;s<t.length;s++)if(Ii(e,t[s]))return!0;return!!Ra(e,t)}function Dn(e,t,r){return!!Ii(e,t)||!!io(t,e,r)}function xi(e,t){if(e.length===1)return za(t,e[0]);for(var r=0;r<t.length;r++)for(var s=t[r],l=0;l<s.length;l++)if(Ii(e,s[l]))return!0;for(var c=0;c<e.length;c++)if(za(t,e[c]))return!0;for(var h=0;h<t.length;h++)if(Ra(e,t[h]))return!0;return!1}function li(e,t,r){if(e.length>1){if(Ra(e,t))return!0;for(var s=0;s<t.length;s++)if(io(t[s],e,r))return!0}for(var l=0;l<e.length;l++)if(io(e[l],t,r))return!0;return!1}function Ra(e,t){if(e.length===0||t.length===0)return!1;for(var r=0;r<e.length-1;r++)for(var s=e[r],l=e[r+1],c=0;c<t.length-1;c++)if(ra(s,l,t[c],t[c+1]))return!0;return!1}function ra(e,t,r,s){return nt(e,r,s)!==nt(t,r,s)&&nt(e,t,r)!==nt(e,t,s)}function io(e,t,r){var s=r*r;if(t.length===1)return e.distSqr(t[0])<s;for(var l=1;l<t.length;l++)if(na(e,t[l-1],t[l])<s)return!0;return!1}function na(e,t,r){var s=t.distSqr(r);if(s===0)return e.distSqr(t);var l=((e.x-t.x)*(r.x-t.x)+(e.y-t.y)*(r.y-t.y))/s;return e.distSqr(l<0?t:l>1?r:r.sub(t)._mult(l)._add(t))}function za(e,t){for(var r,s,l,c=!1,h=0;h<e.length;h++)for(var y=0,b=(r=e[h]).length-1;y<r.length;b=y++)(s=r[y]).y>t.y!=(l=r[b]).y>t.y&&t.x<(l.x-s.x)*(t.y-s.y)/(l.y-s.y)+s.x&&(c=!c);return c}function Ii(e,t){for(var r=!1,s=0,l=e.length-1;s<e.length;l=s++){var c=e[s],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 s=r[0],l=r[2];if(e.x<s.x&&t.x<s.x||e.x>l.x&&t.x>l.x||e.y<s.y&&t.y<s.y||e.y>l.y&&t.y>l.y)return!1;var c=nt(e,t,r[0]);return c!==nt(e,t,r[1])||c!==nt(e,t,r[2])||c!==nt(e,t,r[3])}function Ei(e,t,r){var s=t.paint.get(e).value;return s.kind==="constant"?s.value:r.programConfigurations.get(t.id).getMaxValue(e)}function Qr(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Oi(e,t,r,s,l){if(!t[0]&&!t[1])return e;var c=z.convert(t)._mult(l);r==="viewport"&&c._rotate(-s);for(var h=[],y=0;y<e.length;y++)h.push(e[y].sub(c));return h}Pn.prototype.populate=function(e,t,r){var s=this.layers[0],l=[],c=null;s.type==="circle"&&(c=s.layout.get("circle-sort-key"));for(var h=0,y=e;h<y.length;h+=1){var b=y[h],I=b.feature,C=b.id,P=b.index,D=b.sourceLayerIndex,N=this.layers[0]._featureFilter.needGeometry,X=Or(I,N);if(this.layers[0]._featureFilter.filter(new kt(this.zoom),X,r)){var H=c?c.evaluate(X,{},r):void 0,ne={id:C,properties:I.properties,type:I.type,sourceLayerIndex:D,index:P,geometry:N?X.geometry:Ir(I),patterns:{},sortKey:H};l.push(ne)}}c&&l.sort((function(Ue,ot){return Ue.sortKey-ot.sortKey}));for(var ee=0,le=l;ee<le.length;ee+=1){var de=le[ee],ve=de.geometry,be=de.index,Ce=de.sourceLayerIndex,De=e[be].feature;this.addFeature(de,ve,be,r),t.featureIndex.insert(De,ve,be,Ce,this.index)}},Pn.prototype.update=function(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)},Pn.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Pn.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Pn.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,q),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0},Pn.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Pn.prototype.addFeature=function(e,t,r,s){for(var l=0,c=t;l<c.length;l+=1)for(var h=0,y=c[l];h<y.length;h+=1){var b=y[h],I=b.x,C=b.y;if(!(I<0||I>=8192||C<0||C>=8192)){var P=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),D=P.vertexLength;Zn(this.layoutVertexArray,I,C,-1,-1),Zn(this.layoutVertexArray,I,C,1,-1),Zn(this.layoutVertexArray,I,C,1,1),Zn(this.layoutVertexArray,I,C,-1,1),this.indexArray.emplaceBack(D,D+1,D+2),this.indexArray.emplaceBack(D,D+3,D+2),P.vertexLength+=4,P.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{},s)},Ye("CircleBucket",Pn,{omit:["layers"]});var oo=new xn({"circle-sort-key":new et(U.layout_circle["circle-sort-key"])}),Ro={paint:new xn({"circle-radius":new et(U.paint_circle["circle-radius"]),"circle-color":new et(U.paint_circle["circle-color"]),"circle-blur":new et(U.paint_circle["circle-blur"]),"circle-opacity":new et(U.paint_circle["circle-opacity"]),"circle-translate":new at(U.paint_circle["circle-translate"]),"circle-translate-anchor":new at(U.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new at(U.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new at(U.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new et(U.paint_circle["circle-stroke-width"]),"circle-stroke-color":new et(U.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new et(U.paint_circle["circle-stroke-opacity"])}),layout:oo},Zt=typeof Float32Array<"u"?Float32Array:Array;function Qn(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10
1]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function On(e,t,r){var s=t[0],l=t[1],c=t[2],h=t[3],y=t[4],b=t[5],I=t[6],C=t[7],P=t[8],D=t[9],N=t[10],X=t[11],H=t[12],ne=t[13],ee=t[14],le=t[15],de=r[0],ve=r[1],be=r[2],Ce=r[3];return e[0]=de*s+ve*y+be*P+Ce*H,e[1]=de*l+ve*b+be*D+Ce*ne,e[2]=de*c+ve*I+be*N+Ce*ee,e[3]=de*h+ve*C+be*X+Ce*le,e[4]=(de=r[4])*s+(ve=r[5])*y+(be=r[6])*P+(Ce=r[7])*H,e[5]=de*l+ve*b+be*D+Ce*ne,e[6]=de*c+ve*I+be*N+Ce*ee,e[7]=de*h+ve*C+be*X+Ce*le,e[8]=(de=r[8])*s+(ve=r[9])*y+(be=r[10])*P+(Ce=r[11])*H,e[9]=de*l+ve*b+be*D+Ce*ne,e[10]=de*c+ve*I+be*N+Ce*ee,e[11]=de*h+ve*C+be*X+Ce*le,e[12]=(de=r[12])*s+(ve=r[13])*y+(be=r[14])*P+(Ce=r[15])*H,e[13]=de*l+ve*b+be*D+Ce*ne,e[14]=de*c+ve*I+be*N+Ce*ee,e[15]=de*h+ve*C+be*X+Ce*le,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 zo,Vc=On;function ds(e,t,r){var s=t[0],l=t[1],c=t[2],h=t[3];return e[0]=r[0]*s+r[4]*l+r[8]*c+r[12]*h,e[1]=r[1]*s+r[5]*l+r[9]*c+r[13]*h,e[2]=r[2]*s+r[6]*l+r[10]*c+r[14]*h,e[3]=r[3]*s+r[7]*l+r[11]*c+r[15]*h,e}zo=new Zt(3),Zt!=Float32Array&&(zo[0]=0,zo[1]=0,zo[2]=0),(function(){var e=new Zt(4);Zt!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0)})();var jc=((function(){var e=new Zt(2);Zt!=Float32Array&&(e[0]=0,e[1]=0)})(),(function(e){function t(r){e.call(this,r,Ro)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.createBucket=function(r){return new Pn(r)},t.prototype.queryRadius=function(r){var s=r;return Ei("circle-radius",this,s)+Ei("circle-stroke-width",this,s)+Qr(this.paint.get("circle-translate"))},t.prototype.queryIntersectsFeature=function(r,s,l,c,h,y,b,I){for(var C=Oi(r,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),y.angle,b),P=this.paint.get("circle-radius").evaluate(s,l)+this.paint.get("circle-stroke-width").evaluate(s,l),D=this.paint.get("circle-pitch-alignment")==="map",N=D?C:(function(De,Ue){return De.map((function(ot){return Da(ot,Ue)}))})(C,I),X=D?P*b:P,H=0,ne=c;H<ne.length;H+=1)for(var ee=0,le=ne[H];ee<le.length;ee+=1){var de=le[ee],ve=D?de:Da(de,I),be=X,Ce=ds([],[de.x,de.y,0,1],I);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?be*=Ce[3]/y.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(be*=y.cameraToCenterDistance/Ce[3]),Dn(N,ve,be))return!0}return!1},t})(Si));function Da(e,t){var r=ds([],[e.x,e.y,0,1],t);return new z(r[0]/r[3],r[1]/r[3])}var Ml=(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t})(Pn);function ia(e,t,r,s){var l=t.width,c=t.height;if(s){if(s instanceof Uint8ClampedArray)s=new Uint8Array(s.buffer);else if(s.length!==l*c*r)throw new RangeError("mismatched image size")}else s=new Uint8Array(l*c*r);return e.width=l,e.height=c,e.data=s,e}
vendor: 13,221 bytes, line 1
1function ys(e,t,r){var s=t.width,l=t.height;if(s!==e.width||l!==e.height){var c=ia({},{width:s,height:l},r);Gc(e,c,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,s),height:Math.min(e.height,l)},r),e.width=s,e.height=l,e.data=c.data}}function Gc(e,t,r,s,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||s.x>t.width-l.width||s.y>t.height-l.height)throw new RangeError("out of range destination coordinates for image copy");for(var h=e.data,y=t.data,b=0;b<l.height;b++)for(var I=((r.y+b)*e.width+r.x)*c,C=((s.y+b)*t.width+s.x)*c,P=0;P<l.width*c;P++)y[C+P]=h[I+P];return t}Ye("HeatmapBucket",Ml,{omit:["layers"]});var Oa=function(e,t){ia(this,e,1,t)};Oa.prototype.resize=function(e){ys(this,e,1)},Oa.prototype.clone=function(){return new Oa({width:this.width,height:this.height},new Uint8Array(this.data))},Oa.copy=function(e,t,r,s,l){Gc(e,t,r,s,l,1)};var Wn=function(e,t){ia(this,e,4,t)};Wn.prototype.resize=function(e){ys(this,e,4)},Wn.prototype.replace=function(e,t){t?this.data.set(e):this.data=e instanceof Uint8ClampedArray?new Uint8Array(e.buffer):e},Wn.prototype.clone=function(){return new Wn({width:this.width,height:this.height},new Uint8Array(this.data))},Wn.copy=function(e,t,r,s,l){Gc(e,t,r,s,l,4)},Ye("AlphaImage",Oa),Ye("RGBAImage",Wn);var t1={paint:new xn({"heatmap-radius":new et(U.paint_heatmap["heatmap-radius"]),"heatmap-weight":new et(U.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new at(U.paint_heatmap["heatmap-intensity"]),"heatmap-color":new _i(U.paint_heatmap["heatmap-color"]),"heatmap-opacity":new at(U.paint_heatmap["heatmap-opacity"])})};function pm(e){var t={},r=e.resolution||256,s=e.clips?e.clips.length:1,l=e.image||new Wn({width:r,height:s}),c=function(X,H,ne){t[e.evaluationKey]=ne;var ee=e.expression.evaluate(t);l.data[X+H+0]=Math.floor(255*ee.r/ee.a),l.data[X+H+1]=Math.floor(255*ee.g/ee.a),l.data[X+H+2]=Math.floor(255*ee.b/ee.a),l.data[X+H+3]=Math.floor(255*ee.a)};if(e.clips)for(var h=0,y=0;h<s;++h,y+=4*r)for(var b=0,I=0;b<r;b++,I+=4){var C=b/(r-1),P=e.clips[h];c(y,I,P.start*(1-C)+P.end*C)}else for(var D=0,N=0;D<r;D++,N+=4)c(0,N,D/(r-1));return l}var r1=(function(e){function t(r){e.call(this,r,t1),this._updateColorRamp()}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.createBucket=function(r){return new Ml(r)},t.prototype._handleSpecialPaintPropertyUpdate=function(r){r==="heatmap-color"&&this._updateColorRamp()},t.prototype._updateColorRamp=function(){this.colorRamp=pm({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})(Si),n1={paint:new xn({"hillshade-illumination-direction":new at(U.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new at(U.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new at(U.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new at(U.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new at(U.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new at(U.paint_hillshade["hillshade-accent-color"])})},i1=(function(e){function t(r){e.call(this,r,n1)}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})(Si),o1=ln([{name:"a_pos",components:2,type:"Int16"}],4).members,$c=kl,a1=kl;function kl(e,t,r){r=r||2;var s,l,c,h,y,b,I,C=t&&t.length,P=C?t[0]*r:e.length,D=hm(e,0,P,r,!0),N=[];if(!D||D.next===D.prev)return N;if(C&&(D=(function(H,ne,ee,le){var de,ve,be,Ce=[];for(de=0,ve=ne.length;de<ve;de++)(be=hm(H,ne[de]*le,de<ve-1?ne[de+1]*le:H.length,le,!1))===be.next&&(be.steiner=!0),Ce.push(d1(be));for(Ce.sort(p1),de=0;de<Ce.length;de++)h1(Ce[de],ee),ee=oa(ee,ee.next);return ee})(e,t,D,r)),e.length>80*r){s=c=e[0],l=h=e[1];for(var X=r;X<P;X+=r)(y=e[X])<s&&(s=y),(b=e[X+1])<l&&(l=b),y>c&&(c=y),b>h&&(h=b);I=(I=Math.max(c-s,h-l))!==0?1/I:0}return xu(D,N,r,s,l,I),N}function hm(e,t,r,s,l){var c,h;if(l===Xc(e,t,r,s)>0)for(c=t;c<r;c+=s)h=ym(c,e[c],e[c+1],h);else for(c=r-s;c>=t;c-=s)h=ym(c,e[c],e[c+1],h);return h&&Rl(h,h.next)&&(wu(h),h=h.next),h}function oa(e,t){if(!e)return e;t||(t=e);var r,s=e;do if(r=!1,s.steiner||!Rl(s,s.next)&&Xr(s.prev,s,s.next)!==0)s=s.next;else{if(wu(s),(s=t=s.prev)===s.next)break;r=!0}while(r||s!==t);return t}function xu(e,t,r,s,l,c,h){if(e){!h&&c&&(function(C,P,D,N){var X=C;do X.z===null&&(X.z=Zc(X.x,X.y,P,D,N)),X.prevZ=X.prev,X.nextZ=X.next,X=X.next;while(X!==C);X.prevZ.nextZ=null,X.prevZ=null,(function(H){var ne,ee,le,de,ve,be,Ce,De,Ue=1;do{for(ee=H,H=null,ve=null,be=0;ee;){for(be++,le=ee,Ce=0,ne=0;ne<Ue&&(Ce++,le=le.nextZ);ne++);for(De=Ue;Ce>0||De>0&&le;)Ce!==0&&(De===0||!le||ee.z<=le.z)?(de=ee,ee=ee.nextZ,Ce--):(de=le,le=le.nextZ,De--),ve?ve.nextZ=de:H=de,de.prevZ=ve,ve=de;ee=le}ve.nextZ=null,Ue*=2}while(be>1)})(X)})(e,s,l,c);for(var y,b,I=e;e.prev!==e.next;)if(y=e.prev,b=e.next,c?u1(e,s,l,c):s1(e))t.push(y.i/r),t.push(e.i/r),t.push(b.i/r),wu(e),e=b.next,I=b.next;else if((e=b)===I){h?h===1?xu(e=l1(oa(e),t,r),t,r,s,l,c,2):h===2&&c1(e,t,r,s,l,c):xu(oa(e),t,r,s,l,c,1);break}}}function s1(e){var t=e.prev,r=e,s=e.next;if(Xr(t,r,s)>=0)return!1;for(var l=e.next.next;l!==e.prev;){if(ms(t.x,t.y,r.x,r.y,s.x,s.y,l.x,l.y)&&Xr(l.prev,l,l.next)>=0)return!1;l=l.next}return!0}function u1(e,t,r,s){var l=e.prev,c=e,h=e.next;if(Xr(l,c,h)>=0)return!1;for(var y=l.x>c.x?l.x>h.x?l.x:h.x:c.x>h.x?c.x:h.x,b=l.y>c.y?l.y>h.y?l.y:h.y:c.y>h.y?c.y:h.y,I=Zc(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,s),C=Zc(y,b,t,r,s),P=e.prevZ,D=e.nextZ;P&&P.z>=I&&D&&D.z<=C;){if(P!==e.prev&&P!==e.next&&ms(l.x,l.y,c.x,c.y,h.x,h.y,P.x,P.y)&&Xr(P.prev,P,P.next)>=0||(P=P.prevZ,D!==e.prev&&D!==e.next&&ms(l.x,l.y,c.x,c.y,h.x,h.y,D.x,D.y)&&Xr(D.prev,D,D.next)>=0))return!1;D=D.nextZ}for(;P&&P.z>=I;){if(P!==e.prev&&P!==e.next&&ms(l.x,l.y,c.x,c.y,h.x,h.y,P.x,P.y)&&Xr(P.prev,P,P.next)>=0)return!1;P=P.prevZ}for(;D&&D.z<=C;){if(D!==e.prev&&D!==e.next&&ms(l.x,l.y,c.x,c.y,h.x,h.y,D.x,D.y)&&Xr(D.prev,D,D.next)>=0)return!1;D=D.nextZ}return!0}function l1(e,t,r){var s=e;do{var l=s.prev,c=s.next.next;!Rl(l,c)&&fm(l,s,s.next,c)&&bu(l,c)&&bu(c,l)&&(t.push(l.i/r),t.push(s.i/r),t.push(c.i/r),wu(s),wu(s.next),s=e=c),s=s.next}while(s!==e);return oa(s)}function c1(e,t,r,s,l,c){var h=e;do{for(var y=h.next.next;y!==h.prev;){if(h.i!==y.i&&y1(h,y)){var b=dm(h,y);return h=oa(h,h.next),b=oa(b,b.next),xu(h,t,r,s,l,c),void xu(b,t,r,s,l,c)}y=y.next}h=h.next}while(h!==e)}function p1(e,t){return e.x-t.x}function h1(e,t){if(t=(function(s,l){var c,h=l,y=s.x,b=s.y,I=-1/0;do{if(b<=h.y&&b>=h.next.y&&h.next.y!==h.y){var C=h.x+(b-h.y)*(h.next.x-h.x)/(h.next.y-h.y);if(C<=y&&C>I){if(I=C,C===y){if(b===h.y)return h;if(b===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(y===I)return c;var P,D=c,N=c.x,X=c.y,H=1/0;h=c;do y>=h.x&&h.x>=N&&y!==h.x&&ms(b<X?y:I,b,N,X,b<X?I:y,b,h.x,h.y)&&(P=Math.abs(b-h.y)/(y-h.x),bu(h,s)&&(P<H||P===H&&(h.x>c.x||h.x===c.x&&f1(c,h)))&&(c=h,H=P)),h=h.next;while(h!==D);return c})(e,t)){var r=dm(t,e);oa(t,t.next),oa(r,r.next)}}function f1(e,t){return Xr(e.prev,e,t.prev)<0&&Xr(t.next,e,e.next)<0}function Zc(e,t,r,s,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-s)*l)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function d1(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 ms(e,t,r,s,l,c,h,y){return(l-h)*(t-y)-(e-h)*(c-y)>=0&&(e-h)*(s-y)-(r-h)*(t-y)>=0&&(r-h)*(c-y)-(l-h)*(s-y)>=0}function y1(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!(function(r,s){var l=r;do{if(l.i!==r.i&&l.next.i!==r.i&&l.i!==s.i&&l.next.i!==s.i&&fm(l,l.next,r,s))return!0;l=l.next}while(l!==r);return!1})(e,t)&&(bu(e,t)&&bu(t,e)&&(function(r,s){var l=r,c=!1,h=(r.x+s.x)/2,y=(r.y+s.y)/2;do l.y>y!=l.next.y>y&&l.next.y!==l.y&&h<(l.next.x-l.x)*(y-l.y)/(l.next.y-l.y)+l.x&&(c=!c),l=l.next;while(l!==r);return c})(e,t)&&(Xr(e.prev,e,t.prev)||Xr(e,t.prev,t))||Rl(e,t)&&Xr(e.prev,e,e.next)>0&&Xr(t.prev,t,t.next)>0)}function Xr(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Rl(e,t){return e.x===t.x&&e.y===t.y}function fm(e,t,r,s){var l=Ll(Xr(e,t,r)),c=Ll(Xr(e,t,s)),h=Ll(Xr(r,s,e)),y=Ll(Xr(r,s,t));return l!==c&&h!==y||!(l!==0||!zl(e,r,t))||!(c!==0||!zl(e,s,t))||!(h!==0||!zl(r,e,s))||!(y!==0||!zl(r,t,s))}function zl(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 Ll(e){return e>0?1:e<0?-1:0}function bu(e,t){return Xr(e.prev,e,e.next)<0?Xr(e,t,e.next)>=0&&Xr(e,e.prev,t)>=0:Xr(e,t,e.prev)<0||Xr(e,e.next,t)<0}function dm(e,t){var r=new Wc(e.i,e.x,e.y),s=new Wc(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,s.next=r,r.prev=s,c.next=s,s.prev=c,s}function ym(e,t,r,s){var l=new Wc(e,t,r);return s?(l.next=s.next,l.prev=s,s.next.prev=l,s.next=l):(l.prev=l,l.next=l),l}function wu(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 Wc(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 Xc(e,t,r,s){for(var l=0,c=t,h=r-s;c<r;c+=s)l+=(e[h]-e[c])*(e[c+1]+e[h+1]),h=c;return l}function m1(e,t,r,s,l){(function c(h,y,b,I,C){for(;I>b;){if(I-b>600){var P=I-b+1,D=y-b+1,N=Math.log(P),X=.5*Math.exp(2*N/3),H=.5*Math.sqrt(N*X*(P-X)/P)*(D-P/2<0?-1:1);c(h,y,Math.max(b,Math.floor(y-D*X/P+H)),Math.min(I,Math.floor(y+(P-D)*X/P+H)),C)}var ne=h[y],ee=b,le=I;for(Su(h,b,y),C(h[I],ne)>0&&Su(h,b,I);ee<le;){for(Su(h,ee,le),ee++,le--;C(h[ee],ne)<0;)ee++;for(;C(h[le],ne)>0;)le--}C(h[b],ne)===0?Su(h,b,le):Su(h,++le,I),le<=y&&(b=le+1),y<=le&&(I=le-1)}})(e,t,r,s||e.length-1,l||v1)}function Su(e,t,r){var s=e[t];e[t]=e[r],e[r]=s}function v1(e,t){return e<t?-1:e>t?1:0}function Hc(e,t){var r=e.length;if(r<=1)return[e];for(var s,l,c=[],h=0;h<r;h++){var y=Qt(e[h]);y!==0&&(e[h].area=Math.abs(y),l===void 0&&(l=y<0),l===y<0?(s&&c.push(s),s=[e[h]]):s.push(e[h]))}if(s&&c.push(s),t>1)for(var b=0;b<c.length;b++)c[b].length<=t||(m1(c[b],t,1,c[b].length-1,g1),c[b]=c[b].slice(0,t));return c}function g1(e,t){return t.area-e.area}function Kc(e,t,r){for(var s=r.patternDependencies,l=!1,c=0,h=t;c<h.length;c+=1){var y=h[c].paint.get(e+"-pattern");y.isConstant()||(l=!0);var b=y.constantOr(null);b&&(l=!0,s[b.to]=!0,s[b.from]=!0)}return l}function Jc(e,t,r,s,l){for(var c=l.patternDependencies,h=0,y=t;h<y.length;h+=1){var b=y[h],I=b.paint.get(e+"-pattern").value;if(I.kind!=="constant"){var C=I.evaluate({zoom:s-1},r,{},l.availableImages),P=I.evaluate({zoom:s},r,{},l.availableImages),D=I.evaluate({zoom:s+1},r,{},l.availableImages);P=P&&P.name?P.name:P,D=D&&D.name?D.name:D,c[C=C&&C.name?C.name:C]=!0,c[P]=!0,c[D]=!0,r.patterns[b.id]={min:C,mid:P,max:D}}}return r}kl.deviation=function(e,t,r,s){var l=t&&t.length,c=Math.abs(Xc(e,0,l?t[0]*r:e.length,r));if(l)for(var h=0,y=t.length;h<y;h++)c-=Math.abs(Xc(e,t[h]*r,h<y-1?t[h+1]*r:e.length,r));var b=0;for(h=0;h<s.length;h+=3){var I=s[h]*r,C=s[h+1]*r,P=s[h+2]*r;b+=Math.abs((e[I]-e[P])*(e[C+1]-e[I+1])-(e[I]-e[C])*(e[P+1]-e[I+1]))}return c===0&&b===0?0:Math.abs((b-c)/c)},kl.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},s=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(s+=e[l-1].length)}return r},$c.default=a1;var Bi=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 Mo,this.indexArray=new eo,this.indexArray2=new ka,this.programConfigurations=new ft(e.layers,e.zoom),this.segments=new V,this.segments2=new V,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};Bi.prototype.populate=function(e,t,r){this.hasPattern=Kc("fill",this.layers,t);for(var s=this.layers[0].layout.get("fill-sort-key"),l=[],c=0,h=e;c<h.length;c+=1){var y=h[c],b=y.feature,I=y.id,C=y.index,P=y.sourceLayerIndex,D=this.layers[0]._featureFilter.needGeometry,N=Or(b,D);if(this.layers[0]._featureFilter.filter(new kt(this.zoom),N,r)){var X=s?s.evaluate(N,{},r,t.availableImages):void 0,H={id:I,properties:b.properties,type:b.type,sourceLayerIndex:P,index:C,geometry:D?N.geometry:Ir(b),patterns:{},sortKey:X};l.push(H)}}s&&l.sort((function(De,Ue){return De.sortKey-Ue.sortKey}
1));for(var ne=0,ee=l;ne<ee.length;ne+=1){var le=ee[ne],de=le.geometry,ve=le.index,be=le.sourceLayerIndex;if(this.hasPattern){var Ce=Jc("fill",this.layers,le,this.zoom,t);this.patternFeatures.push(Ce)}else this.addFeature(le,de,ve,r,{});t.featureIndex.insert(e[ve].feature,de,ve,be,this.index)}},Bi.prototype.update=function(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)},Bi.prototype.addFeatures=function(e,t,r){for(var s=0,l=this.patternFeatures;s<l.length;s+=1){var c=l[s];this.addFeature(c,c.geometry,c.index,t,r)}},Bi.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Bi.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Bi.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,o1),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0},Bi.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},Bi.prototype.addFeature=function(e,t,r,s,l){for(var c=0,h=Hc(t,500);c<h.length;c+=1){for(var y=h[c],b=0,I=0,C=y;I<C.length;I+=1)b+=C[I].length;for(var P=this.segments.prepareSegment(b,this.layoutVertexArray,this.indexArray),D=P.vertexLength,N=[],X=[],H=0,ne=y;H<ne.length;H+=1){var ee=ne[H];if(ee.length!==0){ee!==y[0]&&X.push(N.length/2);var le=this.segments2.prepareSegment(ee.length,this.layoutVertexArray,this.indexArray2),de=le.vertexLength;this.layoutVertexArray.emplaceBack(ee[0].x,ee[0].y),this.indexArray2.emplaceBack(de+ee.length-1,de),N.push(ee[0].x),N.push(ee[0].y);for(var ve=1;ve<ee.length;ve++)this.layoutVertexArray.emplaceBack(ee[ve].x,ee[ve].y),this.indexArray2.emplaceBack(de+ve-1,de+ve),N.push(ee[ve].x),N.push(ee[ve].y);le.vertexLength+=ee.length,le.primitiveLength+=ee.length}}for(var be=$c(N,X),Ce=0;Ce<be.length;Ce+=3)this.indexArray.emplaceBack(D+be[Ce],D+be[Ce+1],D+be[Ce+2]);P.vertexLength+=b,P.primitiveLength+=be.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,l,s)},Ye("FillBucket",Bi,{omit:["layers","patternFeatures"]});var _1=new xn({"fill-sort-key":new et(U.layout_fill["fill-sort-key"])}),x1={paint:new xn({"fill-antialias":new at(U.paint_fill["fill-antialias"]),"fill-opacity":new et(U.paint_fill["fill-opacity"]),"fill-color":new et(U.paint_fill["fill-color"]),"fill-outline-color":new et(U.paint_fill["fill-outline-color"]),"fill-translate":new at(U.paint_fill["fill-translate"]),"fill-translate-anchor":new at(U.paint_fill["fill-translate-anchor"]),"fill-pattern":new ls(U.paint_fill["fill-pattern"])}),layout:_1},b1=(function(e){function t(r){e.call(this,r,x1)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.recalculate=function(r,s){e.prototype.recalculate.call(this,r,s);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 Bi(r)},t.prototype.queryRadius=function(){return Qr(this.paint.get("fill-translate"))},t.prototype.queryIntersectsFeature=function(r,s,l,c,h,y,b){return xi(Oi(r,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),y.angle,b),c)},t.prototype.isTileClipped=function(){return!0},t})(Si),w1=ln([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,mm=vs;function vs(e,t,r,s,l){this.properties={},this.extent=r,this.type=0,this._pbf=e,this._geometry=-1,this._keys=s,this._values=l,e.readFields(S1,this,t)}function S1(e,t,r){e==1?t.id=r.readVarint():e==2?(function(s,l){for(var c=s.readVarint()+s.pos;s.pos<c;){var h=l._keys[s.readVarint()],y=l._values[s.readVarint()];l.properties[h]=y}})(r,t):e==3?t.type=r.readVarint():e==4&&(t._geometry=r.pos)}function T1(e){for(var t,r,s=0,l=0,c=e.length,h=c-1;l<c;h=l++)s+=((r=e[h]).x-(t=e[l]).x)*(t.y+r.y);return s}vs.types=["Unknown","Point","LineString","Polygon"],vs.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t,r=e.readVarint()+e.pos,s=1,l=0,c=0,h=0,y=[];e.pos<r;){if(l<=0){var b=e.readVarint();s=7&b,l=b>>3}if(l--,s===1||s===2)c+=e.readSVarint(),h+=e.readSVarint(),s===1&&(t&&y.push(t),t=[]),t.push(new z(c,h));else{if(s!==7)throw new Error("unknown command "+s);t&&t.push(t[0].clone())}}return t&&y.push(t),y},vs.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,s=0,l=0,c=0,h=1/0,y=-1/0,b=1/0,I=-1/0;e.pos<t;){if(s<=0){var C=e.readVarint();r=7&C,s=C>>3}if(s--,r===1||r===2)(l+=e.readSVarint())<h&&(h=l),l>y&&(y=l),(c+=e.readSVarint())<b&&(b=c),c>I&&(I=c);else if(r!==7)throw new Error("unknown command "+r)}
1return[h,b,y,I]},vs.prototype.toGeoJSON=function(e,t,r){var s,l,c=this.extent*Math.pow(2,r),h=this.extent*e,y=this.extent*t,b=this.loadGeometry(),I=vs.types[this.type];function C(N){for(var X=0;X<N.length;X++){var H=N[X];N[X]=[360*(H.x+h)/c-180,360/Math.PI*Math.atan(Math.exp((180-360*(H.y+y)/c)*Math.PI/180))-90]}}switch(this.type){case 1:var P=[];for(s=0;s<b.length;s++)P[s]=b[s][0];C(b=P);break;case 2:for(s=0;s<b.length;s++)C(b[s]);break;case 3:for(b=(function(N){var X=N.length;if(X<=1)return[N];for(var H,ne,ee=[],le=0;le<X;le++){var de=T1(N[le]);de!==0&&(ne===void 0&&(ne=de<0),ne===de<0?(H&&ee.push(H),H=[N[le]]):H.push(N[le]))}return H&&ee.push(H),ee})(b),s=0;s<b.length;s++)for(l=0;l<b[s].length;l++)C(b[s][l])}b.length===1?b=b[0]:I="Multi"+I;var D={type:"Feature",geometry:{type:I,coordinates:b},properties:this.properties};return"id"in this&&(D.id=this.id),D};var vm=gm;function gm(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(I1,this,t),this.length=this._features.length}function I1(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(s){for(var l=null,c=s.readVarint()+s.pos;s.pos<c;){var h=s.readVarint()>>3;l=h===1?s.readString():h===2?s.readFloat():h===3?s.readDouble():h===4?s.readVarint64():h===5?s.readVarint():h===6?s.readSVarint():h===7?s.readBoolean():null}return l})(r))}function E1(e,t,r){if(e===3){var s=new vm(r,r.readVarint()+r.pos);s.length&&(t[s.name]=s)}}gm.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 mm(this._pbf,t,this.extent,this._keys,this._values)};var gs={VectorTile:function(e,t){this.layers=e.readFields(E1,{},t)},VectorTileFeature:mm,VectorTileLayer:vm},A1=gs.VectorTileFeature.types,Yc=Math.pow(2,13);function Tu(e,t,r,s,l,c,h,y){e.emplaceBack(t,r,2*Math.floor(s*Yc)+h,l*Yc*2,c*Yc*2,Math.round(y))}var Fi=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 Di,this.indexArray=new eo,this.programConfigurations=new ft(e.layers,e.zoom),this.segments=new V,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function C1(e,t){return e.x===t.x&&(e.x<0||e.x>8192)||e.y===t.y&&(e.y<0||e.y>8192)}Fi.prototype.populate=function(e,t,r){this.features=[],this.hasPattern=Kc("fill-extrusion",this.layers,t);for(var s=0,l=e;s<l.length;s+=1){var c=l[s],h=c.feature,y=c.id,b=c.index,I=c.sourceLayerIndex,C=this.layers[0]._featureFilter.needGeometry,P=Or(h,C);if(this.layers[0]._featureFilter.filter(new kt(this.zoom),P,r)){var D={id:y,sourceLayerIndex:I,index:b,geometry:C?P.geometry:Ir(h),properties:h.properties,type:h.type,patterns:{}};this.hasPattern?this.features.push(Jc("fill-extrusion",this.layers,D,this.zoom,t)):this.addFeature(D,D.geometry,b,r,{}),t.featureIndex.insert(h,D.geometry,b,I,this.index,!0)}}},Fi.prototype.addFeatures=function(e,t,r){for(var s=0,l=this.features;s<l.length;s+=1){var c=l[s];this.addFeature(c,c.geometry,c.index,t,r)}},Fi.prototype.update=function(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)},Fi.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Fi.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Fi.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,w1),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0},Fi.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Fi.prototype.addFeature=function(e,t,r,s,l){for(var c=0,h=Hc(t,500);c<h.length;c+=1){for(var y=h[c],b=0,I=0,C=y;I<C.length;I+=1)b+=C[I].length;for(var P=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),D=0,N=y;D<N.length;D+=1){var X=N[D];if(X.length!==0&&!((Ct=X).every((function(bt){return bt.x<0}))||Ct.every((function(bt){return bt.x>8192}))||Ct.every((function(bt){return bt.y<0}))||Ct.every((function(bt){return bt.y>8192}))))for(var H=0,ne=0;ne<X.length;ne++){var ee=X[ne];
vendor: 4,680 bytes, line 1
1if(ne>=1){var le=X[ne-1];if(!C1(ee,le)){P.vertexLength+4>V.MAX_VERTEX_ARRAY_LENGTH&&(P=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var de=ee.sub(le)._perp()._unit(),ve=le.dist(ee);H+ve>32768&&(H=0),Tu(this.layoutVertexArray,ee.x,ee.y,de.x,de.y,0,0,H),Tu(this.layoutVertexArray,ee.x,ee.y,de.x,de.y,0,1,H),Tu(this.layoutVertexArray,le.x,le.y,de.x,de.y,0,0,H+=ve),Tu(this.layoutVertexArray,le.x,le.y,de.x,de.y,0,1,H);var be=P.vertexLength;this.indexArray.emplaceBack(be,be+2,be+1),this.indexArray.emplaceBack(be+1,be+2,be+3),P.vertexLength+=4,P.primitiveLength+=2}}}}if(P.vertexLength+b>V.MAX_VERTEX_ARRAY_LENGTH&&(P=this.segments.prepareSegment(b,this.layoutVertexArray,this.indexArray)),A1[e.type]==="Polygon"){for(var Ce=[],De=[],Ue=P.vertexLength,ot=0,$e=y;ot<$e.length;ot+=1){var ut=$e[ot];if(ut.length!==0){ut!==y[0]&&De.push(Ce.length/2);for(var Xe=0;Xe<ut.length;Xe++){var At=ut[Xe];Tu(this.layoutVertexArray,At.x,At.y,0,0,1,1,0),Ce.push(At.x),Ce.push(At.y)}}}for(var dt=$c(Ce,De),tt=0;tt<dt.length;tt+=3)this.indexArray.emplaceBack(Ue+dt[tt],Ue+dt[tt+2],Ue+dt[tt+1]);P.primitiveLength+=dt.length/3,P.vertexLength+=b}}var Ct;this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,l,s)},Ye("FillExtrusionBucket",Fi,{omit:["layers","features"]});var P1={paint:new xn({"fill-extrusion-opacity":new at(U["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new et(U["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new at(U["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new at(U["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new ls(U["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new et(U["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new et(U["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new at(U["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},M1=(function(e){function t(r){e.call(this,r,P1)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.createBucket=function(r){return new Fi(r)},t.prototype.queryRadius=function(){return Qr(this.paint.get("fill-extrusion-translate"))},t.prototype.is3D=function(){return!0},t.prototype.queryIntersectsFeature=function(r,s,l,c,h,y,b,I){var C=Oi(r,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),y.angle,b),P=this.paint.get("fill-extrusion-height").evaluate(s,l),D=this.paint.get("fill-extrusion-base").evaluate(s,l),N=(function(H,ne,ee,le){for(var de=[],ve=0,be=H;ve<be.length;ve+=1){var Ce=be[ve],De=[Ce.x,Ce.y,0,1];ds(De,De,ne),de.push(new z(De[0]/De[3],De[1]/De[3]))}return de})(C,I),X=(function(H,ne,ee,le){for(var de=[],ve=[],be=le[8]*ne,Ce=le[9]*ne,De=le[10]*ne,Ue=le[11]*ne,ot=le[8]*ee,$e=le[9]*ee,ut=le[10]*ee,Xe=le[11]*ee,At=0,dt=H;At<dt.length;At+=1){for(var tt=[],Ct=[],bt=0,Bt=dt[At];bt<Bt.length;bt+=1){var lt=Bt[bt],Ut=lt.x,xr=lt.y,Mr=le[0]*Ut+le[4]*xr+le[12],Er=le[1]*Ut+le[5]*xr+le[13],br=le[2]*Ut+le[6]*xr+le[14],kr=le[3]*Ut+le[7]*xr+le[15],en=br+De,tn=kr+Ue,kn=Mr+ot,hn=Er+$e,Rn=br+ut,Br=kr+Xe,fn=new z((Mr+be)/tn,(Er+Ce)/tn);fn.z=en/tn,tt.push(fn);var Rt=new z(kn/Br,hn/Br);Rt.z=Rn/Br,Ct.push(Rt)}de.push(tt),ve.push(Ct)}return[de,ve]})(c,D,P,I);return(function(H,ne,ee){var le=1/0;xi(ee,ne)&&(le=_m(ee,ne[0]));for(var de=0;de<ne.length;de++)for(var ve=ne[de],be=H[de],Ce=0;Ce<ve.length-1;Ce++){var De=ve[Ce],Ue=[De,ve[Ce+1],be[Ce+1],be[Ce],De];no(ee,Ue)&&(le=Math.min(le,_m(ee,Ue)))}return le!==1/0&&le})(X[0],X[1],N)},t})(Si);function Iu(e,t){return e.x*t.x+e.y*t.y}function _m(e,t){if(e.length===1){for(var r,s=0,l=t[s++];!r||l.equals(r);)if(!(r=t[s++]))return 1/0;for(;s<t.length;s++){var c=t[s],h=e[0],y=r.sub(l),b=c.sub(l),I=h.sub(l),C=Iu(y,y),P=Iu(y,b),D=Iu(b,b),N=Iu(I,y),X=Iu(I,b),H=C*D-P*P,ne=(D*N-P*X)/H,ee=(C*X-P*N)/H,le=l.z*(1-ne-ee)+r.z*ne+c.z*ee;if(isFinite(le))return le}return 1/0}for(var de=1/0,ve=0,be=t;ve<be.length;ve+=1)de=Math.min(de,be[ve].z);return de}var k1=ln([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,R1=ln([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]).members,z1=gs.VectorTileFeature.types,L1=Math.cos(Math.PI/180*37.5),xm=Math.pow(2,14)/.5,Bn=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={}
1,this.layers.forEach((function(r){t.gradients[r.id]={}})),this.layoutVertexArray=new $n,this.layoutVertexArray2=new Qo,this.indexArray=new eo,this.programConfigurations=new ft(e.layers,e.zoom),this.segments=new V,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((function(r){return r.isStateDependent()})).map((function(r){return r.id}))};Bn.prototype.populate=function(e,t,r){this.hasPattern=Kc("line",this.layers,t);for(var s=this.layers[0].layout.get("line-sort-key"),l=[],c=0,h=e;c<h.length;c+=1){var y=h[c],b=y.feature,I=y.id,C=y.index,P=y.sourceLayerIndex,D=this.layers[0]._featureFilter.needGeometry,N=Or(b,D);if(this.layers[0]._featureFilter.filter(new kt(this.zoom),N,r)){var X=s?s.evaluate(N,{},r):void 0,H={id:I,properties:b.properties,type:b.type,sourceLayerIndex:P,index:C,geometry:D?N.geometry:Ir(b),patterns:{},sortKey:X};l.push(H)}}s&&l.sort((function(De,Ue){return De.sortKey-Ue.sortKey}));for(var ne=0,ee=l;ne<ee.length;ne+=1){var le=ee[ne],de=le.geometry,ve=le.index,be=le.sourceLayerIndex;if(this.hasPattern){var Ce=Jc("line",this.layers,le,this.zoom,t);this.patternFeatures.push(Ce)}else this.addFeature(le,de,ve,r,{});t.featureIndex.insert(e[ve].feature,de,ve,be,this.index)}},Bn.prototype.update=function(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)},Bn.prototype.addFeatures=function(e,t,r){for(var s=0,l=this.patternFeatures;s<l.length;s+=1){var c=l[s];this.addFeature(c,c.geometry,c.index,t,r)}},Bn.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Bn.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Bn.prototype.upload=function(e){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,R1)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,k1),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0},Bn.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Bn.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}},Bn.prototype.addFeature=function(e,t,r,s,l){var c=this.layers[0].layout,h=c.get("line-join").evaluate(e,{}),y=c.get("line-cap"),b=c.get("line-miter-limit"),I=c.get("line-round-limit");this.lineClips=this.lineFeatureClips(e);for(var C=0,P=t;C<P.length;C+=1)this.addLine(P[C],e,h,y,b,I);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,l,s)},Bn.prototype.addLine=function(e,t,r,s,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 y=z1[t.type]==="Polygon",b=e.length;b>=2&&e[b-1].equals(e[b-2]);)b--;for(var I=0;I<b-1&&e[I].equals(e[I+1]);)I++;if(!(b<(y?3:2))){r==="bevel"&&(l=1.05);var C,P=this.overscaling<=16?122880/(512*this.overscaling):0,D=this.segments.prepareSegment(10*b,this.layoutVertexArray,this.indexArray),N=void 0,X=void 0,H=void 0,ne=void 0;this.e1=this.e2=-1,y&&(ne=e[I].sub(C=e[b-2])._unit()._perp());for(var ee=I;ee<b;ee++)if(!(X=ee===b-1?y?e[I+1]:void 0:e[ee+1])||!e[ee].equals(X)){ne&&(H=ne),C&&(N=C),C=e[ee],ne=X?X.sub(C)._unit()._perp():H;var le=(H=H||ne).add(ne);le.x===0&&le.y===0||le._unit();var de=H.x*ne.x+H.y*ne.y,ve=le.x*ne.x+le.y*ne.y,be=ve!==0?1/ve:1/0,Ce=2*Math.sqrt(2-2*ve),De=ve<L1&&N&&X,Ue=H.x*ne.y-H.y*ne.x>0;if(De&&ee>I){var ot=C.dist(N);if(ot>2*P){var $e=C.sub(C.sub(N)._mult(P/ot)._round());this.updateDistance(N,$e),this.addCurrentVertex($e,H,0,0,D),N=$e}}var ut=N&&X,Xe=ut?r:y?"butt":s;if(ut&&Xe==="round"&&(be<c?Xe="miter":be<=2&&(Xe="fakeround")),Xe==="miter"&&be>l&&(Xe="bevel"),Xe==="bevel"&&(be>2&&(Xe="flipbevel"),be<l&&(Xe="miter")),N&&this.updateDistance(N,C),Xe==="miter")le._mult(be),this.addCurrentVertex(C,le,0,0,D);else if(Xe==="flipbevel"){if(be>100)le=ne.mult(-1);else{var At=be*H.add(ne).mag()/H.sub(ne).mag();le._perp()._mult(At*(Ue?-1:1))}this.addCurrentVertex(C,le,0,0,D),this.addCurrentVertex(C,le.mult(-1),0,0,D)}else if(Xe==="bevel"||Xe==="fakeround"){var dt=-Math.sqrt(be*be-1),tt=Ue?dt:0,Ct=Ue?0:dt;if(N&&this.addCurrentVertex(C,H,tt,Ct,D),Xe==="fakeround")for(var bt=Math.round(180*Ce/Math.PI/20),Bt=1;Bt<bt;Bt++){var lt=Bt/bt;if(lt!==.5){var Ut=lt-.5;lt+=lt*Ut*(lt-1)*((1.0904+de*(de*(3.55645-1.43519*de)-3.2452))*Ut*Ut+(.848013+de*(.215638*de-1.06021)))}var xr=ne.sub(H)._mult(lt)._add(H)._unit()._mult(Ue?-1:1);this.addHalfVertex(C,xr.x,xr.y,!1,Ue,0,D)}X&&this.addCurrentVertex(C,ne,-tt,-Ct,D)}else if(Xe==="butt")this.addCurrentVertex(C,le,0,0,D);else if(Xe==="square"){var Mr=N?1:-1;this.addCurrentVertex(C,le,Mr,Mr,D)}else Xe==="round"&&(N&&(this.addCurrentVertex(C,H,0,0,D),this.addCurrentVertex(C,H,1,1,D,!0)),X&&(this.addCurrentVertex(C,ne,-1,-1,D,!0),this.addCurrentVertex(C,ne,0,0,D)));if(De&&ee<b-1){var Er=C.dist(X);if(Er>
12*P){var br=C.add(X.sub(C)._mult(P/Er)._round());this.updateDistance(C,br),this.addCurrentVertex(br,ne,0,0,D),C=br}}}}},Bn.prototype.addCurrentVertex=function(e,t,r,s,l,c){c===void 0&&(c=!1);var h=t.y*s-t.x,y=-t.y-t.x*s;this.addHalfVertex(e,t.x+t.y*r,t.y-t.x*r,c,!1,r,l),this.addHalfVertex(e,h,y,c,!0,-s,l),this.distance>xm/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(e,t,r,s,l,c))},Bn.prototype.addHalfVertex=function(e,t,r,s,l,c,h){var y=.5*(this.lineClips?this.scaledDistance*(xm-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((e.x<<1)+(s?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&y)<<2,y>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);var b=h.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,b),h.primitiveLength++),l?this.e2=b:this.e1=b},Bn.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Bn.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.updateScaledDistance()},Ye("LineBucket",Bn,{omit:["layers","patternFeatures"]});var D1=new xn({"line-cap":new at(U.layout_line["line-cap"]),"line-join":new et(U.layout_line["line-join"]),"line-miter-limit":new at(U.layout_line["line-miter-limit"]),"line-round-limit":new at(U.layout_line["line-round-limit"]),"line-sort-key":new et(U.layout_line["line-sort-key"])}),bm={paint:new xn({"line-opacity":new et(U.paint_line["line-opacity"]),"line-color":new et(U.paint_line["line-color"]),"line-translate":new at(U.paint_line["line-translate"]),"line-translate-anchor":new at(U.paint_line["line-translate-anchor"]),"line-width":new et(U.paint_line["line-width"]),"line-gap-width":new et(U.paint_line["line-gap-width"]),"line-offset":new et(U.paint_line["line-offset"]),"line-blur":new et(U.paint_line["line-blur"]),"line-dasharray":new Cn(U.paint_line["line-dasharray"]),"line-pattern":new ls(U.paint_line["line-pattern"]),"line-gradient":new _i(U.paint_line["line-gradient"])}),layout:D1},wm=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,s){return s=new kt(Math.floor(s.zoom),{now:s.now,fadeDuration:s.fadeDuration,zoomHistory:s.zoomHistory,transition:s.transition}),e.prototype.possiblyEvaluate.call(this,r,s)},t.prototype.evaluate=function(r,s,l,c){return s=ce({},s,{zoom:Math.floor(s.zoom)}),e.prototype.evaluate.call(this,r,s,l,c)},t})(et))(bm.paint.properties["line-width"].specification);wm.useIntegerZoom=!0;var O1=(function(e){function t(r){e.call(this,r,bm),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 qn,this.gradientVersion=(this.gradientVersion+1)%W)},t.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},t.prototype.recalculate=function(r,s){e.prototype.recalculate.call(this,r,s),this.paint._values["line-floorwidth"]=wm.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,r)},t.prototype.createBucket=function(r){return new Bn(r)},t.prototype.queryRadius=function(r){var s=r,l=Sm(Ei("line-width",this,s),Ei("line-gap-width",this,s)),c=Ei("line-offset",this,s);return l/2+Math.abs(c)+Qr(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(r,s,l,c,h,y,b){var I=Oi(r,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),y.angle,b),C=b/2*Sm(this.paint.get("line-width").evaluate(s,l),this.paint.get("line-gap-width").evaluate(s,l)),P=this.paint.get("line-offset").evaluate(s,l);return P&&(c=(function(D,N){for(var X=[],H=new z(0,0),ne=0;ne<D.length;ne++){for(var ee=D[ne],le=[],de=0;de<ee.length;de++){var ve=ee[de],be=ee[de+1],Ce=de===0?H:ve.sub(ee[de-1])._unit()._perp(),De=de===ee.length-1?H:be.sub(ve)._unit()._perp(),Ue=Ce._add(De)._unit();Ue._mult(1/(Ue.x*De.x+Ue.y*De.y)),le.push(Ue._mult(N)._add(ve))}X.push(le)}return X})(c,P*b)),(function(D,N,X){for(var H=0;H<N.length;H++){var ne=N[H];if(D.length>=3){for(var ee=0;ee<ne.length;ee++)if(Ii(D,ne[ee]))return!0}if(li(D,ne,X))return!0}return!1})(I,c,C)},t.prototype.isTileClipped=function(){return!0},t})(Si);function Sm(e,t){return t>0?t+2*e:e}var B1=ln([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),F1=ln([{name:"a_projected_pos",components:3,type:"Float32"}],4),N1=(ln([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),ln([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Tm=(ln([{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"}]),ln([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),q1=ln([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function U1(e,t,r){return e.sections.forEach((function(s){s.text=(function(l,c,h){var y=c.layout.get("text-transform").evaluate(h,{});return y==="uppercase"?l=l.toLocaleUpperCase():y==="lowercase"&&(l=l.toLocaleLowerCase()),Yn.applyArabicShaping&&(l=Yn.applyArabicShaping(l)),l})(s.text,t,r)})),e}ln([{name:"triangle",components:3,type:"Uint16"}]),ln([{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"}]),ln([{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"}]),ln([{type:"Float32",name:"offsetX"}]),ln([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Eu={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},Im=function(e,t,r,s,l){var c,h,y=8*l-s-1,b=(1<<y)-1,I=b>>
vendor: 4,293 bytes, line 1
11,C=-7,P=l-1,D=-1,N=e[t+P];for(P+=D,c=N&(1<<-C)-1,N>>=-C,C+=y;C>0;c=256*c+e[t+P],P+=D,C-=8);for(h=c&(1<<-C)-1,c>>=-C,C+=s;C>0;h=256*h+e[t+P],P+=D,C-=8);if(c===0)c=1-I;else{if(c===b)return h?NaN:1/0*(N?-1:1);h+=Math.pow(2,s),c-=I}return(N?-1:1)*h*Math.pow(2,c-s)},Em=function(e,t,r,s,l,c){var h,y,b,I=8*c-l-1,C=(1<<I)-1,P=C>>1,D=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,N=0,X=1,H=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(y=isNaN(t)?1:0,h=C):(h=Math.floor(Math.log(t)/Math.LN2),t*(b=Math.pow(2,-h))<1&&(h--,b*=2),(t+=h+P>=1?D/b:D*Math.pow(2,1-P))*b>=2&&(h++,b/=2),h+P>=C?(y=0,h=C):h+P>=1?(y=(t*b-1)*Math.pow(2,l),h+=P):(y=t*Math.pow(2,P-1)*Math.pow(2,l),h=0));l>=8;e[r+N]=255&y,N+=X,y/=256,l-=8);for(h=h<<l|y,I+=l;I>0;e[r+N]=255&h,N+=X,h/=256,I-=8);e[r+N-X]|=128*H},Dl=fr;function fr(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}fr.Varint=0,fr.Fixed64=1,fr.Bytes=2,fr.Fixed32=5;var Am=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Lo(e){return e.type===fr.Bytes?e.readVarint()+e.pos:e.pos+1}function _s(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function Cm(e,t,r){var s=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(s);for(var l=r.pos-1;l>=e;l--)r.buf[l+s]=r.buf[l]}function V1(e,t){for(var r=0;r<e.length;r++)t.writeVarint(e[r])}function j1(e,t){for(var r=0;r<e.length;r++)t.writeSVarint(e[r])}function G1(e,t){for(var r=0;r<e.length;r++)t.writeFloat(e[r])}function $1(e,t){for(var r=0;r<e.length;r++)t.writeDouble(e[r])}function Z1(e,t){for(var r=0;r<e.length;r++)t.writeBoolean(e[r])}function W1(e,t){for(var r=0;r<e.length;r++)t.writeFixed32(e[r])}function X1(e,t){for(var r=0;r<e.length;r++)t.writeSFixed32(e[r])}function H1(e,t){for(var r=0;r<e.length;r++)t.writeFixed64(e[r])}function K1(e,t){for(var r=0;r<e.length;r++)t.writeSFixed64(e[r])}function Ol(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function xs(e,t,r){e[r]=t,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function Pm(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function J1(e,t,r){e===1&&r.readMessage(Y1,t)}function Y1(e,t,r){if(e===3){var s=r.readMessage(Q1,{}),l=s.width,c=s.height,h=s.left,y=s.top,b=s.advance;t.push({id:s.id,bitmap:new Oa({width:l+6,height:c+6},s.bitmap),metrics:{width:l,height:c,left:h,top:y,advance:b}})}}function Q1(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 Mm(e){for(var t=0,r=0,s=0,l=e;s<l.length;s+=1){var c=l[s];t+=c.w*c.h,r=Math.max(r,c.w)}e.sort((function(H,ne){return ne.h-H.h}));for(var h=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}],y=0,b=0,I=0,C=e;I<C.length;I+=1)for(var P=C[I],D=h.length-1;D>=0;D--){var N=h[D];if(!(P.w>N.w||P.h>N.h)){if(P.x=N.x,P.y=N.y,b=Math.max(b,P.y+P.h),y=Math.max(y,P.x+P.w),P.w===N.w&&P.h===N.h){var X=h.pop();D<h.length&&(h[D]=X)}else P.h===N.h?(N.x+=P.w,N.w-=P.w):P.w===N.w?(N.y+=P.h,N.h-=P.h):(h.push({x:N.x+P.w,y:N.y,w:N.w-P.w,h:P.h}),N.y+=P.h,N.h-=P.h);break}}return{w:y,h:b,fill:t/(y*b)||0}}fr.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos<r;){var s=this.readVarint(),l=s>>3,c=this.pos;this.type=7&s,e(l,t,this),this.pos===c&&this.skip(s)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=Ol(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Pm(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=Ol(this.buf,this.pos)+4294967296*Ol(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=Ol(this.buf,this.pos)+4294967296*Pm(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var e=Im(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=Im(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,s=this.buf;return t=127&(r=s[this.pos++]),r<128?t:(t|=(127&(r=s[this.pos++]))<<7,r<128?t:(t|=(127&(r=s[this.pos++]))<<14,r<128?t:(t|=(127&(r=s[this.pos++]))<<21,r<128?t:(function(l,c,h){var y,b,I=h.buf;if(y=(112&(b=I[h.pos++]))>>
14,b<128||(y|=(127&(b=I[h.pos++]))<<3,b<128)||(y|=(127&(b=I[h.pos++]))<<10,b<128)||(y|=(127&(b=I[h.pos++]))<<17,b<128)||(y|=(127&(b=I[h.pos++]))<<24,b<128)||(y|=(1&(b=I[h.pos++]))<<31,b<128))return _s(l,y,c);throw new Error("Expected varint not more than 10 bytes")})(t|=(15&(r=s[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&&Am?(function(r,s,l){return Am.decode(r.subarray(s,l))})(this.buf,t,e):(function(r,s,l){for(var c="",h=s;h<l;){var y,b,I,C=r[h],P=null,D=C>239?4:C>223?3:C>191?2:1;if(h+D>l)break;D===1?C<128&&(P=C):D===2?(192&(y=r[h+1]))==128&&(P=(31&C)<<6|63&y)<=127&&(P=null):D===3?(b=r[h+2],(192&(y=r[h+1]))==128&&(192&b)==128&&((P=(15&C)<<12|(63&y)<<6|63&b)<=2047||P>=55296&&P<=57343)&&(P=null)):D===4&&(b=r[h+2],I=r[h+3],(192&(y=r[h+1]))==128&&(192&b)==128&&(192&I)==128&&((P=(15&C)<<18|(63&y)<<12|(63&b)<<6|63&I)<=65535||P>=1114112)&&(P=null)),P===null?(P=65533,D=1):P>65535&&(P-=65536,c+=String.fromCharCode(P>>>10&1023|55296),P=56320|1023&P),c+=String.fromCharCode(P),h+=D}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!==fr.Bytes)return e.push(this.readVarint(t));var r=Lo(this);for(e=e||[];this.pos<r;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){if(this.type!==fr.Bytes)return e.push(this.readSVarint());var t=Lo(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==fr.Bytes)return e.push(this.readBoolean());var t=Lo(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==fr.Bytes)return e.push(this.readFloat());var t=Lo(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==fr.Bytes)return e.push(this.readDouble());var t=Lo(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==fr.Bytes)return e.push(this.readFixed32());var t=Lo(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==fr.Bytes)return e.push(this.readSFixed32());var t=Lo(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==fr.Bytes)return e.push(this.readFixed64());var t=Lo(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==fr.Bytes)return e.push(this.readSFixed64());var t=Lo(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===fr.Varint)for(;this.buf[this.pos++]>127;);else if(t===fr.Bytes)this.pos=this.readVarint()+this.pos;else if(t===fr.Fixed32)this.pos+=4;else{if(t!==fr.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),xs(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),xs(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),xs(this.buf,-1&e,this.pos),xs(this.buf,Math.floor(e*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),xs(this.buf,-1&e,this.pos),xs(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 s,l;if(t>=0?(s=t%4294967296|0,l=t/4294967296|0):(l=~(-t/4294967296),4294967295^(s=~(-t%4294967296))?s=s+1|0:(s=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,y){y.buf[y.pos++]=127&c|128,c>>>=7,y.buf[y.pos++]=127&c|128,c>>>=7,y.buf[y.pos++]=127&c|128,c>>>=7,y.buf[y.pos++]=127&c|128,y.buf[y.pos]=127&(c>>>=7)})(s,0,r),(function(c,h){var y=(7&c)<<4;h.buf[h.pos++]|=y|((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(s,l,c){for(var h,y,b=0;b<l.length;b++){if((h=l.charCodeAt(b))>55295&&h<57344){if(!y){h>56319||b+1===l.length?(s[c++]=239,s[c++]=191,s[c++]=189):y=h;continue}if(h<56320){s[c++]=239,s[c++]=191,s[c++]=189,y=h;continue}h=y-55296<<10|h-56320|65536,y=null}else y&&(s[c++]=239,s[c++]=191,s[c++]=189,y=null);h<128?s[c++]=h:(h<2048?s[c++]=h>>
vendor: 10,201 bytes, line 1
16|192:(h<65536?s[c++]=h>>12|224:(s[c++]=h>>18|240,s[c++]=h>>12&63|128),s[c++]=h>>6&63|128),s[c++]=63&h|128)}return c})(this.buf,e,this.pos);var r=this.pos-t;r>=128&&Cm(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),Em(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),Em(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 s=this.pos-r;s>=128&&Cm(r,s,this),this.pos=r-1,this.writeVarint(s),this.pos+=s},writeMessage:function(e,t,r){this.writeTag(e,fr.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,V1,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,j1,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,Z1,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,G1,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,$1,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,W1,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,X1,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,H1,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,K1,t)},writeBytesField:function(e,t){this.writeTag(e,fr.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,fr.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,fr.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,fr.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,fr.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,fr.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,fr.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,fr.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,fr.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,fr.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,!!t)}};var Bl=function(e,t){var r=t.pixelRatio,s=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=s},Au={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};Au.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},Au.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},Au.tlbr.get=function(){return this.tl.concat(this.br)},Au.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Bl.prototype,Au);var Cu=function(e,t){var r={},s={};this.haveRenderCallbacks=[];var l=[];this.addImages(e,r,l),this.addImages(t,s,l);var c=Mm(l),h=new Wn({width:c.w||1,height:c.h||1});for(var y in e){var b=e[y],I=r[y].paddedRect;Wn.copy(b.data,h,{x:0,y:0},{x:I.x+1,y:I.y+1},b.data)}for(var C in t){var P=t[C],D=s[C].paddedRect,N=D.x+1,X=D.y+1,H=P.data.width,ne=P.data.height;Wn.copy(P.data,h,{x:0,y:0},{x:N,y:X},P.data),Wn.copy(P.data,h,{x:0,y:ne-1},{x:N,y:X-1},{width:H,height:1}),Wn.copy(P.data,h,{x:0,y:0},{x:N,y:X+ne},{width:H,height:1}),Wn.copy(P.data,h,{x:H-1,y:0},{x:N-1,y:X},{width:1,height:ne}),Wn.copy(P.data,h,{x:0,y:0},{x:N+H,y:X},{width:1,height:ne})}this.image=h,this.iconPositions=r,this.patternPositions=s};Cu.prototype.addImages=function(e,t,r){for(var s in e){var l=e[s],c={x:0,y:0,w:l.data.width+2,h:l.data.height+2};r.push(c),t[s]=new Bl(c,l),l.hasRenderCallback&&this.haveRenderCallbacks.push(s)}},Cu.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)},Cu.prototype.patchUpdatedImage=function(e,t,r){if(e&&t&&e.version!==t.version){e.version=t.version;var s=e.tl;r.update(t.data,void 0,{x:s[0],y:s[1]})}},Ye("ImagePosition",Bl),Ye("ImageAtlas",Cu);var ci={horizontal:1,vertical:2,horizontalOnly:3},bs=function(){this.scale=1,this.fontStack="",this.imageName=null};bs.forText=function(e,t){var r=new bs;return r.scale=e||1,r.fontStack=t,r},bs.forImage=function(e){var t=new bs;return t.imageName=e,t};var Mn=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function Fl(e,t,r,s,l,c,h,y,b,I,C,P,D,N,X,H){var ne,ee=Mn.fromFeature(e,l);P===ci.vertical&&ee.verticalizePunctuation();var le=Yn.processBidirectionalText,de=Yn.processStyledBidirectionalText;if(le&&ee.sections.length===1){ne=[];for(var ve=0,be=le(ee.toString(),Qc(ee,I,c,t,s,N,X));ve<be.length;ve+=1){var Ce=be[ve],De=new Mn;De.text=Ce,De.sections=ee.sections;for(var Ue=0;Ue<Ce.length;Ue++)De.sectionIndex.push(0);ne.push(De)}}else if(de){ne=[];for(var ot=0,$e=de(ee.text,ee.sectionIndex,Qc(ee,I,c,t,s,N,X));ot<$e.length;ot+=1){var ut=$e[ot],Xe=new Mn;Xe.text=ut[0],Xe.sectionIndex=ut[1],Xe.sections=ee.sections,ne.push(Xe)}}else ne=(function(tt,Ct){for(var bt=[],Bt=tt.text,lt=0,Ut=0,xr=Ct;Ut<xr.length;Ut+=1){var Mr=xr[Ut];bt.push(tt.substring(lt,Mr)),lt=Mr}return lt<Bt.length&&bt.push(tt.substring(lt,Bt.length)),bt})(ee,Qc(ee,I,c,t,s,N,X));var At=[],dt={positionedLines:At,text:ee.toString(),top:C[1],bottom:C[1],left:C[0],right:C[0],writingMode:P,iconsInText:!1,verticalizable:!1};return(function(tt,Ct,bt,Bt,lt,Ut,xr,Mr,Er,br,kr,en){for(var tn=0,kn=-17,hn=0,Rn=0,Br=Mr==="right"?1:Mr==="left"?0:.5,fn=0,Rt=0,ur=lt;Rt<ur.length;Rt+=1){var tr=ur[Rt];tr.trim();var Nt=tr.getMaxScale(),Fn=24*(Nt-1),wn={positionedGlyphs:[],lineOffset:0};tt.positionedLines[fn]=wn;var yr=wn.positionedGlyphs,$r=0;if(tr.length()){for(var Sn=0;Sn<tr.length();Sn++){var Vt=tr.getSection(Sn),ao=tr.getSectionIndex(Sn),pi=tr.getCharCode(Sn),so=0,Fr=null,uo=null,Ai=null,Ps=24,qa=!(Er===ci.horizontal||!kr&&!as(pi)||kr&&(Nl[pi]||(Fo=pi,Ve.Arabic(Fo)||Ve["Arabic Supplement"](Fo)||Ve["Arabic Extended-A"](Fo)||Ve["Arabic Presentation Forms-A"](Fo)||Ve["Arabic Presentation Forms-B"](Fo))));if(Vt.imageName){var Ms=Bt[Vt.imageName];if(!Ms)continue;Ai=Vt.imageName,tt.iconsInText=tt.iconsInText||!0,uo=Ms.paddedRect;var Bo=Ms.displaySize;Vt.scale=24*Vt.scale/en,so=Fn+(24-Bo[1]*Vt.scale),Ps=(Fr={width:Bo[0],height:Bo[1],left:1,top:-3,advance:qa?Bo[1]:Bo[0]}).advance;var ks=qa?Bo[0]*Vt.scale-24*Nt:Bo[1]*Vt.scale-24*Nt;ks>0&&ks>$r&&($r=ks)}else{var Xl=bt[Vt.fontStack],Rs=Xl&&Xl[pi];if(Rs&&Rs.rect)uo=Rs.rect,Fr=Rs.metrics;else{var ku=Ct[Vt.fontStack],Hl=ku&&ku[pi];if(!Hl)continue;Fr=Hl.metrics}so=24*(Nt-Vt.scale)}qa?(tt.verticalizable=!0,yr.push({glyph:pi,imageName:Ai,x:tn,y:kn+so,vertical:qa,scale:Vt.scale,fontStack:Vt.fontStack,sectionIndex:ao,metrics:Fr,rect:uo}),tn+=Ps*Vt.scale+br):(yr.push({glyph:pi,imageName:Ai,x:tn,y:kn+so,vertical:qa,scale:Vt.scale,fontStack:Vt.fontStack,sectionIndex:ao,metrics:Fr,rect:uo}),tn+=Fr.advance*Vt.scale+br)}yr.length!==0&&(hn=Math.max(tn-br,hn),tw(yr,0,yr.length-1,Br,$r)),tn=0;var Kl=Ut*Nt+$r;wn.lineOffset=Math.max($r,Fn),kn+=Kl,Rn=Math.max(Kl,Rn),++fn}else kn+=Ut,++fn}var Fo,Ru=kn- -17,zs=ep(xr),sa=zs.horizontalAlign,Ls=zs.verticalAlign;(function(Jl,Yl,zu,Lu,Ql,Du,Ou,Bu,ec){var Ds,tc=(Yl-zu)*Ql;Ds=Du!==Ou?-Bu*Lu- -17:(-Lu*ec+.5)*Ou;for(var Os=0,Fu=Jl;Os<Fu.length;Os+=1)for(var Ua=0,Nu=Fu[Os].positionedGlyphs;Ua<Nu.length;Ua+=1){var Bs=Nu[Ua];Bs.x+=tc,Bs.y+=Ds}})(tt.positionedLines,Br,sa,Ls,hn,Rn,Ut,Ru,lt.length),tt.top+=-Ls*Ru,tt.bottom=tt.top+Ru,tt.left+=-sa*hn,tt.right=tt.left+hn})(dt,t,r,s,ne,h,y,b,P,I,D,H),!(function(tt){for(var Ct=0,bt=tt;Ct<bt.length;Ct+=1)if(bt[Ct].positionedGlyphs.length!==0)return!1;return!0})(At)&&dt}Mn.fromFeature=function(e,t){for(var r=new Mn,s=0;s<e.sections.length;s++){var l=e.sections[s];l.image?r.addImageSection(l):r.addTextSection(l,t)}return r},Mn.prototype.length=function(){return this.text.length},Mn.prototype.getSection=function(e){return this.sections[this.sectionIndex[e]]},Mn.prototype.getSectionIndex=function(e){return this.sectionIndex[e]},Mn.prototype.getCharCode=function(e){return this.text.charCodeAt(e)},Mn.prototype.verticalizePunctuation=function(){this.text=(function(e){for(var t="",r=0;r<e.length;r++){var s=e.charCodeAt(r+1)||null,l=e.charCodeAt(r-1)||null;t+=s&&pu(s)&&!Eu[e[r+1]]||l&&pu(l)&&!Eu[e[r-1]]||!Eu[e[r]]?e[r]:Eu[e[r]]}return t})(this.text)},Mn.prototype.trim=function(){for(var e=0,t=0;t<this.text.length&&Nl[this.text.charCodeAt(t)];t++)e++;for(var r=this.text.length,s=this.text.length-1;s>=0&&s>=e&&Nl[this.text.charCodeAt(s)];s--)r--;this.text=this.text.substring(e,r),this.sectionIndex=this.sectionIndex.slice(e,r)},Mn.prototype.substring=function(e,t){var r=new Mn;return r.text=this.text.substring(e,t),r.sectionIndex=this.sectionIndex.slice(e,t),r.sections=this.sections,r},Mn.prototype.toString=function(){return this.text},Mn.prototype.getMaxScale=function(){var e=this;return this.sectionIndex.reduce((function(t,r){return Math.max(t,e.sections[r].scale)}),0)},Mn.prototype.addTextSection=function(e,t){this.text+=e.text,this.sections.push(bs.forText(e.scale,e.fontStack||t));for(var r=this.sections.length-1,s=0;s<e.text.length;++s)this.sectionIndex.push(r)},Mn.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(bs.forImage(t)),this.sectionIndex.push(this.sections.length-1)):pt("Reached maximum number of images 6401")}else pt("Can't add FormattedSection with an empty image.")},Mn.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var Nl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},ei={};function km(e,t,r,s,l,c){if(t.imageName){var h=s[t.imageName];return h?h.displaySize[0]*t.scale*24/c+l:0}var y=r[t.fontStack],b=y&&y[e];return b?b.metrics.advance*t.scale+l:0}function Rm(e,t,r,s){var l=Math.pow(e-t,2);
1return s?e<t?l/2:2*l:l+Math.abs(r)*r}function ew(e,t,r){var s=0;return e===10&&(s-=1e4),r&&(s+=150),e!==40&&e!==65288||(s+=50),t!==41&&t!==65289||(s+=50),s}function zm(e,t,r,s,l,c){for(var h=null,y=Rm(t,r,l,c),b=0,I=s;b<I.length;b+=1){var C=I[b],P=Rm(t-C.x,r,l,c)+C.badness;P<=y&&(h=C,y=P)}return{index:e,x:t,priorBreak:h,badness:y}}function Qc(e,t,r,s,l,c,h){if(c!=="point")return[];if(!e)return[];for(var y,b=[],I=(function(ne,ee,le,de,ve,be){for(var Ce=0,De=0;De<ne.length();De++){var Ue=ne.getSection(De);Ce+=km(ne.getCharCode(De),Ue,de,ve,ee,be)}return Ce/Math.max(1,Math.ceil(Ce/le))})(e,t,r,s,l,h),C=e.text.indexOf("​")>=0,P=0,D=0;D<e.length();D++){var N=e.getSection(D),X=e.getCharCode(D);if(Nl[X]||(P+=km(X,N,s,l,t,h)),D<e.length()-1){var H=!((y=X)<11904||!(Ve["Bopomofo Extended"](y)||Ve.Bopomofo(y)||Ve["CJK Compatibility Forms"](y)||Ve["CJK Compatibility Ideographs"](y)||Ve["CJK Compatibility"](y)||Ve["CJK Radicals Supplement"](y)||Ve["CJK Strokes"](y)||Ve["CJK Symbols and Punctuation"](y)||Ve["CJK Unified Ideographs Extension A"](y)||Ve["CJK Unified Ideographs"](y)||Ve["Enclosed CJK Letters and Months"](y)||Ve["Halfwidth and Fullwidth Forms"](y)||Ve.Hiragana(y)||Ve["Ideographic Description Characters"](y)||Ve["Kangxi Radicals"](y)||Ve["Katakana Phonetic Extensions"](y)||Ve.Katakana(y)||Ve["Vertical Forms"](y)||Ve["Yi Radicals"](y)||Ve["Yi Syllables"](y)));(ei[X]||H||N.imageName)&&b.push(zm(D+1,P,I,b,ew(X,e.getCharCode(D+1),H&&C),!1))}}return(function ne(ee){return ee?ne(ee.priorBreak).concat(ee.index):[]})(zm(e.length(),P,I,b,0,!0))}function ep(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 tw(e,t,r,s,l){if(s||l)for(var c=e[r],h=(e[r].x+c.metrics.advance*c.scale)*s,y=t;y<=r;y++)e[y].x-=h,e[y].y+=l}function Lm(e,t,r,s,l,c){var h,y=e.image;if(y.content){var b=y.content,I=y.pixelRatio||1;h=[b[0]/I,b[1]/I,y.displaySize[0]-b[2]/I,y.displaySize[1]-b[3]/I]}var C,P,D,N,X=t.left*c,H=t.right*c;r==="width"||r==="both"?(N=l[0]+X-s[3],P=l[0]+H+s[1]):P=(N=l[0]+(X+H-y.displaySize[0])/2)+y.displaySize[0];var ne=t.top*c,ee=t.bottom*c;return r==="height"||r==="both"?(C=l[1]+ne-s[0],D=l[1]+ee+s[2]):D=(C=l[1]+(ne+ee-y.displaySize[1])/2)+y.displaySize[1],{image:y,top:C,right:P,bottom:D,left:N,collisionPadding:h}}ei[10]=!0,ei[32]=!0,ei[38]=!0,ei[40]=!0,ei[41]=!0,ei[43]=!0,ei[45]=!0,ei[47]=!0,ei[173]=!0,ei[183]=!0,ei[8203]=!0,ei[8208]=!0,ei[8211]=!0,ei[8231]=!0;var ws=(function(e){function t(r,s,l,c){e.call(this,r,s),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})(z);function tp(e,t){var r=t.expression;if(r.kind==="constant")return{kind:"constant",layoutSize:r.evaluate(new kt(e+1))};if(r.kind==="source")return{kind:"source"};for(var s=r.zoomStops,l=r.interpolationType,c=0;c<s.length&&s[c]<=e;)c++;for(var h=c=Math.max(0,c-1);h<s.length&&s[h]<e+1;)h++;h=Math.min(s.length-1,h);var y=s[c],b=s[h];return r.kind==="composite"?{kind:"composite",minZoom:y,maxZoom:b,interpolationType:l}:{kind:"camera",minZoom:y,maxZoom:b,minSize:r.evaluate(new kt(y)),maxSize:r.evaluate(new kt(b)),interpolationType:l}}function Dm(e,t,r){var s=t.uSize,l=r.lowerSize;return e.kind==="source"?l/128:e.kind==="composite"?jr(l/128,r.upperSize/128,t.uSizeT):s}function Om(e,t){var r=0,s=0;if(e.kind==="constant")s=e.layoutSize;else if(e.kind!=="source"){var l=e.interpolationType,c=l?ge(gn.interpolationFactor(l,t,e.minZoom,e.maxZoom),0,1):0;e.kind==="camera"?s=jr(e.minSize,e.maxSize,c):r=c}return{uSizeT:r,uSize:s}}Ye("Anchor",ws);var rw=Object.freeze({__proto__:null,getSizeData:tp,evaluateSizeForFeature:Dm,evaluateSizeForZoom:Om,SIZE_PACK_FACTOR:128});function Bm(e,t,r,s,l){if(t.segment===void 0)return!0;for(var c=t,h=t.segment+1,y=0;y>-r/2;){if(--h<0)return!1;y-=e[h].dist(c),c=e[h]}y+=e[h].dist(e[h+1]),h++;for(var b=[],I=0;y<r/2;){var C=e[h],P=e[h+1];if(!P)return!1;var D=e[h-1].angleTo(C)-C.angleTo(P);for(D=Math.abs((D+3*Math.PI)%(2*Math.PI)-Math.PI),b.push({distance:y,angleDelta:D}),I+=D;y-b[0].distance>s;)I-=b.shift().angleDelta;if(I>l)return!1;h++,y+=C.dist(P)}return!0}function Fm(e){for(var t=0,r=0;r<e.length-1;r++)t+=e[r].dist(e[r+1]);return t}function Nm(e,t,r){return e?.6*t*r:0}function qm(e,t){return Math.max(e?e.right-e.left:0,t?t.right-t.left:0)}
vendor: 8,368 bytes, line 1
1function nw(e,t,r,s,l,c){for(var h=Nm(r,l,c),y=qm(r,s)*c,b=0,I=Fm(e)/2,C=0;C<e.length-1;C++){var P=e[C],D=e[C+1],N=P.dist(D);if(b+N>I){var X=(I-b)/N,H=jr(P.x,D.x,X),ne=jr(P.y,D.y,X),ee=new ws(H,ne,D.angleTo(P),C);return ee._round(),!h||Bm(e,ee,y,h,t)?ee:void 0}b+=N}}function iw(e,t,r,s,l,c,h,y,b){var I=Nm(s,c,h),C=qm(s,l),P=C*h,D=e[0].x===0||e[0].x===b||e[0].y===0||e[0].y===b;return t-P<t/4&&(t=P+t/4),(function N(X,H,ne,ee,le,de,ve,be,Ce){for(var De=de/2,Ue=Fm(X),ot=0,$e=H-ne,ut=[],Xe=0;Xe<X.length-1;Xe++){for(var At=X[Xe],dt=X[Xe+1],tt=At.dist(dt),Ct=dt.angleTo(At);$e+ne<ot+tt;){var bt=(($e+=ne)-ot)/tt,Bt=jr(At.x,dt.x,bt),lt=jr(At.y,dt.y,bt);if(Bt>=0&&Bt<Ce&&lt>=0&&lt<Ce&&$e-De>=0&&$e+De<=Ue){var Ut=new ws(Bt,lt,Ct,Xe);Ut._round(),ee&&!Bm(X,Ut,de,ee,le)||ut.push(Ut)}}ot+=tt}return be||ut.length||ve||(ut=N(X,ot/2,ne,ee,le,de,ve,!0,Ce)),ut})(e,D?t/2*y%t:(C/2+2*c)*h*y%t,t,I,r,P,D,!1,b)}function Um(e,t,r,s,l){for(var c=[],h=0;h<e.length;h++)for(var y=e[h],b=void 0,I=0;I<y.length-1;I++){var C=y[I],P=y[I+1];C.x<t&&P.x<t||(C.x<t?C=new z(t,C.y+(t-C.x)/(P.x-C.x)*(P.y-C.y))._round():P.x<t&&(P=new z(t,C.y+(t-C.x)/(P.x-C.x)*(P.y-C.y))._round()),C.y<r&&P.y<r||(C.y<r?C=new z(C.x+(r-C.y)/(P.y-C.y)*(P.x-C.x),r)._round():P.y<r&&(P=new z(C.x+(r-C.y)/(P.y-C.y)*(P.x-C.x),r)._round()),C.x>=s&&P.x>=s||(C.x>=s?C=new z(s,C.y+(s-C.x)/(P.x-C.x)*(P.y-C.y))._round():P.x>=s&&(P=new z(s,C.y+(s-C.x)/(P.x-C.x)*(P.y-C.y))._round()),C.y>=l&&P.y>=l||(C.y>=l?C=new z(C.x+(l-C.y)/(P.y-C.y)*(P.x-C.x),l)._round():P.y>=l&&(P=new z(C.x+(l-C.y)/(P.y-C.y)*(P.x-C.x),l)._round()),b&&C.equals(b[b.length-1])||c.push(b=[C]),b.push(P)))))}return c}function Vm(e,t,r,s){var l=[],c=e.image,h=c.pixelRatio,y=c.paddedRect.w-2,b=c.paddedRect.h-2,I=e.right-e.left,C=e.bottom-e.top,P=c.stretchX||[[0,y]],D=c.stretchY||[[0,b]],N=function(Bt,lt){return Bt+lt[1]-lt[0]},X=P.reduce(N,0),H=D.reduce(N,0),ne=y-X,ee=b-H,le=0,de=X,ve=0,be=H,Ce=0,De=ne,Ue=0,ot=ee;if(c.content&&s){var $e=c.content;le=ql(P,0,$e[0]),ve=ql(D,0,$e[1]),de=ql(P,$e[0],$e[2]),be=ql(D,$e[1],$e[3]),Ce=$e[0]-le,Ue=$e[1]-ve,De=$e[2]-$e[0]-de,ot=$e[3]-$e[1]-be}var ut=function(Bt,lt,Ut,xr){var Mr=Ul(Bt.stretch-le,de,I,e.left),Er=Vl(Bt.fixed-Ce,De,Bt.stretch,X),br=Ul(lt.stretch-ve,be,C,e.top),kr=Vl(lt.fixed-Ue,ot,lt.stretch,H),en=Ul(Ut.stretch-le,de,I,e.left),tn=Vl(Ut.fixed-Ce,De,Ut.stretch,X),kn=Ul(xr.stretch-ve,be,C,e.top),hn=Vl(xr.fixed-Ue,ot,xr.stretch,H),Rn=new z(Mr,br),Br=new z(en,br),fn=new z(en,kn),Rt=new z(Mr,kn),ur=new z(Er/h,kr/h),tr=new z(tn/h,hn/h),Nt=t*Math.PI/180;if(Nt){var Fn=Math.sin(Nt),wn=Math.cos(Nt),yr=[wn,-Fn,Fn,wn];Rn._matMult(yr),Br._matMult(yr),Rt._matMult(yr),fn._matMult(yr)}var $r=Bt.stretch+Bt.fixed,Sn=lt.stretch+lt.fixed;return{tl:Rn,tr:Br,bl:Rt,br:fn,tex:{x:c.paddedRect.x+1+$r,y:c.paddedRect.y+1+Sn,w:Ut.stretch+Ut.fixed-$r,h:xr.stretch+xr.fixed-Sn},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:ur,pixelOffsetBR:tr,minFontScaleX:De/h/I,minFontScaleY:ot/h/C,isSDF:r}};if(s&&(c.stretchX||c.stretchY))for(var Xe=jm(P,ne,X),At=jm(D,ee,H),dt=0;dt<Xe.length-1;dt++)for(var tt=Xe[dt],Ct=Xe[dt+1],bt=0;bt<At.length-1;bt++)l.push(ut(tt,At[bt],Ct,At[bt+1]));else l.push(ut({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:y+1},{fixed:0,stretch:b+1}));return l}function ql(e,t,r){for(var s=0,l=0,c=e;l<c.length;l+=1){var h=c[l];s+=Math.max(t,Math.min(r,h[1]))-Math.max(t,Math.min(r,h[0]))}return s}function jm(e,t,r){for(var s=[{fixed:-1,stretch:0}],l=0,c=e;l<c.length;l+=1){var h=c[l],y=h[0],b=h[1],I=s[s.length-1];s.push({fixed:y-I.stretch,stretch:I.stretch}),s.push({fixed:y-I.stretch,stretch:I.stretch+(b-y)})}return s.push({fixed:t+1,stretch:r}),s}function Ul(e,t,r,s){return e/t*r+s}function Vl(e,t,r,s){return e-t*r/s}var jl=function(e,t,r,s,l,c,h,y,b,I){if(this.boxStartIndex=e.length,b){var C=c.top,P=c.bottom,D=c.collisionPadding;D&&(C-=D[1],P+=D[3]);var N=P-C;N>0&&(N=Math.max(10,N),this.circleDiameter=N)}else{var X=c.top*h-y,H=c.bottom*h+y,ne=c.left*h-y,ee=c.right*h+y,le=c.collisionPadding;if(le&&(ne-=le[0]*h,X-=le[1]*h,ee+=le[2]*h,H+=le[3]*h),I){var de=new z(ne,X),ve=new z(ee,X),be=new z(ne,H),Ce=new z(ee,H),De=I*Math.PI/180;de._rotate(De),ve._rotate(De),be._rotate(De),Ce._rotate(De),ne=Math.min(de.x,ve.x,be.x,Ce.x),ee=Math.max(de.x,ve.x,be.x,Ce.x),X=Math.min(de.y,ve.y,be.y,Ce.y),H=Math.max(de.y,ve.y,be.y,Ce.y)}e.emplaceBack(t.x,t.y,ne,X,ee,H,r,s,l)}this.boxEndIndex=e.length},Ss=function(e,t){if(e===void 0&&(e=[]),t===void 0&&(t=ow),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 ow(e,t){return e<t?-1:e>t?1:0}function aw(e,t,r){r===void 0&&(r=!1);for(var s=1/0,l=1/0,c=-1/0,h=-1/0,y=e[0],b=0;b<y.length;b++){var I=y[b];(!b||I.x<s)&&(s=I.x),(!b||I.y<l)&&(l=I.y),(!b||I.x>c)&&(c=I.x),(!b||I.y>h)&&(h=I.y)}var C=Math.min(c-s,h-l),P=C/2,D=new Ss([],sw);if(C===0)return new z(s,l);for(var N=s;N<c;N+=C)for(var X=l;X<h;X+=C)D.push(new Ts(N+P,X+P,P,e));for(var H=(function(le){for(var de=0,ve=0,be=0,Ce=le[0],De=0,Ue=Ce.length,ot=Ue-1;De<Ue;ot=De++){var $e=Ce[De],ut=Ce[ot],Xe=$e.x*ut.y-ut.x*$e.y;ve+=($e.x+ut.x)*Xe,be+=($e.y+ut.y)*Xe,de+=3*Xe}return new Ts(ve/de,be/de,0,le)})(e),ne=D.length;D.length;){var ee=D.pop();(ee.d>H.d||!H.d)&&(H=ee,r&&console.log("found best %d after %d probes",Math.round(1e4*ee.d)/1e4,ne)),ee.max-H.d<=t||(D.push(new Ts(ee.p.x-(P=ee.h/2),ee.p.y-P,P,e)),D.push(new Ts(ee.p.x+P,ee.p.y-P,P,e)),D.push(new Ts(ee.p.x-P,ee.p.y+P,P,e)),D.push(new Ts(ee.p.x+P,ee.p.y+P,P,e)),ne+=4)}return r&&(console.log("num probes: "+ne),console.log("best distance: "+H.d)),H.p}function sw(e,t){return t.max-e.max}function Ts(e,t,r,s){this.p=new z(e,t),this.h=r,this.d=(function(l,c){for(var h=!1,y=1/0,b=0;b<c.length;b++)for(var I=c[b],C=0,P=I.length,D=P-1;C<P;D=C++){var N=I[C],X=I[D];N.y>l.y!=X.y>l.y&&l.x<(X.x-N.x)*(l.y-N.y)/(X.y-N.y)+N.x&&(h=!h),y=Math.min(y,na(l,N,X))}return(h?1:-1)*Math.sqrt(y)})(this.p,s),this.max=this.d+this.h*Math.SQRT2}Ss.prototype.push=function(e){this.data.push(e),this.length++,this._up(this.length-1)},Ss.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}},Ss.prototype.peek=function(){return this.data[0]},Ss.prototype._up=function(e){for(var t=this.data,r=this.compare,s=t[e];e>0;){var l=e-1>>1,c=t[l];if(r(s,c)>=0)break;t[e]=c,e=l}t[e]=s},Ss.prototype._down=function(e){for(var t=this.data,r=this.compare,s=this.length>>1,l=t[e];e<s;){var c=1+(e<<1),h=t[c],y=c+1;if(y<this.length&&r(t[y],h)<0&&(c=y,h=t[y]),r(h,l)>=0)break;t[e]=h,e=c}t[e]=l};var rp=Number.POSITIVE_INFINITY;function Gm(e,t){return t[1]!==rp?(function(r,s,l){var c=0,h=0;switch(s=Math.abs(s),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=-s;break;case"top-left":case"bottom-left":case"left":c=s}return[c,h]})(e,t[0],t[1]):(function(r,s){var l=0,c=0;s<0&&(s=0);var h=s/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-s;break;case"top":c=s-7}switch(r){case"top-right":case"bottom-right":l=-h;break;case"top-left":case"bottom-left":l=h;break;case"left":l=s;break;case"right":l=-s}return[l,c]})(e,t[0])}function np(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 $m(e,t,r,s,l,c,h,y,b,I,C,P,D,N,X){var H=(function(ve,be,Ce,De,Ue,ot,$e,ut){for(var Xe=De.layout.get("text-rotate").evaluate(ot,{})*Math.PI/180,At=[],dt=0,tt=be.positionedLines;dt<tt.length;dt+=1)for(var Ct=tt[dt],bt=0,Bt=Ct.positionedGlyphs;bt<Bt.length;bt+=1){var lt=Bt[bt];if(lt.rect){var Ut=lt.rect||{},xr=4,Mr=!0,Er=1,br=0,kr=(Ue||ut)&&lt.vertical,en=lt.metrics.advance*lt.scale/2;if(ut&&be.verticalizable&&(br=Ct.lineOffset/2-(lt.imageName?-(24-lt.metrics.width*lt.scale)/2:24*(lt.scale-1))),lt.imageName){var tn=$e[lt.imageName];Mr=tn.sdf,xr=1/(Er=tn.pixelRatio)}var kn=Ue?[lt.x+en,lt.y]:[0,0],hn=Ue?[0,0]:[lt.x+en+Ce[0],lt.y+Ce[1]-br],Rn=[0,0];kr&&(Rn=hn,hn=[0,0]);var Br=(lt.metrics.left-xr)*lt.scale-en+hn[0],fn=(-lt.metrics.top-xr)*lt.scale+hn[1],Rt=Br+Ut.w*lt.scale/Er,ur=fn+Ut.h*lt.scale/Er,tr=new z(Br,fn),Nt=new z(Rt,fn),Fn=new z(Br,ur),wn=new z(Rt,ur);
1if(kr){var yr=new z(-en,en- -17),$r=-Math.PI/2,Sn=12-en,Vt=new z(22-Sn,-(lt.imageName?Sn:0)),ao=new(Function.prototype.bind.apply(z,[null].concat(Rn)));tr._rotateAround($r,yr)._add(Vt)._add(ao),Nt._rotateAround($r,yr)._add(Vt)._add(ao),Fn._rotateAround($r,yr)._add(Vt)._add(ao),wn._rotateAround($r,yr)._add(Vt)._add(ao)}if(Xe){var pi=Math.sin(Xe),so=Math.cos(Xe),Fr=[so,-pi,pi,so];tr._matMult(Fr),Nt._matMult(Fr),Fn._matMult(Fr),wn._matMult(Fr)}var uo=new z(0,0),Ai=new z(0,0);At.push({tl:tr,tr:Nt,bl:Fn,br:wn,tex:Ut,writingMode:be.writingMode,glyphOffset:kn,sectionIndex:lt.sectionIndex,isSDF:Mr,pixelOffsetTL:uo,pixelOffsetBR:Ai,minFontScaleX:0,minFontScaleY:0})}}return At})(0,r,y,l,c,h,s,e.allowVerticalPlacement),ne=e.textSizeData,ee=null;ne.kind==="source"?(ee=[128*l.layout.get("text-size").evaluate(h,{})])[0]>32640&&pt(e.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):ne.kind==="composite"&&((ee=[128*N.compositeTextSizes[0].evaluate(h,{},X),128*N.compositeTextSizes[1].evaluate(h,{},X)])[0]>32640||ee[1]>32640)&&pt(e.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),e.addSymbols(e.text,H,ee,y,c,h,I,t,b.lineStartIndex,b.lineLength,D,X);for(var le=0,de=C;le<de.length;le+=1)P[de[le]]=e.text.placedSymbolArray.length-1;return 4*H.length}function Zm(e){for(var t in e)return e[t];return null}function uw(e,t,r,s){var l=e.compareText;if(t in l){for(var c=l[t],h=c.length-1;h>=0;h--)if(s.dist(c[h])<r)return!0}else l[t]=[];return l[t].push(s),!1}var lw=gs.VectorTileFeature.types,cw=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Gl(e,t,r,s,l,c,h,y,b,I,C,P,D){var N=y?Math.min(32640,Math.round(y[0])):0,X=y?Math.min(32640,Math.round(y[1])):0;e.emplaceBack(t,r,Math.round(32*s),Math.round(32*l),c,h,(N<<1)+(b?1:0),X,16*I,16*C,256*P,256*D)}function ip(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 pw(e){for(var t=0,r=e.sections;t<r.length;t+=1)if(ss(r[t].text))return!0;return!1}var Is=function(e){this.layoutVertexArray=new ps,this.indexArray=new eo,this.programConfigurations=e,this.segments=new V,this.dynamicLayoutVertexArray=new ea,this.opacityVertexArray=new Ma,this.placedSymbolArray=new u};Is.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},Is.prototype.upload=function(e,t,r,s){this.isEmpty()||(r&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,B1.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,F1.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,cw,!0),this.opacityVertexBuffer.itemSize=1),(r||s)&&this.programConfigurations.upload(e))},Is.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},Ye("SymbolBuffers",Is);var Pu=function(e,t,r){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new r,this.segments=new V,this.collisionVertexArray=new vu};Pu.prototype.upload=function(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,N1.members,!0)},Pu.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},Ye("CollisionBuffers",Pu);var ir=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=Qn([]),this.placementViewportMatrix=Qn([]);var t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=tp(this.zoom,t["text-size"]),this.iconSizeData=tp(this.zoom,t["icon-size"]);var r=this.layers[0].layout,s=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"&&s.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 ci[c]}))),this.stateDependentLayerIds=this.layers.filter((function(c){return c.isStateDependent()}
vendor: 15,203 bytes, line 1
1)).map((function(c){return c.id})),this.sourceID=e.sourceID};ir.prototype.createArrays=function(){this.text=new Is(new ft(this.layers,this.zoom,(function(e){return/^text/.test(e)}))),this.icon=new Is(new ft(this.layers,this.zoom,(function(e){return/^icon/.test(e)}))),this.glyphOffsetArray=new d,this.lineVertexArray=new x,this.symbolInstances=new f},ir.prototype.calculateGlyphDependencies=function(e,t,r,s,l){for(var c=0;c<e.length;c++)if(t[e.charCodeAt(c)]=!0,(r||s)&&l){var h=Eu[e.charAt(c)];h&&(t[h.charCodeAt(0)]=!0)}},ir.prototype.populate=function(e,t,r){var s=this.layers[0],l=s.layout,c=l.get("text-font"),h=l.get("text-field"),y=l.get("icon-image"),b=(h.value.kind!=="constant"||h.value.value instanceof sn&&!h.value.value.isEmpty()||h.value.value.toString().length>0)&&(c.value.kind!=="constant"||c.value.value.length>0),I=y.value.kind!=="constant"||!!y.value.value||Object.keys(y.parameters).length>0,C=l.get("symbol-sort-key");if(this.features=[],b||I){for(var P=t.iconDependencies,D=t.glyphDependencies,N=t.availableImages,X=new kt(this.zoom),H=0,ne=e;H<ne.length;H+=1){var ee=ne[H],le=ee.feature,de=ee.id,ve=ee.index,be=ee.sourceLayerIndex,Ce=s._featureFilter.needGeometry,De=Or(le,Ce);if(s._featureFilter.filter(X,De,r)){Ce||(De.geometry=Ir(le));var Ue=void 0;if(b){var ot=s.getValueAndResolveTokens("text-field",De,r,N),$e=sn.factory(ot);pw($e)&&(this.hasRTLText=!0),(!this.hasRTLText||fu()==="unavailable"||this.hasRTLText&&Yn.isParsed())&&(Ue=U1($e,s,De))}var ut=void 0;if(I){var Xe=s.getValueAndResolveTokens("icon-image",De,r,N);ut=Xe instanceof Ln?Xe:Ln.fromString(Xe)}if(Ue||ut){var At=this.sortFeaturesByKey?C.evaluate(De,{},r):void 0;if(this.features.push({id:de,text:Ue,icon:ut,index:ve,sourceLayerIndex:be,geometry:De.geometry,properties:le.properties,type:lw[le.type],sortKey:At}),ut&&(P[ut.name]=!0),Ue){var dt=c.evaluate(De,{},r).join(","),tt=l.get("text-rotation-alignment")==="map"&&l.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(ci.vertical)>=0;for(var Ct=0,bt=Ue.sections;Ct<bt.length;Ct+=1){var Bt=bt[Ct];if(Bt.image)P[Bt.image.name]=!0;else{var lt=cu(Ue.toString()),Ut=Bt.fontStack||dt,xr=D[Ut]=D[Ut]||{};this.calculateGlyphDependencies(Bt.text,xr,tt,this.allowVerticalPlacement,lt)}}}}}}l.get("symbol-placement")==="line"&&(this.features=(function(Mr){var Er={},br={},kr=[],en=0;function tn(yr){kr.push(Mr[yr]),en++}function kn(yr,$r,Sn){var Vt=br[yr];return delete br[yr],br[$r]=Vt,kr[Vt].geometry[0].pop(),kr[Vt].geometry[0]=kr[Vt].geometry[0].concat(Sn[0]),Vt}function hn(yr,$r,Sn){var Vt=Er[$r];return delete Er[$r],Er[yr]=Vt,kr[Vt].geometry[0].shift(),kr[Vt].geometry[0]=Sn[0].concat(kr[Vt].geometry[0]),Vt}function Rn(yr,$r,Sn){var Vt=Sn?$r[0][$r[0].length-1]:$r[0][0];return yr+":"+Vt.x+":"+Vt.y}for(var Br=0;Br<Mr.length;Br++){var fn=Mr[Br],Rt=fn.geometry,ur=fn.text?fn.text.toString():null;if(ur){var tr=Rn(ur,Rt),Nt=Rn(ur,Rt,!0);if(tr in br&&Nt in Er&&br[tr]!==Er[Nt]){var Fn=hn(tr,Nt,Rt),wn=kn(tr,Nt,kr[Fn].geometry);delete Er[tr],delete br[Nt],br[Rn(ur,kr[wn].geometry,!0)]=wn,kr[Fn].geometry=null}else tr in br?kn(tr,Nt,Rt):Nt in Er?hn(tr,Nt,Rt):(tn(Br),Er[tr]=en-1,br[Nt]=en-1)}else tn(Br)}return kr.filter((function(yr){return yr.geometry}))})(this.features)),this.sortFeaturesByKey&&this.features.sort((function(Mr,Er){return Mr.sortKey-Er.sortKey}))}},ir.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))},ir.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},ir.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},ir.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},ir.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},ir.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},ir.prototype.addToLineVertexArray=function(e,t){var r=this.lineVertexArray.length;if(e.segment!==void 0){for(var s=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:s},h<t.length-1&&(s+=t[h+1].dist(t[h]));for(var y=e.segment||0;y>=0;y--)c[y]={x:t[y].x,y:t[y].y,tileUnitDistanceFromAnchor:l},y>0&&(l+=t[y-1].dist(t[y]));for(var b=0;b<t.length;b++){var I=c[b];this.lineVertexArray.emplaceBack(I.x,I.y,I.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},ir.prototype.addSymbols=function(e,t,r,s,l,c,h,y,b,I,C,P){for(var D=e.indexArray,N=e.layoutVertexArray,X=e.segments.prepareSegment(4*t.length,N,D,this.canOverlap?c.sortKey:void 0),H=this.glyphOffsetArray.length,ne=X.vertexLength,ee=this.allowVerticalPlacement&&h===ci.vertical?Math.PI/2:0,le=c.text&&c.text.sections,de=0;de<t.length;de++){var ve=t[de],be=ve.tl,Ce=ve.tr,De=ve.bl,Ue=ve.br,ot=ve.tex,$e=ve.pixelOffsetTL,ut=ve.pixelOffsetBR,Xe=ve.minFontScaleX,At=ve.minFontScaleY,dt=ve.glyphOffset,tt=ve.isSDF,Ct=ve.sectionIndex,bt=X.vertexLength,Bt=dt[1];Gl(N,y.x,y.y,be.x,Bt+be.y,ot.x,ot.y,r,tt,$e.x,$e.y,Xe,At),Gl(N,y.x,y.y,Ce.x,Bt+Ce.y,ot.x+ot.w,ot.y,r,tt,ut.x,$e.y,Xe,At),Gl(N,y.x,y.y,De.x,Bt+De.y,ot.x,ot.y+ot.h,r,tt,$e.x,ut.y,Xe,At),Gl(N,y.x,y.y,Ue.x,Bt+Ue.y,ot.x+ot.w,ot.y+ot.h,r,tt,ut.x,ut.y,Xe,At),ip(e.dynamicLayoutVertexArray,y,ee),D.emplaceBack(bt,bt+1,bt+2),D.emplaceBack(bt+1,bt+2,bt+3),X.vertexLength+=4,X.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(dt[0]),de!==t.length-1&&Ct===t[de+1].sectionIndex||e.programConfigurations.populatePaintArrays(N.length,c,c.index,{},P,le&&le[Ct])}e.placedSymbolArray.emplaceBack(y.x,y.y,H,this.glyphOffsetArray.length-H,ne,b,I,y.segment,r?r[0]:0,r?r[1]:0,s[0],s[1],h,0,!1,0,C)},ir.prototype._addCollisionDebugVertex=function(e,t,r,s,l,c){return t.emplaceBack(0,0),e.emplaceBack(r.x,r.y,s,l,Math.round(c.x),Math.round(c.y))},ir.prototype.addCollisionDebugVertices=function(e,t,r,s,l,c,h){var y=l.segments.prepareSegment(4,l.layoutVertexArray,l.indexArray),b=y.vertexLength,I=l.layoutVertexArray,C=l.collisionVertexArray,P=h.anchorX,D=h.anchorY;this._addCollisionDebugVertex(I,C,c,P,D,new z(e,t)),this._addCollisionDebugVertex(I,C,c,P,D,new z(r,t)),this._addCollisionDebugVertex(I,C,c,P,D,new z(r,s)),this._addCollisionDebugVertex(I,C,c,P,D,new z(e,s)),y.vertexLength+=4;var N=l.indexArray;N.emplaceBack(b,b+1),N.emplaceBack(b+1,b+2),N.emplaceBack(b+2,b+3),N.emplaceBack(b+3,b),y.primitiveLength+=4},ir.prototype.addDebugCollisionBoxes=function(e,t,r,s){for(var l=e;l<t;l++){var c=this.collisionBoxArray.get(l);this.addCollisionDebugVertices(c.x1,c.y1,c.x2,c.y2,s?this.textCollisionBox:this.iconCollisionBox,c.anchorPoint,r)}},ir.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Pu(ta,Tm.members,ka),this.iconCollisionBox=new Pu(ta,Tm.members,ka);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)}},ir.prototype._deserializeCollisionBoxesForSymbol=function(e,t,r,s,l,c,h,y,b){for(var I={},C=t;C<r;C++){var P=e.get(C);I.textBox={x1:P.x1,y1:P.y1,x2:P.x2,y2:P.y2,anchorPointX:P.anchorPointX,anchorPointY:P.anchorPointY},I.textFeatureIndex=P.featureIndex;break}for(var D=s;D<l;D++){var N=e.get(D);I.verticalTextBox={x1:N.x1,y1:N.y1,x2:N.x2,y2:N.y2,anchorPointX:N.anchorPointX,anchorPointY:N.anchorPointY},I.verticalTextFeatureIndex=N.featureIndex;break}for(var X=c;X<h;X++){var H=e.get(X);I.iconBox={x1:H.x1,y1:H.y1,x2:H.x2,y2:H.y2,anchorPointX:H.anchorPointX,anchorPointY:H.anchorPointY},I.iconFeatureIndex=H.featureIndex;break}for(var ne=y;ne<b;ne++){var ee=e.get(ne);I.verticalIconBox={x1:ee.x1,y1:ee.y1,x2:ee.x2,y2:ee.y2,anchorPointX:ee.anchorPointX,anchorPointY:ee.anchorPointY},I.verticalIconFeatureIndex=ee.featureIndex;break}return I},ir.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))}},ir.prototype.hasTextData=function(){return this.text.segments.get().length>0},ir.prototype.hasIconData=function(){return this.icon.segments.get().length>0},ir.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},ir.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},ir.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},ir.prototype.addIndicesForPlacedSymbol=function(e,t){for(var r=e.placedSymbolArray.get(t),s=r.vertexStartIndex+4*r.numGlyphs,l=r.vertexStartIndex;l<s;l+=4)e.indexArray.emplaceBack(l,l+1,l+2),e.indexArray.emplaceBack(l+1,l+2,l+3)},ir.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),s=[],l=[],c=[],h=0;h<this.symbolInstances.length;++h){c.push(h);var y=this.symbolInstances.get(h);s.push(0|Math.round(t*y.anchorX+r*y.anchorY)),l.push(y.featureIndex)}return c.sort((function(b,I){return s[b]-s[I]||l[I]-l[b]})),c},ir.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})},ir.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,s=this.symbolInstanceIndexes;r<s.length;r+=1){var l=this.symbolInstances.get(s[r]);this.featureSortOrder.push(l.featureIndex),[l.rightJustifiedTextSymbolIndex,l.centerJustifiedTextSymbolIndex,l.leftJustifiedTextSymbolIndex].forEach((function(c,h,y){c>=0&&y.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)}},Ye("SymbolBucket",ir,{omit:["layers","collisionBoxArray","features","compareText"]}),ir.MAX_GLYPHS=65535,ir.addDynamicAttributes=ip;var hw=new xn({"symbol-placement":new at(U.layout_symbol["symbol-placement"]),"symbol-spacing":new at(U.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new at(U.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new et(U.layout_symbol["symbol-sort-key"]),"symbol-z-order":new at(U.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new at(U.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new at(U.layout_symbol["icon-ignore-placement"]),"icon-optional":new at(U.layout_symbol["icon-optional"]),"icon-rotation-alignment":new at(U.layout_symbol["icon-rotation-alignment"]),"icon-size":new et(U.layout_symbol["icon-size"]),"icon-text-fit":new at(U.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new at(U.layout_symbol["icon-text-fit-padding"]),"icon-image":new et(U.layout_symbol["icon-image"]),"icon-rotate":new et(U.layout_symbol["icon-rotate"]),"icon-padding":new at(U.layout_symbol["icon-padding"]),"icon-keep-upright":new at(U.layout_symbol["icon-keep-upright"]),"icon-offset":new et(U.layout_symbol["icon-offset"]),"icon-anchor":new et(U.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new at(U.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new at(U.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new at(U.layout_symbol["text-rotation-alignment"]),"text-field":new et(U.layout_symbol["text-field"]),"text-font":new et(U.layout_symbol["text-font"]),"text-size":new et(U.layout_symbol["text-size"]),"text-max-width":new et(U.layout_symbol["text-max-width"]),"text-line-height":new at(U.layout_symbol["text-line-height"]),"text-letter-spacing":new et(U.layout_symbol["text-letter-spacing"]),"text-justify":new et(U.layout_symbol["text-justify"]),"text-radial-offset":new et(U.layout_symbol["text-radial-offset"]),"text-variable-anchor":new at(U.layout_symbol["text-variable-anchor"]),"text-anchor":new et(U.layout_symbol["text-anchor"]),"text-max-angle":new at(U.layout_symbol["text-max-angle"]),"text-writing-mode":new at(U.layout_symbol["text-writing-mode"]),"text-rotate":new et(U.layout_symbol["text-rotate"]),"text-padding":new at(U.layout_symbol["text-padding"]),"text-keep-upright":new at(U.layout_symbol["text-keep-upright"]),"text-transform":new et(U.layout_symbol["text-transform"]),"text-offset":new et(U.layout_symbol["text-offset"]),"text-allow-overlap":new at(U.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new at(U.layout_symbol["text-ignore-placement"]),"text-optional":new at(U.layout_symbol["text-optional"])}),op={paint:new xn({"icon-opacity":new et(U.paint_symbol["icon-opacity"]),"icon-color":new et(U.paint_symbol["icon-color"]),"icon-halo-color":new et(U.paint_symbol["icon-halo-color"]),"icon-halo-width":new et(U.paint_symbol["icon-halo-width"]),"icon-halo-blur":new et(U.paint_symbol["icon-halo-blur"]),"icon-translate":new at(U.paint_symbol["icon-translate"]),"icon-translate-anchor":new at(U.paint_symbol["icon-translate-anchor"]),"text-opacity":new et(U.paint_symbol["text-opacity"]),"text-color":new et(U.paint_symbol["text-color"],{runtimeType:Ne,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new et(U.paint_symbol["text-halo-color"]),"text-halo-width":new et(U.paint_symbol["text-halo-width"]),"text-halo-blur":new et(U.paint_symbol["text-halo-blur"]),"text-translate":new at(U.paint_symbol["text-translate"]),"text-translate-anchor":new at(U.paint_symbol["text-translate-anchor"])}),layout:hw},Es=function(e){this.type=e.property.overrides?e.property.overrides.runtimeType:He,this.defaultValue=e};
1Es.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},Es.prototype.eachChild=function(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)},Es.prototype.outputDefined=function(){return!1},Es.prototype.serialize=function(){return null},Ye("FormatSectionOverride",Es,{omit:["defaultValue"]});var fw=(function(e){function t(r){e.call(this,r,op)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.recalculate=function(r,s){if(e.prototype.recalculate.call(this,r,s),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,y=l;h<y.length;h+=1){var b=y[h];c.indexOf(b)<0&&c.push(b)}this.layout._values["text-writing-mode"]=c}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},t.prototype.getValueAndResolveTokens=function(r,s,l,c){var h=this.layout.get(r).evaluate(s,{},l,c),y=this._unevaluatedLayout._values[r];return y.isDataDriven()||_a(y.value)||!h?h:(function(b,I){return I.replace(/{([^{}]+)}/g,(function(C,P){return P in b?String(b[P]):""}))})(s.properties,h)},t.prototype.createBucket=function(r){return new ir(r)},t.prototype.queryRadius=function(){return 0},t.prototype.queryIntersectsFeature=function(){return!1},t.prototype._setPaintOverrides=function(){for(var r=0,s=op.paint.overridableProperties;r<s.length;r+=1){var l=s[r];if(t.hasPaintOverride(this.layout,l)){var c,h=this.paint.get(l),y=new Es(h),b=new Xo(y,h.property.specification);c=h.value.kind==="constant"||h.value.kind==="source"?new xa("source",b):new Ho("composite",b,h.value.zoomStops,h.value._interpolationType),this.paint._values[l]=new An(h.property,c,h.parameters)}}},t.prototype._handleOverridablePaintPropertyUpdate=function(r,s,l){return!(!this.layout||s.isDataDriven()||l.isDataDriven())&&t.hasPaintOverride(this.layout,r)},t.hasPaintOverride=function(r,s){var l=r.get("text-field"),c=op.paint.properties[s],h=!1,y=function(C){for(var P=0,D=C;P<D.length;P+=1)if(c.overrides&&c.overrides.hasOverride(D[P]))return void(h=!0)};if(l.value.kind==="constant"&&l.value.value instanceof sn)y(l.value.value.sections);else if(l.value.kind==="source"){var b=function(C){h||(C instanceof In&&Dr(C.value)===ar?y(C.value.sections):C instanceof di?y(C.sections):C.eachChild(b))},I=l.value;I._styleExpression&&b(I._styleExpression.expression)}return h},t})(Si),dw={paint:new xn({"background-color":new at(U.paint_background["background-color"]),"background-pattern":new Cn(U.paint_background["background-pattern"]),"background-opacity":new at(U.paint_background["background-opacity"])})},yw=(function(e){function t(r){e.call(this,r,dw)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t})(Si),mw={paint:new xn({"raster-opacity":new at(U.paint_raster["raster-opacity"]),"raster-hue-rotate":new at(U.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new at(U.paint_raster["raster-brightness-min"]),"raster-brightness-max":new at(U.paint_raster["raster-brightness-max"]),"raster-saturation":new at(U.paint_raster["raster-saturation"]),"raster-contrast":new at(U.paint_raster["raster-contrast"]),"raster-resampling":new at(U.paint_raster["raster-resampling"]),"raster-fade-duration":new at(U.paint_raster["raster-fade-duration"])})},vw=(function(e){function t(r){e.call(this,r,mw)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t})(Si),gw=(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}
vendor: 10,685 bytes, line 1
1)(Si),_w={circle:jc,heatmap:r1,hillshade:i1,fill:b1,"fill-extrusion":M1,line:O1,symbol:fw,background:yw,raster:vw},Wm=F.HTMLImageElement,Xm=F.HTMLCanvasElement,Hm=F.HTMLVideoElement,Km=F.ImageData,$l=F.ImageBitmap,Ba=function(e,t,r,s){this.context=e,this.format=r,this.texture=e.gl.createTexture(),this.update(t,s)};Ba.prototype.update=function(e,t,r){var s=e.width,l=e.height,c=!(this.size&&this.size[0]===s&&this.size[1]===l||r),h=this.context,y=h.gl;if(this.useMipmap=!!(t&&t.useMipmap),y.bindTexture(y.TEXTURE_2D,this.texture),h.pixelStoreUnpackFlipY.set(!1),h.pixelStoreUnpack.set(1),h.pixelStoreUnpackPremultiplyAlpha.set(this.format===y.RGBA&&(!t||t.premultiply!==!1)),c)this.size=[s,l],e instanceof Wm||e instanceof Xm||e instanceof Hm||e instanceof Km||$l&&e instanceof $l?y.texImage2D(y.TEXTURE_2D,0,this.format,this.format,y.UNSIGNED_BYTE,e):y.texImage2D(y.TEXTURE_2D,0,this.format,s,l,0,this.format,y.UNSIGNED_BYTE,e.data);else{var b=r||{x:0,y:0},I=b.x,C=b.y;e instanceof Wm||e instanceof Xm||e instanceof Hm||e instanceof Km||$l&&e instanceof $l?y.texSubImage2D(y.TEXTURE_2D,0,I,C,y.RGBA,y.UNSIGNED_BYTE,e):y.texSubImage2D(y.TEXTURE_2D,0,I,C,s,l,y.RGBA,y.UNSIGNED_BYTE,e.data)}this.useMipmap&&this.isSizePowerOfTwo()&&y.generateMipmap(y.TEXTURE_2D)},Ba.prototype.bind=function(e,t,r){var s=this.context.gl;s.bindTexture(s.TEXTURE_2D,this.texture),r!==s.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=s.LINEAR),e!==this.filter&&(s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,e),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,r||e),this.filter=e),t!==this.wrap&&(s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,t),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,t),this.wrap=t)},Ba.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},Ba.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var ap=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()})};ap.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))},ap.prototype.remove=function(){delete this._channel,this._callback=function(){}};var As=function(e,t,r){this.target=e,this.parent=t,this.mapId=r,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},pe(["receive","process"],this),this.invoker=new ap(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=Xt()?e:F};function Jm(e,t,r){var s=2*Math.PI*6378137/256/Math.pow(2,r);return[e*s-2*Math.PI*6378137/2,t*s-2*Math.PI*6378137/2]}As.prototype.send=function(e,t,r,s,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 y=zr(this.globalScope)?void 0:[];return this.target.postMessage({id:h,type:e,hasCallback:!!r,targetMapId:s,mustQueue:l,sourceMapId:this.mapId,data:mi(t,y)},y),{cancel:function(){r&&delete c.callbacks[h],c.target.postMessage({id:h,type:"<cancel>",targetMapId:s,sourceMapId:c.mapId})}}},As.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 s=this.cancelCallbacks[r];delete this.cancelCallbacks[r],s&&s()}else Xt()||t.mustQueue?(this.tasks[r]=t,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,t)},As.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)}},As.prototype.processTask=function(e,t){var r=this;if(t.type==="<response>"){var s=this.callbacks[e];delete this.callbacks[e],s&&(t.error?s(Vn(t.error)):s(null,Vn(t.data)))}else{var l=!1,c=zr(this.globalScope)?void 0:[],h=t.hasCallback?function(C,P){l=!0,delete r.cancelCallbacks[e],r.target.postMessage({id:e,type:"<response>",sourceMapId:r.mapId,error:C?mi(C):null,data:mi(P,c)},c)}:function(C){l=!0},y=null,b=Vn(t.data);if(this.parent[t.type])y=this.parent[t.type](t.sourceMapId,b,h);else if(this.parent.getWorkerSource){var I=t.type.split(".");y=this.parent.getWorkerSource(t.sourceMapId,I[0],b.source)[I[1]](b,h)}else h(new Error("Could not find function "+t.type));!l&&y&&y.cancel&&(this.cancelCallbacks[e]=y.cancel)}},As.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Hr=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]))};Hr.prototype.setNorthEast=function(e){return this._ne=e instanceof _r?new _r(e.lng,e.lat):_r.convert(e),this},Hr.prototype.setSouthWest=function(e){return this._sw=e instanceof _r?new _r(e.lng,e.lat):_r.convert(e),this},Hr.prototype.extend=function(e){var t,r,s=this._sw,l=this._ne;if(e instanceof _r)t=e,r=e;else{if(!(e instanceof Hr))return Array.isArray(e)?e.length===4||e.every(Array.isArray)?this.extend(Hr.convert(e)):this.extend(_r.convert(e)):this;if(r=e._ne,!(t=e._sw)||!r)return this}return s||l?(s.lng=Math.min(t.lng,s.lng),s.lat=Math.min(t.lat,s.lat),l.lng=Math.max(r.lng,l.lng),l.lat=Math.max(r.lat,l.lat)):(this._sw=new _r(t.lng,t.lat),this._ne=new _r(r.lng,r.lat)),this},Hr.prototype.getCenter=function(){return new _r((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Hr.prototype.getSouthWest=function(){return this._sw},Hr.prototype.getNorthEast=function(){return this._ne},Hr.prototype.getNorthWest=function(){return new _r(this.getWest(),this.getNorth())},Hr.prototype.getSouthEast=function(){return new _r(this.getEast(),this.getSouth())},Hr.prototype.getWest=function(){return this._sw.lng},Hr.prototype.getSouth=function(){return this._sw.lat},Hr.prototype.getEast=function(){return this._ne.lng},Hr.prototype.getNorth=function(){return this._ne.lat},Hr.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Hr.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Hr.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Hr.prototype.contains=function(e){var t=_r.convert(e),r=t.lng,s=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<=s&&s<=this._ne.lat&&l},Hr.convert=function(e){return!e||e instanceof Hr?e:new Hr(e)};var _r=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")};_r.prototype.wrap=function(){return new _r(xe(this.lng,-180,180),this.lat)},_r.prototype.toArray=function(){return[this.lng,this.lat]},_r.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},_r.prototype.distanceTo=function(e){var t=Math.PI/180,r=this.lat*t,s=e.lat*t,l=Math.sin(r)*Math.sin(s)+Math.cos(r)*Math.cos(s)*Math.cos((e.lng-this.lng)*t);return 63710088e-1*Math.acos(Math.min(l,1))},_r.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 Hr(new _r(this.lng-r,this.lat-t),new _r(this.lng+r,this.lat+t))},_r.convert=function(e){if(e instanceof _r)return e;if(Array.isArray(e)&&(e.length===2||e.length===3))return new _r(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&typeof e=="object"&&e!==null)return new _r(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 Ym=2*Math.PI*63710088e-1;function Qm(e){return Ym*Math.cos(e*Math.PI/180)}function ev(e){return(180+e)/360}function tv(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function rv(e,t){return e/Qm(t)}function sp(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}var Fa=function(e,t,r){r===void 0&&(r=0),this.x=+e,this.y=+t,this.z=+r};Fa.fromLngLat=function(e,t){t===void 0&&(t=0);var r=_r.convert(e);return new Fa(ev(r.lng),tv(r.lat),rv(t,r.lat))},Fa.prototype.toLngLat=function(){return new _r(360*this.x-180,sp(this.y))},Fa.prototype.toAltitude=function(){return this.z*Qm(sp(this.y))},Fa.prototype.meterInMercatorCoordinateUnits=function(){return 1/Ym*(e=sp(this.y),1/Math.cos(e*Math.PI/180));var e};var Na=function(e,t,r){this.z=e,this.x=t,this.y=r,this.key=Mu(0,e,e,t,r)};Na.prototype.equals=function(e){return this.z===e.z&&this.x===e.x&&this.y===e.y},Na.prototype.url=function(e,t){var r,s,l,c,h,y=(s=this.y,l=this.z,c=Jm(256*(r=this.x),256*(s=Math.pow(2,l)-s-1),l),h=Jm(256*(r+1),256*(s+1),l),c[0]+","+c[1]+","+h[0]+","+h[1]),b=(function(I,C,P){for(var D,N="",X=I;X>0;X--)N+=(C&(D=1<<X-1)?1:0)+(P&D?2:0);return N})(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}",b).replace("{bbox-epsg-3857}",y)},Na.prototype.getTilePoint=function(e){var t=Math.pow(2,this.z);return new z(8192*(e.x*t-this.x),8192*(e.y*t-this.y))},Na.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var nv=function(e,t){this.wrap=e,this.canonical=t,this.key=Mu(e,t.z,t.z,t.x,t.y)},Kr=function(e,t,r,s,l){this.overscaledZ=e,this.wrap=t,this.canonical=new Na(r,+s,+l),this.key=Mu(t,e,r,s,l)};function Mu(e,t,r,s,l){(e*=2)<0&&(e=-1*e-1);var c=1<<r;return(c*c*e+c*l+s).toString(36)+r.toString(36)+t.toString(36)}Kr.prototype.equals=function(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)},Kr.prototype.scaledTo=function(e){var t=this.canonical.z-e;return e>this.canonical.z?new Kr(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Kr(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)},Kr.prototype.calculateScaledKey=function(e,t){var r=this.canonical.z-e;return e>this.canonical.z?Mu(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y):Mu(this.wrap*+t,e,e,this.canonical.x>>r,this.canonical.y>>r)},Kr.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},Kr.prototype.children=function(e){if(this.overscaledZ>
1=e)return[new Kr(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,s=2*this.canonical.y;return[new Kr(t,this.wrap,t,r,s),new Kr(t,this.wrap,t,r+1,s),new Kr(t,this.wrap,t,r,s+1),new Kr(t,this.wrap,t,r+1,s+1)]},Kr.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))},Kr.prototype.wrapped=function(){return new Kr(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Kr.prototype.unwrapTo=function(e){return new Kr(this.overscaledZ,e,this.canonical.z,this.canonical.x,this.canonical.y)},Kr.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Kr.prototype.toUnwrapped=function(){return new nv(this.wrap,this.canonical)},Kr.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},Kr.prototype.getTilePoint=function(e){return this.canonical.getTilePoint(new Fa(e.x-this.wrap,e.y))},Ye("CanonicalTileID",Na),Ye("OverscaledTileID",Kr,{omit:["posMatrix"]});var Do=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 pt('"'+r+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=t.height;var s=this.dim=t.height-2;this.data=new Uint32Array(t.data.buffer),this.encoding=r||"mapbox";for(var l=0;l<s;l++)this.data[this._idx(-1,l)]=this.data[this._idx(0,l)],this.data[this._idx(s,l)]=this.data[this._idx(s-1,l)],this.data[this._idx(l,-1)]=this.data[this._idx(l,0)],this.data[this._idx(l,s)]=this.data[this._idx(l,s-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(s,-1)]=this.data[this._idx(s-1,0)],this.data[this._idx(-1,s)]=this.data[this._idx(0,s-1)],this.data[this._idx(s,s)]=this.data[this._idx(s-1,s-1)]};Do.prototype.get=function(e,t){var r=new Uint8Array(this.data.buffer),s=4*this._idx(e,t);return(this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox)(r[s],r[s+1],r[s+2])},Do.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},Do.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)},Do.prototype._unpackMapbox=function(e,t,r){return(256*e*256+256*t+r)/10-1e4},Do.prototype._unpackTerrarium=function(e,t,r){return 256*e+t+r/256-32768},Do.prototype.getPixels=function(){return new Wn({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Do.prototype.backfillBorder=function(e,t,r){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");var s=t*this.dim,l=t*this.dim+this.dim,c=r*this.dim,h=r*this.dim+this.dim;switch(t){case-1:s=l-1;break;case 1:l=s+1}switch(r){case-1:c=h-1;break;case 1:h=c+1}for(var y=-t*this.dim,b=-r*this.dim,I=c;I<h;I++)for(var C=s;C<l;C++)this.data[this._idx(C,I)]=e.data[this._idx(C+y,I+b)]},Ye("DEMData",Do);var Zl=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}};Zl.prototype.encode=function(e){return this._stringToNumber[e]},Zl.prototype.decode=function(e){return this._numberToString[e]};var Wl=function(e,t,r,s,l){this.type="Feature",this._vectorTileFeature=e,e._z=t,e._x=r,e._y=s,this.properties=e.properties,this.id=l},up={geometry:{configurable:!0}};up.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},up.geometry.set=function(e){this._geometry=e},Wl.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(Wl.prototype,up);var Cs=function(){this.state={},this.stateChanges={},this.deletedStates={}};Cs.prototype.updateState=function(e,t,r){var s=String(t);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][s]=this.stateChanges[e][s]||{},ce(this.stateChanges[e][s],r),this.deletedStates[e]===null)for(var l in this.deletedStates[e]={},this.state[e])l!==s&&(this.deletedStates[e][l]=null);else if(this.deletedStates[e]&&this.deletedStates[e][s]===null)for(var c in this.deletedStates[e][s]={},this.state[e][s])r[c]||(this.deletedStates[e][s][c]=null);else for(var h in r)this.deletedStates[e]&&this.deletedStates[e][s]&&this.deletedStates[e][s][h]===null&&delete this.deletedStates[e][s][h]},Cs.prototype.removeFeatureState=function(e,t,r){if(this.deletedStates[e]!==null){var s=String(t);if(this.deletedStates[e]=this.deletedStates[e]||{},r&&t!==void 0)this.deletedStates[e][s]!==null&&(this.deletedStates[e][s]=this.deletedStates[e][s]||{},this.deletedStates[e][s][r]=null);else if(t!==void 0)if(this.stateChanges[e]&&this.stateChanges[e][s])for(r in this.deletedStates[e][s]={},this.stateChanges[e][s])this.deletedStates[e][s][r]=null;else this.deletedStates[e][s]=null;else this.deletedStates[e]=null}},Cs.prototype.getState=function(e,t){var r=String(t),s=ce({},(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 s[c]}return s},Cs.prototype.initializeTileState=function(e,t){e.setFeatureState(this.state,t)},Cs.prototype.coalesceChanges=function(e,t){var r={};for(var s in this.stateChanges){this.state[s]=this.state[s]||{};var l={};for(var c in this.stateChanges[s])this.state[s][c]||(this.state[s][c]={}),ce(this.state[s][c],this.stateChanges[s][c]),l[c]=this.state[s][c];r[s]=l}for(var h in this.deletedStates){this.state[h]=this.state[h]||{};var y={};if(this.deletedStates[h]===null)for(var b in this.state[h])y[b]={},this.state[h][b]={};else for(var I in this.deletedStates[h]){if(this.deletedStates[h][I]===null)this.state[h][I]={};else for(var C=0,P=Object.keys(this.deletedStates[h][I]);C<P.length;C+=1)delete this.state[h][I][P[C]];
1y[I]=this.state[h][I]}r[h]=r[h]||{},ce(r[h],y)}if(this.stateChanges={},this.deletedStates={},Object.keys(r).length!==0)for(var D in e)e[D].setFeatureState(r,t)};var Oo=function(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new zi(8192,16,0),this.grid3D=new zi(8192,16,0),this.featureIndexArray=new R,this.promoteId=t};function iv(e,t,r,s,l){return Re(e,(function(c,h){var y=t instanceof Pa?t.get(h):null;return y&&y.evaluate?y.evaluate(r,s,l):y}))}function ov(e){for(var t=1/0,r=1/0,s=-1/0,l=-1/0,c=0,h=e;c<h.length;c+=1){var y=h[c];t=Math.min(t,y.x),r=Math.min(r,y.y),s=Math.max(s,y.x),l=Math.max(l,y.y)}return{minX:t,minY:r,maxX:s,maxY:l}}function xw(e,t){return t-e}Oo.prototype.insert=function(e,t,r,s,l,c){var h=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,s,l);for(var y=c?this.grid3D:this.grid,b=0;b<t.length;b++){for(var I=t[b],C=[1/0,1/0,-1/0,-1/0],P=0;P<I.length;P++){var D=I[P];C[0]=Math.min(C[0],D.x),C[1]=Math.min(C[1],D.y),C[2]=Math.max(C[2],D.x),C[3]=Math.max(C[3],D.y)}C[0]<8192&&C[1]<8192&&C[2]>=0&&C[3]>=0&&y.insert(h,C[0],C[1],C[2],C[3])}},Oo.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new gs.VectorTile(new Dl(this.rawTileData)).layers,this.sourceLayerCoder=new Zl(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Oo.prototype.query=function(e,t,r,s){var l=this;this.loadVTLayers();for(var c=e.params||{},h=8192/e.tileSize/e.scale,y=ts(c.filter),b=e.queryGeometry,I=e.queryPadding*h,C=ov(b),P=this.grid.query(C.minX-I,C.minY-I,C.maxX+I,C.maxY+I),D=ov(e.cameraQueryGeometry),N=this.grid3D.query(D.minX-I,D.minY-I,D.maxX+I,D.maxY+I,(function(ve,be,Ce,De){return(function(Ue,ot,$e,ut,Xe){for(var At=0,dt=Ue;At<dt.length;At+=1){var tt=dt[At];if(ot<=tt.x&&$e<=tt.y&&ut>=tt.x&&Xe>=tt.y)return!0}var Ct=[new z(ot,$e),new z(ot,Xe),new z(ut,Xe),new z(ut,$e)];if(Ue.length>2){for(var bt=0,Bt=Ct;bt<Bt.length;bt+=1)if(Ii(Ue,Bt[bt]))return!0}for(var lt=0;lt<Ue.length-1;lt++)if(La(Ue[lt],Ue[lt+1],Ct))return!0;return!1})(e.cameraQueryGeometry,ve-I,be-I,Ce+I,De+I)})),X=0,H=N;X<H.length;X+=1)P.push(H[X]);P.sort(xw);for(var ne,ee={},le=function(ve){var be=P[ve];if(be!==ne){ne=be;var Ce=l.featureIndexArray.get(be),De=null;l.loadMatchingFeature(ee,Ce.bucketIndex,Ce.sourceLayerIndex,Ce.featureIndex,y,c.layers,c.availableImages,t,r,s,(function(Ue,ot,$e){return De||(De=Ir(Ue)),ot.queryIntersectsFeature(b,Ue,$e,De,l.z,e.transform,h,e.pixelPosMatrix)}))}},de=0;de<P.length;de++)le(de);return ee},Oo.prototype.loadMatchingFeature=function(e,t,r,s,l,c,h,y,b,I,C){var P=this.bucketLayerIDs[t];if(!c||(function(Ue,ot){for(var $e=0;$e<Ue.length;$e++)if(ot.indexOf(Ue[$e])>=0)return!0;return!1})(c,P)){var D=this.sourceLayerCoder.decode(r),N=this.vtLayers[D].feature(s);if(l.needGeometry){var X=Or(N,!0);if(!l.filter(new kt(this.tileID.overscaledZ),X,this.tileID.canonical))return}else if(!l.filter(new kt(this.tileID.overscaledZ),N))return;for(var H=this.getId(N,D),ne=0;ne<P.length;ne++){var ee=P[ne];if(!(c&&c.indexOf(ee)<0)){var le=y[ee];if(le){var de={};H!==void 0&&I&&(de=I.getState(le.sourceLayer||"_geojsonTileLayer",H));var ve=ce({},b[ee]);ve.paint=iv(ve.paint,le.paint,N,de,h),ve.layout=iv(ve.layout,le.layout,N,de,h);var be=!C||C(N,le,de);if(be){var Ce=new Wl(N,this.z,this.x,this.y,H);Ce.layer=ve;var De=e[ee];De===void 0&&(De=e[ee]=[]),De.push({featureIndex:s,feature:Ce,intersectionZ:be})}}}}}},Oo.prototype.lookupSymbolFeatures=function(e,t,r,s,l,c,h,y){var b={};this.loadVTLayers();for(var I=ts(l),C=0,P=e;C<P.length;C+=1)this.loadMatchingFeature(b,r,s,P[C],I,c,h,y,t);return b},Oo.prototype.hasLayer=function(e){for(var t=0,r=this.bucketLayerIDs;t<r.length;t+=1)for(var s=0,l=r[t];s<l.length;s+=1)if(e===l[s])return!0;return!1},Oo.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: 4,113 bytes, line 1
1)=="boolean"&&(r=Number(r)),r},Ye("FeatureIndex",Oo,{omit:["rawTileData","sourceLayerCoder"]});var pn=function(e,t){this.tileID=e,this.uid=me(),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"};pn.prototype.registerFadeDuration=function(e){var t=e+this.timeAdded;t<dn.now()||this.fadeEndTime&&t<this.fadeEndTime||(this.fadeEndTime=t)},pn.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},pn.prototype.loadVectorData=function(e,t,r){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){for(var s 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(I,C){var P={};if(!C)return P;for(var D=function(){var H=X[N],ne=H.layerIds.map((function(de){return C.getLayer(de)})).filter(Boolean);if(ne.length!==0){H.layers=ne,H.stateDependentLayerIds&&(H.stateDependentLayers=H.stateDependentLayerIds.map((function(de){return ne.filter((function(ve){return ve.id===de}))[0]})));for(var ee=0,le=ne;ee<le.length;ee+=1)P[le[ee].id]=H}},N=0,X=I;N<X.length;N+=1)D();return P})(e.buckets,t.style),this.hasSymbolBuckets=!1,this.buckets){var l=this.buckets[s];if(l instanceof ir){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 ir&&h.hasRTLText){this.hasRTLText=!0,Yn.isLoading()||Yn.isLoaded()||fu()!=="deferred"||vi();break}}for(var y in this.queryPadding=0,this.buckets){var b=this.buckets[y];this.queryPadding=Math.max(this.queryPadding,t.style.getLayer(y).queryRadius(b))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new o},pn.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"},pn.prototype.getBucket=function(e){return this.buckets[e.id]},pn.prototype.upload=function(e){for(var t in this.buckets){var r=this.buckets[t];r.uploadPending()&&r.upload(e)}var s=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Ba(e,this.imageAtlas.image,s.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Ba(e,this.glyphAtlasImage,s.ALPHA),this.glyphAtlasImage=null)},pn.prototype.prepare=function(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)},pn.prototype.queryRenderedFeatures=function(e,t,r,s,l,c,h,y,b,I){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:s,cameraQueryGeometry:l,scale:c,tileSize:this.tileSize,pixelPosMatrix:I,transform:y,params:h,queryPadding:this.queryPadding*b},e,t,r):{}},pn.prototype.querySourceFeatures=function(e,t){var r=this.latestFeatureIndex;if(r&&r.rawTileData){var s=r.loadVTLayers(),l=t?t.sourceLayer:"",c=s._geojsonTileLayer||s[l];if(c)for(var h=ts(t&&t.filter),y=this.tileID.canonical,b=y.z,I=y.x,C=y.y,P={z:b,x:I,y:C},D=0;D<c.length;D++){var N=c.feature(D);if(h.needGeometry){var X=Or(N,!0);if(!h.filter(new kt(this.tileID.overscaledZ),X,this.tileID.canonical))continue}else if(!h.filter(new kt(this.tileID.overscaledZ),N))continue;var H=r.getId(N,l),ne=new Wl(N,b,I,C,H);ne.tile=P,e.push(ne)}}},pn.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"},pn.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},pn.prototype.setExpiryData=function(e){var t=this.expirationTime;
1if(e.cacheControl){var r=Rr(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 s=Date.now(),l=!1;if(this.expirationTime>s)l=!1;else if(t)if(this.expirationTime<t)l=!0;else{var c=this.expirationTime-t;c?this.expirationTime=s+Math.max(c,3e4):l=!0}else l=!0;l?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},pn.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)},pn.prototype.setFeatureState=function(e,t){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&Object.keys(e).length!==0){var r=this.latestFeatureIndex.loadVTLayers();for(var s in this.buckets)if(t.style.hasLayer(s)){var l=this.buckets[s],c=l.layers[0].sourceLayer||"_geojsonTileLayer",h=r[c],y=e[c];if(h&&y&&Object.keys(y).length!==0){l.update(y,h,this.imageAtlas&&this.imageAtlas.patternPositions||{});var b=t&&t.style&&t.style.getLayer(s);b&&(this.queryPadding=Math.max(this.queryPadding,b.queryRadius(l)))}}}},pn.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},pn.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<dn.now()},pn.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},pn.prototype.setHoldDuration=function(e){this.symbolFadeHoldUntil=dn.now()+e},pn.prototype.setDependencies=function(e,t){for(var r={},s=0,l=t;s<l.length;s+=1)r[l[s]]=!0;this.dependencies[e]=r},pn.prototype.hasDependency=function(e,t){for(var r=0,s=e;r<s.length;r+=1){var l=this.dependencies[s[r]];if(l){for(var c=0,h=t;c<h.length;c+=1)if(l[h[c]])return!0}}return!1};var aa=F.performance,av=function(e){this._marks={start:[e.url,"start"].join("#"),end:[e.url,"end"].join("#"),measure:e.url.toString()},aa.mark(this._marks.start)};av.prototype.finish=function(){aa.mark(this._marks.end);var e=aa.getEntriesByName(this._marks.measure);return e.length===0&&(aa.measure(this._marks.measure,this._marks.start,this._marks.end),e=aa.getEntriesByName(this._marks.measure),aa.clearMarks(this._marks.start),aa.clearMarks(this._marks.end),aa.clearMeasures(this._marks.measure)),e},a.Actor=As,a.AlphaImage=Oa,a.CanonicalTileID=Na,a.CollisionBoxArray=o,a.Color=$t,a.DEMData=Do,a.DataConstantProperty=at,a.DictionaryCoder=Zl,a.EXTENT=8192,a.ErrorEvent=ie,a.EvaluationParameters=kt,a.Event=K,a.Evented=oe,a.FeatureIndex=Oo,a.FillBucket=Bi,a.FillExtrusionBucket=Fi,a.ImageAtlas=Cu,a.ImagePosition=Bl,a.LineBucket=Bn,a.LngLat=_r,a.LngLatBounds=Hr,a.MercatorCoordinate=Fa,a.ONE_EM=24,a.OverscaledTileID=Kr,a.Point=z,a.Point$1=z,a.Properties=xn,a.Protobuf=Dl,a.RGBAImage=Wn,a.RequestManager=Ar,a.RequestPerformance=av,a.ResourceType=jt,a.SegmentVector=V,a.SourceFeatureState=Cs,a.StructArrayLayout1ui2=_u,a.StructArrayLayout2f1f2i16=ko,a.StructArrayLayout2i4=Mo,a.StructArrayLayout3ui6=eo,a.StructArrayLayout4i8=yu,a.SymbolBucket=ir,a.Texture=Ba,a.Tile=pn,a.Transitionable=_n,a.Uniform1f=Be,a.Uniform1i=Me,a.Uniform2f=Oe,a.Uniform3f=Ke,a.Uniform4f=st,a.UniformColor=ht,a.UniformMatrix4f=Ft,a.UnwrappedTileID=nv,a.ValidationError=Q,a.WritingMode=ci,a.ZoomHistory=lu,a.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},a.addDynamicAttributes=ip,a.asyncAll=function(e,t,r){if(!e.length)return r(null,[]);var s=e.length,l=new Array(e.length),c=null;e.forEach((function(h,y){t(h,(function(b,I){b&&(c=b),l[y]=I,--s==0&&r(c,l)}))}))},a.bezier=ue,a.bindAll=pe,a.browser=dn,a.cacheEntryPossiblyAdded=function(e){++we>Go&&(e.getActor().send("enforceCacheSizeLimit",Mi),we=0)},a.clamp=ge,a.clearTileCache=function(e){var t=F.caches.delete("mapbox-tiles");e&&t.catch(e).then((function(){return e()}))},a.clipLine=Um,a.clone=function(e){var t=new Zt(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},a.clone$1=se,a.clone$2=function(e){var t=new Zt(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},a.collisionCircleLayout=q1,a.config=Tt,a.create=function(){var e=new Zt(16);return Zt!=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},a.create$1=function(){var e=new Zt(9);return Zt!=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},a.create$2=function(){var e=new Zt(4);return Zt!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}
vendor: 5,174 bytes, line 1
1,a.createCommonjsModule=_,a.createExpression=Qa,a.createLayout=ln,a.createStyleLayer=function(e){return e.type==="custom"?new gw(e):new _w[e.type](e)},a.cross=function(e,t,r){var s=t[0],l=t[1],c=t[2],h=r[0],y=r[1],b=r[2];return e[0]=l*b-c*y,e[1]=c*h-s*b,e[2]=s*y-l*h,e},a.deepEqual=function e(t,r){if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(var s=0;s<t.length;s++)if(!e(t[s],r[s]))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},a.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},a.dot$1=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},a.ease=ye,a.emitValidationErrors=Ea,a.endsWith=je,a.enforceCacheSizeLimit=function(e){Vi(),on&&on.then((function(t){t.keys().then((function(r){for(var s=0;s<r.length-e;s++)t.delete(r[s])}))}))},a.evaluateSizeForFeature=Dm,a.evaluateSizeForZoom=Om,a.evaluateVariableOffset=Gm,a.evented=hu,a.extend=ce,a.featureFilter=ts,a.filterObject=it,a.fromRotation=function(e,t){var r=Math.sin(t),s=Math.cos(t);return e[0]=s,e[1]=r,e[2]=0,e[3]=-r,e[4]=s,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},a.getAnchorAlignment=ep,a.getAnchorJustification=np,a.getArrayBuffer=an,a.getImage=L,a.getJSON=function(e,t){return Nn(ce(e,{type:"json"}),t)},a.getRTLTextPluginStatus=fu,a.getReferrer=er,a.getVideo=function(e,t){var r,s,l=F.document.createElement("video");l.muted=!0,l.onloadstart=function(){t(null,l)};for(var c=0;c<e.length;c++){var h=F.document.createElement("source");r=e[c],s=void 0,(s=F.document.createElement("a")).href=r,(s.protocol!==F.document.location.protocol||s.host!==F.document.location.host)&&(l.crossOrigin="Anonymous"),h.src=e[c],l.appendChild(h)}return{cancel:function(){}}},a.identity=Qn,a.invert=function(e,t){var r=t[0],s=t[1],l=t[2],c=t[3],h=t[4],y=t[5],b=t[6],I=t[7],C=t[8],P=t[9],D=t[10],N=t[11],X=t[12],H=t[13],ne=t[14],ee=t[15],le=r*y-s*h,de=r*b-l*h,ve=r*I-c*h,be=s*b-l*y,Ce=s*I-c*y,De=l*I-c*b,Ue=C*H-P*X,ot=C*ne-D*X,$e=C*ee-N*X,ut=P*ne-D*H,Xe=P*ee-N*H,At=D*ee-N*ne,dt=le*At-de*Xe+ve*ut+be*$e-Ce*ot+De*Ue;return dt?(e[0]=(y*At-b*Xe+I*ut)*(dt=1/dt),e[1]=(l*Xe-s*At-c*ut)*dt,e[2]=(H*De-ne*Ce+ee*be)*dt,e[3]=(D*Ce-P*De-N*be)*dt,e[4]=(b*$e-h*At-I*ot)*dt,e[5]=(r*At-l*$e+c*ot)*dt,e[6]=(ne*ve-X*De-ee*de)*dt,e[7]=(C*De-D*ve+N*de)*dt,e[8]=(h*Xe-y*$e+I*Ue)*dt,e[9]=(s*$e-r*Xe-c*Ue)*dt,e[10]=(X*Ce-H*ve+ee*le)*dt,e[11]=(P*ve-C*Ce-N*le)*dt,e[12]=(y*ot-h*ut-b*Ue)*dt,e[13]=(r*ut-s*ot+l*Ue)*dt,e[14]=(H*de-X*be-ne*le)*dt,e[15]=(C*be-P*de+D*le)*dt,e):null},a.isChar=Ve,a.isMapboxURL=cr,a.keysDifference=function(e,t){var r=[];for(var s in e)s in t||r.push(s);return r},a.makeRequest=Nn,a.mapObject=Re,a.mercatorXfromLng=ev,a.mercatorYfromLat=tv,a.mercatorZfromAltitude=rv,a.mul=Vc,a.multiply=On,a.mvt=gs,a.nextPowerOfTwo=function(e){return e<=1?1:Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},a.normalize=function(e,t){var r=t[0],s=t[1],l=t[2],c=r*r+s*s+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},a.number=jr,a.offscreenCanvasSupported=Ae,a.ortho=function(e,t,r,s,l,c,h){var y=1/(t-r),b=1/(s-l),I=1/(c-h);return e[0]=-2*y,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*b,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*I,e[11]=0,e[12]=(t+r)*y,e[13]=(l+s)*b,e[14]=(h+c)*I,e[15]=1,e},a.parseGlyphPBF=function(e){return new Dl(e).readFields(J1,[])},a.pbf=Dl,a.performSymbolLayout=function(e,t,r,s,l,c,h){e.createArrays(),e.tilePixelRatio=8192/(512*e.overscaling),e.compareText={},e.iconsNeedLinear=!1;var y=e.layers[0].layout,b=e.layers[0]._unevaluatedLayout._values,I={};if(e.textSizeData.kind==="composite"){var C=e.textSizeData,P=C.maxZoom;I.compositeTextSizes=[b["text-size"].possiblyEvaluate(new kt(C.minZoom),h),b["text-size"].possiblyEvaluate(new kt(P),h)]}if(e.iconSizeData.kind==="composite"){var D=e.iconSizeData,N=D.maxZoom;I.compositeIconSizes=[b["icon-size"].possiblyEvaluate(new kt(D.minZoom),h),b["icon-size"].possiblyEvaluate(new kt(N),h)]}I.layoutTextSize=b["text-size"].possiblyEvaluate(new kt(e.zoom+1),h),I.layoutIconSize=b["icon-size"].possiblyEvaluate(new kt(e.zoom+1),h),I.textMaxSize=b["text-size"].possiblyEvaluate(new kt(18));for(var X=24*y.get("text-line-height"),H=y.get("text-rotation-alignment")==="map"&&y.get("symbol-placement")!=="point",ne=y.get("text-keep-upright"),ee=y.get("text-size"),le=function(){var be=ve[de],Ce=y.get("text-font").evaluate(be,{},h).join(","),De=ee.evaluate(be,{},h),Ue=I.layoutTextSize.evaluate(be,{},h),ot=I.layoutIconSize.evaluate(be,{},h),$e={horizontal:{},vertical:void 0},ut=be.text,Xe=[0,0];if(ut){var At=ut.toString(),dt=24*y.get("text-letter-spacing").evaluate(be,{},h),tt=(function(Rt){for(var ur=0,tr=Rt;ur<tr.length;ur+=1)if(Nt=tr[ur].charCodeAt(0),Ve.Arabic(Nt)||Ve["Arabic Supplement"](Nt)||Ve["Arabic Extended-A"](Nt)||Ve["Arabic Presentation Forms-A"](Nt)||Ve["Arabic Presentation Forms-B"](Nt))return!1;var Nt;return!0})(At)?dt:0,Ct=y.get("text-anchor").evaluate(be,{},h),bt=y.get("text-variable-anchor");if(!bt){var Bt=y.get("text-radial-offset").evaluate(be,{},h);Xe=Bt?Gm(Ct,[24*Bt,rp]):y.get("text-offset").evaluate(be,{},h).map((function(Rt){return 24*Rt}))}
1var lt=H?"center":y.get("text-justify").evaluate(be,{},h),Ut=y.get("symbol-placement"),xr=Ut==="point"?24*y.get("text-max-width").evaluate(be,{},h):0,Mr=function(){e.allowVerticalPlacement&&cu(At)&&($e.vertical=Fl(ut,t,r,l,Ce,xr,X,Ct,"left",tt,Xe,ci.vertical,!0,Ut,Ue,De))};if(!H&&bt){for(var Er=lt==="auto"?bt.map((function(Rt){return np(Rt)})):[lt],br=!1,kr=0;kr<Er.length;kr++){var en=Er[kr];if(!$e.horizontal[en])if(br)$e.horizontal[en]=$e.horizontal[0];else{var tn=Fl(ut,t,r,l,Ce,xr,X,"center",en,tt,Xe,ci.horizontal,!1,Ut,Ue,De);tn&&($e.horizontal[en]=tn,br=tn.positionedLines.length===1)}}Mr()}else{lt==="auto"&&(lt=np(Ct));var kn=Fl(ut,t,r,l,Ce,xr,X,Ct,lt,tt,Xe,ci.horizontal,!1,Ut,Ue,De);kn&&($e.horizontal[lt]=kn),Mr(),cu(At)&&H&&ne&&($e.vertical=Fl(ut,t,r,l,Ce,xr,X,Ct,lt,tt,Xe,ci.vertical,!1,Ut,Ue,De))}}var hn=void 0,Rn=!1;if(be.icon&&be.icon.name){var Br=s[be.icon.name];Br&&(hn=(function(Rt,ur,tr){var Nt=ep(tr),Fn=ur[0]-Rt.displaySize[0]*Nt.horizontalAlign,wn=ur[1]-Rt.displaySize[1]*Nt.verticalAlign;return{image:Rt,top:wn,bottom:wn+Rt.displaySize[1],left:Fn,right:Fn+Rt.displaySize[0]}})(l[be.icon.name],y.get("icon-offset").evaluate(be,{},h),y.get("icon-anchor").evaluate(be,{},h)),Rn=Br.sdf,e.sdfIcons===void 0?e.sdfIcons=Br.sdf:e.sdfIcons!==Br.sdf&&pt("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Br.pixelRatio!==e.pixelRatio||y.get("icon-rotate").constantOr(1)!==0)&&(e.iconsNeedLinear=!0))}var fn=Zm($e.horizontal)||$e.vertical;e.iconsInText=!!fn&&fn.iconsInText,(fn||hn)&&(function(Rt,ur,tr,Nt,Fn,wn,yr,$r,Sn,Vt,ao){var pi=wn.textMaxSize.evaluate(ur,{});pi===void 0&&(pi=yr);var so,Fr=Rt.layers[0].layout,uo=Fr.get("icon-offset").evaluate(ur,{},ao),Ai=Zm(tr.horizontal),Ps=yr/24,qa=Rt.tilePixelRatio*Ps,Ms=Rt.tilePixelRatio*pi/24,Bo=Rt.tilePixelRatio*$r,ks=Rt.tilePixelRatio*Fr.get("symbol-spacing"),Xl=Fr.get("text-padding")*Rt.tilePixelRatio,Rs=Fr.get("icon-padding")*Rt.tilePixelRatio,ku=Fr.get("text-max-angle")/180*Math.PI,Hl=Fr.get("text-rotation-alignment")==="map"&&Fr.get("symbol-placement")!=="point",Kl=Fr.get("icon-rotation-alignment")==="map"&&Fr.get("symbol-placement")!=="point",Fo=Fr.get("symbol-placement"),Ru=ks/2,zs=Fr.get("icon-text-fit");Nt&&zs!=="none"&&(Rt.allowVerticalPlacement&&tr.vertical&&(so=Lm(Nt,tr.vertical,zs,Fr.get("icon-text-fit-padding"),uo,Ps)),Ai&&(Nt=Lm(Nt,Ai,zs,Fr.get("icon-text-fit-padding"),uo,Ps)));var sa=function(bw,qu){qu.x<0||qu.x>=8192||qu.y<0||qu.y>=8192||(function(Nr,Ni,ww,ua,hp,lv,rc,lo,nc,Uu,ic,oc,fp,cv,Vu,pv,hv,fv,dv,yv,hi,ac,mv,co,Sw){var vv,Va,Fs,Ns,qs,Us=Nr.addToLineVertexArray(Ni,ww),gv=0,_v=0,xv=0,bv=0,dp=-1,yp=-1,No={},wv=Z(""),mp=0,vp=0;if(lo._unevaluatedLayout.getValue("text-radial-offset")===void 0?(mp=(vv=lo.layout.get("text-offset").evaluate(hi,{},co).map((function(Gu){return 24*Gu})))[0],vp=vv[1]):(mp=24*lo.layout.get("text-radial-offset").evaluate(hi,{},co),vp=rp),Nr.allowVerticalPlacement&&ua.vertical){var Sv=lo.layout.get("text-rotate").evaluate(hi,{},co)+90;Ns=new jl(nc,Ni,Uu,ic,oc,ua.vertical,fp,cv,Vu,Sv),rc&&(qs=new jl(nc,Ni,Uu,ic,oc,rc,hv,fv,Vu,Sv))}if(hp){var gp=lo.layout.get("icon-rotate").evaluate(hi,{}),Tv=lo.layout.get("icon-text-fit")!=="none",Iv=Vm(hp,gp,mv,Tv),_p=rc?Vm(rc,gp,mv,Tv):void 0;Fs=new jl(nc,Ni,Uu,ic,oc,hp,hv,fv,!1,gp),gv=4*Iv.length;var Ev=Nr.iconSizeData,ju=null;Ev.kind==="source"?(ju=[128*lo.layout.get("icon-size").evaluate(hi,{})])[0]>32640&&pt(Nr.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):Ev.kind==="composite"&&((ju=[128*ac.compositeIconSizes[0].evaluate(hi,{},co),128*ac.compositeIconSizes[1].evaluate(hi,{},co)])[0]>32640||ju[1]>32640)&&pt(Nr.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),Nr.addSymbols(Nr.icon,Iv,ju,yv,dv,hi,!1,Ni,Us.lineStartIndex,Us.lineLength,-1,co),dp=Nr.icon.placedSymbolArray.length-1,_p&&(_v=4*_p.length,Nr.addSymbols(Nr.icon,_p,ju,yv,dv,hi,ci.vertical,Ni,Us.lineStartIndex,Us.lineLength,-1,co),yp=Nr.icon.placedSymbolArray.length-1)}for(var Av in ua.horizontal){var sc=ua.horizontal[Av];if(!Va){wv=Z(sc.text);var Tw=lo.layout.get("text-rotate").evaluate(hi,{},co);Va=new jl(nc,Ni,Uu,ic,oc,sc,fp,cv,Vu,Tw)}var Cv=sc.positionedLines.length===1;if(xv+=$m(Nr,Ni,sc,lv,lo,Vu,hi,pv,Us,ua.vertical?ci.horizontal:ci.horizontalOnly,Cv?Object.keys(ua.horizontal):[Av],No,dp,ac,co),Cv)break}ua.vertical&&(bv+=$m(Nr,Ni,ua.vertical,lv,lo,Vu,hi,pv,Us,ci.vertical,["vertical"],No,yp,ac,co));var Iw=Va?Va.boxStartIndex:Nr.collisionBoxArray.length,Ew=Va?Va.boxEndIndex:Nr.collisionBoxArray.length,Aw=Ns?Ns.boxStartIndex:Nr.collisionBoxArray.length,Cw=Ns?Ns.boxEndIndex:Nr.collisionBoxArray.length,Pw=Fs?Fs.boxStartIndex:Nr.collisionBoxArray.length,Mw=Fs?Fs.boxEndIndex:Nr.collisionBoxArray.length,kw=qs?qs.boxStartIndex:Nr.collisionBoxArray.length,Rw=qs?qs.boxEndIndex:Nr.collisionBoxArray.length,po=-1,uc=function(Gu,Mv){return Gu&&Gu.circleDiameter?Math.max(Gu.circleDiameter,Mv):Mv};po=uc(Va,po),po=uc(Ns,po),po=uc(Fs,po);var Pv=(po=uc(qs,po))>-1?1:0;Pv&&(po*=Sw/24),Nr.glyphOffsetArray.length>=ir.MAX_GLYPHS&&pt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),hi.sortKey!==void 0&&Nr.addToSortKey
1Ranges(Nr.symbolInstances.length,hi.sortKey),Nr.symbolInstances.emplaceBack(Ni.x,Ni.y,No.right>=0?No.right:-1,No.center>=0?No.center:-1,No.left>=0?No.left:-1,No.vertical||-1,dp,yp,wv,Iw,Ew,Aw,Cw,Pw,Mw,kw,Rw,Uu,xv,bv,gv,_v,Pv,0,fp,mp,vp,po)})(Rt,qu,bw,tr,Nt,Fn,so,Rt.layers[0],Rt.collisionBoxArray,ur.index,ur.sourceLayerIndex,Rt.index,qa,Xl,Hl,Sn,Bo,Rs,Kl,uo,ur,wn,Vt,ao,yr)};if(Fo==="line")for(var Ls=0,Jl=Um(ur.geometry,0,0,8192,8192);Ls<Jl.length;Ls+=1)for(var Yl=Jl[Ls],zu=0,Lu=iw(Yl,ks,ku,tr.vertical||Ai,Nt,24,Ms,Rt.overscaling,8192);zu<Lu.length;zu+=1){var Ql=Lu[zu];Ai&&uw(Rt,Ai.text,Ru,Ql)||sa(Yl,Ql)}else if(Fo==="line-center")for(var Du=0,Ou=ur.geometry;Du<Ou.length;Du+=1){var Bu=Ou[Du];if(Bu.length>1){var ec=nw(Bu,ku,tr.vertical||Ai,Nt,24,Ms);ec&&sa(Bu,ec)}}else if(ur.type==="Polygon")for(var Ds=0,tc=Hc(ur.geometry,0);Ds<tc.length;Ds+=1){var Os=tc[Ds],Fu=aw(Os,16);sa(Os[0],new ws(Fu.x,Fu.y,0))}else if(ur.type==="LineString")for(var Ua=0,Nu=ur.geometry;Ua<Nu.length;Ua+=1){var Bs=Nu[Ua];sa(Bs,new ws(Bs[0].x,Bs[0].y,0))}else if(ur.type==="Point")for(var lp=0,sv=ur.geometry;lp<sv.length;lp+=1)for(var cp=0,uv=sv[lp];cp<uv.length;cp+=1){var pp=uv[cp];sa([pp],new ws(pp.x,pp.y,0))}})(e,be,$e,hn,s,I,Ue,ot,Xe,Rn,h)},de=0,ve=e.features;de<ve.length;de+=1)le();c&&e.generateCollisionDebugBuffers()},a.perspective=function(e,t,r,s,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+s)*(c=1/(s-l)),e[14]=2*l*s*c):(e[10]=-1,e[14]=-2*s),e},a.pick=function(e,t){for(var r={},s=0;s<t.length;s++){var l=t[s];l in e&&(r[l]=e[l])}return r},a.plugin=Yn,a.polygonIntersectsPolygon=no,a.postMapLoadEvent=Pi,a.postTurnstileEvent=jo,a.potpack=Mm,a.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],a.register=Ye,a.registerForPluginStateChange=function(e){return e({pluginStatus:Gn,pluginURL:Li}),hu.on("pluginStateChange",e),e},a.renderColorRamp=pm,a.rotate=function(e,t,r){var s=t[0],l=t[1],c=t[2],h=t[3],y=Math.sin(r),b=Math.cos(r);return e[0]=s*b+c*y,e[1]=l*b+h*y,e[2]=s*-y+c*b,e[3]=l*-y+h*b,e},a.rotateX=function(e,t,r){var s=Math.sin(r),l=Math.cos(r),c=t[4],h=t[5],y=t[6],b=t[7],I=t[8],C=t[9],P=t[10],D=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+I*s,e[5]=h*l+C*s,e[6]=y*l+P*s,e[7]=b*l+D*s,e[8]=I*l-c*s,e[9]=C*l-h*s,e[10]=P*l-y*s,e[11]=D*l-b*s,e},a.rotateZ=function(e,t,r){var s=Math.sin(r),l=Math.cos(r),c=t[0],h=t[1],y=t[2],b=t[3],I=t[4],C=t[5],P=t[6],D=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+I*s,e[1]=h*l+C*s,e[2]=y*l+P*s,e[3]=b*l+D*s,e[4]=I*l-c*s,e[5]=C*l-h*s,e[6]=P*l-y*s,e[7]=D*l-b*s,e},a.scale=function(e,t,r){var s=r[0],l=r[1],c=r[2];return e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e[3]=t[3]*s,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},a.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},a.scale$2=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e},a.setCacheLimits=function(e,t){Mi=e,Go=t},a.setRTLTextPlugin=function(e,t,r){if(r===void 0&&(r=!1),Gn==="deferred"||Gn==="loading"||Gn==="loaded")throw new Error("setRTLTextPlugin cannot be called multiple times.");Li=dn.resolveURL(e),Gn="deferred",us=t,Ca(),r||vi()},a.sphericalToCartesian=function(e){var t=e[0],r=e[1],s=e[2];return r+=90,r*=Math.PI/180,s*=Math.PI/180,{x:t*Math.cos(r)*Math.sin(s),y:t*Math.sin(r)*Math.sin(s),z:t*Math.cos(s)}},a.sqrLen=function(e){var t=e[0],r=e[1];return t*t+r*r},a.styleSpec=U,a.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},a.symbolSize=rw,a.transformMat3=function(e,t,r){var s=t[0],l=t[1],c=t[2];return e[0]=s*r[0]+l*r[3]+c*r[6],e[1]=s*r[1]+l*r[4]+c*r[7],e[2]=s*r[2]+l*r[5]+c*r[8],e},a.transformMat4=ds,a.translate=function(e,t,r){var s,l,c,h,y,b,I,C,P,D,N,X,H=r[0],ne=r[1],ee=r[2];return t===e?(e[12]=t[0]*H+t[4]*ne+t[8]*ee+t[12],e[13]=t[1]*H+t[5]*ne+t[9]*ee+t[13],e[14]=t[2]*H+t[6]*ne+t[10]*ee+t[14],e[15]=t[3]*H+t[7]*ne+t[11]*ee+t[15]):(l=t[1],c=t[2],h=t[3],y=t[4],b=t[5],I=t[6],C=t[7],P=t[8],D=t[9],N=t[10],X=t[11],e[0]=s=t[0],e[1]=l,e[2]=c,e[3]=h,e[4]=y,e[5]=b,e[6]=I,e[7]=C,e[8]=P,e[9]=D,e[10]=N,e[11]=X,e[12]=s*H+y*ne+P*ee+t[12],e[13]=l*H+b*ne+D*ee+t[13],e[14]=c*H+I*ne+N*ee+t[14],e[15]=h*H+C*ne+X*ee+t[15]),e},a.triggerPluginCompletionEvent=Cl,a.uniqueId=me,a.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},a.validateLight=qc,a.validateStyle=Ta,a.values=function(e){var t=[];for(var r in e)t.push(e[r]);return t},a.vectorTile=gs,a.version="1.13.3",a.warnOnce=pt,a.webpSupported=zt,a.window=F,a.wrap=xe})),E(["./shared"],(function(a){function _(M){var L=typeof M;
vendor: 10,277 bytes, line 1
1if(L==="number"||L==="boolean"||L==="string"||M==null)return JSON.stringify(M);if(Array.isArray(M)){for(var B="[",G=0,K=M;G<K.length;G+=1)B+=_(K[G])+",";return B+"]"}for(var ie=Object.keys(M).sort(),oe="{",U=0;U<ie.length;U++)oe+=JSON.stringify(ie[U])+":"+_(M[ie[U]])+",";return oe+"}"}function w(M){for(var L="",B=0,G=a.refProperties;B<G.length;B+=1)L+="/"+_(M[G[B]]);return L}var k=function(M){this.keyCache={},M&&this.replace(M)};k.prototype.replace=function(M){this._layerConfigs={},this._layers={},this.update(M,[])},k.prototype.update=function(M,L){for(var B=this,G=0,K=M;G<K.length;G+=1){var ie=K[G];this._layerConfigs[ie.id]=ie;var oe=this._layers[ie.id]=a.createStyleLayer(ie);oe._featureFilter=a.featureFilter(oe.filter),this.keyCache[ie.id]&&delete this.keyCache[ie.id]}for(var U=0,Q=L;U<Q.length;U+=1){var he=Q[U];delete this.keyCache[he],delete this._layerConfigs[he],delete this._layers[he]}this.familiesBySource={};for(var Pe=0,Le=(function(qe,Ne){for(var xt={},Ge=0;Ge<qe.length;Ge++){var Pt=Ne&&Ne[qe[Ge].id]||w(qe[Ge]);Ne&&(Ne[qe[Ge].id]=Pt);var ar=xt[Pt];ar||(ar=xt[Pt]=[]),ar.push(qe[Ge])}var Mt=[];for(var Gt in xt)Mt.push(xt[Gt]);return Mt})(a.values(this._layerConfigs),this.keyCache);Pe<Le.length;Pe+=1){var Te=Le[Pe].map((function(qe){return B._layers[qe.id]})),ke=Te[0];if(ke.visibility!=="none"){var Qe=ke.source||"",He=this.familiesBySource[Qe];He||(He=this.familiesBySource[Qe]={});var Ee=ke.sourceLayer||"_geojsonTileLayer",We=He[Ee];We||(We=He[Ee]=[]),We.push(Te)}}};var z=function(M){var L={},B=[];for(var G in M){var K=M[G],ie=L[G]={};for(var oe in K){var U=K[+oe];if(U&&U.bitmap.width!==0&&U.bitmap.height!==0){var Q={x:0,y:0,w:U.bitmap.width+2,h:U.bitmap.height+2};B.push(Q),ie[oe]={rect:Q,metrics:U.metrics}}}}var he=a.potpack(B),Pe=new a.AlphaImage({width:he.w||1,height:he.h||1});for(var Le in M){var Te=M[Le];for(var ke in Te){var Qe=Te[+ke];if(Qe&&Qe.bitmap.width!==0&&Qe.bitmap.height!==0){var He=L[Le][ke].rect;a.AlphaImage.copy(Qe.bitmap,Pe,{x:0,y:0},{x:He.x+1,y:He.y+1},Qe.bitmap)}}}this.image=Pe,this.positions=L};a.register("GlyphAtlas",z);var O=function(M){this.tileID=new a.OverscaledTileID(M.tileID.overscaledZ,M.tileID.wrap,M.tileID.canonical.z,M.tileID.canonical.x,M.tileID.canonical.y),this.uid=M.uid,this.zoom=M.zoom,this.pixelRatio=M.pixelRatio,this.tileSize=M.tileSize,this.source=M.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=M.showCollisionBoxes,this.collectResourceTiming=!!M.collectResourceTiming,this.returnDependencies=!!M.returnDependencies,this.promoteId=M.promoteId};function F(M,L,B){for(var G=new a.EvaluationParameters(L),K=0,ie=M;K<ie.length;K+=1)ie[K].recalculate(G,B)}function W(M,L){var B=a.getArrayBuffer(M.request,(function(G,K,ie,oe){G?L(G):K&&L(null,{vectorTile:new a.vectorTile.VectorTile(new a.pbf(K)),rawData:K,cacheControl:ie,expires:oe})}));return function(){B.cancel(),L()}}O.prototype.parse=function(M,L,B,G,K){var ie=this;this.status="parsing",this.data=M,this.collisionBoxArray=new a.CollisionBoxArray;var oe=new a.DictionaryCoder(Object.keys(M.layers).sort()),U=new a.FeatureIndex(this.tileID,this.promoteId);U.bucketLayerIDs=[];var Q,he,Pe,Le,Te={},ke={featureIndex:U,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:B},Qe=L.familiesBySource[this.source];for(var He in Qe){var Ee=M.layers[He];if(Ee){Ee.version===1&&a.warnOnce('Vector tile source "'+this.source+'" layer "'+He+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var We=oe.encode(He),qe=[],Ne=0;Ne<Ee.length;Ne++){var xt=Ee.feature(Ne),Ge=U.getId(xt,He);qe.push({feature:xt,id:Ge,index:Ne,sourceLayerIndex:We})}for(var Pt=0,ar=Qe[He];Pt<ar.length;Pt+=1){var Mt=ar[Pt],Gt=Mt[0];Gt.minzoom&&this.zoom<Math.floor(Gt.minzoom)||Gt.maxzoom&&this.zoom>=Gt.maxzoom||Gt.visibility!=="none"&&(F(Mt,this.zoom,B),(Te[Gt.id]=Gt.createBucket({index:U.bucketLayerIDs.length,layers:Mt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:We,sourceID:this.source})).populate(qe,ke,this.tileID.canonical),U.bucketLayerIDs.push(Mt.map((function(nr){return nr.id}))))}}}var Ot=a.mapObject(ke.glyphDependencies,(function(nr){return Object.keys(nr).map(Number)}));Object.keys(Ot).length?G.send("getGlyphs",{uid:this.uid,stacks:Ot},(function(nr,Lt){Q||(Q=nr,he=Lt,Lr.call(ie))})):he={};var Tn=Object.keys(ke.iconDependencies);Tn.length?G.send("getImages",{icons:Tn,source:this.source,tileID:this.tileID,type:"icons"},(function(nr,Lt){Q||(Q=nr,Pe=Lt,Lr.call(ie))})):Pe={};var Jt=Object.keys(ke.patternDependencies);function Lr(){if(Q)return K(Q);if(he&&Pe&&Le){var nr=new z(he),Lt=new a.ImageAtlas(Pe,Le);for(var $t in Te){var zn=Te[$t];zn instanceof a.SymbolBucket?(F(zn.layers,this.zoom,B),a.performSymbolLayout(zn,he,nr.positions,Pe,Lt.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):zn.hasPattern&&(zn instanceof a.LineBucket||zn instanceof a.FillBucket||zn instanceof a.FillExtrusionBucket)&&(F(zn.layers,this.zoom,B),zn.addFeatures(ke,this.tileID.canonical,Lt.patternPositions))}this.status="done",K(null,{buckets:a.values(Te).filter((function(ha){return!ha.isEmpty()})),featureIndex:U,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:nr.image,imageAtlas:Lt,glyphMap:this.returnDependencies?he:null,iconMap:this.returnDependencies?Pe:null,glyphPositions:this.returnDependencies?nr.positions:null})}}Jt.length?G.send("getImages",{icons:Jt,source:this.source,tileID:this.tileID,type:"patterns"},(function(nr,Lt){Q||(Q=nr,Le=Lt,Lr.call(ie))})):Le={},Lr.call(this)};var ue=function(M,L,B,G){this.actor=M,this.layerIndex=L,this.availableImages=B,this.loadVectorData=G||W,this.loading={},this.loaded={}};ue.prototype.loadTile=function(M,L){var B=this,G=M.uid;this.loading||(this.loading={});var K=!!(M&&M.request&&M.request.collectResourceTiming)&&new a.RequestPerformance(M.request),ie=this.loading[G]=new O(M);ie.abort=this.loadVectorData(M,(function(oe,U){if(delete B.loading[G],oe||!U)return ie.status="done",B.loaded[G]=ie,L(oe);var Q=U.rawData,he={};U.expires&&(he.expires=U.expires),U.cacheControl&&(he.cacheControl=U.cacheControl);var Pe={};if(K){var Le=K.finish();Le&&(Pe.resourceTiming=JSON.parse(JSON.stringify(Le)))}ie.vectorTile=U.vectorTile,ie.parse(U.vectorTile,B.layerIndex,B.availableImages,B.actor,(function(Te,ke){if(Te||!ke)return L(Te);L(null,a.extend({rawTileData:Q.slice(0)},ke,he,Pe))})),B.loaded=B.loaded||{},B.loaded[G]=ie}))},ue.prototype.reloadTile=function(M,L){var B=this,G=this.loaded,K=M.uid,ie=this;if(G&&G[K]){var oe=G[K];oe.showCollisionBoxes=M.showCollisionBoxes;var U=function(Q,he){var Pe=oe.reloadCallback;Pe&&(delete oe.reloadCallback,oe.parse(oe.vectorTile,ie.layerIndex,B.availableImages,ie.actor,Pe)),L(Q,he)};oe.status==="parsing"?oe.reloadCallback=U:oe.status==="done"&&(oe.vectorTile?oe.parse(oe.vectorTile,this.layerIndex,this.availableImages,this.actor,U):U())}},ue.prototype.abortTile=function(M,L){var B=this.loading,G=M.uid;B&&B[G]&&B[G].abort&&(B[G].abort(),delete B[G]),L()},ue.prototype.removeTile=function(M,L){var B=this.loaded,G=M.uid;B&&B[G]&&delete B[G],L()};var ye=a.window.ImageBitmap,ge=function(){this.loaded={}};function xe(M,L){if(M.length!==0){ce(M[0],L);for(var B=1;B<M.length;B++)ce(M[B],!L)}}function ce(M,L){for(var B=0,G=0,K=0,ie=M.length,oe=ie-1;K<ie;oe=K++){var U=(M[K][0]-M[oe][0])*(M[oe][1]+M[K][1]),Q=B+U;G+=Math.abs(B)>=Math.abs(U)?B-Q+U:U-Q+B,B=Q}B+G>=0!=!!L&&M.reverse()}ge.prototype.loadTile=function(M,L){var B=M.uid,G=M.encoding,K=M.rawImageData,ie=ye&&K instanceof ye?this.getImageData(K):K,oe=new a.DEMData(B,ie,G);this.loaded=this.loaded||{},this.loaded[B]=oe,L(null,oe)},ge.prototype.getImageData=function(M){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(M.width,M.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=M.width,this.offscreenCanvas.height=M.height,this.offscreenCanvasContext.drawImage(M,0,0,M.width,M.height);var L=this.offscreenCanvasContext.getImageData(-1,-1,M.width+2,M.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new a.RGBAImage({width:L.width,height:L.height},L.data)},ge.prototype.removeTile=function(M){var L=this.loaded,B=M.uid;L&&L[B]&&delete L[B]};var $=a.vectorTile.VectorTileFeature.prototype.toGeoJSON,me=function(M){this._feature=M,this.extent=a.EXTENT,this.type=M.type,this.properties=M.tags,"id"in M&&!isNaN(M.id)&&(this.id=parseInt(M.id,10))};me.prototype.loadGeometry=function(){if(this._feature.type===1){for(var M=[],L=0,B=this._feature.geometry;L<B.length;L+=1){var G=B[L];M.push([new a.Point$1(G[0],G[1])])}return M}for(var K=[],ie=0,oe=this._feature.geometry;ie<oe.length;ie+=1){for(var U=[],Q=0,he=oe[ie];Q<he.length;Q+=1){var Pe=he[Q];U.push(new a.Point$1(Pe[0],Pe[1]))}K.push(U)}return K},me.prototype.toGeoJSON=function(M,L,B){return $.call(this,M,L,B)};var ze=function(M){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=a.EXTENT,this.length=M.length,this._features=M};ze.prototype.feature=function(M){return new me(this._features[M])};var Fe=a.vectorTile.VectorTileFeature,pe=je;function je(M,L){this.options=L||{},this.features=M,this.length=M.length}function Re(M,L){this.id=typeof M.id=="number"?M.id:void 0,this.type=M.type,this.rawGeometry=M.type===1?[M.geometry]:M.geometry,this.properties=M.tags,this.extent=L||4096}je.prototype.feature=function(M){return new Re(this.features[M],this.options.extent)},Re.prototype.loadGeometry=function(){var M=this.rawGeometry;this.geometry=[];for(var L=0;L<M.length;L++){for(var B=M[L],G=[],K=0;K<B.length;K++)G.push(new a.Point$1(B[K][0],B[K][1]));this.geometry.push(G)}return this.geometry},Re.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var M=this.geometry,L=1/0,B=-1/0,G=1/0,K=-1/0,ie=0;ie<M.length;ie++)for(var oe=M[ie],U=0;U<oe.length;U++){var Q=oe[U];L=Math.min(L,Q.x),B=Math.max(B,Q.x),G=Math.min(G,Q.y),K=Math.max(K,Q.y)}return[L,G,B,K]},Re.prototype.toGeoJSON=Fe.prototype.toGeoJSON;var it=rt,se=pe;function rt(M){var L=new a.pbf;return(function(B,G){for(var K in B.layers)G.writeMessage(3,pt,B.layers[K])})(M,L),L.finish()}function pt(M,L){var B;
1L.writeVarintField(15,M.version||1),L.writeStringField(1,M.name||""),L.writeVarintField(5,M.extent||4096);var G={keys:[],values:[],keycache:{},valuecache:{}};for(B=0;B<M.length;B++)G.feature=M.feature(B),L.writeMessage(2,nt,G);var K=G.keys;for(B=0;B<K.length;B++)L.writeStringField(3,K[B]);var ie=G.values;for(B=0;B<ie.length;B++)L.writeMessage(4,zr,ie[B])}function nt(M,L){var B=M.feature;B.id!==void 0&&L.writeVarintField(1,B.id),L.writeMessage(2,Qt,M),L.writeVarintField(3,B.type),L.writeMessage(4,Wt,B)}function Qt(M,L){var B=M.feature,G=M.keys,K=M.values,ie=M.keycache,oe=M.valuecache;for(var U in B.properties){var Q=ie[U];Q===void 0&&(G.push(U),ie[U]=Q=G.length-1),L.writeVarint(Q);var he=B.properties[U],Pe=typeof he;Pe!=="string"&&Pe!=="boolean"&&Pe!=="number"&&(he=JSON.stringify(he));var Le=Pe+":"+he,Te=oe[Le];Te===void 0&&(K.push(he),oe[Le]=Te=K.length-1),L.writeVarint(Te)}}function Xt(M,L){return(L<<3)+(7&M)}function Rr(M){return M<<1^M>>31}function Wt(M,L){for(var B=M.loadGeometry(),G=M.type,K=0,ie=0,oe=B.length,U=0;U<oe;U++){var Q=B[U],he=1;G===1&&(he=Q.length),L.writeVarint(Xt(1,he));for(var Pe=G===3?Q.length-1:Q.length,Le=0;Le<Pe;Le++){Le===1&&G!==1&&L.writeVarint(Xt(2,Pe-1));var Te=Q[Le].x-K,ke=Q[Le].y-ie;L.writeVarint(Rr(Te)),L.writeVarint(Rr(ke)),K+=Te,ie+=ke}G===3&&L.writeVarint(Xt(7,1))}}function zr(M,L){var B=typeof M;B==="string"?L.writeStringField(1,M):B==="boolean"?L.writeBooleanField(7,M):B==="number"&&(M%1!=0?L.writeDoubleField(3,M):M<0?L.writeSVarintField(6,M):L.writeVarintField(5,M))}function Ze(M,L,B,G){lr(M,B,G),lr(L,2*B,2*G),lr(L,2*B+1,2*G+1)}function lr(M,L,B){var G=M[L];M[L]=M[B],M[B]=G}function Ht(M,L,B,G){var K=M-B,ie=L-G;return K*K+ie*ie}it.fromVectorTileJs=rt,it.fromGeojsonVt=function(M,L){L=L||{};var B={};for(var G in M)B[G]=new pe(M[G].features,L),B[G].name=G,B[G].version=L.version,B[G].extent=L.extent;return rt({layers:B})},it.GeoJSONWrapper=se;var wt=function(M){return M[0]},wr=function(M){return M[1]},Jr=function(M,L,B,G,K){L===void 0&&(L=wt),B===void 0&&(B=wr),G===void 0&&(G=64),K===void 0&&(K=Float64Array),this.nodeSize=G,this.points=M;for(var ie=M.length<65536?Uint16Array:Uint32Array,oe=this.ids=new ie(M.length),U=this.coords=new K(2*M.length),Q=0;Q<M.length;Q++)oe[Q]=Q,U[2*Q]=L(M[Q]),U[2*Q+1]=B(M[Q]);(function he(Pe,Le,Te,ke,Qe,He){if(!(Qe-ke<=Te)){var Ee=ke+Qe>>1;(function We(qe,Ne,xt,Ge,Pt,ar){for(;Pt>Ge;){if(Pt-Ge>600){var Mt=Pt-Ge+1,Gt=xt-Ge+1,Ot=Math.log(Mt),Tn=.5*Math.exp(2*Ot/3),Jt=.5*Math.sqrt(Ot*Tn*(Mt-Tn)/Mt)*(Gt-Mt/2<0?-1:1);We(qe,Ne,xt,Math.max(Ge,Math.floor(xt-Gt*Tn/Mt+Jt)),Math.min(Pt,Math.floor(xt+(Mt-Gt)*Tn/Mt+Jt)),ar)}var Lr=Ne[2*xt+ar],nr=Ge,Lt=Pt;for(Ze(qe,Ne,Ge,xt),Ne[2*Pt+ar]>Lr&&Ze(qe,Ne,Ge,Pt);nr<Lt;){for(Ze(qe,Ne,nr,Lt),nr++,Lt--;Ne[2*nr+ar]<Lr;)nr++;for(;Ne[2*Lt+ar]>Lr;)Lt--}Ne[2*Ge+ar]===Lr?Ze(qe,Ne,Ge,Lt):Ze(qe,Ne,++Lt,Pt),Lt<=xt&&(Ge=Lt+1),xt<=Lt&&(Pt=Lt-1)}})(Pe,Le,Ee,ke,Qe,He%2),he(Pe,Le,Te,ke,Ee-1,He+1),he(Pe,Le,Te,Ee+1,Qe,He+1)}})(oe,U,G,0,oe.length-1,0)};Jr.prototype.range=function(M,L,B,G){return(function(K,ie,oe,U,Q,he,Pe){for(var Le,Te,ke=[0,K.length-1,0],Qe=[];ke.length;){var He=ke.pop(),Ee=ke.pop(),We=ke.pop();if(Ee-We<=Pe)for(var qe=We;qe<=Ee;qe++)Te=ie[2*qe+1],(Le=ie[2*qe])>=oe&&Le<=Q&&Te>=U&&Te<=he&&Qe.push(K[qe]);else{var Ne=Math.floor((We+Ee)/2);Te=ie[2*Ne+1],(Le=ie[2*Ne])>=oe&&Le<=Q&&Te>=U&&Te<=he&&Qe.push(K[Ne]);var xt=(He+1)%2;(He===0?oe<=Le:U<=Te)&&(ke.push(We),ke.push(Ne-1),ke.push(xt)),(He===0?Q>=Le:he>=Te)&&(ke.push(Ne+1),ke.push(Ee),ke.push(xt))}}return Qe})(this.ids,this.coords,M,L,B,G,this.nodeSize)},Jr.prototype.within=function(M,L,B){return(function(G,K,ie,oe,U,Q){for(var he=[0,G.length-1,0],Pe=[],Le=U*U;he.length;){var Te=he.pop(),ke=he.pop(),Qe=he.pop();if(ke-Qe<=Q)for(var He=Qe;He<=ke;He++)Ht(K[2*He],K[2*He+1],ie,oe)<=Le&&Pe.push(G[He]);else{var Ee=Math.floor((Qe+ke)/2),We=K[2*Ee],qe=K[2*Ee+1];Ht(We,qe,ie,oe)<=Le&&Pe.push(G[Ee]);var Ne=(Te+1)%2;(Te===0?ie-U<=We:oe-U<=qe)&&(he.push(Qe),he.push(Ee-1),he.push(Ne)),(Te===0?ie+U>=We:oe+U>=qe)&&(he.push(Ee+1),he.push(ke),he.push(Ne))}}return Pe})(this.ids,this.coords,M,L,B,this.nodeSize)};var dr={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(M){return M}},Sr=function(M){this.options=Vr(Object.create(dr),M),this.trees=new Array(this.options.maxZoom+1)};function dn(M,L,B,G,K){return{x:M,y:L,zoom:1/0,id:B,parentId:-1,numPoints:G,properties:K}}function Tt(M,L){var B=M.geometry.coordinates,G=B[1];return{x:Kt(B[0]),y:yt(G),zoom:1/0,index:L,parentId:-1}}
1function zt(M){return{type:"Feature",id:M.id,properties:Tr(M),geometry:{type:"Point",coordinates:[(G=M.x,360*(G-.5)),(L=M.y,B=(180-360*L)*Math.PI/180,360*Math.atan(Math.exp(B))/Math.PI-90)]}};var L,B,G}function Tr(M){var L=M.numPoints,B=L>=1e4?Math.round(L/1e3)+"k":L>=1e3?Math.round(L/100)/10+"k":L;return Vr(Vr({},M.properties),{cluster:!0,cluster_id:M.id,point_count:L,point_count_abbreviated:B})}function Kt(M){return M/360+.5}function yt(M){var L=Math.sin(M*Math.PI/180),B=.5-.25*Math.log((1+L)/(1-L))/Math.PI;return B<0?0:B>1?1:B}function Vr(M,L){for(var B in L)M[B]=L[B];return M}function Ar(M){return M.x}function cr(M){return M.y}function yn(M,L,B,G,K,ie){var oe=K-B,U=ie-G;if(oe!==0||U!==0){var Q=((M-B)*oe+(L-G)*U)/(oe*oe+U*U);Q>1?(B=K,G=ie):Q>0&&(B+=oe*Q,G+=U*Q)}return(oe=M-B)*oe+(U=L-G)*U}function Cr(M,L,B,G){var K={id:M===void 0?null:M,type:L,geometry:B,tags:G,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return(function(ie){var oe=ie.geometry,U=ie.type;if(U==="Point"||U==="MultiPoint"||U==="LineString")ti(ie,oe);else if(U==="Polygon"||U==="MultiLineString")for(var Q=0;Q<oe.length;Q++)ti(ie,oe[Q]);else if(U==="MultiPolygon")for(Q=0;Q<oe.length;Q++)for(var he=0;he<oe[Q].length;he++)ti(ie,oe[Q][he])})(K),K}function ti(M,L){for(var B=0;B<L.length;B+=3)M.minX=Math.min(M.minX,L[B]),M.minY=Math.min(M.minY,L[B+1]),M.maxX=Math.max(M.maxX,L[B]),M.maxY=Math.max(M.maxY,L[B+1])}function Zr(M,L,B,G){if(L.geometry){var K=L.geometry.coordinates,ie=L.geometry.type,oe=Math.pow(B.tolerance/((1<<B.maxZoom)*B.extent),2),U=[],Q=L.id;if(B.promoteId?Q=L.properties[B.promoteId]:B.generateId&&(Q=G||0),ie==="Point")rn(K,U);else if(ie==="MultiPoint")for(var he=0;he<K.length;he++)rn(K[he],U);else if(ie==="LineString")Xn(K,U,oe,!1);else if(ie==="MultiLineString"){if(B.lineMetrics){for(he=0;he<K.length;he++)Xn(K[he],U=[],oe,!1),M.push(Cr(Q,"LineString",U,L.properties));return}nn(K,U,oe,!1)}else if(ie==="Polygon")nn(K,U,oe,!0);else{if(ie!=="MultiPolygon"){if(ie==="GeometryCollection"){for(he=0;he<L.geometry.geometries.length;he++)Zr(M,{id:Q,geometry:L.geometry.geometries[he],properties:L.properties},B,G);return}throw new Error("Input data is not a valid GeoJSON object.")}for(he=0;he<K.length;he++){var Pe=[];nn(K[he],Pe,oe,!0),U.push(Pe)}}M.push(Cr(Q,ie,U,L.properties))}}function rn(M,L){L.push(on(M[0])),L.push(Ci(M[1])),L.push(0)}function Xn(M,L,B,G){for(var K,ie,oe=0,U=0;U<M.length;U++){var Q=on(M[U][0]),he=Ci(M[U][1]);L.push(Q),L.push(he),L.push(0),U>0&&(oe+=G?(K*he-Q*ie)/2:Math.sqrt(Math.pow(Q-K,2)+Math.pow(he-ie,2))),K=Q,ie=he}var Pe=L.length-3;L[2]=1,(function Le(Te,ke,Qe,He){for(var Ee,We=He,qe=Qe-ke>>1,Ne=Qe-ke,xt=Te[ke],Ge=Te[ke+1],Pt=Te[Qe],ar=Te[Qe+1],Mt=ke+3;Mt<Qe;Mt+=3){var Gt=yn(Te[Mt],Te[Mt+1],xt,Ge,Pt,ar);if(Gt>We)Ee=Mt,We=Gt;else if(Gt===We){var Ot=Math.abs(Mt-qe);Ot<Ne&&(Ee=Mt,Ne=Ot)}}We>He&&(Ee-ke>3&&Le(Te,ke,Ee,He),Te[Ee+2]=We,Qe-Ee>3&&Le(Te,Ee,Qe,He))})(L,0,Pe,B),L[Pe+2]=1,L.size=Math.abs(oe),L.start=0,L.end=L.size}function nn(M,L,B,G){for(var K=0;K<M.length;K++){var ie=[];Xn(M[K],ie,B,G),L.push(ie)}}function on(M){return M/360+.5}function Ci(M){var L=Math.sin(M*Math.PI/180),B=.5-.25*Math.log((1+L)/(1-L))/Math.PI;return B<0?0:B>1?1:B}function Hn(M,L,B,G,K,ie,oe,U){if(G/=L,ie>=(B/=L)&&oe<G)return M;if(oe<B||ie>=G)return null;for(var Q=[],he=0;he<M.length;he++){var Pe=M[he],Le=Pe.geometry,Te=Pe.type,ke=K===0?Pe.minX:Pe.minY,Qe=K===0?Pe.maxX:Pe.maxY;if(ke>=B&&Qe<G)Q.push(Pe);else if(!(Qe<B||ke>=G)){var He=[];if(Te==="Point"||Te==="MultiPoint")fo(Le,He,B,G,K);else if(Te==="LineString")jo(Le,He,B,G,K,!1,U.lineMetrics);else if(Te==="MultiLineString")Pi(Le,He,B,G,K,!1);else if(Te==="Polygon")Pi(Le,He,B,G,K,!0);else if(Te==="MultiPolygon")for(var Ee=0;Ee<Le.length;Ee++){var We=[];Pi(Le[Ee],We,B,G,K,!0),We.length&&He.push(We)}if(He.length){if(U.lineMetrics&&Te==="LineString"){for(Ee=0;Ee<He.length;Ee++)Q.push(Cr(Pe.id,Te,He[Ee],Pe.tags));continue}Te!=="LineString"&&Te!=="MultiLineString"||(He.length===1?(Te="LineString",He=He[0]):Te="MultiLineString"),Te!=="Point"&&Te!=="MultiPoint"||(Te=He.length===3?"Point":"MultiPoint"),Q.push(Cr(Pe.id,Te,He,Pe.tags))}}}return Q.length?Q:null}function fo(M,L,B,G,K){for(var ie=0;ie<M.length;ie+=3){var oe=M[ie+K];oe>=B&&oe<=G&&(L.push(M[ie]),L.push(M[ie+1]),L.push(M[ie+2]))}}function jo(M,L,B,G,K,ie,oe){for(var U,Q,he=fi(M),Pe=K===0?Go:Vi,Le=M.start,Te=0;Te<M.length-3;
vendor: 9,218 bytes, line 1
1Te+=3){var ke=M[Te],Qe=M[Te+1],He=M[Te+2],Ee=M[Te+3],We=M[Te+4],qe=K===0?ke:Qe,Ne=K===0?Ee:We,xt=!1;oe&&(U=Math.sqrt(Math.pow(ke-Ee,2)+Math.pow(Qe-We,2))),qe<B?Ne>B&&(Q=Pe(he,ke,Qe,Ee,We,B),oe&&(he.start=Le+U*Q)):qe>G?Ne<G&&(Q=Pe(he,ke,Qe,Ee,We,G),oe&&(he.start=Le+U*Q)):Mi(he,ke,Qe,He),Ne<B&&qe>=B&&(Q=Pe(he,ke,Qe,Ee,We,B),xt=!0),Ne>G&&qe<=G&&(Q=Pe(he,ke,Qe,Ee,We,G),xt=!0),!ie&&xt&&(oe&&(he.end=Le+U*Q),L.push(he),he=fi(M)),oe&&(Le+=U)}var Ge=M.length-3;ke=M[Ge],Qe=M[Ge+1],He=M[Ge+2],(qe=K===0?ke:Qe)>=B&&qe<=G&&Mi(he,ke,Qe,He),Ge=he.length-3,ie&&Ge>=3&&(he[Ge]!==he[0]||he[Ge+1]!==he[1])&&Mi(he,he[0],he[1],he[2]),he.length&&L.push(he)}function fi(M){var L=[];return L.size=M.size,L.start=M.start,L.end=M.end,L}function Pi(M,L,B,G,K,ie){for(var oe=0;oe<M.length;oe++)jo(M[oe],L,B,G,K,ie,!1)}function Mi(M,L,B,G){M.push(L),M.push(B),M.push(G)}function Go(M,L,B,G,K,ie){var oe=(ie-L)/(G-L);return M.push(ie),M.push(B+(K-B)*oe),M.push(1),oe}function Vi(M,L,B,G,K,ie){var oe=(ie-B)/(K-B);return M.push(L+(G-L)*oe),M.push(ie),M.push(1),oe}function ki(M,L){for(var B=[],G=0;G<M.length;G++){var K,ie=M[G],oe=ie.type;if(oe==="Point"||oe==="MultiPoint"||oe==="LineString")K=ri(ie.geometry,L);else if(oe==="MultiLineString"||oe==="Polygon"){K=[];for(var U=0;U<ie.geometry.length;U++)K.push(ri(ie.geometry[U],L))}else if(oe==="MultiPolygon")for(K=[],U=0;U<ie.geometry.length;U++){for(var Q=[],he=0;he<ie.geometry[U].length;he++)Q.push(ri(ie.geometry[U][he],L));K.push(Q)}B.push(Cr(ie.id,oe,K,ie.tags))}return B}function ri(M,L){var B=[];B.size=M.size,M.start!==void 0&&(B.start=M.start,B.end=M.end);for(var G=0;G<M.length;G+=3)B.push(M[G]+L,M[G+1],M[G+2]);return B}function we(M,L){if(M.transformed)return M;var B,G,K,ie=1<<M.z,oe=M.x,U=M.y;for(B=0;B<M.features.length;B++){var Q=M.features[B],he=Q.geometry,Pe=Q.type;if(Q.geometry=[],Pe===1)for(G=0;G<he.length;G+=2)Q.geometry.push(Ae(he[G],he[G+1],L,ie,oe,U));else for(G=0;G<he.length;G++){var Le=[];for(K=0;K<he[G].length;K+=2)Le.push(Ae(he[G][K],he[G][K+1],L,ie,oe,U));Q.geometry.push(Le)}}return M.transformed=!0,M}function Ae(M,L,B,G,K,ie){return[Math.round(B*(M*G-K)),Math.round(B*(L*G-ie))]}function jt(M,L,B,G,K){for(var ie=L===K.maxZoom?0:K.tolerance/((1<<L)*K.extent),oe={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:B,y:G,z:L,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},U=0;U<M.length;U++){oe.numFeatures++,or(oe,M[U],ie,K);var Q=M[U].minX,he=M[U].minY,Pe=M[U].maxX,Le=M[U].maxY;Q<oe.minX&&(oe.minX=Q),he<oe.minY&&(oe.minY=he),Pe>oe.maxX&&(oe.maxX=Pe),Le>oe.maxY&&(oe.maxY=Le)}return oe}function or(M,L,B,G){var K=L.geometry,ie=L.type,oe=[];if(ie==="Point"||ie==="MultiPoint")for(var U=0;U<K.length;U+=3)oe.push(K[U]),oe.push(K[U+1]),M.numPoints++,M.numSimplified++;else if(ie==="LineString")er(oe,K,M,B,!1,!1);else if(ie==="MultiLineString"||ie==="Polygon")for(U=0;U<K.length;U++)er(oe,K[U],M,B,ie==="Polygon",U===0);else if(ie==="MultiPolygon")for(var Q=0;Q<K.length;Q++){var he=K[Q];for(U=0;U<he.length;U++)er(oe,he[U],M,B,!0,U===0)}if(oe.length){var Pe=L.tags||null;if(ie==="LineString"&&G.lineMetrics){for(var Le in Pe={},L.tags)Pe[Le]=L.tags[Le];Pe.mapbox_clip_start=K.start/K.size,Pe.mapbox_clip_end=K.end/K.size}var Te={geometry:oe,type:ie==="Polygon"||ie==="MultiPolygon"?3:ie==="LineString"||ie==="MultiLineString"?2:1,tags:Pe};L.id!==null&&(Te.id=L.id),M.features.push(Te)}}function er(M,L,B,G,K,ie){var oe=G*G;if(G>0&&L.size<(K?oe:G))B.numPoints+=L.length/3;else{for(var U=[],Q=0;Q<L.length;Q+=3)(G===0||L[Q+2]>oe)&&(B.numSimplified++,U.push(L[Q]),U.push(L[Q+1])),B.numPoints++;K&&(function(he,Pe){for(var Le=0,Te=0,ke=he.length,Qe=ke-2;Te<ke;Qe=Te,Te+=2)Le+=(he[Te]-he[Qe])*(he[Te+1]+he[Qe+1]);if(Le>0===Pe)for(Te=0,ke=he.length;Te<ke/2;Te+=2){var He=he[Te],Ee=he[Te+1];he[Te]=he[ke-2-Te],he[Te+1]=he[ke-1-Te],he[ke-2-Te]=He,he[ke-1-Te]=Ee}})(U,ie),M.push(U)}}function It(M,L){var B=(L=this.options=(function(K,ie){for(var oe in ie)K[oe]=ie[oe];return K})(Object.create(this.options),L)).debug;if(B&&console.time("preprocess data"),L.maxZoom<0||L.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(L.promoteId&&L.generateId)throw new Error("promoteId and generateId cannot be used together.");var G=(function(K,ie){var oe=[];if(K.type==="FeatureCollection")for(var U=0;U<K.features.length;U++)Zr(oe,K.features[U],ie,U);else Zr(oe,K.type==="Feature"?K:{geometry:K},ie);return oe})(M,L);this.tiles={},this.tileCoords=[],B&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",L.indexMaxZoom,L.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(G=(function(K,ie){var oe=ie.buffer/ie.extent,U=K,Q=Hn(K,1,-1-oe,oe,0,-1,2,ie),he=Hn(K,1,1-oe,2+oe,0,-1,2,ie);return(Q||he)&&(U=Hn(K,1,-oe,1+oe,0,-1,2,ie)||[],Q&&(U=ki(Q,1).concat(U)),he&&(U=U.concat(ki(he,-1)))),U})(G,L)).length&&this.splitTile(G,0,0,0),B&&(G.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 mn(M,L,B){return 32*((1<<M)*B+L)+M}function Nn(M,L){var B=M.tileID.canonical;if(!this._geoJSONIndex)return L(null,null);var G=this._geoJSONIndex.getTile(B.z,B.x,B.y);if(!G)return L(null,null);var K=new ze(G.features),ie=it(K);ie.byteOffset===0&&ie.byteLength===ie.buffer.byteLength||(ie=new Uint8Array(ie)),L(null,{vectorTile:K,rawData:ie.buffer})}Sr.prototype.load=function(M){var L=this.options,B=L.log,G=L.minZoom,K=L.maxZoom,ie=L.nodeSize;B&&console.time("total time");var oe="prepare "+M.length+" points";B&&console.time(oe),this.points=M;for(var U=[],Q=0;Q<M.length;Q++)M[Q].geometry&&U.push(Tt(M[Q],Q));this.trees[K+1]=new Jr(U,Ar,cr,ie,Float32Array),B&&console.timeEnd(oe);for(var he=K;he>=G;he--){var Pe=+Date.now();U=this._cluster(U,he),this.trees[he]=new Jr(U,Ar,cr,ie,Float32Array),B&&console.log("z%d: %d clusters in %dms",he,U.length,+Date.now()-Pe)}return B&&console.timeEnd("total time"),this},Sr.prototype.getClusters=function(M,L){var B=((M[0]+180)%360+360)%360-180,G=Math.max(-90,Math.min(90,M[1])),K=M[2]===180?180:((M[2]+180)%360+360)%360-180,ie=Math.max(-90,Math.min(90,M[3]));if(M[2]-M[0]>=360)B=-180,K=180;else if(B>K){var oe=this.getClusters([B,G,180,ie],L),U=this.getClusters([-180,G,K,ie],L);return oe.concat(U)}for(var Q=this.trees[this._limitZoom(L)],he=[],Pe=0,Le=Q.range(Kt(B),yt(ie),Kt(K),yt(G));Pe<Le.length;Pe+=1){var Te=Q.points[Le[Pe]];he.push(Te.numPoints?zt(Te):this.points[Te.index])}return he},Sr.prototype.getChildren=function(M){var L=this._getOriginId(M),B=this._getOriginZoom(M),G="No cluster with the specified id.",K=this.trees[B];if(!K)throw new Error(G);var ie=K.points[L];if(!ie)throw new Error(G);for(var oe=this.options.radius/(this.options.extent*Math.pow(2,B-1)),U=[],Q=0,he=K.within(ie.x,ie.y,oe);Q<he.length;Q+=1){var Pe=K.points[he[Q]];Pe.parentId===M&&U.push(Pe.numPoints?zt(Pe):this.points[Pe.index])}if(U.length===0)throw new Error(G);return U},Sr.prototype.getLeaves=function(M,L,B){var G=[];return this._appendLeaves(G,M,L=L||10,B=B||0,0),G},Sr.prototype.getTile=function(M,L,B){var G=this.trees[this._limitZoom(M)],K=Math.pow(2,M),ie=this.options,oe=ie.radius/ie.extent,U=(B-oe)/K,Q=(B+1+oe)/K,he={features:[]};return this._addTileFeatures(G.range((L-oe)/K,U,(L+1+oe)/K,Q),G.points,L,B,K,he),L===0&&this._addTileFeatures(G.range(1-oe/K,U,1,Q),G.points,K,B,K,he),L===K-1&&this._addTileFeatures(G.range(0,U,oe/K,Q),G.points,-1,B,K,he),he.features.length?he:null},Sr.prototype.getClusterExpansionZoom=function(M){for(var L=this._getOriginZoom(M)-1;L<=this.options.maxZoom;){var B=this.getChildren(M);if(L++,B.length!==1)break;M=B[0].properties.cluster_id}return L},Sr.prototype._appendLeaves=function(M,L,B,G,K){for(var ie=0,oe=this.getChildren(L);ie<oe.length;ie+=1){var U=oe[ie],Q=U.properties;if(Q&&Q.cluster?K+Q.point_count<=G?K+=Q.point_count:K=this._appendLeaves(M,Q.cluster_id,B,G,K):K<G?K++:M.push(U),M.length===B)break}return K},Sr.prototype._addTileFeatures=function(M,L,B,G,K,ie){for(var oe=0,U=M;oe<U.length;oe+=1){var Q=L[U[oe]],he=Q.numPoints,Pe={type:1,geometry:[[Math.round(this.options.extent*(Q.x*K-B)),Math.round(this.options.extent*(Q.y*K-G))]],tags:he?Tr(Q):this.points[Q.index].properties},Le=void 0;he?Le=Q.id:this.options.generateId?Le=Q.index:this.points[Q.index].id&&(Le=this.points[Q.index].id),Le!==void 0&&(Pe.id=Le),ie.features.push(Pe)}},Sr.prototype._limitZoom=function(M){return Math.max(this.options.minZoom,Math.min(+M,this.options.maxZoom+1))},Sr.prototype._cluster=function(M,L){for(var B=[],G=this.options,K=G.reduce,ie=G.minPoints,oe=G.radius/(G.extent*Math.pow(2,L)),U=0;U<M.length;U++){var Q=M[U];if(!(Q.zoom<=L)){Q.zoom=L;for(var he=this.trees[L+1],Pe=he.within(Q.x,Q.y,oe),Le=Q.numPoints||1,Te=Le,ke=0,Qe=Pe;ke<Qe.length;ke+=1){var He=he.points[Qe[ke]];He.zoom>L&&(Te+=He.numPoints||1)}if(Te>=ie){for(var Ee=Q.x*Le,We=Q.y*Le,qe=K&&Le>1?this._map(Q,!0):null,Ne=(U<<5)+(L+1)+this.points.length,xt=0,Ge=Pe;xt<Ge.length;xt+=1){var Pt=he.points[Ge[xt]];if(!(Pt.zoom<=L)){Pt.zoom=L;var ar=Pt.numPoints||1;Ee+=Pt.x*ar,We+=Pt.y*ar,Pt.parentId=Ne,K&&(qe||(qe=this._map(Q,!0)),K(qe,this._map(Pt)))}}Q.parentId=Ne,B.push(dn(Ee/Te,We/Te,Ne,Te,qe))}
1else if(B.push(Q),Te>1)for(var Mt=0,Gt=Pe;Mt<Gt.length;Mt+=1){var Ot=he.points[Gt[Mt]];Ot.zoom<=L||(Ot.zoom=L,B.push(Ot))}}}return B},Sr.prototype._getOriginId=function(M){return M-this.points.length>>5},Sr.prototype._getOriginZoom=function(M){return(M-this.points.length)%32},Sr.prototype._map=function(M,L){if(M.numPoints)return L?Vr({},M.properties):M.properties;var B=this.points[M.index].properties,G=this.options.map(B);return L&&G===B?Vr({},G):G},It.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},It.prototype.splitTile=function(M,L,B,G,K,ie,oe){for(var U=[M,L,B,G],Q=this.options,he=Q.debug;U.length;){G=U.pop(),B=U.pop(),L=U.pop(),M=U.pop();var Pe=1<<L,Le=mn(L,B,G),Te=this.tiles[Le];if(!Te&&(he>1&&console.time("creation"),Te=this.tiles[Le]=jt(M,L,B,G,Q),this.tileCoords.push({z:L,x:B,y:G}),he)){he>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",L,B,G,Te.numFeatures,Te.numPoints,Te.numSimplified),console.timeEnd("creation"));var ke="z"+L;this.stats[ke]=(this.stats[ke]||0)+1,this.total++}if(Te.source=M,K){if(L===Q.maxZoom||L===K)continue;var Qe=1<<K-L;if(B!==Math.floor(ie/Qe)||G!==Math.floor(oe/Qe))continue}else if(L===Q.indexMaxZoom||Te.numPoints<=Q.indexMaxPoints)continue;if(Te.source=null,M.length!==0){he>1&&console.time("clipping");var He,Ee,We,qe,Ne,xt,Ge=.5*Q.buffer/Q.extent,Pt=.5-Ge,ar=.5+Ge,Mt=1+Ge;He=Ee=We=qe=null,Ne=Hn(M,Pe,B-Ge,B+ar,0,Te.minX,Te.maxX,Q),xt=Hn(M,Pe,B+Pt,B+Mt,0,Te.minX,Te.maxX,Q),M=null,Ne&&(He=Hn(Ne,Pe,G-Ge,G+ar,1,Te.minY,Te.maxY,Q),Ee=Hn(Ne,Pe,G+Pt,G+Mt,1,Te.minY,Te.maxY,Q),Ne=null),xt&&(We=Hn(xt,Pe,G-Ge,G+ar,1,Te.minY,Te.maxY,Q),qe=Hn(xt,Pe,G+Pt,G+Mt,1,Te.minY,Te.maxY,Q),xt=null),he>1&&console.timeEnd("clipping"),U.push(He||[],L+1,2*B,2*G),U.push(Ee||[],L+1,2*B,2*G+1),U.push(We||[],L+1,2*B+1,2*G),U.push(qe||[],L+1,2*B+1,2*G+1)}}},It.prototype.getTile=function(M,L,B){var G=this.options,K=G.extent,ie=G.debug;if(M<0||M>24)return null;var oe=1<<M,U=mn(M,L=(L%oe+oe)%oe,B);if(this.tiles[U])return we(this.tiles[U],K);ie>1&&console.log("drilling down to z%d-%d-%d",M,L,B);for(var Q,he=M,Pe=L,Le=B;!Q&&he>0;)he--,Pe=Math.floor(Pe/2),Le=Math.floor(Le/2),Q=this.tiles[mn(he,Pe,Le)];return Q&&Q.source?(ie>1&&console.log("found parent tile z%d-%d-%d",he,Pe,Le),ie>1&&console.time("drilling down"),this.splitTile(Q.source,he,Pe,Le,M,L,B),ie>1&&console.timeEnd("drilling down"),this.tiles[U]?we(this.tiles[U],K):null):null};var an=(function(M){function L(B,G,K,ie){M.call(this,B,G,K,Nn),ie&&(this.loadGeoJSON=ie)}return M&&(L.__proto__=M),(L.prototype=Object.create(M&&M.prototype)).constructor=L,L.prototype.loadData=function(B,G){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=G,this._pendingLoadDataParams=B,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},L.prototype._loadData=function(){var B=this;if(this._pendingCallback&&this._pendingLoadDataParams){var G=this._pendingCallback,K=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var ie=!!(K&&K.request&&K.request.collectResourceTiming)&&new a.RequestPerformance(K.request);this.loadGeoJSON(K,(function(oe,U){if(oe||!U)return G(oe);if(typeof U!="object")return G(new Error("Input data given to '"+K.source+"' is not a valid GeoJSON object."));(function Te(ke,Qe){var He,Ee=ke&&ke.type;if(Ee==="FeatureCollection")for(He=0;He<ke.features.length;He++)Te(ke.features[He],Qe);else if(Ee==="GeometryCollection")for(He=0;He<ke.geometries.length;He++)Te(ke.geometries[He],Qe);else if(Ee==="Feature")Te(ke.geometry,Qe);else if(Ee==="Polygon")xe(ke.coordinates,Qe);else if(Ee==="MultiPolygon")for(He=0;He<ke.coordinates.length;He++)xe(ke.coordinates[He],Qe);return ke})(U,!0);try{if(K.filter){var Q=a.createExpression(K.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Q.result==="error")throw new Error(Q.value.map((function(Te){return Te.key+": "+Te.message})).join(", "));var he=U.features.filter((function(Te){return Q.value.evaluate({zoom:0},Te)}));U={type:"FeatureCollection",features:he}}B._geoJSONIndex=K.cluster?new Sr((function(Te){var ke=Te.superclusterOptions,Qe=Te.clusterProperties;if(!Qe||!ke)return ke;for(var He={},Ee={},We={accumulated:null,zoom:0},qe={properties:null},Ne=Object.keys(Qe),xt=0,Ge=Ne;xt<Ge.length;xt+=1){var Pt=Ge[xt],ar=Qe[Pt],Mt=ar[0],Gt=a.createExpression(ar[1]),Ot=a.createExpression(typeof Mt=="string"?[Mt,["accumulated"],["get",Pt]]:Mt);He[Pt]=Gt.value,Ee[Pt]=Ot.value}return ke.map=function(Tn){qe.properties=Tn;for(var Jt={},Lr=0,nr=Ne;Lr<nr.length;Lr+=1){var Lt=nr[Lr];Jt[Lt]=He[Lt].evaluate(We,qe)}return Jt},ke.reduce=function(Tn,Jt){qe.properties=Jt;for(var Lr=0,nr=Ne;Lr<nr.length;Lr+=1){var Lt=nr[Lr];We.accumulated=Tn[Lt],Tn[Lt]=Ee[Lt].evaluate(We,qe)}},ke})(K)).load(U.features):(function(Te,ke){return new It(Te,ke)})(U,K.geojsonVtOptions)}catch(Te){return G(Te)}B.loaded={};var Pe={};
1if(ie){var Le=ie.finish();Le&&(Pe.resourceTiming={},Pe.resourceTiming[K.source]=JSON.parse(JSON.stringify(Le)))}G(null,Pe)}))}},L.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},L.prototype.reloadTile=function(B,G){var K=this.loaded;return K&&K[B.uid]?M.prototype.reloadTile.call(this,B,G):this.loadTile(B,G)},L.prototype.loadGeoJSON=function(B,G){if(B.request)a.getJSON(B.request,G);else{if(typeof B.data!="string")return G(new Error("Input data given to '"+B.source+"' is not a valid GeoJSON object."));try{return G(null,JSON.parse(B.data))}catch{return G(new Error("Input data given to '"+B.source+"' is not a valid GeoJSON object."))}}},L.prototype.removeSource=function(B,G){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),G()},L.prototype.getClusterExpansionZoom=function(B,G){try{G(null,this._geoJSONIndex.getClusterExpansionZoom(B.clusterId))}catch(K){G(K)}},L.prototype.getClusterChildren=function(B,G){try{G(null,this._geoJSONIndex.getChildren(B.clusterId))}catch(K){G(K)}},L.prototype.getClusterLeaves=function(B,G){try{G(null,this._geoJSONIndex.getLeaves(B.clusterId,B.limit,B.offset))}catch(K){G(K)}},L})(ue),rr=function(M){var L=this;this.self=M,this.actor=new a.Actor(M,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:ue,geojson:an},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(B,G){if(L.workerSourceTypes[B])throw new Error('Worker source with name "'+B+'" already registered.');L.workerSourceTypes[B]=G},this.self.registerRTLTextPlugin=function(B){if(a.plugin.isParsed())throw new Error("RTL text plugin already registered.");a.plugin.applyArabicShaping=B.applyArabicShaping,a.plugin.processBidirectionalText=B.processBidirectionalText,a.plugin.processStyledBidirectionalText=B.processStyledBidirectionalText}};return rr.prototype.setReferrer=function(M,L){this.referrer=L},rr.prototype.setImages=function(M,L,B){for(var G in this.availableImages[M]=L,this.workerSources[M]){var K=this.workerSources[M][G];for(var ie in K)K[ie].availableImages=L}B()},rr.prototype.setLayers=function(M,L,B){this.getLayerIndex(M).replace(L),B()},rr.prototype.updateLayers=function(M,L,B){this.getLayerIndex(M).update(L.layers,L.removedIds),B()},rr.prototype.loadTile=function(M,L,B){this.getWorkerSource(M,L.type,L.source).loadTile(L,B)},rr.prototype.loadDEMTile=function(M,L,B){this.getDEMWorkerSource(M,L.source).loadTile(L,B)},rr.prototype.reloadTile=function(M,L,B){this.getWorkerSource(M,L.type,L.source).reloadTile(L,B)},rr.prototype.abortTile=function(M,L,B){this.getWorkerSource(M,L.type,L.source).abortTile(L,B)},rr.prototype.removeTile=function(M,L,B){this.getWorkerSource(M,L.type,L.source).removeTile(L,B)},rr.prototype.removeDEMTile=function(M,L){this.getDEMWorkerSource(M,L.source).removeTile(L)},rr.prototype.removeSource=function(M,L,B){if(this.workerSources[M]&&this.workerSources[M][L.type]&&this.workerSources[M][L.type][L.source]){var G=this.workerSources[M][L.type][L.source];delete this.workerSources[M][L.type][L.source],G.removeSource!==void 0?G.removeSource(L,B):B()}},rr.prototype.loadWorkerSource=function(M,L,B){try{this.self.importScripts(L.url),B()}catch(G){B(G.toString())}},rr.prototype.syncRTLPluginState=function(M,L,B){try{a.plugin.setState(L);var G=a.plugin.getPluginURL();if(a.plugin.isLoaded()&&!a.plugin.isParsed()&&G!=null){this.self.importScripts(G);var K=a.plugin.isParsed();B(K?void 0:new Error("RTL Text Plugin failed to import scripts from "+G),K)}}catch(ie){B(ie.toString())}},rr.prototype.getAvailableImages=function(M){var L=this.availableImages[M];return L||(L=[]),L},rr.prototype.getLayerIndex=function(M){var L=this.layerIndexes[M];return L||(L=this.layerIndexes[M]=new k),L},rr.prototype.getWorkerSource=function(M,L,B){var G=this;return this.workerSources[M]||(this.workerSources[M]={}),this.workerSources[M][L]||(this.workerSources[M][L]={}),this.workerSources[M][L][B]||(this.workerSources[M][L][B]=new this.workerSourceTypes[L]({send:function(K,ie,oe){G.actor.send(K,ie,oe,M)}},this.getLayerIndex(M),this.getAvailableImages(M))),this.workerSources[M][L][B]},rr.prototype.getDEMWorkerSource=function(M,L){return this.demWorkerSources[M]||(this.demWorkerSources[M]={}),this.demWorkerSources[M][L]||(this.demWorkerSources[M][L]=new ge),this.demWorkerSources[M][L]},rr.prototype.enforceCacheSizeLimit=function(M,L){a.enforceCacheSizeLimit(L)},typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope&&(self.worker=new rr(self)),rr})),E(["./shared"],(function(a){var _=a.createCommonjsModule((function(n){function o(p){return!i(p)}function i(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,x,A=new Blob([""],{type:"text/javascript"}),R=URL.createObjectURL(A);try{x=new Worker(R),d=!0}catch{d=!1}return x&&x.terminate(),URL.revokeObjectURL(R),d})()?"Uint8ClampedArray"in window?ArrayBuffer.isView?(function(){var d=document.createElement("canvas");d.width=d.height=1;var x=d.getContext("2d");if(!x)return!1;var A=x.getImageData(0,0,1,1);return A&&A.width===d.width})()?(u[f=p&&p.failIfMajorPerformanceCaveat]===void 0&&(u[f]=(function(d){var x=(function(R){var q=document.createElement("canvas"),V=Object.create(o.webGLContextAttributes);return V.failIfMajorPerformanceCaveat=R,q.probablySupportsContext?q.probablySupportsContext("webgl",V)||q.probablySupportsContext("experimental-webgl",V):q.supportsContext?q.supp
vendor: 18,437 bytes, line 1
1ortsContext("webgl",V)||q.supportsContext("experimental-webgl",V):q.getContext("webgl",V)||q.getContext("experimental-webgl",V)})(d);if(!x)return!1;var A=x.createShader(x.VERTEX_SHADER);return!(!A||x.isContextLost())&&(x.shaderSource(A,"void main() {}"),x.compileShader(A),x.getShaderParameter(A,x.COMPILE_STATUS)===!0)})(f)),u[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}n.exports?n.exports=o:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=o,window.mapboxgl.notSupportedReason=i);var u={};o.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}})),w={create:function(n,o,i){var u=a.window.document.createElement(n);return o!==void 0&&(u.className=o),i&&i.appendChild(u),u},createNS:function(n,o){return a.window.document.createElementNS(n,o)}},k=a.window.document&&a.window.document.documentElement.style;function z(n){if(!k)return n[0];for(var o=0;o<n.length;o++)if(n[o]in k)return n[o];return n[0]}var O,F=z(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);w.disableDrag=function(){k&&F&&(O=k[F],k[F]="none")},w.enableDrag=function(){k&&F&&(k[F]=O)};var W=z(["transform","WebkitTransform"]);w.setTransform=function(n,o){n.style[W]=o};var ue=!1;try{var ye=Object.defineProperty({},"passive",{get:function(){ue=!0}});a.window.addEventListener("test",ye,ye),a.window.removeEventListener("test",ye,ye)}catch{ue=!1}w.addEventListener=function(n,o,i,u){u===void 0&&(u={}),n.addEventListener(o,i,"passive"in u&&ue?u:u.capture)},w.removeEventListener=function(n,o,i,u){u===void 0&&(u={}),n.removeEventListener(o,i,"passive"in u&&ue?u:u.capture)};var ge=function(n){n.preventDefault(),n.stopPropagation(),a.window.removeEventListener("click",ge,!0)};function xe(n){var o=n.userImage;return!!(o&&o.render&&o.render())&&(n.data.replace(new Uint8Array(o.data.buffer)),!0)}w.suppressClick=function(){a.window.addEventListener("click",ge,!0),a.window.setTimeout((function(){a.window.removeEventListener("click",ge,!0)}),0)},w.mousePos=function(n,o){var i=n.getBoundingClientRect();return new a.Point(o.clientX-i.left-n.clientLeft,o.clientY-i.top-n.clientTop)},w.touchPos=function(n,o){for(var i=n.getBoundingClientRect(),u=[],p=0;p<o.length;p++)u.push(new a.Point(o[p].clientX-i.left-n.clientLeft,o[p].clientY-i.top-n.clientTop));return u},w.mouseButton=function(n){return a.window.InstallTrigger!==void 0&&n.button===2&&n.ctrlKey&&a.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:n.button},w.remove=function(n){n.parentNode&&n.parentNode.removeChild(n)};var ce=(function(n){function o(){n.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.RGBAImage({width:1,height:1}),this.dirty=!0}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.isLoaded=function(){return this.loaded},o.prototype.setLoaded=function(i){if(this.loaded!==i&&(this.loaded=i,i)){for(var u=0,p=this.requestors;u<p.length;u+=1){var f=p[u];this._notify(f.ids,f.callback)}this.requestors=[]}},o.prototype.getImage=function(i){return this.images[i]},o.prototype.addImage=function(i,u){this._validate(i,u)&&(this.images[i]=u)},o.prototype._validate=function(i,u){var p=!0;return this._validateStretch(u.stretchX,u.data&&u.data.width)||(this.fire(new a.ErrorEvent(new Error('Image "'+i+'" has invalid "stretchX" value'))),p=!1),this._validateStretch(u.stretchY,u.data&&u.data.height)||(this.fire(new a.ErrorEvent(new Error('Image "'+i+'" has invalid "stretchY" value'))),p=!1),this._validateContent(u.content,u)||(this.fire(new a.ErrorEvent(new Error('Image "'+i+'" has invalid "content" value'))),p=!1),p},o.prototype._validateStretch=function(i,u){if(!i)return!0;for(var p=0,f=0,d=i;f<d.length;f+=1){var x=d[f];if(x[0]<p||x[1]<x[0]||u<x[1])return!1;p=x[1]}return!0},o.prototype._validateContent=function(i,u){return!(i&&(i.length!==4||i[0]<0||u.data.width<i[0]||i[1]<0||u.data.height<i[1]||i[2]<0||u.data.width<i[2]||i[3]<0||u.data.height<i[3]||i[2]<i[0]||i[3]<i[1]))},o.prototype.updateImage=function(i,u){u.version=this.images[i].version+1,this.images[i]=u,this.updatedImages[i]=!0},o.prototype.removeImage=function(i){var u=this.images[i];delete this.images[i],delete this.patterns[i],u.userImage&&u.userImage.onRemove&&u.userImage.onRemove()},o.prototype.listImages=function(){return Object.keys(this.images)},o.prototype.getImages=function(i,u){var p=!0;if(!this.isLoaded())for(var f=0,d=i;f<d.length;f+=1)this.images[d[f]]||(p=!1);this.isLoaded()||p?this._notify(i,u):this.requestors.push({ids:i,callback:u})},o.prototype._notify=function(i,u){for(var p={},f=0,d=i;f<d.length;f+=1){var x=d[f];this.images[x]||this.fire(new a.Event("styleimagemissing",{id:x}));var A=this.images[x];A?p[x]={data:A.data.clone(),pixelRatio:A.pixelRatio,sdf:A.sdf,version:A.version,stretchX:A.stretchX,stretchY:A.stretchY,content:A.content,hasRenderCallback:!!(A.userImage&&A.userImage.render)}:a.warnOnce('Image "'+x+'" 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.')}u(null,p)},o.prototype.getPixelSize=function(){var i=this.atlasImage;return{width:i.width,height:i.height}},o.prototype.getPattern=function(i){var u=this.patterns[i],p=this.getImage(i);if(!p)return null;if(u&&u.position.version===p.version)return u.position;if(u)u.position.version=p.version;else{var f={w:p.data.width+2,h:p.data.height+2,x:0,y:0},d=new a.ImagePosition(f,p);this.patterns[i]={bin:f,position:d}}return this._updatePatternAtlas(),this.patterns[i].position},o.prototype.bind=function(i){var u=i.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new a.Texture(i,this.atlasImage,u.RGBA),this.atlasTexture.bind(u.LINEAR,u.CLAMP_TO_EDGE)},o.prototype._updatePatternAtlas=function(){var i=[];for(var u in this.patterns)i.push(this.patterns[u].bin);var p=a.potpack(i),f=p.w,d=p.h,x=this.atlasImage;for(var A in x.resize({width:f||1,height:d||1}),this.patterns){var R=this.patterns[A].bin,q=R.x+1,V=R.y+1,j=this.images[A].data,Y=j.width,J=j.height;a.RGBAImage.copy(j,x,{x:0,y:0},{x:q,y:V},{width:Y,height:J}),a.RGBAImage.copy(j,x,{x:0,y:J-1},{x:q,y:V-1},{width:Y,height:1}),a.RGBAImage.copy(j,x,{x:0,y:0},{x:q,y:V+J},{width:Y,height:1}),a.RGBAImage.copy(j,x,{x:Y-1,y:0},{x:q-1,y:V},{width:1,height:J}),a.RGBAImage.copy(j,x,{x:0,y:0},{x:q+Y,y:V},{width:1,height:J})}this.dirty=!0},o.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},o.prototype.dispatchRenderCallbacks=function(i){for(var u=0,p=i;u<p.length;u+=1){var f=p[u];if(!this.callbackDispatchedThisFrame[f]){this.callbackDispatchedThisFrame[f]=!0;var d=this.images[f];xe(d)&&this.updateImage(f,d)}}},o})(a.Evented),$=Fe,me=Fe,ze=1e20;function Fe(n,o,i,u,p,f){this.fontSize=n||24,this.buffer=o===void 0?3:o,this.cutoff=u||.25,this.fontFamily=p||"sans-serif",this.fontWeight=f||"normal",this.radius=i||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 pe(n,o,i,u,p,f,d){for(var x=0;x<o;x++){for(var A=0;A<i;A++)u[A]=n[A*o+x];for(je(u,p,f,d,i),A=0;A<i;A++)n[A*o+x]=p[A]}for(A=0;A<i;A++){for(x=0;x<o;x++)u[x]=n[A*o+x];for(je(u,p,f,d,o),x=0;x<o;x++)n[A*o+x]=Math.sqrt(p[x])}}function je(n,o,i,u,p){i[0]=0,u[0]=-ze,u[1]=+ze;for(var f=1,d=0;f<p;f++){for(var x=(n[f]+f*f-(n[i[d]]+i[d]*i[d]))/(2*f-2*i[d]);x<=u[d];)d--,x=(n[f]+f*f-(n[i[d]]+i[d]*i[d]))/(2*f-2*i[d]);i[++d]=f,u[d]=x,u[d+1]=+ze}for(f=0,d=0;f<p;f++){for(;u[d+1]<f;)d++;o[f]=(f-i[d])*(f-i[d])+n[i[d]]}}Fe.prototype.draw=function(n){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(n,this.buffer,this.middle);for(var o=this.ctx.getImageData(0,0,this.size,this.size),i=new Uint8ClampedArray(this.size*this.size),u=0;u<this.size*this.size;u++){var p=o.data[4*u+3]/255;this.gridOuter[u]=p===1?0:p===0?ze:Math.pow(Math.max(0,.5-p),2),this.gridInner[u]=p===1?ze:p===0?0:Math.pow(Math.max(0,p-.5),2)}for(pe(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),pe(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),u=0;u<this.size*this.size;u++)i[u]=Math.max(0,Math.min(255,Math.round(255-255*((this.gridOuter[u]-this.gridInner[u])/this.radius+this.cutoff))));return i},$.default=me;var Re=function(n,o){this.requestManager=n,this.localIdeographFontFamily=o,this.entries={}};Re.prototype.setURL=function(n){this.url=n},Re.prototype.getGlyphs=function(n,o){var i=this,u=[];for(var p in n)for(var f=0,d=n[p];f<d.length;f+=1)u.push({stack:p,id:d[f]});a.asyncAll(u,(function(x,A){var R=x.stack,q=x.id,V=i.entries[R];V||(V=i.entries[R]={glyphs:{},requests:{},ranges:{}});var j=V.glyphs[q];if(j===void 0){if(j=i._tinySDF(V,R,q))return V.glyphs[q]=j,void A(null,{stack:R,id:q,glyph:j});var Y=Math.floor(q/256);if(256*Y>65535)A(new Error("glyphs > 65535 not supported"));else if(V.ranges[Y])A(null,{stack:R,id:q,glyph:j});else{var J=V.requests[Y];J||(J=V.requests[Y]=[],Re.loadGlyphRange(R,Y,i.url,i.requestManager,(function(re,Z){if(Z){for(var te in Z)i._doesCharSupportLocalGlyph(+te)||(V.glyphs[+te]=Z[+te]);V.ranges[Y]=!0}for(var ae=0,fe=J;ae<fe.length;ae+=1)(0,fe[ae])(re,Z);delete V.requests[Y]}))),J.push((function(re,Z){re?A(re):Z&&A(null,{stack:R,id:q,glyph:Z[q]||null})}))}}else A(null,{stack:R,id:q,glyph:j})}),(function(x,A){if(x)o(x);else if(A){for(var R={},q=0,V=A;q<V.length;q+=1){var j=V[q],Y=j.stack,J=j.id,re=j.glyph;(R[Y]||(R[Y]={}))[J]=re&&{id:re.id,bitmap:re.bitmap.clone(),metrics:re.metrics}}o(null,R)}}))},Re.prototype._doesCharSupportLocalGlyph=function(n){return!!this.localIdeographFontFamily&&(a.isChar["CJK Unified Ideographs"](n)||a.isChar["Hangul Syllables"](n)||a.isChar.Hiragana(n)||a.isChar.Katakana(n))},Re.prototype._tinySDF=function(n,o,i){var u=this.localIdeographFontFamily;if(u&&this._doesCharSupportLocalGlyph(i)){var p=n.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=n.tinySDF=new Re.TinySDF(24,3,8,.25,u,f)}return{id:i,bitmap:new a.AlphaImage({width:30,height:30},p.draw(String.fromCharCode(i))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},Re.loadGlyphRange=function(n,o,i,u,p){var f=256*o,d=f+255,x=u.transformRequest(u.normalizeGlyphsURL(i).replace("{fontstack}",n).replace("{range}",f+"-"+d),a.ResourceType.Glyphs);a.getArrayBuffer(x,(function(A,R){if(A)p(A);else if(R){for(var q={},V=0,j=a.parseGlyphPBF(R);V<j.length;V+=1){var Y=j[V];q[Y.id]=Y}p(null,q)}}))},Re.TinySDF=$;var it=function(){this.specification=a.styleSpec.light.position};it.prototype.possiblyEvaluate=function(n,o){return a.sphericalToCartesian(n.expression.evaluate(o))},it.prototype.interpolate=function(n,o,i){return{x:a.number(n.x,o.x,i),y:a.number(n.y,o.y,i),z:a.number(n.z,o.z,i)}};var se=new a.Properties({anchor:new a.DataConstantProperty(a.styleSpec.light.anchor),position:new it,color:new a.DataConstantProperty(a.styleSpec.light.color),intensity:new a.DataConstantProperty(a.styleSpec.light.intensity)}),rt=(function(n){function o(i){n.call(this),this._transitionable=new a.Transitionable(se),this.setLight(i),this._transitioning=this._transitionable.untransitioned()}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getLight=function(){return this._transitionable.serialize()},o.prototype.setLight=function(i,u){if(u===void 0&&(u={}),!this._validate(a.validateLight,i,u))for(var p in i){var f=i[p];a.endsWith(p,"-transition")?this._transitionable.setTransition(p.slice(0,-11),f):this._transitionable.setValue(p,f)}},o.prototype.updateTransitions=function(i){this._transitioning=this._transitionable.transitioned(i,this._transitioning)},o.prototype.hasTransition=function(){return this._transitioning.hasTransition()},o.prototype.recalculate=function(i){this.properties=this._transitioning.possiblyEvaluate(i)},o.prototype._validate=function(i,u,p){return(!p||p.validate!==!1)&&a.emitValidationErrors(this,i.call(a.validateStyle,a.extend({value:u,style:{glyphs:!0,sprite:!0},styleSpec:a.styleSpec})))},o})(a.Evented),pt=function(n,o){this.width=n,this.height=o,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};pt.prototype.getDash=function(n,o){var i=n.join(",")+String(o);return this.dashEntry[i]||(this.dashEntry[i]=this.addDash(n,o)),this.dashEntry[i]},pt.prototype.getDashRanges=function(n,o,i){var u=[],p=n.length%2==1?-n[n.length-1]*i:0,f=n[0]*i,d=!0;u.push({left:p,right:f,isDash:d,zeroLength:n[0]===0});for(var x=n[0],A=1;A<n.length;A++){var R=n[A];u.push({left:p=x*i,right:f=(x+=R)*i,isDash:d=!d,zeroLength:R===0})}return u},pt.prototype.addRoundDash=function(n,o,i){for(var u=o/2,p=-i;p<=i;p++)for(var f=this.width*(this.nextRow+i+p),d=0,x=n[d],A=0;A<this.width;A++){A/x.right>1&&(x=n[++d]);var R=Math.abs(A-x.left),q=Math.abs(A-x.right),V=Math.min(R,q),j=void 0,Y=p/i*(u+1);if(x.isDash){var J=u-Math.abs(Y);j=Math.sqrt(V*V+J*J)}else j=u-Math.sqrt(V*V+Y*Y);this.data[f+A]=Math.max(0,Math.min(255,j+128))}},pt.prototype.addRegularDash=function(n){for(var o=n.length-1;o>=0;--o){var i=n[o],u=n[o+1];i.zeroLength?n.splice(o,1):u&&u.isDash===i.isDash&&(u.left=i.left,n.splice(o,1))}var p=n[0],f=n[n.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,x=0,A=n[x],R=0;R<this.width;R++){R/A.right>1&&(A=n[++x]);var q=Math.abs(R-A.left),V=Math.abs(R-A.right),j=Math.min(q,V);this.data[d+R]=Math.max(0,Math.min(255,(A.isDash?j:-j)+128))}},pt.prototype.addDash=function(n,o){var i=o?7:0,u=2*i+1;if(this.nextRow+u>this.height)return a.warnOnce("LineAtlas out of space"),null;for(var p=0,f=0;f<n.length;f++)p+=n[f];if(p!==0){var d=this.width/p,x=this.getDashRanges(n,this.width,d);o?this.addRoundDash(x,d,i):this.addRegularDash(x)}var A={y:(this.nextRow+i+.5)/this.height,height:2*i/this.height,width:p};return this.nextRow+=u,this.dirty=!0,A},pt.prototype.bind=function(n){var o=n.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 nt=function n(o,i){this.workerPool=o,this.actors=[],this.currentActor=0,this.id=a.uniqueId();for(var u=this.workerPool.acquire(this.id),p=0;p<u.length;p++){var f=new n.Actor(u[p],i,this.id);f.name="Worker "+p,this.actors.push(f)}};function Qt(n,o,i){var u=function(p,f){if(p)return i(p);if(f){var d=a.pick(a.extend(f,n),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);f.vector_layers&&(d.vectorLayers=f.vector_layers,d.vectorLayerIds=d.vectorLayers.map((function(x){return x.id}))),d.tiles=o.canonicalizeTileset(d,n.url),i(null,d)}};return n.url?a.getJSON(o.transformRequest(o.normalizeSourceURL(n.url),a.ResourceType.Source),u):a.browser.frame((function(){return u(null,n)}))}nt.prototype.broadcast=function(n,o,i){a.asyncAll(this.actors,(function(u,p){u.send(n,o,p)}),i=i||function(){})},nt.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},nt.prototype.remove=function(){this.actors.forEach((function(n){n.remove()})),this.actors=[],this.workerPool.release(this.id)},nt.Actor=a.Actor;var Xt=function(n,o,i){this.bounds=a.LngLatBounds.convert(this.validateBounds(n)),this.minzoom=o||0,this.maxzoom=i||24};Xt.prototype.validateBounds=function(n){return Array.isArray(n)&&n.length===4?[Math.max(-180,n[0]),Math.max(-90,n[1]),Math.min(180,n[2]),Math.min(90,n[3])]:[-180,-90,180,90]},Xt.prototype.contains=function(n){var o=Math.pow(2,n.z),i=Math.floor(a.mercatorXfromLng(this.bounds.getWest())*o),u=Math.floor(a.mercatorYfromLat(this.bounds.getNorth())*o),p=Math.ceil(a.mercatorXfromLng(this.bounds.getEast())*o),f=Math.ceil(a.mercatorYfromLat(this.bounds.getSouth())*o);return n.x>=i&&n.x<p&&n.y>=u&&n.y<f};var Rr=(function(n){function o(i,u,p,f){if(n.call(this),this.id=i,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,a.extend(this,a.pick(u,["url","scheme","tileSize","promoteId"])),this._options=a.extend({type:"vector"},u),this._collectResourceTiming=u.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(f)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.load=function(){var i=this;this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=Qt(this._options,this.map._requestManager,(function(u,p){i._tileJSONRequest=null,i._loaded=!0,u?i.fire(new a.ErrorEvent(u)):p&&(a.extend(i,p),p.bounds&&(i.tileBounds=new Xt(p.bounds,i.minzoom,i.maxzoom)),a.postTurnstileEvent(p.tiles,i.map._requestManager._customAccessToken),a.postMapLoadEvent(p.tiles,i.map._getMapId(),i.map._requestManager._skuToken,i.map._requestManager._customAccessToken),i.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})),i.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})))}))},o.prototype.loaded=function(){return this._loaded},o.prototype.hasTile=function(i){return!this.tileBounds||this.tileBounds.contains(i.
1canonical)},o.prototype.onAdd=function(i){this.map=i,this.load()},o.prototype.setSourceProperty=function(i){this._tileJSONRequest&&this._tileJSONRequest.cancel(),i(),this.map.style.sourceCaches[this.id].clearTiles(),this.load()},o.prototype.setTiles=function(i){var u=this;return this.setSourceProperty((function(){u._options.tiles=i})),this},o.prototype.setUrl=function(i){var u=this;return this.setSourceProperty((function(){u.url=i,u._options.url=i})),this},o.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},o.prototype.serialize=function(){return a.extend({},this._options)},o.prototype.loadTile=function(i,u){var p=this.map._requestManager.normalizeTileURL(i.tileID.canonical.url(this.tiles,this.scheme)),f={request:this.map._requestManager.transformRequest(p,a.ResourceType.Tile),uid:i.uid,tileID:i.tileID,zoom:i.tileID.overscaledZ,tileSize:this.tileSize*i.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:a.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function d(x,A){return delete i.request,i.aborted?u(null):x&&x.status!==404?u(x):(A&&A.resourceTiming&&(i.resourceTiming=A.resourceTiming),this.map._refreshExpiredTiles&&A&&i.setExpiryData(A),i.loadVectorData(A,this.map.painter),a.cacheEntryPossiblyAdded(this.dispatcher),u(null),void(i.reloadCallback&&(this.loadTile(i,i.reloadCallback),i.reloadCallback=null)))}f.request.collectResourceTiming=this._collectResourceTiming,i.actor&&i.state!=="expired"?i.state==="loading"?i.reloadCallback=u:i.request=i.actor.send("reloadTile",f,d.bind(this)):(i.actor=this.dispatcher.getActor(),i.request=i.actor.send("loadTile",f,d.bind(this)))},o.prototype.abortTile=function(i){i.request&&(i.request.cancel(),delete i.request),i.actor&&i.actor.send("abortTile",{uid:i.uid,type:this.t
vendor: 4,287 bytes, line 1
1ype,source:this.id},void 0)},o.prototype.unloadTile=function(i){i.unloadVectorData(),i.actor&&i.actor.send("removeTile",{uid:i.uid,type:this.type,source:this.id},void 0)},o.prototype.hasTransition=function(){return!1},o})(a.Evented),Wt=(function(n){function o(i,u,p,f){n.call(this),this.id=i,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=a.extend({type:"raster"},u),a.extend(this,a.pick(u,["url","scheme","tileSize"]))}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.load=function(){var i=this;this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=Qt(this._options,this.map._requestManager,(function(u,p){i._tileJSONRequest=null,i._loaded=!0,u?i.fire(new a.ErrorEvent(u)):p&&(a.extend(i,p),p.bounds&&(i.tileBounds=new Xt(p.bounds,i.minzoom,i.maxzoom)),a.postTurnstileEvent(p.tiles),a.postMapLoadEvent(p.tiles,i.map._getMapId(),i.map._requestManager._skuToken),i.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})),i.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})))}))},o.prototype.loaded=function(){return this._loaded},o.prototype.onAdd=function(i){this.map=i,this.load()},o.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},o.prototype.serialize=function(){return a.extend({},this._options)},o.prototype.hasTile=function(i){return!this.tileBounds||this.tileBounds.contains(i.canonical)},o.prototype.loadTile=function(i,u){var p=this,f=this.map._requestManager.normalizeTileURL(i.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);i.request=a.getImage(this.map._requestManager.transformRequest(f,a.ResourceType.Tile),(function(d,x){if(delete i.request,i.aborted)i.state="unloaded",u(null);else if(d)i.state="errored",u(d);else if(x){p.map._refreshExpiredTiles&&i.setExpiryData(x),delete x.cacheControl,delete x.expires;var A=p.map.painter.context,R=A.gl;i.texture=p.map.painter.getTileTexture(x.width),i.texture?i.texture.update(x,{useMipmap:!0}):(i.texture=new a.Texture(A,x,R.RGBA,{useMipmap:!0}),i.texture.bind(R.LINEAR,R.CLAMP_TO_EDGE,R.LINEAR_MIPMAP_NEAREST),A.extTextureFilterAnisotropic&&R.texParameterf(R.TEXTURE_2D,A.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,A.extTextureFilterAnisotropicMax)),i.state="loaded",a.cacheEntryPossiblyAdded(p.dispatcher),u(null)}}))},o.prototype.abortTile=function(i,u){i.request&&(i.request.cancel(),delete i.request),u()},o.prototype.unloadTile=function(i,u){i.texture&&this.map.painter.saveTileTexture(i.texture),u()},o.prototype.hasTransition=function(){return!1},o})(a.Evented),zr=(function(n){function o(i,u,p,f){n.call(this,i,u,p,f),this.type="raster-dem",this.maxzoom=22,this._options=a.extend({type:"raster-dem"},u),this.encoding=u.encoding||"mapbox"}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.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(i,u){var p=this.map._requestManager.normalizeTileURL(i.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);function f(d,x){d&&(i.state="errored",u(d)),x&&(i.dem=x,i.needsHillshadePrepare=!0,i.state="loaded",u(null))}i.request=a.getImage(this.map._requestManager.transformRequest(p,a.ResourceType.Tile),(function(d,x){if(delete i.request,i.aborted)i.state="unloaded",u(null);else if(d)i.state="errored",u(d);else if(x){this.map._refreshExpiredTiles&&i.setExpiryData(x),delete x.cacheControl,delete x.expires;var A=a.window.ImageBitmap&&x instanceof a.window.ImageBitmap&&a.offscreenCanvasSupported()?x:a.browser.getImageData(x,1),R={uid:i.uid,coord:i.tileID,source:this.id,rawImageData:A,encoding:this.encoding};i.actor&&i.state!=="expired"||(i.actor=this.dispatcher.getActor(),i.actor.send("loadDEMTile",R,f.bind(this)))}}).bind(this)),i.neighboringTiles=this._getNeighboringTiles(i.tileID)},o.prototype._getNeighboringTiles=function(i){var u=i.canonical,p=Math.pow(2,u.z),f=(u.x-1+p)%p,d=u.x===0?i.wrap-1:i.wrap,x=(u.x+1+p)%p,A=u.x+1===p?i.wrap+1:i.wrap,R={};
1return R[new a.OverscaledTileID(i.overscaledZ,d,u.z,f,u.y).key]={backfilled:!1},R[new a.OverscaledTileID(i.overscaledZ,A,u.z,x,u.y).key]={backfilled:!1},u.y>0&&(R[new a.OverscaledTileID(i.overscaledZ,d,u.z,f,u.y-1).key]={backfilled:!1},R[new a.OverscaledTileID(i.overscaledZ,i.wrap,u.z,u.x,u.y-1).key]={backfilled:!1},R[new a.OverscaledTileID(i.overscaledZ,A,u.z,x,u.y-1).key]={backfilled:!1}),u.y+1<p&&(R[new a.OverscaledTileID(i.overscaledZ,d,u.z,f,u.y+1).key]={backfilled:!1},R[new a.OverscaledTileID(i.overscaledZ,i.wrap,u.z,u.x,u.y+1).key]={backfilled:!1},R[new a.OverscaledTileID(i.overscaledZ,A,u.z,x,u.y+1).key]={backfilled:!1}),R},o.prototype.unloadTile=function(i){i.demTexture&&this.map.painter.saveTileTexture(i.demTexture),i.fbo&&(i.fbo.destroy(),delete i.fbo),i.dem&&delete i.dem,delete i.neighboringTiles,i.state="unloaded",i.actor&&i.actor.send("removeDEMTile",{uid:i.uid,source:this.id})},o})(Wt),Ze=(function(n){function o(i,u,p,f){n.call(this),this.id=i,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=u.data,this._options=a.extend({},u),this._collectResourceTiming=u.collectResourceTiming,this._resourceTiming=[],u.maxzoom!==void 0&&(this.maxzoom=u.maxzoom),u.type&&(this.type=u.type),u.attribution&&(this.attribution=u.attribution),this.promoteId=u.promoteId;var d=a.EXTENT/this.tileSize;this.workerOptions=a.extend({source:this.id,cluster:u.cluster||!1,geojsonVtOptions:{buffer:(u.buffer!==void 0?u.buffer:128)*d,tolerance:(u.tolerance!==void 0?u.tolerance:.375)*d,extent:a.EXTENT,maxZoom:this.maxzoom,lineMetrics:u.lineMetrics||!1,generateId:u.generateId||!1}
vendor: 7,551 bytes, line 1
1,superclusterOptions:{maxZoom:u.clusterMaxZoom!==void 0?Math.min(u.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,u.clusterMinPoints||2),extent:a.EXTENT,radius:(u.clusterRadius||50)*d,log:!1,generateId:u.generateId||!1},clusterProperties:u.clusterProperties,filter:u.filter},u.workerOptions)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.load=function(){var i=this;this.fire(new a.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(u){if(u)i.fire(new a.ErrorEvent(u));else{var p={dataType:"source",sourceDataType:"metadata"};i._collectResourceTiming&&i._resourceTiming&&i._resourceTiming.length>0&&(p.resourceTiming=i._resourceTiming,i._resourceTiming=[]),i.fire(new a.Event("data",p))}}))},o.prototype.onAdd=function(i){this.map=i,this.load()},o.prototype.setData=function(i){var u=this;return this._data=i,this.fire(new a.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(p){if(p)u.fire(new a.ErrorEvent(p));else{var f={dataType:"source",sourceDataType:"content"};u._collectResourceTiming&&u._resourceTiming&&u._resourceTiming.length>0&&(f.resourceTiming=u._resourceTiming,u._resourceTiming=[]),u.fire(new a.Event("data",f))}})),this},o.prototype.getClusterExpansionZoom=function(i,u){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:i,source:this.id},u),this},o.prototype.getClusterChildren=function(i,u){return this.actor.send("geojson.getClusterChildren",{clusterId:i,source:this.id},u),this},o.prototype.getClusterLeaves=function(i,u,p,f){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:i,limit:u,offset:p},f),this},o.prototype._updateWorkerData=function(i){var u=this;this._loaded=!1;var p=a.extend({},this.workerOptions),f=this._data;typeof f=="string"?(p.request=this.map._requestManager.transformRequest(a.browser.resolveURL(f),a.ResourceType.Source),p.request.collectResourceTiming=this._collectResourceTiming):p.data=JSON.stringify(f),this.actor.send(this.type+".loadData",p,(function(d,x){u._removed||x&&x.abandoned||(u._loaded=!0,x&&x.resourceTiming&&x.resourceTiming[u.id]&&(u._resourceTiming=x.resourceTiming[u.id].slice(0)),u.actor.send(u.type+".coalesce",{source:p.source},null),i(d))}))},o.prototype.loaded=function(){return this._loaded},o.prototype.loadTile=function(i,u){var p=this,f=i.actor?"reloadTile":"loadTile";i.actor=this.actor,i.request=this.actor.send(f,{type:this.type,uid:i.uid,tileID:i.tileID,zoom:i.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:a.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},(function(d,x){return delete i.request,i.unloadVectorData(),i.aborted?u(null):d?u(d):(i.loadVectorData(x,p.map.painter,f==="reloadTile"),u(null))}))},o.prototype.abortTile=function(i){i.request&&(i.request.cancel(),delete i.request),i.aborted=!0},o.prototype.unloadTile=function(i){i.unloadVectorData(),this.actor.send("removeTile",{uid:i.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 a.extend({},this._options,{type:this.type,data:this._data})},o.prototype.hasTransition=function(){return!1},o})(a.Evented),lr=a.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Ht=(function(n){function o(i,u,p,f){n.call(this),this.id=i,this.dispatcher=p,this.coordinates=u.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(f),this.options=u}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.load=function(i,u){var p=this;this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this.url=this.options.url,a.getImage(this.map._requestManager.transformRequest(this.url,a.ResourceType.Image),(function(f,d){p._loaded=!0,f?p.fire(new a.ErrorEvent(f)):d&&(p.image=d,i&&(p.coordinates=i),u&&u(),p._finishLoading())}))},o.prototype.loaded=function(){return this._loaded},o.prototype.updateImage=function(i){var u=this;return this.image&&i.url?(this.options.url=i.url,this.load(i.coordinates,(function(){u.texture=null})),this):this},o.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})))},o.prototype.onAdd=function(i){this.map=i,this.load()},o.prototype.setCoordinates=function(i){var u=this;this.coordinates=i;var p=i.map(a.MercatorCoordinate.fromLngLat);this.tileID=(function(d){for(var x=1/0,A=1/0,R=-1/0,q=-1/0,V=0,j=d;V<j.length;V+=1){var Y=j[V];x=Math.min(x,Y.x),A=Math.min(A,Y.y),R=Math.max(R,Y.x),q=Math.max(q,Y.y)}var J=Math.max(R-x,q-A),re=Math.max(0,Math.floor(-Math.log(J)/Math.LN2)),Z=Math.pow(2,re);return new a.CanonicalTileID(re,Math.floor((x+R)/2*Z),Math.floor((A+q)/2*Z))})(p),this.minzoom=this.maxzoom=this.tileID.z;var f=p.map((function(d){return u.tileID.getTilePoint(d)._round()}));return this._boundsArray=new a.StructArrayLayout4i8,this._boundsArray.emplaceBack(f[0].x,f[0].y,0,0),this._boundsArray.emplaceBack(f[1].x,f[1].y,a.EXTENT,0),this._boundsArray.emplaceBack(f[3].x,f[3].y,0,a.EXTENT),this._boundsArray.emplaceBack(f[2].x,f[2].y,a.EXTENT,a.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})),this},o.prototype.prepare=function(){if(Object.keys(this.tiles).length!==0&&this.image){var i=this.map.painter.context,u=i.gl;for(var p in this.boundsBuffer||(this.boundsBuffer=i.createVertexBuffer(this._boundsArray,lr.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new a.Texture(i,this.image,u.RGBA),this.texture.bind(u.LINEAR,u.CLAMP_TO_EDGE)),this.tiles){var f=this.tiles[p];f.state!=="loaded"&&(f.state="loaded",f.texture=this.texture)}}},o.prototype.loadTile=function(i,u){this.tileID&&this.tileID.equals(i.tileID.canonical)?(this.tiles[String(i.tileID.wrap)]=i,i.buckets={},u(null)):(i.state="errored",u(null))},o.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},o.prototype.hasTransition=function(){return!1},o})(a.Evented),wt=(function(n){function o(i,u,p,f){n.call(this,i,u,p,f),this.roundZoom=!0,this.type="video",this.options=u}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.load=function(){var i=this;this._loaded=!1;var u=this.options;this.urls=[];for(var p=0,f=u.urls;p<f.length;p+=1)this.urls.push(this.map._requestManager.transformRequest(f[p],a.ResourceType.Source).url);a.getVideo(this.urls,(function(d,x){i._loaded=!0,d?i.fire(new a.ErrorEvent(d)):x&&(i.video=x,i.video.loop=!0,i.video.setAttribute("playsinline",""),i.video.addEventListener("playing",(function(){i.map.triggerRepaint()})),i.map&&i.video.play(),i._finishLoading())}))},o.prototype.pause=function(){this.video&&this.video.pause()},o.prototype.play=function(){this.video&&this.video.play()},o.prototype.seek=function(i){if(this.video){var u=this.video.seekable;i<u.start(0)||i>u.end(0)?this.fire(new a.ErrorEvent(new a.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+u.start(0)+" and "+u.end(0)+"-second mark."))):this.video.currentTime=i}},o.prototype.getVideo=function(){return this.video}
1,o.prototype.onAdd=function(i){this.map||(this.map=i,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 i=this.map.painter.context,u=i.gl;for(var p in this.boundsBuffer||(this.boundsBuffer=i.createVertexBuffer(this._boundsArray,lr.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(u.LINEAR,u.CLAMP_TO_EDGE),u.texSubImage2D(u.TEXTURE_2D,0,0,0,u.RGBA,u.UNSIGNED_BYTE,this.video)):(this.texture=new a.Texture(i,this.video,u.RGBA),this.texture.bind(u.LINEAR,u.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})(Ht),wr=(function(n){function o(i,u,p,f){n.call(this,i,u,p,f),u.coordinates?Array.isArray(u.coordinates)&&u.coordinates.length===4&&!u.coordinates.some((function(d){return!Array.isArray(d)||d.length!==2||d.some((function(x){return typeof x!="number"}))}))||this.fire(new a.ErrorEvent(new a.ValidationError("sources."+i,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.ErrorEvent(new a.ValidationError("sources."+i,null,'missing required property "coordinates"'))),u.animate&&typeof u.animate!="boolean"&&this.fire(new a.ErrorEvent(new a.ValidationError("sources."+i,null,'optional "animate" property must be a boolean value'))),u.canvas?typeof u.canvas=="string"||u.canvas instanceof a.window.HTMLCanvasElement||this.fire(new a.ErrorEvent(new a.ValidationError("sources."+i,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new a.ErrorEvent(new a.ValidationError("sources."+i,null,'missing required property "canvas"'))),this.options=u,this.animate=u.animate===void 0||u.animate}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof a.window.HTMLCanvasElement?this.options.canvas:a.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new a.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},o.prototype.getCanvas=function(){return this.canvas},o.prototype.onAdd=function(i){this.map=i,this.load(),this.canvas&&this.animate&&this.play()},o.prototype.onRemove=function(){this.pause()},o.prototype.prepare=function(){var i=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,i=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,i=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var u=this.map.painter.context,p=u.gl;for(var f in this.boundsBuffer||(this.boundsBuffer=u.createVertexBuffer(this._boundsArray,lr.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(i||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new a.Texture(u,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 i=0,u=[this.canvas.width,this.canvas.height];i<u.length;i+=1){var p=u[i];if(isNaN(p)||p<=0)return!0}return!1},o})(Ht),Jr={vector:Rr,raster:Wt,"raster-dem":zr,geojson:Ze,video:wt,image:Ht,canvas:wr};function dr(n,o){var i=a.identity([]);return a.translate(i,i,[1,1,0]),a.scale(i,i,[.5*n.width,.5*n.height,1]),a.multiply(i,i,n.calculatePosMatrix(o.toUnwrapped()))}function Sr(n,o,i,u,p,f){var d=(function(re,Z,te){if(re)for(var ae=0,fe=re;ae<fe.length;ae+=1){var Se=Z[fe[ae]];if(Se&&Se.source===te&&Se.type==="fill-extrusion")return!0}else for(var _e in Z){var Ie=Z[_e];if(Ie.source===te&&Ie.type==="fill-extrusion")return!0}return!1})(p&&p.layers,o,n.id),x=f.maxPitchScaleFactor(),A=n.tilesIn(u,x,d);A.sort(dn);for(var R=[],q=0,V=A;q<V.length;q+=1){var j=V[q];R.push({wrappedTileID:j.tileID.wrapped().key,queryResults:j.tile.queryRenderedFeatures(o,i,n._state,j.queryGeometry,j.cameraQueryGeometry,j.scale,p,f,x,dr(n.transform,j.tileID))})}var Y=(function(re){for(var Z={},te={},ae=0,fe=re;ae<fe.length;ae+=1){var Se=fe[ae],_e=Se.queryResults,Ie=Se.wrappedTileID,Me=te[Ie]=te[Ie]||{};for(var Be in _e)for(var Oe=_e[Be],Ke=Me[Be]=Me[Be]||{},st=Z[Be]=Z[Be]||[],ht=0,ct=Oe;ht<ct.length;ht+=1){var Ft=ct[ht];Ke[Ft.featureIndex]||(Ke[Ft.featureIndex]=!0,st.push(Ft))}}return Z})(R);for(var J in Y)Y[J].forEach((function(re){var Z=re.feature,te=n.getFeatureState(Z.layer["source-layer"],Z.id);Z.source=Z.layer.source,Z.layer["source-layer"]&&(Z.sourceLayer=Z.layer["source-layer"]),Z.state=te}));return Y}function dn(n,o){var i=n.tileID,u=o.tileID;return i.overscaledZ-u.overscaledZ||i.canonical.y-u.canonical.y||i.wrap-u.wrap||i.canonical.x-u.canonical.x}var Tt=function(n,o){this.max=n,this.onRemove=o,this.reset()};Tt.prototype.reset=function(){for(var n in this.data)for(var o=0,i=this.data[n];o<i.length;o+=1){var u=i[o];u.timeout&&clearTimeout(u.timeout),this.onRemove(u.value)}return this.data={},this.order=[],this},Tt.prototype.add=function(n,o,i){var u=this,p=n.wrapped().key;this.data[p]===void 0&&(this.data[p]=[]);var f={value:o,timeout:void 0};if(i!==void 0&&(f.timeout=setTimeout((function(){u.remove(n,f)}),i)),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},Tt.prototype.has=function(n){return n.wrapped().key in this.data},Tt.prototype.getAndRemove=function(n){return this.has(n)?this._getAndRemoveByKey(n.wrapped().key):null},Tt.prototype._getAndRemoveByKey=function(n){var o=this.data[n].shift();return o.timeout&&clearTimeout(o.timeout),this.data[n].length===0&&delete this.data[n],this.order.splice(this.order.indexOf(n),1),o.value},Tt.prototype.getByKey=function(n){var o=this.data[n];return o?o[0].value:null},Tt.prototype.get=function(n){return this.has(n)?this.data[n.wrapped().key][0].value:null},Tt.prototype.remove=function(n,o){if(!this.has(n))return this;var i=n.wrapped().key,u=o===void 0?0:this.data[i].indexOf(o),p=this.data[i][u];return this.data[i].splice(u,1),p.timeout&&clearTimeout(p.timeout),this.data[i].length===0&&delete this.data[i],this.onRemove(p.value),this.order.splice(this.order.indexOf(i),1),this},Tt.prototype.setMaxSize=function(n){for(this.max=n;this.order.length>this.max;){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},Tt.prototype.filter=function(n){var o=[];for(var i in this.data)for(var u=0,p=this.data[i];u<p.length;u+=1){var f=p[u];n(f.value)||o.push(f)}for(var d=0,x=o;d<x.length;d+=1){var A=x[d];this.remove(A.value.tileID,A)}};var zt=function(n,o,i){this.context=n;var u=n.gl;this.buffer=u.createBuffer(),this.dynamicDraw=!!i,this.context.unbindVAO(),n.bindElementBuffer.set(this.buffer),u.bufferData(u.ELEMENT_ARRAY_BUFFER,o.arrayBuffer,this.dynamicDraw?u.DYNAMIC_DRAW:u.STATIC_DRAW),this.dynamicDraw||delete o.arrayBuffer};zt.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},zt.prototype.updateData=function(n){var o=this.context.gl;this.context.unbindVAO(),this.bind(),o.bufferSubData(o.ELEMENT_ARRAY_BUFFER,0,n.arrayBuffer)},zt.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var Tr={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},Kt=function(n,o,i,u){this.length=o.length,this.attributes=i,this.itemSize=o.bytesPerElement,this.dynamicDraw=u,this.context=n;var p=n.gl;this.buffer=p.createBuffer(),n.bindVertexBuffer.set(this.buffer),p.bufferData(p.ARRAY_BUFFER,o.arrayBuffer,this.dynamicDraw?p.DYNAMIC_DRAW:p.STATIC_DRAW),this.dynamicDraw||delete o.arrayBuffer};Kt.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},Kt.prototype.updateData=function(n){var o=this.context.gl;this.bind(),o.bufferSubData(o.ARRAY_BUFFER,0,n.arrayBuffer)},Kt.prototype.enableAttributes=function(n,o){for(var i=0;i<this.attributes.length;i++){var u=o.attributes[this.attributes[i].name];u!==void 0&&n.enableVertexAttribArray(u)}},Kt.prototype.setVertexAttribPointers=function(n,o,i){for(var u=0;u<this.attributes.length;u++){var p=this.attributes[u],f=o.attributes[p.name];f!==void 0&&n.vertexAttribPointer(f,p.components,n[Tr[p.type]],!1,this.itemSize,p.offset+this.itemSize*(i||0))}},Kt.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var yt=function(n){this.gl=n.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};yt.prototype.get=function(){return this.current},yt.prototype.set=function(n){},yt.prototype.getDefault=function(){return this.default},yt.prototype.setDefault=function(){this.set(this.default)};var Vr=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return a.Color.transparent},o.prototype.set=function(i){var u=this.current;(i.r!==u.r||i.g!==u.g||i.b!==u.b||i.a!==u.a||this.dirty)&&(this.gl.clearColor(i.r,i.g,i.b,i.a),this.current=i,this.dirty=!1)},o})(yt),Ar=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return 1},o.prototype.set=function(i){(i!==this.current||this.dirty)&&(this.gl.clearDepth(i),this.current=i,this.dirty=!1)},o})(yt),cr=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return 0},o.prototype.set=function(i){(i!==this.current||this.dirty)&&(this.gl.clearStencil(i),this.current=i,this.dirty=!1)},o})(yt),yn=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return[!0,
vendor: 16,197 bytes, line 1
1!0,!0,!0]},o.prototype.set=function(i){var u=this.current;(i[0]!==u[0]||i[1]!==u[1]||i[2]!==u[2]||i[3]!==u[3]||this.dirty)&&(this.gl.colorMask(i[0],i[1],i[2],i[3]),this.current=i,this.dirty=!1)},o})(yt),Cr=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return!0},o.prototype.set=function(i){(i!==this.current||this.dirty)&&(this.gl.depthMask(i),this.current=i,this.dirty=!1)},o})(yt),ti=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return 255},o.prototype.set=function(i){(i!==this.current||this.dirty)&&(this.gl.stencilMask(i),this.current=i,this.dirty=!1)},o})(yt),Zr=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},o.prototype.set=function(i){var u=this.current;(i.func!==u.func||i.ref!==u.ref||i.mask!==u.mask||this.dirty)&&(this.gl.stencilFunc(i.func,i.ref,i.mask),this.current=i,this.dirty=!1)},o})(yt),rn=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){var i=this.gl;return[i.KEEP,i.KEEP,i.KEEP]},o.prototype.set=function(i){var u=this.current;(i[0]!==u[0]||i[1]!==u[1]||i[2]!==u[2]||this.dirty)&&(this.gl.stencilOp(i[0],i[1],i[2]),this.current=i,this.dirty=!1)},o})(yt),Xn=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(i){if(i!==this.current||this.dirty){var u=this.gl;i?u.enable(u.STENCIL_TEST):u.disable(u.STENCIL_TEST),this.current=i,this.dirty=!1}},o})(yt),nn=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return[0,1]},o.prototype.set=function(i){var u=this.current;(i[0]!==u[0]||i[1]!==u[1]||this.dirty)&&(this.gl.depthRange(i[0],i[1]),this.current=i,this.dirty=!1)},o})(yt),on=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(i){if(i!==this.current||this.dirty){var u=this.gl;i?u.enable(u.DEPTH_TEST):u.disable(u.DEPTH_TEST),this.current=i,this.dirty=!1}},o})(yt),Ci=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return this.gl.LESS},o.prototype.set=function(i){(i!==this.current||this.dirty)&&(this.gl.depthFunc(i),this.current=i,this.dirty=!1)},o})(yt),Hn=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(i){if(i!==this.current||this.dirty){var u=this.gl;i?u.enable(u.BLEND):u.disable(u.BLEND),this.current=i,this.dirty=!1}},o})(yt),fo=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){var i=this.gl;return[i.ONE,i.ZERO]},o.prototype.set=function(i){var u=this.current;(i[0]!==u[0]||i[1]!==u[1]||this.dirty)&&(this.gl.blendFunc(i[0],i[1]),this.current=i,this.dirty=!1)},o})(yt),jo=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return a.Color.transparent},o.prototype.set=function(i){var u=this.current;(i.r!==u.r||i.g!==u.g||i.b!==u.b||i.a!==u.a||this.dirty)&&(this.gl.blendColor(i.r,i.g,i.b,i.a),this.current=i,this.dirty=!1)},o})(yt),fi=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return this.gl.FUNC_ADD},o.prototype.set=function(i){(i!==this.current||this.dirty)&&(this.gl.blendEquation(i),this.current=i,this.dirty=!1)},o})(yt),Pi=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(i){if(i!==this.current||this.dirty){var u=this.gl;i?u.enable(u.CULL_FACE):u.disable(u.CULL_FACE),this.current=i,this.dirty=!1}},o})(yt),Mi=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return this.gl.BACK},o.prototype.set=function(i){(i!==this.current||this.dirty)&&(this.gl.cullFace(i),this.current=i,this.dirty=!1)},o})(yt),Go=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return this.gl.CCW},o.prototype.set=function(i){(i!==this.current||this.dirty)&&(this.gl.frontFace(i),this.current=i,this.dirty=!1)},o})(yt),Vi=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(i){(i!==this.current||this.dirty)&&(this.gl.useProgram(i),this.current=i,this.dirty=!1)},o})(yt),ki=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return this.gl.TEXTURE0},o.prototype.set=function(i){(i!==this.current||this.dirty)&&(this.gl.activeTexture(i),this.current=i,this.dirty=!1)},o})(yt),ri=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){var i=this.gl;return[0,0,i.drawingBufferWidth,i.drawingBufferHeight]},o.prototype.set=function(i){var u=this.current;(i[0]!==u[0]||i[1]!==u[1]||i[2]!==u[2]||i[3]!==u[3]||this.dirty)&&(this.gl.viewport(i[0],i[1],i[2],i[3]),this.current=i,this.dirty=!1)},o})(yt),we=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(i){if(i!==this.current||this.dirty){var u=this.gl;u.bindFramebuffer(u.FRAMEBUFFER,i),this.current=i,this.dirty=!1}},o})(yt),Ae=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(i){if(i!==this.current||this.dirty){var u=this.gl;u.bindRenderbuffer(u.RENDERBUFFER,i),this.current=i,this.dirty=!1}},o})(yt),jt=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(i){if(i!==this.current||this.dirty){var u=this.gl;u.bindTexture(u.TEXTURE_2D,i),this.current=i,this.dirty=!1}},o})(yt),or=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(i){if(i!==this.current||this.dirty){var u=this.gl;u.bindBuffer(u.ARRAY_BUFFER,i),this.current=i,this.dirty=!1}},o})(yt),er=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(i){var u=this.gl;u.bindBuffer(u.ELEMENT_ARRAY_BUFFER,i),this.current=i,this.dirty=!1},o})(yt),It=(function(n){function o(i){n.call(this,i),this.vao=i.extVertexArrayObject}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o.prototype.set=function(i){this.vao&&(i!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(i),this.current=i,this.dirty=!1)},o})(yt),mn=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return 4},o.prototype.set=function(i){if(i!==this.current||this.dirty){var u=this.gl;u.pixelStorei(u.UNPACK_ALIGNMENT,i),this.current=i,this.dirty=!1}},o})(yt),Nn=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(i){if(i!==this.current||this.dirty){var u=this.gl;u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i),this.current=i,this.dirty=!1}},o})(yt),an=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return!1},o.prototype.set=function(i){if(i!==this.current||this.dirty){var u=this.gl;u.pixelStorei(u.UNPACK_FLIP_Y_WEBGL,i),this.current=i,this.dirty=!1}},o})(yt),rr=(function(n){function o(i,u){n.call(this,i),this.context=i,this.parent=u}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getDefault=function(){return null},o})(yt),M=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.setDirty=function(){this.dirty=!0},o.prototype.set=function(i){if(i!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var u=this.gl;u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,i,0),this.current=i,this.dirty=!1}},o})(rr),L=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.set=function(i){if(i!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var u=this.gl;u.framebufferRenderbuffer(u.FRAMEBUFFER,u.DEPTH_ATTACHMENT,u.RENDERBUFFER,i),this.current=i,this.dirty=!1}},o})(rr),B=function(n,o,i,u){this.context=n,this.width=o,this.height=i;var p=this.framebuffer=n.gl.createFramebuffer();this.colorAttachment=new M(n,p),u&&(this.depthAttachment=new L(n,p))};B.prototype.destroy=function(){var n=this.context.gl,o=this.colorAttachment.get();if(o&&n.deleteTexture(o),this.depthAttachment){var i=this.depthAttachment.get();i&&n.deleteRenderbuffer(i)}n.deleteFramebuffer(this.framebuffer)};var G=function(n,o,i){this.func=n,this.mask=o,this.range=i};G.ReadOnly=!1,G.ReadWrite=!0,G.disabled=new G(519,G.ReadOnly,[0,1]);var K=function(n,o,i,u,p,f){this.test=n,this.ref=o,this.mask=i,this.fail=u,this.depthFail=p,this.pass=f};K.disabled=new K({func:519,mask:0},0,0,7680,7680,7680);var ie=function(n,o,i){this.blendFunction=n,this.blendColor=o,this.mask=i};ie.disabled=new ie(ie.Replace=[1,0],a.Color.transparent,[!1,!1,!1,!1]),ie.unblended=new ie(ie.Replace,a.Color.transparent,[!0,!0,!0,!0]),ie.alphaBlended=new ie([1,771],a.Color.transparent,[!0,!0,!0,!0]);var oe=function(n,o,i){this.enable=n,this.mode=o,this.frontFace=i};oe.disabled=new oe(!1,1029,2305),oe.backCCW=new oe(!0,1029,2305);var U=function(n){this.gl=n,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new Vr(this),this.clearDepth=new Ar(this),this.clearStencil=new cr(this),this.colorMask=new yn(this),this.depthMask=new Cr(this),this.stencilMask=new ti(this),this.stencilFunc=new Zr(this),this.stencilOp=new rn(this),this.stencilTest=new Xn(this),this.depthRange=new nn(this),this.depthTest=new on(this),this.depthFunc=new Ci(this),this.blend=new Hn(this),this.blendFunc=new fo(this),this.blendColor=new jo(this),this.blendEquation=new fi(this),this.cullFace=new Pi(this),this.cullFaceSide=new Mi(this),this.frontFace=new Go(this),this.program=new Vi(this),this.activeTexture=new ki(this),this.viewport=new ri(this),this.bindFramebuffer=new we(this),this.bindRenderbuffer=new Ae(this),this.bindTexture=new jt(this),this.bindVertexBuffer=new or(this),this.bindElementBuffer=new er(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new It(this),this.pixelStoreUnpack=new mn(this),this.pixelStoreUnpackPremultiplyAlpha=new Nn(this),this.pixelStoreUnpackFlipY=new an(this),this.extTextureFilterAnisotropic=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("MOZ_EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=n.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=n.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(n.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=n.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=n.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE)};U.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()},U.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},U.prototype.createIndexBuffer=function(n,o){return new zt(this,n,o)},U.prototype.createVertexBuffer=function(n,o,i){return new Kt(this,n,o,i)},U.prototype.createRenderbuffer=function(n,o,i){var u=this.gl,p=u.createRenderbuffer();return this.bindRenderbuffer.set(p),u.renderbufferStorage(u.RENDERBUFFER,n,o,i),this.bindRenderbuffer.set(null),p},U.prototype.createFramebuffer=function(n,o,i){return new B(this,n,o,i)},U.prototype.clear=function(n){var o=n.color,i=n.depth,u=this.gl,p=0;o&&(p|=u.COLOR_BUFFER_BIT,this.clearColor.set(o),this.colorMask.set([!0,!0,!0,!0])),i!==void 0&&(p|=u.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(i),this.depthMask.set(!0)),u.clear(p)},U.prototype.setCullFace=function(n){n.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(n.mode),this.frontFace.set(n.frontFace))},U.prototype.setDepthMode=function(n){n.func!==this.gl.ALWAYS||n.mask?(this.depthTest.set(!0),this.depthFunc.set(n.func),this.depthMask.set(n.mask),this.depthRange.set(n.range)):this.depthTest.set(!1)},U.prototype.setStencilMode=function(n){n.test.func!==this.gl.ALWAYS||n.mask?(this.stencilTest.set(!0),this.stencilMask.set(n.mask),this.stencilOp.set([n.fail,n.depthFail,n.pass
1]),this.stencilFunc.set({func:n.test.func,ref:n.ref,mask:n.test.mask})):this.stencilTest.set(!1)},U.prototype.setColorMode=function(n){a.deepEqual(n.blendFunction,ie.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(n.blendFunction),this.blendColor.set(n.blendColor)),this.colorMask.set(n.mask)},U.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var Q=(function(n){function o(i,u,p){var f=this;n.call(this),this.id=i,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,x,A,R){var q=new Jr[x.type](d,x,A,R);if(q.id!==d)throw new Error("Expected Source id to be "+d+" instead of "+q.id);return a.bindAll(["load","abort","unload","serialize","prepare"],q),q})(i,u,p,this),this._tiles={},this._cache=new Tt(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new a.SourceFeatureState}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.onAdd=function(i){this.map=i,this._maxTileCacheSize=i?i._maxTileC
1acheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(i)},o.prototype.onRemove=function(i){this._source&&this._source.onRemove&&this._source.onRemove(i)},o.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var i in this._tiles){var u=this._tiles[i];if(u.state!=="loaded"&&u.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 i=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,i&&this.reload(),this.transform&&this.update(this.transform)}},o.prototype._loadTile=function(i,u){return this._source.loadTile(i,u)},o.prototype._unloadTile=function(i){if(this._source.unloadTile)return this._source.unloadTile(i,(function(){}))},o.prototype._abortTile=function(i){if(this._source.abortTile)return this._source.abortTile(i,(function(){}))},o.prototype.serialize=function(){return this._source.serialize()},o.prototype.prepare=function(i){for(var u in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var p=this._tiles[u];p.upload(i),p.prepare(this.map.style.imageManager)}},o.prototype.getIds=function(){return a.values(this._tiles).map((function(i){return i.tileID})).sort(he).map((function(i){return i.key}))},o.prototype.getRenderableIds=function(i){var u=this,p=[];for(var f in this._tiles)this._isIdRenderable(f,i)&&p.push(this._tiles[f]);return i?p.sort((function(d,x){var A=d.tileID,R=x.tileID,q=new a.Point(A.canonical.x,A.canonical.y)._rotate(u.transform.angle),V=new a.Point(R.canonical.x,R.canonical.y)._rotate(u.transform.angle);return A.overscaledZ-R.overscaledZ||V.y-q.y||V.x-q.x})).map((function(d){return d.tileID.key})):p.map((function(d){return d.tileID})).sort(he).map((function(d){return d.key}))},o.prototype.hasRenderableParent=function(i){var u=this.findLoadedParent(i,0);return!!u&&this._isIdRenderable(u.tileID.key)},o.prototype._isIdRenderable=function(i,u){return this._tiles[i]&&this._tiles[i].hasData()&&!this._coveredTiles[i]&&(u||!this._tiles[i].holdingForFade())},o.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var i in this._cache.reset(),this._tiles)this._tiles[i].state!=="errored"&&this._reloadTile(i,"reloading")},o.prototype._reloadTile=function(i,u){var p=this._tiles[i];p&&(p.state!=="loading"&&(p.state=u),this._loadTile(p,this._tileLoaded.bind(this,p,i,u)))},o.prototype._tileLoaded=function(i,u,p,f){if(f)return i.state="errored",void(f.status!==404?this._source.fire(new a.ErrorEvent(f,{tile:i})):this.update(this.transform));i.timeAdded=a.browser.now(),p==="expired"&&(i.refreshedUponExpiration=!0),this._setTileReloadTimer(u,i),this.getSource().type==="raster-dem"&&i.dem&&this._backfillDEM(i),this._state.initializeTileState(i,this.map?this.map.painter:null),this._source.fire(new a.Event("data",{dataType:"source",tile:i,coord:i.tileID}))},o.prototype._backfillDEM=function(i){for(var u=this.getRenderableIds(),p=0;p<u.length;p++){var f=u[p];if(i.neighboringTiles&&i.neighboringTiles[f]){var d=this.getTileByID(f);x(i,d),x(d,i)}}function x(A,R){A.needsHillshadePrepare=!0;var q=R.tileID.canonical.x-A.tileID.canonical.x,V=R.tileID.canonical.y-A.tileID.canonical.y,j=Math.pow(2,A.tileID.canonical.z),Y=R.tileID.key;q===0&&V===0||Math.abs(V)>1||(Math.abs(q)>1&&(Math.abs(q+j)===1?q+=j:Math.abs(q-j)===1&&(q-=j)),R.dem&&A.dem&&(A.dem.backfillBorder(R.dem,q,V),A.neighboringTiles&&A.neighboringTiles[Y]&&(A.neighboringTiles[Y].backfilled=!0)))}},o.prototype.getTile=function(i){return this.getTileByID(i.key)},o.prototype.getTileByID=function(i){return this._tiles[i]},o.prototype._retainLoadedChildren=function(i,u,p,f){for(var d in this._tiles){var x=this._tiles[d];if(!(f[d]||!x.hasData()||x.tileID.overscaledZ<=u||x.tileID.overscaledZ>p)){for(var A=x.tileID;x&&x.tileID.overscaledZ>u+1;){var R=x.tileID.scaledTo(x.tileID.overscaledZ-1);(x=this._tiles[R.key])&&x.hasData()&&(A=R)}for(var q=A;q.overscaledZ>u;)if(i[(q=q.scaledTo(q.overscaledZ-1)).key]){f[A.key]=A;break}}}},o.prototype.findLoadedParent=function(i,u){if(i.key in this._loadedParentTiles){var p=this._loadedParentTiles[i.key];return p&&p.tileID.overscaledZ>=u?p:null}for(var f=i.overscaledZ-1;f>=u;f--){var d=i.scaledTo(f),x=this._getLoadedTile(d);if(x)return x}},o.prototype._getLoadedTile=function(i){var u=this._tiles[i.key];return u&&u.hasData()?u:this._cache.getByKey(i.wrapped().key)},o.prototype.updateCacheSize=function(i){var u=Math.ceil(i.width/this._source.tileSize)+1,p=Math.ceil(i.height/this._source.tileSize)+1,f=Math.floor(u*p*5),d=typeof this._maxTileC
vendor: 44,027 bytes, line 1
1acheSize=="number"?Math.min(this._maxTileCacheSize,f):f;this._cache.setMaxSize(d)},o.prototype.handleWrapJump=function(i){var u=Math.round((i-(this._prevLng===void 0?i:this._prevLng))/360);if(this._prevLng=i,u){var p={};for(var f in this._tiles){var d=this._tiles[f];d.tileID=d.tileID.unwrapTo(d.tileID.wrap+u),p[d.tileID.key]=d}for(var x in this._tiles=p,this._timers)clearTimeout(this._timers[x]),delete this._timers[x];for(var A in this._tiles)this._setTileReloadTimer(A,this._tiles[A])}},o.prototype.update=function(i){var u=this;if(this.transform=i,this._sourceLoaded&&!this._paused){var p;this.updateCacheSize(i),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?p=i.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(Me){return new a.OverscaledTileID(Me.canonical.z,Me.wrap,Me.canonical.z,Me.canonical.x,Me.canonical.y)})):(p=i.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(Me){return u._source.hasTile(Me)})))):p=[];var f=i.coveringZoomLevel(this._source),d=Math.max(f-o.maxOverzooming,this._source.minzoom),x=Math.max(f+o.maxUnderzooming,this._source.minzoom),A=this._updateRetainedTiles(p,f);if(Pe(this._source.type)){for(var R={},q={},V=0,j=Object.keys(A);V<j.length;V+=1){var Y=j[V],J=A[Y],re=this._tiles[Y];if(re&&!(re.fadeEndTime&&re.fadeEndTime<=a.browser.now())){var Z=this.findLoadedParent(J,d);Z&&(this._addTile(Z.tileID),R[Z.tileID.key]=Z.tileID),q[Y]=J}}for(var te in this._retainLoadedChildren(q,f,x,A),R)A[te]||(this._coveredTiles[te]=!0,A[te]=R[te])}for(var ae in A)this._tiles[ae].clearFadeHold();for(var fe=0,Se=a.keysDifference(this._tiles,A);fe<Se.length;fe+=1){var _e=Se[fe],Ie=this._tiles[_e];Ie.hasSymbolBuckets&&!Ie.holdingForFade()?Ie.setHoldDuration(this.map._fadeDuration):Ie.hasSymbolBuckets&&!Ie.symbolFadeFinished()||this._removeTile(_e)}this._updateLoadedParentTileCache()}},o.prototype.releaseSymbolFadeTiles=function(){for(var i in this._tiles)this._tiles[i].holdingForFade()&&this._removeTile(i)},o.prototype._updateRetainedTiles=function(i,u){for(var p={},f={},d=Math.max(u-o.maxOverzooming,this._source.minzoom),x=Math.max(u+o.maxUnderzooming,this._source.minzoom),A={},R=0,q=i;R<q.length;R+=1){var V=q[R],j=this._addTile(V);p[V.key]=V,j.hasData()||u<this._source.maxzoom&&(A[V.key]=V)}this._retainLoadedChildren(A,u,x,p);for(var Y=0,J=i;Y<J.length;Y+=1){var re=J[Y],Z=this._tiles[re.key];if(!Z.hasData()){if(u+1>this._source.maxzoom){var te=re.children(this._source.maxzoom)[0],ae=this.getTile(te);if(ae&&ae.hasData()){p[te.key]=te;continue}}else{var fe=re.children(this._source.maxzoom);if(p[fe[0].key]&&p[fe[1].key]&&p[fe[2].key]&&p[fe[3].key])continue}for(var Se=Z.wasRequested(),_e=re.overscaledZ-1;_e>=d;--_e){var Ie=re.scaledTo(_e);if(f[Ie.key]||(f[Ie.key]=!0,!(Z=this.getTile(Ie))&&Se&&(Z=this._addTile(Ie)),Z&&(p[Ie.key]=Ie,Se=Z.wasRequested(),Z.hasData())))break}}}return p},o.prototype._updateLoadedParentTileCache=function(){for(var i in this._loadedParentTiles={},this._tiles){for(var u=[],p=void 0,f=this._tiles[i].tileID;f.overscaledZ>0;){if(f.key in this._loadedParentTiles){p=this._loadedParentTiles[f.key];break}u.push(f.key);var d=f.scaledTo(f.overscaledZ-1);if(p=this._getLoadedTile(d))break;f=d}for(var x=0,A=u;x<A.length;x+=1)this._loadedParentTiles[A[x]]=p}},o.prototype._addTile=function(i){var u=this._tiles[i.key];if(u)return u;(u=this._cache.getAndRemove(i))&&(this._setTileReloadTimer(i.key,u),u.tileID=i,this._state.initializeTileState(u,this.map?this.map.painter:null),this._cacheTimers[i.key]&&(clearTimeout(this._cacheTimers[i.key]),delete this._cacheTimers[i.key],this._setTileReloadTimer(i.key,u)));var p=!!u;return p||(u=new a.Tile(i,this._source.tileSize*i.overscaleFactor()),this._loadTile(u,this._tileLoaded.bind(this,u,i.key,u.state))),u?(u.uses++,this._tiles[i.key]=u,p||this._source.fire(new a.Event("dataloading",{tile:u,coord:u.tileID,dataType:"source"})),u):null},o.prototype._setTileReloadTimer=function(i,u){var p=this;i in this._timers&&(clearTimeout(this._timers[i]),delete this._timers[i]);var f=u.getExpiryTimeout();f&&(this._timers[i]=setTimeout((function(){p._reloadTile(i,"expired"),delete p._timers[i]}),f))},o.prototype._removeTile=function(i){var u=this._tiles[i];u&&(u.uses--,delete this._tiles[i],this._timers[i]&&(clearTimeout(this._timers[i]),delete this._timers[i]),u.uses>0||(u.hasData()&&u.state!=="reloading"?this._cache.add(u.tileID,u,u.getExpiryTimeout()):(u.aborted=!0,this._abortTile(u),this._unloadTile(u))))},o.prototype.clearTiles=function(){for(var i in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(i);this._cache.reset()},o.prototype.tilesIn=function(i,u,p){var f=this,d=[],x=this.transform;if(!x)return d;for(var A=p?x.getCameraQueryGeometry(i):i,R=i.map((function(_e){return x.pointCoordinate(_e)})),q=A.map((function(_e){return x.pointCoordinate(_e)})),V=this.getIds(),j=1/0,Y=1/0,J=-1/0,re=-1/0,Z=0,te=q;Z<te.length;Z+=1){var ae=te[Z];j=Math.min(j,ae.x),Y=Math.min(Y,ae.y),J=Math.max(J,ae.x),re=Math.max(re,ae.y)}for(var fe=function(_e){var Ie=f._tiles[V[_e]];if(!Ie.holdingForFade()){var Me=Ie.tileID,Be=Math.pow(2,x.zoom-Ie.tileID.overscaledZ),Oe=u*Ie.queryPadding*a.EXTENT/Ie.tileSize/Be,Ke=[Me.getTilePoint(new a.MercatorCoordinate(j,Y)),Me.getTilePoint(new a.MercatorCoordinate(J,re))];if(Ke[0].x-Oe<a.EXTENT&&Ke[0].y-Oe<a.EXTENT&&Ke[1].x+Oe>=0&&Ke[1].y+Oe>=0){var st=R.map((function(ct){return Me.getTilePoint(ct)})),ht=q.map((function(ct){return Me.getTilePoint(ct)}));d.push({tile:Ie,tileID:Me,queryGeometry:st,cameraQueryGeometry:ht,scale:Be})}}},Se=0;Se<V.length;Se++)fe(Se);return d},o.prototype.getVisibleCoordinates=function(i){for(var u=this,p=this.getRenderableIds(i).map((function(A){return u._tiles[A].tileID})),f=0,d=p;f<d.length;f+=1){var x=d[f];x.posMatrix=this.transform.calculatePosMatrix(x.toUnwrapped())}return p},o.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Pe(this._source.type))for(var i in this._tiles){var u=this._tiles[i];if(u.fadeEndTime!==void 0&&u.fadeEndTime>=a.browser.now())return!0}return!1},o.prototype.setFeatureState=function(i,u,p){this._state.updateState(i=i||"_geojsonTileLayer",u,p)},o.prototype.removeFeatureState=function(i,u,p){this._state.removeFeatureState(i=i||"_geojsonTileLayer",u,p)},o.prototype.getFeatureState=function(i,u){return this._state.getState(i=i||"_geojsonTileLayer",u)},o.prototype.setDependencies=function(i,u,p){var f=this._tiles[i];f&&f.setDependencies(u,p)},o.prototype.reloadTilesForDependencies=function(i,u){for(var p in this._tiles)this._tiles[p].hasDependency(i,u)&&this._reloadTile(p,"reloading");this._cache.filter((function(f){return!f.hasDependency(i,u)}))},o})(a.Evented);function he(n,o){var i=Math.abs(2*n.wrap)-+(n.wrap<0),u=Math.abs(2*o.wrap)-+(o.wrap<0);return n.overscaledZ-o.overscaledZ||u-i||o.canonical.y-n.canonical.y||o.canonical.x-n.canonical.x}function Pe(n){return n==="raster"||n==="image"||n==="video"}function Le(){return new a.window.Worker(fs.workerUrl)}Q.maxOverzooming=10,Q.maxUnderzooming=3;var Te="mapboxgl_preloaded_worker_pool",ke=function(){this.active={}};ke.prototype.acquire=function(n){if(!this.workers)for(this.workers=[];this.workers.length<ke.workerCount;)this.workers.push(new Le);return this.active[n]=!0,this.workers.slice()},ke.prototype.release=function(n){delete this.active[n],this.numActive()===0&&(this.workers.forEach((function(o){o.terminate()})),this.workers=null)},ke.prototype.isPreloaded=function(){return!!this.active[Te]},ke.prototype.numActive=function(){return Object.keys(this.active).length};var Qe,He=Math.floor(a.browser.hardwareConcurrency/2);function Ee(){return Qe||(Qe=new ke),Qe}function We(n,o){var i={};for(var u in n)u!=="ref"&&(i[u]=n[u]);return a.refProperties.forEach((function(p){p in o&&(i[p]=o[p])})),i}function qe(n){n=n.slice();for(var o=Object.create(null),i=0;i<n.length;i++)o[n[i].id]=n[i];for(var u=0;u<n.length;u++)"ref"in n[u]&&(n[u]=We(n[u],o[n[u].ref]));return n}ke.workerCount=Math.max(Math.min(He,6),1);var Ne={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 xt(n,o,i){i.push({command:Ne.addSource,args:[n,o[n]]})}function Ge(n,o,i){o.push({command:Ne.removeSource,args:[n]}),i[n]=!0}function Pt(n,o,i,u){Ge(n,i,u),xt(n,o,i)}function ar(n,o,i){var u;for(u in n[i])if(n[i].hasOwnProperty(u)&&u!=="data"&&!a.deepEqual(n[i][u],o[i][u]))return!1;for(u in o[i])if(o[i].hasOwnProperty(u)&&u!=="data"&&!a.deepEqual(n[i][u],o[i][u]))return!1;return!0}function Mt(n,o,i,u,p,f){var d;for(d in o=o||{},n=n||{})n.hasOwnProperty(d)&&(a.deepEqual(n[d],o[d])||i.push({command:f,args:[u,d,o[d],p]}));for(d in o)o.hasOwnProperty(d)&&!n.hasOwnProperty(d)&&(a.deepEqual(n[d],o[d])||i.push({command:f,args:[u,d,o[d],p]}))}function Gt(n){return n.id}function Ot(n,o){return n[o.id]=o,n}var Tn=function(n,o){this.reset(n,o)};Tn.prototype.reset=function(n,o){this.points=n||[],this._distances=[0];for(var i=1;i<this.points.length;i++)this._distances[i]=this._distances[i-1]+this.points[i].dist(this.points[i-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},Tn.prototype.lerp=function(n){if(this.points.length===1)return this.points[0];n=a.clamp(n,0,1);for(var o=1,i=this._distances[o],u=n*this.paddedLength+this.padding;i<u&&o<this._distances.length;)i=this._distances[++o];var p=o-1,f=this._distances[p],d=i-f,x=d>0?(u-f)/d:0;return this.points[p].mult(1-x).add(this.points[o].mult(x))};var Jt=function(n,o,i){var u=this.boxCells=[],p=this.circleCells=[];this.xCellCount=Math.ceil(n/i),this.yCellCount=Math.ceil(o/i);for(var f=0;f<this.xCellCount*this.yCellCount;f++)u.push([]),p.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=n,this.height=o,this.xScale=this.xCellCount/n,this.yScale=this.yCellCount/o,this.boxUid=0,this.circleUid=0};function Lr(n,o,i,u,p){var f=a.create();return o?(a.scale(f,f,[1/p,1/p,1]),i||a.rotateZ(f,f,u.angle)):a.multiply(f,u.labelPlaneMatrix,n),f}function nr(n,o,i,u,p){if(o){var f=a.clone(n);return a.scale(f,f,[p,p,1]),i||a.rotateZ(f,f,-u.angle),f}return u.glCoordMatrix}function Lt(n,o){var i=[n.x,n.y,0,1];un(i,i,o);var u=i[3];return{point:new a.Point(i[0]/u,i[1]/u),signedDistanceFromCamera:u}}function $t(n,o){return .5+n/o*.5}function zn(n,o){var i=n[0]/n[3],u=n[1]/n[3];return i>=-o[0]&&i<=o[0]&&u>=-o[1]&&u<=o[1]}function ha(n,o,i,u,p,f,d,x){var A=u?n.textSizeData:n.iconSizeData,R=a.evaluateSizeForZoom(A,i.transform.zoom),q=[256/i.width*2+1,256/i.height*2+1],V=u?n.text.dynamicLayoutVertexArray:n.icon.dynamicLayoutVertexArray;V.clear();for(var j=n.lineVertexArray,Y=u?n.text.placedSymbolArray:n.icon.placedSymbolArray,J=i.transform.width/i.transform.height,re=!1,Z=0;Z<Y.length;Z++){var te=Y.get(Z);if(te.hidden||te.writingMode===a.WritingMode.vertical&&!re)In(te.numGlyphs,V);else{re=!1;var ae=[te.anchorX,te.anchorY,0,1];if(a.transformMat4(ae,ae,o),zn(ae,q)){var fe=$t(i.transform.cameraToCenterDistance,ae[3]),Se=a.evaluateSizeForFeature(A,R,te),_e=d?Se/fe:Se*fe,Ie=new a.Point(te.anchorX,te.anchorY),Me=Lt(Ie,p).point,Be={},Oe=Hs(te,_e,!1,x,o,p,f,n.glyphOffsetArray,j,V,Me,Ie,Be,J);re=Oe.useVertical,(Oe.notEnoughRoom||re||Oe.needsFlipping&&Hs(te,_e,!0,x,o,p,f,n.glyphOffsetArray,j,V,Me,Ie,Be,J).notEnoughRoom)&&In(te.numGlyphs,V)}else In(te.numGlyphs,V)}}u?n.text.dynamicLayoutVertexBuffer.updateData(V):n.icon.dynamicLayoutVertexBuffer.updateData(V)}function sn(n,o,i,u,p,f,d,x,A,R,q){var V=x.glyphStartIndex+x.numGlyphs,j=x.lineStartIndex,Y=x.lineStartIndex+x.lineLength,J=o.getoffsetX(x.glyphStartIndex),re=o.getoffsetX(V-1),Z=Dr(n*J,i,u,p,f,d,x.segment,j,Y,A,R,q);if(!Z)return null;var te=Dr(n*re,i,u,p,f,d,x.segment,j,Y,A,R,q);return te?{first:Z,last:te}:null}function Ln(n,o,i,u){return n===a.WritingMode.horizontal&&Math.abs(i.y-o.y)>Math.abs(i.x-o.x)*u?{useVertical:!0}:(n===a.WritingMode.vertical?o.y<i.y:o.x>i.x)?{needsFlipping:!0}:null}function Hs(n,o,i,u,p,f,d,x,A,R,q,V,j,Y){var J,re=o/24,Z=n.lineOffsetX*re,te=n.lineOffsetY*re;if(n.numGlyphs>1){var ae=n.glyphStartIndex+n.numGlyphs,fe=n.lineStartIndex,Se=n.lineStartIndex+n.lineLength,_e=sn(re,x,Z,te,i,q,V,n,A,f,j);if(!_e)return{notEnoughRoom:!0};var Ie=Lt(_e.first.point,d).point,Me=Lt(_e.last.point,d).point;if(u&&!i){var Be=Ln(n.writingMode,Ie,Me,Y);if(Be)return Be}J=[_e.first];for(var Oe=n.glyphStartIndex+1;Oe<ae-1;Oe++)J.push(Dr(re*x.getoffsetX(Oe),Z,te,i,q,V,n.segment,fe,Se,A,f,j));J.push(_e.last)}else{if(u&&!i){var Ke=Lt(V,p).point,st=n.lineStartIndex+n.segment+1,ht=new a.Point(A.getx(st),A.gety(st)),ct=Lt(ht,p),Ft=ct.signedDistanceFromCamera>0?ct.point:fa(V,ht,Ke,1,p),Je=Ln(n.writingMode,Ke,Ft,Y);if(Je)return Je}var _t=Dr(re*x.getoffsetX(n.glyphStartIndex),Z,te,i,q,V,n.segment,n.lineStartIndex,n.lineStartIndex+n.lineLength,A,f,j);if(!_t)return{notEnoughRoom:!0};J=[_t]}for(var Et=0,gt=J;Et<gt.length;Et+=1){var vt=gt[Et];a.addDynamicAttributes(R,vt.point,vt.angle)}return{}}function fa(n,o,i,u,p){var f=Lt(n.add(n.sub(o)._unit()),p).point,d=i.sub(f);return i.add(d._mult(u/d.mag()))}function Dr(n,o,i,u,p,f,d,x,A,R,q,V){var j=u?n-o:n+o,Y=j>0?1:-1,J=0;u&&(Y*=-1,J=Math.PI),Y<0&&(J+=Math.PI);for(var re=Y>0?x+d:x+d+1,Z=p,te=p,ae=0,fe=0,Se=Math.abs(j),_e=[];ae+fe<=Se;){if((re+=Y)<x||re>=A)return null;if(te=Z,_e.push(Z),(Z=V[re])===void 0){var Ie=new a.Point(R.getx(re),R.gety(re)),Me=Lt(Ie,q);if(Me.signedDistanceFromCamera>0)Z=V[re]=Me.point;else{var Be=re-Y;Z=fa(ae===0?f:new a.Point(R.getx(Be),R.gety(Be)),Ie,te,Se-ae+1,q)}}ae+=fe,fe=te.dist(Z)}var Oe=(Se-ae)/fe,Ke=Z.sub(te),st=Ke.mult(Oe)._add(te);st._add(Ke._unit()._perp()._mult(i*Y));var ht=J+Math.atan2(Z.y-te.y,Z.x-te.x);return _e.push(st),{point:st,angle:ht,path:_e}}Jt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Jt.prototype.insert=function(n,o,i,u,p){this._forEachCell(o,i,u,p,this._insertBoxCell,this.boxUid++),this.boxKeys.push(n),this.bboxes.push(o),this.bboxes.push(i),this.bboxes.push(u),this.bboxes.push(p)},Jt.prototype.insertCircle=function(n,o,i,u){this._forEachCell(o-u,i-u,o+u,i+u,this._insertCircleCell,this.circleUid++),this.circleKeys.push(n),this.circles.push(o),this.circles.push(i),this.circles.push(u)},Jt.prototype._insertBoxCell=function(n,o,i,u,p,f){this.boxCells[p].push(f)},Jt.prototype._insertCircleCell=function(n,o,i,u,p,f){this.circleCells[p].push(f)},Jt.prototype._query=function(n,o,i,u,p,f){if(i<0||n>this.width||u<0||o>this.height)return!p&&[];var d=[];if(n<=0&&o<=0&&this.width<=i&&this.height<=u){if(p)return!0;for(var x=0;x<this.boxKeys.length;x++)d.push({key:this.boxKeys[x],x1:this.bboxes[4*x],y1:this.bboxes[4*x+1],x2:this.bboxes[4*x+2],y2:this.bboxes[4*x+3]});for(var A=0;A<this.circleKeys.length;A++){var R=this.circles[3*A],q=this.circles[3*A+1],V=this.circles[3*A+2];d.push({key:this.circleKeys[A],x1:R-V,y1:q-V,x2:R+V,y2:q+V})}return f?d.filter(f):d}return this._forEachCell(n,o,i,u,this._queryCell,d,{hitTest:p,seenUids:{box:{},circle:{}}},f),p?d.length>0:d},Jt.prototype._queryCircle=function(n,o,i,u,p){var f=n-i,d=n+i,x=o-i,A=o+i;if(d<0||f>this.width||A<0||x>this.height)return!u&&[];var R=[];return this._forEachCell(f,x,d,A,this._queryCellCircle,R,{hitTest:u,circle:{x:n,y:o,radius:i},seenUids:{box:{},circle:{}}},p),u?R.length>0:R},Jt.prototype.query=function(n,o,i,u,p){return this._query(n,o,i,u,!1,p)},Jt.prototype.hitTest=function(n,o,i,u,p){return this._query(n,o,i,u,!0,p)},Jt.prototype.hitTestCircle=function(n,o,i,u){return this._queryCircle(n,o,i,!0,u)},Jt.prototype._queryCell=function(n,o,i,u,p,f,d,x){var A=d.seenUids,R=this.boxCells[p];if(R!==null)for(var q=this.bboxes,V=0,j=R;V<j.length;V+=1){var Y=j[V];if(!A.box[Y]){A.box[Y]=!0;var J=4*Y;if(n<=q[J+2]&&o<=q[J+3]&&i>=q[J+0]&&u>=q[J+1]&&(!x||x(this.boxKeys[Y]))){if(d.hitTest)return f.push(!0),!0;f.push({key:this.boxKeys[Y],x1:q[J],y1:q[J+1],x2:q[J+2],y2:q[J+3]})}}}var re=this.circleCells[p];if(re!==null)for(var Z=this.circles,te=0,ae=re;te<ae.length;te+=1){var fe=ae[te];if(!A.circle[fe]){A.circle[fe]=!0;var Se=3*fe;if(this._circleAndRectCollide(Z[Se],Z[Se+1],Z[Se+2],n,o,i,u)&&(!x||x(this.circleKeys[fe]))){if(d.hitTest)return f.push(!0),!0;var _e=Z[Se],Ie=Z[Se+1],Me=Z[Se+2];f.push({key:this.circleKeys[fe],x1:_e-Me,y1:Ie-Me,x2:_e+Me,y2:Ie+Me})}}}},Jt.prototype._queryCellCircle=function(n,o,i,u,p,f,d,x){var A=d.circle,R=d.seenUids,q=this.boxCells[p];if(q!==null)for(var V=this.bboxes,j=0,Y=q;j<Y.length;j+=1){var J=Y[j];if(!R.box[J]){R.box[J]=!0;var re=4*J;if(this._circleAndRectCollide(A.x,A.y,A.radius,V[re+0],V[re+1],V[re+2],V[re+3])&&(!x||x(this.boxKeys[J])))return f.push(!0),!0}}var Z=this.circleCells[p];if(Z!==null)for(var te=this.circles,ae=0,fe=Z;ae<fe.length;ae+=1){var Se=fe[ae];if(!R.circle[Se]){R.circle[Se]=!0;var _e=3*Se;if(this._circlesCollide(te[_e],te[_e+1],te[_e+2],A.x,A.y,A.radius)&&(!x||x(this.circleKeys[Se])))return f.push(!0),!0}}},Jt.prototype._forEachCell=function(n,o,i,u,p,f,d,x){for(var A=this._convertToXCellCoord(n),R=this._convertToYCellCoord(o),q=this._convertToXCellCoord(i),V=this._convertToYCellCoord(u),j=A;j<=q;j++)for(var Y=R;Y<=V;Y++)if(p.call(this,n,o,i,u,this.xCellCount*Y+j,f,d,x))return},Jt.prototype._convertToXCellCoord=function(n){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(n*this.xScale)))},Jt.prototype._convertToYCellCoord=function(n){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(n*this.yScale)))},Jt.prototype._circlesCollide=function(n,o,i,u,p,f){var d=u-n,x=p-o,A=i+f;return A*A>d*d+x*x},Jt.prototype._circleAndRectCollide=function(n,o,i,u,p,f,d){var x=(f-u)/2,A=Math.abs(n-(u+x));if(A>x+i)return!1;var R=(d-p)/2,q=Math.abs(o-(p+R));if(q>R+i)return!1;if(A<=x||q<=R)return!0;var V=A-x,j=q-R;return V*V+j*j<=i*i};var da=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function In(n,o){for(var i=0;i<n;i++){var u=o.length;o.resize(u+4),o.float32.set(da,3*u)}}function un(n,o,i){var u=o[0],p=o[1];return n[0]=i[0]*u+i[4]*p+i[12],n[1]=i[1]*u+i[5]*p+i[13],n[3]=i[3]*u+i[7]*p+i[15],n}var ni=function(n,o,i){o===void 0&&(o=new Jt(n.width+200,n.height+200,25)),i===void 0&&(i=new Jt(n.width+200,n.height+200,25)),this.transform=n,this.grid=o,this.ignoredGrid=i,this.pitchfactor=Math.cos(n._pitch)*n.cameraToCenterDistance,this.screenRightBoundary=n.width+100,this.screenBottomBoundary=n.height+100,this.gridRightBoundary=n.width+200,this.gridBottomBoundary=n.height+200};function vr(n,o,i){return o*(a.EXTENT/(n.tileSize*Math.pow(2,i-n.tileID.overscaledZ)))}ni.prototype.placeCollisionBox=function(n,o,i,u,p){var f=this.projectAndGetPerspectiveRatio(u,n.anchorPointX,n.anchorPointY),d=i*f.perspectiveRatio,x=n.x1*d+f.point.x,A=n.y1*d+f.point.y,R=n.x2*d+f.point.x,q=n.y2*d+f.point.y;return!this.isInsideGrid(x,A,R,q)||!o&&this.grid.hitTest(x,A,R,q,p)?{box:[],offscreen:!1}:{box:[x,A,R,q],offscreen:this.isOffscreen(x,A,R,q)}},ni.prototype.placeCollisionCircles=function(n,o,i,u,p,f,d,x,A,R,q,V,j){var Y=[],J=new a.Point(o.anchorX,o.anchorY),re=Lt(J,f),Z=$t(this.transform.cameraToCenterDistance,re.signedDistanceFromCamera),te=(R?p/Z:p*Z)/a.ONE_EM,ae=Lt(J,d).point,fe=sn(te,u,o.lineOffsetX*te,o.lineOffsetY*te,!1,ae,J,o,i,d,{}),Se=!1,_e=!1,Ie=!0;if(fe){for(var Me=.5*V*Z+j,Be=new a.Point(-100,-100),Oe=new a.Point(this.screenRightBoundary,this.screenBottomBoundary),Ke=new Tn,st=fe.first,ht=fe.last,ct=[],Ft=st.path.length-1;Ft>=1;Ft--)ct.push(st.path[Ft]);for(var Je=1;Je<ht.path.length;Je++)ct.push(ht.path[Je]);var _t=2.5*Me;if(x){var Et=ct.map((function(li){return Lt(li,x)}));ct=Et.some((function(li){return li.signedDistanceFromCamera<=0}))?[]:Et.map((function(li){return li.point}))}var gt=[];if(ct.length>0){for(var vt=ct[0].clone(),St=ct[0].clone(),mt=1;mt<ct.length;mt++)vt.x=Math.min(vt.x,ct[mt].x),vt.y=Math.min(vt.y,ct[mt].y),St.x=Math.max(St.x,ct[mt].x),St.y=Math.max(St.y,ct[mt].y);gt=vt.x>=Be.x&&St.x<=Oe.x&&vt.y>=Be.y&&St.y<=Oe.y?[ct]:St.x<Be.x||vt.x>Oe.x||St.y<Be.y||vt.y>Oe.y?[]:a.clipLine([ct],Be.x,Be.y,Oe.x,Oe.y)}for(var ft=0,Yr=gt;ft<Yr.length;ft+=1){var Pr;Ke.reset(Yr[ft],.25*Me),Pr=Ke.length<=.5*Me?1:Math.ceil(Ke.paddedLength/_t)+1;for(var bn=0;bn<Pr;bn++){var cn=bn/Math.max(Pr-1,1),Ir=Ke.lerp(cn),Or=Ir.x+100,Zn=Ir.y+100;Y.push(Or,Zn,Me,0);var Pn=Or-Me,no=Zn-Me,Dn=Or+Me,xi=Zn+Me;if(Ie=Ie&&this.isOffscreen(Pn,no,Dn,xi),_e=_e||this.isInsideGrid(Pn,no,Dn,xi),!n&&this.grid.hitTestCircle(Or,Zn,Me,q)&&(Se=!0,!A))return{circles:[],offscreen:!1,collisionDetected:Se}}}}return{circles:!A&&Se||!_e?[]:Y,offscreen:Ie,collisionDetected:Se}},ni.prototype.queryRenderedSymbols=function(n){if(n.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var o=[],i=1/0,u=1/0,p=-1/0,f=-1/0,d=0,x=n;d<x.length;d+=1){var A=x[d],R=new a.Point(A.x+100,A.y+100);i=Math.min(i,R.x),u=Math.min(u,R.y),p=Math.max(p,R.x),f=Math.max(f,R.y),o.push(R)}for(var q={},V={},j=0,Y=this.grid.query(i,u,p,f).concat(this.ignoredGrid.query(i,u,p,f));j<Y.length;j+=1){var J=Y[j],re=J.key;if(q[re.bucketInstanceId]===void 0&&(q[re.bucketInstanceId]={}),!q[re.bucketInstanceId][re.featureIndex]){var Z=[new a.Point(J.x1,J.y1),new a.Point(J.x2,J.y1),new a.Point(J.x2,J.y2),new a.Point(J.x1,J.y2)];a.polygonIntersectsPolygon(o,Z)&&(q[re.bucketInstanceId][re.featureIndex]=!0,V[re.bucketInstanceId]===void 0&&(V[re.bucketInstanceId]=[]),V[re.bucketInstanceId].push(re.featureIndex))}}return V},ni.prototype.insertCollisionBox=function(n,o,i,u,p){(o?this.ignoredGrid:this.grid).insert({bucketInstanceId:i,featureIndex:u,collisionGroupID:p},n[0],n[1],n[2],n[3])},ni.prototype.insertCollisionCircles=function(n,o,i,u,p){for(var f=o?this.ignoredGrid:this.grid,d={bucketInstanceId:i,featureIndex:u,collisionGroupID:p},x=0;x<n.length;x+=4)f.insertCircle(d,n[x],n[x+1],n[x+2])},ni.prototype.projectAndGetPerspectiveRatio=function(n,o,i){var u=[o,i,0,1];return un(u,u,n),{point:new a.Point((u[0]/u[3]+1)/2*this.transform.width+100,(-u[1]/u[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/u[3]*.5}},ni.prototype.isOffscreen=function(n,o,i,u){return i<100||n>=this.screenRightBoundary||u<100||o>this.screenBottomBoundary},ni.prototype.isInsideGrid=function(n,o,i,u){return i>=0&&n<this.gridRightBoundary&&u>=0&&o<this.gridBottomBoundary},ni.prototype.getViewportMatrix=function(){var n=a.identity([]);return a.translate(n,n,[-100,-100,0]),n};var di=function(n,o,i,u){this.opacity=n?Math.max(0,Math.min(1,n.opacity+(n.placed?o:-o))):u&&i?1:0,this.placed=i};di.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var Kn=function(n,o,i,u,p){this.text=new di(n?n.text:null,o,i,p),this.icon=new di(n?n.icon:null,o,u,p)};Kn.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var Qu=function(n,o,i){this.text=n,this.icon=o,this.skipFade=i},ii=function(){this.invProjMatrix=a.create(),this.viewportMatrix=a.create(),this.circles=[]},Cc=function(n,o,i,u,p){this.bucketInstanceId=n,this.featureIndex=o,this.sourceLayerIndex=i,this.bucketIndex=u,this.tileID=p},Ri=function(n){this.crossSourceCollisions=n,this.maxGroupID=0,this.collisionGroups={}};function vn(n,o,i,u,p){var f=a.getAnchorAlignment(n),d=-(f.horizontalAlign-.5)*o,x=-(f.verticalAlign-.5)*i,A=a.evaluateVariableOffset(n,u);return new a.Point(d+A[0]*p,x+A[1]*p)}function bi(n,o,i,u,p,f){var d=n.x1,x=n.x2,A=n.y1,R=n.y2,q=n.anchorPointX,V=n.anchorPointY,j=new a.Point(o,i);return u&&j._rotate(p?f:-f),{x1:d+j.x,y1:A+j.y,x2:x+j.x,y2:R+j.y,anchorPointX:q,anchorPointY:V}}Ri.prototype.get=function(n){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[n]){var o=++this.maxGroupID;this.collisionGroups[n]={ID:o,predicate:function(i){return i.collisionGroupID===o}}}return this.collisionGroups[n]};var En=function(n,o,i,u){this.transform=n.clone(),this.collisionIndex=new ni(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=o,this.retainedQueryData={},this.collisionGroups=new Ri(i),this.collisionCircleArrays={},this.prevPlacement=u,u&&(u.prevPlacement=void 0),this.placedOrientations={}};function yo(n,o,i,u,p){n.emplaceBack(o?1:0,i?1:0,u||0,p||0),n.emplaceBack(o?1:0,i?1:0,u||0,p||0),n.emplaceBack(o?1:0,i?1:0,u||0,p||0),n.emplaceBack(o?1:0,i?1:0,u||0,p||0)}En.prototype.getBucketParts=function(n,o,i,u){var p=i.getBucket(o),f=i.latestFeatureIndex;if(p&&f&&o.id===p.layerIds[0]){var d=i.collisionBoxArray,x=p.layers[0].layout,A=Math.pow(2,this.transform.zoom-i.tileID.overscaledZ),R=i.tileSize/a.EXTENT,q=this.transform.calculatePosMatrix(i.tileID.toUnwrapped()),V=x.get("text-pitch-alignment")==="map",j=x.get("text-rotation-alignment")==="map",Y=vr(i,1,this.transform.zoom),J=Lr(q,V,j,this.transform,Y),re=null;if(V){var Z=nr(q,V,j,this.transform,Y);re=a.multiply([],this.transform.labelPlaneMatrix,Z)}this.retainedQueryData[p.bucketInstanceId]=new Cc(p.bucketInstanceId,f,p.sourceLayerIndex,p.index,i.tileID);var te={bucket:p,layout:x,posMatrix:q,textLabelPlaneMatrix:J,labelToScreenMatrix:re,scale:A,textPixelRatio:R,holdingForFade:i.holdingForFade(),collisionBoxArray:d,partiallyEvaluatedTextSize:a.evaluateSizeForZoom(p.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(p.sourceID)};if(u)for(var ae=0,fe=p.sortKeyRanges;ae<fe.length;ae+=1){var Se=fe[ae];n.push({sortKey:Se.sortKey,symbolInstanceStart:Se.symbolInstanceStart,symbolInstanceEnd:Se.symbolInstanceEnd,parameters:te})}else n.push({symbolInstanceStart:0,symbolInstanceEnd:p.symbolInstances.length,parameters:te})}},En.prototype.attemptAnchorPlacement=function(n,o,i,u,p,f,d,x,A,R,q,V,j,Y,J){var re,Z=[V.textOffset0,V.textOffset1],te=vn(n,i,u,Z,p),ae=this.collisionIndex.placeCollisionBox(bi(o,te.x,te.y,f,d,this.transform.angle),q,x,A,R.predicate);if(!J||this.collisionIndex.placeCollisionBox(bi(J,te.x,te.y,f,d,this.transform.angle),q,x,A,R.predicate).box.length!==0)return ae.box.length>0?(this.prevPlacement&&this.prevPlacement.variableOffsets[V.crossTileID]&&this.prevPlacement.placements[V.crossTileID]&&this.prevPlacement.placements[V.crossTileID].text&&(re=this.prevPlacement.variableOffsets[V.crossTileID].anchor),this.variableOffsets[V.crossTileID]={textOffset:Z,width:i,height:u,anchor:n,textBoxScale:p,prevAnchor:re},this.markUsedJustification(j,n,V,Y),j.allowVerticalPlacement&&(this.markUsedOrientation(j,Y,V),this.placedOrientations[V.crossTileID]=Y),{shift:te,placedGlyphBoxes:ae}):void 0},En.prototype.placeLayerBucketPart=function(n,o,i){var u=this,p=n.parameters,f=p.bucket,d=p.layout,x=p.posMatrix,A=p.textLabelPlaneMatrix,R=p.labelToScreenMatrix,q=p.textPixelRatio,V=p.holdingForFade,j=p.collisionBoxArray,Y=p.partiallyEvaluatedTextSize,J=p.collisionGroup,re=d.get("text-optional"),Z=d.get("icon-optional"),te=d.get("text-allow-overlap"),ae=d.get("icon-allow-overlap"),fe=d.get("text-rotation-alignment")==="map",Se=d.get("text-pitch-alignment")==="map",_e=d.get("icon-text-fit")!=="none",Ie=d.get("symbol-z-order")==="viewport-y",Me=te&&(ae||!f.hasIconData()||Z),Be=ae&&(te||!f.hasTextData()||re);!f.collisionArrays&&j&&f.deserializeCollisionBoxes(j);var Oe=function(Je,_t){if(!o[Je.crossTileID])if(V)u.placements[Je.crossTileID]=new Qu(!1,!1,!1);else{var Et,gt=!1,vt=!1,St=!0,mt=null,ft={box:null,offscreen:null},Yr={box:null,offscreen:null},Pr=null,bn=null,cn=0,Ir=0,Or=0;_t.textFeatureIndex?cn=_t.textFeatureIndex:Je.useRuntimeCollisionCircles&&(cn=Je.featureIndex),_t.verticalTextFeatureIndex&&(Ir=_t.verticalTextFeatureIndex);var Zn=_t.textBox;if(Zn){var Pn=function(Zt){var Qn=a.WritingMode.horizontal;if(f.allowVerticalPlacement&&!Zt&&u.prevPlacement){var On=u.prevPlacement.placedOrientations[Je.crossTileID];On&&(u.placedOrientations[Je.crossTileID]=On,u.markUsedOrientation(f,Qn=On,Je))}return Qn},no=function(Zt,Qn){if(f.allowVerticalPlacement&&Je.numVerticalGlyphVertices>0&&_t.verticalTextBox)for(var On=0,zo=f.writingModes;On<zo.length&&(zo[On]===a.WritingMode.vertical?(ft=Qn(),Yr=ft):ft=Zt(),!(ft&&ft.box&&ft.box.length));On+=1);else ft=Zt()};if(d.get("text-variable-anchor")){var Dn=d.get("text-variable-anchor");if(u.prevPlacement&&u.prevPlacement.variableOffsets[Je.crossTileID]){var xi=u.prevPlacement.variableOffsets[Je.crossTileID];Dn.indexOf(xi.anchor)>0&&(Dn=Dn.filter((function(Zt){return Zt!==xi.anchor}))).unshift(xi.anchor)}var li=function(Zt,Qn,On){for(var zo=Zt.x2-Zt.x1,Vc=Zt.y2-Zt.y1,ds=Je.textBoxScale,jc=_e&&!ae?Qn:null,Da={box:[],offscreen:!1},Ml=te?2*Dn.length:Dn.length,ia=0;ia<Ml;++ia){var ys=u.attemptAnchorPlacement(Dn[ia%Dn.length],Zt,zo,Vc,ds,fe,Se,q,x,J,ia>=Dn.length,Je,f,On,jc);if(ys&&(Da=ys.placedGlyphBoxes)&&Da.box&&Da.box.length){gt=!0,mt=ys.shift;break}}return Da};no((function(){return li(Zn,_t.iconBox,a.WritingMode.horizontal)}),(function(){var Zt=_t.verticalTextBox;return f.allowVerticalPlacement&&!(ft&&ft.box&&ft.box.length)&&Je.numVerticalGlyphVertices>0&&Zt?li(Zt,_t.verticalIconBox,a.WritingMode.vertical):{box:null,offscreen:null}})),ft&&(gt=ft.box,St=ft.offscreen);var Ra=Pn(ft&&ft.box);if(!gt&&u.prevPlacement){var ra=u.prevPlacement.variableOffsets[Je.crossTileID];ra&&(u.variableOffsets[Je.crossTileID]=ra,u.markUsedJustification(f,ra.anchor,Je,Ra))}}else{var io=function(Zt,Qn){var On=u.collisionIndex.placeCollisionBox(Zt,te,q,x,J.predicate);return On&&On.box&&On.box.length&&(u.markUsedOrientation(f,Qn,Je),u.placedOrientations[Je.crossTileID]=Qn),On};no((function(){return io(Zn,a.WritingMode.horizontal)}),(function(){var Zt=_t.verticalTextBox;return f.allowVerticalPlacement&&Je.numVerticalGlyphVertices>0&&Zt?io(Zt,a.WritingMode.vertical):{box:null,offscreen:null}})),Pn(ft&&ft.box&&ft.box.length)}}if(gt=(Et=ft)&&Et.box&&Et.box.length>0,St=Et&&Et.offscreen,Je.useRuntimeCollisionCircles){var na=f.text.placedSymbolArray.get(Je.centerJustifiedTextSymbolIndex),za=a.evaluateSizeForFeature(f.textSizeData,Y,na),Ii=d.get("text-padding");Pr=u.collisionIndex.placeCollisionCircles(te,na,f.lineVertexArray,f.glyphOffsetArray,za,x,A,R,i,Se,J.predicate,Je.collisionCircleDiameter,Ii),gt=te||Pr.circles.length>0&&!Pr.collisionDetected,St=St&&Pr.offscreen}if(_t.iconFeatureIndex&&(Or=_t.iconFeatureIndex),_t.iconBox){var La=function(Zt){var Qn=_e&&mt?bi(Zt,mt.x,mt.y,fe,Se,u.transform.angle):Zt;return u.collisionIndex.placeCollisionBox(Qn,ae,q,x,J.predicate)};vt=Yr&&Yr.box&&Yr.box.length&&_t.verticalIconBox?(bn=La(_t.verticalIconBox)).box.length>0:(bn=La(_t.iconBox)).box.length>0,St=St&&bn.offscreen}var Ei=re||Je.numHorizontalGlyphVertices===0&&Je.numVerticalGlyphVertices===0,Qr=Z||Je.numIconVertices===0;if(Ei||Qr?Qr?Ei||(vt=vt&&gt):gt=vt&&gt:vt=gt=vt&&gt,gt&&Et&&Et.box&&u.collisionIndex.insertCollisionBox(Et.box,d.get("text-ignore-placement"),f.bucketInstanceId,Yr&&Yr.box&&Ir?Ir:cn,J.ID),vt&&bn&&u.collisionIndex.insertCollisionBox(bn.box,d.get("icon-ignore-placement"),f.bucketInstanceId,Or,J.ID),Pr&&(gt&&u.collisionIndex.insertCollisionCircles(Pr.circles,d.get("text-ignore-placement"),f.bucketInstanceId,cn,J.ID),i)){var Oi=f.bucketInstanceId,oo=u.collisionCircleArrays[Oi];oo===void 0&&(oo=u.collisionCircleArrays[Oi]=new ii);for(var Ro=0;Ro<Pr.circles.length;Ro+=4)oo.circles.push(Pr.circles[Ro+0]),oo.circles.push(Pr.circles[Ro+1]),oo.circles.push(Pr.circles[Ro+2]),oo.circles.push(Pr.collisionDetected?1:0)}u.placements[Je.crossTileID]=new Qu(gt||Me,vt||Be,St||f.justReloaded),o[Je.crossTileID]=!0}};if(Ie)for(var Ke=f.getSortedSymbolIndexes(this.transform.angle),st=Ke.length-1;st>=0;--st){var ht=Ke[st];Oe(f.symbolInstances.get(ht),f.collisionArrays[ht])}else for(var ct=n.symbolInstanceStart;ct<n.symbolInstanceEnd;ct++)Oe(f.symbolInstances.get(ct),f.collisionArrays[ct]);if(i&&f.bucketInstanceId in this.collisionCircleArrays){var Ft=this.collisionCircleArrays[f.bucketInstanceId];a.invert(Ft.invProjMatrix,x),Ft.viewportMatrix=this.collisionIndex.getViewportMatrix()}f.justReloaded=!1},En.prototype.markUsedJustification=function(n,o,i,u){var p;p=u===a.WritingMode.vertical?i.verticalPlacedTextSymbolIndex:{left:i.leftJustifiedTextSymbolIndex,center:i.centerJustifiedTextSymbolIndex,right:i.rightJustifiedTextSymbolIndex}[a.getAnchorJustification(o)];for(var f=0,d=[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex,i.verticalPlacedTextSymbolIndex];f<d.length;f+=1){var x=d[f];x>=0&&(n.text.placedSymbolArray.get(x).crossTileID=p>=0&&x!==p?0:i.crossTileID)}},En.prototype.markUsedOrientation=function(n,o,i){for(var u=o===a.WritingMode.horizontal||o===a.WritingMode.horizontalOnly?o:0,p=o===a.WritingMode.vertical?o:0,f=0,d=[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex];f<d.length;f+=1)n.text.placedSymbolArray.get(d[f]).placedOrientation=u;i.verticalPlacedTextSymbolIndex&&(n.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).placedOrientation=p)},En.prototype.commit=function(n){this.commitTime=n,this.zoomAtLastRecencyCheck=this.transform.zoom;var o=this.prevPlacement,i=!1;this.prevZoomAdjustment=o?o.zoomAdjustment(this.transform.zoom):0;var u=o?o.symbolFadeChange(n):1,p=o?o.opacities:{},f=o?o.variableOffsets:{},d=o?o.placedOrientations:{};for(var x in this.placements){var A=this.placements[x],R=p[x];R?(this.opacities[x]=new Kn(R,u,A.text,A.icon),i=i||A.text!==R.text.placed||A.icon!==R.icon.placed):(this.opacities[x]=new Kn(null,u,A.text,A.icon,A.skipFade),i=i||A.text||A.icon)}for(var q in p){var V=p[q];if(!this.opacities[q]){var j=new Kn(V,u,!1,!1);j.isHidden()||(this.opacities[q]=j,i=i||V.text.placed||V.icon.placed)}}for(var Y in f)this.variableOffsets[Y]||!this.opacities[Y]||this.opacities[Y].isHidden()||(this.variableOffsets[Y]=f[Y]);for(var J in d)this.placedOrientations[J]||!this.opacities[J]||this.opacities[J].isHidden()||(this.placedOrientations[J]=d[J]);i?this.lastPlacementChangeTime=n:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=o?o.lastPlacementChangeTime:n)},En.prototype.updateLayerOpacities=function(n,o){for(var i={},u=0,p=o;u<p.length;u+=1){var f=p[u],d=f.getBucket(n);d&&f.latestFeatureIndex&&n.id===d.layerIds[0]&&this.updateBucketOpacities(d,i,f.collisionBoxArray)}},En.prototype.updateBucketOpacities=function(n,o,i){var u=this;n.hasTextData()&&n.text.opacityVertexArray.clear(),n.hasIconData()&&n.icon.opacityVertexArray.clear(),n.hasIconCollisionBoxData()&&n.iconCollisionBox.collisionVertexArray.clear(),n.hasTextCollisionBoxData()&&n.textCollisionBox.collisionVertexArray.clear();var p=n.layers[0].layout,f=new Kn(null,0,!1,!1,!0),d=p.get("text-allow-overlap"),x=p.get("icon-allow-overlap"),A=p.get("text-variable-anchor"),R=p.get("text-rotation-alignment")==="map",q=p.get("text-pitch-alignment")==="map",V=p.get("icon-text-fit")!=="none",j=new Kn(null,0,d&&(x||!n.hasIconData()||p.get("icon-optional")),x&&(d||!n.hasTextData()||p.get("text-optional")),!0);!n.collisionArrays&&i&&(n.hasIconCollisionBoxData()||n.hasTextCollisionBoxData())&&n.deserializeCollisionBoxes(i);for(var Y=function(te,ae,fe){for(var Se=0;Se<ae/4;Se++)te.opacityVertexArray.emplaceBack(fe)},J=function(te){var ae=n.symbolInstances.get(te),fe=ae.numHorizontalGlyphVertices,Se=ae.numVerticalGlyphVertices,_e=ae.crossTileID,Ie=u.opacities[_e];o[_e]?Ie=f:Ie||(u.opacities[_e]=Ie=j),o[_e]=!0;var Me=ae.numIconVertices>0,Be=u.placedOrientations[ae.crossTileID],Oe=Be===a.WritingMode.vertical,Ke=Be===a.WritingMode.horizontal||Be===a.WritingMode.horizontalOnly;if(fe>0||Se>0){var st=rl(Ie.text);Y(n.text,fe,Oe?$o:st),Y(n.text,Se,Ke?$o:st);var ht=Ie.text.isHidden();[ae.rightJustifiedTextSymbolIndex,ae.centerJustifiedTextSymbolIndex,ae.leftJustifiedTextSymbolIndex].forEach((function(ft){ft>=0&&(n.text.placedSymbolArray.get(ft).hidden=ht||Oe?1:0)})),ae.verticalPlacedTextSymbolIndex>=0&&(n.text.placedSymbolArray.get(ae.verticalPlacedTextSymbolIndex).hidden=ht||Ke?1:0);var ct=u.variableOffsets[ae.crossTileID];ct&&u.markUsedJustification(n,ct.anchor,ae,Be);var Ft=u.placedOrientations[ae.crossTileID];Ft&&(u.markUsedJustification(n,"left",ae,Ft),u.markUsedOrientation(n,Ft,ae))}if(Me){var Je=rl(Ie.icon),_t=!(V&&ae.verticalPlacedIconSymbolIndex&&Oe);ae.placedIconSymbolIndex>=0&&(Y(n.icon,ae.numIconVertices,_t?Je:$o),n.icon.placedSymbolArray.get(ae.placedIconSymbolIndex).hidden=Ie.icon.isHidden()),ae.verticalPlacedIconSymbolIndex>=0&&(Y(n.icon,ae.numVerticalIconVertices,_t?$o:Je),n.icon.placedSymbolArray.get(ae.verticalPlacedIconSymbolIndex).hidden=Ie.icon.isHidden())}if(n.hasIconCollisionBoxData()||n.hasTextCollisionBoxData()){var Et=n.collisionArrays[te];if(Et){var gt=new a.Point(0,0);if(Et.textBox||Et.verticalTextBox){var vt=!0;if(A){var St=u.variableOffsets[_e];St?(gt=vn(St.anchor,St.width,St.height,St.textOffset,St.textBoxScale),R&&gt._rotate(q?u.transform.angle:-u.transform.angle)):vt=!1}Et.textBox&&yo(n.textCollisionBox.collisionVertexArray,Ie.text.placed,!vt||Oe,gt.x,gt.y),Et.verticalTextBox&&yo(n.textCollisionBox.collisionVertexArray,Ie.text.placed,!vt||Ke,gt.x,gt.y)}var mt=!!(!Ke&&Et.verticalIconBox);Et.iconBox&&yo(n.iconCollisionBox.collisionVertexArray,Ie.icon.placed,mt,V?gt.x:0,V?gt.y:0),Et.verticalIconBox&&yo(n.iconCollisionBox.collisionVertexArray,Ie.icon.placed,!mt,V?gt.x:0,V?gt.y:0)}}},re=0;re<n.symbolInstances.length;re++)J(re);if(n.sortFeatures(this.transform.angle),this.retainedQueryData[n.bucketInstanceId]&&(this.retainedQueryData[n.bucketInstanceId].featureSortOrder=n.featureSortOrder),n.hasTextData()&&n.text.opacityVertexBuffer&&n.text.opacityVertexBuffer.updateData(n.text.opacityVertexArray),n.hasIconData()&&n.icon.opacityVertexBuffer&&n.icon.opacityVertexBuffer.updateData(n.icon.opacityVertexArray),n.hasIconCollisionBoxData()&&n.iconCollisionBox.collisionVertexBuffer&&n.iconCollisionBox.collisionVertexBuffer.updateData(n.iconCollisionBox.collisionVertexArray),n.hasTextCollisionBoxData()&&n.textCollisionBox.collisionVertexBuffer&&n.textCollisionBox.collisionVertexBuffer.updateData(n.textCollisionBox.collisionVertexArray),n.bucketInstanceId in this.collisionCircleArrays){var Z=this.collisionCircleArrays[n.bucketInstanceId];n.placementInvProjMatrix=Z.invProjMatrix,n.placementViewportMatrix=Z.viewportMatrix,n.collisionCircleArray=Z.circles,delete this.collisionCircleArrays[n.bucketInstanceId]}},En.prototype.symbolFadeChange=function(n){return this.fadeDuration===0?1:(n-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},En.prototype.zoomAdjustment=function(n){return Math.max(0,(this.transform.zoom-n)/1.5)},En.prototype.hasTransitions=function(n){return this.stale||n-this.lastPlacementChangeTime<this.fadeDuration},En.prototype.stillRecent=function(n,o){var i=this.zoomAtLastRecencyCheck===o?1-this.zoomAdjustment(o):1;return this.zoomAtLastRecencyCheck=o,this.commitTime+this.fadeDuration*i>n},En.prototype.setStale=function(){this.stale=!0};var Pc=Math.pow(2,25),Mc=Math.pow(2,24),Ks=Math.pow(2,17),kc=Math.pow(2,16),el=Math.pow(2,9),Rc=Math.pow(2,8),tl=Math.pow(2,1);function rl(n){if(n.opacity===0&&!n.placed)return 0;if(n.opacity===1&&n.placed)return 4294967295;var o=n.placed?1:0,i=Math.floor(127*n.opacity);return i*Pc+o*Mc+i*Ks+o*kc+i*el+o*Rc+i*tl+o}var $o=0,Js=function(n){this._sortAcrossTiles=n.layout.get("symbol-z-order")!=="viewport-y"&&n.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Js.prototype.continuePlacement=function(n,o,i,u,p){for(var f=this._bucketParts;this._currentTileIndex<n.length;)if(o.getBucketParts(f,u,n[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,p())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,f.sort((function(d,x){return d.sortKey-x.sortKey})));this._currentPartIndex<f.length;)if(o.placeLayerBucketPart(f[this._currentPartIndex],this._seenCrossTileIDs,i),this._currentPartIndex++,p())return!0;return!1};var ya=function(n,o,i,u,p,f,d){this.placement=new En(n,p,f,d),this._currentPlacementIndex=o.length-1,this._forceFullPlacement=i,this._showCollisionBoxes=u,this._done=!1};ya.prototype.isDone=function(){return this._done},ya.prototype.continuePlacement=function(n,o,i){for(var u=this,p=a.browser.now(),f=function(){var A=a.browser.now()-p;return!u._forceFullPlacement&&A>2};this._currentPlacementIndex>=0;){var d=o[n[this._currentPlacementIndex]],x=this.placement.collisionIndex.transform.zoom;if(d.type==="symbol"&&(!d.minzoom||d.minzoom<=x)&&(!d.maxzoom||d.maxzoom>x)){if(this._inProgressLayer||(this._inProgressLayer=new Js(d)),this._inProgressLayer.continuePlacement(i[d.source],this.placement,this._showCollisionBoxes,d,f))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ya.prototype.commit=function(n){return this.placement.commit(n),this.placement};var nl=512/a.EXTENT/2,Xa=function(n,o,i){this.tileID=n,this.indexedSymbolInstances={},this.bucketInstanceId=i;for(var u=0;u<o.length;u++){var p=o.get(u),f=p.key;this.indexedSymbolInstances[f]||(this.indexedSymbolInstances[f]=[]),this.indexedSymbolInstances[f].push({crossTileID:p.crossTileID,coord:this.getScaledCoordinates(p,n)})}};Xa.prototype.getScaledCoordinates=function(n,o){var i=nl/Math.pow(2,o.canonical.z-this.tileID.canonical.z);return{x:Math.floor((o.canonical.x*a.EXTENT+n.anchorX)*i),y:Math.floor((o.canonical.y*a.EXTENT+n.anchorY)*i)}},Xa.prototype.findMatches=function(n,o,i){for(var u=this.tileID.canonical.z<o.canonical.z?1:Math.pow(2,this.tileID.canonical.z-o.canonical.z),p=0;p<n.length;p++){var f=n.get(p);if(!f.crossTileID){var d=this.indexedSymbolInstances[f.key];if(d)for(var x=this.getScaledCoordinates(f,o),A=0,R=d;A<R.length;A+=1){var q=R[A];if(Math.abs(q.coord.x-x.x)<=u&&Math.abs(q.coord.y-x.y)<=u&&!i[q.crossTileID]){i[q.crossTileID]=!0,f.crossTileID=q.crossTileID;break}}}}};var oi=function(){this.maxCrossTileID=0};oi.prototype.generate=function(){return++this.maxCrossTileID};var ji=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};ji.prototype.handleWrapJump=function(n){var o=Math.round((n-this.lng)/360);if(o!==0)for(var i in this.indexes){var u=this.indexes[i],p={};for(var f in u){var d=u[f];d.tileID=d.tileID.unwrapTo(d.tileID.wrap+o),p[d.tileID.key]=d}this.indexes[i]=p}this.lng=n},ji.prototype.addBucket=function(n,o,i){if(this.indexes[n.overscaledZ]&&this.indexes[n.overscaledZ][n.key]){if(this.indexes[n.overscaledZ][n.key].bucketInstanceId===o.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(n.overscaledZ,this.indexes[n.overscaledZ][n.key])}for(var u=0;u<o.symbolInstances.length;u++)o.symbolInstances.get(u).crossTileID=0;this.usedCrossTileIDs[n.overscaledZ]||(this.usedCrossTileIDs[n.overscaledZ]={});var p=this.usedCrossTileIDs[n.overscaledZ];for(var f in this.indexes){var d=this.indexes[f];if(Number(f)>n.overscaledZ)for(var x in d){var A=d[x];A.tileID.isChildOf(n)&&A.findMatches(o.symbolInstances,n,p)}else{var R=d[n.scaledTo(Number(f)).key];R&&R.findMatches(o.symbolInstances,n,p)}}for(var q=0;q<o.symbolInstances.length;q++){var V=o.symbolInstances.get(q);V.crossTileID||(V.crossTileID=i.generate(),p[V.crossTileID]=!0)}return this.indexes[n.overscaledZ]===void 0&&(this.indexes[n.overscaledZ]={}),this.indexes[n.overscaledZ][n.key]=new Xa(n,o.symbolInstances,o.bucketInstanceId),!0},ji.prototype.removeBucketCrossTileIDs=function(n,o){for(var i in o.indexedSymbolInstances)for(var u=0,p=o.indexedSymbolInstances[i];u<p.length;u+=1)delete this.usedCrossTileIDs[n][p[u].crossTileID]},ji.prototype.removeStaleBuckets=function(n){var o=!1;for(var i in this.indexes){var u=this.indexes[i];for(var p in u)n[u[p].bucketInstanceId]||(this.removeBucketCrossTileIDs(i,u[p]
1),delete u[p],o=!0)}return o};var Gi=function(){this.layerIndexes={},this.crossTileIDs=new oi,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Gi.prototype.addLayer=function(n,o,i){var u=this.layerIndexes[n.id];u===void 0&&(u=this.layerIndexes[n.id]=new ji);var p=!1,f={};u.handleWrapJump(i);for(var d=0,x=o;d<x.length;d+=1){var A=x[d],R=A.getBucket(n);R&&n.id===R.layerIds[0]&&(R.bucketInstanceId||(R.bucketInstanceId=++this.maxBucketInstanceId),u.addBucket(A.tileID,R,this.crossTileIDs)&&(p=!0),f[R.bucketInstanceId]=!0)}return u.removeStaleBuckets(f)&&(p=!0),p},Gi.prototype.pruneUnusedLayers=function(n){var o={};for(var i in n.forEach((function(u){o[u]=!0})),this.layerIndexes)o[i]||delete this.layerIndexes[i]};var mo=function(n,o){return a.emitValidationErrors(n,o&&o.filter((function(i){return i.identifier!=="source.canvas"})))},$i=a.pick(Ne,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Zi=a.pick(Ne,["setCenter","setZoom","setBearing","setPitch"]),Ha=(function(){var n={},o=a.styleSpec.$version;for(var i in a.styleSpec.$root){var u,p=a.styleSpec.$root[i];p.required&&(u=i==="version"?o:p.type==="array"?[]:{})!=null&&(n[i]=u)}return n})(),qn=(function(n){function o(i,u){var p=this;u===void 0&&(u={}),n.call(this),this.map=i,this.dispatcher=new nt(Ee(),this),this.imageManager=new ce,this.imageManager.setEventedParent(this),this.glyphManager=new Re(i._requestManager,u.localIdeographFontFamily),this.lineAtlas=new pt(256,512),this.crossTileSymbolIndex=new Gi,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",a.getReferrer());var f=this;this._rtlTextPluginCallback=o.registerForPluginStateChange((function(d){f.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:d.pluginStatus,pluginURL:d.pluginURL},(function(x,A){if(a.triggerPluginCompletionEvent(x),A&&A.every((function(q){return q})))for(var R in f.sourceCaches)f.sourceCaches[R].reload()}))})),this.on("data",(function(d){if(d.dataType==="source"&&d.sourceDataType==="metadata"){var x=p.sourceCaches[d.sourceId];if(x){var A=x.getSource();if(A&&A.vectorLayerIds)for(var R in p._layers){var q=p._layers[R];q.source===A.id&&p._validateLayer(q)}}}}))}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.loadURL=function(i,u){var p=this;u===void 0&&(u={}),this.fire(new a.Event("dataloading",{dataType:"style"}));var f=typeof u.validate=="boolean"?u.validate:!a.isMapboxURL(i);i=this.map._requestManager.normalizeStyleURL(i,u.accessToken);var d=this.map._requestManager.transformRequest(i,a.ResourceType.Style);this._request=a.getJSON(d,(function(x,A){p._request=null,x?p.fire(new a.ErrorEvent(x)):A&&p._load(A,f)}))},o.prototype.loadJSON=function(i,u){var p=this;u===void 0&&(u={}),this.fire(new a.Event("dataloading",{dataType:"style"})),this._request=a.browser.frame((function(){p._request=null,p._load(i,u.validate!==!1)}))},o.prototype.loadEmpty=function(){this.fire(new a.Event("dataloading",{dataType:"style"})),this._load(Ha,!1)},o.prototype._load=function(i,u){if(!u||!mo(this,a.validateStyle(i))){for(var p in this._loaded=!0,this.stylesheet=i,i.sources)this.addSource(p,i.sources[p],{validate:!1});i.sprite?this._loadSprite(i.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(i.glyphs);var f=qe(this.stylesheet.layers);this._order=f.map((function(R){return R.id})),this._layers={},this._serializedLayers={};for(var d=0,x=f;d<x.length;d+=1){var A=x[d];(A=a.createStyleLayer(A)).setEventedParent(this,{layer:{id:A.id}}),this._layers[A.id]=A,this._serializedLayers[A.id]=A.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new rt(this.stylesheet.light),this.fire(new a.Event("data",{dataType:"style"})),this.fire(new a.Event("style.load"))}},o.prototype._loadSprite=function(i){var u=this;this._spriteRequest=(function(p,f,d){var x,A,R,q=a.browser.devicePixelRatio>1?"@2x":"",V=a.getJSON(f.transformRequest(f.normalizeSpriteURL(p,q,".json"),a.ResourceType.SpriteJSON),(function(J,re){V=null,R||(R=J,x=re,Y(
1))})),j=a.getImage(f.transformRequest(f.normalizeSpriteURL(p,q,".png"),a.ResourceType.SpriteImage),(function(J,re){j=null,R||(R=J,A=re,Y())}));function Y(){if(R)d(R);else if(x&&A){var J=a.browser.getImageData(A),re={};for(var Z in x){var te=x[Z],ae=te.width,fe=te.height,Se=te.x,_e=te.y,Ie=te.sdf,Me=te.pixelRatio,Be=te.stretchX,Oe=te.stretchY,Ke=te.content,st=new a.RGBAImage({width:ae,height:fe});a.RGBAImage.copy(J,st,{x:Se,y:_e},{x:0,y:0},{width:ae,height:fe}),re[Z]={data:st,pixelRatio:Me,sdf:Ie,stretchX:Be,stretchY:Oe,content:Ke}}d(null,re)}}return{cancel:function(){V&&(V.cancel(),V=null),j&&(j.cancel(),j=null)}}})(i,this.map._requestManager,(function(p,f){if(u._spriteRequest=null,p)u.fire(new a.ErrorEvent(p));else if(f)for(var d in f)u.imageManager.addImage(d,f[d]);u.imageManager.setLoaded(!0),u._availableImages=u.imageManager.listImages(),u.dispatcher.broadcast("setImages",u._availableImages),u.fire(new a.Event("data",{dataType:"style"}))}))},o.prototype._validateLayer=function(i){var u=this.sourceCaches[i.source];if(u){var p=i.sourceLayer;if(p){var f=u.getSource();(f.type==="geojson"||f.vectorLayerIds&&f.vectorLayerIds.indexOf(p)===-1)&&this.fire(new a.ErrorEvent(new Error('Source layer "'+p+'" does not exist on source "'+f.id+'" as specified by style layer "'+i.id+'"')))}}},o.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var i in this.sourceCaches)if(!this.sourceCaches[i].loaded())return!1;return!!this.imageManager.isLoaded()},o.prototype._serializeLayers=function(i){for(var u=[],p=0,f=i;p<f.length;p+=1){var d=this._layers[f[p]];d.type!=="custom"&&u.push(d.serialize())}return u},o.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var i in this.sourceCaches)if(this.sourceCaches[i].hasTransition())return!0;for(var u in this._layers)if(this._layers[u].hasTransition())return!0;return!1},o.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},o.prototype.update=function(i){if(this._loaded){var u=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 x=this._updatedSources[d];x==="reload"?this._reloadSource(d):x==="clear"&&this._clearSource(d)}for(var A in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[A].updateTransitions(i);this.light.updateTransitions(i),this._resetUpdates()}var R={};for(var q in this.sourceCaches){var V=this.sourceCaches[q];R[q]=V.used,V.used=!1}for(var j=0,Y=this._order;j<Y.length;j+=1){var J=this._layers[Y[j]];J.recalculate(i,this._availableImages),!J.isHidden(i.zoom)&&J.source&&(this.sourceCaches[J.source].used=!0)}for(var re in R){var Z=this.sourceCaches[re];R[re]!==Z.used&&Z.fire(new a.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:re}))}this.light.recalculate(i),this.z=i.zoom,u&&this.fire(new a.Event("data",{dataType:"style"}))}},o.prototype._updateTilesForChangedImages=function(){var i=Object.keys(this._changedImages);if(i.length){for(var u in this.sourceCaches)this.sourceCaches[u].reloadTilesForDependencies(["icons","patterns"],i);this._changedImages={}}},o.prototype._updateWorkerLayers=function(i,u){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(i),removedIds:u})},o.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},o.prototype.setState=function(i){var u=this;if(this._checkLoaded(),mo(this,a.validateStyle(i)))return!1;(i=a.clone$1(i)).layers=qe(i.layers);var p=(function(d,x){if(!d)return[{command:Ne.setStyle,args:[x]}];var A=[];try{if(!a.deepEqual(d.version,x.version))return[{command:Ne.setStyle,args:[x]}];a.deepEqual(d.center,x.center)||A.push({command:Ne.setCenter,args:[x.center]}),a.deepEqual(d.zoom,x.zoom)||A.push({command:Ne.setZoom,args:[x.zoom]}),a.deepEqual(d.bearing,x.bearing)||A.push({command:Ne.setBearing,args:[x.bearing]}),a.deepEqual(d.pitch,x.pitch)||A.push({command:Ne.setPitch,args:[x.pitch]}),a.deepEqual(d.sprite,x.sprite)||A.push({command:Ne.setSprite,args:[x.sprite]}),a.deepEqual(d.glyphs,x.glyphs)||A.push({command:Ne.setGlyphs,args:[x.glyphs]}),a.deepEqual(d.transition,x.transition)||A.push({command:Ne.setTransition,args:[x.transition]}),a.deepEqual(d.light,x.light)||A.push({command:Ne.setLight,args:[x.light]});var R={},q=[];(function(j,Y,J,re){var Z;for(Z in Y=Y||{},j=j||{})j.hasOwnProperty(Z)&&(Y.hasOwnProperty(Z)||Ge(Z,J,re));for(Z in Y)Y.hasOwnProperty(Z)&&(j.hasOwnProperty(Z)?a.deepEqual(j[Z],Y[Z])||(j[Z].type==="geojson"&&Y[Z].type==="geojson"&&ar(j,Y,Z)?J.push({command:Ne.setGeoJSONSourceData,args:[Z,Y[Z].data]}):Pt(Z,Y,J,re)):xt(Z,Y,J))})(d.sources,x.sources,q,R);var V=[];
1d.layers&&d.layers.forEach((function(j){R[j.source]?A.push({command:Ne.removeLayer,args:[j.id]}):V.push(j)})),A=A.concat(q),(function(j,Y,J){Y=Y||[];var re,Z,te,ae,fe,Se,_e,Ie=(j=j||[]).map(Gt),Me=Y.map(Gt),Be=j.reduce(Ot,{}),Oe=Y.reduce(Ot,{}),Ke=Ie.slice(),st=Object.create(null);for(re=0,Z=0;re<Ie.length;re++)Oe.hasOwnProperty(te=Ie[re])?Z++:(J.push({command:Ne.removeLayer,args:[te]}),Ke.splice(Ke.indexOf(te,Z),1));for(re=0,Z=0;re<Me.length;re++)Ke[Ke.length-1-re]!==(te=Me[Me.length-1-re])&&(Be.hasOwnProperty(te)?(J.push({command:Ne.removeLayer,args:[te]}),Ke.splice(Ke.lastIndexOf(te,Ke.length-Z),1)):Z++,J.push({command:Ne.addLayer,args:[Oe[te],Se=Ke[Ke.length-re]]}),Ke.splice(Ke.length-re,0,te),st[te]=!0);for(re=0;re<Me.length;re++)if(ae=Be[te=Me[re]],fe=Oe[te],!st[te]&&!a.deepEqual(ae,fe))if(a.deepEqual(ae.source,fe.source)&&a.deepEqual(ae["source-layer"],fe["source-layer"])&&a.deepEqual(ae.type,fe.type)){for(_e in Mt(ae.layout,fe.layout,J,te,null,Ne.setLayoutProperty),Mt(ae.paint,fe.paint,J,te,null,Ne.setPaintProperty),a.deepEqual(ae.filter,fe.filter)||J.push({command:Ne.setFilter,args:[te,fe.filter]}),a.deepEqual(ae.minzoom,fe.minzoom)&&a.deepEqual(ae.maxzoom,fe.maxzoom)||J.push({command:Ne.setLayerZoomRange,args:[te,fe.minzoom,fe.maxzoom]}),ae)ae.hasOwnProperty(_e)&&_e!=="layout"&&_e!=="paint"&&_e!=="filter"&&_e!=="metadata"&&_e!=="minzoom"&&_e!=="maxzoom"&&(_e.indexOf("paint.")===0?Mt(ae[_e],fe[_e],J,te,_e.slice(6),Ne.setPaintProperty):a.deepEqual(ae[_e],fe[_e])||J.push({command:Ne.setLayerProperty,args:[te,_e,fe[_e]]}));for(_e in fe)fe.hasOwnProperty(_e)&&!ae.hasOwnProperty(_e)&&_e!=="layout"&&_e!=="paint"&&_e!=="filter"&&_e!=="metadata"&&_e!=="minzoom"&&_e!=="maxzoom"&&(_e.indexOf("paint.")===0?Mt(ae[_e],fe[_e],J,te,_e.slice(6),Ne.setPaintProperty):a.deepEqual(ae[_e],fe[_e])||J.push({command:Ne.setLayerProperty,args:[te,_e,fe[_e]]}))}else J.push({command:Ne.removeLayer,args:[te]}),Se=Ke[Ke.lastIndexOf(te)+1],J.push({command:Ne.addLayer,args:[fe,Se]})})(V,x.layers,A)}catch(j){console.warn("Unable to compute style diff:",j),A=[{command:Ne.setStyle,args:[x]}]}return A})(this.serialize(),i).filter((function(d){return!(d.command in Zi)}));if(p.length===0)return!1;var f=p.filter((function(d){return!(d.command in $i)}));if(f.length>0)throw new Error("Unimplemented: "+f.map((function(d){return d.command})).join(", ")+".");return p.forEach((function(d){d.command!=="setTransition"&&u[d.command].apply(u,d.args)})),this.stylesheet=i,!0},o.prototype.addImage=function(i,u){if(this.getImage(i))return this.fire(new a.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(i,u),this._afterImageUpdated(i)},o.prototype.updateImage=function(i,u){this.imageManager.updateImage(i,u)},o.prototype.getImage=function(i){return this.imageManager.getImage(i)},o.prototype.removeImage=function(i){if(!this.getImage(i))return this.fire(new a.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(i),this._afterImageUpdated(i)},o.prototype._afterImageUpdated=function(i){this._availableImages=this.imageManager.listImages(),this._changedImages[i]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new a.Event("data",{dataType:"style"}))},o.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},o.prototype.addSource=function(i,u,p){var f=this;if(p===void 0&&(p={}),this._checkLoaded(),this.sourceCaches[i]!==void 0)throw new Error("There is already a source with this ID");if(!u.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(u).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(u.type)>=0&&this._validate(a.validateStyle.source,"sources."+i,u,null,p))){this.map&&this.map._collectResourceTiming&&(u.collectResourceTiming=!0);var d=this.sourceCaches[i]=new Q(i,u,this.dispatcher);d.style=this,d.setEventedParent(this,(function(){return{isSourceLoaded:f.loaded(),source:d.serialize(),sourceId:i}})),d.onAdd(this.map),this._changed=!0}},o.prototype.removeSource=function(i){if(this._checkLoaded(),this.sourceCaches[i]===void 0)throw new Error("There is no source with this ID");for(var u in this._layers)if(this._layers[u].source===i)return this.fire(new a.ErrorEvent(new Error('Source "'+i+'" cannot be removed while layer "'+u+'" is using it.')));var p=this.sourceCaches[i];delete this.sourceCaches[i],delete this._updatedSources[i],p.fire(new a.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:i})),p.setEventedParent(null),p.clearTiles(),p.onRemove&&p.onRemove(this.map),this._changed=!0},o.prototype.setGeoJSONSourceData=function(i,u){this._checkLoaded(),this.sourceCaches[i].getSource().setData(u),this._changed=!0},o.prototype.getSource=function(i){return this.sourceCaches[i]&&this.sourceCaches[i].getSource()},o.prototype.addLayer=function(i,u,p){p===void 0&&(p={}),this._checkLoaded();var f=i.id;if(this.getLayer(f))this.fire(new a.ErrorEvent(new Error('Layer with i
1d "'+f+'" already exists on this map')));else{var d;if(i.type==="custom"){if(mo(this,a.validateCustomStyleLayer(i)))return;d=a.createStyleLayer(i)}else{if(typeof i.source=="object"&&(this.addSource(f,i.source),i=a.clone$1(i),i=a.extend(i,{source:f})),this._validate(a.validateStyle.layer,"layers."+f,i,{arrayIndex:-1},p))return;d=a.createStyleLayer(i),this._validateLayer(d),d.setEventedParent(this,{layer:{id:f}}),this._serializedLayers[d.id]=d.serialize()}var x=u?this._order.indexOf(u):this._order.length;if(u&&x===-1)this.fire(new a.ErrorEvent(new Error('Layer with id "'+u+'" does not exist on this map.')));else{if(this._order.splice(x,0,f),this._layerOrderChanged=!0,this._layers[f]=d,this._removedLayers[f]&&d.source&&d.type!=="custom"){var A=this._removedLayers[f];delete this._removedLayers[f],A.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(i,u){if(this._checkLoaded(),this._changed=!0,this._layers[i]){if(i!==u){var p=this._order.indexOf(i);this._order.splice(p,1);var f=u?this._order.indexOf(u):this._order.length;
1u&&f===-1?this.fire(new a.ErrorEvent(new Error('Layer with id "'+u+'" does not exist on this map.'))):(this._order.splice(f,0,i),this._layerOrderChanged=!0)}}else this.fire(new a.ErrorEvent(new Error("The layer '"+i+"' does not exist in the map's style and cannot be moved.")))},o.prototype.removeLayer=function(i){this._checkLoaded();var u=this._layers[i];if(u){u.setEventedParent(null);var p=this._order.indexOf(i);this._order.splice(p,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[i]=u,delete this._layers[i],delete this._serializedLayers[i],delete this._updatedLayers[i],delete this._updatedPaintProps[i],u.onRemove&&u.onRemove(this.map)}else this.fire(new a.ErrorEvent(new Error("The layer '"+i+"' does not exist in the map's style and cannot be removed.")))},o.prototype.getLayer=function(i){return this._layers[i]},o.prototype.hasLayer=function(i){return i in this._layers},o.prototype.setLayerZoomRange=function(i,u,p){this._checkLoaded();var f=this.getLayer(i);f?f.minzoom===u&&f.maxzoom===p||(u!=null&&(f.minzoom=u),p!=null&&(f.maxzoom=p),this._updateLayer(f)):this.fire(new a.ErrorEvent(new Error("The layer '"+i+"' does not exist in the map's style and cannot have zoom extent.")))},o.prototype.setFilter=function(i,u,p){p===void 0&&(p={}),this._checkLoaded();var f=this.getLayer(i);if(f){if(!a.deepEqual(f.filter,u))return u==null?(f.filter=void 0,void this._updateLayer(f)):void(this._validate(a.validateStyle.filter,"layers."+f.id+".filter",u,null,p)||(f.filter=a.clone$1(u),this._updateLayer(f)))}else this.fire(new a.ErrorEvent(new Error("The layer '"+i+"' does not exist in the map's style and cannot be filtered.")))},o.prototype.getFilter=function(i){return a.clone$1(this.getLayer(i).filter)},o.prototype.setLayoutProperty=function(i,u,p,f){f===void 0&&(f={}),this._checkLoaded();var d=this.getLayer(i);d?a.deepEqual(d.getLayoutProperty(u),p)||(d.setLayoutProperty(u,p,f),this._updateLayer(d)):this.fire(new a.ErrorEvent(new Error("The layer '"+i+"' does not exist in the map's style and cannot be styled.")))},o.prototype.getLayoutProperty=function(i,u){var p=this.getLayer(i);if(p)return p.getLayoutProperty(u);this.fire(new a.ErrorEvent(new Error("The layer '"+i+"' does not exist in the map's style.")))},o.prototype.setPaintProperty=function(i,u,p,f){f===void 0&&(f={}),this._checkLoaded();var d=this.getLayer(i);d?a.deepEqual(d.getPaintProperty(u),p)||(d.setPaintProperty(u,p,f)&&this._updateLayer(d),this._changed=!0,this._updatedPaintProps[i]=!0):this.fire(new a.ErrorEvent(new Error("The layer '"+i+"' does not exist in the map's style and cannot be styled.")))},o.prototype.getPaintProperty=function(i,u){return this.getLayer(i).getPaintProperty(u)},o.prototype.setFeatureState=function(i,u){this._checkLoaded();var p=i.source,f=i.sourceLayer,d=this.sourceCaches[p];if(d!==void 0){var x=d.getSource().type;x==="geojson"&&f?this.fire(new a.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):x!=="vector"||f?(i.id===void 0&&this.fire(new a.ErrorEvent(new Error("The feature id parameter must be provided."))),d.setFeatureState(f,i.id,u)):this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new a.ErrorEvent(new Error("The source '"+p+"' does not exist in the map's style.")))},o.prototype.removeFeatureState=function(i,u){this._checkLoaded();var p=i.source,f=this.sourceCaches[p];if(f!==void 0){var d=f.getSource().type,x=d==="vector"?i.sourceLayer:void 0;d!=="vector"||x?u&&typeof i.id!="string"&&typeof i.id!="number"?this.fire(new a.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):f.removeFeatureState(x,i.id,u):this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new a.ErrorEvent(new Error("The source '"+p+"' does not exist in the map's style.")))},o.prototype.getFeatureState=function(i){this._checkLoaded();var u=i.source,p=i.sourceLayer,f=this.sourceCaches[u];if(f!==void 0){if(f.getSource().type!=="vector"||p)return i.id===void 0&&this.fire(new a.ErrorEvent(new Error("The feature id parameter must be provided."))),f.getFeatureState(p,i.id);this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new a.ErrorEvent(new Error("The source '"+u+"' does not exist in the map's style.")))},o.prototype.getTransition=function(){return a.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},o.prototype.serialize=function(){return a.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:a.mapObject(this.sourceCaches,(function(i){return i.serialize()})),layers:this._serializeLayers(this._order)},(function(i){return i!==void 0}))},o.prototype._updateLayer=function(i){this._updatedLayers[i.id]=!0,i.source&&!this._updatedSources[i.source]&&this.sourceCaches[i.source].getSource().type!=="raster"&&(this._updatedSources[i.source]="reload",this.sourceCaches[i.source].pause()),this._changed=!0},o.prototype._flattenAndSortRenderedFeatures=function(i){for(var u=this,p=function(Be){return u._layers[Be].type==="fill-extrusion"},f={},d=[],x=this._order.length-1;x>=0;x--){var A=this._order[x];if(p(A)){f[A]=x;for(var R=0,q=i;R<q.length;R+=1){var V=q[R][A];if(V)for(var j=0,Y=V;j<Y.length;j+=1)d.push(Y[j])}}}d.sort((function(Be,Oe){return Oe.intersectionZ-Be.intersectionZ}));for(var J=[],re=this._order.length-1;re>=0;re--){var Z=this._order[re];if(p(Z))for(var te=d.length-1;te>=0;te--){var ae=d[te].feature;if(f[ae.layer.id]<re)break;J.push(ae),d.pop()}else for(var fe=0,Se=i;fe<Se.length;fe+=1){var _e=Se[fe][Z];if(_e)for(var Ie=0,Me=_e;Ie<Me.length;Ie+=1)J.push(Me[Ie].feature)}}return J},o.prototype.queryRenderedFeatures=function(i,u,p){u&&u.filter&&this._val
vendor: 5,613 bytes, line 1
1idate(a.validateStyle.filter,"queryRenderedFeatures.filter",u.filter,null,u);var f={};if(u&&u.layers){if(!Array.isArray(u.layers))return this.fire(new a.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var d=0,x=u.layers;d<x.length;d+=1){var A=x[d],R=this._layers[A];if(!R)return this.fire(new a.ErrorEvent(new Error("The layer '"+A+"' does not exist in the map's style and cannot be queried for features."))),[];f[R.source]=!0}}var q=[];for(var V in u.availableImages=this._availableImages,this.sourceCaches)u.layers&&!f[V]||q.push(Sr(this.sourceCaches[V],this._layers,this._serializedLayers,i,u,p));return this.placement&&q.push((function(j,Y,J,re,Z,te,ae){for(var fe={},Se=te.queryRenderedSymbols(re),_e=[],Ie=0,Me=Object.keys(Se).map(Number);Ie<Me.length;Ie+=1)_e.push(ae[Me[Ie]]);_e.sort(dn);for(var Be=function(){var ct=Ke[Oe],Ft=ct.featureIndex.lookupSymbolFeatures(Se[ct.bucketInstanceId],Y,ct.bucketIndex,ct.sourceLayerIndex,Z.filter,Z.layers,Z.availableImages,j);for(var Je in Ft){var _t=fe[Je]=fe[Je]||[],Et=Ft[Je];Et.sort((function(St,mt){var ft=ct.featureSortOrder;if(ft){var Yr=ft.indexOf(St.featureIndex);return ft.indexOf(mt.featureIndex)-Yr}return mt.featureIndex-St.featureIndex}));for(var gt=0,vt=Et;gt<vt.length;gt+=1)_t.push(vt[gt])}},Oe=0,Ke=_e;Oe<Ke.length;Oe+=1)Be();var st=function(ct){fe[ct].forEach((function(Ft){var Je=Ft.feature,_t=J[j[ct].source].getFeatureState(Je.layer["source-layer"],Je.id);Je.source=Je.layer.source,Je.layer["source-layer"]&&(Je.sourceLayer=Je.layer["source-layer"]),Je.state=_t}))};for(var ht in fe)st(ht);return fe})(this._layers,this._serializedLayers,this.sourceCaches,i,u,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(q)},o.prototype.querySourceFeatures=function(i,u){u&&u.filter&&this._validate(a.validateStyle.filter,"querySourceFeatures.filter",u.filter,null,u);var p=this.sourceCaches[i];return p?(function(f,d){for(var x=f.getRenderableIds().map((function(Y){return f.getTileByID(Y)})),A=[],R={},q=0;q<x.length;q++){var V=x[q],j=V.tileID.canonical.key;R[j]||(R[j]=!0,V.querySourceFeatures(A,d))}return A})(p,u):[]},o.prototype.addSourceType=function(i,u,p){return o.getSourceType(i)?p(new Error('A source type called "'+i+'" already exists.')):(o.setSourceType(i,u),u.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:i,url:u.workerSourceURL},p):p(null,null))},o.prototype.getLight=function(){return this.light.getLight()},o.prototype.setLight=function(i,u){u===void 0&&(u={}),this._checkLoaded();var p=this.light.getLight(),f=!1;for(var d in i)if(!a.deepEqual(i[d],p[d])){f=!0;break}if(f){var x={now:a.browser.now(),transition:a.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(i,u),this.light.updateTransitions(x)}},o.prototype._validate=function(i,u,p,f,d){return d===void 0&&(d={}),(!d||d.validate!==!1)&&mo(this,i.call(a.validateStyle,a.extend({key:u,style:this.serialize(),value:p,styleSpec:a.styleSpec},f)))},o.prototype._remove=function(){for(var i in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),a.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[i].setEventedParent(null);for(var u in this.sourceCaches)this.sourceCaches[u].clearTiles(),this.sourceCaches[u].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},o.prototype._clearSource=function(i){this.sourceCaches[i].clearTiles()},o.prototype._reloadSource=function(i){this.sourceCaches[i].resume(),this.sourceCaches[i].reload()},o.prototype._updateSources=function(i){for(var u in this.sourceCaches)this.sourceCaches[u].update(i)},o.prototype._generateCollisionBoxes=function(){for(var i in this.sourceCaches)this._reloadSource(i)},o.prototype._updatePlacement=function(i,u,p,f,d){d===void 0&&(d=!1);for(var x=!1,A=!1,R={},q=0,V=this._order;q<V.length;q+=1){var j=this._layers[V[q]];if(j.type==="symbol"){if(!R[j.source]){var Y=this.sourceCaches[j.source];R[j.source]=Y.getRenderableIds(!0).map((function(ae){return Y.getTileByID(ae)})).sort((function(ae,fe){return fe.tileID.overscaledZ-ae.tileID.overscaledZ||(ae.tileID.isLessThan(fe.tileID)?-1:1)}))}var J=this.crossTileSymbolIndex.addLayer(j,R[j.source],i.center.lng);x=x||J}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((d=d||this._layerOrderChanged||p===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(a.browser.now(),i.zoom))&&(this.pauseablePlacement=new ya(i,this._order,d,u,p,f,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,R),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(a.browser.now()),A=!0),x&&this.pauseablePlacement.placement.setStale()),A||x)for(var re=0,Z=this._order;re<Z.length;re+=1){var te=this._layers[Z[re]];te.type==="symbol"&&this.placement.updateLayerOpacities(te,R[te.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(a.browser.now())},o.prototype._releaseSymbolFadeTiles=function(){for(var i in this.sourceCaches)this.sourceCaches[i].releaseSymbolFadeTiles()},o.prototype.getImages=function(i,u,p){this.imageManager.getImages(u.icons,p),this._updateTilesForChangedImages();var f=this.sourceCaches[u.source];f&&f.setDependencies(u.tileID.key,u.type,u.icons)},o.prototype.getGlyphs=function(i,u,p){this.glyphManager.getGlyphs(u.stacks,p)}
1,o.prototype.getResource=function(i,u,p){return a.makeRequest(u,p)},o})(a.Evented);qn.getSourceType=function(n){return Jr[n]},qn.setSourceType=function(n,o){Jr[n]=o},qn.registerForPluginStateChange=a.registerForPluginStateChange;var jr=a.createLayout([{name:"a_pos",type:"Int16",components:2}]),Zo=sr(`#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;}`),il=sr(`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);}"),zc=sr(`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);}"),Lc=sr(`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);}`),Ys=sr("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);}"),Qs=sr(`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;}`),eu=sr(`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;}"),tu=sr("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;}"),ol=sr("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);}"),al=sr("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);}"),Dc=sr(`#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);}`),ma=sr(`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;}`),va=sr(`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;}`),sl=sr(`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);}`),gn=sr(`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;}`),ru=sr(`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;}`),Wi=sr(`#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;}"),Xi=sr(`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;}"),vo=sr(`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);}`),go=sr(`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);}`),Hi=sr(`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;}`),_o=sr(`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);}`),xo=sr(`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;}"),Ki=sr(`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));}`),ul=sr(`#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);}`),ll=sr(`#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 sr(n,o){var i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,u=o.match(/attribute ([\w]+) ([\w]+)/g),p=n.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),f=o.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),d=f?f.concat(p):p,x={};return{fragmentSource:n=n.replace(i,(function(A,R,q,V,j){return x[j]=!0,R==="define"?`
447#ifndef HAS_UNIFORM_u_`+j+`
448varying `+q+" "+V+" "+j+`;
449#else
450uniform `+q+" "+V+" u_"+j+`;
451#endif
452`:`
453#ifdef HAS_UNIFORM_u_`+j+`
454    `+q+" "+V+" "+j+" = u_"+j+`;
455#endif
456`})),vertexSource:o=o.replace(i,(function(A,R,q,V,j){var Y=V==="float"?"vec2":"vec4",J=j.match(/color/)?"color":Y;return x[j]?R==="define"?`
457#ifndef HAS_UNIFORM_u_`+j+`
458uniform lowp float u_`+j+`_t;
459attribute `+q+" "+Y+" a_"+j+`;
460varying `+q+" "+V+" "+j+`;
461#else
462uniform `+q+" "+V+" u_"+j+`;
463#endif
464`:J==="vec4"?`
465#ifndef HAS_UNIFORM_u_`+j+`
466    `+j+" = a_"+j+`;
467#else
468    `+q+" "+V+" "+j+" = u_"+j+`;
469#endif
470`:`
471#ifndef HAS_UNIFORM_u_`+j+`
472    `+j+" = unpack_mix_"+J+"(a_"+j+", u_"+j+`_t);
473#else
474    `+q+" "+V+" "+j+" = u_"+j+`;
475#endif
476`:R==="define"?`
477#ifndef HAS_UNIFORM_u_`+j+`
478uniform lowp float u_`+j+`_t;
479attribute `+q+" "+Y+" a_"+j+`;
480#else
481uniform `+q+" "+V+" u_"+j+`;
482#endif
483`:J==="vec4"?`
484#ifndef HAS_UNIFORM_u_`+j+`
485    `+q+" "+V+" "+j+" = a_"+j+`;
486#else
487    `+q+" "+V+" "+j+" = u_"+j+`;
488#endif
489`:`
490#ifndef HAS_UNIFORM_u_`+j+`
491    `+q+" "+V+" "+j+" = unpack_mix_"+J+"(a_"+j+", u_"+j+`_t);
492#else
493    `+q+" "+V+" "+j+" = u_"+j+`;
494#endif
495`})),staticAttributes:u,staticUniforms:d}}var Oc=Object.freeze({__proto__:null,prelude:Zo,background:il,backgroundPattern:zc,circle:Lc,clippingMask:Ys,heatmap:Qs,heatmapTexture:eu,collisionBox:tu,collisionCircle:ol,debug:al,fill:Dc,fillOutline:ma,fillOutlinePattern:va,fillPattern:sl,fillExtrusion:gn,fillExtrusionPattern:ru,hillshadePrepare:Wi,hillshade:Xi,line:vo,lineGradient:go,linePattern:Hi,lineSDF:_o,raster:xo,symbolIcon:Ki,symbolSDF:ul,symbolTextAndIcon:ll}),Ka=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function cl(n){for(var o=[],i=0;i<n.length;i++)if(n[i]!==null){var u=n[i].split(" ");o.push(u.pop())}return o}Ka.prototype.bind=function(n,o,i,u,p,f,d,x){this.context=n;for(var A=this.boundPaintVertexBuffers.length!==u.length,R=0;!A&&R<u.length;R++)this.boundPaintVertexBuffers[R]!==u[R]&&(A=!0);n.extVertexArrayObject&&this.vao&&this.boundProgram===o&&this.boundLayoutVertexBuffer===i&&!A&&this.boundIndexBuffer===p&&this.boundVertexOffset===f&&this.boundDynamicVertexBuffer===d&&this.boundDynamicVertexBuffer2===x?(n.bindVertexArrayOES.set(this.vao),d&&d.bind(),p&&p.dynamicDraw&&p.bind(),x&&x.bind()):this.freshBind(o,i,u,p,f,d,x)}
vendor: 11,406 bytes, lines 495-497
495,Ka.prototype.freshBind=function(n,o,i,u,p,f,d){var x,A=n.numAttributes,R=this.context,q=R.gl;if(R.extVertexArrayObject)this.vao&&this.destroy(),this.vao=R.extVertexArrayObject.createVertexArrayOES(),R.bindVertexArrayOES.set(this.vao),x=0,this.boundProgram=n,this.boundLayoutVertexBuffer=o,this.boundPaintVertexBuffers=i,this.boundIndexBuffer=u,this.boundVertexOffset=p,this.boundDynamicVertexBuffer=f,this.boundDynamicVertexBuffer2=d;else{x=R.currentNumAttributes||0;for(var V=A;V<x;V++)q.disableVertexAttribArray(V)}o.enableAttributes(q,n);for(var j=0,Y=i;j<Y.length;j+=1)Y[j].enableAttributes(q,n);f&&f.enableAttributes(q,n),d&&d.enableAttributes(q,n),o.bind(),o.setVertexAttribPointers(q,n,p);for(var J=0,re=i;J<re.length;J+=1){var Z=re[J];Z.bind(),Z.setVertexAttribPointers(q,n,p)}f&&(f.bind(),f.setVertexAttribPointers(q,n,p)),u&&u.bind(),d&&(d.bind(),d.setVertexAttribPointers(q,n,p)),R.currentNumAttributes=A},Ka.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var pl=function(n,o,i,u,p,f){var d=n.gl;this.program=d.createProgram();for(var x=cl(i.staticAttributes),A=u?u.getBinderAttributes():[],R=x.concat(A),q=i.staticUniforms?cl(i.staticUniforms):[],V=u?u.getBinderUniforms():[],j=[],Y=0,J=q.concat(V);Y<J.length;Y+=1){var re=J[Y];j.indexOf(re)<0&&j.push(re)}var Z=u?u.defines():[];f&&Z.push("#define OVERDRAW_INSPECTOR;");var te=Z.concat(Zo.fragmentSource,i.fragmentSource).join(`
496`),ae=Z.concat(Zo.vertexSource,i.vertexSource).join(`
497`),fe=d.createShader(d.FRAGMENT_SHADER);if(d.isContextLost())this.failedToCreate=!0;else{d.shaderSource(fe,te),d.compileShader(fe),d.attachShader(this.program,fe);var Se=d.createShader(d.VERTEX_SHADER);if(d.isContextLost())this.failedToCreate=!0;else{d.shaderSource(Se,ae),d.compileShader(Se),d.attachShader(this.program,Se),this.attributes={};var _e={};this.numAttributes=R.length;for(var Ie=0;Ie<this.numAttributes;Ie++)R[Ie]&&(d.bindAttribLocation(this.program,Ie,R[Ie]),this.attributes[R[Ie]]=Ie);d.linkProgram(this.program),d.deleteShader(Se),d.deleteShader(fe);for(var Me=0;Me<j.length;Me++){var Be=j[Me];if(Be&&!_e[Be]){var Oe=d.getUniformLocation(this.program,Be);Oe&&(_e[Be]=Oe)}}this.fixedUniforms=p(n,_e),this.binderUniforms=u?u.getUniforms(n,_e):[]}}};function hl(n,o,i){var u=1/vr(i,1,o.transform.tileZoom),p=Math.pow(2,i.tileID.overscaledZ),f=i.tileSize*Math.pow(2,o.transform.tileZoom)/p,d=f*(i.tileID.canonical.x+i.tileID.wrap*p),x=f*i.tileID.canonical.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[u,n.fromScale,n.toScale],u_fade:n.t,u_pixel_coord_upper:[d>>16,x>>16],u_pixel_coord_lower:[65535&d,65535&x]}}pl.prototype.draw=function(n,o,i,u,p,f,d,x,A,R,q,V,j,Y,J,re){var Z,te=n.gl;if(!this.failedToCreate){for(var ae in n.program.set(this.program),n.setDepthMode(i),n.setStencilMode(u),n.setColorMode(p),n.setCullFace(f),this.fixedUniforms)this.fixedUniforms[ae].set(d[ae]);Y&&Y.setUniforms(n,this.binderUniforms,V,{zoom:j});for(var fe=(Z={},Z[te.LINES]=2,Z[te.TRIANGLES]=3,Z[te.LINE_STRIP]=1,Z)[o],Se=0,_e=q.get();Se<_e.length;Se+=1){var Ie=_e[Se],Me=Ie.vaos||(Ie.vaos={});(Me[x]||(Me[x]=new Ka)).bind(n,this,A,Y?Y.getPaintVertexBuffers():[],R,Ie.vertexOffset,J,re),te.drawElements(o,Ie.primitiveLength*fe,te.UNSIGNED_SHORT,Ie.primitiveOffset*fe*2)}}};var fl=function(n,o,i,u){var p=o.style.light,f=p.properties.get("position"),d=[f.x,f.y,f.z],x=a.create$1();p.properties.get("anchor")==="viewport"&&a.fromRotation(x,-o.transform.angle),a.transformMat3(d,d,x);var A=p.properties.get("color");return{u_matrix:n,u_lightpos:d,u_lightintensity:p.properties.get("intensity"),u_lightcolor:[A.r,A.g,A.b],u_vertical_gradient:+i,u_opacity:u}},bo=function(n,o,i,u,p,f,d){return a.extend(fl(n,o,i,u),hl(f,o,d),{u_height_factor:-Math.pow(2,p.overscaledZ)/d.tileSize/8})},Ji=function(n){return{u_matrix:n}},wo=function(n,o,i,u){return a.extend(Ji(n),hl(i,o,u))},dl=function(n,o){return{u_matrix:n,u_world:o}},yl=function(n,o,i,u,p){return a.extend(wo(n,o,i,u),{u_world:p})},nu=function(n,o,i,u){var p,f,d=n.transform;if(u.paint.get("circle-pitch-alignment")==="map"){var x=vr(i,1,d.zoom);p=!0,f=[x,x]}else p=!1,f=d.pixelsToGLUnits;return{u_camera_to_center_distance:d.cameraToCenterDistance,u_scale_with_map:+(u.paint.get("circle-pitch-scale")==="map"),u_matrix:n.translatePosMatrix(o.posMatrix,i,u.paint.get("circle-translate"),u.paint.get("circle-translate-anchor")),u_pitch_with_map:+p,u_device_pixel_ratio:a.browser.devicePixelRatio,u_extrude_scale:f}},So=function(n,o,i){var u=vr(i,1,o.zoom),p=Math.pow(2,o.zoom-i.tileID.overscaledZ),f=i.tileID.overscaleFactor();return{u_matrix:n,u_camera_to_center_distance:o.cameraToCenterDistance,u_pixels_to_tile_units:u,u_extrude_scale:[o.pixelsToGLUnits[0]/(u*p),o.pixelsToGLUnits[1]/(u*p)],u_overscale_factor:f}},ml=function(n,o,i){return{u_matrix:n,u_inv_matrix:o,u_camera_to_center_distance:i.cameraToCenterDistance,u_viewport_size:[i.width,i.height]}},To=function(n,o,i){return i===void 0&&(i=1),{u_matrix:n,u_color:o,u_overlay:0,u_overlay_scale:i}},Io=function(n){return{u_matrix:n}},vl=function(n,o,i,u){return{u_matrix:n,u_extrude_scale:vr(o,1,i),u_intensity:u}},ga=function(n,o,i){var u=n.transform;return{u_matrix:gl(n,o,i),u_ratio:1/vr(o,1,u.zoom),u_device_pixel_ratio:a.browser.devicePixelRatio,u_units_to_pixels:[1/u.pixelsToGLUnits[0],1/u.pixelsToGLUnits[1]]}},pr=function(n,o,i,u){return a.extend(ga(n,o,i),{u_image:0,u_image_height:u})},Ja=function(n,o,i,u){var p=n.transform,f=Wo(o,p);return{u_matrix:gl(n,o,i),u_texsize:o.imageAtlasTexture.size,u_ratio:1/vr(o,1,p.zoom),u_device_pixel_ratio:a.browser.devicePixelRatio,u_image:0,u_scale:[f,u.fromScale,u.toScale],u_fade:u.t,u_units_to_pixels:[1/p.pixelsToGLUnits[0],1/p.pixelsToGLUnits[1]]}},Bc=function(n,o,i,u,p){var f=n.lineAtlas,d=Wo(o,n.transform),x=i.layout.get("line-cap")==="round",A=f.getDash(u.from,x),R=f.getDash(u.to,x),q=A.width*p.fromScale,V=R.width*p.toScale;return a.extend(ga(n,o,i),{u_patternscale_a:[d/q,-A.height/2],u_patternscale_b:[d/V,-R.height/2],u_sdfgamma:f.width/(256*Math.min(q,V)*a.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:A.y,u_tex_y_b:R.y,u_mix:p.t})};function Wo(n,o){return 1/vr(n,1,o.tileZoom)}function gl(n,o,i){return n.translatePosMatrix(o.tileID.posMatrix,o,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"))}var Fc=function(n,o,i,u,p){return{u_matrix:n,u_tl_parent:o,u_scale_parent:i,u_buffer_scale:1,u_fade_t:u.mix,u_opacity:u.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:_l(p.paint.get("raster-hue-rotate"))};var f,d};function _l(n){n*=Math.PI/180;var o=Math.sin(n),i=Math.cos(n);return[(2*i+1)/3,(-Math.sqrt(3)*o-i+1)/3,(Math.sqrt(3)*o-i+1)/3]}var Ya,Xo=function(n,o,i,u,p,f,d,x,A,R){var q=p.transform;return{u_is_size_zoom_constant:+(n==="constant"||n==="source"),u_is_size_feature_constant:+(n==="constant"||n==="camera"),u_size_t:o?o.uSizeT:0,u_size:o?o.uSize:0,u_camera_to_center_distance:q.cameraToCenterDistance,u_pitch:q.pitch/360*2*Math.PI,u_rotate_symbol:+i,u_aspect_ratio:q.width/q.height,u_fade_change:p.options.fadeDuration?p.symbolFadeChange:1,u_matrix:f,u_label_plane_matrix:d,u_coord_matrix:x,u_is_text:+A,u_pitch_with_map:+u,u_texsize:R,u_texture:0}},_a=function(n,o,i,u,p,f,d,x,A,R,q){var V=p.transform;return a.extend(Xo(n,o,i,u,p,f,d,x,A,R),{u_gamma_scale:u?Math.cos(V._pitch)*V.cameraToCenterDistance:1,u_device_pixel_ratio:a.browser.devicePixelRatio,u_is_halo:1})},Qa=function(n,o,i,u,p,f,d,x,A,R){return a.extend(_a(n,o,i,u,p,f,d,x,!0,A),{u_texsize_icon:R,u_texture_icon:1})},xa=function(n,o,i){return{u_matrix:n,u_opacity:o,u_color:i}},Ho=function(n,o,i,u,p,f){return a.extend((function(d,x,A,R){var q=A.imageManager.getPattern(d.from.toString()),V=A.imageManager.getPattern(d.to.toString()),j=A.imageManager.getPixelSize(),Y=j.width,J=j.height,re=Math.pow(2,R.tileID.overscaledZ),Z=R.tileSize*Math.pow(2,A.transform.tileZoom)/re,te=Z*(R.tileID.canonical.x+R.tileID.wrap*re),ae=Z*R.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:q.tl,u_pattern_br_a:q.br,u_pattern_tl_b:V.tl,u_pattern_br_b:V.br,u_texsize:[Y,J],u_mix:x.t,u_pattern_size_a:q.displaySize,u_pattern_size_b:V.displaySize,u_scale_a:x.fromScale,u_scale_b:x.toScale,u_tile_units_to_pixels:1/vr(R,1,A.transform.tileZoom),u_pixel_coord_upper:[te>>16,ae>>16],u_pixel_coord_lower:[65535&te,65535&ae]}})(u,f,i,p),{u_matrix:n,u_opacity:o})},xl={fillExtrusion:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_lightpos:new a.Uniform3f(n,o.u_lightpos),u_lightintensity:new a.Uniform1f(n,o.u_lightintensity),u_lightcolor:new a.Uniform3f(n,o.u_lightcolor),u_vertical_gradient:new a.Uniform1f(n,o.u_vertical_gradient),u_opacity:new a.Uniform1f(n,o.u_opacity)}},fillExtrusionPattern:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_lightpos:new a.Uniform3f(n,o.u_lightpos),u_lightintensity:new a.Uniform1f(n,o.u_lightintensity),u_lightcolor:new a.Uniform3f(n,o.u_lightcolor),u_vertical_gradient:new a.Uniform1f(n,o.u_vertical_gradient),u_height_factor:new a.Uniform1f(n,o.u_height_factor),u_image:new a.Uniform1i(n,o.u_image),u_texsize:new a.Uniform2f(n,o.u_texsize),u_pixel_coord_upper:new a.Uniform2f(n,o.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(n,o.u_pixel_coord_lower),u_scale:new a.Uniform3f(n,o.u_scale),u_fade:new a.Uniform1f(n,o.u_fade),u_opacity:new a.Uniform1f(n,o.u_opacity)}},fill:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix)}},fillPattern:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_image:new a.Uniform1i(n,o.u_image),u_texsize:new a.Uniform2f(n,o.u_texsize),u_pixel_coord_upper:new a.Uniform2f(n,o.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(n,o.u_pixel_coord_lower),u_scale:new a.Uniform3f(n,o.u_scale),u_fade:new a.Uniform1f(n,o.u_fade)}},fillOutline:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_world:new a.Uniform2f(n,o.u_world)}},fillOutlinePattern:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_world:new a.Uniform2f(n,o.u_world),u_image:new a.Uniform1i(n,o.u_image),u_texsize:new a.Uniform2f(n,o.u_texsize),u_pixel_coord_upper:new a.Uniform2f(n,o.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(n,o.u_pixel_coord_lower),u_scale:new a.Uniform3f(n,o.u_scale),u_fade:new a.Uniform1f(n,o.u_fade)}},circle:function(n,o){return{u_camera_to_center_distance:new a.Uniform1f(n,o.u_camera_to_center_distance),u_scale_with_map:new a.Uniform1i(n,o.u_scale_with_map),u_pitch_with_map:new a.Uniform1i(n,o.u_pitch_with_map),u_extrude_scale:new a.Uniform2f(n,o.u_extrude_scale),u_device_pixel_ratio:new a.Uniform1f(n,o.u_device_pixel_ratio),u_matrix:new a.UniformMatrix4f(n,o.u_matrix)}},collisionBox:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_camera_to_center_distance:new a.Uniform1f(n,o.u_camera_to_center_distance),u_pixels_to_tile_units:new a.Uniform1f(n,o.u_pixels_to_tile_units),u_extrude_scale:new a.Uniform2f(n,o.u_extrude_scale),u_overscale_factor:new a.Uniform1f(n,o.u_overscale_factor)}},collisionCircle:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_inv_matrix:new a.UniformMatrix4f(n,o.u_inv_matrix
497),u_camera_to_center_distance:new a.Uniform1f(n,o.u_camera_to_center_distance),u_viewport_size:new a.Uniform2f(n,o.u_viewport_size)}},debug:function(n,o){return{u_color:new a.UniformColor(n,o.u_color),u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_overlay:new a.Uniform1i(n,o.u_overlay),u_overlay_scale:new a.Uniform1f(n,o.u_overlay_scale)}},clippingMask:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix)}},heatmap:function(n,o){return{u_extrude_scale:new a.Uniform1f(n,o.u_extrude_scale),u_intensity:new a.Uniform1f(n,o.u_intensity),u_matrix:new a.UniformMatrix4f(n,o.u_matrix)}},heatmapTexture:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_world:new a.Uniform2f(n,o.u_world),u_image:new a.Uniform1i(n,o.u_image),u_color_ramp:new a.Uniform1i(n,o.u_color_ramp),u_opacity:new a.Uniform1f(n,o.u_opacity)}},hillshade:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_image:new a.Uniform1i(n,o.u_image),u_latrange:new a.Uniform2f(n,o.u_latrange),u_light:new a.Uniform2f(n,o.u_light),u_shadow:new a.UniformColor(n,o.u_shadow),u_highlight:new a.UniformColor(n,o.u_highlight),u_accent:new a.UniformColor(n,o.u_accent)}},hillshadePrepare:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_image:new a.Uniform1i(n,o.u_image),u_dimension:new a.Uniform2f(n,o.u_dimension),u_zoom:new a.Uniform1f(n,o.u_zoom),u_unpack:new a.Uniform4f(n,o.u_unpack)}},line:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_ratio:new a.Uniform1f(n,o.u_ratio),u_device_pixel_ratio:new a.Uniform1f(n,o.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(n,o.u_units_to_pixels)}},lineGradient:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_ratio:new a.Uniform1f(n,o.u_ratio),u_device_pixel_ratio:new a.Uniform1f(n,o.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(n,o.u_units_to_pixels),u_image:new a.Uniform1i(n,o.u_image),u_image_height:new a.Uniform1f(n,o.u_image_height)}},linePattern:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_texsize:new a.Uniform2f(n,o.u_texsize),u_ratio:new a.Uniform1f(n,o.u_ratio),u_device_pixel_ratio:new a.Uniform1f(n,o.u_device_pixel_ratio),u_image:new a.Uniform1i(n,o.u_image),u_units_to_pixels:new a.Uniform2f(n,o.u_units_to_pixels),u_scale:new a.Uniform3f(n,o.u_scale),u_fade:new a.Uniform1f(n,o.u_fade)}},lineSDF:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_ratio:new a.Uniform1f(n,o.u_ratio),u_device_pixel_ratio:new a.Uniform1f(n,o.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(n,o.u_units_to_pixels),u_patternscale_a:new a.Uniform2f(n,o.u_patternscale_a),u_patternscale_b:new a.Uniform2f(n,o.u_patternscale_b),u_sdfgamma:new a.Uniform1f(n,o.u_sdfgamma),u_image:new a.Uniform1i(n,o.u_image),u_tex_y_a:new a.Uniform1f(n,o.u_tex_y_a),u_tex_y_b:new a.Uniform1f(n,o.u_tex_y_b),u_mix:new a.Uniform1f(n,o.u_mix)}},raster:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_tl_parent:new a.Uniform2f(n,o.u_tl_parent),u_scale_parent:new a.Uniform1f(n,o.u_scale_parent),u_buffer_scale:new a.Uniform1f(n,o.u_buffer_scale),u_fade_t:new a.Uniform1f(n,o.u_fade_t),u_opacity:new a.Uniform1f(n,o.u_opacity),u_image0:new a.Uniform1i(n,o.u_image0),u_image1:new a.Uniform1i(n,o.u_image1),u_brightness_low:new a.Uniform1f(n,o.u_brightness_low),u_brightness_high:new a.Uniform1f(n,o.u_brightness_high),u_saturation_factor:new a.Uniform1f(n,o.u_saturation_factor),u_contrast_factor:new a.Uniform1f(n,o.u_contrast_factor),u_spin_weights:new a.Uniform3f(n,o.u_spin_weights)}},symbolIcon:function(n,o){return{u_is_size_zoom_constant:new a.Uniform1i(n,o.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(n,o.u_is_size_feature_constant),u_size_t:new a.Uniform1f(n,o.u_size_t),u_size:new a.Uniform1f(n,o.u_size),u_camera_to_center_distance:new a.Uniform1f(n,o.u_camera_to_center_distance),u_pitch:new a.Uniform1f(n,o.u_pitch),u_rotate_symbol:new a.Uniform1i(n,o.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(n,o.u_aspect_ratio),u_fade_change:new a.Uniform1f(n,o.u_fade_change),u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(n,o.u_label_plane_matrix
vendor: 5,280 bytes, line 497
497),u_coord_matrix:new a.UniformMatrix4f(n,o.u_coord_matrix),u_is_text:new a.Uniform1i(n,o.u_is_text),u_pitch_with_map:new a.Uniform1i(n,o.u_pitch_with_map),u_texsize:new a.Uniform2f(n,o.u_texsize),u_texture:new a.Uniform1i(n,o.u_texture)}},symbolSDF:function(n,o){return{u_is_size_zoom_constant:new a.Uniform1i(n,o.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(n,o.u_is_size_feature_constant),u_size_t:new a.Uniform1f(n,o.u_size_t),u_size:new a.Uniform1f(n,o.u_size),u_camera_to_center_distance:new a.Uniform1f(n,o.u_camera_to_center_distance),u_pitch:new a.Uniform1f(n,o.u_pitch),u_rotate_symbol:new a.Uniform1i(n,o.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(n,o.u_aspect_ratio),u_fade_change:new a.Uniform1f(n,o.u_fade_change),u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(n,o.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(n,o.u_coord_matrix),u_is_text:new a.Uniform1i(n,o.u_is_text),u_pitch_with_map:new a.Uniform1i(n,o.u_pitch_with_map),u_texsize:new a.Uniform2f(n,o.u_texsize),u_texture:new a.Uniform1i(n,o.u_texture),u_gamma_scale:new a.Uniform1f(n,o.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(n,o.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(n,o.u_is_halo)}},symbolTextAndIcon:function(n,o){return{u_is_size_zoom_constant:new a.Uniform1i(n,o.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(n,o.u_is_size_feature_constant),u_size_t:new a.Uniform1f(n,o.u_size_t),u_size:new a.Uniform1f(n,o.u_size),u_camera_to_center_distance:new a.Uniform1f(n,o.u_camera_to_center_distance),u_pitch:new a.Uniform1f(n,o.u_pitch),u_rotate_symbol:new a.Uniform1i(n,o.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(n,o.u_aspect_ratio),u_fade_change:new a.Uniform1f(n,o.u_fade_change),u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(n,o.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(n,o.u_coord_matrix),u_is_text:new a.Uniform1i(n,o.u_is_text),u_pitch_with_map:new a.Uniform1i(n,o.u_pitch_with_map),u_texsize:new a.Uniform2f(n,o.u_texsize),u_texsize_icon:new a.Uniform2f(n,o.u_texsize_icon),u_texture:new a.Uniform1i(n,o.u_texture),u_texture_icon:new a.Uniform1i(n,o.u_texture_icon),u_gamma_scale:new a.Uniform1f(n,o.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(n,o.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(n,o.u_is_halo)}},background:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_opacity:new a.Uniform1f(n,o.u_opacity),u_color:new a.UniformColor(n,o.u_color)}},backgroundPattern:function(n,o){return{u_matrix:new a.UniformMatrix4f(n,o.u_matrix),u_opacity:new a.Uniform1f(n,o.u_opacity),u_image:new a.Uniform1i(n,o.u_image),u_pattern_tl_a:new a.Uniform2f(n,o.u_pattern_tl_a),u_pattern_br_a:new a.Uniform2f(n,o.u_pattern_br_a),u_pattern_tl_b:new a.Uniform2f(n,o.u_pattern_tl_b),u_pattern_br_b:new a.Uniform2f(n,o.u_pattern_br_b),u_texsize:new a.Uniform2f(n,o.u_texsize),u_mix:new a.Uniform1f(n,o.u_mix),u_pattern_size_a:new a.Uniform2f(n,o.u_pattern_size_a),u_pattern_size_b:new a.Uniform2f(n,o.u_pattern_size_b),u_scale_a:new a.Uniform1f(n,o.u_scale_a),u_scale_b:new a.Uniform1f(n,o.u_scale_b),u_pixel_coord_upper:new a.Uniform2f(n,o.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(n,o.u_pixel_coord_lower),u_tile_units_to_pixels:new a.Uniform1f(n,o.u_tile_units_to_pixels)}}};function Ko(n,o,i,u,p,f,d){for(var x=n.context,A=x.gl,R=n.useProgram("collisionBox"),q=[],V=0,j=0,Y=0;Y<u.length;Y++){var J=u[Y],re=o.getTile(J),Z=re.getBucket(i);if(Z){var te=J.posMatrix;p[0]===0&&p[1]===0||(te=n.translatePosMatrix(J.posMatrix,re,p,f));var ae=d?Z.textCollisionBox:Z.iconCollisionBox,fe=Z.collisionCircleArray;if(fe.length>0){var Se=a.create(),_e=te;a.mul(Se,Z.placementInvProjMatrix,n.transform.glCoordMatrix),a.mul(Se,Se,Z.placementViewportMatrix),q.push({circleArray:fe,circleOffset:j,transform:_e,invTransform:Se}),j=V+=fe.length/4}ae&&R.draw(x,A.LINES,G.disabled,K.disabled,n.colorModeForRenderPass(),oe.disabled,So(te,n.transform,re),i.id,ae.layoutVertexBuffer,ae.indexBuffer,ae.segments,null,n.transform.zoom,null,null,ae.collisionVertexBuffer)}}if(d&&q.length){var Ie=n.useProgram("collisionCircle"),Me=new a.StructArrayLayout2f1f2i16;Me.resize(4*V),Me._trim();for(var Be=0,Oe=0,Ke=q;Oe<Ke.length;Oe+=1)for(var st=Ke[Oe],ht=0;ht<st.circleArray.length/4;ht++){var ct=4*ht,Ft=st.circleArray[ct+0],Je=st.circleArray[ct+1],_t=st.circleArray[ct+2],Et=st.circleArray[ct+3];Me.emplace(Be++,Ft,Je,_t,Et,0),Me.emplace(Be++,Ft,Je,_t,Et,1),Me.emplace(Be++,Ft,Je,_t,Et,2),Me.emplace(Be++,Ft,Je,_t,Et,3)}(!Ya||Ya.length<2*V)&&(Ya=(function(Pr){var bn=2*Pr,cn=new a.StructArrayLayout3ui6;cn.resize(bn),cn._trim();for(var Ir=0;Ir<bn;Ir++){var Or=6*Ir;cn.uint16[Or+0]=4*Ir+0,cn.uint16[Or+1]=4*Ir+1,cn.uint16[Or+2]=4*Ir+2,cn.uint16[Or+3]=4*Ir+2,cn.uint16[Or+4]=4*Ir+3,cn.uint16[Or+5]=4*Ir+0}return cn})(V));for(var gt=x.createIndexBuffer(Ya,!0),vt=x.createVertexBuffer(Me,a.collisionCircleLayout.members,!0),St=0,mt=q;St<mt.length;St+=1){var ft=mt[St],Yr=ml(ft.transform,ft.invTransform,n.transform);Ie.draw(x,A.TRIANGLES,G.disabled,K.disabled,n.colorModeForRenderPass(),oe.disabled,Yr,i.id,vt,gt,a.SegmentVector.simpleSegment(0,2*ft.circleOffset,ft.circleArray.length,ft.circleArray.length/2),null,
497n.transform.zoom,null,null,null)}vt.destroy(),gt.destroy()}}var yi=a.identity(new Float32Array(16));function bl(n,o,i,u,p,f){var d=a.getAnchorAlignment(n),x=-(d.horizontalAlign-.5)*o,A=-(d.verticalAlign-.5)*i,R=a.evaluateVariableOffset(n,u);return new a.Point((x/p+R[0])*f,(A/p+R[1])*f)}function wl(n,o,i,u,p,f,d,x,A,R,q){var V=n.text.placedSymbolArray,j=n.text.dynamicLayoutVertexArray,Y=n.icon.dynamicLayoutVertexArray,J={};j.clear();for(var re=0;re<V.length;re++){var Z=V.get(re),te=Z.hidden||!Z.crossTileID||n.allowVerticalPlacement&&!Z.placedOrientation?null:u[Z.crossTileID];if(te){var ae=new a.Point(Z.anchorX,Z.anchorY),fe=Lt(ae,i?x:d),Se=$t(f.cameraToCenterDistance,fe.signedDistanceFromCamera),_e=p.evaluateSizeForFeature(n.textSizeData,R,Z)*Se/a.ONE_EM;i&&(_e*=n.tilePixelRatio/A);for(var Ie=bl(te.anchor,te.width,te.height,te.textOffset,te.textBoxScale,_e),Me=i?Lt(ae.add(Ie),d).point:fe.point.add(o?Ie.rotate(-f.angle):Ie),Be=n.allowVerticalPlacement&&Z.placedOrientation===a.WritingMode.vertical?Math.PI/2:0,Oe=0;Oe<Z.numGlyphs;Oe++)a.addDynamicAttributes(j,Me,Be);q&&Z.associatedIconIndex>=0&&(J[Z.associatedIconIndex]={shiftedAnchor:Me,angle:Be})}else In(Z.numGlyphs,j)}if(q){Y.clear();for(var Ke=n.icon.placedSymbolArray,st=0;st<Ke.length;st++){var ht=Ke.get(st);if(ht.hidden)In(ht.numGlyphs,Y);else{var ct=J[st];if(ct)for(var Ft=0;Ft<ht.numGlyphs;Ft++)a.addDynamicAttributes(Y,ct.shiftedAnchor,ct.angle);else In(ht.numGlyphs,Y)}}n.icon.dynamicLayoutVertexBuffer.updateData(Y)}n.text.dynamicLayoutVertexBuffer.updateData(j)}function Sl(n,o,i){return i.iconsInText&&o?"symbolTextAndIcon":n?"symbolSDF":"symbolIcon"}function Eo(n,o,i,u,p,f,d,x,A,R,q,V){for(var j=n.context,Y=j.gl,J=n.transform,re=x==="map",Z=A==="map",te=re&&i.layout.get("symbol-placement")!=="point",ae=re&&!Z&&!te,fe=i.layout.get("symbol-sort-key").constantOr(1)!==void 0,Se=!1,_e=n.depthModeForSublayer(0,G.ReadOnly),Ie=i.layout.get("text-variable-anchor"),Me=[],Be=0,Oe=u;Be<Oe.length;Be+=1){var Ke=Oe[Be],st=o.getTile(Ke),ht=st.getBucket(i);if(ht){var ct=p?ht.text:ht.icon;if(ct&&ct.segments.get().length){var Ft=ct.programConfigurations.get(i.id),Je=p||ht.sdfIcons,_t=p?ht.textSizeData:ht.iconSizeData,Et=Z||J.pitch!==0,gt=n.useProgram(Sl(Je,p,ht),Ft),vt=a.evaluateSizeForZoom(_t,J.zoom),St=void 0,mt=[0,0],ft=void 0,Yr=void 0,Pr=null,bn=void 0;if(p)ft=st.glyphAtlasTexture,Yr=Y.LINEAR,St=st.glyphAtlasTexture.size,ht.iconsInText&&(mt=st.imageAtlasTexture.size,Pr=st.imageAtlasTexture,bn=Et||n.options.rotating||n.options.zooming||_t.kind==="composite"||_t.kind==="camera"?Y.LINEAR:Y.NEAREST);else{var cn=i.layout.get("icon-size").constantOr(0)!==1||ht.iconsNeedLinear;ft=st.imageAtlasTexture,Yr=Je||n.options.rotating||n.options.zooming||cn||Et?Y.LINEAR:Y.NEAREST,St=st.imageAtlasTexture.size}var Ir=vr(st,1,n.transform.zoom),Or=Lr(Ke.posMatrix,Z,re,n.transform,Ir),Zn=nr(Ke.posMatrix,Z,re,n.transform,Ir),Pn=Ie&&ht.hasTextData(),no=i.layout.get("icon-text-fit")!=="none"&&Pn&&ht.hasIconData();te&&ha(ht,Ke.posMatrix,n,p,Or,Zn,Z,R);var Dn=n.translatePosMatrix(Ke.posMatrix,st,f,d),xi=te||p&&Ie||no?yi:Or,li=n.translatePosMatrix(Zn,st,f,d,!0),Ra=Je&&i.paint.get(p?"text-halo-width":"icon-halo-width").constantOr(1)!==0,ra={program:gt,buffers:ct,uniformValues:Je?ht.iconsInText?Qa(_t.kind,vt,ae,Z,n,Dn,xi,li,St,mt):_a(_t.kind,vt,ae,Z,n,Dn,xi,li,p,St):Xo(_t.kind,vt,ae,Z,n,Dn,xi,li,p,St),atlasTexture:ft,atlasTextureIcon:Pr,atlasInterpolation:Yr,atlasInterpolationIcon:bn,isSDF:Je,hasHalo:Ra};if(fe&&ht.canOverlap){Se=!0;for(var io=0,na=ct.segments.get();io<na.length;io+=1){var za=na[io];Me.push({segments:new a.SegmentVector([za]),sortKey:za.sortKey,state:ra})}}else Me.push({segments:ct.segments,sortKey:0,state:ra})}}}Se&&Me.sort((function(oo,Ro){return oo.sortKey-Ro.sortKey}));for(var Ii=0,La=Me;Ii<La.length;Ii+=1){var Ei=La[Ii],Qr=Ei.state;if(j.activeTexture.set(Y.TEXTURE0),Qr.atlasTexture.bind(Qr.atlasInterpolation,Y.CLAMP_TO_EDGE),Qr.atlasTextureIcon&&(j.activeTexture.set(Y.TEXTURE1),Qr.atlasTextureIcon&&Qr.atlasTextureIcon.bind(Qr.atlasInterpolationIcon,Y.CLAMP_TO_EDGE)),Qr.isSDF){var Oi=Qr.uniformValues;Qr.hasHalo&&(Oi.u_is_halo=1,ba(Qr.buffers,Ei.segments,i,n,Qr.program,_e,q,V,Oi)),Oi.u_is_halo=0}ba(Qr.buffers,Ei.segments,i,n,Qr.program,_e,q,V,Qr.uniformValues)}}function ba(n,o,i,u,p,f,d,x,A){var R=u.context;p.draw(R,R.gl.TRIANGLES,f,d,x,oe.disabled,A,i.id,n.layoutVertexBuffer,n.indexBuffer,o,i.paint,u.transform.zoom,n.programConfigurations.get(i.id),n.dynamicLayoutVertexBuffer,n.opacityVertexBuffer)}function es(n,o,i,u,p,f,d){var x,A,R,q,V,j=n.context.gl,Y=i.paint.get("fill-pattern"),J=Y&&Y.constantOr(1),re=i.getCrossfadeParameters();d?(A=J&&!i.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",x=j.LINES):(A=J?"fillPattern":"fill",x=j.TRIANGLES);for(var Z=0,te=u;Z<te.length;Z+=1){var ae=te[Z],fe=o.getTile(ae);
vendor: 5,572 bytes, line 497
497if(!J||fe.patternsLoaded()){var Se=fe.getBucket(i);if(Se){var _e=Se.programConfigurations.get(i.id),Ie=n.useProgram(A,_e);J&&(n.context.activeTexture.set(j.TEXTURE0),fe.imageAtlasTexture.bind(j.LINEAR,j.CLAMP_TO_EDGE),_e.updatePaintBuffers(re));var Me=Y.constantOr(null);if(Me&&fe.imageAtlas){var Be=fe.imageAtlas,Oe=Be.patternPositions[Me.to.toString()],Ke=Be.patternPositions[Me.from.toString()];Oe&&Ke&&_e.setConstantPatternPositions(Oe,Ke)}var st=n.translatePosMatrix(ae.posMatrix,fe,i.paint.get("fill-translate"),i.paint.get("fill-translate-anchor"));if(d){q=Se.indexBuffer2,V=Se.segments2;var ht=[j.drawingBufferWidth,j.drawingBufferHeight];R=A==="fillOutlinePattern"&&J?yl(st,n,re,fe,ht):dl(st,ht)}else q=Se.indexBuffer,V=Se.segments,R=J?wo(st,n,re,fe):Ji(st);Ie.draw(n.context,x,p,n.stencilModeForClipping(ae),f,oe.disabled,R,i.id,Se.layoutVertexBuffer,q,V,i.paint,n.transform.zoom,_e)}}}}function iu(n,o,i,u,p,f,d){for(var x=n.context,A=x.gl,R=i.paint.get("fill-extrusion-pattern"),q=R.constantOr(1),V=i.getCrossfadeParameters(),j=i.paint.get("fill-extrusion-opacity"),Y=0,J=u;Y<J.length;Y+=1){var re=J[Y],Z=o.getTile(re),te=Z.getBucket(i);if(te){var ae=te.programConfigurations.get(i.id),fe=n.useProgram(q?"fillExtrusionPattern":"fillExtrusion",ae);q&&(n.context.activeTexture.set(A.TEXTURE0),Z.imageAtlasTexture.bind(A.LINEAR,A.CLAMP_TO_EDGE),ae.updatePaintBuffers(V));var Se=R.constantOr(null);if(Se&&Z.imageAtlas){var _e=Z.imageAtlas,Ie=_e.patternPositions[Se.to.toString()],Me=_e.patternPositions[Se.from.toString()];Ie&&Me&&ae.setConstantPatternPositions(Ie,Me)}var Be=n.translatePosMatrix(re.posMatrix,Z,i.paint.get("fill-extrusion-translate"),i.paint.get("fill-extrusion-translate-anchor")),Oe=i.paint.get("fill-extrusion-vertical-gradient"),Ke=q?bo(Be,n,Oe,j,re,V,Z):fl(Be,n,Oe,j);fe.draw(x,x.gl.TRIANGLES,p,f,d,oe.backCCW,Ke,i.id,te.layoutVertexBuffer,te.indexBuffer,te.segments,i.paint,n.transform.zoom,ae)}}}function ts(n,o,i,u,p,f){var d=n.context,x=d.gl,A=o.fbo;if(A){var R=n.useProgram("hillshade");d.activeTexture.set(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,A.colorAttachment.get());var q=(function(V,j,Y){var J=Y.paint.get("hillshade-shadow-color"),re=Y.paint.get("hillshade-highlight-color"),Z=Y.paint.get("hillshade-accent-color"),te=Y.paint.get("hillshade-illumination-direction")*(Math.PI/180);Y.paint.get("hillshade-illumination-anchor")==="viewport"&&(te-=V.transform.angle);var ae,fe,Se,_e=!V.options.moving;return{u_matrix:V.transform.calculatePosMatrix(j.tileID.toUnwrapped(),_e),u_image:0,u_latrange:(ae=j.tileID,fe=Math.pow(2,ae.canonical.z),Se=ae.canonical.y,[new a.MercatorCoordinate(0,Se/fe).toLngLat().lat,new a.MercatorCoordinate(0,(Se+1)/fe).toLngLat().lat]),u_light:[Y.paint.get("hillshade-exaggeration"),te],u_shadow:J,u_highlight:re,u_accent:Z}})(n,o,i);R.draw(d,x.TRIANGLES,u,p,f,oe.disabled,q,i.id,n.rasterBoundsBuffer,n.quadTriangleIndexBuffer,n.rasterBoundsSegments)}}function Nc(n,o,i,u,p,f){var d=n.context,x=d.gl,A=o.dem;if(A&&A.data){var R=A.dim,q=A.stride,V=A.getPixels();if(d.activeTexture.set(x.TEXTURE1),d.pixelStoreUnpackPremultiplyAlpha.set(!1),o.demTexture=o.demTexture||n.getTileTexture(q),o.demTexture){var j=o.demTexture;j.update(V,{premultiply:!1}),j.bind(x.NEAREST,x.CLAMP_TO_EDGE)}else o.demTexture=new a.Texture(d,V,x.RGBA,{premultiply:!1}),o.demTexture.bind(x.NEAREST,x.CLAMP_TO_EDGE);d.activeTexture.set(x.TEXTURE0);var Y=o.fbo;if(!Y){var J=new a.Texture(d,{width:R,height:R,data:null},x.RGBA);J.bind(x.LINEAR,x.CLAMP_TO_EDGE),(Y=o.fbo=d.createFramebuffer(R,R,!0)).colorAttachment.set(J.texture)}d.bindFramebuffer.set(Y.framebuffer),d.viewport.set([0,0,R,R]),n.useProgram("hillshadePrepare").draw(d,x.TRIANGLES,u,p,f,oe.disabled,(function(re,Z){var te=Z.stride,ae=a.create();return a.ortho(ae,0,a.EXTENT,-a.EXTENT,0,0,1),a.translate(ae,ae,[0,-a.EXTENT,0]),{u_matrix:ae,u_image:1,u_dimension:[te,te],u_zoom:re.overscaledZ,u_unpack:Z.getUnpackVector()}})(o.tileID,A),i.id,n.rasterBoundsBuffer,n.quadTriangleIndexBuffer,n.rasterBoundsSegments),o.needsHillshadePrepare=!1}}function rs(n,o,i,u,p){var f=u.paint.get("raster-fade-duration");if(f>0){var d=a.browser.now(),x=(d-n.timeAdded)/f,A=o?(d-o.timeAdded)/f:-1,R=i.getSource(),q=p.coveringZoomLevel({tileSize:R.tileSize,roundZoom:R.roundZoom}),V=!o||Math.abs(o.tileID.overscaledZ-q)>Math.abs(n.tileID.overscaledZ-q),j=V&&n.refreshedUponExpiration?1:a.clamp(V?x:1-A,0,1);return n.refreshedUponExpiration&&x>=1&&(n.refreshedUponExpiration=!1),o?{opacity:1,mix:1-j}:{opacity:j,mix:0}}return{opacity:1,mix:0}}var ou=new a.Color(1,0,0,1),Tl=new a.Color(0,1,0,1),Il=new a.Color(0,0,1,1),ns=new a.Color(1,0,1,1),au=new a.Color(0,1,1,1);function su(n,o,i,u){wa(n,0,o+i/2,n.transform.width,i,u)}function uu(n,o,i,u){wa(n,o-i/2,0,i,n.transform.height,u)}function wa(n,o,i,u,p,f){var d=n.context,x=d.gl;x.enable(x.SCISSOR_TEST),x.scissor(o*a.browser.devicePixelRatio,i*a.browser.devicePixelRatio,u*a.browser.devicePixelRatio,p*a.browser.devicePixelRatio),d.clear({color:f}),x.disable(x.SCISSOR_TEST)}function El(n,o,i){var u=n.context,p=u.gl,f=i.posMatrix,d=n.useProgram("debug"),x=G.disabled,A=K.disabled,R=n.colorModeForRenderPass();u.activeTexture.set(p.TEXTURE0),n.emptyTexture.bind(p.LINEAR,p.CLAMP_TO_EDGE),d.draw(u,p.LINE_STRIP,x,A,R,oe.disabled,To(f,a.Color.red),"$debug",n.debugBuffer,n.tileBorderIndexBuffer,n.debugSegments);var q=o.getTileByID(i.key).latestRawTileData,V=Math.floor((q&&q.byteLength||0)/1024),j=o.getTile(i).tileSize,Y=512/Math.min(j,512)*(i.overscaledZ/n.transform.zoom)*.5,J=i.canonical.toString();i.overscaledZ!==i.canonical.z&&(J+=" =>
497 "+i.overscaledZ),(function(re,Z){re.initDebugOverlayCanvas();var te=re.debugOverlayCanvas,ae=re.context.gl,fe=re.debugOverlayCanvas.getContext("2d");fe.clearRect(0,0,te.width,te.height),fe.shadowColor="white",fe.shadowBlur=2,fe.lineWidth=1.5,fe.strokeStyle="white",fe.textBaseline="top",fe.font="bold 36px Open Sans, sans-serif",fe.fillText(Z,5,5),fe.strokeText(Z,5,5),re.debugOverlayTexture.update(te),re.debugOverlayTexture.bind(ae.LINEAR,ae.CLAMP_TO_EDGE)})(n,J+" "+V+"kb"),d.draw(u,p.TRIANGLES,x,A,ie.alphaBlended,oe.disabled,To(f,a.Color.transparent,Y),"$debug",n.debugBuffer,n.quadTriangleIndexBuffer,n.debugSegments)}var Ao={symbol:function(n,o,i,u,p){if(n.renderPass==="translucent"){var f=K.disabled,d=n.colorModeForRenderPass();i.layout.get("text-variable-anchor")&&(function(x,A,R,q,V,j,Y){for(var J=A.transform,re=V==="map",Z=j==="map",te=0,ae=x;te<ae.length;te+=1){var fe=ae[te],Se=q.getTile(fe),_e=Se.getBucket(R);if(_e&&_e.text&&_e.text.segments.get().length){var Ie=a.evaluateSizeForZoom(_e.textSizeData,J.zoom),Me=vr(Se,1,A.transform.zoom),Be=Lr(fe.posMatrix,Z,re,A.transform,Me),Oe=R.layout.get("icon-text-fit")!=="none"&&_e.hasIconData();if(Ie){var Ke=Math.pow(2,J.zoom-Se.tileID.overscaledZ);wl(_e,re,Z,Y,a.symbolSize,J,Be,fe.posMatrix,Ke,Ie,Oe)}}}})(u,n,i,o,i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),p),i.paint.get("icon-opacity").constantOr(1)!==0&&Eo(n,o,i,u,!1,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),i.layout.get("icon-rotation-alignment"),i.layout.get("icon-pitch-alignment"),i.layout.get("icon-keep-upright"),f,d),i.paint.get("text-opacity").constantOr(1)!==0&&Eo(n,o,i,u,!0,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),i.layout.get("text-keep-upright"),f,d),o.map.showCollisionBoxes&&(Ko(n,o,i,u,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),!0),Ko(n,o,i,u,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),!1))}},circle:function(n,o,i,u){if(n.renderPass==="translucent"){var p=i.paint.get("circle-opacity"),f=i.paint.get("circle-stroke-width"),d=i.paint.get("circle-stroke-opacity"),x=i.layout.get("circle-sort-key").constantOr(1)!==void 0;if(p.constantOr(1)!==0||f.constantOr(1)!==0&&d.constantOr(1)!==0){for(var A=n.context,R=A.gl,q=n.depthModeForSublayer(0,G.ReadOnly),V=K.disabled,j=n.colorModeForRenderPass(),Y=[],J=0;J<u.length;J++){var re=u[J],Z=o.getTile(re),te=Z.getBucket(i);if(te){var ae=te.programConfigurations.get(i.id),fe={programConfiguration:ae,program:n.useProgram("circle",ae),layoutVertexBuffer:te.layoutVertexBuffer,indexBuffer:te.indexBuffer,uniformValues:nu(n,re,Z,i)};if(x)for(var Se=0,_e=te.segments.get();Se<_e.length;Se+=1){var Ie=_e[Se];Y.push({segments:new a.SegmentVector([Ie]),sortKey:Ie.sortKey,state:fe})}else Y.push({segments:te.segments,sortKey:0,state:fe})}}x&&Y.sort((function(st,ht){return st.sortKey-ht.sortKey}));for(var Me=0,Be=Y;Me<Be.length;Me+=1){var Oe=Be[Me],Ke=Oe.state;Ke.program.draw(A,R.TRIANGLES,q,V,j,oe.disabled,Ke.uniformValues,i.id,Ke.layoutVertexBuffer,Ke.indexBuffer,Oe.segments,i.paint,n.transform.zoom,Ke.programConfiguration)}}}},heatmap:function(n,o,i,u){if(i.paint.get("heatmap-opacity")!==0)if(n.renderPass==="offscreen"){var p=n.context,f=p.gl,d=K.disabled,x=new ie([f.ONE,f.ONE],a.Color.transparent,[!0,!0,!0,!0]);(function(Y,J,re){var Z=Y.gl;Y.activeTexture.set(Z.TEXTURE1),Y.viewport.set([0,0,J.width/4,J.height/4]);var te=re.heatmapFbo;if(te)Z.bindTexture(Z.TEXTURE_2D,te.colorAttachment.get()),Y.bindFramebuffer.set(te.framebuffer);else{var ae=Z.createTexture();Z.bindTexture(Z.TEXTURE_2D,ae),Z.texParameteri(Z.TEXTURE_2D,Z.TEXTURE_WRAP_S,Z.CLAMP_TO_EDGE),Z.texParameteri(Z.TEXTURE_2D,Z.TEXTURE_WRAP_T,Z.CLAMP_TO_EDGE),Z.texParameteri(Z.TEXTURE_2D,Z.TEXTURE_MIN_FILTER,Z.LINEAR),Z.texParameteri(Z.TEXTURE_2D,Z.TEXTURE_MAG_FILTER,Z.LINEAR),te=re.heatmapFbo=Y.createFramebuffer(J.width/4,J.height/4,!1),(function(fe,Se,_e,Ie){var Me=fe.gl;Me.texImage2D(Me.TEXTURE_2D,0,Me.RGBA,Se.width/4,Se.height/4,0,Me.RGBA,fe.extRenderToTextureHalfFloat?fe.extTextureHalfFloat.HALF_FLOAT_OES:Me.UNSIGNED_BYTE,null),Ie.colorAttachment.set(_e)})(Y,J,ae,te)}})(p,n,i),p.clear({color:a.Color.transparent});for(var A=0;A<u.length;A++){var R=u[A];if(!o.hasRenderableParent(R)){var q=o.getTile(R),V=q.getBucket(i);if(V){var j=V.programConfigurations.get(i.id);n.useProgram("heatmap",j).draw(p,f.TRIANGLES,G.disabled,d,x,oe.disabled,vl(R.posMatrix,q,n.transform.zoom,i.paint.get("heatmap-intensity")),i.id,V.layoutVertexBuffer,V.indexBuffer,V.segments,i.paint,n.transform.zoom,j)}}}p.viewport.set([0,0,n.width,n.height])}else n.renderPass==="translucent"&&(n.context.setColorMode(n.colorModeForRenderPass()),(function(Y,J){var re=Y.context,Z=re.gl,te=J.heatmapFbo;if(te){re.activeTexture.set(Z.TEXTURE0),Z.bindTexture(Z.TEXTURE_2D,te.colorAttachment.get()),re.activeTexture.set(Z.TEXTURE1);var ae=J.colorRampTexture;ae||(ae=J.colorRampTexture=new a.Texture(re,J.colorRamp,Z.RGBA)),ae.b
497ind(Z.LINEAR,Z.CLAMP_TO_EDGE),Y.useProgram("heatmapTexture").draw(re,Z.TRIANGLES,G.disabled,K.disabled,Y.colorModeForRenderPass(),oe.disabled,(function(fe,Se,_e,Ie){var Me=a.create();a.ortho(Me,0,fe.width,fe.height,0,0,1);var Be=fe.context.gl;return{u_matrix:Me,u_world:[Be.drawingBufferWidth,Be.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:Se.paint.get("heatmap-opacity")}})(Y,J),J.id,Y.viewportBuffer,Y.quadTriangleIndexBuffer,Y.viewportSegments,J.paint,Y.transform.zoom)}})(n,i))},line:function(n,o,i,u){if(n.renderPass==="translucent"){var p=i.paint.get("line-opacity"),f=i.paint.get("line-width");if(p.constantOr(1)!==0&&f.constantOr(1)!==0)for(var d=n.depthModeForSublayer(0,G.ReadOnly),x=n.colorModeForRenderPass(),A=i.paint.get("line-dasharray"),R=i.paint.get("line-pattern"),q=R.constantOr(1),V=i.paint.get("line-gradient"),j=i.getCrossfadeParameters(),Y=q?"linePattern":A?"lineSDF":V?"lineGradient":"line",J=n.context,re=J.gl,Z=!0,te=0,ae=u;te<ae.length;te+=1){var fe=ae[te],Se=o.getTile(fe);if(!q||Se.patternsLoaded()){var _e=Se.getBucket(i);if(_e){var Ie=_e.programConfigurations.get(i.id),Me=n.context.program.get(),Be=n.useProgram(Y,Ie),Oe=Z||Be.program!==Me,Ke=R.constantOr(null);if(Ke&&Se.imageAtlas){var st=Se.imageAtlas,ht=st.patternPositions[Ke.to.toString()],ct=st.patternPositions[Ke.from.toString()];ht&&ct&&Ie.setConstantPatternPositions(ht,ct)}var Ft=q?Ja(n,Se,i,j):A?Bc(n,Se,i,A,j):V?pr(n,Se,i,_e.lineClipsArray.length):ga(n,Se,i);if(q)J.activeTexture.set(re.TEXTURE0),Se.imageAtlasTexture.bind(re.LINEAR,re.CLAMP_TO_EDGE),Ie.updatePaintBuffers(j);else if(A&&(Oe||n.lineAtlas.dirty))J.activeTexture.set(re.TEXTURE0),n.lineAtlas.bind(J);else if(V){var Je=_e.gradients[i.id],_t=Je.texture;if(i.gradientVersion!==Je.version){var Et=256;if(i.stepInterpolant){var gt=o.getSource().maxzoom,vt=fe.canonical.z===gt?Math.ceil(1<<n.transform.maxZoom-fe.canonical.z):1;Et=a.clamp(a.nextPowerOfTwo(_e.maxLineLength/a.EXTENT*1024*vt),256,J.maxTextureSize)}Je.gradient=a.renderColorRamp({expression:i.gradientExpression(),evaluationKey:"lineProgress",resolution:Et,image:Je.gradient||void 0,clips:_e.lineClipsArray}),Je.texture?Je.texture.update(Je.gradient):Je.texture=new a.Texture(J,Je.gradient,re.RGBA),Je.ver
497sion=i.gradientVersion,_t=Je.texture}J.activeTexture.set(re.TEXTURE0),_t.bind(i.stepInterpolant?re.NEAREST:re.LINEAR,re.CLAMP_TO_EDGE)}Be.draw(J,re.TRIANGLES,d,n.stencilModeForClipping(fe),x,oe.disabled,Ft,i.id,_e.layoutVertexBuffer,_e.indexBuffer,_e.segments,i.paint,n.transform.zoom,Ie,_e.layoutVertexBuffer2),Z=!1}}}}},fill:function(n,o,i,u){var p=i.paint.get("fill-color"),f=i.paint.get("fill-opacity");if(f.constantOr(1)!==0){var d=n.colorModeForRenderPass(),x=i.paint.get("fill-pattern"),A=n.opaquePassEnabledForLayer()&&!x.constantOr(1)&&p.constantOr(a.Color.transparent).a===1&&f.constantOr(0)===1?"opaque":"translucent";if(n.renderPass===A){var R=n.depthModeForSublayer(1,n.renderPass==="opaque"?G.ReadWrite:G.ReadOnly);es(n,o,i,u,R,d,!1)}if(n.renderPass==="translucent"&&i.paint.get("fill-antialias")){var q=n.depthModeForSublayer(i.getPaintProperty("fill-outline-color")?2:0,G.ReadOnly);es(n,o,i,u,q,d,!0)}}},"fill-extrusion":function(n,o,i,u){var p=i.paint.get("fill-extrusion-opacity");if(p!==0&&n.renderPass==="translucent"){var f=new G(n.context.gl.LEQUAL,G.ReadWrite,n.depthRangeFor3D);if(p!==1||i.paint.get("fill-extrusion-pattern").constantOr(1))iu(n,o,i,u,f,K.disabled,ie.disabled),iu(n,o,i,u,f,n.stencilModeFor3D(),n.colorModeForRenderPass());else{var d=n.colorModeForRenderPass();iu(n,o,i,u,f,K.disabled,d)}}},hillshade:function(n,o,i,u){if(n.renderPass==="offscreen"||n.renderPass==="translucent"){for(var p=n.context,f=n.depthModeForSublayer(0,G.ReadOnly),d=n.colorModeForRenderPass(),x=n.renderPass==="translucent"?n.stencilConfigForOverlap(u):[{},u],A=x[0],R=0,q=x[1];R<q.length;R+=1){var V=q[R],j=o.getTile(V);j.needsHillshadePrepare&&n.renderPass==="offscreen"?Nc(n,j,i,f,K.disabled,d):n.renderPass==="translucent"&&ts(n,j,i,f,A[V.overscaledZ],d)}p.viewport.set([0,0,n.width,n.height])}},raster:function(n,o,i,u){if(n.renderPass==="translucent"&&i.paint.get("raster-opacity")!==0&&u.length)for(var p=n.context,f=p.gl,d=o.getSource(),x=n.useProgram("raster"),A=n.colorModeForRenderPass(),R=d instanceof Ht?[{},u]:n.stencilConfigForOverlap(u),q=R[0],V=R[1],j=V[V.length-1].overscaledZ,Y=!n.options.moving,J=0,re=V;J<re.length;J+=1){var Z=re[J],te=n.depthModeForSublayer(Z.overscaledZ-j,i.paint.get("raster-opacity")===1?G.ReadWrite:G.ReadOnly,f.LESS),ae=o.getTile(Z),fe=n.transform.calculatePosMatrix(Z.toUnwrapped(),Y);ae.registerFadeDuration(i.paint.get("raster-fade-duration"));var Se=o.findLoadedParent(Z,0),_e=rs(ae,Se,o,i,n.transform),Ie=void 0,Me=void 0,Be=i.paint.get("raster-resampling")==="nearest"?f.NEAREST:f.LINEAR;p.activeTexture.set(f.TEXTURE0),ae.texture.bind(Be,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST),p.activeTexture.set(f.TEXTURE1),Se?(Se.texture.bind(Be,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST),Ie=Math.pow(2,Se.tileID.overscaledZ-ae.tileID.overscaledZ),Me=[ae.tileID.canonical.x*Ie%1,ae.tileID.canonical.y*Ie%1]):ae.texture.bind(Be,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST);var Oe=Fc(fe,Me||[0,0],Ie||1,_e,i);d instanceof Ht?x.draw(p,f.TRIANGLES,te,K.disabled,A,oe.disabled,Oe,i.id,d.boundsBuffer,n.quadTriangleIndexBuffer,d.boundsSegments):x.draw(p,f.TRIANGLES,te,q[Z.overscaledZ],A,oe.disabled,Oe,i.id,n.rasterBoundsBuffer,n.quadTriangleIndexBuffer,n.rasterBoundsSegments)}},background:function(n,o,i){var u=i.paint.get("background-color"),p=i.paint.get("background-opacity");if(p!==0){var f=n.context,d=f.gl,x=n.transform,A=x.tileSize,R=i.paint.get("background-pattern");if(!n.isPatternMissing(R)){var q=!R&&u.a===1&&p===1&&n.opaquePassEnabledForLayer()?"opaque":"translucent";if(n.renderPass===q){var V=K.disabled,j=n.depthModeForSublayer(0,q==="opaque"?G.ReadWrite:G.ReadOnly),Y=n.colorModeForRenderPass(),J=n.useProgram(R?"backgroundPattern":"background"),re=x.coveringTiles({tileSize:A});R&&(f.activeTexture.set(d.TEXTURE0),n.imageManager.bind(n.context));for(var Z=i.getCrossfadeParameters(),te=0,ae=re;te<ae.length;te+=1){var fe=ae[te],Se=n.transform.calculatePosMatrix(fe.toUnwrapped()),_e=R?Ho(Se,p,n,R,{tileID:fe,tileSize:A},Z):xa(Se,p,u);J.draw(f,d.TRIANGLES,j,V,Y,oe.disabled,_e,i.id,n.tileExtentBuffer,n.quadTriangleIndexBuffer,n.tileExtentSegments)}}}}},debug:function(n,o,i){for(var u=0;u<i.length;u++)El(n,o,i[u])},custom:function(n,o,i){var u=n.context,p=i.implementation;if(n.renderPass==="offscreen"){var f=p.prerender;f&&(n.setCustomLayerDefaults(),u.setColorMode(n.colorModeForRenderPass()),f.call(p,u.gl,n.transform.customLayerMatrix()),u.setDirty(),n.setBaseState())}else if(n.renderPass==="translucent"){n.setCustomLayerDefaults(),u.setColorMode(n.colorModeForRenderPass()),u.setStencilMode(K.disabled);var d=p.renderingMode==="3d"?new G(n.context.gl.LEQUAL,G.ReadWrite,n.depthRangeFor3D):n.depthModeForSublayer(0,G.ReadOnly);
vendor: 6,527 bytes, line 497
497u.setDepthMode(d),p.render(u.gl,n.transform.customLayerMatrix()),u.setDirty(),n.setBaseState(),u.bindFramebuffer.set(null)}}},gr=function(n,o){this.context=new U(n),this.transform=o,this._tileTextures={},this.setup(),this.numSublayers=Q.maxUnderzooming+Q.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Gi,this.gpuTimers={}};gr.prototype.resize=function(n,o){if(this.width=n*a.browser.devicePixelRatio,this.height=o*a.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var i=0,u=this.style._order;i<u.length;i+=1)this.style._layers[u[i]].resize()},gr.prototype.setup=function(){var n=this.context,o=new a.StructArrayLayout2i4;o.emplaceBack(0,0),o.emplaceBack(a.EXTENT,0),o.emplaceBack(0,a.EXTENT),o.emplaceBack(a.EXTENT,a.EXTENT),this.tileExtentBuffer=n.createVertexBuffer(o,jr.members),this.tileExtentSegments=a.SegmentVector.simpleSegment(0,0,4,2);var i=new a.StructArrayLayout2i4;i.emplaceBack(0,0),i.emplaceBack(a.EXTENT,0),i.emplaceBack(0,a.EXTENT),i.emplaceBack(a.EXTENT,a.EXTENT),this.debugBuffer=n.createVertexBuffer(i,jr.members),this.debugSegments=a.SegmentVector.simpleSegment(0,0,4,5);var u=new a.StructArrayLayout4i8;u.emplaceBack(0,0,0,0),u.emplaceBack(a.EXTENT,0,a.EXTENT,0),u.emplaceBack(0,a.EXTENT,0,a.EXTENT),u.emplaceBack(a.EXTENT,a.EXTENT,a.EXTENT,a.EXTENT),this.rasterBoundsBuffer=n.createVertexBuffer(u,lr.members),this.rasterBoundsSegments=a.SegmentVector.simpleSegment(0,0,4,2);var p=new a.StructArrayLayout2i4;p.emplaceBack(0,0),p.emplaceBack(1,0),p.emplaceBack(0,1),p.emplaceBack(1,1),this.viewportBuffer=n.createVertexBuffer(p,jr.members),this.viewportSegments=a.SegmentVector.simpleSegment(0,0,4,2);var f=new a.StructArrayLayout1ui2;f.emplaceBack(0),f.emplaceBack(1),f.emplaceBack(3),f.emplaceBack(2),f.emplaceBack(0),this.tileBorderIndexBuffer=n.createIndexBuffer(f);var d=new a.StructArrayLayout3ui6;d.emplaceBack(0,1,2),d.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=n.createIndexBuffer(d),this.emptyTexture=new a.Texture(n,{width:1,height:1,data:new Uint8Array([0,0,0,0])},n.gl.RGBA);var x=this.context.gl;this.stencilClearMode=new K({func:x.ALWAYS,mask:0},0,255,x.ZERO,x.ZERO,x.ZERO)},gr.prototype.clearStencil=function(){var n=this.context,o=n.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var i=a.create();a.ortho(i,0,this.width,this.height,0,0,1),a.scale(i,i,[o.drawingBufferWidth,o.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(n,o.TRIANGLES,G.disabled,this.stencilClearMode,ie.disabled,oe.disabled,Io(i),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},gr.prototype._renderTileClippingMasks=function(n,o){if(this.currentStencilSource!==n.source&&n.isTileClipped()&&o&&o.length){this.currentStencilSource=n.source;var i=this.context,u=i.gl;this.nextStencilID+o.length>256&&this.clearStencil(),i.setColorMode(ie.disabled),i.setDepthMode(G.disabled);var p=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var f=0,d=o;f<d.length;f+=1){var x=d[f],A=this._tileClippingMaskIDs[x.key]=this.nextStencilID++;p.draw(i,u.TRIANGLES,G.disabled,new K({func:u.ALWAYS,mask:0},A,255,u.KEEP,u.KEEP,u.REPLACE),ie.disabled,oe.disabled,Io(x.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},gr.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var n=this.nextStencilID++,o=this.context.gl;return new K({func:o.NOTEQUAL,mask:255},n,255,o.KEEP,o.KEEP,o.REPLACE)},gr.prototype.stencilModeForClipping=function(n){var o=this.context.gl;return new K({func:o.EQUAL,mask:255},this._tileClippingMaskIDs[n.key],0,o.KEEP,o.KEEP,o.REPLACE)},gr.prototype.stencilConfigForOverlap=function(n){var o,i=this.context.gl,u=n.sort((function(A,R){return R.overscaledZ-A.overscaledZ})),p=u[u.length-1].overscaledZ,f=u[0].overscaledZ-p+1;if(f>1){this.currentStencilSource=void 0,this.nextStencilID+f>256&&this.clearStencil();for(var d={},x=0;x<f;x++)d[x+p]=new K({func:i.GEQUAL,mask:255},x+this.nextStencilID,255,i.KEEP,i.KEEP,i.REPLACE);return this.nextStencilID+=f,[d,u]}return[(o={},o[p]=K.disabled,o),u]},gr.prototype.colorModeForRenderPass=function(){var n=this.context.gl;return this._showOverdrawInspector?new ie([n.CONSTANT_COLOR,n.ONE],new a.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?ie.unblended:ie.alphaBlended},gr.prototype.depthModeForSublayer=function(n,o,i){if(!this.opaquePassEnabledForLayer())return G.disabled;var u=1-((1+this.currentLayer)*this.numSublayers+n)*this.depthEpsilon;return new G(i||this.context.gl.LEQUAL,o,[u,u])},gr.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},gr.prototype.render=function(n,o){var i=this;this.style=n,this.options=o,this.lineAtlas=n.lineAtlas,this.imageManager=n.imageManager,this.glyphManager=n.glyphManager,this.symbolFadeChange=n.placement.symbolFadeChange(a.browser.now()),this.imageManager.beginFrame();var u=this.style._order,p=this.style.sourceCaches;for(var f in p){var d=p[f];d.used&&d.prepare(this.context)}var x,A,R={},q={},V={};for(var j in p){var Y=p[j];R[j]=Y.getVisibleCoordinates(),q[j]=R[j].slice().reverse(),V[j]=Y.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var J=0;J<u.length;J++)if(this.style._layers[u[J]].is3D()){this.opaquePassCutoff=J;break}this.renderPass="offscreen";for(var re=0,Z=u;re<Z.length;re+=1){var te=this.style._layers[Z[re]];if(te.hasOffscreenPass()&&!te.isHidden(this.transform.zoom)){var ae=q[te.source];(te.type==="custom"||ae.length)&&this.renderLayer(this,p[te.source],te,ae)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:o.showOverdrawInspector?a.Color.black:a.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=o.showOverdrawInspector,this.depthRangeFor3D=[0,1-(n._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=u.length-1;this.currentLayer>=0;this.currentLayer--){var fe=this.style._layers[u[this.currentLayer]],Se=p[fe.source],_e=R[fe.source];this._renderTileClippingMasks(fe,_e),this.renderLayer(this,Se,fe,_e)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<u.length;this.currentLayer++){var Ie=this.style._layers[u[this.currentLayer]],Me=p[Ie.source],Be=(Ie.type==="symbol"?V:q)[Ie.source];this._renderTileClippingMasks(Ie,R[Ie.source]),this.renderLayer(this,Me,Ie,Be)}this.options.showTileBoundaries&&(a.values(this.style._layers).forEac
497h((function(Oe){Oe.source&&!Oe.isHidden(i.transform.zoom)&&(Oe.source!==(A&&A.id)&&(A=i.style.sourceCaches[Oe.source]),(!x||x.getSource().maxzoom<A.getSource().maxzoom)&&(x=A))})),x&&Ao.debug(this,x,x.getVisibleCoordinates())),this.options.showPadding&&(function(Oe){var Ke=Oe.transform.padding;su(Oe,Oe.transform.height-(Ke.top||0),3,ou),su(Oe,Ke.bottom||0,3,Tl),uu(Oe,Ke.left||0,3,Il),uu(Oe,Oe.transform.width-(Ke.right||0),3,ns);var st=Oe.transform.centerPoint;(function(ht,ct,Ft,Je){wa(ht,ct-1,Ft-10,2,20,Je),wa(ht,ct-10,Ft-1,20,2,Je)})(Oe,st.x,Oe.transform.height-st.y,au)})(this),this.context.setDefault()},gr.prototype.renderLayer=function(n,o,i,u){i.isHidden(this.transform.zoom)||(i.type==="background"||i.type==="custom"||u.length)&&(this.id=i.id,this.gpuTimingStart(i),Ao[i.type](n,o,i,u,this.style.placement.variableOffsets),this.gpuTimingEnd())},gr.prototype.gpuTimingStart=function(n){if(this.options.gpuTiming){var o=this.context.extTimerQuery,i=this.gpuTimers[n.id];i||(i=this.gpuTimers[n.id]={calls:0,cpuTime:0,query:o.createQueryEXT()}
vendor: 34,024 bytes, line 497
497),i.calls++,o.beginQueryEXT(o.TIME_ELAPSED_EXT,i.query)}},gr.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var n=this.context.extTimerQuery;n.endQueryEXT(n.TIME_ELAPSED_EXT)}},gr.prototype.collectGpuTimers=function(){var n=this.gpuTimers;return this.gpuTimers={},n},gr.prototype.queryGpuTimers=function(n){var o={};for(var i in n){var u=n[i],p=this.context.extTimerQuery,f=p.getQueryObjectEXT(u.query,p.QUERY_RESULT_EXT)/1e6;p.deleteQueryEXT(u.query),o[i]=f}return o},gr.prototype.translatePosMatrix=function(n,o,i,u,p){if(!i[0]&&!i[1])return n;var f=p?u==="map"?this.transform.angle:0:u==="viewport"?-this.transform.angle:0;if(f){var d=Math.sin(f),x=Math.cos(f);i=[i[0]*x-i[1]*d,i[0]*d+i[1]*x]}var A=[p?i[0]:vr(o,i[0],this.transform.zoom),p?i[1]:vr(o,i[1],this.transform.zoom),0],R=new Float32Array(16);return a.translate(R,n,A),R},gr.prototype.saveTileTexture=function(n){var o=this._tileTextures[n.size[0]];o?o.push(n):this._tileTextures[n.size[0]]=[n]},gr.prototype.getTileTexture=function(n){var o=this._tileTextures[n];return o&&o.length>0?o.pop():null},gr.prototype.isPatternMissing=function(n){if(!n)return!1;if(!n.from||!n.to)return!0;var o=this.imageManager.getPattern(n.from.toString()),i=this.imageManager.getPattern(n.to.toString());return!o||!i},gr.prototype.useProgram=function(n,o){this.cache=this.cache||{};var i=""+n+(o?o.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[i]||(this.cache[i]=new pl(this.context,n,Oc[n],o,xl[n],this._showOverdrawInspector)),this.cache[i]},gr.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()},gr.prototype.setBaseState=function(){var n=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(n.FUNC_ADD)},gr.prototype.initDebugOverlayCanvas=function(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=a.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new a.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},gr.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var is=function(n,o){this.points=n,this.planes=o};is.fromInvProjectionMatrix=function(n,o,i){var u=Math.pow(2,i),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 a.transformMat4([],d,n)})).map((function(d){return a.scale$1([],d,1/d[3]/o*u)})),f=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(d){var x=a.sub([],p[d[0]],p[d[1]]),A=a.sub([],p[d[2]],p[d[1]]),R=a.normalize([],a.cross([],x,A)),q=-a.dot(R,p[d[1]]);return R.concat(q)}));return new is(p,f)};var Co=function(n,o){this.min=n,this.max=o,this.center=a.scale$2([],a.add([],this.min,this.max),.5)};Co.prototype.quadrant=function(n){for(var o=[n%2==0,n<2],i=a.clone$2(this.min),u=a.clone$2(this.max),p=0;p<o.length;p++)i[p]=o[p]?this.min[p]:this.center[p],u[p]=o[p]?this.center[p]:this.max[p];return u[2]=this.max[2],new Co(i,u)},Co.prototype.distanceX=function(n){return Math.max(Math.min(this.max[0],n[0]),this.min[0])-n[0]},Co.prototype.distanceY=function(n){return Math.max(Math.min(this.max[1],n[1]),this.min[1])-n[1]},Co.prototype.intersects=function(n){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]],i=!0,u=0;u<n.planes.length;u++){for(var p=n.planes[u],f=0,d=0;d<o.length;d++)f+=a.dot$1(p,o[d])>=0;if(f===0)return 0;f!==o.length&&(i=!1)}if(i)return 2;for(var x=0;x<3;x++){for(var A=Number.MAX_VALUE,R=-Number.MAX_VALUE,q=0;q<n.points.length;q++){var V=n.points[q][x]-this.min[x];A=Math.min(A,V),R=Math.max(R,V)}if(R<0||A>this.max[x]-this.min[x])return 0}return 1};var Yi=function(n,o,i,u){if(n===void 0&&(n=0),o===void 0&&(o=0),i===void 0&&(i=0),u===void 0&&(u=0),isNaN(n)||n<0||isNaN(o)||o<0||isNaN(i)||i<0||isNaN(u)||u<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=n,this.bottom=o,this.left=i,this.right=u};Yi.prototype.interpolate=function(n,o,i){return o.top!=null&&n.top!=null&&(this.top=a.number(n.top,o.top,i)),o.bottom!=null&&n.bottom!=null&&(this.bottom=a.number(n.bottom,o.bottom,i)),o.left!=null&&n.left!=null&&(this.left=a.number(n.left,o.left,i)),o.right!=null&&n.right!=null&&(this.right=a.number(n.right,o.right,i)),this},Yi.prototype.getCenter=function(n,o){var i=a.clamp((this.left+n-this.right)/2,0,n),u=a.clamp((this.top+o-this.bottom)/2,0,o);return new a.Point(i,u)},Yi.prototype.equals=function(n){return this.top===n.top&&this.bottom===n.bottom&&this.left===n.left&&this.right===n.right},Yi.prototype.clone=function(){return new Yi(this.top,this.bottom,this.left,this.right)},Yi.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Dt=function(n,o,i,u,p){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=p===void 0||p,this._minZoom=n||0,this._maxZoom=o||22,this._minPitch=i??0,this._maxPitch=u??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new a.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Yi,this._posMatrixCache={},this._alignedPosMatrixCache={}},hr={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}};Dt.prototype.clone=function(){var n=new Dt(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return n.tileSize=this.tileSize,n.latRange=this.latRange,n.width=this.width,n.height=this.height,n._center=this._center,n.zoom=this.zoom,n.angle=this.angle,n._fov=this._fov,n._pitch=this._pitch,n._unmodified=this._unmodified,n._edgeInsets=this._edgeInsets.clone(),n._calcMatrices(),n},hr.minZoom.get=function(){return this._minZoom},hr.minZoom.set=function(n){this._minZoom!==n&&(this._minZoom=n,this.zoom=Math.max(this.zoom,n))},hr.maxZoom.get=function(){return this._maxZoom},hr.maxZoom.set=function(n){this._maxZoom!==n&&(this._maxZoom=n,this.zoom=Math.min(this.zoom,n))},hr.minPitch.get=function(){return this._minPitch},hr.minPitch.set=function(n){this._minPitch!==n&&(this._minPitch=n,this.pitch=Math.max(this.pitch,n))},hr.maxPitch.get=function(){return this._maxPitch},hr.maxPitch.set=function(n){this._maxPitch!==n&&(this._maxPitch=n,this.pitch=Math.min(this.pitch,n))},hr.renderWorldCopies.get=function(){return this._renderWorldCopies},hr.renderWorldCopies.set=function(n){n===void 0?n=!0:n===null&&(n=!1),this._renderWorldCopies=n},hr.worldSize.get=function(){return this.tileSize*this.scale},hr.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},hr.size.get=function(){return new a.Point(this.width,this.height)},hr.bearing.get=function(){return-this.angle/Math.PI*180},hr.bearing.set=function(n){var o=-a.wrap(n,-180,180)*Math.PI/180;this.angle!==o&&(this._unmodified=!1,this.angle=o,this._calcMatrices(),this.rotationMatrix=a.create$2(),a.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},hr.pitch.get=function(){return this._pitch/Math.PI*180},hr.pitch.set=function(n){var o=a.clamp(n,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==o&&(this._unmodified=!1,this._pitch=o,this._calcMatrices())},hr.fov.get=function(){return this._fov/Math.PI*180},hr.fov.set=function(n){n=Math.max(.01,Math.min(60,n)),this._fov!==n&&(this._unmodified=!1,this._fov=n/180*Math.PI,this._calcMatrices())},hr.zoom.get=function(){return this._zoom},hr.zoom.set=function(n){var o=Math.min(Math.max(n,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())},hr.center.get=function(){return this._center},hr.center.set=function(n){n.lat===this._center.lat&&n.lng===this._center.lng||(this._unmodified=!1,this._center=n,this._constrain(),this._calcMatrices())},hr.padding.get=function(){return this._edgeInsets.toJSON()},hr.padding.set=function(n){this._edgeInsets.equals(n)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,n,1),this._calcMatrices())},hr.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Dt.prototype.isPaddingEqual=function(n){return this._edgeInsets.equals(n)},Dt.prototype.interpolatePadding=function(n,o,i){this._unmodified=!1,this._edgeInsets.interpolate(n,o,i),this._constrain(),this._calcMatrices()},Dt.prototype.coveringZoomLevel=function(n){var o=(n.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/n.tileSize));return Math.max(0,o)},Dt.prototype.getVisibleUnwrappedCoordinates=function(n){var o=[new a.UnwrappedTileID(0,n)];if(this._renderWorldCopies)for(var i=this.pointCoordinate(new a.Point(0,0)),u=this.pointCoordinate(new a.Point(this.width,0)),p=this.pointCoordinate(new a.Point(this.width,this.height)),f=this.pointCoordinate(new a.Point(0,this.height)),d=Math.floor(Math.min(i.x,u.x,p.x,f.x)),x=Math.floor(Math.max(i.x,u.x,p.x,f.x)),A=d-1;A<=x+1;A++)A!==0&&o.push(new a.UnwrappedTileID(A,n));return o},Dt.prototype.coveringTiles=function(n){var o=this.coveringZoomLevel(n),i=o;if(n.minzoom!==void 0&&o<n.minzoom)return[];n.maxzoom!==void 0&&o>n.maxzoom&&(o=n.maxzoom);var u=a.MercatorCoordinate.fromLngLat(this.center),p=Math.pow(2,o),f=[p*u.x,p*u.y,0],d=is.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,o),x=n.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(x=o);var A=function(Oe){return{aabb:new Co([Oe*p,0,0],[(Oe+1)*p,p,0]),zoom:0,x:0,y:0,wrap:Oe,fullyVisible:!1}},R=[],q=[],V=o,j=n.reparseOverscaled?i:o;if(this._renderWorldCopies)for(var Y=1;Y<=3;Y++)R.push(A(-Y)),R.push(A(Y));for(R.push(A(0));R.length>0;){var J=R.pop(),re=J.x,Z=J.y,te=J.fullyVisible;if(!te){var ae=J.aabb.intersects(d);if(ae===0)continue;te=ae===2}var fe=J.aabb.distanceX(f),Se=J.aabb.distanceY(f),_e=Math.max(Math.abs(fe),Math.abs(Se));if(J.zoom===V||_e>3+(1<<V-J.zoom)-2&&J.zoom>=x)q.push({tileID:new a.OverscaledTileID(J.zoom===V?j:J.zoom,J.wrap,J.zoom,re,Z),distanceSq:a.sqrLen([f[0]-.5-re,f[1]-.5-Z])});else for(var Ie=0;Ie<4;Ie++){var Me=(re<<1)+Ie%2,Be=(Z<<1)+(Ie>>1);R.push({aabb:J.aabb.quadrant(Ie),zoom:J.zoom+1,x:Me,y:Be,wrap:J.wrap,fullyVisible:te})}}return q.sort((function(Oe,Ke){return Oe.distanceSq-Ke.distanceSq})).map((function(Oe){return Oe.tileID}))},Dt.prototype.resize=function(n,o){this.width=n,this.height=o,this.pixelsToGLUnits=[2/n,-2/o],this._constrain(),this._calcMatrices()},hr.unmodified.get=function(){return this._unmodified},Dt.prototype.zoomScale=function(n){return Math.pow(2,n)},Dt.prototype.scaleZoom=function(n){return Math.log(n)/Math.LN2},Dt.prototype.project=function(n){var o=a.clamp(n.lat,-this.maxValidLatitude,this.maxValidLatitude);return new a.Point(a.mercatorXfromLng(n.lng)*this.worldSize,a.mercatorYfromLat(o)*this.worldSize)},Dt.prototype.unproject=function(n){return new a.MercatorCoordinate(n.x/this.worldSize,n.y/this.worldSize).toLngLat()},hr.point.get=function(){return this.project(this.center)},Dt.prototype.setLocationAtPoint=function(n,o){var i=this.pointCoordinate(o),u=this.pointCoordinate(this.centerPoint),p=this.locationCoordinate(n),f=new a.MercatorCoordinate(p.x-(i.x-u.x),p.y-(i.y-u.y));this.center=this.coordinateLocation(f),this._renderWorldCopies&&(this.center=this.center.wrap())},Dt.prototype.locationPoint=function(n){return this.coordinatePoint(this.locationCoordinate(n))},Dt.prototype.pointLocation=function(n){return this.coordinateLocation(this.pointCoordinate(n))},Dt.prototype.locationCoordinate=function(n){return a.MercatorCoordinate.fromLngLat(n)},Dt.prototype.coordinateLocation=function(n){return n.toLngLat()},Dt.prototype.pointCoordinate=function(n){var o=[n.x,n.y,0,1],i=[n.x,n.y,1,1];a.transformMat4(o,o,this.pixelMatrixInverse),a.transformMat4(i,i,this.pixelMatrixInverse);var u=o[3],p=i[3],f=o[1]/u,d=i[1]/p,x=o[2]/u,A=i[2]/p,R=x===A?0:(0-x)/(A-x);return new a.MercatorCoordinate(a.number(o[0]/u,i[0]/p,R)/this.worldSize,a.number(f,d,R)/this.worldSize)},Dt.prototype.coordinatePoint=function(n){var o=[n.x*this.worldSize,n.y*this.worldSize,0,1];return a.transformMat4(o,o,this.pixelMatrix),new a.Point(o[0]/o[3],o[1]/o[3])},Dt.prototype.getBounds=function(){return new a.LngLatBounds().extend(this.pointLocation(new a.Point(0,0))).extend(this.pointLocation(new a.Point(this.width,0))).extend(this.pointLocation(new a.Point(this.width,this.height))).extend(this.pointLocation(new a.Point(0,this.height)))},Dt.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new a.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},Dt.prototype.setMaxBounds=function(n){n?(this.lngRange=[n.getWest(),n.getEast()],this.latRange=[n.getSouth(),n.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Dt.prototype.calculatePosMatrix=function(n,o){o===void 0&&(o=!1);var i=n.key,u=o?this._alignedPosMatrixCache:this._posMatrixCache;if(u[i])return u[i];var p=n.canonical,f=this.worldSize/this.zoomScale(p.z),d=p.x+Math.pow(2,p.z)*n.wrap,x=a.identity(new Float64Array(16));return a.translate(x,x,[d*f,p.y*f,0]),a.scale(x,x,[f/a.EXTENT,f/a.EXTENT,1]),a.multiply(x,o?this.alignedProjMatrix:this.projMatrix,x),u[i]=new Float32Array(x),u[i]},Dt.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Dt.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var n,o,i,u,p=-90,f=90,d=-180,x=180,A=this.size,R=this._unmodified;if(this.latRange){var q=this.latRange;p=a.mercatorYfromLat(q[1])*this.worldSize,n=(f=a.mercatorYfromLat(q[0])*this.worldSize)-p<A.y?A.y/(f-p):0}if(this.lngRange){var V=this.lngRange;d=a.mercatorXfromLng(V[0])*this.worldSize,o=(x=a.mercatorXfromLng(V[1])*this.worldSize)-d<A.x?A.x/(x-d):0}var j=this.point,Y=Math.max(o||0,n||0);if(Y)return this.center=this.unproject(new a.Point(o?(x+d)/2:j.x,n?(f+p)/2:j.y)),this.zoom+=this.scaleZoom(Y),this._unmodified=R,void(this._constraining=!1);if(this.latRange){var J=j.y,re=A.y/2;J-re<p&&(u=p+re),J+re>f&&(u=f-re)}if(this.lngRange){var Z=j.x,te=A.x/2;Z-te<d&&(i=d+te),Z+te>x&&(i=x-te)}i===void 0&&u===void 0||(this.center=this.unproject(new a.Point(i!==void 0?i:j.x,u!==void 0?u:j.y))),this._unmodified=R,this._constraining=!1}},Dt.prototype._calcMatrices=function(){if(this.height){var n=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var o=Math.PI/2+this._pitch,i=this._fov*(.5+n.y/this.height),u=Math.sin(i)*this.cameraToCenterDistance/Math.sin(a.clamp(Math.PI-o-i,.01,Math.PI-.01)),p=this.point,f=p.x,d=p.y,x=1.01*(Math.cos(Math.PI/2-this._pitch)*u+this.cameraToCenterDistance),A=this.height/50,R=new Float64Array(16);a.perspective(R,this._fov,this.width/this.height,A,x),R[8]=2*-n.x/this.width,R[9]=2*n.y/this.height,a.scale(R,R,[1,-1,1]),a.translate(R,R,[0,0,-this.cameraToCenterDistance]),a.rotateX(R,R,this._pitch),a.rotateZ(R,R,this.angle),a.translate(R,R,[-f,-d,0]),this.mercatorMatrix=a.scale([],R,[this.worldSize,this.worldSize,this.worldSize]),a.scale(R,R,[1,1,a.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=R,this.invProjMatrix=a.invert([],this.projMatrix);var q=this.width%2/2,V=this.height%2/2,j=Math.cos(this.angle),Y=Math.sin(this.angle),J=f-Math.round(f)+j*q+Y*V,re=d-Math.round(d)+j*V+Y*q,Z=new Float64Array(R);if(a.translate(Z,Z,[J>.5?J-1:J,re>.5?re-1:re,0]),this.alignedProjMatrix=Z,R=a.create(),a.scale(R,R,[this.width/2,-this.height/2,1]),a.translate(R,R,[1,-1,0]),this.labelPlaneMatrix=R,R=a.create(),a.scale(R,R,[1,-1,1]),a.translate(R,R,[-1,-1,0]),a.scale(R,R,[2/this.width,2/this.height,1]),this.glCoordMatrix=R,this.pixelMatrix=a.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(R=a.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=R,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Dt.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var n=this.pointCoordinate(new a.Point(0,0)),o=[n.x*this.worldSize,n.y*this.worldSize,0,1];return a.transformMat4(o,o,this.pixelMatrix)[3]/this.cameraToCenterDistance},Dt.prototype.getCameraPoint=function(){var n=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.Point(0,n))},Dt.prototype.getCameraQueryGeometry=function(n){var o=this.getCameraPoint();if(n.length===1)return[n[0],o];for(var i=o.x,u=o.y,p=o.x,f=o.y,d=0,x=n;d<x.length;d+=1){var A=x[d];i=Math.min(i,A.x),u=Math.min(u,A.y),p=Math.max(p,A.x),f=Math.max(f,A.y)}return[new a.Point(i,u),new a.Point(p,u),new a.Point(p,f),new a.Point(i,f),new a.Point(i,u)]},Object.defineProperties(Dt.prototype,hr);var Jn=function(n){var o,i,u,p;this._hashName=n&&encodeURIComponent(n),a.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(o=this._updateHashUnthrottled.bind(this),i=!1,u=null,p=function(){u=null,i&&(o(),u=setTimeout(p,300),i=!1)},function(){return i=!0,u||p(),u})};Jn.prototype.addTo=function(n){return this._map=n,a.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Jn.prototype.remove=function(){return a.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Jn.prototype.getHashString=function(n){var o=this._map.getCenter(),i=Math.round(100*this._map.getZoom())/100,u=Math.ceil((i*Math.LN2+Math.log(512/360/.5))/Math.LN10),p=Math.pow(10,u),f=Math.round(o.lng*p)/p,d=Math.round(o.lat*p)/p,x=this._map.getBearing(),A=this._map.getPitch(),R="";if(R+=n?"/"+f+"/"+d+"/"+i:i+"/"+d+"/"+f,(x||A)&&(R+="/"+Math.round(10*x)/10),A&&(R+="/"+Math.round(A)),this._hashName){var q=this._hashName,V=!1,j=a.window.location.hash.slice(1).split("&").map((function(Y){var J=Y.split("=")[0];return J===q?(V=!0,J+"="+R):Y})).filter((function(Y){return Y}));return V||j.push(q+"="+R),"#"+j.join("&")}return"#"+R},Jn.prototype._getCurrentHash=function(){var n,o=this,i=a.window.location.hash.replace("#","");return this._hashName?(i.split("&").map((function(u){return u.split("=")})).forEach((function(u){u[0]===o._hashName&&(n=u)})),(n&&n[1]||"").split("/")):i.split("/")},Jn.prototype._onHashChange=function(){var n=this._getCurrentHash();if(n.length>=3&&!n.some((function(i){return isNaN(i)}))){var o=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(n[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+n[2],+n[1]],zoom:+n[0],bearing:o,pitch:+(n[4]||0)}),!0}return!1},Jn.prototype._updateHashUnthrottled=function(){var n=a.window.location.href.replace(/(#.+)?$/,this.getHashString());try{a.window.history.replaceState(a.window.history.state,null,n)}catch{}};var Sa={linearity:.3,easing:a.bezier(0,0,.3,1)},Jo=a.extend({deceleration:2500,maxSpeed:1400},Sa),Ta=a.extend({deceleration:20,maxSpeed:1400},Sa),qc=a.extend({deceleration:1e3,maxSpeed:360},Sa),Uc=a.extend({deceleration:1e3,maxSpeed:90},Sa),Ia=function(n){this._map=n,this.clear()};function Ea(n,o){(!n.duration||n.duration<o.duration)&&(n.duration=o.duration,n.easing=o.easing)}function zi(n,o,i){var u=i.maxSpeed,p=i.linearity,f=i.deceleration,d=a.clamp(n*p/(o/1e3),-u,u),x=Math.abs(d)/(f*p);return{easing:i.easing,duration:1e3*x,amount:d*(x/2)}}Ia.prototype.clear=function(){this._inertiaBuffer=[]},Ia.prototype.record=function(n){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:a.browser.now(),settings:n})},Ia.prototype._drainInertiaBuffer=function(){for(var n=this._inertiaBuffer,o=a.browser.now();n.length>0&&o-n[0].time>160;)n.shift()},Ia.prototype._onMoveEnd=function(n){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var o={zoom:0,bearing:0,pitch:0,pan:new a.Point(0,0),pinchAround:void 0,around:void 0},i=0,u=this._inertiaBuffer;i<u.length;i+=1){var p=u[i].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 x=zi(o.pan.mag(),f,a.extend({},Jo,n||{}));d.offset=o.pan.mult(x.amount/o.pan.mag()),d.center=this._map.transform.center,Ea(d,x)}if(o.zoom){var A=zi(o.zoom,f,Ta);d.zoom=this._map.transform.zoom+A.amount,Ea(d,A)}if(o.bearing){var R=zi(o.bearing,f,qc);d.bearing=this._map.transform.bearing+a.clamp(R.amount,-179,179),Ea(d,R)}if(o.pitch){var q=zi(o.pitch,f,Uc);d.pitch=this._map.transform.pitch+q.amount,Ea(d,q)}if(d.zoom||d.bearing){var V=o.pinchAround===void 0?o.around:o.pinchAround;d.around=V?this._map.unproject(V):this._map.getCenter()}return this.clear(),a.extend(d,{noMoveStart:!0})}};var Wr=(function(n){function o(u,p,f,d){d===void 0&&(d={});var x=w.mousePos(p.getCanvasContainer(),f),A=p.unproject(x);n.call(this,u,a.extend({point:x,lngLat:A,originalEvent:f},d)),this._defaultPrevented=!1,this.target=p}n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o;var i={defaultPrevented:{configurable:!0}};return o.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(o.prototype,i),o})(a.Event),Aa=(function(n){function o(u,p,f){var d=u==="touchend"?f.changedTouches:f.touches,x=w.touchPos(p.getCanvasContainer(),d),A=x.map((function(V){return p.unproject(V)})),R=x.reduce((function(V,j,Y,J){return V.add(j.div(J.length))}),new a.Point(0,0)),q=p.unproject(R);n.call(this,u,{points:x,point:R,lngLats:A,lngLat:q,originalEvent:f}),this._defaultPrevented=!1}n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o;var i={defaultPrevented:{configurable:!0}};return o.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(o.prototype,i),o})(a.Event),Al=(function(n){function o(u,p,f){n.call(this,u,{originalEvent:f}),this._defaultPrevented=!1}n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o;var i={defaultPrevented:{configurable:!0}};return o.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(o.prototype,i),o})(a.Event),Gr=function(n,o){this._map=n,this._clickTolerance=o.clickTolerance};Gr.prototype.reset=function(){delete this._mousedownPos},Gr.prototype.wheel=function(n){return this._firePreventable(new Al(n.type,this._map,n))},Gr.prototype.mousedown=function(n,o){return this._mousedownPos=o,this._firePreventable(new Wr(n.type,this._map,n))},Gr.prototype.mouseup=function(n){this._map.fire(new Wr(n.type,this._map,n))},Gr.prototype.click=function(n,o){this._mousedownPos&&this._mousedownPos.dist(o)>=this._clickTolerance||this._map.fire(new Wr(n.type,this._map,n))},Gr.prototype.dblclick=function(n){return this._firePreventable(new Wr(n.type,this._map,n))},Gr.prototype.mouseover=function(n){this._map.fire(new Wr(n.type,this._map,n))},Gr.prototype.mouseout=function(n){this._map.fire(new Wr(n.type,this._map,n))},Gr.prototype.touchstart=function(n){return this._firePreventable(new Aa(n.type,this._map,n))},Gr.prototype.touchmove=function(n){this._map.fire(new Aa(n.type,this._map,n))},Gr.prototype.touchend=function(n){this._map.fire(new Aa(n.type,this._map,n))},Gr.prototype.touchcancel=function(n){this._map.fire(new Aa(n.type,this._map,n))},Gr.prototype._firePreventable=function(n){if(this._map.fire(n),n.defaultPrevented)return{}},Gr.prototype.isEnabled=function(){return!0},Gr.prototype.isActive=function(){return!1},Gr.prototype.enable=function(){},Gr.prototype.disable=function(){};var Ye=function(n){this._map=n};Ye.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ye.prototype.mousemove=function(n){this._map.fire(new Wr(n.type,this._map,n))},Ye.prototype.mousedown=function(){this._delayContextMenu=!0},Ye.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Wr("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ye.prototype.contextmenu=function(n){this._delayContextMenu?this._contextMenuEvent=n:this._map.fire(new Wr(n.type,this._map,n)),this._map.listens("contextmenu")&&n.preventDefault()},Ye.prototype.isEnabled=function(){return!0},Ye.prototype.isActive=function(){return!1},Ye.prototype.enable=function(){},Ye.prototype.disable=function(){};var Un=function(n,o){this._map=n,this._el=n.getCanvasContainer(),this._container=n.getContainer(),this._clickTolerance=o.clickTolerance||1};function os(n,o){for(var i={},u=0;u<n.length;u++)i[n[u].identifier]=o[u];return i}Un.prototype.isEnabled=function(){return!!this._enabled},Un.prototype.isActive=function(){return!!this._active},Un.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Un.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Un.prototype.mousedown=function(n,o){this.isEnabled()&&n.shiftKey&&n.button===0&&(w.disableDrag(),this._startPos=this._lastPos=o,this._active=!0)},Un.prototype.mousemoveWindow=function(n,o){if(this._active){var i=o;if(!(this._lastPos.equals(i)||!this._box&&i.dist(this._startPos)<this._clickTolerance)){var u=this._startPos;this._lastPos=i,this._box||(this._box=w.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",n));var p=Math.min(u.x,i.x),f=Math.max(u.x,i.x),d=Math.min(u.y,i.y),x=Math.max(u.y,i.y);w.setTransform(this._box,"translate("+p+"px,"+d+"px)"),this._box.style.width=f-p+"px",this._box.style.height=x-d+"px"}}},Un.prototype.mouseupWindow=function(n,o){var i=this;if(this._active&&n.button===0){var u=this._startPos,p=o;if(this.reset(),w.suppressClick(),u.x!==p.x||u.y!==p.y)return this._map.fire(new a.Event("boxzoomend",{originalEvent:n})),{cameraAnimation:function(f){return f.fitScreenCoordinates(u,p,i._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",n)}},Un.prototype.keydown=function(n){this._active&&n.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",n))},Un.prototype.blur=function(){this.reset()},Un.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(w.remove(this._box),this._box=null),w.enableDrag(),delete this._startPos,delete this._lastPos},Un.prototype._fireEvent=function(n,o){return this._map.fire(new a.Event(n,{originalEvent:o}))};var Yo=function(n){this.reset(),this.numTouches=n.numTouches};Yo.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},Yo.prototype.touchstart=function(n,o,i){(this.centroid||i.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=n.timeStamp),i.length===this.numTouches&&(this.centroid=(function(u){for(var p=new a.Point(0,0),f=0,d=u;f<d.length;f+=1)p._add(d[f]);return p.div(u.length)})(o),this.touches=os(i,o)))},Yo.prototype.touchmove=function(n,o,i){if(!this.aborted&&this.centroid){var u=os(i,o);for(var p in this.touches){var f=u[p];(!f||f.dist(this.touches[p])>30)&&(this.aborted=!0)}}},Yo.prototype.touchend=function(n,o,i){if((!this.centroid||n.timeStamp-this.startTime>500)&&(this.aborted=!0),i.length===0){var u=!this.aborted&&this.centroid;if(this.reset(),u)return u}};var mi=function(n){this.singleTap=new Yo(n),this.numTaps=n.numTaps,this.reset()};mi.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},mi.prototype.touchstart=function(n,o,i){this.singleTap.touchstart(n,o,i)},mi.prototype.touchmove=function(n,o,i){this.singleTap.touchmove(n,o,i)},mi.prototype.touchend=function(n,o,i){var u=this.singleTap.touchend(n,o,i);if(u){var p=n.timeStamp-this.lastTime<500,f=!this.lastTap||this.lastTap.dist(u)<30;if(p&&f||this.reset(),this.count++,this.lastTime=n.timeStamp,this.lastTap=u,this.count===this.numTaps)return this.reset(),u}};var Vn=function(){this._zoomIn=new mi({numTouches:1,numTaps:2}),this._zoomOut=new mi({numTouches:2,numTaps:1}),this.reset()};Vn.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Vn.prototype.touchstart=function(n,o,i){this._zoomIn.touchstart(n,o,i),this._zoomOut.touchstart(n,o,i)},Vn.prototype.touchmove=function(n,o,i){this._zoomIn.touchmove(n,o,i),this._zoomOut.touchmove(n,o,i)},Vn.prototype.touchend=function(n,o,i){var u=this,p=this._zoomIn.touchend(n,o,i),f=this._zoomOut.touchend(n,o,i);return p?(this._active=!0,n.preventDefault(),setTimeout((function(){return u.reset()}),0),{cameraAnimation:function(d){return d.easeTo({duration:300,zoom:d.getZoom()+1,around:d.unproject(p)},{originalEvent:n})}}):f?(this._active=!0,n.preventDefault(),setTimeout((function(){return u.reset()}),0),{cameraAnimation:function(d){return d.easeTo({duration:300,zoom:d.getZoom()-1,around:d.unproject(f)},{originalEvent:n})}}):void 0},Vn.prototype.touchcancel=function(){this.reset()},Vn.prototype.enable=function(){this._enabled=!0},Vn.prototype.disable=function(){this._enabled=!1,this.reset()},Vn.prototype.isEnabled=function(){return this._enabled},Vn.prototype.isActive=function(){return this._active};var lu={0:1,2:2},Ve=function(n){this.reset(),this._clickTolerance=n.clickTolerance||1};Ve.prototype.blur=function(){this.reset()},Ve.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Ve.prototype._correctButton=function(n,o){return!1},Ve.prototype._move=function(n,o){return{}},Ve.prototype.mousedown=function(n,o){if(!this._lastPoint){var i=w.mouseButton(n);this._correctButton(n,i)&&(this._lastPoint=o,this._eventButton=i)}},Ve.prototype.mousemoveWindow=function(n,o){var i=this._lastPoint;if(i){if(n.preventDefault(),(function(u,p){var f=lu[p];return u.buttons===void 0||(u.buttons&f)!==f})(n,this._eventButton))this.reset();else if(this._moved||!(o.dist(i)<this._clickTolerance))return this._moved=!0,this._lastPoint=o,this._move(i,o)}},Ve.prototype.mouseupWindow=function(n){this._lastPoint&&w.mouseButton(n)===this._eventButton&&(this._moved&&w.suppressClick(),this.reset())},Ve.prototype.enable=function(){this._enabled=!0},Ve.prototype.disable=function(){this._enabled=!1,this.reset()},Ve.prototype.isEnabled=function(){return this._enabled},Ve.prototype.isActive=function(){return this._active};var cu=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.mousedown=function(i,u){n.prototype.mousedown.call(this,i,u),this._lastPoint&&(this._active=!0)},o.prototype._correctButton=function(i,u){return u===0&&!i.ctrlKey},o.prototype._move=function(i,u){return{around:u,panDelta:u.sub(i)}},o})(Ve),as=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype._correctButton=function(i,u){return u===0&&i.ctrlKey||u===2},o.prototype._move=function(i,u){var p=.8*(u.x-i.x);if(p)return this._active=!0,{bearingDelta:p}},o.prototype.contextmenu=function(i){i.preventDefault()},o})(Ve),pu=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype._correctButton=function(i,u){return u===0&&i.ctrlKey||u===2},o.prototype._move=function(i,u){var p=-.5*(u.y-i.y);if(p)return this._active=!0,{pitchDelta:p}},o.prototype.contextmenu=function(i){i.preventDefault()},o})(Ve),ai=function(n){this._minTouches=1,this._clickTolerance=n.clickTolerance||1,this.reset()};ai.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new a.Point(0,0)},ai.prototype.touchstart=function(n,o,i){return this._calculateTransform(n,o,i)},ai.prototype.touchmove=function(n,o,i){if(this._active&&!(i.length<this._minTouches))return n.preventDefault(),this._calculateTransform(n,o,i)},ai.prototype.touchend=function(n,o,i){this._calculateTransform(n,o,i),this._active&&i.length<this._minTouches&&this.reset()},ai.prototype.touchcancel=function(){this.reset()},ai.prototype._calculateTransform=function(n,o,i){i.length>0&&(this._active=!0);var u=os(i,o),p=new a.Point(0,0),f=new a.Point(0,0),d=0;for(var x in u){var A=u[x],R=this._touches[x];R&&(p._add(A),f._add(A.sub(R)),d++,u[x]=A)}if(this._touches=u,!(d<this._minTouches)&&f.mag()){var q=f.div(d);if(this._sum._add(q),!(this._sum.mag()<this._clickTolerance))return{around:p.div(d),panDelta:q}}},ai.prototype.enable=function(){this._enabled=!0},ai.prototype.disable=function(){this._enabled=!1,this.reset()},ai.prototype.isEnabled=function(){return this._enabled},ai.prototype.isActive=function(){return this._active};var jn=function(){this.reset()};function ss(n,o,i){for(var u=0;u<n.length;u++)if(n[u].identifier===i)return o[u]}function us(n,o){return Math.log(n/o)/Math.LN2}jn.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},jn.prototype._start=function(n){},jn.prototype._move=function(n,o,i){return{}},jn.prototype.touchstart=function(n,o,i){this._firstTwoTouches||i.length<2||(this._firstTwoTouches=[i[0].identifier,i[1].identifier],this._start([o[0],o[1]])
497)},jn.prototype.touchmove=function(n,o,i){if(this._firstTwoTouches){n.preventDefault();var u=this._firstTwoTouches,p=u[1],f=ss(i,o,u[0]),d=ss(i,o,p);if(f&&d){var x=this._aroundCenter?null:f.add(d).div(2);return this._move([f,d],x,n)}}},jn.prototype.touchend=function(n,o,i){if(this._firstTwoTouches){var u=this._firstTwoTouches,p=u[1],f=ss(i,o,u[0]),d=ss(i,o,p);f&&d||(this._active&&w.suppressClick(),this.reset())}},jn.prototype.touchcancel=function(){this.reset()},jn.prototype.enable=function(n){this._enabled=!0,this._aroundCenter=!!n&&n.around==="center"},jn.prototype.disable=function(){this._enabled=!1,this.reset()},jn.prototype.isEnabled=function(){return this._enabled},jn.prototype.isActive=function(){return this._active};var Gn=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.reset=function(){n.prototype.reset.call(this),delete this._distance,delete this._startDistance},o.prototype._start=function(i){this._startDistance=this._distance=i[0].dist(i[1])},o.prototype._move=function(i,u){var p=this._distance;if(this._distance=i[0].dist(i[1]),this._active||!(Math.abs(us(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:us(this._distance,p),pinchAround:u}},o})(jn);function Li(n,o){return 180*n.angleWith(o)/Math.PI}var Cl=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.reset=function(){n.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},o.prototype._start=function(i){this._startVector=this._vector=i[0].sub(i[1]),this._minDiameter=i[0].dist(i[1])},o.prototype._move=function(i,u){var p=this._vector;if(this._vector=i[0].sub(i[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Li(this._vector,p),pinchAround:u}},o.prototype._isBelowThreshold=function(i){this._minDiameter=Math.min(this._minDiameter,i.mag());var u=25/(Math.PI*this._minDiameter)*360,p=Li(i,this._startVector);return Math.abs(p)<u},o})(jn);function Ca(n){return Math.abs(n.y)>Math.abs(n.x)}var hu=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.reset=function(){n.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},o.prototype._start=function(i){this._lastPoints=i,Ca(i[0].sub(i[1]))&&(this._valid=!1)},o.prototype._move=function(i,u,p){var f=i[0].sub(this._lastPoints[0]),d=i[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(f,d,p.timeStamp),this._valid)return this._lastPoints=i,this._active=!0,{pitchDelta:(f.y+d.y)/2*-.5}},o.prototype.gestureBeginsVertically=function(i,u,p){if(this._valid!==void 0)return this._valid;var f=i.mag()>=2,d=u.mag()>=2;if(f||d){if(!f||!d)return this._firstMove===void 0&&(this._firstMove=p),p-this._firstMove<100&&void 0;var x=i.y>0==u.y>0;return Ca(i)&&Ca(u)&&x}},o})(jn),fu={panStep:100,bearingStep:15,pitchStep:10},vi=function(){var n=fu;this._panStep=n.panStep,this._bearingStep=n.bearingStep,this._pitchStep=n.pitchStep,this._rotationDisabled=!1};function Yn(n){return n*(2-n)}vi.prototype.blur=function(){this.reset()},vi.prototype.reset=function(){this._active=!1},vi.prototype.keydown=function(n){var o=this;if(!(n.altKey||n.ctrlKey||n.metaKey)){var i=0,u=0,p=0,f=0,d=0;switch(n.keyCode){case 61:case 107:case 171:case 187:i=1;break;case 189:case 109:case 173:i=-1;break;case 37:n.shiftKey?u=-1:(n.preventDefault(),f=-1);break;case 39:n.shiftKey?u=1:(n.preventDefault(),f=1);break;case 38:n.shiftKey?p=1:(n.preventDefault(),d=-1);break;case 40:n.shiftKey?p=-1:(n.preventDefault(),d=1);break;default:return}return this._rotationDisabled&&(u=0,p=0),{cameraAnimation:function(x){var A=x.getZoom();x.easeTo({duration:300,easeId:"keyboardHandler",easing:Yn,zoom:i?Math.round(A)+i*(n.shiftKey?2:1):A,bearing:x.getBearing()+u*o._bearingStep,pitch:x.getPitch()+p*o._pitchStep,offset:[-f*o._panStep,-d*o._panStep],center:x.getCenter()},{originalEvent:n})}}}},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 kt=function(n,o){this._map=n,this._el=n.getCanvasContainer(),this._handler=o,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,a.bindAll(["_onT
497imeout"],this)};kt.prototype.setZoomRate=function(n){this._defaultZoomRate=n},kt.prototype.setWheelZoomRate=function(n){this._wheelZoomRate=n},kt.prototype.isEnabled=function(){return!!this._enabled},kt.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},kt.prototype.isZooming=function(){return!!this._zooming},kt.prototype.enable=function(n){this.isEnabled()||(this._enabled=!0,this._aroundCenter=n&&n.around==="center")},kt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},kt.prototype.wheel=function(n){if(this.isEnabled()){var o=n.deltaMode===a.window.WheelEvent.DOM_DELTA_LINE?40*n.deltaY:n.deltaY,i=a.browser.now(),u=i-(this._lastWheelEventTime||0);this._lastWheelEventTime=i,o!==0&&o%4.000244140625==0?this._type="wheel":o!==0&&Math.abs(o)<4?this._type="trackpad":u>400?(this._type=null,this._lastValue=o,this._timeout=setTimeout(this._onTimeout,40,n)):this._type||(this._type=Math.abs(u*o)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,o+=this._lastValue)),n.shiftKey&&o&&(o/=4),this._type&&(this._lastWheelEvent=n,this._delta-=o,this._active||this._start(n)),n.preventDefault()}}
497,kt.prototype._onTimeout=function(n){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(n)},kt.prototype._start=function(n){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=w.mousePos(this._el,n);this._around=a.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())}},kt.prototype.renderFrame=function(){var n=this;if(this._frameId&&(this._frameId=null,this.isActive())){var o=this._map.transform;if(this._delta!==0){var i=this._type==="wheel"&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,u=2/(1+Math.exp(-Math.abs(this._delta*i)));this._delta<0&&u!==0&&(u=1/u);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*u))),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,x=this._startZoom,A=this._easing,R=!1;if(this._type==="wheel"&&x&&A){var q=Math.min((a.browser.now()-this._lastWheelEventTime)/200,1),V=A(q);f=a.number(x,d,V),q<1?this._frameId||(this._frameId=!0):R=!0}else f=d,R=!0;return this._active=!0,R&&(this._active=!1,this._finishTimeout=setTimeout((function(){n._zooming=!1,n._handler._triggerRenderFrame(),delete n._targetZoom,delete n._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!R,zoomDelta:f-o.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}}
vendor: 23,976 bytes, line 497
497,kt.prototype._smoothOutEasing=function(n){var o=a.ease;if(this._prevEase){var i=this._prevEase,u=(a.browser.now()-i.start)/i.duration,p=i.easing(u+.01)-i.easing(u),f=.27/Math.sqrt(p*p+1e-4)*.01,d=Math.sqrt(.0729-f*f);o=a.bezier(f,d,.25,1)}return this._prevEase={start:a.browser.now(),duration:n,easing:o},o},kt.prototype.blur=function(){this.reset()},kt.prototype.reset=function(){this._active=!1};var wi=function(n,o){this._clickZoom=n,this._tapZoom=o};wi.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},wi.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},wi.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},wi.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var si=function(){this.reset()};si.prototype.reset=function(){this._active=!1},si.prototype.blur=function(){this.reset()},si.prototype.dblclick=function(n,o){return n.preventDefault(),{cameraAnimation:function(i){i.easeTo({duration:300,zoom:i.getZoom()+(n.shiftKey?-1:1),around:i.unproject(o)},{originalEvent:n})}}},si.prototype.enable=function(){this._enabled=!0},si.prototype.disable=function(){this._enabled=!1,this.reset()},si.prototype.isEnabled=function(){return this._enabled},si.prototype.isActive=function(){return this._active};var _n=function(){this._tap=new mi({numTouches:1,numTaps:1}),this.reset()};_n.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},_n.prototype.touchstart=function(n,o,i){this._swipePoint||(this._tapTime&&n.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?i.length>0&&(this._swipePoint=o[0],this._swipeTouch=i[0].identifier):this._tap.touchstart(n,o,i))},_n.prototype.touchmove=function(n,o,i){if(this._tapTime){if(this._swipePoint){if(i[0].identifier!==this._swipeTouch)return;var u=o[0],p=u.y-this._swipePoint.y;return this._swipePoint=u,n.preventDefault(),this._active=!0,{zoomDelta:p/128}}}else this._tap.touchmove(n,o,i)},_n.prototype.touchend=function(n,o,i){this._tapTime?this._swipePoint&&i.length===0&&this.reset():this._tap.touchend(n,o,i)&&(this._tapTime=n.timeStamp)},_n.prototype.touchcancel=function(){this.reset()},_n.prototype.enable=function(){this._enabled=!0},_n.prototype.disable=function(){this._enabled=!1,this.reset()},_n.prototype.isEnabled=function(){return this._enabled},_n.prototype.isActive=function(){return this._active};var Po=function(n,o,i){this._el=n,this._mousePan=o,this._touchPan=i};Po.prototype.enable=function(n){this._inertiaOptions=n||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Po.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Po.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Po.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Qi=function(n,o,i){this._pitchWithRotate=n.pitchWithRotate,this._mouseRotate=o,this._mousePitch=i};Qi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Qi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Qi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Qi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var gi=function(n,o,i,u){this._el=n,this._touchZoom=o,this._touchRotate=i,this._tapDragZoom=u,this._rotationDisabled=!1,this._enabled=!0};gi.prototype.enable=function(n){this._touchZoom.enable(n),this._rotationDisabled||this._touchRotate.enable(n),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},gi.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},gi.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},gi.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},gi.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},gi.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var An=function(n){return n.zoom||n.drag||n.pitch||n.rotate},Pa=(function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o})(a.Event);function at(n){return n.panDelta&&n.panDelta.mag()||n.zoomDelta||n.bearingDelta||n.pitchDelta}var et=function(n,o){this._map=n,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ia(n),this._bearingSnap=o.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(o),a.bindAll(["handleEvent","handleWindowEvent"],this);var i=this._el;this._listeners=[[i,"touchstart",{passive:!0}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[a.window.document,"mousemove",{capture:!0}],[a.window.document,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[a.window,"blur",void 0]];for(var u=0,p=this._listeners;u<p.length;u+=1){var f=p[u],d=f[0];w.addEventListener(d,f[1],d===a.window.document?this.handleWindowEvent:this.handleEvent,f[2])}};et.prototype.destroy=function(){for(var n=0,o=this._listeners;n<o.length;n+=1){var i=o[n],u=i[0];w.removeEventListener(u,i[1],u===a.window.document?this.handleWindowEvent:this.handleEvent,i[2])}},et.prototype._addDefaultHandlers=function(n){var o=this._map,i=o.getCanvasContainer();this._add("mapEvent",new Gr(o,n));var u=o.boxZoom=new Un(o,n);this._add("boxZoom",u);var p=new Vn,f=new si;o.doubleClickZoom=new wi(f,p),this._add("tapZoom",p),this._add("clickZoom",f);var d=new _n;this._add("tapDragZoom",d);var x=o.touchPitch=new hu;this._add("touchPitch",x);var A=new as(n),R=new pu(n);o.dragRotate=new Qi(n,A,R),this._add("mouseRotate",A,["mousePitch"]),this._add("mousePitch",R,["mouseRotate"]);var q=new cu(n),V=new ai(n);o.dragPan=new Po(i,q,V),this._add("mousePan",q),this._add("touchPan",V,["touchZoom","touchRotate"]);var j=new Cl,Y=new Gn;o.touchZoomRotate=new gi(i,Y,j,d),this._add("touchRotate",j,["touchPan","touchZoom"]),this._add("touchZoom",Y,["touchPan","touchRotate"]);var J=o.scrollZoom=new kt(o,this);this._add("scrollZoom",J,["mousePan"]);var re=o.keyboard=new vi;this._add("keyboard",re),this._add("blockableMapEvent",new Ye(o));for(var Z=0,te=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];Z<te.length;Z+=1){var ae=te[Z];n.interactive&&n[ae]&&o[ae].enable(n[ae])}},et.prototype._add=function(n,o,i){this._handlers.push({handlerName:n,handler:o,allowed:i}),this._handlersById[n]=o},et.prototype.stop=function(n){if(!this._updatingCamera){for(var o=0,i=this._handlers;o<i.length;o+=1)i[o].handler.reset();this._inertia.clear(),this._fireEvents({},{},n),this._changes=[]}},et.prototype.isActive=function(){for(var n=0,o=this._handlers;n<o.length;n+=1)if(o[n].handler.isActive())return!0;return!1},et.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},et.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},et.prototype.isMoving=function(){return!!An(this._eventsInProgress)||this.isZooming()},et.prototype._blockedByActive=function(n,o,i){for(var u in n)if(u!==i&&(!o||o.indexOf(u)<0))return!0;return!1},et.prototype.handleWindowEvent=function(n){this.handleEvent(n,n.type+"Window")},et.prototype._getMapTouches=function(n){for(var o=[],i=0,u=n;i<u.length;i+=1){var p=u[i];this._el.contains(p.target)&&o.push(p)}return o},et.prototype.handleEvent=function(n,o){this._updatingCamera=!0;for(var i=n.type==="renderFrame"?void 0:n,u={needsRenderFrame:!1},p={},f={},d=n.touches?this._getMapTouches(n.touches):void 0,x=d?w.touchPos(this._el,d):w.mousePos(this._el,n),A=0,R=this._handlers;A<R.length;A+=1){var q=R[A],V=q.handlerName,j=q.handler,Y=q.allowed;if(j.isEnabled()){var J=void 0;this._blockedByActive(f,Y,V)?j.reset():j[o||n.type]&&(J=j[o||n.type](n,x,d),this.mergeHandlerResult(u,p,J,V,i),J&&J.needsRenderFrame&&this._triggerRenderFrame()),(J||j.isActive())&&(f[V]=j)}}var re={};for(var Z in this._previousActiveHandlers)f[Z]||(re[Z]=i);this._previousActiveHandlers=f,(Object.keys(re).length||at(u))&&(this._changes.push([u,p,re]),this._triggerRenderFrame()),(Object.keys(f).length||at(u))&&this._map._stop(!0),this._updatingCamera=!1;var te=u.cameraAnimation;te&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],te(this._map))},et.prototype.mergeHandlerResult=function(n,o,i,u,p){if(i){a.extend(n,i);var f={handlerName:u,originalEvent:i.originalEvent||p};i.zoomDelta!==void 0&&(o.zoom=f),i.panDelta!==void 0&&(o.drag=f),i.pitchDelta!==void 0&&(o.pitch=f),i.bearingDelta!==void 0&&(o.rotate=f)}},et.prototype._applyChanges=function(){for(var n={},o={},i={},u=0,p=this._changes;u<p.length;u+=1){var f=p[u],d=f[0],x=f[1],A=f[2];d.panDelta&&(n.panDelta=(n.panDelta||new a.Point(0,0))._add(d.panDelta)),d.zoomDelta&&(n.zoomDelta=(n.zoomDelta||0)+d.zoomDelta),d.bearingDelta&&(n.bearingDelta=(n.bearingDelta||0)+d.bearingDelta),d.pitchDelta&&(n.pitchDelta=(n.pitchDelta||0)+d.pitchDelta),d.around!==void 0&&(n.around=d.around),d.pinchAround!==void 0&&(n.pinchAround=d.pinchAround),d.noInertia&&(n.noInertia=d.noInertia),a.extend(o,x),a.extend(i,A)}this._updateMapTransform(n,o,i),this._changes=[]},et.prototype._updateMapTransform=function(n,o,i){var u=this._map,p=u.transform;if(!at(n))return this._fireEvents(o,i,!0);var f=n.panDelta,d=n.zoomDelta,x=n.bearingDelta,A=n.pitchDelta,R=n.around,q=n.pinchAround;q!==void 0&&(R=q),u._stop(!0),R=R||u.transform.centerPoint;var V=p.pointLocation(f?R.sub(f):R);x&&(p.bearing+=x),A&&(p.pitch+=A),d&&(p.zoom+=d),p.setLocationAtPoint(V,R),this._map._update(),n.noInertia||this._inertia.record(n),this._fireEvents(o,i,!0)},et.prototype._fireEvents=function(n,o,i){var u=this,p=An(this._eventsInProgress),f=An(n),d={};for(var x in n)this._eventsInProgress[x]||(d[x+"start"]=n[x].originalEvent),this._eventsInProgress[x]=n[x];for(var A in!p&&f&&this._fireEvent("movestart",f.originalEvent),d)this._fireEvent(A,d[A]);for(var R in f&&this._fireEvent("move",f.originalEvent),n)this._fireEvent(R,n[R].originalEvent);var q,V={};for(var j in this._eventsInProgress){var Y=this._eventsInProgress[j],J=Y.handlerName,re=Y.originalEvent;this._handlersById[J].isActive()||(delete this._eventsInProgress[j],V[j+"end"]=q=o[J]||re)}for(var Z in V)this._fireEvent(Z,V[Z]);var te=An(this._eventsInProgress);if(i&&(p||f)&&!te){this._updatingCamera=!0;var ae=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),fe=function(Se){return Se!==0&&-u._bearingSnap<Se&&Se<u._bearingSnap};ae?(fe(ae.bearing||this._map.getBearing())&&(ae.bearing=0),this._map.easeTo(ae,{originalEvent:q})):(this._map.fire(new a.Event("moveend",{originalEvent:q})),fe(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},et.prototype._fireEvent=function(n,o){this._map.fire(new a.Event(n,o?{originalEvent:o}:{}))},et.prototype._requestFrame=function(){var n=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add((function(o){delete n._frameId,n.handleEvent(new Pa("renderFrame",{timeStamp:o})),n._applyChanges()}))},et.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var ls=(function(n){function o(i,u){n.call(this),this._moving=!1,this._zooming=!1,this.transform=i,this._bearingSnap=u.bearingSnap,a.bindAll(["_renderFrameCallback"],this)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.getCenter=function(){return new a.LngLat(this.transform.center.lng,this.transform.center.lat)},o.prototype.setCenter=function(i,u){return this.jumpTo({center:i},u)},o.prototype.panBy=function(i,u,p){return i=a.Point.convert(i).mult(-1),this.panTo(this.transform.center,a.extend({offset:i},u),p)},o.prototype.panTo=function(i,u,p){return this.easeTo(a.extend({center:i},u),p)},o.prototype.getZoom=function(){return this.transform.zoom},o.prototype.setZoom=function(i,u){return this.jumpTo({zoom:i},u),this},o.prototype.zoomTo=function(i,u,p){return this.easeTo(a.extend({zoom:i},u),p)},o.prototype.zoomIn=function(i,u){return this.zoomTo(this.getZoom()+1,i,u),this},o.prototype.zoomOut=function(i,u){return this.zoomTo(this.getZoom()-1,i,u),this},o.prototype.getBearing=function(){return this.transform.bearing},o.prototype.setBearing=function(i,u){return this.jumpTo({bearing:i},u),this},o.prototype.getPadding=function(){return this.transform.padding},o.prototype.setPadding=function(i,u){return this.jumpTo({padding:i},u),this},o.prototype.rotateTo=function(i,u,p){return this.easeTo(a.extend({bearing:i},u),p)},o.prototype.resetNorth=function(i,u){return this.rotateTo(0,a.extend({duration:1e3},i),u),this},o.prototype.resetNorthPitch=function(i,u){return this.easeTo(a.extend({bearing:0,pitch:0,duration:1e3},i),u),this},o.prototype.snapToNorth=function(i,u){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(i,u):this},o.prototype.getPitch=function(){return this.transform.pitch},o.prototype.setPitch=function(i,u){return this.jumpTo({pitch:i},u),this},o.prototype.cameraForBounds=function(i,u){i=a.LngLatBounds.convert(i);var p=u&&u.bearing||0;return this._cameraForBoxAndBearing(i.getNorthWest(),i.getSouthEast(),p,u)},o.prototype._cameraForBoxAndBearing=function(i,u,p,f){var d={top:0,bottom:0,right:0,left:0};if(typeof(f=a.extend({padding:d,offset:[0,0],maxZoom:this.transform.maxZoom},f)).padding=="number"){var x=f.padding;f.padding={top:x,bottom:x,right:x,left:x}}f.padding=a.extend(d,f.padding);var A=this.transform,R=A.padding,q=A.project(a.LngLat.convert(i)),V=A.project(a.LngLat.convert(u)),j=q.rotate(-p*Math.PI/180),Y=V.rotate(-p*Math.PI/180),J=new a.Point(Math.max(j.x,Y.x),Math.max(j.y,Y.y)),re=new a.Point(Math.min(j.x,Y.x),Math.min(j.y,Y.y)),Z=J.sub(re),te=(A.width-(R.left+R.right+f.padding.left+f.padding.right))/Z.x,ae=(A.height-(R.top+R.bottom+f.padding.top+f.padding.bottom))/Z.y;if(!(ae<0||te<0)){var fe=Math.min(A.scaleZoom(A.scale*Math.min(te,ae)),f.maxZoom),Se=typeof f.offset.x=="number"?new a.Point(f.offset.x,f.offset.y):a.Point.convert(f.offset),_e=new a.Point((f.padding.left-f.padding.right)/2,(f.padding.top-f.padding.bottom)/2).rotate(p*Math.PI/180),Ie=Se.add(_e).mult(A.scale/A.zoomScale(fe));return{center:A.unproject(q.add(V).div(2).sub(Ie)),zoom:fe,bearing:p}}a.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},o.prototype.fitBounds=function(i,u,p){return this._fitInternal(this.cameraForBounds(i,u),u,p)},o.prototype.fitScreenCoordinates=function(i,u,p,f,d){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(a.Point.convert(i)),this.transform.pointLocation(a.Point.convert(u)),p,f),f,d)},o.prototype._fitInternal=function(i,u,p){return i?(delete(u=a.extend(i,u)).padding,u.linear?this.easeTo(u,p):this.flyTo(u,p)):this},o.prototype.jumpTo=function(i,u){this.stop();var p=this.transform,f=!1,d=!1,x=!1;return"zoom"in i&&p.zoom!==+i.zoom&&(f=!0,p.zoom=+i.zoom),i.center!==void 0&&(p.center=a.LngLat.convert(i.center)),"bearing"in i&&p.bearing!==+i.bearing&&(d=!0,p.bearing=+i.bearing),"pitch"in i&&p.pitch!==+i.pitch&&(x=!0,p.pitch=+i.pitch),i.padding==null||p.isPaddingEqual(i.padding)||(p.padding=i.padding),this.fire(new a.Event("movestart",u)).fire(new a.Event("move",u)),f&&this.fire(new a.Event("zoomstart",u)).fire(new a.Event("zoom",u)).fire(new a.Event("zoomend",u)),d&&this.fire(new a.Event("rotatestart",u)).fire(new a.Event("rotate",u)).fire(new a.Event("rotateend",u)),x&&this.fire(new a.Event("pitchstart",u)).fire(new a.Event("pitch",u)).fire(new a.Event("pitchend",u)),this.fire(new a.Event("moveend",u))},o.prototype.easeTo=function(i,u){var p=this;this._stop(!1,i.easeId),((i=a.extend({offset:[0,0],duration:500,easing:a.ease},i)).animate===!1||!i.essential&&a.browser.prefersReducedMotion)&&(i.duration=0);var f=this.transform,d=this.getZoom(),x=this.getBearing(),A=this.getPitch(),R=this.getPadding(),q="zoom"in i?+i.zoom:d,V="bearing"in i?this._normalizeBearing(i.bearing,x):x,j="pitch"in i?+i.pitch:A,Y="padding"in i?i.padding:f.padding,J=a.Point.convert(i.offset),re=f.centerPoint.add(J),Z=f.pointLocation(re),te=a.LngLat.convert(i.center||Z);this._normalizeCenter(te);var ae,fe,Se=f.project(Z),_e=f.project(te).sub(Se),Ie=f.zoomScale(q-d);i.around&&(ae=a.LngLat.convert(i.around),fe=f.locationPoint(ae));var Me={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||q!==d,this._rotating=this._rotating||x!==V,this._pitching=this._pitching||j!==A,this._padding=!f.isPaddingEqual(Y),this._easeId=i.easeId,this._prepareEase(u,i.noMoveStart,Me),this._ease((function(Be){if(p._zooming&&(f.zoom=a.number(d,q,Be)),p._rotating&&(f.bearing=a.number(x,V,Be)),p._pitching&&(f.pitch=a.number(A,j,Be)),p._padding&&(f.interpolatePadding(R,Y,Be),re=f.centerPoint.add(J)),ae)f.setLocationAtPoint(ae,fe);else{var Oe=f.zoomScale(f.zoom-d),Ke=q>d?Math.min(2,Ie):Math.max(.5,Ie),st=Math.pow(Ke,1-Be),ht=f.unproject(Se.add(_e.mult(Be*st)).mult(Oe));f.setLocationAtPoint(f.renderWorldCopies?ht.wrap():ht,re)}p._fireMoveEvents(u)}),(function(Be){p._afterEase(u,Be)}),i),this},o.prototype._prepareEase=function(i,u,p){p===void 0&&(p={}),this._moving=!0,u||p.moving||this.fire(new a.Event("movestart",i)),this._zooming&&!p.zooming&&this.fire(new a.Event("zoomstart",i)),this._rotating&&!p.rotating&&this.fire(new a.Event("rotatestart",i)),this._pitching&&!p.pitching&&this.fire(new a.Event("pitchstart",i))},o.prototype._fireMoveEvents=function(i){this.fire(new a.Event("move",i)),this._zooming&&this.fire(new a.Event("zoom",i)),this._rotating&&this.fire(new a.Event("rotate",i)),this._pitching&&this.fire(new a.Event("pitch",i))},o.prototype._afterEase=function(i,u){if(!this._easeId||!u||this._easeId!==u){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 a.Event("zoomend",i)),f&&this.fire(new a.Event("rotateend",i)),d&&this.fire(new a.Event("pitchend",i)),this.fire(new a.Event("moveend",i))}},o.prototype.flyTo=function(i,u){var p=this;if(!i.essential&&a.browser.prefersReducedMotion){var f=a.pick(i,["center","zoom","bearing","pitch","around"]);return this.jumpTo(f,u)}this.stop(),i=a.extend({offset:[0,0],speed:1.2,curve:1.42,easing:a.ease},i);var d=this.transform,x=this.getZoom(),A=this.getBearing(),R=this.getPitch(),q=this.getPadding(),V="zoom"in i?a.clamp(+i.zoom,d.minZoom,d.maxZoom):x,j="bearing"in i?this._normalizeBearing(i.bearing,A):A,Y="pitch"in i?+i.pitch:R,J="padding"in i?i.padding:d.padding,re=d.zoomScale(V-x),Z=a.Point.convert(i.offset),te=d.centerPoint.add(Z),ae=d.pointLocation(te),fe=a.LngLat.convert(i.center||ae);this._normalizeCenter(fe);var Se=d.project(ae),_e=d.project(fe).sub(Se),Ie=i.curve,Me=Math.max(d.width,d.height),Be=Me/re,Oe=_e.mag();if("minZoom"in i){var Ke=a.clamp(Math.min(i.minZoom,x,V),d.minZoom,d.maxZoom),st=Me/d.zoomScale(Ke-x);Ie=Math.sqrt(st/Oe*2)}var ht=Ie*Ie;function ct(mt){var ft=(Be*Be-Me*Me+(mt?-1:1)*ht*ht*Oe*Oe)/(2*(mt?Be:Me)*ht*Oe);return Math.log(Math.sqrt(ft*ft+1)-ft)}function Ft(mt){return(Math.exp(mt)-Math.exp(-mt))/2}function Je(mt){return(Math.exp(mt)+Math.exp(-mt))/2}var _t=ct(0),Et=function(mt){return Je(_t)/Je(_t+Ie*mt)},gt=function(mt){return Me*((Je(_t)*(Ft(ft=_t+Ie*mt)/Je(ft))-Ft(_t))/ht)/Oe;var ft},vt=(ct(1)-_t)/Ie;if(Math.abs(Oe)<1e-6||!isFinite(vt)){if(Math.abs(Me-Be)<1e-6)return this.easeTo(i,u);var St=Be<Me?-1:1;vt=Math.abs(Math.log(Be/Me))/Ie,gt=function(){return 0},Et=function(mt){return Math.exp(St*Ie*mt)}}return i.duration="duration"in i?+i.duration:1e3*vt/("screenSpeed"in i?+i.screenSpeed/Ie:+i.speed),i.maxDuration&&i.duration>i.maxDuration&&(i.duration=0),this._zooming=!0,this._rotating=A!==j,this._pitching=Y!==R,this._padding=!d.isPaddingEqual(J),this._prepareEase(u,!1),this._ease((function(mt){var ft=mt*vt,Yr=1/Et(ft);d.zoom=mt===1?V:x+d.scaleZoom(Yr),p._rotating&&(d.bearing=a.number(A,j,mt)),p._pitching&&(d.pitch=a.number(R,Y,mt)),p._padding&&(d.interpolatePadding(q,J,mt),te=d.centerPoint.add(Z));var Pr=mt===1?fe:d.unproject(Se.add(_e.mult(gt(ft))).mult(Yr));d.setLocationAtPoint(d.renderWorldCopies?Pr.wrap():Pr,te),p._fireMoveEvents(u)}),(function(){return p._afterEase(u)}),i),this},o.prototype.isEasing=function(){return!!this._easeFrameId},o.prototype.stop=function(){return this._stop()},o.prototype._stop=function(i,u){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,u)}if(!i){var f=this.handlers;f&&f.stop(!1)}return this},o.prototype._ease=function(i,u,p){p.animate===!1||p.duration===0?(i(1),u()):(this._easeStart=a.browser.now(),this._easeOptions=p,this._onEaseFrame=i,this._onEaseEnd=u,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},o.prototype._renderFrameCallback=function(){var i=Math.min((a.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(i)),i<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},o.prototype._normalizeBearing=function(i,u){i=a.wrap(i,-180,180);var p=Math.abs(i-u);return Math.abs(i-360-u)<p&&(i-=360),Math.abs(i+360-u)<p&&(i+=360),i},o.prototype._normalizeCenter=function(i){var u=this.transform;if(u.renderWorldCopies&&!u.lngRange){var p=i.lng-u.center.lng;i.lng+=p>180?-360:p<-180?360:0}},o})(a.Evented),Cn=function(n){n===void 0&&(n={}),this.options=n,a.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Cn.prototype.getDefaultPosition=function(){return"bottom-right"},Cn.prototype.onAdd=function(n){var o=this.options&&this.options.compact;return this._map=n,this._container=w.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=w.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=w.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},Cn.prototype.onRemove=function(){w.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},Cn.prototype._setElementTitle=function(n,o){var i=this._map._getUIString("AttributionControl."+o);n.title=i,n.setAttribute("aria-label",i)},Cn.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"))},Cn.prototype._updateEditLink=function(){var n=this._editLink;n||(n=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||a.config.ACCESS_TOKEN}];if(n){var i=o.reduce((function(u,p,f){return p.value&&(u+=p.key+"="+p.value+(f<o.length-1?"&":"")),u}),"?");n.href=a.config.FEEDBACK_URL+"/"+i+(this._map._hash?this._map._hash.getHashString(!0):""),n.rel="noopener nofollow",this._setElementTitle(n,"MapFeedback")}},Cn.prototype._updateData=function(n){!n||n.sourceDataType!=="metadata"&&n.sourceDataType!=="visibility"&&n.dataType!=="style"||(this._updateAttributions(),this._updateEditLink())},Cn.prototype._updateAttributions=function(){if(this._map.style){var n=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?n=n.concat(this.options.customAttribution.map((function(x){return typeof x!="string"?"":x}))):typeof this.options.customAttribution=="string"&&n.push(this.options.customAttribution)),this._map.style.stylesheet){var o=this._map.style.stylesheet;this.styleOwner=o.owner,this.styleId=o.id}var i=this._map.style.sourceCaches;for(var u in i){var p=i[u];if(p.used){var f=p.getSource();f.attribution&&n.indexOf(f.attribution)<0&&n.push(f.attribution)}}n.sort((function(x,A){return x.length-A.length}));var d=(n=n.filter((function(x,A){for(var R=A+1;R<n.length;R++)if(n[R].indexOf(x)>=0)return!1;return!0}))).join(" | ");d!==this._attribHTML&&(this._attribHTML=d,n.length?(this._innerContainer.innerHTML=d,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Cn.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var _i=function(){a.bindAll(["_updateLogo"],this),a.bindAll(["_updateCompact"],this)};_i.prototype.onAdd=function(n){this._map=n,this._container=w.create("div","mapboxgl-ctrl");var o=w.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},_i.prototype.onRemove=function(){w.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},_i.prototype.getDefaultPosition=function(){return"bottom-left"},_i.prototype._updateLogo=function(n){n&&n.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},_i.prototype._logoRequired=function(){if(this._map.style){var n=this._map.style.sourceCaches;for(var o in n)if(n[o].getSource().mapbox_logo)return!0;return!1}},_i.prototype._updateCompact=function(){var n=this._container.children;if(n.length){var o=n[0];this._map.getCanvasContainer().offsetWidth<250?o.classList.add("mapboxgl-compact"):o.classList.remove("mapboxgl-compact")}};var xn=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};xn.prototype.add=function(n){var o=++this._id;return this._queue.push({callback:n,id:o,cancelled:!1}),o},xn.prototype.remove=function(n){for(var o=this._currentlyRunning,i=0,u=o?this._queue.concat(o):this._queue;i<u.length;i+=1){var p=u[i];if(p.id===n)return void(p.cancelled=!0)}},xn.prototype.run=function(n){n===void 0&&(n=0);var o=this._currentlyRunning=this._queue;this._queue=[];for(var i=0,u=o;i<u.length;i+=1){var p=u[i];if(!p.cancelled&&(p.callback(n),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},xn.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var Si={"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"},du=a.window.HTMLImageElement,cs=a.window.HTMLElement,Yt=a.window.ImageBitmap,ln={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},Pl=(function(n){function o(u){var p=this;if((u=a.extend({},ln,u)).minZoom!=null&&u.maxZoom!=null&&u.minZoom>u.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(u.minPitch!=null&&u.maxPitch!=null&&u.minPitch>u.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(u.minPitch!=null&&u.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(u.maxPitch!=null&&u.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var f=new Dt(u.minZoom,u.maxZoom,u.minPitch,u.maxPitch,u.renderWorldCopies);if(n.call(this,f,u),this._interactive=u.interactive,this._maxTileCacheSize=u.maxTileCacheSize,this._failIfMajorPerformanceCaveat=u.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=u.preserveDrawingBuffer,this._antialias=u.antialias,this._trackResize=u.trackResize,this._bearingSnap=u.bearingSnap,this._refreshExpiredTiles=u.refreshExpiredTiles,this._fadeDuration=u.fadeDuration,this._crossSourceCollisions=u.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=u.collectResourceTiming,this._renderTaskQueue=new xn,this._controls=[],this._mapId=a.uniqueId(),this._locale=a.extend({},Si,u.locale),this._clickTolerance=u.clickTolerance,this._requestManager=new a.RequestManager(u.transformRequest,u.accessToken),typeof u.container=="string"){if(this._container=a.window.document.getElementById(u.container),!this._container)throw new Error("Container '"+u.container+"' not found.")}else{if(!(u.container instanceof cs))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=u.container}if(u.maxBounds&&this.setMaxBounds(u.maxBounds),a.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return p._update(!1)})),this.on("moveend",(function(){return p._update(!1)})),this.on("zoom",(function(){return p._update(!0)})),a.window!==void 0&&(a.window.addEventListener("online",this._onWindowOnline,!1),a.window.addEventListener("resize",this._onWindowResize,!1),a.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new et(this,u),this._hash=u.hash&&new Jn(typeof u.hash=="string"&&u.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:u.center,zoom:u.zoom,bearing:u.bearing,pitch:u.pitch}),u.bounds&&(this.resize(),this.fitBounds(u.bounds,a.extend({},u.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=u.localIdeographFontFamily,u.style&&this.setStyle(u.style,{localIdeographFontFamily:u.localIdeographFontFamily}),u.attributionControl&&this.addControl(new Cn({customAttribution:u.customAttribution})),this.addControl(new _i,u.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 a.Event(d.dataType+"data",d))})),this.on("dataloading",(function(d){p.fire(new a.Event(d.dataType+"dataloading",d))}))}n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o;var i={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(u,p){if(p===void 0&&(p=u.getDefaultPosition?u.getDefaultPosition():"top-right"),!u||!u.onAdd)return this.fire(new a.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var f=u.onAdd(this);this._controls.push(u);var d=this._controlPositions[p];return p.indexOf("bottom")!==-1?d.insertBefore(f,d.firstChild):d.appendChild(f),this},o.prototype.removeControl=function(u){if(!u||!u.onRemove)return this.fire(new a.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var p=this._controls.indexOf(u);return p>-1&&this._controls.splice(p,1),u.onRemove(this),this}
497,o.prototype.hasControl=function(u){return this._controls.indexOf(u)>-1},o.prototype.resize=function(u){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 x=!this._moving;return x&&this.fire(new a.Event("movestart",u)).fire(new a.Event("move",u)),this.fire(new a.Event("resize",u)),x&&this.fire(new a.Event("moveend",u)),this},o.prototype.getBounds=function(){return this.transform.getBounds()},o.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},o.prototype.setMaxBounds=function(u){return this.transform.setMaxBounds(a.LngLatBounds.convert(u)),this._update()},o.prototype.setMinZoom=function(u){if((u=u??-2)>=-2&&u<=this.transform.maxZoom)return this.transform.minZoom=u,this._update(),this.getZoom()<u&&this.setZoom(u),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(u){if((u=u??22)>=this.transform.minZoom)return this.transform.maxZoom=u,this._update(),this.getZoom()>u&&this.setZoom(u),this;throw new Error("maxZoom must be greater than the current minZoom")},o.prototype.getMaxZoom=function(){return this.transform.maxZoom},o.prototype.setMinPitch=function(u){if((u=u??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(u>=0&&u<=this.transform.maxPitch)return this.transform.minPitch=u,this._update(),this.getPitch()<u&&this.setPitch(u),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(u){if((u=u??60)>60)throw new Error("maxPitch must be less than or equal to 60");if(u>=this.transform.minPitch)return this.transform.maxPitch=u,this._update(),this.getPitch()>u&&this.setPitch(u),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(u){return this.transform.renderWorldCopies=u,this._update()},o.prototype.project=function(u){return this.transform.locationPoint(a.LngLat.convert(u))},o.prototype.unproject=function(u){return this.transform.pointLocation(a.Point.convert(u))},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(u,p,f){var d,x=this;if(u==="mouseenter"||u==="mouseover"){var A=!1;return{layer:p,listener:f,delegates:{mousemove:function(q){var V=x.getLayer(p)?x.queryRenderedFeatures(q.point,{layers:[p]}):[];V.length?A||(A=!0,f.call(x,new Wr(u,x,q.originalEvent,{features:V}))):A=!1},mouseout:function(){A=!1}}}}if(u==="mouseleave"||u==="mouseout"){var R=!1;return{layer:p,listener:f,delegates:{mousemove:function(q){(x.getLayer(p)?x.queryRenderedFeatures(q.point,{layers:[p]}):[]).length?R=!0:R&&(R=!1,f.call(x,new Wr(u,x,q.originalEvent)))},mouseout:function(q){R&&(R=!1,f.call(x,new Wr(u,x,q.originalEvent)))}}}}return{layer:p,listener:f,delegates:(d={},d[u]=function(q){var V=x.getLayer(p)?x.queryRenderedFeatures(q.point,{layers:[p]}):[];V.length&&(q.features=V,f.call(x,q),delete q.features)},d)}},o.prototype.on=function(u,p,f){if(f===void 0)return n.prototype.on.call(this,u,p);var d=this._createDelegatedListener(u,p,f);for(var x in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[u]=this._delegatedListeners[u]||[],this._delegatedListeners[u].push(d),d.delegates)this.on(x,d.delegates[x]);return this},o.prototype.once=function(u,p,f){if(f===void 0)return n.prototype.once.call(this,u,p);var d=this._createDelegatedListener(u,p,f);for(var x in d.delegates)this.once(x,d.delegates[x]);return this},o.prototype.off=function(u,p,f){var d=this;return f===void 0?n.prototype.off.call(this,u,p):(this._delegatedListeners&&this._delegatedListeners[u]&&(function(x){for(var A=x[u],R=0;R<A.length;R++){var q=A[R];if(q.layer===p&&q.listener===f){for(var V in q.delegates)d.off(V,q.delegates[V]);
497return A.splice(R,1),d}}})(this._delegatedListeners),this)},o.prototype.queryRenderedFeatures=function(u,p){if(!this.style)return[];var f;if(p!==void 0||u===void 0||u instanceof a.Point||Array.isArray(u)||(p=u,u=void 0),p=p||{},(u=u||[[0,0],[this.transform.width,this.transform.height]])instanceof a.Point||typeof u[0]=="number")f=[a.Point.convert(u)];else{var d=a.Point.convert(u[0]),x=a.Point.convert(u[1]);f=[d,new a.Point(x.x,d.y),x,new a.Point(d.x,x.y),d]}return this.style.queryRenderedFeatures(f,p,this.transform)},o.prototype.querySourceFeatures=function(u,p){return this.style.querySourceFeatures(u,p)},o.prototype.setStyle=function(u,p){return(p=a.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},p)).diff!==!1&&p.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&u?(this._diffStyle(u,p),this):(this._localIdeographFontFamily=p.localIdeographFontFamily,this._updateStyle(u,p))},o.prototype._getUIString=function(u){var p=this._locale[u];if(p==null)throw new Error("Missing UI string '"+u+"'");return p},o.prototype._updateStyle=function(u,p){return this.style&&(this.style.setEventedParent(null),this.style._remove()),u?(this.style=new qn(this,p||{}),this.style.setEventedParent(this,{style:this.style}),typeof u=="string"?this.style.loadURL(u):this.style.loadJSON(u),this):(delete this.style,this)},o.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new qn(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},o.prototype._diffStyle=function(u,p){var f=this;if(typeof u=="string"){var d=this._requestManager.normalizeStyleURL(u),x=this._requestManager.transformRequest(d,a.ResourceType.Style);a.getJSON(x,(function(A,R){A?f.fire(new a.ErrorEvent(A)):R&&f._updateDiff(R,p)}))}else typeof u=="object"&&this._updateDiff(u,p)},o.prototype._updateDiff=function(u,p){try{this.style.setState(u)&&this._update(!0)}catch(f){a.warnOnce("Unable to perform style diff: "+(f.message||f.error||f)+".  Rebuilding the style from scratch."),this._updateStyle(u,p)}},o.prototype.getStyle=function(){if(this.style)return this.style.serialize()},o.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():a.warnOnce("There is no style added to the map.")},o.prototype.addSource=function(u,p){return this._lazyInitEmptyStyle(),this.style.addSource(u,p),this._update(!0)},o.prototype.isSourceLoaded=function(u){var p=this.style&&this.style.sourceCaches[u];if(p!==void 0)return p.loaded();this.fire(new a.ErrorEvent(new Error("There is no source with ID '"+u+"'")))},o.prototype.areTilesLoaded=function(){var u=this.style&&this.style.sourceCaches;for(var p in u){var f=u[p]._tiles;for(var d in f){var x=f[d];if(x.state!=="loaded"&&x.state!=="errored")return!1}}return!0},o.prototype.addSourceType=function(u,p,f){return this._lazyInitEmptyStyle(),this.style.addSourceType(u,p,f)},o.prototype.removeSource=function(u){return this.style.removeSource(u),this._update(!0)},o.prototype.getSource=function(u){return this.style.getSource(u)},o.prototype.addImage=function(u,p,f){f===void 0&&(f={});var d=f.pixelRatio;d===void 0&&(d=1);var x=f.sdf;x===void 0&&(x=!1);var A=f.stretchX,R=f.stretchY,q=f.content;if(this._lazyInitEmptyStyle(),p instanceof du||Yt&&p instanceof Yt){var V=a.browser.getImageData(p);this.style.addImage(u,{data:new a.RGBAImage({width:V.width,height:V.height},V.data),pixelRatio:d,stretchX:A,stretchY:R,content:q,sdf:x,version:0})}else{if(p.width===void 0||p.height===void 0)return this.fire(new a.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 j=p;this.style.addImage(u,{data:new a.RGBAImage({width:p.width,height:p.height},new Uint8Array(p.data)),pixelRatio:d,stretchX:A,stretchY:R,content:q,sdf:x,version:0,userImage:j}),j.onAdd&&j.onAdd(this,u)}},o.prototype.updateImage=function(u,p){var f=this.style.getImage(u);if(!f)return this.fire(new a.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 du||Yt&&p instanceof Yt?a.browser.getImageData(p):p,x=d.width,A=d.height,R=d.data;return x===void 0||A===void 0?this.fire(new a.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`"))):x!==f.data.width||A!==f.data.height?this.fire(new a.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(R,!(p instanceof du||Yt&&p instanceof Yt)),void this.style.updateImage(u,f))},o.prototype.hasImage=function(u){return u?!!this.style.getImage(u):(this.fire(new a.ErrorEvent(new Error("Missing required image id"))),!1)},o.prototype.removeImage=function(u){this.style.removeImage(u)},o.prototype.loadImage=function(u,p){a.getImage(this._requestManager.transformRequest(u,a.ResourceType.Image),p)},o.prototype.listImages=function(){return this.style.listImages()},o.prototype.addLayer=function(u,p){return this._lazyInitEmptyStyle(),this.style.addLayer(u,p),this._update(!0)},o.prototype.moveLayer=function(u,p){return this.style.moveLayer(u,p),this._update(!0)},o.prototype.removeLayer=function(u){return this.style.removeLayer(u),this._update(!0)},o.prototype.getLayer=function(u){return this.style.getLayer(u)},o.prototype.setLayerZoomRange=function(u,p,f){return this.style.setLayerZoomRange(u,p,f),this._update(!0)},o.prototype.setFilter=function(u,p,f){return f===void 0&&(f={}),this.style.setFilter(u,p,f),this._update(!0)},o.prototype.getFilter=function(u){return this.style.getFilter(u)},o.prototype.setPaintProperty=function(u,p,f,d){return d===void 0&&(d={}),this.style.setPaintProperty(u,p,f,d),this._update(!0)},o.prototype.getPaintProperty=function(u,p){return this.style.getPaintProperty(u,p)},o.prototype.setLayoutProperty=function(u,p,f,d){return d===void 0&&(d={}),this.style.setLayoutProperty(u,p,f,d),this._update(!0)},o.prototype.getLayoutProperty=function(u,p){return this.style.getLayoutProperty(u,p)},o.prototype.setLight=function(u,p){return p===void 0&&(p={}),this._lazyInitEmptyStyle(),this.style.setLight(u,p),this._update(!0)},o.prototype.getLight=function(){return this.style.getLight()},o.prototype.setFeatureState=function(u,p){return this.style.setFeatureState(u,p),this._update()},o.prototype.removeFeatureState=function(u,p){return this.style.removeFeatureState(u,p),this._update()},o.prototype.getFeatureState=function(u){return this.style.getFeatureState(u)},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 u=0,p=0;return this._container&&(u=this._container.clientWidth||400,p=this._container.clientHeight||300),[u,p]},o.prototype._detectMissingCSS=function(){a.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&a.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 u=this._container;u.classList.add("mapboxgl-map"),(this._missingCSSCanary=w.create("div","mapboxgl-canary",u)).style.visibility="hidden",this._detectMissingCSS();var p=this._canvasContainer=w.create("div","mapboxgl-canvas-container",u);this._interactive&&p.classList.add("mapboxgl-interactive"),this._canvas=w.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=w.create("div","mapboxgl-control-container",u),x=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((function(A){x[A]=w.create("div","mapboxgl-ctrl-"+A,d)})),this._container.addEventListener("scroll",this._onMapScroll,!1)},o.prototype._resizeCanvas=function(u,p){var f=a.browser.devicePixelRatio||1;this._canvas.width=f*u,this._canvas.height=f*p,this._canvas.style.width=u+"px",this._canvas.style.height=p+"px"},o.prototype._setupPainter=function(){var u=a.extend({},_.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),p=this._canvas.getContext("webgl",u)||this._canvas.getContext("experimental-webgl",u);p?(this.painter=new gr(p,this.transform),a.webpSupported.testSupport(p)):this.fire(new a.ErrorEvent(new Error("Failed to initialize WebGL")))},o.prototype._contextLost=function(u){u.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new a.Event("webglcontextlost",{originalEvent:u}))},o.prototype._contextRestored=function(u){this._setupPainter(),this.resize(),this._update(),this.fire(new a.Event("webglcontextrestored",{originalEvent:u}))},o.prototype._onMapScroll=function(u){if(u.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(u){return this.style?(this._styleDirty=this._styleDirty||u,this._sourcesDirty=!0,this.triggerRepaint(),this):this},o.prototype._requestRenderFrame=function(u){return this._update(),this._renderTaskQueue.add(u)},o.prototype._cancelRenderFrame=function(u){this._renderTaskQueue.remove(u)},o.prototype._render=function(u){var p,f=this,d=0,x=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(p=x.createQueryEXT(),x.beginQueryEXT(x.TIME_ELAPSED_EXT,p),d=a.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(u),!this._removed){var A=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var R=this.transform.zoom,q=a.browser.now();this.style.zoomHistory.update(R,q);var V=new a.EvaluationParameters(R,{now:q,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),j=V.crossFadingFactor();j===1&&j===this._crossFadingFactor||(A=!0,this._crossFadingFactor=j),this.style.update(V)}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 a.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new a.Event("load"))),this.style&&(this.style.hasTransitions()||A)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var Y=a.browser.now()-d;x.endQueryEXT(x.TIME_ELAPSED_EXT,p),setTimeout((function(){var Z=x.getQueryObjectEXT(p,x.QUERY_RESULT_EXT)/1e6;x.deleteQueryEXT(p),f.fire(new a.Event("gpu-timing-frame",{cpuTime:Y,gpuTime:Z}))}),50)}if(this.listens("gpu-timing-layer")){var J=this.painter.collectGpuTimers();setTimeout((function(){var Z=f.painter.queryGpuTimers(J);f.fire(new a.Event("gpu-timing-layer",{layerTimes:Z}))}),50)}var re=this._sourcesDirty||this._styleDirty||this._placementDirty;return re||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.Event("idle")),!this._loaded||this._fullyLoaded||re||(this._fullyLoaded=!0),this}},o.prototype.remove=function(){this._hash&&this._hash.remove();for(var u=0,p=this._controls;u<p.length;u+=1)p[u].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),a.window!==void 0&&(a.window.removeEventListener("resize",this._onWindowResize,!1),a.window.removeEventListener("orientationchange",this._onWindowResize,!1),a.window.removeEventListener("online",this._onWindowOnline,!1));var f=this.painter.context.gl.getExtension("WEBGL_lose_context");f&&f.loseContext(),Mo(this._canvasContainer),Mo(this._controlContainer),Mo(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new a.Event("remove"))},o.prototype.triggerRepaint=function(){var u=this;this.style&&!this._frame&&(this._frame=a.browser.frame((function(p){u._frame=null,u._render(p)})))},o.prototype._onWindowOnline=function(){this._update()},o.prototype._onWindowResize=function(u){this._trackResize&&this.resize({originalEvent:u})._update()},i.showTileBoundaries.get=function(){return!!this._showTileBoundaries},i.showTileBoundaries.set=function(u){this._showTileBoundaries!==u&&(this._showTileBoundaries=u,this._update())},i.showPadding.get=function(){return!!this._showPadding},i.showPadding.set=function(u){this._showPadding!==u&&(this._showPadding=u,this._update())},i.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},i.showCollisionBoxes.set=function(u){this._showCollisionBoxes!==u&&(this._showCollisionBoxes=u,u?this.style._generateCollisionBoxes():this._update())},i.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},i.showOverdrawInspector.set=function(u){this._showOverdrawInspector!==u&&(this._showOverdrawInspector=u,this._update())},i.repaint.get=function(){return!!this._repaint},i.repaint.set=function(u){this._repaint!==u&&(this._repaint=u,this.triggerRepaint())},i.vertices.get=function(){return!!this._vertices}
vendor: 13,007 bytes, line 497
497,i.vertices.set=function(u){this._vertices=u,this._update()},o.prototype._setCacheLimits=function(u,p){a.setCacheLimits(u,p)},i.version.get=function(){return a.version},Object.defineProperties(o.prototype,i),o})(ls);function Mo(n){n.parentNode&&n.parentNode.removeChild(n)}var yu={showCompass:!0,showZoom:!0,visualizePitch:!1},Di=function(n){var o=this;this.options=a.extend({},yu,n),this._container=w.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(function(i){return i.preventDefault()})),this.options.showZoom&&(a.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",(function(i){return o._map.zoomIn({},{originalEvent:i})})),w.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",(function(i){return o._map.zoomOut({},{originalEvent:i})})),w.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(a.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",(function(i){o.options.visualizePitch?o._map.resetNorthPitch({},{originalEvent:i}):o._map.resetNorth({},{originalEvent:i})})),this._compassIcon=w.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};Di.prototype._updateZoomButtons=function(){var n=this._map.getZoom(),o=n===this._map.getMaxZoom(),i=n===this._map.getMinZoom();this._zoomInButton.disabled=o,this._zoomOutButton.disabled=i,this._zoomInButton.setAttribute("aria-disabled",o.toString()),this._zoomOutButton.setAttribute("aria-disabled",i.toString())},Di.prototype._rotateCompassArrow=function(){var n=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=n},Di.prototype.onAdd=function(n){return this._map=n,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 $n(this._map,this._compass,this.options.visualizePitch)),this._container},Di.prototype.onRemove=function(){w.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},Di.prototype._createButton=function(n,o){var i=w.create("button",n,this._container);return i.type="button",i.addEventListener("click",o),i},Di.prototype._setButtonTitle=function(n,o){var i=this._map._getUIString("NavigationControl."+o);n.title=i,n.setAttribute("aria-label",i)};var $n=function(n,o,i){i===void 0&&(i=!1),this._clickTolerance=10,this.element=o,this.mouseRotate=new as({clickTolerance:n.dragRotate._mouseRotate._clickTolerance}),this.map=n,i&&(this.mousePitch=new pu({clickTolerance:n.dragRotate._mousePitch._clickTolerance})),a.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),w.addEventListener(o,"mousedown",this.mousedown),w.addEventListener(o,"touchstart",this.touchstart,{passive:!1}),w.addEventListener(o,"touchmove",this.touchmove),w.addEventListener(o,"touchend",this.touchend),w.addEventListener(o,"touchcancel",this.reset)};function Qo(n,o,i){if(n=new a.LngLat(n.lng,n.lat),o){var u=new a.LngLat(n.lng-360,n.lat),p=new a.LngLat(n.lng+360,n.lat),f=i.locationPoint(n).distSqr(o);i.locationPoint(u).distSqr(o)<f?n=u:i.locationPoint(p).distSqr(o)<f&&(n=p)}for(;Math.abs(n.lng-i.center.lng)>180;){var d=i.locationPoint(n);if(d.x>=0&&d.y>=0&&d.x<=i.width&&d.y<=i.height)break;n.lng>i.center.lng?n.lng-=360:n.lng+=360}return n}$n.prototype.down=function(n,o){this.mouseRotate.mousedown(n,o),this.mousePitch&&this.mousePitch.mousedown(n,o),w.disableDrag()},$n.prototype.move=function(n,o){var i=this.map,u=this.mouseRotate.mousemoveWindow(n,o);if(u&&u.bearingDelta&&i.setBearing(i.getBearing()+u.bearingDelta),this.mousePitch){var p=this.mousePitch.mousemoveWindow(n,o);p&&p.pitchDelta&&i.setPitch(i.getPitch()+p.pitchDelta)}},$n.prototype.off=function(){var n=this.element;w.removeEventListener(n,"mousedown",this.mousedown),w.removeEventListener(n,"touchstart",this.touchstart,{passive:!1}),w.removeEventListener(n,"touchmove",this.touchmove),w.removeEventListener(n,"touchend",this.touchend),w.removeEventListener(n,"touchcancel",this.reset),this.offTemp()},$n.prototype.offTemp=function(){w.enableDrag(),w.removeEventListener(a.window,"mousemove",this.mousemove),w.removeEventListener(a.window,"mouseup",this.mouseup)},$n.prototype.mousedown=function(n){this.down(a.extend({},n,{ctrlKey:!0,preventDefault:function(){return n.preventDefault()}}),w.mousePos(this.element,n)),w.addEventListener(a.window,"mousemove",this.mousemove),w.addEventListener(a.window,"mouseup",this.mouseup)},$n.prototype.mousemove=function(n){this.move(n,w.mousePos(this.element,n))},$n.prototype.mouseup=function(n){this.mouseRotate.mouseupWindow(n),this.mousePitch&&this.mousePitch.mouseupWindow(n),this.offTemp()},$n.prototype.touchstart=function(n){n.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=w.touchPos(this.element,n.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return n.preventDefault()}},this._startPos))},$n.prototype.touchmove=function(n){n.targetTouches.length!==1?this.reset():(this._lastPos=w.touchPos(this.element,n.targetTouches)[0],this.move({preventDefault:function(){return n.preventDefault()}},this._lastPos))},$n.prototype.touchend=function(n){n.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},$n.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var Ti={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 ps(n,o,i){var u=n.classList;for(var p in Ti)u.remove("mapboxgl-"+i+"-anchor-"+p);u.add("mapboxgl-"+i+"-anchor-"+o)}var ea,Ma=(function(n){function o(i,u){if(n.call(this),(i instanceof a.window.HTMLElement||u)&&(i=a.extend({element:i},u)),a.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=i&&i.anchor||"center",this._color=i&&i.color||"#3FB1CE",this._scale=i&&i.scale||1,this._draggable=i&&i.draggable||!1,this._clickTolerance=i&&i.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=i&&i.rotation||0,this._rotationAlignment=i&&i.rotationAlignment||"auto",this._pitchAlignment=i&&i.pitchAlignment&&i.pitchAlignment!=="auto"?i.pitchAlignment:this._rotationAlignment,i&&i.element)this._element=i.element,this._offset=a.Point.convert(i&&i.offset||[0,0]);else{this._defaultMarker=!0,this._element=w.create("div"),this._element.setAttribute("aria-label","Map marker");var p=w.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=w.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=w.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"fill-rule","nonzero");var x=w.createNS("http://www.w3.org/2000/svg","g");x.setAttributeNS(null,"transform","translate(3.0, 29.0)"),x.setAttributeNS(null,"fill","#000000");for(var A=0,R=[{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"}];A<R.length;A+=1){var q=R[A],V=w.createNS("http://www.w3.org/2000/svg","ellipse");V.setAttributeNS(null,"opacity","0.04"),V.setAttributeNS(null,"cx","10.5"),V.setAttributeNS(null,"cy","5.80029008"),V.setAttributeNS(null,"rx",q.rx),V.setAttributeNS(null,"ry",q.ry),x.appendChild(V)}var j=w.createNS("http://www.w3.org/2000/svg","g");j.setAttributeNS(null,"fill",this._color);var Y=w.createNS("http://www.w3.org/2000/svg","path");Y.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"),j.appendChild(Y);var J=w.createNS("http://www.w3.org/2000/svg","g");J.setAttributeNS(null,"opacity","0.25"),J.setAttributeNS(null,"fill","#000000");var re=w.createNS("http://www.w3.org/2000/svg","path");re.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),J.appendChild(re);var Z=w.createNS("http://www.w3.org/2000/svg","g");Z.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Z.setAttributeNS(null,"fill","#FFFFFF");var te=w.createNS("http://www.w3.org/2000/svg","g");te.setAttributeNS(null,"transform","translate(8.0, 8.0)");var ae=w.createNS("http://www.w3.org/2000/svg","circle");ae.setAttributeNS(null,"fill","#000000"),ae.setAttributeNS(null,"opacity","0.25"),ae.setAttributeNS(null,"cx","5.5"),ae.setAttributeNS(null,"cy","5.5"),ae.setAttributeNS(null,"r","5.4999962");var fe=w.createNS("http://www.w3.org/2000/svg","circle");fe.setAttributeNS(null,"fill","#FFFFFF"),fe.setAttributeNS(null,"cx","5.5"),fe.setAttributeNS(null,"cy","5.5"),fe.setAttributeNS(null,"r","5.4999962"),te.appendChild(ae),te.appendChild(fe),d.appendChild(x),d.appendChild(j),d.appendChild(J),d.appendChild(Z),d.appendChild(te),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=a.Point.convert(i&&i.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",(function(Se){Se.preventDefault()})),this._element.addEventListener("mousedown",(function(Se){Se.preventDefault()})),ps(this._element,this._anchor,"marker"),this._popup=null}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.addTo=function(i){return this.remove(),this._map=i,i.getCanvasContainer().appendChild(this._element),i.on("move",this._update),i.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),w.remove(this._element),this._popup&&this._popup.remove(),this},o.prototype.getLngLat=function(){return this._lngLat},o.prototype.setLngLat=function(i){return this._lngLat=a.LngLat.convert(i),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},o.prototype.getElement=function(){return this._element},o.prototype.setPopup=function(i){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),i){if(!("offset"in i.options)){var u=Math.sqrt(Math.pow(13.5,2)/2);i.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[u,-1*(24.6+u)],"bottom-right":[-u,-1*(24.6+u)],left
497:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=i,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(i){var u=i.code,p=i.charCode||i.keyCode;u!=="Space"&&u!=="Enter"&&p!==32&&p!==13||this.togglePopup()},o.prototype._onMapClick=function(i){var u=i.originalEvent.target,p=this._element;this._popup&&(u===p||p.contains(u))&&this.togglePopup()},o.prototype.getPopup=function(){return this._popup},o.prototype.togglePopup=function(){var i=this._popup;return i?(i.isOpen()?i.remove():i.addTo(this._map),this):this},o.prototype._update=function(i){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=Qo(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var u="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?u="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(u="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)"),i&&i.type!=="moveend"||(this._pos=this._pos.round()),w.setTransform(this._element,Ti[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+p+" "+u)}},o.prototype.getOffset=function(){return this._offset},o.prototype.setOffset=function(i){return this._offset=a.Point.convert(i),this._update(),this},o.prototype._onMove=function(i){if(!this._isDragging){var u=this._clickTolerance||this._map._clickTolerance;this._isDragging=i.point.dist(this._pointerdownPos)>=u}this._isDragging&&(this._pos=i.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new a.Event("dragstart"))),this.fire(new a.Event("drag")))},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 a.Event("dragend")),this._state="inactive"},o.prototype._addDragHandler=function(i){this._element.contains(i.originalEvent.target)&&(i.preventDefault(),this._positionDelta=i.point.sub(this._pos).add(this._offset),this._pointerdownPos=i.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(i){return this._draggable=!!i,this._map&&(i?(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(i){return this._rotation=i||0,this._update(),this},o.prototype.getRotation=function(){return this._rotation},o.prototype.setRotationAlignment=function(i){return this._rotationAlignment=i||"auto",this._update(),this},o.prototype.getRotationAlignment=function(){return this._rotationAlignment},o.prototype.setPitchAlignment=function(i){return this._pitchAlignment=i&&i!=="auto"?i:this._rotationAlignment,this._update(),this},o.prototype.getPitchAlignment=function(){return this._pitchAlignment},o})(a.Evented),mu={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ta=0,ko=!1,vu=(function(n){function o(i){n.call(this),this.options=a.extend({},mu,i),a.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.onAdd=function(i){var u;return this._map=i,this._container=w.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),u=this._setupUI,ea!==void 0?u(ea):a.window.navigator.permissions!==void 0?a.window.navigator.permissions.query({name:"geolocation"}).then((function(p){u(ea=p.state!=="denied")})):u(ea=!!a.window.navigator.geolocation),this._container},o.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(a.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),w.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ta=0,ko=!1},o.prototype._isOutOfMapMaxBounds=function(i){var u=this._map.getMaxBounds(),p=i.coords;return u&&(p.longitude<u.getWest()||p.longitude>u.getEast()||p.latitude<u.getSouth()||p.latitude>u.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(i){if(this._map){if(this._isOutOfMapMaxBounds(i))return this._setErrorState(),this.fire(new a.Event("outofmaxbounds",i)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=i,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(i),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(i),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new a.Event("geolocate",i)),this._finish()}},o.prototype._updateCamera=function(i){var u=new a.LngLat(i.coords.longitude,i.coords.latitude),p=i.coords.accuracy,f=this._map.getBearing(),d=a.extend({bearing:f},this.options.fitBoundsOptions);this._map.fitBounds(u.toBounds(p),d,{geolocateSource:!0})},o.prototype._updateMarker=function(i){if(i){var u=new a.LngLat(i.coords.longitude,i.coords.latitude);this._accuracyCircleMarker.setLngLat(u).addTo(this._map),this._userLocationDotMarker.setLngLat(u).addTo(this._map),this._accuracy=i.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},o.prototype._updateCircleRadius=function(){var i=this._map._container.clientHeight/2,u=this._map.unproject([0,i]),p=this._map.unproject([1,i]),f=u.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(i){if(this._map){if(this.options.trackUserLocation)if(i.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 u=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(i.code===3&&ko)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new a.Event("error",i)),this._finish()}},o.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},o.prototype._setupUI=function(i){var u=this;if(this._container.addEventListener("contextmenu",(function(d){return d.preventDefault()})),this._geolocateButton=w.create("button","mapboxgl-ctrl-geolocate",this._container),w.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",i===!1){a.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=w.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Ma(this._dotElement),this._circleElement=w.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ma({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||u._watchState!=="ACTIVE_LOCK"||d.originalEvent&&d.originalEvent.type==="resize"||(u._watchState="BACKGROUND",u._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),u._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),u.fire(new a.Event("trackuserlocationend")))}))},o.prototype.trigger=function(){if(!this._setup)return a.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new a.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ta--,ko=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new a.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new a.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var i;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++ta>1?(i={maximumAge:6e5,timeout:0},ko=!0):(i=this.options.positionOptions,ko=!1),this._geolocationWatchID=a.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,i)}}else a.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},o.prototype._clearWatch=function(){a.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},o})(a.Evented),eo={maxWidth:100,unit:"metric"},to=function(n){this.options=a.extend({},eo,n),a.bindAll(["_onMove","setUnit"],this)};function hs(n,o,i){var u=i&&i.maxWidth||100,p=n._container.clientHeight/2,f=n.unproject([0,p]),d=n.unproject([u,p]),x=f.distanceTo(d);if(i&&i.unit==="imperial"){var A=3.2808*x;A>5280?ro(o,u,A/5280,n._getUIString("ScaleControl.Miles")):ro(o,u,A,n._getUIString("ScaleControl.Feet"))}else i&&i.unit==="nautical"?ro(o,u,x/1852,n._getUIString("ScaleControl.NauticalMiles")):x>=1e3?ro(o,u,x/1e3,n._getUIString("ScaleControl.Kilometers")):ro(o,u,x,n._getUIString("ScaleControl.Meters"))}function ro(n,o,i,u){var p,f,d,x=(p=i,(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(A){var R=Math.pow(10,Math.ceil(-Math.log(A)/Math.LN10));return Math.round(A*R)/R})(d)));n.style.width=o*(x/i)+"px",n.innerHTML=x+"&nbsp;"+u}to.prototype.getDefaultPosition=function(){return"bottom-left"},to.prototype._onMove=function(){hs(this._map,this._container,this.options)},to.prototype.onAdd=function(n){return this._map=n,this._container=w.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",n.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},to.prototype.onRemove=function(){w.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},to.prototype.setUnit=function(n){this.options.unit=n,hs(this._map,this._container,this.options)};var ui=function(n){this._fullscreen=!1,n&&n.container&&(n.container instanceof a.window.HTMLElement?this._container=n.container:a.warnOnce("Full screen control 'container' must be a DOM element.")),a.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in a.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in a.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in a.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in a.window.document&&(this._fullscreenchange="MSFullscreenChange")};ui.prototype.onAdd=function(n){return this._map=n,this._container||(this._container=this._map.getContainer()),this._controlContainer=w.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",a.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},ui.prototype.onRemove=function(){w.remove(this._controlContainer),this._map=null,a.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},ui.prototype._checkFullscreenSupport=function(){return!!(a.window.document.fullscreenEnabled||a.window.document.mozFullScreenEnabled||a.window.document.msFullscreenEnabled||a.window.document.webkitFullscreenEnabled)},ui.prototype._setupUI=function(){var n=this._fullscreenButton=w.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);w.create("span","mapboxgl-ctrl-icon",n).setAttribute("aria-hidden",!0),n.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),a.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},ui.prototype._updateTitle=function(){var n=this._getTitle();this._fullscreenButton.setAttribute("aria-label",n),this._fullscreenButton.title=n},ui.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},ui.prototype._isFullscreen=function(){return this._fullscreen},ui.prototype._changeIcon=function(){(a.window.document.fullscreenElement||a.window.document.mozFullScreenElement||a.window.document.webkitFullscreenElement||a.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},ui.prototype._onClickFullscreen=function(){this._isFullscreen()?a.window.document.exitFullscreen?a.window.document.exitFullscreen():a.window.document.mozCancelFullScreen?a.window.document.mozCancelFullScreen():a.window.document.msExitFullscreen?a.window.document.msExitFullscreen():a.window.document.webkitCancelFullScreen&&a.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var gu={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"}
vendor: 6,282 bytes, line 497
497,ka=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),_u=(function(n){function o(i){n.call(this),this.options=a.extend(Object.create(gu),i),a.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return n&&(o.__proto__=n),(o.prototype=Object.create(n&&n.prototype)).constructor=o,o.prototype.addTo=function(i){return this._map&&this.remove(),this._map=i,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new a.Event("open")),this},o.prototype.isOpen=function(){return!!this._map},o.prototype.remove=function(){return this._content&&w.remove(this._content),this._container&&(w.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new a.Event("close")),this},o.prototype.getLngLat=function(){return this._lngLat},o.prototype.setLngLat=function(i){return this._lngLat=a.LngLat.convert(i),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(i){return this.setDOMContent(a.window.document.createTextNode(i))},o.prototype.setHTML=function(i){var u,p=a.window.document.createDocumentFragment(),f=a.window.document.createElement("body");for(f.innerHTML=i;u=f.firstChild;)p.appendChild(u);return this.setDOMContent(p)},o.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},o.prototype.setMaxWidth=function(i){return this.options.maxWidth=i,this._update(),this},o.prototype.setDOMContent=function(i){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=w.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(i),this._createCloseButton(),this._update(),this._focusFirstElement(),this},o.prototype.addClassName=function(i){this._container&&this._container.classList.add(i)},o.prototype.removeClassName=function(i){this._container&&this._container.classList.remove(i)},o.prototype.setOffset=function(i){return this.options.offset=i,this._update(),this},o.prototype.toggleClassName=function(i){if(this._container)return this._container.classList.toggle(i)},o.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=w.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))},o.prototype._onMouseUp=function(i){this._update(i.point)},o.prototype._onMouseMove=function(i){this._update(i.point)},o.prototype._onDrag=function(i){this._update(i.point)},o.prototype._update=function(i){var u=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=w.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=w.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(V){return u._container.classList.add(V)})),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=Qo(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||i)){var p=this._pos=this._trackPointer&&i?i:this._map.project(this._lngLat),f=this.options.anchor,d=(function V(j){if(j){if(typeof j=="number"){var Y=Math.round(Math.sqrt(.5*Math.pow(j,2)));return{center:new a.Point(0,0),top:new a.Point(0,j),"top-left":new a.Point(Y,Y),"top-right":new a.Point(-Y,Y),bottom:new a.Point(0,-j),"bottom-left":new a.Point(Y,-Y),"bottom-right":new a.Point(-Y,-Y),left:new a.Point(j,0),right:new a.Point(-j,0)}}if(j instanceof a.Point||Array.isArray(j)){var J=a.Point.convert(j);return{center:J,top:J,"top-left":J,"top-right":J,bottom:J,"bottom-left":J,"bottom-right":J,left:J,right:J}}return{center:a.Point.convert(j.center||[0,0]),top:a.Point.convert(j.top||[0,0]),"top-left":a.Point.convert(j["top-left"]||[0,0]),"top-right":a.Point.convert(j["top-right"]||[0,0]),bottom:a.Point.convert(j.bottom||[0,0]),"bottom-left":a.Point.convert(j["bottom-left"]||[0,0]),"bottom-right":a.Point.convert(j["bottom-right"]||[0,0]),left:a.Point.convert(j.left||[0,0]),right:a.Point.convert(j.right||[0,0])}}return V(new a.Point(0,0))})(this.options.offset);if(!f){var x,A=this._container.offsetWidth,R=this._container.offsetHeight;x=p.y+d.bottom.y<R?["top"]:p.y>this._map.transform.height-R?["bottom"]:[],p.x<A/2?x.push("left"):p.x>this._map.transform.width-A/2&&x.push("right"),f=x.length===0?"bottom":x.join("-")}
497var q=p.add(d[f]).round();w.setTransform(this._container,Ti[f]+" translate("+q.x+"px,"+q.y+"px)"),ps(this._container,f,"popup")}},o.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var i=this._container.querySelector(ka);i&&i.focus()}},o.prototype._onClose=function(){this.remove()},o})(a.Evented),fs={version:a.version,supported:_,setRTLTextPlugin:a.setRTLTextPlugin,getRTLTextPluginStatus:a.getRTLTextPluginStatus,Map:Pl,NavigationControl:Di,GeolocateControl:vu,AttributionControl:Cn,ScaleControl:to,FullscreenControl:ui,Popup:_u,Marker:Ma,Style:qn,LngLat:a.LngLat,LngLatBounds:a.LngLatBounds,Point:a.Point,MercatorCoordinate:a.MercatorCoordinate,Evented:a.Evented,config:a.config,prewarm:function(){Ee().acquire(Te)},clearPrewarmedResources:function(){var n=Qe;n&&(n.isPreloaded()&&n.numActive()===1?(n.release(Te),Qe=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return a.config.ACCESS_TOKEN},set accessToken(n){a.config.ACCESS_TOKEN=n},get baseApiUrl(){return a.config.API_URL},set baseApiUrl(n){a.config.API_URL=n},get workerCount(){return ke.workerCount},set workerCount(n){ke.workerCount=n},get maxParallelImageRequests(){return a.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(n){a.config.MAX_PARALLEL_IMAGE_REQUESTS=n},clearStorage:function(n){a.clearTileCache(n)},workerUrl:""};return fs})),T}))})(mc)),mc.exports}var Bw=Ow();const bT=Vy(Bw);class Fw{constructor(){this.node=document.createElement("div"),this.node.classList.add("mapboxgl-ctrl"),this.node.classList.add("mapboxgl-ctrl-group"),this.node.classList.add("mapbox-control")}addButton(m){this.node.appendChild(m.node)}addClassName(m){this.node.classList.add(m)}removeClassName(m){this.node.classList.remove(m)}onAddControl(){}onRemoveControl(){}onAdd(m){return this.map=m,this.onAddControl(),this.node}onRemove(){this.onRemoveControl(),this.node.parentNode.removeChild(this.node),this.map=void 0}}class Nw{constructor(){this.node=document.createElement("button"),this.node.type="button",this.icon=null}setIcon(m){this.icon=m,this.node.appendChild(m)}setText(m){this.node.textContent=m}onClick(m){this.node.addEventListener("click",m)}addClassName(m){this.node.classList.add(m)}removeClassName(m){this.node.classList.remove(m)}}var Rv;(function(g){g.Default="",g.Move="move",g.Grabbing="grabbing",g.NESWResize="nesw-resize",g.NWSEResize="nwse-resize"})(Rv||(Rv={}));var zv;(function(g){g.Move="move",g.Transform="transform"})(zv||(zv={}));var Lv;(function(g){g.Visible="visible",g.None="none"})(Lv||(Lv={}));var Dv;(function(g){g.Next="next",g.Prev="prev"})(Dv||(Dv={}));class wT extends Fw{constructor(m){var v;super(),this.styles=(v=m?.styles)!==null&&v!==void 0?v:this.defaultOptions,this.onChange=m?.onChange,this.buttons=[]}insert(){this.addClassName("mapbox-control-styles"),this.styles.forEach(m=>{const v=new Nw;v.setText(m.label),v.onClick(()=>{v.node.classList.contains("-active")||(this.map.setStyle(m.styleUrl),this.onChange&&this.onChange(m))}),this.buttons.push(v),this.addButton(v)}),this.map.on("styledata",()=>{this.buttons.forEach(S=>{S.removeClassName("-active")});const v=this.styles.map(S=>S.styleName).indexOf(this.map.getStyle().name);v!==-1&&this.buttons[v].addClassName("-active")})}get defaultOptions(){return[{label:"Streets",styleName:"Mapbox Streets",styleUrl:"mapbox://styles/mapbox/streets-v11"},{label:"Satellite",styleName:"Mapbox Satellite Streets",styleUrl:"mapbox://sprites/mapbox/satellite-streets-v11"}]}onAddControl(){this.insert()}}var lc={exports:{}},xp,Ov;function qw(){return Ov||(Ov=1,xp=function(m,v){const S={drag:[],click:[],mousemove:[],mousedown:[],mouseup:[],mouseout:[],keydown:[],keyup:[],touchstart:[],touchmove:[],touchend:[],tap:[]},T={on:function(a,_,w){if(S[a]===void 0)throw new Error(`Invalid event type: ${a}`);S[a].push({selector:_,fn:w})},render:function(a){v.store.featureChanged(a)}},E=function(a,_){const w=S[a];let k=w.length;for(;k--;){const z=w[k];if(z.selector(_)){z.fn.call(T,_),v.store.render(),v.ui.updateMapClasses();break}}};return m.start.call(T),{render:m.render,stop:function(){m.stop&&m.stop()},trash:function(){m.trash&&(m.trash(),v.store.render())},combineFeatures:function(){m.combineFeatures&&m.combineFeatures()},uncombineFeatures:function(){m.uncombineFeatures&&m.uncombineFeatures()},drag:function(a){E("drag",a)},click:function(a){E("click",a)},mousemove:function(a){E("mousemove",a)},mousedown:function(a){E("mousedown",a)},mouseup:function(a){E("mouseup",a)},mouseout:function(a){E("mouseout",a)},keydown:function(a){E("keydown",a)},keyup:function(a){E("keyup",a)},touchstart:function(a){E("touchstart",a)},touchmove:function(a){E("touchmove",a)},touchend:function(a){E("touchend",a)},tap:function(a){E("tap",a)}}}),xp}var cc={},$u={},Bv;function Uw(){return Bv||(Bv=1,$u.RADIUS=6378137,$u.FLATTENING=1/298.257223563,$u.POLAR_RADIUS=63567523142e-4),$u}var Fv;function Vw(){if(Fv)return cc;Fv=1;var g=Uw();cc.geometry=m,cc.ring=S;function m(E){var a=0,_;switch(E.type){case"Polygon":return v(E.coordinates);case"MultiPolygon":for(_=0;_<E.coordinates.length;_++)a+=v(E.coordinates[_]);return a;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(_=0;_<E.geometries.length;_++)a+=m(E.geometries[_]);return a}}function v(E){var a=0;if(E&&E.length>0){a+=Math.abs(S(E[0]));for(var _=1;_<E.length;_++)a-=Math.abs(S(E[_]))}return a}function S(E){var a,_,w,k,z,O,F,W=0,ue=E.length;if(ue>2){for(F=0;F<ue;F++)F===ue-2?(k=ue-2,z=ue-1,O=0):F===ue-1?(k=ue-1,z=0,O=1):(k=F,z=F+1,O=F+2),a=E[k],_=E[z],w=E[O],W+=(T(w[0])-T(a[0]))*Math.sin(T(_[1]));W=W*g.RADIUS*g.RADIUS/2}return W}function T(E){return E*Math.PI/180}return cc}var bp,Nv;function qr(){return Nv||(Nv=1,bp={classes:{CONTROL_BASE:"mapboxgl-ctrl",CONTROL_PREFIX:"mapboxgl-ctrl-",CONTROL_BUTTON:"mapbox-gl-draw_ctrl-draw-btn",CONTROL_BUTTON_LINE:"mapbox-gl-draw_line",CONTROL_BUTTON_POLYGON:"mapbox-gl-draw_polygon",CONTROL_BUTTON_POINT:"mapbox-gl-draw_point",CONTROL_BUTTON_TRASH:"mapbox-gl-draw_trash",CONTROL_BUTTON_COMB
497INE_FEATURES:"mapbox-gl-draw_combine",CONTROL_BUTTON_UNCOMBINE_FEATURES:"mapbox-gl-draw_uncombine",CONTROL_GROUP:"mapboxgl-ctrl-group",ATTRIBUTION:"mapboxgl-ctrl-attrib",ACTIVE_BUTTON:"active",BOX_SELECT:"mapbox-gl-draw_boxselect"},sources:{HOT:"mapbox-gl-draw-hot",COLD:"mapbox-gl-draw-cold"},cursors:{ADD:"add",MOVE:"move",DRAG:"drag",POINTER:"pointer",NONE:"none"},types:{POLYGON:"polygon",LINE:"line_string",POINT:"point"},geojsonTypes:{FEATURE:"Feature",POLYGON:"Polygon",LINE_STRING:"LineString",POINT:"Point",FEATURE_COLLECTION:"FeatureCollection",MULTI_PREFIX:"Multi",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon"},modes:{DRAW_LINE_STRING:"draw_line_string",DRAW_POLYGON:"draw_polygon",DRAW_POINT:"draw_point",SIMPLE_SELECT:"simple_select",DIRECT_SELECT:"direct_select",STATIC:"static"},events:{CREATE:"draw.create",DELETE:"draw.delete",UPDATE:"draw.update",SELECTION_CHANGE:"draw.selectionchange",MODE_CHANGE:"draw.modechange",ACTIONABLE:"draw.actionable",RENDER:"draw.render",COMBINE_FEATURES:"draw.combine",UNCOMBINE_FEATURES:"draw.uncombine"},updateActions:{MOVE:"move",CHANGE_COORDINATES:"change_coordinates"},meta:{FEATURE:"feature",MIDPOINT:"midpoint",VERTEX:"vertex"},activeStates:{ACTIVE:"true",INACTIVE:"false"},interactions:["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"],LAT_MIN:-90,LAT_RENDERED_MIN:-85,LAT_MAX:90,LAT_RENDERED_MAX:85,LNG_MIN:-270,LNG_MAX:270}),bp}var wp,qv;function jw(){if(qv)return wp;qv=1;const g=Vw(),m=qr(),v={Point:0,LineString:1,Polygon:2};function S(E,a){const _=v[E.geometry.type]-v[a.geometry.type];return _===0&&E.geometry.type===m.geojsonTypes.POLYGON?E.area-a.area:_}function T(E){return E.map(a=>(a.geometry.type===m.geojsonTypes.POLYGON&&(a.area=g.geometry({type:m.geojsonTypes.FEATURE,property:{},geometry:a.geometry})),a)).sort(S).map(a=>(delete a.area,a))}return wp=T,wp}var Sp,Uv;function Gw(){if(Uv)return Sp;Uv=1;function g(m,v=0){return[[m.point.x-v,m.point.y-v],[m.point.x+v,m.point.y+v]]}return Sp=g,Sp}var Tp,Vv;function gc(){if(Vv)return Tp;Vv=1;function g(m){if(this._items={},this._nums={},this._length=m?m.length:0,!!m)for(let v=0,S=m.length;v<S;v++)this.add(m[v]),m[v]!==void 0&&(typeof m[v]=="string"?this._items[m[v]]=v:this._nums[m[v]]=v)}return g.prototype.add=function(m){return this.has(m)?this:(this._length++,typeof m=="string"?this._items[m]=this._length:this._nums[m]=this._length,this)},g.prototype.delete=function(m){return this.has(m)===!1?this:(this._length--,delete this._items[m],delete this._nums[m],this)},g.prototype.has=function(m){return typeof m!="string"&&typeof m!="number"?!1:this._items[m]!==void 0||this._nums[m]!==void 0},g.prototype.values=function(){const m=[];return Object.keys(this._items).forEach(v=>{m.push({k:v,v:this._items[v]})}),Object.keys(this._nums).forEach(v=>{m.push({k:JSON.parse(v),v:this._nums[v]})}),m.sort((v,S)=>v.v-S.v).map(v=>v.k)},g.prototype.clear=function(){return this._length=0,this._items={},this._nums={},this},Tp=g,Tp}var Ip,jv;function _c(){if(jv)return Ip;jv=1;const g=jw(),m=Gw(),v=qr(),S=gc(),T=[v.meta.FEATURE,v.meta.MIDPOINT,v.meta.VERTEX];Ip={click:E,touch:a};function E(w,k,z){return _(w,k,z,z.options.clickBuffer)}function a(w,k,z){return _(w,k,z,z.options.touchBuffer)}function _(w,k,z,O){if(z.map===null)return[];const F=w?m(w,O):k,W={};z.options.styles&&(W.layers=z.options.styles.map(xe=>xe.id));const ue=z.map.queryRenderedFeatures(F,W).filter(xe=>T.indexOf(xe.properties.meta)!==-1),ye=new S,ge=[];return ue.forEach(xe=>{const ce=xe.properties.id;ye.has(ce)||(ye.add(ce),ge.push(xe))}),g(ge)}return Ip}var Ep,Gv;function $w(){if(Gv)return Ep;Gv=1;const g=_c(),m=qr();return Ep=function(S,T){const E=g.click(S,null,T),a={mouse:m.cursors.NONE};return E[0]&&(a.mouse=E[0].properties.active===m.activeStates.ACTIVE?m.cursors.MOVE:m.cursors.POINTER,a.feature=E[0].properties.meta),T.events.currentModeName().indexOf("draw")!==-1&&(a.mouse=m.cursors.ADD),T.ui.queueMapClasses(a),T.ui.updateMapClasses(),E[0]},Ep}var Ap,$v;function pb(){return $v||($v=1,Ap=function(g,m){const v=g.x-m.x,S=g.y-m.y;return Math.sqrt(v*v+S*S)}),Ap}var Cp,Zv;function Zw(){if(Zv)return Cp;Zv=1;const g=pb(),m=4,v=12,S=500;return Cp=function(E,a,_={}){const w=_.fineTolerance!=null?_.fineTolerance:m,k=_.grossTolerance!=null?_.grossTolerance:v,z=_.interval!=null?_.interval:S;E.point=E.point||a.point,E.time=E.time||a.time;const O=g(E.point,a.point);return O<w||O<k&&a.time-E.time<z},Cp}var Pp,Wv;function Ww(){if(Wv)return Pp;Wv=1;const g=pb(),m=25,v=250;return Pp=function(T,E,a={}){const _=a.tolerance!=null?a.tolerance:m,w=a.interval!=null?a.interval:v;return T.point=T.point||E.point,T.time=T.time||E.time,g(T.point,E.point)<_&&E.time-T.time<w},Pp}var Mp={exports:{}},kp={exports:{}},Rp={exports:{}},Xv;function jy(){if(Xv)return Rp.exports;Xv=1;var g=Rp.exports=function(m,v){if(v||(v=16),m===void 0&&(m=128),m<=0)return"0";for(var S=Math.log(Math.pow(2,m))/Math.log(v),T=2;S===1/0;T*=2)S=Math.log(Math.pow(2,m/T))/Math.log(v)*T;for(var E=S-Math.floor(S),a="",T=0;T<Math.floor(S);T++){var _=Math.floor(Math.random()*v).toString(v);a=_+a}if(E){var w=Math.pow(v,E),_=Math.floor(Math.random()*w).toString(v);a=_+a}var k=parseInt(a,v);return k!==1/0&&k>=Math.pow(2,m)?g(m,v):a};return g.rack=function(m,v,S){var T=function(a){var _=0;do{if(_++>10)if(S)m+=S;else throw new Error("too many ID collisions, use more bits");var w=g(m,v)}
497while(Object.hasOwnProperty.call(E,w));return E[w]=a,w},E=T.hats={};return T.get=function(a){return T.hats[a]},T.set=function(a,_){return T.hats[a]=_,T},T.bits=m||128,T.base=v||16,T},Rp.exports}var zp,Hv;function xc(){if(Hv)return zp;Hv=1;const g=jy(),m=qr(),v=function(S,T){this.ctx=S,this.properties=T.properties||{},this.coordinates=T.geometry.coordinates,this.id=T.id||g(),this.type=T.geometry.type};return v.prototype.changed=function(){this.ctx.store.featureChanged(this.id)},v.prototype.incomingCoords=function(S){this.setCoordinates(S)},v.prototype.setCoordinates=function(S){this.coordinates=S,this.changed()},v.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.coordinates))},v.prototype.setProperty=function(S,T){this.properties[S]=T},v.prototype.toGeoJSON=function(){return JSON.parse(JSON.stringify({id:this.id,type:m.geojsonTypes.FEATURE,properties:this.properties,geometry:{coordinates:this.getCoordinates(),type:this.type}}))},v.prototype.internal=function(S){const T={id:this.id,meta:m.meta.FEATURE,"meta:type":this.type,active:m.activeStates.INACTIVE,mode:S};if(this.ctx.options.userProperties)for(const E in this.properties)T[`user_${E}`]=this.properties[E];return{type:m.geojsonTypes.FEATURE,properties:T,geometry:{coordinates:this.getCoordinates(),type:this.t
497ype}}},zp=v,zp}var Lp,Kv;function Gy(){if(Kv)return Lp;Kv=1;const g=xc(),m=function(v,S){g.call(this,v,S)};return m.prototype=Object.create(g.prototype),m.prototype.isValid=function(){return typeof this.coordinates[0]=="number"&&typeof this.coordinates[1]=="number"},m.prototype.updateCoordinate=function(v,S,T){arguments.length===3?this.coordinates=[S,T]:this.coordinates=[v,S],this.changed()},m.prototype.getCoordinate=function(){return this.getCoordinates()},Lp=m,Lp}var Dp,Jv;function $y(){if(Jv)return Dp;Jv=1;const g=xc(),m=function(v,S){g.call(this,v,S)};return m.prototype=Object.create(g.prototype),m.prototype.isValid=function(){return this.coordinates.length>1},m.prototype.addCoordinate=function(v,S,T){this.changed();const E=parseInt(v,10);this.coordinates.splice(E,0,[S,T])},m.prototype.getCoordinate=function(v){const S=parseInt(v,10);return JSON.parse(JSON.stringify(this.coordinates[S]))},m.prototype.removeCoordinate=function(v){this.changed(),this.coordinates.splice(parseInt(v,10),1)},m.prototype.updateCoordinate=function(v,S,T){const E=parseInt(v,10);this.coordinates[E]=[S,T],this.changed()},Dp=m,Dp}var Op,Yv;function Zy(){if(Yv)return Op;Yv=1;const g=xc(),m=function(v,S){g.call(this,v,S),this.coordinates=this.coordinates.map(T=>T.slice(0,-1))};return m.prototype=Object.create(g.prototype),m.prototype.isValid=function(){return this.coordinates.length===0?!1:this.coordinates.every(v=>v.length>2)},m.prototype.incomingCoords=function(v){this.coordinates=v.map(S=>S.slice(0,-1)),this.changed()},m.prototype.setCoordinates=function(v){this.coordinates=v,this.changed()},m.prototype.addCoordinate=function(v,S,T){this.changed();const E=v.split(".").map(_=>parseInt(_,10));this.coordinates[E[0]].splice(E[1],0,[S,T])},m.prototype.removeCoordinate=function(v){this.changed();const S=v.split(".").map(E=>parseInt(E,10)),T=this.coordinates[S[0]];T&&(T.splice(S[1],1),T.length<3&&this.coordinates.splice(S[0],1))},m.prototype.getCoordinate=function(v){const S=v.split(".").map(E=>parseInt(E,10)),T=this.coordinates[S[0]];return JSON.parse(JSON.stringify(T[S[1]]))},m.prototype.getCoordinates=function(){return this.coordinates.map(v=>v.concat([v[0]]))},m.prototype.updateCoordinate=function(v,S,T){this.changed();const E=v.split("."),a=parseInt(E[0],10),_=parseInt(E[1],10);this.coordinates[a]===void 0&&(this.coordinates[a]=[]),this.coordinates[a][_]=[S,T]},Op=m,Op}var Bp,Qv;function vc(){if(Qv)return Bp;Qv=1;const g=xc(),m=qr(),v=jy(),S={MultiPoint:Gy(),MultiLineString:$y(),MultiPolygon:Zy()},T=(a,_,w,k,z)=>{const O=w.split("."),F=parseInt(O[0],10),W=O[1]?O.slice(1).join("."):null;return a[F][_](W,k,z)},E=function(a,_){if(g.call(this,a,_),delete this.coordinates,this.model=S[_.geometry.type],this.model===void 0)throw new TypeError(`${_.geometry.type} is not a valid type`);this.features=this._coordinatesToFeatures(_.geometry.coordinates)};return E.prototype=Object.create(g.prototype),E.prototype._coordinatesToFeatures=function(a){const _=this.model.bind(this);return a.map(w=>new _(this.ctx,{id:v(),type:m.geojsonTypes.FEATURE,properties:{}
497,geometry:{coordinates:w,type:this.type.replace("Multi","")}}))},E.prototype.isValid=function(){return this.features.every(a=>a.isValid())},E.prototype.setCoordinates=function(a){this.features=this._coordinatesToFeatures(a),this.changed()},E.prototype.getCoordinate=function(a){return T(this.features,"getCoordinate",a)},E.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.features.map(a=>a.type===m.geojsonTypes.POLYGON?a.getCoordinates():a.coordinates)))},E.prototype.updateCoordinate=function(a,_,w){T(this.features,"updateCoordinate",a,_,w),this.changed()},E.prototype.addCoordinate=function(a,_,w){T(this.features,"addCoordinate",a,_,w),this.changed()},E.prototype.removeCoordinate=function(a){T(this.features,"removeCoordinate",a),this.changed()},E.prototype.getFeatures=function(){return this.features},Bp=E,Bp}var eg;function Xw(){if(eg)return kp.exports;eg=1;const g=qr(),m=_c(),v=Gy(),S=$y(),T=Zy(),E=vc(),a=kp.exports=function(_){this.map=_.map,this.drawConfig=JSON.parse(JSON.stringify(_.options||{})),this._ctx=_};return a.prototype.setSelected=function(_){return this._ctx.store.setSelected(_)},a.prototype.setSelectedCoordinates=function(_){this._ctx.store.setSelectedCoordinates(_),_.reduce((w,k)=>(w[k.feature_id]===void 0&&(w[k.feature_id]=!0,this._ctx.store.get(k.feature_id).changed()),w),{})},a.prototype.getSelected=function(){return this._ctx.store.getSelected()},a.prototype.getSelectedIds=function(){return this._ctx.store.getSelectedIds()},a.prototype.isSelected=function(_){return this._ctx.store.isSelected(_)},a.prototype.getFeature=function(_){return this._ctx.store.get(_)},a.prototype.select=function(_){return this._ctx.store.select(_)},a.prototype.deselect=function(_){return this._ctx.store.deselect(_)},a.prototype.deleteFeature=function(_,w={}){return this._ctx.store.delete(_,w)},a.prototype.addFeature=function(_){return this._ctx.store.add(_)},a.prototype.clearSelectedFeatures=function(){return this._ctx.store.clearSelected()},a.prototype.clearSelectedCoordinates=function(){return this._ctx.store.clearSelectedCoordinates()},a.prototype.setActionableState=function(_={}){const w={trash:_.trash||!1,combineFeatures:_.combineFeatures||!1,uncombineFeatures:_.uncombineFeatures||!1};return this._ctx.events.actionable(w)},a.prototype.changeMode=function(_,w={},k={}){return this._ctx.events.changeMode(_,w,k)},a.prototype.updateUIClasses=function(_){return this._ctx.ui.queueMapClasses(_)},a.prototype.activateUIButton=function(_){return this._ctx.ui.setActiveButton(_)},a.prototype.featuresAt=function(_,w,k="click"){if(k!=="click"&&k!=="touch")throw new Error("invalid buffer type");return m[k](_,w,this._ctx)},a.prototype.newFeature=function(_){const w=_.geometry.type;return w===g.geojsonTypes.POINT?new v(this._ctx,_):w===g.geojsonTypes.LINE_STRING?new S(this._ctx,_):w===g.geojsonTypes.POLYGON?new T(this._ctx,_):new E(this._ctx,_)},a.prototype.isInstanceOf=function(_,w){if(_===g.geojsonTypes.POINT)return w instanceof v;if(_===g.geojsonTypes.LINE_STRING)return w instanceof S;if(_===g.geojsonTypes.POLYGON)return w instanceof T;if(_==="MultiFeature")return w instanceof E;throw new Error(`Unknown feature class: ${_}`)},a.prototype.doRender=function(_){return this._ctx.store.featureChanged(_)},kp.exports}var tg;function Hw(){if(tg)return Mp.exports;tg=1;const g=Mp.exports=Xw();return g.prototype.onSetup=function(){},g.prototype.onDrag=function(){},g.prototype.onClick=function(){},g.prototype.onMouseMove=function(){},g.prototype.onMouseDown=function(){},g.prototype.onMouseUp=function(){},g.prototype.onMouseOut=function(){},g.prototype.onKeyUp=function(){},g.prototype.onKeyDown=function(){},g.prototype.onTouchStart=function(){},g.prototype.onTouchMove=function(){},g.prototype.onTouchEnd=function(){},g.prototype.onTap=function(){},g.prototype.onStop=function(){},g.prototype.onTrash=function(){},g.prototype.onCombineFeature=function(){},g.prototype.onUncombineFeature=function(){},g.prototype.toDisplayFeatures=function(){throw new Error("You must overwrite toDisplayFeatures")},Mp.exports}var Fp,rg;function Kw(){if(rg)return Fp;rg=1;const g=Hw(),m={drag:"onDrag",click:"onClick",mousemove:"onMouseMove",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseout:"onMouseOut",keyup:"onKeyUp",keydown:"onKeyDown",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",tap:"onTap"},v=Object.keys(m);return Fp=function(S){const T=Object.keys(S);return function(E,a={}){let _={};const w=T.reduce((z,O)=>(z[O]=S[O],z),new g(E));function k(z){return function(O){w[z](_,O)}}return{start:function(){_=w.onSetup(a),v.forEach(z=>{const O=m[z];let F=()=>!1;S[O]&&(F=()=>!0),this.on(z,F,k(O))})},stop:function(){w.onStop(_)},trash:function(){w.onTrash(_)},combineFeatures:function(){w.onCombineFeatures(_)},uncombineFeatures:function(){w.onUncombineFeatures(_)},render:function(z,O){w.toDisplayFeatures(_,z,O)}}}},Fp}var Np,ng;function Jw(){if(ng)return Np;ng=1;const g=qw(),m=$w(),v=_c(),S=Zw(),T=Ww(),E=qr(),a=Kw();return Np=function(_){const w=Object.keys(_.options.modes).reduce(($,me)=>($[me]=a(_.options.modes[me]),$),{});let k={},z={};const O={};let F=null,W=null;O.drag=function($,me){me({point:$.point,time:new Date().getTime()})?(_.ui.queueMapClasses({mouse:E.cursors.DRAG}),W.drag($)):$.originalEvent.stopPropagation()},O.mousedrag=function($){O.drag($,me=>!S(k,me))},O.touchdrag=function($){O.drag($,me=>!T(z,me))},O.mousemove=function($){if(($.originalEvent.buttons!==void 0?$.originalEvent.buttons:$.originalEvent.which)===1)return O.mousedrag($);const ze=m($,_);$.featureTarget=ze,W.mousemove($)},O.mousedown=function($){k={time:new Date().getTime(),point:$.point};const me=m($,_);$.featureTarget=me,W.mousedown($)},O.mouseup=function($){const me=m($,_);$.featureTarget=me,S(k,{point:$.point,time:new Date().getTime()})?W.click($):W.mouseup($)},O.mouseout=function($){W.mouseout($)},O.touchstart=function($){if($.originalEvent.preventDefault(),!_.options.touchEnabled)return;z={time:new Date().getTime(),point:$.point};const me=v.touch($,null,_)[0];$.featureTarget=me,W.touchstart($)},O.touchmove=function($){if($.originalEvent.preventDefault(),!!_.options.touchEnabled)return W.touchmove($),O.touchdrag($)},O.touchend=function($){if($.originalEvent.preventDefault(),!_.options.touchEnabled)return;const me=v.touch($,null,_)[0];$.featureTarget=me,T(z,{time:new Date().getTime(),point:$.point})?W.tap($):W.touchend($)};const ue=$=>!($===8||$===46||$>=48&&$<=57);O.keydown=function($){($.srcElement||$.target).classList[0]==="mapboxgl-canvas"&&(($.keyCode===8||$.keyCode===46)&&_.options.controls.trash?($.preventDefault(),W.trash()):ue($.keyCode)?W.ke
497ydown($):$.keyCode===49&&_.options.controls.point?ye(E.modes.DRAW_POINT):$.keyCode===50&&_.options.controls.line_string?ye(E.modes.DRAW_LINE_STRING):$.keyCode===51&&_.options.controls.polygon&&ye(E.modes.DRAW_POLYGON))},O.keyup=function($){ue($.keyCode)&&W.keyup($)},O.zoomend=function(){_.store.changeZoom()},O.data=function($){if($.dataType==="style"){const{setup:me,map:ze,options:Fe,store:pe}=_;Fe.styles.some(Re=>ze.getLayer(Re.id))||(me.addLayers(),pe.setDirty(),pe.render())}};function ye($,me,ze={}){W.stop();const Fe=w[$];if(Fe===void 0)throw new Error(`${$} is not valid`);F=$;const pe=Fe(_,me);W=g(pe,_),ze.silent||_.map.fire(E.events.MODE_CHANGE,{mode:$}),_.store.setDirty(),_.store.render()}const ge={trash:!1,combineFeatures:!1,uncombineFeatures:!1};function xe($){let me=!1;Object.keys($).forEach(ze=>{if(ge[ze]===void 0)throw new Error("Invalid action type");ge[ze]!==$[ze]&&(me=!0),ge[ze]=$[ze]}),me&&_.map.fire(E.events.ACTIONABLE,{actions:ge})}return{start:function(){F=_.options.defaultMode,W=g(w[F](_),_)},changeMode:ye,actionable:xe,currentModeName:function(){return F},currentModeRender:function($,me){return W.render($,me)},fire:function($,me){O[$]&&O[$](me)},addEventListeners:function(){_.map.on("mousemove",O.mousemove),_.map.on("mousedown",O.mousedown),_.map.on("mouseup",O.mouseup),_.map.on("data",O.data),_.map.on("touchmove",O.touchmove),_.map.on("touchstart",O.touchstart),_.map.on("touchend",O.touchend),_.container.addEventListener("mouseout",O.mouseout),_.options.keybindings&&(_.container.addEventListener("keydown",O.keydown),_.container.addEventListener("keyup",O.keyup))},removeEventListeners:function(){_.map.off("mousemove",O.mousemove),_.map.off("mousedown",O.mousedown),_.map.off("mouseup",O.mouseup),_.map.off("data",O.data),_.map.off("touchmove",O.touchmove),_.map.off("touchstart",O.touchstart),_.map.off("touchend",O.touchend),_.container.removeEventListener("mouseout",O.mouseout),_.options.keybindings&&(_.container.removeEventListener("keydown",O.keydown),_.container.removeEventListener("keyup",O.keyup))},trash:function($){W.trash($)},combineFeatures:function(){W.combineFeatures()},uncombineFeatures:function(){W.uncombineFeatures()},getMode:function(){return F}}},Np}var qp={exports:{}},Up,ig;function Yw(){if(ig)return Up;ig=1;function g(m,v,S){let T,E;function a(){T=!1,E&&(_.apply(S,E),E=!1)}function _(){T?E=arguments:(T=!0,m.apply(S,arguments),setTimeout(a,v))}return _}return Up=g,Up}var Vp,og;function Qw(){if(og)return Vp;og=1;function g(m){return[].concat(m).filter(v=>v!==void 0)}return Vp=g,Vp}var jp,ag;function e2(){if(ag)return jp;ag=1;const g=qr();return jp=function(){const v=this;if(!(v.ctx.map&&v.ctx.map.getSource(g.sources.HOT)!==void 0))return z();const T=v.ctx.events.currentModeName();v.ctx.ui.queueMapClasses({mode:T});let E=[],a=[];v.isDirty?a=v.getAllIds():(E=v.getChangedIds().filter(O=>v.get(O)!==void 0),a=v.sources.hot.filter(O=>O.properties.id&&E.indexOf(O.properties.id)===-1&&v.get(O.properties.id)!==void 0).map(O=>O.properties.id)),v.sources.hot=[];const _=v.sources.cold.length;v.sources.cold=v.isDirty?[]:v.sources.cold.filter(O=>{const F=O.properties.id||O.properties.parent;return E.indexOf(F)===-1});const w=_!==v.sources.cold.length||a.length>0;E.forEach(O=>k(O,"hot")),a.forEach(O=>k(O,"cold"));function k(O,F){const ue=v.get(O).internal(T);v.ctx.events.currentModeRender(ue,ye=>{v.sources[F].push(ye)})}if(w&&v.ctx.map.getSource(g.sources.COLD).setData({type:g.geojsonTypes.FEATURE_COLLECTION,features:v.sources.cold}),v.ctx.map.getSource(g.sources.HOT).setData({type:g.geojsonTypes.FEATURE_COLLECTION,features:v.sources.hot}),v._emitSelectionChange&&(v.ctx.map.fire(g.events.SELECTION_CHANGE,{features:v.getSelected().map(O=>O.toGeoJSON()),points:v.getSelectedCoordinates().map(O=>({type:g.geojsonTypes.FEATURE,properties:{},geometry:{type:g.geojsonTypes.POINT,coordinates:O.coordinates}}))}),v._emitSelectionChange=!1),v._deletedFeaturesToEmit.length){const O=v._deletedFeaturesToEmit.map(F=>F.toGeoJSON());v._deletedFeaturesToEmit=[],v.ctx.map.fire(g.events.DELETE,{features:O})}z(),v.ctx.map.fire(g.events.RENDER,{});function z(){v.isDirty=!1,v.clearChangedIds()}},jp}var sg;function t2(){if(sg)return qp.exports;sg=1;const g=Yw(),m=Qw(),v=gc(),S=e2(),T=qr().interactions,E=qp.exports=function(_){this._features={},this._featureIds=new v,this._selectedFeatureIds=new v,this._selectedCoordinates=[],this._changedFeatureIds=new v,this._deletedFeaturesToEmit=[],this._emitSelectionChange=!1,this._mapInitialConfig={},this.ctx=_,this.sources={hot:[],cold:[]}
497,this.render=g(S,16,this),this.isDirty=!1};E.prototype.createRenderBatch=function(){const _=this.render;let w=0;return this.render=function(){w++},()=>{this.render=_,w>0&&this.render()}},E.prototype.setDirty=function(){return this.isDirty=!0,this},E.prototype.featureChanged=function(_){return this._changedFeatureIds.add(_),this},E.prototype.getChangedIds=function(){return this._changedFeatureIds.values()},E.prototype.clearChangedIds=function(){return this._changedFeatureIds.clear(),this},E.prototype.getAllIds=function(){return this._featureIds.values()},E.prototype.add=function(_){return this.featureChanged(_.id),this._features[_.id]=_,this._featureIds.add(_.id),this},E.prototype.delete=function(_,w={}){return m(_).forEach(k=>{this._featureIds.has(k)&&(this._featureIds.delete(k),this._selectedFeatureIds.delete(k),w.silent||this._deletedFeaturesToEmit.indexOf(this._features[k])===-1&&this._deletedFeaturesToEmit.push(this._features[k]),delete this._features[k],this.isDirty=!0)}),a.call(this,w),this},E.prototype.get=function(_){return this._features[_]},E.prototype.getAll=function(){return Object.keys(this._features).map(_=>this._features[_])},E.prototype.select=function(_,w={}){return m(_).forEach(k=>{this._selectedFeatureIds.has(k)||(this._selectedFeatureIds.add(k),this._changedFeatureIds.add(k),w.silent||(this._emitSelectionChange=!0))}),this},E.prototype.deselect=function(_,w={}){return m(_).forEach(k=>{this._selectedFeatureIds.has(k)&&(this._selectedFeatureIds.delete(k),this._changedFeatureIds.add(k),w.silent||(this._emitSelectionChange=!0))}),a.call(this,w),this},E.prototype.clearSelected=function(_={}){return this.deselect(this._selectedFeatureIds.values(),{silent:_.silent}),this},E.prototype.setSelected=function(_,w={}){return _=m(_),this.deselect(this._selectedFeatureIds.values().filter(k=>_.indexOf(k)===-1),{silent:w.silent}),this.select(_.filter(k=>!this._selectedFeatureIds.has(k)),{silent:w.silent}),this},E.prototype.setSelectedCoordinates=function(_){return this._selectedCoordinates=_,this._emitSelectionChange=!0,this},E.prototype.clearSelectedCoordinates=function(){return this._selectedCoordinates=[],this._emitSelectionChange=!0,this},E.prototype.getSelectedIds=function(){return this._selectedFeatureIds.values()},E.prototype.getSelected=function(){return this._selectedFeatureIds.values().map(_=>this.get(_))},E.prototype.getSelectedCoordinates=function(){return this._selectedCoordinates.map(w=>({coordinates:this.get(w.feature_id).getCoordinate(w.coord_path)}))},E.prototype.isSelected=function(_){return this._selectedFeatureIds.has(_)},E.prototype.setFeatureProperty=function(_,w,k){this.get(_).setProperty(w,k),this.featureChanged(_)};function a(_){const w=this._selectedCoordinates.filter(k=>this._selectedFeatureIds.has(k.feature_id));this._selectedCoordinates.length!==w.length&&!_.silent&&(this._emitSelectionChange=!0),this._selectedCoordinates=w}return E.prototype.storeMapConfig=function(){T.forEach(_=>{this.ctx.map[_]&&(this._mapInitialConfig[_]=this.ctx.map[_].isEnabled())})},E.prototype.restoreMapConfig=function(){Object.keys(this._mapInitialConfig).forEach(_=>{this._mapInitialConfig[_]?this.ctx.map[_].enable():this.ctx.map[_].disable()})},E.prototype.getInitialConfigValue=function(_){return this._mapInitialConfig[_]!==void 0?this._mapInitialConfig[_]:!0},qp.exports}var Gp,ug;function Wy(){if(ug)return Gp;ug=1,Gp=m;var g=Object.prototype.hasOwnProperty;function m(){for(var v={},S=0;S<arguments.length;S++){var T=arguments[S];for(var E in T)g.call(T,E)&&(v[E]=T[E])}return v}return Gp}var $p,lg;function r2(){if(lg)return $p;lg=1;const g=Wy(),m=qr(),v=["mode","feature","mouse"];return $p=function(S){const T={};let E=null,a={mode:null,feature:null,mouse:null},_={mode:null,feature:null,mouse:null};function w(){k({mode:null,feature:null,mouse:null}),z()}function k(ge){_=g(_,ge)}function z(){if(!S.container)return;const ge=[],xe=[];v.forEach(ce=>{_[ce]!==a[ce]&&(ge.push(`${ce}-${a[ce]}`),_[ce]!==null&&xe.push(`${ce}-${_[ce]}`))}),ge.length>0&&S.container.classList.remove.apply(S.container.classList,ge),xe.length>0&&S.container.classList.add.apply(S.container.classList,xe),a=g(a,_)}function O(ge,xe={}){const ce=document.createElement("button");return ce.className=`${m.classes.CONTROL_BUTTON} ${xe.className}`,ce.setAttribute("title",xe.title),xe.container.appendChild(ce),ce.addEventListener("click",$=>{if($.preventDefault(),$.stopPropagation(),$.target===E){F();return}W(ge),xe.onActivate()},!0),ce}
497function F(){E&&(E.classList.remove(m.classes.ACTIVE_BUTTON),E=null)}function W(ge){F();const xe=T[ge];xe&&xe&&ge!=="trash"&&(xe.classList.add(m.classes.ACTIVE_BUTTON),E=xe)}function ue(){const ge=S.options.controls,xe=document.createElement("div");return xe.className=`${m.classes.CONTROL_GROUP} ${m.classes.CONTROL_BASE}`,ge&&(ge[m.types.LINE]&&(T[m.types.LINE]=O(m.types.LINE,{container:xe,className:m.classes.CONTROL_BUTTON_LINE,title:`LineString tool ${S.options.keybindings?"(l)":""}`,onActivate:()=>S.events.changeMode(m.modes.DRAW_LINE_STRING)})),ge[m.types.POLYGON]&&(T[m.types.POLYGON]=O(m.types.POLYGON,{container:xe,className:m.classes.CONTROL_BUTTON_POLYGON,title:`Polygon tool ${S.options.keybindings?"(p)":""}`,onActivate:()=>S.events.changeMode(m.modes.DRAW_POLYGON)})),ge[m.types.POINT]&&(T[m.types.POINT]=O(m.types.POINT,{container:xe,className:m.classes.CONTROL_BUTTON_POINT,title:`Marker tool ${S.options.keybindings?"(m)":""}`,onActivate:()=>S.events.changeMode(m.modes.DRAW_POINT)})),ge.trash&&(T.trash=O("trash",{container:xe,className:m.classes.CONTROL_BUTTON_TRASH,title:"Delete",onActivate:()=>{S.events.trash()}})),ge.combine_features&&(T.combine_features=O("combineFeatures",{container:xe,className:m.classes.CONTROL_BUTTON_COMBINE_FEATURES,title:"Combine",onActivate:()=>{S.events.combineFeatures()}})),ge.uncombine_features&&(T.uncombine_features=O("uncombineFeatures",{container:xe,className:m.classes.CONTROL_BUTTON_UNCOMBINE_FEATURES,title:"Uncombine",onActivate:()=>{S.events.uncombineFeatures()}}))),xe}function ye(){Object.keys(T).forEach(ge=>{const xe=T[ge];xe.parentNode&&xe.parentNode.removeChild(xe),delete T[ge]})}return{setActiveButton:W,queueMapClasses:k,updateMapClasses:z,clearMapClasses:w,addButtons:ue,removeButtons:ye}},$p}var Zp,cg;function n2(){if(cg)return Zp;cg=1;const g=Jw(),m=t2(),v=r2(),S=qr(),T=Wy();return Zp=function(E){let a=null,_=null;const w={onRemove:function(){return E.map.off("load",w.connect),clearInterval(_),w.removeLayers(),E.store.restoreMapConfig(),E.ui.removeButtons(),E.events.removeEventListeners(),E.ui.clearMapClasses(),E.map=null,E.container=null,E.store=null,a&&a.parentNode&&a.parentNode.removeChild(a),a=null,this},connect:function(){E.map.off("load",w.connect),clearInterval(_),w.addLayers(),E.store.storeMapConfig(),E.events.addEventListeners()},onAdd:function(k){{const z=k.fire;k.fire=function(O,F){let W=arguments;return z.length===1&&arguments.length!==1&&(W=[T({},{type:O},F)]),z.apply(k,W)}}return E.map=k,E.events=g(E),E.ui=v(E),E.container=k.getContainer(),E.store=new m(E),a=E.ui.addButtons(),E.options.boxSelect&&(k.boxZoom.disable(),k.dragPan.disable(),k.dragPan.enable()),k.loaded()?w.connect():(k.on("load",w.connect),_=setInterval(()=>{k.loaded()&&w.connect()},16)),E.events.start(),a},addLayers:function(){E.map.addSource(S.sources.COLD,{data:{type:S.geojsonTypes.FEATURE_COLLECTION,features:[]},type:"geojson"}),E.map.addSource(S.sources.HOT,{data:{type:S.geojsonTypes.FEATURE_COLLECTION,features:[]},type:"geojson"}),E.options.styles.forEach(k=>{E.map.addLayer(k)}),E.store.setDirty(!0),E.store.render()},removeLayers:function(){E.options.styles.forEach(k=>{E.map.getLayer(k.id)&&E.map.removeLayer(k.id)}),E.map.getSource(S.sources.COLD)&&E.map.removeSource(S.sources.COLD),E.map.getSource(S.sources.HOT)&&E.map.removeSource(S.sources.HOT)}};return E.setup=w,w},Zp}var Wp,pg;function i2(){return pg||(pg=1,Wp=[{id:"gl-draw-polygon-fill-inactive",type:"fill",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],paint:{"fill-color":"#3bb2d0","fill-outline-color":"#3bb2d0","fill-opacity":.1}},{id:"gl-draw-polygon-fill-active",type:"fill",filter:["all",["==","active","true"],["==","$type","Polygon"]],paint:{"fill-color":"#fbb03b","fill-outline-color":"#fbb03b","fill-opacity":.1}},{id:"gl-draw-polygon-midpoint",type:"circle",filter:["all",["==","$type","Point"],["==","meta","midpoint"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-stroke-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-polygon-stroke-active",type:"line",filter:["all",["==","active","true"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-line-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","LineString"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-line-active",type:"line",filter:["all",["==","$type","LineString"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-polygon-and-line-vertex-stroke-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-color":"#fff"}},{id:"gl-draw-polygon-and-line-vertex-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-point-point-stroke-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-opacity":1,"cir
497cle-color":"#fff"}},{id:"gl-draw-point-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#3bb2d0"}},{id:"gl-draw-point-stroke-active",type:"circle",filter:["all",["==","$type","Point"],["==","active","true"],["!=","meta","midpoint"]],paint:{"circle-radius":7,"circle-color":"#fff"}},{id:"gl-draw-point-active",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["==","active","true"]],paint:{"circle-radius":5,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-fill-static",type:"fill",filter:["all",["==","mode","static"],["==","$type","Polygon"]],paint:{"fill-color":"#404040","fill-outline-color":"#404040","fill-opacity":.1}},{id:"gl-draw-polygon-stroke-static",type:"line",filter:["all",["==","mode","static"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-line-static",type:"line",filter:["all",["==","mode","static"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-point-static",type:"circle",filter:["all",["==","mode","static"],["==","$type","Point"]],paint:{"circle-radius":5,"circle-color":"#404040"}}]),Wp}var Xp,hg;function Vs(){if(hg)return Xp;hg=1;const g=qr();return Xp={isOfMetaType:function(m){return function(v){const S=v.featureTarget;return!S||!S.properties?!1:S.properties.meta===m}},isShiftMousedown:function(m){return!m.originalEvent||!m.originalEvent.shiftKey?!1:m.originalEvent.button===0},isActiveFeature:function(m){return!m.featureTarget||!m.featureTarget.properties?!1:m.featureTarget.properties.active===g.activeStates.ACTIVE&&m.featureTarget.properties.meta===g.meta.FEATURE},isInactiveFeature:function(m){return!m.featureTarget||!m.featureTarget.properties?!1:m.featureTarget.properties.active===g.activeStates.INACTIVE&&m.featureTarget.properties.meta===g.meta.FEATURE},noTarget:function(m){return m.featureTarget===void 0},isFeature:function(m){return!m.featureTarget||!m.featureTarget.properties?!1:m.featureTarget.properties.meta===g.meta.FEATURE},isVertex:function(m){const v=m.featureTarget;return!v||!v.properties?!1:v.properties.meta===g.meta.VERTEX},isShiftDown:function(m){return m.originalEvent?m.originalEvent.shiftKey===!0:!1},isEscapeKey:function(m){return m.keyCode===27},isEnterKey:function(m){return m.keyCode===13},true:function(){return!0}},Xp}var Hp,fg;function o2(){if(fg)return Hp;fg=1,Hp=g;function g(m,v){this.x=m,this.y=v}return g.prototype={clone:function(){return new g(this.x,this.y)},add:function(m){return this.clone()._add(m)},sub:function(m){return this.clone()._sub(m)},multByPoint:function(m){return this.clone()._multByPoint(m)},divByPoint:function(m){return this.clone()._divByPoint(m)},mult:function(m){return this.clone()._mult(m)},div:function(m){return this.clone()._div(m)},rotate:function(m){return this.clone()._rotate(m)},rotateAround:function(m,v){return this.clone()._rotateAround(m,v)},matMult:function(m){return this.clone()._matMult(m)},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(m){return this.x===m.x&&this.y===m.y},dist:function(m){return Math.sqrt(this.distSqr(m))},distSqr:function(m){var v=m.x-this.x,S=m.y-this.y;return v*v+S*S},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(m){return Math.atan2(this.y-m.y,this.x-m.x)},angleWith:function(m){return this.angleWithSep(m.x,m.y)},angleWithSep:function(m,v){return Math.atan2(this.x*v-this.y*m,this.x*m+this.y*v)},_matMult:function(m){var v=m[0]*this.x+m[1]*this.y,S=m[2]*this.x+m[3]*this.y;return this.x=v,this.y=S,this},_add:function(m){return this.x+=m.x,this.y+=m.y,this},_sub:function(m){return this.x-=m.x,this.y-=m.y,this},_mult:function(m){return this.x*=m,this.y*=m,this},_div:function(m){return this.x/=m,this.y/=m,this},_multByPoint:function(m){return this.x*=m.x,this.y*=m.y,this},_divByPoint:function(m){return this.x/=m.x,this.y/=m.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var m=this.y;return this.y=this.x,this.x=-m,this},_rotate:function(m){var v=Math.cos(m),S=Math.sin(m),T=v*this.x-S*this.y,E=S*this.x+v*this.y;return this.x=T,this.y=E,this}
497,_rotateAround:function(m,v){var S=Math.cos(m),T=Math.sin(m),E=v.x+S*(this.x-v.x)-T*(this.y-v.y),a=v.y+T*(this.x-v.x)+S*(this.y-v.y);return this.x=E,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},g.convert=function(m){return m instanceof g?m:Array.isArray(m)?new g(m[0],m[1]):m},Hp}var Kp,dg;function a2(){if(dg)return Kp;dg=1;const g=o2();function m(v,S){const T=S.getBoundingClientRect();return new g(v.clientX-T.left-(S.clientLeft||0),v.clientY-T.top-(S.clientTop||0))}return Kp=m,Kp}var Jp,yg;function Xy(){if(yg)return Jp;yg=1;const g=qr();return Jp=function(m,v,S,T){return{type:g.geojsonTypes.FEATURE,properties:{meta:g.meta.VERTEX,parent:m,coord_path:S,active:T?g.activeStates.ACTIVE:g.activeStates.INACTIVE},geometry:{type:g.geojsonTypes.POINT,coordinates:v}}},Jp}var Yp,mg;function s2(){if(mg)return Yp;mg=1;const g=qr();return Yp=function(m,v,S,T){const E=v.geometry.coordinates,a=S.geometry.coordinates;if(E[1]>g.LAT_RENDERED_MAX||E[1]<g.LAT_RENDERED_MIN||a[1]>g.LAT_RENDERED_MAX||a[1]<g.LAT_RENDERED_MIN)return null;const _=T.project([E[0],E[1]]),w=T.project([a[0],a[1]]),k=T.unproject([(_.x+w.x)/2,(_.y+w.y)/2]);return{type:g.geojsonTypes.FEATURE,properties:{meta:g.meta.MIDPOINT,parent:m,lng:k.lng,lat:k.lat,coord_path:S.properties.coord_path},geometry:{type:g.geojsonTypes.POINT,coordinates:[k.lng,k.lat]}}},Yp}var Qp,vg;function hb(){if(vg)return Qp;vg=1;const g=Xy(),m=s2(),v=qr();function S(T,E={},a=null){const{type:_,coordinates:w}=T.geometry,k=T.properties&&T.properties.id;let z=[];_===v.geojsonTypes.POINT?z.push(g(k,w,a,F(a))):_===v.geojsonTypes.POLYGON?w.forEach((ue,ye)=>{O(ue,a!==null?`${a}.${ye}`:String(ye))}):_===v.geojsonTypes.LINE_STRING?O(w,a):_.indexOf(v.geojsonTypes.MULTI_PREFIX)===0&&W();function O(ue,ye){let ge="",xe=null;ue.forEach((ce,$)=>{const me=ye!=null?`${ye}.${$}`:String($),ze=g(k,ce,me,F(me));if(E.midpoints&&xe){const pe=m(k,xe,ze,E.map);pe&&z.push(pe)}xe=ze;const Fe=JSON.stringify(ce);ge!==Fe&&z.push(ze),$===0&&(ge=Fe)})}function F(ue){return E.selectedPaths?E.selectedPaths.indexOf(ue)!==-1:!1}function W(){const ue=_.replace(v.geojsonTypes.MULTI_PREFIX,"");w.forEach((ye,ge)=>{const xe={type:v.geojsonTypes.FEATURE,properties:T.properties,geometry:{type:ue,coordinates:ye}};z=z.concat(S(xe,E,ge))})}return z}return Qp=S,Qp}var eh,gg;function bc(){return gg||(gg=1,eh={enable(g){setTimeout(()=>{!g.map||!g.map.doubleClickZoom||!g._ctx||!g._ctx.store||!g._ctx.store.getInitialConfigValue||g._ctx.store.getInitialConfigValue("doubleClickZoom")&&g.map.doubleClickZoom.enable()},0)},disable(g){setTimeout(()=>{!g.map||!g.map.doubleClickZoom||g.map.doubleClickZoom.disable()},0)}}),eh}var Zu={exports:{}},th,_g;function fb(){if(_g)return th;_g=1,th=m;var g={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featurecollection"};function m(v){if(!v||!v.type)return null;var S=g[v.type];if(!S)return null;if(S==="geometry")return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:v}]};if(S==="feature")return{type:"FeatureCollection",features:[v]};if(S==="featurecollection")return v}return th}var rh,xg;function u2(){return xg||(xg=1,rh=function g(m){switch(m&&m.type||null){case"FeatureCollection":return m.features=m.features.reduce(function(v,S){return v.concat(g(S))},[]),m;case"Feature":return m.geometry?g(m.geometry).map(function(v){var S={type:"Feature",properties:JSON.parse(JSON.stringify(m.properties)),geometry:v};return m.id!==void 0&&(S.id=m.id),S}):m;case"MultiPoint":return m.coordinates.map(function(v){return{type:"Point",coordinates:v}});case"MultiPolygon":return m.coordinates.map(function(v){return{type:"Polygon",coordinates:v}});case"MultiLineString":return m.coordinates.map(function(v){return{type:"LineString",coordinates:v}});case"GeometryCollection":return m.geometries.map(g).reduce(function(v,S){return v.concat(S)},[]);case"Point":case"Polygon":case"LineString":return[m]}}),rh}var nh,bg;function l2(){return bg||(bg=1,nh=function(m){return v(m);function v(S){return Array.isArray(S)&&S.length&&typeof S[0]=="number"?[S]:S.reduce(function(T,E){return Array.isArray(E)&&Array.isArray(E[0])?T.concat(v(E)):(T.push(E),T)},[])}}),nh}var ih,wg;function c2(){if(wg)return ih;wg=1;var g=fb(),m=u2(),v=l2();return ih=function(S){if(!S)return[];var T=m(g(S)),E=[];
497return T.features.forEach(function(a){a.geometry&&(E=E.concat(v(a.geometry.coordinates)))}),E},ih}var oh,Sg;function wc(){if(Sg)return oh;Sg=1;var g=Function.prototype.toString,m=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,v,S;if(typeof m=="function"&&typeof Object.defineProperty=="function")try{v=Object.defineProperty({},"length",{get:function(){throw S}}),S={},m(function(){throw 42},null,v)}catch(ce){ce!==S&&(m=null)}else m=null;var T=/^\s*class\b/,E=function($){try{var me=g.call($);return T.test(me)}catch{return!1}},a=function($){try{return E($)?!1:(g.call($),!0)}catch{return!1}},_=Object.prototype.toString,w="[object Object]",k="[object Function]",z="[object GeneratorFunction]",O="[object HTMLAllCollection]",F="[object HTML document.all class]",W="[object HTMLCollection]",ue=typeof Symbol=="function"&&!!Symbol.toStringTag,ye=!(0 in[,]),ge=function(){return!1};if(typeof document=="object"){var xe=document.all;_.call(xe)===_.call(document.all)&&(ge=function($){if((ye||!$)&&(typeof $>"u"||typeof $=="object"))try{var me=_.call($);return(me===O||me===F||me===W||me===w)&&$("")==null}catch{}return!1})}return oh=m?function($){if(ge($))return!0;if(!$||typeof $!="function"&&typeof $!="object")return!1;try{m($,null,v)}catch(me){if(me!==S)return!1}return!E($)&&a($)}:function($){if(ge($))return!0;if(!$||typeof $!="function"&&typeof $!="object")return!1;if(ue)return a($);if(E($))return!1;var me=_.call($);return me!==k&&me!==z&&!/^\[object HTML/.test(me)?!1:a($)},oh}var ah,Tg;function Hy(){if(Tg)return ah;Tg=1;var g=wc(),m=Object.prototype.toString,v=Object.prototype.hasOwnProperty,S=function(w,k,z){for(var O=0,F=w.length;O<F;O++)v.call(w,O)&&(z==null?k(w[O],O,w):k.call(z,w[O],O,w))},T=function(w,k,z){for(var O=0,F=w.length;O<F;O++)z==null?k(w.charAt(O),O,w):k.call(z,w.charAt(O),O,w)},E=function(w,k,z){for(var O in w)v.call(w,O)&&(z==null?k(w[O],O,w):k.call(z,w[O],O,w))};function a(_){return m.call(_)==="[object Array]"}return ah=function(w,k,z){if(!g(k))throw new TypeError("iterator must be a function");var O;arguments.length>=3&&(O=z),a(w)?S(w,k,O):typeof w=="string"?T(w,k,O):E(w,k,O)},ah}var sh,Ig;function db(){return Ig||(Ig=1,sh=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),sh}var uh,Eg;function Wu(){if(Eg)return uh;Eg=1;var g=db(),m=typeof globalThis>"u"?qi:globalThis;return uh=function(){for(var S=[],T=0;T<g.length;T++)typeof m[g[T]]=="function"&&(S[S.length]=g[T]);return S},uh}var lh={exports:{}},ch,Ag;function Ky(){return Ag||(Ag=1,ch=Object),ch}var ph,Cg;function p2(){return Cg||(Cg=1,ph=Error),ph}var hh,Pg;function h2(){return Pg||(Pg=1,hh=EvalError),hh}var fh,Mg;function Jy(){return Mg||(Mg=1,fh=RangeError),fh}var dh,kg;function f2(){return kg||(kg=1,dh=ReferenceError),dh}var yh,Rg;function Ui(){return Rg||(Rg=1,yh=SyntaxError),yh}var mh,zg;function qt(){return zg||(zg=1,mh=TypeError),mh}var vh,Lg;function d2(){return Lg||(Lg=1,vh=URIError),vh}var gh,Dg;function Sc(){return Dg||(Dg=1,gh=Math.abs),gh}var _h,Og;function ja(){return Og||(Og=1,_h=Math.floor),_h}var xh,Bg;function Yy(){return Bg||(Bg=1,xh=Math.max),xh}var bh,Fg;function Qy(){return Fg||(Fg=1,bh=Math.min),bh}var wh,Ng;function Ga(){return Ng||(Ng=1,wh=Math.pow),wh}var Sh,qg;function y2(){return qg||(qg=1,Sh=Math.round),Sh}var Th,Ug;function $a(){return Ug||(Ug=1,Th=Number.isNaN||function(m){return m!==m}),Th}var Ih,Vg;function m2(){if(Vg)return Ih;Vg=1;var g=$a();return Ih=function(v){return g(v)||v===0?v:v<0?-1:1},Ih}var Eh,jg;function v2(){return jg||(jg=1,Eh=Object.getOwnPropertyDescriptor),Eh}var Ah,Gg;function qo(){if(Gg)return Ah;Gg=1;var g=v2();if(g)try{g([],"length")}catch{g=null}return Ah=g,Ah}var Ch,$g;function Xu(){if($g)return Ch;$g=1;var g=Object.defineProperty||!1;if(g)try{g({},"a",{value:1})}catch{g=!1}return Ch=g,Ch}var Ph,Zg;function em(){return Zg||(Zg=1,Ph=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var m={},v=Symbol("test"),S=Object(v);
vendor: 11,351 bytes, line 497
497if(typeof v=="string"||Object.prototype.toString.call(v)!=="[object Symbol]"||Object.prototype.toString.call(S)!=="[object Symbol]")return!1;var T=42;m[v]=T;for(var E in m)return!1;if(typeof Object.keys=="function"&&Object.keys(m).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(m).length!==0)return!1;var a=Object.getOwnPropertySymbols(m);if(a.length!==1||a[0]!==v||!Object.prototype.propertyIsEnumerable.call(m,v))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var _=Object.getOwnPropertyDescriptor(m,v);if(_.value!==T||_.enumerable!==!0)return!1}return!0}),Ph}var Mh,Wg;function yb(){if(Wg)return Mh;Wg=1;var g=typeof Symbol<"u"&&Symbol,m=em();return Mh=function(){return typeof g!="function"||typeof Symbol!="function"||typeof g("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:m()},Mh}var kh,Xg;function mb(){return Xg||(Xg=1,kh=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),kh}var Rh,Hg;function vb(){if(Hg)return Rh;Hg=1;var g=Ky();return Rh=g.getPrototypeOf||null,Rh}var zh,Kg;function g2(){if(Kg)return zh;Kg=1;var g="Function.prototype.bind called on incompatible ",m=Object.prototype.toString,v=Math.max,S="[object Function]",T=function(w,k){for(var z=[],O=0;O<w.length;O+=1)z[O]=w[O];for(var F=0;F<k.length;F+=1)z[F+w.length]=k[F];return z},E=function(w,k){for(var z=[],O=k,F=0;O<w.length;O+=1,F+=1)z[F]=w[O];return z},a=function(_,w){for(var k="",z=0;z<_.length;z+=1)k+=_[z],z+1<_.length&&(k+=w);return k};return zh=function(w){var k=this;if(typeof k!="function"||m.apply(k)!==S)throw new TypeError(g+k);for(var z=E(arguments,1),O,F=function(){if(this instanceof O){var xe=k.apply(this,T(z,arguments));return Object(xe)===xe?xe:this}return k.apply(w,T(z,arguments))},W=v(0,k.length-z.length),ue=[],ye=0;ye<W;ye++)ue[ye]="$"+ye;if(O=Function("binder","return function ("+a(ue,",")+"){ return binder.apply(this,arguments); }")(F),k.prototype){var ge=function(){};ge.prototype=k.prototype,O.prototype=new ge,ge.prototype=null}return O},zh}var Lh,Jg;function Hu(){if(Jg)return Lh;Jg=1;var g=g2();return Lh=Function.prototype.bind||g,Lh}var Dh,Yg;function tm(){return Yg||(Yg=1,Dh=Function.prototype.call),Dh}var Oh,Qg;function rm(){return Qg||(Qg=1,Oh=Function.prototype.apply),Oh}var Bh,e_;function _2(){return e_||(e_=1,Bh=typeof Reflect<"u"&&Reflect&&Reflect.apply),Bh}var Fh,t_;function gb(){if(t_)return Fh;t_=1;var g=Hu(),m=rm(),v=tm(),S=_2();return Fh=S||g.call(v,m),Fh}var Nh,r_;function nm(){if(r_)return Nh;r_=1;var g=Hu(),m=qt(),v=tm(),S=gb();return Nh=function(E){if(E.length<1||typeof E[0]!="function")throw new m("a function is required");return S(g,v,E)},Nh}var qh,n_;function x2(){if(n_)return qh;n_=1;var g=nm(),m=qo(),v;try{v=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var S=!!v&&m&&m(Object.prototype,"__proto__"),T=Object,E=T.getPrototypeOf;return qh=S&&typeof S.get=="function"?g([S.get]):typeof E=="function"?function(_){return E(_==null?_:T(_))}:!1,qh}var Uh,i_;function Za(){if(i_)return Uh;i_=1;var g=mb(),m=vb(),v=x2();return Uh=g?function(T){return g(T)}:m?function(T){if(!T||typeof T!="object"&&typeof T!="function")throw new TypeError("getProto: not an object");return m(T)}:v?function(T){return v(T)}:null,Uh}var Vh,o_;function Uo(){if(o_)return Vh;o_=1;var g=Function.prototype.call,m=Object.prototype.hasOwnProperty,v=Hu();return Vh=v.call(g,m),Vh}var jh,a_;function Ur(){if(a_)return jh;a_=1;var g,m=Ky(),v=p2(),S=h2(),T=Jy(),E=f2(),a=Ui(),_=qt(),w=d2(),k=Sc(),z=ja(),O=Yy(),F=Qy(),W=Ga(),ue=y2(),ye=m2(),ge=Function,xe=function(Tt){try{return ge('"use strict"; return ('+Tt+").constructor;")()}catch{}},ce=qo(),$=Xu(),me=function(){throw new _},ze=ce?(function(){try{return arguments.callee,me}catch{try{return ce(arguments,"callee").get}catch{return me}}})():me,Fe=yb()(),pe=Za(),je=vb(),Re=mb(),it=rm(),se=tm(),rt={},pt=typeof Uint8Array>"u"||!pe?g:pe(Uint8Array),nt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?g:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?g:ArrayBuffer,"%ArrayIteratorPrototype%":Fe&&pe?pe([][Symbol.iterator]()):g,"%AsyncFromSyncIteratorPrototype%":g,"%AsyncFunction%":rt,"%AsyncGenerator%":rt,"%AsyncGeneratorFunction%":rt,"%AsyncIteratorPrototype%":rt,"%Atomics%":typeof Atomics>"u"?g:Atomics,"%BigInt%":typeof BigInt>"u"?g:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?g:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?g:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?g:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":v,"%eval%":eval,"%EvalError%":S,"%Float16Array%":typeof Float16Array>"u"?g:Float16Array,"%Float32Array%":typeof Float32Array>"u"?g:Float32Array,"%Float64Array%":typeof Float64Array>"u"?g:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?g:FinalizationRegistry,"%Function%":ge,"%GeneratorFunction%":rt,"%Int8Array%":typeof Int8Array>"u"?g:Int8Array,"%Int16Array%":typeof Int16Array>"u"?g:Int16Array,"%Int32Array%":typeof Int32Array>"u"?g:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Fe&&pe?pe(pe([][Symbol.iterator]())):g,"%JSON%":typeof JSON=="object"?JSON:g,"%Map%":typeof Map>"u"?g:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Fe||!pe?g:pe(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":m,"%Object.getOwnPropertyDescriptor%":ce,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?g:Promise,"%Proxy%":typeof Proxy>"u"?g:Proxy,"%RangeError%":T,"%ReferenceError%":E,"%Reflect%":typeof Reflect>"u"?g:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?g:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Fe||!pe?g:pe(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?g:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Fe&&pe?pe(""[Symbol.iterator]()):g,"%Symbol%":Fe?Symbol:g,"%SyntaxError%":a,"%ThrowTypeError%":ze,"%TypedArray%":pt,"%TypeError%":_,"%Uint8Array%":typeof Uint8Array>"u"?g:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?g:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?g:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?g:Uint32Array,"%URIError%":w,"%WeakMap%":typeof WeakMap>"u"?g:WeakMap,"%WeakRef%":typeof WeakRef>"u"?g:WeakRef,"%WeakSet%":typeof WeakSet>"u"?g:WeakSet,"%Function.prototype.call%":se,"%Function.prototype.apply%":it,"%Object.defineProperty%":$,"%Object.getPrototypeOf%":je,"%Math.abs%":k,"%Math.floor%":z,"%Math.max%":O,"%Math.min%":F,"%Math.pow%":W,"%Math.round%":ue,"%Math.sign%":ye,"%Reflect.getPrototypeOf%":Re};if(pe)try{null.error}catch(Tt){var Qt=pe(pe(Tt));nt["%Error.prototype%"]=Qt}var Xt=function Tt(zt){var Tr;if(zt==="%AsyncFunction%")Tr=xe("async function () {}");else if(zt==="%GeneratorFunction%")Tr=xe("function* () {}");else if(zt==="%AsyncGeneratorFunction%")Tr=xe("async function* () {}");else if(zt==="%AsyncGenerator%"){var Kt=Tt("%AsyncGeneratorFunction%");Kt&&(Tr=Kt.prototype)}else if(zt==="%AsyncIteratorPrototype%"){var yt=Tt("%AsyncGenerator%");yt&&pe&&(Tr=pe(yt.prototype))}return nt[zt]=Tr,Tr},Rr={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Wt=Hu(),zr=Uo(),Ze=Wt.call(se,Array.prototype.concat),lr=Wt.call(it,Array.prototype.splice),Ht=Wt.call(se,String.prototype.replace),wt=Wt.call(se,String.prototype.slice),wr=Wt.call(se,RegExp.prototype.exec),Jr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,dr=/\\(\\)?/g,Sr=function(zt){var Tr=wt(zt,0,1),Kt=wt(zt,-1);if(Tr==="%"&&Kt!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(Kt==="%"&&Tr!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var yt=[];return Ht(zt,Jr,function(Vr,Ar,cr,yn){yt[yt.length]=cr?Ht(yn,dr,"$1"):Ar||Vr}),yt},dn=function(zt,Tr){var Kt=zt,yt;if(zr(Rr,Kt)&&(yt=Rr[Kt],Kt="%"+yt[0]+"%"),zr(nt,Kt)){var Vr=nt[Kt];if(Vr===rt&&(Vr=Xt(Kt)),typeof Vr>"u"&&!Tr)throw new _("intrinsic "+zt+" exists, but is not available. Please file an issue!");return{alias:yt,name:Kt,value:Vr}}throw new a("intrinsic "+zt+" does not exist!")};return jh=function(zt,Tr){if(typeof zt!="string"||zt.length===0)throw new _("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Tr!="boolean")throw new _('"allowMissing" argument must be a boolean');if(wr(/^%?[^%]*%?$/,zt)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Kt=Sr(zt),yt=Kt.length>0?Kt[0]:"",Vr=dn("%"+yt+"%",Tr),Ar=Vr.name,cr=Vr.value,yn=!1,Cr=Vr.alias;Cr&&(yt=Cr[0],lr(Kt,Ze([0,1],Cr)));for(var ti=1,Zr=!0;ti<Kt.length;ti+=1){var rn=Kt[ti],Xn=wt(rn,0,1),nn=wt(rn,-1);if((Xn==='"'||Xn==="'"||Xn==="`"||nn==='"'||nn==="'"||nn==="`")&&
497Xn!==nn)throw new a("property names with quotes must have matching quotes");if((rn==="constructor"||!Zr)&&(yn=!0),yt+="."+rn,Ar="%"+yt+"%",zr(nt,Ar))cr=nt[Ar];else if(cr!=null){if(!(rn in cr)){if(!Tr)throw new _("base intrinsic for "+zt+" exists, but the property is not available.");return}if(ce&&ti+1>=Kt.length){var on=ce(cr,rn);Zr=!!on,Zr&&"get"in on&&!("originalValue"in on.get)?cr=on.get:cr=cr[rn]}else Zr=zr(cr,rn),cr=cr[rn];Zr&&!yn&&(nt[Ar]=cr)}}return cr},jh}var Gh,s_;function im(){if(s_)return Gh;s_=1;var g=Xu(),m=Ui(),v=qt(),S=qo();return Gh=function(E,a,_){if(!E||typeof E!="object"&&typeof E!="function")throw new v("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new v("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new v("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new v("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new v("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new v("`loose`, if provided, must be a boolean");var w=arguments.length>3?arguments[3]:null,k=arguments.length>4?arguments[4]:null,z=arguments.length>5?arguments[5]:null,O=arguments.length>6?arguments[6]:!1,F=!!S&&S(E,a);if(g)g(E,a,{configurable:z===null&&F?F.configurable:!z,enumerable:w===null&&F?F.enumerable:!w,value:_,writable:k===null&&F?F.writable:!k});else if(O||!w&&!k&&!z)E[a]=_;else throw new m("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Gh}var $h,u_;function Tc(){if(u_)return $h;u_=1;var g=Xu(),m=function(){return!!g};return m.hasArrayLengthDefineBug=function(){if(!g)return null;try{return g([],"length",{value:1}).length!==1}catch{return!0}},$h=m,$h}var Zh,l_;function b2(){if(l_)return Zh;l_=1;var g=Ur(),m=im(),v=Tc()(),S=qo(),T=qt(),E=g("%Math.floor%");return Zh=function(_,w){if(typeof _!="function")throw new T("`fn` is not a function");if(typeof w!="number"||w<0||w>4294967295||E(w)!==w)throw new T("`length` must be a positive 32-bit integer");var k=arguments.length>2&&!!arguments[2],z=!0,O=!0;
497if("length"in _&&S){var F=S(_,"length");F&&!F.configurable&&(z=!1),F&&!F.writable&&(O=!1)}return(z||O||!k)&&(v?m(_,"length",w,!0,!0):m(_,"length",w)),_},Zh}var Wh,c_;function w2(){if(c_)return Wh;c_=1;var g=Hu(),m=rm(),v=gb();return Wh=function(){return v(g,m,arguments)},Wh}var p_;function la(){return p_||(p_=1,(function(g){var m=b2(),v=Xu(),S=nm(),T=w2();g.exports=function(a){var _=S(arguments),w=1+a.length-(arguments.length-1);return m(_,w>0?w:0,!0)},v?v(g.exports,"apply",{value:T}):g.exports.apply=T})(lh)),lh.exports}var Xh,h_;function mr(){if(h_)return Xh;h_=1;var g=Ur(),m=nm(),v=m([g("%String.prototype.indexOf%")]);return Xh=function(T,E){var a=g(T,!!E);return typeof a=="function"&&v(T,".prototype.")>-1?m([a]):a},Xh}var Hh,f_;function Vo(){if(f_)return Hh;f_=1;var g=em();return Hh=function(){return g()&&!!Symbol.toStringTag},Hh}var Kh,d_;function js(){if(d_)return Kh;d_=1;var g=Hy(),m=Wu(),v=la(),S=mr(),T=qo(),E=Za(),a=S("Object.prototype.toString"),_=Vo()(),w=typeof globalThis>"u"?qi:globalThis,k=m(),z=S("String.prototype.slice"),O=S("Array.prototype.indexOf",!0)||function(ge,xe){for(var ce=0;ce<ge.length;ce+=1)if(ge[ce]===xe)return ce;return-1},F={__proto__:null};_&&T&&E?g(k,function(ye){var ge=new w[ye];if(Symbol.toStringTag in ge&&E){var xe=E(ge),ce=T(xe,Symbol.toStringTag);if(!ce&&xe){var $=E(xe);ce=T($,Symbol.toStringTag)}if(ce&&ce.get){var me=v(ce.get);F["$"+ye]=me}}}):g(k,function(ye){var ge=new w[ye],xe=ge.slice||ge.set;if(xe){var ce=v(xe);F["$"+ye]=ce}});var W=function(ge){var xe=!1;return g(F,function(ce,$){if(!xe)try{"$"+ce(ge)===$&&(xe=z($,1))}catch{}}),xe},ue=function(ge){var xe=!1;return g(F,function(ce,$){if(!xe)try{ce(ge),xe=z($,1)}catch{}}),xe};return Kh=function(ge){if(!ge||typeof ge!="object")return!1;if(!_){var xe=z(a(ge),8,-1);return O(k,xe)>-1?xe:xe!=="Object"?!1:ue(ge)}return T?W(ge):null},Kh}var Jh,y_;function _b(){if(y_)return Jh;y_=1;var g=Object.prototype.toString;return Jh=function(v){var S=g.call(v),T=S==="[object Arguments]";return T||(T=S!=="[object Array]"&&v!==null&&typeof v=="object"&&typeof v.length=="number"&&v.length>=0&&g.call(v.callee)==="[object Function]"),T},Jh}var Yh,m_;function S2(){if(m_)return Yh;m_=1;var g;if(!Object.keys){var m=Object.prototype.hasOwnProperty,v=Object.prototype.toString,S=_b(),T=Object.prototype.propertyIsEnumerable,E=!T.call({toString:null},"toString"),a=T.call(function(){},"prototype"),_=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],w=function(F){var W=F.constructor;return W&&W.prototype===F},k={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},z=(function(){if(typeof window>"u")return!1;for(var F in window)try{if(!k["$"+F]&&m.call(window,F)&&window[F]!==null&&typeof window[F]=="object")try{w(window[F])}catch{return!0}}catch{return!0}return!1})(),O=function(F){if(typeof window>"u"||!z)return w(F);try{return w(F)}catch{return!1}};g=function(W){var ue=W!==null&&typeof W=="object",ye=v.call(W)==="[object Function]",ge=S(W),xe=ue&&v.call(W)==="[object String]",ce=[];if(!ue&&!ye&&!ge)throw new TypeError("Object.keys called on a non-object");var $=a&&ye;if(xe&&W.length>0&&!m.call(W,0))for(var me=0;me<W.length;++me)ce.push(String(me));if(ge&&W.length>0)for(var ze=0;ze<W.length;++ze)ce.push(String(ze));else for(var Fe in W)!($&&Fe==="prototype")&&m.call(W,Fe)&&ce.push(String(Fe));if(E)for(var pe=O(W),je=0;je<_.length;++je)!(pe&&_[je]==="constructor")&&m.call(W,_[je])&&ce.push(_[je]);return ce}}return Yh=g,Yh}var Qh,v_;function T2(){if(v_)return Qh;v_=1;var g=Array.prototype.slice,m=_b(),v=Object.keys,S=v?function(a){return v(a)}:S2(),T=Object.keys;return S.shim=function(){if(Object.keys){var a=(function(){var _=Object.keys(arguments);return _&&_.length===arguments.length})(1,2);a||(Object.keys=function(w){return m(w)?T(g.call(w)):T(w)})}else Object.keys=S;return Object.keys||S},Qh=S,Qh}var ef,g_;
vendor: 7,232 bytes, line 497
497function Ku(){if(g_)return ef;g_=1;var g=T2(),m=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",v=Object.prototype.toString,S=Array.prototype.concat,T=im(),E=function(k){return typeof k=="function"&&v.call(k)==="[object Function]"},a=Tc()(),_=function(k,z,O,F){if(z in k){if(F===!0){if(k[z]===O)return}else if(!E(F)||!F())return}a?T(k,z,O,!0):T(k,z,O)},w=function(k,z){var O=arguments.length>2?arguments[2]:{},F=g(z);m&&(F=S.call(F,Object.getOwnPropertySymbols(z)));for(var W=0;W<F.length;W+=1)_(k,F[W],z[F[W]],O[F[W]])};return w.supportsDescriptors=!!a,ef=w,ef}var tf,__;function I2(){if(__)return tf;__=1;var g=typeof Map=="function"&&Map.prototype,m=Object.getOwnPropertyDescriptor&&g?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,v=g&&m&&typeof m.get=="function"?m.get:null,S=g&&Map.prototype.forEach,T=typeof Set=="function"&&Set.prototype,E=Object.getOwnPropertyDescriptor&&T?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=T&&E&&typeof E.get=="function"?E.get:null,_=T&&Set.prototype.forEach,w=typeof WeakMap=="function"&&WeakMap.prototype,k=w?WeakMap.prototype.has:null,z=typeof WeakSet=="function"&&WeakSet.prototype,O=z?WeakSet.prototype.has:null,F=typeof WeakRef=="function"&&WeakRef.prototype,W=F?WeakRef.prototype.deref:null,ue=Boolean.prototype.valueOf,ye=Object.prototype.toString,ge=Function.prototype.toString,xe=String.prototype.match,ce=String.prototype.slice,$=String.prototype.replace,me=String.prototype.toUpperCase,ze=String.prototype.toLowerCase,Fe=RegExp.prototype.test,pe=Array.prototype.concat,je=Array.prototype.join,Re=Array.prototype.slice,it=Math.floor,se=typeof BigInt=="function"?BigInt.prototype.valueOf:null,rt=Object.getOwnPropertySymbols,pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,nt=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Qt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===nt||!0)?Symbol.toStringTag:null,Xt=Object.prototype.propertyIsEnumerable,Rr=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(we){return we.__proto__}:null);function Wt(we,Ae){if(we===1/0||we===-1/0||we!==we||we&&we>-1e3&&we<1e3||Fe.call(/e/,Ae))return Ae;var jt=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof we=="number"){var or=we<0?-it(-we):it(we);if(or!==we){var er=String(or),It=ce.call(Ae,er.length+1);return $.call(er,jt,"$&_")+"."+$.call($.call(It,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $.call(Ae,jt,"$&_")}var zr=Uy,Ze=zr.custom,lr=Vr(Ze)?Ze:null,Ht={__proto__:null,double:'"',single:"'"},wt={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};tf=function we(Ae,jt,or,er){var It=jt||{};if(yn(It,"quoteStyle")&&!yn(Ht,It.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(yn(It,"maxStringLength")&&(typeof It.maxStringLength=="number"?It.maxStringLength<0&&It.maxStringLength!==1/0:It.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var mn=yn(It,"customInspect")?It.customInspect:!0;if(typeof mn!="boolean"&&mn!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(yn(It,"indent")&&It.indent!==null&&It.indent!=="	"&&!(parseInt(It.indent,10)===It.indent&&It.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(yn(It,"numericSeparator")&&typeof It.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Nn=It.numericSeparator;if(typeof Ae>"u")return"undefined";if(Ae===null)return"null";if(typeof Ae=="boolean")return Ae?"true":"false";if(typeof Ae=="string")return fo(Ae,It);if(typeof Ae=="number"){if(Ae===0)return 1/0/Ae>0?"0":"-0";var an=String(Ae);return Nn?Wt(Ae,an):an}if(typeof Ae=="bigint"){var rr=String(Ae)+"n";return Nn?Wt(Ae,rr):rr}var M=typeof It.depth>"u"?5:It.depth;if(typeof or>"u"&&(or=0),or>=M&&M>0&&typeof Ae=="object")return Sr(Ae)?"[Array]":"[Object]";var L=Vi(It,or);if(typeof er>"u")er=[];else if(Zr(er,Ae)>=0)return"[Circular]";function B(Ne,xt,Ge){if(xt&&(er=Re.call(er),er.push(xt)),Ge){var Pt={depth:It.depth};return yn(It,"quoteStyle")&&(Pt.quoteStyle=It.quoteStyle),we(Ne,Pt,or+1,er)}return we(Ne,It,or+1,er)}if(typeof Ae=="function"&&!Tt(Ae)){var G=ti(Ae),K=ri(Ae,B);return"[Function"+(G?": "+G:" (anonymous)")+"]"+(K.length>0?" { "+je.call(K,", ")+" }":"")}if(Vr(Ae)){var ie=nt?$.call(String(Ae),/^(Symbol\(.*\))_[^)]*$/,"$1"):pt.call(Ae);return typeof Ae=="object"&&!nt?fi(ie):ie}if(Hn(Ae)){for(var oe="<"+ze.call(String(Ae.nodeName)),U=Ae.attributes||[],Q=0;Q<U.length;Q++)oe+=" "+U[Q].name+"="+wr(Jr(U[Q].value),"double",It);return oe+=">",Ae.childNodes&&Ae.childNodes.length&&(oe+="..."),oe+="</"+ze.call(String(Ae.nodeName))+">",oe}if(Sr(Ae)){if(Ae.length===0)return"[]";var he=ri(Ae,B);return L&&!Go(he)?"["+ki(he,L)+"]":"[ "+je.call(he,", ")+" ]"}if(zt(Ae)){var Pe=ri(Ae,B);return!("cause"in Error.prototype)&&"cause"in Ae&&!Xt.call(Ae,"cause")?"{ ["+String(Ae)+"] "+je.call(pe.call("[cause]: "+B(Ae.cause),Pe),", ")+" }":Pe.length===0?"["+String(Ae)+"]":"{ ["+String(Ae)+"] "+je.call(Pe,", ")+" }"}if(typeof Ae=="object"&&mn){if(lr&&typeof Ae[lr]=="function"&&zr)return zr(Ae,{depth:M-or});if(mn!=="symbol"&&typeof Ae.inspect=="function")return Ae.inspect()}if(rn(Ae)){var Le=[];return S&&S.call(Ae,function(Ne,xt){Le.push(B(xt,Ae,!0)+" => "+B(Ne,Ae))}),Mi("Map",v.call(Ae),Le,L)}if(on(Ae)){var Te=[];return _&&_.call(Ae,function(Ne){Te.push(B(Ne,Ae))}),Mi("Set",a.call(Ae),Te,L)}if(Xn(Ae))return Pi("WeakMap");if(Ci(Ae))return Pi("WeakSet");if(nn(Ae))return Pi("WeakRef");if(Kt(Ae))return fi(B(Number(Ae)));if(Ar(Ae))return fi(B(se.call(Ae)));if(yt(Ae))return fi(ue.call(Ae));if(Tr(Ae))return fi(B(String(Ae)));if(typeof window<"u"&&Ae===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Ae===globalThis||typeof qi<"u"&&Ae===qi)return"{ [object globalThis] }";if(!dn(Ae)&&!Tt(Ae)){var ke=ri(Ae,B),Qe=Rr?Rr(Ae)===Object.prototype:Ae instanceof Object||Ae.constructor===Object,He=Ae instanceof Object?"":"null prototype",Ee=!Qe&&Qt&&Object(Ae)===Ae&&Qt in Ae?ce.call(Cr(Ae),8,-1):He?"Object":"",We=Qe||typeof Ae.constructor!="function"?"":Ae.constructor.name?Ae.constructor.name+" ":"",qe=We+(Ee||He?"["+je.call(pe.call([],Ee||[],He||[]),": ")+"] ":"");return ke.length===0?qe+"{}":L?qe+"{"+ki(ke,L)+"}":qe+"{ "+je.call(ke,", ")+" }"}return String(Ae)};function wr(we,Ae,jt){var or=jt.quoteStyle||Ae,er=Ht[or];return er+we+er}function Jr(we){return $.call(String(we),/"/g,"&quot;")}function dr(we){return!Qt||!(typeof we=="object"&&(Qt in we||typeof we[Qt]<"u"))}function Sr(we){return Cr(we)==="[object Array]"&&dr(we)}function dn(we){return Cr(we)==="[object Date]"&&dr(we)}function Tt(we){return Cr(we)==="[object RegExp]"&&dr(we)}function zt(we){return Cr(we)==="[object Error]"&&dr(we)}function Tr(we){return Cr(we)==="[object String]"&&dr(we)}function Kt(we){return Cr(we)==="[object Number]"&&dr(we)}function yt(we){return Cr(we)==="[object Boolean]"&&dr(we)}function Vr(we){if(nt)return we&&typeof we=="object"&&we instanceof Symbol;if(typeof we=="symbol")return!0;
497if(!we||typeof we!="object"||!pt)return!1;try{return pt.call(we),!0}catch{}return!1}function Ar(we){if(!we||typeof we!="object"||!se)return!1;try{return se.call(we),!0}catch{}return!1}var cr=Object.prototype.hasOwnProperty||function(we){return we in this};function yn(we,Ae){return cr.call(we,Ae)}function Cr(we){return ye.call(we)}function ti(we){if(we.name)return we.name;var Ae=xe.call(ge.call(we),/^function\s*([\w$]+)/);return Ae?Ae[1]:null}function Zr(we,Ae){if(we.indexOf)return we.indexOf(Ae);for(var jt=0,or=we.length;jt<or;jt++)if(we[jt]===Ae)return jt;return-1}function rn(we){if(!v||!we||typeof we!="object")return!1;try{v.call(we);try{a.call(we)}catch{return!0}return we instanceof Map}catch{}return!1}function Xn(we){if(!k||!we||typeof we!="object")return!1;try{k.call(we,k);try{O.call(we,O)}catch{return!0}return we instanceof WeakMap}catch{}return!1}function nn(we){if(!W||!we||typeof we!="object")return!1;try{return W.call(we),!0}catch{}return!1}function on(we){if(!a||!we||typeof we!="object")return!1;try{a.call(we);try{v.call(we)}catch{return!0}return we instanceof Set}catch{}return!1}function Ci(we){if(!O||!we||typeof we!="object")return!1;try{O.call(we,O);try{k.call(we,k)}catch{return!0}return we instanceof WeakSet}catch{}return!1}function Hn(we){return!we||typeof we!="object"?!1:typeof HTMLElement<"u"&&we instanceof HTMLElement?!0:typeof we.nodeName=="string"&&typeof we.getAttribute=="function"}function fo(we,Ae){if(we.length>Ae.maxStringLength){var jt=we.length-Ae.maxStringLength,or="... "+jt+" more character"+(jt>1?"s":"");return fo(ce.call(we,0,Ae.maxStringLength),Ae)+or}var er=wt[Ae.quoteStyle||"single"];er.lastIndex=0;var It=$.call($.call(we,er,"\\$1"),/[\x00-\x1f]/g,jo);return wr(It,"single",Ae)}function jo(we){var Ae=we.charCodeAt(0),jt={8:"b",9:"t",10:"n",12:"f",13:"r"}[Ae];return jt?"\\"+jt:"\\x"+(Ae<16?"0":"")+me.call(Ae.toString(16))}function fi(we){return"Object("+we+")"}function Pi(we){return we+" { ? }"}function Mi(we,Ae,jt,or){var er=or?ki(jt,or):je.call(jt,", ");return we+" ("+Ae+") {"+er+"}"}function Go(we){for(var Ae=0;Ae<we.length;Ae++)if(Zr(we[Ae],`
498`)>=0)return!1;return!0}function Vi(we,Ae){var jt;if(we.indent==="	")jt="	";else if(typeof we.indent=="number"&&we.indent>0)jt=je.call(Array(we.indent+1)," ");else return null;return{base:jt,prev:je.call(Array(Ae+1),jt)}}function ki(we,Ae){if(we.length===0)return"";var jt=`
499`+Ae.prev+Ae.base;return jt+je.call(we,","+jt)+`
500`+Ae.prev}function ri(we,Ae){var jt=Sr(we),or=[];if(jt){or.length=we.length;for(var er=0;er<we.length;er++)or[er]=yn(we,er)?Ae(we[er],we):""}var It=typeof rt=="function"?rt(we):[],mn;if(nt){mn={};for(var Nn=0;Nn<It.length;Nn++)mn["$"+It[Nn]]=It[Nn]}for(var an in we)yn(we,an)&&(jt&&String(Number(an))===an&&an<we.length||nt&&mn["$"+an]instanceof Symbol||(Fe.call(/[^\w$]/,an)?or.push(Ae(an,we)+": "+Ae(we[an],we)):or.push(an+": "+Ae(we[an],we))));if(typeof rt=="function")for(var rr=0;rr<It.length;rr++)Xt.call(we,It[rr])&&or.push("["+Ae(It[rr])+"]: "+Ae(we[It[rr]],we));return or}return tf}var rf,x_;function Ic(){return x_||(x_=1,rf=function(m){return typeof m=="string"||typeof m=="symbol"}),rf}var nf,b_;function ca(){return b_||(b_=1,nf=function(m){return!!m&&(typeof m=="function"||typeof m=="object")}),nf}var of,w_;function E2(){if(w_)return of;w_=1;var g=qt(),m=I2(),v=Ic(),S=ca();return of=function(E,a){if(!S(E))throw new g("Assertion failed: Type(O) is not Object");if(!v(a))throw new g("Assertion failed: P is not a Property Key, got "+m(a));return E[a]},of}var af,S_;function ho(){if(S_)return af;S_=1;var g=$a();return af=function(v){return(typeof v=="number"||typeof v=="bigint")&&!g(v)&&v!==1/0&&v!==-1/0},af}var sf,T_;function Ec(){if(T_)return sf;T_=1;var g=Sc(),m=ja(),v=$a(),S=ho();return sf=function(E){if(typeof E!="number"||v(E)||!S(E))return!1;var a=g(E);return m(a)===a},sf}var uf,I_;function Gs(){if(I_)return uf;I_=1;var g=la(),m=mr(),v=Ur(),S=v("%ArrayBuffer%",!0),T=m("ArrayBuffer.prototype.byteLength",!0),E=m("Object.prototype.toString"),a=!!S&&!T&&new S(0).slice,_=!!a&&g(a);return uf=T||_?function(k){if(!k||typeof k!="object")return!1;try{return T?T(k):_(k,0),!0}catch{return!1}}:S?function(k){return E(k)==="[object ArrayBuffer]"}:function(k){return!1},uf}var lf,E_;function xb(){if(E_)return lf;E_=1;var g=mr(),m=g("ArrayBuffer.prototype.byteLength",!0),v=Gs();return lf=function(T){return v(T)?m?m(T):T.byteLength:NaN},lf}var cf,A_;function Ju(){if(A_)return cf;A_=1;var g=mr(),m=g("SharedArrayBuffer.prototype.byteLength",!0);return cf=m?function(S){if(!S||typeof S!="object")return!1;try{return m(S),!0}catch{return!1}}:function(S){return!1},cf}var pf,C_;function $s(){if(C_)return pf;C_=1;var g=qt(),m=xb(),v=Wu()(),S=mr(),T=Gs(),E=Ju(),a=S("SharedArrayBuffer.prototype.byteLength",!0);return pf=function(w){var k=E(w);if(!T(w)&&!k)throw new g("Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot");if((k?a:m)(w)===0)try{new qi[v[0]](w)}catch(z){return!!z&&z.name==="TypeError"}return!1},pf}var hf,P_;function bb(){if(P_)return hf;P_=1;var g=qt(),m=Uo(),v=ca(),S=Ic();return hf=function(E,a){if(!v(E))throw new g("Assertion failed: `O` must be an Object");
500if(!S(a))throw new g("Assertion failed: `P` must be a Property Key");return m(E,a)},hf}var ff,M_;function wb(){if(M_)return ff;M_=1;var g=Ur(),m=g("%Array%"),v=!m.isArray&&mr()("Object.prototype.toString");return ff=m.isArray||function(T){return v(T)==="[object Array]"},ff}var df,k_;function om(){return k_||(k_=1,df=wb()),df}var yf,R_;function Sb(){return R_||(R_=1,yf=function(m){return m==="BIGUINT64"||m==="BIGINT64"}),yf}var mf,z_;function A2(){return z_||(z_=1,mf=function(m){return m==="UINT8"||m==="UINT8C"||m==="UINT16"||m==="UINT32"||m==="BIGUINT64"}),mf}var vf,L_;function C2(){if(L_)return vf;L_=1;var g=Ga();return vf=function(v){var S=v[3]&128?-1:1,T=(v[3]&127)<<1|v[2]>>7,E=(v[2]&127)<<16|v[1]<<8|v[0];return T===0&&E===0?S===1?0:-0:T===255&&E===0?S===1?1/0:-1/0:T===255&&E!==0?NaN:(T-=127,T===-127?S*E*g(2,-149):S*(1+E*g(2,-23))*g(2,T))},vf}var gf,D_;function P2(){if(D_)return gf;D_=1;var g=Ga();return gf=function(v){var S=v[7]&128?-1:1,T=(v[7]&127)<<4|(v[6]&240)>>4,E=(v[6]&15)*281474976710656+v[5]*1099511627776+v[4]*4294967296+v[3]*16777216+v[2]*65536+v[1]*256+v[0];return T===0&&E===0?S*0:T===2047&&E!==0?NaN:T===2047&&E===0?S*(1/0):(T-=1023,T===-1023?S*E*5e-324:S*(1+E/4503599627370496)*g(2,T))},gf}var _f,O_;function M2(){if(O_)return _f;O_=1;var g=Ur(),m=Ga(),v=g("%Number%"),S=g("%BigInt%",!0);return _f=function(E,a,_,w){for(var k=w?S:v,z=k(0),O=0;O<E.length;O++)z+=k(E[O]*m(2,8*O));if(!_){var F=a*8;E[a-1]&128&&(z-=k(m(2,F)))}return z},_f}var xf,B_;function k2(){return B_||(B_=1,xf=function(m,v){for(var S=0;S<m.length;S+=1)if(!v(m[S],S,m))return!1;return!0}),xf}var bf,F_;function R2(){return F_||(F_=1,bf=function(m){return typeof m=="number"&&m>=0&&m<=255&&(m|0)===m}),bf}var wf,N_;function Zs(){return N_||(N_=1,wf={__proto__:null,name:{__proto__:null,$Int8Array:"INT8",$Uint8Array:"UINT8",$Uint8ClampedArray:"UINT8C",$Int16Array:"INT16",$Uint16Array:"UINT16",$Int32Array:"INT32",$Uint32Array:"UINT32",$BigInt64Array:"BIGINT64",$BigUint64Array:"BIGUINT64",$Float32Array:"FLOAT32",$Float64Array:"FLOAT64"},size:{__proto__:null,$INT8:1,$UINT8:1,$UINT8C:1,$INT16:2,$UINT16:2,$INT32:4,$UINT32:4,$BIGINT64:8,$BIGUINT64:8,$FLOAT32:4,$FLOAT64:8},choices:'"INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"'}),wf}var Sf,q_;function z2(){if(q_)return Sf;q_=1;var g=Ur(),m=mr(),v=Jy(),S=Ui(),T=qt(),E=g("%BigInt%",!0),a=bb(),_=om(),w=Sb(),k=A2(),z=C2(),O=P2(),F=M2(),W=k2(),ue=R2(),ye=m("Array.prototype.reverse"),ge=m("Array.prototype.slice"),xe=Zs();return Sf=function($,me,ze){if(!a(xe.size,"$"+$))throw new T("Assertion failed: `type` must be a TypedArray element type");if(!_(me)||!W(me,ue))throw new T("Assertion failed: `rawBytes` must be an Array of bytes");if(typeof ze!="boolean")throw new T("Assertion failed: `isLittleEndian` must be a Boolean");var Fe=xe.size["$"+$];if(me.length!==Fe)throw new v("Assertion failed: `rawBytes` must have a length of "+Fe+" for type "+$);var pe=w($);if(pe&&!E)throw new S("this environment does not support BigInts");return me=ge(me,0,Fe),ze||ye(me),$==="FLOAT32"?z(me):$==="FLOAT64"?O(me):F(me,Fe,k($),pe)},Sf}var Tf,U_;function Tb(){if(U_)return Tf;U_=1;var g={}.toString;return Tf=Array.isArray||function(m){return g.call(m)=="[object Array]"},Tf}var If,V_;function L2(){if(V_)return If;V_=1;var g=Ur(),m=g("%Array.prototype.concat%"),v=la(),S=mr(),T=S("Array.prototype.slice"),E=em()(),a=E&&Symbol.isConcatSpreadable,_=[],w=a?v.apply(m,_):null,k=a?Tb():null;return If=a?function(O){for(var F=0;F<arguments.length;F+=1){var W=arguments[F];if(W&&typeof W=="object"&&typeof W[a]=="boolean"){_[a]||(_[a]=!0);var ue=k(W)?T(W):[W];ue[a]=!0,arguments[F]=ue}}return w(arguments)}:v(m,_),If}var Ef,j_;function Ws(){if(j_)return Ef;j_=1;var g=js();return Ef=function(v){return!!g(v)},Ef}var Af,G_;function Yu(){if(G_)return Af;G_=1;var g=qt(),m=mr(),v=m("TypedArray.prototype.buffer",!0),S=Ws();return Af=v||function(E){if(!S(E))throw new g("Not a Typed Array");return E.buffer},Af}var Cf,$_;function Ib(){if($_)return Cf;$_=1;var g=Ur(),m=g("%Uint8Array%",!0),v=g("%Uint32Array%",!0),S=Yu(),T=v&&new v([305419896]),E=T&&new m(S(T));return Cf=E?E[0]===120?"little":E[0]===18?"big":E[0]===52?"mixed":"unknown":"indeterminate",Cf}var Pf,Z_;function D2(){if(Z_)return Pf;Z_=1;var g=Ur(),m=Ui(),v=qt(),S=mr(),T=Ec(),E=g("%Uint8Array%",!0),a=S("Array.prototype.slice"),_=$s(),w=z2(),k=Gs(),z=Ju(),O=L2(),F=Zs(),W=Ib();return Pf=function(ye,ge,xe,ce,$){var me=z(ye);if(!k(ye)&&!me)throw new v("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(!T(ge))throw new v("Assertion failed: `byteIndex` must be an integer");if(typeof xe!="string"||typeof F.size["$"+xe]!="number")throw new v("Assertion failed: `type` must be one of "+F.choices);if(typeof ce!="boolean")throw new v("Assertion failed: `isTypedArray` must be a boolean");if($!=="SEQ-CST"&&$!=="UNORDERED")throw new v("Assertion failed: `order` must be either `SEQ-CST` or `UNORDERED`");if(arguments.length>5&&typeof arguments[5]!="boolean")throw new v("Assertion failed: `isLittleEndian` must be a boolean, if present");if(_(ye))throw new v("Assertion failed: `arrayBuffer` is detached");if(ge<0)throw new v("Assertion failed: `byteIndex` must be non-negative");var ze=F.size["$"+xe];if(!ze)throw new v("Assertion failed: `type` must be one of "+F.choices);var Fe;
500if(me)throw new m("SharedArrayBuffer is not supported by this implementation");Fe=a(new E(ye,ge),0,ze);var pe=arguments.length>5?arguments[5]:W==="little",je=pe?a(O([0,0,0,0,0,0,0,0],Fe),-ze):a(O(Fe,[0,0,0,0,0,0,0,0]),0,ze);return w(xe,je,pe)},Pf}var Mf,W_;function Eb(){if(W_)return Mf;W_=1;var g=$a();return Mf=function(v,S){return v===S?v===0?1/v===1/S:!0:g(v)&&g(S)},Mf}var kf,X_;function O2(){if(X_)return kf;X_=1;var g=qt(),m=ca(),v=Ic(),S=Eb(),T=(function(){try{return delete[].length,!0}catch{return!1}})();return kf=function(a,_,w,k){if(!m(a))throw new g("Assertion failed: `O` must be an Object");if(!v(_))throw new g("Assertion failed: `P` must be a Property Key");if(typeof k!="boolean")throw new g("Assertion failed: `Throw` must be a Boolean");if(k){if(a[_]=w,T&&!S(a[_],w))throw new g("Attempted to assign to readonly property.");return!0}try{return a[_]=w,T?S(a[_],w):!0}catch{return!1}},kf}var Rf,H_;function B2(){if(H_)return Rf;H_=1;var g=Ur(),m=g("%BigInt%",!0),v=qt(),S=Ui();return Rf=function(E){if(typeof E!="string")throw new v("`argument` must be a string");if(!m)throw new S("BigInts are not supported in this environment");try{return m(E)}catch{return}},Rf}var zf,K_;function F2(){return K_||(K_=1,zf=function(m){return m===null||typeof m!="function"&&typeof m!="object"}),zf}var Lf,J_;function Ab(){if(J_)return Lf;J_=1;var g=mr(),m=g("Date.prototype.getDay"),v=function(_){try{return m(_),!0}catch{return!1}},S=g("Object.prototype.toString"),T="[object Date]",E=Vo()();return Lf=function(_){return typeof _!="object"||_===null?!1:E?v(_):S(_)===T},Lf}var pc={exports:{}},Df,Y_;function Cb(){if(Y_)return Df;Y_=1;var g=mr(),m=Vo()(),v=Uo(),S=qo(),T;if(m){var E=g("RegExp.prototype.exec"),a={},_=function(){throw a},w={toString:_,valueOf:_};typeof Symbol.toPrimitive=="symbol"&&(w[Symbol.toPrimitive]=_),T=function(F){if(!F||typeof F!="object")return!1;var W=S(F,"lastIndex"),ue=W&&v(W,"value");if(!ue)return!1;try{E(F,w)}catch(ye){return ye===a}}}else{var k=g("Object.prototype.toString"),z="[object RegExp]";T=function(F){return!F||typeof F!="object"&&typeof F!="function"?!1:k(F)===z}}return Df=T,Df}var Of,Q_;function Ac(){if(Q_)return Of;Q_=1;var g=mr(),m=Cb(),v=g("RegExp.prototype.exec"),S=qt();return Of=function(E){if(!m(E))throw new S("`regex` must be a RegExp");return function(_){return v(E,_)!==null}},Of}var ex;function Pb(){if(ex)return pc.exports;ex=1;var g=mr(),m=g("Object.prototype.toString"),v=yb()(),S=Ac();if(v){var T=g("Symbol.prototype.toString"),E=S(/^Symbol\(.*\)$/),a=function(w){return typeof w.valueOf()!="symbol"?!1:E(T(w))};pc.exports=function(w){if(typeof w=="symbol")return!0;if(!w||typeof w!="object"||m(w)!=="[object Symbol]")return!1;try{return a(w)}catch{return!1}}}else pc.exports=function(w){return!1};return pc.exports}var Bf,tx;function N2(){if(tx)return Bf;tx=1;var g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol",m=F2(),v=wc(),S=Ab(),T=Pb(),E=function(w,k){if(typeof w>"u"||w===null)throw new TypeError("Cannot call method on "+w);if(typeof k!="string"||k!=="number"&&k!=="string")throw new TypeError('hint must be "string" or "number"');var z=k==="string"?["toString","valueOf"]:["valueOf","toString"],O,F,W;for(W=0;W<z.length;++W)if(O=w[z[W]],v(O)&&(F=O.call(w),m(F)))return F;throw new TypeError("No default value")},a=function(w,k){var z=w[k];if(z!==null&&typeof z<"u"){if(!v(z))throw new TypeError(z+" returned for property "+String(k)+" of object "+w+" is not a function");return z}};return Bf=function(w){if(m(w))return w;var k="default";arguments.length>1&&(arguments[1]===String?k="string":arguments[1]===Number&&(k="number"));var z;if(g&&(Symbol.toPrimitive?z=a(w,Symbol.toPrimitive):T(w)&&(z=Symbol.prototype.valueOf)),typeof z<"u"){var O=z.call(w,k);if(m(O))return O;throw new TypeError("unable to convert exotic object to primitive")}return k==="default"&&(S(w)||T(w))&&(k="string"),E(w,k==="default"?"number":k)},Bf}var Ff,rx;function Mb(){if(rx)return Ff;rx=1;var g=N2();return Ff=function(v){return arguments.length>1?g(v,arguments[1]):g(v)},Ff}var Nf,nx;function kb(){if(nx)return Nf;nx=1;var g=Ur(),m=g("%BigInt%",!0),v=g("%Number%"),S=qt(),T=Ui(),E=B2(),a=Mb();return Nf=function(w){if(!m)throw new T("BigInts are not supported in this environment");var k=a(w,v);if(k==null)throw new S("Cannot convert null or undefined to a BigInt");if(typeof k=="boolean")return m(k?1:0);if(typeof k=="number")throw new S("Cannot convert a Number value to a BigInt");if(typeof k=="string"){var z=E(k);if(typeof z>"u")throw new S("Failed to parse String to BigInt");return z}if(typeof k=="symbol")throw new S("Cannot convert a Symbol value to a BigInt");if(typeof k!="bigint")throw new T("Assertion failed: unknown primitive type");return k},Nf}var qf,ix;function Rb(){if(ix)return qf;ix=1;var g=Ur(),m=g("%BigInt%",!0),v=Jy(),S=qt(),T=m&&m(0);return qf=function(a,_){if(typeof a!="bigint"||typeof _!="bigint")throw new S("Assertion failed: `n` and `d` arguments must be BigInts");if(_===T)throw new v("Division by zero");return a===T?T:a%_},qf}var Uf,ox;function zb(){return ox||(ox=1,Uf=function(m,v,S){var T=m(v,S);return T>=0?T:T+S}),Uf}var Vf,ax;function q2(){if(ax)return Vf;ax=1;var g=Ur(),m=g("%BigInt%",!0),v=Ga(),S=kb(),T=Rb(),E=zb(),a=m&&BigInt(v(2,32))*BigInt(v(2,31)),_=m&&BigInt(v(2,32))*BigInt(v(2,32));return Vf=function(k){var z=S(k),O=E(T,z,_);return O>=a?O-_:O},Vf}var jf,sx;function U2(){if(sx)return jf;sx=1;var g=Ur(),m=g("%BigInt%",!0),v=Ga(),S=kb(),T=Rb(),E=zb(),a=m&&BigInt(v(2,32))*BigInt(v(2,32));return jf=function(w){var k=S(w),z=E(T,k,a);return z},jf}var Gf,ux;function V2(){if(ux)return Gf;ux=1;var g=ja();
500return Gf=function(v,S){var T=v%S;return g(T>=0?T:T+S)},Gf}var $f,lx;function j2(){return lx||(lx=1,$f=V2()),$f}var Zf,cx;function Xs(){if(cx)return Zf;cx=1;var g=j2();return Zf=function(v,S){return g(v,S)},Zf}var Wf,px;function G2(){return px||(px=1,Wf=function(m){return m===null||typeof m!="function"&&typeof m!="object"}),Wf}var Xf,hx;function Lb(){if(hx)return Xf;hx=1;var g=qt();return Xf=function(v){if(v==null)throw new g(arguments.length>0&&arguments[1]||"Cannot call method on "+v);return v},Xf}var Hf,fx;function Db(){if(fx)return Hf;fx=1;var g=Ur(),m=g("%String%"),v=qt();return Hf=function(T){if(typeof T=="symbol")throw new v("Cannot convert a Symbol value to a string");return m(T)},Hf}var Kf,dx;function Ob(){if(dx)return Kf;dx=1;var g=Lb(),m=Db(),v=mr(),S=v("String.prototype.replace"),T=/^\s$/.test("᠎"),E=T?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,a=T?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;return Kf=function(){var w=m(g(this));return S(S(w,E,""),a,"")},Kf}var Jf,yx;function Bb(){if(yx)return Jf;yx=1;var g=Ob(),m="​",v="᠎";return Jf=function(){return String.prototype.trim&&m.trim()===m&&v.trim()===v&&("_"+v).trim()==="_"+v&&(v+"_").trim()===v+"_"?String.prototype.trim:g},Jf}var Yf,mx;function $2(){if(mx)return Yf;mx=1;var g=Tc()(),m=im(),v=Bb();return Yf=function(){var T=v();return String.prototype.trim!==T&&(g?m(String.prototype,"trim",T,!0):m(String.prototype,"trim",T)),T},Yf}var Qf,vx;function Z2(){if(vx)return Qf;vx=1;var g=la(),m=Ku(),v=Lb(),S=Ob(),T=Bb(),E=$2(),a=g(T()),_=function(k){return v(k),a(k)};return m(_,{getPolyfill:T,implementation:S,shim:E}),Qf=_,Qf}var ed,gx;function W2(){if(gx)return ed;gx=1;var g=Ur(),m=g("%RegExp%"),v=qt(),S=g("%parseInt%"),T=mr(),E=Ac(),a=T("String.prototype.slice"),_=E(/^0b[01]+$/i),w=E(/^0o[0-7]+$/i),k=E(/^[-+]0x[0-9a-f]+$/i),z=["…","​","￾"].join(""),O=new m("["+z+"]","g"),F=E(O),W=Z2();return ed=function ue(ye){if(typeof ye!="string")throw new v("Assertion failed: `argument` is not a String");if(_(ye))return+S(a(ye,2),2);if(w(ye))return+S(a(ye,2),8);if(F(ye)||k(ye))return NaN;var ge=W(ye);return ge!==ye?ue(ge):+ye},ed}var td,_x;function pa(){if(_x)return td;_x=1;var g=Ur(),m=qt(),v=g("%Number%"),S=G2(),T=Mb(),E=W2();return td=function(_){var w=S(_)?_:T(_,v);if(typeof w=="symbol")throw new m("Cannot convert a Symbol value to a number");if(typeof w=="bigint")throw new m("Conversion from 'BigInt' to 'number' is not allowed.");return typeof w=="string"?E(w):+w},td}var rd,xx;function am(){if(xx)return rd;xx=1;var g=ja();return rd=function(v){return typeof v=="bigint"?v:g(v)},rd}var nd,bx;function Wa(){if(bx)return nd;bx=1;var g=am(),m=qt();return nd=function(S){if(typeof S!="number"&&typeof S!="bigint")throw new m("argument must be a Number or a BigInt");var T=S<0?-g(-S):g(S);return T===0?0:T},nd}var id,wx;function X2(){if(wx)return id;wx=1;var g=Xs(),m=pa(),v=Wa(),S=ho(),T=65536;return id=function(a){var _=m(a);if(!S(_)||_===0)return 0;var w=v(_),k=g(w,T);return k>=32768?k-T:k},id}var od,Sx;function H2(){if(Sx)return od;Sx=1;var g=Xs(),m=pa(),v=Wa(),S=ho(),T=2147483648,E=4294967296;return od=function(_){var w=m(_);if(!S(w)||w===0)return 0;var k=v(w),z=g(k,E),O=z>=T?z-E:z;return O===0?0:O},od}var ad,Tx;function K2(){if(Tx)return ad;Tx=1;var g=Xs(),m=pa(),v=Wa(),S=ho();return ad=function(E){var a=m(E);if(!S(a)||a===0)return 0;var _=v(a),w=g(_,256);return w>=128?w-256:w},ad}var sd,Ix;function J2(){if(Ix)return sd;Ix=1;var g=Xs(),m=pa(),v=Wa(),S=ho(),T=65536;return sd=function(a){var _=m(a);if(!S(_)||_===0)return 0;var w=v(_),k=g(w,T);return k===0?0:k},sd}var ud,Ex;function Y2(){if(Ex)return ud;Ex=1;var g=Xs(),m=pa(),v=Wa(),S=ho(),T=4294967296;return ud=function(a){var _=m(a);if(!S(_)||_===0)return 0;var w=v(_),k=g(w,T);return k===0?0:k},ud}var ld,Ax;function Q2(){if(Ax)return ld;Ax=1;var g=ho(),m=Xs(),v=pa(),S=Wa();return ld=function(E){var a=v(E);if(!g(a)||a===0)return 0;var _=S(a),w=m(_,256);return w},ld}var cd,Cx;function eS(){if(Cx)return cd;Cx=1;var g=qt(),m=Yy(),v=Qy();return cd=function(T,E,a){if(typeof T!="number"||typeof E!="number"||typeof a!="number"||!(E<=a)
500)throw new g("Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`");return v(m(E,T),a)},cd}var pd,Px;function tS(){if(Px)return pd;Px=1;var g=eS(),m=pa(),v=am(),S=$a();return pd=function(E){var a=m(E);if(S(a))return 0;var _=g(a,0,255),w=v(_);return _<w+.5?w:_>w+.5?w+1:w%2===0?w:w+1},pd}var hd,Mx;function Fb(){return Mx||(Mx=1,hd=function(m){return m===0&&1/m===-1/0}),hd}var fd,kx;function rS(){if(kx)return fd;kx=1;var g=Sc(),m=ja(),v=Ga(),S=ho(),T=$a(),E=Fb(),a=34028234663852886e22;return fd=function(w,k){if(T(w))return k?[0,0,192,127]:[127,192,0,0];var z;if(w===0)return z=E(w)?128:0,k?[0,0,0,z]:[z,0,0,0];if(g(w)>a||!S(w))return z=w<0?255:127,k?[0,0,128,z]:[z,128,0,0];var O=w<0?1:0;w=g(w);for(var F=0;w>=2;)F+=1,w/=2;for(;w<1;)F-=1,w*=2;var W=w-1;W*=v(2,23)+.5,W=m(W),F+=127,F<<=23;var ue=O<<31|F|W,ye=ue&255;ue>>=8;var ge=ue&255;ue>>=8;var xe=ue&255;ue>>=8;var ce=ue&255;return k?[ye,ge,xe,ce]:[ce,xe,ge,ye]},fd}var dd,Rx;function nS(){if(Rx)return dd;Rx=1;var g=1075,m=54;return dd=function(S){var T="";if(S===0)return T;for(var E=g,a,_=0;_<g;_+=1)if(a=S*2,a>=1?(S=a-1,T+="1",E===g&&(E=_)):(S=a,T+="0"),a===1||_-E>m)return T;return T},dd}var yd,zx;function iS(){if(zx)return yd;zx=1;var g=ja();return yd=function(v){for(var S="",T;v>0;)T=v/2,v=g(T),T===v?S="0"+S:S="1"+S;return S},yd}var md,Lx;function oS(){return Lx||(Lx=1,md=Number.isNaN||function(m){return m!==m}),md}var vd,Dx;function aS(){if(Dx)return vd;Dx=1;var g=Ur(),m=g("%parseInt%"),v=Sc(),S=ja(),T=ho(),E=Fb(),a=mr(),_=a("String.prototype.indexOf"),w=a("String.prototype.slice"),k=nS(),z=iS(),O=oS(),F=1023,W="11111111111",ue="00000000000",ye=ue+ue+ue+ue+"0000000";return vd=function(xe,ce){var $=xe<0||E(xe)?"1":"0",me,ze;if(O(xe))me=W,ze="1"+ye;else if(!T(xe))me=W,ze="0"+ye;else if(xe===0)me=ue,ze="0"+ye;else{xe=v(xe);var Fe=S(xe),pe=z(Fe),je=k(xe-Fe),Re;if(pe)me=pe.length-1;else{var it=_(je,"1");it>-1&&(Re=it+1),me=-Re}ze=pe+je,me<0?(me<=-F&&(Re=F-1),ze=w(ze,Re)):ze=w(ze,1),me=w(ue+z(me+F),-11),ze=w(ze+ye+"0",0,52)}for(var se=$+me+ze,rt=[],pt=0;pt<8;pt++){var nt=ce?8-pt-1:pt;rt[nt]=m(w(se,pt*8,(pt+1)*8),2)}return rt},vd}var gd,Ox;function sS(){if(Ox)return gd;Ox=1;var g=Ur(),m=g("%Number%"),v=g("%BigInt%",!0);return gd=function(T,E,a){var _=typeof T=="bigint"?v:m;T<0&&(T>>>=0);for(var w=[],k=0;k<E;k++)w[a?k:E-1-k]=m(T&_(255)),T>>=_(8);return w},gd}var _d,Bx;function uS(){if(Bx)return _d;Bx=1;var g=qt(),m=bb(),v=q2(),S=U2(),T=X2(),E=H2(),a=K2(),_=J2(),w=Y2(),k=Q2(),z=tS(),O=rS(),F=aS(),W=sS(),ue=Zs(),ye={__proto__:null,$INT8:a,$UINT8:k,$UINT8C:z,$INT16:T,$UINT16:_,$INT32:E,$UINT32:w,$BIGINT64:v,$BIGUINT64:S};return _d=function(xe,ce,$){if(typeof xe!="string"||!m(ue.size,"$"+xe))throw new g("Assertion failed: `type` must be a TypedArray element type");if(typeof ce!="number"&&typeof ce!="bigint")throw new g("Assertion failed: `value` must be a Number or a BigInt");if(typeof $!="boolean")throw new g("Assertion failed: `isLittleEndian` must be a Boolean");if(xe==="FLOAT32")return O(ce,$);if(xe==="FLOAT64")return F(ce,$);var me=ue.size["$"+xe],ze=ye["$"+xe],Fe=ze(ce);return W(Fe,me,$)},_d}var xd,Fx;function lS(){return Fx||(Fx=1,xd=function(m,v){for(var S=0;S<m.length;S+=1)v(m[S],S,m)}),xd}var bd,Nx;function cS(){if(Nx)return bd;Nx=1;var g=Ur(),m=Ui(),v=qt(),S=Ec(),T=g("%Uint8Array%",!0),E=Sb(),a=$s(),_=uS(),w=Gs(),k=Ju(),z=Uo(),O=Zs(),F=Ib(),W=lS();return bd=function(ye,ge,xe,ce,$,me){var ze=k(ye);if(!w(ye)&&!ze)throw new v("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(!S(ge)||ge<0)throw new v("Assertion failed: `byteIndex` must be a non-negative integer");if(typeof xe!="string"||!z(O.size,"$"+xe))throw new v("Assertion failed: `type` must be one of "+O.choices);if(typeof ce!="number"&&typeof ce!="bigint")throw new v("Assertion failed: `value` must be a Number or a BigInt");if(typeof $!="boolean")throw new v("Assertion failed: `isTypedArray` must be a boolean");if(me!=="SEQ-CST"&&me!=="UNORDERED"&&me!=="INIT")throw new v('Assertion failed: `order` must be `"SEQ-CST"`, `"UNORDERED"`, or `"INIT"`');if(arguments.length>6&&typeof arguments[6]!="boolean")throw new v("Assertion failed: `isLittleEndian` must be a boolean, if present");if(a(ye))throw new v("Assertion failed: ArrayBuffer is detached");if(E(xe)?typeof ce!="bigint":typeof ce!="number")throw new v("Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number");var Fe=O.size["$"+xe],pe=arguments.length>6?arguments[6]:F==="little",je=_(xe,ce,pe);
500if(ze)throw new m("SharedArrayBuffer is not supported by this implementation");var Re=new T(ye,ge,Fe);W(je,function(it,se){Re[se]=it})},bd}var wd,qx;function pS(){if(qx)return wd;qx=1;var g=pa(),m=Wa(),v=$a(),S=ho();return wd=function(E){var a=g(E);return v(a)||a===0?0:S(a)?m(a):a},wd}var Sd,Ux;function sm(){if(Ux)return Sd;Ux=1;var g=Ui(),m=qt(),v=Ec(),S=js(),T=Zs();return Sd=function(a){var _=S(a);if(!_)throw new m("Assertion failed: `O` must be a TypedArray");var w=T.size["$"+T.name["$"+_]];if(!v(w)||w<0)throw new g("Assertion failed: Unknown TypedArray type `"+_+"`");return w},Sd}var Td,Vx;function hS(){if(Vx)return Td;Vx=1;var g=Ui(),m=qt(),v=js(),S=Zs();return Td=function(E){var a=v(E);if(!a)throw new m("Assertion failed: `O` must be a TypedArray");var _=S.name["$"+a];if(typeof _!="string")throw new g("Assertion failed: Unknown TypedArray type `"+a+"`");return _},Td}var hc={exports:{}},Id,jx;function fS(){return jx||(jx=1,Id=Ur()),Id}var Ed,Gx;function um(){if(Gx)return Ed;Gx=1;var g=qt(),m=Uo(),v={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};return Ed=function(T){if(!T||typeof T!="object")return!1;for(var E in T)if(m(T,E)&&!v[E])return!1;var a=m(T,"[[Value]]")||m(T,"[[Writable]]"),_=m(T,"[[Get]]")||m(T,"[[Set]]");if(a&&_)throw new g("Property Descriptors may not be both accessor and data descriptors");return!0},Ed}var Ad,$x;function dS(){if($x)return Ad;$x=1;var g=Tc(),m=Xu(),v=g.hasArrayLengthDefineBug(),S=v&&wb(),T=mr(),E=T("Object.prototype.propertyIsEnumerable");return Ad=function(_,w,k,z,O,F){if(!m){if(!_(F)||!F["[[Configurable]]"]||!F["[[Writable]]"]||O in z&&E(z,O)!==!!F["[[Enumerable]]"])return!1;var W=F["[[Value]]"];return z[O]=W,w(z[O],W)}return v&&O==="length"&&"[[Value]]"in F&&S(z)&&z.length!==F["[[Value]]"]?(z.length=F["[[Value]]"],z.length===F["[[Value]]"]):(m(z,O,k(F)),!0)},Ad}var Cd,Zx;function yS(){return Zx||(Zx=1,Cd=function(m){if(typeof m>"u")return m;var v={};return"[[Value]]"in m&&(v.value=m["[[Value]]"]),"[[Writable]]"in m&&(v.writable=!!m["[[Writable]]"]),"[[Get]]"in m&&(v.get=m["[[Get]]"]),"[[Set]]"in m&&(v.set=m["[[Set]]"]),"[[Enumerable]]"in m&&(v.enumerable=!!m["[[Enumerable]]"]),"[[Configurable]]"in m&&(v.configurable=!!m["[[Configurable]]"]),v}),Cd}var Pd,Wx;function mS(){if(Wx)return Pd;Wx=1;var g=qt(),m=um(),v=yS();return Pd=function(T){if(typeof T<"u"&&!m(T))throw new g("Assertion failed: `Desc` must be a Property Descriptor");return v(T)},Pd}var Md,Xx;function vS(){if(Xx)return Md;Xx=1;var g=qt(),m=Uo(),v=um();return Md=function(T){if(typeof T>"u")return!1;if(!v(T))throw new g("Assertion failed: `Desc` must be a Property Descriptor");return!(!m(T,"[[Value]]")&&!m(T,"[[Writable]]"))},Md}var kd,Hx;function Nb(){return Hx||(Hx=1,kd=wc()),kd}var Rd,Kx;function gS(){return Kx||(Kx=1,Rd=function(m){return!!m}),Rd}var zd,Jx;function _S(){if(Jx)return zd;Jx=1;var g=Uo(),m=qt(),v=ca(),S=Nb(),T=gS();return zd=function(a){if(!v(a))throw new m("ToPropertyDescriptor requires an object");var _={};if(g(a,"enumerable")&&(_["[[Enumerable]]"]=T(a.enumerable)),g(a,"configurable")&&(_["[[Configurable]]"]=T(a.configurable)),g(a,"value")&&(_["[[Value]]"]=a.value),g(a,"writable")&&(_["[[Writable]]"]=T(a.writable)),g(a,"get")){var w=a.get;if(typeof w<"u"&&!S(w))throw new m("getter must be a function");_["[[Get]]"]=w}if(g(a,"set")){var k=a.set;if(typeof k<"u"&&!S(k))throw new m("setter must be a function");_["[[Set]]"]=k}if((g(_,"[[Get]]")||g(_,"[[Set]]"))&&(g(_,"[[Value]]")||g(_,"[[Writable]]")))throw new m("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return _},zd}var Ld,Yx;function xS(){if(Yx)return Ld;Yx=1;var g=qt(),m=ca(),v=um(),S=dS(),T=mS(),E=vS(),a=Ic(),_=Eb(),w=_S();return Ld=function(z,O,F){if(!m(z))throw new g("Assertion failed: Type(O) is not Object");if(!a(O))throw new g("Assertion failed: P is not a Property Key");var W=v(F)?F:w(F);if(!v(W))throw new g("Assertion failed: Desc is not a valid Property Descriptor");return S(E,_,T,z,O,W)},Ld}var Qx;function qb(){if(Qx)return hc.exports;Qx=1;var g=fS(),m=g("%Reflect.construct%",!0),v=xS();try{v({},"",{"[[Get]]":function(){}})}catch{v=null}if(v&&m){var S={},T={};v(T,"length",{"[[Get]]":function(){throw S},"[[Enumerable]]":!0}),hc.exports=function(a){try{m(a,T)}catch(_){return _===S}}}else hc.exports=function(a){return typeof a=="function"&&!!a.prototype};return hc.exports}var Dd,e0;function bS(){if(e0)return Dd;e0=1;var g=Ur(),m=g("%Symbol.species%",!0),v=qt(),S=ca(),T=qb();return Dd=function(a,_){if(!S(a))throw new v("Assertion failed: Type(O) 
500is not Object");var w=a.constructor;if(typeof w>"u")return _;if(!S(w))throw new v("O.constructor is not an Object");var k=m?w[m]:void 0;if(k==null)return _;if(T(k))return k;throw new v("no constructor found")},Dd}var Od,t0;function Ub(){if(t0)return Od;t0=1;var g=qt(),m=mr(),v=m("%ArrayBuffer.prototype.resizable%",!0),S=m("%SharedArrayBuffer.prototype.growable%",!0),T=Gs(),E=Ju();return Od=function(_){var w=T(_),k=E(_);if(!w&&!k)throw new g("Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer");return w&&v?!v(_):k&&S?!S(_):!0},Od}var Bd,r0;function wS(){return r0||(r0=1,Bd=Ec()),Bd}var Fd,n0;function Vb(){if(n0)return Fd;n0=1;var g=Uo(),m=Ws(),v=wS();return Fd=function(T){return!!T&&typeof T=="object"&&g(T,"[[Object]]")&&g(T,"[[CachedBufferByteLength]]")&&(v(T["[[CachedBufferByteLength]]"])&&T["[[CachedBufferByteLength]]"]>=0||T["[[CachedBufferByteLength]]"]==="DETACHED")&&m(T["[[Object]]"])},Fd}var Nd,i0;function SS(){return i0||(i0=1,Nd=ca()),Nd}var qd,o0;function TS(){if(o0)return qd;o0=1;var g=mr(),m=g("String.prototype.valueOf"),v=function(_){try{return m(_),!0}catch{return!1}},S=g("Object.prototype.toString"),T="[object String]",E=Vo()();return qd=function(_){return typeof _=="string"?!0:!_||typeof _!="object"?!1:E?v(_):S(_)===T},qd}var Ud,a0;function IS(){if(a0)return Ud;a0=1;var g=mr(),m=g("Number.prototype.toString"),v=function(_){try{return m(_),!0}catch{return!1}},S=g("Object.prototype.toString"),T="[object Number]",E=Vo()();return Ud=function(_){return typeof _=="number"?!0:!_||typeof _!="object"?!1:E?v(_):S(_)===T},Ud}var Vd,s0;function ES(){if(s0)return Vd;s0=1;var g=mr(),m=g("Boolean.prototype.toString"),v=g("Object.prototype.toString"),S=function(_){try{return m(_),!0}catch{return!1}},T="[object Boolean]",E=Vo()();return Vd=function(_){return typeof _=="boolean"?!0:_===null||typeof _!="object"?!1:E?S(_):v(_)===T},Vd}var fc={exports:{}},jd,u0;function AS(){if(u0)return jd;u0=1;var g=typeof BigInt<"u"&&BigInt;return jd=function(){return typeof g=="function"&&typeof BigInt=="function"&&typeof g(42)=="bigint"&&typeof BigInt(42)=="bigint"},jd}var l0;function CS(){if(l0)return fc.exports;l0=1;var g=AS()();if(g){var m=BigInt.prototype.valueOf,v=function(T){try{return m.call(T),!0}catch{}return!1};fc.exports=function(T){return T===null||typeof T>"u"||typeof T=="boolean"||typeof T=="string"||typeof T=="number"||typeof T=="symbol"||typeof T=="function"?!1:typeof T=="bigint"?!0:v(T)}}else fc.exports=function(T){return!1};return fc.exports}var Gd,c0;function PS(){if(c0)return Gd;c0=1;var g=TS(),m=IS(),v=ES(),S=Pb(),T=CS();return Gd=function(a){if(a==null||typeof a!="object"&&typeof a!="function")return null;if(g(a))return"String";if(m(a))return"Number";if(v(a))return"Boolean";if(S(a))return"Symbol";if(T(a))return"BigInt"},Gd}var $d,p0;function MS(){if(p0)return $d;p0=1;var g=typeof Map=="function"&&Map.prototype?Map:null,m=typeof Set=="function"&&Set.prototype?Set:null,v;g||(v=function(a){return!1});var S=g?Map.prototype.has:null,T=m?Set.prototype.has:null;return!v&&!S&&(v=function(a){return!1}),$d=v||function(a){if(!a||typeof a!="object")return!1;try{if(S.call(a),T)try{T.call(a)}catch{return!0}return a instanceof g}catch{}return!1},$d}var Zd,h0;function kS(){if(h0)return Zd;h0=1;var g=typeof Map=="function"&&Map.prototype?Map:null,m=typeof Set=="function"&&Set.prototype?Set:null,v;m||(v=function(a){return!1});var S=g?Map.prototype.has:null,T=m?Set.prototype.has:null;return!v&&!T&&(v=function(a){return!1}),Zd=v||function(a){if(!a||typeof a!="object")return!1;try{if(T.call(a),S)try{S.call(a)}catch{return!0}return a instanceof m}catch{}return!1},Zd}var Wd,f0;function RS(){if(f0)return Wd;f0=1;var g=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,m=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,v;g||(v=function(a){return!1});var S=g?g.prototype.has:null,T=m?m.prototype.has:null;return!v&&!S&&(v=function(a){return!1}),Wd=v||function(a){if(!a||typeof a!="object")return!1;try{if(S.call(a,S),T)try{T.call(a,T)}catch{return!0}return a instanceof g}catch{}return!1},Wd}var dc={exports:{}},d0;function zS(){if(d0)return dc.exports;d0=1;var g=Ur(),m=mr(),v=g("%WeakSet%",!0),S=m("WeakSet.prototype.has",!0);if(S){var T=m("WeakMap.prototype.has",!0);
500dc.exports=function(a){if(!a||typeof a!="object")return!1;try{if(S(a,S),T)try{T(a,T)}catch{return!0}return a instanceof v}catch{}return!1}}else dc.exports=function(a){return!1};return dc.exports}var Xd,y0;function LS(){if(y0)return Xd;y0=1;var g=MS(),m=kS(),v=RS(),S=zS();return Xd=function(E){if(E&&typeof E=="object"){if(g(E))return"Map";if(m(E))return"Set";if(v(E))return"WeakMap";if(S(E))return"WeakSet"}return!1},Xd}var Hd,m0;function DS(){if(m0)return Hd;m0=1;var g=mr(),m=g("WeakRef.prototype.deref",!0);return Hd=typeof WeakRef>"u"?function(S){return!1}:function(S){if(!S||typeof S!="object")return!1;try{return m(S),!0}catch{return!1}},Hd}var Kd,v0;function OS(){if(v0)return Kd;v0=1;var g=mr(),m=g("FinalizationRegistry.prototype.register",!0);return Kd=m?function(S){if(!S||typeof S!="object")return!1;try{return m(S,{},null),!0}catch{return!1}}:function(S){return!1},Kd}var Jd,g0;function jb(){if(g0)return Jd;g0=1;var g=function(){return typeof(function(){}).name=="string"},m=Object.getOwnPropertyDescriptor;if(m)try{m([],"length")}catch{m=null}g.functionsHaveConfigurableNames=function(){if(!g()||!m)return!1;var T=m(function(){},"name");return!!T&&!!T.configurable};var v=Function.prototype.bind;return g.boundFunctionsHaveNames=function(){return g()&&typeof v=="function"&&(function(){}).bind().name!==""},Jd=g,Jd}var Yd,_0;function Gb(){if(_0)return Yd;_0=1;var g=wc(),m=Uo(),v=jb()(),S=mr(),T=S("Function.prototype.toString"),E=S("String.prototype.match"),a=S("Object.prototype.toString"),_=/^class /,w=function(xe){if(g(xe)||typeof xe!="function")return!1;try{var ce=E(T(xe),_);return!!ce}catch{}return!1},k=/\s*function\s+([^(\s]*)\s*/,z=!(0 in[,]),O="[object Object]",F="[object HTMLAllCollection]",W=Function.prototype,ue=function(){return!1};if(typeof document=="object"){var ye=document.all;a(ye)===a(document.all)&&(ue=function(xe){if((z||!xe)&&(typeof xe>"u"||typeof xe=="object"))try{var ce=a(xe);return(ce===F||ce===O)&&xe("")==null}catch{}return!1})}return Yd=function(){if(ue(this)||!w(this)&&!g(this))throw new TypeError("Function.prototype.name sham getter called on non-function");if(v&&m(this,"name"))return this.name;if(this===W)return"";var xe=T(this),ce=E(xe,k),$=ce&&ce[1];return $},Yd}var Qd,x0;function $b(){if(x0)return Qd;x0=1;var g=Gb();return Qd=function(){return g},Qd}var ey,b0;function BS(){if(b0)return ey;b0=1;var g=Ku().supportsDescriptors,m=jb()(),v=$b(),S=Object.defineProperty,T=TypeError;return ey=function(){var a=v();if(m)return a;
500if(!g)throw new T("Shimming Function.prototype.name support requires ES5 property descriptor support.");var _=Function.prototype;return S(_,"name",{configurable:!0,enumerable:!1,get:function(){var w=a.call(this);return this!==_&&S(this,"name",{configurable:!0,enumerable:!1,value:w,writable:!1}),w}}),a},ey}var ty,w0;function FS(){if(w0)return ty;w0=1;var g=Ku(),m=la(),v=Gb(),S=$b(),T=BS(),E=m(v);return g(E,{getPolyfill:S,implementation:v,shim:T}),ty=E,ty}var ry,S0;function NS(){if(S0)return ry;S0=1;const g=(function*(){}).constructor;return ry=()=>g,ry}var ny,T0;function qS(){if(T0)return ny;T0=1;var g=mr(),m=Ac(),v=m(/^\s*(?:function)?\*/),S=Vo()(),T=Za(),E=g("Object.prototype.toString"),a=g("Function.prototype.toString"),_=NS();return ny=function(k){if(typeof k!="function")return!1;if(v(a(k)))return!0;if(!S){var z=E(k);return z==="[object GeneratorFunction]"}if(!T)return!1;var O=_();return O&&T(k)===O.prototype},ny}var iy,I0;function US(){if(I0)return iy;I0=1;const g=(async function(){}).constructor;return iy=()=>g,iy}var oy,E0;function VS(){if(E0)return oy;E0=1;var g=mr(),m=Ac(),v=g("Object.prototype.toString"),S=g("Function.prototype.toString"),T=m(/^\s*async(?:\s+function(?:\s+|\()|\s*\()/),E=Vo()(),a=Za(),_=US();return oy=function(k){if(typeof k!="function")return!1;if(T(S(k)))return!0;if(!E){var z=v(k);return z==="[object AsyncFunction]"}if(!a)return!1;var O=_();return O&&O.prototype===a(k)},oy}var ay,A0;function jS(){if(A0)return ay;A0=1;var g=PS(),m=LS(),v=js(),S=Tb(),T=Ab(),E=Cb(),a=DS(),_=OS(),w=FS(),k=qS(),z=VS(),O=mr(),F=Vo()(),W=F&&Symbol.toStringTag,ue=Object,ye=O("Promise.prototype.then",!0),ge=function($){if(!$||typeof $!="object"||!ye)return!1;try{return ye($,null,function(){}),!0}catch{}return!1},xe=function($){return!!$&&$!=="BigInt"&&$!=="Boolean"&&$!=="Null"&&$!=="Number"&&$!=="String"&&$!=="Symbol"&&$!=="Undefined"&&$!=="Math"&&$!=="JSON"&&$!=="Reflect"&&$!=="Atomics"&&$!=="Map"&&$!=="Set"&&$!=="WeakMap"&&$!=="WeakSet"&&$!=="BigInt64Array"&&$!=="BigUint64Array"&&$!=="Float32Array"&&$!=="Float64Array"&&$!=="Int16Array"&&$!=="Int32Array"&&$!=="Int8Array"&&$!=="Uint16Array"&&$!=="Uint32Array"&&$!=="Uint8Array"&&$!=="Uint8ClampedArray"&&$!=="Array"&&$!=="Date"&&$!=="FinalizationRegistry"&&$!=="Promise"&&$!=="RegExp"&&$!=="WeakRef"&&$!=="Function"&&$!=="GeneratorFunction"&&$!=="AsyncFunction"};return ay=function($){if($==null)return $;var me=g(ue($))||m($)||v($);if(me)return me;if(S($))return"Array";if(T($))return"Date";if(E($))return"RegExp";if(a($))return"WeakRef";if(_($))return"FinalizationRegistry";if(typeof $=="function")return k($)?"GeneratorFunction":z($)?"AsyncFunction":"Function";if(ge($))return"Promise";if(W&&W in $){var ze=$[W];if(xe(ze))return ze}if(typeof $.constructor=="function"){var Fe=w($.constructor);if(xe(Fe))return Fe}return"Object"},ay}var sy,C0;function GS(){if(C0)return sy;C0=1;var g=Ur(),m=Nb(),v=SS(),S=jS(),T=qt(),E=Za(),a=Ky();return sy=function(w){if(!v(w))throw new T("Reflect.getPrototypeOf called on non-object");if(E)return E(w);var k=S(w);if(k){var z=g("%"+k+".prototype%",!0);if(z)return z}return m(w.constructor)?w.constructor.prototype:w instanceof Object?a.prototype:null},sy}var uy,P0;function Zb(){if(P0)return uy;P0=1;var g=GS(),m=Za();return uy=function(){return typeof Reflect=="object"&&Reflect&&Reflect.getPrototypeOf?Reflect.getPrototypeOf:m?function(T){return m(T)}:g},uy}var ly,M0;function lm(){if(M0)return ly;M0=1;var g=Hy(),m=la(),v=Zb()(),S=Wu()(),T={__proto__:null},E=qo(),a=Object.defineProperty;if(E){var _=function(z){return z.byteOffset};g(S,function(z){if(typeof qi[z]=="function"||typeof qi[z]=="object"){var O=qi[z].prototype,F=E(O,"byteOffset");if(!F){var W=v(O);F=E(W,"byteOffset")}if(F&&F.get)T[z]=m(F.get);else if(a){var ue=new qi[z](2);F=E(ue,"byteOffset"),F&&F.configurable&&a(ue,"length",{value:3}),ue.length===2&&(T[z]=_)}}})}var w=function(O){var F;return g(T,function(W){if(typeof F!="number")try{var ue=W(O);typeof ue=="number"&&(F=ue)}catch{}}),F},k=Ws();return ly=function(O){return k(O)?w(O):!1},ly}var cy,k0;function Wb(){if(k0)return cy;k0=1;var g=la(),m=Hy(),v=qo(),S=Ws(),T=db(),E=Zb()(),a={__proto__:null},_=Object.defineProperty;if(v){var w=function(z){return z.length};m(T,function(z){var O=qi[z];if(typeof O=="function"||typeof O=="object"){var F=O.prototype,W=v(F,"length");if(!W){var ue=E(F);W=v(ue,"length")}if(W&&W.get)a["$"+z]=g(W.get);else if(_){var ye=new qi[z](2);W=v(ye,"length"),W&&W.configurable&&_(ye,"length",{value:3}),ye.length===2&&(a["$"+z]=w)}}})}var k=function(O){var F;return m(a,function(W){if(typeof F!="number")try{var ue=W(O);typeof ue=="number"&&(F=ue)}catch{}}),F};return cy=function(O){return S(O)?k(O):!1},cy}var py,R0;function cm(){if(R0)return py;R0=1;var g=qt(),m=$s(),v=Ub(),S=sm(),T=Vb(),E=Yu(),a=lm(),_=Wb();return py=function(k){if(!T(k))throw new g("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");var z=k["[[Object]]"],O=k["[[CachedBufferByteLength]]"];if(m(E(z))&&O!=="DETACHED")throw new g("Assertion failed: typed array is detached only if the byte length is ~DETACHED~");if(O==="DETACHED")return!0;var F=a(z),W=v(E(z)),ue,ye=W?_(z):"AUTO";if(ye==="AUTO")ue=O;else{var ge=S(z);ue=F+ye*ge}return F>O||ue>O},py}var hy,z0;function $S(){if(z0)return hy;z0=1;var g=qt(),m=am(),v=Ub(),S=cm(),T=sm(),E=Vb(),a=Yu(),_=lm(),w=Wb();return hy=function(z){if(!E(z))throw new g("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");if(S(z))throw new g("Assertion failed: `taRecord` is out of bounds");var O=z["[[Object]]"],F=v(a(O)),W=F?w(O):"AUTO";if(W!=="AUTO")return W;if(F)throw new g("Assertion failed: array buffer is not fixed length");var ue=_(O),ye=T(O),ge=z["[[CachedBufferByteLength]]"];if(ge==="DETACHED")throw new g("Assertion failed: typed array is detached");return m((ge-ue)/ye)},hy}var fy,L0;function ZS(){if(L0)return fy;L0=1;var g=qt(),m=$s(),v=Gs(),S=Ju(),T=xb(),E=mr(),a=E("SharedArrayBuffer.prototype.byteLength",!0);return fy=function(w,k){var z=S(w);if(!v(w)&&!z)throw new g("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(k!=="SEQ-CST"&&k!=="UNORDERED")throw new g("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if(m(w))throw new g("Assertion failed: `arrayBuffer` must not be detached");return z?a(w):T(w)},fy}var dy,D0;function WS(){if(D0)return dy;D0=1;var g=qt(),m=ZS(),v=$s(),S=Ws(),T=Yu();return dy=function(a,_){if(!S(a))throw new g("Assertion failed: `obj` must be a Typed Array");if(_!=="SEQ-CST"&&_!=="UNORDERED")throw new g("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");var w=T(a),k=v(w)?"DETACHED":m(w,_);return{"[[Object]]":a,"[[CachedBufferByteLength]]":k}},dy}var yy,O0;function Xb(){if(O0)return yy;O0=1;var g=qt(),m=ca(),v=cm(),S=WS(),T=Ws();return yy=function(a,_){if(_!=="SEQ-CST"&&_!=="UNORDERED")throw new g("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if(!m(a))throw new g("Assertion failed: `O` must be an Object");
500if(!T(a))throw new g("Assertion failed: `O` must be a Typed Array");var w=S(a,_);if(v(w))throw new g("`O` must be in-bounds and backed by a non-detached buffer");return w},yy}var my,B0;function XS(){if(B0)return my;B0=1;var g=Ui(),m=qt(),v=om(),S=qb(),T=cm(),E=$S(),a=Xb(),_=Wu()();return my=function(k,z){if(!S(k))throw new m("Assertion failed: `constructor` must be a constructor");if(!v(z))throw new m("Assertion failed: `argumentList` must be a List");if(_.length===0)throw new g("Assertion failed: Typed Arrays are not supported in this environment");var O;z.length===0?O=new k:z.length===1?O=new k(z[0]):z.length===2?O=new k(z[0],z[1]):O=new k(z[0],z[1],z[2]);var F=a(O,"SEQ-CST");if(z.length===1&&typeof z[0]=="number"){if(T(F))throw new m("new Typed Array is out of bounds");var W=E(F);if(W<z[0])throw new m("`argumentList[0]` must be <= `newTypedArray.length`")}return O},my}var vy,F0;function HS(){if(F0)return vy;F0=1;var g=Ur(),m={__proto__:null,$Int8Array:g("%Int8Array%",!0),$Uint8Array:g("%Uint8Array%",!0),$Uint8ClampedArray:g("%Uint8ClampedArray%",!0),$Int16Array:g("%Int16Array%",!0),$Uint16Array:g("%Uint16Array%",!0),$Int32Array:g("%Int32Array%",!0),$Uint32Array:g("%Uint32Array%",!0),$BigInt64Array:g("%BigInt64Array%",!0),$BigUint64Array:g("%BigUint64Array%",!0),$Float16Array:g("%Float16Array%",!0),$Float32Array:g("%Float32Array%",!0),$Float64Array:g("%Float64Array%",!0)};return vy=function(S){return m["$"+S]},vy}var gy,N0;function KS(){if(N0)return gy;N0=1;var g=Ui(),m=qt(),v=js(),S=Wu()(),T=om(),E=bS(),a=XS(),_=HS();return gy=function(k,z){if(S.length===0)throw new g("Assertion failed: Typed Arrays are not supported in this environment");var O=v(k);if(!O)throw new m("Assertion failed: exemplar must be a TypedArray");if(!T(z))throw new m("Assertion failed: `argumentList` must be a List");var F=_(O);if(typeof F!="function")throw new g("Assertion failed: `constructor` of `exemplar` ("+O+") must exist. Please report this!");var W=E(k,F);return a(W,z)},gy}var _y,q0;function Hb(){if(q0)return _y;q0=1;var g=qt(),m=E2(),v=D2(),S=$s(),T=Yy(),E=Qy(),a=O2(),_=cS(),w=pS(),k=Db(),z=sm(),O=hS(),F=KS(),W=Xb(),ue=Yu(),ye=lm();return _y=function(xe,ce){var $=this;W($,"SEQ-CST");var me=$.length,ze=w(xe),Fe;ze===-1/0?Fe=0:ze<0?Fe=T(me+ze,0):Fe=E(ze,me);var pe=typeof ce>"u"?me:w(ce),je;pe===-1/0?je=0:pe<0?je=T(me+pe,0):je=E(pe,me);var Re=T(je-Fe,0),it=F($,[Re]);if(Re>0){if(S(ue($)))throw new g("Cannot use a Typed Array with an underlying ArrayBuffer that is detached");var se=O($),rt=O(it);if(se===rt)for(var pt=ue($),nt=ue(it),Qt=z($),Xt=ye($),Rr=Fe*Qt+Xt,Wt=ye(it),zr=Wt+Re*Qt;Wt<zr;){var Ze=v(pt,Rr,"UINT8",!0,"UNORDERED");_(nt,Wt,"UINT8",Ze,!0,"UNORDERED"),Rr+=1,Wt+=1}else for(var lr=0;Fe<je;){var Ht=k(Fe),wt=m($,Ht);a(it,k(lr),wt,!0),Fe+=1,lr+=1}}return it},_y}var xy,U0;function Kb(){if(U0)return xy;U0=1;var g=Hb();return xy=function(){return typeof Uint8Array=="function"&&Uint8Array.prototype.slice||g},xy}var by,V0;function JS(){if(V0)return by;V0=1;var g=Ku(),m=Za(),v=Kb();return by=function(){if(typeof Uint8Array=="function"){var T=v(),E=m(Uint8Array.prototype);g(E,{slice:T},{slice:function(){return E.slice!==T}})}return T},by}var wy,j0;function YS(){if(j0)return wy;j0=1;var g=Ku(),m=la(),v=Hb(),S=Kb(),T=JS(),E=m(S());return g(E,{getPolyfill:S,implementation:v,shim:T}),wy=E,wy}var Sy,G0;function QS(){if(G0)return Sy;G0=1;var g=js(),m=YS(),v=qo();function S(pe){return Object.prototype.toString.call(pe)}function T(pe){return S(pe)==="[object Date]"}function E(pe){return S(pe)==="[object RegExp]"}function a(pe){return S(pe)==="[object Error]"}function _(pe){return S(pe)==="[object Boolean]"}function w(pe){return S(pe)==="[object Number]"}function k(pe){return S(pe)==="[object String]"}var z=Array.isArray||function(je){return Object.prototype.toString.call(je)==="[object Array]"};function O(pe,je){if(pe.forEach)return pe.forEach(je);for(var Re=0;Re<pe.length;Re++)je(pe[Re],Re,pe)}var F=Object.keys||function(je){var Re=[];for(var it in je)Re[Re.length]=it;return Re},W=Object.prototype.propertyIsEnumerable,ue=Object.getOwnPropertySymbols;function ye(pe){var je=F(pe);
500if(ue)for(var Re=ue(pe),it=0;it<Re.length;it++)W.call(pe,Re[it])&&(je[je.length]=Re[it]);return je}var ge=Object.prototype.hasOwnProperty||function(pe,je){return je in pe};function xe(pe,je){if(typeof v!="function")return!0;var Re=v(pe,je);return!Re||!Re.writable}function ce(pe,je){if(typeof pe=="object"&&pe!==null){var Re;if(z(pe))Re=[];else if(T(pe))Re=new Date(pe.getTime?pe.getTime():pe);else if(E(pe))Re=new RegExp(pe);else if(a(pe))Re={message:pe.message};else if(_(pe)||w(pe)||k(pe))Re=Object(pe);else{var it=g(pe);if(it)return m(pe);if(Object.create&&Object.getPrototypeOf)Re=Object.create(Object.getPrototypeOf(pe));else if(pe.constructor===Object)Re={};else{var se=pe.constructor&&pe.constructor.prototype||pe.__proto__||{},rt=function(){};rt.prototype=se,Re=new rt}}var pt=je.includeSymbols?ye:F;return O(pt(pe),function(nt){Re[nt]=pe[nt]}),Re}return pe}var $={__proto__:null};function me(pe,je){var Re=[],it=[],se=!0,rt=arguments.length>2?arguments[2]:$,pt=rt.includeSymbols?ye:F,nt=!!rt.immutable;return(function Qt(Xt){var Rr=nt?ce(Xt,rt):Xt,Wt={__proto__:null},zr=!0,Ze={node:Rr,node_:Xt,path:[].concat(Re),parent:it[it.length-1],parents:it,key:Re[Re.length-1],removedKeys:{__proto__:null},isRoot:Re.length===0,level:Re.length,circular:null,update:function(wt,wr){Ze.isRoot||(Ze.parent.node[Ze.key]=wt),Ze.node=wt,wr&&(zr=!1)},delete:function(wt){delete Ze.parent.node[Ze.key],Ze.parent.removedKeys[Ze.key]=!0,wt&&(zr=!1)},remove:function(wt){z(Ze.parent.node)?(Ze.parent.node.splice(Ze.key,1),Ze.parent.removedKeys[Ze.key]=!0,wt&&(zr=!1)):Ze.delete(wt)},keys:null,before:function(wt){Wt.before=wt},after:function(wt){Wt.after=wt},pre:function(wt){Wt.pre=wt},post:function(wt){Wt.post=wt},stop:function(){se=!1},block:function(){zr=!1}};if(!se)return Ze;function lr(){if(typeof Ze.node=="object"&&Ze.node!==null){(!Ze.keys||Ze.node_!==Ze.node)&&(Ze.keys=pt(Ze.node)),Ze.isLeaf=Ze.keys.length===0;for(var wt=0;wt<it.length;wt++)if(it[wt].node_===Xt){Ze.circular=it[wt];break}}else Ze.isLeaf=!0,Ze.keys=null;Ze.notLeaf=!Ze.isLeaf,Ze.notRoot=!Ze.isRoot}lr();var Ht=je.call(Ze,Ze.node);return Ht!==void 0&&Ze.update&&Ze.update(Ht),Wt.before&&Wt.before.call(Ze,Ze.node),zr&&(typeof Ze.node=="object"&&Ze.node!==null&&!Ze.circular&&(it[it.length]=Ze,lr(),O(Ze.keys,function(wt,wr){var Jr=wr-1 in Ze.removedKeys;Jr&&(wt=Ze.keys[wr-1]),Re[Re.length]=wt,Wt.pre&&Wt.pre.call(Ze,Ze.node[wt],wt);var dr=Qt(Ze.node[wt]);nt&&ge.call(Ze.node,wt)&&!xe(Ze.node,wt)&&!Jr&&(Ze.node[wt]=dr.node),dr.isLast=wr===Ze.keys.length-1,dr.isFirst=wr===0,Wt.post&&Wt.post.call(Ze,dr),Re.pop()}),it.pop()),Wt.after&&Wt.after.call(Ze,Ze.node)),Ze})(pe).node}function ze(pe){this.options=arguments.length>1?arguments[1]:$,this.value=pe}ze.prototype.get=function(pe){for(var je=this.value,Re=0;je&&Re<pe.length;Re++){var it=pe[Re];if(!ge.call(je,it)||!this.options.includeSymbols&&typeof it=="symbol")return;je=je[it]}return je},ze.prototype.has=function(pe){var je=this.value;if(!je&&pe.length>0)return!1;for(var Re=0;je&&Re<pe.length;Re++){var it=pe[Re];if(!ge.call(je,it)||!this.options.includeSymbols&&typeof it=="symbol")return!1;je=je[it]}return!0},ze.prototype.set=function(pe,je){for(var Re=this.value,it=0;it<pe.length-1;it++){var se=pe[it];ge.call(Re,se)||(Re[se]={}),Re=Re[se]}return Re[pe[it]]=je,je},ze.prototype.map=function(pe){return me(this.value,pe,{__proto__:null,immutable:!0,includeSymbols:!!this.options.includeSymbols})},ze.prototype.forEach=function(pe){return this.value=me(this.value,pe,this.options),this.value},ze.prototype.reduce=function(pe,je){var Re=arguments.length===1,it=Re?this.value:je;return this.forEach(function(se){(!this.isRoot||!Re)&&(it=pe.call(this,it,se))}),it},ze.prototype.paths=function(){var pe=[];return this.forEach(function(){pe[pe.length]=this.path}),pe},ze.prototype.nodes=function(){var pe=[];return this.forEach(function(){pe[pe.length]=this.node}),pe},ze.prototype.clone=function(){var pe=[],je=[],Re=this.options;return g(this.value)?m(this.value):(function it(se){for(var rt=0;rt<pe.length;rt++)if(pe[rt]===se)return je[rt];if(typeof se=="object"&&se!==null){var pt=ce(se,Re);pe[pe.length]=se,je[je.length]=pt;var nt=Re.includeSymbols?ye:F;return O(nt(se),function(Qt){pt[Qt]=it(se[Qt])}),pe.pop(),je.pop(),pt}return se})(this.value)};function Fe(pe){var je=arguments.length>1?arguments[1]:$;return new ze(pe,je)}return O(ye(ze.prototype),function(pe){Fe[pe]=function(je){var Re=[].slice.call(arguments,1
500),it=new ze(je);return it[pe].apply(it,Re)}}),Sy=Fe,Sy}var Ty,$0;function eT(){if($0)return Ty;$0=1,Ty=g;function g(m){if(!(this instanceof g))return new g(m);this._bbox=m||[1/0,1/0,-1/0,-1/0],this._valid=!!m}return g.prototype.include=function(m){return this._valid=!0,this._bbox[0]=Math.min(this._bbox[0],m[0]),this._bbox[1]=Math.min(this._bbox[1],m[1]),this._bbox[2]=Math.max(this._bbox[2],m[0]),this._bbox[3]=Math.max(this._bbox[3],m[1]),this},g.prototype.equals=function(m){var v;return m instanceof g?v=m.bbox():v=m,this._bbox[0]==v[0]&&this._bbox[1]==v[1]&&this._bbox[2]==v[2]&&this._bbox[3]==v[3]},g.prototype.center=function(m){return this._valid?[(this._bbox[0]+this._bbox[2])/2,(this._bbox[1]+this._bbox[3])/2]:null},g.prototype.union=function(m){this._valid=!0;var v;return m instanceof g?v=m.bbox():v=m,this._bbox[0]=Math.min(this._bbox[0],v[0]),this._bbox[1]=Math.min(this._bbox[1],v[1]),this._bbox[2]=Math.max(this._bbox[2],v[2]),this._bbox[3]=Math.max(this._bbox[3],v[3]),this},g.prototype.bbox=function(){return this._valid?this._bbox:null},g.prototype.contains=function(m){if(!m)return this._fastContains();if(!this._valid)return null;var v=m[0],S=m[1];return this._bbox[0]<=v&&this._bbox[1]<=S&&this._bbox[2]>=v&&this._bbox[3]>=S},g.prototype.intersect=function(m){if(!this._valid)return null;var v;return m instanceof g?v=m.bbox():v=m,!(this._bbox[0]>v[2]||this._bbox[2]<v[0]||this._bbox[3]<v[1]||this._bbox[1]>v[3])},g.prototype._fastContains=function(){if(!this._valid)return new Function("return null;");var m="return "+this._bbox[0]+"<= ll[0] &&"+this._bbox[1]+"<= ll[1] &&"+this._bbox[2]+">= ll[0] &&"+this._bbox[3]+">= ll[1]";return new Function("ll",m)},g.prototype.polygon=function(){return this._valid?{type:"Polygon",coordinates:[[[this._bbox[0],this._bbox[1]],[this._bbox[2],this._bbox[1]],[this._bbox[2],this._bbox[3]],[this._bbox[0],this._bbox[3]],[this._bbox[0],this._bbox[1]]]]}:null},Ty}var Z0;function tT(){if(Z0)return Zu.exports;Z0=1;var g=c2(),m=QS(),v=eT(),S={features:["FeatureCollection"],coordinates:["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],geometry:["Feature"],geometries:["GeometryCollection"]},T=Object.keys(S);Zu.exports=function(a){return E(a).bbox()},Zu.exports.polygon=function(a){return E(a).polygon()},Zu.exports.bboxify=function(a){return m(a).map(function(_){if(_){var w=T.some(function(k){return _[k]?S[k].indexOf(_.type)!==-1:!1});w&&(_.bbox=E(_).bbox(),this.update(_))}})};function E(a){for(var _=v(),w=g(a),k=0;k<w.length;k++)_.include(w[k]);return _}return Zu.exports}var Iy,W0;function Jb(){if(W0)return Iy;W0=1;const g=tT(),m=qr(),{LAT_MIN:v,LAT_MAX:S,LAT_RENDERED_MIN:T,LAT_RENDERED_MAX:E,LNG_MIN:a,LNG_MAX:_}=m;return Iy=function(w,k){let z=v,O=S,F=v,W=S,ue=_,ye=a;w.forEach(xe=>{const ce=g(xe),$=ce[1],me=ce[3],ze=ce[0],Fe=ce[2];$>z&&(z=$),me<O&&(O=me),me>F&&(F=me),$<W&&(W=$),ze<ue&&(ue=ze),Fe>ye&&(ye=Fe)});const ge=k;return z+ge.lat>E&&(ge.lat=E-z),F+ge.lat>S&&(ge.lat=S-F),O+ge.lat<T&&(ge.lat=T-O),W+ge.lat<v&&(ge.lat=v-W),ue+ge.lng<=a&&(ge.lng+=Math.ceil(Math.abs(ge.lng)/360)*360),ye+ge.lng>=_&&(ge.lng-=Math.ceil(Math.abs(ge.lng)/360)*360),ge},Iy}var Ey,X0;function Yb(){if(X0)return Ey;X0=1;const g=Jb(),m=qr();return Ey=function(v,S){const T=g(v.map(E=>E.toGeoJSON()),S);v.forEach(E=>{const a=E.getCoordinates(),_=O=>{const F={lng:O[0]+T.lng,lat:O[1]+T.lat};return[F.lng,F.lat]},w=O=>O.map(F=>_(F)),k=O=>O.map(F=>w(F));let z;E.type===m.geojsonTypes.POINT?z=_(a):E.type===m.geojsonTypes.LINE_STRING||E.type===m.geojsonTypes.MULTI_POINT?z=a.map(_):E.type===m.geojsonTypes.POLYGON||E.type===m.geojsonTypes.MULTI_LINE_STRING?z=a.map(w):E.type===m.geojsonTypes.MULTI_POLYGON&&(z=a.map(k)),E.incomingCoords(z)})},Ey}var Ay,H0;function rT(){if(H0)return Ay;H0=1;const g=Vs(),m=a2(),v=hb(),S=gc(),T=bc(),E=Yb(),a=qr(),_={};return _.onSetup=function(w){const k={dragMoveLocation:null,boxSelectStartLocation:null,boxSelectElement:void 0,boxSelecting:!1,canBoxSelect:!1,dragMoveing:!1,canDragMove:!1,initiallySelectedFeatureIds:w.featureIds||[]};return this.setSelected(k.initiallySelectedFeatureIds.filter(z=>this.getFeature(z)!==void 0)),this.fireActionable(),this.setActionableState({combineFeatures:!0,uncombineFeatures:!0,trash:!0}),k},_.fireUpdate=function(){this.map.fire(a.events.UPDATE,{action:a.updateActions.MOVE,features:this.getSelected().map(w=>w.toGeoJSON())})},_.fireActionable=function(){const w=this.getSelected(),k=w.filter(W=>this.isInstanceOf("MultiFeature",W));let z=!1;if(w.length>1){z=!0;const W=w[0].type.replace("Multi","");
500w.forEach(ue=>{ue.type.replace("Multi","")!==W&&(z=!1)})}const O=k.length>0,F=w.length>0;this.setActionableState({combineFeatures:z,uncombineFeatures:O,trash:F})},_.getUniqueIds=function(w){return w.length?w.map(z=>z.properties.id).filter(z=>z!==void 0).reduce((z,O)=>(z.add(O),z),new S).values():[]},_.stopExtendedInteractions=function(w){w.boxSelectElement&&(w.boxSelectElement.parentNode&&w.boxSelectElement.parentNode.removeChild(w.boxSelectElement),w.boxSelectElement=null),this.map.dragPan.enable(),w.boxSelecting=!1,w.canBoxSelect=!1,w.dragMoving=!1,w.canDragMove=!1},_.onStop=function(){T.enable(this)},_.onMouseMove=function(w){return this.stopExtendedInteractions(w)},_.onMouseOut=function(w){if(w.dragMoving)return this.fireUpdate()},_.onTap=_.onClick=function(w,k){if(g.noTarget(k))return this.clickAnywhere(w,k);if(g.isOfMetaType(a.meta.VERTEX)(k))return this.clickOnVertex(w,k);if(g.isFeature(k))return this.clickOnFeature(w,k)},_.clickAnywhere=function(w){const k=this.getSelectedIds();k.length&&(this.clearSelectedFeatures(),k.forEach(z=>this.doRender(z))),T.enable(this),this.stopExtendedInteractions(w)},_.clickOnVertex=function(w,k){this.changeMode(a.modes.DIRECT_SELECT,{featureId:k.featureTarget.properties.parent,coordPath:k.featureTarget.properties.coord_path,startPos:k.lngLat}),this.updateUIClasses({mouse:a.cursors.MOVE})},_.startOnActiveFeature=function(w,k){this.stopExtendedInteractions(w),this.map.dragPan.disable(),this.doRender(k.featureTarget.properties.id),w.canDragMove=!0,w.dragMoveLocation=k.lngLat},_.clickOnFeature=function(w,k){T.disable(this),this.stopExtendedInteractions(w);const z=g.isShiftDown(k),O=this.getSelectedIds(),F=k.featureTarget.properties.id,W=this.isSelected(F);if(!z&&W&&this.getFeature(F).type!==a.geojsonTypes.POINT)return this.changeMode(a.modes.DIRECT_SELECT,{featureId:F});W&&z?(this.deselect(F),this.updateUIClasses({mouse:a.cursors.POINTER}),O.length===1&&T.enable(this)):!W&&z?(this.select(F),this.updateUIClasses({mouse:a.cursors.MOVE})):!W&&!z&&(O.forEach(ue=>this.doRender(ue)),this.setSelected(F),this.updateUIClasses({mouse:a.cursors.MOVE})),this.doRender(F)}
500,_.onMouseDown=function(w,k){if(g.isActiveFeature(k))return this.startOnActiveFeature(w,k);if(this.drawConfig.boxSelect&&g.isShiftMousedown(k))return this.startBoxSelect(w,k)},_.startBoxSelect=function(w,k){this.stopExtendedInteractions(w),this.map.dragPan.disable(),w.boxSelectStartLocation=m(k.originalEvent,this.map.getContainer()),w.canBoxSelect=!0},_.onTouchStart=function(w,k){if(g.isActiveFeature(k))return this.startOnActiveFeature(w,k)},_.onDrag=function(w,k){if(w.canDragMove)return this.dragMove(w,k);if(this.drawConfig.boxSelect&&w.canBoxSelect)return this.whileBoxSelect(w,k)},_.whileBoxSelect=function(w,k){w.boxSelecting=!0,this.updateUIClasses({mouse:a.cursors.ADD}),w.boxSelectElement||(w.boxSelectElement=document.createElement("div"),w.boxSelectElement.classList.add(a.classes.BOX_SELECT),this.map.getContainer().appendChild(w.boxSelectElement));const z=m(k.originalEvent,this.map.getContainer()),O=Math.min(w.boxSelectStartLocation.x,z.x),F=Math.max(w.boxSelectStartLocation.x,z.x),W=Math.min(w.boxSelectStartLocation.y,z.y),ue=Math.max(w.boxSelectStartLocation.y,z.y),ye=`translate(${O}px, ${W}px)`;w.boxSelectElement.style.transform=ye,w.boxSelectElement.style.WebkitTransform=ye,w.boxSelectElement.style.width=`${F-O}px`,w.boxSelectElement.style.height=`${ue-W}px`},_.dragMove=function(w,k){w.dragMoving=!0,k.originalEvent.stopPropagation();const z={lng:k.lngLat.lng-w.dragMoveLocation.lng,lat:k.lngLat.lat-w.dragMoveLocation.lat};E(this.getSelected(),z),w.dragMoveLocation=k.lngLat},_.onMouseUp=function(w,k){if(w.dragMoving)this.fireUpdate();else if(w.boxSelecting){const z=[w.boxSelectStartLocation,m(k.originalEvent,this.map.getContainer())],O=this.featuresAt(null,z,"click"),F=this.getUniqueIds(O).filter(W=>!this.isSelected(W));F.length&&(this.select(F),F.forEach(W=>this.doRender(W)),this.updateUIClasses({mouse:a.cursors.MOVE}))}this.stopExtendedInteractions(w)},_.toDisplayFeatures=function(w,k,z){k.properties.active=this.isSelected(k.properties.id)?a.activeStates.ACTIVE:a.activeStates.INACTIVE,z(k),this.fireActionable(),!(k.properties.active!==a.activeStates.ACTIVE||k.geometry.type===a.geojsonTypes.POINT)&&v(k).forEac
500h(z)},_.onTrash=function(){this.deleteFeature(this.getSelectedIds()),this.fireActionable()},_.onCombineFeatures=function(){const w=this.getSelected();if(w.length===0||w.length<2)return;const k=[],z=[],O=w[0].type.replace("Multi","");for(let F=0;F<w.length;F++){const W=w[F];if(W.type.replace("Multi","")!==O)return;W.type.includes("Multi")?W.getCoordinates().forEach(ue=>{k.push(ue)}):k.push(W.getCoordinates()),z.push(W.toGeoJSON())}if(z.length>1){const F=this.newFeature({type:a.geojsonTypes.FEATURE,properties:z[0].properties,geometry:{type:`Multi${O}`,coordinates:k}});this.addFeature(F),this.deleteFeature(this.getSelectedIds(),{silent:!0}),this.setSelected([F.id]),this.map.fire(a.events.COMBINE_FEATURES,{createdFeatures:[F.toGeoJSON()],deletedFeatures:z})}this.fireActionable()},_.onUncombineFeatures=function(){const w=this.getSelected();if(w.length===0)return;const k=[],z=[];for(let O=0;O<w.length;O++){const F=w[O];this.isInstanceOf("MultiFeature",F)&&(F.getFeatures().forEach(W=>{this.addFeature(W),W.properties=F.properties,k.push(W.toGeoJSON()),this.select([W.id])}),this.deleteFeature(F.id,{silent:!0}),z.push(F.toGeoJSON()))}k.length>1&&this.map.fire(a.events.UNCOMBINE_FEATURES,{createdFeatures:k,deletedFeatures:z}),this.fireActionable()},Ay=_,Ay}var Cy,K0;function nT(){if(K0)return Cy;K0=1;const{noTarget:g,isOfMetaType:m,isInactiveFeature:v,isShiftDown:S}=Vs(),T=hb(),E=Jb(),a=bc(),_=qr(),w=Vs(),k=Yb(),z=m(_.meta.VERTEX),O=m(_.meta.MIDPOINT),F={};return F.fireUpdate=function(){this.map.fire(_.events.UPDATE,{action:_.updateActions.CHANGE_COORDINATES,features:this.getSelected().map(W=>W.toGeoJSON())})},F.fireActionable=function(W){this.setActionableState({combineFeatures:!1,uncombineFeatures:!1,trash:W.selectedCoordPaths.length>0})},F.startDragging=function(W,ue){this.map.dragPan.disable(),W.canDragMove=!0,W.dragMoveLocation=ue.lngLat},F.stopDragging=function(W){this.map.dragPan.enable(),W.dragMoving=!1,W.canDragMove=!1,W.dragMoveLocation=null},F.onVertex=function(W,ue){this.startDragging(W,ue);const ye=ue.featureTarget.properties,ge=W.selectedCoordPaths.indexOf(ye.coord_path);!S(ue)&&ge===-1?W.selectedCoordPaths=[ye.coord_path]:S(ue)&&ge===-1&&W.selectedCoordPaths.push(ye.coord_path);const xe=this.pathsToCoordinates(W.featureId,W.selectedCoordPaths);this.setSelectedCoordinates(xe)},F.onMidpoint=function(W,ue){this.startDragging(W,ue);const ye=ue.featureTarget.properties;W.feature.addCoordinate(ye.coord_path,ye.lng,ye.lat),this.fireUpdate(),W.selectedCoordPaths=[ye.coord_path]},F.pathsToCoordinates=function(W,ue){return ue.map(ye=>({feature_id:W,coord_path:ye}))},F.onFeature=function(W,ue){W.selectedCoordPaths.length===0?this.startDragging(W,ue):this.stopDragging(W)},F.dragFeature=function(W,ue,ye){k(this.getSelected(),ye),W.dragMoveLocation=ue.lngLat},F.dragVertex=function(W,ue,ye){const ge=W.selectedCoordPaths.map($=>W.feature.getCoordinate($)),xe=ge.map($=>({type:_.geojsonTypes.FEATURE,properties:{},geometry:{type:_.geojsonTypes.POINT,coordinates:$}})),ce=E(xe,ye);for(let $=0;$<ge.length;$++){const me=ge[$];W.feature.updateCoordinate(W.selectedCoordPaths[$],me[0]+ce.lng,me[1]+ce.lat)}},F.clickNoTarget=function(){this.changeMode(_.modes.SIMPLE_SELECT)},F.clickInactive=function(){this.changeMode(_.modes.SIMPLE_SELECT)},F.clickActiveFeature=function(W){W.selectedCoordPaths=[],this.clearSelectedCoordinates(),W.feature.changed()},F.onSetup=function(W){const ue=W.featureId,ye=this.getFeature(ue);if(!ye)throw new Error("You must provide a featureId to enter direct_select mode");if(ye.type===_.geojsonTypes.POINT)throw new TypeError("direct_select mode doesn't handle point features");const ge={featureId:ue,feature:ye,dragMoveLocation:W.startPos||null,dragMoving:!1,canDragMove:!1,selectedCoordPaths:W.coordPath?[W.coordPath]:[]};return this.setSelectedCoordinates(this.pathsToCoordinates(ue,ge.selectedCoordPaths)),this.setSelected(ue),a.disable(this),this.setActionableState({trash:!0}),ge},F.onStop=function(){a.enable(this),this.clearSelectedCoordinates()},F.toDisplayFeatures=function(W,ue,ye){W.featureId===ue.properties.id?(ue.properties.active=_.activeStates.ACTIVE,ye(ue),T(ue,{map:this.map,midpoints:!0,selectedPaths:W.selectedCoordPaths}
500).forEach(ye)):(ue.properties.active=_.activeStates.INACTIVE,ye(ue)),this.fireActionable(W)},F.onTrash=function(W){W.selectedCoordPaths.sort().reverse().forEach(ue=>W.feature.removeCoordinate(ue)),this.fireUpdate(),W.selectedCoordPaths=[],this.clearSelectedCoordinates(),this.fireActionable(W),W.feature.isValid()===!1&&(this.deleteFeature([W.featureId]),this.changeMode(_.modes.SIMPLE_SELECT,{}))},F.onMouseMove=function(W,ue){const ye=w.isActiveFeature(ue),ge=z(ue),xe=W.selectedCoordPaths.length===0;ye&&xe?this.updateUIClasses({mouse:_.cursors.MOVE}):ge&&!xe?this.updateUIClasses({mouse:_.cursors.MOVE}):this.updateUIClasses({mouse:_.cursors.NONE}),this.stopDragging(W)},F.onMouseOut=function(W){W.dragMoving&&this.fireUpdate()},F.onTouchStart=F.onMouseDown=function(W,ue){if(z(ue))return this.onVertex(W,ue);if(w.isActiveFeature(ue))return this.onFeature(W,ue);if(O(ue))return this.onMidpoint(W,ue)},F.onDrag=function(W,ue){if(W.canDragMove!==!0)return;W.dragMoving=!0,ue.originalEvent.stopPropagation();const ye={lng:ue.lngLat.lng-W.dragMoveLocation.lng,lat:ue.lngLat.lat-W.dragMoveLocation.lat};W.selectedCoordPaths.length>0?this.dragVertex(W,ue,ye):this.dragFeature(W,ue,ye),W.dragMoveLocation=ue.lngLat},F.onClick=function(W,ue){if(g(ue))return this.clickNoTarget(W,ue);
500if(w.isActiveFeature(ue))return this.clickActiveFeature(W,ue);if(v(ue))return this.clickInactive(W,ue);this.stopDragging(W)},F.onTap=function(W,ue){if(g(ue))return this.clickNoTarget(W,ue);if(w.isActiveFeature(ue))return this.clickActiveFeature(W,ue);if(v(ue))return this.clickInactive(W,ue)},F.onTouchEnd=F.onMouseUp=function(W){W.dragMoving&&this.fireUpdate(),this.stopDragging(W)},Cy=F,Cy}var Py,J0;function iT(){if(J0)return Py;J0=1;const g=Vs(),m=qr(),v={};return v.onSetup=function(){const S=this.newFeature({type:m.geojsonTypes.FEATURE,properties:{},geometry:{type:m.geojsonTypes.POINT,coordinates:[]}});return this.addFeature(S),this.clearSelectedFeatures(),this.updateUIClasses({mouse:m.cursors.ADD}),this.activateUIButton(m.types.POINT),this.setActionableState({trash:!0}),{point:S}},v.stopDrawingAndRemove=function(S){this.deleteFeature([S.point.id],{silent:!0}),this.changeMode(m.modes.SIMPLE_SELECT)},v.onTap=v.onClick=function(S,T){this.updateUIClasses({mouse:m.cursors.MOVE}),S.point.updateCoordinate("",T.lngLat.lng,T.lngLat.lat),this.map.fire(m.events.CREATE,{features:[S.point.toGeoJSON()]}),this.changeMode(m.modes.SIMPLE_SELECT,{featureIds:[S.point.id]})},v.onStop=function(S){this.activateUIButton(),S.point.getCoordinate().length||this.deleteFeature([S.point.id],{silent:!0})},v.toDisplayFeatures=function(S,T,E){const a=T.properties.id===S.point.id;if(T.properties.active=a?m.activeStates.ACTIVE:m.activeStates.INACTIVE,!a)return E(T)},v.onTrash=v.stopDrawingAndRemove,v.onKeyUp=function(S,T){if(g.isEscapeKey(T)||g.isEnterKey(T))return this.stopDrawingAndRemove(S,T)},Py=v,Py}var My,Y0;function Qb(){if(Y0)return My;Y0=1;function g(m,v){return m.lngLat?m.lngLat.lng===v[0]&&m.lngLat.lat===v[1]:!1}return My=g,My}var ky,Q0;function oT(){if(Q0)return ky;Q0=1;const g=Vs(),m=bc(),v=qr(),S=Qb(),T=Xy(),E={};return E.onSetup=function(){const a=this.newFeature({type:v.geojsonTypes.FEATURE,properties:{},geometry:{type:v.geojsonTypes.POLYGON,coordinates:[[]]}});return this.addFeature(a),this.clearSelectedFeatures(),m.disable(this),this.updateUIClasses({mouse:v.cursors.ADD}),this.activateUIButton(v.types.POLYGON),this.setActionableState({trash:!0}),{polygon:a,currentVertexPosition:0}},E.clickAnywhere=function(a,_){if(a.currentVertexPosition>0&&S(_,a.polygon.coordinates[0][a.currentVertexPosition-1]))return this.changeMode(v.modes.SIMPLE_SELECT,{featureIds:[a.polygon.id]});this.updateUIClasses({mouse:v.cursors.ADD}),a.polygon.updateCoordinate(`0.${a.currentVertexPosition}`,_.lngLat.lng,_.lngLat.lat),a.currentVertexPosition++,a.polygon.updateCoordinate(`0.${a.currentVertexPosition}`,_.lngLat.lng,_.lngLat.lat)},E.clickOnVertex=function(a){return this.changeMode(v.modes.SIMPLE_SELECT,{featureIds:[a.polygon.id]})},E.onMouseMove=function(a,_){a.polygon.updateCoordinate(`0.${a.currentVertexPosition}`,_.lngLat.lng,_.lngLat.lat),g.isVertex(_)&&this.updateUIClasses({mouse:v.cursors.POINTER})},E.onTap=E.onClick=function(a,_){return g.isVertex(_)?this.clickOnVertex(a,_):this.clickAnywhere(a,_)},E.onKeyUp=function(a,_){g.isEscapeKey(_)?(this.deleteFeature([a.polygon.id],{silent:!0}),this.changeMode(v.modes.SIMPLE_SELECT)):g.isEnterKey(_)&&this.changeMode(v.modes.SIMPLE_SELECT,{featureIds:[a.polygon.id]})},E.onStop=function(a){this.updateUIClasses({mouse:v.cursors.NONE}),m.enable(this),this.activateUIButton(),this.getFeature(a.polygon.id)!==void 0&&(a.pol
500ygon.removeCoordinate(`0.${a.currentVertexPosition}`),a.polygon.isValid()?this.map.fire(v.events.CREATE,{features:[a.polygon.toGeoJSON()]}):(this.deleteFeature([a.polygon.id],{silent:!0}),this.changeMode(v.modes.SIMPLE_SELECT,{},{silent:!0})))},E.toDisplayFeatures=function(a,_,w){const k=_.properties.id===a.polygon.id;if(_.properties.active=k?v.activeStates.ACTIVE:v.activeStates.INACTIVE,!k)return w(_);if(_.geometry.coordinates.length===0)return;const z=_.geometry.coordinates[0].length;if(!(z<3)){if(_.properties.meta=v.meta.FEATURE,w(T(a.polygon.id,_.geometry.coordinates[0][0],"0.0",!1)),z>3){const O=_.geometry.coordinates[0].length-3;w(T(a.polygon.id,_.geometry.coordinates[0][O],`0.${O}`,!1))}if(z<=4){const O=[[_.geometry.coordinates[0][0][0],_.geometry.coordinates[0][0][1]],[_.geometry.coordinates[0][1][0],_.geometry.coordinates[0][1][1]]];if(w({type:v.geojsonTypes.FEATURE,properties:_.properties,geometry:{coordinates:O,type:v.geojsonTypes.LINE_STRING}}),z===3)return}return w(_)}},E.onTrash=function(a){this.deleteFeature([a.polygon.id],{silent:!0}),this.changeMode(v.modes.SIMPLE_SELECT)},ky=E,ky}var Ry,eb;function aT(){if(eb)return Ry;eb=1;const g=Vs(),m=Qb(),v=bc(),S=qr(),T=Xy(),E={};return E.onSetup=function(a){a=a||{};const _=a.featureId;let w,k,z="forward";if(_){if(w=this.getFeature(_),!w)throw new Error("Could not find a feature with the provided featureId");let O=a.from;if(O&&O.type==="Feature"&&O.geometry&&O.geometry.type==="Point"&&(O=O.geometry),O&&O.type==="Point"&&O.coordinates&&O.coordinates.length===2&&(O=O.coordinates),!O||!Array.isArray(O))throw new Error("Please use the `from` property to indicate which point to continue the line from");const F=w.coordinates.length-1;if(w.coordinates[F][0]===O[0]&&w.coordinates[F][1]===O[1])k=F+1,w.addCoordinate(k,...w.coordinates[F]);else if(w.coordinates[0][0]===O[0]&&w.coordinates[0][1]===O[1])z="backwards",k=0,w.addCoordinate(k,...w.coordinates[0]);else throw new Error("`from` should match the point at either the start or the end of the provided LineString")}else w=this.newFeature({type:S.geojsonTypes.FEATURE,properties:{},geometry:{type:S.geojsonTypes.LINE_STRING,coordinates:[]}}),k=0,this.addFeature(w);return this.clearSelectedFeatures(),v.disable(this),this.updateUIClasses({mouse:S.cursors.ADD}),this.activateUIButton(S.types.LINE),this.setActionableState({trash:!0}),{line:w,currentVertexPosition:k,direction:z}},E.clickAnywhere=function(a,_){if(a.currentVertexPosition>0&&m(_,a.line.coordinates[a.currentVertexPosition-1])||a.direction==="backwards"&&m(_,a.line.coordinates[a.currentVertexPosition+1]))return this.changeMode(S.modes.SIMPLE_SELECT,{featureIds:[a.line.id]});this.updateUIClasses({mouse:S.cursors.ADD}),a.line.updateCoordinate(a.currentVertexPosition,_.lngLat.lng,_.lngLat.lat),a.direction==="forward"?(a.currentVertexPosition++,a.line.updateCoordinate(a.currentVertexPosition,_.lngLat.lng,_.lngLat.lat)):a.line.addCoordinate(0,_.lngLat.lng,_.lngLat.lat)},E.clickOnVertex=function(a){return this.changeMode(S.modes.SIMPLE_SELECT,{featureIds:[a.line.id]})},E.onMouseMove=function(a,_){a.line.updateCoordinate(a.currentVertexPosition,_.lngLat.lng,_.lngLat.lat),g.isVertex(_)&&this.updateUIClasses({mouse:S.cursors.POINTER})},E.onTap=E.onClick=function(a,_){if(g.isVertex(_))return this.clickOnVertex(a,_);this.clickAnywhere(a,_)},E.onKeyUp=function(a,_){g.isEnterKey(_)?this.changeMode(S.modes.SIMPLE_SELECT,{featureIds:[a.line.id]}):g.isEscapeKey(_)&&(this.deleteFeature([a.line.id],{silent:!0}),this.changeMode(S.modes.SIMPLE_SELECT))},E.onStop=function(a){v.enable(this),this.activateUIButton(),this.getFeature(a.line.id)!==void 0&&(a.line.removeCoordinate(`${a.currentVertexPosition}`),a.line.isValid()?this.map.fire(S.events.CREATE,{features:[a.line.toGeoJSON()]}):(this.deleteFeature([a.line.id],{silent:!0}),this.changeMode(S.modes.SIMPLE_SELECT,{},{silent:!0})))},E.onTrash=function(a){this.deleteFeature([a.line.id],{silent:!0}),this.changeMode(S.modes.SIMPLE_SELECT)},E.toDisplayFeatures=function(a,_,w){const k=_.properties.id===a.line.id;if(_.properties.active=k?S.activeStates.ACTIVE:S.activeStates.INACTIVE,!k)return w(_);_.geometry.coordinates.length<2||(_.properties.meta=S.meta.FEATURE,w(T(a.line.id,_.geometry.coordinates[a.direction==="forward"?_.geometry.coordinates.length-2:1],`${a.direction==="forward"?_.geometry.coordinates.length-2:1}`,!1)),w(_))},Ry=E,Ry}var zy,tb;function e1(){return tb||(tb=1,zy={simple_select:rT(),direct_select:nT(),draw_point:iT(),draw_polygon:oT(),draw_line_string:aT()}),zy}var Ly,rb;
500function sT(){if(rb)return Ly;rb=1;const g=Wy(),m=qr(),v={defaultMode:m.modes.SIMPLE_SELECT,keybindings:!0,touchEnabled:!0,clickBuffer:2,touchBuffer:25,boxSelect:!0,displayControlsDefault:!0,styles:i2(),modes:e1(),controls:{},userProperties:!1},S={point:!0,line_string:!0,polygon:!0,trash:!0,combine_features:!0,uncombine_features:!0},T={point:!1,line_string:!1,polygon:!1,trash:!1,combine_features:!1,uncombine_features:!1};function E(a,_){return a.map(w=>w.source?w:g(w,{id:`${w.id}.${_}`,source:_==="hot"?m.sources.HOT:m.sources.COLD}))}return Ly=function(a={}){let _=g(a);return a.controls||(_.controls={}),a.displayControlsDefault===!1?_.controls=g(T,a.controls):_.controls=g(S,a.controls),_=g(v,_),_.styles=E(_.styles,"cold").concat(E(_.styles,"hot")),_},Ly}var Dy,nb;function uT(){return nb||(nb=1,Dy=function(g,m){return g.length!==m.length?!1:JSON.stringify(g.map(v=>v).sort())===JSON.stringify(m.map(v=>v).sort())}),Dy}var Oy={},yc={exports:{}},ib;function lT(){return ib||(ib=1,(function(g,m){var v=(function(){var S=function(xe,ce,$,me){for($=$||{},me=xe.length;me--;$[xe[me]]=ce);return $},T=[1,12],E=[1,13],a=[1,9],_=[1,10],w=[1,11],k=[1,14],z=[1,15],O=[14,18,22,24],F=[18,22],W=[22,24],ue={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(ce,$,me,ze,Fe,pe,je){var Re=pe.length-1;switch(Fe){case 1:this.$=ce.replace(/\\(\\|")/g,"$1").replace(/\\n
500/g,`
501`).replace(/\\r/g,"\r").replace(/\\t/g,"	").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(ce);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=pe[Re-1];case 13:this.$={},Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=pe[Re-1],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[pe[Re-2],pe[Re]];break;case 16:this.$={},this.$[pe[Re][0]]=pe[Re][1];break;case 17:this.$=pe[Re-2],pe[Re-2][pe[Re][0]]!==void 0&&(this.$.__duplicateProperties__||Object.defineProperty(this.$,"__duplicateProperties__",{value:[],enumerable:!1}),this.$.__duplicateProperties__.push(pe[Re][0])),pe[Re-2][pe[Re][0]]=pe[Re][1];break;case 18:this.$=[],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[pe[Re]];break;case 21:this.$=pe[Re-2],pe[Re-2].push(pe[Re]);break}},table:[{3:5,4:T,5:6,6:E,7:3,8:a,9:4,10:_,11:w,12:1,13:2,15:7,16:8,17:k,23:z},{1:[3]},{14:[1,16]},S(O,[2,7]),S(O,[2,8]),S(O,[2,9]),S(O,[2,10]),S(O,[2,11]),S(O,[2,12]),S(O,[2,3]),S(O,[2,4]),S(O,[2,5]),S([14,18,21,22,24],[2,1]),S(O,[2,2]),{3:20,4:T,18:[1,17],19:18,20:19},{3:5,4:T,5:6,6:E,7:3,8:a,9:4,10:_,11:w,13:23,15:7,16:8,17:k,23:z,24:[1,21],25:22},{1:[2,6]},S(O,[2,13]),{18:[1,24],22:[1,25]},S(F,[2,16]),{21:[1,26]},S(O,[2,18]),{22:[1,28],24:[1,27]},S(W,[2,20]),S(O,[2,14]),{3:20,4:T,20:29},{3:5,4:T,5:6,6:E,7:3,8:a,9:4,10:_,11:w,13:30,15:7,16:8,17:k,23:z},S(O,[2,19]),{3:5,4:T,5:6,6:E,7:3,8:a,9:4,10:_,11:w,13:31,15:7,16:8,17:k,23:z},S(F,[2,17]),S(F,[2,15]),S(W,[2,21])],defaultActions:{16:[2,6]},parseError:function(ce,$){if($.recoverable)this.trace(ce);else{let me=function(ze,Fe){this.message=ze,this.hash=Fe};throw me.prototype=Error,new me(ce,$)}},parse:function(ce){var $=this,me=[0],ze=[null],Fe=[],pe=this.table,je="",Re=0,it=0,se=2,rt=1,pt=Fe.slice.call(arguments,1),nt=Object.create(this.lexer),Qt={yy:{}};for(var Xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xt)&&(Qt.yy[Xt]=this.yy[Xt]);nt.setInput(ce,Qt.yy),Qt.yy.lexer=nt,Qt.yy.parser=this,typeof nt.yylloc>"u"&&(nt.yylloc={});var Rr=nt.yylloc;Fe.push(Rr);var Wt=nt.options&&nt.options.ranges;typeof Qt.yy.parseError=="function"?this.parseError=Qt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var zr=function(){var zt;return zt=nt.lex()||rt,typeof zt!="number"&&(zt=$.symbols_[zt]||zt),zt},Ze,lr,Ht,wt,wr={},Jr,dr,Sr,dn;;){if(lr=me[me.length-1],this.defaultActions[lr]?Ht=this.defaultActions[lr]:((Ze===null||typeof Ze>"u")&&(Ze=zr()),Ht=pe[lr]&&pe[lr][Ze]),typeof Ht>"u"||!Ht.length||!Ht[0]){var Tt="";dn=[];for(Jr in pe[lr])this.terminals_[Jr]&&Jr>se&&dn.push("'"+this.terminals_[Jr]+"'");nt.showPosition?Tt="Parse error on line "+(Re+1)+`:
502`+nt.showPosition()+`
503Expecting `+dn.join(", ")+", got '"+(this.terminals_[Ze]||Ze)+"'":Tt="Parse error on line "+(Re+1)+": Unexpected "+(Ze==rt?"end of input":"'"+(this.terminals_[Ze]||Ze)+"'"),this.parseError(Tt,{text:nt.match,token:this.terminals_[Ze]||Ze,line:nt.yylineno,loc:Rr,expected:dn})}if(Ht[0]instanceof Array&&Ht.length>1)throw new Error("Parse Error: multiple actions possible at state: "+lr+", token: "+Ze);switch(Ht[0]){case 1:me.push(Ze),ze.push(nt.yytext),Fe.push(nt.yylloc),me.push(Ht[1]),Ze=null,it=nt.yyleng,je=nt.yytext,Re=nt.yylineno,Rr=nt.yylloc;break;case 2:if(dr=this.productions_[Ht[1]][1],wr.$=ze[ze.length-dr],wr._$={first_line:Fe[Fe.length-(dr||1)].first_line,last_line:Fe[Fe.length-1].last_line,first_column:Fe[Fe.length-(dr||1)].first_column,last_column:Fe[Fe.length-1].last_column},Wt&&(wr._$.range=[Fe[Fe.length-(dr||1)].range[0],Fe[Fe.length-1].range[1]]),wt=this.performAction.apply(wr,[je,it,Re,Qt.yy,Ht[1],ze,Fe].concat(pt)),typeof wt<"u")return wt;dr&&(me=me.slice(0,-1*dr*2),ze=ze.slice(0,-1*dr),Fe=Fe.slice(0,-1*dr)),me.push(this.productions_[Ht[1]][0]),ze.push(wr.$),Fe.push(wr._$),Sr=pe[me[me.length-2]][me[me.length-1]],me.push(Sr);break;case 3:return!0}}return!0}},ye=(function(){var xe={EOF:1,parseError:function($,me){if(this.yy.parser)this.yy.parser.parseError($,me);else throw new Error($)},setInput:function(ce,$){return this.yy=$||this.yy||{},this._input=ce,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}
vendor: 5,632 bytes, lines 503-506
503,input:function(){var ce=this._input[0];this.yytext+=ce,this.yyleng++,this.offset++,this.match+=ce,this.matched+=ce;var $=ce.match(/(?:\r\n?|\n).*/g);return $?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ce},unput:function(ce){var $=ce.length,me=ce.split(/(?:\r\n?|\n)/g);this._input=ce+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-$),this.offset-=$;var ze=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),me.length-1&&(this.yylineno-=me.length-1);var Fe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:me?(me.length===ze.length?this.yylloc.first_column:0)+ze[ze.length-me.length].length-me[0].length:this.yylloc.first_column-$},this.options.ranges&&(this.yylloc.range=[Fe[0],Fe[0]+this.yyleng-$]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
504`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(ce){this.unput(this.match.slice(ce))},pastInput:function(){var ce=this.matched.substr(0,this.matched.length-this.match.length);return(ce.length>20?"...":"")+ce.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var ce=this.match;return ce.length<20&&(ce+=this._input.substr(0,20-ce.length)),(ce.substr(0,20)+(ce.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var ce=this.pastInput(),$=new Array(ce.length+1).join("-");return ce+this.upcomingInput()+`
505`+$+"^"},test_match:function(ce,$){var me,ze,Fe;if(this.options.backtrack_lexer&&(Fe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Fe.yylloc.range=this.yylloc.range.slice(0))),ze=ce[0].match(/(?:\r\n?|\n).*/g),ze&&(this.yylineno+=ze.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ze?ze[ze.length-1].length-ze[ze.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ce[0].length},this.yytext+=ce[0],this.match+=ce[0],this.matches=ce,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(ce[0].length),this.matched+=ce[0],me=this.performAction.call(this,this.yy,this,$,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),me)return me;if(this._backtrack){for(var pe in Fe)this[pe]=Fe[pe];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ce,$,me,ze;this._more||(this.yytext="",this.match="");for(var Fe=this._currentRules(),pe=0;pe<Fe.length;pe++)if(me=this._input.match(this.rules[Fe[pe]]),me&&(!$||me[0].length>$[0].length)){if($=me,ze=pe,this.options.backtrack_lexer){if(ce=this.test_match(me,Fe[pe]),ce!==!1)return ce;if(this._backtrack){$=!1;continue}else return!1}else if(!this.options.flex)break}return $?(ce=this.test_match($,Fe[ze]),ce!==!1?ce:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
506`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var $=this.next();return $||this.lex()},begin:function($){this.conditionStack.push($)},popState:function(){var $=this.conditionStack.length-1;return $>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function($){return $=this.conditionStack.length-1-Math.abs($||0),$>=0?this.conditionStack[$]:"INITIAL"},pushState:function($){this.begin($)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function($,me,ze,Fe){switch(ze){case 0:break;case 1:return 6;case 2:return me.yytext=me.yytext.substr(1,me.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt\/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return xe})();ue.lexer=ye;function ge(){this.yy={}}return ge.prototype=ue,ue.Parser=ge,new ge})();typeof zw<"u"&&(m.parser=v,m.Parser=v.Parser,m.parse=function(){return v.parse.apply(v,arguments)},m.main=function(T){T[1]||(console.log("Usage: "+T[0]+" FILE"),process.exit(1));var E=Uy.readFileSync(Uy.normalize(T[1]),"utf8");return m.parser.parse(E)},g===void 0&&m.main(process.argv.slice(1)))}
506)(yc,yc.exports)),yc.exports}var By={},Fy,ob;function cT(){if(ob)return Fy;ob=1;function g(T){return T*Math.PI/180}function m(T){var E=0;if(T.length>2)for(var a,_,w=0;w<T.length-1;w++)a=T[w],_=T[w+1],E+=g(_[0]-a[0])*(2+Math.sin(g(a[1]))+Math.sin(g(_[1])));return E>=0}function v(T){if(T&&T.length>0){if(m(T[0]))return!1;var E=T.slice(1,T.length);if(!E.every(m))return!1}return!0}function S(T){if(T.type==="Polygon")return v(T.coordinates);if(T.type==="MultiPolygon")return T.coordinates.every(v)}return Fy=function(E,a){S(E)||a.push({message:"Polygons and MultiPolygons should follow the right-hand rule",level:"message",line:E.__line__})},Fy}var ab;function pT(){if(ab)return By;ab=1;var g=cT();function m(v,S){var T=[],E=0,a=10,_=6;function w(se){if((!S||S.noDuplicateMembers!==!1)&&se.__duplicateProperties__&&T.push({message:"An object contained duplicate members, making parsing ambigous: "+se.__duplicateProperties__.join(", "),line:se.__line__}),!z(se,"type","string"))if(Re[se.type])se&&Re[se.type](se);else{var rt=it[se.type.toLowerCase()];rt!==void 0?T.push({message:"Expected "+rt+" but got "+se.type+" (case sensitive)",line:se.__line__}):T.push({message:"The type "+se.type+" is unknown",line:se.__line__})}}function k(se,rt){return se.every(function(pt){return pt!==null&&typeof pt===rt})}function z(se,rt,pt){if(typeof se[rt]>"u")return T.push({message:'"'+rt+'" member required',line:se.__line__});if(pt==="array"){if(!Array.isArray(se[rt]))return T.push({message:'"'+rt+'" member should be an array, but is an '+typeof se[rt]+" instead",line:se.__line__})}else{if(pt==="object"&&se[rt]&&se[rt].constructor!==Object)return T.push({message:'"'+rt+'" member should be '+pt+", but is an "+se[rt].constructor.name+" instead",line:se.__line__});if(pt&&typeof se[rt]!==pt)return T.push({message:'"'+rt+'" member should be '+pt+", but is an "+typeof se[rt]+" instead",line:se.__line__})}}function O(se){if(ue(se),ye(se),se.properties!==void 0&&T.push({message:'FeatureCollection object cannot contain a "properties" member',line:se.__line__}),se.coordinates!==void 0&&T.push({message:'FeatureCollection object cannot contain a "coordinates" member',line:se.__line__}),!z(se,"features","array")){if(!k(se.features,"object"))return T.push({message:"Every feature must be an object",line:se.__line__});se.features.forEach(je)}}function F(se,rt){if(!Array.isArray(se))return T.push({message:"position should be an array, is a "+typeof se+" instead",line:se.__line__||rt});if(se.length<2)return T.push({message:"position must have 2 or more elements",line:se.__line__||rt});if(se.length>3)return T.push({message:"position should not have more than 3 elements",level:"message",line:se.__line__||rt});if(!k(se,"number"))return T.push({message:"each element in a position must be a number",line:se.__line__||rt});if(S&&S.precisionWarning){if(E===a)return E+=1,T.push({message:"truncated warnings: we've encountered coordinate precision warning "+a+" times, no more warnings will be reported",level:"message",line:se.__line__||rt});E<a&&se.forEach(function(pt){var nt=0,Qt=String(pt).split(".")[1];if(Qt!==void 0&&(nt=Qt.length),nt>_)return E+=1,T.push({message:"precision of coordinates should be reduced",level:"message",line:se.__line__||rt})})}}function W(se,rt,pt,nt){if(nt===void 0&&se.__line__!==void 0&&(nt=se.__line__),pt===0)return F(se,nt);if(pt===1&&rt){if(rt==="LinearRing"){if(!Array.isArray(se[se.length-1]))return T.push({message:"a number was found where a coordinate array should have been found: this needs to be nested more deeply",line:nt}),!0;if(se.length<4&&T.push({message:"a LinearRing of coordinates needs to have four or more positions",line:nt}),se.length&&(se[se.length-1].length!==se[0].length||!se[se.length-1].every(function(Xt,Rr){return se[0][Rr]===Xt})))return T.push({message:"the first and last positions in a LinearRing of coordinates must be the same",line:nt}),!0}else if(rt==="Line"&&se.length<2)return T.push({message:"a line needs to have two or more coordinates to be valid",line:nt})}if(!Array.isArray(se))T.push({message:"a number was found where a coordinate array should have been found: this needs to be nested more deeply",line:nt});else{var Qt=se.map(function(Xt){return W(Xt,rt,pt-1,Xt.__line__||nt)});return Qt.some(function(Xt){return Xt})}}function ue(se){if(se.crs){var rt="urn:ogc:def:crs:OGC:1.3:CRS84";typeof se.crs=="object"&&se.crs.properties&&se.crs.properties.name===rt?T.push({message:"old-style crs member is not recommended, this object is equivalent to the default and should be removed",line:se.__line__}):T.push({message:"old-style crs member is not recommended",line:se.__line__})}}function ye(se){if(se.bbox){if(Array.isArray(se.bbox))return k(se.bbox,"number")||T.push({message:"each element in a bbox member must be a number",line:se.bbox.__line__}),se.bbox.length===4||se.bbox.length===6||T.push({message:"bbox must contain 4 elements (for 2D) or 6 elements (for 3D)",line:se.bbox.__line__}),T.length;T.push({message:"bbox member must be an array of numbers, but is a "+typeof se.bbox,line:se.__line__})}}function ge(se){se.properties!==void 0&&T.push({message:'geometry object cannot contain a "properties" member',line:se.__line__}),se.geometry!==void 0&&T.push({message:'geometry object cannot contain a "geometry" member',line:se.__line__}),se.features!==void 0&&T.push({message:'geometry object cannot contain a "features" member',line:se.__line__})}function xe(se){ue(se),ye(se),ge(se),z(se,"coordinates","array")||F(se.coordinates)}function ce(se){ue(se),ye(se),z(se,"coordinates","array")||W(se.coordinates,"LinearRing",2)||g(se,T)}function $(se){ue(se),ye(se),z(se,"coordinates","array")||W(se.coordinates,"LinearRing",3)||g(se,T)}function me(se){ue(se),ye(se),z(se,"coordinates","array")||W(se.coordinates,"Line",1)}function ze(se){ue(se),ye(se),z(se,"coordinates","array")||W(se.coordinates,"Line",2)}function Fe(se){ue(se),ye(se),z(se,"coordinates","array")||W(se.coordinates,"",1)}function pe(se){ue(se),ye(se),z(se,"geometries","array")||(k(se.geometries,"object")||T.push({message:"The geometries array in a GeometryCollection must contain only geometry objects",line:se.__line__}),se.geometries.length===1&&T.push({message:"GeometryCollection with a single geometry should be avoided in favor of single part or a single object of multi-part type",line:se.geometries.__line__}
506),se.geometries.forEach(function(rt){rt&&(rt.type==="GeometryCollection"&&T.push({message:"GeometryCollection should avoid nested geometry collections",line:se.geometries.__line__}),w(rt))}))}function je(se){ue(se),ye(se),se.id!==void 0&&typeof se.id!="string"&&typeof se.id!="number"&&T.push({message:'Feature "id" member must have a string or number value',line:se.__line__}),se.features!==void 0&&T.push({message:'Feature object cannot contain a "features" member',line:se.__line__}),se.coordinates!==void 0&&T.push({message:'Feature object cannot contain a "coordinates" member',line:se.__line__}),se.type!=="Feature"&&T.push({message:"GeoJSON features must have a type=feature member",line:se.__line__}),z(se,"properties","object"),z(se,"geometry","object")||se.geometry&&w(se.geometry)}var Re={Point:xe,Feature:je,MultiPoint:Fe,LineString:me,MultiLineString:ze,FeatureCollection:O,GeometryCollection:pe,Polygon:ce,MultiPolygon:$},it=Object.keys(Re).reduce(function(se,rt){return se[rt.toLowerCase()]=rt,se},{});return typeof v!="object"||v===null||v===void 0?(T.push({message:"The root of a GeoJSON object must be an object.",line:0}),T):(w(v),T.forEach(function(se){({}).hasOwnProperty.call(se,"line")&&se.line===void 0&&delete se.line}),T)}return By.hint=m,By}var sb;function hT(){if(sb)return Oy;sb=1;var g=lT(),m=pT();function v(S,T){var E,a=[];if(typeof S=="object")E=S;else if(typeof S=="string")try{E=g.parse(S)}catch(k){var _=k.message.match(/line (\d+)/),w=parseInt(_[1],10);return[{line:w-1,message:k.message,error:k}]}else return[{message:"Expected string or object as input",line:0}];return a=a.concat(m.hint(E,T)),a}return Oy.hint=v,Oy}var Ny,ub;function fT(){if(ub)return Ny;ub=1;const g=Lw(),m=fb(),v=jy(),S=_c(),T=uT(),E=hT(),a=qr(),_=gc(),w={Polygon:Zy(),LineString:$y(),Point:Gy(),MultiPolygon:vc(),MultiLineString:vc(),MultiPoint:vc()};return Ny=function(k,z){return z.modes=a.modes,z.getFeatureIdsAt=function(O){return S.click({point:O},null,k).map(W=>W.properties.id)},z.getSelectedIds=function(){return k.store.getSelectedIds()},z.getSelected=function(){return{type:a.geojsonTypes.FEATURE_COLLECTION,features:k.store.getSelectedIds().map(O=>k.store.get(O)).map(O=>O.toGeoJSON())}},z.getSelectedPoints=function(){return{type:a.geojsonTypes.FEATURE_COLLECTION,features:k.store.getSelectedCoordinates().map(O=>({type:a.geojsonTypes.FEATURE,properties:{},geometry:{type:a.geojsonTypes.POINT,coordinates:O.coordinates}}))}},z.set=function(O){if(O.type===void 0||O.type!==a.geojsonTypes.FEATURE_COLLECTION||!Array.isArray(O.features))throw new Error("Invalid FeatureCollection");const F=k.store.createRenderBatch();let W=k.store.getAllIds().slice();const ue=z.add(O),ye=new _(ue);return W=W.filter(ge=>!ye.has(ge)),W.length&&z.delete(W),F(),ue},z.add=function(O){const F=E.hint(O,{precisionWarning:!1}).filter(ye=>ye.level!=="message");if(F.length)throw new Error(F[0].message);const ue=JSON.parse(JSON.stringify(m(O))).features.map(ye=>{if(ye.id=ye.id||v(),ye.geometry===null)throw new Error("Invalid geometry: null");if(k.store.get(ye.id)===void 0||k.store.get(ye.id).type!==ye.geometry.type){const ge=w[ye.geometry.type];if(ge===void 0)throw new Error(`Invalid geometry type: ${ye.geometry.type}.`);const xe=new ge(k,ye);k.store.add(xe)}else{const ge=k.store.get(ye.id);ge.properties=ye.properties,g(ge.getCoordinates(),ye.geometry.coordinates)||ge.incomingCoords(ye.geometry.coordinates)}return ye.id});return k.store.render(),ue},z.get=function(O){const F=k.store.get(O);if(F)return F.toGeoJSON()},z.getAll=function(){return{type:a.geojsonTypes.FEATURE_COLLECTION,features:k.store.getAll().map(O=>O.toGeoJSON())}},z.delete=function(O){return k.store.delete(O,{silent:!0}),z.getMode()===a.modes.DIRECT_SELECT&&!k.store.getSelectedIds().length?k.events.changeMode(a.modes.SIMPLE_SELECT,void 0,{silent:!0}):k.store.render(),z},z.deleteAll=function(){return k.store.delete(k.store.getAllIds(),{silent:!0}),z.getMode()===a.modes.DIRECT_SELECT?k.events.changeMode(a.modes.SIMPLE_SELECT,void 0,{silent:!0}):k.store.render(),z},z.changeMode=function(O,F={}){return O===a.modes.SIMPLE_SELECT&&z.getMode()===a.modes.SIMPLE_SELECT?(T(F.featureIds||[],k.store.getSelectedIds())||
506(k.store.setSelected(F.featureIds,{silent:!0}),k.store.render()),z):(O===a.modes.DIRECT_SELECT&&z.getMode()===a.modes.DIRECT_SELECT&&F.featureId===k.store.getSelectedIds()[0]||k.events.changeMode(O,F,{silent:!0}),z)},z.getMode=function(){return k.events.getMode()},z.trash=function(){return k.events.trash({silent:!0}),z},z.combineFeatures=function(){return k.events.combineFeatures({silent:!0}),z},z.uncombineFeatures=function(){return k.events.uncombineFeatures({silent:!0}),z},z.setFeatureProperty=function(O,F,W){return k.store.setFeatureProperty(O,F,W),z},z},Ny}var lb;function dT(){if(lb)return lc.exports;lb=1;const g=n2(),m=sT(),v=fT(),S=qr(),T=function(E,a){E=m(E);const _={options:E};a=v(_,a),_.api=a;const w=g(_);return a.onAdd=w.onAdd,a.onRemove=w.onRemove,a.types=S.types,a.options=E,a};return lc.exports=function(E){T(E,this)},lc.exports.modes=e1(),lc.exports}var yT=dT();const ST=Vy(yT);var qy={exports:{}},cb;function mT(){if(cb)return qy.exports;cb=1;var g=qy.exports={};return g.onSetup=function(){return this.setActionableState(),{}},g.toDisplayFeatures=function(m,v,S){S(v)},qy.exports}var vT=mT();const TT=Vy(vT);export{ST as M,TT as S,wT as a,bT as m};

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.