vendor: 4,283 bytes, line 1
1import{d as jm}from"./chunk-52KRNRSW.js";import{$a as Nu,A as Of,Aa as fm,B as Fl,Ba as Ou,C as Ol,Ca as mm,D as Nf,Da as gm,E as nd,Ea as ym,F as sd,Fa as _m,G as ad,Ga as hd,Ha as vm,I as jf,Ia as jl,J as Ru,Ja as bm,K as Si,Ka as xm,L as $f,La as wm,M as on,Ma as Sm,N as Vf,Na as Tm,O as Uf,Oa as Pm,Pa as Em,Qa as Mm,R as Gf,Ra as Cm,S as Hf,Sa as Im,T as qf,Ta as Am,U as as,Ua as dd,V as Zf,Va as Dm,W as Wf,Wa as km,Xa as Lm,Y as Bu,Ya as zm,Z as Nl,Za as Rm,_a as Bm,aa as Xf,ab as Fm,b as Pf,ba as Yf,bb as Om,c as Ef,ca as Kf,cb as Nm,d as Mf,da as Jf,db as Li,ea as Qf,f as Cf,fa as em,g as Lu,ga as tm,h as If,ha as im,i as Af,ia as od,j as zu,ja as rm,k as Bl,ka as nm,l as Oc,la as sm,m as Df,ma as Fu,n as mn,na as am,o as kf,oa as om,p as Lf,q as uo,r as Vs,ra as ld,sa as cd,t as zf,ta as lm,u as Fa,ua as cm,v as Rf,va as um,w as Bf,wa as hm,x as Nc,xa as dm,y as jc,ya as ud,z as Ff,za as pm}from"./chunk-OV2FHYXJ.js";import{a as xt}from"./chunk-I27NJ74L.js";import"./chunk-76G7Q22W.js";import{a as Sf,b as Tf}from"./chunk-K2M4C6NF.js";var Vm=Sf(($m,ju)=>{(function(p,s){"use strict";typeof ju=="object"&&typeof ju.exports=="object"?ju.exports=p.document?s(p,!0):function(g){if(!g.document)throw new Error("jQuery requires a window with a document");return s(g)}:s(p)})(typeof window<"u"?window:$m,function(p,s){"use strict";var g=[],b=Object.getPrototypeOf,y=g.slice,a=g.flat?function(_){return g.flat.call(_)}:function(_){return g.concat.apply([],_)},z=g.push,F=g.indexOf,V={},B=V.toString,U=V.hasOwnProperty,O=U.toString,ne=O.call(Object),re={},j=function(S){return typeof S=="function"&&typeof S.nodeType!="number"&&typeof S.item!="function"},H=function(S){return S!=null&&S===S.window},ae=p.document,ge={type:!0,src:!0,nonce:!0,noModule:!0};function ce(_,S,I){I=I||ae;var D,Z,X=I.createElement("script");if(X.text=_,S)for(D in ge)Z=S[D]||S.getAttribute&&S.getAttribute(D),Z&&X.setAttribute(D,Z);I.head.appendChild(X).parentNode.removeChild(X)}function le(_){return _==null?_+"":typeof _=="object"||typeof _=="function"?V[B.call(_)]||"object":typeof _}var we="3.7.1",Le=/HTML$/i,M=function(_,S){return new M.fn.init(_,S)};M.fn=M.prototype={jquery:we,constructor:M,length:0,toArray:function(){return y.call(this)},get:function(_){return _==null?y.call(this):_<0?this[_+this.length]:this[_]},pushStack:function(_){var S=M.merge(this.constructor(),_);return S.prevObject=this,S},each:function(_){return M.each(this,_)},map:function(_){return this.pushStack(M.map(this,function(S,I){return _.call(S,I,S)}))},slice:function(){return this.pushStack(y.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(M.grep(this,function(_,S){return(S+1)%2}))},odd:function(){return this.pushStack(M.grep(this,function(_,S){return S%2}))},eq:function(_){var S=this.length,I=+_+(_<0?S:0);return this.pushStack(I>=0&&I<S?[this[I]]:[])},end:function(){return this.prevObject||this.constructor()},push:z,sort:g.sort,splice:g.splice},M.extend=M.fn.extend=function(){var _,S,I,D,Z,X,te=arguments[0]||{},Te=1,_e=arguments.length,Fe=!1;for(typeof te=="boolean"&&(Fe=te,te=arguments[Te]||{},Te++),typeof te!="object"&&!j(te)&&(te={}),Te===_e&&(te=this,Te--);Te<_e;Te++)if((_=arguments[Te])!=null)for(S in _)D=_[S],!(S==="__proto__"||te===D)&&(Fe&&D&&(M.isPlainObject(D)||(Z=Array.isArray(D)))?(I=te[S],Z&&!Array.isArray(I)?X=[]:!Z&&!M.isPlainObject(I)?X={}:X=I,Z=!1,te[S]=M.extend(Fe,X,D)):D!==void 0&&(te[S]=D));return te},M.extend({expando:"jQuery"+(we+Math.random()).replace(/\D/g,""),isReady:!0,error:function(_){throw new Error(_)},noop:function(){},isPlainObject:function(_){var S,I;return!_||B.call(_)!=="[object Object]"?!1:(S=b(_),S?(I=U.call(S,"constructor")&&S.constructor,typeof I=="function"&&O.call(I)===ne):!0)},isEmptyObject:function(_){var S;for(S in _)return!1;return!0},globalEval:function(_,S,I){ce(_,{nonce:S&&S.nonce},I)},each:function(_,S){var I,D=0;if(ze(_))for(I=_.length;D<I&&S.call(_[D],D,_[D])!==!1;D++);else for(D in _)if(S.call(_[D],D,_[D])===!1)break;return _},text:function(_){var S,I="",D=0,Z=_.nodeType;if(!Z)for(;S=_[D++];)I+=M.text(S);return Z===1||Z===11?_.textContent:Z===9?_.documentElement.textContent:Z===3||Z===4?_.nodeValue:I},makeArray:function(_,S){var I=S||[];
1return _!=null&&(ze(Object(_))?M.merge(I,typeof _=="string"?[_]:_):z.call(I,_)),I},inArray:function(_,S,I){return S==null?-1:F.call(S,_,I)},isXMLDoc:function(_){var S=_&&_.namespaceURI,I=_&&(_.ownerDocument||_).documentElement;return!Le.test(S||I&&I.nodeName||"HTML")},merge:function(_,S){for(var I=+S.length,D=0,Z=_.length;D<I;D++)_[Z++]=S[D];return _.length=Z,_},grep:function(_,S,I){for(var D,Z=[],X=0,te=_.length,Te=!I;X<te;X++)D=!S(_[X],X),D!==Te&&Z.push(_[X]);return Z},map:function(_,S,I){var D,Z,X=0,te=[];if(ze(_))for(D=_.length;X<D;X++)Z=S(_[X],X,I),Z!=null&&te.push(Z);else for(X in _)Z=S(_[X],X,I),Z!=null&&te.push(Z);return a(te)},guid:1,support:re}),typeof Symbol=="function"&&(M.fn[Symbol.iterator]=g[Symbol.iterator]),M.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(_,S){V["[object "+S+"]"]=S.toLowerCase()});function ze(_){var S=!!_&&"length"in _&&_.length,I=le(_);return j(_)||H(_)?!1:I==="array"||S===0||typeof S=="number"&&S>0&&S-1 in _}function Oe(_,S){return _.nodeName&&_.nodeName.toLowerCase()===S.toLowerCase()}var qe=g.pop,$e=g.sort,Qe=g.splice,Ne="[\\x20\\t\\r\\n\\f]",Je=new RegExp("^"+Ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Ne+"+$","g");M.contains=function(_,S){var I=S&&S.parentNode;return _===I||!!(I&&I.nodeType===1&&(_.contains?_.contains(I):_.compareDocumentPosition&&_.compareDocumentPosition(I)&16))};var Ye=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function bt(_,S){return S?_==="\0"?"\uFFFD":_.slice(0,-1)+"\\"+_.charCodeAt(_.length-1).toString(16)+" ":"\\"+_}M.escapeSelector=function(_){return(_+"").replace(Ye,bt)};var _t=ae,He=z;(function(){var _,S,I,D,Z,X=He,te,Te,_e,Fe,rt,dt=M.expando,We=0,Pt=0,ei=Ha(),ni=Ha(),ci=Ha(),ir=Ha(),er=function(fe,De){return fe===De&&(Z=!0),0},Jr="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",In="(?:\\\\[\\da-fA-F]{1,6}"+Ne+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",hi="\\["+Ne+"*("+In+")(?:"+Ne+"*([*^$|!~]?=)"+Ne+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+In+"))|)"+Ne+"*\\]",ps=":("+In+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+hi+")*)|.*)\\)|)",pi=new RegExp(Ne+"+","g"),rr=new RegExp("^"+Ne+"*,"+Ne+"*"),sa=new RegExp("^"+Ne+"*([>+~]|"+Ne+")"+Ne+"*"),To=new RegExp(Ne+"|>"),An=new RegExp(ps),fs=new RegExp("^"+In+"$"),vn={ID:new RegExp("^#("+In+")"),CLASS:new RegExp("^\\.("+In+")"),TAG:new RegExp("^("+In+"|[*])"),ATTR:new RegExp("^"+hi),PSEUDO:new RegExp("^"+ps),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+Ne+"*(even|odd|(([+-]|)(\\d*)n|)"+Ne+"*(?:([+-]|)"+Ne+"*(\\d+)|))"+Ne+"*\\)|)","i"),bool:new RegExp("^(?:"+Jr+")$","i"),needsContext:new RegExp("^"+Ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+Ne+"*((?:-\\d)?\\d*)"+Ne+"*\\)|)(?=[^-]|$)","i")},Nn=/^(?:input|select|textarea|button)$/i,Jn=/^h\d$/i,dn=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Qn=/[+~]/,bn=new RegExp("\\\\[\\da-fA-F]{1,6}"+Ne+"?|\\\\([^\\r\\n\\f])","g"),jn=function(fe,De){var Ze="0x"+fe.slice(1)-65536;return De||(Ze<0?String.fromCharCode(Ze+65536):String.fromCharCode(Ze>>10|55296,Ze&1023|56320))},wa=function(){Vn()},Hl=_i(function(fe){return fe.disabled===!0&&Oe(fe,"fieldset")},{dir:"parentNode",next:"legend"});function Sa(){try{return te.activeElement}catch{}}try{X.apply(g=y.call(_t.childNodes),_t.childNodes),g[_t.childNodes.length].nodeType}catch{X={apply:function(De,Ze){He.apply(De,y.call(Ze))},call:function(De){He.apply(De,y.call(arguments,1))}}}function Ci(fe,De,Ze,it){var ht,Dt,Lt,Ot,Bt,fi,Qt,Jt=De&&De.ownerDocument,ui=De?De.nodeType:9;if(Ze=Ze||[],typeof fe!="string"||!fe||ui!==1&&ui!==9&&ui!==11)return Ze;if(!it&&(Vn(De),De=De||te,_e)){if(ui!==11&&(Bt=dn.exec(fe)))if(ht=Bt[1]){if(ui===9)if(Lt=De.getElementById(ht)){if(Lt.id===ht)return X.call(Ze,Lt),Ze}else return Ze;else if(Jt&&(Lt=Jt.getElementById(ht))&&Ci.contains(De,Lt)&&Lt.id===ht)return X.call(Ze,Lt),Ze}else{if(Bt[2])return X.apply(Ze,De.getElementsByTagName(fe)),Ze;if((ht=Bt[3])&&De.getElementsByClassName)return X.apply(Ze,De.getElementsByClassName(ht)),Ze}if(!ir[fe+" "]&&(!Fe||!Fe.test(fe))){if(Qt=fe,Jt=De,ui===1&&(To.test(fe)||sa.test(fe))){for(Jt=Qn.test(fe)&&wn(De.parentNode)||De,(Jt!=De||!re.scope)&&((Ot=De.getAttribute("id"))?Ot=M.escapeSelector(Ot):De.setAttribute("id",Ot=dt)),fi=Ds(fe),Dt=fi.length;Dt--;)fi[Dt]=(Ot?"#"+Ot:":scope")+" "+Ta(fi[Dt]);Qt=fi.join(",")}try{return X.apply(Ze,Jt.querySelectorAll(Qt)),Ze}catch{ir(fe,!0)}finally{Ot===dt&&De.removeAttribute("id")}}}return sl(fe.replace(Je,"$1"),De,Ze,it)}function Ha(){var fe=[];function De(Ze,it){return fe.push(Ze+" ")>S.cacheLength&&delete De[fe.shift()],De[Ze+" "]=it}return De}function xn(fe){return fe[dt]=!0,fe}function ms(fe){var De=te.createElement("fieldset");try{return!!fe(De)}catch{return!1}finally{De.parentNode&&De.parentNode.removeChild(De),De=null}}function Po(fe){return function(De){return Oe(De,"input")&&De.type===fe}}function Eo(fe){return function(De){return(Oe(De,"input")||Oe(De,"button"))&&De.type===fe}}function Mo(fe){return function(De){return"form"in De?De.parentNode&&De.disabled===!1?"label"in De?"label"in De.parentNode?De.parentNode.disabled===fe:De.disabled===fe:De.isDisabled===fe||De.isDisabled!==!fe&&Hl(De)===fe:De.disabled===fe:"label"in De?De.disabled===fe:!1}}function $n(fe){return xn(function(De){return De=+De,xn(function(Ze,it){for(var ht,Dt=fe([],Ze.length,De),Lt=Dt.length;Lt--;)Ze[ht=Dt[Lt]]&&(Ze[ht]=!(it[ht]=Ze[ht]))})})}function wn(fe){return fe&&typeof fe.getElementsByTagName<"u"&&fe}function Vn(fe){var De,Ze=fe?fe.ownerDocument||fe:_t;return Ze==te||Ze.nodeType!==9||!Ze.documentElement||(te=Ze,Te=te.documentElement,_e=!M.isXMLDoc(te),rt=Te.matches||Te.webkitMatchesSelector||Te.msMatchesSelector,Te.msMatchesSelector&&_t!=te&&(De=te.defaultView)&&De.top!==De&&De.addEventListener("unload",wa),re.getById=ms(function(it){return Te.appendChild(it).id=M.expando,!te.getElementsByName||!te.getElementsByName(M.expando).length}),re.disconnectedMatch=ms(function(it){return rt.call(it,"*")}),re.scope=ms(function(){return te.querySelectorAll(":scope")}),re.cssHas=ms(function(){try{return te.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),re.getById?(S.filter.ID=function(it){var ht=it.replace(bn,jn);return function(Dt){return Dt.getAttribute("id")===ht}},S.find.ID=function(it,ht){if(typeof ht.getElementById<"u"&&_e){var Dt=ht.getElementById(it);return Dt?[Dt]:[]}}):(S.filter.ID=function(it){var ht=it.replace(bn,jn);return function(Dt){var Lt=typeof Dt.getAttributeNode<"u"&&Dt.getAttributeNode("id");return Lt&&Lt.value===ht}},S.find.ID=function(it,ht){if(typeof ht.getElementById<"u"&&_e){var Dt,Lt,Ot,Bt=ht.getElementById(it);if(Bt){if(Dt=Bt.getAttributeNode("id"),Dt&&Dt.value===it)return[Bt];for(Ot=ht.getElementsByName(it),Lt=0;Bt=Ot[Lt++];)if(Dt=Bt.getAttributeNode("id"),Dt&&Dt.value===it)return[Bt]}return[]}}),S.find.TAG=function(it,ht){return typeof ht.getElementsByTagName<"u"?ht.getElementsByTagName(it):ht.querySelectorAll(it)},S.find.CLASS=function(it,ht){if(typeof ht.getElementsByClassName<"u"&&_e)return ht.getElementsByClassName(it)},Fe=[],ms(function(it){var ht;Te.appendChild(it).innerHTML="<a id='"+dt+"' href='' disabled='disabled'></a><select id='"+dt+"-\r\\' disabled='disabled'><option selected=''></option></select>",it.querySelectorAll("[selected]").length||Fe.push("\\["+Ne+"*(?:value|"+Jr+")"),it.querySelectorAll("[id~="+dt+"-]").length||Fe.push("~="),it.querySelectorAll("a#"+dt+"+*").length||Fe.push(".#.+[+~]"),it.querySelectorAll(":checked").length||Fe.push(":checked"),ht=te.createElement("input"),ht.setAttribute("type","hidden"),it.appendChild(ht).setAttribute("name","D"),Te.appendChild(it).disabled=!0,it.querySelectorAll(":disabled").length!==2&&Fe.push(":enabled",":disabled"),ht=te.createElement("input"),ht.setAttribute("name",""),it.appendChild(ht),it.querySelectorAll("[name='']").length||Fe.push("\\["+Ne+"*name"+Ne+"*="+Ne+`*(?:''|"")`)}),re.cssHas||Fe.push(":has"),Fe=Fe.length&&new RegExp(Fe.join("|")),er=function(it,ht){if(it===ht)return Z=!0,0;var Dt=!it.compareDocumentPosition-!ht.compareDocumentPosition;return Dt||(Dt=(it.ownerDocument||it)==(ht.ownerDocument||ht)?it.compareDocumentPosition(ht):1,Dt&1||!re.sortDetached&&ht.compareDocumentPosition(it)===Dt?it===te||it.ownerDocument==_t&&Ci.contains(_t,it)?-1:ht===te||ht.ownerDocument==_t&&Ci.contains(_t,ht)?1:D?F.call(D,it)-F.call(D,ht):0:Dt&4?-1:1)}),te}Ci.matches=function(fe,De){return Ci(fe,null,null,De)},Ci.matchesSelector=function(fe,De){if(Vn(fe),_e&&!ir[De+" "]&&(!Fe||!Fe.test(De)))try{var Ze=rt.call(fe,De);if(Ze||re.disconnectedMatch||fe.document&&fe.document.nodeType!==11)return Ze}catch{ir(De,!0)}return Ci(De,te,null,[fe]).length>0},Ci.contains=function(fe,De){return(fe.ownerDocument||fe)!=te&&Vn(fe),M.contains(fe,De)},Ci.attr=function(fe,De){(fe.ownerDocument||fe)!=te&&Vn(fe);var Ze=S.attrHandle[De.toLowerCase()],it=Ze&&U.call(S.attrHandle,De.toLowerCase())?Ze(fe,De,!_e):void 0;return it!==void 0?it:fe.getAttribute(De)},Ci.error=function(fe){throw new Error("Syntax error, unrecognized expression: "+fe)},M.uniqueSort=function(fe){var De,Ze=[],it=0,ht=0;if(Z=!re.sortStable,D=!re.sortStable&&y.call(fe,0),$e.call(fe,er),Z){for(;De=fe[ht++];)De===fe[ht]&&(it=Ze.push(ht));for(;it--;)Qe.call(fe,Ze[it],1)}return D=null,fe},M.fn.uniqueSort=function(){return this.pushStack(M.uniqueSort(y.apply(this)))},S=M.expr={cacheLength:50,createPseudo:xn,match:vn,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(fe){return fe[1]=fe[1].replace(bn,jn),fe[3]=(fe[3]||fe[4]||fe[5]||"").replace(bn,jn),fe[2]==="~="&&(fe[3]=" "+fe[3]+" "),fe.slice(0,4)},CHILD:function(fe){return fe[1]=fe[1].toLowerCase(),fe[1].slice(0,3)==="nth"?(fe[3]||Ci.error(fe[0]),fe[4]=+(fe[4]?fe[5]+(fe[6]||1):2*(fe[3]==="even"||fe[3]==="odd")),fe[5]=+(fe[7]+fe[8]||fe[3]==="odd")):fe[3]&&Ci.error(fe[0]),fe},PSEUDO:function(fe){var De,Ze=!fe[6]&&fe[2];return vn.CHILD.test(fe[0])?null:(fe[3]?fe[2]=fe[4]||fe[5]||"":Ze&&An.test(Ze)&&(De=Ds(Ze,!0))&&(De=Ze.indexOf(")",Ze.length-De)-Ze.length)&&(fe[0]=fe[0].slice(0,De),fe[2]=Ze.slice(0,De)),fe.slice(0,3))}},filter:{TAG:function(fe){var De=fe.replace(bn,jn).toLowerCase();return fe==="*"?function(){return!0}:function(Ze){return Oe(Ze,De)}},CLASS:function(fe){var De=ei[fe+" "];return De||(De=new RegExp("(^|"+Ne+")"+fe+"("+Ne+"|$)"))&&ei(fe,function(Ze){return De.test(typeof Ze.className=="string"&&Ze.className||typeof Ze.getAttribute<"u"&&Ze.getAttribute("class")||"")})},ATTR:function(fe,De,Ze){return function(it){var ht=Ci.attr(it,fe);return ht==null?De==="!=":De?(ht+="",De==="="?ht===Ze:De==="!="?ht!==Ze:De==="^="?Ze&&ht.indexOf(Ze)===0:De==="*="?Ze&&ht.indexOf(Ze)>-1:De==="$="?Ze&&ht.slice(-Ze.length)===Ze:De==="~="?(" "+ht.replace(pi," ")+" ").indexOf(Ze)>-1:De==="|="?ht===Ze||ht.slice(0,Ze.length+1)===Ze+"-":!1):!0}},CHILD:function(fe,De,Ze,it,ht){var Dt=fe.slice(0,3)!=="nth",Lt=fe.slice(-4)!=="last",Ot=De==="of-type";return it===1&&ht===0?function(Bt){return!!Bt.parentNode}:function(Bt,fi,Qt){var Jt,ui,Xt,Ii,Dr,kr=Dt!==Lt?"nextSibling":"previousSibling",Lr=Bt.parentNode,Qr=Ot&&Bt.nodeName.toLowerCase(),ks=!Qt&&!Ot,zr=!1;
vendor: 16,699 bytes, line 1
1if(Lr){if(Dt){for(;kr;){for(Xt=Bt;Xt=Xt[kr];)if(Ot?Oe(Xt,Qr):Xt.nodeType===1)return!1;Dr=kr=fe==="only"&&!Dr&&"nextSibling"}return!0}if(Dr=[Lt?Lr.firstChild:Lr.lastChild],Lt&&ks){for(ui=Lr[dt]||(Lr[dt]={}),Jt=ui[fe]||[],Ii=Jt[0]===We&&Jt[1],zr=Ii&&Jt[2],Xt=Ii&&Lr.childNodes[Ii];Xt=++Ii&&Xt&&Xt[kr]||(zr=Ii=0)||Dr.pop();)if(Xt.nodeType===1&&++zr&&Xt===Bt){ui[fe]=[We,Ii,zr];break}}else if(ks&&(ui=Bt[dt]||(Bt[dt]={}),Jt=ui[fe]||[],Ii=Jt[0]===We&&Jt[1],zr=Ii),zr===!1)for(;(Xt=++Ii&&Xt&&Xt[kr]||(zr=Ii=0)||Dr.pop())&&!((Ot?Oe(Xt,Qr):Xt.nodeType===1)&&++zr&&(ks&&(ui=Xt[dt]||(Xt[dt]={}),ui[fe]=[We,zr]),Xt===Bt)););return zr-=ht,zr===it||zr%it===0&&zr/it>=0}}},PSEUDO:function(fe,De){var Ze,it=S.pseudos[fe]||S.setFilters[fe.toLowerCase()]||Ci.error("unsupported pseudo: "+fe);return it[dt]?it(De):it.length>1?(Ze=[fe,fe,"",De],S.setFilters.hasOwnProperty(fe.toLowerCase())?xn(function(ht,Dt){for(var Lt,Ot=it(ht,De),Bt=Ot.length;Bt--;)Lt=F.call(ht,Ot[Bt]),ht[Lt]=!(Dt[Lt]=Ot[Bt])}):function(ht){return it(ht,0,Ze)}):it}},pseudos:{not:xn(function(fe){var De=[],Ze=[],it=Wa(fe.replace(Je,"$1"));return it[dt]?xn(function(ht,Dt,Lt,Ot){for(var Bt,fi=it(ht,null,Ot,[]),Qt=ht.length;Qt--;)(Bt=fi[Qt])&&(ht[Qt]=!(Dt[Qt]=Bt))}):function(ht,Dt,Lt){return De[0]=ht,it(De,null,Lt,Ze),De[0]=null,!Ze.pop()}}),has:xn(function(fe){return function(De){return Ci(fe,De).length>0}}),contains:xn(function(fe){return fe=fe.replace(bn,jn),function(De){return(De.textContent||M.text(De)).indexOf(fe)>-1}}),lang:xn(function(fe){return fs.test(fe||"")||Ci.error("unsupported lang: "+fe),fe=fe.replace(bn,jn).toLowerCase(),function(De){var Ze;do if(Ze=_e?De.lang:De.getAttribute("xml:lang")||De.getAttribute("lang"))return Ze=Ze.toLowerCase(),Ze===fe||Ze.indexOf(fe+"-")===0;while((De=De.parentNode)&&De.nodeType===1);return!1}}),target:function(fe){var De=p.location&&p.location.hash;return De&&De.slice(1)===fe.id},root:function(fe){return fe===Te},focus:function(fe){return fe===Sa()&&te.hasFocus()&&!!(fe.type||fe.href||~fe.tabIndex)},enabled:Mo(!1),disabled:Mo(!0),checked:function(fe){return Oe(fe,"input")&&!!fe.checked||Oe(fe,"option")&&!!fe.selected},selected:function(fe){return fe.parentNode&&fe.parentNode.selectedIndex,fe.selected===!0},empty:function(fe){for(fe=fe.firstChild;fe;fe=fe.nextSibling)if(fe.nodeType<6)return!1;return!0},parent:function(fe){return!S.pseudos.empty(fe)},header:function(fe){return Jn.test(fe.nodeName)},input:function(fe){return Nn.test(fe.nodeName)},button:function(fe){return Oe(fe,"input")&&fe.type==="button"||Oe(fe,"button")},text:function(fe){var De;return Oe(fe,"input")&&fe.type==="text"&&((De=fe.getAttribute("type"))==null||De.toLowerCase()==="text")},first:$n(function(){return[0]}),last:$n(function(fe,De){return[De-1]}),eq:$n(function(fe,De,Ze){return[Ze<0?Ze+De:Ze]}),even:$n(function(fe,De){for(var Ze=0;Ze<De;Ze+=2)fe.push(Ze);return fe}),odd:$n(function(fe,De){for(var Ze=1;Ze<De;Ze+=2)fe.push(Ze);return fe}),lt:$n(function(fe,De,Ze){var it;for(Ze<0?it=Ze+De:Ze>De?it=De:it=Ze;--it>=0;)fe.push(it);return fe}),gt:$n(function(fe,De,Ze){for(var it=Ze<0?Ze+De:Ze;++it<De;)fe.push(it);return fe})}},S.pseudos.nth=S.pseudos.eq;for(_ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})S.pseudos[_]=Po(_);for(_ in{submit:!0,reset:!0})S.pseudos[_]=Eo(_);function qa(){}qa.prototype=S.filters=S.pseudos,S.setFilters=new qa;function Ds(fe,De){var Ze,it,ht,Dt,Lt,Ot,Bt,fi=ni[fe+" "];if(fi)return De?0:fi.slice(0);for(Lt=fe,Ot=[],Bt=S.preFilter;Lt;){(!Ze||(it=rr.exec(Lt)))&&(it&&(Lt=Lt.slice(it[0].length)||Lt),Ot.push(ht=[])),Ze=!1,(it=sa.exec(Lt))&&(Ze=it.shift(),ht.push({value:Ze,type:it[0].replace(Je," ")}),Lt=Lt.slice(Ze.length));for(Dt in S.filter)(it=vn[Dt].exec(Lt))&&(!Bt[Dt]||(it=Bt[Dt](it)))&&(Ze=it.shift(),ht.push({value:Ze,type:Dt,matches:it}),Lt=Lt.slice(Ze.length));if(!Ze)break}return De?Lt.length:Lt?Ci.error(fe):ni(fe,Ot).slice(0)}function Ta(fe){for(var De=0,Ze=fe.length,it="";De<Ze;De++)it+=fe[De].value;return it}function _i(fe,De,Ze){var it=De.dir,ht=De.next,Dt=ht||it,Lt=Ze&&Dt==="parentNode",Ot=Pt++;return De.first?function(Bt,fi,Qt){for(;Bt=Bt[it];)if(Bt.nodeType===1||Lt)return fe(Bt,fi,Qt);return!1}:function(Bt,fi,Qt){var Jt,ui,Xt=[We,Ot];if(Qt){for(;Bt=Bt[it];)if((Bt.nodeType===1||Lt)&&fe(Bt,fi,Qt))return!0}else for(;Bt=Bt[it];)if(Bt.nodeType===1||Lt)if(ui=Bt[dt]||(Bt[dt]={}),ht&&Oe(Bt,ht))Bt=Bt[it]||Bt;else{if((Jt=ui[Dt])&&Jt[0]===We&&Jt[1]===Ot)return Xt[2]=Jt[2];if(ui[Dt]=Xt,Xt[2]=fe(Bt,fi,Qt))return!0}return!1}}function es(fe){return fe.length>1?function(De,Ze,it){for(var ht=fe.length;ht--;)if(!fe[ht](De,Ze,it))return!1;return!0}:fe[0]}function Co(fe,De,Ze){for(var it=0,ht=De.length;it<ht;it++)Ci(fe,De[it],Ze);return Ze}function Za(fe,De,Ze,it,ht){for(var Dt,Lt=[],Ot=0,Bt=fe.length,fi=De!=null;Ot<Bt;Ot++)(Dt=fe[Ot])&&(!Ze||Ze(Dt,it,ht))&&(Lt.push(Dt),fi&&De.push(Ot));return Lt}function Io(fe,De,Ze,it,ht,Dt){return it&&!it[dt]&&(it=Io(it)),ht&&!ht[dt]&&(ht=Io(ht,Dt)),xn(function(Lt,Ot,Bt,fi){var Qt,Jt,ui,Xt,Ii=[],Dr=[],kr=Ot.length,Lr=Lt||Co(De||"*",Bt.nodeType?[Bt]:Bt,[]),Qr=fe&&(Lt||!De)?Za(Lr,Ii,fe,Bt,fi):Lr;if(Ze?(Xt=ht||(Lt?fe:kr||it)?[]:Ot,Ze(Qr,Xt,Bt,fi)):Xt=Qr,it)for(Qt=Za(Xt,Dr),it(Qt,[],Bt,fi),Jt=Qt.length;Jt--;)(ui=Qt[Jt])&&(Xt[Dr[Jt]]=!(Qr[Dr[Jt]]=ui));if(Lt){if(ht||fe){if(ht){for(Qt=[],Jt=Xt.length;Jt--;)(ui=Xt[Jt])&&Qt.push(Qr[Jt]=ui);ht(null,Xt=[],Qt,fi)}for(Jt=Xt.length;Jt--;)(ui=Xt[Jt])&&(Qt=ht?F.call(Lt,ui):Ii[Jt])>-1&&(Lt[Qt]=!(Ot[Qt]=ui))}}else Xt=Za(Xt===Ot?Xt.splice(kr,Xt.length):Xt),ht?ht(null,Ot,Xt,fi):X.apply(Ot,Xt)})}function Ao(fe){for(var De,Ze,it,ht=fe.length,Dt=S.relative[fe[0].type],Lt=Dt||S.relative[" "],Ot=Dt?1:0,Bt=_i(function(Jt){return Jt===De},Lt,!0),fi=_i(function(Jt){return F.call(De,Jt)>-1},Lt,!0),Qt=[function(Jt,ui,Xt){var Ii=!Dt&&(Xt||ui!=I)||((De=ui).nodeType?Bt(Jt,ui,Xt):fi(Jt,ui,Xt));return De=null,Ii}];Ot<ht;Ot++)if(Ze=S.relative[fe[Ot].type])Qt=[_i(es(Qt),Ze)];else{if(Ze=S.filter[fe[Ot].type].apply(null,fe[Ot].matches),Ze[dt]){for(it=++Ot;it<ht&&!S.relative[fe[it].type];it++);return Io(Ot>1&&es(Qt),Ot>1&&Ta(fe.slice(0,Ot-1).concat({value:fe[Ot-2].type===" "?"*":""})).replace(Je,"$1"),Ze,Ot<it&&Ao(fe.slice(Ot,it)),it<ht&&Ao(fe=fe.slice(it)),it<ht&&Ta(fe))}Qt.push(Ze)}return es(Qt)}function ql(fe,De){var Ze=De.length>0,it=fe.length>0,ht=function(Dt,Lt,Ot,Bt,fi){var Qt,Jt,ui,Xt=0,Ii="0",Dr=Dt&&[],kr=[],Lr=I,Qr=Dt||it&&S.find.TAG("*",fi),ks=We+=Lr==null?1:Math.random()||.1,zr=Qr.length;for(fi&&(I=Lt==te||Lt||fi);Ii!==zr&&(Qt=Qr[Ii])!=null;Ii++){if(it&&Qt){for(Jt=0,!Lt&&Qt.ownerDocument!=te&&(Vn(Qt),Ot=!_e);ui=fe[Jt++];)if(ui(Qt,Lt||te,Ot)){X.call(Bt,Qt);break}fi&&(We=ks)}Ze&&((Qt=!ui&&Qt)&&Xt--,Dt&&Dr.push(Qt))}if(Xt+=Ii,Ze&&Ii!==Xt){for(Jt=0;ui=De[Jt++];)ui(Dr,kr,Lt,Ot);if(Dt){if(Xt>0)for(;Ii--;)Dr[Ii]||kr[Ii]||(kr[Ii]=qe.call(Bt));kr=Za(kr)}X.apply(Bt,kr),fi&&!Dt&&kr.length>0&&Xt+De.length>1&&M.uniqueSort(Bt)}return fi&&(We=ks,I=Lr),Dr};return Ze?xn(ht):ht}function Wa(fe,De){var Ze,it=[],ht=[],Dt=ci[fe+" "];if(!Dt){for(De||(De=Ds(fe)),Ze=De.length;Ze--;)Dt=Ao(De[Ze]),Dt[dt]?it.push(Dt):ht.push(Dt);Dt=ci(fe,ql(ht,it)),Dt.selector=fe}return Dt}function sl(fe,De,Ze,it){var ht,Dt,Lt,Ot,Bt,fi=typeof fe=="function"&&fe,Qt=!it&&Ds(fe=fi.selector||fe);if(Ze=Ze||[],Qt.length===1){if(Dt=Qt[0]=Qt[0].slice(0),Dt.length>2&&(Lt=Dt[0]).type==="ID"&&De.nodeType===9&&_e&&S.relative[Dt[1].type]){if(De=(S.find.ID(Lt.matches[0].replace(bn,jn),De)||[])[0],De)fi&&(De=De.parentNode);else return Ze;fe=fe.slice(Dt.shift().value.length)}for(ht=vn.needsContext.test(fe)?0:Dt.length;ht--&&(Lt=Dt[ht],!S.relative[Ot=Lt.type]);)if((Bt=S.find[Ot])&&(it=Bt(Lt.matches[0].replace(bn,jn),Qn.test(Dt[0].type)&&wn(De.parentNode)||De))){if(Dt.splice(ht,1),fe=it.length&&Ta(Dt),!fe)return X.apply(Ze,it),Ze;break}}return(fi||Wa(fe,Qt))(it,De,!_e,Ze,!De||Qn.test(fe)&&wn(De.parentNode)||De),Ze}re.sortStable=dt.split("").sort(er).join("")===dt,Vn(),re.sortDetached=ms(function(fe){return fe.compareDocumentPosition(te.createElement("fieldset"))&1}),M.find=Ci,M.expr[":"]=M.expr.pseudos,M.unique=M.uniqueSort,Ci.compile=Wa,Ci.select=sl,Ci.setDocument=Vn,Ci.tokenize=Ds,Ci.escape=M.escapeSelector,Ci.getText=M.text,Ci.isXML=M.isXMLDoc,Ci.selectors=M.expr,Ci.support=M.support,Ci.uniqueSort=M.uniqueSort})();var Xe=function(_,S,I){for(var D=[],Z=I!==void 0;(_=_[S])&&_.nodeType!==9;)if(_.nodeType===1){if(Z&&M(_).is(I))break;D.push(_)}return D},At=function(_,S){for(var I=[];_;_=_.nextSibling)_.nodeType===1&&_!==S&&I.push(_);return I},Yt=M.expr.match.needsContext,xi=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Pi(_,S,I){return j(S)?M.grep(_,function(D,Z){return!!S.call(D,Z,D)!==I}):S.nodeType?M.grep(_,function(D){return D===S!==I}):typeof S!="string"?M.grep(_,function(D){return F.call(S,D)>-1!==I}):M.filter(S,_,I)}M.filter=function(_,S,I){var D=S[0];return I&&(_=":not("+_+")"),S.length===1&&D.nodeType===1?M.find.matchesSelector(D,_)?[D]:[]:M.find.matches(_,M.grep(S,function(Z){return Z.nodeType===1}))},M.fn.extend({find:function(_){var S,I,D=this.length,Z=this;if(typeof _!="string")return this.pushStack(M(_).filter(function(){for(S=0;S<D;S++)if(M.contains(Z[S],this))return!0}));for(I=this.pushStack([]),S=0;S<D;S++)M.find(_,Z[S],I);return D>1?M.uniqueSort(I):I},filter:function(_){return this.pushStack(Pi(this,_||[],!1))},not:function(_){return this.pushStack(Pi(this,_||[],!0))},is:function(_){return!!Pi(this,typeof _=="string"&&Yt.test(_)?M(_):_||[],!1).length}});var Ai,ln=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,wt=M.fn.init=function(_,S,I){var D,Z;if(!_)return this;if(I=I||Ai,typeof _=="string")if(_[0]==="<"&&_[_.length-1]===">"&&_.length>=3?D=[null,_,null]:D=ln.exec(_),D&&(D[1]||!S))if(D[1]){if(S=S instanceof M?S[0]:S,M.merge(this,M.parseHTML(D[1],S&&S.nodeType?S.ownerDocument||S:ae,!0)),xi.test(D[1])&&M.isPlainObject(S))for(D in S)j(this[D])?this[D](S[D]):this.attr(D,S[D]);return this}else return Z=ae.getElementById(D[2]),Z&&(this[0]=Z,this.length=1),this;else return!S||S.jquery?(S||I).find(_):this.constructor(S).find(_);else{if(_.nodeType)return this[0]=_,this.length=1,this;if(j(_))return I.ready!==void 0?I.ready(_):_(M)}return M.makeArray(_,this)};wt.prototype=M.fn,Ai=M(ae);var yt=/^(?:parents|prev(?:Until|All))/,Tt={children:!0,contents:!0,next:!0,prev:!0};M.fn.extend({has:function(_){var S=M(_,this),I=S.length;return this.filter(function(){for(var D=0;D<I;D++)if(M.contains(this,S[D]))return!0})},closest:function(_,S){var I,D=0,Z=this.length,X=[],te=typeof _!="string"&&M(_);if(!Yt.test(_)){for(;D<Z;D++)for(I=this[D];I&&I!==S;I=I.parentNode)if(I.nodeType<11&&(te?te.index(I)>-1:I.nodeType===1&&M.find.matchesSelector(I,_))){X.push(I);break}}return this.pushStack(X.length>1?M.uniqueSort(X):X)},index:function(_){return _?typeof _=="string"?F.call(M(_),this[0]):F.call(this,_.jquery?_[0]:_):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(_,S){return this.pushStack(M.uniqueSort(M.merge(this.get(),M(_,S))))},addBack:function(_){return this.add(_==null?this.prevObject:this.prevObject.filter(_))}});function oi(_,S){for(;(_=_[S])&&_.nodeType!==1;);return _}M.each({parent:function(_){var S=_.parentNode;return S&&S.nodeType!==11?S:null},parents:function(_){return Xe(_,"parentNode")},parentsUntil:function(_,S,I){return Xe(_,"parentNode",I)},next:function(_){return oi(_,"nextSibling")},prev:function(_){return oi(_,"previousSibling")},nextAll:function(_){return Xe(_,"nextSibling")},prevAll:function(_){return Xe(_,"previousSibling")},nextUntil:function(_,S,I){return Xe(_,"nextSibling",I)},prevUntil:function(_,S,I){return Xe(_,"previousSibling",I)},siblings:function(_){return At((_.parentNode||{}).firstChild,_)},children:function(_){return At(_.firstChild)},contents:function(_){return _.contentDocument!=null&&b(_.contentDocument)?_.contentDocument:(Oe(_,"template")&&(_=_.content||_),M.merge([],_.childNodes))}},function(_,S){M.fn[_]=function(I,D){var Z=M.map(this,S,I);return _.slice(-5)!=="Until"&&(D=I),D&&typeof D=="string"&&(Z=M.filter(D,Z)),this.length>1&&(Tt[_]||M.uniqueSort(Z),yt.test(_)&&Z.reverse()),this.pushStack(Z)}});var si=/[^\x20\t\r\n\f]+/g;function Di(_){var S={};return M.each(_.match(si)||[],function(I,D){S[D]=!0}),S}M.Callbacks=function(_){_=typeof _=="string"?Di(_):M.extend({},_);var S,I,D,Z,X=[],te=[],Te=-1,_e=function(){for(Z=Z||_.once,D=S=!0;te.length;Te=-1)for(I=te.shift();++Te<X.length;)X[Te].apply(I[0],I[1])===!1&&_.stopOnFalse&&(Te=X.length,I=!1);_.memory||(I=!1),S=!1,Z&&(I?X=[]:X="")},Fe={add:function(){return X&&(I&&!S&&(Te=X.length-1,te.push(I)),function rt(dt){M.each(dt,function(We,Pt){j(Pt)?(!_.unique||!Fe.has(Pt))&&X.push(Pt):Pt&&Pt.length&&le(Pt)!=="string"&&rt(Pt)})}(arguments),I&&!S&&_e()),this},remove:function(){return M.each(arguments,function(rt,dt){for(var We;(We=M.inArray(dt,X,We))>-1;)X.splice(We,1),We<=Te&&Te--}),this},has:function(rt){return rt?M.inArray(rt,X)>-1:X.length>0},empty:function(){return X&&(X=[]),this},disable:function(){return Z=te=[],X=I="",this},disabled:function(){return!X},lock:function(){return Z=te=[],!I&&!S&&(X=I=""),this},locked:function(){return!!Z},fireWith:function(rt,dt){return Z||(dt=dt||[],dt=[rt,dt.slice?dt.slice():dt],te.push(dt),S||_e()),this},fire:function(){return Fe.fireWith(this,arguments),this},fired:function(){return!!D}};return Fe};function Ki(_){return _}function wi(_){throw _}function Mr(_,S,I,D){var Z;try{_&&j(Z=_.promise)?Z.call(_).done(S).fail(I):_&&j(Z=_.then)?Z.call(_,S,I):S.apply(void 0,[_].slice(D))}catch(X){I.apply(void 0,[X])}}M.extend({Deferred:function(_){var S=[["notify","progress",M.Callbacks("memory"),M.Callbacks("memory"),2],["resolve","done",M.Callbacks("once memory"),M.Callbacks("once memory"),0,"resolved"],["reject","fail",M.Callbacks("once memory"),M.Callbacks("once memory"),1,"rejected"]],I="pending",D={state:function(){return I},always:function(){return Z.done(arguments).fail(arguments),this},catch:function(X){return D.then(null,X)},pipe:function(){var X=arguments;return M.Deferred(function(te){M.each(S,function(Te,_e){var Fe=j(X[_e[4]])&&X[_e[4]];Z[_e[1]](function(){var rt=Fe&&Fe.apply(this,arguments);rt&&j(rt.promise)?rt.promise().progress(te.notify).done(te.resolve).fail(te.reject):te[_e[0]+"With"](this,Fe?[rt]:arguments)})}),X=null}).promise()},then:function(X,te,Te){var _e=0;function Fe(rt,dt,We,Pt){return function(){var ei=this,ni=arguments,ci=function(){var er,Jr;if(!(rt<_e)){if(er=We.apply(ei,ni),er===dt.promise())throw new TypeError("Thenable self-resolution");Jr=er&&(typeof er=="object"||typeof er=="function")&&er.then,j(Jr)?Pt?Jr.call(er,Fe(_e,dt,Ki,Pt),Fe(_e,dt,wi,Pt)):(_e++,Jr.call(er,Fe(_e,dt,Ki,Pt),Fe(_e,dt,wi,Pt),Fe(_e,dt,Ki,dt.notifyWith))):(We!==Ki&&(ei=void 0,ni=[er]),(Pt||dt.resolveWith)(ei,ni))}},ir=Pt?ci:function(){try{ci()}catch(er){M.Deferred.exceptionHook&&M.Deferred.exceptionHook(er,ir.error),rt+1>=_e&&(We!==wi&&(ei=void 0,ni=[er]),dt.rejectWith(ei,ni))}};rt?ir():(M.Deferred.getErrorHook?ir.error=M.Deferred.getErrorHook():M.Deferred.getStackHook&&(ir.error=M.Deferred.getStackHook()),p.setTimeout(ir))}}return M.Deferred(function(rt){S[0][3].add(Fe(0,rt,j(Te)?Te:Ki,rt.notifyWith)),S[1][3].add(Fe(0,rt,j(X)?X:Ki)),S[2][3].add(Fe(0,rt,j(te)?te:wi))}).promise()},promise:function(X){return X!=null?M.extend(X,D):D}},Z={};return M.each(S,function(X,te){var Te=te[2],_e=te[5];D[te[1]]=Te.add,_e&&Te.add(function(){I=_e},S[3-X][2].disable,S[3-X][3].disable,S[0][2].lock,S[0][3].lock),Te.add(te[3].fire),Z[te[0]]=function(){return Z[te[0]+"With"](this===Z?void 0:this,arguments),this},Z[te[0]+"With"]=Te.fireWith}),D.promise(Z),_&&_.call(Z,Z),Z},when:function(_){var S=arguments.length,I=S,D=Array(I),Z=y.call(arguments),X=M.Deferred(),te=function(Te){return function(_e){D[Te]=this,Z[Te]=arguments.length>1?y.call(arguments):_e,--S||X.resolveWith(D,Z)}};if(S<=1&&(Mr(_,X.done(te(I)).resolve,X.reject,!S),X.state()==="pending"||j(Z[I]&&Z[I].then)))return X.then();for(;I--;)Mr(Z[I],te(I),X.reject);return X.promise()}});var qi=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;M.Deferred.exceptionHook=function(_,S){p.console&&p.console.warn&&_&&qi.test(_.name)&&p.console.warn("jQuery.Deferred exception: "+_.message,_.stack,S)},M.readyException=function(_){p.setTimeout(function(){throw _})};var Ui=M.Deferred();M.fn.ready=function(_){return Ui.then(_).catch(function(S){M.readyException(S)}),this},M.extend({isReady:!1,readyWait:1,ready:function(_){(_===!0?--M.readyWait:M.isReady)||(M.isReady=!0,!(_!==!0&&--M.readyWait>0)&&Ui.resolveWith(ae,[M]))}}),M.ready.then=Ui.then;function Cr(){ae.removeEventListener("DOMContentLoaded",Cr),p.removeEventListener("load",Cr),M.ready()}ae.readyState==="complete"||ae.readyState!=="loading"&&!ae.documentElement.doScroll?p.setTimeout(
vendor: 5,335 bytes, line 1
1M.ready):(ae.addEventListener("DOMContentLoaded",Cr),p.addEventListener("load",Cr));var sr=function(_,S,I,D,Z,X,te){var Te=0,_e=_.length,Fe=I==null;if(le(I)==="object"){Z=!0;for(Te in I)sr(_,S,Te,I[Te],!0,X,te)}else if(D!==void 0&&(Z=!0,j(D)||(te=!0),Fe&&(te?(S.call(_,D),S=null):(Fe=S,S=function(rt,dt,We){return Fe.call(M(rt),We)})),S))for(;Te<_e;Te++)S(_[Te],I,te?D:D.call(_[Te],Te,S(_[Te],I)));return Z?_:Fe?S.call(_):_e?S(_[0],I):X},Sr=/^-ms-/,Tr=/-([a-z])/g;function Mn(_,S){return S.toUpperCase()}function pr(_){return _.replace(Sr,"ms-").replace(Tr,Mn)}var cn=function(_){return _.nodeType===1||_.nodeType===9||!+_.nodeType};function Yr(){this.expando=M.expando+Yr.uid++}Yr.uid=1,Yr.prototype={cache:function(_){var S=_[this.expando];return S||(S={},cn(_)&&(_.nodeType?_[this.expando]=S:Object.defineProperty(_,this.expando,{value:S,configurable:!0}))),S},set:function(_,S,I){var D,Z=this.cache(_);if(typeof S=="string")Z[pr(S)]=I;else for(D in S)Z[pr(D)]=S[D];return Z},get:function(_,S){return S===void 0?this.cache(_):_[this.expando]&&_[this.expando][pr(S)]},access:function(_,S,I){return S===void 0||S&&typeof S=="string"&&I===void 0?this.get(_,S):(this.set(_,S,I),I!==void 0?I:S)},remove:function(_,S){var I,D=_[this.expando];if(D!==void 0){if(S!==void 0)for(Array.isArray(S)?S=S.map(pr):(S=pr(S),S=S in D?[S]:S.match(si)||[]),I=S.length;I--;)delete D[S[I]];(S===void 0||M.isEmptyObject(D))&&(_.nodeType?_[this.expando]=void 0:delete _[this.expando])}},hasData:function(_){var S=_[this.expando];return S!==void 0&&!M.isEmptyObject(S)}};var jt=new Yr,Ji=new Yr,un=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ir=/[A-Z]/g;function gn(_){return _==="true"?!0:_==="false"?!1:_==="null"?null:_===+_+""?+_:un.test(_)?JSON.parse(_):_}function hn(_,S,I){var D;if(I===void 0&&_.nodeType===1)if(D="data-"+S.replace(Ir,"-$&").toLowerCase(),I=_.getAttribute(D),typeof I=="string"){try{I=gn(I)}catch{}Ji.set(_,S,I)}else I=void 0;return I}M.extend({hasData:function(_){return Ji.hasData(_)||jt.hasData(_)},data:function(_,S,I){return Ji.access(_,S,I)},removeData:function(_,S){Ji.remove(_,S)},_data:function(_,S,I){return jt.access(_,S,I)},_removeData:function(_,S){jt.remove(_,S)}}),M.fn.extend({data:function(_,S){var I,D,Z,X=this[0],te=X&&X.attributes;if(_===void 0){if(this.length&&(Z=Ji.get(X),X.nodeType===1&&!jt.get(X,"hasDataAttrs"))){for(I=te.length;I--;)te[I]&&(D=te[I].name,D.indexOf("data-")===0&&(D=pr(D.slice(5)),hn(X,D,Z[D])));jt.set(X,"hasDataAttrs",!0)}return Z}return typeof _=="object"?this.each(function(){Ji.set(this,_)}):sr(this,function(Te){var _e;if(X&&Te===void 0)return _e=Ji.get(X,_),_e!==void 0||(_e=hn(X,_),_e!==void 0)?_e:void 0;this.each(function(){Ji.set(this,_,Te)})},null,S,arguments.length>1,null,!0)},removeData:function(_){return this.each(function(){Ji.remove(this,_)})}}),M.extend({queue:function(_,S,I){var D;if(_)return S=(S||"fx")+"queue",D=jt.get(_,S),I&&(!D||Array.isArray(I)?D=jt.access(_,S,M.makeArray(I)):D.push(I)),D||[]},dequeue:function(_,S){S=S||"fx";var I=M.queue(_,S),D=I.length,Z=I.shift(),X=M._queueHooks(_,S),te=function(){M.dequeue(_,S)};Z==="inprogress"&&(Z=I.shift(),D--),Z&&(S==="fx"&&I.unshift("inprogress"),delete X.stop,Z.call(_,te,X)),!D&&X&&X.empty.fire()},_queueHooks:function(_,S){var I=S+"queueHooks";return jt.get(_,I)||jt.access(_,I,{empty:M.Callbacks("once memory").add(function(){jt.remove(_,[S+"queue",I])})})}}),M.fn.extend({queue:function(_,S){var I=2;return typeof _!="string"&&(S=_,_="fx",I--),arguments.length<I?M.queue(this[0],_):S===void 0?this:this.each(function(){var D=M.queue(this,_,S);M._queueHooks(this,_),_==="fx"&&D[0]!=="inprogress"&&M.dequeue(this,_)})},dequeue:function(_){return this.each(function(){M.dequeue(this,_)})},clearQueue:function(_){return this.queue(_||"fx",[])},promise:function(_,S){var I,D=1,Z=M.Deferred(),X=this,te=this.length,Te=function(){--D||Z.resolveWith(X,[X])};for(typeof _!="string"&&(S=_,_=void 0),_=_||"fx";te--;)I=jt.get(X[te],_+"queueHooks"),I&&I.empty&&(D++,I.empty.add(Te));return Te(),Z.promise(S)}});var Zs=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,os=new RegExp("^(?:([+-])=|)("+Zs+")([a-z%]*)$","i"),Ar=["Top","Right","Bottom","Left"],Re=ae.documentElement,J=function(_){return M.contains(_.ownerDocument,_)},ie={composed:!0};Re.getRootNode&&(J=function(_){return M.contains(_.ownerDocument,_)||_.getRootNode(ie)===_.ownerDocument});var W=function(_,S){return _=S||_,_.style.display==="none"||_.style.display===""&&J(_)&&M.css(_,"display")==="none"};function ve(_,S,I,D){var Z,X,te=20,Te=D?function(){return D.cur()}:function(){return M.css(_,S,"")},_e=Te(),Fe=I&&I[3]||(M.cssNumber[S]?"":"px"),rt=_.nodeType&&(M.cssNumber[S]||Fe!=="px"&&+_e)&&os.exec(M.css(_,S));if(rt&&rt[3]!==Fe){for(_e=_e/2,Fe=Fe||rt[3],rt=+_e||1;te--;)M.style(_,S,rt+Fe),(1-X)*(1-(X=Te()/_e||.5))<=0&&(te=0),rt=rt/X;rt=rt*2,M.style(_,S,rt+Fe),I=I||[]}return I&&(rt=+rt||+_e||0,Z=I[1]?rt+(I[1]+1)*I[2]:+I[2],D&&(D.unit=Fe,D.start=rt,D.end=Z)),Z}var Ie={};function Ee(_){var S,I=_.ownerDocument,D=_.nodeName,Z=Ie[D];return Z||(S=I.body.appendChild(I.createElement(D)),Z=M.css(S,"display"),S.parentNode.removeChild(S),Z==="none"&&(Z="block"),Ie[D]=Z,Z)}function je(_,S){for(var I,D,Z=[],X=0,te=_.length;X<te;X++)D=_[X],D.style&&(I=D.style.display,S?(I==="none"&&(Z[X]=jt.get(D,"display")||null,Z[X]||(D.style.display="")),D.style.display===""&&W(D)&&
vendor: 4,130 bytes, line 1
1(Z[X]=Ee(D))):I!=="none"&&(Z[X]="none",jt.set(D,"display",I)));for(X=0;X<te;X++)Z[X]!=null&&(_[X].style.display=Z[X]);return _}M.fn.extend({show:function(){return je(this,!0)},hide:function(){return je(this)},toggle:function(_){return typeof _=="boolean"?_?this.show():this.hide():this.each(function(){W(this)?M(this).show():M(this).hide()})}});var ke=/^(?:checkbox|radio)$/i,st=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,et=/^$|^module$|\/(?:java|ecma)script/i;(function(){var _=ae.createDocumentFragment(),S=_.appendChild(ae.createElement("div")),I=ae.createElement("input");I.setAttribute("type","radio"),I.setAttribute("checked","checked"),I.setAttribute("name","t"),S.appendChild(I),re.checkClone=S.cloneNode(!0).cloneNode(!0).lastChild.checked,S.innerHTML="<textarea>x</textarea>",re.noCloneChecked=!!S.cloneNode(!0).lastChild.defaultValue,S.innerHTML="<option></option>",re.option=!!S.lastChild})();var Be={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Be.tbody=Be.tfoot=Be.colgroup=Be.caption=Be.thead,Be.th=Be.td,re.option||(Be.optgroup=Be.option=[1,"<select multiple='multiple'>","</select>"]);function lt(_,S){var I;return typeof _.getElementsByTagName<"u"?I=_.getElementsByTagName(S||"*"):typeof _.querySelectorAll<"u"?I=_.querySelectorAll(S||"*"):I=[],S===void 0||S&&Oe(_,S)?M.merge([_],I):I}function Ct(_,S){for(var I=0,D=_.length;I<D;I++)jt.set(_[I],"globalEval",!S||jt.get(S[I],"globalEval"))}var kt=/<|&#?\w+;/;function tt(_,S,I,D,Z){for(var X,te,Te,_e,Fe,rt,dt=S.createDocumentFragment(),We=[],Pt=0,ei=_.length;Pt<ei;Pt++)if(X=_[Pt],X||X===0)if(le(X)==="object")M.merge(We,X.nodeType?[X]:X);else if(!kt.test(X))We.push(S.createTextNode(X));else{for(te=te||dt.appendChild(S.createElement("div")),Te=(st.exec(X)||["",""])[1].toLowerCase(),_e=Be[Te]||Be._default,te.innerHTML=_e[1]+M.htmlPrefilter(X)+_e[2],rt=_e[0];rt--;)te=te.lastChild;M.merge(We,te.childNodes),te=dt.firstChild,te.textContent=""}for(dt.textContent="",Pt=0;X=We[Pt++];){if(D&&M.inArray(X,D)>-1){Z&&Z.push(X);continue}if(Fe=J(X),te=lt(dt.appendChild(X),"script"),Fe&&Ct(te),I)for(rt=0;X=te[rt++];)et.test(X.type||"")&&I.push(X)}return dt}var Kt=/^([^.]*)(?:\.(.+)|)/;function Vt(){return!0}function Ht(){return!1}function di(_,S,I,D,Z,X){var te,Te;if(typeof S=="object"){typeof I!="string"&&(D=D||I,I=void 0);for(Te in S)di(_,Te,I,D,S[Te],X);return _}if(D==null&&Z==null?(Z=I,D=I=void 0):Z==null&&(typeof I=="string"?(Z=D,D=void 0):(Z=D,D=I,I=void 0)),Z===!1)Z=Ht;else if(!Z)return _;return X===1&&(te=Z,Z=function(_e){return M().off(_e),te.apply(this,arguments)},Z.guid=te.guid||(te.guid=M.guid++)),_.each(function(){M.event.add(this,S,Z,D,I)})}M.event={global:{},add:function(_,S,I,D,Z){var X,te,Te,_e,Fe,rt,dt,We,Pt,ei,ni,ci=jt.get(_);if(cn(_))for(I.handler&&(X=I,I=X.handler,Z=X.selector),Z&&M.find.matchesSelector(Re,Z),I.guid||(I.guid=M.guid++),(_e=ci.events)||(_e=ci.events=Object.create(null)),(te=ci.handle)||(te=ci.handle=function(ir){return typeof M<"u"&&M.event.triggered!==ir.type?M.event.dispatch.apply(_,arguments):void 0}),S=(S||"").match(si)||[""],Fe=S.length;Fe--;)Te=Kt.exec(S[Fe])||[],Pt=ni=Te[1],ei=(Te[2]||"").split(".").sort(),Pt&&(dt=M.event.special[Pt]||{},Pt=(Z?dt.delegateType:dt.bindType)||Pt,dt=M.event.special[Pt]||{},rt=M.extend({type:Pt,origType:ni,data:D,handler:I,guid:I.guid,selector:Z,needsContext:Z&&M.expr.match.needsContext.test(Z),namespace:ei.join(".")},X),(We=_e[Pt])||(We=_e[Pt]=[],We.delegateCount=0,(!dt.setup||dt.setup.call(_,D,ei,te)===!1)&&_.addEventListener&&_.addEventListener(Pt,te)),dt.add&&(dt.add.call(_,rt),rt.handler.guid||(rt.handler.guid=I.guid)),Z?We.splice(We.delegateCount++,0,rt):We.push(rt),M.event.global[Pt]=!0)},remove:function(_,S,I,D,Z){var X,te,Te,_e,Fe,rt,dt,We,Pt,ei,ni,ci=jt.hasData(_)&&jt.get(_);if(!(!ci||!(_e=ci.events))){for(S=(S||"").match(si)||[""],Fe=S.length;Fe--;){if(Te=Kt.exec(S[Fe])||[],Pt=ni=Te[1],ei=(Te[2]||"").split(".").sort(),!Pt){for(Pt in _e)M.event.remove(_,Pt+S[Fe],I,D,!0);continue}for(dt=M.event.special[Pt]||{}
1,Pt=(D?dt.delegateType:dt.bindType)||Pt,We=_e[Pt]||[],Te=Te[2]&&new RegExp("(^|\\.)"+ei.join("\\.(?:.*\\.|)")+"(\\.|$)"),te=X=We.length;X--;)rt=We[X],(Z||ni===rt.origType)&&(!I||I.guid===rt.guid)&&(!Te||Te.test(rt.namespace))&&(!D||D===rt.selector||D==="**"&&rt.selector)&&(We.splice(X,1),rt.selector&&We.delegateCount--,dt.remove&&dt.remove.call(_,rt));te&&!We.length&&((!dt.teardown||dt.teardown.call(_,ei,ci.handle)===!1)&&M.removeEvent(_,Pt,ci.handle),delete _e[Pt])}M.isEmptyObject(_e)&&jt.remove(_,"handle events")}},dispatch:function(_){var S,I,D,Z,X,te,Te=new Array(arguments.length),_e=M.event.fix(_),Fe=(jt.get(this,"events")||Object.create(null))[_e.type]||[],rt=M.event.special[_e.type]||{};for(Te[0]=_e,S=1;S<arguments.length;S++)Te[S]=arguments[S];if(_e.delegateTarget=this,!(rt.preDispatch&&rt.preDispatch.call(this,_e)===!1)){for(te=M.event.handlers.call(this,_e,Fe),S=0;(Z=te[S++])&&!_e.isPropagationStopped();)for(_e.currentTarget=Z.elem,I=0;(X=Z.handlers[I++])&&!_e.isImmediatePropagationStopped();)(!_e.rnamespace||X.namespace===!1||_e.rnamespace.test(X.namespace))&&(_e.handleObj=X,_e.data=X.data,D=((M.event.special[X.origType]||{}).handle||X.handler).apply(Z.elem,Te),D!==void 0&&(_e.result=D)===!1&&(_e.preventDefault(),_e.stopPropagation()));return rt.postDispatch&&rt.postDispatch.call(this,_e),_e.result}},handlers:function(_,S){var I,D,Z,X,te,Te=[],_e=S.delegateCount,Fe=_.target;if(_e&&Fe.nodeType&&!(_.type==="click"&&_.button>=1)){for(;Fe!==this;Fe=Fe.parentNode||this)if(Fe.nodeType===1&&!(_.type==="click"&&Fe.disabled===!0)){for(X=[],te={},I=0;I<_e;I++)D=S[I],Z=D.selector+" ",te[Z]===void 0&&(te[Z]=D.needsContext?M(Z,this).index(Fe)>-1:M.find(Z,this,null,[Fe]).length),te[Z]&&X.push(D);X.length&&Te.push({elem:Fe,handlers:X})}}return Fe=this,_e<S.length&&Te.push({elem:Fe,handlers:S.slice(_e)}),Te},addProp:function(_,S){Object.defineProperty(M.Event.prototype,_,{enumerable:!0,configurable:!0,get:j(S)?function(){if(this.originalEvent)return S(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[_]},set:function(I){Object.defineProperty(this,_,{enumerable:!0,configurable:!0,writable:!0,value:I})}})},fix:function(_){return _[M.expando]?_:new M.Event(_)},special:{load:{noBubble:!0},click:{setup:function(_){var S=this||_;return ke.test(S.type)&&S.click&&Oe(S,"input")&&ft(S,"click",!0),!1},trigger:function(_){var S=this||_;return ke.test(S.type)&&S.click&&Oe(S,"input")&&ft(S,"click"),!0},_default:function(_){var S=_.target;return ke.test(S.type)&&S.click&&Oe(S,"input")&&jt.get(S,"click")||Oe(S,"a")}},beforeunload:{postDispatch:function(_){_.result!==void 0&&_.originalEvent&&(_.originalEvent.returnValue=_.result)}}}};function ft(_,S,I){if(!I){jt.get(_,S)===void 0&&M.event.add(_,S,Vt);return}jt.set(_,S,!1),M.event.add(_,S,{namespace:!1,handler:function(D){var Z,X=jt.get(this,S);if(D.isTrigger&1&&this[S]){if(X)(M.event.special[S]||{}).delegateType&&D.stopPropagation();else if(X=y.call(arguments),jt.set(this,S,X),this[S](),Z=jt.get(this,S),jt.set(this,S,!1),X!==Z)return D.stopImmediatePropagation(),D.preventDefault(),Z}else X&&(jt.set(this,S,M.event.trigger(X[0],X.slice(1),this)),D.stopPropagation(),D.isImmediatePropagationStopped=Vt)}})}M.removeEvent=function(_,S,I){_.removeEventListener&&_.removeEventListener(S,I)},M.Event=function(_,S){if(!(this instanceof M.Event))return new M.Event(_,S);_&&_.type?(this.originalEvent=_,this.type=_.type,this.isDefaultPrevented=_.defaultPrevented||_.defaultPrevented===void 0&&_.returnValue===!1?Vt:Ht,this.target=_.target&&_.target.nodeType===3?_.target.parentNode:_.target,this.currentTarget=_.currentTarget,this.relatedTarget=_.relatedTarget):this.type=_,S&&M.extend(this,S),this.timeStamp=_&&_.timeStamp||Date.now(),this[M.expando]=!0},M.Event.prototype={constructor:M.Event,isDefaultPrevented:Ht,isPropagationStopped:Ht,isImmediatePropagationStopped:Ht,isSimulated:!1,preventDefault:function(){var _=this.originalEvent;this.isDefaultPrevented=Vt,_&&!this.isSimulated&&_.preventDefault()},stopPropagation:function(){var _=this.originalEvent;this.isPropagationStopped=Vt,_&&!this.isSimulated&&_.stopPropagation()},stopImmediatePropagation:function(){var _=this.originalEvent;this.isImmediatePropagationStopped=Vt,_&&!this.isSimulated&&_.stopImmediatePropagation(),this.stopPropagation()}},M.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},M.event.addProp),M.each({focus:"focusin",blur:"focusout"},function(_,S){function I(D){if(ae.documentMode){var Z=jt.get(this,"handle"),X=M.event.fix(D);X.type=D.type==="focusin"?"focus":"blur",X.isSimulated=!0,Z(D),X.target===X.currentTarget&&Z(X)}else M.event.simulate(S,D.target,M.event.fix(D))}M.event.special[_]={setup:function(){var D;if(ft(this,_,!0),ae.documentMode)D=jt.get(this,S),D||this.addEventListener(S,I),jt.set(this,S,(D||0)+1);else return!1},trigger:function(){return ft(this,_),!0},teardown:function(){var D;if(ae.documentMode)D=jt.get(this,S)-1,D?jt.set(this,S,D):(this.removeEventListener(S,I),jt.remove(this,S));else return!1},_default:function(D){return jt.get(D.target,_)},delegateType:S},M.event.special[S]={setup:function(){var D=this.ownerDocument||this.document||this,Z=ae.documentMode?this:D,X=jt.get(Z,S);X||(ae.documentMode?this.addEventListener(S,I):D.addEventListener(_,I,!0)),jt.set(Z,S,(X||0)+1)},teardown:function(){var D=this.ownerDocument||this.document||this,Z=ae.documentMode?this:D,X=jt.get(Z,S)-1;X?jt.set(Z,S,X):(ae.documentMode?this.removeEventListener(S,I):D.removeEventListener(_,I,!0),jt.remove(Z,S))}}}
vendor: 9,845 bytes, line 1
1),M.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(_,S){M.event.special[_]={delegateType:S,bindType:S,handle:function(I){var D,Z=this,X=I.relatedTarget,te=I.handleObj;return(!X||X!==Z&&!M.contains(Z,X))&&(I.type=te.origType,D=te.handler.apply(this,arguments),I.type=S),D}}}),M.fn.extend({on:function(_,S,I,D){return di(this,_,S,I,D)},one:function(_,S,I,D){return di(this,_,S,I,D,1)},off:function(_,S,I){var D,Z;if(_&&_.preventDefault&&_.handleObj)return D=_.handleObj,M(_.delegateTarget).off(D.namespace?D.origType+"."+D.namespace:D.origType,D.selector,D.handler),this;if(typeof _=="object"){for(Z in _)this.off(Z,S,_[Z]);return this}return(S===!1||typeof S=="function")&&(I=S,S=void 0),I===!1&&(I=Ht),this.each(function(){M.event.remove(this,_,I,S)})}});var Rt=/<script|<style|<link/i,Mt=/checked\s*(?:[^=]|=\s*.checked.)/i,ti=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Zi(_,S){return Oe(_,"table")&&Oe(S.nodeType!==11?S:S.firstChild,"tr")&&M(_).children("tbody")[0]||_}function Zn(_){return _.type=(_.getAttribute("type")!==null)+"/"+_.type,_}function qt(_){return(_.type||"").slice(0,5)==="true/"?_.type=_.type.slice(5):_.removeAttribute("type"),_}function fr(_,S){var I,D,Z,X,te,Te,_e;if(S.nodeType===1){if(jt.hasData(_)&&(X=jt.get(_),_e=X.events,_e)){jt.remove(S,"handle events");for(Z in _e)for(I=0,D=_e[Z].length;I<D;I++)M.event.add(S,Z,_e[Z][I])}Ji.hasData(_)&&(te=Ji.access(_),Te=M.extend({},te),Ji.set(S,Te))}}function ji(_,S){var I=S.nodeName.toLowerCase();I==="input"&&ke.test(_.type)?S.checked=_.checked:(I==="input"||I==="textarea")&&(S.defaultValue=_.defaultValue)}function Wn(_,S,I,D){S=a(S);var Z,X,te,Te,_e,Fe,rt=0,dt=_.length,We=dt-1,Pt=S[0],ei=j(Pt);if(ei||dt>1&&typeof Pt=="string"&&!re.checkClone&&Mt.test(Pt))return _.each(function(ni){var ci=_.eq(ni);ei&&(S[0]=Pt.call(this,ni,ci.html())),Wn(ci,S,I,D)});if(dt&&(Z=tt(S,_[0].ownerDocument,!1,_,D),X=Z.firstChild,Z.childNodes.length===1&&(Z=X),X||D)){for(te=M.map(lt(Z,"script"),Zn),Te=te.length;rt<dt;rt++)_e=Z,rt!==We&&(_e=M.clone(_e,!0,!0),Te&&M.merge(te,lt(_e,"script"))),I.call(_[rt],_e,rt);if(Te)for(Fe=te[te.length-1].ownerDocument,M.map(te,qt),rt=0;rt<Te;rt++)_e=te[rt],et.test(_e.type||"")&&!jt.access(_e,"globalEval")&&M.contains(Fe,_e)&&(_e.src&&(_e.type||"").toLowerCase()!=="module"?M._evalUrl&&!_e.noModule&&M._evalUrl(_e.src,{nonce:_e.nonce||_e.getAttribute("nonce")},Fe):ce(_e.textContent.replace(ti,""),_e,Fe))}return _}function Ts(_,S,I){for(var D,Z=S?M.filter(S,_):_,X=0;(D=Z[X])!=null;X++)!I&&D.nodeType===1&&M.cleanData(lt(D)),D.parentNode&&(I&&J(D)&&Ct(lt(D,"script")),D.parentNode.removeChild(D));return _}M.extend({htmlPrefilter:function(_){return _},clone:function(_,S,I){var D,Z,X,te,Te=_.cloneNode(!0),_e=J(_);if(!re.noCloneChecked&&(_.nodeType===1||_.nodeType===11)&&!M.isXMLDoc(_))for(te=lt(Te),X=lt(_),D=0,Z=X.length;D<Z;D++)ji(X[D],te[D]);if(S)if(I)for(X=X||lt(_),te=te||lt(Te),D=0,Z=X.length;D<Z;D++)fr(X[D],te[D]);else fr(_,Te);return te=lt(Te,"script"),te.length>0&&Ct(te,!_e&<(_,"script")),Te},cleanData:function(_){for(var S,I,D,Z=M.event.special,X=0;(I=_[X])!==void 0;X++)if(cn(I)){if(S=I[jt.expando]){if(S.events)for(D in S.events)Z[D]?M.event.remove(I,D):M.removeEvent(I,D,S.handle);I[jt.expando]=void 0}I[Ji.expando]&&(I[Ji.expando]=void 0)}}}),M.fn.extend({detach:function(_){return Ts(this,_,!0)},remove:function(_){return Ts(this,_)},text:function(_){return sr(this,function(S){return S===void 0?M.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=S)})},null,_,arguments.length)},append:function(){return Wn(this,arguments,function(_){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var S=Zi(this,_);S.appendChild(_)}})},prepend:function(){return Wn(this,arguments,function(_){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var S=Zi(this,_);S.insertBefore(_,S.firstChild)}})},before:function(){return Wn(this,arguments,function(_){this.parentNode&&this.parentNode.insertBefore(_,this)})},after:function(){return Wn(this,arguments,function(_){this.parentNode&&this.parentNode.insertBefore(_,this.nextSibling)})},empty:function(){for(var _,S=0;(_=this[S])!=null;S++)_.nodeType===1&&(M.cleanData(lt(_,!1)),_.textContent="");return this},clone:function(_,S){return _=_??!1,S=S??_,this.map(function(){return M.clone(this,_,S)})},html:function(_){return sr(this,function(S){var I=this[0]||{},D=0,Z=this.length;if(S===void 0&&I.nodeType===1)return I.innerHTML;if(typeof S=="string"&&!Rt.test(S)&&!Be[(st.exec(S)||["",""])[1].toLowerCase()]){S=M.htmlPrefilter(S);try{for(;D<Z;D++)I=this[D]||{},I.nodeType===1&&(M.cleanData(lt(I,!1)),I.innerHTML=S);I=0}catch{}}I&&this.empty().append(S)},null,_,arguments.length)},replaceWith:function(){var _=[];return Wn(this,arguments,function(S){var I=this.parentNode;M.inArray(this,_)<0&&(M.cleanData(lt(this)),I&&I.replaceChild(S,this))},_)}}),M.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(_,S){M.fn[_]=function(I){for(var D,Z=[],X=M(I),te=X.length-1,Te=0;Te<=te;Te++)D=Te===te?this:this.clone(!0),M(X[Te])[S](D),z.apply(Z,D.get());return this.pushStack(Z)}});var Fn=new RegExp("^("+Zs+")(?!px)[a-z%]+$","i"),Nr=/^--/,zi=function(_){var S=_.ownerDocument.defaultView;return(!S||!S.opener)&&(S=p),S.getComputedStyle(_)},tl=function(_,S,I){var D,Z,X={};for(Z in S)X[Z]=_.style[Z],_.style[Z]=S[Z];D=I.call(_);for(Z in S)_.style[Z]=X[Z];return D},Ws=new RegExp(Ar.join("|"),"i");(function(){function _(){if(Fe){_e.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",Fe.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Re.appendChild(_e).appendChild(Fe);var rt=p.getComputedStyle(Fe);I=rt.top!=="1%",Te=S(rt.marginLeft)===12,Fe.style.right="60%",X=S(rt.right)===36,D=S(rt.width)===36,Fe.style.position="absolute",Z=S(Fe.offsetWidth/3)===12,Re.removeChild(_e),Fe=null}}function S(rt){return Math.round(parseFloat(rt))}var I,D,Z,X,te,Te,_e=ae.createElement("div"),Fe=ae.createElement("div");Fe.style&&(Fe.style.backgroundClip="content-box",Fe.cloneNode(!0).style.backgroundClip="",re.clearCloneStyle=Fe.style.backgroundClip==="content-box",M.extend(re,{boxSizingReliable:function(){return _(),D},pixelBoxStyles:function(){return _(),X},pixelPosition:function(){return _(),I},reliableMarginLeft:function(){return _(),Te},scrollboxSize:function(){return _(),Z},reliableTrDimensions:function(){var rt,dt,We,Pt;return te==null&&(rt=ae.createElement("table"),dt=ae.createElement("tr"),We=ae.createElement("div"),rt.style.cssText="position:absolute;left:-11111px;border-collapse:separate",dt.style.cssText="box-sizing:content-box;border:1px solid",dt.style.height="1px",We.style.height="9px",We.style.display="block",Re.appendChild(rt).appendChild(dt).appendChild(We),Pt=p.getComputedStyle(dt),te=parseInt(Pt.height,10)+parseInt(Pt.borderTopWidth,10)+parseInt(Pt.borderBottomWidth,10)===dt.offsetHeight,Re.removeChild(rt)),te}}))})();function Ps(_,S,I){var D,Z,X,te,Te=Nr.test(S),_e=_.style;return I=I||zi(_),I&&(te=I.getPropertyValue(S)||I[S],Te&&te&&(te=te.replace(Je,"$1")||void 0),te===""&&!J(_)&&(te=M.style(_,S)),!re.pixelBoxStyles()&&Fn.test(te)&&Ws.test(S)&&(D=_e.width,Z=_e.minWidth,X=_e.maxWidth,_e.minWidth=_e.maxWidth=_e.width=te,te=I.width,_e.width=D,_e.minWidth=Z,_e.maxWidth=X)),te!==void 0?te+"":te}function Xn(_,S){return{get:function(){if(_()){delete this.get;return}return(this.get=S).apply(this,arguments)}}}var Es=["Webkit","Moz","ms"],_o=ae.createElement("div").style,vo={};function il(_){for(var S=_[0].toUpperCase()+_.slice(1),I=Es.length;I--;)if(_=Es[I]+S,_ in _o)return _}function ls(_){var S=M.cssProps[_]||vo[_];return S||(_ in _o?_:vo[_]=il(_)||_)}var rl=/^(none|table(?!-c[ea]).+)/,Gl={position:"absolute",visibility:"hidden",display:"block"},bo={letterSpacing:"0",fontWeight:"400"};function Xs(_,S,I){var D=os.exec(S);return D?Math.max(0,D[2]-(I||0))+(D[3]||"px"):S}function $a(_,S,I,D,Z,X){var te=S==="width"?1:0,Te=0,_e=0,Fe=0;if(I===(D?"border":"content"))return 0;for(;te<4;te+=2)I==="margin"&&(Fe+=M.css(_,I+Ar[te],!0,Z)),D?(I==="content"&&(_e-=M.css(_,"padding"+Ar[te],!0,Z)),I!=="margin"&&(_e-=M.css(_,"border"+Ar[te]+"Width",!0,Z))):(_e+=M.css(_,"padding"+Ar[te],!0,Z),I!=="padding"?_e+=M.css(_,"border"+Ar[te]+"Width",!0,Z):Te+=M.css(_,"border"+Ar[te]+"Width",!0,Z));return!D&&X>=0&&(_e+=Math.max(0,Math.ceil(_["offset"+S[0].toUpperCase()+S.slice(1)]-X-_e-Te-.5))||0),_e+Fe}function xo(_,S,I){var D=zi(_),Z=!re.boxSizingReliable()||I,X=Z&&M.css(_,"boxSizing",!1,D)==="border-box",te=X,Te=Ps(_,S,D),_e="offset"+S[0].toUpperCase()+S.slice(1);if(Fn.test(Te)){if(!I)return Te;Te="auto"}return(!re.boxSizingReliable()&&X||!re.reliableTrDimensions()&&Oe(_,"tr")||Te==="auto"||!parseFloat(Te)&&M.css(_,"display",!1,D)==="inline")&&_.getClientRects().length&&(X=M.css(_,"boxSizing",!1,D)==="border-box",te=_e in _,te&&(Te=_[_e])),Te=parseFloat(Te)||0,Te+$a(_,S,I||(X?"border":"content"),te,D,Te)+"px"}M.extend({cssHooks:{opacity:{get:function(_,S){if(S){var I=Ps(_,"opacity");return I===""?"1":I}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(_,S,I,D){if(!(!_||_.nodeType===3||_.nodeType===8||!_.style)){var Z,X,te,Te=pr(S),_e=Nr.test(S),Fe=_.style;if(_e||(S=ls(Te)),te=M.cssHooks[S]||M.cssHooks[Te],I!==void 0){if(X=typeof I,X==="str
1ing"&&(Z=os.exec(I))&&Z[1]&&(I=ve(_,S,Z),X="number"),I==null||I!==I)return;X==="number"&&!_e&&(I+=Z&&Z[3]||(M.cssNumber[Te]?"":"px")),!re.clearCloneStyle&&I===""&&S.indexOf("background")===0&&(Fe[S]="inherit"),(!te||!("set"in te)||(I=te.set(_,I,D))!==void 0)&&(_e?Fe.setProperty(S,I):Fe[S]=I)}else return te&&"get"in te&&(Z=te.get(_,!1,D))!==void 0?Z:Fe[S]}},css:function(_,S,I,D){var Z,X,te,Te=pr(S),_e=Nr.test(S);return _e||(S=ls(Te)),te=M.cssHooks[S]||M.cssHooks[Te],te&&"get"in te&&(Z=te.get(_,!0,I)),Z===void 0&&(Z=Ps(_,S,D)),Z==="normal"&&S in bo&&(Z=bo[S]),I===""||I?(X=parseFloat(Z),I===!0||isFinite(X)?X||0:Z):Z}}),M.each(["height","width"],function(_,S){M.cssHooks[S]={get:function(I,D,Z){if(D)return rl.test(M.css(I,"display"))&&(!I.getClientRects().length||!I.getBoundingClientRect().width)?tl(I,Gl,function(){return xo(I,S,Z)}):xo(I,S,Z)},set:function(I,D,Z){var X,te=zi(I),Te=!re.scrollboxSize()&&te.position==="absolute",_e=Te||Z,Fe=_e&&M.css(I,"boxSizing",!1,te)==="border-box",rt=Z?$a(I,S,Z,Fe,te):0;return Fe&&Te&&(rt-=Math.ceil(I["offset"+S[0].toUpperCase()+S.slice(1)]-parseFloat(te[S])-$a(I,S,"border",!1,te)-.5)),rt&&(X=os.exec(D))&&(X[3]||"px")!=="px"&&(I.style[S]=D,D=M.css(I,S)),Xs(I,D,rt)}}}),M.cssHooks.marginLeft=Xn(re.reliableMarginLeft,function(_,S){if(S)return(parseFloat(Ps(_,"marginLeft"))||_.getBoundingClientRect().left-tl(_,{marginLeft:0},function(){return _.getBoundingClientRect().left}))+"px"}),M.each({margin:"",padding:"",border:"Width"},function(_,S){M.cssHooks[_+S]={expand:function(I){for(var D=0,Z={},X=typeof I=="string"?I.split(" "):[I];D<4;D++)Z[_+Ar[D]+S]=X[D]||X[D-2]||X[0];return Z}},_!=="margin"&&(M.cssHooks[_+S].set=Xs)}),M.fn.extend({css:function(_,S){return sr(this,function(I,D,Z){var X,te,Te={},_e=0;if(Array.isArray(D)){for(X=zi(I),te=D.length;_e<te;_e++)Te[D[_e]]=M.css(I,D[_e],!1,X);return Te}return Z!==void 0?M.style(I,D,Z):M.css(I,D)},_,S,arguments.length>1)}});function mr(_,S,I,D,Z){return new mr.prototype.init(_,S,I,D,Z)}M.Tween=mr,mr.prototype={constructor:mr,init:function(_,S,I,D,Z,X){this.elem=_,this.prop=I,this.easing=Z||M.easing._default,this.options=S,this.start=this.now=this.cur(),this.end=D,this.unit=X||(M.cssNumber[I]?"":"px")},cur:function(){var _=mr.propHooks[this.prop];return _&&_.get?_.get(this):mr.propHooks._default.get(this)},run:function(_){var S,I=mr.propHooks[this.prop];return this.options.duration?this.pos=S=M.easing[this.easing](_,this.options.duration*_,0,1,this.options.duration):this.pos=S=_,this.now=(this.end-this.start)*S+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),I&&I.set?I.set(this):mr.propHooks._default.set(this),this}},mr.prototype.init.prototype=mr.prototype,mr.propHooks={_default:{get:function(_){var S;return _.elem.nodeType!==1||_.elem[_.prop]!=null&&_.elem.style[_.prop]==null?_.elem[_.prop]:(S=M.css(_.elem,_.prop,""),!S||S==="auto"?0:S)},set:function(_){M.fx.step[_.prop]?M.fx.step[_.prop](_):_.elem.nodeType===1&&(M.cssHooks[_.prop]||_.elem.style[ls(_.prop)]!=null)?M.style(_.elem,_.prop,_.now+_.unit):_.elem[_.prop]=_.now}}},mr.propHooks.scrollTop=mr.propHooks.scrollLeft={set:function(_){_.elem.nodeType&&_.elem.parentNode&&(_.elem[_.prop]=_.now)}},M.easing={linear:function(_){return _},swing:function(_){return .5-Math.cos(_*Math.PI)/2},_default:"swing"},M.fx=mr.prototype.init,M.fx.step={};var cs,_a,wo=/^(?:toggle|show|hide)$/,Va=/queueHooks$/;function Ms(){_a&&(ae.hidden===!1&&p.requestAnimationFrame?p.requestAnimationFrame(Ms):p.setTimeout(Ms,M.fx.interval),M.fx.tick())}function yn(){return p.setTimeout(function(){cs=void 0}),cs=Date.now()}function ii(_,S){var I,D=0,Z={height:_};for(S=S?1:0;D<4;D+=2-S)I=Ar[D],Z["margin"+I]=Z["padding"+I]=_;return S&&(Z.opacity=Z.width=_),Z}function us(_,S,I){for(var D,Z=(jr.tweeners[S]||[]).concat(jr.tweeners["*"]),X=0,te=Z.length;X<te;X++)if(D=Z[X].call(I,S,_))return D}function hs(_,S,I){var D,Z,X,te,Te,_e,Fe,rt,dt="width"in S||"height"in S,We=this,Pt={},ei=_.style,ni=_.nodeType&&W(_),ci=jt.get(_,"fxshow");I.queue||(te=M._queueHooks(_,"fx"),te.unqueued==null&&(te.unqueued=0,Te=te.empty.fire,te.empty.fire=function(){te.unqueued||Te()}),te.unqueued++,We.always(function(){We.always(function(){te.unqueued--,M.queue(_,"fx").length||te.empty.fire()})}));for(D in S)if(Z=S[D],wo.test(Z)){if(delete S[D],X=X||Z==="toggle",Z===(ni?"hide":"show"))if(Z==="show"&&ci&&ci[D]!==void 0)ni=!0;else continue;Pt[D]=ci&&ci[D]||M.style(_,D)}if(_e=!M.isEmptyObject(S),!(!_e&&M.isEmptyObject(Pt))){dt&&_.nodeType===1&&(I.overflow=[ei.overflow,ei.overflowX,ei.overflowY],Fe=ci&&ci.display,Fe
vendor: 6,369 bytes, line 1
1==null&&(Fe=jt.get(_,"display")),rt=M.css(_,"display"),rt==="none"&&(Fe?rt=Fe:(je([_],!0),Fe=_.style.display||Fe,rt=M.css(_,"display"),je([_]))),(rt==="inline"||rt==="inline-block"&&Fe!=null)&&M.css(_,"float")==="none"&&(_e||(We.done(function(){ei.display=Fe}),Fe==null&&(rt=ei.display,Fe=rt==="none"?"":rt)),ei.display="inline-block")),I.overflow&&(ei.overflow="hidden",We.always(function(){ei.overflow=I.overflow[0],ei.overflowX=I.overflow[1],ei.overflowY=I.overflow[2]})),_e=!1;for(D in Pt)_e||(ci?"hidden"in ci&&(ni=ci.hidden):ci=jt.access(_,"fxshow",{display:Fe}),X&&(ci.hidden=!ni),ni&&je([_],!0),We.done(function(){ni||je([_]),jt.remove(_,"fxshow");for(D in Pt)M.style(_,D,Pt[D])})),_e=us(ni?ci[D]:0,D,We),D in ci||(ci[D]=_e.start,ni&&(_e.end=_e.start,_e.start=0))}}function Yn(_,S){var I,D,Z,X,te;for(I in _)if(D=pr(I),Z=S[D],X=_[I],Array.isArray(X)&&(Z=X[1],X=_[I]=X[0]),I!==D&&(_[D]=X,delete _[I]),te=M.cssHooks[D],te&&"expand"in te){X=te.expand(X),delete _[D];for(I in X)I in _||(_[I]=X[I],S[I]=Z)}else S[D]=Z}function jr(_,S,I){var D,Z,X=0,te=jr.prefilters.length,Te=M.Deferred().always(function(){delete _e.elem}),_e=function(){if(Z)return!1;for(var dt=cs||yn(),We=Math.max(0,Fe.startTime+Fe.duration-dt),Pt=We/Fe.duration||0,ei=1-Pt,ni=0,ci=Fe.tweens.length;ni<ci;ni++)Fe.tweens[ni].run(ei);return Te.notifyWith(_,[Fe,ei,We]),ei<1&&ci?We:(ci||Te.notifyWith(_,[Fe,1,0]),Te.resolveWith(_,[Fe]),!1)},Fe=Te.promise({elem:_,props:M.extend({},S),opts:M.extend(!0,{specialEasing:{},easing:M.easing._default},I),originalProperties:S,originalOptions:I,startTime:cs||yn(),duration:I.duration,tweens:[],createTween:function(dt,We){var Pt=M.Tween(_,Fe.opts,dt,We,Fe.opts.specialEasing[dt]||Fe.opts.easing);return Fe.tweens.push(Pt),Pt},stop:function(dt){var We=0,Pt=dt?Fe.tweens.length:0;if(Z)return this;for(Z=!0;We<Pt;We++)Fe.tweens[We].run(1);return dt?(Te.notifyWith(_,[Fe,1,0]),Te.resolveWith(_,[Fe,dt])):Te.rejectWith(_,[Fe,dt]),this}}),rt=Fe.props;for(Yn(rt,Fe.opts.specialEasing);X<te;X++)if(D=jr.prefilters[X].call(Fe,_,rt,Fe.opts),D)return j(D.stop)&&(M._queueHooks(Fe.elem,Fe.opts.queue).stop=D.stop.bind(D)),D;return M.map(rt,us,Fe),j(Fe.opts.start)&&Fe.opts.start.call(_,Fe),Fe.progress(Fe.opts.progress).done(Fe.opts.done,Fe.opts.complete).fail(Fe.opts.fail).always(Fe.opts.always),M.fx.timer(M.extend(_e,{elem:_,anim:Fe,queue:Fe.opts.queue})),Fe}M.Animation=M.extend(jr,{tweeners:{"*":[function(_,S){var I=this.createTween(_,S);return ve(I.elem,_,os.exec(S),I),I}]},tweener:function(_,S){j(_)?(S=_,_=["*"]):_=_.match(si);for(var I,D=0,Z=_.length;D<Z;D++)I=_[D],jr.tweeners[I]=jr.tweeners[I]||[],jr.tweeners[I].unshift(S)},prefilters:[hs],prefilter:function(_,S){S?jr.prefilters.unshift(_):jr.prefilters.push(_)}}),M.speed=function(_,S,I){var D=_&&typeof _=="object"?M.extend({},_):{complete:I||!I&&S||j(_)&&_,duration:_,easing:I&&S||S&&!j(S)&&S};return M.fx.off?D.duration=0:typeof D.duration!="number"&&(D.duration in M.fx.speeds?D.duration=M.fx.speeds[D.duration]:D.duration=M.fx.speeds._default),(D.queue==null||D.queue===!0)&&(D.queue="fx"),D.old=D.complete,D.complete=function(){j(D.old)&&D.old.call(this),D.queue&&M.dequeue(this,D.queue)},D},M.fn.extend({fadeTo:function(_,S,I,D){return this.filter(W).css("opacity",0).show().end().animate({opacity:S},_,I,D)},animate:function(_,S,I,D){var Z=M.isEmptyObject(_),X=M.speed(S,I,D),te=function(){var Te=jr(this,M.extend({},_),X);(Z||jt.get(this,"finish"))&&Te.stop(!0)};return te.finish=te,Z||X.queue===!1?this.each(te):this.queue(X.queue,te)},stop:function(_,S,I){var D=function(Z){var X=Z.stop;delete Z.stop,X(I)};return typeof _!="string"&&(I=S,S=_,_=void 0),S&&this.queue(_||"fx",[]),this.each(function(){var Z=!0,X=_!=null&&_+"queueHooks",te=M.timers,Te=jt.get(this);if(X)Te[X]&&Te[X].stop&&D(Te[X]);else for(X in Te)Te[X]&&Te[X].stop&&Va.test(X)&&D(Te[X]);for(X=te.length;X--;)te[X].elem===this&&(_==null||te[X].queue===_)&&(te[X].anim.stop(I),Z=!1,te.splice(X,1));(Z||!I)&&M.dequeue(this,_)})},finish:function(_){return _!==!1&&(_=_||"fx"),this.each(function(){var S,I=jt.get(this),D=I[_+"queue"],Z=I[_+"queueHooks"],X=M.timers,te=D?D.length:0;for(I.finish=!0,M.queue(this,_,[]),Z&&Z.stop&&Z.stop.call(this,!0),S=X.length;S--;)X[S].elem===this&&X[S].queue===_&&(X[S].anim.stop(!0),X.splice(S,1));for(S=0;S<te;S++)D[S]&&D[S].finish&&D[S].finish.call(this);delete I.finish})}}),M.each(["toggle","show","hide"],function(_,S){var I=M.fn[S];M.fn[S]=function(D,Z,X){return D==null||typeof D=="boolean"?I.apply(this,arguments):this.animate(ii(S,!0),D,Z,X)}}),M.each({slideDown:ii("show"),slideUp:ii("hide"),slideToggle:ii("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(_,S){M.fn[_]=function(I,D,Z){return this.animate(S,I,D,Z)}}),M.timers=[],M.fx.tick=function(){var _,S=0,I=M.timers;for(cs=Date.now();S<I.length;S++)_=I[S],!_()&&I[S]===_&&I.splice(S--,1);I.length||M.fx.stop(),cs=void 0},M.fx.timer=function(_){M.timers.push(_),M.fx.start()},M.fx.interval=13,M.fx.start=function(){_a||(_a=!0,Ms())},M.fx.stop=function(){_a=null},M.fx.speeds={slow:600,fast:200,_default:400},M.fn.delay=function(_,S){return _=M.fx&&M.fx.speeds[_]||_,S=S||"fx",this.queue(S,function(I,D){var Z=p.setTimeout(I,_);D.stop=function(){p.clearTimeout(Z)}})},function(){var _=ae.createElement("input"),S=ae.createElement("select"),I=S.appendChild(ae.createElement("option"));_.type="checkbox",re.checkOn=_.value!=="",re.optSelected=I.selected,_=ae.createElement("input"),_.value="t",_.type="radio",re.radioValue=_.value==="t"}();var gi,$r=M.expr.attrHandle;M.fn.extend({attr:function(_,S){return sr(this,M.attr,_,S,arguments.length>1)},removeAttr:function(_){return this.each(function(){M.removeAttr(this,_)})}}),M.extend({attr:function(_,S,I){var D,Z,X=_.nodeType;if(!(X===3||X===8||X===2)){if(typeof _.getAttribute>"u")return M.prop(_,S,I);if((X!==1||!M.isXMLDoc(_))&&(Z=M.attrHooks[S.toLowerCase()]||(M.expr.match.bool.test(S)?gi:void 0)),I!==void 0){if(I===null){M.removeAttr(_,S);return}return Z&&"set"in Z&&(D=Z.set(_,I,S))!==void 0?D:(_.setAttribute(S,I+""),I)}return Z&&"get"in Z&&(D=Z.get(_,S))!==null?D:(D=M.find.attr(_,S),D??void 0)}},attrHooks:{type:{set:function(_,S){if(!re.radioValue&&S==="radio"&&Oe(_,"input")){var I=_.value;return _.setAttribute("type",S),I&&(_.value=I),S}}}},removeAttr:function(_,S){var I,D=0,Z=S&&S.match(si);if(Z&&_.nodeType===1)for(;
vendor: 6,588 bytes, lines 1-2
1I=Z[D++];)_.removeAttribute(I)}}),gi={set:function(_,S,I){return S===!1?M.removeAttr(_,I):_.setAttribute(I,I),I}},M.each(M.expr.match.bool.source.match(/\w+/g),function(_,S){var I=$r[S]||M.find.attr;$r[S]=function(D,Z,X){var te,Te,_e=Z.toLowerCase();return X||(Te=$r[_e],$r[_e]=te,te=I(D,Z,X)!=null?_e:null,$r[_e]=Te),te}});var va=/^(?:input|select|textarea|button)$/i,Ys=/^(?:a|area)$/i;M.fn.extend({prop:function(_,S){return sr(this,M.prop,_,S,arguments.length>1)},removeProp:function(_){return this.each(function(){delete this[M.propFix[_]||_]})}}),M.extend({prop:function(_,S,I){var D,Z,X=_.nodeType;if(!(X===3||X===8||X===2))return(X!==1||!M.isXMLDoc(_))&&(S=M.propFix[S]||S,Z=M.propHooks[S]),I!==void 0?Z&&"set"in Z&&(D=Z.set(_,I,S))!==void 0?D:_[S]=I:Z&&"get"in Z&&(D=Z.get(_,S))!==null?D:_[S]},propHooks:{tabIndex:{get:function(_){var S=M.find.attr(_,"tabindex");return S?parseInt(S,10):va.test(_.nodeName)||Ys.test(_.nodeName)&&_.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),re.optSelected||(M.propHooks.selected={get:function(_){var S=_.parentNode;return S&&S.parentNode&&S.parentNode.selectedIndex,null},set:function(_){var S=_.parentNode;S&&(S.selectedIndex,S.parentNode&&S.parentNode.selectedIndex)}}),M.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){M.propFix[this.toLowerCase()]=this});function ar(_){var S=_.match(si)||[];return S.join(" ")}function Qi(_){return _.getAttribute&&_.getAttribute("class")||""}function Ri(_){return Array.isArray(_)?_:typeof _=="string"?_.match(si)||[]:[]}M.fn.extend({addClass:function(_){var S,I,D,Z,X,te;return j(_)?this.each(function(Te){M(this).addClass(_.call(this,Te,Qi(this)))}):(S=Ri(_),S.length?this.each(function(){if(D=Qi(this),I=this.nodeType===1&&" "+ar(D)+" ",I){for(X=0;X<S.length;X++)Z=S[X],I.indexOf(" "+Z+" ")<0&&(I+=Z+" ");te=ar(I),D!==te&&this.setAttribute("class",te)}}):this)},removeClass:function(_){var S,I,D,Z,X,te;return j(_)?this.each(function(Te){M(this).removeClass(_.call(this,Te,Qi(this)))}):arguments.length?(S=Ri(_),S.length?this.each(function(){if(D=Qi(this),I=this.nodeType===1&&" "+ar(D)+" ",I){for(X=0;X<S.length;X++)for(Z=S[X];I.indexOf(" "+Z+" ")>-1;)I=I.replace(" "+Z+" "," ");te=ar(I),D!==te&&this.setAttribute("class",te)}}):this):this.attr("class","")},toggleClass:function(_,S){var I,D,Z,X,te=typeof _,Te=te==="string"||Array.isArray(_);return j(_)?this.each(function(_e){M(this).toggleClass(_.call(this,_e,Qi(this),S),S)}):typeof S=="boolean"&&Te?S?this.addClass(_):this.removeClass(_):(I=Ri(_),this.each(function(){if(Te)for(X=M(this),Z=0;Z<I.length;Z++)D=I[Z],X.hasClass(D)?X.removeClass(D):X.addClass(D);else(_===void 0||te==="boolean")&&(D=Qi(this),D&&jt.set(this,"__className__",D),this.setAttribute&&this.setAttribute("class",D||_===!1?"":jt.get(this,"__className__")||""))}))},hasClass:function(_){var S,I,D=0;for(S=" "+_+" ";I=this[D++];)if(I.nodeType===1&&(" "+ar(Qi(I))+" ").indexOf(S)>-1)return!0;return!1}});var Ua=/\r/g;M.fn.extend({val:function(_){var S,I,D,Z=this[0];return arguments.length?(D=j(_),this.each(function(X){var te;this.nodeType===1&&(D?te=_.call(this,X,M(this).val()):te=_,te==null?te="":typeof te=="number"?te+="":Array.isArray(te)&&(te=M.map(te,function(Te){return Te==null?"":Te+""})),S=M.valHooks[this.type]||M.valHooks[this.nodeName.toLowerCase()],(!S||!("set"in S)||S.set(this,te,"value")===void 0)&&(this.value=te))})):Z?(S=M.valHooks[Z.type]||M.valHooks[Z.nodeName.toLowerCase()],S&&"get"in S&&(I=S.get(Z,"value"))!==void 0?I:(I=Z.value,typeof I=="string"?I.replace(Ua,""):I??"")):void 0}}),M.extend({valHooks:{option:{get:function(_){var S=M.find.attr(_,"value");return S??ar(M.text(_))}},select:{get:function(_){var S,I,D,Z=_.options,X=_.selectedIndex,te=_.type==="select-one",Te=te?null:[],_e=te?X+1:Z.length;for(X<0?D=_e:D=te?X:0;D<_e;D++)if(I=Z[D],(I.selected||D===X)&&!I.disabled&&(!I.parentNode.disabled||!Oe(I.parentNode,"optgroup"))){if(S=M(I).val(),te)return S;Te.push(S)}return Te},set:function(_,S){for(var I,D,Z=_.options,X=M.makeArray(S),te=Z.length;te--;)D=Z[te],(D.selected=M.inArray(M.valHooks.option.get(D),X)>-1)&&(I=!0);return I||(_.selectedIndex=-1),X}}}}),M.each(["radio","checkbox"],function(){M.valHooks[this]={set:function(_,S){if(Array.isArray(S))return _.checked=M.inArray(M(_).val(),S)>-1}},re.checkOn||(M.valHooks[this].get=function(_){return _.getAttribute("value")===null?"on":_.value})});var br=p.location,Kr={guid:Date.now()},or=/\?/;M.parseXML=function(_){var S,I;if(!_||typeof _!="string")return null;try{S=new p.DOMParser().parseFromString(_,"text/xml")}catch{}return I=S&&S.getElementsByTagName("parsererror")[0],(!S||I)&&M.error("Invalid XML: "+(I?M.map(I.childNodes,function(D){return D.textContent}).join(` 2`):_)),S};var So=/^(?:focusinfocus|focusoutblur)$/,Kn=function(_){_.stopPropagation()};M.extend(M.event,{trigger:function(_,S,I,D){var Z,X,te,Te,_e,Fe,rt,dt,We=[I||ae],Pt=U.call(_,"type")?_.type:_,ei=U.call(_,"namespace")?_.namespace.split("."):[];if(X=dt=te=I=I||ae,!(I.nodeType===3||I.nodeType===8)&&!So.test(Pt+M.event.triggered)&&(Pt.indexOf(".")>-1&&(ei=Pt.split("."),Pt=ei.shift(),ei.sort()),_e=Pt.indexOf(":")<0&&"on"+Pt,_=_[M.expando]?_:new M.Event(Pt,typeof _=="object"&&_),_.isTrigger=D?2:3,_.namespace=ei.join("."),_.rnamespace=_.namespace?new RegExp("(^|\\.)"+ei.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,_.result=void 0,_.target||(_.target=I),S=S==null?[_]:M.makeArray(S,[_]),rt=M.event.special[Pt]||{},!(!D&&rt.trigger&&rt.trigger.apply(I,S)===!1))){if(!D&&!rt.noBubble&&!H(I)){for(Te=rt.delegateType||Pt,So.test(Te+Pt)||(X=X.parentNode);X;X=X.parentNode)We.push(X),te=X;te===(I.ownerDocument||ae)&&We.push(te.defaultView||te.parentWindow||p)}for(Z=0;(X=We[Z++])&&!_.isPropagationStopped();)dt=X,_.type=Z>1?Te:rt.bindType||Pt,Fe=(jt.get(X,"events")||Object.create(null))[_.type]&&jt.get(X,"handle"),Fe&&Fe.apply(X,S),Fe=_e&&X[_e],Fe&&Fe.apply&&cn(X)&&(_.result=Fe.apply(X,S),_.result===!1&&_.preventDefault());return _.type=Pt,!D&&!_.isDefaultPrevented()&&(!rt._default||rt._default.apply(We.pop(),S)===!1)&&cn(I)&&_e&&j(I[Pt])&&!H(I)&&(te=I[_e],te&&(I[_e]=null),M.event.triggered=Pt,_.isPropagationStopped()&&dt.addEventListener(Pt,Kn),I[Pt](),_.isPropagationStopped()&&dt.removeEventListener(Pt,Kn),M.event.triggered=void 0,te&&(I[_e]=te)),_.result}},simulate:function(_,S,I){var D=M.extend(new M.Event,I,{type:_,isSimulated:!0});M.event.trigger(D,null,S)}}),M.fn.extend({trigger:function(_,S){return this.each(function(){M.event.trigger(_,S,this)})},triggerHandler:function(_,S){var I=this[0];
vendor: 5,629 bytes, lines 2-4
2if(I)return M.event.trigger(_,S,I,!0)}});var Gi=/\[\]$/,Cs=/\r?\n/g,ds=/^(?:submit|button|image|reset|file)$/i,ba=/^(?:input|select|textarea|keygen)/i;function Vr(_,S,I,D){var Z;if(Array.isArray(S))M.each(S,function(X,te){I||Gi.test(_)?D(_,te):Vr(_+"["+(typeof te=="object"&&te!=null?X:"")+"]",te,I,D)});else if(!I&&le(S)==="object")for(Z in S)Vr(_+"["+Z+"]",S[Z],I,D);else D(_,S)}M.param=function(_,S){var I,D=[],Z=function(X,te){var Te=j(te)?te():te;D[D.length]=encodeURIComponent(X)+"="+encodeURIComponent(Te??"")};if(_==null)return"";if(Array.isArray(_)||_.jquery&&!M.isPlainObject(_))M.each(_,function(){Z(this.name,this.value)});else for(I in _)Vr(I,_[I],S,Z);return D.join("&")},M.fn.extend({serialize:function(){return M.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var _=M.prop(this,"elements");return _?M.makeArray(_):this}).filter(function(){var _=this.type;return this.name&&!M(this).is(":disabled")&&ba.test(this.nodeName)&&!ds.test(_)&&(this.checked||!ke.test(_))}).map(function(_,S){var I=M(this).val();return I==null?null:Array.isArray(I)?M.map(I,function(D){return{name:S.name,value:D.replace(Cs,`\r 3`)}}):{name:S.name,value:I.replace(Cs,`\r 4`)}}).get()}});var $i=/%20/g,On=/#.*$/,Ti=/([?&])_=[^&]*/,ri=/^(.*?):[ \t]*([^\r\n]*)$/mg,Ks=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,yi=/^(?:GET|HEAD)$/,Js=/^\/\//,_n={},Is={},Qs="*/".concat("*"),ea=ae.createElement("a");ea.href=br.href;function ta(_){return function(S,I){typeof S!="string"&&(I=S,S="*");var D,Z=0,X=S.toLowerCase().match(si)||[];if(j(I))for(;D=X[Z++];)D[0]==="+"?(D=D.slice(1)||"*",(_[D]=_[D]||[]).unshift(I)):(_[D]=_[D]||[]).push(I)}}function ia(_,S,I,D){var Z={},X=_===Is;function te(Te){var _e;return Z[Te]=!0,M.each(_[Te]||[],function(Fe,rt){var dt=rt(S,I,D);if(typeof dt=="string"&&!X&&!Z[dt])return S.dataTypes.unshift(dt),te(dt),!1;if(X)return!(_e=dt)}),_e}return te(S.dataTypes[0])||!Z["*"]&&te("*")}function ra(_,S){var I,D,Z=M.ajaxSettings.flatOptions||{};for(I in S)S[I]!==void 0&&((Z[I]?_:D||(D={}))[I]=S[I]);return D&&M.extend(!0,_,D),_}function na(_,S,I){for(var D,Z,X,te,Te=_.contents,_e=_.dataTypes;_e[0]==="*";)_e.shift(),D===void 0&&(D=_.mimeType||S.getResponseHeader("Content-Type"));if(D){for(Z in Te)if(Te[Z]&&Te[Z].test(D)){_e.unshift(Z);break}}if(_e[0]in I)X=_e[0];else{for(Z in I){if(!_e[0]||_.converters[Z+" "+_e[0]]){X=Z;break}te||(te=Z)}X=X||te}if(X)return X!==_e[0]&&_e.unshift(X),I[X]}function nl(_,S,I,D){var Z,X,te,Te,_e,Fe={},rt=_.dataTypes.slice();if(rt[1])for(te in _.converters)Fe[te.toLowerCase()]=_.converters[te];for(X=rt.shift();X;)if(_.responseFields[X]&&(I[_.responseFields[X]]=S),!_e&&D&&_.dataFilter&&(S=_.dataFilter(S,_.dataType)),_e=X,X=rt.shift(),X){if(X==="*")X=_e;else if(_e!=="*"&&_e!==X){if(te=Fe[_e+" "+X]||Fe["* "+X],!te){for(Z in Fe)if(Te=Z.split(" "),Te[1]===X&&(te=Fe[_e+" "+Te[0]]||Fe["* "+Te[0]],te)){te===!0?te=Fe[Z]:Fe[Z]!==!0&&(X=Te[0],rt.unshift(Te[1]));break}}if(te!==!0)if(te&&_.throws)S=te(S);else try{S=te(S)}catch(dt){return{state:"parsererror",error:te?dt:"No conversion from "+_e+" to "+X}}}}return{state:"success",data:S}}M.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:br.href,type:"GET",isLocal:Ks.test(br.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qs,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":M.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(_,S){return S?ra(ra(_,M.ajaxSettings),S):ra(M.ajaxSettings,_)},ajaxPrefilter:ta(_n),ajaxTransport:ta(Is),ajax:function(_,S){typeof _=="object"&&(S=_,_=void 0),S=S||{};var I,D,Z,X,te,Te,_e,Fe,rt,dt,We=M.ajaxSetup({},S),Pt=We.context||We,ei=We.context&&(Pt.nodeType||Pt.jquery)?M(Pt):M.event,ni=M.Deferred(),ci=M.Callbacks("once memory"),ir=We.statusCode||{},er={},Jr={},In="canceled",hi={readyState:0,getResponseHeader:function(pi){var rr;if(_e){if(!X)for(X={};rr=ri.exec(Z);)X[rr[1].toLowerCase()+" "]=(X[rr[1].toLowerCase()+" "]||[]).concat(rr[2]);rr=X[pi.toLowerCase()+" "]}return rr==null?null:rr.join(", ")},getAllResponseHeaders:function(){return _e?Z:null},setRequestHeader:function(pi,rr){return _e==null&&(pi=Jr[pi.toLowerCase()]=Jr[pi.toLowerCase()]||pi,er[pi]=rr),this},overrideMimeType:function(pi){return _e==null&&(We.mimeType=pi),this},statusCode:function(pi){var rr;if(pi)if(_e)hi.always(pi[hi.status]);else for(rr in pi)ir[rr]=[ir[rr],pi[rr]];return this},abort:function(pi){var rr=pi||In;return I&&I.abort(rr),ps(0,rr),this}};if(ni.promise(hi),We.url=((_||We.url||br.href)+"").replace(Js,br.protocol+"//"),We.type=S.method||S.type||We.method||We.type,We.dataTypes=(We.dataType||"*").toLowerCase().match(si)||[""],We.crossDomain==null){Te=ae.createElement("a");try{Te.href=We.url,Te.href=Te.href,We.crossDomain=ea.protocol+"//"+ea.host!=Te.protocol+"//"+Te.host}catch{We.crossDomain=!0}}if(We.data&&We.processData&&typeof We.data!="string"&&(We.data=M.param(We.data,We.traditional)),ia(_n,We,S,hi),_e)return hi;Fe=M.event&&We.global,Fe&&M.active++===0&&M.event.trigger("ajaxStart"),We.type=We.type.toUpperCase(),We.hasContent=!yi.test(We.type),D=We.url.replace(On,""),We.hasContent?We.data&&We.processData&&(We.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(We.data=We.data.replace($i,"+")):(dt=We.url.slice(D.length),We.data&&(We.processData||typeof We.data=="str
4ing")&&(D+=(or.test(D)?"&":"?")+We.data,delete We.data),We.cache===!1&&(D=D.replace(Ti,"$1"),dt=(or.test(D)?"&":"?")+"_="+Kr.guid+++dt),We.url=D+dt),We.ifModified&&(M.lastModified[D]&&hi.setRequestHeader("If-Modified-Since",M.lastModified[D]),M.etag[D]&&hi.setRequestHeader("If-None-Match",M.etag[D])),(We.data&&We.hasContent&&We.contentType!==!1||S.contentType)&&hi.setRequestHeader("Content-Type",We.contentType),hi.setRequestHeader("Accept",We.dataTypes[0]&&We.accepts[We.dataTypes[0]]?We.accepts[We.dataTypes[0]]+(We.dataTypes[0]!=="*"?", "+Qs+"; q=0.01":""):We.accepts["*"]);for(rt in We.headers)hi.setRequestHeader(rt,We.headers[rt]);if(We.beforeSend&&(We.beforeSend.call(Pt,hi,We)===!1||_e))return hi.abort();if(In="abort",ci.add(We.complete),hi.done(We.success),hi.fail(We.error),I=ia(Is,We,S,hi),!I)ps(-1,"No Transport");else{if(hi.readyState=1,Fe&&ei.trigger("ajaxSend",[hi,We]),_e)return hi;We.async&&We.timeout>0&&(te=p.setTimeout(function(){hi.abort("timeout")},We.timeout));try{_e=!1,I.send(er,ps)}catch(pi){if(_e)throw pi;ps(-1,pi)}}function ps(pi,rr,sa,To){var An,fs,vn,Nn,Jn,dn=rr;_e||(_e=!0,te&&p.clearTimeout(te),I=void 0,Z=To||"",hi.readyState=pi>0?4:0,An=pi>=200&&pi<300||pi===304,sa&&(Nn=na(We,hi,sa)),!An&&M.inArray("script",We.dataTypes)>-1&&M.inArray("json",We.dataTypes)<0&&(We.converters["text script"]=function(){}),Nn=nl(We,Nn,hi,An),An?(We.ifModified&&(Jn=hi.getResponseHeader("Last-Modified"),Jn&&(M.lastModified[D]=Jn),Jn=hi.getResponseHeader("etag"),Jn&&(M.etag[D]=Jn)),pi===204||We.type==="HEAD"?dn="nocontent":pi===304?dn="notmodified":(dn=Nn.state,fs=Nn.data,vn=Nn.error,An=!vn)):(vn=dn,(pi||!dn)&&(dn="error",pi<0&&(pi=0))),hi.status=pi,hi.statusText=(rr||dn)+"",An?ni.resolveWith(Pt,[fs,dn,hi]):ni.rejectWith(Pt,[hi,dn,vn]),hi.statusCode(ir),ir=void 0,Fe&&ei.trigger(An?"ajaxSuccess":"ajaxError",[hi,We,An?fs:vn]),ci.fireWith(Pt,[hi,dn]),Fe&&(ei.trigger("ajaxComplete",[hi,We]),--M.active||M.event.trigger("ajaxStop")))}return hi},getJSON:function(_,S,I){return M.get(_,S,I,"json")},getScript:function(_,S){return M.get(_,void 0,S,"script")}}),M.each(["get","post"],function(_,S){M[S]=function(I,D,Z,X){return j(D)&&(X=X||Z,Z=D,D=void 0),M.ajax(M.extend({url:I,type:S,dataType:X,data:D,success:Z},M.isPlainObject(I)&&I))}}),M.ajaxPrefilter(function(_){var S;for(S in _.headers)S.toLowerCase()==="content-type"&&(_.contentType=_.headers[S]||"")}),M._evalUrl=function(_,S,I){return M.ajax({url:_,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(D){M.globalEval(D,S,I)}})},M.fn.extend({wrapAll:function(_){var S;return this[0]&&(j(_)&&(_=_.call(this[0])),S=M(_,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&S.insertBefore(this[0]),S.map(function(){for(var I=this;I.firstElementChild;)I=I.firstElementChild;return I}).append(this)),this},wrapInner:function(_){return j(_)?this.each(function(S){M(this).wrapInner(_.call(this,S))}):this.each(function(){var S=M(this),I=S.contents();I.length?I.wrapAll(_):S.append(_)})},wrap:function(_){var S=j(_);return this.each(function(I){M(this).wrapAll(S?_.call(this,I):_)})},unwrap:function(_){return this.parent(_).not("body").each(function(){M(this).replaceWith(this.childNodes)}),this}}),M.expr.pseudos.hidden=function(_){return!M.expr.pseudos.visible(_)},M.expr.pseudos.visible=function(_){return!!(_.offsetWidth||_.offsetHeight||_.getClientRects().length)},M.ajaxSettings.xhr=function(){try{return new p.XMLHttpRequest}catch{}};var As={0:200,1223:204},lr=M.ajaxSettings.xhr();re.cors=!!lr&&"withCredentials"in lr,re.ajax=lr=!!lr,M.ajaxTransport(function(_){var S,I;if(re.cors||lr&&!_.crossDomain)return{send:function(D,Z){var X,te=_.xhr();if(te.open(_.type,_.url,_.async,_.username,_.password),_.xhrFields)for(X in _.xhrFields)te[X]=_.xhrFields[X];_.mimeType&&te.overrideMimeType&&te.overrideMimeType(_.mimeType),!_.crossDomain&&!D["X-Requested-With"]&&(D["X-Requested-With"]="XMLHttpRequest");for(X in D)te.setRequestHeader(X,D[X]);S=function(Te){return function(){S&&(S=I=te.onload=te.onerror=te.onabort=te.ontimeout=te.onreadystatechange=null,Te==="abort"?te.abort():Te==="error"?typeof te.status!="number"?Z(0,"error"):Z(te.status,te.statusText):Z(As[te.status]||te.status,te.statusText,(te.responseType||"text")!=="text"||typeof te.responseText!="string"?{binary:te.response}:{text:te.responseText},te.getAllResponseHeaders()))}},te.onload=S(),I=te.onerror=te.ontimeout=S("error"),te.onabort!==void 0?te.onabort=I:te.onreadystatechange=function(){te.readyState===4&&p.setTimeout(function(){S&&I()})},S=S("abort");try{te.send(_.hasContent&&_.data||null)}catch(Te){if(S)throw Te}},abort:function(){S&&S()}}}),M.ajaxPrefilter(function(_){_.crossDomain&&(_.contents.script=!1)}),M.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(_){return M.globalEval(_),_}}}
vendor: 5,720 bytes, line 4
4),M.ajaxPrefilter("script",function(_){_.cache===void 0&&(_.cache=!1),_.crossDomain&&(_.type="GET")}),M.ajaxTransport("script",function(_){if(_.crossDomain||_.scriptAttrs){var S,I;return{send:function(D,Z){S=M("<script>").attr(_.scriptAttrs||{}).prop({charset:_.scriptCharset,src:_.url}).on("load error",I=function(X){S.remove(),I=null,X&&Z(X.type==="error"?404:200,X.type)}),ae.head.appendChild(S[0])},abort:function(){I&&I()}}}});var xa=[],Ga=/(=)\?(?=&|$)|\?\?/;M.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var _=xa.pop()||M.expando+"_"+Kr.guid++;return this[_]=!0,_}}),M.ajaxPrefilter("json jsonp",function(_,S,I){var D,Z,X,te=_.jsonp!==!1&&(Ga.test(_.url)?"url":typeof _.data=="string"&&(_.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&Ga.test(_.data)&&"data");if(te||_.dataTypes[0]==="jsonp")return D=_.jsonpCallback=j(_.jsonpCallback)?_.jsonpCallback():_.jsonpCallback,te?_[te]=_[te].replace(Ga,"$1"+D):_.jsonp!==!1&&(_.url+=(or.test(_.url)?"&":"?")+_.jsonp+"="+D),_.converters["script json"]=function(){return X||M.error(D+" was not called"),X[0]},_.dataTypes[0]="json",Z=p[D],p[D]=function(){X=arguments},I.always(function(){Z===void 0?M(p).removeProp(D):p[D]=Z,_[D]&&(_.jsonpCallback=S.jsonpCallback,xa.push(D)),X&&j(Z)&&Z(X[0]),X=Z=void 0}),"script"}),re.createHTMLDocument=function(){var _=ae.implementation.createHTMLDocument("").body;return _.innerHTML="<form></form><form></form>",_.childNodes.length===2}(),M.parseHTML=function(_,S,I){if(typeof _!="string")return[];typeof S=="boolean"&&(I=S,S=!1);var D,Z,X;return S||(re.createHTMLDocument?(S=ae.implementation.createHTMLDocument(""),D=S.createElement("base"),D.href=ae.location.href,S.head.appendChild(D)):S=ae),Z=xi.exec(_),X=!I&&[],Z?[S.createElement(Z[1])]:(Z=tt([_],S,X),X&&X.length&&M(X).remove(),M.merge([],Z.childNodes))},M.fn.load=function(_,S,I){var D,Z,X,te=this,Te=_.indexOf(" ");return Te>-1&&(D=ar(_.slice(Te)),_=_.slice(0,Te)),j(S)?(I=S,S=void 0):S&&typeof S=="object"&&(Z="POST"),te.length>0&&M.ajax({url:_,type:Z||"GET",dataType:"html",data:S}).done(function(_e){X=arguments,te.html(D?M("<div>").append(M.parseHTML(_e)).find(D):_e)}).always(I&&function(_e,Fe){te.each(function(){I.apply(this,X||[_e.responseText,Fe,_e])})}),this},M.expr.pseudos.animated=function(_){return M.grep(M.timers,function(S){return _===S.elem}).length},M.offset={setOffset:function(_,S,I){var D,Z,X,te,Te,_e,Fe,rt=M.css(_,"position"),dt=M(_),We={};rt==="static"&&(_.style.position="relative"),Te=dt.offset(),X=M.css(_,"top"),_e=M.css(_,"left"),Fe=(rt==="absolute"||rt==="fixed")&&(X+_e).indexOf("auto")>-1,Fe?(D=dt.position(),te=D.top,Z=D.left):(te=parseFloat(X)||0,Z=parseFloat(_e)||0),j(S)&&(S=S.call(_,I,M.extend({},Te))),S.top!=null&&(We.top=S.top-Te.top+te),S.left!=null&&(We.left=S.left-Te.left+Z),"using"in S?S.using.call(_,We):dt.css(We)}},M.fn.extend({offset:function(_){if(arguments.length)return _===void 0?this:this.each(function(Z){M.offset.setOffset(this,_,Z)});var S,I,D=this[0];if(D)return D.getClientRects().length?(S=D.getBoundingClientRect(),I=D.ownerDocument.defaultView,{top:S.top+I.pageYOffset,left:S.left+I.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var _,S,I,D=this[0],Z={top:0,left:0};if(M.css(D,"position")==="fixed")S=D.getBoundingClientRect();else{for(S=this.offset(),I=D.ownerDocument,_=D.offsetParent||I.documentElement;_&&(_===I.body||_===I.documentElement)&&M.css(_,"position")==="static";)_=_.parentNode;_&&_!==D&&_.nodeType===1&&(Z=M(_).offset(),Z.top+=M.css(_,"borderTopWidth",!0),Z.left+=M.css(_,"borderLeftWidth",!0))}return{top:S.top-Z.top-M.css(D,"marginTop",!0),left:S.left-Z.left-M.css(D,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var _=this.offsetParent;_&&M.css(_,"position")==="static";)_=_.offsetParent;return _||Re})}}),M.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(_,S){var I=S==="pageYOffset";M.fn[_]=function(D){return sr(this,function(Z,X,te){var Te;if(H(Z)?Te=Z:Z.nodeType===9&&(Te=Z.defaultView),te===void 0)return Te?Te[S]:Z[X];Te?Te.scrollTo(I?Te.pageXOffset:te,I?te:Te.pageYOffset):Z[X]=te},_,D,arguments.length)}}),M.each(["top","left"],function(_,S){M.cssHooks[S]=Xn(re.pixelPosition,function(I,D){if(D)return D=Ps(I,S),Fn.test(D)?M(I).position()[S]+"px":D})}),M.each({Height:"height",Width:"width"},function(_,S){M.each({padding:"inner"+_,content:S,"":"outer"+_},function(I,D){M.fn[D]=function(Z,X){var te=arguments.length&&(I||typeof Z!="boolean"),Te=I||(Z===!0||X===!0?"margin":"border");return sr(this,function(_e,Fe,rt){var dt;return H(_e)?D.indexOf("outer")===0?_e["inner"+_]:_e.document.documentElement["client"+_]:_e.nodeType===9?(dt=_e.documentElement,Math.max(_e.body["scroll"+_],dt["scroll"+_],_e.body["offset"+_],dt["offset"+_],dt["client"+_])):rt===void 0?M.css(_e,Fe,Te):M.style(_e,Fe,rt,Te)},S,te?Z:void 0,te)}})}),M.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(_,S){M.fn[S]=function(I){return this.on(S,I)}}),M.fn.extend({bind:function(_,S,I){return this.on(_,null,S,I)},unbind:function(_,S){return this.off(_,null,S)},delegate:function(_,S,I,D){return this.on(S,_,I,D)},undelegate:function(_,S,I){return arguments.length===1?this.off(_,"**"):this.off(S,_||"**",I)},hover:function(_,S){return this.on("mouseenter",_).on("mouseleave",S||_)}}),M.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(_,S){M.fn[S]=function(I,D){return arguments.length>0?this.on(S,null,I,D):this.trigger(S)}});var Ur=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;M.proxy=function(_,S){var I,D,Z;
4if(typeof S=="string"&&(I=_[S],S=_,_=I),!!j(_))return D=y.call(arguments,2),Z=function(){return _.apply(S||this,D.concat(y.call(arguments)))},Z.guid=_.guid=_.guid||M.guid++,Z},M.holdReady=function(_){_?M.readyWait++:M.ready(!0)},M.isArray=Array.isArray,M.parseJSON=JSON.parse,M.nodeName=Oe,M.isFunction=j,M.isWindow=H,M.camelCase=pr,M.type=le,M.now=Date.now,M.isNumeric=function(_){var S=M.type(_);return(S==="number"||S==="string")&&!isNaN(_-parseFloat(_))},M.trim=function(_){return _==null?"":(_+"").replace(Ur,"$1")},typeof define=="function"&&define.amd&&define("jquery",[],function(){return M});var gr=p.jQuery,Cn=p.$;return M.noConflict=function(_){return p.$===M&&(p.$=Cn),_&&p.jQuery===M&&(p.jQuery=gr),M},typeof s>"u"&&(p.jQuery=p.$=M),M})});var By=Sf((Cd,Id)=>{(function(p,s){typeof Cd=="object"&&typeof Id<"u"?Id.exports=s():typeof define=="function"&&define.amd?define(s):(p=typeof globalThis<"u"?globalThis:p||self,p.maplibregl=s())})(Cd,function(){"use strict";var p={},s={};function g(y,a,z){if(s[y]=z,y==="index"){var F="var sharedModule = {}; ("+s.shared+")(sharedModule); ("+s.worker+")(sharedModule);",V={};return s.shared(V),s.index(p,V),typeof window<"u"&&p.setWorkerUrl(window.URL.createObjectURL(new Blob([F],{type:"text/javascript"}))),p}}g("shared",["exports"],function(y){"use strict";function a(r,t,n,o){return new(n||(n=Promise))(function(u,f){function m(E){try{T(o.next(E))}catch(A){f(A)}}function x(E){try{T(o.throw(E))}catch(A){f(A)}}function T(E){var A;E.done?u(E.value):(A=E.value,A instanceof n?A:new n(function(k){k(A)})).then(m,x)}T((o=o.apply(r,t||[])).next())})}function z(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var F,V;function B(){if(V)return F;function r(t,n){this.x=t,this.y=n}return V=1,F=r,r.prototype={clone:function(){return new r(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,n){return this.clone()._rotateAround(t,n)},matMult:function(t){return this.clone()._matMult(t)},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(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var n=t.x-this.x,o=t.y-this.y;return n*n+o*o},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,n){return Math.atan2(this.x*n-this.y*t,this.x*t+this.y*n)},_matMult:function(t){var n=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=n,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var n=Math.cos(t),o=Math.sin(t),u=o*this.x+n*this.y;return this.x=n*this.x-o*this.y,this.y=u,this},_rotateAround:function(t,n){var o=Math.cos(t),u=Math.sin(t),f=n.y+u*(this.x-n.x)+o*(this.y-n.y);return this.x=n.x+o*(this.x-n.x)-u*(this.y-n.y),this.y=f,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},r.convert=function(t){return t instanceof r?t:Array.isArray(t)?new r(t[0],t[1]):t},F}typeof SuppressedError=="function"&&SuppressedError;var U,O,ne=z(B()),re=function(){if(O)return U;function r(t,n,o,u){this.cx=3*t,this.bx=3*(o-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*n,this.by=3*(u-n)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=o,this.p2y=u}return O=1,U=r,r.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,n){if(n===void 0&&(n=1e-6),t<0)return 0;if(t>1)return 1;for(var o=t,u=0;u<8;u++){var f=this.sampleCurveX(o)-t;if(Math.abs(f)<n)return o;var m=this.sampleCurveDerivativeX(o);if(Math.abs(m)<1e-6)break;o-=f/m}var x=0,T=1;for(o=t,u=0;u<20&&(f=this.sampleCurveX(o),!(Math.abs(f-t)<n));u++)t>f?x=o:T=o,o=.5*(T-x)+x;return o}
4,solve:function(t,n){return this.sampleCurveY(this.solveCurveX(t,n))}},U}(),j=z(re);let H,ae;function ge(){return H==null&&(H=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),H}function ce(){if(ae==null&&(ae=!1,ge())){let t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let o=0;o<5*5;o++){let u=4*o;t.fillStyle=`rgb(${u},${u+1},${u+2})`,t.fillRect(o%5,Math.floor(o/5),1,1)}let n=t.getImageData(0,0,5,5).data;for(let o=0;o<5*5*4;o++)if(o%4!=3&&n[o]!==o){ae=!0;break}}}return ae||!1}var le,we=1e-6,Le=typeof Float32Array<"u"?Float32Array:Array;function M(){var r=new Le(9);return Le!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[5]=0,r[6]=0,r[7]=0),r[0]=1,r[4]=1,r[8]=1,r}function ze(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function Oe(){var r=new Le(3);return Le!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r}function qe(r,t,n){var o=new Le(3);return o[0]=r,o[1]=t,o[2]=n,o}function $e(r,t,n){var o=t[0],u=t[1],f=t[2],m=t[3];return r[0]=n[0]*o+n[4]*u+n[8]*f+n[12]*m,r[1]=n[1]*o+n[5]*u+n[9]*f+n[13]*m,r[2]=n[2]*o+n[6]*u+n[10]*f+n[14]*m,r[3]=n[3]*o+n[7]*u+n[11]*f+n[15]*m,r}function Qe(){var r=new Le(4);return Le!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r[3]=1,r}function Ne(){var r=new Le(2);return Le!=Float32Array&&(r[0]=0,r[1]=0),r}function Je(r,t){var n=new Le(2);return n[0]=r,n[1]=t,n}Math.hypot||(Math.hypot=function(){for(var r=0,t=arguments.length;t--;)r+=arguments[t]*arguments[t];return Math.sqrt(r)}),Oe(),le=new Le(4),Le!=Float32Array&&(le[0]=0,le[1]=0,le[2]=0,le[3]=0),Oe(),qe(1,0,0),qe(0,1,0),Qe(),Qe(),M(),Ne();let Ye=8192;function bt(r,t,n){return t*(Ye/(r.tileSize*Math.pow(2,n-r.tileID.overscaledZ)))}function _t(r,t){return(r%t+t)%t}function He(r,t,n){return r*(1-n)+t*n}function Xe(r){if(r<=0)return 0;if(r>=1)return 1;let t=r*r,n=t*r;return 4*(r<.5?n:3*(r-t)+n-.75)}function At(r,t,n,o){let u=new j(r,t,n,o);return f=>u.solve(f)}let Yt=At(.25,.1,.25,1);function xi(r,t,n){return Math.min(n,Math.max(t,r))}function Pi(r,t,n){let o=n-t,u=((r-t)%o+o)%o+t;return u===t?n:u}function Ai(r,...t){for(let n of t)for(let o in n)r[o]=n[o];return r}let ln=1;function wt(r,t,n){let o={};for(let u in r)o[u]=t.call(this,r[u],u,r);return o}function yt(r,t,n){let o={};for(let u in r)t.call(this,r[u],u,r)&&(o[u]=r[u]);return o}function Tt(r){return Array.isArray(r)?r.map(Tt):typeof r=="object"&&r?wt(r,Tt):r}let oi={};function si(r){oi[r]||(typeof console<"u"&&console.warn(r),oi[r]=!0)}function Di(r,t,n){return(n.y-r.y)*(t.x-r.x)>(t.y-r.y)*(n.x-r.x)}function Ki(r){return typeof WorkerGlobalScope<"u"&&r!==void 0&&r instanceof WorkerGlobalScope}let wi=null;function Mr(r){return typeof ImageBitmap<"u"&&r instanceof ImageBitmap}let qi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Ui(r,t,n,o,u){return a(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let f=new VideoFrame(r,{timestamp:0});try{let m=f?.format;if(!m||!m.startsWith("BGR")&&!m.startsWith("RGB"))throw new Error(`Unrecognized format ${m}`);let x=m.startsWith("BGR"),T=new Uint8ClampedArray(o*u*4);if(yield f.copyTo(T,function(E,A,k,$,q){let Y=4*Math.max(1,0),Q=(Math.max(0,k)-k)*$*4+Y,oe=4*$,pe=Math.max(0,A),Ce=Math.max(0,k);return{rect:{x:pe,y:Ce,width:Math.min(E.width,A+$)-pe,height:Math.min(E.height,k+q)-Ce},layout:[{offset:Q,stride:oe}]}}(r,t,n,o,u)),x)for(let E=0;E<T.length;E+=4){let A=T[E];T[E]=T[E+2],T[E+2]=A}return T}finally{f.close()}})}let Cr,sr;function Sr(r,t,n,o){return r.addEventListener(t,n,o),{unsubscribe:()=>{r.removeEventListener(t,n,o)}}}function Tr(r){return r/Math.PI*180}let Mn={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},pr={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},cn="AbortError";function Yr(){return new Error(cn)}let jt={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};
4function Ji(r){return jt.REGISTERED_PROTOCOLS[r.substring(0,r.indexOf("://"))]}let un="global-dispatcher";class Ir extends Error{constructor(t,n,o,u){super(`AJAXError: ${n} (${t}): ${o}`),this.status=t,this.statusText=n,this.url=o,this.body=u}}let gn=()=>Ki(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,hn=function(r,t){if(/:\/\//.test(r.url)&&!/^https?:|^file:/.test(r.url)){let o=Ji(r.url);if(o)return o(r,t);if(Ki(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:r,targetMapId:un},t)}if(!(/^file:/.test(n=r.url)||/^file:/.test(gn())&&!/^\w+:/.test(n))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(o,u){return a(this,void 0,void 0,function*(){let f=new Request(o.url,{method:o.method||"GET",body:o.body,credentials:o.credentials,headers:o.headers,cache:o.cache,referrer:gn(),signal:u.signal}),m,x;o.type!=="json"||f.headers.has("Accept")||f.headers.set("Accept","application/json");try{m=yield fetch(f)}catch(E){throw new Ir(0,E.message,o.url,new Blob)}if(!m.ok){let E=yield m.blob();throw new Ir(m.status,m.statusText,o.url,E)}x=o.type==="arrayBuffer"||o.type==="image"?m.arrayBuffer():o.type==="json"?m.json():m.text();let T=yield x;if(u.signal.aborted)throw Yr();return{data:T,cacheControl:m.headers.get("Cache-Control"),expires:m.headers.get("Expires")}})}(r,t);if(Ki(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:r,mustQueue:!0,targetMapId:un},t)}var n;return function(o,u){return new Promise((f,m)=>{var x;let T=new XMLHttpRequest;T.open(o.method||"GET",o.url,!0),o.type!=="arrayBuffer"&&o.type!=="image"||(T.responseType="arraybuffer");for(let E in o.headers)T.setRequestHeader(E,o.headers[E]);o.type==="json"&&(T.responseType="text",!((x=o.headers)===null||x===void 0)&&x.Accept||T.setRequestHeader("Accept","application/json")),T.withCredentials=o.credentials==="include",T.onerror=()=>{m(new Error(T.statusText))},T.onload=()=>{if(!u.signal.aborted)if((T.status>=200&&T.status<300||T.status===0)&&T.response!==null){let E=T.response;if(o.type==="json")try{E=JSON.parse(T.response)}catch(A){return void m(A)}f({data:E,cacheControl:T.getResponseHeader("Cache-Control"),expires:T.getResponseHeader("Expires")})}else{let E=new Blob([T.response],{type:T.getResponseHeader("Content-Type")});m(new Ir(T.status,T.statusText,o.url,E))}},u.signal.addEventListener("abort",()=>{T.abort(),m(Yr())}),T.send(o.body)})}(r,t)};function Zs(r){if(!r||r.indexOf("://")<=0||r.indexOf("data:image/")===0||r.indexOf("blob:")===0)return!0;let t=new URL(r),n=window.location;return t.protocol===n.protocol&&t.host===n.host}function os(r,t,n){n[r]&&n[r].indexOf(t)!==-1||(n[r]=n[r]||[],n[r].push(t))}function Ar(r,t,n){if(n&&n[r]){let o=n[r].indexOf(t);o!==-1&&n[r].splice(o,1)}}class Re{constructor(t,n={}){Ai(this,n),this.type=t}}class J extends Re{constructor(t,n={}){super("error",Ai({error:t},n))}}class ie{on(t,n){return this._listeners=this._listeners||{},os(t,n,this._listeners),{unsubscribe:()=>{this.off(t,n)}}}off(t,n){return Ar(t,n,this._listeners),Ar(t,n,this._oneTimeListeners),this}once(t,n){return n?(this._oneTimeListeners=this._oneTimeListeners||{},os(t,n,this._oneTimeListeners),this):new Promise(o=>this.once(t,o))}fire(t,n){typeof t=="string"&&(t=new Re(t,n||{}));let o=t.type;if(this.listens(o)){t.target=this;let u=this._listeners&&this._listeners[o]?this._listeners[o].slice():[];for(let x of u)x.call(this,t);let f=this._oneTimeListeners&&this._oneTimeListeners[o]?this._oneTimeListeners[o].slice():[];for(let x of f)Ar(o,x,this._oneTimeListeners),x.call(this,t);let m=this._eventedParent;m&&(Ai(t,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),m.fire(t))}else t instanceof J&&console.error(t.error);return this}listens(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)}setEventedParent(t,n){return this._eventedParent=t,this._eventedParentData=n,this}}var W={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},centerAltitude:{type:"number"},zoom:{type:"number"}
vendor: 3,621 bytes, line 4
4,bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},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
vendor: 8,509 bytes, line 4
4","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}
vendor: 8,954 bytes, line 4
4,"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_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,824 bytes, line 4
4,"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"}}};
4let ve=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Ie(r,t){let n={};for(let o in r)o!=="ref"&&(n[o]=r[o]);return ve.forEach(o=>{o in t&&(n[o]=t[o])}),n}function Ee(r,t){if(Array.isArray(r)){if(!Array.isArray(t)||r.length!==t.length)return!1;for(let n=0;n<r.length;n++)if(!Ee(r[n],t[n]))return!1;return!0}if(typeof r=="object"&&r!==null&&t!==null){if(typeof t!="object"||Object.keys(r).length!==Object.keys(t).length)return!1;for(let n in r)if(!Ee(r[n],t[n]))return!1;return!0}return r===t}function je(r,t){r.push(t)}function ke(r,t,n){je(n,{command:"addSource",args:[r,t[r]]})}function st(r,t,n){je(t,{command:"removeSource",args:[r]}),n[r]=!0}function et(r,t,n,o){st(r,n,o),ke(r,t,n)}function Be(r,t,n){let o;for(o in r[n])if(Object.prototype.hasOwnProperty.call(r[n],o)&&o!=="data"&&!Ee(r[n][o],t[n][o]))return!1;for(o in t[n])if(Object.prototype.hasOwnProperty.call(t[n],o)&&o!=="data"&&!Ee(r[n][o],t[n][o]))return!1;return!0}function lt(r,t,n,o,u,f){r=r||{},t=t||{};for(let m in r)Object.prototype.hasOwnProperty.call(r,m)&&(Ee(r[m],t[m])||n.push({command:f,args:[o,m,t[m],u]}));for(let m in t)Object.prototype.hasOwnProperty.call(t,m)&&!Object.prototype.hasOwnProperty.call(r,m)&&(Ee(r[m],t[m])||n.push({command:f,args:[o,m,t[m],u]}))}function Ct(r){return r.id}function kt(r,t){return r[t.id]=t,r}class tt{constructor(t,n,o,u){this.message=(t?`${t}: `:"")+o,u&&(this.identifier=u),n!=null&&n.__line__&&(this.line=n.__line__)}}function Kt(r,...t){for(let n of t)for(let o in n)r[o]=n[o];return r}class Vt extends Error{constructor(t,n){super(n),this.message=n,this.key=t}}class Ht{constructor(t,n=[]){this.parent=t,this.bindings={};for(let[o,u]of n)this.bindings[o]=u}concat(t){return new Ht(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}let di={kind:"null"},ft={kind:"number"},Rt={kind:"string"},Mt={kind:"boolean"},ti={kind:"color"},Zi={kind:"projectionDefinition"},Zn={kind:"object"},qt={kind:"value"},fr={kind:"collator"},ji={kind:"formatted"},Wn={kind:"padding"},Ts={kind:"resolvedImage"},Fn={kind:"variableAnchorOffsetCollection"};function Nr(r,t){return{kind:"array",itemType:r,N:t}}function zi(r){if(r.kind==="array"){let t=zi(r.itemType);return typeof r.N=="number"?`array<${t}, ${r.N}>`:r.itemType.kind==="value"?"array":`array<${t}>`}return r.kind}let tl=[di,ft,Rt,Mt,ti,Zi,ji,Zn,Nr(qt),Wn,Ts,Fn];function Ws(r,t){if(t.kind==="error")return null;if(r.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!Ws(r.itemType,t.itemType))&&(typeof r.N!="number"||r.N===t.N))return null}else{if(r.kind===t.kind)return null;if(r.kind==="value"){for(let n of tl)if(!Ws(n,t))return null}}return`Expected ${zi(r)} but found ${zi(t)} instead.`}function Ps(r,t){return t.some(n=>n.kind===r.kind)}function Xn(r,t){return t.some(n=>n==="null"?r===null:n==="array"?Array.isArray(r):n==="object"?r&&!Array.isArray(r)&&typeof r=="object":n===typeof r)}function Es(r,t){return r.kind==="array"&&t.kind==="array"?r.itemType.kind===t.itemType.kind&&typeof r.N=="number":r.kind===t.kind}let _o=.96422,vo=.82521,il=4/29,ls=6/29,rl=3*ls*ls,Gl=ls*ls*ls,bo=Math.PI/180,Xs=180/Math.PI;function $a(r){return(r%=360)<0&&(r+=360),r}function xo([r,t,n,o]){let u,f,m=cs((.2225045*(r=mr(r))+.7168786*(t=mr(t))+.0606169*(n=mr(n)))/1);r===t&&t===n?u=f=m:(u=cs((.4360747*r+.3850649*t+.1430804*n)/_o),f=cs((.0139322*r+.0971045*t+.7141733*n)/vo));let x=116*m-16;return[x<0?0:x,500*(u-m),200*(m-f),o]}function mr(r){return r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function cs(r){return r>Gl?Math.pow(r,1/3):r/rl+il}function _a([r,t,n,o]){let u=(r+16)/116,f=isNaN(t)?u:u+t/500,m=isNaN(n)?u:u-n/200;return u=1*Va(u),f=_o*Va(f),m=vo*Va(m),[wo(3.1338561*f-1.6168667*u-.4906146*m),wo(-.9787684*f+1.9161415*u+.033454*m),wo(.0719453*f-.2289914*u+1.4052427*m),o]}function wo(r){return(r=r<=.00304?12.92*r:1.055*Math.pow(r,1/2.4)-.055)<0?0:r>1?1:r}function Va(r){return r>ls?r*r*r:rl*(r-il)}function Ms(r){return parseInt(r.padEnd(2,r),16)/255}function yn(r,t){return ii(t?r/100:r,0,1)}function ii(r,t,n){return Math.min(Math.max(t,r),n)}function us(r){return!r.some(Number.isNaN)}let hs={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],ol
vendor: 24,723 bytes, line 4
4ive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function Yn(r,t,n){return r+n*(t-r)}function jr(r,t,n){return r.map((o,u)=>Yn(o,t[u],n))}class gi{constructor(t,n,o,u=1,f=!0){this.r=t,this.g=n,this.b=o,this.a=u,f||(this.r*=u,this.g*=u,this.b*=u,u||this.overwriteGetter("rgb",[t,n,o,u]))}static parse(t){if(t instanceof gi)return t;if(typeof t!="string")return;let n=function(o){if((o=o.toLowerCase().trim())==="transparent")return[0,0,0,0];let u=hs[o];if(u){let[m,x,T]=u;return[m/255,x/255,T/255,1]}if(o.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(o)){let m=o.length<6?1:2,x=1;return[Ms(o.slice(x,x+=m)),Ms(o.slice(x,x+=m)),Ms(o.slice(x,x+=m)),Ms(o.slice(x,x+m)||"ff")]}if(o.startsWith("rgb")){let m=o.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(m){let[x,T,E,A,k,$,q,Y,Q,oe,pe,Ce]=m,ye=[A||" ",q||" ",oe].join("");if(ye===" "||ye===" /"||ye===",,"||ye===",,,"){let G=[E,$,Q].join(""),se=G==="%%%"?100:G===""?255:0;if(se){let be=[ii(+T/se,0,1),ii(+k/se,0,1),ii(+Y/se,0,1),pe?yn(+pe,Ce):1];if(us(be))return be}}return}}let f=o.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(f){let[m,x,T,E,A,k,$,q,Y]=f,Q=[T||" ",A||" ",$].join("");if(Q===" "||Q===" /"||Q===",,"||Q===",,,"){let oe=[+x,ii(+E,0,100),ii(+k,0,100),q?yn(+q,Y):1];if(us(oe))return function([pe,Ce,ye,G]){function se(be){let Ge=(be+pe/30)%12,mt=Ce*Math.min(ye,1-ye);return ye-mt*Math.max(-1,Math.min(Ge-3,9-Ge,1))}return pe=$a(pe),Ce/=100,ye/=100,[se(0),se(8),se(4),G]}(oe)}}}(t);return n?new gi(...n,!1):void 0}get rgb(){let{r:t,g:n,b:o,a:u}=this,f=u||1/0;return this.overwriteGetter("rgb",[t/f,n/f,o/f,u])}get hcl(){return this.overwriteGetter("hcl",function(t){let[n,o,u,f]=xo(t),m=Math.sqrt(o*o+u*u);return[Math.round(1e4*m)?$a(Math.atan2(u,o)*Xs):NaN,m,n,f]}(this.rgb))}get lab(){return this.overwriteGetter("lab",xo(this.rgb))}overwriteGetter(t,n){return Object.defineProperty(this,t,{value:n}),n}toString(){let[t,n,o,u]=this.rgb;return`rgba(${[t,n,o].map(f=>Math.round(255*f)).join(",")},${u})`}static interpolate(t,n,o,u="rgb"){switch(u){case"rgb":{let[f,m,x,T]=jr(t.rgb,n.rgb,o);return new gi(f,m,x,T,!1)}case"hcl":{let[f,m,x,T]=t.hcl,[E,A,k,$]=n.hcl,q,Y;if(isNaN(f)||isNaN(E))isNaN(f)?isNaN(E)?q=NaN:(q=E,x!==1&&x!==0||(Y=A)):(q=f,k!==1&&k!==0||(Y=m));else{let ye=E-f;E>f&&ye>180?ye-=360:E<f&&f-E>180&&(ye+=360),q=f+o*ye}let[Q,oe,pe,Ce]=function([ye,G,se,be]){return ye=isNaN(ye)?0:ye*bo,_a([se,Math.cos(ye)*G,Math.sin(ye)*G,be])}([q,Y??Yn(m,A,o),Yn(x,k,o),Yn(T,$,o)]);return new gi(Q,oe,pe,Ce,!1)}case"lab":{let[f,m,x,T]=_a(jr(t.lab,n.lab,o));return new gi(f,m,x,T,!1)}}}}gi.black=new gi(0,0,0,1),gi.white=new gi(1,1,1,1),gi.transparent=new gi(0,0,0,0),gi.red=new gi(1,0,0,1);class $r{constructor(t,n,o){this.sensitivity=t?n?"variant":"case":n?"accent":"base",this.locale=o,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,n){return this.collator.compare(t,n)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let va=["bottom","center","top"];class Ys{constructor(t,n,o,u,f,m){this.text=t,this.image=n,this.scale=o,this.fontStack=u,this.textColor=f,this.verticalAlign=m}}class ar{constructor(t){this.sections=t}static fromString(t){return new ar([new Ys(t,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(t=>t.text.length!==0||t.image&&t.image.name.length!==0)}static factory(t){return t instanceof ar?t:ar.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map(t=>t.text).join("")}}class Qi{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Qi)return t;if(typeof t=="number")return new Qi([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(let n of t)if(typeof n!="number")return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new Qi(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,n,o){return new Qi(jr(t.values,n.values,o))}}class Ri{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}}let Ua=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class br{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof br)return t;if(Array.isArray(t)&&!(t.length<1)&&t.length%2==0){for(let n=0;n<t.length;n+=2){let o=t[n],u=t[n+1];if(typeof o!="string"||!Ua.has(o)||!Array.isArray(u)||u.length!==2||typeof u[0]!="number"||typeof u[1]!="number")return}return new br(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,n,o){let u=t.values,f=n.values;if(u.length!==f.length)throw new Ri(`Cannot interpolate values of different length. from: ${t.toString()}, to: ${n.toString()}`);let m=[];for(let x=0;x<u.length;x+=2){if(u[x]!==f[x])throw new Ri(`Cannot interpolate values containing mismatched anchors. from[${x}]: ${u[x]}, to[${x}]: ${f[x]}`);m.push(u[x]);let[T,E]=u[x+1],[A,k]=f[x+1];m.push([Yn(T,A,o),Yn(E,k,o)])}return new br(m)}}class Kr{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new Kr({name:t,available:!1}):null}}class or{constructor(t,n,o){this.from=t,this.to=n,this.transition=o}static interpolate(t,n,o){return new or(t,n,o)}static parse(t){return t instanceof or?t:Array.isArray(t)&&t.length===3&&typeof t[0]=="string"&&typeof t[1]=="string"&&typeof t[2]=="number"?new or(t[0],t[1],t[2]):typeof t=="object"&&typeof t.from=="string"&&typeof t.to=="string"&&typeof t.transition=="number"?new or(t.from,t.to,t.transition):typeof t=="string"?new or(t,t,1):void 0}}function So(r,t,n,o){return typeof r=="number"&&r>=0&&r<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof n=="number"&&n>=0&&n<=255?o===void 0||typeof o=="number"&&o>=0&&o<=1?null:`Invalid rgba value [${[r,t,n,o].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof o=="number"?[r,t,n,o]:[r,t,n]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Kn(r){if(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number"||r instanceof or||r instanceof gi||r instanceof $r||r instanceof ar||r instanceof Qi||r instanceof br||r instanceof Kr)return!0;if(Array.isArray(r)){for(let t of r)if(!Kn(t))return!1;return!0}if(typeof r=="object"){for(let t in r)if(!Kn(r[t]))return!1;return!0}return!1}function Gi(r){if(r===null)return di;if(typeof r=="string")return Rt;if(typeof r=="boolean")return Mt;if(typeof r=="number")return ft;if(r instanceof gi)return ti;if(r instanceof or)return Zi;if(r instanceof $r)return fr;if(r instanceof ar)return ji;if(r instanceof Qi)return Wn;if(r instanceof br)return Fn;if(r instanceof Kr)return Ts;if(Array.isArray(r)){let t=r.length,n;for(let o of r){let u=Gi(o);if(n){if(n===u)continue;n=qt;break}n=u}return Nr(n||qt,t)}return Zn}function Cs(r){let t=typeof r;return r===null?"":t==="string"||t==="number"||t==="boolean"?String(r):r instanceof gi||r instanceof or||r instanceof ar||r instanceof Qi||r instanceof br||r instanceof Kr?r.toString():JSON.stringify(r)}class ds{constructor(t,n){this.type=t,this.value=n}static parse(t,n){if(t.length!==2)return n.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Kn(t[1]))return n.error("invalid value");let o=t[1],u=Gi(o),f=n.expectedType;return u.kind!=="array"||u.N!==0||!f||f.kind!=="array"||typeof f.N=="number"&&f.N!==0||(u=f),new ds(u,o)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let ba={string:Rt,number:ft,boolean:Mt,object:Zn};class Vr{constructor(t,n){this.type=t,this.args=n}static parse(t,n){if(t.length<2)return n.error("Expected at least one argument.");let o,u=1,f=t[0];if(f==="array"){let x,T;if(t.length>2){let E=t[1];if(typeof E!="string"||!(E in ba)||E==="object")return n.error('The item type argument of "array" must be one of string, number, boolean',1);x=ba[E],u++}else x=qt;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return n.error('The length argument to "array" must be a positive integer literal',2);T=t[2],u++}o=Nr(x,T)}else{if(!ba[f])throw new Error(`Types doesn't contain name = ${f}`);o=ba[f]}let m=[];for(;u<t.length;u++){let x=n.parse(t[u],u,qt);if(!x)return null;m.push(x)}return new Vr(o,m)}evaluate(t){for(let n=0;n<this.args.length;n++){let o=this.args[n].evaluate(t);if(!Ws(this.type,Gi(o)))return o;if(n===this.args.length-1)throw new Ri(`Expected value to be of type ${zi(this.type)}, but found ${zi(Gi(o))} instead.`)}throw new Error}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}let $i={"to-boolean":Mt,"to-color":ti,"to-number":ft,"to-string":Rt};class On{constructor(t,n){this.type=t,this.args=n}static parse(t,n){if(t.length<2)return n.error("Expected at least one argument.");let o=t[0];if(!$i[o])throw new Error(`Can't parse ${o} as it is not part of the known types`);if((o==="to-boolean"||o==="to-string")&&t.length!==2)return n.error("Expected one argument.");let u=$i[o],f=[];for(let m=1;m<t.length;m++){let x=n.parse(t[m],m,qt);if(!x)return null;f.push(x)}return new On(u,f)}evaluate(t){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(t);case"color":{let n,o;for(let u of this.args){if(n=u.evaluate(t),o=null,n instanceof gi)return n;if(typeof n=="string"){let f=t.parseColor(n);if(f)return f}else if(Array.isArray(n)&&(o=n.length<3||n.length>4?`Invalid rgba value ${JSON.stringify(n)}: expected an array containing either three or four numeric values.`:So(n[0],n[1],n[2],n[3]),!o))return new gi(n[0]/255,n[1]/255,n[2]/255,n[3])}throw new Ri(o||`Could not parse color from value '${typeof n=="string"?n:JSON.stringify(n)}'`)}case"padding":{let n;for(let o of this.args){n=o.evaluate(t);let u=Qi.parse(n);if(u)return u}throw new Ri(`Could not parse padding from value '${typeof n=="string"?n:JSON.stringify(n)}'`)}case"variableAnchorOffsetCollection":{let n;for(let o of this.args){n=o.evaluate(t);let u=br.parse(n);if(u)return u}throw new Ri(`Could not parse variableAnchorOffsetCollection from value '${typeof n=="string"?n:JSON.stringify(n)}'`)}case"number":{let n=null;for(let o of this.args){if(n=o.evaluate(t),n===null)return 0;let u=Number(n);if(!isNaN(u))return u}throw new Ri(`Could not convert ${JSON.stringify(n)} to number.`)}case"formatted":return ar.fromString(Cs(this.args[0].evaluate(t)));case"resolvedImage":return Kr.fromString(Cs(this.args[0].evaluate(t)));case"projectionDefinition":return this.args[0].evaluate(t);default:return Cs(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}let Ti=["Unknown","Point","LineString","Polygon"];class ri{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Ti[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let n=this._parseColorCache[t];return n||(n=this._parseColorCache[t]=gi.parse(t)),n}}class Ks{constructor(t,n,o=[],u,f=new Ht,m=[]){this.registry=t,this.path=o,this.key=o.map(x=>`[${x}]`).join(""),this.scope=f,this.errors=m,this.expectedType=u,this._isConstant=n}parse(t,n,o,u,f={}){return n?this.concat(n,o,u)._parse(t,f):this._parse(t,f)}_parse(t,n){function o(u,f,m){return m==="assert"?new Vr(f,[u]):m==="coerce"?new On(f,[u]):u}if(t!==null&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"||(t=["literal",t]),Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let u=t[0];if(typeof u!="string")return this.error(`Expression name must be a string, but found ${typeof u} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let f=this.registry[u];if(f){let m=f.parse(t,this);if(!m)return null;if(this.expectedType){let x=this.expectedType,T=m.type;if(x.kind!=="string"&&x.kind!=="number"&&x.kind!=="boolean"&&x.kind!=="object"&&x.kind!=="array"||T.kind!=="value")if(x.kind!=="projectionDefinition"||T.kind!=="string"&&T.kind!=="array")if(x.kind!=="color"&&x.kind!=="formatted"&&x.kind!=="resolvedImage"||T.kind!=="value"&&T.kind!=="string")if(x.kind!=="padding"||T.kind!=="value"&&T.kind!=="number"&&T.kind!=="array")if(x.kind!=="variableAnchorOffsetCollection"||T.kind!=="value"&&T.kind!=="array"){if(this.checkSubtype(x,T))return null}else m=o(m,x,n.typeAnnotation||"coerce");else m=o(m,x,n.typeAnnotation||"coerce");else m=o(m,x,n.typeAnnotation||"coerce");else m=o(m,x,n.typeAnnotation||"coerce");else m=o(m,x,n.typeAnnotation||"assert")}if(!(m instanceof ds)&&m.type.kind!=="resolvedImage"&&this._isConstant(m)){let x=new ri;try{m=new ds(m.type,m.evaluate(x))}catch(T){return this.error(T.message),null}}return m}return this.error(`Unknown expression "${u}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(t===void 0?"'undefined' value invalid. Use null instead.":typeof t=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof t} instead.`)}concat(t,n,o){let u=typeof t=="number"?this.path.concat(t):this.path,f=o?this.scope.concat(o):this.scope;return new Ks(this.registry,this._isConstant,u,n||null,f,this.errors)}error(t,...n){let o=`${this.key}${n.map(u=>`[${u}]`).join("")}`;this.errors.push(new Vt(o,t))}checkSubtype(t,n){let o=Ws(t,n);return o&&this.error(o),o}}class yi{constructor(t,n){this.type=n.type,this.bindings=[].concat(t),this.result=n}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(let n of this.bindings)t(n[1]);t(this.result)}static parse(t,n){if(t.length<4)return n.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);let o=[];for(let f=1;f<t.length-1;f+=2){let m=t[f];if(typeof m!="string")return n.error(`Expected string, but found ${typeof m} instead.`,f);if(/[^a-zA-Z0-9_]/.test(m))return n.error("Variable names must contain only alphanumeric characters or '_'.",f);let x=n.parse(t[f+1],f+1);if(!x)return null;o.push([m,x])}let u=n.parse(t[t.length-1],t.length-1,n.expectedType,o);return u?new yi(o,u):null}outputDefined(){return this.result.outputDefined()}}class Js{constructor(t,n){this.type=n.type,this.name=t,this.boundExpression=n}static parse(t,n){if(t.length!==2||typeof t[1]!="string")return n.error("'var' expression requires exactly one string literal argument.");let o=t[1];return n.scope.has(o)?new Js(o,n.scope.get(o)):n.error(`Unknown variable "${o}". Make sure "${o}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}}class _n{constructor(t,n,o){this.type=t,this.index=n,this.input=o}static parse(t,n){if(t.length!==3)return n.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let o=n.parse(t[1],1,ft),u=n.parse(t[2],2,Nr(n.expectedType||qt));return o&&u?new _n(u.type.itemType,o,u):null}evaluate(t){let n=this.index.evaluate(t),o=this.input.evaluate(t);if(n<0)throw new Ri(`Array index out of bounds: ${n} < 0.`);if(n>=o.length)throw new Ri(`Array index out of bounds: ${n} > ${o.length-1}.`);if(n!==Math.floor(n))throw new Ri(`Array index must be an integer, but found ${n} instead.`);return o[n]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class Is{constructor(t,n){this.type=Mt,this.needle=t,this.haystack=n}static parse(t,n){if(t.length!==3)return n.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let o=n.parse(t[1],1,qt),u=n.parse(t[2],2,qt);return o&&u?Ps(o.type,[Mt,Rt,ft,di,qt])?new Is(o,u):n.error(`Expected first argument to be of type boolean, string, number or null, but found ${zi(o.type)} instead`):null}evaluate(t){let n=this.needle.evaluate(t),o=this.haystack.evaluate(t);if(!o)return!1;if(!Xn(n,["boolean","string","number","null"]))throw new Ri(`Expected first argument to be of type boolean, string, number or null, but found ${zi(Gi(n))} instead.`);if(!Xn(o,["string","array"]))throw new Ri(`Expected second argument to be of type array or string, but found ${zi(Gi(o))} instead.`);return o.indexOf(n)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class Qs{constructor(t,n,o){this.type=ft,this.needle=t,this.haystack=n,this.fromIndex=o}static parse(t,n){if(t.length<=2||t.length>=5)return n.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);let o=n.parse(t[1],1,qt),u=n.parse(t[2],2,qt);if(!o||!u)return null;if(!Ps(o.type,[Mt,Rt,ft,di,qt]))return n.error(`Expected first argument to be of type boolean, string, number or null, but found ${zi(o.type)} instead`);if(t.length===4){let f=n.parse(t[3],3,ft);return f?new Qs(o,u,f):null}return new Qs(o,u)}evaluate(t){let n=this.needle.evaluate(t),o=this.haystack.evaluate(t);if(!Xn(n,["boolean","string","number","null"]))throw new Ri(`Expected first argument to be of type boolean, string, number or null, but found ${zi(Gi(n))} instead.`);let u;if(this.fromIndex&&(u=this.fromIndex.evaluate(t)),Xn(o,["string"])){let f=o.indexOf(n,u);return f===-1?-1:[...o.slice(0,f)].length}if(Xn(o,["array"]))return o.indexOf(n,u);throw new Ri(`Expected second argument to be of type array or string, but found ${zi(Gi(o))} instead.`)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class ea{constructor(t,n,o,u,f,m){this.inputType=t,this.type=n,this.input=o,this.cases=u,this.outputs=f,this.otherwise=m}static parse(t,n){if(t.length<5)return n.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return n.error("Expected an even number of arguments.");let o,u;n.expectedType&&n.expectedType.kind!=="value"&&(u=n.expectedType);let f={},m=[];for(let E=2;E<t.length-1;E+=2){let A=t[E],k=t[E+1];Array.isArray(A)||(A=[A]);let $=n.concat(E);if(A.length===0)return $.error("Expected at least one branch label.");for(let Y of A){if(typeof Y!="number"&&typeof Y!="string")return $.error("Branch labels must be numbers or strings.");if(typeof Y=="number"&&Math.abs(Y)>Number.MAX_SAFE_INTEGER)return $.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Y=="number"&&Math.floor(Y)!==Y)return $.error("Numeric branch labels must be integer values.");if(o){if($.checkSubtype(o,Gi(Y)))return null}else o=Gi(Y);if(f[String(Y)]!==void 0)return $.error("Branch labels must be unique.");f[String(Y)]=m.length}let q=n.parse(k,E,u);if(!q)return null;u=u||q.type,m.push(q)}let x=n.parse(t[1],1,qt);if(!x)return null;let T=n.parse(t[t.length-1],t.length-1,u);return T?x.type.kind!=="value"&&n.concat(1).checkSubtype(o,x.type)?null:new ea(o,u,x,f,m,T):null}evaluate(t){let n=this.input.evaluate(t);return(Gi(n)===this.inputType&&this.outputs[this.cases[n]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every(t=>t.outputDefined())&&this.otherwise.outputDefined()}}class ta{constructor(t,n,o){this.type=t,this.branches=n,this.otherwise=o}static parse(t,n){if(t.length<4)return n.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return n.error("Expected an odd number of arguments.");let o;n.expectedType&&n.expectedType.kind!=="value"&&(o=n.expectedType);let u=[];for(let m=1;m<t.length-1;m+=2){let x=n.parse(t[m],m,Mt);if(!x)return null;let T=n.parse(t[m+1],m+1,o);if(!T)return null;u.push([x,T]),o=o||T.type}let f=n.parse(t[t.length-1],t.length-1,o);if(!f)return null;if(!o)throw new Error("Can't infer output type");return new ta(o,u,f)}evaluate(t){for(let[n,o]of this.branches)if(n.evaluate(t))return o.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(let[n,o]of this.branches)t(n),t(o);t(this.otherwise)}outputDefined(){return this.branches.every(([t,n])=>n.outputDefined())&&this.otherwise.outputDefined()}}class ia{constructor(t,n,o,u){this.type=t,this.input=n,this.beginIndex=o,this.endIndex=u}static parse(t,n){if(t.length<=2||t.length>=5)return n.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);let o=n.parse(t[1],1,qt),u=n.parse(t[2],2,ft);if(!o||!u)return null;if(!Ps(o.type,[Nr(qt),Rt,qt]))return n.error(`Expected first argument to be of type array or string, but found ${zi(o.type)} instead`);if(t.length===4){let f=n.parse(t[3],3,ft);return f?new ia(o.type,o,u,f):null}return new ia(o.type,o,u)}evaluate(t){let n=this.input.evaluate(t),o=this.beginIndex.evaluate(t),u;if(this.endIndex&&(u=this.endIndex.evaluate(t)),Xn(n,["string"]))return[...n].slice(o,u).join("");if(Xn(n,["array"]))return n.slice(o,u);throw new Ri(`Expected first argument to be of type array or string, but found ${zi(Gi(n))} instead.`)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}function ra(r,t){let n=r.length-1,o,u,f=0,m=n,x=0;for(;f<=m;)if(x=Math.floor((f+m)/2),o=r[x],u=r[x+1],o<=t){if(x===n||t<u)return x;f=x+1}else{if(!(o>t))throw new Ri("Input is not a number.");m=x-1}return 0}class na{constructor(t,n,o){this.type=t,this.input=n,this.labels=[],this.outputs=[];for(let[u,f]of o)this.labels.push(u),this.outputs.push(f)}static parse(t,n){if(t.length-1<4)return n.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return n.error("Expected an even number of arguments.");let o=n.parse(t[1],1,ft);if(!o)return null;let u=[],f=null;n.expectedType&&n.expectedType.kind!=="value"&&(f=n.expectedType);for(let m=1;m<t.length;m+=2){let x=m===1?-1/0:t[m],T=t[m+1],E=m,A=m+1;if(typeof x!="number")return n.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',E);if(u.length&&u[u.length-1][0]>=x)return n.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',E);let k=n.parse(T,A,f);if(!k)return null;f=f||k.type,u.push([x,k])}return new na(f,o,u)}evaluate(t){let n=this.labels,o=this.outputs;if(n.length===1)return o[0].evaluate(t);let u=this.input.evaluate(t);if(u<=n[0])return o[0].evaluate(t);let f=n.length;return u>=n[f-1]?o[f-1].evaluate(t):o[ra(n,u)].evaluate(t)}eachChild(t){t(this.input);for(let n of this.outputs)t(n)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function nl(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var As,lr,xa=function(){if(lr)return As;function r(t,n,o,u){this.cx=3*t,this.bx=3*(o-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*n,this.by=3*(u-n)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=o,this.p2y=u}return lr=1,As=r,r.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,n){if(n===void 0&&(n=1e-6),t<0)return 0;if(t>1)return 1;for(var o=t,u=0;u<8;u++){var f=this.sampleCurveX(o)-t;if(Math.abs(f)<n)return o;var m=this.sampleCurveDerivativeX(o);if(Math.abs(m)<1e-6)break;o-=f/m}var x=0,T=1;for(o=t,u=0;u<20&&(f=this.sampleCurveX(o),!(Math.abs(f-t)<n));u++)t>f?x=o:T=o,o=.5*(T-x)+x;return o}
4,solve:function(t,n){return this.sampleCurveY(this.solveCurveX(t,n))}},As}(),Ga=nl(xa);class Ur{constructor(t,n,o,u,f){this.type=t,this.operator=n,this.interpolation=o,this.input=u,this.labels=[],this.outputs=[];for(let[m,x]of f)this.labels.push(m),this.outputs.push(x)}static interpolationFactor(t,n,o,u){let f=0;if(t.name==="exponential")f=gr(n,t.base,o,u);else if(t.name==="linear")f=gr(n,1,o,u);else if(t.name==="cubic-bezier"){let m=t.controlPoints;f=new Ga(m[0],m[1],m[2],m[3]).solve(gr(n,1,o,u))}return f}static parse(t,n){let[o,u,f,...m]=t;if(!Array.isArray(u)||u.length===0)return n.error("Expected an interpolation type expression.",1);if(u[0]==="linear")u={name:"linear"};else if(u[0]==="exponential"){let E=u[1];if(typeof E!="number")return n.error("Exponential interpolation requires a numeric base.",1,1);u={name:"exponential",base:E}}else{if(u[0]!=="cubic-bezier")return n.error(`Unknown interpolation type ${String(u[0])}`,1,0);{let E=u.slice(1);if(E.length!==4||E.some(A=>typeof A!="number"||A<0||A>1))return n.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);u={name:"cubic-bezier",controlPoints:E}}}if(t.length-1<4)return n.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return n.error("Expected an even number of arguments.");if(f=n.parse(f,2,ft),!f)return null;let x=[],T=null;o==="interpolate-hcl"||o==="interpolate-lab"?T=ti:n.expectedType&&n.expectedType.kind!=="value"&&(T=n.expectedType);for(let E=0;E<m.length;E+=2){let A=m[E],k=m[E+1],$=E+3,q=E+4;if(typeof A!="number")return n.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',$);if(x.length&&x[x.length-1][0]>=A)return n.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',$);let Y=n.parse(k,q,T);if(!Y)return null;T=T||Y.type,x.push([A,Y])}return Es(T,ft)||Es(T,Zi)||Es(T,ti)||Es(T,Wn)||Es(T,Fn)||Es(T,Nr(ft))?new Ur(T,o,u,f,x):n.error(`Type ${zi(T)} is not interpolatable.`)}evaluate(t){let n=this.labels,o=this.outputs;if(n.length===1)return o[0].evaluate(t);let u=this.input.evaluate(t);if(u<=n[0])return o[0].evaluate(t);let f=n.length;if(u>=n[f-1])return o[f-1].evaluate(t);let m=ra(n,u),x=Ur.interpolationFactor(this.interpolation,u,n[m],n[m+1]),T=o[m].evaluate(t),E=o[m+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return Yn(T,E,x);case"color":return gi.interpolate(T,E,x);case"padding":return Qi.interpolate(T,E,x);case"variableAnchorOffsetCollection":return br.interpolate(T,E,x);case"array":return jr(T,E,x);case"projectionDefinition":return or.interpolate(T,E,x)}case"interpolate-hcl":return gi.interpolate(T,E,x,"hcl");case"interpolate-lab":return gi.interpolate(T,E,x,"lab")}}eachChild(t){t(this.input);for(let n of this.outputs)t(n)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function gr(r,t,n,o){let u=o-n,f=r-n;return u===0?0:t===1?f/u:(Math.pow(t,f)-1)/(Math.pow(t,u)-1)}let Cn={color:gi.interpolate,number:Yn,padding:Qi.interpolate,variableAnchorOffsetCollection:br.interpolate,array:jr};class _{constructor(t,n){this.type=t,this.args=n}static parse(t,n){if(t.length<2)return n.error("Expected at least one argument.");let o=null,u=n.expectedType;u&&u.kind!=="value"&&(o=u);let f=[];for(let x of t.slice(1)){let T=n.parse(x,1+f.length,o,void 0,{typeAnnotation:"omit"});if(!T)return null;o=o||T.type,f.push(T)}if(!o)throw new Error("No output type");let m=u&&f.some(x=>Ws(u,x.type));return new _(m?qt:o,f)}evaluate(t){let n,o=null,u=0;for(let f of this.args)if(u++,o=f.evaluate(t),o&&o instanceof Kr&&!o.available&&(n||(n=o.name),o=null,u===this.args.length&&(o=n)),o!==null)break;return o}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}function S(r,t){return r==="=="||r==="!="?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 I(r,t,n,o){return o.compare(t,n)===0}function D(r,t,n){let o=r!=="=="&&r!=="!=";return class Ry{constructor(f,m,x){this.type=Mt,this.lhs=f,this.rhs=m,this.collator=x,this.hasUntypedArgument=f.type.kind==="value"||m.type.kind==="value"}static parse(f,m){if(f.length!==3&&f.length!==4)return m.error("Expected two or three arguments.");let x=f[0],T=m.parse(f[1],1,qt);if(!T)return null;if(!S(x,T.type))return m.concat(1).error(`"${x}" comparisons are not supported for type '${zi(T.type)}'.`);let E=m.parse(f[2],2,qt);if(!E)return null;if(!S(x,E.type))return m.concat(2).error(`"${x}" comparisons are not supported for type '${zi(E.type)}'.`);if(T.type.kind!==E.type.kind&&T.type.kind!=="value"&&E.type.kind!=="value")return m.error(`Cannot compare types '${zi(T.type)}' and '${zi(E.type)}'.`);o&&(T.type.kind==="value"&&E.type.kind!=="value"?T=new Vr(E.type,[T]):T.type.kind!=="value"&&E.type.kind==="value"&&(E=new Vr(T.type,[E])));let A=null;if(f.length===4){if(T.type.kind!=="string"&&E.type.kind!=="string"&&T.type.kind!=="value"&&E.type.kind!=="value")return m.error("Cannot use collator to compare non-string types.");if(A=m.parse(f[3],3,fr),!A)return null}return new Ry(T,E,A)}evaluate(f){let m=this.lhs.evaluate(f),x=this.rhs.evaluate(f);if(o&&this.hasUntypedArgument){let T=Gi(m),E=Gi(x);if(T.kind!==E.kind||T.kind!=="string"&&T.kind!=="number")throw new Ri(`Expected arguments for "${r}" to be (string, string) or (number, number), but found (${T.kind}, ${E.kind}) instead.`)}if(this.collator&&!o&&this.hasUntypedArgument){let T=Gi(m),E=Gi(x);if(T.kind!=="string"||E.kind!=="string")return t(f,m,x)}return this.collator?n(f,m,x,this.collator.evaluate(f)):t(f,m,x)}eachChild(f){f(this.lhs),f(this.rhs),this.collator&&f(this.collator)}outputDefined(){return!0}}}let Z=D("==",function(r,t,n){return t===n},I),X=D("!=",function(r,t,n){return t!==n},function(r,t,n,o){return!I(0,t,n,o)}),te=D("<",function(r,t,n){return t<n},function(r,t,n,o){return o.compare(t,n)<0}),Te=D(">",function(r,t,n){return t>n},function(r,t,n,o){return o.compare(t,n)>0}),_e=D("<=",function(r,t,n){return t<=n},function(r,t,n,o){return o.compare(t,n)<=0}),Fe=D(">=",function(r,t,n){return t>=n},function(r,t,n,o){return o.compare(t,n)>=0});class rt{constructor(t,n,o){this.type=fr,this.locale=o,this.caseSensitive=t,this.diacriticSensitive=n}static parse(t,n){if(t.length!==2)return n.error("Expected one argument.");let o=t[1];if(typeof o!="object"||Array.isArray(o))return n.error("Collator options argument must be an object.");let u=n.parse(o["case-sensitive"]!==void 0&&o["case-sensitive"],1,Mt);if(!u)return null;let f=n.parse(o["diacritic-sensitive"]!==void 0&&o["diacritic-sensitive"],1,Mt);if(!f)return null;let m=null;return o.locale&&(m=n.parse(o.locale,1,Rt),!m)?null:new rt(u,f,m)}evaluate(t){return new $r(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}}class dt{constructor(t,n,o,u,f){this.type=Rt,this.number=t,this.locale=n,this.currency=o,this.minFractionDigits=u,this.maxFractionDigits=f}static parse(t,n){if(t.length!==3)return n.error("Expected two arguments.");let o=n.parse(t[1],1,ft);if(!o)return null;let u=t[2];if(typeof u!="object"||Array.isArray(u))return n.error("NumberFormat options argument must be an object.");let f=null;if(u.locale&&(f=n.parse(u.locale,1,Rt),!f))return null;let m=null;if(u.currency&&(m=n.parse(u.currency,1,Rt),!m))return null;let x=null;if(u["min-fraction-digits"]&&(x=n.parse(u["min-fraction-digits"],1,ft),
vendor: 10,100 bytes, line 4
4!x))return null;let T=null;return u["max-fraction-digits"]&&(T=n.parse(u["max-fraction-digits"],1,ft),!T)?null:new dt(o,f,m,x,T)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}}class We{constructor(t){this.type=ji,this.sections=t}static parse(t,n){if(t.length<2)return n.error("Expected at least one argument.");let o=t[1];if(!Array.isArray(o)&&typeof o=="object")return n.error("First argument must be an image or text section.");let u=[],f=!1;for(let m=1;m<=t.length-1;++m){let x=t[m];if(f&&typeof x=="object"&&!Array.isArray(x)){f=!1;let T=null;if(x["font-scale"]&&(T=n.parse(x["font-scale"],1,ft),!T))return null;let E=null;if(x["text-font"]&&(E=n.parse(x["text-font"],1,Nr(Rt)),!E))return null;let A=null;if(x["text-color"]&&(A=n.parse(x["text-color"],1,ti),!A))return null;let k=null;if(x["vertical-align"]){if(typeof x["vertical-align"]=="string"&&!va.includes(x["vertical-align"]))return n.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${x["vertical-align"]}' instead.`);if(k=n.parse(x["vertical-align"],1,Rt),!k)return null}let $=u[u.length-1];$.scale=T,$.font=E,$.textColor=A,$.verticalAlign=k}else{let T=n.parse(t[m],1,qt);if(!T)return null;let E=T.type.kind;if(E!=="string"&&E!=="value"&&E!=="null"&&E!=="resolvedImage")return n.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");f=!0,u.push({content:T,scale:null,font:null,textColor:null,verticalAlign:null})}}return new We(u)}evaluate(t){return new ar(this.sections.map(n=>{let o=n.content.evaluate(t);return Gi(o)===Ts?new Ys("",o,null,null,null,n.verticalAlign?n.verticalAlign.evaluate(t):null):new Ys(Cs(o),null,n.scale?n.scale.evaluate(t):null,n.font?n.font.evaluate(t).join(","):null,n.textColor?n.textColor.evaluate(t):null,n.verticalAlign?n.verticalAlign.evaluate(t):null)}))}eachChild(t){for(let n of this.sections)t(n.content),n.scale&&t(n.scale),n.font&&t(n.font),n.textColor&&t(n.textColor),n.verticalAlign&&t(n.verticalAlign)}outputDefined(){return!1}}class Pt{constructor(t){this.type=Ts,this.input=t}static parse(t,n){if(t.length!==2)return n.error("Expected two arguments.");let o=n.parse(t[1],1,Rt);return o?new Pt(o):n.error("No image name provided.")}evaluate(t){let n=this.input.evaluate(t),o=Kr.fromString(n);return o&&t.availableImages&&(o.available=t.availableImages.indexOf(n)>-1),o}eachChild(t){t(this.input)}outputDefined(){return!1}}class ei{constructor(t){this.type=ft,this.input=t}static parse(t,n){if(t.length!==2)return n.error(`Expected 1 argument, but found ${t.length-1} instead.`);let o=n.parse(t[1],1);return o?o.type.kind!=="array"&&o.type.kind!=="string"&&o.type.kind!=="value"?n.error(`Expected argument of type string or array, but found ${zi(o.type)} instead.`):new ei(o):null}evaluate(t){let n=this.input.evaluate(t);if(typeof n=="string")return[...n].length;if(Array.isArray(n))return n.length;throw new Ri(`Expected value to be of type string or array, but found ${zi(Gi(n))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}let ni=8192;function ci(r,t){let n=(180+r[0])/360,o=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r[1]*Math.PI/360)))/360,u=Math.pow(2,t.z);return[Math.round(n*u*ni),Math.round(o*u*ni)]}function ir(r,t){let n=Math.pow(2,t.z);return[(u=(r[0]/ni+t.x)/n,360*u-180),(o=(r[1]/ni+t.y)/n,360/Math.PI*Math.atan(Math.exp((180-360*o)*Math.PI/180))-90)];var o,u}function er(r,t){r[0]=Math.min(r[0],t[0]),r[1]=Math.min(r[1],t[1]),r[2]=Math.max(r[2],t[0]),r[3]=Math.max(r[3],t[1])}function Jr(r,t){return!(r[0]<=t[0]||r[2]>=t[2]||r[1]<=t[1]||r[3]>=t[3])}function In(r,t,n){let o=r[0]-t[0],u=r[1]-t[1],f=r[0]-n[0],m=r[1]-n[1];return o*m-f*u==0&&o*f<=0&&u*m<=0}function hi(r,t,n,o){return(u=[o[0]-n[0],o[1]-n[1]])[0]*(f=[t[0]-r[0],t[1]-r[1]])[1]-u[1]*f[0]!=0&&!(!An(r,t,n,o)||!An(n,o,r,t));var u,f}function ps(r,t,n){for(let o of n)for(let u=0;u<o.length-1;++u)if(hi(r,t,o[u],o[u+1]))return!0;return!1}function pi(r,t,n=!1){let o=!1;for(let x of t)for(let T=0;T<x.length-1;T++){if(In(r,x[T],x[T+1]))return n;(f=x[T])[1]>(u=r)[1]!=(m=x[T+1])[1]>u[1]&&u[0]<(m[0]-f[0])*(u[1]-f[1])/(m[1]-f[1])+f[0]&&(o=!o)}var u,f,m;return o}function rr(r,t){for(let n of t)if(pi(r,n))return!0;return!1}function sa(r,t){for(let n of r)if(!pi(n,t))return!1;for(let n=0;n<r.length-1;++n)if(ps(r[n],r[n+1],t))return!1;return!0}function To(r,t){for(let n of t)if(sa(r,n))return!0;return!1}function An(r,t,n,o){let u=o[0]-n[0],f=o[1]-n[1],m=(r[0]-n[0])*f-u*(r[1]-n[1]),x=(t[0]-n[0])*f-u*(t[1]-n[1]);return m>0&&x<0||m<0&&x>0}function fs(r,t,n){let o=[];for(let u=0;u<r.length;u++){let f=[];for(let m=0;m<r[u].length;m++){let x=ci(r[u][m],n);er(t,x),f.push(x)}o.push(f)}return o}function vn(r,t,n){let o=[];for(let u=0;u<r.length;u++){let f=fs(r[u],t,n);o.push(f)}return o}function Nn(r,t,n,o){if(r[0]<n[0]||r[0]>n[2]){let u=.5*o,f=r[0]-n[0]>u?-o:n[0]-r[0]>u?o:0;f===0&&(f=r[0]-n[2]>u?-o:n[2]-r[0]>u?o:0),r[0]+=f}er(t,r)}function Jn(r,t,n,o){let u=Math.pow(2,o.z)*ni,f=[o.x*ni,o.y*ni],m=[];for(let x of r)for(let T of x){let E=[T.x+f[0],T.y+f[1]];Nn(E,t,n,u),m.push(E)}return m}function dn(r,t,n,o){let u=Math.pow(2,o.z)*ni,f=[o.x*ni,o.y*ni],m=[];for(let T of r){let E=[];for(let A of T){let k=[A.x+f[0],A.y+f[1]];er(t,k),E.push(k)}m.push(E)}if(t[2]-t[0]<=u/2){(x=t)[0]=x[1]=1/0,x[2]=x[3]=-1/0;for(let T of m)for(let E of T)Nn(E,t,n,u)}var x;return m}class Qn{constructor(t,n){this.type=Mt,this.geojson=t,this.geometries=n}static parse(t,n){if(t.length!==2)return n.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Kn(t[1])){let o=t[1];if(o.type==="FeatureCollection"){let u=[];for(let f of o.features){let{type:m,coordinates:x}=f.geometry;m==="Polygon"&&u.push(x),m==="MultiPolygon"&&u.push(...x)}if(u.length)return new Qn(o,{type:"MultiPolygon",coordinates:u})}else if(o.type==="Feature"){let u=o.geometry.type;if(u==="Polygon"||u==="MultiPolygon")return new Qn(o,o.geometry)}else if(o.type==="Polygon"||o.type==="MultiPolygon")return new Qn(o,o)}return n.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return function(n,o){let u=[1/0,1/0,-1/0,-1/0],f=[1/0,1/0,-1/0,-1/0],m=n.canonicalID();if(o.type==="Polygon"){let x=fs(o.coordinates,f,m),T=Jn(n.geometry(),u,f,m);if(!Jr(u,f))return!1;for(let E of T)if(!pi(E,x))return!1}if(o.type==="MultiPolygon"){let x=vn(o.coordinates,f,m),T=Jn(n.geometry(),u,f,m);if(!Jr(u,f))return!1;for(let E of T)if(!rr(E,x))return!1}return!0}(t,this.geometries);if(t.geometryType()==="LineString")return function(n,o){let u=[1/0,1/0,-1/0,-1/0],f=[1/0,1/0,-1/0,-1/0],m=n.canonicalID();if(o.type==="Polygon"){let x=fs(o.coordinates,f,m),T=dn(n.geometry(),u,f,m);if(!Jr(u,f))return!1;for(let E of T)if(!sa(E,x))return!1}if(o.type==="MultiPolygon"){let x=vn(o.coordinates,f,m),T=dn(n.geometry(),u,f,m);if(!Jr(u,f))return!1;for(let E of T)if(!To(E,x))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let bn=class{constructor(r=[],t=(n,o)=>n<o?-1:n>o?1:0){if(this.data=r,this.length=this.data.length,this.compare=t,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(r){this.data.push(r),this._up(this.length++)}pop(){if(this.length===0)return;let r=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),r}peek(){return this.data[0]}_up(r){let{data:t,compare:n}=this,o=t[r];for(;r>0;){let u=r-1>>1,f=t[u];if(n(o,f)>=0)break;t[r]=f,r=u}t[r]=o}_down(r){let{data:t,compare:n}=this,o=this.length>>1,u=t[r];for(;r<o;){let f=1+(r<<1),m=f+1;if(m<this.length&&n(t[m],t[f])<0&&(f=m),n(t[f],u)>=0)break;t[r]=t[f],r=f}t[r]=u}};function jn(r,t,n=0,o=r.length-1,u=Hl){for(;o>n;){if(o-n>600){let T=o-n+1,E=t-n+1,A=Math.log(T),k=.5*Math.exp(2*A/3),$=.5*Math.sqrt(A*k*(T-k)/T)*(E-T/2<0?-1:1);jn(r,t,Math.max(n,Math.floor(t-E*k/T+$)),Math.min(o,Math.floor(t+(T-E)*k/T+$)),u)}let f=r[t],m=n,x=o;for(wa(r,n,t),u(r[o],f)>0&&wa(r,n,o);m<x;){for(wa(r,m,x),m++,x--;u(r[m],f)<0;)m++;for(;u(r[x],f)>0;)x--}u(r[n],f)===0?wa(r,n,x):(x++,wa(r,x,o)),x<=t&&(n=x+1),t<=x&&(o=x-1)}}function wa(r,t,n){let o=r[t];r[t]=r[n],r[n]=o}function Hl(r,t){return r<t?-1:r>t?1:0}function Sa(r,t){if(r.length<=1)return[r];let n=[],o,u;for(let f of r){let m=Ha(f);m!==0&&(f.area=Math.abs(m),u===void 0&&(u=m<0),u===m<0?(o&&n.push(o),o=[f]):o.push(f))}if(o&&n.push(o),t>1)for(let f=0;f<n.length;f++)n[f].length<=t||(jn(n[f],t,1,n[f].length-1,Ci),n[f]=n[f].slice(0,t));return n}function Ci(r,t){return t.area-r.area}function Ha(r){let t=0;for(let n,o,u=0,f=r.length,m=f-1;u<f;m=u++)n=r[u],o=r[m],t+=(o.x-n.x)*(n.y+o.y);return t}let xn=1/298.257223563,ms=xn*(2-xn),Po=Math.PI/180;class Eo{constructor(t){let n=6378.137*Po*1e3,o=Math.cos(t*Po),u=1/(1-ms*(1-o*o)),f=Math.sqrt(u);this.kx=n*f*o,this.ky=n*f*u*(1-ms)}distance(t,n){let o=this.wrap(t[0]-n[0])*this.kx,u=(t[1]-n[1])*this.ky;return Math.sqrt(o*o+u*u)}pointOnLine(t,n){let o,u,f,m,x=1/0;for(let T=0;T<t.length-1;T++){let E=t[T][0],A=t[T][1],k=this.wrap(t[T+1][0]-E)*this.kx,$=(t[T+1][1]-A)*this.ky,q=0;k===0&&$===0||(q=(this.wrap(n[0]-E)*this.kx*k+(n[1]-A)*this.ky*$)/(k*k+$*$),q>1?(E=t[T+1][0],A=t[T+1][1]):q>0&&(E+=k/this.kx*q,A+=$/this.ky*q)),k=this.wrap(n[0]-E)*this.kx,$=(n[1]-A)*this.ky;let Y=k*k+$*$;Y<x&&(x=Y,o=E,u=A,f=T,m=q)}return{point:[o,u],index:f,t:Math.max(0,Math.min(1,m))}}wrap(t){for(;t<-180;)t+=360;for(;t>180;)t-=360;return t}}function Mo(r,t){return t[0]-r[0]}function $n(r){return r[1]-r[0]+1}function wn(r,t){return r[1]>=r[0]&&r[1]<t}function Vn(r,t){if(r[0]>
vendor: 5,599 bytes, line 4
4r[1])return[null,null];let n=$n(r);if(t){if(n===2)return[r,null];let u=Math.floor(n/2);return[[r[0],r[0]+u],[r[0]+u,r[1]]]}if(n===1)return[r,null];let o=Math.floor(n/2)-1;return[[r[0],r[0]+o],[r[0]+o+1,r[1]]]}function qa(r,t){if(!wn(t,r.length))return[1/0,1/0,-1/0,-1/0];let n=[1/0,1/0,-1/0,-1/0];for(let o=t[0];o<=t[1];++o)er(n,r[o]);return n}function Ds(r){let t=[1/0,1/0,-1/0,-1/0];for(let n of r)for(let o of n)er(t,o);return t}function Ta(r){return r[0]!==-1/0&&r[1]!==-1/0&&r[2]!==1/0&&r[3]!==1/0}function _i(r,t,n){if(!Ta(r)||!Ta(t))return NaN;let o=0,u=0;return r[2]<t[0]&&(o=t[0]-r[2]),r[0]>t[2]&&(o=r[0]-t[2]),r[1]>t[3]&&(u=r[1]-t[3]),r[3]<t[1]&&(u=t[1]-r[3]),n.distance([0,0],[o,u])}function es(r,t,n){let o=n.pointOnLine(t,r);return n.distance(r,o.point)}function Co(r,t,n,o,u){let f=Math.min(es(r,[n,o],u),es(t,[n,o],u)),m=Math.min(es(n,[r,t],u),es(o,[r,t],u));return Math.min(f,m)}function Za(r,t,n,o,u){if(!wn(t,r.length)||!wn(o,n.length))return 1/0;let f=1/0;for(let m=t[0];m<t[1];++m){let x=r[m],T=r[m+1];for(let E=o[0];E<o[1];++E){let A=n[E],k=n[E+1];if(hi(x,T,A,k))return 0;f=Math.min(f,Co(x,T,A,k,u))}}return f}function Io(r,t,n,o,u){if(!wn(t,r.length)||!wn(o,n.length))return NaN;let f=1/0;for(let m=t[0];m<=t[1];++m)for(let x=o[0];x<=o[1];++x)if(f=Math.min(f,u.distance(r[m],n[x])),f===0)return f;return f}function Ao(r,t,n){if(pi(r,t,!0))return 0;let o=1/0;for(let u of t){let f=u[0],m=u[u.length-1];if(f!==m&&(o=Math.min(o,es(r,[m,f],n)),o===0))return o;let x=n.pointOnLine(u,r);if(o=Math.min(o,n.distance(r,x.point)),o===0)return o}return o}function ql(r,t,n,o){if(!wn(t,r.length))return NaN;for(let f=t[0];f<=t[1];++f)if(pi(r[f],n,!0))return 0;let u=1/0;for(let f=t[0];f<t[1];++f){let m=r[f],x=r[f+1];for(let T of n)for(let E=0,A=T.length,k=A-1;E<A;k=E++){let $=T[k],q=T[E];if(hi(m,x,$,q))return 0;u=Math.min(u,Co(m,x,$,q,o))}}return u}function Wa(r,t){for(let n of r)for(let o of n)if(pi(o,t,!0))return!0;return!1}function sl(r,t,n,o=1/0){let u=Ds(r),f=Ds(t);if(o!==1/0&&_i(u,f,n)>=o)return o;if(Jr(u,f)){if(Wa(r,t))return 0}else if(Wa(t,r))return 0;let m=1/0;for(let x of r)for(let T=0,E=x.length,A=E-1;T<E;A=T++){let k=x[A],$=x[T];for(let q of t)for(let Y=0,Q=q.length,oe=Q-1;Y<Q;oe=Y++){let pe=q[oe],Ce=q[Y];if(hi(k,$,pe,Ce))return 0;m=Math.min(m,Co(k,$,pe,Ce,n))}}return m}function fe(r,t,n,o,u,f){if(!f)return;let m=_i(qa(o,f),u,n);m<t&&r.push([m,f,[0,0]])}function De(r,t,n,o,u,f,m){if(!f||!m)return;let x=_i(qa(o,f),qa(u,m),n);x<t&&r.push([x,f,m])}function Ze(r,t,n,o,u=1/0){let f=Math.min(o.distance(r[0],n[0][0]),u);if(f===0)return f;let m=new bn([[0,[0,r.length-1],[0,0]]],Mo),x=Ds(n);for(;m.length>0;){let T=m.pop();if(T[0]>=f)continue;let E=T[1],A=t?50:100;if($n(E)<=A){if(!wn(E,r.length))return NaN;if(t){let k=ql(r,E,n,o);if(isNaN(k)||k===0)return k;f=Math.min(f,k)}else for(let k=E[0];k<=E[1];++k){let $=Ao(r[k],n,o);if(f=Math.min(f,$),f===0)return 0}}else{let k=Vn(E,t);fe(m,f,o,r,x,k[0]),fe(m,f,o,r,x,k[1])}}return f}function it(r,t,n,o,u,f=1/0){let m=Math.min(f,u.distance(r[0],n[0]));if(m===0)return m;let x=new bn([[0,[0,r.length-1],[0,n.length-1]]],Mo);for(;x.length>0;){let T=x.pop();if(T[0]>=m)continue;let E=T[1],A=T[2],k=t?50:100,$=o?50:100;if($n(E)<=k&&$n(A)<=$){if(!wn(E,r.length)&&wn(A,n.length))return NaN;let q;if(t&&o)q=Za(r,E,n,A,u),m=Math.min(m,q);else if(t&&!o){let Y=r.slice(E[0],E[1]+1);for(let Q=A[0];Q<=A[1];++Q)if(q=es(n[Q],Y,u),m=Math.min(m,q),m===0)return m}else if(!t&&o){let Y=n.slice(A[0],A[1]+1);for(let Q=E[0];Q<=E[1];++Q)if(q=es(r[Q],Y,u),m=Math.min(m,q),m===0)return m}else q=Io(r,E,n,A,u),m=Math.min(m,q)}else{let q=Vn(E,t),Y=Vn(A,o);De(x,m,u,r,n,q[0],Y[0]),De(x,m,u,r,n,q[0],Y[1]),De(x,m,u,r,n,q[1],Y[0]),De(x,m,u,r,n,q[1],Y[1])}}return m}function ht(r){return r.type==="MultiPolygon"?r.coordinates.map(t=>({type:"Polygon",coordinates:t})):r.type==="MultiLineString"?r.coordinates.map(t=>({type:"LineString",coordinates:t})):r.type==="MultiPoint"?r.coordinates.map(t=>({type:"Point",coordinates:t})):[r]}class Dt{constructor(t,n){this.type=ft,this.geojson=t,this.geometries=n}static parse(t,n){if(t.length!==2)return n.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Kn(t[1])){let o=t[1];if(o.type==="FeatureCollection")return new Dt(o,o.features.map(u=>ht(u.geometry)).flat());if(o.type==="Feature")return new Dt(o,ht(o.geometry));if("type"in o&&"coordinates"in o)return new Dt(o,ht(o))}return n.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return function(n,o){let u=n.geometry(),f=u.flat().map(T=>ir([T.x,T.y],n.canonical));if(u.length===0)return NaN;let m=new Eo(f[0][1]),x=1/0;for(let T of o){switch(T.type){case"Point":x=Math.min(x,it(f,!1,[T.coordinates],!1,m,x));break;case"LineString":x=Math.min(x,it(f,!1,T.coordinates,!0,m,x));break;case"Polygon":x=Math.min(x,Ze(f,!1,T.coordinates,m,x))}if(x===0)return x}return x}(t,this.geometries);if(t.geometryType()==="LineString")return function(n,o){let u=n.geometry(),f=u.flat().map(T=>ir([T.x,T.y],n.canonical));if(u.length===0)return NaN;let m=new Eo(f[0][1]),x=1/0;for(let T of o){switch(T.type){case"Point":x=Math.min(x,it(f,!0,[T.coordinates],!1,m,x));break;case"LineString":x=Math.min(x,it(f,!0,T.coordinates,!0,m,x));break;case"Polygon":x=Math.min(x,Ze(f,!0,T.coordinates,m,x))}if(x===0)return x}return x}(t,this.geometries);if(t.geometryType()==="Polygon")return function(n,o){let u=n.geometry();if(u.length===0||u[0].length===0)return NaN;let f=Sa(u,0).map(T=>T.map(E=>
4E.map(A=>ir([A.x,A.y],n.canonical)))),m=new Eo(f[0][0][0][1]),x=1/0;for(let T of o)for(let E of f){switch(T.type){case"Point":x=Math.min(x,Ze([T.coordinates],!1,E,m,x));break;case"LineString":x=Math.min(x,Ze(T.coordinates,!0,E,m,x));break;case"Polygon":x=Math.min(x,sl(E,T.coordinates,m,x))}if(x===0)return x}return x}(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let Lt={"==":Z,"!=":X,">":Te,"<":te,">=":Fe,"<=":_e,array:Vr,at:_n,boolean:Vr,case:ta,coalesce:_,collator:rt,format:We,image:Pt,in:Is,"index-of":Qs,interpolate:Ur,"interpolate-hcl":Ur,"interpolate-lab":Ur,length:ei,let:yi,literal:ds,match:ea,number:Vr,"number-format":dt,object:Vr,slice:ia,step:na,string:Vr,"to-boolean":On,"to-color":On,"to-number":On,"to-string":On,var:Js,within:Qn,distance:Dt};class Ot{constructor(t,n,o,u){this.name=t,this.type=n,this._evaluate=o,this.args=u}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,n){let o=t[0],u=Ot.definitions[o];if(!u)return n.error(`Unknown expression "${o}". If you wanted a literal array, use ["literal", [...]].`,0);let f=Array.isArray(u)?u[0]:u.type,m=Array.isArray(u)?[[u[1],u[2]]]:u.overloads,x=m.filter(([E])=>!Array.isArray(E)||E.length===t.length-1),T=null;for(let[E,A]of x){T=new Ks(n.registry,ui,n.path,null,n.scope);let k=[],$=!1;for(let q=1;q<t.length;q++){let Y=t[q],Q=Array.isArray(E)?E[q-1]:E.type,oe=T.parse(Y,1+k.length,Q);if(!oe){$=!0;break}k.push(oe)}if(!$)if(Array.isArray(E)&&E.length!==k.length)T.error(`Expected ${E.length} arguments, but found ${k.length} instead.`);else{for(let q=0;q<k.length;q++){let Y=Array.isArray(E)?E[q]:E.type,Q=k[q];T.concat(q+1).checkSubtype(Y,Q.type)}if(T.errors.length===0)return new Ot(o,f,A,k)}}if(x.length===1)n.errors.push(...T.errors);else{let E=(x.length?x:m).map(([k])=>{return $=k,Array.isArray($)?`(${$.map(zi).join(", ")})`:`(${zi($.type)}...)`;var $}).join(" | "),A=[];for(let k=1;k<t.length;k++){let $=n.parse(t[k],1+A.length);if(!$)return null;A.push(zi($.type))}n.error(`Expected arguments of type ${E}, but found (${A.join(", ")}) instead.`)}return null}static register(t,n){Ot.definitions=n;for(let o in n)t[o]=Ot}}function Bt(r,[t,n,o,u]){t=t.evaluate(r),n=n.evaluate(r),o=o.evaluate(r);let f=u?u.evaluate(r):1,m=So(t,n,o,f);if(m)throw new Ri(m);return new gi(t/255,n/255,o/255,f,!1)}function fi(r,t){return r in t}function Qt(r,t){let n=t[r];return n===void 0?null:n}function Jt(r){return{type:r}}function ui(r){if(r instanceof Js)return ui(r.boundExpression);if(r instanceof Ot&&r.name==="error"||r instanceof rt||r instanceof Qn||r instanceof Dt)return!1;let t=r instanceof On||r instanceof Vr,n=!0;return r.eachChild(o=>{n=t?n&&ui(o):n&&o instanceof ds}),!!n&&Xt(r)&&Dr(r,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Xt(r){if(r instanceof Ot&&(r.name==="get"&&r.args.length===1||r.name==="feature-state"||r.name==="has"&&r.args.length===1||r.name==="properties"||r.name==="geometry-type"||r.name==="id"||/^filter-/.test(r.name))||r instanceof Qn||r instanceof Dt)return!1;let t=!0;return r.eachChild(n=>{t&&!Xt(n)&&(t=!1)}),t}function Ii(r){if(r instanceof Ot&&r.name==="feature-state")return!1;let t=!0;return r.eachChild(n=>{t&&!Ii(n)&&(t=!1)}),t}function Dr(r,t){if(r instanceof Ot&&t.indexOf(r.name)>=0)return!1;let n=!0;return r.eachChild(o=>{n&&!Dr(o,t)&&(n=!1)}),n}function kr(r){return{result:"success",value:r}}function Lr(r){return{result:"error",value:r}}function Qr(r){return r["property-type"]==="data-driven"||r["property-type"]==="cross-faded-data-driven"}function ks(r){return!!r.expression&&r.expression.parameters.indexOf("zoom")>-1}function zr(r){return!!r.expression&&r.expression.interpolated}function Ei(r){return r instanceof Number?"number":r instanceof String?"string":r instanceof Boolean?"boolean":Array.isArray(r)?"array":r===null?"null":typeof r}function al(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Zl(r){return r}function qc(r,t){let n=t.type==="color",o=r.stops&&typeof r.stops[0][0]=="object",u=o||!(o||r.property!==void 0),f=r.type||(zr(t)?"exponential":"interval");if(n||t.type==="padding"){let A=n?gi.parse:Qi.parse;(r=Kt({},r)).stops&&(r.stops=r.stops.map(k=>[k[0],A(k[1])])),r.default=A(r.default?r.default:t.default)}if(r.colorSpace&&(m=r.colorSpace)!=="rgb"&&m!=="hcl"&&m!=="lab")throw new Error(`Unknown color space: "${r.colorSpace}"`);var m;let x,T,E;if(f==="exponential")x=Wc;else if(f==="interval")x=Zc;else if(f==="categorical"){x=nh,T=Object.create(null);for(let A of r.stops)T[A[0]]=A[1];E=typeof r.stops[0][0]}else{if(f!=="identity")throw new Error(`Unknown function type "${f}"`);
vendor: 9,365 bytes, line 4
4x=sh}if(o){let A={},k=[];for(let Y=0;Y<r.stops.length;Y++){let Q=r.stops[Y],oe=Q[0].zoom;A[oe]===void 0&&(A[oe]={zoom:oe,type:r.type,property:r.property,default:r.default,stops:[]},k.push(oe)),A[oe].stops.push([Q[0].value,Q[1]])}let $=[];for(let Y of k)$.push([A[Y].zoom,qc(A[Y],t)]);let q={name:"linear"};return{kind:"composite",interpolationType:q,interpolationFactor:Ur.interpolationFactor.bind(void 0,q),zoomStops:$.map(Y=>Y[0]),evaluate:({zoom:Y},Q)=>Wc({stops:$,base:r.base},t,Y).evaluate(Y,Q)}}if(u){let A=f==="exponential"?{name:"exponential",base:r.base!==void 0?r.base:1}:null;return{kind:"camera",interpolationType:A,interpolationFactor:Ur.interpolationFactor.bind(void 0,A),zoomStops:r.stops.map(k=>k[0]),evaluate:({zoom:k})=>x(r,t,k,T,E)}}return{kind:"source",evaluate(A,k){let $=k&&k.properties?k.properties[r.property]:void 0;return $===void 0?Do(r.default,t.default):x(r,t,$,T,E)}}}function Do(r,t,n){return r!==void 0?r:t!==void 0?t:n!==void 0?n:void 0}function nh(r,t,n,o,u){return Do(typeof n===u?o[n]:void 0,r.default,t.default)}function Zc(r,t,n){if(Ei(n)!=="number")return Do(r.default,t.default);let o=r.stops.length;if(o===1||n<=r.stops[0][0])return r.stops[0][1];if(n>=r.stops[o-1][0])return r.stops[o-1][1];let u=ra(r.stops.map(f=>f[0]),n);return r.stops[u][1]}function Wc(r,t,n){let o=r.base!==void 0?r.base:1;if(Ei(n)!=="number")return Do(r.default,t.default);let u=r.stops.length;if(u===1||n<=r.stops[0][0])return r.stops[0][1];if(n>=r.stops[u-1][0])return r.stops[u-1][1];let f=ra(r.stops.map(A=>A[0]),n),m=function(A,k,$,q){let Y=q-$,Q=A-$;return Y===0?0:k===1?Q/Y:(Math.pow(k,Q)-1)/(Math.pow(k,Y)-1)}(n,o,r.stops[f][0],r.stops[f+1][0]),x=r.stops[f][1],T=r.stops[f+1][1],E=Cn[t.type]||Zl;return typeof x.evaluate=="function"?{evaluate(...A){let k=x.evaluate.apply(void 0,A),$=T.evaluate.apply(void 0,A);if(k!==void 0&&$!==void 0)return E(k,$,m,r.colorSpace)}}:E(x,T,m,r.colorSpace)}function sh(r,t,n){switch(t.type){case"color":n=gi.parse(n);break;case"formatted":n=ar.fromString(n.toString());break;case"resolvedImage":n=Kr.fromString(n.toString());break;case"padding":n=Qi.parse(n);break;default:Ei(n)===t.type||t.type==="enum"&&t.values[n]||(n=void 0)}return Do(n,r.default,t.default)}Ot.register(Lt,{error:[{kind:"error"},[Rt],(r,[t])=>{throw new Ri(t.evaluate(r))}],typeof:[Rt,[qt],(r,[t])=>zi(Gi(t.evaluate(r)))],"to-rgba":[Nr(ft,4),[ti],(r,[t])=>{let[n,o,u,f]=t.evaluate(r).rgb;return[255*n,255*o,255*u,f]}],rgb:[ti,[ft,ft,ft],Bt],rgba:[ti,[ft,ft,ft,ft],Bt],has:{type:Mt,overloads:[[[Rt],(r,[t])=>fi(t.evaluate(r),r.properties())],[[Rt,Zn],(r,[t,n])=>fi(t.evaluate(r),n.evaluate(r))]]},get:{type:qt,overloads:[[[Rt],(r,[t])=>Qt(t.evaluate(r),r.properties())],[[Rt,Zn],(r,[t,n])=>Qt(t.evaluate(r),n.evaluate(r))]]},"feature-state":[qt,[Rt],(r,[t])=>Qt(t.evaluate(r),r.featureState||{})],properties:[Zn,[],r=>r.properties()],"geometry-type":[Rt,[],r=>r.geometryType()],id:[qt,[],r=>r.id()],zoom:[ft,[],r=>r.globals.zoom],"heatmap-density":[ft,[],r=>r.globals.heatmapDensity||0],"line-progress":[ft,[],r=>r.globals.lineProgress||0],accumulated:[qt,[],r=>r.globals.accumulated===void 0?null:r.globals.accumulated],"+":[ft,Jt(ft),(r,t)=>{let n=0;for(let o of t)n+=o.evaluate(r);return n}],"*":[ft,Jt(ft),(r,t)=>{let n=1;for(let o of t)n*=o.evaluate(r);return n}],"-":{type:ft,overloads:[[[ft,ft],(r,[t,n])=>t.evaluate(r)-n.evaluate(r)],[[ft],(r,[t])=>-t.evaluate(r)]]},"/":[ft,[ft,ft],(r,[t,n])=>t.evaluate(r)/n.evaluate(r)],"%":[ft,[ft,ft],(r,[t,n])=>t.evaluate(r)%n.evaluate(r)],ln2:[ft,[],()=>Math.LN2],pi:[ft,[],()=>Math.PI],e:[ft,[],()=>Math.E],"^":[ft,[ft,ft],(r,[t,n])=>Math.pow(t.evaluate(r),n.evaluate(r))],sqrt:[ft,[ft],(r,[t])=>Math.sqrt(t.evaluate(r))],log10:[ft,[ft],(r,[t])=>Math.log(t.evaluate(r))/Math.LN10],ln:[ft,[ft],(r,[t])=>Math.log(t.evaluate(r))],log2:[ft,[ft],(r,[t])=>Math.log(t.evaluate(r))/Math.LN2],sin:[ft,[ft],(r,[t])=>Math.sin(t.evaluate(r))],cos:[ft,[ft],(r,[t])=>Math.cos(t.evaluate(r))],tan:[ft,[ft],(r,[t])=>Math.tan(t.evaluate(r))],asin:[ft,[ft],(r,[t])=>Math.asin(t.evaluate(r))],acos:[ft,[ft],(r,[t])=>Math.acos(t.evaluate(r))],atan:[ft,[ft],(r,[t])=>Math.atan(t.evaluate(r))],min:[ft,Jt(ft),(r,t)=>Math.min(...t.map(n=>n.evaluate(r)))],max:[ft,Jt(ft),(r,t)=>Math.max(...t.map(n=>n.evaluate(r)))],abs:[ft,[ft],(r,[t])=>Math.abs(t.evaluate(r))],round:[ft,[ft],(r,[t])=>{let n=t.evaluate(r);return n<0?-Math.round(-n):Math.round(n)}],floor:[ft,[ft],(r,[t])=>Math.floor(t.evaluate(r))],ceil:[ft,[ft],(r,[t])=>Math.ceil(t.evaluate(r))],"filter-==":[Mt,[Rt,qt],(r,[t,n])=>r.properties()[t.value]===n.value],"filter-id-==":[Mt,[qt],(r,[t])=>r.id()===t.value],"filter-type-==":[Mt,[Rt],(r,[t])=>r.geometryType()===t.value],"filter-<":[Mt,[Rt,qt],(r,[t,n])=>{let o=r.properties()[t.value],u=n.value;return typeof o==typeof u&&o<u}],"filter-id-<":[Mt,[qt],(r,[t])=>{let n=r.id(),o=t.value;return typeof n==typeof o&&n<o}],"filter->":[Mt,[Rt,qt],(r,[t,n])=>{let o=r.properties()[t.value],u=n.value;return typeof o==typeof u&&o>u}],"filter-id->":[Mt,[qt],(r,[t])=>{let n=r.id(),o=t.value;return typeof n==typeof o&&n>o}],"filter-<=":[Mt,[Rt,qt],(r,[t,n])=>{let o=r.properties()[t.value],u=n.value;return typeof o==typeof u&&o<=u}],"filter-id-<=":[Mt,[qt],(r,[t])=>{let n=r.id(),o=t.value;return typeof n==typeof o&&n<=o}],"filter->=":[Mt,[Rt,qt],(r,[t,n])=>{let o=r.properties()[t.value],u=n.value;return typeof o==typeof u&&o>=u}],"filter-id->=":[Mt,[qt],(r,[t])=>{let n=r.id(),o=t.value;return typeof n==typeof o&&n>=o}],"filter-has":[Mt,[qt],(r,[t])=>t.value in r.properties()],"filter-has-id":[Mt,[],r=>r.id()!==null&&r.id()!==void 0],"filter-type-in":[Mt,[Nr(Rt)],(r,[t])=>t.value.indexOf(r.geometryType())>=0],"filter-id-in":[Mt,[Nr(qt)],(r,[t])=>t.value.indexOf(r.id())>=0],"filter-in-small":[Mt,[Rt,Nr(qt)],(r,[t,n])=>n.value.indexOf(r.properties()[t.value])>=0],"filter-in-large":[Mt,[Rt,Nr(qt)],(r,[t,n])=>function(o,u,f,m){for(;f<=m;){let x=f+m>>1;if(u[x]===o)return!0;u[x]>o?m=x-1:f=x+1}return!1}(r.properties()[t.value],n.value,0,n.value.length-1)],all:{type:Mt,overloads:[[[Mt,Mt],(r,[t,n])=>t.evaluate(r)&&n.evaluate(r)],[Jt(Mt),(r,t)=>{for(let n of t)if(!n.evaluate(r))return!1;return!0}]]},any:{type:Mt,overloads:[[[Mt,Mt],(r,[t,n])=>t.evaluate(r)||n.evaluate(r)],[Jt(Mt),(r,t)=>{for(let n of t)if(n.evaluate(r))return!0;return!1}]]},"!":[Mt,[Mt],(r,[t])=>!t.evaluate(r)],"is-supported-script":[Mt,[Rt],(r,[t])=>{let n=r.globals&&r.globals.isSupportedScript;return!n||n(t.evaluate(r))}],upcase:[Rt,[Rt],(r,[t])=>t.evaluate(r).toUpperCase()],downcase:[Rt,[Rt],(r,[t])=>t.evaluate(r).toLowerCase()],concat:[Rt,Jt(qt),(r,t)=>t.map(n=>Cs(n.evaluate(r))).join("")],"resolved-locale":[Rt,[fr],(r,[t])=>t.evaluate(r).resolvedLocale()]});class Xa{constructor(t,n){var o;this.expression=t,this._warningHistory={},this._evaluator=new ri,this._defaultValue=n?(o=n).type==="color"&&al(o.default)?new gi(0,0,0,0):o.type==="color"?gi.parse(o.default)||null:o.type==="padding"?Qi.parse(o.default)||null:o.type==="variableAnchorOffsetCollection"?br.parse(o.default)||null:o.type==="projectionDefinition"?or.parse(o.default)||null:o.default===void 0?null:o.default:null,this._enumValues=n&&n.type==="enum"?n.values:null}evaluateWithoutErrorHandling(t,n,o,u,f,m){return this._evaluator.globals=t,this._evaluator.feature=n,this._evaluator.featureState=o,this._evaluator.canonical=u,this._evaluator.availableImages=f||null,this._evaluator.formattedSection=m,this.expression.evaluate(this._evaluator)}evaluate(t,n,o,u,f,m){this._evaluator.globals=t,this._evaluator.feature=n||null,this._evaluator.featureState=o||null,this._evaluator.canonical=u,this._evaluator.availableImages=f||null,this._evaluator.formattedSection=m||null;try{let x=this.expression.evaluate(this._evaluator);if(x==null||typeof x=="number"&&x!=x)return this._defaultValue;if(this._enumValues&&!(x in this._enumValues))throw new Ri(`Expected value to be one of ${Object.keys(this._enumValues).map(T=>JSON.stringify(T)).join(", ")}, but found ${JSON.stringify(x)} instead.`);return x}catch(x){return this._warningHistory[x.message]||(this._warningHistory[x.message]=!0,typeof console<"u"&&console.warn(x.message)),this._defaultValue}}}function ko(r){return Array.isArray(r)&&r.length>0&&typeof r[0]=="string"&&r[0]in Lt}function ol(r,t){let n=new Ks(Lt,ui,[],t?function(u){let f={color:ti,string:Rt,number:ft,enum:Rt,boolean:Mt,formatted:ji,padding:Wn,projectionDefinition:Zi,resolvedImage:Ts,variableAnchorOffsetCollection:Fn};return u.type==="array"?Nr(f[u.value]||qt,u.length):f[u.type]}(t):void 0),o=n.parse(r,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return o?kr(new Xa(o,t)):Lr(n.errors)}class Wl{constructor(t,n){this.kind=t,this._styleExpression=n,this.isStateDependent=t!=="constant"&&!Ii(n.expression)}evaluateWithoutErrorHandling(t,n,o,u,f,m){return this._styleExpression.evaluateWithoutErrorHandling(t,n,o,u,f,m)}evaluate(t,n,o,u,f,m){return this._styleExpression.evaluate(t,n,o,u,f,m)}}class Xl{constructor(t,n,o,u){this.kind=t,this.zoomStops=o,this._styleExpression=n,this.isStateDependent=t!=="camera"&&!Ii(n.expression),this.interpolationType=u}evaluateWithoutErrorHandling(t,n,o,u,f,m){return this._styleExpression.evaluateWithoutErrorHandling(t,n,o,u,f,m)}evaluate(t,n,o,u,f,m){return this._styleExpression.evaluate(t,n,o,u,f,m)}interpolationFactor(t,n,o){return this.interpolationType?Ur.
4interpolationFactor(this.interpolationType,t,n,o):0}}function Xc(r,t){let n=ol(r,t);if(n.result==="error")return n;let o=n.value.expression,u=Xt(o);if(!u&&!Qr(t))return Lr([new Vt("","data expressions not supported")]);let f=Dr(o,["zoom"]);if(!f&&!ks(t))return Lr([new Vt("","zoom expressions not supported")]);let m=Lo(o);return m||f?m instanceof Vt?Lr([m]):m instanceof Ur&&!zr(t)?Lr([new Vt("",'"interpolate" expressions cannot be used with this property')]):kr(m?new Xl(u?"camera":"composite",n.value,m.labels,m instanceof Ur?m.interpolation:void 0):new Wl(u?"constant":"source",n.value)):Lr([new Vt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class ll{constructor(t,n){this._parameters=t,this._specification=n,Kt(this,qc(this._parameters,this._specification))}static deserialize(t){return new ll(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function Lo(r){let t=null;if(r instanceof yi)t=Lo(r.result);else if(r instanceof _){for(let n of r.args)if(t=Lo(n),t)break}else(r instanceof na||r instanceof Ur)&&r.input instanceof Ot&&r.input.name==="zoom"&&(t=r);return t instanceof Vt||r.eachChild(n=>{let o=Lo(n);o instanceof Vt?t=o:!t&&o?t=new Vt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&o&&t!==o&&(t=new Vt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function cl(r){if(r===!0||r===!1)return!0;if(!Array.isArray(r)||r.length===0)return!1;switch(r[0]){case"has":return r.length>=2&&r[1]!=="$id"&&r[1]!=="$type";case"in":return r.length>=3&&(typeof r[1]!="string"||Array.isArray(r[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return r.length!==3||Array.isArray(r[1])||Array.isArray(r[2]);case"any":case"all":for(let t of r.slice(1))if(!cl(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}let ah={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Yl(r){if(r==null)return{filter:()=>!0,needGeometry:!1};cl(r)||(r=zo(r));let t=ol(r,ah);if(t.result==="error")throw new Error(t.value.map(n=>`${n.key}: ${n.message}`).join(", "));return{filter:(n,o,u)=>t.value.evaluate(n,o,{},u),needGeometry:Kl(r)}}function Yc(r,t){return r<t?-1:r>t?1:0}function Kl(r){if(!Array.isArray(r))return!1;if(r[0]==="within"||r[0]==="distance")return!0;for(let t=1;t<r.length;t++)if(Kl(r[t]))return!0;return!1}function zo(r){if(!r)return!0;let t=r[0];return r.length<=1?t!=="any":t==="=="?ul(r[1],r[2],"=="):t==="!="?Ya(ul(r[1],r[2],"==")):t==="<"||t===">"||t==="<="||t===">="?ul(r[1],r[2],t):t==="any"?(n=r.slice(1),["any"].concat(n.map(zo))):t==="all"?["all"].concat(r.slice(1).map(zo)):t==="none"?["all"].concat(r.slice(1).map(zo).map(Ya)):t==="in"?hl(r[1],r.slice(2)):t==="!in"?Ya(hl(r[1],r.slice(2))):t==="has"?dl(r[1]):t!=="!has"||Ya(dl(r[1]));var n}function ul(r,t,n){switch(r){case"$type":return[`filter-type-${n}`,t];case"$id":return[`filter-id-${n}`,t];default:return[`filter-${n}`,r,t]}}function hl(r,t){if(t.length===0)return!1;switch(r){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(n=>typeof n!=typeof t[0])?["filter-in-large",r,["literal",t.sort(Yc)]]:["filter-in-small",r,["literal",t]]}}function dl(r){switch(r){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",r]}}function Ya(r){return["!",r]}function Ka(r){let t=typeof r;if(t==="number"||t==="boolean"||t==="string"||r==null)return JSON.stringify(r);if(Array.isArray(r)){let u="[";for(let f of r)u+=`${Ka(f)},`;return`${u}]`}let n=Object.keys(r).sort(),o="{";for(let u=0;u<n.length;u++)o+=`${JSON.stringify(n[u])}:${Ka(r[n[u]])},`;return`${o}}`}function oh(r){let t="";for(let n of ve)t+=`/${Ka(r[n])}`;return t}function Kc(r){let t=r.value;return t?[new tt(r.key,t,"constants have been deprecated as of v8")]:[]}function yr(r){return r instanceof Number||r instanceof String||r instanceof Boolean?r.valueOf():r}function Pa(r){if(Array.isArray(r))return r.map(Pa);if(r instanceof Object&&!(r instanceof Number||r instanceof String||r instanceof Boolean)){let t={};for(let n in r)t[n]=Pa(r[n]);return t}return yr(r)}function Un(r){let t=r.key,n=r.value,o=r.valueSpec||{},u=r.objectElementValidators||{},f=r.style,m=r.styleSpec,x=r.validateSpec,T=[],E=Ei(n);if(E!=="object")return[new tt(t,n,`object expected, ${E} found`)];for(let A in n){let k=A.split(".")[0],$=o[k]||o["*"],q;if(u[k])q=u[k];else if(o[k])q=x;else if(u["*"])q=u["*"];else{if(!o["*"]){T.push(new tt(t,n[A],`unknown property "${A}"`));continue}q=x}T=T.concat(q({key:(t&&`${t}.`)+A,value:n[A],valueSpec:$,style:f,styleSpec:m,object:n,objectKey:A,validateSpec:x},n))}for(let A in o)u[A]||o[A].required&&o[A].default===void 0&&n[A]===void 0&&T.push(new tt(t,n,`missing required property "${A}"`));return T}function Jl(r){let t=r.value,n=r.valueSpec,o=r.style,u=r.styleSpec,f=r.key,m=r.arrayElementValidator||r.validateSpec;if(Ei(t)!=="array")return[new tt(f,t,`array expected, ${Ei(t)} found`)];if(n.length&&t.length!==n.length)return[new tt(f,t,`array length ${n.length} expected, length ${t.length} found`)];if(n["min-length"]&&t.length<n["min-length"])return[new tt(f,t,`array length at least ${n["min-length"]} expected, length ${t.length} found`)];let x={type:n.value,values:n.values};u.$version<7&&(x.function=n.function),Ei(n.value)==="object"&&(x=n.value);let T=[];for(let E=0;E<t.length;E++)T=T.concat(m({array:t,arrayIndex:E,value:t[E],valueSpec:x,validateSpec:r.validateSpec,style:o,styleSpec:u,key:`${f}[${E}]`}));return T}function pl(r){let t=r.key,n=r.value,o=r.valueSpec,u=Ei(n);return u==="number"&&n!=n&&(u="NaN"),u!=="number"?[new tt(t,n,`number expected, ${u}
4 found`)]:"minimum"in o&&n<o.minimum?[new tt(t,n,`${n} is less than the minimum value ${o.minimum}`)]:"maximum"in o&&n>o.maximum?[new tt(t,n,`${n} is greater than the maximum value ${o.maximum}`)]:[]}function Ql(r){let t=r.valueSpec,n=yr(r.value.type),o,u,f,m={},x=n!=="categorical"&&r.value.property===void 0,T=!x,E=Ei(r.value.stops)==="array"&&Ei(r.value.stops[0])==="array"&&Ei(r.value.stops[0][0])==="object",A=Un({key:r.key,value:r.value,valueSpec:r.styleSpec.function,validateSpec:r.validateSpec,style:r.style,styleSpec:r.styleSpec,objectElementValidators:{stops:function(q){if(n==="identity")return[new tt(q.key,q.value,'identity function may not have a "stops" property')];let Y=[],Q=q.value;return Y=Y.concat(Jl({key:q.key,value:Q,valueSpec:q.valueSpec,validateSpec:q.validateSpec,style:q.style,styleSpec:q.styleSpec,arrayElementValidator:k})),Ei(Q)==="array"&&Q.length===0&&Y.push(new tt(q.key,Q,"array must have at least one stop")),Y},default:function(q){return q.validateSpec({key:q.key,value:q.value,valueSpec:t,validateSpec:q.validateSpec,style:q.style,styleSpec:q.styleSpec})}}});return n==="identity"&&x&&A.push(new tt(r.key,r.value,'missing required property "property"')),n==="identity"||r.value.stops||A.push(new tt(r.key,r.value,'missing required property "stops"')),n==="exponential"&&r.valueSpec.expression&&!zr(r.valueSpec)&&A.push(new tt(r.key,r.value,"exponential functions not supported")),r.styleSpec.$version>=8&&(T&&!Qr(r.valueSpec)?A.push(new tt(r.key,r.value,"property functions not supported")):x&&!ks(r.valueSpec)&&A.push(new tt(r.key,r.value,"zoom functions not supported"))),n!=="categorical"&&!E||r.value.property!==void 0||A.push(new tt(r.key,r.value,'"property" property is required')),A;function k(q){let Y=[],Q=q.value,oe=q.key;if(Ei(Q)!=="array")return[new tt(oe,Q,`array expected, ${Ei(Q)} found`)];if(Q.length!==2)return[new tt(oe,Q,`array length 2 expected, length ${Q.length} found`)];if(E){if(Ei(Q[0])!=="object")return[new tt(oe,Q,`object expected, ${Ei(Q[0])} found`)];if(Q[0].zoom===void 0)return[new tt(oe,Q,"object stop key must have zoom")];if(Q[0].value===void 0)return[new tt(oe,Q,"object stop key must have value")];if(f&&f>yr(Q[0].zoom))return[new tt(oe,Q[0].zoom,"stop zoom values must appear in ascending order")];yr(Q[0].zoom)!==f&&(f=yr(Q[0].zoom),u=void 0,m={}),Y=Y.concat(Un({key:`${oe}[0]`,value:Q[0],valueSpec:{zoom:{}},validateSpec:q.validateSpec,style:q.style,styleSpec:q.styleSpec,objectElementValidators:{zoom:pl,value:$}}))}else Y=Y.concat($({key:`${oe}[0]`,value:Q[0],validateSpec:q.validateSpec,style:q.style,styleSpec:q.styleSpec},Q));return ko(Pa(Q[1]))?Y.concat([new tt(`${oe}[1]`,Q[1],"expressions are not allowed in function stops.")]):Y.concat(q.validateSpec({key:`${oe}[1]`,value:Q[1],valueSpec:t,validateSpec:q.validateSpec,style:q.style,styleSpec:q.styleSpec}))}function $(q,Y){let Q=Ei(q.value),oe=yr(q.value),pe=q.value!==null?q.value:Y;if(o){if(Q!==o)return[new tt(q.key,pe,`${Q} stop domain type must match previous stop domain type ${o}`)]}else o=Q;if(Q!=="number"&&Q!=="string"&&Q!=="boolean")return[new tt(q.key,pe,"stop domain value must be a number, string, or boolean")];if(Q!=="number"&&n!=="categorical"){let Ce=`number expected, ${Q} found`;return Qr(t)&&n===void 0&&(Ce+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new tt(q.key,pe,Ce)]}return n!=="categorical"||Q!=="number"||isFinite(oe)&&Math.floor(oe)===oe?n!=="categorical"&&Q==="number"&&u!==void 0&&oe<u?[new tt(q.key,pe,"stop domain values must appear in ascending order")]:(u=oe,n==="categorical"&&oe in m?[new tt(q.key,pe,"stop domain values must be unique")]:(m[oe]=!0,[])):[new tt(q.key,pe,`integer expected, found ${oe}`)]}}function Ls(r){let t=(r.expressionContext==="property"?Xc:ol)(Pa(r.value),r.valueSpec);if(t.result==="error")return t.value.map(o=>new tt(`${r.key}${o.key}`,r.value,o.message));let n=t.value.expression||t.value._styleExpression.expression;if(r.expressionContext==="property"&&r.propertyKey==="text-font"&&!n.outputDefined())return[new tt(r.key,r.value,`Invalid data expression for "${r.propertyKey}". Output values must be contained as literals within the expression.`)];if(r.expressionContext==="property"&&r.propertyType==="layout"&&!Ii(n))return[new tt(r.key,r.value,'"feature-state" data expressions are not supported with layout properties.')];if(r.expressionContext==="filter"&&!Ii(n))return[new tt(r.key,r.value,'"feature-state" data expressions are not supported with filters.')];if(r.expressionContext&&r.expressionContext.indexOf("cluster")===0){if(!Dr(n,["zoom","feature-state"]))return[new tt(r.key,r.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(r.expressionContext==="cluster-initial"&&!Xt(n))return[new tt(r.key,r.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ro(r){let t=r.key,n=r.value,o=r.valueSpec,u=[];return Array.isArray(o.values)?o.values.indexOf(yr(n))===-1&&u.push(new tt(t,n,`expected one of [${o.values.join(", ")}], ${JSON.stringify(n)} found`)):Object.keys(o.values).indexOf(yr(n))===-1&&u.push(new tt(t,n,`expected one of [${Object.keys(o.values).join(", ")}], ${JSON.stringify(n)} found`)),u}function fl(r){return cl(Pa(r.value))?Ls(Kt({},r,{expressionContext:"filter",valueSpec:{value:"boolean"}})):ec(r)}function ec(r){let t=r.value,n=r.key;if(Ei(t)!=="array")return[new tt(n,t,`array expected, ${Ei(t)} found`)];let o=r.styleSpec,u,f=[];if(t.length<1)return[new tt(n,t,"filter array must have at least 1 element")];
4switch(f=f.concat(Ro({key:`${n}[0]`,value:t[0],valueSpec:o.filter_operator,style:r.style,styleSpec:r.styleSpec})),yr(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&yr(t[1])==="$type"&&f.push(new tt(n,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&f.push(new tt(n,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(u=Ei(t[1]),u!=="string"&&f.push(new tt(`${n}[1]`,t[1],`string expected, ${u} found`)));for(let m=2;m<t.length;m++)u=Ei(t[m]),yr(t[1])==="$type"?f=f.concat(Ro({key:`${n}[${m}]`,value:t[m],valueSpec:o.geometry_type,style:r.style,styleSpec:r.styleSpec})):u!=="string"&&u!=="number"&&u!=="boolean"&&f.push(new tt(`${n}[${m}]`,t[m],`string, number, or boolean expected, ${u} found`));break;case"any":case"all":case"none":for(let m=1;m<t.length;m++)f=f.concat(ec({key:`${n}[${m}]`,value:t[m],style:r.style,styleSpec:r.styleSpec}));break;case"has":case"!has":u=Ei(t[1]),t.length!==2?f.push(new tt(n,t,`filter array for "${t[0]}" operator must have 2 elements`)):u!=="string"&&f.push(new tt(`${n}[1]`,t[1],`string expected, ${u} found`))}return f}function Jc(r,t){let n=r.key,o=r.validateSpec,u=r.style,f=r.styleSpec,m=r.value,x=r.objectKey,T=f[`${t}_${r.layerType}`];if(!T)return[];let E=x.match(/^(.*)-transition$/);if(t==="paint"&&E&&T[E[1]]&&T[E[1]].transition)return o({key:n,value:m,valueSpec:f.transition,style:u,styleSpec:f});let A=r.valueSpec||T[x];if(!A)return[new tt(n,m,`unknown property "${x}"`)];let k;if(Ei(m)==="string"&&Qr(A)&&!A.tokens&&(k=/^{([^}]+)}$/.exec(m)))return[new tt(n,m,`"${x}" does not support interpolation syntax 5Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(k[1])} }\`.`)];let $=[];return r.layerType==="symbol"&&(x==="text-field"&&u&&!u.glyphs&&$.push(new tt(n,m,'use of "text-field" requires a style "glyphs" property')),x==="text-font"&&al(Pa(m))&&yr(m.type)==="identity"&&$.push(new tt(n,m,'"text-font" does not support identity functions'))),$.concat(o({key:r.key,value:m,valueSpec:A,style:u,styleSpec:f,expressionContext:"property",propertyType:t,propertyKey:x}))}function tc(r){return Jc(r,"paint")}function ic(r){return Jc(r,"layout")}function Ja(r){let t=[],n=r.value,o=r.key,u=r.style,f=r.styleSpec;n.type||n.ref||t.push(new tt(o,n,'either "type" or "ref" is required'));let m=yr(n.type),x=yr(n.ref);if(n.id){let T=yr(n.id);for(let E=0;E<r.arrayIndex;E++){let A=u.layers[E];yr(A.id)===T&&t.push(new tt(o,n.id,`duplicate layer id "${n.id}", previously used at line ${A.id.__line__}`))}}if("ref"in n){let T;["type","source","source-layer","filter","layout"].forEach(E=>{E in n&&t.push(new tt(o,n[E],`"${E}" is prohibited for ref layers`))}),u.layers.forEach(E=>{yr(E.id)===x&&(T=E)}),T?T.ref?t.push(new tt(o,n.ref,"ref cannot reference another ref layer")):m=yr(T.type):t.push(new tt(o,n.ref,`ref layer "${x}" not found`))}else if(m!=="background")if(n.source){let T=u.sources&&u.sources[n.source],E=T&&yr(T.type);T?E==="vector"&&m==="raster"?t.push(new tt(o,n.source,`layer "${n.id}" requires a raster source`)):E!=="raster-dem"&&m==="hillshade"?t.push(new tt(o,n.source,`layer "${n.id}" requires a raster-dem source`)):E==="raster"&&m!=="raster"?t.push(new tt(o,n.source,`layer "${n.id}" requires a vector source`)):E!=="vector"||n["source-layer"]?E==="raster-dem"&&m!=="hillshade"?t.push(new tt(o,n.source,"raster-dem source can only be used with layer type 'hillshade'.")):m!=="line"||!n.paint||!n.paint["line-gradient"]||E==="geojson"&&T.lineMetrics||t.push(new tt(o,n,`layer "${n.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new tt(o,n,`layer "${n.id}" must specify a "source-layer"`)):t.push(new tt(o,n.source,`source "${n.source}" not found`))}else t.push(new tt(o,n,'missing required property "source"'));return t=t.concat(Un({key:o,value:n,valueSpec:f.layer,style:r.style,styleSpec:r.styleSpec,validateSpec:r.validateSpec,objectElementValidators:{"*":()=>[],type:()=>r.validateSpec({key:`${o}.type`,value:n.type,valueSpec:f.layer.type,style:r.style,styleSpec:r.styleSpec,validateSpec:r.validateSpec,object:n,objectKey:"type"}),filter:fl,layout:T=>Un({layer:n,key:T.key,value:T.value,style:T.style,styleSpec:T.styleSpec,validateSpec:T.validateSpec,objectElementValidators:{"*":E=>ic(Kt({layerType:m},E))}}),paint:T=>Un({layer:n,key:T.key,value:T.value,style:T.style,styleSpec:T.styleSpec,validateSpec:T.validateSpec,objectElementValidators:{"*":E=>tc(Kt({layerType:m},E))}})}})),t}function Ea(r){let t=r.value,n=r.key,o=Ei(t);
vendor: 8,690 bytes, line 5
5return o!=="string"?[new tt(n,t,`string expected, ${o} found`)]:[]}let Qc={promoteId:function({key:r,value:t}){if(Ei(t)==="string")return Ea({key:r,value:t});{let n=[];for(let o in t)n.push(...Ea({key:`${r}.${o}`,value:t[o]}));return n}}};function eu(r){let t=r.value,n=r.key,o=r.styleSpec,u=r.style,f=r.validateSpec;if(!t.type)return[new tt(n,t,'"type" is required')];let m=yr(t.type),x;switch(m){case"vector":case"raster":return x=Un({key:n,value:t,valueSpec:o[`source_${m.replace("-","_")}`],style:r.style,styleSpec:o,objectElementValidators:Qc,validateSpec:f}),x;case"raster-dem":return x=function(T){var E;let A=(E=T.sourceName)!==null&&E!==void 0?E:"",k=T.value,$=T.styleSpec,q=$.source_raster_dem,Y=T.style,Q=[],oe=Ei(k);if(k===void 0)return Q;if(oe!=="object")return Q.push(new tt("source_raster_dem",k,`object expected, ${oe} found`)),Q;let pe=yr(k.encoding)==="custom",Ce=["redFactor","greenFactor","blueFactor","baseShift"],ye=T.value.encoding?`"${T.value.encoding}"`:"Default";for(let G in k)!pe&&Ce.includes(G)?Q.push(new tt(G,k[G],`In "${A}": "${G}" is only valid when "encoding" is set to "custom". ${ye} encoding found`)):q[G]?Q=Q.concat(T.validateSpec({key:G,value:k[G],valueSpec:q[G],validateSpec:T.validateSpec,style:Y,styleSpec:$})):Q.push(new tt(G,k[G],`unknown property "${G}"`));return Q}({sourceName:n,value:t,style:r.style,styleSpec:o,validateSpec:f}),x;case"geojson":if(x=Un({key:n,value:t,valueSpec:o.source_geojson,style:u,styleSpec:o,validateSpec:f,objectElementValidators:Qc}),t.cluster)for(let T in t.clusterProperties){let[E,A]=t.clusterProperties[T],k=typeof E=="string"?[E,["accumulated"],["get",T]]:E;x.push(...Ls({key:`${n}.${T}.map`,value:A,expressionContext:"cluster-map"})),x.push(...Ls({key:`${n}.${T}.reduce`,value:k,expressionContext:"cluster-reduce"}))}return x;case"video":return Un({key:n,value:t,valueSpec:o.source_video,style:u,validateSpec:f,styleSpec:o});case"image":return Un({key:n,value:t,valueSpec:o.source_image,style:u,validateSpec:f,styleSpec:o});case"canvas":return[new tt(n,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Ro({key:`${n}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function tu(r){let t=r.value,n=r.styleSpec,o=n.light,u=r.style,f=[],m=Ei(t);if(t===void 0)return f;if(m!=="object")return f=f.concat([new tt("light",t,`object expected, ${m} found`)]),f;for(let x in t){let T=x.match(/^(.*)-transition$/);f=f.concat(T&&o[T[1]]&&o[T[1]].transition?r.validateSpec({key:x,value:t[x],valueSpec:n.transition,validateSpec:r.validateSpec,style:u,styleSpec:n}):o[x]?r.validateSpec({key:x,value:t[x],valueSpec:o[x],validateSpec:r.validateSpec,style:u,styleSpec:n}):[new tt(x,t[x],`unknown property "${x}"`)])}return f}function iu(r){let t=r.value,n=r.styleSpec,o=n.sky,u=r.style,f=Ei(t);if(t===void 0)return[];if(f!=="object")return[new tt("sky",t,`object expected, ${f} found`)];let m=[];for(let x in t)m=m.concat(o[x]?r.validateSpec({key:x,value:t[x],valueSpec:o[x],style:u,styleSpec:n}):[new tt(x,t[x],`unknown property "${x}"`)]);return m}function ru(r){let t=r.value,n=r.styleSpec,o=n.terrain,u=r.style,f=[],m=Ei(t);if(t===void 0)return f;if(m!=="object")return f=f.concat([new tt("terrain",t,`object expected, ${m} found`)]),f;for(let x in t)f=f.concat(o[x]?r.validateSpec({key:x,value:t[x],valueSpec:o[x],validateSpec:r.validateSpec,style:u,styleSpec:n}):[new tt(x,t[x],`unknown property "${x}"`)]);return f}function Qa(r){let t=[],n=r.value,o=r.key;if(Array.isArray(n)){let u=[],f=[];for(let m in n)n[m].id&&u.includes(n[m].id)&&t.push(new tt(o,n,`all the sprites' ids must be unique, but ${n[m].id} is duplicated`)),u.push(n[m].id),n[m].url&&f.includes(n[m].url)&&t.push(new tt(o,n,`all the sprites' URLs must be unique, but ${n[m].url} is duplicated`)),f.push(n[m].url),t=t.concat(Un({key:`${o}[${m}]`,value:n[m],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:r.validateSpec}));return t}return Ea({key:o,value:n})}let eo={"*":()=>[],array:Jl,boolean:function(r){let t=r.value,n=r.key,o=Ei(t);return o!=="boolean"?[new tt(n,t,`boolean expected, ${o} found`)]:[]},number:pl,color:function(r){let t=r.key,n=r.value,o=Ei(n);return o!=="string"?[new tt(t,n,`color expected, ${o} found`)]:gi.parse(String(n))?[]:[new tt(t,n,`color expected, "${n}" found`)]},constants:Kc,enum:Ro,filter:fl,function:Ql,layer:Ja,object:Un,source:eu,light:tu,sky:iu,terrain:ru,projection:function(r){let t=r.value,n=r.styleSpec,o=n.projection,u=r.style,f=Ei(t);if(t===void 0)return[];if(f!=="object")return[new tt("projection",t,`object expected, ${f} found`)];let m=[];for(let x in t)m=m.concat(o[x]?r.validateSpec({key:x,value:t[x],valueSpec:o[x],style:u,styleSpec:n}):[new tt(x,t[x],`unknown property "${x}"`)]);return m},projectionDefinition:function(r){let t=r.key,n=r.value;n=n instanceof String?n.valueOf():n;let o=Ei(n);return o!=="array"||function(u){return Array.isArray(u)&&u.length===3&&typeof u[0]=="string"&&typeof u[1]=="string"&&typeof u[2]=="number"}(n)||function(u){return!!["interpolate","step","literal"].includes(u[0])}(n)?["array","string"].includes(o)?[]:[new tt(t,n,`projection expected, invalid type "${o}" found`)]:[new tt(t,n,`projection expected, invalid array ${JSON.stringify(n)} found`)]},string:Ea,formatted:function(r){return Ea(r).length===0?[]:Ls(r)},resolvedImage:function(r){return Ea(r).length===0?[]:Ls(r)},padding:function(r){let t=r.key,n=r.value;if(Ei(n)==="array"){if(n.length<1||n.length>4)return[new tt(t,n,`padding requires 1 to 4 values; ${n.length} values found`)];let o={type:"number"},u=[];for(let f=0;f<n.length;f++)u=u.concat(r.validateSpec({key:`${t}[${f}]`,value:n[f],validateSpec:r.validateSpec,valueSpec:o}));return u}return pl({key:t,value:n,valueSpec:{}})},variableAnchorOffsetCollection:function(r){let t=r.key,n=r.value,o=Ei(n),u=r.styleSpec;if(o!=="array"||n.length<1||n.length%2!=0)return[new tt(t,n,"variableAnchorOffsetCollection requires a non-empty array of even length")];let f=[];for(let m=0;m<n.length;m+=2)f=f.concat(Ro({key:`${t}[${m}]`,value:n[m],valueSpec:u.layout_symbol["text-anchor"]})),f=f.concat(Jl({key:`${t}[${m+1}]`,value:n[m+1],valueSpec:{length:2,value:"number"},validateSpec:r.validateSpec,style:r.style,styleSpec:u}));return f},sprite:Qa};function nn(r){let t=r.value,n=r.valueSpec,o=r.styleSpec;return r.validateSpec=nn,n.expression&&al(yr(t))?Ql(r):n.expression&&ko(Pa(t))?Ls(r):n.type&&eo[n.type]?eo[n.type](r):Un(Kt({},r,{valueSpec:n.type?o[n.type]:n}))}function to(r){let t=r.value,n=r.key,o=Ea(r);return o.length||(t.indexOf("{fontstack}")===-1&&o.push(new tt(n,t,'"glyphs" url must include a "{fontstack}" token')),t.indexOf("{range}")===-1&&o.push(new tt(n,t,'"glyphs" url must include a "{range}" token'))),o}function Gn(r,t=W){let n=[];return n=n.concat(nn({key:"",value:r,valueSpec:t.$root,styleSpec:t,style:r,validateSpec:nn,objectElementValidators:{glyphs:to,"*":()=>[]}})),r.constants&&(n=n.concat(Kc({key:"constants",value:r.constants}))),nu(n)}function gs(r){return function(t){return r({...t,validateSpec:nn})}}function nu(r){return[].concat(r).sort((t,n)=>t.line-n.line)}function Sn(r){return function(...t){return nu(r.apply(this,t))}}Gn.source=Sn(gs(eu)),Gn.sprite=Sn(gs(Qa)),Gn.glyphs=Sn(gs(to)),Gn.light=Sn(gs(tu)),Gn.sky=Sn(gs(iu)),Gn.terrain=Sn(gs(ru)),Gn.layer=Sn(gs(Ja)),Gn.filter=Sn(gs(fl)),Gn.paintProperty=Sn(gs(tc)),Gn.layoutProperty=Sn(gs(ic));let Ma=Gn,rc=Ma.light,lh=Ma.sky,nc=Ma.paintProperty,ch=Ma.layoutProperty;function io(r,t){let n=!1;if(t&&t.length)for(let o of t)r.fire(new J(new Error(o.message))),n=!0;return n}class Bo{constructor(t,n,o){let u=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;let m=new Int32Array(this.arrayBuffer);t=m[0],this.d=(n=m[1])+2*(o=m[2]);for(let T=0;T<this.d*this.d;T++){let E=m[3+T],A=m[3+T+1];u.push(E===A?null:m.subarray(E,A))}let x=m[3+u.length+1];this.keys=m.subarray(m[3+u.length],x),this.bboxes=m.subarray(x),this.insert=this._insertReadonly}else{this.d=n+2*o;for(let m=0;m<this.d*this.d;m++)u.push([]);this.keys=[],this.bboxes=[]}this.n=n,this.extent=t,this.padding=o,this.scale=n/t,this.uid=0;let f=o/n*t;this.min=-f,this.max=t+f}insert(t,n,o,u,f){this._forEachCell(n,o,u,f,this._insertCell,this.uid++,void 0,void 0),this.keys.push(t),this.bboxes.push(n),this.bboxes.push(o),this.bboxes.push(u),this.bboxes.push(f)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(t,n,o,u,f,m){this.cells[f].push(m)}query(t,n,o,u,f){let m=this.min,x=this.max;if(t<=m&&n<=m&&x<=o&&x<=u&&!f)return Array.prototype.slice.call(this.keys);{let T=[];
5return this._forEachCell(t,n,o,u,this._queryCell,T,{},f),T}}_queryCell(t,n,o,u,f,m,x,T){let E=this.cells[f];if(E!==null){let A=this.keys,k=this.bboxes;for(let $=0;$<E.length;$++){let q=E[$];if(x[q]===void 0){let Y=4*q;(T?T(k[Y+0],k[Y+1],k[Y+2],k[Y+3]):t<=k[Y+2]&&n<=k[Y+3]&&o>=k[Y+0]&&u>=k[Y+1])?(x[q]=!0,m.push(A[q])):x[q]=!1}}}}_forEachCell(t,n,o,u,f,m,x,T){let E=this._convertToCellCoord(t),A=this._convertToCellCoord(n),k=this._convertToCellCoord(o),$=this._convertToCellCoord(u);for(let q=E;q<=k;q++)for(let Y=A;Y<=$;Y++){let Q=this.d*Y+q;if((!T||T(this._convertFromCellCoord(q),this._convertFromCellCoord(Y),this._convertFromCellCoord(q+1),this._convertFromCellCoord(Y+1)))&&f.call(this,t,n,o,u,Q,m,x,T))return}}_convertFromCellCoord(t){return(t-this.padding)/this.scale}_convertToCellCoord(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let t=this.cells,n=3+this.cells.length+1+1,o=0;for(let m=0;m<this.cells.length;m++)o+=this.cells[m].length;let u=new Int32Array(n+o+this.keys.length+this.bboxes.length);u[0]=this.extent,u[1]=this.n,u[2]=this.padding;let f=n;for(let m=0;m<t.length;m++){let x=t[m];u[3+m]=f,u.set(x,f),f+=x.length}return u[3+t.length]=f,u.set(this.keys,f),f+=this.keys.length,u[3+t.length+1]=f,u.set(this.bboxes,f),f+=this.bboxes.length,u.buffer}static serialize(t,n){let o=t.toArrayBuffer();return n&&n.push(o),{buffer:o}}static deserialize(t){return new Bo(t.buffer)}}let Dn={};function zt(r,t,n={}){if(Dn[r])throw new Error(`${r} is already registered.`);Object.defineProperty(t,"_classRegistryKey",{value:r,writeable:!1}),Dn[r]={klass:t,omit:n.omit||[],shallow:n.shallow||[]}}zt("Object",Object),zt("TransferableGridIndex",Bo),zt("Color",gi),zt("Error",Error),zt("AJAXError",Ir),zt("ResolvedImage",Kr),zt("StylePropertyFunction",ll),zt("StyleExpression",Xa,{omit:["_evaluator"]}),zt("ZoomDependentExpression",Xl),zt("ZoomConstantExpression",Wl),zt("CompoundExpression",Ot,{omit:["_evaluate"]});for(let r in Lt)Lt[r]._classRegistryKey||zt(`Expression_${r}`,Lt[r]);function su(r){return r&&typeof ArrayBuffer<"u"&&(r instanceof ArrayBuffer||r.constructor&&r.constructor.name==="ArrayBuffer")}function ro(r){return r.$name||r.constructor._classRegistryKey}function au(r){return!function(t){if(t===null||typeof t!="object")return!1;let n=ro(t);return!(!n||n==="Object")}(r)&&(r==null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||r instanceof Boolean||r instanceof Number||r instanceof String||r instanceof Date||r instanceof RegExp||r instanceof Blob||r instanceof Error||su(r)||Mr(r)||ArrayBuffer.isView(r)||r instanceof ImageData)}function Ca(r,t){if(au(r))return(su(r)||Mr(r))&&t&&t.push(r),ArrayBuffer.isView(r)&&t&&t.push(r.buffer),r instanceof ImageData&&t&&t.push(r.data.buffer),r;if(Array.isArray(r)){let f=[];for(let m of r)f.push(Ca(m,t));return f}if(typeof r!="object")throw new Error("can't serialize object of type "+typeof r);let n=ro(r);if(!n)throw new Error(`can't serialize object of unregistered class ${r.constructor.name}`);if(!Dn[n])throw new Error(`${n} is not registered.`);let{klass:o}=Dn[n],u=o.serialize?o.serialize(r,t):{};if(o.serialize){if(t&&u===t[t.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(let f in r){if(!r.hasOwnProperty(f)||Dn[n].omit.indexOf(f)>=0)continue;let m=r[f];u[f]=Dn[n].shallow.indexOf(f)>=0?m:Ca(m,t)}r instanceof Error&&(u.message=r.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return n!=="Object"&&(u.$name=n),u}function aa(r){if(au(r))return r;if(Array.isArray(r))return r.map(aa);if(typeof r!="object")throw new Error("can't deserialize object of type "+typeof r);let t=ro(r)||"Object";if(!Dn[t])throw new Error(`can't deserialize unregistered class ${t}`);let{klass:n}=Dn[t];if(!n)throw new Error(`can't deserialize unregistered class ${t}`);if(n.deserialize)return n.deserialize(r);let o=Object.create(n.prototype);for(let u of Object.keys(r)){if(u==="$name")continue;let f=r[u];o[u]=Dn[t].shallow.indexOf(u)>=0?f:aa(f)}return o}class sc{constructor(){this.first=!0}update(t,n){let o=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=o,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=o,!0):(this.lastFloorZoom>o?(this.lastIntegerZoom=o+1,this.lastIntegerZoomTime=n):this.lastFloorZoom<o&&(this.lastIntegerZoom=o,this.lastIntegerZoomTime=n),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=o,!0))}}let mi={"Latin-1 Supplement":r=>r>=128&&r<=255,"Hangul Jamo":r=>r>=4352&&r<=4607,Khmer:r=>r>=6016&&r<=6143,"General Punctuation":r=>r>=8192&&r<=8303,"Letterlike Symbols":r=>r>=8448&&r<=8527,"Number Forms":r=>r>=8528&&r<=8591,"Miscellaneous Technical":r=>r>=8960&&r<=9215,"Control Pictures":r=>r>=9216&&r<=9279,"Optical Character Recognition":r=>r>=9280&&r<=9311,"Enclosed Alphanumerics":r=>r>=9312&&r<=9471,"Geometric Shapes":r=>r>=9632&&r<=9727,"Miscellaneous Symbols":r=>r>=9728&&r<=9983,"Miscellaneous Symbols and Arrows":r=>r>=11008&&r<=11263,"Ideographic Description Characters":r=>r>=12272&&r<=12287,"CJK Symbols and Punctuation":r=>r>=12288&&r<=12351,Hiragana:r=>r>=12352&&r<=12447,Katakana:r=>r>=12448&&r<=12543,Kanbun:r=>r>=12688&&r<=12703,"CJK Strokes":r=>r>=12736&&r<=12783,"Enclosed CJK Letters and Months":r=>r>=12800&&r<=13055,"CJK Compatibility":r=>r>=13056&&r<=13311,"Yijing Hexagram Symbols":r=>r>=19904&&r<=19967,"CJK Unified Ideographs":r=>r>=19968&&r<=40959,"Hangul Syllables":r=>r>=44032&&r<=55215,"Private Use Area":r=>r>=57344&&r<=63743,"Vertical Forms":r=>r>=65040&&r<=65055,"CJK Compatibility Forms":r=>r>=65072&&r<=65103,"Small Form Variants":r=>r>=65104&&r<=65135,"Halfwidth and Fullwidth Forms":r=>r>=65280&&r<=65519};function ml(r){for(let t of r)if(oc(t.charCodeAt(0)))return!0;return!1}function ou(r){for(let t of r)if(!uh(t.charCodeAt(0)))return!1;return!0}function Fo(r){let t=r.map(n=>{try{return new RegExp(`\\p{sc=${n}}`,"u").source}catch{return null}}).filter(n=>n);return new RegExp(t.join("|"),"u")}let lu=Fo(["Arab","Dupl","Mong","Ougr","Syrc"]);function uh(r){return!lu.test(String.fromCodePoint(r))}let ac=Fo(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function oc(r){return!(r!==746&&r!==747&&(r<4352||!(mi["CJK Compatibility Forms"](r)&&!(r>=65097&&r<=65103)||mi["CJK Compatibility"](r)||mi["CJK Strokes"](r)||!(!mi["CJK Symbols and Punctuation"](r)||r>=12296&&r<=12305||r>=12308&&r<=12319||r===12336)||mi["Enclosed CJK Letters and Months"](r)||mi["Ideographic Description Characters"](r)||mi.Kanbun(r)||mi.Katakana(r)&&r!==12540||!(!mi["Halfwidth and Fullwidth Forms"](r)||r===65288||r===65289||r===65293||r>=65306&&r<=65310||r===65339||r===65341||r===65343||r>=65371&&r<=65503||r===65507||r>=65512&&r<=65519)||!(!mi["Small Form Variants"](r)||r>=65112&&r<=65118||r>=65123&&r<=65126)||mi["Vertical Forms"](r)||mi["Yijing Hexagram Symbols"](r)||/\p{sc=Cans}/u.test(String.fromCodePoint(r))||/\p{sc=Hang}/u.test(String.fromCodePoint(r))||ac.test(String.fromCodePoint(r)))))}function lc(r){return!(oc(r)||function(t){return!!(mi["Latin-1 Supplement"](t)&&(t===167||t===169||t===174||t===177||t===188||t===189||t===190||t===215||t===247)||mi["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)||mi["Letterlike Symbols"](t)||mi["Number Forms"](t)||mi["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)||mi["Control Pictures"](t)&&t!==9251||mi["Optical Character Recognition"](t)||mi["Enclosed Alphanumerics"](t)||mi["Geometric Shapes"](t)||mi["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||mi["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||mi["CJK Symbols and Punctuation"](t)||mi.Katakana(t)||mi["Private Use Area"](t)||mi["CJK Compatibility Forms"](t)||mi["Small Form Variants"](t)||mi["Halfwidth and Fullwidth Forms"](t)||t===8734||t===8756||t===8757||t>=9984&&t<=10087||t>=10102&&t<=10131||t===65532||t===65533)}(r))}
5let cu=Fo(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function cc(r){return cu.test(String.fromCodePoint(r))}function hh(r,t){return!(!t&&cc(r)||r>=2304&&r<=3583||r>=3840&&r<=4255||mi.Khmer(r))}function dh(r){for(let t of r)if(cc(t.charCodeAt(0)))return!0;return!1}let zs=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(r){this.pluginStatus=r.pluginStatus,this.pluginURL=r.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(r){if(zs.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=r.applyArabicShaping,this.processBidirectionalText=r.processBidirectionalText,this.processStyledBidirectionalText=r.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(r,t){return a(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(r.pluginStatus!=="loading")return this.setState(r),r;let n=r.pluginURL,o=new Promise(f=>{this.loadScriptResolve=f});t(n);let u=new Promise(f=>setTimeout(()=>f(),this.TIMEOUT));if(yield Promise.race([o,u]),this.isParsed()){let f={pluginStatus:"loaded",pluginURL:n};return this.setState(f),f}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${n}`)})}};class Wi{constructor(t,n){this.zoom=t,n?(this.now=n.now,this.fadeDuration=n.fadeDuration,this.zoomHistory=n.zoomHistory,this.transition=n.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new sc,this.transition={})}isSupportedScript(t){return function(n,o){for(let u of n)if(!hh(u.charCodeAt(0),o))return!1;return!0}(t,zs.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let t=this.zoom,n=t-Math.floor(t),o=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:n+(1-n)*o}:{fromScale:.5,toScale:1,t:1-(1-o)*n}}}class Oo{constructor(t,n){this.property=t,this.value=n,this.expression=function(o,u){if(al(o))return new ll(o,u);if(ko(o)){let f=Xc(o,u);if(f.result==="error")throw new Error(f.value.map(m=>`${m.key}: ${m.message}`).join(", "));return f.value}{let f=o;return u.type==="color"&&typeof o=="string"?f=gi.parse(o):u.type!=="padding"||typeof o!="number"&&!Array.isArray(o)?u.type==="variableAnchorOffsetCollection"&&Array.isArray(o)?f=br.parse(o):u.type==="projectionDefinition"&&typeof o=="string"&&(f=or.parse(o)):f=Qi.parse(o),{kind:"constant",evaluate:()=>f}}}(n===void 0?t.specification.default:n,t.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(t,n,o){return this.property.possiblyEvaluate(this,t,n,o)}}class gl{constructor(t){this.property=t,this.value=new Oo(t,void 0)}transitioned(t,n){return new uu(this.property,this.value,n,Ai({},t.transition,this.transition),t.now)}untransitioned(){return new uu(this.property,this.value,null,{},0)}}class No{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)}getValue(t){return Tt(this._values[t].value.value)}setValue(t,n){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new gl(this._values[t].property)),this._values[t].value=new Oo(this._values[t].property,n===null?void 0:Tt(n))}getTransition(t){return Tt(this._values[t].transition)}setTransition(t,n){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new gl(this._values[t].property)),this._values[t].transition=Tt(n)||void 0}serialize(){let t={};for(let n of Object.keys(this._values)){let o=this.getValue(n);o!==void 0&&(t[n]=o);let u=this.getTransition(n);u!==void 0&&(t[`${n}-transition`]=u)}return t}transitioned(t,n){let o=new yl(this._properties);for(let u of Object.keys(this._values))o._values[u]=this._values[u].transitioned(t,n._values[u]);return o}untransitioned(){let t=new yl(this._properties);for(let n of Object.keys(this._values))t._values[n]=this._values[n].untransitioned();return t}}class uu{constructor(t,n,o,u,f){this.property=t,this.value=n,this.begin=f+u.delay||0,this.end=this.begin+u.duration||0,t.specification.transition&&(u.delay||u.duration)&&(this.prior=o)}possiblyEvaluate(t,n,o){let u=t.now||0,f=this.value.possiblyEvaluate(t,n,o),m=this.prior;if(m){if(u>this.end)return this.prior=null,f;if(this.value.isDataDriven())return this.prior=null,f;if(u<this.begin)return m.possiblyEvaluate(t,n,o);{let x=(u-this.begin)/(this.end-this.begin);return this.property.interpolate(m.possiblyEvaluate(t,n,o),f,Xe(x))}}return f}}class yl{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)}possiblyEvaluate(t,n,o){let u=new jo(this._properties);for(let f of Object.keys(this._values))u._values[f]=this._values[f].possiblyEvaluate(t,n,o);return u}hasTransition(){for(let t of Object.keys(this._values))if(this._values[t].prior)return!0;return!1}}class ph{constructor(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)}hasValue(t){return this._values[t].value!==void 0}getValue(t){return Tt(this._values[t].value)}setValue(t,n){this._values[t]=new Oo(this._values[t].property,n===null?void 0:Tt(n))}serialize(){let t={};for(let n of Object.keys(this._values)){let o=this.getValue(n);o!==void 0&&(t[n]=o)}return t}possiblyEvaluate(t,n,o){let u=new jo(this._properties);for(let f of Object.keys(this._values))u._values[f]=this._values[f].possiblyEvaluate(t,n,o);return u}}class ys{constructor(t,n,o){this.property=t,this.value=n,this.parameters=o}isConstant(){return this.value.kind==="constant"}constantOr(t){return this.value.kind==="constant"?this.value.value:t}evaluate(t,n,o,u){return this.property.evaluate(this.value,this.parameters,t,n,o,u)}}class jo{constructor(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)}get(t){return this._values[t]}}class Ut{constructor(t){this.specification=t}possiblyEvaluate(t,n){if(t.isDataDriven())throw new Error("Value should not be data driven");return t.expression.evaluate(n)}interpolate(t,n,o){let u=Cn[this.specification.type];return u?u(t,n,o):t}}class Wt{constructor(t,n){this.specification=t,this.overrides=n}possiblyEvaluate(t,n,o,u){return new ys(this,t.expression.kind==="constant"||t.expression.kind==="camera"?{kind:"constant",value:t.expression.evaluate(n,null,{},o,u)}:t.expression,n)}interpolate(t,n,o){if(t.value.kind!=="constant"||n.value.kind!=="constant")return t;if(t.value.value===void 0||n.value.value===void 0)return new ys(this,{kind:"constant",value:void 0},t.parameters);let u=Cn[this.specification.type];if(u){let f=u(t.value.value,n.value.value,o);return new ys(this,{kind:"constant",value:f},t.parameters)}return t}evaluate(t,n,o,u,f,m){return t.kind==="constant"?t.value:t.evaluate(n,o,u,f,m)}}class _l extends Wt{possiblyEvaluate(t,n,o,u){if(t.value===void 0)return new ys(this,{kind:"constant",value:void 0},n);if(t.expression.kind==="constant"){let f=t.expression.evaluate(n,null,{},o,u),m=t.property.specification.type==="resolvedImage"&&typeof f!="string"?f.name:f,x=this._calculate(m,m,m,n);return new ys(this,{kind:"constant",value:x},n)}if(t.expression.kind==="camera"){let f=this._calculate(t.expression.evaluate({zoom:n.zoom-1}),t.expression.evaluate({zoom:n.zoom}),t.expression.evaluate({zoom:n.zoom+1}),n);return new ys(this,{kind:"constant",value:f},n)}return new ys(this,t.expression,n)}evaluate(t,n,o,u,f,m){if(t.kind==="source"){let x=t.evaluate(n,o,u,f,m);return this._calculate(x,x,x,n)}return t.kind==="composite"?this._calculate(t.evaluate({zoom:Math.floor(n.zoom)-1},o,u),t.evaluate({zoom:Math.floor(n.zoom)},o,u),t.evaluate({zoom:Math.floor(n.zoom)+1},o,u),n):t.value}_calculate(t,n,o,u){return u.zoom>u.zoomHistory.lastIntegerZoom?{from:t,to:n}:{from:o,to:n}}interpolate(t){return t}}class uc{constructor(t){this.specification=t}possiblyEvaluate(t,n,o,u){if(t.value!==void 0){if(t.expression.kind==="constant"){let f=t.expression.evaluate(n,null,{},o,u);return this._calculate(f,f,f,n)}return this._calculate(t.expression.evaluate(new Wi(Math.floor(n.zoom-1),n)),t.expression.evaluate(new Wi(Math.floor(n.zoom),n)),t.expression.evaluate(new Wi(Math.floor(n.zoom+1),n)),n)}}_calculate(t,n,o,u){return u.zoom>u.zoomHistory.lastIntegerZoom?{from:t,to:n}:{from:o,to:n}}interpolate(t){return t}}class hc{constructor(t){this.specification=t}possiblyEvaluate(t,n,o,u){return!!t.expression.evaluate(n,null,{},o,u)}interpolate(){return!1}}class Tn{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let n in t){let o=t[n];o.specification.overridable&&this.overridableProperties.push(n);let u=this.defaultPropertyValues[n]=new Oo(o,void 0),f=this.defaultTransitionablePropertyValues[n]=new gl(o);this.defaultTransitioningPropertyValues[n]=f.untransitioned(),this.defaultPossiblyEvaluatedValues[n]=u.possiblyEvaluate({})}}}zt("DataDrivenProperty",Wt),zt("DataConstantProperty",Ut),zt("CrossFadedDataDrivenProperty",_l),zt("CrossFadedProperty",uc),zt("ColorRampProperty",hc);let hu="-transition";class pn extends ie{constructor(t,n){if(super(),this.id=t.id,this.type=t.type,this._featureFilter={filter:()=>!0,needGeometry:!1},t.type!=="custom"&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,t.type!=="background"&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),n.layout&&(this._unevaluatedLayout=new ph(n.layout)),n.paint)){this._transitionablePaint=new No(n.paint);for(let o in t.paint)this.setPaintProperty(o,t.paint[o],{validate:!1});for(let o in t.layout)this.setLayoutProperty(o,t.layout[o],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new jo(n.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){return t==="visibility"?this.visibility:this._unevaluatedLayout.getValue(t)}setLayoutProperty(t,n,o={}
5){n!=null&&this._validate(ch,`layers.${this.id}.layout.${t}`,t,n,o)||(t!=="visibility"?this._unevaluatedLayout.setValue(t,n):this.visibility=n)}getPaintProperty(t){return t.endsWith(hu)?this._transitionablePaint.getTransition(t.slice(0,-11)):this._transitionablePaint.getValue(t)}setPaintProperty(t,n,o={}){if(n!=null&&this._validate(nc,`layers.${this.id}.paint.${t}`,t,n,o))return!1;if(t.endsWith(hu))return this._transitionablePaint.setTransition(t.slice(0,-11),n||void 0),!1;{let u=this._transitionablePaint._values[t],f=u.property.specification["property-type"]==="cross-faded-data-driven",m=u.value.isDataDriven(),x=u.value;this._transitionablePaint.setValue(t,n),this._handleSpecialPaintPropertyUpdate(t);let T=this._transitionablePaint._values[t].value;return T.isDataDriven()||m||f||this._handleOverridablePaintPropertyUpdate(t,x,T)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,n,o){return!1}isHidden(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||this.visibility==="none"}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(t,n){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,n)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,n)}
5serialize(){let t={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&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),yt(t,(n,o)=>!(n===void 0||o==="layout"&&!Object.keys(n).length||o==="paint"&&!Object.keys(n).length))}_validate(t,n,o,u,f={}){return(!f||f.validate!==!1)&&io(this,t.call(Ma,{key:n,layerType:this.type,objectKey:o,value:u,styleSpec:W,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let t in this.paint._values){let n=this.paint.get(t);if(n instanceof ys&&Qr(n.property.specification)&&(n.value.kind==="source"||n.value.kind==="composite")&&n.value.isStateDependent)return!0}return!1}}let fh={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class $o{constructor(t,n){this._structArray=t,this._pos1=n*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class cr{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,n){return t._trim(),n&&(t.isTransferred=!0,n.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){let n=Object.create(this.prototype);return n.arrayBuffer=t.arrayBuffer,n.length=t.length,n.capacity=t.arrayBuffer.byteLength/n.bytesPerElement,n._refreshViews(),n}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let n=this.uint8;this._refreshViews(),n&&this.uint8.set(n)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function _r(r,t=1){let n=0,o=0;return{members:r.map(u=>{let f=fh[u.type].BYTES_PER_ELEMENT,m=n=du(n,Math.max(t,f)),x=u.components||1;return o=Math.max(o,f),n+=f*x,{name:u.name,type:u.type,components:x,offset:m}}),size:du(n,Math.max(o,t)),alignment:t}}function du(r,t){return Math.ceil(r/t)*t}class Vo extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,n){let o=this.length;return this.resize(o+1),this.emplace(o,t,n)}emplace(t,n,o){let u=2*t;return this.int16[u+0]=n,this.int16[u+1]=o,t}}Vo.prototype.bytesPerElement=4,zt("StructArrayLayout2i4",Vo);class _s extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,n,o){let u=this.length;return this.resize(u+1),this.emplace(u,t,n,o)}emplace(t,n,o,u){let f=3*t;return this.int16[f+0]=n,this.int16[f+1]=o,this.int16[f+2]=u,t}}_s.prototype.bytesPerElement=6,zt("StructArrayLayout3i6",_s);class vl extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,n,o,u){let f=this.length;return this.resize(f+1),this.emplace(f,t,n,o,u)}emplace(t,n,o,u,f){let m=4*t;return this.int16[m+0]=n,this.int16[m+1]=o,this.int16[m+2]=u,this.int16[m+3]=f,t}}vl.prototype.bytesPerElement=8,zt("StructArrayLayout4i8",vl);class Uo extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,n,o,u,f,m){let x=this.length;return this.resize(x+1),this.emplace(x,t,n,o,u,f,m)}emplace(t,n,o,u,f,m,x){let T=6*t;return this.int16[T+0]=n,this.int16[T+1]=o,this.int16[T+2]=u,this.int16[T+3]=f,this.int16[T+4]=m,this.int16[T+5]=x,t}}Uo.prototype.bytesPerElement=12,zt("StructArrayLayout2i4i12",Uo);class bl extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,n,o,u,f,m){let x=this.length;return this.resize(x+1),this.emplace(x,t,n,o,u,f,m)}emplace(t,n,o,u,f,m,x){let T=4*t,E=8*t;return this.int16[T+0]=n,this.int16[T+1]=o,this.uint8[E+4]=u,this.uint8[E+5]=f,this.uint8[E+6]=m,this.uint8[E+7]=x,t}}bl.prototype.bytesPerElement=8,zt("StructArrayLayout2i4ub8",bl);class Ia extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,n){let o=this.length;return this.resize(o+1),this.emplace(o,t,n)}emplace(t,n,o){let u=2*t;return this.float32[u+0]=n,this.float32[u+1]=o,t}}Ia.prototype.bytesPerElement=8,zt("StructArrayLayout2f8",Ia);class dc extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,n,o,u,f,m,x,T,E,A){let k=this.length;return this.resize(k+1),this.emplace(k,t,n,o,u,f,m,x,T,E,A)}emplace(t,n,o,u,f,m,x,T,E,A,k){let $=10*t;return this.uint16[$+0]=n,this.uint16[$+1]=o,this.uint16[$+2]=u,this.uint16[$+3]=f,this.uint16[$+4]=m,this.uint16[$+5]=x,this.uint16[$+6
vendor: 8,725 bytes, line 5
5]=T,this.uint16[$+7]=E,this.uint16[$+8]=A,this.uint16[$+9]=k,t}}dc.prototype.bytesPerElement=20,zt("StructArrayLayout10ui20",dc);class no extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,n,o,u,f,m,x,T,E,A,k,$){let q=this.length;return this.resize(q+1),this.emplace(q,t,n,o,u,f,m,x,T,E,A,k,$)}emplace(t,n,o,u,f,m,x,T,E,A,k,$,q){let Y=12*t;return this.int16[Y+0]=n,this.int16[Y+1]=o,this.int16[Y+2]=u,this.int16[Y+3]=f,this.uint16[Y+4]=m,this.uint16[Y+5]=x,this.uint16[Y+6]=T,this.uint16[Y+7]=E,this.int16[Y+8]=A,this.int16[Y+9]=k,this.int16[Y+10]=$,this.int16[Y+11]=q,t}}no.prototype.bytesPerElement=24,zt("StructArrayLayout4i4ui4i24",no);class Aa extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,n,o){let u=this.length;return this.resize(u+1),this.emplace(u,t,n,o)}emplace(t,n,o,u){let f=3*t;return this.float32[f+0]=n,this.float32[f+1]=o,this.float32[f+2]=u,t}}Aa.prototype.bytesPerElement=12,zt("StructArrayLayout3f12",Aa);class pc extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){let n=this.length;return this.resize(n+1),this.emplace(n,t)}emplace(t,n){return this.uint32[1*t+0]=n,t}}pc.prototype.bytesPerElement=4,zt("StructArrayLayout1ul4",pc);class xl extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,n,o,u,f,m,x,T,E){let A=this.length;return this.resize(A+1),this.emplace(A,t,n,o,u,f,m,x,T,E)}emplace(t,n,o,u,f,m,x,T,E,A){let k=10*t,$=5*t;return this.int16[k+0]=n,this.int16[k+1]=o,this.int16[k+2]=u,this.int16[k+3]=f,this.int16[k+4]=m,this.int16[k+5]=x,this.uint32[$+3]=T,this.uint16[k+8]=E,this.uint16[k+9]=A,t}}xl.prototype.bytesPerElement=20,zt("StructArrayLayout6i1ul2ui20",xl);class Da extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,n,o,u,f,m){let x=this.length;return this.resize(x+1),this.emplace(x,t,n,o,u,f,m)}emplace(t,n,o,u,f,m,x){let T=6*t;return this.int16[T+0]=n,this.int16[T+1]=o,this.int16[T+2]=u,this.int16[T+3]=f,this.int16[T+4]=m,this.int16[T+5]=x,t}}Da.prototype.bytesPerElement=12,zt("StructArrayLayout2i2i2i12",Da);class fc extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,n,o,u,f){let m=this.length;return this.resize(m+1),this.emplace(m,t,n,o,u,f)}emplace(t,n,o,u,f,m){let x=4*t,T=8*t;return this.float32[x+0]=n,this.float32[x+1]=o,this.float32[x+2]=u,this.int16[T+6]=f,this.int16[T+7]=m,t}}fc.prototype.bytesPerElement=16,zt("StructArrayLayout2f1f2i16",fc);class mc extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,n,o,u,f,m){let x=this.length;return this.resize(x+1),this.emplace(x,t,n,o,u,f,m)}emplace(t,n,o,u,f,m,x){let T=16*t,E=4*t,A=8*t;return this.uint8[T+0]=n,this.uint8[T+1]=o,this.float32[E+1]=u,this.float32[E+2]=f,this.int16[A+6]=m,this.int16[A+7]=x,t}}mc.prototype.bytesPerElement=16,zt("StructArrayLayout2ub2f2i16",mc);class Go extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,n,o){let u=this.length;return this.resize(u+1),this.emplace(u,t,n,o)}emplace(t,n,o,u){let f=3*t;return this.uint16[f+0]=n,this.uint16[f+1]=o,this.uint16[f+2]=u,t}}Go.prototype.bytesPerElement=6,zt("StructArrayLayout3ui6",Go);class gc extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,n,o,u,f,m,x,T,E,A,k,$,q,Y,Q,oe,pe){let Ce=this.length;return this.resize(Ce+1),this.emplace(Ce,t,n,o,u,f,m,x,T,E,A,k,$,q,Y,Q,oe,pe)}emplace(t,n,o,u,f,m,x,T,E,A,k,$,q,Y,Q,oe,pe,Ce){let ye=24*t,G=12*t,se=48*t;return this.int16[ye+0]=n,this.int16[ye+1]=o,this.uint16[ye+2]=u,this.uint16[ye+3]=f,this.uint32[G+2]=m,this.uint32[G+3]=x,this.uint32[G+4]=T,this.uint16[ye+10]=E,this.uint16[ye+11]=A,this.uint16[ye+12]=k,this.float32[G+7]=$,this.float32[G+8]=q,this.uint8[se+36]=Y,this.uint8[se+37]=Q,this.uint8[se+38]=oe,this.uint32[G+10]=pe,this.int16[ye+22]=Ce,t}}gc.prototype.bytesPerElement=48,zt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",gc);class h extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,n,o,u,f,m,x,T,E,A,k,$,q,Y,Q,oe,pe,Ce,ye,G,se,be,Ge,mt,Ke,nt,vt,gt){let St=this.length;return this.resize(St+1),this.emplace(St,t,n,o,u,f,m,x,T,E,A,k,$,q,Y,Q,oe,pe,Ce,ye,G,se,be,Ge,mt,Ke,nt,vt,gt)}emplace(t,n,o,u,f,m,x,T,E,A,k,$,q,Y,Q,oe,pe,Ce,ye,G,se,be,Ge,mt,Ke,nt,vt,gt,St){let ct=32*t,Ft=16*t;return this.int16[ct+0]=n,this.int16[ct+1]=o,this.int16[ct+2]=u,this.int16[ct+3]=f,this.int16[ct+4]=m,this.int16[ct+5]=x,this.int16[ct+6]=T,this.int16[ct+7]=E,this.uint16[ct+8]=A,this.uint16[ct+9]=k,this.uint16[ct+10]=$,this.uint16[ct+11]=q,this.uint16[ct+12]=Y,this.uint16[ct+13]=Q,this.uint16[ct+14]=oe,this.uint16[ct+15]=pe,this.uint16[ct+16]=Ce,this.uint16[ct+17]=ye,this.uint16[ct+18]=G,this.uint16[ct+19]=se,this.uint16[ct+20]=be,this.uint16[ct+21]=Ge,this.uint16[ct+22]=mt,this.uint32[Ft+12]=Ke,this.float32[Ft+13]=nt,this.float32[Ft+14]=vt,this.uint16[ct+30]=gt,this.uint16[ct+31]=St,t}}h.prototype.bytesPerElement=64,zt("StructArrayLayout8i15ui1ul2f2ui64",h);class e extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){let n=this.length;return this.resize(n+1),this.emplace(n,t)}emplace(t,n){return this.float32[1*t+0]=n,t}}e.prototype.bytesPerElement=4,zt("StructArrayLayout1f4",e);class i extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,n,o){let u=this.length;return this.resize(u+1),this.emplace(u,t,n,o)}emplace(t,n,o,u){let f=3*t;return this.uint16[6*t+0]=n,this.float32[f+1]=o,this.float32[f+2]=u,t}}i.prototype.bytesPerElement=12,zt("StructArrayLayout1ui2f12",i);class l extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,n,o){let u=this.length;return this.resize(u+1),this.emplace(u,t,n,o)}emplace(t,n,o,u){let f=4*t;return this.uint32[2*t+0]=n,this.uint16[f+2]=o,this.uint16[f+3]=u,t}}l.prototype.bytesPerElement=8,zt("StructArrayLayout1ul2ui8",l);class c extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,n){let o=this.length;return this.resize(o+1),this.emplace(o,t,n)}emplace(t,n,o){let u=2*t;return this.uint16[u+0]=n,this.uint16[u+1]=o,t}}c.prototype.bytesPerElement=4,zt("StructArrayLayout2ui4",c);class d extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){let n=this.length;return this.resize(n+1),this.emplace(n,t)}emplace(t,n){return this.uint16[1*t+0]=n,t}}d.prototype.bytesPerElement=2,zt("StructArrayLayout1ui2",d);class v extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,n,o,u){let f=this.length;return this.resize(f+1),this.emplace(f,t,n,o,u)}emplace(t,n,o,u,f){let m=4*t;return this.float32[m+0]=n,this.float32[m+1]=o,this.float32[m+2]=u,this.float32[m+3]=f,t}}v.prototype.bytesPerElement=16,zt("StructArrayLayout4f16",v);class w extends $o{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}
vendor: 4,913 bytes, line 5
5get anchorPoint(){return new ne(this.anchorPointX,this.anchorPointY)}}w.prototype.size=20;class P extends xl{get(t){return new w(this,t)}}zt("CollisionBoxArray",P);class C extends $o{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(t){this._structArray.uint8[this._pos1+37]=t}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(t){this._structArray.uint8[this._pos1+38]=t}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(t){this._structArray.uint32[this._pos4+10]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}C.prototype.size=48;class L extends gc{get(t){return new C(this,t)}}zt("PlacedSymbolArray",L);class N extends $o{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(t){this._structArray.uint32[this._pos4+12]=t}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}N.prototype.size=64;class R extends h{get(t){return new N(this,t)}}zt("SymbolInstanceArray",R);class K extends e{getoffsetX(t){return this.float32[1*t+0]}}zt("GlyphOffsetArray",K);class ee extends _s{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}zt("SymbolLineVertexArray",ee);class he extends $o{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}he.prototype.size=12;class ue extends i{get(t){return new he(this,t)}}zt("TextAnchorOffsetArray",ue);class de extends $o{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}de.prototype.size=8;class me extends l{get(t){return new de(this,t)}}zt("FeatureIndexArray",me);class xe extends Vo{}class Se extends Vo{}class Pe extends Vo{}class Ae extends Uo{}class Me extends bl{}class Ue extends Ia{}class Ve extends dc{}class ot extends no{}class ut extends Aa{}class at extends pc{}class It extends Da{}
5class Et extends mc{}class pt extends Go{}class Nt extends c{}let ai=_r([{name:"a_pos",components:2,type:"Int16"}],4),{members:Mi}=ai;class li{constructor(t=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=t}prepareSegment(t,n,o,u){let f=this.segments[this.segments.length-1];return t>li.MAX_VERTEX_ARRAY_LENGTH&&si(`Max vertices per segment is ${li.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${li.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!f||f.vertexLength+t>li.MAX_VERTEX_ARRAY_LENGTH||f.sortKey!==u?this.createNewSegment(n,o,u):f}createNewSegment(t,n,o){let u={vertexOffset:t.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0,vaos:{}};return o!==void 0&&(u.sortKey=o),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(u),u}getOrCreateLatestSegment(t,n,o){return this.prepareSegment(0,t,n,o)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let t of this.segments)for(let n in t.vaos)t.vaos[n].destroy()}static simpleSegment(t,n,o,u){return new li([{vertexOffset:t,primitiveOffset:n,vertexLength:o,primitiveLength:u,vaos:{},sortKey:0}])}}function Bi(r,t){return 256*(r=xi(Math.floor(r),0,255))+xi(Math.floor(t),0,255)}li.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,zt("SegmentVector",li);let Hi=_r([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var Xi,ki,Fi,xr={exports:{}},Rr={exports:{}},Gr={exports:{}},Pn=function(){if(Fi)return xr.exports;Fi=1;var r=(Xi||(Xi=1,Rr.exports=function(n,o){var u,f,m,x,T,E,A,k;for(f=n.length-(u=3&n.length),m=o,T=3432918353,E=461845907,k=0;k<f;)A=255&n.charCodeAt(k)|(255&n.charCodeAt(++k))<<8|(255&n.charCodeAt(++k))<<16|(255&n.charCodeAt(++k))<<24,++k,m=27492+(65535&(x=5*(65535&(m=(m^=A=(65535&(A=(A=(65535&A)*T+(((A>>>16)*T&65535)<<16)&4294967295)<<15|A>>>17))*E+(((A>>>16)*E&65535)<<16)&4294967295)<<13|m>>>19))+((5*(m>>>16)&65535)<<16)&4294967295))+((58964+(x>>>16)&65535)<<16);switch(A=0,u){case 3:A^=(255&n.charCodeAt(k+2))<<16;case 2:A^=(255&n.charCodeAt(k+1))<<8;case 1:m^=A=(65535&(A=(A=(65535&(A^=255&n.charCodeAt(k)))*T+(((A>>>16)*T&65535)<<16)&4294967295)<<15|A>>>17))*E+(((A>>>16)*E&65535)<<16)&4294967295}return m^=n.length,m=2246822507*(65535&(m^=m>>>16))+((2246822507*(m>>>16)&65535)<<16)&4294967295,m=3266489909*(65535&(m^=m>>>13))+((3266489909*(m>>>16)&65535)<<16)&4294967295,(m^=m>>>16)>>>0}),Rr.exports),t=(ki||(ki=1,Gr.exports=function(n,o){for(var u,f=n.length,m=o^f,x=0;f>=4;)u=1540483477*(65535&(u=255&n.charCodeAt(x)|(255&n.charCodeAt(++x))<<8|(255&n.charCodeAt(++x))<<16|(255&n.charCodeAt(++x))<<24))+((1540483477*(u>>>16)&65535)<<16),m=1540483477*(65535&m)+((1540483477*(m>>>16)&65535)<<16)^(u=1540483477*(65535&(u^=u>>>24))+((1540483477*(u>>>16)&65535)<<16)),f-=4,++x;switch(f){case 3:m^=(255&n.charCodeAt(x+2))<<16;case 2:m^=(255&n.charCodeAt(x+1))<<8;case 1:m=1540483477*(65535&(m^=255&n.charCodeAt(x)))+((1540483477*(m>>>16)&65535)<<16)}return m=1540483477*(65535&(m^=m>>>13))+((1540483477*(m>>>16)&65535)<<16),(m^=m>>>15)>>>0}),Gr.exports);return xr.exports=r,xr.exports.murmur3=r,xr.exports.murmur2=t,xr.exports}(),Rs=z(Pn);class vs{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,n,o,u){this.ids.push(oa(t)),this.positions.push(n,o,u)}getPositions(t){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let n=oa(t),o=0,u=this.ids.length-1;for(;o<u;){let m=o+u>>1;this.ids[m]>=n?u=m:o=m+1}let f=[];for(;this.ids[o]===n;)f.push({index:this.positions[3*o],start:this.positions[3*o+1],end:this.positions[3*o+2]}),o++;return f}static serialize(t,n){let o=new Float64Array(t.ids),u=new Uint32Array(t.positions);return la(o,u,0,o.length-1),n&&n.push(o.buffer,u.buffer),{ids:o,positions:u}}static deserialize(t){let n=new vs;return n.ids=t.ids,n.positions=t.positions,n.indexed=!0,n}}function oa(r){let t=+r;return!isNaN(t)&&t<=Number.MAX_SAFE_INTEGER?t:Rs(String(r))}function la(r,t,n,o){for(;n<o;){let u=r[n+o>>1],f=n-1,m=o+1;for(;;){do f++;while(r[f]<u);do m--;while(r[m]>u);if(f>=m)break;ka(r,f,m),ka(t,3*f,3*m),ka(t,3*f+1,3*m+1),ka(t,3*f+2,3*m+2)}m-n<o-m?(la(r,t,n,m),n=m+1):(la(r,t,m+1,o),o=m)}}function ka(r,t,n){let o=r[t];r[t]=r[n],r[n]=o}zt("FeaturePositionMap",vs);class bs{constructor(t,n){this.gl=t.gl,this.location=n}}class Bs extends bs{constructor(t,n){super(t,n),this.current=0}set(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))}}class kn extends bs{constructor(t,n){super(t,n),this.current=[0,0,0,0]}set(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))}}class Fs extends bs{constructor(t,n){super(t,n),this.current=gi.transparent}set(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))}}let La=new Float32Array(16);function za(r){return[Bi(255*r.r,255*r.g),Bi(255*r.b,255*r.a)]}class ur{constructor(t,n,o){this.value=t,this.uniformNames=n.map(u=>`u_${u}`),this.type=o}setUniform(t,n,o){t.set(o.constantOr(this.value))}getBinding(t,n,o){return this.type==="color"?new Fs(t,n):new Bs(t,n)}}class hr{constructor(t,n){this.uniformNames=n.map(o=>`u_${o}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,n){this.pixelRatioFrom=n.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=n.tlbr,this.patternTo=t.tlbr}setUniform(t,n,o,u){let f=u==="u_pattern_to"?this.patternTo:u==="u_pattern_from"?this.patternFrom:u==="u_pixel_ratio_to"?this.pixelRatioTo:u==="u_pixel_ratio_from"?this.pixelRatioFrom:null;f&&t.set(f)}getBinding(t,n,o){return o.substr(0,9)==="u_pattern"?new kn(t,n):new Bs(t,n)}}class Pr{constructor(t,n,o,u){this.expression=t,this.type=o,this.maxValue=0,this.paintVertexAttributes=n.map(f=>({name:`a_${f}`,type:"Float32",components:o==="color"?2:1,offset:0})),this.paintVertexArray=new u}populatePaintArray(t,n,o,u,f){let m=this.paintVertexArray.length,x=this.expression.evaluate(new Wi(0),n,{},u,[],f);this.paintVertexArray.resize(t),this._setPaintValue(m,t,x)}updatePaintArray(t,n,o,u){let f=this.expression.evaluate({zoom:0},o,u);this._setPaintValue(t,n,f)}
5_setPaintValue(t,n,o){if(this.type==="color"){let u=za(o);for(let f=t;f<n;f++)this.paintVertexArray.emplace(f,u[0],u[1])}else{for(let u=t;u<n;u++)this.paintVertexArray.emplace(u,o);this.maxValue=Math.max(this.maxValue,Math.abs(o))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Vi{constructor(t,n,o,u,f,m){this.expression=t,this.uniformNames=n.map(x=>`u_${x}_t`),this.type=o,this.useIntegerZoom=u,this.zoom=f,this.maxValue=0,this.paintVertexAttributes=n.map(x=>({name:`a_${x}`,type:"Float32",components:o==="color"?4:2,offset:0})),this.paintVertexArray=new m}populatePaintArray(t,n,o,u,f){let m=this.expression.evaluate(new Wi(this.zoom),n,{},u,[],f),x=this.expression.evaluate(new Wi(this.zoom+1),n,{},u,[],f),T=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(T,t,m,x)}updatePaintArray(t,n,o,u){let f=this.expression.evaluate({zoom:this.zoom},o,u),m=this.expression.evaluate({zoom:this.zoom+1},o,u);this._setPaintValue(t,n,f,m)}_setPaintValue(t,n,o,u){if(this.type==="color"){let f=za(o),m=za(u);for(let x=t;x<n;x++)this.paintVertexArray.emplace(x,f[0],f[1],m[0],m[1])}else{for(let f=t;f<n;f++)this.paintVertexArray.emplace(f,o,u);this.maxValue=Math.max(this.maxValue,Math.abs(o),Math.abs(u))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(t,n){let o=this.useIntegerZoom?Math.floor(n.zoom):n.zoom,u=xi(this.expression.interpolationFactor(o,this.zoom,this.zoom+1),0,1);t.set(u)}getBinding(t,n,o){return new Bs(t,n)}}class ca{constructor(t,n,o,u,f,m){this.expression=t,this.type=n,this.useIntegerZoom=o,this.zoom=u,this.layerId=m,this.zoomInPaintVertexArray=new f,this.zoomOutPaintVertexArray=new f}populatePaintArray(t,n,o){let u=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(t),this.zoomOutPaintVertexArray.resize(t),this._setPaintValues(u,t,n.patterns&&n.patterns[this.layerId],o)}updatePaintArray(t,n,o,u,f){this._setPaintValues(t,n,o.patterns&&o.patterns[this.layerId],f)}_setPaintValues(t,n,o,u){if(!u||!o)return;let{min:f,mid:m,max:x}=o,T=u[f],E=u[m],A=u[x];if(T&&E&&A)for(let k=t;k<n;k++)this.zoomInPaintVertexArray.emplace(k,E.tl[0],E.tl[1],E.br[0],E.br[1],T.tl[0],T.tl[1],T.br[0],T.br[1],E.pixelRatio,T.pixelRatio),this.zoomOutPaintVertexArray.emplace(k,E.tl[0],E.tl[1],E.br[0],E.br[1],A.tl[0],A.tl[1],A.br[0],A.br[1],E.pixelRatio,A.pixelRatio)}upload(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,Hi.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,Hi.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class pu{constructor(t,n,o){this.binders={},this._buffers=[];let u=[];for(let f in t.paint._values){if(!o(f))continue;let m=t.paint.get(f);if(!(m instanceof ys&&Qr(m.property.specification)))continue;let x=mh(f,t.type),T=m.value,E=m.property.specification.type,A=m.property.useIntegerZoom,k=m.property.specification["property-type"],$=k==="cross-faded"||k==="cross-faded-data-driven";if(T.kind==="constant")this.binders[f]=$?new hr(T.value,x):new ur(T.value,x,E),u.push(`/u_${f}`);else if(T.kind==="source"||$){let q=fu(f,E,"source");this.binders[f]=$?new ca(T,E,A,n,q,t.id):new Pr(T,x,E,q),u.push(`/a_${f}`)}else{let q=fu(f,E,"composite");this.binders[f]=new Vi(T,x,E,A,n,q),u.push(`/z_${f}`)}}this.cacheKey=u.sort().join("")}getMaxValue(t){let n=this.binders[t];return n instanceof Pr||n instanceof Vi?n.maxValue:0}populatePaintArrays(t,n,o,u,f){for(let m in this.binders){let x=this.binders[m];(x instanceof Pr||x instanceof Vi||x instanceof ca)&&x.populatePaintArray(t,n,o,u,f)}}setConstantPatternPositions(t,n){for(let o in this.binders){let u=this.binders[o];u instanceof hr&&u.setConstantPatternPositions(t,n)}}updatePaintArrays(t,n,o,u,f){let m=!1;for(let x in t){let T=n.getPositions(x);for(let E of T){let A=o.feature(E.index);for(let k in this.binders){let $=this.binders[k];if(($ instanceof Pr||$ instanceof Vi||$ instanceof ca)&&$.expression.isStateDependent===!0){let q=u.paint.get(k);$.expression=q.value,$.updatePaintArray(E.start,E.end,A,t[x],f),m=!0}}}}return m}defines(){let t=[];for(let n in this.binders){let o=this.binders[n];(o instanceof ur||o instanceof hr)&&t.push(...o.uniformNames.map(u=>`#define HAS_UNIFORM_${u}`))}return t}getBinderAttributes(){let t=[];for(let n in this.binders){let o=this.binders[n];if(o instanceof Pr||o instanceof Vi)for(let u=0;u<o.paintVertexAttributes.length;u++)t.push(o.paintVertexAttributes[u].name);else if(o instanceof ca)for(let u=0;u<Hi.members.length;u++)t.push(Hi.members[u].name)}return t}getBinderUniforms(){let t=[];for(let n in this.binders){let o=this.binders[n];if(o instanceof ur||o instanceof hr||o instanceof Vi)for(let u of o.uniformNames)t.push(u)}return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t,n){let o=[];for(let u in this.binders){let f=this.binders[u];if(f instanceof ur||f instanceof hr||f instanceof Vi){for(let m of f.uniformNames)if(n[m]){let x=f.getBinding(t,n[m],m);o.push({name:m,property:u,binding:x})}}}return o}setUniforms(t,n,o,u){for(let{name:f,property:m,binding:x}of n)this.binders[m].setUniform(x,u,o.get(m),f)}updatePaintBuffers(t){this._buffers=[];for(let n in this.binders){let o=this.binders[n];if(t&&o instanceof ca){let u=t.fromScale===2?o.zoomInPaintVertexBuffer:o.zoomOutPaintVertexBuffer;u&&this._buffers.push(u)}else(o instanceof Pr||o instanceof Vi)&&o.paintVertexBuffer&&this._buffers.push(o.paintVertexBuffer)}}upload(t){for(let n in this.binders){let o=this.binders[n];(o instanceof Pr||o instanceof Vi||o instanceof ca)&&o.upload(t)}this.updatePaintBuffers()}destroy(){for(let t in this.binders){let n=this.binders[t];(n instanceof Pr||n instanceof Vi||n instanceof ca)&&n.destroy()}}}class Ra{constructor(t,n,o=()=>!0){this.programConfigurations={};for(let u of t)this.programConfigurations[u.id]=new pu(u,n,o);this.needsUpload=!1,this._featureMap=new vs,this._bufferOffset=0}populatePaintArrays(t,n,o,u,f,m){for(let x in this.programConfigurations)this.programConfigurations[x].populatePaintArrays(t,n,u,f,m);n.id!==void 0&&this._featureMap.add(n.id,o,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,n,o,u){for(let f of o)this.needsUpload=this.programConfigurations[f.id].updatePaintArrays(t,this._featureMap,n,f,u)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(let n in this.programConfigurations)this.programConfigurations[n].upload(t);this.needsUpload=!1}}destroy(){for(let t in this.programConfigurations)this.programConfigurations[t].destroy()}}function mh(r,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":["ga
5pwidth"],"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"]}[r]||[r.replace(`${t}-`,"").replace(/-/g,"_")]}function fu(r,t,n){let o={color:{source:Ia,composite:v},number:{source:e,composite:Ia}},u=function(f){return{"line-pattern":{source:Ve,composite:Ve},"fill-pattern":{source:Ve,composite:Ve},"fill-extrusion-pattern":{source:Ve,composite:Ve}}[f]}(r);return u&&u[n]||o[t][n]}zt("ConstantBinder",ur),zt("CrossFadedConstantBinder",hr),zt("SourceExpressionBinder",Pr),zt("CrossFadedCompositeBinder",ca),zt("CompositeExpressionBinder",Vi),zt("ProgramConfiguration",pu,{omit:["_buffers"]}),zt("ProgramConfigurationSet",Ra);let yc=Math.pow(2,14)-1,ua=-yc-1;function ha(r){let t=Ye/r.extent,n=r.loadGeometry();for(let o=0;o<n.length;o++){let u=n[o];for(let f=0;f<u.length;f++){let m=u[f],x=Math.round(m.x*t),T=Math.round(m.y*t);m.x=xi(x,ua,yc),m.y=xi(T,ua,yc),(x<m.x||x>m.x+1||T<m.y||T>m.y+1)&&si("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return n}function da(r,t){return{type:r.type,id:r.id,properties:r.properties,geometry:t?ha(r):[]}}let _c=-32768;function vc(r,t,n,o,u){r.emplaceBack(_c+8*t+o,_c+8*n+u)}class wl{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(n=>n.id),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Se,this.indexArray=new pt,this.segments=new li,this.programConfigurations=new Ra(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(n=>n.isStateDependent()).map(n=>n.id)}populate(t,n,o){let u=this.layers[0],f=[],m=null,x=!1,T=u.type==="heatmap";if(u.type==="circle"){let A=u;m=A.layout.get("circle-sort-key"),x=!m.isConstant(),T=T||A.paint.get("circle-pitch-alignment")==="map"}let E=T?n.subdivisionGranularity.circle:1;for(let{feature:A,id:k,index:$,sourceLayerIndex:q}of t){let Y=this.layers[0]._featureFilter.needGeometry,Q=da(A,Y);if(!this.layers[0]._featureFilter.filter(new Wi(this.zoom),Q,o))continue;let oe=x?m.evaluate(Q,{},o):void 0,pe={id:k,properties:A.properties,type:A.type,sourceLayerIndex:q,index:$,geometry:Y?Q.geometry:ha(A),patterns:{},sortKey:oe};f.push(pe)}x&&f.sort((A,k)=>A.sortKey-k.sortKey);for(let A of f){let{geometry:k,index:$,sourceLayerIndex:q}=A,Y=t[$].feature;this.addFeature(A,k,$,o,E),n.featureIndex.insert(Y,k,$,q,this.index)}}update(t,n,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,n,this.stateDependentLayers,o)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Mi),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,n,o,u,f=1){let m;switch(f){case 1:m=[0,7];break;case 3:m=[0,2,5,7];break;case 5:m=[0,1,3,4,6,7];break;case 7:m=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${f}; valid values are 1, 3, 5, 7.`)}let x=m.length;for(let T of n)for(let E of T){let A=E.x,k=E.y;if(A<0||A>=Ye||k<0||k>=Ye)continue;let $=this.segments.prepareSegment(x*x,this.layoutVertexArray,this.indexArray,t.sortKey),q=$.vertexLength;for(let Y=0;Y<x;Y++)for(let Q=0;Q<x;Q++)vc(this.layoutVertexArray,A,k,m[Q],m[Y]);for(let Y=0;Y<x-1;Y++)for(let Q=0;Q<x-1;Q++){let oe=q+Y*x+Q,pe=q+(Y+1)*x+Q;this.indexArray.emplaceBack(oe,pe+1,oe+1),this.indexArray.emplaceBack(oe,pe,pe+1)}$.vertexLength+=x*x,$.primitiveLength+=(x-1)*(x-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,o,{},u)}}function Sl(r,t){for(let n=0;n<r.length;n++)if(Ho(t,r[n]))return!0;for(let n=0;n<t.length;n++)if(Ho(r,t[n]))return!0;return!!gh(r,t)}function t_(r,t,n){return!!Ho(r,t)||!!yh(t,r,n)}
vendor: 10,130 bytes, line 5
5function jd(r,t){if(r.length===1)return Vd(t,r[0]);for(let n=0;n<t.length;n++){let o=t[n];for(let u=0;u<o.length;u++)if(Ho(r,o[u]))return!0}for(let n=0;n<r.length;n++)if(Vd(t,r[n]))return!0;for(let n=0;n<t.length;n++)if(gh(r,t[n]))return!0;return!1}function i_(r,t,n){if(r.length>1){if(gh(r,t))return!0;for(let o=0;o<t.length;o++)if(yh(t[o],r,n))return!0}for(let o=0;o<r.length;o++)if(yh(r[o],t,n))return!0;return!1}function gh(r,t){if(r.length===0||t.length===0)return!1;for(let n=0;n<r.length-1;n++){let o=r[n],u=r[n+1];for(let f=0;f<t.length-1;f++)if(r_(o,u,t[f],t[f+1]))return!0}return!1}function r_(r,t,n,o){return Di(r,n,o)!==Di(t,n,o)&&Di(r,t,n)!==Di(r,t,o)}function yh(r,t,n){let o=n*n;if(t.length===1)return r.distSqr(t[0])<o;for(let u=1;u<t.length;u++)if($d(r,t[u-1],t[u])<o)return!0;return!1}function $d(r,t,n){let o=t.distSqr(n);if(o===0)return r.distSqr(t);let u=((r.x-t.x)*(n.x-t.x)+(r.y-t.y)*(n.y-t.y))/o;return r.distSqr(u<0?t:u>1?n:n.sub(t)._mult(u)._add(t))}function Vd(r,t){for(let n=0;n<r.length;n++)if(Ho(r[n],t))return!0;return!1}function Ho(r,t){let n=!1;for(let o=0,u=r.length-1;o<r.length;u=o++){let f=r[o],m=r[u];f.y>t.y!=m.y>t.y&&t.x<(m.x-f.x)*(t.y-f.y)/(m.y-f.y)+f.x&&(n=!n)}return n}function n_(r,t,n){let o=n[0],u=n[2];if(r.x<o.x&&t.x<o.x||r.x>u.x&&t.x>u.x||r.y<o.y&&t.y<o.y||r.y>u.y&&t.y>u.y)return!1;let f=Di(r,t,n[0]);return f!==Di(r,t,n[1])||f!==Di(r,t,n[2])||f!==Di(r,t,n[3])}function bc(r,t,n){let o=t.paint.get(r).value;return o.kind==="constant"?o.value:n.programConfigurations.get(t.id).getMaxValue(r)}function mu(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function gu(r,t,n,o,u){if(!t[0]&&!t[1])return r;let f=ne.convert(t)._mult(u);n==="viewport"&&f._rotate(-o);let m=[];for(let x=0;x<r.length;x++)m.push(r[x].sub(f));return m}let Ud,Gd;zt("CircleBucket",wl,{omit:["layers"]});var s_={get paint(){return Gd=Gd||new Tn({"circle-radius":new Wt(W.paint_circle["circle-radius"]),"circle-color":new Wt(W.paint_circle["circle-color"]),"circle-blur":new Wt(W.paint_circle["circle-blur"]),"circle-opacity":new Wt(W.paint_circle["circle-opacity"]),"circle-translate":new Ut(W.paint_circle["circle-translate"]),"circle-translate-anchor":new Ut(W.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Ut(W.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Ut(W.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Wt(W.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Wt(W.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Wt(W.paint_circle["circle-stroke-opacity"])})},get layout(){return Ud=Ud||new Tn({"circle-sort-key":new Wt(W.layout_circle["circle-sort-key"])})}};class a_ extends pn{constructor(t){super(t,s_)}createBucket(t){return new wl(t)}queryRadius(t){let n=t;return bc("circle-radius",this,n)+bc("circle-stroke-width",this,n)+mu(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:t,feature:n,featureState:o,geometry:u,transform:f,pixelsToTileUnits:m,unwrappedTileID:x,getElevation:T}){let E=gu(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-f.bearingInRadians,m),A=this.paint.get("circle-radius").evaluate(n,o)+this.paint.get("circle-stroke-width").evaluate(n,o),k=this.paint.get("circle-pitch-alignment")==="map",$=k?E:function(Y,Q,oe,pe){return Y.map(Ce=>Hd(Ce,Q,oe,pe))}(E,f,x,T),q=k?A*m:A;for(let Y of u)for(let Q of Y){let oe=k?Q:Hd(Q,f,x,T),pe=q,Ce=f.projectTileCoordinates(Q.x,Q.y,x,T).signedDistanceFromCamera;if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?pe*=Ce/f.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(pe*=f.cameraToCenterDistance/Ce),t_($,oe,pe))return!0}return!1}}function Hd(r,t,n,o){let u=t.projectTileCoordinates(r.x,r.y,n,o).point;return new ne((.5*u.x+.5)*t.width,(.5*-u.y+.5)*t.height)}class qd extends wl{}let Zd;zt("HeatmapBucket",qd,{omit:["layers"]});var o_={get paint(){return Zd=Zd||new Tn({"heatmap-radius":new Wt(W.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Wt(W.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ut(W.paint_heatmap["heatmap-intensity"]),"heatmap-color":new hc(W.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ut(W.paint_heatmap["heatmap-opacity"])})}};function _h(r,{width:t,height:n},o,u){if(u){if(u instanceof Uint8ClampedArray)u=new Uint8Array(u.buffer);else if(u.length!==t*n*o)throw new RangeError(`mismatched image size. expected: ${u.length} but got: ${t*n*o}`)}else u=new Uint8Array(t*n*o);return r.width=t,r.height=n,r.data=u,r}function Wd(r,{width:t,height:n},o){if(t===r.width&&n===r.height)return;let u=_h({},{width:t,height:n},o);vh(r,u,{x:0,y:0},{x:0,y:0},{width:Math.min(r.width,t),height:Math.min(r.height,n)},o),r.width=t,r.height=n,r.data=u.data}function vh(r,t,n,o,u,f){if(u.width===0||u.height===0)return t;if(u.width>r.width||u.height>r.height||n.x>r.width-u.width||n.y>r.height-u.height)throw new RangeError("out of range source coordinates for image copy");if(u.width>t.width||u.height>t.height||o.x>t.width-u.width||o.y>t.height-u.height)throw new RangeError("out of range destination coordinates for image copy");let m=r.data,x=t.data;if(m===x)throw new Error("srcData equals dstData, so image is already copied");for(let T=0;T<u.height;T++){let E=((n.y+T)*r.width+n.x)*f,A=((o.y+T)*t.width+o.x)*f;for(let k=0;k<u.width*f;k++)x[A+k]=m[E+k]}return t}class xc{constructor(t,n){_h(this,t,1,n)}resize(t){Wd(this,t,1)}clone(){return new xc({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,n,o,u,f){vh(t,n,o,u,f,1)}}class ts{constructor(t,n){_h(this,t,4,n)}resize(t){Wd(this,t,4)}replace(t,n){n?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t}clone(){return new ts({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,n,o,u,f){vh(t,n,o,u,f,4)}}function Xd(r){let t={},n=r.resolution||256,o=r.clips?r.clips.length:1,u=r.image||new ts({width:n,height:o});if(Math.log(n)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${n}`);let f=(m,x,T)=>{t[r.evaluationKey]=T;let E=r.expression.evaluate(t);u.data[m+x+0]=Math.floor(255*E.r/E.a),u.data[m+x+1]=Math.floor(255*E.g/E.a),u.data[m+x+2]=Math.floor(255*E.b/E.a),u.data[m+x+3]=Math.floor(255*E.a)};if(r.clips)for(let m=0,x=0;m<o;++m,x+=4*n)for(let T=0,E=0;T<n;T++,E+=4){let A=T/(n-1),{start:k,end:$}=r.clips[m];f(x,E,k*(1-A)+$*A)}else for(let m=0,x=0;m<n;m++,x+=4)f(0,x,m/(n-1));return u}zt("AlphaImage",xc),zt("RGBAImage",ts);let bh="big-fb";class l_ extends pn{createBucket(t){return new qd(t)}constructor(t){super(t,o_),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(t){t==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Xd({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(bh)&&this.heatmapFbos.delete(bh)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let Yd;var c_={get paint(){return Yd=Yd||new Tn({"hillshade-illumination-direction":new Ut(W.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Ut(W.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Ut(W.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Ut(W.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Ut(W.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Ut(W.paint_hillshade["hillshade-accent-color"])})}};class u_ extends pn{constructor(t){super(t,c_)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}let h_=_r([{name:"a_pos",components:2,type:"Int16"}],4),{members:d_}=h_;function xh(r,t,n){let o=n.patternDependencies,u=!1;for(let f of t){let m=f.paint.get(`${r}-pattern`);m.isConstant()||(u=!0);let x=m.constantOr(null);x&&(u=!0,o[x.to]=!0,o[x.from]=!0)}return u}function wh(r,t,n,o,u){let f=u.patternDependencies;for(let m of t){let x=m.paint.get(`${r}-pattern`).value;if(x.kind!=="constant"){let T=x.evaluate({zoom:o-1},n,{},u.availableImages),E=x.evaluate({zoom:o},n,{},u.availableImages),A=x.evaluate({zoom:o+1},n,{},u.availableImages);T=T&&T.name?T.name:T,E=E&&E.name?E.name:E,A=A&&A.name?A.name:A,f[T]=!0,f[E]=!0,f[A]=!0,n.patterns[m.id]={min:T,mid:E,max:A}}}return n}function Kd(r,t,n,o,u){let f;if(u===function(m,x,T,E){let A=0;for(let k=x,$=T-E;k<T;k+=E)A+=(m[$]-m[k])*(m[k+1]+m[$+1]),$=k;return A}(r,t,n,o)>0)for(let m=t;m<n;m+=o)f=tp(m/o|0,r[m],r[m+1],f);else for(let m=n-o;m>=t;m-=o)f=tp(m/o|0,r[m],r[m+1],f);return f&&Tl(f,f.next)&&(Pc(f),f=f.next),f}function qo(r,t){if(!r)return r;t||(t=r);let n,o=r;do if(n=!1,o.steiner||!Tl(o,o.next)&&wr(o.prev,o,o.next)!==0)o=o.next;else{if(Pc(o),o=t=o.prev,o===o.next)break;n=!0}while(n||o!==t);return t}function wc(r,t,n,o,u,f,m){if(!r)return;!m&&f&&function(T,E,A,k){let $=T;do $.z===0&&($.z=Sh($.x,$.y,E,A,k)),$.prevZ=$.prev,$.nextZ=$.next,$=$.next;while($!==T);$.prevZ.nextZ=null,$.prevZ=null,function(q){let Y,Q=1;do{let oe,pe=q;q=null;let Ce=null;for(Y=0;pe;){Y++;let ye=pe,G=0;for(let be=0;be<Q&&(G++,ye=ye.nextZ,ye);be++);let se=Q;for(;G>0||se>0&&ye;)G!==0&&(se===0||!ye||pe.z<=ye.z)?(oe=pe,pe=pe.nextZ,G--):(oe=ye,ye=ye.nextZ,se--),Ce?Ce.nextZ=oe:q=oe,oe.prevZ=Ce,Ce=oe;pe=ye}Ce.nextZ=null,Q*=2}while(Y>1)}($)}(r,o,u,f);let x=r;for(;r.prev!==r.next;){let T=r.prev,E=r.next;if(f?f_(r,o,u,f):p_(r))t.push(T.i,r.i,E.i),Pc(r),r=E.next,x=E.next;else if((r=E)===x){m?m===1?wc(r=m_(qo(r),t),t,n,o,u,f,2):m===2&&g_(r,t,n,o,u,f):wc(qo(r),t,n,o,u,f,1);break}}}function p_(r){let t=r.prev,n=r,o=r.next;if(wr(t,n,o)>=0)return!1;let u=t.x,f=n.x,m=o.x,x=t.y,T=n.y,E=o.y,A=Math.min(u,f,m),k=Math.min(x,T,E),$=Math.max(u,f,m),q=Math.max(x,T,E),Y=o.next;for(;Y!==t;){if(Y.x>=A&&Y.x<=$&&Y.y>=k&&Y.y<=q&&Sc(u,x,f,T,m,E,Y.x,Y.y)&&wr(Y.prev,Y,Y.next)>=0)return!1;Y=Y.next}return!0}
vendor: 1,235 bytes, line 5
5function f_(r,t,n,o){let u=r.prev,f=r,m=r.next;if(wr(u,f,m)>=0)return!1;let x=u.x,T=f.x,E=m.x,A=u.y,k=f.y,$=m.y,q=Math.min(x,T,E),Y=Math.min(A,k,$),Q=Math.max(x,T,E),oe=Math.max(A,k,$),pe=Sh(q,Y,t,n,o),Ce=Sh(Q,oe,t,n,o),ye=r.prevZ,G=r.nextZ;for(;ye&&ye.z>=pe&&G&&G.z<=Ce;){if(ye.x>=q&&ye.x<=Q&&ye.y>=Y&&ye.y<=oe&&ye!==u&&ye!==m&&Sc(x,A,T,k,E,$,ye.x,ye.y)&&wr(ye.prev,ye,ye.next)>=0||(ye=ye.prevZ,G.x>=q&&G.x<=Q&&G.y>=Y&&G.y<=oe&&G!==u&&G!==m&&Sc(x,A,T,k,E,$,G.x,G.y)&&wr(G.prev,G,G.next)>=0))return!1;G=G.nextZ}for(;ye&&ye.z>=pe;){if(ye.x>=q&&ye.x<=Q&&ye.y>=Y&&ye.y<=oe&&ye!==u&&ye!==m&&Sc(x,A,T,k,E,$,ye.x,ye.y)&&wr(ye.prev,ye,ye.next)>=0)return!1;ye=ye.prevZ}for(;G&&G.z<=Ce;){if(G.x>=q&&G.x<=Q&&G.y>=Y&&G.y<=oe&&G!==u&&G!==m&&Sc(x,A,T,k,E,$,G.x,G.y)&&wr(G.prev,G,G.next)>=0)return!1;G=G.nextZ}return!0}function m_(r,t){let n=r;do{let o=n.prev,u=n.next.next;!Tl(o,u)&&Qd(o,n,n.next,u)&&Tc(o,u)&&Tc(u,o)&&(t.push(o.i,n.i,u.i),Pc(n),Pc(n.next),n=r=u),n=n.next}while(n!==r);return qo(n)}function g_(r,t,n,o,u,f){let m=r;do{let x=m.next.next;for(;x!==m.prev;){if(m.i!==x.i&&x_(m,x)){let T=ep(m,x);return m=qo(m,m.next),T=qo(T,T.next),wc(m,t,n,o,u,f,0),void wc(T,t,n,o,u,f,0)}x=x.next}m=m.next}while(m!==r)}function y_(r,t){let n=r.x-t.x;
vendor: 9,561 bytes, line 5
5return n===0&&(n=r.y-t.y,n===0)&&(n=(r.next.y-r.y)/(r.next.x-r.x)-(t.next.y-t.y)/(t.next.x-t.x)),n}function __(r,t){let n=function(u,f){let m=f,x=u.x,T=u.y,E,A=-1/0;if(Tl(u,m))return m;do{if(Tl(u,m.next))return m.next;if(T<=m.y&&T>=m.next.y&&m.next.y!==m.y){let Q=m.x+(T-m.y)*(m.next.x-m.x)/(m.next.y-m.y);if(Q<=x&&Q>A&&(A=Q,E=m.x<m.next.x?m:m.next,Q===x))return E}m=m.next}while(m!==f);if(!E)return null;let k=E,$=E.x,q=E.y,Y=1/0;m=E;do{if(x>=m.x&&m.x>=$&&x!==m.x&&Jd(T<q?x:A,T,$,q,T<q?A:x,T,m.x,m.y)){let Q=Math.abs(T-m.y)/(x-m.x);Tc(m,u)&&(Q<Y||Q===Y&&(m.x>E.x||m.x===E.x&&v_(E,m)))&&(E=m,Y=Q)}m=m.next}while(m!==k);return E}(r,t);if(!n)return t;let o=ep(n,r);return qo(o,o.next),qo(n,n.next)}function v_(r,t){return wr(r.prev,r,t.prev)<0&&wr(t.next,r,r.next)<0}function Sh(r,t,n,o,u){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r=(r-n)*u|0)|r<<8))|r<<4))|r<<2))|r<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-o)*u|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function b_(r){let t=r,n=r;do(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next;while(t!==r);return n}function Jd(r,t,n,o,u,f,m,x){return(u-m)*(t-x)>=(r-m)*(f-x)&&(r-m)*(o-x)>=(n-m)*(t-x)&&(n-m)*(f-x)>=(u-m)*(o-x)}function Sc(r,t,n,o,u,f,m,x){return!(r===m&&t===x)&&Jd(r,t,n,o,u,f,m,x)}function x_(r,t){return r.next.i!==t.i&&r.prev.i!==t.i&&!function(n,o){let u=n;do{if(u.i!==n.i&&u.next.i!==n.i&&u.i!==o.i&&u.next.i!==o.i&&Qd(u,u.next,n,o))return!0;u=u.next}while(u!==n);return!1}(r,t)&&(Tc(r,t)&&Tc(t,r)&&function(n,o){let u=n,f=!1,m=(n.x+o.x)/2,x=(n.y+o.y)/2;do u.y>x!=u.next.y>x&&u.next.y!==u.y&&m<(u.next.x-u.x)*(x-u.y)/(u.next.y-u.y)+u.x&&(f=!f),u=u.next;while(u!==n);return f}(r,t)&&(wr(r.prev,r,t.prev)||wr(r,t.prev,t))||Tl(r,t)&&wr(r.prev,r,r.next)>0&&wr(t.prev,t,t.next)>0)}function wr(r,t,n){return(t.y-r.y)*(n.x-t.x)-(t.x-r.x)*(n.y-t.y)}function Tl(r,t){return r.x===t.x&&r.y===t.y}function Qd(r,t,n,o){let u=_u(wr(r,t,n)),f=_u(wr(r,t,o)),m=_u(wr(n,o,r)),x=_u(wr(n,o,t));return u!==f&&m!==x||!(u!==0||!yu(r,n,t))||!(f!==0||!yu(r,o,t))||!(m!==0||!yu(n,r,o))||!(x!==0||!yu(n,t,o))}function yu(r,t,n){return t.x<=Math.max(r.x,n.x)&&t.x>=Math.min(r.x,n.x)&&t.y<=Math.max(r.y,n.y)&&t.y>=Math.min(r.y,n.y)}function _u(r){return r>0?1:r<0?-1:0}function Tc(r,t){return wr(r.prev,r,r.next)<0?wr(r,t,r.next)>=0&&wr(r,r.prev,t)>=0:wr(r,t,r.prev)<0||wr(r,r.next,t)<0}function ep(r,t){let n=Th(r.i,r.x,r.y),o=Th(t.i,t.x,t.y),u=r.next,f=t.prev;return r.next=t,t.prev=r,n.next=u,u.prev=n,o.next=n,n.prev=o,f.next=o,o.prev=f,o}function tp(r,t,n,o){let u=Th(r,t,n);return o?(u.next=o.next,u.prev=o,o.next.prev=u,o.next=u):(u.prev=u,u.next=u),u}function Pc(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Th(r,t,n){return{i:r,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class Pl{constructor(t,n){if(n>t)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=t,this._minGranularity=n}getGranularityForZoomLevel(t){return Math.max(Math.floor(this._baseZoomGranularity/(1<<t)),this._minGranularity,1)}}class vu{constructor(t){this.fill=t.fill,this.line=t.line,this.tile=t.tile,this.stencil=t.stencil,this.circle=t.circle}}vu.noSubdivision=new vu({fill:new Pl(0,0),line:new Pl(0,0),tile:new Pl(0,0),stencil:new Pl(0,0),circle:1}),zt("SubdivisionGranularityExpression",Pl),zt("SubdivisionGranularitySetting",vu);let El=-32768,Ec=32767;class w_{constructor(t,n){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=t,this._granularityCellSize=Ye/t,this._canonical=n}_getKey(t,n){return(t+=32768)<<16|(n+=32768)<<0}_vertexToIndex(t,n){if(t<-32768||n<-32768||t>32767||n>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let o=0|Math.round(t),u=0|Math.round(n),f=this._getKey(o,u);if(this._vertexDictionary.has(f))return this._vertexDictionary.get(f);let m=this._vertexBuffer.length/2;return this._vertexDictionary.set(f,m),this._vertexBuffer.push(o,u),m}_subdivideTrianglesScanline(t){if(this._granularity<2)return function(u,f){let m=[];for(let x=0;x<f.length;x+=3){let T=f[x],E=f[x+1],A=f[x+2],k=u[2*T],$=u[2*T+1];(u[2*E]-k)*(u[2*A+1]-$)-(u[2*E+1]-$)*(u[2*A]-k)>0?(m.push(T),m.push(A),m.push(E)):(m.push(T),m.push(E),m.push(A))}return m}(this._vertexBuffer,t);let n=[],o=t.length;for(let u=0;u<o;u+=3){let f=[t[u+0],t[u+1],t[u+2]],m=[this._vertexBuffer[2*t[u+0]+0],this._vertexBuffer[2*t[u+0]+1],this._vertexBuffer[2*t[u+1]+0],this._vertexBuffer[2*t[u+1]+1],this._vertexBuffer[2*t[u+2]+0],this._vertexBuffer[2*t[u+2]+1]],x=1/0,T=1/0,E=-1/0,A=-1/0;for(let Q=0;Q<3;Q++){let oe=m[2*Q],pe=m[2*Q+1];x=Math.min(x,oe),E=Math.max(E,oe),T=Math.min(T,pe),A=Math.max(A,pe)}if(x===E||T===A)continue;let k=Math.floor(x/this._granularityCellSize),$=Math.ceil(E/this._granularityCellSize),q=Math.floor(T/this._granularityCellSize),Y=Math.ceil(A/this._granularityCellSize);if(k!==$||q!==Y)for(let Q=q;Q<Y;Q++){let oe=this._scanlineGenerateVertexRingForCellRow(Q,m,f);S_(this._vertexBuffer,oe,n)}else n.push(...f)}return n}_scanlineGenerateVertexRingForCellRow(t,n,o){let u=t*this._granularityCellSize,f=u+this._granularityCellSize,m=[];for(let x=0;x<3;x++){let T=n[2*x],E=n[2*x+1],A=n[2*(x+1)%6],k=n[(2*(x+1)+1)%6],$=n[2*(x+2)%6],q=n[(2*(x+2)+1)%6],Y=A-T,Q=k-E,oe=Y===0,pe=Q===0,Ce=(u-E)/Q,ye=(f-E)/Q,G=Math.min(Ce,ye),se=Math.max(Ce,ye);if(!pe&&(G>=1||se<=0)||pe&&(E<u||E>f)){k>=u&&k<=f&&m.push(o[(x+1)%3]);continue}!pe&&G>0&&m.push(this._vertexToIndex(T+Y*G,E+Q*G));let be=T+Y*Math.max(G,0),Ge=T+Y*Math.min(se,1);oe||this._generateIntraEdgeVertices(m,T,E,A,k,be,Ge),!pe&&se<1&&m.push(this._vertexToIndex(T+Y*se,E+Q*se)),(pe||k>=u&&k<=f)&&m.push(o[(x+1)%3]),!pe&&(k<=u||k>=f)&&this._generateInterEdgeVertices(m,T,E,A,k,$,q,Ge,u,f)}return m}_generateIntraEdgeVertices(t,n,o,u,f,m,x){let T=u-n,E=f-o,A=E===0,k=A?Math.min(n,u):Math.min(m,x),$=A?Math.max(n,u):Math.max(m,x),q=Math.floor(k/this._granularityCellSize)+1,Y=Math.ceil($/this._granularityCellSize)-1;if(A?n<u:m<x)for(let Q=q;Q<=Y;Q++){let oe=Q*this._granularityCellSize;t.push(this._vertexToIndex(oe,o+E*(oe-n)/T))}else for(let Q=Y;Q>=q;Q--){let oe=Q*this._granularityCellSize;t.push(this._vertexToIndex(oe,o+E*(oe-n)/T))}}_generateInterEdgeVertices(t,n,o,u,f,m,x,T,E,A){let k=f-o,$=m-u,q=x-f,Y=(E-f)/q,Q=(A-f)/q,oe=Math.min(Y,Q),pe=Math.max(Y,Q),Ce=u+$*oe,ye=Math.floor(Math.min(Ce,T)/this._granularityCellSize)+1,G=Math.ceil(Math.max(Ce,T)/this._granularityCellSize)-1,se=T<Ce,be=q===0;if(be&&(x===E||x===A))return;if(be||oe>=1||pe<=0){let mt=o-x,Ke=m+(n-m)*Math.min((E-x)/mt,(A-x)/mt);ye=Math.floor(Math.min(Ke,T)/this._granularityCellSize)+1,G=Math.ceil(Math.max(Ke,T)/this._granularityCellSize)-1,se=T<Ke}let Ge=k>0?A:E;if(se)for(let mt=ye;mt<=G;mt++)t.push(this._vertexToIndex(mt*this._granularityCellSize,Ge));else for(let mt=G;mt>=ye;mt--)t.push(this._vertexToIndex(mt*this._granularityCellSize,Ge))}_generateOutline(t){let n=[];for(let o of t){let u=Zo(o,this._granularity,!0),f=this._pointArrayToIndices(u),m=[];for(let x=1;x<f.length;x++)m.push(f[x-1]),m.push(f[x]);n.push(m)}return n}_handlePoles(t){let n=!1,o=!1;this._canonical&&(this._canonical.y===0&&(n=!0),this._canonical.y===(1<<this._canonical.z)-1&&(o=!0)),(n||o)&&this._fillPoles(t,n,o)}_ensureNoPoleVertices(){let t=this._vertexBuffer;for(let n=0;n<t.length;n+=2){let o=t[n+1];o===El&&(t[n+1]=-32767),o===Ec&&(t[n+1]=32766)}}_generatePoleQuad(t,n,o,u,f,m){u>f!=(m===El)?(t.push(n),t.push(o),t.push(this._vertexToIndex(u,m)),t.push(o),t.push(this._vertexToIndex(f,m)),t.push(this._vertexToIndex(u,m))):(t.push(o),t.push(n),t.push(this._vertexToIndex(u,m)),t.push(this._vertexToIndex(f,m)),t.push(o),t.push(this._vertexToIndex(u,m)))}_fillPoles(t,n,o){let u=this._vertexBuffer,f=Ye,m=t.length;for(let x=2;x<m;x+=3){let T=t[x-2],E=t[x-1],A=t[x],k=u[2*T],$=u[2*T+1],q=u[2*E],Y=u[2*E+1],Q=u[2*A],oe=u[2*A+1];n&&($===0&&Y===0&&this._generatePoleQuad(t,T,E,k,q,El),Y===0&&oe===0&&this._generatePoleQuad(t,E,A,q,Q,El),oe===0&&$===0&&this._generatePoleQuad(t,A,T,Q,k,El)),o&&($===f&&Y===f&&this._generatePoleQuad(t,T,E,k,q,Ec),Y===f&&oe===f&&this._generatePoleQuad(t,E,A,q,Q,Ec),oe===f&&$===f&&this._generatePoleQuad(t,A,T,Q,k,Ec))}}_initializeVertices(t){for(let n=0;n<t.length;n+=2)this._vertexToIndex(t[n],t[n+1])}subdividePolygonInternal(t,n){if(this._used)throw new Error("Subdivision: multiple use not allowed.");this._used=!0;let{flattened:o,holeIndices:u}=function(x){let T=[],E=[];for(let A of x)if(A.length!==0){A!==x[0]&&T.push(E.length/2);for(let k=0;k<A.length;k++)E.push(A[k].x),E.push(A[k].y)}return{flattened:E,holeIndices:T}}(t),f;this._initializeVertices(o);try{let x=function(E,A,k=2){let $=A&&A.length,q=$?A[0]*k:E.length,Y=Kd(E,0,q,k,!0),Q=[];if(!Y||Y.next===Y.prev)return Q;let oe,pe,Ce;if($&&(Y=function(ye,G,se,be){let Ge=[];for(let mt=0,Ke=G.length;mt<Ke;mt++){let nt=Kd(ye,G[mt]*be,mt<Ke-1?G[mt+1]*be:ye.length,be,!1);nt===nt.next&&(nt.steiner=!0),Ge.push(b_(nt))}Ge.sort(y_);for(let mt=0;mt<Ge.length;mt++)se=__(Ge[mt],se);return se}(E,A,Y,k)),E.length>80*k){oe=1/0,pe=1/0;let ye=-1/0,G=-1/0;for(let se=k;se<q;se+=k){let be=E[se],Ge=E[se+1];be<oe&&(oe=be),Ge<pe&&(pe=Ge),be>ye&&(ye=be),Ge>G&&(G=Ge)}Ce=Math.max(ye-oe,G-pe),Ce=Ce!==0?32767/Ce:0}return wc(Y,Q,k,oe,pe,Ce,0),Q}(o,u),T=this._convertIndices(o,x);f=this._subdivideTrianglesScanline(T)}catch(x){console.error(x)}let m=[];return n&&(m=this._generateOutline(t)),this._ensureNoPoleVertices(),this._handlePoles(f),{verticesFlattened:this._vertexBuffer,indicesTriangles:f,indicesLineList:m}}
5_convertIndices(t,n){let o=[];for(let u=0;u<n.length;u++)o.push(this._vertexToIndex(t[2*n[u]],t[2*n[u]+1]));return o}_pointArrayToIndices(t){let n=[];for(let o=0;o<t.length;o++){let u=t[o];n.push(this._vertexToIndex(u.x,u.y))}return n}}function ip(r,t,n,o=!0){return new w_(n,t).subdividePolygonInternal(r,o)}function Zo(r,t,n=!1){if(!r||r.length<1)return[];if(r.length<2)return[];let o=r[0],u=r[r.length-1],f=n&&(o.x!==u.x||o.y!==u.y);if(t<2)return f?[...r,r[0]]:[...r];let m=Math.floor(Ye/t),x=[];x.push(new ne(r[0].x,r[0].y));let T=r.length,E=f?T:T-1;for(let A=0;A<E;A++){let k=r[A],$=A<T-1?r[A+1]:r[0],q=k.x,Y=k.y,Q=$.x,oe=$.y,pe=q!==Q,Ce=Y!==oe;if(!pe&&!Ce)continue;let ye=Q-q,G=oe-Y,se=Math.abs(ye),be=Math.abs(G),Ge=q,mt=Y;for(;;){let nt=ye>0?(Math.floor(Ge/m)+1)*m:(Math.ceil(Ge/m)-1)*m,vt=G>0?(Math.floor(mt/m)+1)*m:(Math.ceil(mt/m)-1)*m,gt=Math.abs(Ge-nt),St=Math.abs(mt-vt),ct=Math.abs(Ge-Q),Ft=Math.abs(mt-oe),Zt=pe?gt/se:Number.POSITIVE_INFINITY,Gt=Ce?St/be:Number.POSITIVE_INFINITY;if((ct<=gt||!pe)&&(Ft<=St||!Ce))break;if(Zt<Gt&&pe||!Ce){Ge=nt,mt+=G*Zt;let $t=new ne(Ge,Math.round(mt));x[x.length-1].x===$t.x&&x[x.length-1].y===$t.y||x.push($t)}else{Ge+=ye*Gt,mt=vt;let $t=new ne(Math.round(Ge),mt);x[x.length-1].x===$t.x&&x[x.length-1].y===$t.y||x.push($t)}}let Ke=new ne(Q,oe);x[x.length-1].x===Ke.x&&x[x.length-1].y===Ke.y||x.push(Ke)}return x}function S_(r,t,n){if(t.length===0)throw new Error("Subdivision vertex ring is empty.");let o=0,u=r[2*t[0]];for(let T=1;T<t.length;T++){let E=r[2*t[T]];E<u&&(u=E,o=T)}let f=t.length,m=o,x=(m+1)%f;for(;;){let T=m-1>=0?m-1:f-1,E=(x+1)%f,A=r[2*t[T]],k=r[2*t[E]],$=r[2*t[m]],q=r[2*t[m]+1],Y=r[2*t[x]+1],Q=!1;if(A<k)Q=!0;else if(A>k)Q=!1;else{let oe=Y-q,pe=-(r[2*t[x]]-$),Ce=q<Y?1:-1;((A-$)*oe+(r[2*t[T]+1]-q)*pe)*Ce>((k-$)*oe+(r[2*t[E]+1]-q)*pe)*Ce&&(Q=!0)}if(Q){let oe=t[T],pe=t[m],Ce=t[x];oe!==pe&&oe!==Ce&&pe!==Ce&&n.push(Ce,pe,oe),m--,m<0&&(m=f-1)}else{let oe=t[E],pe=t[m],Ce=t[x];oe!==pe&&oe!==Ce&&pe!==Ce&&n.push(Ce,pe,oe),x++,x>=f&&(x=0)}if(T===E)break}}function rp(r,t,n,o,u,f,m,x,T){let E=u.length/2,A=m&&x&&T;if(E<li.MAX_VERTEX_ARRAY_LENGTH){let k=t.prepareSegment(E,n,o),$=k.vertexLength;for(let Q=0;Q<f.length;Q+=3)o.emplaceBack($+f[Q],$+f[Q+1],$+f[Q+2]);let q,Y;k.vertexLength+=E,k.primitiveLength+=f.length/3,A&&(Y=m.prepareSegment(E,n,x),q=Y.vertexLength,Y.vertexLength+=E);for(let Q=0;Q<u.length;Q+=2)r(u[Q],u[Q+1]);if(A)for(let Q=0;Q<T.length;Q++){let oe=T[Q];for(let pe=1;pe<oe.length;pe+=2)x.emplaceBack(q+oe[pe-1],q+oe[pe]);Y.primitiveLength+=oe.length/2}}else(function(k,$,q,Y,Q,oe){let pe=[];for(let be=0;be<Y.length/2;be++)pe.push(-1);let Ce={count:0},ye=0,G=k.getOrCreateLatestSegment($,q),se=G.vertexLength;for(let be=2;be<Q.length;be+=3){let Ge=Q[be-2],mt=Q[be-1],Ke=Q[be],nt=pe[Ge]<ye,vt=pe[mt]<ye,gt=pe[Ke]<ye;G.vertexLength+((nt?1:0)+(vt?1:0)+(gt?1:0))>li.MAX_VERTEX_ARRAY_LENGTH&&(G=k.createNewSegment($,q),ye=Ce.count,nt=!0,vt=!0,gt=!0,se=0);let St=Mc(pe,Y,oe,Ce,Ge,nt,G),ct=Mc(pe,Y,oe,Ce,mt,vt,G),Ft=Mc(pe,Y,oe,Ce,Ke,gt,G);q.emplaceBack(se+St-ye,se+ct-ye,se+Ft-ye),G.primitiveLength++}})(t,n,o,u,f,r),A&&function(k,$,q,Y,Q,oe){let pe=[];for(let be=0;be<Y.length/2;be++)pe.push(-1);let Ce={count:0},ye=0,G=k.getOrCreateLatestSegment($,q),se=G.vertexLength;for(let be=0;be<Q.length;be++){let Ge=Q[be];for(let mt=1;mt<Q[be].length;mt+=2){let Ke=Ge[mt-1],nt=Ge[mt],vt=pe[Ke]<ye,gt=pe[nt]<ye;G.vertexLength+((vt?1:0)+(gt?1:0))>li.MAX_VERTEX_ARRAY_LENGTH&&(G=k.createNewSegment($,q),ye=Ce.count,vt=!0,gt=!0,se=0);let St=Mc(pe,Y,oe,Ce,Ke,vt,G),ct=Mc(pe,Y,oe,Ce,nt,gt,G);q.emplaceBack(se+St-ye,se+ct-ye),G.primitiveLength++}}}(m,n,x,u,T,r),t.forceNewSegmentOnNextPrepare(),m?.forceNewSegmentOnNextPrepare()}function Mc(r,t,n,o,u,f,m){if(f){let x=o.count;return n(t[2*u],t[2*u+1]),r[u]=o.count,o.count++,m.vertexLength++,x}return r[u]}class Ph{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(n=>n.id),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Pe,this.indexArray=new pt,this.indexArray2=new Nt,this.programConfigurations=new Ra(t.layers,t.zoom),this.segments=new li,this.segments2=new li,this.stateDependentLayerIds=this.layers.filter(n=>n.isStateDependent()).map(n=>n.id)}populate(t,n,o){this.hasPattern=xh("fill",this.layers,n);let u=this.layers[0].layout.get("fill-sort-key"),f=!u.isConstant(),m=[];for(let{feature:x,id:T,index:E,sourceLayerIndex:A}of t){let k=this.layers[0]._featureFilter.needGeometry,$=da(x,k);if(!this.layers[0]._featureFilter.filter(new Wi(this.zoom),$,o))continue;let q=f?u.evaluate($,{},o,n.availableImages):void 0,Y={id:T,properties:x.properties,type:x.type,sourceLayerIndex:A,index:E,geometry:k?$.geometry:ha(x),patterns:{},sortKey:q};m.push(Y)}f&&m.sort((x,T)=>x.sortKey-T.sortKey);for(let x of m){let{geometry:T,index:E,sourceLayerIndex:A}=x;if(this.hasPattern){let k=wh("fill",this.layers,x,this.zoom,n);this.patternFeatures.push(k)}else this.addFeature(x,T,E,o,{},n.subdivisionGranularity);n.featureIndex.insert(t[E].feature,T,E,A,this.index)}}update(t,n,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,n,this.stateDependentLayers,o)}addFeatures(t,n,o){for(let u of this.patternFeatures)this.addFeature(u,u.geometry,u.index,n,o,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,d_),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(t,n,o,u,f,m){for(let x of Sa(n,500)){let T=ip(x,u,m.fill.getGranularityForZoomLevel(u.z)),E=this.layoutVertexArray;rp((A,k)=>{E.emplaceBack(A,k)},this.segments,this.layoutVertexArray,this.indexArray,T.verticesFlattened,T.indicesTriangles,this.segments2,this.indexArray2,T.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,o,f,u)}}let np,sp;zt("FillBucket",Ph,{omit:["layers","patternFeatures"]});var T_={get paint(){return sp=sp||new Tn({"fill-antialias":new Ut(W.paint_fill["fill-antialias"]),"fill-opacity":new Wt(W.paint_fill["fill-opacity"]),"fill-color":new Wt(W.paint_fill["fill-color"]),"fill-outline-color":new Wt(W.paint_fill["fill-outline-color"]),"fill-translate":new Ut(W.paint_fill["fill-translate"]),"fill-translate-anchor":new Ut(W.paint_fill["fill-translate-anchor"]),"fill-pattern":new _l(W.paint_fill["fill-pattern"])})},get layout(){return np=np||new Tn({"fill-sort-key":new Wt(W.layout_fill["fill-sort-key"])})}};class P_ extends pn{constructor(t){super(t,T_)}
5recalculate(t,n){super.recalculate(t,n);let o=this.paint._values["fill-outline-color"];o.value.kind==="constant"&&o.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new Ph(t)}queryRadius(){return mu(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:n,transform:o,pixelsToTileUnits:u}){return jd(gu(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-o.bearingInRadians,u),n)}isTileClipped(){return!0}}let E_=_r([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),M_=_r([{name:"a_centroid",components:2,type:"Int16"}],4),{members:C_}=E_;var Eh,ap,Mh,op,Ch,lp,cp,bu={};function up(){if(ap)return Eh;ap=1;var r=B();function t(u,f,m,x,T){this.properties={},this.extent=m,this.type=0,this._pbf=u,this._geometry=-1,this._keys=x,this._values=T,u.readFields(n,this,f)}function n(u,f,m){u==1?f.id=m.readVarint():u==2?function(x,T){for(var E=x.readVarint()+x.pos;x.pos<E;){var A=T._keys[x.readVarint()],k=T._values[x.readVarint()];T.properties[A]=k}}(m,f):u==3?f.type=m.readVarint():u==4&&(f._geometry=m.pos)}function o(u){for(var f,m,x=0,T=0,E=u.length,A=E-1;T<E;A=T++)x+=((m=u[A]).x-(f=u[T]).x)*(f.y+m.y);return x}return Eh=t,t.types=["Unknown","Point","LineString","Polygon"],t.prototype.loadGeometry=function(){var u=this._pbf;u.pos=this._geometry;for(var f,m=u.readVarint()+u.pos,x=1,T=0,E=0,A=0,k=[];u.pos<m;){if(T<=0){var $=u.readVarint();x=7&$,T=$>>3}if(T--,x===1||x===2)E+=u.readSVarint(),A+=u.readSVarint(),x===1&&(f&&k.push(f),f=[]),f.push(new r(E,A));else{if(x!==7)throw new Error("unknown command "+x);f&&f.push(f[0].clone())}}return f&&k.push(f),k},t.prototype.bbox=function(){var u=this._pbf;u.pos=this._geometry;for(var f=u.readVarint()+u.pos,m=1,x=0,T=0,E=0,A=1/0,k=-1/0,$=1/0,q=-1/0;u.pos<f;){if(x<=0){var Y=u.readVarint();m=7&Y,x=Y>>3}if(x--,m===1||m===2)(T+=u.readSVarint())<A&&(A=T),T>k&&(k=T),(E+=u.readSVarint())<$&&($=E),E>q&&(q=E);else if(m!==7)throw new Error("unknown command "+m)}return[A,$,k,q]},t.prototype.toGeoJSON=function(u,f,m){var x,T,E=this.extent*Math.pow(2,m),A=this.extent*u,k=this.extent*f,$=this.loadGeometry(),q=t.types[this.type];function Y(pe){for(var Ce=0;Ce<pe.length;Ce++){var ye=pe[Ce];pe[Ce]=[360*(ye.x+A)/E-180,360/Math.PI*Math.atan(Math.exp((180-360*(ye.y+k)/E)*Math.PI/180))-90]}}switch(this.type){case 1:var Q=[];for(x=0;x<$.length;x++)Q[x]=$[x][0];Y($=Q);break;case 2:for(x=0;x<$.length;x++)Y($[x]);break;case 3:for($=function(pe){var Ce=pe.length;if(Ce<=1)return[pe];for(var ye,G,se=[],be=0;be<Ce;be++){var Ge=o(pe[be]);Ge!==0&&(G===void 0&&(G=Ge<0),G===Ge<0?(ye&&se.push(ye),ye=[pe[be]]):ye.push(pe[be]))}return ye&&se.push(ye),se}($),x=0;x<$.length;x++)for(T=0;T<$[x].length;T++)Y($[x][T])}$.length===1?$=$[0]:q="Multi"+q;var oe={type:"Feature",geometry:{type:q,coordinates:$},properties:this.properties};return"id"in this&&(oe.id=this.id),oe},Eh}function hp(){if(op)return Mh;op=1;var r=up();function t(o,u){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=o,this._keys=[],this._values=[],this._features=[],o.readFields(n,this,u),this.length=this._features.length}function n(o,u,f){o===15?u.version=f.readVarint():o===1?u.name=f.readString():o===5?u.extent=f.readVarint():o===2?u._features.push(f.pos):o===3?u._keys.push(f.readString()):o===4&&u._values.push(function(m){for(var x=null,T=m.readVarint()+m.pos;m.pos<T;){var E=m.readVarint()>>3;x=E===1?m.readString():E===2?m.readFloat():E===3?m.readDouble():E===4?m.readVarint64():E===5?m.readVarint():E===6?m.readSVarint():E===7?m.readBoolean():null}return x}(f))}return Mh=t,t.prototype.feature=function(o){if(o<0||o>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[o];var u=this._pbf.readVarint()+this._pbf.pos;return new r(this._pbf,u,this.extent,this._keys,this._values)},Mh}function dp(){return cp||(cp=1,bu.VectorTile=function(){if(lp)return Ch;lp=1;var r=hp();function t(n,o,u){if(n===3){var f=new r(u,u.readVarint()+u.pos);f.length&&(o[f.name]=f)}}return Ch=function(n,o){this.layers=n.readFields(t,{},o)},Ch}(),bu.VectorTileFeature=up(),bu.VectorTileLayer=hp()),bu}var Cc=z(dp());let I_=Cc.VectorTileFeature.types,Ih=Math.pow(2,13);function Ic(r,t,n,o,u,f,m,x){r.emplaceBack(t,n,2*Math.floor(o*Ih)+m,u*Ih*2,f*Ih*2,Math.round(x))}class Ah{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(n=>n.id),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Ae,this.centroidVertexArray=new xe,this.indexArray=new pt,this.programConfigurations=new Ra(t.layers,t.zoom),this.segments=new li,this.stateDependentLayerIds=this.layers.filter(n=>n.isStateDependent()).map(n=>n.id)}populate(t,n,o){this.features=[],this.hasPattern=xh("fill-extrusion",this.layers,n);for(let{feature:u,id:f,index:m,sourceLayerIndex:x}of t){let T=this.layers[0]._featureFilter.needGeometry,E=da(u,T);if(!this.layers[0]._featureFilter.filter(new Wi(this.zoom),E,o))continue;let A={id:f,sourceLayerIndex:x,index:m,geometry:T?E.geometry:ha(u),properties:u.properties,type:u.type,patterns:{}};this.hasPattern?this.features.push(wh("fill-extrusion",this.layers,A,this.zoom,n)):this.addFeature(A,A.geometry,m,o,{},n.subdivisionGranularity),n.featureIndex.insert(u,A.geometry,m,x,this.index,!0)}}addFeatures(t,n,o){for(let u of this.features){let{geometry:f}=u;this.addFeature(u,f,u.index,n,o,t.subdivisionGranularity)}}update(t,n,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,n,this.stateDependentLayers,o)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,C_),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,M_.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(t,n,o,u,f,m){for(let x of Sa(n,500)){let T={x:0,y:0,sampleCount:0},E=this.layoutVertexArray.length;this.processPolygon(T,u,t,x,m);let A=this.layoutVertexArray.length-E,k=Math.floor(T.x/T.sampleC
vendor: 4,109 bytes, line 5
5ount),$=Math.floor(T.y/T.sampleCount);for(let q=0;q<A;q++)this.centroidVertexArray.emplaceBack(k,$)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,o,f,u)}processPolygon(t,n,o,u,f){if(u.length<1||pp(u[0]))return;for(let k of u)k.length!==0&&A_(t,k);let m={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},x=f.fill.getGranularityForZoomLevel(n.z),T=I_[o.type]==="Polygon";for(let k of u){if(k.length===0||pp(k))continue;let $=Zo(k,x,T);this._generateSideFaces($,m)}if(!T)return;let E=ip(u,n,x,!1),A=this.layoutVertexArray;rp((k,$)=>{Ic(A,k,$,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,E.verticesFlattened,E.indicesTriangles)}_generateSideFaces(t,n){let o=0;for(let u=1;u<t.length;u++){let f=t[u],m=t[u-1];if(D_(f,m))continue;n.segment.vertexLength+4>li.MAX_VERTEX_ARRAY_LENGTH&&(n.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let x=f.sub(m)._perp()._unit(),T=m.dist(f);o+T>32768&&(o=0),Ic(this.layoutVertexArray,f.x,f.y,x.x,x.y,0,0,o),Ic(this.layoutVertexArray,f.x,f.y,x.x,x.y,0,1,o),o+=T,Ic(this.layoutVertexArray,m.x,m.y,x.x,x.y,0,0,o),Ic(this.layoutVertexArray,m.x,m.y,x.x,x.y,0,1,o);let E=n.segment.vertexLength;this.indexArray.emplaceBack(E,E+2,E+1),this.indexArray.emplaceBack(E+1,E+2,E+3),n.segment.vertexLength+=4,n.segment.primitiveLength+=2}}}function A_(r,t){for(let n=0;n<t.length;n++){let o=t[n];n===t.length-1&&t[0].x===o.x&&t[0].y===o.y||(r.x+=o.x,r.y+=o.y,r.sampleCount++)}}function D_(r,t){return r.x===t.x&&(r.x<0||r.x>Ye)||r.y===t.y&&(r.y<0||r.y>Ye)}function pp(r){return r.every(t=>t.x<0)||r.every(t=>t.x>Ye)||r.every(t=>t.y<0)||r.every(t=>t.y>Ye)}let fp;zt("FillExtrusionBucket",Ah,{omit:["layers","features"]});var k_={get paint(){return fp=fp||new Tn({"fill-extrusion-opacity":new Ut(W["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Wt(W["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ut(W["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ut(W["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new _l(W["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Wt(W["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Wt(W["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ut(W["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class L_ extends pn{constructor(t){super(t,k_)}createBucket(t){return new Ah(t)}queryRadius(){return mu(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:t,feature:n,featureState:o,geometry:u,transform:f,pixelsToTileUnits:m,pixelPosMatrix:x}){let T=gu(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-f.bearingInRadians,m),E=this.paint.get("fill-extrusion-height").evaluate(n,o),A=this.paint.get("fill-extrusion-base").evaluate(n,o),k=function(q,Y,Q){let oe=[];for(let pe of q){let Ce=[pe.x,pe.y,0,1];$e(Ce,Ce,Y),oe.push(new ne(Ce[0]/Ce[3],Ce[1]/Ce[3]))}return oe}(T,x),$=function(q,Y,Q,oe){let pe=[],Ce=[],ye=oe[8]*Y,G=oe[9]*Y,se=oe[10]*Y,be=oe[11]*Y,Ge=oe[8]*Q,mt=oe[9]*Q,Ke=oe[10]*Q,nt=oe[11]*Q;for(let vt of q){let gt=[],St=[];for(let ct of vt){let Ft=ct.x,Zt=ct.y,Gt=oe[0]*Ft+oe[4]*Zt+oe[12],$t=oe[1]*Ft+oe[5]*Zt+oe[13],vi=oe[2]*Ft+oe[6]*Zt+oe[14],dr=oe[3]*Ft+oe[7]*Zt+oe[15],Fr=vi+se,an=dr+be,rs=Gt+Ge,zn=$t+mt,en=vi+Ke,nr=dr+nt,Hr=new ne((Gt+ye)/an,($t+G)/an);Hr.z=Fr/an,gt.push(Hr);let tn=new ne(rs/nr,zn/nr);tn.z=en/nr,St.push(tn)}pe.push(gt),Ce.push(St)}return[pe,Ce]}(u,A,E,x);return function(q,Y,Q){let oe=1/0;jd(Q,Y)&&(oe=mp(Q,Y[0]));for(let pe=0;pe<Y.length;pe++){let Ce=Y[pe],ye=q[pe];for(let G=0;G<Ce.length-1;G++){let se=Ce[G],be=[se,Ce[G+1],ye[G+1],ye[G],se];Sl(Q,be)&&(oe=Math.min(oe,mp(Q,be)))}}return oe!==1/0&&oe}($[0],$[1],k)}}function Ac(r,t){return r.x*t.x+r.y*t.y}function mp(r,t){if(r.length===1){let n=0,o=t[n++],u;for(;!u||o.equals(u);)if(u=t[n++],!u)return 1/0;for(;n<t.length;
5n++){let f=t[n],m=r[0],x=u.sub(o),T=f.sub(o),E=m.sub(o),A=Ac(x,x),k=Ac(x,T),$=Ac(T,T),q=Ac(E,x),Y=Ac(E,T),Q=A*$-k*k,oe=($*q-k*Y)/Q,pe=(A*Y-k*q)/Q,Ce=o.z*(1-oe-pe)+u.z*oe+f.z*pe;if(isFinite(Ce))return Ce}return 1/0}{let n=1/0;for(let o of t)n=Math.min(n,o.z);return n}}let z_=_r([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:R_}=z_,B_=_r([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:F_}=B_,O_=Cc.VectorTileFeature.types,N_=Math.cos(Math.PI/180*37.5),gp=Math.pow(2,14)/.5;class Dh{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(n=>n.id),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(n=>{this.gradients[n.id]={}}),this.layoutVertexArray=new Me,this.layoutVertexArray2=new Ue,this.indexArray=new pt,this.programConfigurations=new Ra(t.layers,t.zoom),this.segments=new li,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(n=>n.isStateDependent()).map(n=>n.id)}populate(t,n,o){this.hasPattern=xh("line",this.layers,n);let u=this.layers[0].layout.get("line-sort-key"),f=!u.isConstant(),m=[];for(let{feature:x,id:T,index:E,sourceLayerIndex:A}of t){let k=this.layers[0]._featureFilter.needGeometry,$=da(x,k);if(!this.layers[0]._featureFilter.filter(new Wi(this.zoom),$,o))continue;let q=f?u.evaluate($,{},o):void 0,Y={id:T,properties:x.properties,type:x.type,sourceLayerIndex:A,index:E,geometry:k?$.geometry:ha(x),patterns:{},sortKey:q};m.push(Y)}f&&m.sort((x,T)=>x.sortKey-T.sortKey);for(let x of m){let{geometry:T,index:E,sourceLayerIndex:A}=x;if(this.hasPattern){let k=wh("line",this.layers,x,this.zoom,n);this.patternFeatures.push(k)}else this.addFeature(x,T,E,o,{},n.subdivisionGranularity);n.featureIndex.insert(t[E].feature,T,E,A,this.index)}}update(t,n,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,n,this.stateDependentLayers,o)}addFeatures(t,n,o){for(let u of this.patternFeatures)this.addFeature(u,u.geometry,u.index,n,o,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,F_)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,R_),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}}addFeature(t,n,o,u,f,m){let x=this.layers[0].layout,T=x.get("line-join").evaluate(t,{}),E=x.get("line-cap"),A=x.get("line-miter-limit"),k=x.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(let $ of n)this.addLine($,t,T,E,A,k,u,m);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,o,f,u)}addLine(t,n,o,u,f,m,x,T){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t=Zo(t,x?T.line.getGranularityForZoomLevel(x.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let ye=0;ye<t.length-1;ye++)this.totalDistance+=t[ye].dist(t[ye+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}let E=O_[n.type]==="Polygon",A=t.length;for(;A>=2&&t[A-1].equals(t[A-2]);)A--;let k=0;for(;k<A-1&&t[k].equals(t[k+1]);)k++;if(A<(E?3:2))return;o==="bevel"&&(f=1.05);let $=this.overscaling<=16?15*Ye/(512*this.overscaling):0,q=this.segments.prepareSegment(10*A,this.layoutVertexArray,this.indexArray),Y,Q,oe,pe,Ce;this.e1=this.e2=-1,E&&(Y=t[A-2],Ce=t[k].sub(Y)._unit()._perp());for(let ye=k;ye<A;ye++){if(oe=ye===A-1?E?t[k+1]:void 0:t[ye+1],oe&&t[ye].equals(oe))continue;Ce&&(pe=Ce),Y&&(Q=Y),Y=t[ye],Ce=oe?oe.sub(Y)._unit()._perp():pe,pe=pe||Ce;let G=pe.add(Ce);G.x===0&&G.y===0||G._unit();let se=pe.x*Ce.x+pe.y*Ce.y,be=G.x*Ce.x+G.y*Ce.y,Ge=be!==0?1/be:1/0,mt=2*Math.sqrt(2-2*be),Ke=be<N_&&Q&&oe,nt=pe.x*Ce.y-pe.y*Ce.x>0;if(Ke&&ye>k){let St=Y.dist(Q);if(St>
vendor: 10,504 bytes, line 5
52*$){let ct=Y.sub(Y.sub(Q)._mult($/St)._round());this.updateDistance(Q,ct),this.addCurrentVertex(ct,pe,0,0,q),Q=ct}}let vt=Q&&oe,gt=vt?o:E?"butt":u;if(vt&>==="round"&&(Ge<m?gt="miter":Ge<=2&&(gt="fakeround")),gt==="miter"&&Ge>f&&(gt="bevel"),gt==="bevel"&&(Ge>2&&(gt="flipbevel"),Ge<f&&(gt="miter")),Q&&this.updateDistance(Q,Y),gt==="miter")G._mult(Ge),this.addCurrentVertex(Y,G,0,0,q);else if(gt==="flipbevel"){if(Ge>100)G=Ce.mult(-1);else{let St=Ge*pe.add(Ce).mag()/pe.sub(Ce).mag();G._perp()._mult(St*(nt?-1:1))}this.addCurrentVertex(Y,G,0,0,q),this.addCurrentVertex(Y,G.mult(-1),0,0,q)}else if(gt==="bevel"||gt==="fakeround"){let St=-Math.sqrt(Ge*Ge-1),ct=nt?St:0,Ft=nt?0:St;if(Q&&this.addCurrentVertex(Y,pe,ct,Ft,q),gt==="fakeround"){let Zt=Math.round(180*mt/Math.PI/20);for(let Gt=1;Gt<Zt;Gt++){let $t=Gt/Zt;if($t!==.5){let dr=$t-.5;$t+=$t*dr*($t-1)*((1.0904+se*(se*(3.55645-1.43519*se)-3.2452))*dr*dr+(.848013+se*(.215638*se-1.06021)))}let vi=Ce.sub(pe)._mult($t)._add(pe)._unit()._mult(nt?-1:1);this.addHalfVertex(Y,vi.x,vi.y,!1,nt,0,q)}}oe&&this.addCurrentVertex(Y,Ce,-ct,-Ft,q)}else if(gt==="butt")this.addCurrentVertex(Y,G,0,0,q);else if(gt==="square"){let St=Q?1:-1;this.addCurrentVertex(Y,G,St,St,q)}else gt==="round"&&(Q&&(this.addCurrentVertex(Y,pe,0,0,q),this.addCurrentVertex(Y,pe,1,1,q,!0)),oe&&(this.addCurrentVertex(Y,Ce,-1,-1,q,!0),this.addCurrentVertex(Y,Ce,0,0,q)));if(Ke&&ye<A-1){let St=Y.dist(oe);if(St>2*$){let ct=Y.add(oe.sub(Y)._mult($/St)._round());this.updateDistance(Y,ct),this.addCurrentVertex(ct,Ce,0,0,q),Y=ct}}}}addCurrentVertex(t,n,o,u,f,m=!1){let x=n.y*u-n.x,T=-n.y-n.x*u;this.addHalfVertex(t,n.x+n.y*o,n.y-n.x*o,m,!1,o,f),this.addHalfVertex(t,x,T,m,!0,-u,f),this.distance>gp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,n,o,u,f,m))}addHalfVertex({x:t,y:n},o,u,f,m,x,T){let E=.5*(this.lineClips?this.scaledDistance*(gp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t<<1)+(f?1:0),(n<<1)+(m?1:0),Math.round(63*o)+128,Math.round(63*u)+128,1+(x===0?0:x<0?-1:1)|(63&E)<<2,E>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let A=T.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,A,this.e2),T.primitiveLength++),m?this.e2=A:this.e1=A}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,n){this.distance+=t.dist(n),this.updateScaledDistance()}}let yp,_p;zt("LineBucket",Dh,{omit:["layers","patternFeatures"]});var vp={get paint(){return _p=_p||new Tn({"line-opacity":new Wt(W.paint_line["line-opacity"]),"line-color":new Wt(W.paint_line["line-color"]),"line-translate":new Ut(W.paint_line["line-translate"]),"line-translate-anchor":new Ut(W.paint_line["line-translate-anchor"]),"line-width":new Wt(W.paint_line["line-width"]),"line-gap-width":new Wt(W.paint_line["line-gap-width"]),"line-offset":new Wt(W.paint_line["line-offset"]),"line-blur":new Wt(W.paint_line["line-blur"]),"line-dasharray":new uc(W.paint_line["line-dasharray"]),"line-pattern":new _l(W.paint_line["line-pattern"]),"line-gradient":new hc(W.paint_line["line-gradient"])})},get layout(){return yp=yp||new Tn({"line-cap":new Ut(W.layout_line["line-cap"]),"line-join":new Wt(W.layout_line["line-join"]),"line-miter-limit":new Ut(W.layout_line["line-miter-limit"]),"line-round-limit":new Ut(W.layout_line["line-round-limit"]),"line-sort-key":new Wt(W.layout_line["line-sort-key"])})}};class j_ extends Wt{possiblyEvaluate(t,n){return n=new Wi(Math.floor(n.zoom),{now:n.now,fadeDuration:n.fadeDuration,zoomHistory:n.zoomHistory,transition:n.transition}),super.possiblyEvaluate(t,n)}evaluate(t,n,o,u){return n=Ai({},n,{zoom:Math.floor(n.zoom)}),super.evaluate(t,n,o,u)}}let xu;class $_ extends pn{constructor(t){super(t,vp),this.gradientVersion=0,xu||(xu=new j_(vp.paint.properties["line-width"].specification),xu.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if(t==="line-gradient"){let n=this.gradientExpression();this.stepInterpolant=!!function(o){return o._styleExpression!==void 0}(n)&&n._styleExpression.expression instanceof na,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,n){super.recalculate(t,n),this.paint._values["line-floorwidth"]=xu.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new Dh(t)}queryRadius(t){let n=t,o=bp(bc("line-width",this,n),bc("line-gap-width",this,n)),u=bc("line-offset",this,n);return o/2+Math.abs(u)+mu(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:n,featureState:o,geometry:u,transform:f,pixelsToTileUnits:m}){let x=gu(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-f.bearingInRadians,m),T=m/2*bp(this.paint.get("line-width").evaluate(n,o),this.paint.get("line-gap-width").evaluate(n,o)),E=this.paint.get("line-offset").evaluate(n,o);return E&&(u=function(A,k){let $=[];for(let q=0;q<A.length;q++){let Y=A[q],Q=[];for(let oe=0;oe<Y.length;oe++){let pe=Y[oe-1],Ce=Y[oe],ye=Y[oe+1],G=oe===0?new ne(0,0):Ce.sub(pe)._unit()._perp(),se=oe===Y.length-1?new ne(0,0):ye.sub(Ce)._unit()._perp(),be=G._add(se)._unit(),Ge=be.x*se.x+be.y*se.y;Ge!==0&&be._mult(1/Ge),Q.push(be._mult(k)._add(Ce))}$.push(Q)}return $}(u,E*m)),function(A,k,$){for(let q=0;q<k.length;q++){let Y=k[q];if(A.length>=3){for(let Q=0;Q<Y.length;Q++)if(Ho(A,Y[Q]))return!0}if(i_(A,Y,$))return!0}return!1}(x,u,T)}isTileClipped(){return!0}}function bp(r,t){return t>0?t+2*r:r}let V_=_r([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),U_=_r([{name:"a_projected_pos",components:3,type:"Float32"}],4);_r([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let G_=_r([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);_r([{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"}]);let xp=_r([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),H_=_r([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function q_(r,t,n){return r.sections.forEach(o=>{o.text=function(u,f,m){let x=f.layout.get("text-transform").evaluate(m,{});return x==="uppercase"?u=u.toLocaleUpperCase():x==="lowercase"&&(u=u.toLocaleLowerCase()),zs.applyArabicShaping&&(u=zs.applyArabicShaping(u)),u}(o.text,t,n)}),r}_r([{name:"triangle",components:3,type:"Uint16"}]),_r([{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"}]),_r([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),_r([{type:"Float32",name:"offsetX"}]),_r([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),_r([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let Dc={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63"
vendor: 5,039 bytes, line 5
5:"\uFE42"};var wp,kh,Sp,Br=24,Lh={};function Z_(){return wp||(wp=1,Lh.read=function(r,t,n,o,u){var f,m,x=8*u-o-1,T=(1<<x)-1,E=T>>1,A=-7,k=n?u-1:0,$=n?-1:1,q=r[t+k];for(k+=$,f=q&(1<<-A)-1,q>>=-A,A+=x;A>0;f=256*f+r[t+k],k+=$,A-=8);for(m=f&(1<<-A)-1,f>>=-A,A+=o;A>0;m=256*m+r[t+k],k+=$,A-=8);if(f===0)f=1-E;else{if(f===T)return m?NaN:1/0*(q?-1:1);m+=Math.pow(2,o),f-=E}return(q?-1:1)*m*Math.pow(2,f-o)},Lh.write=function(r,t,n,o,u,f){var m,x,T,E=8*f-u-1,A=(1<<E)-1,k=A>>1,$=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,q=o?0:f-1,Y=o?1:-1,Q=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(x=isNaN(t)?1:0,m=A):(m=Math.floor(Math.log(t)/Math.LN2),t*(T=Math.pow(2,-m))<1&&(m--,T*=2),(t+=m+k>=1?$/T:$*Math.pow(2,1-k))*T>=2&&(m++,T/=2),m+k>=A?(x=0,m=A):m+k>=1?(x=(t*T-1)*Math.pow(2,u),m+=k):(x=t*Math.pow(2,k-1)*Math.pow(2,u),m=0));u>=8;r[n+q]=255&x,q+=Y,x/=256,u-=8);for(m=m<<u|x,E+=u;E>0;r[n+q]=255&m,q+=Y,m/=256,E-=8);r[n+q-Y]|=128*Q}),Lh}function Tp(){if(Sp)return kh;Sp=1,kh=t;var r=Z_();function t(G){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(G)?G:new Uint8Array(G||0),this.pos=0,this.type=0,this.length=this.buf.length}t.Varint=0,t.Fixed64=1,t.Bytes=2,t.Fixed32=5;var n=4294967296,o=1/n,u=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function f(G){return G.type===t.Bytes?G.readVarint()+G.pos:G.pos+1}function m(G,se,be){return be?4294967296*se+(G>>>0):4294967296*(se>>>0)+(G>>>0)}function x(G,se,be){var Ge=se<=16383?1:se<=2097151?2:se<=268435455?3:Math.floor(Math.log(se)/(7*Math.LN2));be.realloc(Ge);for(var mt=be.pos-1;mt>=G;mt--)be.buf[mt+Ge]=be.buf[mt]}function T(G,se){for(var be=0;be<G.length;be++)se.writeVarint(G[be])}function E(G,se){for(var be=0;be<G.length;be++)se.writeSVarint(G[be])}function A(G,se){for(var be=0;be<G.length;be++)se.writeFloat(G[be])}function k(G,se){for(var be=0;be<G.length;be++)se.writeDouble(G[be])}function $(G,se){for(var be=0;be<G.length;be++)se.writeBoolean(G[be])}function q(G,se){for(var be=0;be<G.length;be++)se.writeFixed32(G[be])}function Y(G,se){for(var be=0;be<G.length;be++)se.writeSFixed32(G[be])}function Q(G,se){for(var be=0;be<G.length;be++)se.writeFixed64(G[be])}function oe(G,se){for(var be=0;be<G.length;be++)se.writeSFixed64(G[be])}function pe(G,se){return(G[se]|G[se+1]<<8|G[se+2]<<16)+16777216*G[se+3]}function Ce(G,se,be){G[be]=se,G[be+1]=se>>>8,G[be+2]=se>>>16,G[be+3]=se>>>24}function ye(G,se){return(G[se]|G[se+1]<<8|G[se+2]<<16)+(G[se+3]<<24)}return t.prototype={destroy:function(){this.buf=null},readFields:function(G,se,be){for(be=be||this.length;this.pos<be;){var Ge=this.readVarint(),mt=Ge>>3,Ke=this.pos;this.type=7&Ge,G(mt,se,this),this.pos===Ke&&this.skip(Ge)}return se},readMessage:function(G,se){return this.readFields(G,se,this.readVarint()+this.pos)},readFixed32:function(){var G=pe(this.buf,this.pos);return this.pos+=4,G},readSFixed32:function(){var G=ye(this.buf,this.pos);return this.pos+=4,G},readFixed64:function(){var G=pe(this.buf,this.pos)+pe(this.buf,this.pos+4)*n;return this.pos+=8,G},readSFixed64:function(){var G=pe(this.buf,this.pos)+ye(this.buf,this.pos+4)*n;return this.pos+=8,G},readFloat:function(){var G=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,G},readDouble:function(){var G=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,G},readVarint:function(G){var se,be,Ge=this.buf;return se=127&(be=Ge[this.pos++]),be<128?se:(se|=(127&(be=Ge[this.pos++]))<<7,be<128?se:(se|=(127&(be=Ge[this.pos++]))<<14,be<128?se:(se|=(127&(be=Ge[this.pos++]))<<21,be<128?se:function(mt,Ke,nt){var vt,gt,St=nt.buf;if(vt=(112&(gt=St[nt.pos++]))>>4,gt<128||(vt|=(127&(gt=St[nt.pos++]))<<3,gt<128)||(vt|=(127&(gt=St[nt.pos++]))<<10,gt<128)||(vt|=(127&(gt=St[nt.pos++]))<<17,gt<128)||(vt|=(127&(gt=St[nt.pos++]))<<24,gt<128)||(vt|=(1&(gt=St[nt.pos++]))<<31,gt<128))return m(mt,vt,Ke);throw new Error("Expected varint not more than 10 bytes")}(se|=(15&(be=Ge[this.pos]))<<28,G,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var G=this.readVarint();return G%2==1?(G+1)/-2:G/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var G=this.readVarint()+this.pos,se=this.pos;return this.pos=G,G-se>=12&&u?function(be,Ge,mt){return u.decode(be.subarray(Ge,mt))}(this.buf,se,G):function(be,Ge,mt){for(var Ke="",nt=Ge;nt<mt;){var vt,gt,St,ct=be[nt],Ft=null,Zt=ct>239?4:ct>223?3:ct>191?2:1;if(nt+Zt>mt)break;Zt===1?ct<128&&(Ft=ct):Zt===2?(192&(vt=be[nt+1]))==128&&(Ft=(31&ct)<<6|63&vt)<=127&&(Ft=null):Zt===3?(gt=be[nt+2],(192&(vt=be[nt+1]))==128&&(192>)==128&&((Ft=(15&ct)<<12|(63&vt)<<6|63>)<=2047||Ft>=55296&&Ft<=57343)&&(Ft=null)):Zt===4&&(gt=be[nt+2],St=be[nt+3],(192&(vt=be[nt+1]))==128&&(192>)==128&&(192&St)==128&&((Ft=(15&ct)<<18|(63&vt)<<12|(63>)<<6|63&St)<=65535||Ft>=1114112)&&(Ft=null)),Ft===null?(Ft=65533,Zt=1):Ft>65535&&(Ft-=65536,Ke+=String.fromCharCode(Ft>>>10&1023|55296),Ft=56320|1023&Ft),Ke+=String.fromCharCode(Ft),nt+=Zt}return Ke}(this.buf,se,G)},readBytes:function(){var G=this.readVarint()+this.pos,se=this.buf.subarray(this.pos,G);return this.pos=G,se}
vendor: 5,851 bytes, line 5
5,readPackedVarint:function(G,se){if(this.type!==t.Bytes)return G.push(this.readVarint(se));var be=f(this);for(G=G||[];this.pos<be;)G.push(this.readVarint(se));return G},readPackedSVarint:function(G){if(this.type!==t.Bytes)return G.push(this.readSVarint());var se=f(this);for(G=G||[];this.pos<se;)G.push(this.readSVarint());return G},readPackedBoolean:function(G){if(this.type!==t.Bytes)return G.push(this.readBoolean());var se=f(this);for(G=G||[];this.pos<se;)G.push(this.readBoolean());return G},readPackedFloat:function(G){if(this.type!==t.Bytes)return G.push(this.readFloat());var se=f(this);for(G=G||[];this.pos<se;)G.push(this.readFloat());return G},readPackedDouble:function(G){if(this.type!==t.Bytes)return G.push(this.readDouble());var se=f(this);for(G=G||[];this.pos<se;)G.push(this.readDouble());return G},readPackedFixed32:function(G){if(this.type!==t.Bytes)return G.push(this.readFixed32());var se=f(this);for(G=G||[];this.pos<se;)G.push(this.readFixed32());return G},readPackedSFixed32:function(G){if(this.type!==t.Bytes)return G.push(this.readSFixed32());var se=f(this);for(G=G||[];this.pos<se;)G.push(this.readSFixed32());return G},readPackedFixed64:function(G){if(this.type!==t.Bytes)return G.push(this.readFixed64());var se=f(this);for(G=G||[];this.pos<se;)G.push(this.readFixed64());return G},readPackedSFixed64:function(G){if(this.type!==t.Bytes)return G.push(this.readSFixed64());var se=f(this);for(G=G||[];this.pos<se;)G.push(this.readSFixed64());return G},skip:function(G){var se=7&G;if(se===t.Varint)for(;this.buf[this.pos++]>127;);else if(se===t.Bytes)this.pos=this.readVarint()+this.pos;else if(se===t.Fixed32)this.pos+=4;else{if(se!==t.Fixed64)throw new Error("Unimplemented type: "+se);this.pos+=8}},writeTag:function(G,se){this.writeVarint(G<<3|se)},realloc:function(G){for(var se=this.length||16;se<this.pos+G;)se*=2;if(se!==this.length){var be=new Uint8Array(se);be.set(this.buf),this.buf=be,this.length=se}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(G){this.realloc(4),Ce(this.buf,G,this.pos),this.pos+=4},writeSFixed32:function(G){this.realloc(4),Ce(this.buf,G,this.pos),this.pos+=4},writeFixed64:function(G){this.realloc(8),Ce(this.buf,-1&G,this.pos),Ce(this.buf,Math.floor(G*o),this.pos+4),this.pos+=8},writeSFixed64:function(G){this.realloc(8),Ce(this.buf,-1&G,this.pos),Ce(this.buf,Math.floor(G*o),this.pos+4),this.pos+=8},writeVarint:function(G){(G=+G||0)>268435455||G<0?function(se,be){var Ge,mt;if(se>=0?(Ge=se%4294967296|0,mt=se/4294967296|0):(mt=~(-se/4294967296),4294967295^(Ge=~(-se%4294967296))?Ge=Ge+1|0:(Ge=0,mt=mt+1|0)),se>=18446744073709552e3||se<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");be.realloc(10),function(Ke,nt,vt){vt.buf[vt.pos++]=127&Ke|128,Ke>>>=7,vt.buf[vt.pos++]=127&Ke|128,Ke>>>=7,vt.buf[vt.pos++]=127&Ke|128,Ke>>>=7,vt.buf[vt.pos++]=127&Ke|128,vt.buf[vt.pos]=127&(Ke>>>=7)}(Ge,0,be),function(Ke,nt){var vt=(7&Ke)<<4;nt.buf[nt.pos++]|=vt|((Ke>>>=3)?128:0),Ke&&(nt.buf[nt.pos++]=127&Ke|((Ke>>>=7)?128:0),Ke&&(nt.buf[nt.pos++]=127&Ke|((Ke>>>=7)?128:0),Ke&&(nt.buf[nt.pos++]=127&Ke|((Ke>>>=7)?128:0),Ke&&(nt.buf[nt.pos++]=127&Ke|((Ke>>>=7)?128:0),Ke&&(nt.buf[nt.pos++]=127&Ke)))))}(mt,be)}(G,this):(this.realloc(4),this.buf[this.pos++]=127&G|(G>127?128:0),G<=127||(this.buf[this.pos++]=127&(G>>>=7)|(G>127?128:0),G<=127||(this.buf[this.pos++]=127&(G>>>=7)|(G>127?128:0),G<=127||(this.buf[this.pos++]=G>>>7&127))))},writeSVarint:function(G){this.writeVarint(G<0?2*-G-1:2*G)},writeBoolean:function(G){this.writeVarint(!!G)},writeString:function(G){G=String(G),this.realloc(4*G.length),this.pos++;var se=this.pos;this.pos=function(Ge,mt,Ke){for(var nt,vt,gt=0;gt<mt.length;gt++){if((nt=mt.charCodeAt(gt))>55295&&nt<57344){if(!vt){nt>56319||gt+1===mt.length?(Ge[Ke++]=239,Ge[Ke++]=191,Ge[Ke++]=189):vt=nt;continue}if(nt<56320){Ge[Ke++]=239,Ge[Ke++]=191,Ge[Ke++]=189,vt=nt;continue}nt=vt-55296<<10|nt-56320|65536,vt=null}else vt&&(Ge[Ke++]=239,Ge[Ke++]=191,Ge[Ke++]=189,vt=null);nt<128?Ge[Ke++]=nt:(nt<2048?Ge[Ke++]=nt>>6|192:(nt<65536?Ge[Ke++]=nt>>12|224:(Ge[Ke++]=nt>>18|240,Ge[Ke++]=nt>>12&63|128),Ge[Ke++]=nt>>6&63|128),Ge[Ke++]=63&nt|128)}return Ke}(this.buf,G,this.pos);var be=this.pos-se;be>=128&&x(se,be,this),this.pos=se-1,this.writeVarint(be),this.pos+=be},writeFloat:function(G){this.realloc(4),r.write(this.buf,G,this.pos,!0,23,4),this.pos+=4},writeDouble:function(G){this.realloc(8),r.write(this.buf,G,this.pos,!0,52,8),this.pos+=8},writeBytes:function(G){var se=G.length;this.writeVarint(se),this.realloc(se);for(var be=0;be<se;be++)this.buf[this.pos++]=G[be]},writeRawMessage:function(G,se){this.pos++;var be=this.pos;G(se,this);var Ge=this.pos-be;Ge>=128&&x(be,Ge,this),this.pos=be-1,this.writeVarint(Ge),this.pos+=Ge},writeMessage:function(G,se,be){this.writeTag(G,t.Bytes),this.writeRawMessage(se,be)},writePackedVarint:function(G,se){se.length&&this.writeMessage(G,T,se)},writePackedSVarint:function(G,se){se.length&&this.writeMessage(G,E,se)},writePackedBoolean:function(G,se){se.length&&this.writeMessage(G,$,se)},writePackedFloat:function(G,se){se.length&&this.writeMessage(G,A,se)},writePackedDouble:function(G,se){se.length&&this.writeMessage(G,k,se)},writePackedFixed32:function(G,se){se.length&&this.writeMessage(G,q,se)},writePackedSFixed32:function(G,se){se.length&&this.writeMessage(G,Y,se)},writePackedFixed64:function(G,se){se.length&&this.writeMessage(G,Q,se)},writePackedSFixed64:function(G,se){se.length&&this.writeMessage(G,oe,se)},writeBytesField:function(G,se){this.writeTag(G,t.Bytes),this.writeBytes(se)},writeFixed32Field:function(G,se){this.writeTag(G,t.Fixed32),this.writeFixed32(se)},writeSFixed32Field:function(G,se){this.writeTag(G,t.Fixed32),this.writeSFixed32(se)},writeFixed64Field:function(G,se){this.writeTag(G,t.Fixed64),this.writeFixed64
5(se)},writeSFixed64Field:function(G,se){this.writeTag(G,t.Fixed64),this.writeSFixed64(se)},writeVarintField:function(G,se){this.writeTag(G,t.Varint),this.writeVarint(se)},writeSVarintField:function(G,se){this.writeTag(G,t.Varint),this.writeSVarint(se)},writeStringField:function(G,se){this.writeTag(G,t.Bytes),this.writeString(se)},writeFloatField:function(G,se){this.writeTag(G,t.Fixed32),this.writeFloat(se)},writeDoubleField:function(G,se){this.writeTag(G,t.Fixed64),this.writeDouble(se)},writeBooleanField:function(G,se){this.writeVarintField(G,!!se)}},kh}var zh=z(Tp());let Rh=3;function W_(r,t,n){r===1&&n.readMessage(X_,t)}function X_(r,t,n){if(r===3){let{id:o,bitmap:u,width:f,height:m,left:x,top:T,advance:E}=n.readMessage(Y_,{});t.push({id:o,bitmap:new xc({width:f+2*Rh,height:m+2*Rh},u),metrics:{width:f,height:m,left:x,top:T,advance:E}})}}function Y_(r,t,n){r===1?t.id=n.readVarint():r===2?t.bitmap=n.readBytes():r===3?t.width=n.readVarint():r===4?t.height=n.readVarint():r===5?t.left=n.readSVarint():r===6?t.top=n.readSVarint():r===7&&(t.advance=n.readVarint())}let K_=Rh;function Pp(r){let t=0,n=0;for(let m of r)t+=m.w*m.h,n=Math.max(n,m.w);r.sort((m,x)=>x.h-m.h);let o=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),n),h:1/0}],u=0,f=0;for(let m of r)for(let x=o.length-1;x>=0;x--){let T=o[x];if(!(m.w>T.w||m.h>T.h)){if(m.x=T.x,m.y=T.y,f=Math.max(f,m.y+m.h),u=Math.max(u,m.x+m.w),m.w===T.w&&m.h===T.h){let E=o.pop();x<o.length&&(o[x]=E)}else m.h===T.h?(T.x+=m.w,T.w-=m.w):m.w===T.w?(T.y+=m.h,T.h-=m.h):(o.push({x:T.x+m.w,y:T.y,w:T.w-m.w,h:m.h}),T.y+=m.h,T.h-=m.h);break}}return{w:u,h:f,fill:t/(u*f)||0}}let Ln=1;class Bh{constructor(t,{pixelRatio:n,version:o,stretchX:u,stretchY:f,content:m,textFitWidth:x,textFitHeight:T}){this.paddedRect=t,this.pixelRatio=n,this.stretchX=u,this.stretchY=f,this.content=m,this.version=o,this.textFitWidth=x,this.textFitHeight=T}get tl(){return[this.paddedRect.x+Ln,this.paddedRect.y+Ln]}get br(){return[this.paddedRect.x+this.paddedRect.w-Ln,this.paddedRect.y+this.paddedRect.h-Ln]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*Ln)/this.pixelRatio,(this.paddedRect.h-2*Ln)/this.pixelRatio]}}class Ep{constructor(t,n){let o={},u={};this.haveRenderCallbacks=[];let f=[];this.addImages(t,o,f),this.addImages(n,u,f);let{w:m,h:x}=Pp(f),T=new ts({width:m||1,height:x||1});for(let E in t){let A=t[E],k=o[E].paddedRect;ts.copy(A.data,T,{x:0,y:0},{x:k.x+Ln,y:k.y+Ln},A.data)}for(let E in n){let A=n[E],k=u[E].paddedRect,$=k.x+Ln,q=k.y+Ln,Y=A.data.width,Q=A.data.height;ts.copy(A.data,T,{x:0,y:0},{x:$,y:q},A.data),ts.copy(A.data,T,{x:0,y:Q-1},{x:$,y:q-1},{width:Y,height:1}),ts.copy(A.data,T,{x:0,y:0},{x:$,y:q+Q},{width:Y,height:1}),ts.copy(A.data,T,{x:Y-1,y:0},{x:$-1,y:q},{width:1,height:Q}),ts.copy(A.data,T,{x:0,y:0},{x:$+Y,y:q},{width:1,height:Q})}this.image=T,this.iconPositions=o,this.patternPositions=u}addImages(t,n,o){for(let u in t){let f=t[u],m={x:0,y:0,w:f.data.width+2*Ln,h:f.data.height+2*Ln};o.push(m),n[u]=new Bh(m,f),f.hasRenderCallback&&this.haveRenderCallbacks.push(u)}}patchUpdatedImages(t,n){t.dispatchRenderCallbacks(this.haveRenderCallbacks);for(let o in t.updatedImages)this.patchUpdatedImage(this.iconPositions[o],t.getImage(o),n),this.patchUpdatedImage(this.patternPositions[o],t.getImage(o),n)}patchUpdatedImage(t,n,o){if(!t||!n||t.version===n.version)return;t.version=n.version;let[u,f]=t.tl;o.update(n.data,void 0,{x:u,y:f})}}var so;zt("ImagePosition",Bh),zt("ImageAtlas",Ep),y.ah=void 0,(so=y.ah||(y.ah={}))[so.none=0]="none",so[so.horizontal=1]="horizontal",so[so.vertical=2]="vertical",so[so.horizontalOnly=3]="horizontalOnly";let wu=-17;class kc{constructor(){this.scale=1,this.fontStack="",this.imageName=null,this.verticalAlign="bottom"}static forText(t,n,o){let u=new kc;return u.scale=t||1,u.fontStack=n,u.verticalAlign=o||"bottom",u}static forImage(t,n){let o=new kc;return o.imageName=t,o.verticalAlign=n||"bottom",o}}class Ml{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(t,n){let o=new Ml;for(let u=0;u<t.sections.length;u++){let f=t.sections[u];f.image?o.addImageSection(f):o.addTextSection(f,n)}return o}length(){return this.text.length}getSection(t){return this.sections[this.sectionIndex[t]]}getSectionIndex(t){return this.sectionIndex[t]}getCharCode(t){return this.text.charCodeAt(t)}verticalizePunctuation(){this.text=function(t){let n="";for(let o=0;o<t.length;o++){let u=t.charCodeAt(o+1)||null,f=t.charCodeAt(o-1)||null;n+=u&&lc(u)&&!Dc[t[o+1]]||f&&lc(f)&&!Dc[t[o-1]]||!Dc[t[o]]?t[o]:Dc[t[o]]}return n}(this.text)}trim(){let t=0;for(let o=0;o<this.text.length&&Tu[this.text.charCodeAt(o)];o++)t++;let n=this.text.length;for(let o=this.text.length-1;o>=0&&o>=t&&Tu[this.text.charCodeAt(o)];o--)n--;this.text=this.text.substring(t,n),this.sectionIndex=this.sectionIndex.slice(t,n)}substring(t,n){let o=new Ml;return o.text=this.text.substring(t,n),o.sectionIndex=this.sectionIndex.slice(t,n),o.sections=this.sections,o}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((t,n)=>Math.max(t,this.sections[n].scale),0)}getMaxImageSize(t){let n=0,o=0;for(let u=0;u<this.length();u++){let f=this.getSection(u);if(f.imageName){let m=t[f.imageName];if(!m)continue;let x=m.displaySize;n=Math.max(n,x[0]),o=Math.max(o,x[1])}}return{maxImageWidth:n,maxImageHeight:o}}addTextSection(t,n){this.text+=t.text,this.sections.push(kc.forText(t.scale,t.fontStack||n,t.verticalAlign));let o=this.sections.length-1;for(let u=0;u<t.text.length;++u)this.sectionIndex.push(o)}addImageSection(t){let n=t.image?t.image.name:"";if(n.length===0)return void si("Can't add FormattedSection with an empty image.");let o=this.getNextImageSectionCharCode();o?(this.text+=String.fromCharCode(o),this.sections.push(kc.forImage(n,t.verticalAlign)),this.sectionIndex.push(this.sections.length-1)):si("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Su(r,t,n,o,u,f,m,x,T,E,A,k,$,q,Y){let Q=Ml.fromFeature(r,u),oe;k===y.ah.vertical&&Q.verticalizePunctuation();let{processBidirectionalText:pe,processStyledBidirectionalText:Ce}=zs;if(pe&&Q.sections.length===1){oe=[];let se=pe(Q.toString(),Fh(Q,E,f,t,o,q));for(let be of se){let Ge=new Ml;Ge.text=be,Ge.sections=Q.sections;for(let mt=0;mt<be.length;mt++)Ge.sectionIndex.push(0);oe.push(Ge)}}else if(Ce){oe=[];let se=Ce(Q.text,Q.sectionIndex,Fh(Q,E,f,t,o,q));for(let be of se){let Ge=new Ml;Ge.text=be[0],Ge.sectionIndex=be[1],Ge.sections=Q.sections,oe.push(Ge)}}else oe=function(se,be){let Ge=[],mt=se.text,Ke=0;for(let nt of be)Ge.push(se.substring(Ke,nt)),Ke=nt;return Ke<mt.length&&Ge.push(se.substring(Ke,mt.length)),Ge}(Q,Fh(Q,E,f,t,o,q));let ye=[],G={positionedLines:ye,text:Q.toString(),top:A[1],bottom:A[1],left:A[0],right:A[0],writingMode:k,iconsInText:!1,verticalizable:!1};return function(se,be,Ge,mt,Ke,nt,vt,gt,St,ct,Ft,Zt){let Gt=0,$t=0,vi=0,dr=0,Fr=gt==="right"?1:gt==="left"?0:.5,an=Br/Zt,rs=0;for(let nr of Ke){nr.trim();let Hr=nr.getMaxScale(),tn={positionedGlyphs:[],lineOffset:0};se.positionedLines[rs]=tn;let rn=tn.positionedGlyphs,En=0;if(!nr.length()){$t+=nt,++rs;continue}let ns=tv(mt,nr,an);for(let Rn=0;Rn<nr.length();Rn++){let Or=nr.getSection(Rn),Zr=nr.getSectionIndex(Rn),Wr=nr.getCharCode(Rn),Er=iv(St,Ft,Wr),Yi;if(Or.imageName){if(se.iconsInText=!0,Or.scale=Or.scale*an,Yi=nv(Or,Er,Hr,ns,mt),!Yi)continue;En=Math.max(En,Yi.imageOffset)}else if(Yi=rv(Or,Wr,Er,ns,be,Ge),!Yi)continue;let{rect:Os,metrics:Dl,baselineOffset:Ns}=Yi;rn.push({glyph:Wr,imageName:Or.imageName,x:Gt,y:$t+Ns+wu,vertical:Er,scale:Or.scale,fontStack:Or.fontStack,sectionIndex:Zr,metrics:Dl,rect:Os}),Er?(se.verticalizable=!0,Gt+=(Or.imageName?Dl.advance:Br)*Or.scale+ct):Gt+=Dl.advance*Or.scale+ct}rn.length!==0&&(vi=Math.max(Gt-ct,vi),sv(rn,0,rn.length-1,Fr)),Gt=0,tn.lineOffset=Math.max(En,(Hr-1)*Br);let qr=nt*Hr+En;$t+=qr,dr=Math.max(qr,dr),++rs}let{horizontalAlign:zn,verticalAlign:en}=Oh(vt);(function(nr,Hr,tn,rn,En,ns,qr,Rn,Or){let Zr=(Hr-tn)*En,Wr=0;Wr=ns!==qr?-Rn*rn-wu:-rn*Or*qr+.5*qr;for(let Er of nr)for(let Yi of Er.positionedGlyphs)Yi.x+=Zr,Yi.y+=Wr})(se.positionedLines,Fr,zn,en,vi,dr,nt,$t,Ke.length),se.top+=-en*$t,se.bottom=se.top+$t,se.left+=-zn*vi,se.right=se.left+vi}(G,t,n,o,oe,m,x,T,k,E,$,Y),!function(se){for(let be of se)if(be.positionedGlyphs.length!==0)return!1;return!0}(ye)&&G}let Tu={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},J_={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},Q_={40:!0};function Mp(r,t,n,o,u,f){if(t.imageName){let m=o[t.imageName];return m?m.displaySize[0]*t.scale*Br/f+u:0}{let m=n[t.fontStack],x=m&&m[r];return x?x.metrics.advance*t.scale+u:0}}function Cp(r,t,n,o){let u=Math.pow(r-t,2);return o?r<t?u/2:2*u:u+Math.abs(n)*n}
5function ev(r,t,n){let o=0;return r===10&&(o-=1e4),n&&(o+=150),r!==40&&r!==65288||(o+=50),t!==41&&t!==65289||(o+=50),o}function Ip(r,t,n,o,u,f){let m=null,x=Cp(t,n,u,f);for(let T of o){let E=Cp(t-T.x,n,u,f)+T.badness;E<=x&&(m=T,x=E)}return{index:r,x:t,priorBreak:m,badness:x}}function Ap(r){return r?Ap(r.priorBreak).concat(r.index):[]}function Fh(r,t,n,o,u,f){if(!r)return[];let m=[],x=function(k,$,q,Y,Q,oe){let pe=0;for(let Ce=0;Ce<k.length();Ce++){let ye=k.getSection(Ce);pe+=Mp(k.getCharCode(Ce),ye,Y,Q,$,oe)}return pe/Math.max(1,Math.ceil(pe/q))}(r,t,n,o,u,f),T=r.text.indexOf("\u200B")>=0,E=0;for(let k=0;k<r.length();k++){let $=r.getSection(k),q=r.getCharCode(k);if(Tu[q]||(E+=Mp(q,$,o,u,t,f)),k<r.length()-1){let Y=!((A=q)<11904)&&(!!mi["CJK Compatibility Forms"](A)||!!mi["CJK Compatibility"](A)||!!mi["CJK Strokes"](A)||!!mi["CJK Symbols and Punctuation"](A)||!!mi["Enclosed CJK Letters and Months"](A)||!!mi["Halfwidth and Fullwidth Forms"](A)||!!mi["Ideographic Description Characters"](A)||!!mi["Vertical Forms"](A)||ac.test(String.fromCodePoint(A)));(J_[q]||Y||$.imageName||k!==r.length()-2&&Q_[r.getCharCode(k+1)])&&m.push(Ip(k+1,E,x,m,ev(q,r.getCharCode(k+1),Y&&T),!1))}}var A;return Ap(Ip(r.length(),E,x,m,0,!0))}function Oh(r){let t=.5,n=.5;switch(r){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(r){case"bottom":case"bottom-right":case"bottom-left":n=1;break;case"top":case"top-right":case"top-left":n=0}return{horizontalAlign:t,verticalAlign:n}}function tv(r,t,n){let o=t.getMaxScale()*Br,{maxImageWidth:u,maxImageHeight:f}=t.getMaxImageSize(r),m=Math.max(o,f*n);return{verticalLineContentWidth:Math.max(o,u*n),horizontalLineContentHeight:m}}function Dp(r){switch(r){case"top":return 0;case"center":return .5;default:return 1}}function iv(r,t,n){return!(r===y.ah.horizontal||!t&&!oc(n)||t&&(Tu[n]||(o=n,/\p{sc=Arab}/u.test(String.fromCodePoint(o)))));var o}function rv(r,t,n,o,u,f){let m=f[r.fontStack],x=function(E,A,k,$){if(E&&E.rect)return E;let q=A[k.fontStack],Y=q&&q[$];return Y?{rect:null,metrics:Y.metrics}:null}(m&&m[t],u,r,t);if(x===null)return null;let T;if(n)T=o.verticalLineContentWidth-r.scale*Br;else{let E=Dp(r.verticalAlign);T=(o.horizontalLineContentHeight-r.scale*Br)*E}return{rect:x.rect,metrics:x.metrics,baselineOffset:T}}function nv(r,t,n,o,u){let f=u[r.imageName];if(!f)return null;let m=f.paddedRect,x=f.displaySize,T={width:x[0],height:x[1],left:Ln,top:-3,advance:t?x[1]:x[0]},E;if(t)E=o.verticalLineContentWidth-x[1]*r.scale;else{let A=Dp(r.verticalAlign);E=(o.horizontalLineContentHeight-x[1]*r.scale)*A}return{rect:m,metrics:T,baselineOffset:E,imageOffset:(t?x[0]:x[1])*r.scale-Br*n}}function sv(r,t,n,o){if(o===0)return;let u=r[n],f=(r[n].x+u.metrics.advance*u.scale)*o;for(let m=t;m<=n;m++)r[m].x-=f}function av(r,t,n){let{horizontalAlign:o,verticalAlign:u}=Oh(n),f=t[0]-r.displaySize[0]*o,m=t[1]-r.displaySize[1]*u;return{image:r,top:m,bottom:m+r.displaySize[1],left:f,right:f+r.displaySize[0]}}function kp(r){var t,n;let o=r.left,u=r.top,f=r.right-o,m=r.bottom-u,x=(t=r.image.textFitWidth)!==null&&t!==void 0?t:"stretchOrShrink",T=(n=r.image.textFitHeight)!==null&&n!==void 0?n:"stretchOrShrink",E=(r.image.content[2]-r.image.content[0])/(r.image.content[3]-r.image.content[1]);if(T==="proportional"){if(x==="stretchOnly"&&f/m<E||x==="proportional"){let A=Math.ceil(m*E);o*=A/f,f=A}}else if(x==="proportional"&&T==="stretchOnly"&&E!==0&&f/m>E){let A=Math.ceil(f/E);u*=A/m,m=A}return{x1:o,y1:u,x2:o+f,y2:u+m}}function Lp(r,t,n,o,u,f){let m=r.image,x;if(m.content){let oe=m.content,pe=m.pixelRatio||1;x=[oe[0]/pe,oe[1]/pe,m.displaySize[0]-oe[2]/pe,m.displaySize[1]-oe[3]/pe]}let T=t.left*f,E=t.right*f,A,k,$,q;n==="width"||n==="both"?(q=u[0]+T-o[3],k=u[0]+E+o[1]):(q=u[0]+(T+E-m.displaySize[0])/2,k=q+m.displaySize[0]);let Y=t.top*f,Q=t.bottom*f;return n==="height"||n==="both"?(A=u[1]+Y-o[0],$=u[1]+Q+o[2]):(A=u[1]+(Y+Q-m.displaySize[1])/2,$=A+m.displaySize[1]),{image:m,top:A,right:k,bottom:$,left:q,collisionPadding:x}}let Lc=255,pa=128,ao=Lc*pa;function zp(r,t){let{expression:n}=t;if(n.kind==="constant")return{kind:"constant",layoutSize:n.evaluate(new Wi(r+1))};if(n.kind==="source")return{kind:"source"};{let{zoomStops:o,interpolationType:u}=n,f=0;for(;f<o.length&&o[f]<=r;)f++;f=Math.max(0,f-1);let m=f;for(;m<o.length&&o[m]<r+1;)m++;m=Math.min(o.length-1,m);let x=o[f],T=o[m];return n.kind==="composite"?{kind:"composite",minZoom:x,maxZoom:T,interpolationType:u}:{kind:"camera",minZoom:x,maxZoom:T,minSize:n.evaluate(new Wi(x)),maxSize:n.evaluate(new Wi(T)),interpolationType:u}}}function Nh(r,t,n){let o="never",u=r.get(t);return u?o=u:r.get(n)&&(o="always"),o}
5let ov=Cc.VectorTileFeature.types,lv=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Pu(r,t,n,o,u,f,m,x,T,E,A,k,$){let q=x?Math.min(ao,Math.round(x[0])):0,Y=x?Math.min(ao,Math.round(x[1])):0;r.emplaceBack(t,n,Math.round(32*o),Math.round(32*u),f,m,(q<<1)+(T?1:0),Y,16*E,16*A,256*k,256*$)}function jh(r,t,n){r.emplaceBack(t.x,t.y,n),r.emplaceBack(t.x,t.y,n),r.emplaceBack(t.x,t.y,n),r.emplaceBack(t.x,t.y,n)}function cv(r){for(let t of r.sections)if(dh(t.text))return!0;return!1}class $h{constructor(t){this.layoutVertexArray=new ot,this.indexArray=new pt,this.programConfigurations=t,this.segments=new li,this.dynamicLayoutVertexArray=new ut,this.opacityVertexArray=new at,this.hasVisibleVertices=!1,this.placedSymbolArray=new L}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(t,n,o,u){this.isEmpty()||(o&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,V_.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,n),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,U_.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,lv,!0),this.opacityVertexBuffer.itemSize=1),(o||u)&&this.programConfigurations.upload(t))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}zt("SymbolBuffers",$h);class Vh{constructor(t,n,o){this.layoutVertexArray=new t,this.layoutAttributes=n,this.indexArray=new o,this.segments=new li,this.collisionVertexArray=new Et}upload(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,G_.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}zt("CollisionBuffers",Vh);class Cl{constructor(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(m=>m.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let n=this.layers[0]._unevaluatedLayout._values;this.textSizeData=zp(this.zoom,n["text-size"]),this.iconSizeData=zp(this.zoom,n["icon-size"]);let o=this.layers[0].layout,u=o.get("symbol-sort-key"),f=o.get("symbol-z-order");this.canOverlap=Nh(o,"text-overlap","text-allow-overlap")!=="never"||Nh(o,"icon-overlap","icon-allow-overlap")!=="never"||o.get("text-ignore-placement")||o.get("icon-ignore-placement"),this.sortFeaturesByKey=f!=="viewport-y"&&!u.isConstant(),this.sortFeaturesByY=(f==="viewport-y"||f==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,o.get("symbol-placement")==="point"&&(this.writingModes=o.get("text-writing-mode").map(m=>y.ah[m])),this.stateDependentLayerIds=this.layers.filter(m=>m.isStateDependent()).map(m=>m.id),this.sourceID=t.sourceID}createArrays(){this.text=new $h(new Ra(this.layers,this.zoom,t=>/^text/.test(t))),this.icon=new $h(new Ra(this.layers,this.zoom,t=>/^icon/.test(t))),this.glyphOffsetArray=new K,this.lineVertexArray=new ee,this.symbolInstances=new R,this.textAnchorOffsets=new ue}calculateGlyphDependencies(t,n,o,u,f){for(let m=0;m<t.length;m++)if(n[t.charCodeAt(m)]=!0,(o||u)&&f){let x=Dc[t.charAt(m)];x&&(n[x.charCodeAt(0)]=!0)}}populate(t,n,o){let u=this.layers[0],f=u.layout,m=f.get("text-font"),x=f.get("text-field"),T=f.get("icon-image"),E=(x.value.kind!=="constant"||x.value.value instanceof ar&&!x.value.value.isEmpty()||x.value.value.toString().length>0)&&(m.value.kind!=="constant"||m.value.value.length>0),A=T.value.kind!=="constant"||!!T.value.value||Object.keys(T.parameters).length>0,k=f.get("symbol-sort-key");if(this.features=[],!E&&!A)return;let $=n.iconDependencies,q=n.glyphDependencies,Y=n.availableImages,Q=new Wi(this.zoom);for(let{feature:oe,id:pe,index:Ce,sourceLayerIndex:ye}of t){let G=u._featureFilter.needGeometry,se=da(oe,G);if(!u._featureFilter.filter(Q,se,o))continue;let be,Ge;if(G||(se.geometry=ha(oe)),E){let Ke=u.getValueAndResolveTokens("text-field",se,o,Y),nt=ar.factory(Ke),vt=this.hasRTLText=this.hasRTLText||cv(nt);(!vt||zs.getRTLTextPluginStatus()==="unavailable"||vt&&zs.isParsed())&&(be=q_(nt,u,se))}if(A){let Ke=u.getValueAndResolveTokens("icon-image",se,o,Y);Ge=Ke instanceof Kr?Ke:Kr.fromString(Ke)}if(!be&&!Ge)continue;let mt=this.sortFeaturesByKey?k.evaluate(se,{},o):void 0;if(this.features.push({id:pe,text:be,icon:Ge,index:Ce,sourceLayerIndex:ye,geometry:se.geometry,properties:oe.properties,type:ov[oe.type],sortKey:mt}),Ge&&($[Ge.name]=!0),be){let Ke=m.evaluate(se,{},o).join(","),nt=f.get("text-rotation-alignment")!=="viewport"&&f.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(y.ah.vertical)>=0;for(let vt of be.sections)if(vt.image)$[vt.image.name]=!0;else{let gt=ml(be.toString()),St=vt.fontStack||Ke,ct=q[St]=q[St]||{};this.calculateGlyphDependencies(vt.text,ct,nt,this.allowVerticalPlacement,gt)}}}f.get("symbol-placement")==="line"&&(this.features=function(oe){let pe={},Ce={},ye=[],G=0;function se(Ke){ye.push(oe[Ke]),G++}function be(Ke,nt,vt){let gt=Ce[Ke];return delete Ce[Ke],Ce[nt]=gt,ye[gt].geometry[0].pop(),ye[gt].geometry[0]=ye[gt].geometry[0].concat(vt[0]),gt}function Ge(Ke,nt,vt){let gt=pe[nt];return delete pe[nt],pe[Ke]=gt,ye[gt].geometry[0].shift(),ye[gt].geometry[0]=vt[0].concat(ye[gt].geometry[0]),gt}function mt(Ke,nt,vt){let gt=vt?nt[0][nt[0].length-1]:nt[0][0];return`${Ke}:${gt.x}:${gt.y}`}for(let Ke=0;Ke<oe.length;Ke++){let nt=oe[Ke],vt=nt.geometry,gt=nt.text?nt.text.toString():null;if(!gt){se(Ke);continue}let St=mt(gt,vt),ct=mt(gt,vt,!0);if(St in Ce&&ct in pe&&Ce[St]!==pe[ct]){let Ft=Ge(St,ct,vt),Zt=be(St,ct,ye[Ft].geometry);delete pe[St],delete Ce[ct],Ce[mt(gt,ye[Zt].geometry,!0)]=Zt,ye[Ft].geometry=null}else St in Ce?be(St,ct,vt):ct in pe?Ge(St,ct,vt):(se(Ke),pe[St]=G-1,Ce[ct]=G-1)}return ye.filter(Ke=>Ke.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((oe,pe)=>
vendor: 4,671 bytes, line 5
5oe.sortKey-pe.sortKey)}update(t,n,o){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,n,this.layers,o),this.icon.programConfigurations.updatePaintArrays(t,n,this.layers,o))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(t,n){let o=this.lineVertexArray.length;if(t.segment!==void 0){let u=t.dist(n[t.segment+1]),f=t.dist(n[t.segment]),m={};for(let x=t.segment+1;x<n.length;x++)m[x]={x:n[x].x,y:n[x].y,tileUnitDistanceFromAnchor:u},x<n.length-1&&(u+=n[x+1].dist(n[x]));for(let x=t.segment||0;x>=0;x--)m[x]={x:n[x].x,y:n[x].y,tileUnitDistanceFromAnchor:f},x>0&&(f+=n[x-1].dist(n[x]));for(let x=0;x<n.length;x++){let T=m[x];this.lineVertexArray.emplaceBack(T.x,T.y,T.tileUnitDistanceFromAnchor)}}return{lineStartIndex:o,lineLength:this.lineVertexArray.length-o}}addSymbols(t,n,o,u,f,m,x,T,E,A,k,$){let q=t.indexArray,Y=t.layoutVertexArray,Q=t.segments.prepareSegment(4*n.length,Y,q,this.canOverlap?m.sortKey:void 0),oe=this.glyphOffsetArray.length,pe=Q.vertexLength,Ce=this.allowVerticalPlacement&&x===y.ah.vertical?Math.PI/2:0,ye=m.text&&m.text.sections;for(let G=0;G<n.length;G++){let{tl:se,tr:be,bl:Ge,br:mt,tex:Ke,pixelOffsetTL:nt,pixelOffsetBR:vt,minFontScaleX:gt,minFontScaleY:St,glyphOffset:ct,isSDF:Ft,sectionIndex:Zt}=n[G],Gt=Q.vertexLength,$t=ct[1];Pu(Y,T.x,T.y,se.x,$t+se.y,Ke.x,Ke.y,o,Ft,nt.x,nt.y,gt,St),Pu(Y,T.x,T.y,be.x,$t+be.y,Ke.x+Ke.w,Ke.y,o,Ft,vt.x,nt.y,gt,St),Pu(Y,T.x,T.y,Ge.x,$t+Ge.y,Ke.x,Ke.y+Ke.h,o,Ft,nt.x,vt.y,gt,St),Pu(Y,T.x,T.y,mt.x,$t+mt.y,Ke.x+Ke.w,Ke.y+Ke.h,o,Ft,vt.x,vt.y,gt,St),jh(t.dynamicLayoutVertexArray,T,Ce),q.emplaceBack(Gt,Gt+2,Gt+1),q.emplaceBack(Gt+1,Gt+2,Gt+3),Q.vertexLength+=4,Q.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(ct[0]),G!==n.length-1&&Zt===n[G+1].sectionIndex||t.programConfigurations.populatePaintArrays(Y.length,m,m.index,{},$,ye&&ye[Zt])}t.placedSymbolArray.emplaceBack(T.x,T.y,oe,this.glyphOffsetArray.length-oe,pe,E,A,T.segment,o?o[0]:0,o?o[1]:0,u[0],u[1],x,0,!1,0,k)}_addCollisionDebugVertex(t,n,o,u,f,m){return n.emplaceBack(0,0),t.emplaceBack(o.x,o.y,u,f,Math.round(m.x),Math.round(m.y))}addCollisionDebugVertices(t,n,o,u,f,m,x){let T=f.segments.prepareSegment(4,f.layoutVertexArray,f.indexArray),E=T.vertexLength,A=f.layoutVertexArray,k=f.collisionVertexArray,$=x.anchorX,q=x.anchorY;this._addCollisionDebugVertex(A,k,m,$,q,new ne(t,n)),this._addCollisionDebugVertex(A,k,m,$,q,new ne(o,n)),this._addCollisionDebugVertex(A,k,m,$,q,new ne(o,u)),this._addCollisionDebugVertex(A,k,m,$,q,new ne(t,u)),T.vertexLength+=4;let Y=f.indexArray;Y.emplaceBack(E,E+1),Y.emplaceBack(E+1,E+2),Y.emplaceBack(E+2,E+3),Y.emplaceBack(E+3,E),T.primitiveLength+=4}addDebugCollisionBoxes(t,n,o,u){for(let f=t;f<n;f++){let m=this.collisionBoxArray.get(f);this.addCollisionDebugVertices(m.x1,m.y1,m.x2,m.y2,u?this.textCollisionBox:this.iconCollisionBox,m.anchorPoint,o)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Vh(It,xp.members,Nt),this.iconCollisionBox=new Vh(It,xp.members,Nt);for(let t=0;t<this.symbolInstances.length;t++){let n=this.symbolInstances.get(t);this.addDebugCollisionBoxes(n.textBoxStartIndex,n.textBoxEndIndex,n,!0),this.addDebugCollisionBoxes(n.verticalTextBoxStartIndex,n.verticalTextBoxEndIndex,n,!0),this.addDebugCollisionBoxes(n.iconBoxStartIndex,n.iconBoxEndIndex,n,!1),this.addDebugCollisionBoxes(n.verticalIconBoxStartIndex,n.verticalIconBoxEndIndex,n,!1)}}_deserializeCollisionBoxesForSymbol(t,n,o,u,f,m,x,T,E){let A={};for(let k=n;k<o;k++){let $=t.get(k);A.textBox={x1:$.x1,y1:$.y1,x2:$.x2,y2:$.y2,anchorPointX:$.anchorPointX,anchorPointY:$.anchorPointY},A.textFeatureIndex=$.featureIndex;break}for(let k=u;k<f;k++){let $=t.get(k);A.verticalTextBox={x1:$.x1,y1:$.y1,x2:$.x2,y2:$.y2,anchorPointX:$.anchorPointX,anchorPointY:$.anchorPointY},A.verticalTextFeatureIndex=$.featureIndex;break}for(let k=m;k<x;k++){let $=t.get(k);A.iconBox={x1:$.x1,y1:$.y1,x2:$.x2,y2:$.y2,anchorPointX:$.anchorPointX,anchorPointY:$.anchorPointY}
vendor: 11,803 bytes, line 5
5,A.iconFeatureIndex=$.featureIndex;break}for(let k=T;k<E;k++){let $=t.get(k);A.verticalIconBox={x1:$.x1,y1:$.y1,x2:$.x2,y2:$.y2,anchorPointX:$.anchorPointX,anchorPointY:$.anchorPointY},A.verticalIconFeatureIndex=$.featureIndex;break}return A}deserializeCollisionBoxes(t){this.collisionArrays=[];for(let n=0;n<this.symbolInstances.length;n++){let o=this.symbolInstances.get(n);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,o.textBoxStartIndex,o.textBoxEndIndex,o.verticalTextBoxStartIndex,o.verticalTextBoxEndIndex,o.iconBoxStartIndex,o.iconBoxEndIndex,o.verticalIconBoxStartIndex,o.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(t,n){let o=t.placedSymbolArray.get(n),u=o.vertexStartIndex+4*o.numGlyphs;for(let f=o.vertexStartIndex;f<u;f+=4)t.indexArray.emplaceBack(f,f+2,f+1),t.indexArray.emplaceBack(f+1,f+2,f+3)}getSortedSymbolIndexes(t){if(this.sortedAngle===t&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;let n=Math.sin(t),o=Math.cos(t),u=[],f=[],m=[];for(let x=0;x<this.symbolInstances.length;++x){m.push(x);let T=this.symbolInstances.get(x);u.push(0|Math.round(n*T.anchorX+o*T.anchorY)),f.push(T.featureIndex)}return m.sort((x,T)=>u[x]-u[T]||f[T]-f[x]),m}addToSortKeyRanges(t,n){let o=this.sortKeyRanges[this.sortKeyRanges.length-1];o&&o.sortKey===n?o.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:n,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let n of this.symbolInstanceIndexes){let o=this.symbolInstances.get(n);this.featureSortOrder.push(o.featureIndex),[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((u,f,m)=>{u>=0&&m.indexOf(u)===f&&this.addIndicesForPlacedSymbol(this.text,u)}),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Rp,Bp;zt("SymbolBucket",Cl,{omit:["layers","collisionBoxArray","features","compareText"]}),Cl.MAX_GLYPHS=65535,Cl.addDynamicAttributes=jh;var Uh={get paint(){return Bp=Bp||new Tn({"icon-opacity":new Wt(W.paint_symbol["icon-opacity"]),"icon-color":new Wt(W.paint_symbol["icon-color"]),"icon-halo-color":new Wt(W.paint_symbol["icon-halo-color"]),"icon-halo-width":new Wt(W.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Wt(W.paint_symbol["icon-halo-blur"]),"icon-translate":new Ut(W.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ut(W.paint_symbol["icon-translate-anchor"]),"text-opacity":new Wt(W.paint_symbol["text-opacity"]),"text-color":new Wt(W.paint_symbol["text-color"],{runtimeType:ti,getOverride:r=>r.textColor,hasOverride:r=>!!r.textColor}),"text-halo-color":new Wt(W.paint_symbol["text-halo-color"]),"text-halo-width":new Wt(W.paint_symbol["text-halo-width"]),"text-halo-blur":new Wt(W.paint_symbol["text-halo-blur"]),"text-translate":new Ut(W.paint_symbol["text-translate"]),"text-translate-anchor":new Ut(W.paint_symbol["text-translate-anchor"])})},get layout(){return Rp=Rp||new Tn({"symbol-placement":new Ut(W.layout_symbol["symbol-placement"]),"symbol-spacing":new Ut(W.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ut(W.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Wt(W.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ut(W.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ut(W.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Ut(W.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Ut(W.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ut(W.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ut(W.layout_symbol["icon-rotation-alignment"]),"icon-size":new Wt(W.layout_symbol["icon-size"]),"icon-text-fit":new Ut(W.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ut(W.layout_symbol["icon-text-fit-padding"]),"icon-image":new Wt(W.layout_symbol["icon-image"]),"icon-rotate":new Wt(W.layout_symbol["icon-rotate"]),"icon-padding":new Wt(W.layout_symbol["icon-padding"]),"icon-keep-upright":new Ut(W.layout_symbol["icon-keep-upright"]),"icon-offset":new Wt(W.layout_symbol["icon-offset"]),"icon-anchor":new Wt(W.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ut(W.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ut(W.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ut(W.layout_symbol["text-rotation-alignment"]),"text-field":new Wt(W.layout_symbol["text-field"]),"text-font":new Wt(W.layout_symbol["text-font"]),"text-size":new Wt(W.layout_symbol["text-size"]),"text-max-width":new Wt(W.layout_symbol["text-max-width"]),"text-line-height":new Ut(W.layout_symbol["text-line-height"]),"text-letter-spacing":new Wt(W.layout_symbol["text-letter-spacing"]),"text-justify":new Wt(W.layout_symbol["text-justify"]),"text-radial-offset":new Wt(W.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ut(W.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Wt(W.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Wt(W.layout_symbol["text-anchor"]),"text-max-angle":new Ut(W.layout_symbol["text-max-angle"]),"text-writing-mode":new Ut(W.layout_symbol["text-writing-mode"]),"text-rotate":new Wt(W.layout_symbol["text-rotate"]),"text-padding":new Ut(W.layout_symbol["text-padding"]),"text-keep-upright":new Ut(W.layout_symbol["text-keep-upright"]),"text-transform":new Wt(W.layout_symbol["text-transform"]),"text-offset":new Wt(W.layout_symbol["text-offset"]),"text-allow-overlap":new Ut(W.layout_symbol["text-allow-overlap"]),"text-overlap":new Ut(W.layout_symbol["text-overlap"]),"text-ignore-placement":new Ut(W.layout_symbol["text-ignore-placement"]),"text-optional":new Ut(W.layout_symbol["text-optional"])})}};class Fp{constructor(t){if(t.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=t.property.overrides?t.property.overrides.runtimeType:di,this.defaultValue=t}evaluate(t){if(t.formattedSection){let n=this.defaultValue.property.overrides;if(n&&n.hasOverride(t.formattedSection))return n.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}zt("FormatSectionOverride",Fp,{omit:["defaultValue"]});class Eu extends pn{constructor(t){super(t,Uh)}recalculate(t,n){if(super.recalculate(t,n),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let o=this.layout.get("text-writing-mode");if(o){let u=[];for(let f of o)u.indexOf(f)<0&&u.push(f);this.layout._values["text-writing-mode"]=u}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,n,o,u){let f=this.layout.get(t).evaluate(n,{},o,u),m=this._unevaluatedLayout._values[t];return m.isDataDriven()||ko(m.value)||!f?f:function(x,T){return T.replace(/{([^{}]+)}/g,(E,A)=>x&&A in x?String(x[A]):"")}(n.properties,f)}createBucket(t){return new Cl(t)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let t of Uh.paint.overridableProperties){if(!Eu.hasPaintOverride(this.layout,t))continue;let n=this.paint.get(t),o=new Fp(n),u=new Xa(o,n.property.specification),f=null;f=n.value.kind==="constant"||n.value.kind==="source"?new Wl("source",u):new Xl("composite",u,n.value.zoomStops),this.paint._values[t]=new ys(n.property,f,n.parameters)}}_handleOverridablePaintPropertyUpdate(t,n,o){return!(!this.layout||n.isDataDriven()||o.isDataDriven())&&Eu.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,n){let o=t.get("text-field"),u=Uh.paint.properties[n],f=!1,m=x=>{for(let T of x)if(u.overrides&&u.overrides.hasOverride(T))return void(f=!0)};if(o.value.kind==="constant"&&o.value.value instanceof ar)m(o.value.value.sections);else if(o.value.kind==="source"){let x=E=>{f||(E instanceof ds&&Gi(E.value)===ji?m(E.value.sections):E instanceof We?m(E.sections):E.eachChild(x))},T=o.value;T._styleExpression&&x(T._styleExpression.expression)}return f}}let Op;var uv={get paint(){return Op=Op||new Tn({"background-color":new Ut(W.paint_background["background-color"]),"background-pattern":new uc(W.paint_background["background-pattern"]),"background-opacity":new Ut(W.paint_background["background-opacity"])})}};class hv extends pn{constructor(t){super(t,uv)}}let Np;var dv={get paint(){return Np=Np||new Tn({"raster-opacity":new Ut(W.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ut(W.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ut(W.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ut(W.paint_raster["raster-brightness-max"]),"raster-saturation":new Ut(W.paint_raster["raster-saturation"]),"raster-contrast":new Ut(W.paint_raster["raster-contrast"]),"raster-resampling":new Ut(W.paint_raster["raster-resampling"]),"raster-fade-duration":new Ut(W.paint_raster["raster-fade-duration"])})}};class pv extends pn{constructor(t){super(t,dv)}}class fv extends pn{constructor(t){super(t,{}),this.onAdd=n=>{this.implementation.onAdd&&this.implementation.onAdd(n,n.painter.context.gl)},this.onRemove=n=>{this.implementation.onRemove&&this.implementation.onRemove(n,n.painter.context.gl)},this.implementation=t}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class mv{constructor(t){this._methodToThrottle=t,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let gv={once:!0},Gh=63710088e-1;class oo{constructor(t,n){if(isNaN(t)||isNaN(n))throw new Error(`Invalid LngLat object: (${t}, ${n})`);
5if(this.lng=+t,this.lat=+n,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new oo(Pi(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){let n=Math.PI/180,o=this.lat*n,u=t.lat*n,f=Math.sin(o)*Math.sin(u)+Math.cos(o)*Math.cos(u)*Math.cos((t.lng-this.lng)*n);return Gh*Math.acos(Math.min(f,1))}static convert(t){if(t instanceof oo)return t;if(Array.isArray(t)&&(t.length===2||t.length===3))return new oo(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&typeof t=="object"&&t!==null)return new oo(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}let jp=2*Math.PI*Gh;function $p(r){return jp*Math.cos(r*Math.PI/180)}function Vp(r){return(180+r)/360}function Up(r){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360}function Gp(r,t){return r/$p(t)}function Hh(r){return 360/Math.PI*Math.atan(Math.exp((180-360*r)*Math.PI/180))-90}function Hp(r,t){return r*$p(Hh(t))}class zc{constructor(t,n,o=0){this.x=+t,this.y=+n,this.z=+o}static fromLngLat(t,n=0){let o=oo.convert(t);return new zc(Vp(o.lng),Up(o.lat),Gp(n,o.lat))}toLngLat(){return new oo(360*this.x-180,Hh(this.y))}toAltitude(){return Hp(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/jp*(t=Hh(this.y),1/Math.cos(t*Math.PI/180));var t}}function qp(r,t,n){var o=2*Math.PI*6378137/256/Math.pow(2,n);return[r*o-2*Math.PI*6378137/2,t*o-2*Math.PI*6378137/2]}class qh{constructor(t,n,o){if(!function(u,f,m){return!(u<0||u>25||m<0||m>=Math.pow(2,u)||f<0||f>=Math.pow(2,u))}(t,n,o))throw new Error(`x=${n}, y=${o}, z=${t} outside of bounds. 0<=x<${Math.pow(2,t)}, 0<=y<${Math.pow(2,t)} 0<=z<=25 `);this.z=t,this.x=n,this.y=o,this.key=Il(0,t,t,n,o)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,n,o){let u=(m=this.y,x=this.z,T=qp(256*(f=this.x),256*(m=Math.pow(2,x)-m-1),x),E=qp(256*(f+1),256*(m+1),x),T[0]+","+T[1]+","+E[0]+","+E[1]);var f,m,x,T,E;let A=function(k,$,q){let Y,Q="";for(let oe=k;oe>0;oe--)Y=1<<oe-1,Q+=($&Y?1:0)+(q&Y?2:0);return Q}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(o==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,n>1?"@2x":"").replace(/{quadkey}/g,A).replace(/{bbox-epsg-3857}/g,u)}isChildOf(t){let n=this.z-t.z;return n>0&&t.x===this.x>>n&&t.y===this.y>>n}getTilePoint(t){let n=Math.pow(2,this.z);return new ne((t.x*n-this.x)*Ye,(t.y*n-this.y)*Ye)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Zp{constructor(t,n){this.wrap=t,this.canonical=n,this.key=Il(t,n.z,n.z,n.x,n.y)}}class is{constructor(t,n,o,u,f){if(this.terrainRttPosMatrix32f=null,t<o)throw new Error(`overscaledZ should be >= z; overscaledZ = ${t}; z = ${o}`);this.overscaledZ=t,this.wrap=n,this.canonical=new qh(o,+u,+f),this.key=Il(n,t,o,u,f)}clone(){return new is(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);let n=this.canonical.z-t;return t>this.canonical.z?new is(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new is(t,this.wrap,t,this.canonical.x>>n,this.canonical.y>>n)}calculateScaledKey(t,n){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);let o=this.canonical.z-t;return t>this.canonical.z?Il(this.wrap*+n,t,this.canonical.z,this.canonical.x,this.canonical.y):Il(this.wrap*+n,t,t,this.canonical.x>>o,this.canonical.y>>o)}isChildOf(t){if(t.wrap!==this.wrap)return!1;let n=this.canonical.z-t.canonical.z;return t.overscaledZ===0||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>n&&t.canonical.y===this.canonical.y>>n}children(t){if(this.overscaledZ>=t)return[new is(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let n=this.canonical.z+1,o=2*this.canonical.x,u=2*this.canonical.y;return[new is(n,this.wrap,n,o,u),new is(n,this.wrap,n,o+1,u),new is(n,this.wrap,n,o,u+1),new is(n,this.wrap,n,o+1,u+1)]}isLessThan(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>
5t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))}wrapped(){return new is(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(t){return new is(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Zp(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(t){return this.canonical.getTilePoint(new zc(t.x-this.wrap,t.y))}}function Il(r,t,n,o,u){(r*=2)<0&&(r=-1*r-1);let f=1<<n;return(f*f*r+f*u+o).toString(36)+n.toString(36)+t.toString(36)}zt("CanonicalTileID",qh),zt("OverscaledTileID",is,{omit:["terrainRttPosMatrix32f"]});class Wp{constructor(t,n,o,u=1,f=1,m=1,x=0){if(this.uid=t,n.height!==n.width)throw new RangeError("DEM tiles must be square");if(o&&!["mapbox","terrarium","custom"].includes(o))return void si(`"${o}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=n.height;let T=this.dim=n.height-2;switch(this.data=new Uint32Array(n.data.buffer),o){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=u,this.greenFactor=f,this.blueFactor=m,this.baseShift=x;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let E=0;E<T;E++)this.data[this._idx(-1,E)]=this.data[this._idx(0,E)],this.data[this._idx(T,E)]=this.data[this._idx(T-1,E)],this.data[this._idx(E,-1)]=this.data[this._idx(E,0)],this.data[this._idx(E,T)]=this.data[this._idx(E,T-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(T,-1)]=this.data[this._idx(T-1,0)],this.data[this._idx(-1,T)]=this.data[this._idx(0,T-1)],this.data[this._idx(T,T)]=this.data[this._idx(T-1,T-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let E=0;E<T;E++)for(let A=0;A<T;A++){let k=this.get(E,A);k>this.max&&(this.max=k),k<this.min&&(this.min=k)}}get(t,n){let o=new Uint8Array(this.data.buffer),u=4*this._idx(t,n);return this.unpack(o[u],o[u+1],o[u+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(t,n){if(t<-1||t>=this.dim+1||n<-1||n>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(n+1)*this.stride+(t+1)}unpack(t,n,o){return t*this.redFactor+n*this.greenFactor+o*this.blueFactor-this.baseShift}getPixels(){return new ts({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(t,n,o){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let u=n*this.dim,f=n*this.dim+this.dim,m=o*this.dim,x=o*this.dim+this.dim;switch(n){case-1:u=f-1;break;case 1:f=u+1}switch(o){case-1:m=x-1;break;case 1:x=m+1}let T=-n*this.dim,E=-o*this.dim;for(let A=m;A<x;A++)for(let k=u;k<f;k++)this.data[this._idx(k,A)]=t.data[this._idx(k+T,A+E)]}}zt("DEMData",Wp);class Xp{constructor(t){this._stringToNumber={},this._numberToString=[];for(let n=0;n<t.length;n++){let o=t[n];this._stringToNumber[o]=n,this._numberToString[n]=o}}encode(t){return this._stringToNumber[t]}decode(t){if(t>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${t} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[t]}}class Yp{constructor(t,n,o,u,f){this.type="Feature",this._vectorTileFeature=t,t._z=n,t._x=o,t._y=u,this.properties=t.properties,this.id=f}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(t){this._geometry=t}toJSON(){let t={geometry:this.geometry};for(let n in this)n!=="_geometry"&&n!=="_vectorTileFeature"&&(t[n]=this[n]);return t}}class Kp{constructor(t,n){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Bo(Ye,16,0),this.grid3D=new Bo(Ye,16,0),this.featureIndexArray=new me,this.promoteId=n}insert(t,n,o,u,f,m){let x=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(o,u,f);let T=m?this.grid3D:this.grid;for(let E=0;E<n.length;E++){let A=n[E],k=[1/0,1/0,-1/0,-1/0];for(let $=0;$<A.length;$++){let q=A[$];k[0]=Math.min(k[0],q.x),k[1]=Math.min(k[1],q.y),k[2]=Math.max(k[2],q.x),k[3]=Math.max(k[3],q.y)}k[0]<Ye&&k[1]<Ye&&k[2]>=0&&k[3]>=0&&T.insert(x,k[0],k[1],k[2],k[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Cc.VectorTile(new zh(this.rawTileData)).layers,this.sourceLayerCoder=new Xp(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(t,n,o,u){this.loadVTLayers();let f=t.params,m=Ye/t.tileSize/t.scale,x=Yl(f.filter),T=t.queryGeometry,E=t.queryPadding*m,A=Qp(T),k=this.grid.query(A.minX-E,A.minY-E,A.maxX+E,A.maxY+E),$=Qp(t.cameraQueryGeometry),q=this.grid3D.query($.minX-E,$.minY-E,$.maxX+E,$.maxY+E,(oe,pe,Ce,ye)=>function(G,se,be,Ge,mt){for(let nt of G)if(se<=nt.x&&be<=nt.y&&Ge>=nt.x&&mt>=nt.y)return!0;let Ke=[new ne(se,be),new ne(se,mt),new ne(Ge,mt),new ne(Ge,be)];if(G.length>2){for(let nt of Ke)if(Ho(G,nt))return!0}for(let nt=0;nt<G.length-1;nt++)if(n_(G[nt],G[nt+1],Ke))return!0;return!1}(t.cameraQueryGeometry,oe-E,pe-E,Ce+E,ye+E));for(let oe of q)k.push(oe);k.sort(yv);let Y={},Q;for(let oe=0;oe<k.length;oe++){let pe=k[oe];if(pe===Q)continue;Q=pe;let Ce=this.featureIndexArray.get(pe),ye=null;
5this.loadMatchingFeature(Y,Ce.bucketIndex,Ce.sourceLayerIndex,Ce.featureIndex,x,f.layers,f.availableImages,n,o,u,(G,se,be)=>(ye||(ye=ha(G)),se.queryIntersectsFeature({queryGeometry:T,feature:G,featureState:be,geometry:ye,zoom:this.z,transform:t.transform,pixelsToTileUnits:m,pixelPosMatrix:t.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:t.getElevation})))}return Y}loadMatchingFeature(t,n,o,u,f,m,x,T,E,A,k){let $=this.bucketLayerIDs[n];if(m&&!$.some(oe=>m.has(oe)))return;let q=this.sourceLayerCoder.decode(o),Y=this.vtLayers[q].feature(u);if(f.needGeometry){let oe=da(Y,!0);if(!f.filter(new Wi(this.tileID.overscaledZ),oe,this.tileID.canonical))return}else if(!f.filter(new Wi(this.tileID.overscaledZ),Y))return;let Q=this.getId(Y,q);for(let oe=0;oe<$.length;oe++){let pe=$[oe];if(m&&!m.has(pe))continue;let Ce=T[pe];if(!Ce)continue;let ye={};Q&&A&&(ye=A.getState(Ce.sourceLayer||"_geojsonTileLayer",Q));let G=Ai({},E[pe]);G.paint=Jp(G.paint,Ce.paint,Y,ye,x),G.layout=Jp(G.layout,Ce.layout,Y,ye,x);let se=!k||k(Y,Ce,ye);if(!se)continue;let be=new Yp(Y,this.z,this.x,this.y,Q);be.layer=G;let Ge=t[pe];Ge===void 0&&(Ge=t[pe]=[]),Ge.push({featureIndex:u,feature:be,intersectionZ:se})}}lookupSymbolFeatures(t,n,o,u,f,m,x,T){let E={};this.loadVTLayers();let A=Yl(f);for(let k of t)this.loadMatchingFeature(E,o,u,k,A,m,x,T,n);return E}hasLayer(t){for(let n of this.bucketLayerIDs)for(let o of n)if(t===o)return!0;return!1}getId(t,n){var o;let u=t.id;return this.promoteId&&(u=t.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[n]],typeof u=="boolean"&&(u=Number(u)),u===void 0&&(!((o=t.properties)===null||o===void 0)&&o.cluster)&&this.promoteId&&(u=Number(t.properties.cluster_id))),u}}function Jp(r,t,n,o,u){return wt(r,(f,m)=>{let x=t instanceof jo?t.get(m):null;return x&&x.evaluate?x.evaluate(n,o,u):x})}function Qp(r){let t=1/0,n=1/0,o=-1/0,u=-1/0;for(let f of r)t=Math.min(t,f.x),n=Math.min(n,f.y),o=Math.max(o,f.x),u=Math.max(u,f.y);return{minX:t,minY:n,maxX:o,maxY:u}}function yv(r,t){return t-r}function ef(r,t,n,o,u){let f=[];for(let m=0;m<r.length;m++){let x=r[m],T;for(let E=0;E<x.length-1;E++){let A=x[E],k=x[E+1];A.x<t&&k.x<t||(A.x<t?A=new ne(t,A.y+(t-A.x)/(k.x-A.x)*(k.y-A.y))._round():k.x<t&&(k=new ne(t,A.y+(t-A.x)/(k.x-A.x)*(k.y-A.y))._round()),A.y<n&&k.y<n||(A.y<n?A=new ne(A.x+(n-A.y)/(k.y-A.y)*(k.x-A.x),n)._round():k.y<n&&(k=new ne(A.x+(n-A.y)/(k.y-A.y)*(k.x-A.x),n)._round()),A.x>=o&&k.x>=o||(A.x>=o?A=new ne(o,A.y+(o-A.x)/(k.x-A.x)*(k.y-A.y))._round():k.x>=o&&(k=new ne(o,A.y+(o-A.x)/(k.x-A.x)*(k.y-A.y))._round()),A.y>=u&&k.y>=u||(A.y>
vendor: 6,082 bytes, line 5
5=u?A=new ne(A.x+(u-A.y)/(k.y-A.y)*(k.x-A.x),u)._round():k.y>=u&&(k=new ne(A.x+(u-A.y)/(k.y-A.y)*(k.x-A.x),u)._round()),T&&A.equals(T[T.length-1])||(T=[A],f.push(T)),T.push(k)))))}}return f}zt("FeatureIndex",Kp,{omit:["rawTileData","sourceLayerCoder"]});class lo extends ne{constructor(t,n,o,u){super(t,n),this.angle=o,u!==void 0&&(this.segment=u)}clone(){return new lo(this.x,this.y,this.angle,this.segment)}}function tf(r,t,n,o,u){if(t.segment===void 0||n===0)return!0;let f=t,m=t.segment+1,x=0;for(;x>-n/2;){if(m--,m<0)return!1;x-=r[m].dist(f),f=r[m]}x+=r[m].dist(r[m+1]),m++;let T=[],E=0;for(;x<n/2;){let A=r[m],k=r[m+1];if(!k)return!1;let $=r[m-1].angleTo(A)-A.angleTo(k);for($=Math.abs(($+3*Math.PI)%(2*Math.PI)-Math.PI),T.push({distance:x,angleDelta:$}),E+=$;x-T[0].distance>o;)E-=T.shift().angleDelta;if(E>u)return!1;m++,x+=A.dist(k)}return!0}function rf(r){let t=0;for(let n=0;n<r.length-1;n++)t+=r[n].dist(r[n+1]);return t}function nf(r,t,n){return r?.6*t*n:0}function sf(r,t){return Math.max(r?r.right-r.left:0,t?t.right-t.left:0)}function _v(r,t,n,o,u,f){let m=nf(n,u,f),x=sf(n,o)*f,T=0,E=rf(r)/2;for(let A=0;A<r.length-1;A++){let k=r[A],$=r[A+1],q=k.dist($);if(T+q>E){let Y=(E-T)/q,Q=Cn.number(k.x,$.x,Y),oe=Cn.number(k.y,$.y,Y),pe=new lo(Q,oe,$.angleTo(k),A);return pe._round(),!m||tf(r,pe,x,m,t)?pe:void 0}T+=q}}function vv(r,t,n,o,u,f,m,x,T){let E=nf(o,f,m),A=sf(o,u),k=A*m,$=r[0].x===0||r[0].x===T||r[0].y===0||r[0].y===T;return t-k<t/4&&(t=k+t/4),af(r,$?t/2*x%t:(A/2+2*f)*m*x%t,t,E,n,k,$,!1,T)}function af(r,t,n,o,u,f,m,x,T){let E=f/2,A=rf(r),k=0,$=t-n,q=[];for(let Y=0;Y<r.length-1;Y++){let Q=r[Y],oe=r[Y+1],pe=Q.dist(oe),Ce=oe.angleTo(Q);for(;$+n<k+pe;){$+=n;let ye=($-k)/pe,G=Cn.number(Q.x,oe.x,ye),se=Cn.number(Q.y,oe.y,ye);if(G>=0&&G<T&&se>=0&&se<T&&$-E>=0&&$+E<=A){let be=new lo(G,se,Ce,Y);be._round(),o&&!tf(r,be,f,o,u)||q.push(be)}}k+=pe}return x||q.length||m||(q=af(r,k/2,n,o,u,f,m,!0,T)),q}zt("Anchor",lo);let Rc=Ln;function of(r,t,n,o){let u=[],f=r.image,m=f.pixelRatio,x=f.paddedRect.w-2*Rc,T=f.paddedRect.h-2*Rc,E={x1:r.left,y1:r.top,x2:r.right,y2:r.bottom},A=f.stretchX||[[0,x]],k=f.stretchY||[[0,T]],$=(ct,Ft)=>ct+Ft[1]-Ft[0],q=A.reduce($,0),Y=k.reduce($,0),Q=x-q,oe=T-Y,pe=0,Ce=q,ye=0,G=Y,se=0,be=Q,Ge=0,mt=oe;if(f.content&&o){let ct=f.content,Ft=ct[2]-ct[0],Zt=ct[3]-ct[1];(f.textFitWidth||f.textFitHeight)&&(E=kp(r)),pe=Mu(A,0,ct[0]),ye=Mu(k,0,ct[1]),Ce=Mu(A,ct[0],ct[2]),G=Mu(k,ct[1],ct[3]),se=ct[0]-pe,Ge=ct[1]-ye,be=Ft-Ce,mt=Zt-G}let Ke=E.x1,nt=E.y1,vt=E.x2-Ke,gt=E.y2-nt,St=(ct,Ft,Zt,Gt)=>{let $t=Cu(ct.stretch-pe,Ce,vt,Ke),vi=Iu(ct.fixed-se,be,ct.stretch,q),dr=Cu(Ft.stretch-ye,G,gt,nt),Fr=Iu(Ft.fixed-Ge,mt,Ft.stretch,Y),an=Cu(Zt.stretch-pe,Ce,vt,Ke),rs=Iu(Zt.fixed-se,be,Zt.stretch,q),zn=Cu(Gt.stretch-ye,G,gt,nt),en=Iu(Gt.fixed-Ge,mt,Gt.stretch,Y),nr=new ne($t,dr),Hr=new ne(an,dr),tn=new ne(an,zn),rn=new ne($t,zn),En=new ne(vi/m,Fr/m),ns=new ne(rs/m,en/m),qr=t*Math.PI/180;if(qr){let Zr=Math.sin(qr),Wr=Math.cos(qr),Er=[Wr,-Zr,Zr,Wr];nr._matMult(Er),Hr._matMult(Er),rn._matMult(Er),tn._matMult(Er)}let Rn=ct.stretch+ct.fixed,Or=Ft.stretch+Ft.fixed;return{tl:nr,tr:Hr,bl:rn,br:tn,tex:{x:f.paddedRect.x+Rc+Rn,y:f.paddedRect.y+Rc+Or,w:Zt.stretch+Zt.fixed-Rn,h:Gt.stretch+Gt.fixed-Or},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:En,pixelOffsetBR:ns,minFontScaleX:be/m/vt,minFontScaleY:mt/m/gt,isSDF:n}};if(o&&(f.stretchX||f.stretchY)){let ct=lf(A,Q,q),Ft=lf(k,oe,Y);for(let Zt=0;Zt<ct.length-1;Zt++){let Gt=ct[Zt],$t=ct[Zt+1];for(let vi=0;vi<Ft.length-1;vi++)u.push(St(Gt,Ft[vi],$t,Ft[vi+1]))}}else u.push(St({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:x+1},{fixed:0,stretch:T+1}));return u}function Mu(r,t,n){let o=0;for(let u of r)o+=Math.max(t,Math.min(n,u[1]))-Math.max(t,Math.min(n,u[0]));return o}function lf(r,t,n){let o=[{fixed:-1,stretch:0}];for(let[u,f]of r){let m=o[o.length-1];o.push({fixed:u-m.stretch,stretch:m.stretch}),o.push({fixed:u-m.stretch,stretch:m.stretch+(f-u)})}return o.push({fixed:t+Rc,stretch:n}),o}function Cu(r,t,n,o){return r/t*n+o}function Iu(r,t,n,o){return r-t*n/o}class Au{constructor(t,n,o,u,f,m,x,T,E,A){var k;if(this.boxStartIndex=t.length,E){let $=m.top,q=m.bottom,Y=m.collisionPadding;Y&&($-=Y[1],q+=Y[3]);let Q=q-$;Q>0&&(Q=Math.max(10,Q),this.circleDiameter=Q)}else{let $=!((k=m.image)===null||k===void 0)&&k.content&&(m.image.textFitWidth||m.image.textFitHeight)?kp(m):{x1:m.left,y1:m.top,x2:m.right,y2:m.bottom};$.y1=$.y1*x-T[0],$.y2=$.y2*x+T[2],$.x1=$.x1*x-T[3],$.x2=$.x2*x+T[1];let q=m.collisionPadding;if(q&&($.x1-=q[0]*x,$.y1-=q[1]*x,$.x2+=q[2]*x,$.y2+=q[3]*x),A){let Y=new ne($.x1,$.y1),Q=new ne($.x2,$.y1),oe=new ne($.x1,$.y2),pe=new ne($.x2,$.y2),Ce=A*Math.PI/180;Y._rotate(Ce),Q._rotate(Ce),oe._rotate(Ce),pe._rotate(Ce),$.x1=Math.min(Y.x,Q.x,oe.x,pe.x),$.x2=Math.max(Y.x,Q.x,oe.x,pe.x),$.y1=Math.min(Y.y,Q.y,oe.y,pe.y),$.y2=Math.max(Y.y,Q.y,oe.y,pe.y)}t.emplaceBack(n.x,n.y,$.x1,$.y1,$.x2,$.y2,o,u,f)}this.boxEndIndex=t.length}}class bv{constructor(t=[],n=(o,u)=>o<u?-1:o>u?1:0){if(this.data=t,this.length=this.data.length,this.compare=n,this.length>0)for(let o=(this.length>>1)-1;o>=0;o--)this._down(o)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;let t=this.data[0],n=this.data.pop();return--this.length>0&&(this.data[0]=n,this._down(0)),t}peek(){return this.data[0]}_up(t){let{data:n,compare:o}=this,u=n[t];for(;t>0;){let f=t-1>>1,m=n[f];if(o(u,m)>=0)break;n[t]=m,t=f}n[t]=u}_down(t){let{data:n,compare:o}=this,u=this.length>>1,f=n[t];for(;t<u;){let m=1+(t<<1),x=m+1;if(x<this.length&&o(n[x],n[m])<0&&(m=x),o(n[m],f)>=0)break;n[t]=n[m],t=m}n[t]=f}}function xv(r,t=1,n=!1){let o=1/0,u=1/0,f=-1/0,m=-1/0,x=r[0];for(let q=0;q<x.length;q++){let Y=x[q];(!q||Y.x<o)&&(o=Y.x),(!q||Y.y<u)&&(u=Y.y),(!q||Y.x>f)&&(f=Y.x),(!q||Y.y>m)&&(m=Y.y)}let T=Math.min(f-o,m-u),E=T/2,A=new bv([],wv);if(T===0)return new ne(o,u);for(let q=o;q<f;q+=T)for(let Y=u;Y<m;Y+=T)A.push(new Al(q+E,Y+E,E,r));let k=function(q){let Y=0,Q=0,oe=0,pe=q[0];for(let Ce=0,ye=pe.length,G=ye-1;Ce<ye;G=Ce++){let se=pe[Ce],be=pe[G],Ge=se.x*be.y-be.x*se.y;
5Q+=(se.x+be.x)*Ge,oe+=(se.y+be.y)*Ge,Y+=3*Ge}return new Al(Q/Y,oe/Y,0,q)}(r),$=A.length;for(;A.length;){let q=A.pop();(q.d>k.d||!k.d)&&(k=q,n&&console.log("found best %d after %d probes",Math.round(1e4*q.d)/1e4,$)),q.max-k.d<=t||(E=q.h/2,A.push(new Al(q.p.x-E,q.p.y-E,E,r)),A.push(new Al(q.p.x+E,q.p.y-E,E,r)),A.push(new Al(q.p.x-E,q.p.y+E,E,r)),A.push(new Al(q.p.x+E,q.p.y+E,E,r)),$+=4)}return n&&(console.log(`num probes: ${$}`),console.log(`best distance: ${k.d}`)),k.p}function wv(r,t){return t.max-r.max}function Al(r,t,n,o){this.p=new ne(r,t),this.h=n,this.d=function(u,f){let m=!1,x=1/0;for(let T=0;T<f.length;T++){let E=f[T];for(let A=0,k=E.length,$=k-1;A<k;$=A++){let q=E[A],Y=E[$];q.y>u.y!=Y.y>u.y&&u.x<(Y.x-q.x)*(u.y-q.y)/(Y.y-q.y)+q.x&&(m=!m),x=Math.min(x,$d(u,q,Y))}}return(m?1:-1)*Math.sqrt(x)}(this.p,o),this.max=this.d+this.h*Math.SQRT2}var sn;y.ay=void 0,(sn=y.ay||(y.ay={}))[sn.center=1]="center",sn[sn.left=2]="left",sn[sn.right=3]="right",sn[sn.top=4]="top",sn[sn.bottom=5]="bottom",sn[sn["top-left"]=6]="top-left",sn[sn["top-right"]=7]="top-right",sn[sn["bottom-left"]=8]="bottom-left",sn[sn["bottom-right"]=9]="bottom-right";let co=7,Zh=Number.POSITIVE_INFINITY;function cf(r,t){return t[1]!==Zh?function(n,o,u){let f=0,m=0;switch(o=Math.abs(o),u=Math.abs(u),n){case"top-right":case"top-left":case"top":m=u-co;break;case"bottom-right":case"bottom-left":case"bottom":m=-u+co}switch(n){case"top-right":case"bottom-right":case"right":f=-o;break;case"top-left":case"bottom-left":case"left":f=o}return[f,m]}(r,t[0],t[1]):function(n,o){let u=0,f=0;o<0&&(o=0);let m=o/Math.SQRT2;switch(n){case"top-right":case"top-left":f=m-co;break;case"bottom-right":case"bottom-left":f=-m+co;break;case"bottom":f=-o+co;break;case"top":f=o-co}switch(n){case"top-right":case"bottom-right":u=-m;break;case"top-left":case"bottom-left":u=m;break;case"left":u=o;break;case"right":u=-o}return[u,f]}(r,t[0])}function uf(r,t,n){var o;let u=r.layout,f=(o=u.get("text-variable-anchor-offset"))===null||o===void 0?void 0:o.evaluate(t,{},n);if(f){let x=f.values,T=[];for(let E=0;E<x.length;E+=2){let A=T[E]=x[E],k=x[E+1].map($=>$*Br);A.startsWith("top")?k[1]-=co:A.startsWith("bottom")&&(k[1]+=co),T[E+1]=k}return new br(T)}let m=u.get("text-variable-anchor");if(m){let x;x=r._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[u.get("text-radial-offset").evaluate(t,{},n)*Br,Zh]:u.get("text-offset").evaluate(t,{},n).map(E=>E*Br);let T=[];for(let E of m)T.push(E,cf(E,x));return new br(T)}return null}function Wh(r){switch(r){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Sv(r,t,n,o,u,f,m,x,T,E,A,k){let $=f.textMaxSize.evaluate(t,{});$===void 0&&($=m);let q=r.layers[0].layout,Y=q.get("icon-offset").evaluate(t,{},A),Q=df(n.horizontal),oe=m/24,pe=r.tilePixelRatio*oe,Ce=r.tilePixelRatio*$/24,ye=r.tilePixelRatio*x,G=r.tilePixelRatio*q.get("symbol-spacing"),se=q.get("text-padding")*r.tilePixelRatio,be=function(Zt,Gt,$t,vi=1){let dr=Zt.get("icon-padding").evaluate(Gt,{},$t),Fr=dr&&dr.values;return[Fr[0]*vi,Fr[1]*vi,Fr[2]*vi,Fr[3]*vi]}(q,t,A,r.tilePixelRatio),Ge=q.get("text-max-angle")/180*Math.PI,mt=q.get("text-rotation-alignment")!=="viewport"&&q.get("symbol-placement")!=="point",Ke=q.get("icon-rotation-alignment")==="map"&&q.get("symbol-placement")!=="point",nt=q.get("symbol-placement"),vt=G/2,gt=q.get("icon-text-fit"),St;o&>!=="none"&&(r.allowVerticalPlacement&&n.vertical&&(St=Lp(o,n.vertical,gt,q.get("icon-text-fit-padding"),Y,oe)),Q&&(o=Lp(o,Q,gt,q.get("icon-text-fit-padding"),Y,oe)));let ct=A?k.line.getGranularityForZoomLevel(A.z):1,Ft=(Zt,Gt)=>{Gt.x<0||Gt.x>=Ye||Gt.y<0||Gt.y>=Ye||function($t,vi,dr,Fr,an,rs,zn,en,nr,Hr,tn,rn,En,ns,qr,Rn,Or,Zr,Wr,Er,Yi,Os,Dl,Ns,Ev){let kl=$t.addToLineVertexArray(vi,dr),Wo,Ll,zl,Rl,gf=0,yf=0,_f=0,vf=0,id=-1,rd=-1,Ba={},bf=Rs("");if($t.allowVerticalPlacement&&Fr.vertical){let fn=en.layout.get("text-rotate").evaluate(Yi,{},Ns)+90;zl=new Au(nr,vi,Hr,tn,rn,Fr.vertical,En,ns,qr,fn),zn&&(Rl=new Au(nr,vi,Hr,tn,rn,zn,Or,Zr,qr,fn))}if(an){let fn=en.layout.get("icon-rotate").evaluate(Yi,{}),ss=en.layout.get("icon-text-fit")!=="none",Xo=of(an,fn,Dl,ss),$s=zn?of(zn,fn,Dl,ss):void 0;Ll=new Au(nr,vi,Hr,tn,rn,an,Or,Zr,!1,fn),gf=4*Xo.length;let Yo=$t.iconSizeData,fa=null;Yo.kind==="source"?(fa=[pa*en.layout.get("icon-size").evaluate(Yi,{})],fa[0]>ao&&si(`${$t.layerIds[0]}: Value for "icon-size" is >= ${Lc}. Reduce your "icon-size".`)):Yo.kind==="composite"&&(fa=[pa*Os.compositeIconSizes[0].evaluate(Yi,{},Ns),pa*Os.compositeIconSizes[1].evaluate(Yi,{},Ns)],(fa[0]>ao||fa[1]>ao)&&si(`${$t.layerIds[0]}: Value for "icon-size" is >= ${Lc}. Reduce your "icon-size".`)),$t.addSymbols($t.icon,Xo,fa,Er,Wr,Yi,y.ah.none,vi,kl.lineStartIndex,kl.lineLength,-1,Ns),id=$t.icon.placedSymbolArray.length-1,$s&&(yf=4*$s.length,$t.addSymbols($t.icon,$s,fa,Er,Wr,Yi,y.ah.vertical,vi,kl.lineStartIndex,kl.lineLength,-1,Ns),rd=$t.icon.placedSymbolArray.length-1)}let xf=Object.keys(Fr.horizontal);for(let fn of xf){let ss=Fr.horizontal[fn];if(!Wo){bf=Rs(ss.text);let $s=en.layout.get("text-rotate").evaluate(Yi,{},Ns);Wo=new Au(nr,vi,Hr,tn,rn,ss,En,ns,qr,$s)}let Xo=ss.positionedLines.length===1;if(_f+=hf($t,vi,ss,rs,en,qr,Yi,Rn,kl,Fr.vertical?y.ah.horizontal:y.ah.horizontalOnly,Xo?xf:[fn],Ba,id,Os,Ns),Xo)break}Fr.vertical&&(vf+=hf($t,vi,Fr.vertical,rs,en,qr,Yi,Rn,kl,y.ah.vertical,["vertical"],Ba,rd,Os,Ns));let Mv=Wo?Wo.boxStartIndex:$t.collisionBoxArray.length,Cv=Wo?Wo.boxEndIndex:$t.collisionBoxArray.length,Iv=zl?zl.boxStartIndex:$t.collisionBoxArray.length,Av=zl?zl.boxEndIndex:$t.collisionBoxArray.length,Dv=Ll?Ll.boxStartIndex:$t.collisionBoxArray.length,kv=Ll?Ll.boxEndIndex:$t.collisionBoxArray.length,Lv=Rl?Rl.boxStartIndex:$t.collisionBoxArray.length,zv=Rl?Rl.boxEndIndex:$t.collisionBoxArray.length,js=-1,ku=(fn,ss)=>fn&&fn.circleDiameter?Math.max(fn.circleDiameter,ss):ss;js=ku(Wo,js),js=ku(zl,js),js=ku(Ll,js),js=ku(Rl,js);let wf=js>-1?1:0;wf&&(js*=Ev/Br),$t.glyphOffsetArray.length>
5=Cl.MAX_GLYPHS&&si("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Yi.sortKey!==void 0&&$t.addToSortKeyRanges($t.symbolInstances.length,Yi.sortKey);let Rv=uf(en,Yi,Ns),[Bv,Fv]=function(fn,ss){let Xo=fn.length,$s=ss?.values;if($s?.length>0)for(let Yo=0;Yo<$s.length;Yo+=2){let fa=$s[Yo+1];fn.emplaceBack(y.ay[$s[Yo]],fa[0],fa[1])}return[Xo,fn.length]}($t.textAnchorOffsets,Rv);$t.symbolInstances.emplaceBack(vi.x,vi.y,Ba.right>=0?Ba.right:-1,Ba.center>=0?Ba.center:-1,Ba.left>=0?Ba.left:-1,Ba.vertical||-1,id,rd,bf,Mv,Cv,Iv,Av,Dv,kv,Lv,zv,Hr,_f,vf,gf,yf,wf,0,En,js,Bv,Fv)}(r,Gt,Zt,n,o,u,St,r.layers[0],r.collisionBoxArray,t.index,t.sourceLayerIndex,r.index,pe,[se,se,se,se],mt,T,ye,be,Ke,Y,t,f,E,A,m)};if(nt==="line")for(let Zt of ef(t.geometry,0,0,Ye,Ye)){let Gt=Zo(Zt,ct),$t=vv(Gt,G,Ge,n.vertical||Q,o,24,Ce,r.overscaling,Ye);for(let vi of $t)Q&&Tv(r,Q.text,vt,vi)||Ft(Gt,vi)}else if(nt==="line-center"){for(let Zt of t.geometry)if(Zt.length>1){let Gt=Zo(Zt,ct),$t=_v(Gt,Ge,n.vertical||Q,o,24,Ce);$t&&Ft(Gt,$t)}}else if(t.type==="Polygon")for(let Zt of Sa(t.geometry,0)){let Gt=xv(Zt,16);Ft(Zo(Zt[0],ct,!0),new lo(Gt.x,Gt.y,0))}else if(t.type==="LineString")for(let Zt of t.geometry){let Gt=Zo(Zt,ct);Ft(Gt,new lo(Gt[0].x,Gt[0].y,0))}else if(t.type==="Point")for(let Zt of t.geometry)for(let Gt of Zt)Ft([Gt],new lo(Gt.x,Gt.y,0))}function hf(r,t,n,o,u,f,m,x,T,E,A,k,$,q,Y){let Q=function(Ce,ye,G,se,be,Ge,mt,Ke){let nt=se.layout.get("text-rotate").evaluate(Ge,{})*Math.PI/180,vt=[];for(let gt of ye.positionedLines)for(let St of gt.positionedGlyphs){if(!St.rect)continue;let ct=St.rect||{},Ft=K_+1,Zt=!0,Gt=1,$t=0,vi=(be||Ke)&&St.vertical,dr=St.metrics.advance*St.scale/2;if(Ke&&ye.verticalizable&&($t=gt.lineOffset/2-(St.imageName?-(Br-St.metrics.width*St.scale)/2:(St.scale-1)*Br)),St.imageName){let Zr=mt[St.imageName];Zt=Zr.sdf,Gt=Zr.pixelRatio,Ft=Ln/Gt}let Fr=be?[St.x+dr,St.y]:[0,0],an=be?[0,0]:[St.x+dr+G[0],St.y+G[1]-$t],rs=[0,0];vi&&(rs=an,an=[0,0]);let zn=St.metrics.isDoubleResolution?2:1,en=(St.metrics.left-Ft)*St.scale-dr+an[0],nr=(-St.metrics.top-Ft)*St.scale+an[1],Hr=en+ct.w/zn*St.scale/Gt,tn=nr+ct.h/zn*St.scale/Gt,rn=new ne(en,nr),En=new ne(Hr,nr),ns=new ne(en,tn),qr=new ne(Hr,tn);if(vi){let Zr=new ne(-dr,dr-wu),Wr=-Math.PI/2,Er=Br/2-dr,Yi=new ne(5-wu-Er,-(St.imageName?Er:0)),Os=new ne(...rs);rn._rotateAround(Wr,Zr)._add(Yi)._add(Os),En._rotateAround(Wr,Zr)._add(Yi)._add(Os),ns._rotateAround(Wr,Zr)._add(Yi)._add(Os),qr._rotateAround(Wr,Zr)._add(Yi)._add(Os)}if(nt){let Zr=Math.sin(nt),Wr=Math.cos(nt),Er=[Wr,-Zr,Zr,Wr];rn._matMult(Er),En._matMult(Er),ns._matMult(Er),qr._matMult(Er)}let Rn=new ne(0,0),Or=new ne(0,0);vt.push({tl:rn,tr:En,bl:ns,br:qr,tex:ct,writingMode:ye.writingMode,glyphOffset:Fr,sectionIndex:St.sectionIndex,isSDF:Zt,pixelOffsetTL:Rn,pixelOffsetBR:Or,minFontScaleX:0,minFontScaleY:0})}return vt}(0,n,x,u,f,m,o,r.allowVerticalPlacement),oe=r.textSizeData,pe=null;oe.kind==="source"?(pe=[pa*u.layout.get("text-size").evaluate(m,{})],pe[0]>ao&&si(`${r.layerIds[0]}: Value for "text-size" is >= ${Lc}. Reduce your "text-size".`)):oe.kind==="composite"&&(pe=[pa*q.compositeTextSizes[0].evaluate(m,{},Y),pa*q.compositeTextSizes[1].evaluate(m,{},Y)],(pe[0]>ao||pe[1]>ao)&&si(`${r.layerIds[0]}: Value for "text-size" is >= ${Lc}. Reduce your "text-size".`)),r.addSymbols(r.text,Q,pe,x,f,m,E,t,T.lineStartIndex,T.lineLength,$,Y);for(let Ce of A)k[Ce]=r.text.placedSymbolArray.length-1;return 4*Q.length}function df(r){for(let t in r)return r[t];return null}function Tv(r,t,n,o){let u=r.compareText;if(t in u){let f=u[t];for(let m=f.length-1;m>=0;m--)if(o.dist(f[m])<n)return!0}else u[t]=[];return u[t].push(o),!1}let pf=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class Xh{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[n,o]=new Uint8Array(t,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");let u=o>>4;if(u!==1)throw new Error(`Got v${u} data when expected v1.`);let f=pf[15&o];if(!f)throw new Error("Unrecognized array type.");let[m]=new Uint16Array(t,2,1),[x]=new Uint32Array(t,4,1);return new Xh(x,m,f,t)}constructor(t,n=64,o=Float64Array,u){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=o,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let f=pf.indexOf(this.ArrayType),m=2*t*this.ArrayType.BYTES_PER_ELEMENT,x=t*this.IndexArrayType.BYTES_PER_ELEMENT,T=(8-x%8)%8;if(f<0)throw new Error(`Unexpected typed array class: ${o}.`);u&&u instanceof ArrayBuffer?(this.data=u,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+x+T,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+m+x+T),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+x+T,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+f]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=t)}
5add(t,n){let o=this._pos>>1;return this.ids[o]=o,this.coords[this._pos++]=t,this.coords[this._pos++]=n,o}finish(){let t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return Yh(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,n,o,u){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:f,coords:m,nodeSize:x}=this,T=[0,f.length-1,0],E=[];for(;T.length;){let A=T.pop()||0,k=T.pop()||0,$=T.pop()||0;if(k-$<=x){for(let oe=$;oe<=k;oe++){let pe=m[2*oe],Ce=m[2*oe+1];pe>=t&&pe<=o&&Ce>=n&&Ce<=u&&E.push(f[oe])}continue}let q=$+k>>1,Y=m[2*q],Q=m[2*q+1];Y>=t&&Y<=o&&Q>=n&&Q<=u&&E.push(f[q]),(A===0?t<=Y:n<=Q)&&(T.push($),T.push(q-1),T.push(1-A)),(A===0?o>=Y:u>=Q)&&(T.push(q+1),T.push(k),T.push(1-A))}return E}within(t,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:u,coords:f,nodeSize:m}=this,x=[0,u.length-1,0],T=[],E=o*o;for(;x.length;){let A=x.pop()||0,k=x.pop()||0,$=x.pop()||0;if(k-$<=m){for(let oe=$;oe<=k;oe++)mf(f[2*oe],f[2*oe+1],t,n)<=E&&T.push(u[oe]);continue}let q=$+k>>1,Y=f[2*q],Q=f[2*q+1];mf(Y,Q,t,n)<=E&&T.push(u[q]),(A===0?t-o<=Y:n-o<=Q)&&(x.push($),x.push(q-1),x.push(1-A)),(A===0?t+o>=Y:n+o>=Q)&&(x.push(q+1),x.push(k),x.push(1-A))}return T}}function Yh(r,t,n,o,u,f){if(u-o<=n)return;let m=o+u>>1;ff(r,t,m,o,u,f),Yh(r,t,n,o,m-1,1-f),Yh(r,t,n,m+1,u,1-f)}function ff(r,t,n,o,u,f){for(;u>o;){if(u-o>600){let E=u-o+1,A=n-o+1,k=Math.log(E),$=.5*Math.exp(2*k/3),q=.5*Math.sqrt(k*$*(E-$)/E)*(A-E/2<0?-1:1);ff(r,t,n,Math.max(o,Math.floor(n-A*$/E+q)),Math.min(u,Math.floor(n+(E-A)*$/E+q)),f)}let m=t[2*n+f],x=o,T=u;for(Bc(r,t,o,n),t[2*u+f]>m&&Bc(r,t,o,u);x<T;){for(Bc(r,t,x,T),x++,T--;t[2*x+f]<m;)x++;for(;t[2*T+f]>m;)T--}t[2*o+f]===m?Bc(r,t,o,T):(T++,Bc(r,t,T,u)),T<=n&&(o=T+1),n<=T&&(u=T-1)}}function Bc(r,t,n,o){Kh(r,n,o),Kh(t,2*n,2*o),Kh(t,2*n+1,2*o+1)}function Kh(r,t,n){let o=r[t];r[t]=r[n],r[n]=o}function mf(r,t,n,o){let u=r-n,f=t-o;return u*u+f*f}var Jh;y.ck=void 0,(Jh=y.ck||(y.ck={})).create="create",Jh.load="load",Jh.fullLoad="fullLoad";let Du=null,Fc=[],Qh=1e3/60,ed="loadTime",td="fullLoadTime",Pv={mark(r){performance.mark(r)},frame(r){let t=r;Du!=null&&Fc.push(t-Du),Du=t},clearMetrics(){Du=null,Fc=[],performance.clearMeasures(ed),performance.clearMeasures(td);for(let r in y.ck)performance.clearMarks(y.ck[r])},getPerformanceMetrics(){performance.measure(ed,y.ck.create,y.ck.load),performance.measure(td,y.ck.create,y.ck.fullLoad);let r=performance.getEntriesByName(ed)[0].duration,t=performance.getEntriesByName(td)[0].duration,n=Fc.length,o=1/(Fc.reduce((f,m)=>f+m,0)/n/1e3),u=Fc.filter(f=>f>Qh).reduce((f,m)=>f+(m-Qh)/Qh,0);return{loadTime:r,fullLoadTime:t,fps:o,percentDroppedFrames:u/(n+u)*100,totalFrames:n}}};y.$=zc,y.A=Le,y.B=Cn,y.C=Wi,y.D=Ut,y.E=ie,y.F=lh,y.G=function(r){if(wi==null){let t=r.navigator?r.navigator.userAgent:null;wi=!!r.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return wi},y.H=class{constructor(r,t){this.target=r,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new mv(()=>this.process()),this.subscription=Sr(this.target,"message",n=>this.receive(n),!1),this.globalScope=Ki(self)?r:window}registerMessageHandler(r,t){this.messageHandlers[r]=t}sendAsync(r,t){return new Promise((n,o)=>{let u=Math.round(1e18*Math.random()).toString(36).substring(0,10),f=t?Sr(t.signal,"abort",()=>{f?.unsubscribe(),delete this.resolveRejects[u];let T={id:u,type:"<cancel>",origin:location.origin,targetMapId:r.targetMapId,sourceMapId:this.mapId};this.target.postMessage(T)},gv):null;this.resolveRejects[u]={resolve:T=>{f?.unsubscribe(),n(T)},reject:T=>{f?.unsubscribe(),o(T)}};let m=[],x=Object.assign(Object.assign({},r),{id:u,sourceMapId:this.mapId,origin:location.origin,data:Ca(r.data,m)});this.target.postMessage(x,{transfer:m})})}receive(r){let t=r.data,n=t.id;if(!(t.origin!=="file://"&&location.origin!=="file://"&&t.origin!=="resource://android"&&location.origin!=="resource://android"&&t.origin!==location.origin||t.targetMapId&&this.mapId!==t.targetMapId)){if(t.type==="<cancel>"){delete this.tasks[n];let o=this.abortControllers[n];return delete this.abortControllers[n],void(o&&o.abort())}if(Ki(self)||t.mustQueue)return this.tasks[n]=t,this.taskQueue.push(n),void this.invoker.trigger();this.processTask(n,t)}}process(){if(this.taskQueue.length===0)return;let r=this.taskQueue.shift(),t=this.tasks[r];delete this.tasks[r],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(r,t)}processTask(r,t){return a(this,void 0,void 0,function*(){if(t.type==="<response>"){let u=this.resolveRejects[r];return delete this.resolveRejects[r],u?void(t.error?u.reject(aa(t.error)):u.resolve(aa(t.data))):void 0}if(!this.messageHandlers[t.type])return void this.completeTask(r,new Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let n=aa(t.data),o=new AbortController;this.abortControllers[r]=o;try{let u=yield this.messageHandlers[t.type](t.sourceMapId,n,o);this.completeTask(r,null,u)}catch(u){this.completeTask(r,u)}})}completeTask(r,t,n){let o=[];delete this.abortControllers[r];let u={id:r,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:t?Ca(t):null,data:Ca(n,o)};this.target.postMessage(u,{transfer:o})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},y.I=Bh,y.J=un,y.K=function(){var r=new Le(16);return Le!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0),r[0]=1,r[5]=1,r[10]=1,r[15]=1,r},y.L=function(r,t,n){var o,u,f,m,x,T,E,A,k,$,q,Y,Q=n[0],oe=n[1],pe=n[2];return t===r?(r[12]=t[0]*Q+t[4]*oe+t[8]*pe+t[12],r[13]=t[1]*Q+t[5]*oe+t[9]*pe+t[13],r[14]=t[2]*Q+t[6]*oe+t[10]*pe+t[14],r[15]=t[3]*Q+t[7]*oe+t[11]*pe+t[15]):(u=t[1],f=t[2],m=t[3],x=t[4],T=t[5],E=t[6],A=t[7],k=t[8],$=t[9],q=t[10],Y=t[11],r[0]=o=t[0],r[1]=u,r[2]=f,r[3]=m,r[4]=x,r[5]=T,r[6]=E,r[7]=A,r[8]=k,r[9]=$,r[10]=q,r[11]=Y,r[12]=o*Q+x*oe+k*pe+t[12],r[13]=u*Q+T*oe+$*pe+t[13],r[14]=f*Q+E*oe+q*pe+t[14],r[15]=m*Q+A*oe+Y*pe+t[15]),r},y.M=function(r,t,n){var o=n[0],u=n[1],f=n[2];return r[0]=t[0]*o,r[1]=t[1]*o,r[2]=t[2]*o,r[3]=t[3]*o,r[4]=t[4]*u,r[5]=t[5]*u,r[6]=t[6]*u,r[7]=t[7]*u,r[8]=t[8]*f,r[9]=t[9]*f,r[10]=t[10]*f,r[11]=t[11]*f,r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15],r},y.N=function(r,t,n){var o=t[0],u=t[1],f=t[2],m=t[3],x=t[4],T=t[5],E=t[6],A=t[7],k=t[8],$=t[9],q=t[10],Y=t[11],Q=t[12],oe=t[13],pe=t[14],Ce=t[15],ye=n[0],G=n[1],se=n[2],be=n[3];return r[0]=ye*o+G*x+se*k+be*Q,r[1]=ye*u+G*T+se*$+be*oe,r[2]=ye*f+G*E+se*q+be*pe,r[3]=ye*m+G*A+se*Y+be*Ce,r[4]=(ye=n[4])
5*o+(G=n[5])*x+(se=n[6])*k+(be=n[7])*Q,r[5]=ye*u+G*T+se*$+be*oe,r[6]=ye*f+G*E+se*q+be*pe,r[7]=ye*m+G*A+se*Y+be*Ce,r[8]=(ye=n[8])*o+(G=n[9])*x+(se=n[10])*k+(be=n[11])*Q,r[9]=ye*u+G*T+se*$+be*oe,r[10]=ye*f+G*E+se*q+be*pe,r[11]=ye*m+G*A+se*Y+be*Ce,r[12]=(ye=n[12])*o+(G=n[13])*x+(se=n[14])*k+(be=n[15])*Q,r[13]=ye*u+G*T+se*$+be*oe,r[14]=ye*f+G*E+se*q+be*pe,r[15]=ye*m+G*A+se*Y+be*Ce,r},y.O=function(r,t){let n={};for(let o=0;o<t.length;o++){let u=t[o];u in r&&(n[u]=r[u])}return n},y.P=ne,y.Q=oo,y.R=ts,y.S=Up,y.T=No,y.U=Vp,y.V=ge,y.W=ce,y.X=Ui,y.Y=is,y.Z=Ye,y._=a,y.a=jt,y.a$=function(r,t,n){var o=Math.sin(n),u=Math.cos(n),f=t[4],m=t[5],x=t[6],T=t[7],E=t[8],A=t[9],k=t[10],$=t[11];return t!==r&&(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r[4]=f*u+E*o,r[5]=m*u+A*o,r[6]=x*u+k*o,r[7]=T*u+$*o,r[8]=E*u-f*o,r[9]=A*u-m*o,r[10]=k*u-x*o,r[11]=$*u-T*o,r},y.a0=25,y.a1=qh,y.a2=r=>{let t=window.document.createElement("video");return t.muted=!0,new Promise(n=>{t.onloadstart=()=>{n(t)};for(let o of r){let u=window.document.createElement("source");Zs(o)||(t.crossOrigin="Anonymous"),u.src=o,t.appendChild(u)}})},y.a3=tt,y.a4=function(){return ln++},y.a5=P,y.a6=Cl,y.a7=Yl,y.a8=da,y.a9=Yp,y.aA=Wh,y.aB=Oh,y.aC=Xh,y.aD=_r,y.aE=vu,y.aF=xe,y.aG=li,y.aH=pt,y.aI=function(r){return Math.pow(2,r)},y.aJ=85.051129,y.aK=Gp,y.aL=Pi,y.aM=Tr,y.aN=Hp,y.aO=function(r,t,n){return r[0]=t[0]*n,r[1]=t[1]*n,r[2]=t[2]*n,r},y.aP=function(r,t,n){return r[0]=t[0]+n[0],r[1]=t[1]+n[1],r[2]=t[2]+n[2],r},y.aQ=function(r){var t=new Le(3);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t},y.aR=function(r,t,n){return r[0]=t[0]*n[0],r[1]=t[1]*n[1],r[2]=t[2]*n[2],r[3]=t[3]*n[3],r},y.aS=function(r,t,n){return r[0]=t[0]-n[0],r[1]=t[1]-n[1],r[2]=t[2]-n[2],r},y.aT=function(r,t){var n=t[0],o=t[1],u=t[2],f=n*n+o*o+u*u;return f>0&&(f=1/Math.sqrt(f)),r[0]=t[0]*f,r[1]=t[1]*f,r[2]=t[2]*f,r},y.aU=function(r,t,n){var o=t[0],u=t[1],f=t[2],m=n[0],x=n[1],T=n[2];return r[0]=u*T-f*x,r[1]=f*m-o*T,r[2]=o*x-u*m,r},y.aV=function(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]},y.aW=Zp,y.aX=Il,y.aY=function(r,t,n,o,u){var f,m=1/Math.tan(t/2);return r[0]=m/n,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=m,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=-1,r[12]=0,r[13]=0,r[15]=0,u!=null&&u!==1/0?(r[10]=(u+o)*(f=1/(o-u)),r[14]=2*u*o*f):(r[10]=-1,r[14]=-2*o),r},y.aZ=function(r){var t=new Le(16);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t[9]=r[9],t[10]=r[10],t[11]=r[11],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15],t},y.a_=function(r,t,n){var o=Math.sin(n),u=Math.cos(n),f=t[0],m=t[1],x=t[2],T=t[3],E=t[4],A=t[5],k=t[6],$=t[7];return t!==r&&(r[8]=t[8],r[9]=t[9],r[10]=t[10],r[11]=t[11],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r[0]=f*u+E*o,r[1]=m*u+A*o,r[2]=x*u+k*o,r[3]=T*u+$*o,r[4]=E*u-f*o,r[5]=A*u-m*o,r[6]=k*u-x*o,r[7]=$*u-T*o,r},y.aa=function(r){let t={};if(r.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(n,o,u,f)=>{let m=u||f;return t[o]=!m||m.toLowerCase(),""}),t["max-age"]){let n=parseInt(t["max-age"],10);isNaN(n)?delete t["max-age"]:t["max-age"]=n}return t},y.ab=function(r){return Math.log(r)/Math.LN2},y.ac=function(r){var t=r[0],n=r[1];return t*t+n*n},y.ad=function(r){return r*Math.PI/180},y.ae=xi,y.af=function(r,t){let n=[];for(let o in r)o in t||n.push(o);return n},y.ag=function(r,t){let n=0,o=0;if(r.kind==="constant")o=r.layoutSize;else if(r.kind!=="source"){let{interpolationType:u,minZoom:f,maxZoom:m}=r,x=u?xi(Ur.interpolationFactor(u,t,f,m),0,1):0;r.kind==="camera"?o=Cn.number(r.minSize,r.maxSize,x):n=x}return{uSizeT:n,uSize:o}},y.ai=function(r,{uSize:t,uSizeT:n},{lowerSize:o,upperSize:u}){return r.kind==="source"?o/pa:r.kind==="composite"?Cn.number(o/pa,u/pa,n):t},y.aj=function(r,t){var n=t[0],o=t[1],u=t[2],f=t[3],m=t[4],x=t[5],T=t[6],E=t[7],A=t[8],k=t[9],$=t[10],q=t[11],Y=t[12],Q=t[13],oe=t[14],pe=t[15],Ce=n*x-o*m,ye=n*T-u*m,G=n*E-f*m,se=o*T-u*x,be=o*E-f*x,Ge=u*E-f*T,mt=A*Q-k*Y,Ke=A*oe-$*Y,nt=A*pe-q*Y,vt=k*oe-$*Q,gt=k*pe-q*Q,St=$*pe-q*oe,ct=Ce*St-ye*gt+G*vt+se*nt-be*Ke+Ge*mt;return ct?(r[0]=(x*St-T*gt+E*vt)*(ct=1/ct),r[1]=(u*gt-o*St-f*vt)*ct,r[2]=(Q*Ge-oe*be+pe*se)*ct,r[3]=($*be-k*Ge-q*se)*ct,r[4]=(T*nt-m*St-E*Ke)*ct,r[5]=(n*St-u*nt+f*Ke)*ct,r[6]=(oe*G-Y*Ge-pe*ye)*ct,r[7]=(A*Ge-$*G+q*ye)*ct,r[8]=(m*gt-x*nt+E*mt)*ct,r[9]=(o*nt-n*gt-f*mt)*ct,r[10]=(Y*be-Q*G+pe*Ce)*ct,r[11]=(k*G-A*be-q*Ce)*ct,r[12]=(x*Ke-m*vt-T*mt)*ct,r[13]=(n*vt-o*Ke+u*mt)*ct,r[14]=(Q*ye-Y*se-oe*Ce)*ct,r[15]=(A*se-k*ye+$*Ce)*ct,r):null},y.ak=Ne,y.al=function(r){return Math.hypot(r[0],r[1])},y.am=function(r){return r[0]=0,r[1]=0,r},y.an=function(r,t,n){return r[0]=t[0]*n,r[1]=t[1]*n,r},y.ao=jh,y.ap=$e,y.aq=function(r,t,n,o){let u=t.y-r.y,f=t.x-r.x,m=o.y-n.y,x=o.x-n.x,T=m*f-x*u;if(T===0)return null;let E=(x*(r.y-n.y)-m*(r.x-n.x))/T;return new ne(r.x+E*f,r.y+E*u)},y.ar=ef,y.as=Sl,y.at=ze,y.au=function(r){let t=1/0,n=1/0,o=-1/0,u=-1/0;
vendor: 7,754 bytes, line 5
5for(let f of r)t=Math.min(t,f.x),n=Math.min(n,f.y),o=Math.max(o,f.x),u=Math.max(u,f.y);return[t,n,o,u]},y.av=Br,y.aw=bt,y.ax=function(r,t,n,o,u=!1){if(!n[0]&&!n[1])return[0,0];let f=u?o==="map"?-r.bearingInRadians:0:o==="viewport"?r.bearingInRadians:0;if(f){let m=Math.sin(f),x=Math.cos(f);n=[n[0]*x-n[1]*m,n[0]*m+n[1]*x]}return[u?n[0]:bt(t,n[0],r.zoom),u?n[1]:bt(t,n[1],r.zoom)]},y.az=Nh,y.b=Mr,y.b$=r=>r.type==="symbol",y.b0=function(){let r=new Float32Array(16);return ze(r),r},y.b1=function(){let r=new Float64Array(16);return ze(r),r},y.b2=function(){return new Float64Array(16)},y.b3=function(r,t,n){let o=new Float64Array(4);return function(u,f,m,x){var T=.5*Math.PI/180;f*=T,m*=T,x*=T;var E=Math.sin(f),A=Math.cos(f),k=Math.sin(m),$=Math.cos(m),q=Math.sin(x),Y=Math.cos(x);u[0]=E*$*Y-A*k*q,u[1]=A*k*Y+E*$*q,u[2]=A*$*q-E*k*Y,u[3]=A*$*Y+E*k*q}(o,r,t-90,n),o},y.b4=function(r,t,n,o){var u,f,m,x,T,E=t[0],A=t[1],k=t[2],$=t[3],q=n[0],Y=n[1],Q=n[2],oe=n[3];return(f=E*q+A*Y+k*Q+$*oe)<0&&(f=-f,q=-q,Y=-Y,Q=-Q,oe=-oe),1-f>we?(u=Math.acos(f),m=Math.sin(u),x=Math.sin((1-o)*u)/m,T=Math.sin(o*u)/m):(x=1-o,T=o),r[0]=x*E+T*q,r[1]=x*A+T*Y,r[2]=x*k+T*Q,r[3]=x*$+T*oe,r},y.b5=function(r){let t=new Float64Array(9);var n,o,u,f,m,x,T,E,A,k,$,q,Y,Q,oe,pe,Ce,ye;k=(u=(o=r)[0])*(T=u+u),$=(f=o[1])*T,Y=(m=o[2])*T,Q=m*(E=f+f),pe=(x=o[3])*T,Ce=x*E,ye=x*(A=m+m),(n=t)[0]=1-(q=f*E)-(oe=m*A),n[3]=$-ye,n[6]=Y+Ce,n[1]=$+ye,n[4]=1-k-oe,n[7]=Q-pe,n[2]=Y-Ce,n[5]=Q+pe,n[8]=1-k-q;let G=Tr(-Math.asin(xi(t[2],-1,1))),se,be;return Math.hypot(t[5],t[8])<.001?(se=0,be=-Tr(Math.atan2(t[3],t[4]))):(se=Tr(t[5]===0&&t[8]===0?0:Math.atan2(t[5],t[8])),be=Tr(t[1]===0&&t[0]===0?0:Math.atan2(t[1],t[0]))),{roll:se,pitch:G+90,bearing:be}},y.b6=function(r,t){return r.roll==t.roll&&r.pitch==t.pitch&&r.bearing==t.bearing},y.b7=gi,y.b8=Bs,y.b9=El,y.bA=function(r,t){if(!r)return[{command:"setStyle",args:[t]}];let n=[];try{if(!Ee(r.version,t.version))return[{command:"setStyle",args:[t]}];Ee(r.center,t.center)||n.push({command:"setCenter",args:[t.center]}),Ee(r.centerAltitude,t.centerAltitude)||n.push({command:"setCenterAltitude",args:[t.centerAltitude]}),Ee(r.zoom,t.zoom)||n.push({command:"setZoom",args:[t.zoom]}),Ee(r.bearing,t.bearing)||n.push({command:"setBearing",args:[t.bearing]}),Ee(r.pitch,t.pitch)||n.push({command:"setPitch",args:[t.pitch]}),Ee(r.roll,t.roll)||n.push({command:"setRoll",args:[t.roll]}),Ee(r.sprite,t.sprite)||n.push({command:"setSprite",args:[t.sprite]}),Ee(r.glyphs,t.glyphs)||n.push({command:"setGlyphs",args:[t.glyphs]}),Ee(r.transition,t.transition)||n.push({command:"setTransition",args:[t.transition]}),Ee(r.light,t.light)||n.push({command:"setLight",args:[t.light]}),Ee(r.terrain,t.terrain)||n.push({command:"setTerrain",args:[t.terrain]}),Ee(r.sky,t.sky)||n.push({command:"setSky",args:[t.sky]}),Ee(r.projection,t.projection)||n.push({command:"setProjection",args:[t.projection]});let o={},u=[];(function(m,x,T,E){let A;for(A in x=x||{},m=m||{})Object.prototype.hasOwnProperty.call(m,A)&&(Object.prototype.hasOwnProperty.call(x,A)||st(A,T,E));for(A in x)Object.prototype.hasOwnProperty.call(x,A)&&(Object.prototype.hasOwnProperty.call(m,A)?Ee(m[A],x[A])||(m[A].type==="geojson"&&x[A].type==="geojson"&&Be(m,x,A)?je(T,{command:"setGeoJSONSourceData",args:[A,x[A].data]}):et(A,x,T,E)):ke(A,x,T))})(r.sources,t.sources,u,o);let f=[];r.layers&&r.layers.forEach(m=>{"source"in m&&o[m.source]?n.push({command:"removeLayer",args:[m.id]}):f.push(m)}),n=n.concat(u),function(m,x,T){x=x||[];let E=(m=m||[]).map(Ct),A=x.map(Ct),k=m.reduce(kt,{}),$=x.reduce(kt,{}),q=E.slice(),Y=Object.create(null),Q,oe,pe,Ce,ye;for(let G=0,se=0;G<E.length;G++)Q=E[G],Object.prototype.hasOwnProperty.call($,Q)?se++:(je(T,{command:"removeLayer",args:[Q]}),q.splice(q.indexOf(Q,se),1));for(let G=0,se=0;G<A.length;G++)Q=A[A.length-1-G],q[q.length-1-G]!==Q&&(Object.prototype.hasOwnProperty.call(k,Q)?(je(T,{command:"removeLayer",args:[Q]}),q.splice(q.lastIndexOf(Q,q.length-se),1)):se++,Ce=q[q.length-G],je(T,{command:"addLayer",args:[$[Q],Ce]}),q.splice(q.length-G,0,Q),Y[Q]=!0);for(let G=0;G<A.length;G++)if(Q=A[G],oe=k[Q],pe=$[Q],!Y[Q]&&!Ee(oe,pe))if(Ee(oe.source,pe.source)&&Ee(oe["source-layer"],pe["source-layer"])&&Ee(oe.type,pe.type)){for(ye in lt(oe.layout,pe.layout,T,Q,null,"setLayoutProperty"),lt(oe.paint,pe.paint,T,Q,null,"setPaintProperty"),Ee(oe.filter,pe.filter)||je(T,{command:"setFilter",args:[Q,pe.filter]}),Ee(oe.minzoom,pe.minzoom)&&Ee(oe.maxzoom,pe.maxzoom)||je(T,{command:"setLayerZoomRange",args:[Q,pe.minzoom,pe.maxzoom]}),oe)Object.prototype.hasOwnProperty.call(oe,ye)&&ye!=="layout"&&ye!=="paint"&&ye!=="filter"&&ye!=="metadata"&&ye!=="minzoom"&&ye!=="maxzoom"&&(ye.indexOf("paint.")===0?lt(oe[ye],pe[ye],T,Q,ye.slice(6),"setPaintProperty"):Ee(oe[ye],pe[ye])||je(T,{command:"setLayerProperty",args:[Q,ye,pe[ye]]}));for(ye in pe)Object.prototype.hasOwnProperty.call(pe,ye)&&!Object.prototype.hasOwnProperty.call(oe,ye)&&ye!=="layout"&&ye!=="paint"&&ye!=="filter"&&ye!=="metadata"&&ye!=="minzoom"&&ye!=="maxzoom"&&(ye.indexOf("paint.")===0?lt(oe[ye],pe[ye],T,Q,ye.slice(6),"setPaintProperty"):Ee(oe[ye],pe[ye])||je(T,{command:"setLayerProperty",args:[Q,ye,pe[ye]]}))}else je(T,{command:"removeLayer",args:[Q]}),Ce=q[q.lastIndexOf(Q)+1],je(T,{command:"addLayer",args:[pe,Ce]})}(f,t.layers,n)}catch(o){console.warn("Unable to compute style diff:",o),n=[{command:"setStyle",args:[t]}]}return n},y.bB=function(r){let t=[],n=r.id;return n===void 0&&t.push({message:`layers.${n}: missing required property "id"`}),r.render===void 0&&t.push({message:`layers.${n}: missing required method "render"`}),r.renderingMode&&r.renderingMode!=="2d"&&r.renderingMode!=="3d"&&t.push({message:`layers.${n}: property "renderingMode" must be either "2d" or "3d"`}),t},y.bC=function r(t,n){if(Array.isArray(t)){if(!Array.isArray(n)||t.length!==n.length)return!1;for(let o=0;o<t.length;o++)if(!r(t[o],n[o]))return!1;return!0}if(typeof t=="object"&&t!==null&&n!==null){if(typeof n!="object"||Object.keys(t).length!==Object.keys(n).length)return!1;for(let o in t)if(!r(t[o],n[o]))return!1;return!0}return t===n},y.bD=wt,y.bE=yt,y.bF=class extends bs{constructor(r,t){super(r,t),this.current=0}set(r){this.current!==r&&(this.current=r,this.gl.uniform1i(this.location,r))}},y.bG=Fs,y.bH=class extends bs{constructor(r,t){super(r,t),this.current=La}set(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(let t=1;t<16;t++)if(r[t]!==this.current[t]){this.current=r,this.gl.uniformMatrix4fv(this.location,!1,r);break}}},y.bI=kn,y.bJ=class extends bs{constructor(r,t){super(r,t),this.current=[0,0,0]}set(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]))}},y.bK=class extends bs{constructor(r,t){super(r,t),this.current=[0,0]}set(r){r[0]===this.current[0]&&r[1]===this.current[1]||(this.current=r,this.gl.uniform2f(this.location,r[0],r[1]))}},y.bL=M,y.bM=function(r,t){var n=Math.sin(t),o=Math.cos(t);return r[0]=o,r[1]=n,r[2]=0,r[3]=-n,r[4]=o,r[5]=0,r[6]=0,r[7]=0,r[8]=1,r},y.bN=function(r,t,n){var o=t[0],u=t[1],f=t[2];return r[0]=o*n[0]+u*n[3]+f*n[6],r[1]=o*n[1]+u*n[4]+f*n[7],r[2]=o*n[2]+u*n[5]+f*n[8],r},y.bO=function(r,t,n,o,u,f,m){var x=1/(t-n),T=1/(o-u),E=1/(f-m);return r[0]=-2*x,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*T,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*E,r[11]=0,r[12]=(t+n)*x,r[13]=(u+o)*T,r[14]=(m+f)*E,r[15]=1,r},y.bP=class extends fc{},y.bQ=H_,y.bR=class extends Go{},y.bS=bh,y.bT=function(r){return r<=1?1:Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))},y.bU=Xd,y.bV=function(r,t,n){var o=t[0],u=t[1],f=t[2],m=n[3]*o+n[7]*u+n[11]*f+n[15];return r[0]=(n[0]*o+n[4]*u+n[8]*f+n[12])/(m=m||1),r[1]=(n[1]*o+n[5
5]*u+n[9]*f+n[13])/m,r[2]=(n[2]*o+n[6]*u+n[10]*f+n[14])/m,r},y.bW=class extends vl{},y.bX=class extends d{},y.bY=function(r,t){return r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]&&r[3]===t[3]&&r[4]===t[4]&&r[5]===t[5]&&r[6]===t[6]&&r[7]===t[7]&&r[8]===t[8]&&r[9]===t[9]&&r[10]===t[10]&&r[11]===t[11]&&r[12]===t[12]&&r[13]===t[13]&&r[14]===t[14]&&r[15]===t[15]},y.bZ=function(r,t){var n=r[0],o=r[1],u=r[2],f=r[3],m=r[4],x=r[5],T=r[6],E=r[7],A=r[8],k=r[9],$=r[10],q=r[11],Y=r[12],Q=r[13],oe=r[14],pe=r[15],Ce=t[0],ye=t[1],G=t[2],se=t[3],be=t[4],Ge=t[5],mt=t[6],Ke=t[7],nt=t[8],vt=t[9],gt=t[10],St=t[11],ct=t[12],Ft=t[13],Zt=t[14],Gt=t[15];return Math.abs(n-Ce)<=we*Math.max(1,Math.abs(n),Math.abs(Ce))&&Math.abs(o-ye)<=we*Math.max(1,Math.abs(o),Math.abs(ye))&&Math.abs(u-G)<=we*Math.max(1,Math.abs(u),Math.abs(G))&&Math.abs(f-se)<=we*Math.max(1,Math.abs(f),Math.abs(se))&&Math.abs(m-be)<=we*Math.max(1,Math.abs(m),Math.abs(be))&&Math.abs(x-Ge)<=we*Math.max(1,Math.abs(x),Math.abs(Ge))&&Math.abs(T-mt)<=we*Math.max(1,Math.abs(T),Math.abs(mt))&&Math.abs(E-Ke)<=we*Math.max(1,Math.abs(E),Math.abs(Ke))&&Math.abs(A-nt)<=we*Math.max(1,Math.abs(A),Math.abs(nt))&&Math.abs(k-vt)<=we*Math.max(1,Math.abs(k),Math.abs(vt))&&Math.abs($-gt)<=we*Math.max(1,Math.abs($),Math.abs(gt))&&Math.abs(q-St)<=we*Math.max(1,Math.abs(q),Math.abs(St))&&Math.abs(Y-ct)<=we*Math.max(1,Math.abs(Y),Math.abs(ct))&&Math.abs(Q-Ft)<=we*Math.max(1,Math.abs(Q),Math.abs(Ft))&&Math.abs(oe-Zt)<=we*Math.max(1,Math.abs(oe),Math.abs(Zt))&&Math.abs(pe-Gt)<=we*Math.max(1,Math.abs(pe),Math.abs(Gt))},y.b_=function(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r[6]=t[6],r[7]=t[7],r[8]=t[8],r[9]=t[9],r[10]=t[10],r[11]=t[11],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15],r},y.ba=Ec,y.bb=Pl,y.bc=He,y.bd=Xe,y.be=or,y.bf=function(r,t,n,o,u){return He(o,u,xi((r-t)/(n-t),0,1))},y.bg=_t,y.bh=function(){return new Float64Array(4)},y.bi=function(){return new Float64Array(3)},y.bj=function(r,t,n,o){var u=[],f=[];return u[0]=t[0]-n[0],u[1]=t[1]-n[1],u[2]=t[2]-n[2],f[0]=u[0]*Math.cos(o)-u[1]*Math.sin(o),f[1]=u[0]*Math.sin(o)+u[1]*Math.cos(o),f[2]=u[2],r[0]=f[0]+n[0],r[1]=f[1]+n[1],r[2]=f[2]+n[2],r},y.bk=function(r,t,n,o){var u=[],f=[];return u[0]=t[0]-n[0],u[1]=t[1]-n[1],u[2]=t[2]-n[2],f[0]=u[0],f[1]=u[1]*Math.cos(o)-u[2]*Math.sin(o),f[2]=u[1]*Math.sin(o)+u[2]*Math.cos(o),r[0]=f[0]+n[0],r[1]=f[1]+n[1],r[2]=f[2]+n[2],r},y.bl=function(r,t,n,o){var u=[],f=[];return u[0]=t[0]-n[0],u[1]=t[1]-n[1],u[2]=t[2]-n[2],f[0]=u[2]*Math.sin(o)+u[0]*Math.cos(o),f[1]=u[1],f[2]=u[2]*Math.cos(o)-u[0]*Math.sin(o),r[0]=f[0]+n[0],r[1]=f[1]+n[1],r[2]=f[2]+n[2],r},y.bm=function(r,t,n){var o=Math.sin(n),u=Math.cos(n),f=t[0],m=t[1],x=t[2],T=t[3],E=t[8],A=t[9],k=t[10],$=t[11];return t!==r&&(r[4]=t[4],r[5]=t[5],r[6]=t[6],r[7]=t[7],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r[0]=f*u-E*o,r[1]=m*u-A*o,r[2]=x*u-k*o,r[3]=T*u-$*o,r[8]=f*o+E*u,r[9]=m*o+A*u,r[10]=x*o+k*u,r[11]=T*o+$*u,r},y.bn=function(r,t){let n=_t(r,360),o=_t(t,360),u=o-n,f=o>n?u-360:u+360;return Math.abs(u)<Math.abs(f)?u:f},y.bo=function(r){return r[0]=0,r[1]=0,r[2]=0,r},y.bp=function(r,t,n,o){let u=Math.sqrt(r*r+t*t),f=Math.sqrt(n*n+o*o);r/=u,t/=u,n/=f,o/=f;let m=Math.acos(r*n+t*o);return-t*n+r*o>0?m:-m},y.bq=function(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]+r[3]},y.br=Gh,y.bs=function(r,t){let n=_t(r,2*Math.PI),o=_t(t,2*Math.PI);return Math.min(Math.abs(n-o),Math.abs(n-o+2*Math.PI),Math.abs(n-o-2*Math.PI))},y.bt=function(r){return Math.hypot(r[0],r[1],r[2])},y.bu=function(){let r={},t=W.$version;for(let n in W.$root){let o=W.$root[n];if(o.required){let u=null;u=n==="version"?t:o.type==="array"?[]:{},u!=null&&(r[n]=u)}}return r},y.bv=sc,y.bw=gn,y.bx=function(r){r=r.slice();let t=Object.create(null);for(let n=0;n<r.length;n++)t[r[n].id]=r[n];for(let n=0;n<r.length;n++)"ref"in r[n]&&(r[n]=Ie(r[n],t[r[n].ref]));return r},y.by=function(r){if(r.type==="custom")return new fv(r);switch(r.type){case"background":return new hv(r);case"circle":return new a_(r);case"fill":return new P_(r);case"fill-extrusion":return new L_(r);case"heatmap":return new l_(r);case"hillshade":return new u_(r);case"line":return new $_(r);case"raster":return new pv(r);case"symbol":return new Eu(r)}},y.bz=Tt,y.c=Yr,y.c0=r=>r.type==="circle",y.c1=r=>r.type==="heatmap",y.c2=r=>r.type==="line",y.c3=r=>r.type==="fill",y.c4=r=>r.type==="fill-extrusion",y.c5=r=>r.type==="hillshade",y.c6=r=>r.type==="raster",y.c7=r=>r.type==="background",y.c8=r=>r.type==="custom",y.c9=At,y.cA=class{constructor(r){this._marks={start:[r.url,"start"].join("#"),end:[r.url,"end"].join("#"),measure:r.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let r=performance.getEntriesByName(this._marks.measure);return r.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),r=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),r}},y.cB=function(r,t,n,o,u){return a(this,void 0,void 0,function*(){if(ce())try{return yield Ui(r,t,n,o,u)}catch{}return function(f,m,x,T,E){let A=f.width,k=f.height;Cr&&sr||(Cr=new OffscreenCanvas(A,k),sr=Cr.getContext("2d",{willReadFrequently:!0}
5)),Cr.width=A,Cr.height=k,sr.drawImage(f,0,0,A,k);let $=sr.getImageData(m,x,T,E);return sr.clearRect(0,0,A,k),$.data}(r,t,n,o,u)})},y.cC=Wp,y.cD=z,y.cE=B,y.cF=dp,y.cG=Tp,y.cH=ol,y.cI=zs,y.ca=function(r,t,n){let o=Je(t.x-n.x,t.y-n.y),u=Je(r.x-n.x,r.y-n.y);var f,m;return Tr(Math.atan2(o[0]*u[1]-o[1]*u[0],(f=o)[0]*(m=u)[0]+f[1]*m[1]))},y.cb=Yt,y.cc=function(r,t){return pr[t]&&(r instanceof MouseEvent||r instanceof WheelEvent)},y.cd=function(r,t){return Mn[t]&&"touches"in r},y.ce=function(r){return Mn[r]||pr[r]},y.cf=function(r,t,n){var o=t[0],u=t[1];return r[0]=n[0]*o+n[4]*u+n[12],r[1]=n[1]*o+n[5]*u+n[13],r},y.cg=function(r,t){let{x:n,y:o}=zc.fromLngLat(t);return!(r<0||r>25||o<0||o>=1||n<0||n>=1)},y.ch=function(r,t){return r[0]=t[0],r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=t[1],r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=t[2],r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r},y.ci=class extends _s{},y.cj=Pv,y.cl=function(r){return r.message===cn},y.cm=Ir,y.cn=function(r,t){jt.REGISTERED_PROTOCOLS[r]=t},y.co=function(r){delete jt.REGISTERED_PROTOCOLS[r]},y.cp=function(r,t){let n={};for(let u=0;u<r.length;u++){let f=t&&t[r[u].id]||oh(r[u]);t&&(t[r[u].id]=f);let m=n[f];m||(m=n[f]=[]),m.push(r[u])}let o=[];for(let u in n)o.push(n[u]);return o},y.cq=zt,y.cr=Xp,y.cs=Kp,y.ct=Ep,y.cu=function(r){r.bucket.createArrays(),r.bucket.tilePixelRatio=Ye/(512*r.bucket.overscaling),r.bucket.compareText={},r.bucket.iconsNeedLinear=!1;let t=r.bucket.layers[0],n=t.layout,o=t._unevaluatedLayout._values,u={layoutIconSize:o["icon-size"].possiblyEvaluate(new Wi(r.bucket.zoom+1),r.canonical),layoutTextSize:o["text-size"].possiblyEvaluate(new Wi(r.bucket.zoom+1),r.canonical),textMaxSize:o["text-size"].possiblyEvaluate(new Wi(18))};if(r.bucket.textSizeData.kind==="composite"){let{minZoom:E,maxZoom:A}=r.bucket.textSizeData;u.compositeTextSizes=[o["text-size"].possiblyEvaluate(new Wi(E),r.canonical),o["text-size"].possiblyEvaluate(new Wi(A),r.canonical)]}if(r.bucket.iconSizeData.kind==="composite"){let{minZoom:E,maxZoom:A}=r.bucket.iconSizeData;u.compositeIconSizes=[o["icon-size"].possiblyEvaluate(new Wi(E),r.canonical),o["icon-size"].possiblyEvaluate(new Wi(A),r.canonical)]}let f=n.get("text-line-height")*Br,m=n.get("text-rotation-alignment")!=="viewport"&&n.get("symbol-placement")!=="point",x=n.get("text-keep-upright"),T=n.get("text-size");for(let E of r.bucket.features){let A=n.get("text-font").evaluate(E,{},r.canonical).join(","),k=T.evaluate(E,{},r.canonical),$=u.layoutTextSize.evaluate(E,{},r.canonical),q=u.layoutIconSize.evaluate(E,{},r.canonical),Y={horizontal:{},vertical:void 0},Q=E.text,oe,pe=[0,0];if(Q){let G=Q.toString(),se=n.get("text-letter-spacing").evaluate(E,{},r.canonical)*Br,be=ou(G)?se:0,Ge=n.get("text-anchor").evaluate(E,{},r.canonical),mt=uf(t,E,r.canonical);if(!mt){let gt=n.get("text-radial-offset").evaluate(E,{},r.canonical);pe=gt?cf(Ge,[gt*Br,Zh]):n.get("text-offset").evaluate(E,{},r.canonical).map(St=>St*Br)}let Ke=m?"center":n.get("text-justify").evaluate(E,{},r.canonical),nt=n.get("symbol-placement")==="point"?n.get("text-max-width").evaluate(E,{},r.canonical)*Br:1/0,vt=()=>{r.bucket.allowVerticalPlacement&&ml(G)&&(Y.vertical=Su(Q,r.glyphMap,r.glyphPositions,r.imagePositions,A,nt,f,Ge,"left",be,pe,y.ah.vertical,!0,$,k))};if(!m&&mt){let gt=new Set;if(Ke==="auto")for(let ct=0;ct<mt.values.length;ct+=2)gt.add(Wh(mt.values[ct]));else gt.add(Ke);let St=!1;for(let ct of gt)if(!Y.horizontal[ct])if(St)Y.horizontal[ct]=Y.horizontal[0];else{let Ft=Su(Q,r.glyphMap,r.glyphPositions,r.imagePositions,A,nt,f,"center",ct,be,pe,y.ah.horizontal,!1,$,k);Ft&&(Y.horizontal[ct]=Ft,St=Ft.positionedLines.length===1)}vt()}else{Ke==="auto"&&(Ke=Wh(Ge));let gt=Su(Q,r.glyphMap,r.glyphPositions,r.imagePositions,A,nt,f,Ge,Ke,be,pe,y.ah.horizontal,!1,$,k);gt&&(Y.horizontal[Ke]=gt),vt(),ml(G)&&m&&x&&(Y.vertical=Su(Q,r.glyphMap,r.glyphPositions,r.imagePositions,A,nt,f,Ge,Ke,be,pe,y.ah.vertical,!1,$,k))}}let Ce=!1;if(E.icon&&E.icon.name){let G=r.imageMap[E.icon.name];G&&(oe=av(r.imagePositions[E.icon.name],n.get("icon-offset").evaluate(E,{},r.canonical),n.get("icon-anchor").evaluate(E,{},r.canonical)),Ce=!!G.sdf,r.bucket.sdfIcons===void 0?r.bucket.sdfIcons=Ce:r.bucket.sdfIcons!==Ce&&si("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(G.pixelRatio!==r.bucket.pixelRatio||n.get("icon-rotate").constantOr(1)!==0)&&(r.bucket.iconsNeedLinear=!0))}let ye=df(Y.horizontal)||Y.vertical;r.bucket.iconsInText=!!ye&&ye.iconsInText,(ye||oe)&&Sv(r.bucket,E,Y,oe,r.imageMap,u,$,q,pe,Ce,r.canonical,r.subdivisionGranularity)}r.showCollisionBoxes&&r.bucket.generateCollisionDebugBuffers()},y.cv=Dh,y.cw=Ph,y.cx=Ah,y.cy=Cc,y.cz=zh,y.d=Zs,y.e=Ai,y.f=r=>a(void 0,void 0,void 0,function*(){if(r.byteLength===0)return createImageBitmap(new ImageData(1,1));let t=new Blob([new Uint8Array(r)],{type:"image/png"});try{return createImageBitmap(t)}catch(n){throw 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.g=Ji,y.h=r=>new Promise((t,n)=>{let o=new Image;o.onload=()=>{t(o),URL.revokeObjectURL(o.src),o.onload=null,window.requestAnimationFrame(()=>{o.src=qi})},o.onerror=()=>n(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."));let u=new Blob([new Uint8Array(r)],{type:"image/png"});o.src=r.byteLength?URL.createObjectURL(u):qi}),y.i=Ki,y.j=(r,t)=>hn(Ai(r,{type:"json"}),t),y.k=J,y.l=Re,y.m=hn,y.n=(r,t)=>hn(Ai(r,{type:"arrayBuffer"}),t),y.o=function(r){return new zh(r).readFields(W_,[])},y.p=Pp,y.q=xc,y.r=Tn,y.s=Sr,y.t=rc,y.u=mi,y.v=W,y.w=si,y.x=io,y.y=Ma,y.z=function([r,t,n]){return t+=90,t*=Math.PI/180,n*=Math.PI/180,{x:r*Math.cos(t)*Math.sin(n),y:r*Math.sin(t)*Math.sin(n),z:r*Math.cos(n)}}}),g("worker",["./shared"],function(y){"use strict";class a{constructor(J){this.keyCache={},J&&this.replace(J)}replace(J){this._layerConfigs={},this._layers={},this.update(J,[])}update(J,ie){for(let ve of J){this._layerConfigs[ve.id]=ve;let Ie=this._layers[ve.id]=y.by(ve);Ie._featureFilter=y.a7(Ie.filter),this.keyCache[ve.id]&&delete this.keyCache[ve.id]}for(let ve of ie)delete this.keyCache[ve],delete this._layerConfigs[ve],delete this._layers[ve];this.familiesBySource={};let W=y.cp(Object.values(this._layerConfigs),this.keyCache);for(let ve of W){let Ie=ve.map(Be=>this._layers[Be.id]),Ee=Ie[0];if(Ee.visibility==="none")continue;let je=Ee.source||"",ke=this.familiesBySource[je];ke||(ke=this.familiesBySource[je]={});let st=Ee.sourceLayer||"_geojsonTileLayer",et=ke[st];et||(et=ke[st]=[]),et.push(Ie)}}}class z{constructor(J){let ie={},W=[];for(let je in J){let ke=J[je],st=ie[je]={};for(let et in ke){let Be=ke[+et];if(!Be||Be.bitmap.width===0||Be.bitmap.height===0)continue;let lt={x:0,y:0,w:Be.bitmap.width+2,h:Be.bitmap.height+2};W.push(lt),st[et]={rect:lt,metrics:Be.metrics}}}let{w:ve,h:Ie}=y.p(W),Ee=new y.q({width:ve||1,height:Ie||1});for(let je in J){let ke=J[je];for(let st in ke){let et=ke[+st];if(!et||et.bitmap.width===0||et.bitmap.height===0)continue;let Be=ie[je][st].rect;
5y.q.copy(et.bitmap,Ee,{x:0,y:0},{x:Be.x+1,y:Be.y+1},et.bitmap)}}this.image=Ee,this.positions=ie}}y.cq("GlyphAtlas",z);class F{constructor(J){this.tileID=new y.Y(J.tileID.overscaledZ,J.tileID.wrap,J.tileID.canonical.z,J.tileID.canonical.x,J.tileID.canonical.y),this.uid=J.uid,this.zoom=J.zoom,this.pixelRatio=J.pixelRatio,this.tileSize=J.tileSize,this.source=J.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=J.showCollisionBoxes,this.collectResourceTiming=!!J.collectResourceTiming,this.returnDependencies=!!J.returnDependencies,this.promoteId=J.promoteId,this.inFlightDependencies=[]}parse(J,ie,W,ve,Ie){return y._(this,void 0,void 0,function*(){this.status="parsing",this.data=J,this.collisionBoxArray=new y.a5;let Ee=new y.cr(Object.keys(J.layers).sort()),je=new y.cs(this.tileID,this.promoteId);je.bucketLayerIDs=[];let ke={},st={featureIndex:je,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:W,subdivisionGranularity:Ie},et=ie.familiesBySource[this.source];for(let Mt in et){let ti=J.layers[Mt];if(!ti)continue;ti.version===1&&y.w(`Vector tile source "${this.source}" layer "${Mt}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let Zi=Ee.encode(Mt),Zn=[];for(let qt=0;qt<ti.length;qt++){let fr=ti.feature(qt),ji=je.getId(fr,Mt);Zn.push({feature:fr,id:ji,index:qt,sourceLayerIndex:Zi})}for(let qt of et[Mt]){let fr=qt[0];fr.source!==this.source&&y.w(`layer.source = ${fr.source} does not equal this.source = ${this.source}`),fr.minzoom&&this.zoom<Math.floor(fr.minzoom)||fr.maxzoom&&this.zoom>=fr.maxzoom||fr.visibility!=="none"&&(V(qt,this.zoom,W),(ke[fr.id]=fr.createBucket({index:je.bucketLayerIDs.length,layers:qt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Zi,sourceID:this.source})).populate(Zn,st,this.tileID.canonical),je.bucketLayerIDs.push(qt.map(ji=>ji.id)))}}let Be=y.bD(st.glyphDependencies,Mt=>Object.keys(Mt).map(Number));this.inFlightDependencies.forEach(Mt=>Mt?.abort()),this.inFlightDependencies=[];let lt=Promise.resolve({});if(Object.keys(Be).length){let Mt=new AbortController;this.inFlightDependencies.push(Mt),lt=ve.sendAsync({type:"GG",data:{stacks:Be,source:this.source,tileID:this.tileID,type:"glyphs"}},Mt)}let Ct=Object.keys(st.iconDependencies),kt=Promise.resolve({});if(Ct.length){let Mt=new AbortController;this.inFlightDependencies.push(Mt),kt=ve.sendAsync({type:"GI",data:{icons:Ct,source:this.source,tileID:this.tileID,type:"icons"}},Mt)}let tt=Object.keys(st.patternDependencies),Kt=Promise.resolve({});if(tt.length){let Mt=new AbortController;this.inFlightDependencies.push(Mt),Kt=ve.sendAsync({type:"GI",data:{icons:tt,source:this.source,tileID:this.tileID,type:"patterns"}},Mt)}let[Vt,Ht,di]=yield Promise.all([lt,kt,Kt]),ft=new z(Vt),Rt=new y.ct(Ht,di);for(let Mt in ke){let ti=ke[Mt];ti instanceof y.a6?(V(ti.layers,this.zoom,W),y.cu({bucket:ti,glyphMap:Vt,glyphPositions:ft.positions,imageMap:Ht,imagePositions:Rt.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:st.subdivisionGranularity})):ti.hasPattern&&(ti instanceof y.cv||ti instanceof y.cw||ti instanceof y.cx)&&(V(ti.layers,this.zoom,W),ti.addFeatures(st,this.tileID.canonical,Rt.patternPositions))}return this.status="done",{buckets:Object.values(ke).filter(Mt=>!Mt.isEmpty()),featureIndex:je,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ft.image,imageAtlas:Rt,glyphMap:this.returnDependencies?Vt:null,iconMap:this.returnDependencies?Ht:null,glyphPositions:this.returnDependencies?ft.positions:null}})}}function V(Re,J,ie){let W=new y.C(J);for(let ve of Re)ve.recalculate(W,ie)}class B{constructor(J,ie,W){this.actor=J,this.layerIndex=ie,this.availableImages=W,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(J,ie){return y._(this,void 0,void 0,function*(){let W=yield y.n(J.request,ie);try{return{vectorTile:new y.cy.VectorTile(new y.cz(W.data)),rawData:W.data,cacheControl:W.cacheControl,expires:W.expires}}
5catch(ve){let Ie=new Uint8Array(W.data),Ee=`Unable to parse the tile at ${J.request.url}, `;throw Ee+=Ie[0]===31&&Ie[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${ve.message}`,new Error(Ee)}})}loadTile(J){return y._(this,void 0,void 0,function*(){let ie=J.uid,W=!!(J&&J.request&&J.request.collectResourceTiming)&&new y.cA(J.request),ve=new F(J);this.loading[ie]=ve;let Ie=new AbortController;ve.abort=Ie;try{let Ee=yield this.loadVectorTile(J,Ie);if(delete this.loading[ie],!Ee)return null;let je=Ee.rawData,ke={};Ee.expires&&(ke.expires=Ee.expires),Ee.cacheControl&&(ke.cacheControl=Ee.cacheControl);let st={};if(W){let Be=W.finish();Be&&(st.resourceTiming=JSON.parse(JSON.stringify(Be)))}ve.vectorTile=Ee.vectorTile;let et=ve.parse(Ee.vectorTile,this.layerIndex,this.availableImages,this.actor,J.subdivisionGranularity);this.loaded[ie]=ve,this.fetching[ie]={rawTileData:je,cacheControl:ke,resourceTiming:st};try{let Be=yield et;return y.e({rawTileData:je.slice(0)},Be,ke,st)}finally{delete this.fetching[ie]}}catch(Ee){throw delete this.loading[ie],ve.status="done",this.loaded[ie]=ve,Ee}})}reloadTile(J){return y._(this,void 0,void 0,function*(){let ie=J.uid;if(!this.loaded||!this.loaded[ie])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let W=this.loaded[ie];if(W.showCollisionBoxes=J.showCollisionBoxes,W.status==="parsing"){let ve=yield W.parse(W.vectorTile,this.layerIndex,this.availableImages,this.actor,J.subdivisionGranularity),Ie;if(this.fetching[ie]){let{rawTileData:Ee,cacheControl:je,resourceTiming:ke}=this.fetching[ie];delete this.fetching[ie],Ie=y.e({rawTileData:Ee.slice(0)},ve,je,ke)}else Ie=ve;return Ie}if(W.status==="done"&&W.vectorTile)return W.parse(W.vectorTile,this.layerIndex,this.availableImages,this.actor,J.subdivisionGranularity)})}abortTile(J){return y._(this,void 0,void 0,function*(){let ie=this.loading,W=J.uid;ie&&ie[W]&&ie[W].abort&&(ie[W].abort.abort(),delete ie[W])})}removeTile(J){return y._(this,void 0,void 0,function*(){this.loaded&&this.loaded[J.uid]&&delete this.loaded[J.uid]})}}class U{constructor(){this.loaded={}}loadTile(J){return y._(this,void 0,void 0,function*(){let{uid:ie,encoding:W,rawImageData:ve,redFactor:Ie,greenFactor:Ee,blueFactor:je,baseShift:ke}=J,st=ve.width+2,et=ve.height+2,Be=y.b(ve)?new y.R({width:st,height:et},yield y.cB(ve,-1,-1,st,et)):ve,lt=new y.cC(ie,Be,W,Ie,Ee,je,ke);return this.loaded=this.loaded||{},this.loaded[ie]=lt,lt})}removeTile(J){let ie=this.loaded,W=J.uid;ie&&ie[W]&&delete ie[W]}}var O,ne,re=function(){if(ne)return O;function Re(ie,W){if(ie.length!==0){J(ie[0],W);for(var ve=1;ve<ie.length;ve++)J(ie[ve],!W)}}function J(ie,W){for(var ve=0,Ie=0,Ee=0,je=ie.length,ke=je-1;Ee<je;ke=Ee++){var st=(ie[Ee][0]-ie[ke][0])*(ie[ke][1]+ie[Ee][1]),et=ve+st;Ie+=Math.abs(ve)>=Math.abs(st)?ve-et+st:st-et+ve,ve=et}ve+Ie>=0!=!!W&&ie.reverse()}return ne=1,O=function ie(W,ve){var Ie,Ee=W&&W.type;if(Ee==="FeatureCollection")for(Ie=0;Ie<W.features.length;Ie++)ie(W.features[Ie],ve);else if(Ee==="GeometryCollection")for(Ie=0;Ie<W.geometries.length;Ie++)ie(W.geometries[Ie],ve);else if(Ee==="Feature")ie(W.geometry,ve);else if(Ee==="Polygon")Re(W.coordinates,ve);else if(Ee==="MultiPolygon")for(Ie=0;Ie<W.coordinates.length;Ie++)Re(W.coordinates[Ie],ve);return W}}(),j=y.cD(re);let H=y.cy.VectorTileFeature.prototype.toGeoJSON;class ae{constructor(J){this._feature=J,this.extent=y.Z,this.type=J.type,this.properties=J.tags,"id"in J&&!isNaN(J.id)&&(this.id=parseInt(J.id,10))}loadGeometry(){if(this._feature.type===1){let J=[];for(let ie of this._feature.geometry)J.push([new y.P(ie[0],ie[1])]);return J}{let J=[];for(let ie of this._feature.geometry){let W=[];for(let ve of ie)W.push(new y.P(ve[0],ve[1]));J.push(W)}return J}}toGeoJSON(J,ie,W){return H.call(this,J,ie,W)}}class ge{constructor(J){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=y.Z,this.length=J.length,this._features=J}feature(J){return new ae(this._features[J])}}var ce,le,we,Le={exports:{}},M=function(){if(we)return Le.exports;we=1;var Re=y.cG(),J=function(){if(le)return ce;le=1;var et=y.cE(),Be=y.cF().VectorTileFeature;function lt(kt,tt){this.options=tt||{},this.features=kt,this.length=kt.length}function Ct(kt,tt){this.id=typeof kt.id=="number"?kt.id:void 0,this.type=kt.type,this.rawGeometry=kt.type===1?[kt.geometry]:kt.geometry,this.properties=kt.tags,this.extent=tt||4096}return ce=lt,lt.prototype.feature=function(kt){return new Ct(this.features[kt],this.options.extent)},Ct.prototype.loadGeometry=function(){var kt=this.rawGeometry;this.geometry=[];for(var tt=0;tt<kt.length;tt++){for(var Kt=kt[tt],Vt=[],Ht=0;Ht<Kt.length;Ht++)Vt.push(new et(Kt[Ht][0],Kt[Ht][1]));this.geometry.push(Vt)}return this.geometry},Ct.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var kt=this.geometry,tt=1/0,Kt=-1/0,Vt=1/0,Ht=-1/0,di=0;di<kt.length;di++)for(var ft=kt[di],Rt=0;Rt<ft.length;Rt++){var Mt=ft[Rt];tt=Math.min(tt,Mt.x),Kt=Math.max(Kt,Mt.x),Vt=Math.min(Vt,Mt.y),Ht=Math.max(Ht,Mt.y)}return[tt,Vt,Kt,Ht]},Ct.prototype.toGeoJSON=Be.prototype.toGeoJSON,ce}();function ie(et){var Be=new Re;
5return function(lt,Ct){for(var kt in lt.layers)Ct.writeMessage(3,W,lt.layers[kt])}(et,Be),Be.finish()}function W(et,Be){var lt;Be.writeVarintField(15,et.version||1),Be.writeStringField(1,et.name||""),Be.writeVarintField(5,et.extent||4096);var Ct={keys:[],values:[],keycache:{},valuecache:{}};for(lt=0;lt<et.length;lt++)Ct.feature=et.feature(lt),Be.writeMessage(2,ve,Ct);var kt=Ct.keys;for(lt=0;lt<kt.length;lt++)Be.writeStringField(3,kt[lt]);var tt=Ct.values;for(lt=0;lt<tt.length;lt++)Be.writeMessage(4,st,tt[lt])}function ve(et,Be){var lt=et.feature;lt.id!==void 0&&Be.writeVarintField(1,lt.id),Be.writeMessage(2,Ie,et),Be.writeVarintField(3,lt.type),Be.writeMessage(4,ke,lt)}function Ie(et,Be){var lt=et.feature,Ct=et.keys,kt=et.values,tt=et.keycache,Kt=et.valuecache;for(var Vt in lt.properties){var Ht=lt.properties[Vt],di=tt[Vt];if(Ht!==null){di===void 0&&(Ct.push(Vt),tt[Vt]=di=Ct.length-1),Be.writeVarint(di);var ft=typeof Ht;ft!=="string"&&ft!=="boolean"&&ft!=="number"&&(Ht=JSON.stringify(Ht));var Rt=ft+":"+Ht,Mt=Kt[Rt];Mt===void 0&&(kt.push(Ht),Kt[Rt]=Mt=kt.length-1),Be.writeVarint(Mt)}}}function Ee(et,Be){return(Be<<3)+(7&et)}function je(et){return et<<1^et>>31}function ke(et,Be){for(var lt=et.loadGeometry(),Ct=et.type,kt=0,tt=0,Kt=lt.length,Vt=0;Vt<Kt;Vt++){var Ht=lt[Vt],di=1;Ct===1&&(di=Ht.length),Be.writeVarint(Ee(1,di));for(var ft=Ct===3?Ht.length-1:Ht.length,Rt=0;Rt<ft;Rt++){Rt===1&&Ct!==1&&Be.writeVarint(Ee(2,ft-1));var Mt=Ht[Rt].x-kt,ti=Ht[Rt].y-tt;Be.writeVarint(je(Mt)),Be.writeVarint(je(ti)),kt+=Mt,tt+=ti}Ct===3&&Be.writeVarint(Ee(7,1))}}function st(et,Be){var lt=typeof et;lt==="string"?Be.writeStringField(1,et):lt==="boolean"?Be.writeBooleanField(7,et):lt==="number"&&(et%1!=0?Be.writeDoubleField(3,et):et<0?Be.writeSVarintField(6,et):Be.writeVarintField(5,et))}return Le.exports=ie,Le.exports.fromVectorTileJs=ie,Le.exports.fromGeojsonVt=function(et,Be){Be=Be||{};var lt={};for(var Ct in et)lt[Ct]=new J(et[Ct].features,Be),lt[Ct].name=Ct,lt[Ct].version=Be.version,lt[Ct].extent=Be.extent;return ie({layers:lt})},Le.exports.GeoJSONWrapper=J,Le.exports}(),ze=y.cD(M);let Oe={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:Re=>Re},qe=Math.fround||($e=new Float32Array(1),Re=>($e[0]=+Re,$e[0]));var $e;let Qe=3,Ne=5,Je=6;class Ye{constructor(J){this.options=Object.assign(Object.create(Oe),J),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(J){let{log:ie,minZoom:W,maxZoom:ve}=this.options;ie&&console.time("total time");let Ie=`prepare ${J.length} points`;ie&&console.time(Ie),this.points=J;let Ee=[];for(let ke=0;ke<J.length;ke++){let st=J[ke];if(!st.geometry)continue;let[et,Be]=st.geometry.coordinates,lt=qe(He(et)),Ct=qe(Xe(Be));Ee.push(lt,Ct,1/0,ke,-1,1),this.options.reduce&&Ee.push(0)}let je=this.trees[ve+1]=this._createTree(Ee);ie&&console.timeEnd(Ie);for(let ke=ve;ke>=W;ke--){let st=+Date.now();je=this.trees[ke]=this._createTree(this._cluster(je,ke)),ie&&console.log("z%d: %d clusters in %dms",ke,je.numItems,+Date.now()-st)}return ie&&console.timeEnd("total time"),this}getClusters(J,ie){let W=((J[0]+180)%360+360)%360-180,ve=Math.max(-90,Math.min(90,J[1])),Ie=J[2]===180?180:((J[2]+180)%360+360)%360-180,Ee=Math.max(-90,Math.min(90,J[3]));if(J[2]-J[0]>=360)W=-180,Ie=180;else if(W>Ie){let Be=this.getClusters([W,ve,180,Ee],ie),lt=this.getClusters([-180,ve,Ie,Ee],ie);return Be.concat(lt)}let je=this.trees[this._limitZoom(ie)],ke=je.range(He(W),Xe(Ee),He(Ie),Xe(ve)),st=je.data,et=[];for(let Be of ke){let lt=this.stride*Be;et.push(st[lt+Ne]>1?bt(st,lt,this.clusterProps):this.points[st[lt+Qe]])}return et}getChildren(J){let ie=this._getOriginId(J),W=this._getOriginZoom(J),ve="No cluster with the specified id.",Ie=this.trees[W];if(!Ie)throw new Error(ve);let Ee=Ie.data;if(ie*this.stride>=Ee.length)throw new Error(ve);let je=this.options.radius/(this.options.extent*Math.pow(2,W-1)),ke=Ie.within(Ee[ie*this.stride],Ee[ie*this.stride+1],je),st=[];for(let et of ke){let Be=et*this.stride;Ee[Be+4]===J&&st.push(Ee[Be+Ne]>1?bt(Ee,Be,this.clusterProps):this.points[Ee[Be+Qe]])}if(st.length===0)throw new Error(ve);return st}getLeaves(J,ie,W){let ve=[];return this._appendLeaves(ve,J,ie=ie||10,W=W||0,0),ve}
5getTile(J,ie,W){let ve=this.trees[this._limitZoom(J)],Ie=Math.pow(2,J),{extent:Ee,radius:je}=this.options,ke=je/Ee,st=(W-ke)/Ie,et=(W+1+ke)/Ie,Be={features:[]};return this._addTileFeatures(ve.range((ie-ke)/Ie,st,(ie+1+ke)/Ie,et),ve.data,ie,W,Ie,Be),ie===0&&this._addTileFeatures(ve.range(1-ke/Ie,st,1,et),ve.data,Ie,W,Ie,Be),ie===Ie-1&&this._addTileFeatures(ve.range(0,st,ke/Ie,et),ve.data,-1,W,Ie,Be),Be.features.length?Be:null}getClusterExpansionZoom(J){let ie=this._getOriginZoom(J)-1;for(;ie<=this.options.maxZoom;){let W=this.getChildren(J);if(ie++,W.length!==1)break;J=W[0].properties.cluster_id}return ie}_appendLeaves(J,ie,W,ve,Ie){let Ee=this.getChildren(ie);for(let je of Ee){let ke=je.properties;if(ke&&ke.cluster?Ie+ke.point_count<=ve?Ie+=ke.point_count:Ie=this._appendLeaves(J,ke.cluster_id,W,ve,Ie):Ie<ve?Ie++:J.push(je),J.length===W)break}return Ie}_createTree(J){let ie=new y.aC(J.length/this.stride|0,this.options.nodeSize,Float32Array);for(let W=0;W<J.length;W+=this.stride)ie.add(J[W],J[W+1]);return ie.finish(),ie.data=J,ie}_addTileFeatures(J,ie,W,ve,Ie,Ee){for(let je of J){let ke=je*this.stride,st=ie[ke+Ne]>1,et,Be,lt;if(st)et=_t(ie,ke,this.clusterProps),Be=ie[ke],lt=ie[ke+1];else{let tt=this.points[ie[ke+Qe]];et=tt.properties;let[Kt,Vt]=tt.geometry.coordinates;Be=He(Kt),lt=Xe(Vt)}let Ct={type:1,geometry:[[Math.round(this.options.extent*(Be*Ie-W)),Math.round(this.options.extent*(lt*Ie-ve))]],tags:et},kt;kt=st||this.options.generateId?ie[ke+Qe]:this.points[ie[ke+Qe]].id,kt!==void 0&&(Ct.id=kt),Ee.features.push(Ct)}}_limitZoom(J){return Math.max(this.options.minZoom,Math.min(Math.floor(+J),this.options.maxZoom+1))}_cluster(J,ie){let{radius:W,extent:ve,reduce:Ie,minPoints:Ee}=this.options,je=W/(ve*Math.pow(2,ie)),ke=J.data,st=[],et=this.stride;for(let Be=0;Be<ke.length;Be+=et){if(ke[Be+2]<=ie)continue;ke[Be+2]=ie;let lt=ke[Be],Ct=ke[Be+1],kt=J.within(ke[Be],ke[Be+1],je),tt=ke[Be+Ne],Kt=tt;for(let Vt of kt){let Ht=Vt*et;ke[Ht+2]>ie&&(Kt+=ke[Ht+Ne])}if(Kt>tt&&Kt>=Ee){let Vt,Ht=lt*tt,di=Ct*tt,ft=-1,Rt=((Be/et|0)<<5)+(ie+1)+this.points.length;for(let Mt of kt){let ti=Mt*et;if(ke[ti+2]<=ie)continue;ke[ti+2]=ie;let Zi=ke[ti+Ne];Ht+=ke[ti]*Zi,di+=ke[ti+1]*Zi,ke[ti+4]=Rt,Ie&&(Vt||(Vt=this._map(ke,Be,!0),ft=this.clusterProps.length,this.clusterProps.push(Vt)),Ie(Vt,this._map(ke,ti)))}ke[Be+4]=Rt,st.push(Ht/Kt,di/Kt,1/0,Rt,-1,Kt),Ie&&st.push(ft)}else{for(let Vt=0;Vt<et;Vt++)st.push(ke[Be+Vt]);if(Kt>1)for(let Vt of kt){let Ht=Vt*et;if(!(ke[Ht+2]<=ie)){ke[Ht+2]=ie;for(let di=0;di<et;di++)st.push(ke[Ht+di])}}}}return st}_getOriginId(J){return J-this.points.length>>5}_getOriginZoom(J){return(J-this.points.length)%32}_map(J,ie,W){if(J[ie+Ne]>1){let Ee=this.clusterProps[J[ie+Je]];return W?Object.assign({},Ee):Ee}let ve=this.points[J[ie+Qe]].properties,Ie=this.options.map(ve);return W&&Ie===ve?Object.assign({},Ie):Ie}}function bt(Re,J,ie){return{type:"Feature",id:Re[J+Qe],properties:_t(Re,J,ie),geometry:{type:"Point",coordinates:[(W=Re[J],360*(W-.5)),At(Re[J+1])]}};var W}function _t(Re,J,ie){let W=Re[J+Ne],ve=W>=1e4?`${Math.round(W/1e3)}k`:W>=1e3?Math.round(W/100)/10+"k":W,Ie=Re[J+Je],Ee=Ie===-1?{}:Object.assign({},ie[Ie]);return Object.assign(Ee,{cluster:!0,cluster_id:Re[J+Qe],point_count:W,point_count_abbreviated:ve})}function He(Re){return Re/360+.5}function Xe(Re){let J=Math.sin(Re*Math.PI/180),ie=.5-.25*Math.log((1+J)/(1-J))/Math.PI;return ie<0?0:ie>1?1:ie}function At(Re){let J=(180-360*Re)*Math.PI/180;return 360*Math.atan(Math.exp(J))/Math.PI-90}function Yt(Re,J,ie,W){let ve=W,Ie=J+(ie-J>>1),Ee,je=ie-J,ke=Re[J],st=Re[J+1],et=Re[ie],Be=Re[ie+1];for(let lt=J+3;lt<ie;lt+=3){let Ct=xi(Re[lt],Re[lt+1],ke,st,et,Be);if(Ct>ve)Ee=lt,ve=Ct;else if(Ct===ve){let kt=Math.abs(lt-Ie);kt<je&&(Ee=lt,je=kt)}}ve>W&&(Ee-J>3&&Yt(Re,J,Ee,W),Re[Ee+2]=ve,ie-Ee>3&&Yt(Re,Ee,ie,W))}function xi(Re,J,ie,W,ve,Ie){let Ee=ve-ie,je=Ie-W;if(Ee!==0||je!==0){let ke=((Re-ie)*Ee+(J-W)*je)/(Ee*Ee+je*je);ke>1?(ie=ve,W=Ie):ke>0&&(ie+=Ee*ke,W+=je*ke)}return Ee=Re-ie,je=J-W,Ee*Ee+je*je}function Pi(Re,J,ie,W){let ve={id:Re??null,type:J,geometry:ie,tags:W,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(J==="Point"||J==="MultiPoint"||J==="LineString")Ai(ve,ie);else if(J==="Polygon")Ai(ve,ie[0]);else if(J==="MultiLineString")for(let Ie of ie)Ai(ve,Ie);else if(J==="MultiPolygon")for(let Ie of ie)Ai(ve,Ie[0]);return ve}function Ai(Re,J){for(let ie=0;ie<J.length;ie+=3)Re.minX=Math.min(Re.minX,J[ie]),Re.minY=Math.min(Re.minY,J[ie+1]),Re.maxX=Math.max(Re.maxX,J[ie]),Re.maxY=Math.max(Re.maxY,J[ie+1])}function ln(Re,J,ie,W){if(!J.geometry)return;let ve=J.geometry.coordinates;if(ve&&ve.length===0)return;let Ie=J.geometry.type,Ee=Math.pow(ie.tolerance/((1<<ie.maxZoom)*ie.extent),2),je=[],ke=J.id;if(ie.promoteId?ke=J.properties[ie.promoteId]:ie.generateId&&(ke=W||0),Ie==="Point")wt(ve,je);else if(Ie==="MultiPoint")for(let st of ve)wt(st,je);else if(Ie==="LineString")yt(ve,je,Ee,!1);else if(Ie==="MultiLineString"){if(ie.lineMetrics){for(let st of ve)je=[],yt(st,je,Ee,!1),Re.push(Pi(ke,"LineString",je,J.properties));return}Tt(ve,je,Ee,!1)}else if(Ie==="Polygon")Tt(ve,je,Ee,!0);else{if(Ie!=="MultiPolygon"){if(Ie==="GeometryCollection"){for(let st of J.geometry.geometries)ln(Re,{id:ke,geometry:st,properties:J.properties},ie,W);return}throw new Error("Input data is not a valid GeoJSON object.")}for(let st of ve){let et=[];Tt(st,et,Ee,!0),je.push(et)}}Re.push(Pi(ke,Ie,je,J.properties))}
5function wt(Re,J){J.push(oi(Re[0]),si(Re[1]),0)}function yt(Re,J,ie,W){let ve,Ie,Ee=0;for(let ke=0;ke<Re.length;ke++){let st=oi(Re[ke][0]),et=si(Re[ke][1]);J.push(st,et,0),ke>0&&(Ee+=W?(ve*et-st*Ie)/2:Math.sqrt(Math.pow(st-ve,2)+Math.pow(et-Ie,2))),ve=st,Ie=et}let je=J.length-3;J[2]=1,Yt(J,0,je,ie),J[je+2]=1,J.size=Math.abs(Ee),J.start=0,J.end=J.size}function Tt(Re,J,ie,W){for(let ve=0;ve<Re.length;ve++){let Ie=[];yt(Re[ve],Ie,ie,W),J.push(Ie)}}function oi(Re){return Re/360+.5}function si(Re){let J=Math.sin(Re*Math.PI/180),ie=.5-.25*Math.log((1+J)/(1-J))/Math.PI;return ie<0?0:ie>1?1:ie}function Di(Re,J,ie,W,ve,Ie,Ee,je){if(W/=J,Ie>=(ie/=J)&&Ee<W)return Re;if(Ee<ie||Ie>=W)return null;let ke=[];for(let st of Re){let et=st.geometry,Be=st.type,lt=ve===0?st.minX:st.minY,Ct=ve===0?st.maxX:st.maxY;if(lt>=ie&&Ct<W){ke.push(st);continue}if(Ct<ie||lt>=W)continue;let kt=[];if(Be==="Point"||Be==="MultiPoint")Ki(et,kt,ie,W,ve);else if(Be==="LineString")wi(et,kt,ie,W,ve,!1,je.lineMetrics);else if(Be==="MultiLineString")qi(et,kt,ie,W,ve,!1);else if(Be==="Polygon")qi(et,kt,ie,W,ve,!0);else if(Be==="MultiPolygon")for(let tt of et){let Kt=[];qi(tt,Kt,ie,W,ve,!0),Kt.length&&kt.push(Kt)}if(kt.length){if(je.lineMetrics&&Be==="LineString"){for(let tt of kt)ke.push(Pi(st.id,Be,tt,st.tags));continue}Be!=="LineString"&&Be!=="MultiLineString"||(kt.length===1?(Be="LineString",kt=kt[0]):Be="MultiLineString"),Be!=="Point"&&Be!=="MultiPoint"||(Be=kt.length===3?"Point":"MultiPoint"),ke.push(Pi(st.id,Be,kt,st.tags))}}return ke.length?ke:null}function Ki(Re,J,ie,W,ve){for(let Ie=0;Ie<Re.length;Ie+=3){let Ee=Re[Ie+ve];Ee>=ie&&Ee<=W&&Ui(J,Re[Ie],Re[Ie+1],Re[Ie+2])}}function wi(Re,J,ie,W,ve,Ie,Ee){let je=Mr(Re),ke=ve===0?Cr:sr,st,et,Be=Re.start;for(let Kt=0;Kt<Re.length-3;Kt+=3){let Vt=Re[Kt],Ht=Re[Kt+1],di=Re[Kt+2],ft=Re[Kt+3],Rt=Re[Kt+4],Mt=ve===0?Vt:Ht,ti=ve===0?ft:Rt,Zi=!1;Ee&&(st=Math.sqrt(Math.pow(Vt-ft,2)+Math.pow(Ht-Rt,2))),Mt<ie?ti>ie&&(et=ke(je,Vt,Ht,ft,Rt,ie),Ee&&(je.start=Be+st*et)):Mt>W?ti<W&&(et=ke(je,Vt,Ht,ft,Rt,W),Ee&&(je.start=Be+st*et)):Ui(je,Vt,Ht,di),ti<ie&&Mt>=ie&&(et=ke(je,Vt,Ht,ft,Rt,ie),Zi=!0),ti>W&&Mt<=W&&(et=ke(je,Vt,Ht,ft,Rt,W),Zi=!0),!Ie&&Zi&&(Ee&&(je.end=Be+st*et),J.push(je),je=Mr(Re)),Ee&&(Be+=st)}let lt=Re.length-3,Ct=Re[lt],kt=Re[lt+1],tt=ve===0?Ct:kt;tt>=ie&&tt<=W&&Ui(je,Ct,kt,Re[lt+2]),lt=je.length-3,Ie&<>=3&&(je[lt]!==je[0]||je[lt+1]!==je[1])&&Ui(je,je[0],je[1],je[2]),je.length&&J.push(je)}function Mr(Re){let J=[];return J.size=Re.size,J.start=Re.start,J.end=Re.end,J}function qi(Re,J,ie,W,ve,Ie){for(let Ee of Re)wi(Ee,J,ie,W,ve,Ie,!1)}function Ui(Re,J,ie,W){Re.push(J,ie,W)}function Cr(Re,J,ie,W,ve,Ie){let Ee=(Ie-J)/(W-J);return Ui(Re,Ie,ie+(ve-ie)*Ee,1),Ee}function sr(Re,J,ie,W,ve,Ie){let Ee=(Ie-ie)/(ve-ie);return Ui(Re,J+(W-J)*Ee,Ie,1),Ee}function Sr(Re,J){let ie=[];for(let W=0;W<Re.length;W++){let ve=Re[W],Ie=ve.type,Ee;if(Ie==="Point"||Ie==="MultiPoint"||Ie==="LineString")Ee=Tr(ve.geometry,J);else if(Ie==="MultiLineString"||Ie==="Polygon"){Ee=[];for(let je of ve.geometry)Ee.push(Tr(je,J))}else if(Ie==="MultiPolygon"){Ee=[];for(let je of ve.geometry){let ke=[];for(let st of je)ke.push(Tr(st,J));Ee.push(ke)}}ie.push(Pi(ve.id,Ie,Ee,ve.tags))}return ie}function Tr(Re,J){let ie=[];ie.size=Re.size,Re.start!==void 0&&(ie.start=Re.start,ie.end=Re.end);for(let W=0;W<Re.length;W+=3)ie.push(Re[W]+J,Re[W+1],Re[W+2]);return ie}function Mn(Re,J){if(Re.transformed)return Re;let ie=1<<Re.z,W=Re.x,ve=Re.y;for(let Ie of Re.features){let Ee=Ie.geometry,je=Ie.type;if(Ie.geometry=[],je===1)for(let ke=0;ke<Ee.length;ke+=2)Ie.geometry.push(pr(Ee[ke],Ee[ke+1],J,ie,W,ve));else for(let ke=0;ke<Ee.length;ke++){let st=[];for(let et=0;et<Ee[ke].length;et+=2)st.push(pr(Ee[ke][et],Ee[ke][et+1],J,ie,W,ve));Ie.geometry.push(st)}}return Re.transformed=!0,Re}function pr(Re,J,ie,W,ve,Ie){return[Math.round(ie*(Re*W-ve)),Math.round(ie*(J*W-Ie))]}function cn(Re,J,ie,W,ve){let Ie=J===ve.maxZoom?0:ve.tolerance/((1<<J)*ve.extent),Ee={features:[],numPoints:0,numSimplified:0,numFeatures:Re.length,source:null,x:ie,y:W,z:J,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(let je of Re)Yr(Ee,je,Ie,ve);return Ee}function Yr(Re,J,ie,W){let ve=J.geometry,Ie=J.type,Ee=[];if(Re.minX=Math.min(Re.minX,J.minX),Re.minY=Math.min(Re.minY,J.minY),Re.maxX=Math.max(Re.maxX,J.maxX),Re.maxY=Math.max(Re.maxY,J.maxY),Ie==="Point"||Ie==="MultiPoint")for(let je=0;je<ve.length;je+=3)Ee.push(ve[je],ve[je+1]),Re.numPoints++,Re.numSimplified++;else if(Ie==="LineString")jt(Ee,ve,Re,ie,!1,!1);else if(Ie==="MultiLineString"||Ie==="Polygon")for(let je=0;je<ve.length;je++)jt(Ee,ve[je],Re,ie,Ie==="Polygon",je===0);else if(Ie==="MultiPolygon")for(let je=0;je<ve.length;je++){let ke=ve[je];for(let st=0;st<ke.length;st++)jt(Ee,ke[st],Re,ie,!0,st===0)}if(Ee.length){let je=J.tags||null;if(Ie==="LineString"&&W.lineMetrics){je={};for(let st in J.tags)je[st]=J.tags[st];je.mapbox_clip_start=ve.start/ve.size,je.mapbox_clip_end=ve.end/ve.size}let ke={geometry:Ee,type:Ie==="Polygon"||Ie==="MultiPolygon"?3:Ie==="LineString"||Ie==="MultiLineString"?2:1,tags:je};J.id!==null&&(ke.id=J.id),Re.features.push(ke)}}function jt(Re,J,ie,W,ve,Ie){let Ee=W*W;if(W>0&&J.size<(ve?Ee:W))return void(ie.numPoints+=J.length/3);let je=[];for(let ke=0;ke<J.length;ke+=3)(W===0||J[ke+2]>Ee)&&(ie.numSimplified++,je.push(J[ke],J[ke+1])),ie.numPoints++;ve&&function(ke,st){let et=0;for(let Be=0,lt=ke.length,Ct=lt-2;Be<lt;Ct=Be,Be+=2)et+=(ke[Be]-ke[Ct])*(ke[Be+1]+ke[Ct+1]);if(et>0===st)for(let Be=0,lt=ke.length;Be<lt/2;Be+=2){let Ct=ke[Be],kt=ke[Be+1];ke[Be]=ke[lt-2-Be],ke[Be+1]=ke[lt-1-Be],ke[lt-2-Be]=Ct,ke[lt-1-Be]=kt}}(je,Ie),Re.push(je)}let Ji={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class un{constructor(J,ie){let W=(ie=this.options=function(Ie,Ee){for(let je in Ee)Ie[je]=Ee[je];return Ie}(Object.create(Ji),ie)).debug;if(W&&console.time("preprocess data"),ie.maxZoom<0||ie.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(ie.promoteId&&ie.generateId)throw new Error("promoteId and generateId cannot be used together.");let ve=function(Ie,Ee){let je=[];if(Ie.type==="FeatureCollection")for(let ke=0;ke<Ie.features.length;ke++)ln(je,Ie.features[ke],Ee,ke);else ln(je,Ie.type==="Feature"?Ie:{geometry:Ie},Ee);return je}(J,ie);this.tiles={},this.tileCoords=[],W&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",ie.indexMaxZoom,ie.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),ve=function(Ie,Ee){let je=Ee.buffer/Ee.extent,ke=Ie,st=Di(Ie,1,-1-je,je,0,-1,2,Ee),et=Di(Ie,1,1-je,2+je,0,-1,2,Ee);return(st||et)&&(ke=Di(Ie,1,-je,1+je,0,-1,2,Ee)||[],st&&(ke=Sr(st,1).concat(ke)),et&&(ke=ke.concat(Sr(et,
5-1)))),ke}(ve,ie),ve.length&&this.splitTile(ve,0,0,0),W&&(ve.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}splitTile(J,ie,W,ve,Ie,Ee,je){let ke=[J,ie,W,ve],st=this.options,et=st.debug;for(;ke.length;){ve=ke.pop(),W=ke.pop(),ie=ke.pop(),J=ke.pop();let Be=1<<ie,lt=Ir(ie,W,ve),Ct=this.tiles[lt];if(!Ct&&(et>1&&console.time("creation"),Ct=this.tiles[lt]=cn(J,ie,W,ve,st),this.tileCoords.push({z:ie,x:W,y:ve}),et)){et>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ie,W,ve,Ct.numFeatures,Ct.numPoints,Ct.numSimplified),console.timeEnd("creation"));let Zi=`z${ie}`;this.stats[Zi]=(this.stats[Zi]||0)+1,this.total++}if(Ct.source=J,Ie==null){if(ie===st.indexMaxZoom||Ct.numPoints<=st.indexMaxPoints)continue}else{if(ie===st.maxZoom||ie===Ie)continue;if(Ie!=null){let Zi=Ie-ie;if(W!==Ee>>Zi||ve!==je>>Zi)continue}}if(Ct.source=null,J.length===0)continue;et>1&&console.time("clipping");let kt=.5*st.buffer/st.extent,tt=.5-kt,Kt=.5+kt,Vt=1+kt,Ht=null,di=null,ft=null,Rt=null,Mt=Di(J,Be,W-kt,W+Kt,0,Ct.minX,Ct.maxX,st),ti=Di(J,Be,W+tt,W+Vt,0,Ct.minX,Ct.maxX,st);J=null,Mt&&(Ht=Di(Mt,Be,ve-kt,ve+Kt,1,Ct.minY,Ct.maxY,st),di=Di(Mt,Be,ve+tt,ve+Vt,1,Ct.minY,Ct.maxY,st),Mt=null),ti&&(ft=Di(ti,Be,ve-kt,ve+Kt,1,Ct.minY,Ct.maxY,st),Rt=Di(ti,Be,ve+tt,ve+Vt,1,Ct.minY,Ct.maxY,st),ti=null),et>1&&console.timeEnd("clipping"),ke.push(Ht||[],ie+1,2*W,2*ve),ke.push(di||[],ie+1,2*W,2*ve+1),ke.push(ft||[],ie+1,2*W+1,2*ve),ke.push(Rt||[],ie+1,2*W+1,2*ve+1)}}getTile(J,ie,W){J=+J,ie=+ie,W=+W;let ve=this.options,{extent:Ie,debug:Ee}=ve;if(J<0||J>24)return null;let je=1<<J,ke=Ir(J,ie=ie+je&je-1,W);if(this.tiles[ke])return Mn(this.tiles[ke],Ie);Ee>1&&console.log("drilling down to z%d-%d-%d",J,ie,W);let st,et=J,Be=ie,lt=W;for(;!st&&et>0;)et--,Be>>=1,lt>>=1,st=this.tiles[Ir(et,Be,lt)];return st&&st.source?(Ee>1&&(console.log("found parent tile z%d-%d-%d",et,Be,lt),console.time("drilling down")),this.splitTile(st.source,et,Be,lt,J,ie,W),Ee>1&&console.timeEnd("drilling down"),this.tiles[ke]?Mn(this.tiles[ke],Ie):null):null}}function Ir(Re,J,ie){return 32*((1<<Re)*ie+J)+Re}function gn(Re,J){return J?Re.properties[J]:Re.id}function hn(Re,J){if(Re==null)return!0;if(Re.type==="Feature")return gn(Re,J)!=null;if(Re.type==="FeatureCollection"){let ie=new Set;for(let W of Re.features){let ve=gn(W,J);if(ve==null||ie.has(ve))return!1;ie.add(ve)}return!0}return!1}function Zs(Re,J){let ie=new Map;if(Re!=null)if(Re.type==="Feature")ie.set(gn(Re,J),Re);else for(let W of Re.features)ie.set(gn(W,J),W);return ie}class os extends B{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(J,ie){return y._(this,void 0,void 0,function*(){let W=J.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let ve=this._geoJSONIndex.getTile(W.z,W.x,W.y);if(!ve)return null;let Ie=new ge(ve.features),Ee=ze(Ie);return Ee.byteOffset===0&&Ee.byteLength===Ee.buffer.byteLength||(Ee=new Uint8Array(Ee)),{vectorTile:Ie,rawData:Ee.buffer}})}loadData(J){return y._(this,void 0,void 0,function*(){var ie;(ie=this._pendingRequest)===null||ie===void 0||ie.abort();let W=!!(J&&J.request&&J.request.collectResourceTiming)&&new y.cA(J.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(J,this._pendingRequest),this._geoJSONIndex=J.cluster?new Ye(function({superclusterOptions:Ee,clusterProperties:je}){if(!je||!Ee)return Ee;let ke={},st={},et={accumulated:null,zoom:0},Be={properties:null},lt=Object.keys(je);for(let Ct of lt){let[kt,tt]=je[Ct],Kt=y.cH(tt),Vt=y.cH(typeof kt=="string"?[kt,["accumulated"],["get",Ct]]:kt);ke[Ct]=Kt.value,st[Ct]=Vt.value}return Ee.map=Ct=>{Be.properties=Ct;let kt={};for(let tt of lt)kt[tt]=ke[tt].evaluate(et,Be);return kt},Ee.reduce=(Ct,kt)=>{Be.properties=kt;for(let tt of lt)et.accumulated=Ct[tt],Ct[tt]=st[tt].evaluate(et,Be)},Ee}(J)).load((yield this._pendingData).features):(ve=yield this._pendingData,new un(ve,J.geojsonVtOptions)),this.loaded={};let Ie={};if(W){let Ee=W.finish();Ee&&(Ie.resourceTiming={},Ie.resourceTiming[J.source]=JSON.parse(JSON.stringify(Ee)))}return Ie}catch(Ie){if(delete this._pendingRequest,y.cl(Ie))return{abandoned:!0};throw Ie}var ve})}getData(){return y._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(J){let ie=this.loaded;return ie&&ie[J.uid]?super.reloadTile(J):this.loadTile(J)}loadAndProcessGeoJSON(J,ie){return y._(this,void 0,void 0,function*(){let W=yield this.loadGeoJSON(J,ie);if(delete this._pendingRequest,typeof W!="object")throw new Error(`Input data given to '${J.source}' is not a valid GeoJSON object.`);if(j(W,!0),J.filter){let ve=y.cH(J.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(ve.result==="error")throw new Error(ve.value.map(Ee=>`${Ee.key}: ${Ee.message}`).join(", "));W={type:"FeatureCollection",features:W.features.filter(Ee=>ve.value.evaluate({zoom:0},Ee))}}return W})}loadGeoJSON(J,ie){return y._(this,void 0,void 0,function*(){let{promoteId:W}=J;if(J.request){let ve=yield y.j(J.request,ie);return this._dataUpdateable=hn(ve.data,W)?Zs(ve.data,W):void 0,ve.data}
5if(typeof J.data=="string")try{let ve=JSON.parse(J.data);return this._dataUpdateable=hn(ve,W)?Zs(ve,W):void 0,ve}catch{throw new Error(`Input data given to '${J.source}' is not a valid GeoJSON object.`)}if(!J.dataDiff)throw new Error(`Input data given to '${J.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${J.source}`);return function(ve,Ie,Ee){var je,ke,st,et;if(Ie.removeAll&&ve.clear(),Ie.remove)for(let Be of Ie.remove)ve.delete(Be);if(Ie.add)for(let Be of Ie.add){let lt=gn(Be,Ee);lt!=null&&ve.set(lt,Be)}if(Ie.update)for(let Be of Ie.update){let lt=ve.get(Be.id);if(lt==null)continue;let Ct=!Be.removeAllProperties&&(((je=Be.removeProperties)===null||je===void 0?void 0:je.length)>0||((ke=Be.addOrUpdateProperties)===null||ke===void 0?void 0:ke.length)>0);if((Be.newGeometry||Be.removeAllProperties||Ct)&&(lt=Object.assign({},lt),ve.set(Be.id,lt),Ct&&(lt.properties=Object.assign({},lt.properties))),Be.newGeometry&&(lt.geometry=Be.newGeometry),Be.removeAllProperties)lt.properties={};else if(((st=Be.removeProperties)===null||st===void 0?void 0:st.length)>0)for(let kt of Be.removeProperties)Object.prototype.hasOwnProperty.call(lt.properties,kt)&&delete lt.properties[kt];if(((et=Be.addOrUpdateProperties)===null||et===void 0?void 0:et.length)>0)for(let{key:kt,value:tt}of Be.addOrUpdateProperties)lt.properties[kt]=tt}}(this._dataUpdateable,J.dataDiff,W),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(J){return y._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(J){return this._geoJSONIndex.getClusterExpansionZoom(J.clusterId)}getClusterChildren(J){return this._geoJSONIndex.getChildren(J.clusterId)}getClusterLeaves(J){return this._geoJSONIndex.getLeaves(J.clusterId,J.limit,J.offset)}}class Ar{constructor(J){this.self=J,this.actor=new y.H(J),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(ie,W)=>{if(this.externalWorkerSourceTypes[ie])throw new Error(`Worker source with name "${ie}" already registered.`);this.externalWorkerSourceTypes[ie]=W},this.self.addProtocol=y.cn,this.self.removeProtocol=y.co,this.self.registerRTLTextPlugin=ie=>{y.cI.setMethods(ie)},this.actor.registerMessageHandler("LDT",(ie,W)=>this._getDEMWorkerSource(ie,W.source).loadTile(W)),this.actor.registerMessageHandler("RDT",(ie,W)=>y._(this,void 0,void 0,function*(){this._getDEMWorkerSource(ie,W.source).removeTile(W)})),this.actor.registerMessageHandler("GCEZ",(ie,W)=>y._(this,void 0,void 0,function*(){return this._getWorkerSource(ie,W.type,W.source).getClusterExpansionZoom(W)})),this.actor.registerMessageHandler("GCC",(ie,W)=>y._(this,void 0,void 0,function*(){return this._getWorkerSource(ie,W.type,W.source).getClusterChildren(W)})),this.actor.registerMessageHandler("GCL",(ie,W)=>y._(this,void 0,void 0,function*(){return this._getWorkerSource(ie,W.type,W.source).getClusterLeaves(W)})),this.actor.registerMessageHandler("LD",(ie,W)=>this._getWorkerSource(ie,W.type,W.source).loadData(W)),this.actor.registerMessageHandler("GD",(ie,W)=>this._getWorkerSource(ie,W.type,W.source).getData()),this.actor.registerMessageHandler("LT",(ie,W)=>this._getWorkerSource(ie,W.type,W.source).loadTile(W)),this.actor.registerMessageHandler("RT",(ie,W)=>this._getWorkerSource(ie,W.type,W.source).reloadTile(W)),this.actor.registerMessageHandler("AT",(ie,W)=>this._getWorkerSource(ie,W.type,W.source).abortTile(W)),this.actor.registerMessageHandler("RMT",(ie,W)=>this._getWorkerSource(ie,W.type,W.source).removeTile(W)),this.actor.registerMessageHandler("RS",(ie,W)=>y._(this,void 0,void 0,function*(){if(!this.workerSources[ie]||!this.workerSources[ie][W.type]||!this.workerSources[ie][W.type][W.source])return;let ve=this.workerSources[ie][W.type][W.source];delete this.workerSources[ie][W.type][W.source],ve.removeSource!==void 0&&ve.removeSource(W)})),this.actor.registerMessageHandler("RM",ie=>y._(this,void 0,void 0,function*(){delete this.layerIndexes[ie],delete this.availableImages[ie],delete this.workerSources[ie],delete this.demWorkerSources[ie]})),this.actor.registerMessageHandler("SR",(ie,W)=>y._(this,void 0,void 0,function*(){this.referrer=W})),this.actor.registerMessageHandler("SRPS",(ie,W)=>this._syncRTLPluginState(ie,W)),this.actor.registerMessageHandler("IS",(ie,W)=>y._(this,void 0,void 0,function*(){this.self.importScripts(W)})),this.actor.registerMessageHandler("SI",(ie,W)=>this._setImages(ie,W)),this.actor.registerMessageHandler("UL",(ie,W)=>y._(this,void 0,void 0,function*(){this._getLayerIndex(ie).update(W.layers,W.removedIds)})),this.actor.registerMessageHandler("SL",(ie,W)=>y._(this,void 0,void 0,function*(){this._getLayerIndex(ie).replace(W)}))}_setImages(J,ie){return y._(this,void 0,void 0,function*(){this.availableImages[J]=ie;for(let W in this.workerSources[J]){let ve=this.workerSources[J][W];for(let Ie in ve)ve[Ie].availableImages=ie}})}_syncRTLPluginState(J,ie){return y._(this,void 0,void 0,function*(){return yield y.cI.syncState(ie,this.self.importScripts)})}_getAvailableImages(J){let ie=this.availableImages[J];return ie||(ie=[]),ie}_getLayerIndex(J){let ie=this.layerIndexes[J];return ie||(ie=this.layerIndexes[J]=new a),ie}_getWorkerSource(J,ie,W){if(this.workerSources[J]||(this.workerSources[J]={}),this.workerSources[J][ie]||(this.workerSources[J][ie]={}),!this.workerSources[J][ie][W]){let ve={sendAsync:(Ie,Ee)=>(Ie.targetMapId=J,this.actor.sendAsync(Ie,Ee))};switch(ie){case"vector":this.workerSources[J][ie][W]=new B(ve,this._getLayerIndex(J),this._getAvailableImages(J));break;case"geojson":this.workerSources[J][ie][W]=new os(ve,this._getLayerIndex(J),this._getAvailableImages(J));break;default:this.workerSources[J][ie][W]=new this.externalWorkerSourceTypes[ie](ve,this._getLayerIndex(J),this._getAvailableImages(J))}}return this.workerSources[J][ie][W]}_getDEMWorkerSource(J,ie){return this.demWorkerSources[J]||(this.demWorkerSources[J]={}),this.demWorkerSources[J][ie]||(this.demWorkerSources[J][ie]=new U),this.demWorkerSources[J][ie]}}return y.i(self)&&(self.worker=new Ar(self)),Ar}),g("index",["exports","./shared"],function(y,a){"use strict";var z="5.3.0";function F(){var h=new a.A(4);return a.A!=Float32Array&&(h[1]=0,h[2]=0),h[0]=1,h[3]=1,h}let V,B,U={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(h,e,i){let l=requestAnimationFrame(d=>{c(),e(d)}),{unsubscribe:c}=a.s(h.signal,"abort",()=>{c(),cancelAnimationFrame(l),i(a.c())},!1)},frameAsync(h){return new Promise((e,i)=>{this.frame(h,e,i)})},getImageData(h,e=0){return this.getImageCanvasContext(h).getImageData(-e,-e,h.width+2*e,h.height+2*e)},getImageCanvasContext(h){let e=window.document.createElement("canvas"),i=e.getContext("2d",{willReadFrequently:!0});if(!i)throw new Error("failed to create canvas 2d context");return e.width=h.width,e.height=h.height,i.drawImage(h,0,0,h.width,h.height),i},resolveURL:h=>(V||(V=document.createElement("a")),V.href=h,V.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(B==null&&(B=matchMedia("(prefers-reduced-motion: reduce)")),B.matches)}};class O{static testProp(e){if(!O.docStyle)return e[0];for(let i=0;i<e.length;i++)if(e[i]in O.docStyle)return e[i];return e[0]}static create(e,i,l){let c=window.document.createElement(e);return i!==void 0&&(c.className=i),l&&l.appendChild(c),c}static createNS(e,i){return window.document.createElementNS(e,i)}static disableDrag(){O.docStyle&&O.selectProp&&(O.userSelect=O.docStyle[O.selectProp],O.docStyle[O.selectProp]="none")}static enableDrag(){O.docStyle&&O.selectProp&&(O.docStyle[O.selectProp]=O.userSelect)}static setTransform(e,i){e.style[O.transformProp]=i}static addEventListener(e,i,l,c={}){e.addEventListener(i,l,"passive"in c?c:c.capture)}static removeEventListener(e,i,l,c={}){e.removeEventListener(i,l,"passive"in c?c:c.capture)}static suppressClickInternal(e){e.preventDefault(),e.stopPropagation(),window.removeEventListener("click",O.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",O.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",O.suppressClickInternal,!0)},0)}static getScale(e){let i=e.getBoundingClientRect();return{x:i.width/e.offsetWidth||1,y:i.height/e.offsetHeight||1,boundingClientRect:i}}static getPoint(e,i,l){let c=i.boundingClientRect;return new a.P((l.clientX-c.left)/i.x-e.clientLeft,(l.clientY-c.top)/i.y-e.clientTop)}static mousePos(e,i){let l=O.getScale(e);return O.getPoint(e,l,i)}static touchPos(e,i){let l=[],c=O.getScale(e);for(let d=0;d<i.length;d++)l.push(O.getPoint(e,c,i[d]));return l}static mouseButton(e){return e.button}static remove(e){e.parentNode&&e.parentNode.removeChild(e)}static sanitize(e){let i=new DOMParser().parseFromString(e,"text/html").body||document.createElement("body"),l=i.querySelectorAll("script");for(let c of l)c.remove();return O.clean(i),i.innerHTML}static isPossiblyDangerous(e,i){let l=i.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(e)||!l.includes("javascript:")&&!l.includes("data:"))||!!e.startsWith("on")||void 0}static clean(e){let i=e.children;for(let l of i)O.removeAttributes(l),O.clean(l)}static removeAttributes(e){for(let{name:i,value:l}of e.attributes)O.isPossiblyDangerous(i,l)&&e.removeAttribute(i)}}O.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,O.selectProp=O.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),O.transformProp=O.testProp(["transform","WebkitTransform"]);
5let ne={supported:!1,testSupport:function(h){!H&&j&&(ae?ge(h):re=h)}},re,j,H=!1,ae=!1;function ge(h){let e=h.createTexture();h.bindTexture(h.TEXTURE_2D,e);try{if(h.texImage2D(h.TEXTURE_2D,0,h.RGBA,h.RGBA,h.UNSIGNED_BYTE,j),h.isContextLost())return;ne.supported=!0}catch{}h.deleteTexture(e),H=!0}var ce;typeof document<"u"&&(j=document.createElement("img"),j.onload=()=>{re&&ge(re),re=null,ae=!0},j.onerror=()=>{H=!0,re=null},j.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(h){let e,i,l,c;h.resetRequestQueue=()=>{e=[],i=0,l=0,c={}},h.addThrottleControl=P=>{let C=l++;return c[C]=P,C},h.removeThrottleControl=P=>{delete c[P],v()},h.getImage=(P,C,L=!0)=>new Promise((N,R)=>{ne.supported&&(P.headers||(P.headers={}),P.headers.accept="image/webp,*/*"),a.e(P,{type:"image"}),e.push({abortController:C,requestParameters:P,supportImageRefresh:L,state:"queued",onError:K=>{R(K)},onSuccess:K=>{N(K)}}),v()});let d=P=>a._(this,void 0,void 0,function*(){P.state="running";let{requestParameters:C,supportImageRefresh:L,onError:N,onSuccess:R,abortController:K}=P,ee=L===!1&&!a.i(self)&&!a.g(C.url)&&(!C.headers||Object.keys(C.headers).reduce((de,me)=>de&&me==="accept",!0));i++;let he=ee?w(C,K):a.m(C,K);try{let de=yield he;delete P.abortController,P.state="completed",de.data instanceof HTMLImageElement||a.b(de.data)?R(de):de.data&&R({data:yield(ue=de.data,typeof createImageBitmap=="function"?a.f(ue):a.h(ue)),cacheControl:de.cacheControl,expires:de.expires})}catch(de){delete P.abortController,N(de)}finally{i--,v()}var ue}),v=()=>{let P=(()=>{for(let C of Object.keys(c))if(c[C]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let C=i;C<P&&e.length>0;C++){let L=e.shift();L.abortController.signal.aborted?C--:d(L)}},w=(P,C)=>new Promise((L,N)=>{let R=new Image,K=P.url,ee=P.credentials;ee&&ee==="include"?R.crossOrigin="use-credentials":(ee&&ee==="same-origin"||!a.d(K))&&(R.crossOrigin="anonymous"),C.signal.addEventListener("abort",()=>{R.src="",N(a.c())}),R.fetchPriority="high",R.onload=()=>{R.onerror=R.onload=null,L({data:R})},R.onerror=()=>{R.onerror=R.onload=null,C.signal.aborted||N(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."))},R.src=K})}(ce||(ce={})),ce.resetRequestQueue();class le{constructor(e){this._transformRequestFn=e}transformRequest(e,i){return this._transformRequestFn&&this._transformRequestFn(e,i)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function we(h){let e=[];
5if(typeof h=="string")e.push({id:"default",url:h});else if(h&&h.length>0){let i=[];for(let{id:l,url:c}of h){let d=`${l}${c}`;i.indexOf(d)===-1&&(i.push(d),e.push({id:l,url:c}))}}return e}function Le(h,e,i){try{let l=new URL(h);return l.pathname+=`${e}${i}`,l.toString()}catch{throw new Error(`Invalid sprite URL "${h}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}class M{constructor(e,i,l,c){this.context=e,this.format=l,this.texture=e.gl.createTexture(),this.update(i,c)}update(e,i,l){let{width:c,height:d}=e,v=!(this.size&&this.size[0]===c&&this.size[1]===d||l),{context:w}=this,{gl:P}=w;if(this.useMipmap=!!(i&&i.useMipmap),P.bindTexture(P.TEXTURE_2D,this.texture),w.pixelStoreUnpackFlipY.set(!1),w.pixelStoreUnpack.set(1),w.pixelStoreUnpackPremultiplyAlpha.set(this.format===P.RGBA&&(!i||i.premultiply!==!1)),v)this.size=[c,d],e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||a.b(e)?P.texImage2D(P.TEXTURE_2D,0,this.format,this.format,P.UNSIGNED_BYTE,e):P.texImage2D(P.TEXTURE_2D,0,this.format,c,d,0,this.format,P.UNSIGNED_BYTE,e.data);else{let{x:C,y:L}=l||{x:0,y:0};e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||a.b(e)?P.texSubImage2D(P.TEXTURE_2D,0,C,L,P.RGBA,P.UNSIGNED_BYTE,e):P.texSubImage2D(P.TEXTURE_2D,0,C,L,c,d,P.RGBA,P.UNSIGNED_BYTE,e.data)}this.useMipmap&&this.isSizePowerOfTwo()&&P.generateMipmap(P.TEXTURE_2D)}bind(e,i,l){let{context:c}=this,{gl:d}=c;d.bindTexture(d.TEXTURE_2D,this.texture),l!==d.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(l=d.LINEAR),e!==this.filter&&(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,e),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,l||e),this.filter=e),i!==this.wrap&&(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,i),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,i),this.wrap=i)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null}}function ze(h){let{userImage:e}=h;return!!(e&&e.render&&e.render())&&(h.data.replace(new Uint8Array(e.data.buffer)),!0)}class Oe extends a.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(let{ids:i,promiseResolve:l}of this.requestors)l(this._getImagesForIds(i));this.requestors=[]}}getImage(e){let i=this.images[e];if(i&&!i.data&&i.spriteData){let l=i.spriteData;i.data=new a.R({width:l.width,height:l.height},l.context.getImageData(l.x,l.y,l.width,l.height).data),i.spriteData=null}return i}addImage(e,i){if(this.images[e])throw new Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,i)&&(this.images[e]=i)}_validate(e,i){let l=!0,c=i.data||i.spriteData;return this._validateStretch(i.stretchX,c&&c.width)||(this.fire(new a.k(new Error(`Image "${e}" has invalid "stretchX" value`))),l=!1),this._validateStretch(i.stretchY,c&&c.height)||(this.fire(new a.k(new Error(`Image "${e}" has invalid "stretchY" value`))),l=!1),this._validateContent(i.content,i)||(this.fire(new a.k(new Error(`Image "${e}" has invalid "content" value`))),l=!1),l}_validateStretch(e,i){if(!e)return!0;let l=0;for(let c of e){if(c[0]<l||c[1]<c[0]||i<c[1])return!1;l=c[1]}return!0}_validateContent(e,i){if(!e)return!0;if(e.length!==4)return!1;let l=i.spriteData,c=l&&l.width||i.data.width,d=l&&l.height||i.data.height;return!(e[0]<0||c<e[0]||e[1]<0||d<e[1]||e[2]<0||c<e[2]||e[3]<0||d<e[3]||e[2]<e[0]||e[3]<e[1])}updateImage(e,i,l=!0){let c=this.getImage(e);if(l&&(c.data.width!==i.data.width||c.data.height!==i.data.height))throw new Error(`size mismatch between old image (${c.data.width}x${c.data.height}) and new image (${i.data.width}x${i.data.height}).`);i.version=c.version+1,this.images[e]=i,this.updatedImages[e]=!0}removeImage(e){let i=this.images[e];delete this.images[e],delete this.patterns[e],i.userImage&&i.userImage.onRemove&&i.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(e){return new Promise((i,l)=>{let c=!0;
5if(!this.isLoaded())for(let d of e)this.images[d]||(c=!1);this.isLoaded()||c?i(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:i})})}_getImagesForIds(e){let i={};for(let l of e){let c=this.getImage(l);c||(this.fire(new a.l("styleimagemissing",{id:l})),c=this.getImage(l)),c?i[l]={data:c.data.clone(),pixelRatio:c.pixelRatio,sdf:c.sdf,version:c.version,stretchX:c.stretchX,stretchY:c.stretchY,content:c.content,textFitWidth:c.textFitWidth,textFitHeight:c.textFitHeight,hasRenderCallback:!!(c.userImage&&c.userImage.render)}:a.w(`Image "${l}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return i}getPixelSize(){let{width:e,height:i}=this.atlasImage;return{width:e,height:i}}getPattern(e){let i=this.patterns[e],l=this.getImage(e);if(!l)return null;if(i&&i.position.version===l.version)return i.position;if(i)i.position.version=l.version;else{let c={w:l.data.width+2,h:l.data.height+2,x:0,y:0},d=new a.I(c,l);this.patterns[e]={bin:c,position:d}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){let i=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new M(e,this.atlasImage,i.RGBA),this.atlasTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)}_updatePatternAtlas(){let e=[];for(let d in this.patterns)e.push(this.patterns[d].bin);let{w:i,h:l}=a.p(e),c=this.atlasImage;c.resize({width:i||1,height:l||1});for(let d in this.patterns){let{bin:v}=this.patterns[d],w=v.x+1,P=v.y+1,C=this.getImage(d).data,L=C.width,N=C.height;a.R.copy(C,c,{x:0,y:0},{x:w,y:P},{width:L,height:N}),a.R.copy(C,c,{x:0,y:N-1},{x:w,y:P-1},{width:L,height:1}),a.R.copy(C,c,{x:0,y:0},{x:w,y:P+N},{width:L,height:1}),a.R.copy(C,c,{x:L-1,y:0},{x:w-1,y:P},{width:1,height:N}),a.R.copy(C,c,{x:0,y:0},{x:w+L,y:P},{width:1,height:N})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(let i of e){if(this.callbackDispatchedThisFrame[i])continue;this.callbackDispatchedThisFrame[i]=!0;let l=this.getImage(i);l||a.w(`Image with ID: "${i}" was not found`),ze(l)&&this.updateImage(i,l)}}}let qe=1e20;function $e(h,e,i,l,c,d,v,w,P){for(let C=e;C<e+l;C++)Qe(h,i*d+C,d,c,v,w,P);for(let C=i;C<i+c;C++)Qe(h,C*d+e,1,l,v,w,P)}function Qe(h,e,i,l,c,d,v){d[0]=0,v[0]=-1e20,v[1]=qe,c[0]=h[e];for(let w=1,P=0,C=0;w<l;w++){c[w]=h[e+w*i];let L=w*w;do{let N=d[P];C=(c[w]-c[N]+L-N*N)/(w-N)/2}while(C<=v[P]&&--P>-1);P++,d[P]=w,v[P]=C,v[P+1]=qe}for(let w=0,P=0;w<l;w++){for(;v[P+1]<w;)P++;let C=d[P],L=w-C;h[e+w*i]=c[C]+L*L}}class Ne{constructor(e,i){this.requestManager=e,this.localIdeographFontFamily=i,this.entries={}}setURL(e){this.url=e}getGlyphs(e){return a._(this,void 0,void 0,function*(){let i=[];for(let d in e)for(let v of e[d])i.push(this._getAndCacheGlyphsPromise(d,v));let l=yield Promise.all(i),c={};for(let{stack:d,id:v,glyph:w}of l)c[d]||(c[d]={}),c[d][v]=w&&{id:w.id,bitmap:w.bitmap.clone(),metrics:w.metrics};return c})}_getAndCacheGlyphsPromise(e,i){return a._(this,void 0,void 0,function*(){let l=this.entries[e];l||(l=this.entries[e]={glyphs:{},requests:{},ranges:{}});let c=l.glyphs[i];if(c!==void 0)return{stack:e,id:i,glyph:c};if(c=this._tinySDF(l,e,i),c)return l.glyphs[i]=c,{stack:e,id:i,glyph:c};let d=Math.floor(i/256);if(256*d>65535)throw new Error("glyphs > 65535 not supported");if(l.ranges[d])return{stack:e,id:i,glyph:c};if(!this.url)throw new Error("glyphsUrl is not set");if(!l.requests[d]){let w=Ne.loadGlyphRange(e,d,this.url,this.requestManager);l.requests[d]=w}let v=yield l.requests[d];for(let w in v)this._doesCharSupportLocalGlyph(+w)||(l.glyphs[+w]=v[+w]);return l.ranges[d]=!0,{stack:e,id:i,glyph:v[i]||null}})}_doesCharSupportLocalGlyph(e){return!!this.localIdeographFontFamily&&(/\p{Ideo}|\p{sc=Hang}|\p{sc=Hira}|\p{sc=Kana}/u.test(String.fromCodePoint(e))||a.u["CJK Unified Ideographs"](e)||a.u["Hangul Syllables"](e)||a.u.Hiragana(e)||a.u.Katakana(e)||a.u["CJK Symbols and Punctuation"](e)||a.u["Halfwidth and Fullwidth Forms"](e))}_tinySDF(e,i,l){let c=this.localIdeographFontFamily;if(!c||!this._doesCharSupportLocalGlyph(l))return;let d=e.tinySDF;if(!d){let w="400";/bold/i.test(i)?w="900":/medium/i.test(i)?w="500":/light/i.test(i)&&(w="200"),d=e.tinySDF=new Ne.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:c,fontWeight:w})}let v=d.draw(String.fromCharCode(l));return{id:l,bitmap:new a.q({width:v.width||60,height:v.height||60},v.data),metrics:{width:v.glyphWidth/2||24,height:v.glyphHeight/2||24,left:v.glyphLeft/2+.5||0,top:v.glyphTop/2-27.5||-8,advance:v.glyphAdvance/2||24,isDoubleResolution:!0}}}}Ne.loadGlyphRange=function(h,e,i,l){return a._(this,void 0,void 0,function*(){let c=256*e,d=c+255,v=l.transformRequest(i.replace("{fontstack}",h).replace("{range}",`${c}-${d}`),"Glyphs"),w=yield a.n(v,new AbortController);if(!w||!w.data)throw new Error(`Could not load glyph range. range: ${e}, ${c}-${d}`);let P={};for(let C of a.o(w.data))P[C.id]=C;return P})},Ne.TinySDF=class{constructor({fontSize:h=24,buffer:e=3,radius:i=8,cutoff:l=.25,fontFamily:c="sans-serif",fontWeight:d="normal",fontStyle:v="normal"}={}){this.buffer=e,this.cutoff=l,this.radius=i;let w=this.size=h+4*e,P=this._createCanvas(w),C=this.ctx=P.getContext("2d",{willReadFrequently:!0});C.font=`${v} ${d} ${h}px ${c}`,C.textBaseline="alphabetic",C.textAlign="left",C.fillStyle="black",this.gridOuter=new Float64Array(w*w),this.gridInner=new Float64Array(w*w),this.f=new Float64Array(w),this.z=new Float64Array(w+1),this.v=new Uint16Array(w)}_createCanvas(h){let e=document.createElement("canvas");return e.width=e.height=h,e}draw(h){let{width:e,actualBoundingBoxAscent:i,actualBoundingBoxDescent:l,actualBoundingBoxLeft:c,actualBoundingBoxRight:d}=this.ctx.measureText(h),v=Math.ceil(i),w=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(d-c))),P=Math.min(this.size-this.buffer,v+Math.ceil(l)),C=w+2*this.buffer,L=P+2*this.buffer,N=Math.max(C*L,0),R=new Uint8ClampedArray(N),K={data:R,width:C,height:L,glyphWidth:w,glyphHeight:P,glyphTop:v,glyphLeft:0,glyphAdvance:e};if(w===0||P===0)return K;let{ctx:ee,buffer:he,gridInner:ue,gridOuter:de}=this;ee.clearRect(he,he,w,P),ee.fillText(h,he,he+v);let me=ee.getImageData(he,he,w,P);de.fill(qe,0,N),ue.fill(0,0,N);for(let xe=0;xe<P;xe++)for(let Se=0;Se<w;Se++){let Pe=me.data[4*(xe*w+Se)+3]/255;if(Pe===0)continue;let Ae=(xe+he)*C+Se+he;if(Pe===1)de[Ae]=0,ue[Ae]=qe;else{let Me=.5-Pe;de[Ae]=Me>0?Me*Me:0,ue[Ae]=Me<0?Me*Me:0}}$e(de,0,0,C,L,C,this.f,this.v,this.z),$e(ue,he,he,w,P,C,this.f,this.v,this.z);for(let xe=0;xe<N;xe++){let Se=Math.sqrt(de[xe])-Math.sqrt(ue[xe]);R[xe]=Math.round(255-255*(Se/this.radius+this.cutoff))}return K}};class Je{constructor(){this.specification=a.v.light.position}possiblyEvaluate(e,i){return a.z(e.expression.evaluate(i))}interpolate(e,i,l){return{x:a.B.number(e.x,i.x,l),y:a.B.number(e.y,i.y,l),z:a.B.number(e.z,i.z,l)}}}let Ye;class bt extends a.E{constructor(e){super(),Ye=Ye||new a.r({anchor:new a.D(a.v.light.anchor),position:new Je,color:new a.D(a.v.light.color),intensity:new a.D(a.v.light.intensity)}),this._transitionable=new a.T(Ye),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(e,i={}
5){if(!this._validate(a.t,e,i))for(let l in e){let c=e[l];l.endsWith("-transition")?this._transitionable.setTransition(l.slice(0,-11),c):this._transitionable.setValue(l,c)}}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,i,l){return(!l||l.validate!==!1)&&a.x(this,e.call(a.y,{value:i,style:{glyphs:!0,sprite:!0},styleSpec:a.v}))}}let _t=new a.r({"sky-color":new a.D(a.v.sky["sky-color"]),"horizon-color":new a.D(a.v.sky["horizon-color"]),"fog-color":new a.D(a.v.sky["fog-color"]),"fog-ground-blend":new a.D(a.v.sky["fog-ground-blend"]),"horizon-fog-blend":new a.D(a.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new a.D(a.v.sky["sky-horizon-blend"]),"atmosphere-blend":new a.D(a.v.sky["atmosphere-blend"])});class He extends a.E{constructor(e){super(),this._transitionable=new a.T(_t),this.setSky(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new a.C(0))}setSky(e,i={}){if(!this._validate(a.F,e,i)){e||(e={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(let l in e){let c=e[l];l.endsWith("-transition")?this._transitionable.setTransition(l.slice(0,-11),c):this._transitionable.setValue(l,c)}}}getSky(){return this._transitionable.serialize()}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,i,l={}){return l?.validate!==!1&&a.x(this,e.call(a.y,a.e({value:i,style:{glyphs:!0,sprite:!0},styleSpec:a.v})))}calculateFogBlendOpacity(e){return e<60?0:e<70?(e-60)/10:1}}class Xe{constructor(e,i){this.width=e,this.height=i,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(e,i){let l=e.join(",")+String(i);return this.dashEntry[l]||(this.dashEntry[l]=this.addDash(e,i)),this.dashEntry[l]}getDashRanges(e,i,l){let c=[],d=e.length%2==1?-e[e.length-1]*l:0,v=e[0]*l,w=!0;c.push({left:d,right:v,isDash:w,zeroLength:e[0]===0});let P=e[0];for(let C=1;C<e.length;C++){w=!w;let L=e[C];d=P*l,P+=L,v=P*l,c.push({left:d,right:v,isDash:w,zeroLength:L===0})}return c}addRoundDash(e,i,l){let c=i/2;for(let d=-l;d<=l;d++){let v=this.width*(this.nextRow+l+d),w=0,P=e[w];for(let C=0;C<this.width;C++){C/P.right>1&&(P=e[++w]);let L=Math.abs(C-P.left),N=Math.abs(C-P.right),R=Math.min(L,N),K,ee=d/l*(c+1);if(P.isDash){let he=c-Math.abs(ee);K=Math.sqrt(R*R+he*he)}else K=c-Math.sqrt(R*R+ee*ee);this.data[v+C]=Math.max(0,Math.min(255,K+128))}}}addRegularDash(e){for(let w=e.length-1;w>=0;--w){let P=e[w],C=e[w+1];P.zeroLength?e.splice(w,1):C&&C.isDash===P.isDash&&(C.left=P.left,e.splice(w,1))}let i=e[0],l=e[e.length-1];i.isDash===l.isDash&&(i.left=l.left-this.width,l.right=i.right+this.width);let c=this.width*this.nextRow,d=0,v=e[d];for(let w=0;w<this.width;w++){w/v.right>1&&(v=e[++d]);let P=Math.abs(w-v.left),C=Math.abs(w-v.right),L=Math.min(P,C);this.data[c+w]=Math.max(0,Math.min(255,(v.isDash?L:-L)+128))}}addDash(e,i){let l=i?7:0,c=2*l+1;if(this.nextRow+c>this.height)return a.w("LineAtlas out of space"),null;let d=0;for(let w=0;w<e.length;w++)d+=e[w];if(d!==0){let w=this.width/d,P=this.getDashRanges(e,this.width,w);i?this.addRoundDash(P,w,l):this.addRegularDash(P)}let v={y:(this.nextRow+l+.5)/this.height,height:2*l/this.height,width:d};return this.nextRow+=c,this.dirty=!0,v}bind(e){let i=e.gl;this.texture?(i.bindTexture(i.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,i.texSubImage2D(i.TEXTURE_2D,0,0,0,this.width,this.height,i.ALPHA,i.UNSIGNED_BYTE,this.data))):(this.texture=i.createTexture(),i.bindTexture(i.TEXTURE_2D,this.texture),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.REPEAT),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.REPEAT),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texImage2D(i.TEXTURE_2D,0,i.ALPHA,this.width,this.height,0,i.ALPHA,i.UNSIGNED_BYTE,this.data))}}let At="maplibre_preloaded_worker_pool";
5class Yt{constructor(){this.active={}}acquire(e){if(!this.workers)for(this.workers=[];this.workers.length<Yt.workerCount;)this.workers.push(new Worker(a.a.WORKER_URL));return this.active[e]=!0,this.workers.slice()}release(e){delete this.active[e],this.numActive()===0&&(this.workers.forEach(i=>{i.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[At]}numActive(){return Object.keys(this.active).length}}let xi=Math.floor(U.hardwareConcurrency/2),Pi,Ai;function ln(){return Pi||(Pi=new Yt),Pi}Yt.workerCount=a.G(globalThis)?Math.max(Math.min(xi,3),1):1;class wt{constructor(e,i){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=i;let l=this.workerPool.acquire(i);for(let c=0;c<l.length;c++){let d=new a.H(l[c],i);d.name=`Worker ${c}`,this.actors.push(d)}if(!this.actors.length)throw new Error("No actors found")}broadcast(e,i){let l=[];for(let c of this.actors)l.push(c.sendAsync({type:e,data:i}));return Promise.all(l)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(e=!0){this.actors.forEach(i=>{i.remove()}),this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,i){for(let l of this.actors)l.registerMessageHandler(e,i)}}function yt(){return Ai||(Ai=new wt(ln(),a.J),Ai.registerMessageHandler("GR",(h,e,i)=>a.m(e,i))),Ai}function Tt(h,e){let i=a.K();return a.L(i,i,[1,1,0]),a.M(i,i,[.5*h.width,.5*h.height,1]),h.calculatePosMatrix?a.N(i,i,h.calculatePosMatrix(e.toUnwrapped())):i}function oi(h,e,i,l,c,d,v){var w;let P=function(R,K,ee){if(R)for(let he of R){let ue=K[he];if(ue&&ue.source===ee&&ue.type==="fill-extrusion")return!0}else for(let he in K){let ue=K[he];if(ue.source===ee&&ue.type==="fill-extrusion")return!0}return!1}((w=c?.layers)!==null&&w!==void 0?w:null,e,h.id),C=d.maxPitchScaleFactor(),L=h.tilesIn(l,C,P);L.sort(si);let N=[];for(let R of L)N.push({wrappedTileID:R.tileID.wrapped().key,queryResults:R.tile.queryRenderedFeatures(e,i,h._state,R.queryGeometry,R.cameraQueryGeometry,R.scale,c,d,C,Tt(h.transform,R.tileID),v?(K,ee)=>v(R.tileID,K,ee):void 0)});return function(R,K){for(let ee in R)for(let he of R[ee])Di(he,K);return R}(function(R){let K={},ee={};for(let he of R){let ue=he.queryResults,de=he.wrappedTileID,me=ee[de]=ee[de]||{};for(let xe in ue){let Se=ue[xe],Pe=me[xe]=me[xe]||{},Ae=K[xe]=K[xe]||[];for(let Me of Se)Pe[Me.featureIndex]||(Pe[Me.featureIndex]=!0,Ae.push(Me))}}return K}(N),h)}function si(h,e){let i=h.tileID,l=e.tileID;return i.overscaledZ-l.overscaledZ||i.canonical.y-l.canonical.y||i.wrap-l.wrap||i.canonical.x-l.canonical.x}function Di(h,e){let i=h.feature,l=e.getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=l}function Ki(h,e,i){return a._(this,void 0,void 0,function*(){let l=h;if(h.url?l=(yield a.j(e.transformRequest(h.url,"Source"),i)).data:yield U.frameAsync(i),!l)return null;let c=a.O(a.e(l,h),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in l&&l.vector_layers&&(c.vectorLayerIds=l.vector_layers.map(d=>d.id)),c})}class wi{constructor(e,i){e&&(i?this.setSouthWest(e).setNorthEast(i):Array.isArray(e)&&(e.length===4?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof a.Q?new a.Q(e.lng,e.lat):a.Q.convert(e),this}setSouthWest(e){return this._sw=e instanceof a.Q?new a.Q(e.lng,e.lat):a.Q.convert(e),this}extend(e){let i=this._sw,l=this._ne,c,d;if(e instanceof a.Q)c=e,d=e;else{if(!(e instanceof wi))return Array.isArray(e)?e.length===4||e.every(Array.isArray)?this.extend(wi.convert(e)):this.extend(a.Q.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(a.Q.convert(e)):this;if(c=e._sw,d=e._ne,!c||!d)return this}return i||l?(i.lng=Math.min(c.lng,i.lng),i.lat=Math.min(c.lat,i.lat),l.lng=Math.max(d.lng,l.lng),l.lat=Math.max(d.lat,l.lat)):(this._sw=new a.Q(c.lng,c.lat),this._ne=new a.Q(d.lng,d.lat)),this}getCenter(){return new a.Q((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}
5getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new a.Q(this.getWest(),this.getNorth())}getSouthEast(){return new a.Q(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(e){let{lng:i,lat:l}=a.Q.convert(e),c=this._sw.lng<=i&&i<=this._ne.lng;return this._sw.lng>this._ne.lng&&(c=this._sw.lng>=i&&i>=this._ne.lng),this._sw.lat<=l&&l<=this._ne.lat&&c}static convert(e){return e instanceof wi?e:e&&new wi(e)}static fromLngLat(e,i=0){let l=360*i/40075017,c=l/Math.cos(Math.PI/180*e.lat);return new wi(new a.Q(e.lng-c,e.lat-l),new a.Q(e.lng+c,e.lat+l))}adjustAntiMeridian(){let e=new a.Q(this._sw.lng,this._sw.lat),i=new a.Q(this._ne.lng,this._ne.lat);return new wi(e,e.lng>i.lng?new a.Q(i.lng+360,i.lat):i)}}class Mr{constructor(e,i,l){this.bounds=wi.convert(this.validateBounds(e)),this.minzoom=i||0,this.maxzoom=l||24}validateBounds(e){return Array.isArray(e)&&e.length===4?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){let i=Math.pow(2,e.z),l=Math.floor(a.U(this.bounds.getWest())*i),c=Math.floor(a.S(this.bounds.getNorth())*i),d=Math.ceil(a.U(this.bounds.getEast())*i),v=Math.ceil(a.S(this.bounds.getSouth())*i);return e.x>=l&&e.x<d&&e.y>=c&&e.y<v}}class qi extends a.E{constructor(e,i,l,c){if(super(),this.id=e,this.dispatcher=l,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.e(this,a.O(i,["url","scheme","tileSize","promoteId"])),this._options=a.e({type:"vector"},i),this._collectResourceTiming=i.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(c)}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let e=yield Ki(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),e&&(a.e(this,e),e.bounds&&(this.tileBounds=new Mr(e.bounds,this.minzoom,this.maxzoom)),this.fire(new a.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.l("data",{dataType:"source",sourceDataType:"content"})))}catch(e){this._tileJSONRequest=null,this.fire(new a.k(e))}})}loaded(){return this._loaded}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}onAdd(e){this.map=e,this.load()}setSourceProperty(e){this._tileJSONRequest&&this._tileJSONRequest.abort(),e(),this.load()}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return a.e({},this._options)}loadTile(e){return a._(this,void 0,void 0,function*(){let i=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),l={request:this.map._requestManager.transformRequest(i,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.t
5ype,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};l.request.collectResourceTiming=this._collectResourceTiming;let c="RT";if(e.actor&&e.state!=="expired"){if(e.state==="loading")return new Promise((d,v)=>{e.reloadPromise={resolve:d,reject:v}})}else e.actor=this.dispatcher.getActor(),c="LT";e.abortController=new AbortController;try{let d=yield e.actor.sendAsync({type:c,data:l},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,d)}catch(d){if(delete e.abortController,e.aborted)return;if(d&&d.status!==404)throw d;this._afterTileLoadWorkerResponse(e,null)}})}_afterTileLoadWorkerResponse(e,i){if(i&&i.resourceTiming&&(e.resourceTiming=i.resourceTiming),i&&this.map._refreshExpiredTiles&&e.setExpiryData(i),e.loadVectorData(i,this.map.painter),e.reloadPromise){let l=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(l.resolve).catch(l.reject)}}abortTile(e){return a._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.t
5ype,source:this.id}}))})}unloadTile(e){return a._(this,void 0,void 0,function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Ui extends a.E{constructor(e,i,l,c){super(),this.id=e,this.dispatcher=l,this.setEventedParent(c),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=a.e({type:"raster"},i),a.e(this,a.O(i,["url","scheme","tileSize"]))}load(){return a._(this,arguments,void 0,function*(e=!1){this._loaded=!1,this.fire(new a.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let i=yield Ki(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,i&&(a.e(this,i),i.bounds&&(this.tileBounds=new Mr(i.bounds,this.minzoom,this.maxzoom)),this.fire(new a.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.l("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:e})))}catch(i){this._tileJSONRequest=null,this.fire(new a.k(i))}})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return a.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return a._(this,void 0,void 0,function*(){let i=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{let l=yield ce.getImage(this.map._requestManager.transformRequest(i,"Tile"),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(l&&l.data){this.map._refreshExpiredTiles&&l.cacheControl&&l.expires&&e.setExpiryData({cacheControl:l.cacheControl,expires:l.expires});let c=this.map.painter.context,d=c.gl,v=l.data;e.texture=this.map.painter.getTileTexture(v.width),e.texture?e.texture.update(v,{useMipmap:!0}):(e.texture=new M(c,v,d.RGBA,{useMipmap:!0}),e.texture.bind(d.LINEAR,d.CLAMP_TO_EDGE,d.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(l){if(delete e.abortController,e.aborted)e.state="unloaded";else if(l)throw e.state="errored",l}})}abortTile(e){return a._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)})}unloadTile(e){return a._(this,void 0,void 0,function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)})}hasTransition(){return!1}}class Cr extends Ui{constructor(e,i,l,c){super(e,i,l,c),this.type="raster-dem",this.maxzoom=22,this._options=a.e({type:"raster-dem"},i),this.encoding=i.encoding||"mapbox",this.redFactor=i.redFactor,this.greenFactor=i.greenFactor,this.blueFactor=i.blueFactor,this.baseShift=i.baseShift}loadTile(e){return a._(this,void 0,void 0,function*(){let i=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),l=this.map._requestManager.transformRequest(i,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{let c=yield ce.getImage(l,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(c&&c.data){let d=c.data;this.map._refreshExpiredTiles&&c.cacheControl&&c.expires&&e.setExpiryData({cacheControl:c.cacheControl,expires:c.expires});let v=a.b(d)&&a.V()?d:yield this.readImageNow(d),w={type:this.type,uid:e.uid,source:this.id,rawImageData:v,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!e.actor||e.state==="expired"){e.actor=this.dispatcher.getActor();let P=yield e.actor.sendAsync({type:"LDT",data:w});e.dem=P,e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}}catch(c){if(delete e.abortController,e.aborted)e.state="unloaded";else if(c)throw e.state="errored",c}})}readImageNow(e){return a._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&a.W()){let i=e.width+2,l=e.height+2;try{return new a.R({width:i,height:l},yield a.X(e,-1,-1,i,l))}catch{}}return U.getImageData(e,1)})}_getNeighboringTiles(e){let i=e.canonical,l=Math.pow(2,i.z),c=(i.x-1+l)%l,d=i.x===0?e.wrap-1:e.wrap,v=(i.x+1+l)%l,w=i.x+1===l?e.wrap+1:e.wrap,P={};
5return P[new a.Y(e.overscaledZ,d,i.z,c,i.y).key]={backfilled:!1},P[new a.Y(e.overscaledZ,w,i.z,v,i.y).key]={backfilled:!1},i.y>0&&(P[new a.Y(e.overscaledZ,d,i.z,c,i.y-1).key]={backfilled:!1},P[new a.Y(e.overscaledZ,e.wrap,i.z,i.x,i.y-1).key]={backfilled:!1},P[new a.Y(e.overscaledZ,w,i.z,v,i.y-1).key]={backfilled:!1}),i.y+1<l&&(P[new a.Y(e.overscaledZ,d,i.z,c,i.y+1).key]={backfilled:!1},P[new a.Y(e.overscaledZ,e.wrap,i.z,i.x,i.y+1).key]={backfilled:!1},P[new a.Y(e.overscaledZ,w,i.z,v,i.y+1).key]={backfilled:!1}),P}unloadTile(e){return a._(this,void 0,void 0,function*(){e.demTexture&&this.map.painter.saveTileTexture(e.demTexture),e.fbo&&(e.fbo.destroy(),delete e.fbo),e.dem&&delete e.dem,delete e.neighboringTiles,e.state="unloaded",e.actor&&(yield e.actor.sendAsync({type:"RDT",data:{type:this.type,uid:e.uid,source:this.id}}))})}}class sr extends a.E{constructor(e,i,l,c){super(),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=l.getActor(),this.setEventedParent(c),this._data=i.data,this._options=a.e({},i),this._collectResourceTiming=i.collectResourceTiming,i.maxzoom!==void 0&&(this.maxzoom=i.maxzoom),i.type&&(this.type=i.type),i.attribution&&(this.attribution=i.attribution),this.promoteId=i.promoteId,i.clusterMaxZoom!==void 0&&this.maxzoom<=i.clusterMaxZoom&&a.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${i.clusterMaxZoom}".`),this.workerOptions=a.e({source:this.id,cluster:i.cluster||!1,geojsonVtOptions:{buffer:this._pixelsToTileUnits(i.buffer!==void 0?i.buffer:128),tolerance:this._pixelsToTileUnits(i.tolerance!==void 0?i.tolerance:.375),extent:a.Z,maxZoom:this.maxzoom,lineMetrics:i.lineMetrics||!1,generateId:i.generateId||!1},superclusterOptions:{maxZoom:i.clusterMaxZoom!==void 0?i.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,i.clusterMinPoints||2),extent:a.Z,radius:this._pixelsToTileUnits(i.clusterRadius||50),log:!1,generateId:i.generateId||!1},clusterProperties:i.clusterProperties,filter:i.filter},i.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}_pixelsToTileUnits(e){return e*(a.Z/this.tileSize)}load(){return a._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(e){this.map=e,this.load()}setData(e){return this._data=e,this._updateWorkerData(),this}updateData(e){return this._updateWorkerData(e),this}getData(){return a._(this,void 0,void 0,function*(){let e=a.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:e})})}getCoordinatesFromGeometry(e){return e.type==="GeometryCollection"?e.geometries.map(i=>i.coordinates).flat(1/0):e.coordinates.flat(1/0)}getBounds(){return a._(this,void 0,void 0,function*(){let e=new wi,i=yield this.getData(),l;switch(i.type){case"FeatureCollection":l=i.features.map(c=>this.getCoordinatesFromGeometry(c.geometry)).flat(1/0);break;case"Feature":l=this.getCoordinatesFromGeometry(i.geometry);break;default:l=this.getCoordinatesFromGeometry(i)}if(l.length==0)return e;for(let c=0;c<l.length-1;c+=2)e.extend([l[c],l[c+1]]);return e})}setClusterOptions(e){return this.workerOptions.cluster=e.cluster,e&&(e.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=this._pixelsToTileUnits(e.clusterRadius)),e.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=e.clusterMa
5xZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(e){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:e,source:this.id}})}getClusterChildren(e){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:e,source:this.id}})}getClusterLeaves(e,i,l){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:e,limit:i,offset:l}})}_updateWorkerData(e){return a._(this,void 0,void 0,function*(){let i=a.e({type:this.type},this.workerOptions);e?i.dataDiff=e:typeof this._data=="string"?(i.request=this.map._requestManager.transformRequest(U.resolveURL(this._data),"Source"),i.request.collectResourceTiming=this._collectResourceTiming):i.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new a.l("dataloading",{dataType:"source"}));try{let l=yield this.actor.sendAsync({type:"LD",data:i});if(this._pendingLoads--,this._removed||l.abandoned)return void this.fire(new a.l("dataabort",{dataType:"source"}));let c=null;l.resourceTiming&&l.resourceTiming[this.id]&&(c=l.resourceTiming[this.id].slice(0));let d={dataType:"source"};this._collectResourceTiming&&c&&c.length>0&&a.e(d,{resourceTiming:c}),this.fire(new a.l("data",Object.assign(Object.assign({},d),{sourceDataType:"metadata"}))),this.fire(new a.l("data",Object.assign(Object.assign({},d),{sourceDataType:"content"})))}catch(l){if(this._pendingLoads--,this._removed)return void this.fire(new a.l("dataabort",{dataType:"source"}));this.fire(new a.k(l))}})}loaded(){return this._pendingLoads===0}loadTile(e){return a._(this,void 0,void 0,function*(){let i=e.actor?"RT":"LT";e.actor=this.actor;let l={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};e.abortController=new AbortController;let c=yield this.actor.sendAsync({type:i,data:l},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(c,this.map.painter,i==="RT")})}abortTile(e){return a._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0})}unloadTile(e){return a._(this,void 0,void 0,function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.t
5ype,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return a.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}class Sr extends a.E{constructor(e,i,l,c){super(),this.flippedWindingOrder=!1,this.id=e,this.dispatcher=l,this.coordinates=i.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(c),this.options=i}load(e){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.l("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let i=yield ce.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,i&&i.data&&(this.image=i.data,e&&(this.coordinates=e),this._finishLoading())}catch(i){this._request=null,this._loaded=!0,this.fire(new a.k(i))}})}loaded(){return this._loaded}updateImage(e){return e.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.l("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){this.coordinates=e;let i=e.map(a.$.fromLngLat);var l;return this.tileID=function(c){let d=1/0,v=1/0,w=-1/0,P=-1/0;for(let R of c)d=Math.min(d,R.x),v=Math.min(v,R.y),w=Math.max(w,R.x),P=Math.max(P,R.y);let C=Math.max(w-d,P-v),L=Math.max(0,Math.floor(-Math.log(C)/Math.LN2)),N=Math.pow(2,L);return new a.a1(L,Math.floor((d+w)/2*N),Math.floor((v+P)/2*N))}(i),this.terrainTileRanges=this._getOverlappingTileRanges(i),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=i.map(c=>this.tileID.getTilePoint(c)._round()),this.flippedWindingOrder=((l=this.tileCoords)[1].x-l[0].x)*(l[2].y-l[0].y)-(l[1].y-l[0].y)*(l[2].x-l[0].x)<0,this.fire(new a.l("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let e=this.map.painter.context,i=e.gl;this.texture||(this.texture=new M(e,this.image,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let l=!1;for(let c in this.tiles){let d=this.tiles[c];d.state!=="loaded"&&(d.state="loaded",d.texture=this.texture,l=!0)}l&&this.fire(new a.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return a._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(e){let i=1/0,l=1/0,c=-1/0,d=-1/0;for(let w of e)i=Math.min(i,w.x),l=Math.min(l,w.y),c=Math.max(c,w.x),d=Math.max(d,w.y);let v={};for(let w=0;w<=a.a0;w++){let P=Math.pow(2,w),C=Math.floor(i*P),L=Math.floor(l*P),N=Math.floor(c*P),R=Math.floor(d*P);v[w]={minTileX:C,minTileY:L,maxTileX:N,maxTileY:R}}return v}}class Tr extends Sr{constructor(e,i,l,c){super(e,i,l,c),this.roundZoom=!0,this.type="video",this.options=i}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1;let e=this.options;this.urls=[];for(let i of e.urls)this.urls.push(this.map._requestManager.transformRequest(i,"Source").url);try{let i=yield a.a2(this.urls);if(this._loaded=!0,!i)return;this.video=i,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(i){this.fire(new a.k(i))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){let i=this.video.seekable;e<i.start(0)||e>i.end(0)?this.fire(new a.k(new a.a3(`sources.${this.id}`,null,`Playback for this video can be set only between the ${i.start(0)} and ${i.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let e=this.map.painter.context,i=e.gl;this.texture?this.video.paused||(this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE),i.texSubImage2D(i.TEXTURE_2D,0,0,0,i.RGBA,i.UNSIGNED_BYTE,this.video)):(this.texture=new M(e,this.video,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let l=!1;for(let c in this.tiles){let d=this.tiles[c];d.state!=="loaded"&&(d.state="loaded",d.texture=this.texture,l=!0)}l&&this.fire(new a.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Mn extends Sr{constructor(e,i,l,c){super(e,i,l,c),i.coordinates?Array.isArray(i.coordinates)&&i.c
5oordinates.length===4&&!i.coordinates.some(d=>!Array.isArray(d)||d.length!==2||d.some(v=>typeof v!="number"))||this.fire(new a.k(new a.a3(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.k(new a.a3(`sources.${e}`,null,'missing required property "coordinates"'))),i.animate&&typeof i.animate!="boolean"&&this.fire(new a.k(new a.a3(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),i.canvas?typeof i.canvas=="string"||i.canvas instanceof HTMLCanvasElement||this.fire(new a.k(new a.a3(`sources.${e}`,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.k(new a.a3(`sources.${e}`,null,'missing required property "canvas"'))),this.options=i,this.animate=i.animate===void 0||i.animate}load(){return a._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new a.k(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let i=this.map.painter.context,l=i.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new M(i,this.canvas,l.RGBA,{premultiply:!0});let c=!1;for(let d in this.tiles){let v=this.tiles[d];v.state!=="loaded"&&(v.state="loaded",v.texture=this.texture,c=!0)}c&&this.fire(new a.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}let pr={},cn=h=>{switch(h){case"geojson":return sr;case"image":return Sr;case"raster":return Ui;case"raster-dem":return Cr;case"vector":return qi;case"video":return Tr;case"canvas":return Mn}return pr[h]},Yr="RTLPluginLoaded";class jt extends a.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=yt()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(i=>{throw this.status="error",i})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return a._(this,arguments,void 0,function*(i,l=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=U.resolveURL(i),!this.url)throw new Error(`requested url ${i}
5 is invalid`);if(this.status==="unavailable"){if(!l)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return a._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new a.l(Yr))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ji=null;function un(){return Ji||(Ji=new jt),Ji}class Ir{constructor(e,i){this.timeAdded=0,this.fadeEndTime=0,this.tileID=e,this.uid=a.a4(),this.uses=0,this.tileSize=i,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(e){let i=e+this.timeAdded;i<this.fadeEndTime||(this.fadeEndTime=i)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(e,i,l){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){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(c,d){let v={};if(!d)return v;for(let w of c){let P=w.layerIds.map(C=>d.getLayer(C)).filter(Boolean);if(P.length!==0){w.layers=P,w.stateDependentLayerIds&&(w.stateDependentLayers=w.stateDependentLayerIds.map(C=>P.filter(L=>L.id===C)[0]));for(let C of P)v[C.id]=w}}return v}(e.buckets,i?.style),this.hasSymbolBuckets=!1;for(let c in this.buckets){let d=this.buckets[c];if(d instanceof a.a6){if(this.hasSymbolBuckets=!0,!l)break;d.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let c in this.buckets){let d=this.buckets[c];if(d instanceof a.a6&&d.hasRTLText){this.hasRTLText=!0,un().lazyLoad();break}}this.queryPadding=0;for(let c in this.buckets){let d=this.buckets[c];this.queryPadding=Math.max(this.queryPadding,i.style.getLayer(c).queryRadius(d))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new a.a5}unloadVectorData(){for(let 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"}getBucket(e){return this.buckets[e.id]}upload(e){for(let l in this.buckets){let c=this.buckets[l];c.uploadPending()&&c.upload(e)}let i=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new M(e,this.imageAtlas.image,i.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new M(e,this.glyphAtlasImage,i.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,i,l,c,d,v,w,P,C,L,N){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:c,cameraQueryGeometry:d,scale:v,tileSize:this.tileSize,pixelPosMatrix:L,transform:P,params:w,queryPadding:this.queryPadding*C,getElevation:N},e,i,l):{}}querySourceFeatures(e,i){let l=this.latestFeatureIndex;if(!l||!l.rawTileData)return;let c=l.loadVTLayers(),d=i&&i.sourceLayer?i.sourceLayer:"",v=c._geojsonTileLayer||c[d];if(!v)return;let w=a.a7(i&&i.filter),{z:P,x:C,y:L}=this.tileID.canonical,N={z:P,x:C,y:L};for(let R=0;R<v.length;R++){let K=v.feature(R);if(w.needGeometry){let ue=a.a8(K,!0);if(!w.filter(new a.C(this.tileID.overscaledZ),ue,this.tileID.canonical))continue}else if(!w.filter(new a.C(this.tileID.overscaledZ),K))continue;let ee=l.getId(K,d),he=new a.a9(K,P,C,L,ee);he.tile=N,e.push(he)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(e){let i=this.expirationTime;
5if(e.cacheControl){let l=a.aa(e.cacheControl);l["max-age"]&&(this.expirationTime=Date.now()+1e3*l["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){let l=Date.now(),c=!1;if(this.expirationTime>l)c=!1;else if(i)if(this.expirationTime<i)c=!0;else{let d=this.expirationTime-i;d?this.expirationTime=l+Math.max(d,3e4):c=!0}else c=!0;c?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)}setFeatureState(e,i){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(e).length===0)return;let l=this.latestFeatureIndex.loadVTLayers();for(let c in this.buckets){if(!i.style.hasLayer(c))continue;let d=this.buckets[c],v=d.layers[0].sourceLayer||"_geojsonTileLayer",w=l[v],P=e[v];if(!w||!P||Object.keys(P).length===0)continue;d.update(P,w,this.imageAtlas&&this.imageAtlas.patternPositions||{});let C=i&&i.style&&i.style.getLayer(c);C&&(this.queryPadding=Math.max(this.queryPadding,C.queryRadius(d)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<U.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(e){this.symbolFadeHoldUntil=U.now()+e}setDependencies(e,i){let l={};for(let c of i)l[c]=!0;this.dependencies[e]=l}hasDependency(e,i){for(let l of e){let c=this.dependencies[l];if(c){for(let d of i)if(c[d])return!0}}return!1}}class gn{constructor(e,i){this.max=e,this.onRemove=i,this.reset()}reset(){for(let e in this.data)for(let i of this.data[e])i.timeout&&clearTimeout(i.timeout),this.onRemove(i.value);return this.data={},this.order=[],this}add(e,i,l){let c=e.wrapped().key;this.data[c]===void 0&&(this.data[c]=[]);let d={value:i,timeout:void 0};if(l!==void 0&&(d.timeout=setTimeout(()=>{this.remove(e,d)},l)),this.data[c].push(d),this.order.push(c),this.order.length>this.max){let v=this._getAndRemoveByKey(this.order[0]);v&&this.onRemove(v)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){let i=this.data[e].shift();return i.timeout&&clearTimeout(i.timeout),this.data[e].length===0&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),i.value}getByKey(e){let i=this.data[e];return i?i[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,i){if(!this.has(e))return this;let l=e.wrapped().key,c=i===void 0?0:this.data[l].indexOf(i),d=this.data[l][c];return this.data[l].splice(c,1),d.timeout&&clearTimeout(d.timeout),this.data[l].length===0&&delete this.data[l],this.onRemove(d.value),this.order.splice(this.order.indexOf(l),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){let i=this._getAndRemoveByKey(this.order[0]);i&&this.onRemove(i)}return this}filter(e){let i=[];for(let l in this.data)for(let c of this.data[l])e(c.value)||i.push(c);for(let l of i)this.remove(l.value.tileID,l)}}class hn{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(e,i,l){let c=String(i);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][c]=this.stateChanges[e][c]||{},a.e(this.stateChanges[e][c],l),this.deletedStates[e]===null){this.deletedStates[e]={};for(let d in this.state[e])d!==c&&(this.deletedStates[e][d]=null)}else if(this.deletedStates[e]&&this.deletedStates[e][c]===null){this.deletedStates[e][c]={};for(let d in this.state[e][c])l[d]||(this.deletedStates[e][c][d]=null)}else for(let d in l)this.deletedStates[e]&&this.deletedStates[e][c]&&this.deletedStates[e][c][d]===null&&delete this.deletedStates[e][c][d]}removeFeatureState(e,i,l){if(this.deletedStates[e]===null)return;let c=String(i);if(this.deletedStates[e]=this.deletedStates[e]||{},l&&i!==void 0)this.deletedStates[e][c]!==null&&(this.deletedStates[e][c]=this.deletedStates[e][c]||{},this.deletedStates[e][c][l]=null);else if(i!==void 0)if(this.stateChanges[e]&&this.stateChanges[e][c])for(l in this.deletedStates[e][c]={},this.stateChanges[e][c])this.deletedStates[e][c][l]=null;else this.deletedStates[e][c]=null;else this.deletedStates[e]=null}getState(e,i){let l=String(i),c=a.e({},(this.state[e]||{})[l],(this.stateChanges[e]||{})[l]);if(this.deletedStates[e]===null)return{};if(this.deletedStates[e]){let d=this.deletedStates[e][i];if(d===null)return{};for(let v in d)delete c[v]}return c}initializeTileState(e,i){e.setFeatureState(this.state,i)}coalesceChanges(e,i){let l={};for(let c in this.stateChanges){this.state[c]=this.state[c]||{};let d={};for(let v in this.stateChanges[c])this.state[c][v]||(this.state[c][v]={}),a.e(this.state[c][v],this.stateChanges[c][v]),d[v]=this.state[c][v];l[c]=d}for(let c in this.deletedStates){this.state[c]=this.state[c]||{};let d={};if(this.deletedStates[c]===null)for(let v in this.state[c])d[v]={},this.state[c][v]={};
5else for(let v in this.deletedStates[c]){if(this.deletedStates[c][v]===null)this.state[c][v]={};else for(let w of Object.keys(this.deletedStates[c][v]))delete this.state[c][v][w];d[v]=this.state[c][v]}l[c]=l[c]||{},a.e(l[c],d)}if(this.stateChanges={},this.deletedStates={},Object.keys(l).length!==0)for(let c in e)e[c].setFeatureState(l,i)}}function Zs(h,e,i){let l=e.intersectsFrustum(h);if(!i)return l;let c=e.intersectsPlane(i);return l===0||c===0?0:l===2&&c===2?2:1}function os(h,e,i,l,c){let d=h,v=Math.atan(e/i),w=Math.hypot(e,i);return d=h+a.ab(l/w/Math.max(.5,Math.cos(a.ad(c/2)))),d+=1*a.ab(Math.cos(v))/2,d+=a.ae(h-d,-0,0),d}function Ar(h,e){let i=(e.roundZoom?Math.round:Math.floor)(h.zoom+a.ab(h.tileSize/e.tileSize));return Math.max(0,i)}function Re(h,e){let i=h.getCameraFrustum(),l=h.getClippingPlane(),c=h.screenPointToMercatorCoordinate(h.getCameraPoint()),d=a.$.fromLngLat(h.center,h.elevation);c.z=d.z+Math.cos(h.pitchInRadians)*h.cameraToCenterDistance/h.worldSize;let v=h.getCoveringTilesDetailsProvider(),w=v.allowVariableZoom(h,e),P=Ar(h,e),C=e.minzoom||0,L=e.maxzoom!==void 0?e.maxzoom:h.maxZoom,N=Math.min(Math.max(0,P),L),R=Math.pow(2,N),K=[R*c.x,R*c.y,0],ee=[R*d.x,R*d.y,0],he=Math.hypot(d.x-c.x,d.y-c.y),ue=Math.abs(d.z-c.z),de=Math.hypot(he,ue),me=Pe=>({zoom:0,x:0,y:0,wrap:Pe,fullyVisible:!1}),xe=[],Se=[];if(h.renderWorldCopies&&v.allowWorldCopies())for(let Pe=1;Pe<=3;Pe++)xe.push(me(-Pe)),xe.push(me(Pe));for(xe.push(me(0));xe.length>0;){let Pe=xe.pop(),Ae=Pe.x,Me=Pe.y,Ue=Pe.fullyVisible,Ve={x:Ae,y:Me,z:Pe.zoom},ot=v.getTileAABB(Ve,Pe.wrap,h.elevation,e);if(!Ue){let Et=Zs(i,ot,l);if(Et===0)continue;Ue=Et===2}let ut=v.distanceToTile2d(c.x,c.y,Ve,ot),at=P;w&&(at=(e.calculateTileZoom||os)(h.zoom+a.ab(h.tileSize/e.tileSize),ut,ue,de,h.fov)),at=(e.roundZoom?Math.round:Math.floor)(at),at=Math.max(0,at);let It=Math.min(at,L);if(Pe.wrap=v.getWrap(d,Ve,Pe.wrap),Pe.zoom>=It){if(Pe.zoom<C)continue;let Et=N-Pe.zoom,pt=K[0]-.5-(Ae<<Et),Nt=K[1]-.5-(Me<<Et),ai=e.reparseOverscaled?Math.max(Pe.zoom,at):Pe.zoom;Se.push({tileID:new a.Y(Pe.zoom===L?ai:Pe.zoom,Pe.wrap,Pe.zoom,Ae,Me),distanceSq:a.ac([ee[0]-.5-Ae,ee[1]-.5-Me]),tileDistanceToCamera:Math.sqrt(pt*pt+Nt*Nt)})}else for(let Et=0;Et<4;Et++)xe.push({zoom:Pe.zoom+1,x:(Ae<<1)+Et%2,y:(Me<<1)+(Et>>1),wrap:Pe.wrap,fullyVisible:Ue})}return Se.sort((Pe,Ae)=>Pe.distanceSq-Ae.distanceSq).map(Pe=>Pe.tileID)}class J extends a.E{constructor(e,i,l){super(),this.id=e,this.dispatcher=l,this.on("data",c=>this._dataHandler(c)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((c,d,v,w)=>{let P=new(cn(d.type))(c,d,v,w);if(P.id!==c)throw new Error(`Expected Source id to be ${c} instead of ${P.id}`);return P})(e,i,l,this),this._tiles={},this._cache=new gn(0,c=>this._unloadTile(c)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new hn,this._didEmitContent=!1,this._updated=!1}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(e)}onRemove(e){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(e)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let e in this._tiles){let i=this._tiles[e];if(i.state!=="loaded"&&i.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,i,l){return a._(this,void 0,void 0,function*(){try{yield this._source.loadTile(e),this._tileLoaded(e,i,l)}catch(c){e.state="errored",c.status!==404?this._source.fire(new a.k(c,{tile:e})):this.update(this.transform,this.terrain)}})}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new a.l("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let i in this._tiles){let l=this._tiles[i];l.upload(e),l.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(e=>e.tileID).sort(ie).map(e=>e.key)}getRenderableIds(e){let i=[];for(let l in this._tiles)this._isIdRenderable(l,e)&&i.push(this._tiles[l]);return e?i.sort((l,c)=>{let d=l.tileID,v=c.tileID,w=new a.P(d.canonical.x,d.canonical.y)._rotate(-this.transform.bearingInRadians),P=new a.P(v.canonical.x,v.canonical.y)._rotate(-this.transform.bearingInRadians);return d.overscaledZ-v.overscaledZ||P.y-w.y||P.x-w.x}).map(l=>l.tileID.key):i.map(l=>l.tileID).sort(ie).map(l=>l.key)}hasRenderableParent(e){let i=this.findLoadedParent(e,0);return!!i&&this._isIdRenderable(i.tileID.key)}_isIdRenderable(e,i){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(i||!this._tiles[e].holdingForFade())}reload(e){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let i in this._tiles)(e||this._tiles[i].state!=="errored")&&this._reloadTile(i,"reloading")}}_reloadTile(e,i){return a._(this,void 0,void 0,function*(){let l=this._tiles[e];l&&(l.state!=="loading"&&(l.state=i),yield this._loadTile(l,e,i))})}_tileLoaded(e,i,l){e.timeAdded=U.now(),l==="expired"&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(i,e),this.get
5Source().type==="raster-dem"&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new a.l("data",{dataType:"source",tile:e,coord:e.tileID}))}_backfillDEM(e){let i=this.getRenderableIds();for(let c=0;c<i.length;c++){let d=i[c];if(e.neighboringTiles&&e.neighboringTiles[d]){let v=this.getTileByID(d);l(e,v),l(v,e)}}function l(c,d){c.needsHillshadePrepare=!0,c.needsTerrainPrepare=!0;let v=d.tileID.canonical.x-c.tileID.canonical.x,w=d.tileID.canonical.y-c.tileID.canonical.y,P=Math.pow(2,c.tileID.canonical.z),C=d.tileID.key;v===0&&w===0||Math.abs(w)>1||(Math.abs(v)>1&&(Math.abs(v+P)===1?v+=P:Math.abs(v-P)===1&&(v-=P)),d.dem&&c.dem&&(c.dem.backfillBorder(d.dem,v,w),c.neighboringTiles&&c.neighboringTiles[C]&&(c.neighboringTiles[C].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,i,l,c){for(let d in this._tiles){let v=this._tiles[d];if(c[d]||!v.hasData()||v.tileID.overscaledZ<=i||v.tileID.overscaledZ>l)continue;let w=v.tileID;for(;v&&v.tileID.overscaledZ>i+1;){let C=v.tileID.scaledTo(v.tileID.overscaledZ-1);v=this._tiles[C.key],v&&v.hasData()&&(w=C)}let P=w;for(;P.overscaledZ>i;)if(P=P.scaledTo(P.overscaledZ-1),e[P.key]||e[P.canonical.key]){c[w.key]=w;break}}}findLoadedParent(e,i){if(e.key in this._loadedParentTiles){let l=this._loadedParentTiles[e.key];return l&&l.tileID.overscaledZ>=i?l:null}for(let l=e.overscaledZ-1;l>=i;l--){let c=e.scaledTo(l),d=this._getLoadedTile(c);if(d)return d}}findLoadedSibling(e){return this._getLoadedTile(e)}_getLoadedTile(e){let i=this._tiles[e.key];return i&&i.hasData()?i:this._cache.getByKey(e.wrapped().key)}updateCacheSize(e){let i=Math.ceil(e.width/this._source.tileSize)+1,l=Math.ceil(e.height/this._source.tileSize)+1,c=Math.floor(i*l*(this._maxTileCacheZoomLevels===null?a.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),d=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,c):c;this._cache.setMaxSize(d)}handleWrapJump(e){let i=Math.round((e-(this._prevLng===void 0?e:this._prevLng))/360);if(this._prevLng=e,i){let l={};for(let c in this._tiles){let d=this._tiles[c];d.tileID=d.tileID.unwrapTo(d.tileID.wrap+i),l[d.tileID.key]=d}this._tiles=l;for(let c in this._timers)clearTimeout(this._timers[c]),delete this._timers[c];for(let c in this._tiles)this._setTileReloadTimer(c,this._tiles[c])}}_updateCoveredAndRetainedTiles(e,i,l,c,d,v){let w={},P={},C=Object.keys(e),L=U.now();for(let N of C){let R=e[N],K=this._tiles[N];if(!K||K.fadeEndTime!==0&&K.fadeEndTime<=L)continue;let ee=this.findLoadedParent(R,i),he=this.findLoadedSibling(R),ue=ee||he||null;ue&&(this._addTile(ue.tileID),w[ue.tileID.key]=ue.tileID),P[N]=R}this._retainLoadedChildren(P,c,l,e);for(let N in w)e[N]||(this._coveredTiles[N]=!0,e[N]=w[N]);if(v){let N={},R={};for(let K of d)this._tiles[K.key].hasData()?N[K.key]=K:R[K.key]=K;for(let K in R){let ee=R[K].children(this._source.maxzoom);this._tiles[ee[0].key]&&this._tiles[ee[1].key]&&this._tiles[ee[2].key]&&this._tiles[ee[3].key]&&(N[ee[0].key]=e[ee[0].key]=ee[0],N[ee[1].key]=e[ee[1].key]=ee[1],N[ee[2].key]=e[ee[2].key]=ee[2],N[ee[3].key]=e[ee[3].key]=ee[3],delete R[K])}for(let K in R){let ee=R[K],he=this.findLoadedParent(ee,this._source.minzoom),ue=this.findLoadedSibling(ee),de=he||ue||null;if(de){N[de.tileID.key]=e[de.tileID.key]=de.tileID;for(let me in N)N[me].isChildOf(de.tileID)&&delete N[me]}}for(let K in this._tiles)N[K]||(this._coveredTiles[K]=!0)}}update(e,i){if(!this._sourceLoaded||this._paused)return;let l;this.transform=e,this.terrain=i,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?l=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(L=>new a.Y(L.canonical.z,L.wrap,L.canonical.z,L.canonical.x,L.canonical.y)):(l=Re(e,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:i,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(l=l.filter(L=>this._source.hasTile(L)))):l=[];let c=Ar(e,this._source),d=Math.max(c-J.maxOverzooming,this._source.minzoom),v=Math.max(c+J.maxUnderzooming,this._source.minzoom);
5if(this.usedForTerrain){let L={};for(let N of l)if(N.canonical.z>this._source.minzoom){let R=N.scaledTo(N.canonical.z-1);L[R.key]=R;let K=N.scaledTo(Math.max(this._source.minzoom,Math.min(N.canonical.z,5)));L[K.key]=K}l=l.concat(Object.values(L))}let w=l.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,w&&this.fire(new a.l("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let P=this._updateRetainedTiles(l,c);W(this._source.type)&&this._updateCoveredAndRetainedTiles(P,d,v,c,l,i);for(let L in P)this._tiles[L].clearFadeHold();let C=a.af(this._tiles,P);for(let L of C){let N=this._tiles[L];N.hasSymbolBuckets&&!N.holdingForFade()?N.setHoldDuration(this.map._fadeDuration):N.hasSymbolBuckets&&!N.symbolFadeFinished()||this._removeTile(L)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)}_updateRetainedTiles(e,i){var l;let c={},d={},v=Math.max(i-J.maxOverzooming,this._source.minzoom),w=Math.max(i+J.maxUnderzooming,this._source.minzoom),P={};for(let C of e){let L=this._addTile(C);c[C.key]=C,L.hasData()||i<this._source.maxzoom&&(P[C.key]=C)}this._retainLoadedChildren(P,i,w,c);for(let C of e){let L=this._tiles[C.key];if(L.hasData())continue;if(i+1>this._source.maxzoom){let R=C.children(this._source.maxzoom)[0],K=this.getTile(R);if(K&&K.hasData()){c[R.key]=R;continue}}else{let R=C.children(this._source.maxzoom);if(c[R[0].key]&&c[R[1].key]&&c[R[2].key]&&c[R[3].key])continue}let N=L.wasRequested();for(let R=C.overscaledZ-1;R>=v;--R){let K=C.scaledTo(R);if(d[K.key])break;if(d[K.key]=!0,L=this.getTile(K),!L&&N&&(L=this._addTile(K)),L){let ee=L.hasData();if((ee||!(!((l=this.map)===null||l===void 0)&&l.cancelPendingTileRequestsWhileZooming)||N)&&(c[K.key]=K),N=L.wasRequested(),ee)break}}}return c}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let e in this._tiles){let i=[],l,c=this._tiles[e].tileID;for(;c.overscaledZ>0;){if(c.key in this._loadedParentTiles){l=this._loadedParentTiles[c.key];break}i.push(c.key);let d=c.scaledTo(c.overscaledZ-1);if(l=this._getLoadedTile(d),l)break;c=d}for(let d of i)this._loadedParentTiles[d]=l}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let e in this._tiles){let i=this._tiles[e].tileID,l=this._getLoadedTile(i);this._loadedSiblingTiles[i.key]=l}}_addTile(e){let i=this._tiles[e.key];if(i)return i;i=this._cache.getAndRemove(e),i&&(this._setTileReloadTimer(e.key,i),i.tileID=e,this._state.initializeTileState(i,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,i)));let l=i;return i||(i=new Ir(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(i,e.key,i.state)),i.uses++,this._tiles[e.key]=i,l||this._source.fire(new a.l("dataloading",{tile:i,coord:i.tileID,dataType:"source"})),i}_setTileReloadTimer(e,i){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);let l=i.getExpiryTimeout();l&&(this._timers[e]=setTimeout(()=>{this._reloadTile(e,"expired"),delete this._timers[e]},l))}_removeTile(e){let i=this._tiles[e];i&&(i.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),i.uses>0||(i.hasData()&&i.state!=="reloading"?this._cache.add(i.tileID,i,i.getExpiryTimeout()):(i.aborted=!0,this._abortTile(i),this._unloadTile(i))))}_dataHandler(e){let i=e.sourceDataType;e.dataType==="source"&&i==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&e.dataType==="source"&&i==="content"&&(this.reload(e.sourceDataChanged),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let e in this._tiles)this._removeTile(e);this._cache.reset()}tilesIn(e,i,l){let c=[],d=this.transform;if(!d)return c;let v=l?d.getCameraQueryGeometry(e):e,w=e.map(ee=>d.screenPointToMercatorCoordinate(ee,this.terrain)),P=v.map(ee=>d.screenPointToMercatorCoordinate(ee,this.terrain)),C=this.getIds(),L=1/0,N=1/0,R=-1/0,K=-1/0;for(let ee of P)L=Math.min(L,ee.x),N=Math.min(N,ee.y),R=Math.max(R,ee.x),K=Math.max(K,ee.y);for(let ee=0;ee<C.length;ee++){let he=this._tiles[C[ee]];if(he.holdingForFade())continue;
5let ue=he.tileID,de=Math.pow(2,d.zoom-he.tileID.overscaledZ),me=i*he.queryPadding*a.Z/he.tileSize/de,xe=[ue.getTilePoint(new a.$(L,N)),ue.getTilePoint(new a.$(R,K))];if(xe[0].x-me<a.Z&&xe[0].y-me<a.Z&&xe[1].x+me>=0&&xe[1].y+me>=0){let Se=w.map(Ae=>ue.getTilePoint(Ae)),Pe=P.map(Ae=>ue.getTilePoint(Ae));c.push({tile:he,tileID:ue,queryGeometry:Se,cameraQueryGeometry:Pe,scale:de})}}return c}getVisibleCoordinates(e){let i=this.getRenderableIds(e).map(l=>this._tiles[l].tileID);return this.transform&&this.transform.populateCache(i),i}hasTransition(){if(this._source.hasTransition())return!0;if(W(this._source.type)){let e=U.now();for(let i in this._tiles)if(this._tiles[i].fadeEndTime>=e)return!0}return!1}setFeatureState(e,i,l){this._state.updateState(e=e||"_geojsonTileLayer",i,l)}removeFeatureState(e,i,l){this._state.removeFeatureState(e=e||"_geojsonTileLayer",i,l)}getFeatureState(e,i){return this._state.getState(e=e||"_geojsonTileLayer",i)}setDependencies(e,i,l){let c=this._tiles[e];c&&c.setDependencies(i,l)}reloadTilesForDependencies(e,i){for(let l in this._tiles)this._tiles[l].hasDependency(e,i)&&this._reloadTile(l,"reloading");this._cache.filter(l=>!l.hasDependency(e,i))}}function ie(h,e){let i=Math.abs(2*h.wrap)-+(h.wrap<0),l=Math.abs(2*e.wrap)-+(e.wrap<0);return h.overscaledZ-e.overscaledZ||l-i||e.canonical.y-h.canonical.y||e.canonical.x-h.canonical.x}function W(h){return h==="raster"||h==="image"||h==="video"}J.maxOverzooming=10,J.maxUnderzooming=3;class ve{constructor(e,i){this.reset(e,i)}reset(e,i){this.points=e||[],this._distances=[0];for(let l=1;l<this.points.length;l++)this._distances[l]=this._distances[l-1]+this.points[l].dist(this.points[l-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(i||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(e){if(this.points.length===1)return this.points[0];e=a.ae(e,0,1);let i=1,l=this._distances[i],c=e*this.paddedLength+this.padding;for(;l<c&&i<this._distances.length;)l=this._distances[++i];let d=i-1,v=this._distances[d],w=l-v,P=w>0?(c-v)/w:0;return this.points[d].mult(1-P).add(this.points[i].mult(P))}}function Ie(h,e){let i=!0;return h==="always"||h!=="never"&&e!=="never"||(i=!1),i}class Ee{constructor(e,i,l){let c=this.boxCells=[],d=this.circleCells=[];this.xCellCount=Math.ceil(e/l),this.yCellCount=Math.ceil(i/l);for(let v=0;v<this.xCellCount*this.yCellCount;v++)c.push([]),d.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=i,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/i,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(e,i,l,c,d){this._forEachCell(i,l,c,d,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(i),this.bboxes.push(l),this.bboxes.push(c),this.bboxes.push(d)}insertCircle(e,i,l,c){this._forEachCell(i-c,l-c,i+c,l+c,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(i),this.circles.push(l),this.circles.push(c)}_insertBoxCell(e,i,l,c,d,v){this.boxCells[d].push(v)}_insertCircleCell(e,i,l,c,d,v){this.circleCells[d].push(v)}_query(e,i,l,c,d,v,w){if(l<0||e>this.width||c<0||i>this.height)return[];let P=[];if(e<=0&&i<=0&&this.width<=l&&this.height<=c){if(d)return[{key:null,x1:e,y1:i,x2:l,y2:c}];for(let C=0;C<this.boxKeys.length;C++)P.push({key:this.boxKeys[C],x1:this.bboxes[4*C],y1:this.bboxes[4*C+1],x2:this.bboxes[4*C+2],y2:this.bboxes[4*C+3]});for(let C=0;C<this.circleKeys.length;C++){let L=this.circles[3*C],N=this.circles[3*C+1],R=this.circles[3*C+2];P.push({key:this.circleKeys[C],x1:L-R,y1:N-R,x2:L+R,y2:N+R})}}else this._forEachCell(e,i,l,c,this._queryCell,P,{hitTest:d,overlapMode:v,seenUids:{box:{},circle:{}}},w);return P}query(e,i,l,c){return this._query(e,i,l,c,!1,null)}hitTest(e,i,l,c,d,v){return this._query(e,i,l,c,!0,d,v).length>0}hitTestCircle(e,i,l,c,d){let v=e-l,w=e+l,P=i-l,C=i+l;if(w<0||v>this.width||C<0||P>this.height)return!1;let L=[];return this._forEachCell(v,P,w,C,this._queryCellCircle,L,{hitTest:!0,overlapMode:c,circle:{x:e,y:i,radius:l},seenUids:{box:{},circle:{}}},d),L.length>0}_queryCell(e,i,l,c,d,v,w,P){let{seenUids:C,hitTest:L,overlapMode:N}=w,R=this.boxCells[d];if(R!==null){let ee=this.bboxes;for(let he of R)if(!C.box[he]){C.box[he]=!0;let ue=4*he,de=this.boxKeys[he];if(e<=ee[ue+2]&&i<=ee[ue+3]&&l>=ee[ue+0]&&c>
vendor: 8,499 bytes, line 5
5=ee[ue+1]&&(!P||P(de))&&(!L||!Ie(N,de.overlapMode))&&(v.push({key:de,x1:ee[ue],y1:ee[ue+1],x2:ee[ue+2],y2:ee[ue+3]}),L))return!0}}let K=this.circleCells[d];if(K!==null){let ee=this.circles;for(let he of K)if(!C.circle[he]){C.circle[he]=!0;let ue=3*he,de=this.circleKeys[he];if(this._circleAndRectCollide(ee[ue],ee[ue+1],ee[ue+2],e,i,l,c)&&(!P||P(de))&&(!L||!Ie(N,de.overlapMode))){let me=ee[ue],xe=ee[ue+1],Se=ee[ue+2];if(v.push({key:de,x1:me-Se,y1:xe-Se,x2:me+Se,y2:xe+Se}),L)return!0}}}return!1}_queryCellCircle(e,i,l,c,d,v,w,P){let{circle:C,seenUids:L,overlapMode:N}=w,R=this.boxCells[d];if(R!==null){let ee=this.bboxes;for(let he of R)if(!L.box[he]){L.box[he]=!0;let ue=4*he,de=this.boxKeys[he];if(this._circleAndRectCollide(C.x,C.y,C.radius,ee[ue+0],ee[ue+1],ee[ue+2],ee[ue+3])&&(!P||P(de))&&!Ie(N,de.overlapMode))return v.push(!0),!0}}let K=this.circleCells[d];if(K!==null){let ee=this.circles;for(let he of K)if(!L.circle[he]){L.circle[he]=!0;let ue=3*he,de=this.circleKeys[he];if(this._circlesCollide(ee[ue],ee[ue+1],ee[ue+2],C.x,C.y,C.radius)&&(!P||P(de))&&!Ie(N,de.overlapMode))return v.push(!0),!0}}}_forEachCell(e,i,l,c,d,v,w,P){let C=this._convertToXCellCoord(e),L=this._convertToYCellCoord(i),N=this._convertToXCellCoord(l),R=this._convertToYCellCoord(c);for(let K=C;K<=N;K++)for(let ee=L;ee<=R;ee++)if(d.call(this,e,i,l,c,this.xCellCount*ee+K,v,w,P))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,i,l,c,d,v){let w=c-e,P=d-i,C=l+v;return C*C>w*w+P*P}_circleAndRectCollide(e,i,l,c,d,v,w){let P=(v-c)/2,C=Math.abs(e-(c+P));if(C>P+l)return!1;let L=(w-d)/2,N=Math.abs(i-(d+L));if(N>L+l)return!1;if(C<=P||N<=L)return!0;let R=C-P,K=N-L;return R*R+K*K<=l*l}}function je(h,e,i){let l=a.K();if(!h){let{vecSouth:N,vecEast:R}=st(e),K=F();K[0]=R[0],K[1]=R[1],K[2]=N[0],K[3]=N[1],c=K,(L=(v=(d=K)[0])*(C=d[3])-(P=d[2])*(w=d[1]))&&(c[0]=C*(L=1/L),c[1]=-w*L,c[2]=-P*L,c[3]=v*L),l[0]=K[0],l[1]=K[1],l[4]=K[2],l[5]=K[3]}var c,d,v,w,P,C,L;return a.M(l,l,[1/i,1/i,1]),l}function ke(h,e,i,l){if(h){let c=a.K();if(!e){let{vecSouth:d,vecEast:v}=st(i);c[0]=v[0],c[1]=v[1],c[4]=d[0],c[5]=d[1]}return a.M(c,c,[l,l,1]),c}return i.pixelsToClipSpaceMatrix}function st(h){let e=Math.cos(h.rollInRadians),i=Math.sin(h.rollInRadians),l=Math.cos(h.pitchInRadians),c=Math.cos(h.bearingInRadians),d=Math.sin(h.bearingInRadians),v=a.ak();v[0]=-c*l*i-d*e,v[1]=-d*l*i+c*e;let w=a.al(v);w<1e-9?a.am(v):a.an(v,v,1/w);let P=a.ak();P[0]=c*l*e-d*i,P[1]=d*l*e+c*i;let C=a.al(P);return C<1e-9?a.am(P):a.an(P,P,1/C),{vecEast:P,vecSouth:v}}function et(h,e,i,l){let c;l?(c=[h,e,l(h,e),1],a.ap(c,c,i)):(c=[h,e,0,1],fr(c,c,i));let d=c[3];return{point:new a.P(c[0]/d,c[1]/d),signedDistanceFromCamera:d,isOccluded:!1}}function Be(h,e){return .5+h/e*.5}function lt(h,e){return h.x>=-e[0]&&h.x<=e[0]&&h.y>=-e[1]&&h.y<=e[1]}function Ct(h,e,i,l,c,d,v,w,P,C,L,N,R){let K=i?h.textSizeData:h.iconSizeData,ee=a.ag(K,e.transform.zoom),he=[256/e.width*2+1,256/e.height*2+1],ue=i?h.text.dynamicLayoutVertexArray:h.icon.dynamicLayoutVertexArray;ue.clear();let de=h.lineVertexArray,me=i?h.text.placedSymbolArray:h.icon.placedSymbolArray,xe=e.transform.width/e.transform.height,Se=!1;for(let Pe=0;Pe<me.length;Pe++){let Ae=me.get(Pe);if(Ae.hidden||Ae.writingMode===a.ah.vertical&&!Se){qt(Ae.numGlyphs,ue);continue}Se=!1;let Me=new a.P(Ae.anchorX,Ae.anchorY),Ue={getElevation:R,pitchedLabelPlaneMatrix:l,lineVertexArray:de,pitchWithMap:d,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:e.transform,tileAnchorPoint:Me,unwrappedTileID:P,width:C,height:L,translation:N},Ve=Rt(Ae.anchorX,Ae.anchorY,Ue);if(!lt(Ve.point,he)){qt(Ae.numGlyphs,ue);continue}let ot=Be(e.transform.cameraToCenterDistance,Ve.signedDistanceFromCamera),ut=a.ai(K,ee,Ae),at=d?ut*e.transform.getPitchedTextCorrection(Ae.anchorX,Ae.anchorY,P)/ot:ut*ot,It=Kt({projectionContext:Ue,pitchedLabelPlaneMatrixInverse:c,symbol:Ae,fontSize:at,flip:!1,keepUpright:v,glyphOffsetArray:h.glyphOffsetArray,dynamicLayoutVertexArray:ue,aspectRatio:xe,rotateToLine:w});Se=It.useVertical,(It.notEnoughRoom||Se||It.needsFlipping&&Kt({projectionContext:Ue,pitchedLabelPlaneMatrixInverse:c,symbol:Ae,fontSize:at,flip:!0,keepUpright:v,glyphOffsetArray:h.glyphOffsetArray,dynamicLayoutVertexArray:ue,aspectRatio:xe,rotateToLine:w}).notEnoughRoom)&&qt(Ae.numGlyphs,ue)}i?h.text.dynamicLayoutVertexBuffer.updateData(ue):h.icon.dynamicLayoutVertexBuffer.updateData(ue)}function kt(h,e,i,l,c,d,v,w){let P=d.glyphStartIndex+d.numGlyphs,C=d.lineStartIndex,L=d.lineStartIndex+d.lineLength,N=e.getoffsetX(d.glyphStartIndex),R=e.getoffsetX(P-1),K=Zi(h*N,i,l,c,d.segment,C,L,w,v);if(!K)return null;let ee=Zi(h*R,i,l,c,d.segment,C,L,w,v);return ee?w.projectionCache.anyProjectionOccluded?null:{first:K,last:ee}:null}function tt(h,e,i,l){return h===a.ah.horizontal&&Math.abs(i.y-e.y)>Math.abs(i.x-e.x)*l?{useVertical:!0}:(h===a.ah.vertical?e.y<i.y:e.x>i.x)?{needsFlipping:!0}:null}function Kt(h){let{projectionContext:e,pitchedLabelPlaneMatrixInverse:i,symbol:l,fontSize:c,flip:d,keepUpright:v,glyphOffsetArray:w,dynamicLayoutVertexArray:P,aspectRatio:C,rotateToLine:L}=h,N=c/24,R=l.lineOffsetX*N,K=l.lineOffsetY*N,ee;if(l.numGlyphs>1){let he=l.glyphStartIndex+l.numGlyphs,ue=l.lineStartIndex,de=l.lineStartIndex+l.lineLength,me=kt(N,w,R,K,d,l,L,e);if(!me)return{notEnoughRoom:!0};let xe=ft(me.first.point.x,me.first.point.y,e,i),Se=ft(me.last.point.x,me.last.point.y,e,i);if(v&&!d){let Pe=tt(l.writingMode,xe,Se,C);if(Pe)return Pe}ee=[me.first];for(let Pe=l.glyphStartIndex+1;Pe<he-1;Pe++)ee.push(Zi(N*w.getoffsetX(Pe),R,K,d,l.segment,ue,de,e,L));ee.push(me.last)}else{if(v&&!d){let ue=di(e.tileAnchorPoint.x,e.tileAnchorPoint.y,e).point,de=l.lineStartIndex+l.segment+1,me=new a.P(e.lineVertexArray.getx(de),e.lineVertexArray.gety(de)),xe=di(me.x,me.y,e),Se=xe.signedDistanceFromCamera>0?xe.point:Vt(e.tileAnchorPoint,me,ue,1,e),Pe=ft(ue.x,ue.y,e,i),Ae=ft(Se.x,Se.y,e,i),Me=tt(l.writingMode,Pe,Ae,C);if(Me)return Me}let he=Zi(N*w.getoffsetX(l.glyphStartIndex),R,K,d,l.segment,l.lineStartIndex,l.lineStartIndex+l.lineLength,e,L);if(!he||e.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};ee=[he]}for(let he of ee)a.ao(P,he.point,he.angle);return{}}function Vt(h,e,i,l,c){let d=h.add(h.sub(e)._unit()),v=di(d.x,d.y,c).point,w=i.sub(v);return i.add(w._mult(l/w.mag()))}function Ht(h,e,i){let l=e.projectionCache;if(l.projections[h])return l.projections[h];let c=new a.P(e.lineVertexArray.getx(h),e.lineVertexArray.gety(h)),d=di(c.x,c.y,e);if(d.signedDistanceFromCamera>0)return l.projections[h]=d.point,l.anyProjectionOccluded=l.anyProjectionOccluded||d.isOccluded,d.point;let v=h-i.direction;return Vt(i.distanceFromAnchor===0?e.tileAnchorPoint:new a.P(e.lineVertexArray.getx(v),e.lineVertexArray.gety(v)),c,i.previousVertex,i.absOffsetX-i.distanceFromAnchor+1,e)}function di(h,e,i){let l=h+i.translation[0],c=e+i.translation[1],d;return i.pitchWithMap?(d=et(l,c,i.pitchedLabelPlaneMatrix,i.getElevation),d.isOccluded=!1):(d=i.transform.projectTileCoordinates(l,c,i.unwrappedTileID,i.getElevation),d.point.x=(.5*d.point.x+.5)*i.width,d.point.y=(.5*-d.point.y+.5)*i.height),d}function ft(h,e,i,l){if(i.pitchWithMap){let c=[h,e,0,1];return a.ap(c,c,l),i.transform.projectTileCoordinates(c[0]/c[3],c[1]/c[3],i.unwrappedTileID,i.getElevation).point}return{x:h/i.width*2-1,y:e/i.height*2-1}}function Rt(h,e,i){return i.transform.projectTileCoordinates(h,e,i.unwrappedTileID,i.getElevation)}function Mt(h,e,i){return h._unit()._perp()._mult(e*i)}function ti(h,e,i,l,c,d,v,w,P){if(w.projectionCache.offsets[h])return w.projectionCache.offsets[h];let C=i.add(e);if(h+P.direction<l||h+P.direction>=c)return w.projectionCache.offsets[h]=C,C;let L=Ht(h+P.direction,w,P),N=Mt(L.sub(i),v,P.direction),R=i.add(N),K=L.add(N);return w.projectionCache.offsets[h]=a.aq(d,C,R,K)||C,w.projectionCache.offsets[h]}function Zi(h,e,i,l,c,d,v,w,P){let C=l?h-e:h+e,L=C>0?1:-1,N=0;l&&(L*=-1,N=Math.PI),L<0&&(N+=Math.PI);let R,K=L>0?d+c:d+c+1;w.projectionCache.cachedAnchorPoint?R=w.projectionCache.cachedAnchorPoint:(R=di(w.tileAnchorPoint.x,w.tileAnchorPoint.y,w).point,w.projectionCache.cachedAnchorPoint=R);let ee,he,ue=R,de=R,me=0,xe=0,Se=Math.abs(C),Pe=[],Ae;for(;me+xe<=Se;){if(K+=L,K<d||K>=v)return null;me+=xe,de=ue,he=ee;let Ve={absOffsetX:Se,direction:L,distanceFromAnchor:me,previousVertex:de};
5if(ue=Ht(K,w,Ve),i===0)Pe.push(de),Ae=ue.sub(de);else{let ot,ut=ue.sub(de);ot=ut.mag()===0?Mt(Ht(K+L,w,Ve).sub(ue),i,L):Mt(ut,i,L),he||(he=de.add(ot)),ee=ti(K,ot,ue,d,v,he,i,w,Ve),Pe.push(he),Ae=ee.sub(he)}xe=Ae.mag()}let Me=Ae._mult((Se-me)/xe)._add(he||de),Ue=N+Math.atan2(ue.y-de.y,ue.x-de.x);return Pe.push(Me),{point:Me,angle:P?Ue:0,path:Pe}}let Zn=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function qt(h,e){for(let i=0;i<h;i++){let l=e.length;e.resize(l+4),e.float32.set(Zn,3*l)}}function fr(h,e,i){let l=e[0],c=e[1];return h[0]=i[0]*l+i[4]*c+i[12],h[1]=i[1]*l+i[5]*c+i[13],h[3]=i[3]*l+i[7]*c+i[15],h}let ji=100;class Wn{constructor(e,i=new Ee(e.width+200,e.height+200,25),l=new Ee(e.width+200,e.height+200,25)){this.transform=e,this.grid=i,this.ignoredGrid=l,this.pitchFactor=Math.cos(e.pitch*Math.PI/180)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+ji,this.screenBottomBoundary=e.height+ji,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(e,i,l,c,d,v,w,P,C,L,N,R){let K=this.projectAndGetPerspectiveRatio(e.anchorPointX+P[0],e.anchorPointY+P[1],d,L,R),ee=l*K.perspectiveRatio,he;if(v||w)he=this._projectCollisionBox(e,ee,c,d,v,w,P,K,L,N,R);else{let Ae=K.x+(N?N.x*ee:0),Me=K.y+(N?N.y*ee:0);he={allPointsOccluded:!1,box:[Ae+e.x1*ee,Me+e.y1*ee,Ae+e.x2*ee,Me+e.y2*ee]}}let[ue,de,me,xe]=he.box,Se=v?he.allPointsOccluded:K.isOccluded,Pe=Se;return Pe||(Pe=K.perspectiveRatio<this.perspectiveRatioCutoff),Pe||(Pe=!this.isInsideGrid(ue,de,me,xe)),Pe||i!=="always"&&this.grid.hitTest(ue,de,me,xe,i,C)?{box:[ue,de,me,xe],placeable:!1,offscreen:!1,occluded:Se}:{box:[ue,de,me,xe],placeable:!0,offscreen:this.isOffscreen(ue,de,me,xe),occluded:Se}}placeCollisionCircles(e,i,l,c,d,v,w,P,C,L,N,R,K,ee){let he=[],ue=new a.P(i.anch
5orX,i.anchorY),de=this.getPerspectiveRatio(ue.x,ue.y,v,ee),me=(C?d*this.transform.getPitchedTextCorrection(i.anchorX,i.anchorY,v)/de:d*de)/a.av,xe={getElevation:ee,pitchedLabelPlaneMatrix:w,lineVertexArray:l,pitchWithMap:C,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:this.transform,tileAnchorPoint:ue,unwrappedTileID:v,width:this.transform.width,height:this.transform.height,translation:K},Se=kt(me,c,i.lineOffsetX*me,i.lineOffsetY*me,!1,i,!1,xe),Pe=!1,Ae=!1,Me=!0;if(Se){let Ue=.5*N*de+R,Ve=new a.P(-100,-100),ot=new a.P(this.screenRightBoundary,this.screenBottomBoundary),ut=new ve,at=Se.first,It=Se.last,Et=[];for(let ai=at.path.length-1;ai>=1;ai--)Et.push(at.path[ai]);for(let ai=1;ai<It.path.length;ai++)Et.push(It.path[ai]);let pt=2.5*Ue;if(C){let ai=this.projectPathToScreenSpace(Et,xe);Et=ai.some(Mi=>Mi.signedDistanceFromCamera<=0)?[]:ai.map(Mi=>Mi.point)}let Nt=[];if(Et.length>0){let ai=Et[0].clone(),Mi=Et[0].clone();for(let li=1;li<Et.length;li++)ai.x=Math.min(ai.x,Et[li].x),ai.y=Math.min(ai.y,Et[li].y),Mi.x=Math.max(Mi.x,Et[li].x),Mi.y=Math.max(Mi.y,Et[li].y);Nt=ai.x>=Ve.x&&Mi.x<=ot.x&&ai.y>=Ve.y&&Mi.y<=ot.y?[Et]:Mi.x<Ve.x||ai.x>ot.x||Mi.y<Ve.y||ai.y>ot.y?[]:a.ar([Et],Ve.x,Ve.y,ot.x,ot.y)}for(let ai of Nt){ut.reset(ai,.25*Ue);let Mi=0;Mi=ut.length<=.5*Ue?1:Math.ceil(ut.paddedLength/pt)+1;for(let li=0;li<Mi;li++){let Bi=li/Math.max(Mi-1,1),Hi=ut.lerp(Bi),Xi=Hi.x+ji,ki=Hi.y+ji;he.push(Xi,ki,Ue,0);let Fi=Xi-Ue,xr=ki-Ue,Rr=Xi+Ue,Gr=ki+Ue;if(Me=Me&&this.isOffscreen(Fi,xr,Rr,Gr),Ae=Ae||this.isInsideGrid(Fi,xr,Rr,Gr),e!=="always"&&this.grid.hitTestCircle(Xi,ki,Ue,e,L)&&(Pe=!0,!P))return{circles:[],offscreen:!1,collisionDetected:Pe}}}}return{circles:!P&&Pe||!Ae||de<this.perspectiveRatioCutoff?[]:he,offscreen:Me,collisionDetected:Pe}}projectPathToScreenSpace(e,i){let l=function(c,d){let v=a.K();return a.aj(v,d.pitchedLabelPlaneMatrix),c.map(w=>{let P=et(w.x,w.y,v,d.getElevation),C=d.transform.projectTileCoordinates(P.point.x,P.point.y,d.unwrappedTileID,d.getElevation);return C.point.x=(.5*C.point.x+.5)*d.width,C.point.y=(.5*-C.point.y+.5)*d.height,C})}(e,i);return function(c){let d=0,v=0,w=0,P=0;for(let C=0;C<c.length;C++)c[C].isOccluded?(w=C+1,P=0):(P++,P>v&&(v=P,d=w));return c.slice(d,d+v)}(l)}queryRenderedSymbols(e){if(e.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let i=[],l=1/0,c=1/0,d=-1/0,v=-1/0;for(let L of e){let N=new a.P(L.x+ji,L.y+ji);l=Math.min(l,N.x),c=Math.min(c,N.y),d=Math.max(d,N.x),v=Math.max(v,N.y),i.push(N)}let w=this.grid.query(l,c,d,v).concat(this.ignoredGrid.query(l,c,d,v)),P={},C={};for(let L of w){let N=L.key;if(P[N.bucketInstanceId]===void 0&&(P[N.bucketInstanceId]={}),P[N.bucketInstanceId][N.featureIndex])continue;let R=[new a.P(L.x1,L.y1),new a.P(L.x2,L.y1),new a.P(L.x2,L.y2),new a.P(L.x1,L.y2)];a.as(i,R)&&(P[N.bucketInstanceId][N.featureIndex]=!0,C[N.bucketInstanceId]===void 0&&(C[N.bucketInstanceId]=[]),C[N.bucketInstanceId].push(N.featureIndex))}return C}insertCollisionBox(e,i,l,c,d,v){(l?this.ignoredGrid:this.grid).insert({bucketInstanceId:c,featureIndex:d,collisionGroupID:v,overlapMode:i},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,i,l,c,d,v){let w=l?this.ignoredGrid:this.grid,P={bucketInstanceId:c,featureIndex:d,collisionGroupID:v,overlapMode:i};for(let C=0;C<e.length;C+=4)w.insertCircle(P,e[C],e[C+1],e[C+2])}projectAndGetPerspectiveRatio(e,i,l,c,d){if(d){let v;c?(v=[e,i,c(e,i),1],a.ap(v,v,d)):(v=[e,i,0,1],fr(v,v,d));let w=v[3];return{x:(v[0]/w+1)/2*this.transform.width+ji,y:(-v[1]/w+1)/2*this.transform.height+ji,perspectiveRatio:.5+this.transform.cameraToCenterDistance/w*.5,isOccluded:!1,signedDistanceFromCamera:w}}{let v=this.transform.projectTileCoordinates(e,i,l,c);return{x:(v.point.x+1)/2*this.transform.width+ji,y:(1-v.point.y)/2*this.transform.height+ji,perspectiveRatio:.5+this.transform.cameraToCenterDistance/v.signedDistanceFromCamera*.5,isOccluded:v.isOccluded,signedDistanceFromCamera:v.signedDistanceFromCamera}}}getPerspectiveRatio(e,i,l,c){let d=this.transform.projectTileCoordinates(e,i,l,c);return .5+this.transform.cameraToCenterDistance/d.signedDistanceFromCamera*.5}isOffscreen(e,i,l,c){return l<ji||e>=this.screenRightBoundary||c<ji||i>this.screenBottomBoundary}isInsideGrid(e,i,l,c){return l>=0&&e<this.gridRightBoundary&&c>=0&&i<this.gridBottomBoundary}getViewportMatrix(){let e=a.at([]);return a.L(e,e,[-100,-100,0]),e}_projectCollisionBox(e,i,l,c,d,v,w,P,C,L,N){let R=1,K=0,ee=0,he=1,ue=e.anchorPointX+w[0],de=e.anchorPointY+w[1];if(v&&!d){let Et=this.projectAndGetPerspectiveRatio(ue+1,de,c,C,N),pt=Et.x-P.x,Nt=Math.atan((Et.y-P.y)/pt)+(pt<0?Math.PI:0),ai=Math.sin(Nt),Mi=Math.cos(Nt);R=Mi,K=ai,ee=-ai,he=Mi}else if(!v&&d){let Et=st(this.transform);R=Et.vecEast[0],K=Et.vecEast[1],ee=Et.vecSouth[0],he=Et.vecSouth[1]}let me=P.x,xe=P.y,Se=i;d&&(me=ue,xe=de,Se=Math.pow(2,-(this.transform.zoom-l.overscaledZ
vendor: 4,578 bytes, line 5
5)),Se*=this.transform.getPitchedTextCorrection(ue,de,c),L||(Se*=a.ae(.5+P.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))),L&&(me+=R*L.x*Se+ee*L.y*Se,xe+=K*L.x*Se+he*L.y*Se);let Pe=e.x1*Se,Ae=e.x2*Se,Me=(Pe+Ae)/2,Ue=e.y1*Se,Ve=e.y2*Se,ot=(Ue+Ve)/2,ut=[{offsetX:Pe,offsetY:Ue},{offsetX:Me,offsetY:Ue},{offsetX:Ae,offsetY:Ue},{offsetX:Ae,offsetY:ot},{offsetX:Ae,offsetY:Ve},{offsetX:Me,offsetY:Ve},{offsetX:Pe,offsetY:Ve},{offsetX:Pe,offsetY:ot}],at=[];for(let{offsetX:Et,offsetY:pt}of ut)at.push(new a.P(me+R*Et+ee*pt,xe+K*Et+he*pt));let It=!1;if(d){let Et=at.map(pt=>this.projectAndGetPerspectiveRatio(pt.x,pt.y,c,C,N));It=Et.some(pt=>!pt.isOccluded),at=Et.map(pt=>new a.P(pt.x,pt.y))}else It=!0;return{box:a.au(at),allPointsOccluded:!It}}}class Ts{constructor(e,i,l,c){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?i:-i))):c&&l?1:0,this.placed=l}isHidden(){return this.opacity===0&&!this.placed}}class Fn{constructor(e,i,l,c,d){this.text=new Ts(e?e.text:null,i,l,d),this.icon=new Ts(e?e.icon:null,i,c,d)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Nr{constructor(e,i,l){this.text=e,this.icon=i,this.skipFade=l}}class zi{constructor(e,i,l,c,d){this.bucketInstanceId=e,this.featureIndex=i,this.sourceLayerIndex=l,this.bucketIndex=c,this.tileID=d}}class tl{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){let i=++this.maxGroupID;this.collisionGroups[e]={ID:i,predicate:l=>l.collisionGroupID===i}}return this.collisionGroups[e]}}function Ws(h,e,i,l,c){let{horizontalAlign:d,verticalAlign:v}=a.aB(h);return new a.P(-(d-.5)*e+l[0]*c,-(v-.5)*i+l[1]*c)}class Ps{constructor(e,i,l,c,d){this.transform=e.clone(),this.terrain=i,this.collisionIndex=new Wn(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=l,this.retainedQueryData={},this.collisionGroups=new tl(c),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=d,d&&(d.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){let i=this.terrain;return i?(l,c)=>i.getElevation(e,l,c):null}getBucketParts(e,i,l,c){let d=l.getBucket(i),v=l.latestFeatureIndex;if(!d||!v||i.id!==d.layerIds[0])return;let w=l.collisionBoxArray,P=d.layers[0].layout,C=d.layers[0].paint,L=Math.pow(2,this.transform.zoom-l.tileID.overscaledZ),N=l.tileSize/a.Z,R=l.tileID.toUnwrapped(),K=P.get("text-rotation-alignment")==="map",ee=a.aw(l,1,this.transform.zoom),he=a.ax(this.collisionIndex.transform,l,C.get("text-translate"),C.get("text-translate-anchor")),ue=a.ax(this.collisionIndex.transform,l,C.get("icon-translate"),C.get("icon-translate-anchor")),de=je(K,this.transform,ee);this.retainedQueryData[d.bucketInstanceId]=new zi(d.bucketInstanceId,v,d.sourceLayerIndex,d.index,l.tileID);let me={bucket:d,layout:P,translationText:he,translationIcon:ue,unwrappedTileID:R,pitchedLabelPlaneMatrix:de,scale:L,textPixelRatio:N,holdingForFade:l.holdingForFade(),collisionBoxArray:w,partiallyEvaluatedTextSize:a.ag(d.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(d.sourceID)};if(c)for(let xe of d.sortKeyRanges){let{sortKey:Se,symbolInstanceStart:Pe,symbolInstanceEnd:Ae}=xe;e.push({sortKey:Se,symbolInstanceStart:Pe,symbolInstanceEnd:Ae,parameters:me})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:d.symbolInstances.length,parameters:me})}attemptAnchorPlacement(e,i,l,c,d,v,w,P,C,L,N,R,K,ee,he,ue,de,me,xe,Se){let Pe=a.ay[e.textAnchor],Ae=[e.textOffset0,e.textOffset1],Me=Ws(Pe,l,c,Ae,d),Ue=this.collisionIndex.placeCollisionBox(i,R,P,C,L,w,v,ue,N.predicate,xe,Me,Se);if((!me||this.collisionIndex.placeCollisionBox(me,R,P,C,L,w,v,de,N.predicate,xe,Me,Se).placeable)&&Ue.placeable){let Ve;if(this.prevPlacement&&this.prevPlacement.variableOffsets[K.crossTileID]&&this.prevPlacement.placements[K.crossTileID]&&this.prevPlacement.placements[K.crossTileID].text&&(Ve=this.prevPlacement.variableOffsets[K.crossTileID].anchor),K.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[K.crossTileID]={textOffset:Ae,width:l,height:c,anchor:Pe,textBoxScale:d,prevAnchor:Ve},this.markUsedJustification(ee,Pe,K,he),ee.allowVerticalPlacement&&(this.markUsedOrientation(ee,he,K),this.placedOrientations[K.crossTileID]=he),{shift:Me,placedGlyphBoxes:Ue}}}placeLayerBucketPart(e,i,l){let{bucket:c,layout:d,translationText:v,translationIcon:w,unwrappedTileID:P,pitchedLabelPlaneMatr
5ix:C,textPixelRatio:L,holdingForFade:N,collisionBoxArray:R,partiallyEvaluatedTextSize:K,collisionGroup:ee}=e.parameters,he=d.get("text-optional"),ue=d.get("icon-optional"),de=a.az(d,"text-overlap","text-allow-overlap"),me=de==="always",xe=a.az(d,"icon-overlap","icon-allow-overlap"),Se=xe==="always",Pe=d.get("text-rotation-alignment")==="map",Ae=d.get("text-pitch-alignment")==="map",Me=d.get("icon-text-fit")!=="none",Ue=d.get("symbol-z-order")==="viewport-y",Ve=me&&(Se||!c.hasIconData()||ue),ot=Se&&(me||!c.hasTextData()||he);!c.collisionArrays&&R&&c.deserializeCollisionBoxes(R);let ut=this.retainedQueryData[c.bucketInstanceId].tileID,at=this._getTerrainElevationFunc(ut),It=this.transform.getFastPathSimpleProjectionMatrix(ut),Et=(pt,Nt,ai)=>{var Mi,li;if(i[pt.crossTileID])return;if(N)return void(this.placements[pt.crossTileID]=new Nr(!1,!1,!1));let Bi=!1,Hi=!1,Xi=!0,ki=null,Fi={box:null,placeable:!1,offscreen:null,occluded:!1},xr={placeable:!1},Rr=null,Gr=null,Pn=null,Rs=0,vs=0,oa=0;Nt.textFeatureIndex?Rs=Nt.textFeatureIndex:pt.useRuntimeCollisionCircles&&(Rs=pt.featureIndex),Nt.verticalTextFeatureIndex&&(vs=Nt.verticalTextFeatureIndex);let la=Nt.textBox;if(la){let kn=ur=>{let hr=a.ah.horizontal;if(c.allowVerticalPlacement&&!ur&&this.prevPlacement){let Pr=this.prevPlacement.placedOrientations[pt.crossTileID];Pr&&(this.placedOrientations[pt.crossTileID]=Pr,hr=Pr,this.markUsedOrientation(c,hr,pt))}return hr},Fs=(ur,hr)=>{if(c.allowVerticalPlacement&&pt.numVerticalGlyphVertices>0&&Nt.verticalTextBox){for(let Pr of c.writingModes)if(Pr===a.ah.vertical?(Fi=hr(),xr=Fi):Fi=ur(),Fi&&Fi.placeable)break}else Fi=ur()},La=pt.textAnchorOffsetStartIndex,za=pt.textAnchorOffsetEndIndex;if(za===La){let ur=(hr,Pr)=>{let Vi=this.collisionIndex.placeCollisionBox(hr,de,L,ut,P,Ae,Pe,v,ee.predicate,at,void 0,It);return Vi&&Vi.placeable&&(this.markUsedOrientation(c,Pr,pt),this.placedOrientations[pt.crossTileID]=Pr),Vi};Fs(()=>ur(la,a.ah.horizontal),()=>{let hr=Nt.verticalTextBox;return c.allowVerticalPlacement&&pt.numVerticalGlyphVertices>0&&hr?ur(hr,a.ah.vertical):{box:null,offscreen:null}}),kn(Fi&&Fi.placeable)}else{let ur=a.ay[(li=(Mi=this.prevPlacement)===null||Mi===void 0?void 0:Mi.variableOffsets[pt.crossTileID])===null||li===void 0?void 0:li.anchor],hr=(Vi,ca,pu)=>{let Ra=Vi.x2-Vi.x1,mh=Vi.y2-Vi.y1,fu=pt.textBoxScale,yc=Me&&xe==="never"?ca:null,ua=null,ha=de==="never"?1:2,da="never";ur&&ha++;for(let _c=0;_c<ha;_c++){for(let vc=La;vc<za;vc++){let wl=c.textAnchorOffsets.get(vc);if(ur&&wl.textAnchor!==ur)continue;let Sl=this.attemptAnchorPlacement(wl,Vi,Ra,mh,fu,Pe,Ae,L,ut,P,ee,da,pt,c,pu,v,w,yc,at);if(Sl&&(ua=Sl.placedGlyphBoxes,ua&&ua.placeable))return Bi=!0,ki=Sl.shift,ua}ur?ur=null:da=de}return l&&!ua&&(ua={box:this.collisionIndex.placeCollisionBox(la,"always",L,ut,P,Ae,Pe,v,ee.predicate,at,void 0,It).box,offscreen:!1,placeable:!1,occluded:!1}),ua};Fs(()=>hr(la,Nt.iconBox,a.ah.horizontal),()=>{let Vi=Nt.verticalTextBox;return c.allowVerticalPlacement&&(!Fi||!Fi.placeable)&&pt.numVerticalGlyphVertices>0&&Vi?hr(Vi,Nt.verticalIconBox,a.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Fi&&(Bi=Fi.placeable,Xi=Fi.offscreen);let Pr=kn(Fi&&Fi.placeable);if(!Bi&&this.prevPlacement){let Vi=this.prevPlacement.variableOffsets[pt.crossTileID];Vi&&(this.variableOffsets[pt.crossTileID]=Vi,this.markUsedJustification(c,Vi.anchor,pt,Pr))}}}if(Rr=Fi,Bi=Rr&&Rr.placeable,Xi=Rr&&Rr.offscreen,pt.useRuntimeCollisionCircles){let kn=c.text.placedSymbolArray.get(pt.centerJustifiedTextSymbolIndex),Fs=a.ai(c.textSizeData,K,kn),La=d.get("text-padding");Gr=this.collisionIndex.placeCollisionCircles(de,kn,c.lineVertexArray,c.glyphOffsetArray,Fs,P,C,l,Ae,ee.predicate,pt.collisionCircleDiameter,La,v,at),Gr.circles.length&&Gr.collisionDetected&&!l&&a.w("Collisions detected, but collision boxes are not shown"),Bi=me||Gr.circles.length>0&&!Gr.collisionDetected,Xi=Xi&&Gr.offscreen}if(Nt.iconFeatureIndex&&(oa=Nt.iconFeatureIndex),Nt.iconBox){let kn=Fs=>this.collisionIndex.placeCollisionBox(Fs,xe,L,ut,P,Ae,Pe,w,ee.predicate,at,Me&&ki?ki:void 0,It);xr&&xr.placeable&&Nt.verticalIconBox?(Pn=kn(Nt.verticalIconBox),Hi=Pn.placeable):(Pn=kn(Nt.iconBox),Hi=Pn.placeable),Xi=Xi&&Pn.offscreen}let ka=he||pt.numHorizontalGlyphVertices===0&&pt.numVerticalGlyphVertices===0,bs=ue||pt.numIconVertices===0;ka||bs?bs?ka||(Hi=Hi&&Bi):Bi=Hi&&Bi:Hi=Bi=Hi&&Bi;let Bs=Hi&&Pn.placeable;if(Bi&&Rr.placeable&&this.collisionIndex.insertCollisionBox(Rr.box,de,d.get("text-ignore-placement"),c.bucketInstanceId,xr&&xr.placeable&&vs?vs:Rs,ee.ID),Bs&&this.collisionIndex.insertCollisionBox(Pn.box,xe,d.get("icon-ignore-placement"),c.bucketInstanceId,oa,ee.ID),Gr&&Bi&&this.collisionIndex.insertCollisionCircles(Gr.circles,de,d.get("text-ignore-placement"),c.bucketInstanceId,Rs,ee.ID),l&&this.storeCollisionData(c.bucketInstanceId,ai,Nt,Rr,Pn,Gr),pt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(c.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[pt.crossTileID]=new Nr((Bi||Ve)&&!Rr?.occluded,(Hi||ot)&&!Pn?.occluded,Xi||
5c.justReloaded),i[pt.crossTileID]=!0};if(Ue){if(e.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let pt=c.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let Nt=pt.length-1;Nt>=0;--Nt){let ai=pt[Nt];Et(c.symbolInstances.get(ai),c.collisionArrays[ai],ai)}}else for(let pt=e.symbolInstanceStart;pt<e.symbolInstanceEnd;pt++)Et(c.symbolInstances.get(pt),c.collisionArrays[pt],pt);c.justReloaded=!1}storeCollisionData(e,i,l,c,d,v){if(l.textBox||l.iconBox){let w,P;this.collisionBoxArrays.has(e)?w=this.collisionBoxArrays.get(e):(w=new Map,this.collisionBoxArrays.set(e,w)),w.has(i)?P=w.get(i):(P={text:null,icon:null},w.set(i,P)),l.textBox&&(P.text=c.box),l.iconBox&&(P.icon=d.box)}if(v){let w=this.collisionCircleArrays[e];w===void 0&&(w=this.collisionCircleArrays[e]=[]);for(let P=0;P<v.circles.length;P+=4)w.push(v.circles[P+0]-ji),w.push(v.circles[P+1]-ji),w.push(v.circles[P+2]),w.push(v.collisionDetected?1:0)}}markUsedJustification(e,i,l,c){let d;d=c===a.ah.vertical?l.verticalPlacedTextSymbolIndex:{left:l.leftJustifiedTextSymbolIndex,center:l.centerJustifiedTextSymbolIndex,right:l.rightJustifiedTextSymbolIndex}[a.aA(i)];let v=[l.leftJustifiedTextSymbolIndex,l.centerJustifiedTextSymbolIndex,l.rightJustifiedTextSymbolIndex,l.verticalPlacedTextSymbolIndex];for(let w of v)w>=0&&(e.text.placedSymbolArray.get(w).crossTileID=d>=0&&w!==d?0:l.crossTileID)}markUsedOrientation(e,i,l){let c=i===a.ah.horizontal||i===a.ah.horizontalOnly?i:0,d=i===a.ah.vertical?i:0,v=[l.leftJustifiedTextSymbolIndex,l.centerJustifiedTextSymbolIndex,l.rightJustifiedTextSymbolIndex];for(let w of v)e.text.placedSymbolArray.get(w).placedOrientation=c;l.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(l.verticalPlacedTextSymbolIndex).placedOrientation=d)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;let i=this.prevPlacement,l=!1;this.prevZoomAdjustment=i?i.zoomAdjustment(this.transform.zoom):0;let c=i?i.symbolFadeChange(e):1,d=i?i.opacities:{},v=i?i.variableOffsets:{},w=i?i.placedOrientations:{};for(let P in this.placements){let C=this.placements[P],L=d[P];L?(this.opacities[P]=new Fn(L,c,C.text,C.icon),l=l||C.text!==L.text.placed||C.icon!==L.icon.placed):(this.opacities[P]=new Fn(null,c,C.text,C.icon,C.skipFade),l=l||C.text||C.icon)}for(let P in d){let C=d[P];
5if(!this.opacities[P]){let L=new Fn(C,c,!1,!1);L.isHidden()||(this.opacities[P]=L,l=l||C.text.placed||C.icon.placed)}}for(let P in v)this.variableOffsets[P]||!this.opacities[P]||this.opacities[P].isHidden()||(this.variableOffsets[P]=v[P]);for(let P in w)this.placedOrientations[P]||!this.opacities[P]||this.opacities[P].isHidden()||(this.placedOrientations[P]=w[P]);if(i&&i.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");l?this.lastPlacementChangeTime=e:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=i?i.lastPlacementChangeTime:e)}updateLayerOpacities(e,i){let l={};for(let c of i){let d=c.getBucket(e);d&&c.latestFeatureIndex&&e.id===d.layerIds[0]&&this.updateBucketOpacities(d,c.tileID,l,c.collisionBoxArray)}}updateBucketOpacities(e,i,l,c){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();let d=e.layers[0],v=d.layout,w=new Fn(null,0,!1,!1,!0),P=v.get("text-allow-overlap"),C=v.get("icon-allow-overlap"),L=d._unevaluatedLayout.hasValue("text-variable-anchor")||d._unevaluatedLayout.hasValue("text-variable-anchor-offset"),N=v.get("text-rotation-alignment")==="map",R=v.get("text-pitch-alignment")==="map",K=v.get("icon-text-fit")!=="none",ee=new Fn(null,0,P&&(C||!e.hasIconData()||v.get("icon-optional")),C&&(P||!e.hasTextData()||v.get("text-optional")),!0);!e.collisionArrays&&c&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(c);let he=(de,me,xe)=>{for(let Se=0;Se<me/4;Se++)de.opacityVertexArray.emplaceBack(xe);de.hasVisibleVertices=de.hasVisibleVertices||xe!==Xs},ue=this.collisionBoxArrays.get(e.bucketInstanceId);for(let de=0;de<e.symbolInstances.length;de++){let me=e.symbolInstances.get(de),{numHorizontalGlyphVertices:xe,numVerticalGlyphVertices:Se,crossTileID:Pe}=me,Ae=this.opacities[Pe];l[Pe]?Ae=w:Ae||(Ae=ee,this.opacities[Pe]=Ae),l[Pe]=!0;let Me=me.numIconVertices>0,Ue=this.placedOrientations[me.crossTileID],Ve=Ue===a.ah.vertical,ot=Ue===a.ah.horizontal||Ue===a.ah.horizontalOnly;if(xe>0||Se>0){let at=bo(Ae.text);he(e.text,xe,Ve?Xs:at),he(e.text,Se,ot?Xs:at);let It=Ae.text.isHidden();[me.rightJustifiedTextSymbolIndex,me.centerJustifiedTextSymbolIndex,me.leftJustifiedTextSymbolIndex].forEach(Nt=>{Nt>=0&&(e.text.placedSymbolArray.get(Nt).hidden=It||Ve?1:0)}),me.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(me.verticalPlacedTextSymbolIndex).hidden=It||ot?1:0);let Et=this.variableOffsets[me.crossTileID];Et&&this.markUsedJustification(e,Et.anchor,me,Ue);let pt=this.placedOrientations[me.crossTileID];pt&&(this.markUsedJustification(e,"left",me,pt),this.markUsedOrientation(e,pt,me))}if(Me){let at=bo(Ae.icon),It=!(K&&me.verticalPlacedIconSymbolIndex&&Ve);me.placedIconSymbolIndex>=0&&(he(e.icon,me.numIconVertices,It?at:Xs),e.icon.placedSymbolArray.get(me.placedIconSymbolIndex).hidden=Ae.icon.isHidden()),me.verticalPlacedIconSymbolIndex>=0&&(he(e.icon,me.numVerticalIconVertices,It?Xs:at),e.icon.placedSymbolArray.get(me.verticalPlacedIconSymbolIndex).hidden=Ae.icon.isHidden())}let ut=ue&&ue.has(de)?ue.get(de):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){let at=e.collisionArrays[de];if(at){let It=new a.P(0,0);if(at.textBox||at.verticalTextBox){let Et=!0;if(L){let pt=this.variableOffsets[Pe];pt?(It=Ws(pt.anchor,pt.width,pt.height,pt.textOffset,pt.textBoxScale),N&&It._rotate(R?-this.transform.bearingInRadians:this.transform.bearingInRadians)):Et=!1}if(at.textBox||at.verticalTextBox){let pt;at.textBox&&(pt=Ve),at.verticalTextBox&&(pt=ot),Xn(e.textCollisionBox.collisionVertexArray,Ae.text.placed,!Et||pt,ut.text,It.x,It.y)}}if(at.iconBox||at.verticalIconBox){let Et=!!(!ot&&at.verticalIconBox),pt;at.iconBox&&(pt=Et),at.verticalIconBox&&(pt=!Et),Xn(e.iconCollisionBox.collisionVertexArray,Ae.icon.placed,pt,ut.icon,K?It.x:0,K?It.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return this.fadeDuration===0?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(e,i){let l=this.zoomAtLastRecencyCheck===i?1-this.zoomAdjustment(i):1;return this.zoomAtLastRecencyCheck=i,this.commitTime+this.fadeDuration*l>e}setStale(){this.stale=!0}}function Xn(h,e,i,l,c,d){l&&l.length!==0||(l=[0,0,0,0]);let v=l[0]-ji,w=l[1]-ji,P=l[2]-ji,C=l[3]-ji;h.emplaceBack(e?1:0,i?1:0,c||0,d||0,v,w),h.emplaceBack(e?1:0,i?1:0,c||0,d||0,P,w),h.emplaceBack(e?1:0,i?1:0,c||0,d||0,P,C),h.emplaceBack(e?1:0,i?1:0,c||0,d||0,v,C)}let Es=Math.pow(2,25),_o=Math.pow(2,24),vo=Math.pow(2,17),il=Math.pow(2,16),ls=Math.pow(2,9),rl=Math.pow(2,8),Gl=Math.pow(2,1);function bo(h){if(h.opacity===0&&!h.placed)return 0;if(h.opacity===1&&h.placed)return 4294967295;let e=h.placed?1:0,i=Math.floor(127*h.opacity);return i*Es+e*_o+i*vo+e*il+i*ls+e*rl+i*Gl+e}let Xs=0;class $a{constructor(e){this._sortAcrossTiles=e.layout.get("symbol-z-order")!=="viewport-y"&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,i,l,c,d){let v=this._bucketParts;for(;this._currentTileIndex<e.length;)if(i.getBucketParts(v,c,e[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,d())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,v.sort((w,P)=>w.sortKey-P.sortKey));this._currentPartIndex<v.length;)if(i.placeLayerBucketPart(v[this._currentPartIndex],this._seenCrossTileIDs,l),this._currentPartIndex++,d())return!0;return!1}}class xo{constructor(e,i,l,c,d,v,w,P){this.placement=new Ps(e,i,v,w,P),this._currentPlacementIndex=l.length-1,this._forceFullPlacement=c,this._showCollisionBoxes=d,this._done=!1}isDone(){return this._done}continuePlacement(e,i,l){let c=U.now(),d=()=>!this._forceFullPlacement&&U.now()-c>2;for(;this._currentPlacementIndex>=0;){let v=i[e[this._currentPlacementIndex]],w=this.placement.collisionIndex.transform.zoom;if(v.type==="symbol"&&(!v.minzoom||v.minzoom<=w)&&(!v.maxzoom||v.maxzoom>w)){if(this._inProgressLayer||(this._inProgressLayer=new $a(v)),this._inProgressLayer.continuePlacement(l[v.source],this.placement,this._showCollisionBoxes,v,d))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}let mr=512/a.Z/2;class cs{constructor(e,i,l){this.tileID=e,this.bucketInstanceId=l,this._symbolsByKey={};let c=new Map;for(let d=0;d<i.length;d++){let v=i.get(d),w=v.key,P=c.get(w);P?P.push(v):c.set(w,[v])}for(let[d,v]of c){let w={positions:v.map(P=>({x:Math.floor(P.anchorX*mr),y:Math.floor(P.anchorY*mr)})),crossTileIDs:v.map(P=>P.crossTileID)};if(w.positions.length>128){let P=new a.aC(w.positions.length,16,Uint16Array);for(let{x:C,y:L}of w.positions)P.add(C,L);P.finish(),delete w.positions,w.index=P}this._symbolsByKey[d]=w}}getScaledCoordinates(e,i){let{x:l,y:c,z:d}=this.tileID.canonical,{x:v,y:w,z:P}=i.canonical,C=mr/Math.pow(2,P-d),L=(w*a.Z+e.anchorY)*C,N=c*a.Z*mr;return{x:Math.floor((v*a.Z+e.anchorX)*C-l*a.Z*mr),y:Math.floor(L-N)}}
5findMatches(e,i,l){let c=this.tileID.canonical.z<i.canonical.z?1:Math.pow(2,this.tileID.canonical.z-i.canonical.z);for(let d=0;d<e.length;d++){let v=e.get(d);if(v.crossTileID)continue;let w=this._symbolsByKey[v.key];if(!w)continue;let P=this.getScaledCoordinates(v,i);if(w.index){let C=w.index.range(P.x-c,P.y-c,P.x+c,P.y+c).sort();for(let L of C){let N=w.crossTileIDs[L];if(!l[N]){l[N]=!0,v.crossTileID=N;break}}}else if(w.positions)for(let C=0;C<w.positions.length;C++){let L=w.positions[C],N=w.crossTileIDs[C];if(Math.abs(L.x-P.x)<=c&&Math.abs(L.y-P.y)<=c&&!l[N]){l[N]=!0,v.crossTileID=N;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:e})=>e)}}class _a{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class wo{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){let i=Math.round((e-this.lng)/360);if(i!==0)for(let l in this.indexes){let c=this.indexes[l],d={};for(let v in c){let w=c[v];w.tileID=w.tileID.unwrapTo(w.tileID.wrap+i),d[w.tileID.key]=w}this.indexes[l]=d}this.lng=e}addBucket(e,i,l){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===i.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let d=0;d<i.symbolInstances.length;d++)i.symbolInstances.get(d).crossTileID=0;this.usedCrossTileIDs[e.overscaledZ]||(this.usedCrossTileIDs[e.overscaledZ]={});let c=this.usedCrossTileIDs[e.overscaledZ];for(let d in this.indexes){let v=this.indexes[d];if(Number(d)>e.overscaledZ)for(let w in v){let P=v[w];P.tileID.isChildOf(e)&&P.findMatches(i.symbolInstances,e,c)}else{let w=v[e.scaledTo(Number(d)).key];w&&w.findMatches(i.symbolInstances,e,c)}}for(let d=0;d<i.symbolInstances.length;d++){let v=i.symbolInstances.get(d);v.crossTileID||(v.crossTileID=l.generate(),c[v.crossTileID]=!0)}return this.indexes[e.overscaledZ]===void 0&&(this.indexes[e.overscaledZ]={}),this.indexes[e.overscaledZ][e.key]=new cs(e,i.symbolInstances,i.bucketInstanceId),!0}removeBucketCrossTileIDs(e,i){for(let l of i.getCrossTileIDsLists())for(let c of l)delete this.usedCrossTileIDs[e][c]}removeStaleBuckets(e){let i=!1;for(let l in this.indexes){let c=this.indexes[l];for(let d in c)e[c[d].bucketInstanceId]||(this.removeBucketCrossTileIDs(l,c[d]),delete c[d],i=!0)}return i}}class Va{constructor(){this.layerIndexes={},this.crossTileIDs=new _a,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(e,i,l){let c=this.layerIndexes[e.id];c===void 0&&(c=this.layerIndexes[e.id]=new wo);let d=!1,v={};c.handleWrapJump(l);for(let w of i){let P=w.getBucket(e);P&&e.id===P.layerIds[0]&&(P.bucketInstanceId||(P.bucketInstanceId=++this.maxBucketInstanceId),c.addBucket(w.tileID,P,this.crossTileIDs)&&(d=!0),v[P.bucketInstanceId]=!0)}return c.removeStaleBuckets(v)&&(d=!0),d}pruneUnusedLayers(e){let i={};e.forEach(l=>{i[l]=!0});for(let l in this.layerIndexes)i[l]||delete this.layerIndexes[l]}}var Ms="void main() {fragColor=vec4(1.0);}";let yn={prelude:ii(`#ifdef GL_ES 6precision mediump float; 7#else 8#if !defined(lowp) 9#define lowp 10#endif 11#if !defined(mediump) 12#define mediump 13#endif 14#if !defined(highp) 15#define highp 16#endif 17#endif 18out highp vec4 fragColor;`,`#ifdef GL_ES 19precision highp float; 20#else 21#if !defined(lowp) 22#define lowp 23#endif 24#if !defined(mediump) 25#define mediump 26#endif 27#if !defined(highp) 28#define highp 29#endif 30#endif 31vec2 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 32);}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);
32return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c 33);} 34#ifdef TERRAIN3D 35uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth; 36#endif 37const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) { 38#ifdef TERRAIN3D 39highp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); 40#else 41return 1.0; 42#endif 43}float calculate_visibility(vec4 pos) { 44#ifdef TERRAIN3D 45vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; 46#else 47return 1.0; 48#endif 49}float ele(vec2 pos) { 50#ifdef TERRAIN3D 51vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; 52#else 53return 0.0; 54#endif 55}float get_elevation(vec2 pos) { 56#ifdef TERRAIN3D 57#ifdef GLOBE 58if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;} 59#endif 60vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; 61#else 62return 0.0; 63#endif 64}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:ii("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:ii("",`#define GLOBE_RADIUS 6371008.8 65uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos 66);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); 67if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len 68);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:ii(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; 69#ifdef OVERDRAW_INSPECTOR 70fragColor=vec4(1.0); 71#endif 72}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:ii(`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;
72uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity; 73#ifdef OVERDRAW_INSPECTOR 74fragColor=vec4(1.0); 75#endif 76}`,"uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:ii(`in vec3 v_data;in float v_visibility; 77#pragma mapbox: define highp vec4 color 78#pragma mapbox: define mediump float radius 79#pragma mapbox: define lowp float blur 80#pragma mapbox: define lowp float opacity 81#pragma mapbox: define highp vec4 stroke_color 82#pragma mapbox: define mediump float stroke_width 83#pragma mapbox: define lowp float stroke_opacity 84void main() { 85#pragma mapbox: initialize highp vec4 color 86#pragma mapbox: initialize mediump float radius 87#pragma mapbox: initialize lowp float blur 88#pragma mapbox: initialize lowp float opacity 89#pragma mapbox: initialize highp vec4 stroke_color 90#pragma mapbox: initialize mediump float stroke_width 91#pragma mapbox: initialize lowp float stroke_opacity 92vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;} 93#ifdef OVERDRAW_INSPECTOR 94fragColor=vec4(1.0); 95#endif 96}`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility; 97#pragma mapbox: define highp vec4 color 98#pragma mapbox: define mediump float radius 99#pragma mapbox: define lowp float blur 100#pragma mapbox: define lowp float opacity 101#pragma mapbox: define highp vec4 stroke_color 102#pragma mapbox: define mediump float stroke_width 103#pragma mapbox: define lowp float stroke_opacity 104void main(void) { 105#pragma mapbox: initialize highp vec4 color 106#pragma mapbox: initialize mediump float radius 107#pragma mapbox: initialize lowp float blur 108#pragma mapbox: initialize lowp float opacity 109#pragma mapbox: initialize highp vec4 stroke_color 110#pragma mapbox: initialize mediump float stroke_width 111#pragma mapbox: initialize lowp float stroke_opacity 112vec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) { 113#ifdef GLOBE 114vec3 center_vector=projectToSphere(circle_center); 115#endif 116float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else { 117#ifdef GLOBE 118vec4 projected_center=interpolateProjection(circle_center,center_vector,ele); 119#else 120vec4 projected_center=projectTileWithElevation(circle_center,ele); 121#endif 122corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);} 123#ifdef GLOBE 124vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele); 125#else 126gl_Position=projectTileWithElevation(corner_position,ele); 127#endif 128} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:ii(Ms,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:ii(`uniform highp float u_intensity;in vec2 v_extrude; 129#pragma mapbox: define highp float weight 130#define GAUSS_COEF 0.3989422804014327 131void main() { 132#pragma mapbox: initialize highp float weight 133float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0); 134#ifdef OVERDRAW_INSPECTOR 135fragColor=vec4(1.0); 136#endif 137}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude; 138#pragma mapbox: define highp float weight 139#pragma mapbox: define mediump float radius 140const highp float ZERO=1.0/255.0/16.0; 141#define GAUSS_COEF 0.3989422804014327 142void main(void) { 143#pragma mapbox: initialize highp float weight 144#pragma mapbox: initialize mediump float radius 145vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0); 146#ifdef GLOBE 147vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0); 148#else 149gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); 150#endif 151}`),heatmapTexture:ii(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity; 152#ifdef OVERDRAW_INSPECTOR 153fragColor=vec4(0.0); 154#endif 155}`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:ii("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:ii("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:ii("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:ii(Ms,`in vec2 a_pos;void main() { 156#ifdef GLOBE 157gl_Position=projectTileFor3D(a_pos,0.0); 158#else 159gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); 160#endif 161}`),fill:ii(`#pragma mapbox: define highp vec4 color 162#pragma mapbox: define lowp float opacity 163void main() { 164#pragma mapbox: initialize highp vec4 color 165#pragma mapbox: initialize lowp float opacity 166fragColor=color*opacity; 167#ifdef OVERDRAW_INSPECTOR 168fragColor=vec4(1.0); 169#endif 170}`,`uniform vec2 u_fill_translate;in vec2 a_pos; 171#pragma mapbox: define highp vec4 color 172#pragma mapbox: define lowp float opacity 173void main() { 174#pragma mapbox: initialize highp vec4 color 175#pragma mapbox: initialize lowp float opacity 176gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:ii(`in vec2 v_pos; 177#ifdef GLOBE 178in float v_depth; 179#endif 180#pragma mapbox: define highp vec4 outline_color 181#pragma mapbox: define lowp float opacity 182void main() { 183#pragma mapbox: initialize highp vec4 outline_color 184#pragma mapbox: initialize lowp float opacity 185float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity); 186#ifdef GLOBE 187if (v_depth > 1.0) {discard;} 188#endif 189#ifdef OVERDRAW_INSPECTOR 190fragColor=vec4(1.0); 191#endif 192}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos; 193#ifdef GLOBE 194out float v_depth; 195#endif 196#pragma mapbox: define highp vec4 outline_color 197#pragma mapbox: define lowp float opacity 198void main() { 199#pragma mapbox: initialize highp vec4 outline_color 200#pragma mapbox: initialize lowp float opacity 201gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; 202#ifdef GLOBE 203v_depth=gl_Position.z/gl_Position.w; 204#endif 205}`),fillOutlinePattern:ii(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos; 206#ifdef GLOBE 207in float v_depth; 208#endif 209#pragma mapbox: define lowp float opacity 210#pragma mapbox: define lowp vec4 pattern_from 211#pragma mapbox: define lowp vec4 pattern_to 212void main() { 213#pragma mapbox: initialize lowp float opacity 214#pragma mapbox: initialize mediump vec4 pattern_from 215#pragma mapbox: initialize mediump vec4 pattern_to 216vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity; 217#ifdef GLOBE 218if (v_depth > 1.0) {discard;} 219#endif 220#ifdef OVERDRAW_INSPECTOR 221fragColor=vec4(1.0); 222#endif 223}`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos; 224#ifdef GLOBE 225out float v_depth; 226#endif 227#pragma mapbox: define lowp float opacity 228#pragma mapbox: define lowp vec4 pattern_from 229#pragma mapbox: define lowp vec4 pattern_to 230#pragma mapbox: define lowp float pixel_ratio_from 231#pragma mapbox: define lowp float pixel_ratio_to 232void main() { 233#pragma mapbox: initialize lowp float opacity 234#pragma mapbox: initialize mediump vec4 pattern_from 235#pragma mapbox: initialize mediump vec4 pattern_to 236#pragma mapbox: initialize lowp float pixel_ratio_from 237#pragma mapbox: initialize lowp float pixel_ratio_to 238vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; 239#ifdef GLOBE 240v_depth=gl_Position.z/gl_Position.w; 241#endif 242}`),fillPattern:ii(`#ifdef GL_ES 243precision highp float; 244#endif 245uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; 246#pragma mapbox: define lowp float opacity 247#pragma mapbox: define lowp vec4 pattern_from 248#pragma mapbox: define lowp vec4 pattern_to 249void main() { 250#pragma mapbox: initialize lowp float opacity 251#pragma mapbox: initialize mediump vec4 pattern_from 252#pragma mapbox: initialize mediump vec4 pattern_to 253vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity; 254#ifdef OVERDRAW_INSPECTOR 255fragColor=vec4(1.0); 256#endif 257}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b; 258#pragma mapbox: define lowp float opacity 259#pragma mapbox: define lowp vec4 pattern_from 260#pragma mapbox: define lowp vec4 pattern_to 261#pragma mapbox: define lowp float pixel_ratio_from 262#pragma mapbox: define lowp float pixel_ratio_to 263void main() { 264#pragma mapbox: initialize lowp float opacity 265#pragma mapbox: initialize mediump vec4 pattern_from 266#pragma mapbox: initialize mediump vec4 pattern_to 267#pragma mapbox: initialize lowp float pixel_ratio_from 268#pragma mapbox: initialize lowp float pixel_ratio_to 269vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:ii(`in vec4 v_color;void main() {fragColor=v_color; 270#ifdef OVERDRAW_INSPECTOR 271fragColor=vec4(1.0); 272#endif 273}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed; 274#ifdef TERRAIN3D 275in vec2 a_centroid; 276#endif 277out vec4 v_color; 278#pragma mapbox: define highp float base 279#pragma mapbox: define highp float height 280#pragma mapbox: define highp vec4 color 281void main() { 282#pragma mapbox: initialize highp float base 283#pragma mapbox: initialize highp float height 284#pragma mapbox: initialize highp vec4 color 285vec3 normal=a_normal_ed.xyz; 286#ifdef TERRAIN3D 287float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0
287.0 ? 0.0 : 10.0); 288#else 289float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; 290#endif 291base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; 292#ifdef GLOBE 293vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); 294#else 295gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); 296#endif 297float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0); 298#ifdef GLOBE 299mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); 300#endif 301directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:ii(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting; 302#pragma mapbox: define lowp float base 303#pragma mapbox: define lowp float height 304#pragma mapbox: define lowp vec4 pattern_from 305#pragma mapbox: define lowp vec4 pattern_to 306#pragma mapbox: define lowp float pixel_ratio_from 307#pragma mapbox: define lowp float pixel_ratio_to 308void main() { 309#pragma mapbox: initialize lowp float base 310#pragma mapbox: initialize lowp float height 311#pragma mapbox: initialize mediump vec4 pattern_from 312#pragma mapbox: initialize mediump vec4 pattern_to 313#pragma mapbox: initialize lowp float pixel_ratio_from 314#pragma mapbox: initialize lowp float pixel_ratio_to 315vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting; 316#ifdef OVERDRAW_INSPECTOR 317fragColor=vec4(1.0); 318#endif 319}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed; 320#ifdef TERRAIN3D 321in vec2 a_centroid; 322#endif 323#ifdef GLOBE 324out vec3 v_sphere_pos; 325#endif 326out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting; 327#pragma mapbox: define lowp float base 328#pragma mapbox: define lowp float height 329#pragma mapbox: define lowp vec4 pattern_from 330#pragma mapbox: define lowp vec4 pattern_to 331#pragma mapbox: define lowp float pixel_ratio_from 332#pragma mapbox: define lowp float pixel_ratio_to 333void main() { 334#pragma mapbox: initialize lowp float base 335#pragma mapbox: initialize lowp float height 336#pragma mapbox: initialize mediump vec4 pattern_from 337#pragma mapbox: initialize mediump vec4 pattern_to 338#pragma mapbox: initialize lowp float pixel_ratio_from 339#pragma mapbox: initialize lowp float pixel_ratio_to 340vec2 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; 341#ifdef TERRAIN3D 342float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); 343#else 344float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; 345#endif 346base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; 347#ifdef GLOBE 348vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); 349#else 350gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); 351#endif 352vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 353? a_pos 354: vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:ii(`#ifdef GL_ES 355precision highp float; 356#endif 357uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/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));fragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); 358#ifdef OVERDRAW_INSPECTOR 359fragColor=vec4(1.0); 360#endif 361}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:ii(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; 362#define PI 3.141592653589793 363void main() {vec4 pixel=texture(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;
363float 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);fragColor=accent_color*(1.0-shade_color.a)+shade_color; 364#ifdef OVERDRAW_INSPECTOR 365fragColor=vec4(1.0); 366#endif 367}`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:ii(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; 368#ifdef GLOBE 369in float v_depth; 370#endif 371#pragma mapbox: define highp vec4 color 372#pragma mapbox: define lowp float blur 373#pragma mapbox: define lowp float opacity 374void main() { 375#pragma mapbox: initialize highp vec4 color 376#pragma mapbox: initialize lowp float blur 377#pragma mapbox: initialize lowp float opacity 378float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity); 379#ifdef GLOBE 380if (v_depth > 1.0) {discard;} 381#endif 382#ifdef OVERDRAW_INSPECTOR 383fragColor=vec4(1.0); 384#endif 385}`,` 386#define scale 0.015873016 387in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar; 388#ifdef GLOBE 389out float v_depth; 390#endif 391#pragma mapbox: define highp vec4 color 392#pragma mapbox: define lowp float blur 393#pragma mapbox: define lowp float opacity 394#pragma mapbox: define mediump float gapwidth 395#pragma mapbox: define lowp float offset 396#pragma mapbox: define mediump float width 397void main() { 398#pragma mapbox: initialize highp vec4 color 399#pragma mapbox: initialize lowp float blur 400#pragma mapbox: initialize lowp float opacity 401#pragma mapbox: initialize mediump float gapwidth 402#pragma mapbox: initialize lowp float offset 403#pragma mapbox: initialize mediump float width 404float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; 405#ifdef GLOBE 406v_depth=gl_Position.z/gl_Position.w; 407#endif 408#ifdef TERRAIN3D 409v_gamma_scale=1.0; 410#else 411float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; 412#endif 413v_width2=vec2(outset,inset);}`),lineGradient:ii(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv; 414#ifdef GLOBE 415in float v_depth; 416#endif 417#pragma mapbox: define lowp float blur 418#pragma mapbox: define lowp float opacity 419void main() { 420#pragma mapbox: initialize lowp float blur 421#pragma mapbox: initialize lowp float opacity 422float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity); 423#ifdef GLOBE 424if (v_depth > 1.0) {discard;} 425#endif 426#ifdef OVERDRAW_INSPECTOR 427fragColor=vec4(1.0); 428#endif 429}`,` 430#define scale 0.015873016 431in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv; 432#ifdef GLOBE 433out float v_depth; 434#endif 435#pragma mapbox: define lowp float blur 436#pragma mapbox: define lowp float opacity 437#pragma mapbox: define mediump float gapwidth 438#pragma mapbox: define lowp float offset 439#pragma mapbox: define mediump float width 440void main() { 441#pragma mapbox: initialize lowp float blur 442#pragma mapbox: initialize lowp float opacity 443#pragma mapbox: initialize mediump float gapwidth 444#pragma mapbox: initialize lowp float offset 445#pragma mapbox: initialize mediump float width 446float 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);
446float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; 447#ifdef GLOBE 448v_depth=gl_Position.z/gl_Position.w; 449#endif 450#ifdef TERRAIN3D 451v_gamma_scale=1.0; 452#else 453float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; 454#endif 455v_width2=vec2(outset,inset);}`),linePattern:ii(`#ifdef GL_ES 456precision highp float; 457#endif 458uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width; 459#ifdef GLOBE 460in float v_depth; 461#endif 462#pragma mapbox: define lowp vec4 pattern_from 463#pragma mapbox: define lowp vec4 pattern_to 464#pragma mapbox: define lowp float pixel_ratio_from 465#pragma mapbox: define lowp float pixel_ratio_to 466#pragma mapbox: define lowp float blur 467#pragma mapbox: define lowp float opacity 468void main() { 469#pragma mapbox: initialize mediump vec4 pattern_from 470#pragma mapbox: initialize mediump vec4 pattern_to 471#pragma mapbox: initialize lowp float pixel_ratio_from 472#pragma mapbox: initialize lowp float pixel_ratio_to 473#pragma mapbox: initialize lowp float blur 474#pragma mapbox: initialize lowp float opacity 475vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity; 476#ifdef GLOBE 477if (v_depth > 1.0) {discard;} 478#endif 479#ifdef OVERDRAW_INSPECTOR 480fragColor=vec4(1.0); 481#endif 482}`,` 483#define scale 0.015873016 484#define LINE_DISTANCE_SCALE 2.0 485in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width; 486#ifdef GLOBE 487out float v_depth; 488#endif 489#pragma mapbox: define lowp float blur 490#pragma mapbox: define lowp float opacity 491#pragma mapbox: define lowp float offset 492#pragma mapbox: define mediump float gapwidth 493#pragma mapbox: define mediump float width 494#pragma mapbox: define lowp float floorwidth 495#pragma mapbox: define lowp vec4 pattern_from 496#pragma mapbox: define lowp vec4 pattern_to 497#pragma mapbox: define lowp float pixel_ratio_from 498#pragma mapbox: define lowp float pixel_ratio_to 499void main() { 500#pragma mapbox: initialize lowp float blur 501#pragma mapbox: initialize lowp float opacity 502#pragma mapbox: initialize lowp float offset 503#pragma mapbox: initialize mediump float gapwidth 504#pragma mapbox: initialize mediump float width 505#pragma mapbox: initialize lowp float floorwidth 506#pragma mapbox: initialize mediump vec4 pattern_from 507#pragma mapbox: initialize mediump vec4 pattern_to 508#pragma mapbox: initialize lowp float pixel_ratio_from 509#pragma mapbox: initialize lowp float pixel_ratio_to 510float 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);
510float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; 511#ifdef GLOBE 512v_depth=gl_Position.z/gl_Position.w; 513#endif 514#ifdef TERRAIN3D 515v_gamma_scale=1.0; 516#else 517float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; 518#endif 519v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:ii(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale; 520#ifdef GLOBE 521in float v_depth; 522#endif 523#pragma mapbox: define highp vec4 color 524#pragma mapbox: define lowp float blur 525#pragma mapbox: define lowp float opacity 526#pragma mapbox: define mediump float width 527#pragma mapbox: define lowp float floorwidth 528void main() { 529#pragma mapbox: initialize highp vec4 color 530#pragma mapbox: initialize lowp float blur 531#pragma mapbox: initialize lowp float opacity 532#pragma mapbox: initialize mediump float width 533#pragma mapbox: initialize lowp float floorwidth 534float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); 535#ifdef GLOBE 536if (v_depth > 1.0) {discard;} 537#endif 538#ifdef OVERDRAW_INSPECTOR 539fragColor=vec4(1.0); 540#endif 541}`,` 542#define scale 0.015873016 543#define LINE_DISTANCE_SCALE 2.0 544in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; 545#ifdef GLOBE 546out float v_depth; 547#endif 548#pragma mapbox: define highp vec4 color 549#pragma mapbox: define lowp float blur 550#pragma mapbox: define lowp float opacity 551#pragma mapbox: define mediump float gapwidth 552#pragma mapbox: define lowp float offset 553#pragma mapbox: define mediump float width 554#pragma mapbox: define lowp float floorwidth 555void main() { 556#pragma mapbox: initialize highp vec4 color 557#pragma mapbox: initialize lowp float blur 558#pragma mapbox: initialize lowp float opacity 559#pragma mapbox: initialize mediump float gapwidth 560#pragma mapbox: initialize lowp float offset 561#pragma mapbox: initialize mediump float width 562#pragma mapbox: initialize lowp float floorwidth 563float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; 564#ifdef GLOBE 565v_depth=gl_Position.z/gl_Position.w; 566#endif 567#ifdef TERRAIN3D 568v_gamma_scale=1.0; 569#else 570float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; 571#endif 572v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:ii(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0);vec4 color1=texture(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); 573#ifdef OVERDRAW_INSPECTOR 574fragColor=vec4(1.0); 575#endif 576}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5; 577#ifdef GLOBE 578if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;} 579#endif 580v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:ii(`uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity; 581#pragma mapbox: define lowp float opacity 582void main() { 583#pragma mapbox: initialize lowp float opacity 584lowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha; 585#ifdef OVERDRAW_INSPECTOR 586fragColor=vec4(1.0); 587#endif 588}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_fade_opacity; 589#pragma mapbox: define lowp float opacity 590void main() { 591#pragma mapbox: initialize lowp float opacity 592vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? 593camera_to_anchor_distance/u_camera_to_center_distance : 594u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; 595#ifdef GLOBE 596if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} 597#endif 598vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:ii(`#define SDF_PX 8.0 599uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1; 600#pragma mapbox: define highp vec4 fill_color 601#pragma mapbox: define highp vec4 halo_color 602#pragma mapbox: define lowp float opacity 603#pragma mapbox: define lowp float halo_width 604#pragma mapbox: define lowp float halo_blur 605void main() { 606#pragma mapbox: initialize highp vec4 fill_color 607#pragma mapbox: initialize highp vec4 halo_color 608#pragma mapbox: initialize lowp float opacity 609#pragma mapbox: initialize lowp float halo_width 610#pragma mapbox: initialize lowp float halo_blur 611float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity); 612#ifdef OVERDRAW_INSPECTOR 613fragColor=vec4(1.0); 614#endif 615}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1; 616#pragma mapbox: define highp vec4 fill_color 617#pragma mapbox: define highp vec4 halo_color 618#pragma mapbox: define lowp float opacity 619#pragma mapbox: define lowp float halo_width 620#pragma mapbox: define lowp float halo_blur 621void main() { 622#pragma mapbox: initialize highp vec4 fill_color 623#pragma mapbox: initialize highp vec4 halo_color 624#pragma mapbox: initialize lowp float opacity 625#pragma mapbox: initialize lowp float halo_width 626#pragma mapbox: initialize lowp float halo_blur 627vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? 628camera_to_anchor_distance/u_camera_to_center_distance : 629u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; 630#ifdef GLOBE 631if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} 632#endif 633vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:ii(`#define SDF_PX 8.0 634#define SDF 1.0 635#define ICON 0.0 636uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1; 637#pragma mapbox: define highp vec4 fill_color 638#pragma mapbox: define highp vec4 halo_color 639#pragma mapbox: define lowp float opacity 640#pragma mapbox: define lowp float halo_width 641#pragma mapbox: define lowp float halo_blur 642void main() { 643#pragma mapbox: initialize highp vec4 fill_color 644#pragma mapbox: initialize highp vec4 halo_color 645#pragma mapbox: initialize lowp float opacity 646#pragma mapbox: initialize lowp float halo_width 647#pragma mapbox: initialize lowp float halo_blur 648float fad
648e_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha; 649#ifdef OVERDRAW_INSPECTOR 650fragColor=vec4(1.0); 651#endif 652return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity); 653#ifdef OVERDRAW_INSPECTOR 654fragColor=vec4(1.0); 655#endif 656}`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1; 657#pragma mapbox: define highp vec4 fill_color 658#pragma mapbox: define highp vec4 halo_color 659#pragma mapbox: define lowp float opacity 660#pragma mapbox: define lowp float halo_width 661#pragma mapbox: define lowp float halo_blur 662void main() { 663#pragma mapbox: initialize highp vec4 fill_color 664#pragma mapbox: initialize highp vec4 halo_color 665#pragma mapbox: initialize lowp float opacity 666#pragma mapbox: initialize lowp float halo_width 667#pragma mapbox: initialize lowp float halo_blur 668vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? 669camera_to_anchor_distance/u_camera_to_center_distance : 670u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; 671#ifdef GLOBE 672if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} 673#endif 674vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:ii("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);
674float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:ii("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:ii("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:ii("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:ii(`in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758 675);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:ii("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};
675function ii(h,e){let i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,l=e.match(/in ([\w]+) ([\w]+)/g),c=h.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),d=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),v=d?d.concat(c):c,w={};return{fragmentSource:h=h.replace(i,(P,C,L,N,R)=>(w[R]=!0,C==="define"?` 676#ifndef HAS_UNIFORM_u_${R} 677in ${L} ${N} ${R}; 678#else 679uniform ${L} ${N} u_${R}; 680#endif 681`:` 682#ifdef HAS_UNIFORM_u_${R} 683 ${L} ${N} ${R} = u_${R}; 684#endif 685`)),vertexSource:e=e.replace(i,(P,C,L,N,R)=>{let K=N==="float"?"vec2":"vec4",ee=R.match(/color/)?"color":K;return w[R]?C==="define"?` 686#ifndef HAS_UNIFORM_u_${R} 687uniform lowp float u_${R}_t; 688in ${L} ${K} a_${R}; 689out ${L} ${N} ${R}; 690#else 691uniform ${L} ${N} u_${R}; 692#endif 693`:ee==="vec4"?` 694#ifndef HAS_UNIFORM_u_${R} 695 ${R} = a_${R}; 696#else 697 ${L} ${N} ${R} = u_${R}; 698#endif 699`:` 700#ifndef HAS_UNIFORM_u_${R} 701 ${R} = unpack_mix_${ee}(a_${R}, u_${R}_t); 702#else 703 ${L} ${N} ${R} = u_${R}; 704#endif 705`:C==="define"?` 706#ifndef HAS_UNIFORM_u_${R} 707uniform lowp float u_${R}_t; 708in ${L} ${K} a_${R}; 709#else 710uniform ${L} ${N} u_${R}; 711#endif 712`:ee==="vec4"?` 713#ifndef HAS_UNIFORM_u_${R} 714 ${L} ${N} ${R} = a_${R}; 715#else 716 ${L} ${N} ${R} = u_${R}; 717#endif 718`:` 719#ifndef HAS_UNIFORM_u_${R} 720 ${L} ${N} ${R} = unpack_mix_${ee}(a_${R}, u_${R}_t); 721#else 722 ${L} ${N} ${R} = u_${R}; 723#endif 724`}),staticAttributes:l,staticUniforms:v}}class us{constructor(e,i,l){this.vertexBuffer=e,this.indexBuffer=i,this.segments=l}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var hs=a.aD([{name:"a_pos",type:"Int16",components:2}]);let Yn="#define PROJECTION_MERCATOR",jr="mercator";class gi{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return jr}get shaderDefine(){return Yn}get shaderPreludeCode(){return yn.projectionMercator}get vertexShaderPreludeCode(){return yn.projectionMercator.vertexSource}get subdivisionGranularity(){return a.aE.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(e){}getMeshFromTileID(e,i,l,c,d){if(this._cachedMesh)return this._cachedMesh;let v=new a.aF;v.emplaceBack(0,0),v.emplaceBack(a.Z,0),v.emplaceBack(0,a.Z),v.emplaceBack(a.Z,a.Z);let w=e.createVertexBuffer(v,hs.members),P=a.aG.simpleSegment(0,0,4,2),C=new a.aH;C.emplaceBack(1,0,2),C.emplaceBack(1,2,3);let L=e.createIndexBuffer(C);return this._cachedMesh=new us(w,L,P),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(e){}}function $r(h,e){let i=a.ae(e.lat,-85.051129,a.aJ);return new a.P(a.U(e.lng)*h,a.S(i)*h)}function va(h,e){return new a.$(e.x/h,e.y/h).toLngLat()}function Ys(h){return h.cameraToCenterDistance*Math.min(.85*Math.tan(a.ad(90-h.pitch)),Math.tan(a.ad(89.25-h.pitch)))}function ar(h,e){let i=h.canonical,l=e/a.aI(i.z),c=i.x+Math.pow(2,i.z)*h.wrap,d=a.at(new Float64Array(16));return a.L(d,d,[c*l,i.y*l,0]),a.M(d,d,[l/a.Z,l/a.Z,1]),d}function Qi(h,e,i,l,c){let d=a.$.fromLngLat(h,e),v=c*a.aK(1,h.lat),w=v*Math.cos(a.ad(i)),P=Math.sqrt(v*v-w*w),C=P*Math.sin(a.ad(-l)),L=P*Math.cos(a.ad(-l));return new a.$(d.x+C,d.y+L,d.z+w)}class Ri{constructor(e=0,i=0,l=0,c=0){if(isNaN(e)||e<0||isNaN(i)||i<0||isNaN(l)||l<0||isNaN(c)||c<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=i,this.left=l,this.right=c}interpolate(e,i,l){return i.top!=null&&e.top!=null&&(this.top=a.B.number(e.top,i.top,l)),i.bottom!=null&&e.bottom!=null&&(this.bottom=a.B.number(e.bottom,i.bottom,l)),i.left!=null&&e.left!=null&&(this.left=a.B.number(e.left,i.left,l)),i.right!=null&&e.right!=null&&(this.right=a.B.number(e.right,i.right,l)),this}getCenter(e,i){let l=a.ae((this.left+e-this.right)/2,0,e),c=a.ae((this.top+i-this.bottom)/2,0,i);return new a.P(l,c)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new Ri(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function Ua(h,e){if(!h.renderWorldCopies||h.lngRange)return;let i=e.lng-h.center.lng;e.lng+=i>180?-360:i<-180?360:0}function br(h){return Math.max(0,Math.floor(h))}class Kr{constructor(e,i,l,c,d,v){this._callbacks=e,this._tileSize=512,this._renderWorldCopies=v===void 0||!!v,this._minZoom=i||0,this._maxZoom=l||22,this._minPitch=c??0,this._maxPitch=d??60,this.setMaxBounds(),this._width=0,this._height=0,this._center=new a.Q(0,0),this._elevation=0,this._zoom=0,this._tileZoom=br(this._zoom),this._scale=a.aI(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new Ri,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,i,l){this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=br(this._zoom),this._scale=a.aI(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new Ri(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=!l&&e.autoCalculateNearFarZ,i&&this._constrain(),this._calcMatrices()}
724get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(e){this._minZoom!==e&&(this._minZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(e){this._minPitch!==e&&(this._minPitch=e,this.setPitch(Math.max(this.pitch,e)))}get maxPitch(){return this._maxPitch}setMaxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.setPitch(Math.min(this.pitch,e)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){e===void 0?e=!0:e===null&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new a.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){let i=a.aL(e,-180,180)*Math.PI/180;var l,c,d,v,w,P,C,L,N;this._bearingInRadians!==i&&(this._unmodified=!1,this._bearingInRadians=i,this._calcMatrices(),this._rotationMatrix=F(),l=this._rotationMatrix,d=-this._bearingInRadians,v=(c=this._rotationMatrix)[0],w=c[1],P=c[2],C=c[3],L=Math.sin(d),N=Math.cos(d),l[0]=v*N+P*L,l[1]=w*N+C*L,l[2]=v*-L+P*N,l[3]=w*-L+C*N)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){let i=a.ae(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==i&&(this._unmodified=!1,this._pitchInRadians=i,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){let i=e/180*Math.PI;this._rollInRadians!==i&&(this._unmodified=!1,this._rollInRadians=i,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return a.aM(this._fovInRadians)}setFov(e){e=a.ae(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=a.ad(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){let i=this.getConstrained(this._center,e).zoom;this._zoom!==i&&(this._unmodified=!1,this._zoom=i,this._tileZoom=Math.max(0,Math.floor(i)),this._scale=a.aI(i),this._constrain(),this._calcMatrices())}get center(){return this._center}setCenter(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(e,i){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=i,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,i,l){this._unmodified=!1,this._edgeInsets.interpolate(e,i,l),this._constrain(),this._calcMatrices()}resize(e,i,l=!0){this._width=e,this._height=i,l&&this._constrain(),this._calcMatrices()}getMaxBounds(){return this._latRange&&this._latRange.length===2&&this._lngRange&&this._lngRange.length===2?new wi([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]]):null}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this._lngRange=null,this._latRange=[-85.051129,a.aJ])}getConstrained(e,i){return this._callbacks.getConstrained(e,i)}getCameraQueryGeometry(e,i){if(i.length===1)return[i[0],e];{let l=e.x,c=e.y,d=e.x,v=e.y;for(let w of i)l=Math.min(l,w.x),c=Math.min(c,w.y),d=Math.max(d,w.x),v=Math.max(v,w.y);return[new a.P(l,c),new a.P(d,c),new a.P(d,v),new a.P(l,v),new a.P(l,c)]}}_constrain(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let e=this._unmodified,{center:i,zoom:l}=this.getConstrained(this.center,this.zoom);this.setCenter(i),this.setZoom(l),this._unmodified=e,this._constraining=!1}
724_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=a.at(new Float64Array(16));a.M(e,e,[this._width/2,-this._height/2,1]),a.L(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=a.at(new Float64Array(16)),a.M(e,e,[1,-1,1]),a.L(e,e,[-1,-1,0]),a.M(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,i,l,c){let d=l!==void 0?l:this.bearing,v=c=c!==void 0?c:this.pitch,w=a.$.fromLngLat(e,i),P=-Math.cos(a.ad(v)),C=Math.sin(a.ad(v)),L=C*Math.sin(a.ad(d)),N=-C*Math.cos(a.ad(d)),R=this.elevation,K=i-R,ee;P*K>=0||Math.abs(P)<.1?(ee=1e4,R=i+ee*P):ee=-K/P;let he,ue,de=a.aN(1,w.y),me=0;do{if(me+=1,me>10)break;ue=ee/de,he=new a.$(w.x+L*ue,w.y+N*ue),de=1/he.meterInMercatorCoordinateUnits()}while(Math.abs(ee-ue*de)>1e-12);return{center:he.toLngLat(),elevation:R,zoom:a.ab(this.height/2/Math.tan(this.fovInRadians/2)/ue/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e==0)return;let i=a.aK(1,this.center.lat)*this.worldSize,l=this.cameraToCenterDistance/i,c=a.$.fromLngLat(this.center,this.elevation),d=Qi(this.center,this.elevation,this.pitch,this.bearing,l);this._elevation=e;let v=this.calculateCenterFromCameraLngLatAlt(d.toLngLat(),a.aN(d.z,c.y),this.bearing,this.pitch);this._elevation=v.elevation,this._center=v.center,this.setZoom(v.zoom)}getCameraPoint(){let e=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.P(e*Math.sin(this.rollInRadians),e*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let e=a.aK(1,this.center.lat)*this.worldSize;return Qi(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/e).toLngLat()}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];let i=e.canonical.z>=0?1<<e.canonical.z:Math.pow(2,e.canonical.z);return[e.canonical.x/i,e.canonical.y/i,1/i/a.Z,1/i/a.Z]}}class or{constructor(e,i){this.min=e,this.max=i,this.center=a.aO([],a.aP([],this.min,this.max),.5)}quadrant(e){let i=[e%2==0,e<2],l=a.aQ(this.min),c=a.aQ(this.max);for(let d=0;d<i.length;d++)l[d]=i[d]?this.min[d]:this.center[d],c[d]=i[d]?this.center[d]:this.max[d];return c[2]=this.max[2],new or(l,c)}distanceX(e){return Math.max(Math.min(this.max[0],e[0]),this.min[0])-e[0]}distanceY(e){return Math.max(Math.min(this.max[1],e[1]),this.min[1])-e[1]}intersectsFrustum(e){let i=!0;for(let l=0;l<e.planes.length;l++){let c=this.intersectsPlane(e.planes[l]);if(c===0)return 0;c===1&&(i=!1)}return i?2:e.aabb.min[0]>this.max[0]||e.aabb.min[1]>this.max[1]||e.aabb.min[2]>this.max[2]||e.aabb.max[0]<this.min[0]||e.aabb.max[1]<this.min[1]||e.aabb.max[2]<this.min[2]?0:1}intersectsPlane(e){let i=e[3],l=e[3];for(let c=0;c<3;c++)e[c]>0?(i+=e[c]*this.min[c],l+=e[c]*this.max[c]):(l+=e[c]*this.min[c],i+=e[c]*this.max[c]);return i>=0?2:l<0?0:1}}class So{distanceToTile2d(e,i,l,c){let d=c.distanceX([e,i]),v=c.distanceY([e,i]);return Math.hypot(d,v)}getWrap(e,i,l){return l}getTileAABB(e,i,l,c){var d,v;let w=l,P=l;if(c.terrain){let L=new a.Y(e.z,i,e.z,e.x,e.y),N=c.terrain.getMinMaxElevation(L);w=(d=N.minElevation)!==null&&d!==void 0?d:l,P=(v=N.maxElevation)!==null&&v!==void 0?v:l}let C=1<<e.z;return new or([i+e.x/C,e.y/C,w],[i+(e.x+1)/C,(e.y+1)/C,P])}allowVariableZoom(e,i){let l=e.fov*(Math.abs(Math.cos(e.rollInRadians))*e.height+Math.abs(Math.sin(e.rollInRadians))*e.width)/e.height,c=a.ae(78.5-l/2,0,60);return!!i.terrain||e.pitch>c}allowWorldCopies(){return!0}recalculateCache(){}}class Kn{constructor(e,i,l){this.points=e,this.planes=i,this.aabb=l}static fromInvProjectionMatrix(e,i=1,l=0){let c=Math.pow(2,l),d=[[-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(C=>{let L=1/(C=a.ap([],C,e))[3]/i*c;return a.aR(C,C,[L,L,1/C[3],L])}),v=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(C=>{let L=a.aS([],d[C[0]],d[C[1]]),N=a.aS([],d[C[2]],d[C[1]]),R=a.aT([],a.aU([],L,N)),K=-a.aV(R,d[C[1]]);return R.concat(K)}),w=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],P=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let C of d)for(let L=0;L<3;L++)w[L]=Math.min(w[L],C[L]),P[L]=Math.max(P[L],C[L]);return new Kn(d,v,new or(w,P))}}
724class Gi{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,i,l){return this._helper.interpolatePadding(e,i,l)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,i,l=!0){this._helper.resize(e,i,l)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,i){this._helper.overrideNearFarZ(e,i)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e,i){}constructor(e,i,l,c,d){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this._helper=new Kr({calcMatrices:()=>{this._calcMatrices()},getConstrained:(v,w)=>this.getConstrained(v,w)},e,i,l,c,d),this._coveringTilesDetailsProvider=new So}clone(){let e=new Gi;return e.apply(this),e}apply(e,i,l){this._helper.apply(e,i,l)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(e){let i=[new a.aW(0,e)];if(this._helper._renderWorldCopies){let l=this.screenPointToMercatorCoordinate(new a.P(0,0)),c=this.screenPointToMercatorCoordinate(new a.P(this._helper._width,0)),d=this.screenPointToMercatorCoordinate(new a.P(this._helper._width,this._helper._height)),v=this.screenPointToMercatorCoordinate(new a.P(0,this._helper._height)),w=Math.floor(Math.min(l.x,c.x,d.x,v.x)),P=Math.floor(Math.max(l.x,c.x,d.x,v.x)),C=1;for(let L=w-C;L<=P+C;L++)L!==0&&i.push(new a.aW(L,e))}return i}getCameraFrustum(){return Kn.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){let i=this.screenPointToLocation(this.centerPoint,e),l=e?e.getElevationForLngLatZoom(i,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(l)}setLocationAtPoint(e,i){let l=a.aK(this.elevation,this.center.lat),c=this.screenPointToMercatorCoordinateAtZ(i,l),d=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,l),v=a.$.fromLngLat(e),w=new a.$(v.x-(c.x-d.x),v.y-(c.y-d.y));this.setCenter(w?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(e,i){return i?this.coordinatePoint(a.$.fromLngLat(e),i.getElevationForLngLatZoom(e,this._helper._tileZoom),this._pixelMatrix3D):this.coordinatePoint(a.$.fromLngLat(e))}screenPointToLocation(e,i){var l;return(l=this.screenPointToMercatorCoordinate(e,i))===null||l===void 0?void 0:l.toLngLat()}screenPointToMercatorCoordinate(e,i){if(i){let l=i.pointCoordinate(e);if(l!=null)return l}return this.screenPointToMercatorCoordinateAtZ(e)}screenPointToMercatorCoordinateAtZ(e,i){let l=i||0,c=[e.x,e.y,0,1],d=[e.x,e.y,1,1];a.ap(c,c,this._pixelMatrixInverse),a.ap(d,d,this._pixelMatrixInverse);let v=c[3],w=d[3],P=c[1]/v,C=d[1]/w,L=c[2]/v,N=d[2]/w,R=L===N?0:(l-L)/(N-L);return new a.$(a.B.number(c[0]/v,d[0]/w,R)/this.worldSize,a.B.number(P,C,R)/this.worldSize,l)}coordinatePoint(e,i=0,l=this._pixelMatrix){let c=[e.x*this.worldSize,e.y*this.worldSize,i,1];return a.ap(c,c,l),new a.P(c[0]/c[3],c[1]/c[3])}getBounds(){let e=Math.max(0,this._helper._height/2-Ys(this));return new wi().extend(this.screenPointToLocation(new a.P(0,e))).extend(this.screenPointToLocation(new a.P(this._helper._width,e))).extend(this.screenPointToLocation(new a.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new a.P(0,this._helper._height)))}
724isPointOnMapSurface(e,i){return i?i.pointCoordinate(e)!=null:e.y>this.height/2-Ys(this)}calculatePosMatrix(e,i=!1,l){var c;let d=(c=e.key)!==null&&c!==void 0?c:a.aX(e.wrap,e.canonical.z,e.canonical.z,e.canonical.x,e.canonical.y),v=i?this._alignedPosMatrixCache:this._posMatrixCache;if(v.has(d)){let C=v.get(d);return l?C.f32:C.f64}let w=ar(e,this.worldSize);a.N(w,i?this._alignedProjMatrix:this._viewProjMatrix,w);let P={f64:w,f32:new Float32Array(w)};return v.set(d,P),l?P.f32:P.f64}calculateFogMatrix(e){let i=e.key,l=this._fogMatrixCacheF32;if(l.has(i))return l.get(i);let c=ar(e,this.worldSize);return a.N(c,this._fogMatrix,c),l.set(i,new Float32Array(c)),l.get(i)}getConstrained(e,i){i=a.ae(+i,this.minZoom,this.maxZoom);let l={center:new a.Q(e.lng,e.lat),zoom:i},c=this._helper._lngRange;this._helper._renderWorldCopies||c!==null||(c=[-179.9999999999,180-1e-10]);let d=this.tileSize*a.aI(l.zoom),v=0,w=d,P=0,C=d,L=0,N=0,{x:R,y:K}=this.size;if(this._helper._latRange){let xe=this._helper._latRange;v=a.S(xe[1])*d,w=a.S(xe[0])*d,w-v<K&&(L=K/(w-v))}c&&(P=a.aL(a.U(c[0])*d,0,d),C=a.aL(a.U(c[1])*d,0,d),C<P&&(C+=d),C-P<R&&(N=R/(C-P)));let{x:ee,y:he}=$r(d,e),ue,de,me=Math.max(N||0,L||0);if(me){let xe=new a.P(N?(C+P)/2:ee,L?(w+v)/2:he);return l.center=va(d,xe).wrap(),l.zoom+=a.ab(me),l}if(this._helper._latRange){let xe=K/2;he-xe<v&&(de=v+xe),he+xe>w&&(de=w-xe)}if(c){let xe=(P+C)/2,Se=ee;
vendor: 17,931 bytes, line 724
724this._helper._renderWorldCopies&&(Se=a.aL(ee,xe-d/2,xe+d/2));let Pe=R/2;Se-Pe<P&&(ue=P+Pe),Se+Pe>C&&(ue=C-Pe)}if(ue!==void 0||de!==void 0){let xe=new a.P(ue??ee,de??he);l.center=va(d,xe).wrap()}return l}calculateCenterFromCameraLngLatAlt(e,i,l,c){return this._helper.calculateCenterFromCameraLngLatAlt(e,i,l,c)}_calculateNearFarZIfNeeded(e,i,l){if(!this._helper.autoCalculateNearFarZ)return;let c=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),d=e-c*this._helper._pixelPerMeter/Math.cos(i),v=c<0?d:e,w=Math.PI/2+this.pitchInRadians,P=a.ad(this.fov)*(Math.abs(Math.cos(a.ad(this.roll)))*this.height+Math.abs(Math.sin(a.ad(this.roll)))*this.width)/this.height*(.5+l.y/this.height),C=Math.sin(P)*v/Math.sin(a.ae(Math.PI-w-P,.01,Math.PI-.01)),L=Ys(this),N=Math.atan(L/this._helper.cameraToCenterDistance),R=a.ad(.75),K=N>R?2*N*(.5+l.y/(2*L)):R,ee=Math.sin(K)*v/Math.sin(a.ae(Math.PI-w-K,.01,Math.PI-.01)),he=Math.min(C,ee);this._helper._farZ=1.01*(Math.cos(Math.PI/2-i)*he+v),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let e=this.centerOffset,i=$r(this.worldSize,this.center),l=i.x,c=i.y;this._helper._pixelPerMeter=a.aK(1,this.center.lat)*this.worldSize;let d=a.ad(Math.min(this.pitch,89.25)),v=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(d)),w;this._calculateNearFarZIfNeeded(v,d,e),w=new Float64Array(16),a.aY(w,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),a.aj(this._invProjMatrix,w),w[8]=2*-e.x/this._helper._width,w[9]=2*e.y/this._helper._height,this._projectionMatrix=a.aZ(w),a.M(w,w,[1,-1,1]),a.L(w,w,[0,0,-this._helper.cameraToCenterDistance]),a.a_(w,w,-this.rollInRadians),a.a$(w,w,this.pitchInRadians),a.a_(w,w,-this.bearingInRadians),a.L(w,w,[-l,-c,0]),this._mercatorMatrix=a.M([],w,[this.worldSize,this.worldSize,this.worldSize]),a.M(w,w,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=a.N(new Float64Array(16),this.clipSpaceToPixelsMatrix,w),a.L(w,w,[0,0,-this.elevation]),this._viewProjMatrix=w,this._invViewProjMatrix=a.aj([],w);let P=[0,0,-1,1];a.ap(P,P,this._invViewProjMatrix),this._cameraPosition=[P[0]/P[3],P[1]/P[3],P[2]/P[3]],this._fogMatrix=new Float64Array(16),a.aY(this._fogMatrix,this.fovInRadians,this.width/this.height,v,this._helper._farZ),this._fogMatrix[8]=2*-e.x/this.width,this._fogMatrix[9]=2*e.y/this.height,a.M(this._fogMatrix,this._fogMatrix,[1,-1,1]),a.L(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),a.a_(this._fogMatrix,this._fogMatrix,-this.rollInRadians),a.a$(this._fogMatrix,this._fogMatrix,this.pitchInRadians),a.a_(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),a.L(this._fogMatrix,this._fogMatrix,[-l,-c,0]),a.M(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),a.L(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=a.N(new Float64Array(16),this.clipSpaceToPixelsMatrix,w);let C=this._helper._width%2/2,L=this._helper._height%2/2,N=Math.cos(this.bearingInRadians),R=Math.sin(-this.bearingInRadians),K=l-Math.round(l)+N*C+R*L,ee=c-Math.round(c)+N*L+R*C,he=new Float64Array(w);if(a.L(he,he,[K>.5?K-1:K,ee>.5?ee-1:ee,0]),this._alignedProjMatrix=he,w=a.aj(new Float64Array(16),this._pixelMatrix),!w)throw new Error("failed to invert matrix");this._pixelMatrixInverse=w,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let e=this.screenPointToMercatorCoordinate(new a.P(0,0)),i=[e.x*this.worldSize,e.y*this.worldSize,0,1];return a.ap(i,i,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let e=a.aK(1,this.center.lat)*this.worldSize;return Qi(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/e).toLngLat()}lngLatToCameraDepth(e,i){let l=a.$.fromLngLat(e),c=[l.x*this.worldSize,l.y*this.worldSize,i,1];return a.ap(c,c,this._viewProjMatrix),c[2]/c[3]}getProjectionData(e){let{overscaledTileID:i,aligned:l,applyTerrainMatrix:c}=e,d=this._helper.getMercatorTileCoordinates(i),v=i?this.calculatePosMatrix(i,l,!0):null,w;return w=i&&i.terrainRttPosMatrix32f&&c?i.terrainRttPosMatrix32f:v||a.b0(),{mainMatrix:w,tileMercatorCoords:d,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:w}}isLocationOccluded(e){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(e,i,l){return 1}transformLightDirection(e){return a.aQ(e)}getRayDirectionFromPixel(e){throw new Error("Not implemented.")}projectTileCoordinates(e,i,l,c){let d=this.calculatePosMatrix(l),v;c?(v=[e,i,c(e,i),1],a.ap(v,v,d)):(v=[e,i,0,1],fr(v,v,d));let w=v[3];return{point:new a.P(v[0]/w,v[1]/w),signedDistanceFromCamera:w,isOccluded:!1}}populateCache(e){for(let i of e)this.calculatePosMatrix(i)}getMatrixForModel(e,i){let l=a.$.fromLngLat(e,i),c=l.meterInMercatorCoordinateUnits(),d=a.b1();return a.L(d,d,[l.x,l.y,l.z]),a.a_(d,d,Math.PI),a.a$(d,d,Math.PI/2),a.M(d,d,[-c,c,c]),d}getProjectionDataForCustomLayer(e=!0){let i=new a.Y(0,0,0,0,0),l=this.getProjectionData({overscaledTileID:i,applyGlobeMatrix:e}),c=ar(i,this.worldSize);a.N(c,this._viewProjMatrix,c),l.tileMercatorCoords=[0,0,1,1];let d=[a.Z,a.Z,this.worldSize/this._helper.pixelsPerMeter],v=a.b2();return a.M(v,c,d),l.fallbackMatrix=v,l.mainMatrix=v,l}getFastPathSimpleProjectionMatrix(e){return this.calculatePosMatrix(e)}}function Cs(){a.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function ds(h){if(h.useSlerp)if(h.k<1){let e=a.b3(h.startEulerAngles.roll,h.startEulerAngles.pitch,h.startEulerAngles.bearing),i=a.b3(h.endEulerAngles.roll,h.endEulerAngles.pitch,h.endEulerAngles.bearing),l=new Float64Array(4);a.b4(l,e,i,h.k);let c=a.b5(l);h.tr.setRoll(c.roll),h.tr.setPitch(c.pitch),h.tr.setBearing(c.bearing)}else h.tr.setRoll(h.endEulerAngles.roll),h.tr.setPitch(h.endEulerAngles.pitch),h.tr.setBearing(h.endEulerAngles.bearing);else h.tr.setRoll(a.B.number(h.startEulerAngles.roll,h.endEulerAngles.roll,h.k)),h.tr.setPitch(a.B.number(h.startEulerAngles.pitch,h.endEulerAngles.pitch,h.k)),h.tr.setBearing(a.B.number(h.startEulerAngles.bearing,h.endEulerAngles.bearing,h.k))}function ba(h,e,i,l,c){let d=c.padding,v=$r(c.worldSize,i.getNorthWest()),w=$r(c.worldSize,i.getNorthEast()),P=$r(c.worldSize,i.getSouthEast()),C=$r(c.worldSize,i.getSouthWest()),L=a.ad(-l),N=v.rotate(L),R=w.rotate(L),K=P.rotate(L),ee=C.rotate(L),he=new a.P(Math.max(N.x,R.x,ee.x,K.x),Math.max(N.y,R.y,ee.y,K.y)),ue=new a.P(Math.min(N.x,R.x,ee.x,K.x),Math.min(N.y,R.y,ee.y,K.y)),de=he.sub(ue),me=(c.width-(d.left+d.right+e.left+e.right))/de.x,xe=(c.height-(d.top+d.bottom+e.top+e.bottom))/de.y;if(xe<0||me<0)return void Cs();let Se=Math.min(a.ab(c.scale*Math.min(me,xe)),h.maxZoom),Pe=a.P.convert(h.offset),Ae=new a.P((e.left-e.right)/2,(e.top-e.bottom)/2).rotate(a.ad(l)),Me=Pe.add(Ae).mult(c.scale/a.aI(Se));return{center:va(c.worldSize,v.add(P).div(2).sub(Me)),zoom:Se,bearing:l}}class Vr{get useGlobeControls(){return!1}handlePanInertia(e,i){return{easingOffset:e,easingCenter:i.center}}handleMapControlsRollPitchBearingZoom(e,i){e.bearingDelta&&i.setBearing(i.bearing+e.bearingDelta),e.pitchDelta&&i.setPitch(i.pitch+e.pitchDelta),e.rollDelta&&i.setRoll(i.roll+e.rollDelta),e.zoomDelta&&i.setZoom(i.zoom+e.zoomDelta)}handleMapControlsPan(e,i,l){e.around.distSqr(i.centerPoint)<.01||i.setLocationAtPoint(l,e.around)}cameraForBoxAndBearing(e,i,l,c,d){return ba(e,i,l,c,d)}handleJumpToCenterZoom(e,i){e.zoom!==(i.zoom!==void 0?+i.zoom:e.zoom)&&e.setZoom(+i.zoom),i.center!==void 0&&e.setCenter(a.Q.convert(i.center))}handleEaseTo(e,i){let l=e.zoom,c=e.padding,d={roll:e.roll,pitch:e.pitch,bearing:e.bearing},v={roll:i.roll===void 0?e.roll:i.roll,pitch:i.pitch===void 0?e.pitch:i.pitch,bearing:i.bearing===void 0?e.bearing:i.bearing},w=i.zoom!==void 0,P=!e.isPaddingEqual(i.padding),C=!1,L=w?+i.zoom:e.zoom,N=e.centerPoint.add(i.offsetAsPoint),R=e.screenPointToLocation(N),{center:K,zoom:ee}=e.getConstrained(a.Q.convert(i.center||R),L??l);Ua(e,K);let he=$r(e.worldSize,R),ue=$r(e.worldSize,K).sub(he),de=a.aI(ee-l);return C=ee!==l,{easeFunc:me=>{if(C&&e.setZoom(a.B.number(l,ee,me)),a.b6(d,v)||ds({startEulerAngles:d,endEulerAngles:v,tr:e,k:me,useSlerp:d.roll!=v.roll}),P&&(e.interpolatePadding(c,i.padding,me),N=e.centerPoint.add(i.offsetAsPoint)),i.around)e.setLocationAtPoint(i.around,i.aroundPoint);else{let xe=a.aI(e.zoom-l),Se=ee>l?Math.min(2,de):Math.max(.5,de),Pe=Math.pow(Se,1-me),Ae=va(e.worldSize,he.add(ue.mult(me*Pe)).mult(xe));e.setLocationAtPoint(e.renderWorldCopies?Ae.wrap():Ae,N)}},isZooming:C,elevationCenter:K}}handleFlyTo(e,i){let l=i.zoom!==void 0,c=e.zoom,d=e.getConstrained(a.Q.convert(i.center||i.locationAtOffset),l?+i.zoom:c),v=d.center,w=d.zoom;Ua(e,v);let P=$r(e.worldSize,i.locationAtOffset),C=$r(e.worldSize,v).sub(P),L=C.mag(),N=a.aI(w-c),R;if(i.minZoom!==void 0){let K=Math.min(+i.minZoom,c,w),ee=e.getConstrained(v,K).zoom;R=a.aI(ee-c)}return{easeFunc:(K,ee,he,ue)=>{e.setZoom(K===1?w:c+a.ab(ee));let de=K===1?v:va(e.worldSize,P.add(C.mult(he)).mult(ee));e.setLocationAtPoint(e.renderWorldCopies?de.wrap():de,ue)},scaleOfZoom:N,targetCenter:v,scaleOfMinZoom:R,pixelPathLength:L}}}class $i{constructor(e,i,l){this.blendFunction=e,this.blendColor=i,this.mask=l}}$i.Replace=[1,0],$i.disabled=new $i($i.Replace,a.b7.transparent,[!1,!1,!1,!1]),$i.unblended=new $i($i.Replace,a.b7.transparent,[!0,!0,!0,!0]),$i.alphaBlended=new $i([1,771],a.b7.transparent,[!0,!0,!0,!0]);let On=2305;class Ti{constructor(e,i,l){this.enable=e,this.mode=i,this.frontFace=l}}Ti.disabled=new Ti(!1,1029,On),Ti.backCCW=new Ti(!0,1029,On),Ti.frontCCW=new Ti(!0,1028,On);class ri{constructor(e,i,l){this.func=e,this.mask=i,this.range=l}}ri.ReadOnly=!1,ri.ReadWrite=!0,ri.disabled=new ri(519,ri.ReadOnly,[0,1]);let Ks=7680;class yi{constructor(e,i,l,c,d,v){this.test=e,this.ref=i,this.mask=l,this.fail=c,this.depthFail=d,this.pass=v}}yi.disabled=new yi({func:519,mask:0},0,0,Ks,Ks,Ks);let Js=new WeakMap;function _n(h){var e;if(Js.has(h))return Js.get(h);{let i=(e=h.getParameter(h.VERSION))===null||e===void 0?void 0:e.startsWith("WebGL 2.0");return Js.set(h,i),i}}class Is{get awaitingQuery(){return!!this._readbackQueue}constructor(e){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=e;let i=e.context,l=i.gl;this._texFormat=l.RGBA,this._texType=l.UNSIGNED_BYTE;let c=new a.aF;c.emplaceBack(-1,-1),c.emplaceBack(2,-1),c.emplaceBack(-1,2);let d=new a.aH;d.emplaceBack(0,1,2),this._fullscreenTriangle=new us(i.createVertexBuffer(c,hs.members),i.createIndexBuffer(d),a.aG.simpleSegment(0,0,c.length,d.length)),this._resultBuffer=new Uint8Array(4),i.activeTexture.set(l.TEXTURE1);let v=l.createTexture();l.bindTexture(l.TEXTURE_2D,v),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,l.NEAREST),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,l.NEAREST),l.texImage2D(l.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=i.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(v),_n(l)&&(this._pbo=l.createBuffer(),l.bindBuffer(l.PIXEL_PACK_BUFFER,this._pbo),l.bufferData(l.PIXEL_PACK_BUFFER,4,l.STREAM_READ),l.bindBuffer(l.PIXEL_PACK_BUFFER,null))}destroy(){let e=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),e.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(e,i){let l=this._updateCount;return this._readbackQueue?l>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():l>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(e,i),this._updateCount++,this._measuredError}_bindFramebuffer(){let e=this._cachedRenderContext.context,i=e.gl;e.activeTexture.set(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,this._fbo.colorAttachment.get()),e.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(e,i){let l=this._cachedRenderContext.context,c=l.gl;if(this._bindFramebuffer(),l.viewport.set([0,0,this._texWidth,this._texHeight]),l.clear({color:a.b7.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(l,c.TRIANGLES,ri.disabled,yi.disabled,$i.unblended,Ti.disabled,((d,v)=>({u_input:d,u_output_expected:v}))(e,i),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&_n(c)){c.bindBuffer(c.PIXEL_PACK_BUFFER,this._pbo),c.readBuffer(c.COLOR_ATTACHMENT0),c.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),c.bindBuffer(c.PIXEL_PACK_BUFFER,null);let d=c.fenceSync(c.SYNC_GPU_COMMANDS_COMPLETE,0);c.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:d}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let e=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&_n(e)){let i=e.clientWaitSync(this._readbackQueue.sync,0,0);if(i===e.WAIT_FAILED)return a.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(i===e.TIMEOUT_EXPIRED)return;e.bindBuffer(e.PIXEL_PACK_BUFFER,this._pbo),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),e.bindBuffer(e.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),e.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=Is._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(e){let i=0;return i+=e[0]/256,i+=e[1]/65536,i+=e[2]/16777216,e[3]<127&&(i=-i),i/128}}let Qs=a.Z/128;function ea(h,e){let i=h.granularity!==void 0?Math.max(h.granularity,1):1,l=i+(h.generateBorders?2:0),c=i+(h.extendToNorthPole||h.generateBorders?1:0)+(h.extendToSouthPole||h.generateBorders?1:0),d=l+1,v=c+1,w=h.generateBorders?-1:0,P=h.generateBorders||h.extendToNorthPole?-1:0,C=i+(h.generateBorders?1:0),L=i+(h.generateBorders||h.extendToSouthPole?1:0),N=d*v,R=l*c*6,K=d*v>65536;if(K&&e==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let ee=K||e==="32bit",he=new Int16Array(2*N),ue=0;for(let xe=P;xe<=L;xe++)for(let Se=w;Se<=C;Se++){let Pe=Se/i*a.Z;Se===-1&&(Pe=-64),Se===i+1&&(Pe=a.Z+Qs);let Ae=xe/i*a.Z;xe===-1&&(Ae=h.extendToNorthPole?a.b9:-64),xe===i+1&&(Ae=h.extendToSouthPole?a.ba:a.Z+Qs),he[ue++]=Pe,he[ue++]=Ae}let de=ee?new Uint32Array(R):new Uint16Array(R),me=0;for(let xe=0;xe<c;xe++)for(let Se=0;Se<l;Se++){let Pe=Se+1+xe*d,Ae=Se+(xe+1)*d,Me=Se+1+(xe+1)*d;de[me++]=Se+xe*d,de[me++]=Ae,de[me++]=Pe,de[me++]=Pe,de[me++]=Ae,de[me++]=Me}return{vertices:he.buffer.slice(0),indices:de.buffer.slice(0),uses32bitIndices:ee}}let ta=new a.aE({fill:new a.bb(128,2),line:new a.bb(512,0),tile:new a.bb(128,32),stencil:new a.bb(128,1),circle:3});class ia{constructor(){this._tileMeshCache={},this._errorCorrectionUsable=0,this._errorMeasurementLastValue=0,this._errorCorrectionPreviousValue=0,this._errorMeasurementLastChangeTime=-1e3}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return yn.projectionGlobe}get vertexShaderPreludeCode(){return yn.projectionMercator.vertexSource}get subdivisionGranularity(){return ta}get useGlobeControls(){return!0}get latitudeErrorCorrectionRadians(){return this._errorCorrectionUsable}destroy(){this._errorMeasurement&&this._errorMeasurement.destroy()}updateGPUdependent(e){this._errorMeasurement||(this._errorMeasurement=new Is(e));let i=a.S(this._errorQueryLatitudeDegrees),l=2*Math.atan(Math.exp(Math.PI-i*Math.PI*2))-.5*Math.PI,c=this._errorMeasurement.updateErrorLoop(i,l),d=U.now();c!==this._errorMeasurementLastValue&&(this._errorCorrectionPreviousValue=this._errorCorrectionUsable,this._errorMeasurementLastValue=c,this._errorMeasurementLastChangeTime=d);let v=Math.min(Math.max((d-this._errorMeasurementLastChangeTime)/1e3/.5,0),1);this._errorCorrectionUsable=a.bc(this._errorCorrectionPreviousValue,-this._errorMeasurementLastValue,a.bd(v))}_getMeshKey(e){return`${e.granularity.toString(36)}_${e.generateBorders?"b":""}${e.extendToNorthPole?"n":""}${e.extendToSouthPole?"s":""}`}getMeshFromTileID(e,i,l,c,d){let v=(d==="stencil"?ta.stencil:ta.tile).getGranularityForZoomLevel(i.z);return this._getMesh(e,{granularity:v,generateBorders:l,extendToNorthPole:i.y===0&&c,extendToSouthPole:i.y===(1<<i.z)-1&&c})}_getMesh(e,i){let l=this._getMeshKey(i);if(l in this._tileMeshCache)return this._tileMeshCache[l];let c=function(d,v){let w=ea(v,"16bit"),P=a.aF.deserialize({arrayBuffer:w.vertices,length:w.vertices.byteLength/2/2}),C=a.aH.deserialize({arrayBuffer:w.indices,length:w.indices.byteLength/2/3});return new us(d.createVertexBuffer(P,hs.members),d.createIndexBuffer(C),a.aG.simpleSegment(0,0,P.length,C.length))}(e,i);return this._tileMeshCache[l]=c,c}recalculate(e){}hasTransition(){let e=U.now(),i=!1;return i=i||(e-this._errorMeasurementLastChangeTime)/1e3<.7,i=i||this._errorMeasurement&&this._errorMeasurement.awaitingQuery,i}setErrorQueryLatitudeDegrees(e){this._errorQueryLatitudeDegrees=e}}let ra=new a.r({type:new a.D(a.v.projection.type)});
724class na extends a.E{constructor(e){super(),this._transitionable=new a.T(ra),this.setProjection(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new a.C(0)),this._mercatorProjection=new gi,this._verticalPerspectiveProjection=new ia}get transitionState(){let e=this.properties.get("type");if(typeof e=="string"&&e==="mercator")return 0;if(typeof e=="string"&&e==="vertical-perspective")return 1;if(e instanceof a.be){if(e.from==="vertical-perspective"&&e.to==="mercator")return 1-e.transition;if(e.from==="mercator"&&e.to==="vertical-perspective")return e.transition}return 1}get useGlobeRendering(){return this.transitionState>0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(e){this._mercatorProjection.updateGPUdependent(e),this._verticalPerspectiveProjection.updateGPUdependent(e)}getMeshFromTileID(e,i,l,c,d){return this.currentProjection.getMeshFromTileID(e,i,l,c,d)}setProjection(e){this._transitionable.setValue("type",e?.type||"mercator")}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}setErrorQueryLatitudeDegrees(e){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e),this._mercatorProjection.setErrorQueryLatitudeDegrees(e)}}function nl(h){let e=xa(h.worldSize,h.center.lat);return 2*Math.PI*e}function As(h,e,i,l,c){let d=1/(1<<c),v=e/a.Z*d+l*d,w=a.bg((h/a.Z*d+i*d)*Math.PI*2+Math.PI,2*Math.PI),P=2*Math.atan(Math.exp(Math.PI-v*Math.PI*2))-.5*Math.PI,C=Math.cos(P),L=new Float64Array(3);return L[0]=Math.sin(w)*C,L[1]=Math.sin(P),L[2]=Math.cos(w)*C,L}function lr(h){return function(e,i){let l=Math.cos(i),c=new Float64Array(3);return c[0]=Math.sin(e)*l,c[1]=Math.sin(i),c[2]=Math.cos(e)*l,c}(h.lng*Math.PI/180,h.lat*Math.PI/180)}function xa(h,e){return h/(2*Math.PI)/Math.cos(e*Math.PI/180)}function Ga(h){let e=Math.asin(h[1])/Math.PI*180,i=Math.sqrt(h[0]*h[0]+h[2]*h[2]);if(i>1e-6){let l=h[0]/i,c=Math.acos(h[2]/i),d=(l>0?c:-c)/Math.PI*180;return new a.Q(a.aL(d,-180,180),e)}return new a.Q(0,e)}function Ur(h){return Math.cos(h*Math.PI/180)}function gr(h,e){let i=Ur(h),l=Ur(e);return a.ab(l/i)}function Cn(h,e){let i=h.rotate(e.bearingInRadians),l=e.zoom+gr(e.center.lat,0),c=a.bc(1/Ur(e.center.lat),1/Ur(Math.min(Math.abs(e.center.lat),60)),a.bf(l,7,3,0,1)),d=360/nl({worldSize:e.worldSize,center:{lat:e.center.lat}});return new a.Q(e.center.lng-i.x*d*c,a.ae(e.center.lat+i.y*d,-85.051129,a.aJ))}function _(h){let e=.5*h,i=Math.sin(e),l=Math.cos(e);return Math.log(i+l)-Math.log(l-i)}function S(h,e,i,l){let c=h.lat+i*l;if(Math.abs(i)>1){let d=(Math.sign(h.lat+i)!==Math.sign(h.lat)?-Math.abs(h.lat):Math.abs(h.lat))*Math.PI/180,v=Math.abs(h.lat+i)*Math.PI/180,w=_(d+l*(v-d)),P=_(d),C=_(v);return new a.Q(h.lng+e*((w-P)/(C-P)),c)}return new a.Q(h.lng+e*l,c)}class I{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._aabbFactory=e}recalculateCache(){if(!this._hadAnyChanges)return;let e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileAABB(e,i,l,c){let d=`${e.z}_${e.x}_${e.y}`,v=this._cache.get(d);if(v)return v;let w=this._cachePrevious.get(d);if(w)return this._cache.set(d,w),w;let P=this._aabbFactory(e,i,l,c);return this._cache.set(d,P),this._hadAnyChanges=!0,P}}function D(h,e,i){let l=h-e;return l<0?-l:Math.max(0,l-i)}function Z(h,e,i,l,c){let d=h-i,v;return v=d<0?Math.min(-d,1+d-c):d>1?Math.min(Math.max(d-c,0),1-d):0,Math.max(v,D(e,l,c))}class X{constructor(){this._aabbCache=new I(this._computeTileAABB)}recalculateCache(){this._aabbCache.recalculateCache()}distanceToTile2d(e,i,l,c){let d=1<<l.z,v=1/d,w=l.x/d,P=l.y/d,C=2;return C=Math.min(C,Z(e,i,w,P,v)),C=Math.min(C,Z(e,i,w+.5,-P-v,v)),C=Math.min(C,Z(e,i,w+.5,2-P-v,v)),C}getWrap(e,i,l){let c=1<<i.z,d=1/c,v=i.x/c,w=D(e.x,v,d),P=D(e.x,v-1,d),C=D(e.x,v+1,d),L=Math.min(w,P,C);return L===C?1:L===P?-1:0}allowVariableZoom(e,i){return Ar(e,i)>4}allowWorldCopies(){return!1}getTileAABB(e,i,l,c){return this._aabbCache.getTileAABB(e,i,l,c)}_computeTileAABB(e,i,l,c){if(e.z<=0)return new or([-1,-1,-1],[1,1,1]);if(e.z===1)return new or([e.x===0?-1:0,e.y===0?0:-1,-1],[e.x===0?0:1,e.y===0?1:0,1]);{let d=[As(0,0,e.x,e.y,e.z),As(a.Z,0,e.x,e.y,e.z),As(a.Z,a.Z,e.x,e.y,e.z),As(0,a.Z,e.x,e.y,e.z)],v=[1,1,1],w=[-1,-1,-1];for(let P of d)for(let C=0;C<3;C++)v[C]=Math.min(v[C],P[C]),w[C]=Math.max(w[C],P[C]);if(e.y===0||e.y===(1<<e.z)-1){let P=[0,e.y===0?1:-1,0];for(let C=0;C<3;C++)v[C]=Math.min(v[C],P[C]),w[C]=Math.max(w[C],P[C])}return new or(v,w)}}}
724class te{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,i,l){return this._helper.interpolatePadding(e,i,l)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,i){this._helper.resize(e,i)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,i){this._helper.overrideNearFarZ(e,i)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e){}constructor(){this._cachedClippingPlane=a.bh(),this._projectionMatrix=a.b1(),this._globeViewProjMatrix32f=a.b0(),this._globeViewProjMatrixNoCorrection=a.b1(),this._globeViewProjMatrixNoCorrectionInverted=a.b1(),this._globeProjMatrixInverted=a.b1(),this._cameraPosition=a.bi(),this._globeLatitudeErrorCorrectionRadians=0,this._helper=new Kr({calcMatrices:()=>{this._calcMatrices()},getConstrained:(e,i)=>this.getConstrained(e,i)}),this._coveringTilesDetailsProvider=new X}clone(){let e=new te;return e.apply(this),e}apply(e,i){this._globeLatitudeErrorCorrectionRadians=i||0,this._helper.apply(e)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let e=a.bi();return e[0]=this._cameraPosition[0],e[1]=this._cameraPosition[1],e[2]=this._cameraPosition[2],e}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(e){let{overscaledTileID:i,applyGlobeMatrix:l}=e,c=this._helper.getMercatorTileCoordinates(i);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:c,clippingPlane:this._cachedClippingPlane,projectionTransition:l?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(e){let i=this.pitchInRadians,l=this.cameraToCenterDistance/e,c=Math.sin(i)*l,d=Math.cos(i)*l+1,v=1/Math.sqrt(c*c+d*d)*1,w=-c,P=d,
vendor: 9,865 bytes, line 724
724C=Math.sqrt(w*w+P*P);w/=C,P/=C;let L=[0,w,P];return a.bj(L,L,[0,0,0],-this.bearingInRadians),a.bk(L,L,[0,0,0],-1*this.center.lat*Math.PI/180),a.bl(L,L,[0,0,0],this.center.lng*Math.PI/180),a.aO(L,L,.25),[...L,.25*-v]}isLocationOccluded(e){return!this.isSurfacePointVisible(lr(e))}transformLightDirection(e){let i=this._helper._center.lng*Math.PI/180,l=this._helper._center.lat*Math.PI/180,c=Math.cos(l),d=[Math.sin(i)*c,Math.sin(l),Math.cos(i)*c],v=[d[2],0,-d[0]],w=[0,0,0];a.aU(w,v,d),a.aT(v,v),a.aT(w,w);let P=[0,0,0];return a.aT(P,[v[0]*e[0]+w[0]*e[1]+d[0]*e[2],v[1]*e[0]+w[1]*e[1]+d[1]*e[2],v[2]*e[0]+w[2]*e[1]+d[2]*e[2]]),P}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(e,i,l){let c=function(w,P,C){let L=1/(1<<C.z);return new a.$(w/a.Z*L+C.x*L,P/a.Z*L+C.y*L)}(e,i,l.canonical),d=(v=c.y,[a.bg(c.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-v*Math.PI*2))-.5*Math.PI]);var v;return this.getCircleRadiusCorrection()/Math.cos(d[1])}projectTileCoordinates(e,i,l,c){let d=l.canonical,v=As(e,i,d.x,d.y,d.z),w=1+(c?c(e,i):0)/a.br,P=[v[0]*w,v[1]*w,v[2]*w,1];a.ap(P,P,this._globeViewProjMatrixNoCorrection);let C=this._cachedClippingPlane,L=C[0]*v[0]+C[1]*v[1]+C[2]*v[2]+C[3]<0;return{point:new a.P(P[0]/P[3],P[1]/P[3]),signedDistanceFromCamera:P[3],isOccluded:L}}_calcMatrices(){if(!this._helper._width||!this._helper._height)return;let e=xa(this.worldSize,this.center.lat),i=a.b2(),l=a.b2();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*e),a.aY(i,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);let c=this.centerOffset;i[8]=2*-c.x/this._helper._width,i[9]=2*c.y/this._helper._height,this._projectionMatrix=a.aZ(i),this._globeProjMatrixInverted=a.b2(),a.aj(this._globeProjMatrixInverted,i),a.L(i,i,[0,0,-this.cameraToCenterDistance]),a.a_(i,i,this.rollInRadians),a.a$(i,i,-this.pitchInRadians),a.a_(i,i,this.bearingInRadians),a.L(i,i,[0,0,-e]);let d=a.bi();d[0]=e,d[1]=e,d[2]=e,a.a$(l,i,this.center.lat*Math.PI/180),a.bm(l,l,-this.center.lng*Math.PI/180),a.M(l,l,d),this._globeViewProjMatrixNoCorrection=l,a.a$(i,i,this.center.lat*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),a.bm(i,i,-this.center.lng*Math.PI/180),a.M(i,i,d),this._globeViewProjMatrix32f=new Float32Array(i),this._globeViewProjMatrixNoCorrectionInverted=a.b2(),a.aj(this._globeViewProjMatrixNoCorrectionInverted,l);let v=a.bi();this._cameraPosition=a.bi(),this._cameraPosition[2]=this.cameraToCenterDistance/e,a.bj(this._cameraPosition,this._cameraPosition,v,-this.rollInRadians),a.bk(this._cameraPosition,this._cameraPosition,v,this.pitchInRadians),a.bj(this._cameraPosition,this._cameraPosition,v,-this.bearingInRadians),a.aP(this._cameraPosition,this._cameraPosition,[0,0,1]),a.bk(this._cameraPosition,this._cameraPosition,v,-this.center.lat*Math.PI/180),a.bl(this._cameraPosition,this._cameraPosition,v,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(e);let w=a.aZ(this._globeViewProjMatrixNoCorrectionInverted);a.M(w,w,[1,1,-1]),this._cachedFrustum=Kn.fromInvProjectionMatrix(w)}calculateFogMatrix(e){a.w("calculateFogMatrix is not supported on globe projection.");let i=a.b2();return a.at(i),i}getVisibleUnwrappedCoordinates(e){return[new a.aW(0,e)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){e&&a.w("terrain is not fully supported on vertical perspective projection."),this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,i){if(!this._globeViewProjMatrixNoCorrection)return 1;let l=lr(e);a.aO(l,l,1+i/a.br);let c=a.bh();return a.ap(c,[l[0],l[1],l[2],1],this._globeViewProjMatrixNoCorrection),c[2]/c[3]}populateCache(e){}getBounds(){let e=.5*this.width,i=.5*this.height,l=[new a.P(0,0),new a.P(e,0),new a.P(this.width,0),new a.P(this.width,i),new a.P(this.width,this.height),new a.P(e,this.height),new a.P(0,this.height),new a.P(0,i)],c=[];for(let N of l)c.push(this.unprojectScreenPoint(N));let d=0,v=0,w=0,P=0,C=this.center;for(let N of c){let R=a.bn(C.lng,N.lng),K=a.bn(C.lat,N.lat);R<v&&(v=R),R>d&&(d=R),K<P&&(P=K),K>w&&(w=K)}let L=[C.lng+v,C.lat+P,C.lng+d,C.lat+w];return this.isSurfacePointOnScreen([0,1,0])&&(L[3]=90,L[0]=-180,L[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(L[1]=-90,L[0]=-180,L[2]=180),new wi(L)}getConstrained(e,i){let l=a.ae(e.lat,-85.051129,a.aJ),c=a.ae(+i,this.minZoom+gr(0,l),this.maxZoom);return{center:new a.Q(e.lng,l),zoom:c}}calculateCenterFromCameraLngLatAlt(e,i,l,c){return this._helper.calculateCenterFromCameraLngLatAlt(e,i,l,c)}setLocationAtPoint(e,i){let l=lr(this.unprojectScreenPoint(i)),c=lr(e),d=a.bi();a.bo(d);let v=a.bi();a.bl(v,l,d,-this.center.lng*Math.PI/180),a.bk(v,v,d,this.center.lat*Math.PI/180);let w=c[0]*c[0]+c[2]*c[2],P=v[0]*v[0];if(w<P)return;let C=Math.sqrt(w-P),L=-C,N=a.bp(c[0],c[2],v[0],C),R=a.bp(c[0],c[2],v[0],L),K=a.bi();a.bl(K,c,d,-N);let ee=a.bp(K[1],K[2],v[1],v[2]),he=a.bi();a.bl(he,c,d,-R);let ue=a.bp(he[1],he[2],v[1],v[2]),de=.5*Math.PI,me=ee>=-de&&ee<=de,xe=ue>=-de&&ue<=de,Se,Pe;if(me&&xe){let Ve=this.center.lng*Math.PI/180,ot=this.center.lat*Math.PI/180;a.bs(N,Ve)+a.bs(ee,ot)<a.bs(R,Ve)+a.bs(ue,ot)?(Se=N,Pe=ee):(Se=R,Pe=ue)}else if(me)Se=N,Pe=ee;else{if(!xe)return;Se=R,Pe=ue}let Ae=Se/Math.PI*180,Me=Pe/Math.PI*180,Ue=this.center.lat;this.setCenter(new a.Q(Ae,a.ae(Me,-90,90))),this.setZoom(this.zoom+gr(Ue,this.center.lat))}locationToScreenPoint(e,i){let l=lr(e);if(i){let c=i.getElevationForLngLatZoom(e,this._helper._tileZoom);a.aO(l,l,1+c/a.br)}return this._projectSurfacePointToScreen(l)}_projectSurfacePointToScreen(e){let i=a.bh();return a.ap(i,[...e,1],this._globeViewProjMatrixNoCorrection),i[0]/=i[3],i[1]/=i[3],new a.P((.5*i[0]+.5)*this.width,(.5*-i[1]+.5)*this.height)}screenPointToMercatorCoordinate(e,i){if(i){let l=i.pointCoordinate(e);if(l)return l}return a.$.fromLngLat(this.unprojectScreenPoint(e))}screenPointToLocation(e,i){var l;return(l=this.screenPointToMercatorCoordinate(e,i))===null||l===void 0?void 0:l.toLngLat()}isPointOnMapSurface(e,i){let l=this._cameraPosition,c=this.getRayDirectionFromPixel(e);return!!this.rayPlanetIntersection(l,c)}getRayDirectionFromPixel(e){let i=a.bh();i[0]=e.x/this.width*2-1,i[1]=-1*(e.y/this.height*2-1),i[2]=1,i[3]=1,a.ap(i,i,this._globeViewProjMatrixNoCorrectionInverted),i[0]/=i[3],i[1]/=i[3],i[2]/=i[3];let l=a.bi();l[0]=i[0]-this._cameraPosition[0],l[1]=i[1]-this._cameraPosition[1],l[2]=i[2]-this._cameraPosition[2];let c=a.bi();return a.aT(c,l),c}isSurfacePointVisible(e){let i=this._cachedClippingPlane;return i[0]*e[0]+i[1]*e[1]+i[2]*e[2]+i[3]>=0}isSurfacePointOnScreen(e){if(!this.isSurfacePointVisible(e))return!1;let i=a.bh();return a.ap(i,[...e,1],this._globeViewProjMatrixNoCorrection),i[0]/=i[3],i[1]/=i[3],i[2]/=i[3],i[0]>-1&&i[0]<1&&i[1]>-1&&i[1]<1&&i[2]>-1&&i[2]<1}rayPlanetIntersection(e,i){let l=a.aV(e,i),c=a.bi(),d=a.bi();a.aO(d,i,l),a.aS(c,e,d);let v=1-a.aV(c,c);if(v<0)return null;let w=a.aV(e,e)-1,P=-l+(l<0?1:-1)*Math.sqrt(v),C=w/P,L=P;return{tMin:Math.min(C,L),tMax:Math.max(C,L)}}unprojectScreenPoint(e){let i=this._cameraPosition,l=this.getRayDirectionFromPixel(e),c=this.rayPlanetIntersection(i,l);if(c){let C=a.bi();a.aP(C,i,[l[0]*c.tMin,l[1]*c.tMin,l[2]*c.tMin]);let L=a.bi();return a.aT(L,C),Ga(L)}let d=this._cachedClippingPlane[0]*l[0]+this._cachedClippingPlane[1]*l[1]+this._cachedClippingPlane[2]*l[2],v=-a.bq(this._cachedClippingPlane,i)/d,w=a.bi();if(v>0)a.aP(w,i,[l[0]*v,l[1]*v,l[2]*v]);else{let C=a.bi();a.aP(C,i,[2*l[0],2*l[1],2*l[2]]);let L=a.bq(this._cachedClippingPlane,C);a.aS(w,C,[this._cachedClippingPlane[0]*L,this._cachedClippingPlane[1]*L,this._cachedClippingPlane[2]*L])}let P=a.bi();return a.aT(P,w),Ga(P)}getMatrixForModel(e,i){let l=a.Q.convert(e),c=1/a.br,d=a.b1();return a.bm(d,d,l.lng/180*Math.PI),a.a$(d,d,-l.lat/180*Math.PI),a.L(d,d,[0,0,1+i/a.br]),a.a$(d,d,.5*Math.PI),a.M(d,d,[c,c,c]),d}getProjectionDataForCustomLayer(e=!0){let i=this.getProjectionData({overscaledTileID:new a.Y(0,0,0,0,0),applyGlobeMatrix:e});return i.tileMercatorCoords=[0,0,1,1],i}getFastPathSimpleProjectionMatrix(e){}}class Te{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,i,l){return this._helper.interpolatePadding(e,i,l)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,i,l=!0){this._helper.resize(e,i,l)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}
vendor: 6,254 bytes, line 724
724overrideNearFarZ(e,i){this._helper.overrideNearFarZ(e,i)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(e,i){this._globeness=e,this._globeLatitudeErrorCorrectionRadians=i,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().recalculateCache(),this._mercatorTransform.getCoveringTilesDetailsProvider().recalculateCache()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this._helper=new Kr({calcMatrices:()=>{this._calcMatrices()},getConstrained:(e,i)=>this.getConstrained(e,i)}),this._globeness=1,this._mercatorTransform=new Gi,this._verticalPerspectiveTransform=new te}clone(){let e=new Te;return e._globeness=this._globeness,e._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,e.apply(this),e}apply(e){this._helper.apply(e),this._mercatorTransform.apply(this),this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(e){let i=this._mercatorTransform.getProjectionData(e),l=this._verticalPerspectiveTransform.getProjectionData(e);return{mainMatrix:this.isGlobeRendering?l.mainMatrix:i.mainMatrix,clippingPlane:l.clippingPlane,tileMercatorCoords:l.tileMercatorCoords,projectionTransition:e.applyGlobeMatrix?this._globeness:0,fallbackMatrix:i.fallbackMatrix}}isLocationOccluded(e){return this.currentTransform.isLocationOccluded(e)}transformLightDirection(e){return this.currentTransform.transformLightDirection(e)}getPixelScale(){return a.bc(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return a.bc(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(e,i,l){let c=this._mercatorTransform.getPitchedTextCorrection(e,i,l),d=this._verticalPerspectiveTransform.getPitchedTextCorrection(e,i,l);return a.bc(c,d,this._globeness)}projectTileCoordinates(e,i,l,c){return this.currentTransform.projectTileCoordinates(e,i,l,c)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(e){return this.currentTransform.calculateFogMatrix(e)}getVisibleUnwrappedCoordinates(e){return this.currentTransform.getVisibleUnwrappedCoordinates(e)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(e){this._mercatorTransform.recalculateZoomAndCenter(e),this._verticalPerspectiveTransform.recalculateZoomAndCenter(e)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,i){return this.currentTransform.lngLatToCameraDepth(e,i)}populateCache(e){this._mercatorTransform.populateCache(e),this._verticalPerspectiveTransform.populateCache(e)}getBounds(){return this.currentTransform.getBounds()}getConstrained(e,i){return this.currentTransform.getConstrained(e,i)}calculateCenterFromCameraLngLatAlt(e,i,l,c){return this._helper.calculateCenterFromCameraLngLatAlt(e,i,l,c)}setLocationAtPoint(e,i){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(e,i),void this.apply(this._mercatorTransform);this._verticalPerspectiveTransform.setLocationAtPoint(e,i),this.apply(this._verticalPerspectiveTransform)}locationToScreenPoint(e,i){return this.currentTransform.locationToScreenPoint(e,i)}screenPointToMercatorCoordinate(e,i){return this.currentTransform.screenPointToMercatorCoordinate(e,i)}screenPointToLocation(e,i){return this.currentTransform.screenPointToLocation(e,i)}
vendor: 8,117 bytes, line 724
724isPointOnMapSurface(e,i){return this.currentTransform.isPointOnMapSurface(e,i)}getRayDirectionFromPixel(e){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e)}getMatrixForModel(e,i){return this.currentTransform.getMatrixForModel(e,i)}getProjectionDataForCustomLayer(e=!0){let i=this._mercatorTransform.getProjectionDataForCustomLayer(e);if(!this.isGlobeRendering)return i;let l=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e);return l.fallbackMatrix=i.mainMatrix,l}getFastPathSimpleProjectionMatrix(e){return this.currentTransform.getFastPathSimpleProjectionMatrix(e)}}class _e{get useGlobeControls(){return!0}handlePanInertia(e,i){let l=Cn(e,i);return Math.abs(l.lng-i.center.lng)>180&&(l.lng=i.center.lng+179.5*Math.sign(l.lng-i.center.lng)),{easingCenter:l,easingOffset:new a.P(0,0)}}handleMapControlsRollPitchBearingZoom(e,i){let l=e.around,c=i.screenPointToLocation(l);e.bearingDelta&&i.setBearing(i.bearing+e.bearingDelta),e.pitchDelta&&i.setPitch(i.pitch+e.pitchDelta),e.rollDelta&&i.setRoll(i.roll+e.rollDelta);let d=i.zoom;e.zoomDelta&&i.setZoom(i.zoom+e.zoomDelta);let v=i.zoom-d;if(v===0)return;let w=a.bn(i.center.lng,c.lng),P=w/(Math.abs(w/180)+1),C=a.bn(i.center.lat,c.lat),L=i.getRayDirectionFromPixel(l),N=i.cameraPosition,R=-1*a.aV(N,L),K=a.bi();a.aP(K,N,[L[0]*R,L[1]*R,L[2]*R]);let ee=a.bt(K)-1,he=Math.exp(.5*-Math.max(ee-.3,0)),ue=xa(i.worldSize,i.center.lat)/Math.min(i.width,i.height),de=a.bf(ue,.9,.5,1,.25),me=(1-a.aI(-v))*Math.min(he,de),xe=i.center.lat,Se=i.zoom,Pe=new a.Q(i.center.lng+P*me,a.ae(i.center.lat+C*me,-85.051129,a.aJ));i.setLocationAtPoint(c,l);let Ae=i.center,Me=a.bf(Math.abs(w),45,85,0,1),Ue=a.bf(ue,.75,.35,0,1),Ve=Math.pow(Math.max(Me,Ue),.25),ot=a.bn(Ae.lng,Pe.lng),ut=a.bn(Ae.lat,Pe.lat);i.setCenter(new a.Q(Ae.lng+ot*Ve,Ae.lat+ut*Ve).wrap()),i.setZoom(Se+gr(xe,i.center.lat))}handleMapControlsPan(e,i,l){if(!e.panDelta)return;let c=i.center.lat,d=i.zoom;i.setCenter(Cn(e.panDelta,i).wrap()),i.setZoom(d+gr(c,i.center.lat))}cameraForBoxAndBearing(e,i,l,c,d){let v=ba(e,i,l,c,d),w=i.left/d.width*2-1,P=(d.width-i.right)/d.width*2-1,C=i.top/d.height*-2+1,L=(d.height-i.bottom)/d.height*-2+1,N=a.bn(l.getWest(),l.getEast())<0,R=N?l.getEast():l.getWest(),K=N?l.getWest():l.getEast(),ee=Math.max(l.getNorth(),l.getSouth()),he=Math.min(l.getNorth(),l.getSouth()),ue=R+.5*a.bn(R,K),de=ee+.5*a.bn(ee,he),me=d.clone();me.setCenter(v.center),me.setBearing(v.bearing),me.setPitch(0),me.setRoll(0),me.setZoom(v.zoom);let xe=me.modelViewProjectionMatrix,Se=[lr(l.getNorthWest()),lr(l.getNorthEast()),lr(l.getSouthWest()),lr(l.getSouthEast()),lr(new a.Q(K,de)),lr(new a.Q(R,de)),lr(new a.Q(ue,ee)),lr(new a.Q(ue,he))],Pe=lr(v.center),Ae=Number.POSITIVE_INFINITY;for(let Me of Se)w<0&&(Ae=_e.getLesserNonNegativeNonNull(Ae,_e.solveVectorScale(Me,Pe,xe,"x",w))),P>0&&(Ae=_e.getLesserNonNegativeNonNull(Ae,_e.solveVectorScale(Me,Pe,xe,"x",P))),C>0&&(Ae=_e.getLesserNonNegativeNonNull(Ae,_e.solveVectorScale(Me,Pe,xe,"y",C))),L<0&&(Ae=_e.getLesserNonNegativeNonNull(Ae,_e.solveVectorScale(Me,Pe,xe,"y",L)));if(Number.isFinite(Ae)&&Ae!==0)return v.zoom=me.zoom+a.ab(Ae),v;Cs()}handleJumpToCenterZoom(e,i){let l=e.center.lat,c=e.getConstrained(i.center?a.Q.convert(i.center):e.center,e.zoom).center;e.setCenter(c.wrap());let d=i.zoom!==void 0?+i.zoom:e.zoom+gr(l,c.lat);e.zoom!==d&&e.setZoom(d)}handleEaseTo(e,i){let l=e.zoom,c=e.center,d=e.padding,v={roll:e.roll,pitch:e.pitch,bearing:e.bearing},w={roll:i.roll===void 0?e.roll:i.roll,pitch:i.pitch===void 0?e.pitch:i.pitch,bearing:i.bearing===void 0?e.bearing:i.bearing},P=i.zoom!==void 0,C=!e.isPaddingEqual(i.padding),L=!1,N=i.center?a.Q.convert(i.center):c,R=e.getConstrained(N,l).center;Ua(e,R);let K=e.clone();K.setCenter(R),K.setZoom(P?+i.zoom:l+gr(c.lat,N.lat)),K.setBearing(i.bearing);let ee=new a.P(a.ae(e.centerPoint.x+i.offsetAsPoint.x,0,e.width),a.ae(e.centerPoint.y+i.offsetAsPoint.y,0,e.height));K.setLocationAtPoint(R,ee);let he=(i.offset&&i.offsetAsPoint.mag())>0?K.center:R,ue=P?+i.zoom:l+gr(c.lat,he.lat),de=l+gr(c.lat,0),me=ue+gr(he.lat,0),xe=a.bn(c.lng,he.lng),Se=a.bn(c.lat,he.lat),Pe=a.aI(me-de);return L=ue!==l,{easeFunc:Ae=>{if(a.b6(v,w)||ds({startEulerAngles:v,endEulerAngles:w,tr:e,k:Ae,useSlerp:v.roll!=w.roll}),C&&e.interpolatePadding(d,i.padding,Ae),i.around)a.w("Easing around a point is not supported under globe projection."),e.setLocationAtPoint(i.around,i.aroundPoint);else{let Me=me>de?Math.min(2,Pe):Math.max(.5,Pe),Ue=Math.pow(Me,1-Ae),Ve=S(c,xe,Se,Ae*Ue);e.setCenter(Ve.wrap())}if(L){let Me=a.B.number(de,me,Ae)+gr(0,e.center.lat);e.setZoom(Me)}},isZooming:L,elevationCenter:he}}handleFlyTo(e,i){let l=i.zoom!==void 0,c=e.center,d=e.zoom,v=e.padding,w=!e.isPaddingEqual(i.padding),P=e.getConstrained(a.Q.convert(i.center||i.locationAtOffset),d).center,C=l?+i.zoom:e.zoom+gr(e.center.lat,P.lat),L=e.clone();L.setCenter(P),L.setZoom(C),L.setBearing(i.bearing);let N=new a.P(a.ae(e.centerPoint.x+i.offsetAsPoint.x,0,e.width),a.ae(e.centerPoint.y+i.offsetAsPoint.y,0,e.height));L.setLocationAtPoint(P,N);let R=L.center;Ua(e,R);let K=function(Se,Pe,Ae){let Me=lr(Pe),Ue=lr(Ae),Ve=a.aV(Me,Ue),ot=Math.acos(Ve),ut=nl(Se);return ot/(2*Math.PI)*ut}(e,c,R),ee=d+gr(c.lat,0),he=C+gr(R.lat,0),ue=a.aI(he-ee),de;if(typeof i.minZoom=="number"){let Se=+i.minZoom+gr(R.lat,0),Pe=Math.min(Se,ee,he)+gr(0,R.lat),Ae=e.getConstrained(R,Pe).zoom+gr(R.lat,0);de=a.aI(Ae-ee)}let me=a.bn(c.lng,R.lng),xe=a.bn(c.lat,R.lat);return{easeFunc:(Se,Pe,Ae,Me)=>{let Ue=S(c,me,xe,Ae);w&&e.interpolatePadding(v,i.padding,Se);let Ve=Se===1?R:Ue;e.setCenter(Ve.wrap());let ot=ee+a.ab(Pe);e.setZoom(Se===1?C:ot+gr(0,Ve.lat))},scaleOfZoom:ue,targetCenter:R,scaleOfMinZoom:de,pixelPathLength:K}}static solveVectorScale(e,i,l,c,d){let v=c==="x"?[l[0],l[4],l[8],l[12]]:[l[1],l[5],l[9],l[13]],w=[l[3],l[7],l[11],l[15]],P=e[0]*v[0]+e[1]*v[1]+e[2]*v[2],C=e[0]*w[0]+e[1]*w[1]+e[2]*w[2],L=i[0]*v[0]+i[1]*v[1]+i[2]*v[2],N=i[0]*w[0]+i[1]*w[1]+i[2]*w[2];return L+d*C===P+d*N||w[3]*(P-L)+v[3]*(N-C)+P*N==L*C?null:(L+v[3]-d*N-d*w[3])/(L-P-d*N+d*C)}static getLesserNonNegativeNonNull(e,i){return i!==null&&i>=0&&i<e?i:e}}class Fe{constructor(e){this._globe=e,this._mercatorCameraHelper=new Vr,this._verticalPerspectiveCameraHelper=new _e}get useGlobeControls(){return this._globe.useGlobeRendering}get currentHelper(){return this.useGlobeControls?this._verticalPerspectiveCameraHelper:this._mercatorCameraHelper}handlePanInertia(e,i){return this.currentHelper.handlePanInertia(e,i)}handleMapControlsRollPitchBearingZoom(e,i){return this.currentHelper.handleMapControlsRollPitchBearingZoom(e,i)}handleMapControlsPan(e,i,l){this.currentHelper.handleMapControlsPan(e,i,l)}cameraForBoxAndBearing(e,i,l,c,d){return this.currentHelper.cameraForBoxAndBearing(e,i,l,c,d)}handleJumpToCenterZoom(e,i){this.currentHelper.handleJumpToCenterZoom(e,i)}handleEaseTo(e,i){return this.currentHelper.handleEaseTo(e,i)}handleFlyTo(e,i){return this.currentHelper.handleFlyTo(e,i)}}let rt=(h,e)=>a.x(h,e&&e.filter(i=>i.identifier!=="source.canvas")),dt=a.bu();class We extends a.E{constructor(e,i={}){super(),this._rtlPluginLoaded=()=>{for(let l in this.sourceCaches){let c=this.sourceCaches[l].getSource().type;c!=="vector"&&c!=="geojson"||this.sourceCaches[l].reload()}},this.map=e,this.dispatcher=new wt(ln(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",(l,c)=>this.getGlyphs(l,c)),this.dispatcher.registerMessageHandler("GI",(l,c)=>this.getImages(l,c)),this.imageManager=new Oe,this.imageManager.setEventedParent(this),this.glyphManager=new Ne(e._requestManager,i.localIdeographFontFamily),this.lineAtlas=new Xe(256,512),this.crossTileSymbolIndex=new Va,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.bv,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",a.bw()),un().on(Yr,this._rtlPluginLoaded),this.on("data",l=>{if(l.dataType!=="source"||l.sourceDataType!=="metadata")return;let c=this.sourceCaches[l.sourceId];if(!c)return;let d=c.getSource();if(d&&d.vectorLayerIds)for(let v in this._layers){let w=this._layers[v];
724w.source===d.id&&this._validateLayer(w)}})}loadURL(e,i={},l){this.fire(new a.l("dataloading",{dataType:"style"})),i.validate=typeof i.validate!="boolean"||i.validate;let c=this.map._requestManager.transformRequest(e,"Style");this._loadStyleRequest=new AbortController;let d=this._loadStyleRequest;a.j(c,this._loadStyleRequest).then(v=>{this._loadStyleRequest=null,this._load(v.data,i,l)}).catch(v=>{this._loadStyleRequest=null,v&&!d.signal.aborted&&this.fire(new a.k(v))})}loadJSON(e,i={},l){this.fire(new a.l("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,U.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,i.validate=i.validate!==!1,this._load(e,i,l)}).catch(()=>{})}loadEmpty(){this.fire(new a.l("dataloading",{dataType:"style"})),this._load(dt,{validate:!1})}_load(e,i,l){var c,d;let v=i.transformStyle?i.transformStyle(l,e):e;if(!i.validate||!rt(this,a.y(v))){this._loaded=!0,this.stylesheet=v;for(let w in v.sources)this.addSource(w,v.sources[w],{validate:!1});v.sprite?this._loadSprite(v.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(v.glyphs),this._createLayers(),this.light=new bt(this.stylesheet.light),this._setProjectionInternal(((c=this.stylesheet.projection)===null||c===void 0?void 0:c.type)||"mercator"),this.sky=new He(this.stylesheet.sky),this.map.setTerrain((d=this.stylesheet.terrain)!==null&&d!==void 0?d:null),this.fire(new a.l("data",{dataType:"style"})),this.fire(new a.l("style.load"))}}_createLayers(){let e=a.bx(this.stylesheet.layers);this.dispatcher.broadcast("SL",e),this._order=e.map(i=>i.id),this._layers={},this._serializedLayers=null;for(let i of e){let l=a.by(i);l.setEventedParent(this,{layer:{id:i.id}}),this._layers[i.id]=l}}_loadSprite(e,i=!1,l=void 0){let c;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(d,v,w,P){return a._(this,void 0,void 0,function*(){let C=we(d),L=w>1?"@2x":"",N={},R={};for(let{id:K,url:ee}of C){let he=v.transformRequest(Le(ee,L,".json"),"SpriteJSON");N[K]=a.j(he,P);let ue=v.transformRequest(Le(ee,L,".png"),"SpriteImage");R[K]=ce.getImage(ue,P)}return yield Promise.all([...Object.values(N),...Object.values(R)]),function(K,ee){return a._(this,void 0,void 0,function*(){let he={};for(let ue in K){he[ue]={};let de=U.getImageCanvasContext((yield ee[ue]).data),me=(yield K[ue]).data;for(let xe in me){let{width:Se,height:Pe,x:Ae,y:Me,sdf:Ue,pixelRatio:Ve,stretchX:ot,stretchY:ut,content:at,textFitWidth:It,textFitHeight:Et}=me[xe];he[ue][xe]={data:null,pixelRatio:Ve,sdf:Ue,stretchX:ot,stretchY:ut,content:at,textFitWidth:It,textFitHeight:Et,spriteData:{width:Se,height:Pe,x:Ae,y:Me,context:de}}}}return he})}(N,R)})}(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(d=>{if(this._spriteRequest=null,d)for(let v in d){this._spritesImagesIds[v]=[];let w=this._spritesImagesIds[v]?this._spritesImagesIds[v].filter(P=>!(P in d)):[];for(let P of w)this.imageManager.removeImage(P),this._changedImages[P]=!0;for(let P in d[v]){let C=v==="default"?P:`${v}:${P}`;this._spritesImagesIds[v].push(C),C in this.imageManager.images?this.imageManager.updateImage(C,d[v][P],!1):this.imageManager.addImage(C,d[v][P]),i&&(this._changedImages[C]=!0)}}}).catch(d=>{this._spriteRequest=null,c=d,this.fire(new a.k(c))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),i&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.l("data",{dataType:"style"})),l&&l(c)})}_unloadSprite(){for(let e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.l("data",{dataType:"style"}))}_validateLayer(e){let i=this.sourceCaches[e.source];if(!i)return;let l=e.sourceLayer;if(!l)return;let c=i.getSource();(c.type==="geojson"||c.vectorLayerIds&&c.vectorLayerIds.indexOf(l)===-1)&&this.fire(new a.k(new Error(`Source layer "${l}" does not exist on source "${c.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(e,i=!1){let l=this._serializedAllLayers();if(!e||e.length===0)return Object.values(i?a.bz(l):l);let c=[];for(let d of e)if(l[d]){let v=i?a.bz(l[d]):l[d];c.push(v)}return c}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};let i=Object.keys(this._layers);for(let l of i){let c=this._layers[l];c.type!=="custom"&&(e[l]=c.serialize())}return e}hasTransitions(){var e,i,l;if(!((e=this.light)===null||e===void 0)&&e.hasTransition()||!((i=this.sky)===null||i===void 0)&&i.hasTransition()||!((l=this.projection)===null||l===void 0)&&l.hasTransition())return!0;for(let c in this.sourceCaches)if(this.sourceCaches[c].hasTransition())return!0;for(let c in this._layers)if(this._layers[c].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(e){if(!this._loaded)return;let i=this._changed;if(i){let c=Object.keys(this._updatedLayers),d=Object.keys(this._removedLayers);(c.length||d.length)&&this._updateWorkerLayers(c,d);for(let v in this._updatedSources){let w=this._updatedSources[v];if(w==="reload")this._reloadSource(v);else{if(w!=="clear")throw new Error(`Invalid action ${w}`);this._clearSource(v)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let v in this._updatedPaintProps)this._layers[v].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}let l={};for(let c in this.sourceCaches){let d=this.sourceCaches[c];l[c]=d.used,d.used=!1}for(let c of this._order){let d=this._layers[c];d.recalculate(e,this._availableImages),!d.isHidden(e.zoom)&&d.source&&(this.sourceCaches[d.source].used=!0)}for(let c in l){let d=this.sourceCaches[c];!!l[c]!=!!d.used&&d.fire(new a.l("data",{sourceDataType:"visibility",dataType:"source",sourceId:c}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,i&&this.fire(new a.l("data",{dataType:"style"}))}_updateTilesForChangedImages(){let e=Object.keys(this._changedImages);if(e.length){for(let i in this.sourceCaches)this.sourceCaches[i].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,i){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:i})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,i={}){var l;this._checkLoaded();let c=this.serialize();if(e=i.transformStyle?i.transformStyle(c,e):e,((l=i.validate)===null||l===void 0||l)&&rt(this,a.y(e)))return!1;
724(e=a.bz(e)).layers=a.bx(e.layers);let d=a.bA(c,e),v=this._getOperationsToPerform(d);if(v.unimplemented.length>0)throw new Error(`Unimplemented: ${v.unimplemented.join(", ")}.`);if(v.operations.length===0)return!1;for(let w of v.operations)w();return this.stylesheet=e,this._serializedLayers=null,!0}_getOperationsToPerform(e){let i=[],l=[];for(let c of e)switch(c.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":i.push(()=>this.addLayer.apply(this,c.args));break;case"removeLayer":i.push(()=>this.removeLayer.apply(this,c.args));break;case"setPaintProperty":i.push(()=>this.setPaintProperty.apply(this,c.args));break;case"setLayoutProperty":i.push(()=>this.setLayoutProperty.apply(this,c.args));break;case"setFilter":i.push(()=>this.setFilter.apply(this,c.args));break;case"addSource":i.push(()=>this.addSource.apply(this,c.args));break;case"removeSource":i.push(()=>this.removeSource.apply(this,c.args));break;case"setLayerZoomRange":i.push(()=>this.setLayerZoomRange.apply(this,c.args));break;case"setLight":i.push(()=>this.setLight.apply(this,c.args));break;case"setGeoJSONSourceData":i.push(()=>this.setGeoJSONSourceData.apply(this,c.args));break;case"setGlyphs":i.push(()=>this.setGlyphs.apply(this,c.args));break;case"setSprite":i.push(()=>this.setSprite.apply(this,c.args));break;case"setTerrain":i.push(()=>this.map.setTerrain.apply(this,c.args));break;case"setSky":i.push(()=>this.setSky.apply(this,c.args));break;case"setProjection":this.setProjection.apply(this,c.args);break;case"setTransition":i.push(()=>{});break;default:l.push(c.command)}return{operations:i,unimplemented:l}}addImage(e,i){if(this.getImage(e))return this.fire(new a.k(new Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,i),this._afterImageUpdated(e)}updateImage(e,i){this.imageManager.updateImage(e,i)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new a.k(new Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.l("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,i,l={}){if(this._checkLoaded(),this.sourceCaches[e]!==void 0)throw new Error(`Source "${e}" already exists.`);if(!i.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(i).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(i.type)>=0&&this._validate(a.y.source,`sources.${e}`,i,null,l))return;this.map&&this.map._collectResourceTiming&&(i.collectResourceTiming=!0);let c=this.sourceCaches[e]=new J(e,i,this.dispatcher);c.style=this,c.setEventedParent(this,()=>({isSourceLoaded:c.loaded(),source:c.serialize(),sourceId:e})),c.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error("There is no source with this ID");for(let l in this._layers)if(this._layers[l].source===e)return this.fire(new a.k(new Error(`Source "${e}" cannot be removed while layer "${l}" is using it.`)));let i=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],i.fire(new a.l("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),i.setEventedParent(null),i.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,i){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error(`There is no source with this ID=${e}`);let l=this.sourceCaches[e].getSource();if(l.type!=="geojson")throw new Error(`geojsonSource.type is ${l.type}, which is !== 'geojson`);l.setData(i),this._changed=!0}getSource(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()}addLayer(e,i,l={}){this._checkLoaded();let c=e.id;if(this.getLayer(c))return void this.fire(new a.k(new Error(`Layer "${c}" already exists on this map.`)));let d;if(e.type==="custom"){if(rt(this,a.bB(e)))return;d=a.by(e)}else{if("source"in e&&typeof e.source=="object"&&(this.addSource(c,e.source),e=a.bz(e),e=a.e(e,{source:c}
724)),this._validate(a.y.layer,`layers.${c}`,e,{arrayIndex:-1},l))return;d=a.by(e),this._validateLayer(d),d.setEventedParent(this,{layer:{id:c}})}let v=i?this._order.indexOf(i):this._order.length;if(i&&v===-1)this.fire(new a.k(new Error(`Cannot add layer "${c}" before non-existing layer "${i}".`)));else{if(this._order.splice(v,0,c),this._layerOrderChanged=!0,this._layers[c]=d,this._removedLayers[c]&&d.source&&d.type!=="custom"){let w=this._removedLayers[c];delete this._removedLayers[c],w.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)}}moveLayer(e,i){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new a.k(new Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===i)return;let l=this._order.indexOf(e);this._order.splice(l,1);let c=i?this._order.indexOf(i):this._order.length;i&&c===-1?this.fire(new a.k(new Error(`Cannot move layer "${e}" before non-existing layer "${i}".`))):(this._order.splice(c,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();let i=this._layers[e];if(!i)return void this.fire(new a.k(new Error(`Cannot remove non-existing layer "${e}".`)));i.setEventedParent(null);let l=this._order.indexOf(e);this._order.splice(l,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=i,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],i.onRemove&&i.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,i,l){this._checkLoaded();let c=this.getLayer(e);c?c.minzoom===i&&c.maxzoom===l||(i!=null&&(c.minzoom=i),l!=null&&(c.maxzoom=l),this._updateLayer(c)):this.fire(new a.k(new Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,i,l={}){this._checkLoaded();let c=this.getLayer(e);if(c){if(!a.bC(c.filter,i))return i==null?(c.filter=void 0,void this._updateLayer(c)):void(this._validate(a.y.filter,`layers.${c.id}.filter`,i,null,l)||(c.filter=a.bz(i),this._updateLayer(c)))}else this.fire(new a.k(new Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return a.bz(this.getLayer(e).filter)}setLayoutProperty(e,i,l,c={}){this._checkLoaded();let d=this.getLayer(e);d?a.bC(d.getLayoutProperty(i),l)||(d.setLayoutProperty(i,l,c),this._updateLayer(d)):this.fire(new a.k(new Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,i){let l=this.getLayer(e);if(l)return l.getLayoutProperty(i);this.fire(new a.k(new Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,i,l,c={}){this._checkLoaded();let d=this.getLayer(e);d?a.bC(d.getPaintProperty(i),l)||(d.setPaintProperty(i,l,c)&&this._updateLayer(d),this._changed=!0,this._updatedPaintProps[e]=!0,this._serializedLayers=null):this.fire(new a.k(new Error(`Cannot style non-existing layer "${e}".`)))}getPaintProperty(e,i){return this.getLayer(e).getPaintProperty(i)}setFeatureState(e,i){this._checkLoaded();let l=e.source,c=e.sourceLayer,d=this.sourceCaches[l];if(d===void 0)return void this.fire(new a.k(new Error(`The source '${l}' does not exist in the map's style.`)));let v=d.getSource().type;v==="geojson"&&c?this.fire(new a.k(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):v!=="vector"||c?(e.id===void 0&&this.fire(new a.k(new Error("The feature id parameter must be provided."))),d.setFeatureState(c,e.id,i)):this.fire(new a.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,i){this._checkLoaded();let l=e.source,c=this.sourceCaches[l];if(c===void 0)return void this.fire(new a.k(new Error(`The source '${l}' does not exist in the map's style.`)));let d=c.getSource().type,v=d==="vector"?e.sourceLayer:void 0;d!=="vector"||v?i&&typeof e.id!="string"&&typeof e.id!="number"?this.fire(new a.k(new Error("A feature id is required to remove its specific state property."))):c.removeFeatureState(v,e.id,i):this.fire(new a.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();let i=e.source,l=e.sourceLayer,c=this.sourceCaches[i];if(c!==void 0)return c.getSource().type!=="vector"||l?(e.id===void 0&&this.fire(new a.k(new Error("The feature id parameter must be provided."))),c.getFeatureState(l,e.id)):void this.fire(new a.k(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new a.k(new Error(`The source '${i}' does not exist in the map's style.`)))}getTransition(){return a.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let e=a.bD(this.sourceCaches,d=>d.serialize()),i=this._serializeByIds(this._order,!0),l=this.map.getTerrain()||void 0,c=this.stylesheet;return a.bE({version:c.version,name:c.name,metadata:c.metadata,light:c.light,sky:c.sky,center:c.center,zoom:c.zoom,bearing:c.bearing,pitch:c.pitch,sprite:c.sprite,glyphs:c.glyphs,transition:c.transition,projection:c.projection,sources:e,layers:i,terrain:l},d=>d!==void 0)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&this.sourceCaches[e.source].getSource().type!=="raster"&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){let i=v=>
724this._layers[v].type==="fill-extrusion",l={},c=[];for(let v=this._order.length-1;v>=0;v--){let w=this._order[v];if(i(w)){l[w]=v;for(let P of e){let C=P[w];if(C)for(let L of C)c.push(L)}}}c.sort((v,w)=>w.intersectionZ-v.intersectionZ);let d=[];for(let v=this._order.length-1;v>=0;v--){let w=this._order[v];if(i(w))for(let P=c.length-1;P>=0;P--){let C=c[P].feature;if(l[C.layer.id]<v)break;d.push(C),c.pop()}else for(let P of e){let C=P[w];if(C)for(let L of C)d.push(L.feature)}}return d}queryRenderedFeatures(e,i,l){i&&i.filter&&this._validate(a.y.filter,"queryRenderedFeatures.filter",i.filter,null,i);let c={};if(i&&i.layers){if(!(Array.isArray(i.layers)||i.layers instanceof Set))return this.fire(new a.k(new Error("parameters.layers must be an Array or a Set of strings"))),[];for(let C of i.layers){let L=this._layers[C];if(!L)return this.fire(new a.k(new Error(`The layer '${C}' does not exist in the map's style and cannot be queried for features.`))),[];c[L.source]=!0}}let d=[];i.availableImages=this._availableImages;let v=this._serializedAllLayers(),w=i.layers instanceof Set?i.layers:Array.isArray(i.layers)?new Set(i.layers):null,P=Object.assign(Object.assign({},i),{layers:w});for(let C in this.sourceCaches)i.layers&&!c[C]||d.push(oi(this.sourceCaches[C],this._layers,v,e,P,l,this.map.terrain?(L,N,R)=>this.map.terrain.getElevation(L,N,R):void 0));return this.placement&&d.push(function(C,L,N,R,K,ee,he){let ue={},de=ee.queryRenderedSymbols(R),me=[];for(let xe of Object.keys(de).map(Number))me.push(he[xe]);me.sort(si);for(let xe of me){let Se=xe.featureIndex.lookupSymbolFeatures(de[xe.bucketInstanceId],L,xe.bucketIndex,xe.sourceLayerIndex,K.filter,K.layers,K.availableImages,C);for(let Pe in Se){let Ae=ue[Pe]=ue[Pe]||[],Me=Se[Pe];Me.sort((Ue,Ve)=>{let ot=xe.featureSortOrder;if(ot){let ut=ot.indexOf(Ue.featureIndex);return ot.indexOf(Ve.featureIndex)-ut}return Ve.featureIndex-Ue.featureIndex});for(let Ue of Me)Ae.push(Ue)}}return function(xe,Se,Pe){for(let Ae in xe)for(let Me of xe[Ae])Di(Me,Pe[Se[Ae].source]);return xe}(ue,C,N)}(this._layers,v,this.sourceCaches,e,P,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(d)}querySourceFeatures(e,i){i&&i.filter&&this._validate(a.y.filter,"querySourceFeatures.filter",i.filter,null,i);let l=this.sourceCaches[e];return l?function(c,d){let v=c.getRenderableIds().map(C=>c.getTileByID(C)),w=[],P={};for(let C=0;C<v.length;C++){let L=v[C],N=L.tileID.canonical.key;P[N]||(P[N]=!0,L.querySourceFeatures(w,d))}return w}(l,i):[]}getLight(){return this.light.getLight()}setLight(e,i={}){this._checkLoaded();let l=this.light.getLight(),c=!1;for(let v in e)if(!a.bC(e[v],l[v])){c=!0;break}if(!c)return;let d={now:U.now(),transition:a.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,i),this.light.updateTransitions(d)}getProjection(){var e;return(e=this.stylesheet)===null||e===void 0?void 0:e.projection}setProjection(e){if(this._checkLoaded(),this.projection){if(this.projection.name===e.type)return;this.projection.destroy(),delete this.projection}this.stylesheet.projection=e,this._setProjectionInternal(e.type)}getSky(){var e;return(e=this.stylesheet)===null||e===void 0?void 0:e.sky}setSky(e,i={}){this._checkLoaded();let l=this.getSky(),c=!1;if(!e&&!l)return;if(e&&!l)c=!0;else if(!e&&l)c=!0;else for(let v in e)if(!a.bC(e[v],l[v])){c=!0;break}if(!c)return;let d={now:U.now(),transition:a.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=e,this.sky.setSky(e,i),this.sky.updateTransitions(d)}_setProjectionInternal(e){let i=function(l){if(Array.isArray(l)){let c=new na({type:l});return{projection:c,transform:new Te,cameraHelper:new Fe(c)}}switch(l){case"mercator":return{projection:new gi,transform:new Gi,cameraHelper:new Vr};case"globe":{let c=new na({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:c,transform:new Te,cameraHelper:new Fe(c)}}case"vertical-perspective":return{projection:new ia,transform:new te,cameraHelper:new _e};default:return a.w(`Unknown projection name: ${l}. Falling back to mercator projection.`),{projection:new gi,transform:new Gi,cameraHelper:new Vr}}}(e);this.projection=i.projection,this.map.migrateProjection(i.transform,i.cameraHelper);for(let l in this.sourceCaches)this.sourceCaches[l].reload()}_validate(e,i,l,c,d={}){return(!d||d.validate!==!1)&&rt(this,e.call(a.y,a.e({key:i,style:this.serialize(),value:l,styleSpec:a.v},c)))}_remove(e=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),un().off(Yr,this._rtlPluginLoaded);for(let i in this._layers)this._layers[i].setEventedParent(null);for(let i in this.sourceCaches){let l=this.sourceCaches[i];l.setEventedParent(null),l.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),e&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(e)}_clearSource(e){this.sourceCaches[e].clearTiles()}_reloadSource(e){this.sourceCaches[e].resume(),this.sourceCaches[e].reload()}_updateSources(e){for(let i in this.sourceCaches)this.sourceCaches[i].update(e,this.map.terrain)}_generateCollisionBoxes(){for(let e in this.sourceCaches)this._reloadSource(e)}_updatePlacement(e,i,l,c,d=!1){let v=!1,w=!1,P={};for(let C of this._order){let L=this._layers[C];if(L.type!=="symbol")continue;if(!P[L.source]){let R=this.sourceCaches[L.source];P[L.source]=R.getRenderableIds(!0).map(K=>R.getTileByID(K)).sort((K,ee)=>ee.tileID.overscaledZ-K.tileID.overscaledZ||(K.tileID.isLessThan(ee.tileID)?-1:1))}let N=this.crossTileSymbolIndex.addLayer(L,P[L.source],e.center.lng);v=v||N}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((d=d||this._layerOrderChanged||l===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(U.now(),e.zoom))&&(this.pauseablePlacement=new xo(e,this.map.terrain,this._order,d,i,l,c,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,P),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(U.now()),w=!0),v&&this.pauseablePlacement.placement.setStale()),w||v)for(let C of this._order){let L=this._layers[C];L.type==="symbol"&&this.placement.updateLayerOpacities(L,P[L.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(U.now())}_releaseSymbolFadeTiles(){for(let e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,i){return a._(this,void 0,void 0,function*(){let l=yield this.imageManager.getImages(i.icons);this._updateTilesForChangedImages();let c=this.sourceCaches[i.source];return c&&c.setDependencies(i.tileID.key,i.type,i.icons),l})}getGlyphs(e,i){return a._(this,void 0,void 0,function*(){let l=yield this.glyphManager.getGlyphs(i.stacks),c=this.sourceCaches[i.source];return c&&c.setDependencies(i.tileID.key,i.type,[""]),l})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,i={}
724){this._checkLoaded(),e&&this._validate(a.y.glyphs,"glyphs",e,null,i)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}addSprite(e,i,l={},c){this._checkLoaded();let d=[{id:e,url:i}],v=[...we(this.stylesheet.sprite),...d];this._validate(a.y.sprite,"sprite",v,null,l)||(this.stylesheet.sprite=v,this._loadSprite(d,!0,c))}removeSprite(e){this._checkLoaded();let i=we(this.stylesheet.sprite);if(i.find(l=>l.id===e)){if(this._spritesImagesIds[e])for(let l of this._spritesImagesIds[e])this.imageManager.removeImage(l),this._changedImages[l]=!0;i.splice(i.findIndex(l=>l.id===e),1),this.stylesheet.sprite=i.length>0?i:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.l("data",{dataType:"style"}))}else this.fire(new a.k(new Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return we(this.stylesheet.sprite)}setSprite(e,i={},l){this._checkLoaded(),e&&this._validate(a.y.sprite,"sprite",e,null,i)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,l):(this._unloadSprite(),l&&l(null)))}}var Pt=a.aD([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class ei{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,i,l,c,d,v,w,P,C){this.context=e;let L=this.boundPaintVertexBuffers.length!==c.length;for(let N=0;!L&&N<c.length;N++)this.boundPaintVertexBuffers[N]!==c[N]&&(L=!0);!this.vao||this.boundProgram!==i||this.boundLayoutVertexBuffer!==l||L||this.boundIndexBuffer!==d||this.boundVertexOffset!==v||this.boundDynamicVertexBuffer!==w||this.boundDynamicVertexBuffer2!==P||this.boundDynamicVertexBuffer3!==C?this.freshBind(i,l,c,d,v,w,P,C):(e.bindVertexArray.set(this.vao),w&&w.bind(),d&&d.dynamicDraw&&d.bind(),P&&P.bind(),C&&C.bind())}freshBind(e,i,l,c,d,v,w,P){let C=e.numAttributes,L=this.context,N=L.gl;this.vao&&this.destroy(),this.vao=L.createVertexArray(),L.bindVertexArray.set(this.vao),this.boundProgram=e,this.boundLayoutVertexBuffer=i,this.boundPaintVertexBuffers=l,this.boundIndexBuffer=c,this.boundVertexOffset=d,this.boundDynamicVertexBuffer=v,this.boundDynamicVertexBuffer2=w,this.boundDynamicVertexBuffer3=P,i.enableAttributes(N,e);for(let R of l)R.enableAttributes(N,e);v&&v.enableAttributes(N,e),w&&w.enableAttributes(N,e),P&&P.enableAttributes(N,e),i.bind(),i.setVertexAttribPointers(N,e,d);for(let R of l)R.bind(),R.setVertexAttribPointers(N,e,d);v&&(v.bind(),v.setVertexAttribPointers(N,e,d)),c&&c.bind(),w&&(w.bind(),w.setVertexAttribPointers(N,e,d)),P&&(P.bind(),P.setVertexAttribPointers(N,e,d)),L.currentNumAttributes=C}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}let ni=(h,e,i,l,c)=>({u_texture:0,u_ele_delta:h,u_fog_matrix:e,u_fog_color:i?i.properties.get("fog-color"):a.b7.white,u_fog_ground_blend:i?i.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:c?0:i?i.calculateFogBlendOpacity(l):0,u_horizon_color:i?i.properties.get("horizon-color"):a.b7.white,u_horizon_fog_blend:i?i.properties.get("horizon-fog-blend"):1,u_is_globe_mode:c?1:0}),ci={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function ir(h){let e=[];for(let i=0;i<h.length;i++){if(h[i]===null)continue;let l=h[i].split(" ");e.push(l.pop())}return e}class er{constructor(e,i,l,c,d,v,w,P){let C=e.gl;this.program=C.createProgram();let L=ir(i.staticAttributes),N=l?l.getBinderAttributes():[],R=L.concat(N),K=yn.prelude.staticUniforms?ir(yn.prelude.staticUniforms):[],ee=w.staticUniforms?ir(w.staticUniforms):[],he=i.staticUniforms?ir(i.staticUniforms):[],ue=l?l.getBinderUniforms():[],de=K.concat(ee).concat(he).concat(ue),me=[];for(let Ve of de)me.indexOf(Ve)<0&&me.push(Ve);let xe=l?l.defines():[];_n(C)&&xe.unshift("#version 300 es"),d&&xe.push("#define OVERDRAW_INSPECTOR;"),v&&xe.push("#define TERRAIN3D;"),P&&xe.push(P);let Se=xe.concat(yn.prelude.fragmentSource,w.fragmentSource,i.fragmentSource).join(` 725`),Pe=xe.concat(yn.prelude.vertexSource,w.vertexSource,i.vertexSource).join(` 726`);_n(C)||(Se=function(Ve){return Ve.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(Se),Pe=function(Ve){return Ve.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(Pe));let Ae=C.createShader(C.FRAGMENT_SHADER);if(C.isContextLost())return void(this.failedToCreate=!0);if(C.shaderSource(Ae,Se),C.compileShader(Ae),!C.getShaderParameter(Ae,C.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${C.getShaderInfoLog(Ae)}`);C.attachShader(this.program,Ae);let Me=C.createShader(C.VERTEX_SHADER);if(C.isContextLost())return void(this.failedToCreate=!0);if(C.shaderSource(Me,Pe),C.compileShader(Me),!C.getShaderParameter(
726Me,C.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${C.getShaderInfoLog(Me)}`);C.attachShader(this.program,Me),this.attributes={};let Ue={};this.numAttributes=R.length;for(let Ve=0;Ve<this.numAttributes;Ve++)R[Ve]&&(C.bindAttribLocation(this.program,Ve,R[Ve]),this.attributes[R[Ve]]=Ve);if(C.linkProgram(this.program),!C.getProgramParameter(this.program,C.LINK_STATUS))throw new Error(`Program failed to link: ${C.getProgramInfoLog(this.program)}`);C.deleteShader(Me),C.deleteShader(Ae);for(let Ve=0;Ve<me.length;Ve++){let ot=me[Ve];if(ot&&!Ue[ot]){let ut=C.getUniformLocation(this.program,ot);ut&&(Ue[ot]=ut)}}this.fixedUniforms=c(e,Ue),this.terrainUniforms=((Ve,ot)=>({u_depth:new a.bF(Ve,ot.u_depth),u_terrain:new a.bF(Ve,ot.u_terrain),u_terrain_dim:new a.b8(Ve,ot.u_terrain_dim),u_terrain_matrix:new a.bH(Ve,ot.u_terrain_matrix),u_terrain_unpack:new a.bI(Ve,ot.u_terrain_unpack),u_terrain_exaggeration:new a.b8(Ve,ot.u_terrain_exaggeration)}))(e,Ue),this.projectionUniforms=((Ve,ot)=>({u_projection_matrix:new a.bH(Ve,ot.u_projection_matrix),u_projection_tile_mercator_coords:new a.bI(Ve,ot.u_projection_tile_mercator_coords),u_projection_clipping_plane:new a.bI(Ve,ot.u_projection_clipping_plane),u_projection_transition:new a.b8(Ve,ot.u_projection_transition),u_projection_fallback_matrix:new a.bH(Ve,ot.u_projection_fallback_matrix)}))(e,Ue),this.binderUniforms=l?l.getUniforms(e,Ue):[]}draw(e,i,l,c,d,v,w,P,C,L,N,R,K,ee,he,ue,de,me,xe){let Se=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(l),e.setStencilMode(c),e.setColorMode(d),e.setCullFace(v),P){e.activeTexture.set(Se.TEXTURE2),Se.bindTexture(Se.TEXTURE_2D,P.depthTexture),e.activeTexture.set(Se.TEXTURE3),Se.bindTexture(Se.TEXTURE_2D,P.texture);for(let Ae in this.terrainUniforms)this.terrainUniforms[Ae].set(P[Ae])}if(C)for(let Ae in C)this.projectionUniforms[ci[Ae]].set(C[Ae]);if(w)for(let Ae in this.fixedUniforms)this.fixedUniforms[Ae].set(w[Ae]);ue&&ue.setUniforms(e,this.binderUniforms,ee,{zoom:he});let Pe=0;switch(i){case Se.LINES:Pe=2;break;case Se.TRIANGLES:Pe=3;break;case Se.LINE_STRIP:Pe=1}for(let Ae of K.get()){let Me=Ae.vaos||(Ae.vaos={});(Me[L]||(Me[L]=new ei)).bind(e,this,N,ue?ue.getPaintVertexBuffers():[],R,Ae.vertexOffset,de,me,xe),Se.drawElements(i,Ae.primitiveLength*Pe,Se.UNSIGNED_SHORT,Ae.primitiveOffset*Pe*2)}}}function Jr(h,e,i){let l=1/a.aw(i,1,e.transform.tileZoom),c=Math.pow(2,i.tileID.overscaledZ),d=i.tileSize*Math.pow(2,e.transform.tileZoom)/c,v=d*(i.tileID.canonical.x+i.tileID.wrap*c),w=d*i.tileID.canonical.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[l,h.fromScale,h.toScale],u_fade:h.t,u_pixel_coord_upper:[v>>16,w>>16],u_pixel_coord_lower:[65535&v,65535&w]}}let In=(h,e,i,l)=>{let c=h.style.light,d=c.properties.get("position"),v=[d.x,d.y,d.z],w=a.bL();c.properties.get("anchor")==="viewport"&&a.bM(w,h.transform.bearingInRadians),a.bN(v,v,w);let P=h.transform.transformLightDirection(v),C=c.properties.get("color");return{u_lightpos:v,u_lightpos_globe:P,u_lightintensity:c.properties.get("intensity"),u_lightcolor:[C.r,C.g,C.b],u_vertical_gradient:+e,u_opacity:i,u_fill_translate:l}},hi=(h,e,i,l,c,d,v)=>a.e(In(h,e,i,l),Jr(d,h,v),{u_height_factor:-Math.pow(2,c.overscaledZ)/v.tileSize/8}),ps=(h,e,i,l)=>a.e(Jr(e,h,i),{u_fill_translate:l}),pi=(h,e)=>({u_world:h,u_fill_translate:e}),rr=(h,e,i,l,c)=>a.e(ps(h,e,i,c),{u_world:l}),sa=(h,e,i,l,c)=>{let d=h.transform,v,w,P=0;if(i.paint.get("circle-pitch-alignment")==="map"){let C=a.aw(e,1,d.zoom);v=!0,w=[C,C],P=C/(a.Z*Math.pow(2,e.tileID.overscaledZ))*2*Math.PI*c}else v=!1,w=d.pixelsToGLUnits;return{u_camera_to_center_distance:d.cameraToCenterDistance,u_scale_with_map:+(i.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+v,u_device_pixel_ratio:h.pixelRatio,u_extrude_scale:w,u_globe_extrude_scale:P,u_translate:l}},To=h=>({u_pixel_extrude_scale:[1/h.width,1/h.height]}),An=h=>({u_viewport_size:[h.width,h.height]}),fs=(h,e=1)=>({u_color:h,u_overlay:0,u_overlay_scale:e}),vn=(h,e,i,l)=>{let c=a.aw(h,1,e)/(a.Z*Math.pow(2,h.tileID.overscaledZ))*2*Math.PI*l;return{u_extrude_scale:a.aw(h,1,e),u_intensity:i,u_globe_extrude_scale:c}},Nn=(h,e,i,l)=>{let c=a.K();a.bO(c,0,h.width,h.height,0,0,1);let d=h.context.gl;return{u_matrix:c,u_world:[d.drawingBufferWidth,d.drawingBufferHeight],u_image:i,u_color_ramp:l,u_opacity:e.paint.get("heatmap-opacity")}},Jn=(h,e,i)=>{let l=i.paint.get("hillshade-shadow-color"),c=i.paint.get("hillshade-highlight-color"),d=i.paint.get("hillshade-accent-color"),v=i.paint.get("hillshade-illumination-direction")*(Math.PI/180);return i.paint.get("hillshade-illumination-anchor")==="viewport"&&(v+=h.transform.bearingInRadians),{u_image:0,u_latrange:Qn(0,e.tileID),u_light:[i.paint.get("hillshade-exaggeration"),v],u_shadow:l,u_highlight:c,u_accent:d}},dn=(h,e)=>{let i=e.stride,l=a.K();return a.bO(l,0,a.Z,-8192,0,0,1),a.L(l,l,[0,-8192,0]),{u_matrix:l,u_image:1,u_dimension:[i,i],u_zoom:h.overscaledZ,u_unpack:e.getUnpackVector()}};function Qn(h,e){let i=Math.pow(2,e.canonical.z),l=e.canonical.y;return[new a.$(0,l/i).toLngLat().lat,new a.$(0,(l+1)/i).toLngLat().lat]}let bn=(h,e,i,l)=>{let c=h.transform;return{u_translation:Ci(h,e,i),u_ratio:l/a.aw(e,1,c.zoom),u_device_pixel_ratio:h.pixelRatio,u_units_to_pixels:[1/c.pixelsToGLUnits[0],1/c.pixelsToGLUnits[1]]}},jn=(h,e,i,l,c)=>a.e(bn(h,e,i,l),{u_image:0,u_image_height:c}),wa=(h,e,i,l,c)=>{let d=h.transform,v=Sa(e,d);return{u_translation:Ci(h,e,i),u_texsize:e.imageAtlasTexture.size,u_ratio:l/a.aw(e,1,d.zoom),u_device_pixel_ratio:h.pixelRatio,u_image:0,u_scale:[v,c.fromScale,c.toScale],u_fade:c.t,u_units_to_pixels:[1/d.pixelsToGLUnits[0],1/d.pixelsToGLUnits[1]]}},Hl=(h,e,i,l,c,d)=>{let v=h.lineAtlas,w=Sa(e,h.transform),P=i.layout.get("line-cap")==="round",C=v.getDash(c.from,P),L=v.getDash(c.to,P),N=C.width*d.fromScale,R=L.width*d.toScale;return a.e(bn(h,e,i,l),{u_patternscale_a:[w/N,-C.height/2],u_patternscale_b:[w/R,-L.height/2],u_sdfgamma:v.width/(256*Math.min(N,R)*h.pixelRatio)/2,u_image:0,u_tex_y_a:C.y,u_tex_y_b:L.y,u_mix:d.t})};function Sa(h,e){return 1/a.aw(h,1,e.tileZoom)}function Ci(h,e,i){return a.ax(h.transform,e,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"))}let Ha=(h,e,i,l,c)=>{return{u_tl_parent:h,u_scale_parent:e,u_buffer_scale:1,u_fade_t:i.mix,u_opacity:i.opacity*l.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:l.paint.get("raster-brightness-min"),u_brightness_high:l.paint.get("raster-brightness-max"),u_saturation_factor:(v=l.paint.get("raster-saturation"),v>0?1-1/(1.001-v):-v),u_contrast_factor:(d=l.paint.get("raster-contrast"),d>0?1/(1-d):1+d),u_spin_weights:xn(l.paint.get("raster-hue-rotate")),u_coords_top:[c[0].x,c[0].y,c[
vendor: 7,433 bytes, line 726
7261].x,c[1].y],u_coords_bottom:[c[3].x,c[3].y,c[2].x,c[2].y]};var d,v};function xn(h){h*=Math.PI/180;let e=Math.sin(h),i=Math.cos(h);return[(2*i+1)/3,(-Math.sqrt(3)*e-i+1)/3,(Math.sqrt(3)*e-i+1)/3]}let ms=(h,e,i,l,c,d,v,w,P,C,L,N,R)=>{let K=v.transform;return{u_is_size_zoom_constant:+(h==="constant"||h==="source"),u_is_size_feature_constant:+(h==="constant"||h==="camera"),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:K.cameraToCenterDistance,u_pitch:K.pitch/360*2*Math.PI,u_rotate_symbol:+i,u_aspect_ratio:K.width/K.height,u_fade_change:v.options.fadeDuration?v.symbolFadeChange:1,u_label_plane_matrix:w,u_coord_matrix:P,u_is_text:+L,u_pitch_with_map:+l,u_is_along_line:c,u_is_variable_anchor:d,u_texsize:N,u_texture:0,u_translation:C,u_pitched_scale:R}},Po=(h,e,i,l,c,d,v,w,P,C,L,N,R,K)=>{let ee=v.transform;return a.e(ms(h,e,i,l,c,d,v,w,P,C,L,N,K),{u_gamma_scale:l?Math.cos(ee.pitch*Math.PI/180)*ee.cameraToCenterDistance:1,u_device_pixel_ratio:v.pixelRatio,u_is_halo:1})},Eo=(h,e,i,l,c,d,v,w,P,C,L,N,R)=>a.e(Po(h,e,i,l,c,d,v,w,P,C,!0,L,0,R),{u_texsize_icon:N,u_texture_icon:1}),Mo=(h,e)=>({u_opacity:h,u_color:e}),$n=(h,e,i,l,c)=>a.e(function(d,v,w,P){let C=w.imageManager.getPattern(d.from.toString()),L=w.imageManager.getPattern(d.to.toString()),{width:N,height:R}=w.imageManager.getPixelSize(),K=Math.pow(2,P.tileID.overscaledZ),ee=P.tileSize*Math.pow(2,w.transform.tileZoom)/K,he=ee*(P.tileID.canonical.x+P.tileID.wrap*K),ue=ee*P.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:C.tl,u_pattern_br_a:C.br,u_pattern_tl_b:L.tl,u_pattern_br_b:L.br,u_texsize:[N,R],u_mix:v.t,u_pattern_size_a:C.displaySize,u_pattern_size_b:L.displaySize,u_scale_a:v.fromScale,u_scale_b:v.toScale,u_tile_units_to_pixels:1/a.aw(P,1,w.transform.tileZoom),u_pixel_coord_upper:[he>>16,ue>>16],u_pixel_coord_lower:[65535&he,65535&ue]}}(i,c,e,l),{u_opacity:h}),wn=(h,e)=>{},Vn={fillExtrusion:(h,e)=>({u_lightpos:new a.bJ(h,e.u_lightpos),u_lightpos_globe:new a.bJ(h,e.u_lightpos_globe),u_lightintensity:new a.b8(h,e.u_lightintensity),u_lightcolor:new a.bJ(h,e.u_lightcolor),u_vertical_gradient:new a.b8(h,e.u_vertical_gradient),u_opacity:new a.b8(h,e.u_opacity),u_fill_translate:new a.bK(h,e.u_fill_translate)}),fillExtrusionPattern:(h,e)=>({u_lightpos:new a.bJ(h,e.u_lightpos),u_lightpos_globe:new a.bJ(h,e.u_lightpos_globe),u_lightintensity:new a.b8(h,e.u_lightintensity),u_lightcolor:new a.bJ(h,e.u_lightcolor),u_vertical_gradient:new a.b8(h,e.u_vertical_gradient),u_height_factor:new a.b8(h,e.u_height_factor),u_opacity:new a.b8(h,e.u_opacity),u_fill_translate:new a.bK(h,e.u_fill_translate),u_image:new a.bF(h,e.u_image),u_texsize:new a.bK(h,e.u_texsize),u_pixel_coord_upper:new a.bK(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new a.bK(h,e.u_pixel_coord_lower),u_scale:new a.bJ(h,e.u_scale),u_fade:new a.b8(h,e.u_fade)}),fill:(h,e)=>({u_fill_translate:new a.bK(h,e.u_fill_translate)}),fillPattern:(h,e)=>({u_image:new a.bF(h,e.u_image),u_texsize:new a.bK(h,e.u_texsize),u_pixel_coord_upper:new a.bK(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new a.bK(h,e.u_pixel_coord_lower),u_scale:new a.bJ(h,e.u_scale),u_fade:new a.b8(h,e.u_fade),u_fill_translate:new a.bK(h,e.u_fill_translate)}),fillOutline:(h,e)=>({u_world:new a.bK(h,e.u_world),u_fill_translate:new a.bK(h,e.u_fill_translate)}),fillOutlinePattern:(h,e)=>({u_world:new a.bK(h,e.u_world),u_image:new a.bF(h,e.u_image),u_texsize:new a.bK(h,e.u_texsize),u_pixel_coord_upper:new a.bK(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new a.bK(h,e.u_pixel_coord_lower),u_scale:new a.bJ(h,e.u_scale),u_fade:new a.b8(h,e.u_fade),u_fill_translate:new a.bK(h,e.u_fill_translate)}),circle:(h,e)=>({u_camera_to_center_distance:new a.b8(h,e.u_camera_to_center_distance),u_scale_with_map:new a.bF(h,e.u_scale_with_map),u_pitch_with_map:new a.bF(h,e.u_pitch_with_map),u_extrude_scale:new a.bK(h,e.u_extrude_scale),u_device_pixel_ratio:new a.b8(h,e.u_device_pixel_ratio),u_globe_extrude_scale:new a.b8(h,e.u_globe_extrude_scale),u_translate:new a.bK(h,e.u_translate)}),collisionBox:(h,e)=>({u_pixel_extrude_scale:new a.bK(h,e.u_pixel_extrude_scale)}),collisionCircle:(h,e)=>({u_viewport_size:new a.bK(h,e.u_viewport_size)}),debug:(h,e)=>({u_color:new a.bG(h,e.u_color),u_overlay:new a.bF(h,e.u_overlay),u_overlay_scale:new a.b8(h,e.u_overlay_scale)}),depth:wn,clippingMask:wn,heatmap:(h,e)=>({u_extrude_scale:new a.b8(h,e.u_extrude_scale),u_intensity:new a.b8(h,e.u_intensity),u_globe_extrude_scale:new a.b8(h,e.u_globe_extrude_scale)}),heatmapTexture:(h,e)=>({u_matrix:new a.bH(h,e.u_matrix),u_world:new a.bK(h,e.u_world),u_image:new a.bF(h,e.u_image),u_color_ramp:new a.bF(h,e.u_color_ramp),u_opacity:new a.b8(h,e.u_opacity)}),hillshade:(h,e)=>({u_image:new a.bF(h,e.u_image),u_latrange:new a.bK(h,e.u_latrange),u_light:new a.bK(h,e.u_light),u_shadow:new a.bG(h,e.u_shadow),u_highlight:new a.bG(h,e.u_highlight),u_accent:new a.bG(h,e.u_accent)}),hillshadePrepare:(h,e)=>({u_matrix:new a.bH(h,e.u_matrix),u_image:new a.bF(h,e.u_image),u_dimension:new a.bK(h,e.u_dimension),u_zoom:new a.b8(h,e.u_zoom),u_unpack:new a.bI(h,e.u_unpack)}),line:(h,e)=>({u_translation:new a.bK(h,e.u_translation),u_ratio:new a.b8(h,e.u_ratio),u_device_pixel_ratio:new a.b8(h,e.u_device_pixel_ratio),u_units_to_pixels:new a.bK(h,e.u_units_to_pixels)}),lineGradient:(h,e)=>({u_translation:new a.bK(h,e.u_translation),u_ratio:new a.b8(h,e.u_ratio),u_device_pixel_ratio:new a.b8(h,e.u_device_pixel_ratio),u_units_to_pixels:new a.bK(h,e.u_units_to_pixels),u_image:new a.bF(h,e.u_image),u_image_height:new a.b8(h,e.u_image_height)}),linePattern:(h,e)=>({u_translation:new a.bK(h,e.u_translation),u_texsize:new a.bK(h,e.u_texsize),u_ratio:new a.b8(h,e.u_ratio),u_device_pixel_ratio:new a.b8(h,e.u_device_pixel_ratio),u_image:new a.bF(h,e.u_image),u_units_to_pixels:new a.bK(h,e.u_units_to_pixels),u_scale:new a.bJ(h,e.u_scale),u_fade:new a.b8(h,e.u_fade)}),lineSDF:(h,e)=>({u_translation:new a.bK(h,e.u_translation),u_ratio:new a.b8(h,e.u_ratio),u_device_pixel_ratio:new a.b8(h,e.u_device_pixel_ratio),u_units_to_pixels:new a.bK(h,e.u_units_to_pixels),u_patternscale_a:new a.bK(h,e.u_patternscale_a),u_patternscale_b:new a.bK(h,e.u_patternscale_b),u_sdfgamma:new a.b8(h,e.u_sdfgamma),u_image:new a.bF(h,e.u_image),u_tex_y_a:new a.b8(h,e.u_tex_y_a),u_tex_y_b:new a.b8(h,e.u_tex_y_b),u_mix:new a.b8(h,e.u_mix)}),raster:(h,e)=>({u_tl_parent:new a.bK(h,e.u_tl_parent),u_scale_parent:new a.b8(h,e.u_scale_parent),u_buffer_scale:new a.b8(h,e.u_buffer_scale),u_fade_t:new a.b8(h,e.u_fade_t),u_opacity:new a.b8(h,e.u_opacity),u_image0:new a.bF(h,e.u_image0),u_image1:new a.bF(h,e.u_image1),u_brightness_low:new a.b8(h,e.u_brightness_low),u_brightness_high:new a.b8(h,e.u_brightness_high),u_saturation_factor:new a.b8(h,e.u_saturation_factor),u_contrast_factor:new a.b8(h,e.u_contrast_factor),u_spin_weights:new a.bJ(h,e.u_spin_weights),u_coords_top:new a.bI(h,e.u_coords_top),u_coords_bottom:new a.bI(h,e.u_coords_bottom)}),symbolIcon:(h,e)=>({u_is_size_zoom_constant:new a.bF(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new a.bF(h,e.u_is_size_feature_constant),u_size_t:new a.b8(h,e.u_size_t),u_size:new a.b8(h,e.u_size),u_camera_to_center_distance:new a.b8(h,e.u_camera_to_center_distance),u_pitch:new a.b8(h,e.u_pitch),u_rotate_symbol:new a.bF(h,e.u_rotate_symbol),u_aspect_ratio:new a.b8(h,e.u_aspect_ratio),u_fade_change:new a.b8(h,e.u_fade_change),u_label_plane_matrix:new a.bH(h,e.u_label_plane_matrix
726),u_coord_matrix:new a.bH(h,e.u_coord_matrix),u_is_text:new a.bF(h,e.u_is_text),u_pitch_with_map:new a.bF(h,e.u_pitch_with_map),u_is_along_line:new a.bF(h,e.u_is_along_line),u_is_variable_anchor:new a.bF(h,e.u_is_variable_anchor),u_texsize:new a.bK(h,e.u_texsize),u_texture:new a.bF(h,e.u_texture),u_translation:new a.bK(h,e.u_translation),u_pitched_scale:new a.b8(h,e.u_pitched_scale)}),symbolSDF:(h,e)=>({u_is_size_zoom_constant:new a.bF(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new a.bF(h,e.u_is_size_feature_constant),u_size_t:new a.b8(h,e.u_size_t),u_size:new a.b8(h,e.u_size),u_camera_to_center_distance:new a.b8(h,e.u_camera_to_center_distance),u_pitch:new a.b8(h,e.u_pitch),u_rotate_symbol:new a.bF(h,e.u_rotate_symbol),u_aspect_ratio:new a.b8(h,e.u_aspect_ratio),u_fade_change:new a.b8(h,e.u_fade_change),u_label_plane_matrix:new a.bH(h,e.u_label_plane_matrix),u_coord_matrix:new a.bH(h,e.u_coord_matrix),u_is_text:new a.bF(h,e.u_is_text),u_pitch_with_map:new a.bF(h,e.u_pitch_with_map),u_is_along_line:new a.bF(h,e.u_is_along_line),u_is_variable_anchor:new a.bF(h,e.u_is_variable_anchor),u_texsize:new a.bK(h,e.u_texsize),u_texture:new a.bF(h,e.u_texture),u_gamma_scale:new a.b8(h,e.u_gamma_scale),u_device_pixel_ratio:new a.b8(h,e.u_device_pixel_ratio),u_is_halo:new a.bF(h,e.u_is_halo),u_translation:new a.bK(h,e.u_translation),u_pitched_scale:new a.b8(h,e.u_pitched_scale)}),symbolTextAndIcon:(h,e)=>({u_is_size_zoom_constant:new a.bF(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new a.bF(h,e.u_is_size_feature_constant),u_size_t:new a.b8(h,e.u_size_t),u_size:new a.b8(h,e.u_size),u_camera_to_center_distance:new a.b8(h,e.u_camera_to_center_distance),u_pitch:new a.b8(h,e.u_pitch),u_rotate_symbol:new a.bF(h,e.u_rotate_symbol),u_aspect_ratio:new a.b8(h,e.u_aspect_ratio),u_fade_change:new a.b8(h,e.u_fade_change),u_label_plane_matrix:new a.bH(h,e.u_label_plane_matrix),u_coord_matrix:new a.bH(h,e.u_coord_matrix),u_is_text:new a.bF(h,e.u_is_text),u_pitch_with_map:new a.bF(h,e.u_pitch_with_map),u_is_along_line:new a.bF(h,e.u_is_along_line),u_is_variable_anchor:new a.bF(h,e.u_is_variable_anchor),u_texsize:new a.bK(h,e.u_texsize),u_texsize_icon:new a.bK(h,e.u_texsize_icon),u_texture:new a.bF(h,e.u_texture),u_texture_icon:new a.bF(h,e.u_texture_icon),u_gamma_scale:new a.b8(h,e.u_gamma_scale),u_device_pixel_ratio:new a.b8(h,e.u_device_pixel_ratio),u_is_halo:new a.bF(h,e.u_is_halo),u_translation:new a.bK(h,e.u_translation),u_pitched_scale:new a.b8(h,e.u_pitched_scale)}),background:(h,e)=>({u_opacity:new a.b8(h,e.u_opacity),u_color:new a.bG(h,e.u_color)}),backgroundPattern:(h,e)=>({u_opacity:new a.b8(h,e.u_opacity),u_image:new a.bF(h,e.u_image),u_pattern_tl_a:new a.bK(h,e.u_pattern_tl_a),u_pattern_br_a:new a.bK(h,e.u_pattern_br_a),u_pattern_tl_b:new a.bK(h,e.u_pattern_tl_b),u_pattern_br_b:new a.bK(h,e.u_pattern_br_b),u_texsize:new a.bK(h,e.u_texsize),u_mix:new a.b8(h,e.u_mix),u_pattern_size_a:new a.bK(h,e.u_pattern_size_a),u_pattern_size_b:new a.bK(h,e.u_pattern_size_b),u_scale_a:new a.b8(h,e.u_scale_a),u_scale_b:new a.b8(h,e.u_scale_b),u_pixel_coord_upper:new a.bK(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new a.bK(h,e.u_pixel_coord_lower),u_tile_units_to_pixels:new a.b8(h,e.u_tile_units_to_pixels)}),terrain:(h,e)=>({u_texture:new a.bF(h,e.u_texture),u_ele_delta:new a.b8(h,e.u_ele_delta),u_fog_matrix:new a.bH(h,e.u_fog_matrix),u_fog_color:new a.bG(h,e.u_fog_color),u_fog_ground_blend:new a.b8(h,e.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.b8(h,e.u_fog_ground_blend_opacity),u_horizon_color:new a.bG(h,e.u_horizon_color),u_horizon_fog_blend:new a.b8(h,e.u_horizon_fog_blend),u_is_globe_mode:new a.b8(h,e.u_is_globe_mode)}),terrainDepth:(h,e)=>({u_ele_delta:new a.b8(h,e.u_ele_delta)}),terrainCoords:(h,e)=>({u_texture:new a.bF(h,e.u_texture),u_terrain_coords_id:new a.b8(h,e.u_terrain_coords_id),u_ele_delta:new a.b8(h,e.u_ele_delta)}),projectionErrorMeasurement:(h,e)=>({u_input:new a.b8(h,e.u_input),u_output_expected:new a.b8(h,e.u_output_expected)}),atmosphere:(h,e)=>({u_sun_pos:new a.bJ(h,e.u_sun_pos),u_atmosphere_blend:new a.b8(h,e.u_atmosphere_blend),u_globe_position:new a.bJ(h,e.u_globe_position),u_globe_radius:new a.b8(h,e.u_globe_radius),u_inv_proj_matrix:new a.bH(h,e.u_inv_proj_matrix)}),sky:(h,e)=>({u_sky_color:new a.bG(h,e.u_sky_color),u_horizon_color:new a.bG(h,e.u_horizon_color),u_horizon:new a.bK(h,e.u_horizon),u_horizon_normal:new a.bK(h,e.u_horizon_normal),u_sky_horizon_blend:new a.b8(h,e.u_sky_horizon_blend),u_sky_blend:new a.b8(h,e.u_sky_blend)})};class qa{constructor(e,i,l){this.context=e;let c=e.gl;this.buffer=c.createBuffer(),this.dynamicDraw=!!l,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),c.bufferData(c.ELEMENT_ARRAY_BUFFER,i.arrayBuffer,this.dynamicDraw?c.DYNAMIC_DRAW:c.STATIC_DRAW),this.dynamicDraw||delete i.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){let i=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),i.bufferSubData(i.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Ds={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Ta{constructor(e,i,l,c){this.length=i.length,this.attributes=l,this.itemSize=i.bytesPerElement,this.dynamicDraw=c,this.context=e;let d=e.gl;this.buffer=d.createBuffer(),e.bindVertexBuffer.set(this.buffer),d.bufferData(d.ARRAY_BUFFER,i.arrayBuffer,this.dynamicDraw?d.DYNAMIC_DRAW:d.STATIC_DRAW),this.dynamicDraw||delete i.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw new Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);let i=this.context.gl;this.bind(),i.bufferSubData(i.ARRAY_BUFFER,0,e.arrayBuffer)}
vendor: 7,140 bytes, line 726
726enableAttributes(e,i){for(let l=0;l<this.attributes.length;l++){let c=i.attributes[this.attributes[l].name];c!==void 0&&e.enableVertexAttribArray(c)}}setVertexAttribPointers(e,i,l){for(let c=0;c<this.attributes.length;c++){let d=this.attributes[c],v=i.attributes[d.name];v!==void 0&&e.vertexAttribPointer(v,d.components,e[Ds[d.type]],!1,this.itemSize,d.offset+this.itemSize*(l||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class _i{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class es extends _i{getDefault(){return a.b7.transparent}set(e){let i=this.current;(e.r!==i.r||e.g!==i.g||e.b!==i.b||e.a!==i.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class Co extends _i{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}}class Za extends _i{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}}class Io extends _i{getDefault(){return[!0,!0,!0,!0]}set(e){let i=this.current;(e[0]!==i[0]||e[1]!==i[1]||e[2]!==i[2]||e[3]!==i[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class Ao extends _i{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}}class ql extends _i{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}}class Wa extends _i{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){let i=this.current;(e.func!==i.func||e.ref!==i.ref||e.mask!==i.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}}class sl extends _i{getDefault(){let e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){let i=this.current;(e[0]!==i[0]||e[1]!==i[1]||e[2]!==i[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}}class fe extends _i{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let i=this.gl;e?i.enable(i.STENCIL_TEST):i.disable(i.STENCIL_TEST),this.current=e,this.dirty=!1}}class De extends _i{getDefault(){return[0,1]}set(e){let i=this.current;(e[0]!==i[0]||e[1]!==i[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}}class Ze extends _i{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let i=this.gl;e?i.enable(i.DEPTH_TEST):i.disable(i.DEPTH_TEST),this.current=e,this.dirty=!1}}class it extends _i{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}}class ht extends _i{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let i=this.gl;e?i.enable(i.BLEND):i.disable(i.BLEND),this.current=e,this.dirty=!1}}class Dt extends _i{getDefault(){let e=this.gl;return[e.ONE,e.ZERO]}set(e){let i=this.current;(e[0]!==i[0]||e[1]!==i[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}}class Lt extends _i{getDefault(){return a.b7.transparent}set(e){let i=this.current;(e.r!==i.r||e.g!==i.g||e.b!==i.b||e.a!==i.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class Ot extends _i{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}}class Bt extends _i{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let i=this.gl;e?i.enable(i.CULL_FACE):i.disable(i.CULL_FACE),this.current=e,this.dirty=!1}}class fi extends _i{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}}class Qt extends _i{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}}class Jt extends _i{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}}class ui extends _i{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}}class Xt extends _i{getDefault(){let e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){let i=this.current;(e[0]!==i[0]||e[1]!==i[1]||e[2]!==i[2]||e[3]!==i[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class Ii extends _i{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let i=this.gl;i.bindFramebuffer(i.FRAMEBUFFER,e),this.current=e,this.dirty=!1}}class Dr extends _i{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let i=this.gl;i.bindRenderbuffer(i.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class kr extends _i{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let i=this.gl;i.bindTexture(i.TEXTURE_2D,e),this.current=e,this.dirty=!1}}class Lr extends _i{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let i=this.gl;i.bindBuffer(i.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class Qr extends _i{getDefault(){return null}set(e){let i=this.gl;i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class ks extends _i{getDefault(){return null}set(e){var i;if(e===this.current&&!this.dirty)return;let l=this.gl;_n(l)?l.bindVertexArray(e):(i=l.getExtension("OES_vertex_array_object"))===null||i===void 0||i.bindVertexArrayOES(e),this.current=e,this.dirty=!1}}class zr extends _i{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;let i=this.gl;i.pixelStorei(i.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}}class Ei extends _i{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let i=this.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}}class al extends _i{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let i=this.gl;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}}class Zl extends _i{constructor(e,i){super(e),this.context=e,this.parent=i}getDefault(){return null}}class qc extends Zl{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let i=this.gl;i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}}class Do extends Zl{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let i=this.gl;i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class nh extends Zl{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let i=this.gl;i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.RENDERBUFFER,e),this.current=e,this.dirty=!1}}let Zc="Framebuffer is not complete";class Wc{constructor(e,i,l,c,d){this.context=e,this.width=i,this.height=l;let v=e.gl,w=this.framebuffer=v.createFramebuffer();
vendor: 6,640 bytes, line 726
726if(this.colorAttachment=new qc(e,w),c)this.depthAttachment=d?new nh(e,w):new Do(e,w);else if(d)throw new Error("Stencil cannot be set without depth");if(v.checkFramebufferStatus(v.FRAMEBUFFER)!==v.FRAMEBUFFER_COMPLETE)throw new Error(Zc)}destroy(){let e=this.context.gl,i=this.colorAttachment.get();if(i&&e.deleteTexture(i),this.depthAttachment){let l=this.depthAttachment.get();l&&e.deleteRenderbuffer(l)}e.deleteFramebuffer(this.framebuffer)}}class sh{constructor(e){var i,l;if(this.gl=e,this.clearColor=new es(this),this.clearDepth=new Co(this),this.clearStencil=new Za(this),this.colorMask=new Io(this),this.depthMask=new Ao(this),this.stencilMask=new ql(this),this.stencilFunc=new Wa(this),this.stencilOp=new sl(this),this.stencilTest=new fe(this),this.depthRange=new De(this),this.depthTest=new Ze(this),this.depthFunc=new it(this),this.blend=new ht(this),this.blendFunc=new Dt(this),this.blendColor=new Lt(this),this.blendEquation=new Ot(this),this.cullFace=new Bt(this),this.cullFaceSide=new fi(this),this.frontFace=new Qt(this),this.program=new Jt(this),this.activeTexture=new ui(this),this.viewport=new Xt(this),this.bindFramebuffer=new Ii(this),this.bindRenderbuffer=new Dr(this),this.bindTexture=new kr(this),this.bindVertexBuffer=new Lr(this),this.bindElementBuffer=new Qr(this),this.bindVertexArray=new ks(this),this.pixelStoreUnpack=new zr(this),this.pixelStoreUnpackPremultiplyAlpha=new Ei(this),this.pixelStoreUnpackFlipY=new al(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),_n(e)){this.HALF_FLOAT=e.HALF_FLOAT;let c=e.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(i=e.RGBA16F)!==null&&i!==void 0?i:c?.RGBA16F_EXT,this.RGB16F=(l=e.RGB16F)!==null&&l!==void 0?l:c?.RGB16F_EXT,e.getExtension("EXT_color_buffer_float")}else{e.getExtension("EXT_color_buffer_half_float"),e.getExtension("OES_texture_half_float_linear");let c=e.getExtension("OES_texture_half_float");this.HALF_FLOAT=c?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(e,i){return new qa(this,e,i)}createVertexBuffer(e,i,l){return new Ta(this,e,i,l)}createRenderbuffer(e,i,l){let c=this.gl,d=c.createRenderbuffer();return this.bindRenderbuffer.set(d),c.renderbufferStorage(c.RENDERBUFFER,e,i,l),this.bindRenderbuffer.set(null),d}createFramebuffer(e,i,l,c){return new Wc(this,e,i,l,c)}clear({color:e,depth:i,stencil:l}){let c=this.gl,d=0;e&&(d|=c.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),i!==void 0&&(d|=c.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(i),this.depthMask.set(!0)),l!==void 0&&(d|=c.STENCIL_BUFFER_BIT,this.clearStencil.set(l),this.stencilMask.set(255)),c.clear(d)}setCullFace(e){e.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)}setStencilMode(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)}setColorMode(e){a.bC(e.blendFunction,$i.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)}createVertexArray(){var e;return _n(this.gl)?this.gl.createVertexArray():(e=this.gl.getExtension("OES_vertex_array_object"))===null||e===void 0?void 0:e.createVertexArrayOES()}deleteVertexArray(e){var i;return _n(this.gl)?this.gl.deleteVertexArray(e):(i=this.gl.getExtension("OES_vertex_array_object"))===null||i===void 0?void 0:i.deleteVertexArrayOES(e)}unbindVAO(){this.bindVertexArray.set(null)}}let Xa;function ko(h,e,i,l,c){let d=h.context,v=h.transform,w=d.gl,P=h.useProgram("collisionBox"),C=[],L=0,N=0;for(let de=0;de<l.length;de++){let me=l[de],xe=e.getTile(me).getBucket(i);if(!xe)continue;let Se=c?xe.textCollisionBox:xe.iconCollisionBox,Pe=xe.collisionCircleArray;Pe.length>0&&(C.push({circleArray:Pe,circleOffset:N,coord:me}),L+=Pe.length/4,N=L),Se&&P.draw(d,w.LINES,ri.disabled,yi.disabled,h.colorModeForRenderPass(),Ti.disabled,To(h.transform),h.style.map.terrain&&h.style.map.terrain.getTerrainData(me),v.getProjectionData({overscaledTileID:me,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),i.id,Se.layoutVertexBuffer,Se.indexBuffer,Se.segments,null,h.transform.zoom,null,null,Se.collisionVertexBuffer)}if(!c||!C.length)return;let R=h.useProgram("collisionCircle"),K=new a.bP;K.resize(4*L),K._trim();let ee=0;for(let de of C)for(let me=0;me<de.circleArray.length/4;
vendor: 4,148 bytes, line 726
726me++){let xe=4*me,Se=de.circleArray[xe+0],Pe=de.circleArray[xe+1],Ae=de.circleArray[xe+2],Me=de.circleArray[xe+3];K.emplace(ee++,Se,Pe,Ae,Me,0),K.emplace(ee++,Se,Pe,Ae,Me,1),K.emplace(ee++,Se,Pe,Ae,Me,2),K.emplace(ee++,Se,Pe,Ae,Me,3)}(!Xa||Xa.length<2*L)&&(Xa=function(de){let me=2*de,xe=new a.bR;xe.resize(me),xe._trim();for(let Se=0;Se<me;Se++){let Pe=6*Se;xe.uint16[Pe+0]=4*Se+0,xe.uint16[Pe+1]=4*Se+1,xe.uint16[Pe+2]=4*Se+2,xe.uint16[Pe+3]=4*Se+2,xe.uint16[Pe+4]=4*Se+3,xe.uint16[Pe+5]=4*Se+0}return xe}(L));let he=d.createIndexBuffer(Xa,!0),ue=d.createVertexBuffer(K,a.bQ.members,!0);for(let de of C){let me=An(h.transform);R.draw(d,w.TRIANGLES,ri.disabled,yi.disabled,h.colorModeForRenderPass(),Ti.disabled,me,h.style.map.terrain&&h.style.map.terrain.getTerrainData(de.coord),null,i.id,ue,he,a.aG.simpleSegment(0,2*de.circleOffset,de.circleArray.length,de.circleArray.length/2),null,h.transform.zoom,null,null,null)}ue.destroy(),he.destroy()}let ol=a.at(new Float32Array(16));function Wl(h,e,i,l,c,d){let{horizontalAlign:v,verticalAlign:w}=a.aB(h);return new a.P((-(v-.5)*e/c+l[0])*d,(-(w-.5)*i/c+l[1])*d)}function Xl(h,e,i,l,c,d){let v=e.tileAnchorPoint.add(new a.P(e.translation[0],e.translation[1]));if(e.pitchWithMap){let w=l.mult(d);i||(w=w.rotate(-c));let P=v.add(w);return et(P.x,P.y,e.pitchedLabelPlaneMatrix,e.getElevation).point}if(i){let w=di(e.tileAnchorPoint.x+1,e.tileAnchorPoint.y,e).point.sub(h),P=Math.atan(w.y/w.x)+(w.x<0?Math.PI:0);return h.add(l.rotate(P))}return h.add(l)}function Xc(h,e,i,l,c,d,v,w,P,C,L,N){let R=h.text.placedSymbolArray,K=h.text.dynamicLayoutVertexArray,ee=h.icon.dynamicLayoutVertexArray,he={};K.clear();for(let ue=0;ue<R.length;ue++){let de=R.get(ue),me=de.hidden||!de.crossTileID||h.allowVerticalPlacement&&!de.placedOrientation?null:l[de.crossTileID];if(me){let xe=new a.P(de.anchorX,de.anchorY),Se={getElevation:N,width:c.width,height:c.height,pitchedLabelPlaneMatrix:d,pitchWithMap:i,transform:c,tileAnchorPoint:xe,translation:C,unwrappedTileID:L},Pe=i?Rt(xe.x,xe.y,Se):di(xe.x,xe.y,Se),Ae=Be(c.cameraToCenterDistance,Pe.signedDistanceFromCamera),Me=a.ai(h.textSizeData,w,de)*Ae/a.av;i&&(Me*=h.tilePixelRatio/v);let{width:Ue,height:Ve,anchor:ot,textOffset:ut,textBoxScale:at}=me,It=Wl(ot,Ue,Ve,ut,at,Me),Et=c.getPitchedTextCorrection(xe.x+C[0],xe.y+C[1],L),pt=Xl(Pe.point,Se,e,It,-c.bearingInRadians,Et),Nt=h.allowVerticalPlacement&&de.placedOrientation===a.ah.vertical?Math.PI/2:0;for(let ai=0;ai<de.numGlyphs;ai++)a.ao(K,pt,Nt);P&&de.associatedIconIndex>=0&&(he[de.associatedIconIndex]={shiftedAnchor:pt,angle:Nt})}else qt(de.numGlyphs,K)}if(P){ee.clear();let ue=h.icon.placedSymbolArray;for(let de=0;de<ue.length;de++){let me=ue.get(de);if(me.hidden)qt(me.numGlyphs,ee);else{let xe=he[de];if(xe)for(let Se=0;Se<me.numGlyphs;Se++)a.ao(ee,xe.shiftedAnchor,xe.angle);else qt(me.numGlyphs,ee)}}h.icon.dynamicLayoutVertexBuffer.updateData(ee)}h.text.dynamicLayoutVertexBuffer.updateData(K)}function ll(h,e,i){return i.iconsInText&&e?"symbolTextAndIcon":h?"symbolSDF":"symbolIcon"}function Lo(h,e,i,l,c,d,v,w,P,C,L,N,R){let K=h.context,ee=K.gl,he=h.transform,ue=w==="map",de=P==="map",me=w!=="viewport"&&i.layout.get("symbol-placement")!=="point",xe=ue&&!de&&!me,Se=!i.layout.get("symbol-sort-key").isConstant(),Pe=!1,Ae=h.getDepthModeForSublayer(0,ri.ReadOnly),Me=i._unevaluatedLayout.hasValue("text-variable-anchor")||i._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ue=[],Ve=he.getCircleRadiusCorrection();for(let ot of l){let ut=e.getTile(ot),at=ut.getBucket(i);if(!at)continue;let It=c?at.text:at.icon;if(!It||!It.segments.get().length||!It.hasVisibleVertices)continue;let Et=It.programConfigurations.get(i.id),pt=c||at.sdfIcons,Nt=c?at.textSizeData:at.iconSizeData,ai=de||he.pitch!==0,Mi=h.useProgram(ll(pt,c,at),Et),li=a.ag(Nt,he.zoom),Bi=h.style.map.terrain&&h.style.map.terrain.getTerrainData(ot),Hi,Xi,ki,Fi,xr=[0,0],Rr=null;if(c)Xi=ut.glyphAtlasTexture,ki=ee.LINEAR,Hi=ut.glyphAtlasTexture.size,at.iconsInText&&(xr=ut.imageAtlasTexture.size,Rr=ut.imageAtlasTexture,Fi=ai||h.options.rotating||h.options.zooming||Nt.kind==="composite"||Nt.kind==="camera"?ee.LINEAR:ee.NEAREST);
726else{let ur=i.layout.get("icon-size").constantOr(0)!==1||at.iconsNeedLinear;Xi=ut.imageAtlasTexture,ki=pt||h.options.rotating||h.options.zooming||ur||ai?ee.LINEAR:ee.NEAREST,Hi=ut.imageAtlasTexture.size}let Gr=a.aw(ut,1,h.transform.zoom),Pn=je(ue,h.transform,Gr),Rs=a.K();a.aj(Rs,Pn);let vs=ke(de,ue,h.transform,Gr),oa=a.ax(he,ut,d,v),la=he.getProjectionData({overscaledTileID:ot,applyGlobeMatrix:!R,applyTerrainMatrix:!0}),ka=Me&&at.hasTextData(),bs=i.layout.get("icon-text-fit")!=="none"&&ka&&at.hasIconData();if(me){let ur=h.style.map.terrain?(Pr,Vi)=>h.style.map.terrain.getElevation(ot,Pr,Vi):null,hr=i.layout.get("text-rotation-alignment")==="map";Ct(at,h,c,Pn,Rs,de,C,hr,ot.toUnwrapped(),he.width,he.height,oa,ur)}let Bs=c&&Me||bs,kn=me||Bs?ol:de?Pn:h.transform.clipSpaceToPixelsMatrix,Fs=pt&&i.paint.get(c?"text-halo-width":"icon-halo-width").constantOr(1)!==0,La;La=pt?at.iconsInText?Eo(Nt.kind,li,xe,de,me,Bs,h,kn,vs,oa,Hi,xr,Ve):Po(Nt.kind,li,xe,de,me,Bs,h,kn,vs,oa,c,Hi,0,Ve):ms(Nt.kind,li,xe,de,me,Bs,h,kn,vs,oa,c,Hi,Ve);let za={program:Mi,buffers:It,uniformValues:La,projectionData:la,atlasTexture:Xi,atlasTextureIcon:Rr,atlasInterpolation:ki,atlasInterpolationIcon:Fi,isSDF:pt,hasHalo:Fs};if(Se&&at.canOverlap){Pe=!0;let ur=It.segments.get();for(let hr of ur)Ue.push({segments:new a.aG([hr]),sortKey:hr.sortKey,state:za,terrainData:Bi})}else Ue.push({segments:It.segments,sortKey:0,state:za,terrainData:Bi})}Pe&&Ue.sort((ot,ut)=>ot.sortKey-ut.sortKey);for(let ot of Ue){let ut=ot.state;if(K.activeTexture.set(ee.TEXTURE0),ut.atlasTexture.bind(ut.atlasInterpolation,ee.CLAMP_TO_EDGE),ut.atlasTextureIcon&&(K.activeTexture.set(ee.TEXTURE1),ut.atlasTextureIcon&&ut.atlasTextureIcon.bind(ut.atlasInterpolationIcon,ee.CLAMP_TO_EDGE)),ut.isSDF){let at=ut.uniformValues;ut.hasHalo&&(at.u_is_halo=1,cl(ut.buffers,ot.segments,i,h,ut.program,Ae,L,N,at,ut.projectionData,ot.terrainData)),at.u_is_halo=0}cl(ut.buffers,ot.segments,i,h,ut.program,Ae,L,N,ut.uniformValues,ut.projectionData,ot.terrainData)}}function cl(h,e,i,l,c,d,v,w,P,C,L){let N=l.context;c.draw(N,N.gl.TRIANGLES,d,v,w,Ti.backCCW,P,L,C,i.id,h.layoutVertexBuffer,h.indexBuffer,e,i.paint,l.transform.zoom,h.programConfigurations.get(i.id),h.dynamicLayoutVertexBuffer,h.opacityVertexBuffer)}function ah(h,e,i,l,c){let d=h.context,v=d.gl,w=yi.disabled,P=new $i([v.ONE,v.ONE],a.b7.transparent,[!0,!0,!0,!0]),C=e.getBucket(i);if(!C)return;let L=l.key,N=i.heatmapFbos.get(L);N||(N=Yc(d,e.tileSize,e.tileSize),i.heatmapFbos.set(L,N)),d.bindFramebuffer.set(N.framebuffer),d.viewport.set([0,0,e.tileSize,e.tileSize]),d.clear({color:a.b7.transparent});let R=C.programConfigurations.get(i.id),K=h.useProgram("heatmap",R,!c),ee=h.transform.getProjectionData({overscaledTileID:e.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),he=h.style.map.terrain.getTerrainData(l);K.draw(d,v.TRIANGLES,ri.disabled,w,P,Ti.disabled,vn(e,h.transform.zoom,i.paint.get("heatmap-intensity"),1),he,ee,i.id,C.layoutVertexBuffer,C.indexBuffer,C.segments,i.paint,h.transform.zoom,R)}function Yl(h,e,i,l,c){let d=h.context,v=d.gl,w=h.transform;d.setColorMode(h.colorModeForRenderPass());let P=Kl(d,e),C=i.key,L=e.heatmapFbos.get(C);if(!L)return;d.activeTexture.set(v.TEXTURE0),v.bindTexture(v.TEXTURE_2D,L.colorAttachment.get()),d.activeTexture.set(v.TEXTURE1),P.bind(v.LINEAR,v.CLAMP_TO_EDGE);let N=w.getProjectionData({overscaledTileID:i,applyTerrainMatrix:c,applyGlobeMatrix:!l});h.useProgram("heatmapTexture").draw(d,v.TRIANGLES,ri.disabled,yi.disabled,h.colorModeForRenderPass(),Ti.disabled,Nn(h,e,0,1),null,N,e.id,h.rasterBoundsBuffer,h.quadTriangleIndexBuffer,h.rasterBoundsSegments,e.paint,w.zoom),L.destroy(),e.heatmapFbos.delete(C)}function Yc(h,e,i){var l,c;let d=h.gl,v=d.createTexture();d.bindTexture(d.TEXTURE_2D,v),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR);let w=(l=h.HALF_FLOAT)!==null&&l!==void 0?l:d.UNSIGNED_BYTE,P=(c=h.RGBA16F)!==null&&c!==void 0?c:d.RGBA;d.texImage2D(d.TEXTURE_2D,0,P,e,i,0,d.RGBA,w,null);let C=h.createFramebuffer(e,i,!1,!1);return C.colorAttachment.set(v),C}function Kl(h,e){return e.colorRampTexture||(e.colorRampTexture=new M(h,e.colorRamp,h.gl.RGBA)),e.colorRampTexture}function zo(h,e,i,l,c){if(!i||!l||!l.imageAtlas)return;let d=l.imageAtlas.patternPositions,v=d[i.to.toString()],w=d[i.from.toString()];if(!v&&w&&(v=w),!w&&v&&(w=v),!v||!w){let P=c.getPaintProperty(e);v=d[P],w=d[P]}v&&w&&h.setConstantPatternPositions(v,w)}function ul(h,e,i,l,c,d,v,w){let P=h.context.gl,C="fill-pattern",L=i.paint.get(C),N=L&&L.constantOr(1),R=i.getCrossfadeParameters(),K,ee,he,ue,de,me=h.transform,xe=i.paint.get("fill-translate"),Se=i.paint.get("fill-translate-anchor");v?(ee=N&&!i.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",K=P.LINES):(ee=N?"fillPattern":"fill",K=P.TRIANGLES);let Pe=L.constantOr(null);for(let Ae of l){let Me=e.getTile(Ae);if(N&&!Me.patternsLoaded())continue;let Ue=Me.getBucket(i);if(!Ue)continue;let Ve=Ue.programConfigurations.get(i.id),ot=h.useProgram(ee,Ve),ut=h.style.map.terrain&&h.style.map.terrain.getTerrainData(Ae);N&&(h.context.activeTexture.set(P.TEXTURE0),Me.imageAtlasTexture.bind(P.LINEAR,P.CLAMP_TO_EDGE),Ve.updatePaintBuffers(R)),zo(Ve,C,Pe,Me,i);let at=me.getProjectionData({overscaledTileID:Ae,applyGlobeMatrix:!w,applyTerrainMatrix:!0}),It=a.ax(me,Me,xe,Se);
726if(v){ue=Ue.indexBuffer2,de=Ue.segments2;let pt=[P.drawingBufferWidth,P.drawingBufferHeight];he=ee==="fillOutlinePattern"&&N?rr(h,R,Me,pt,It):pi(pt,It)}else ue=Ue.indexBuffer,de=Ue.segments,he=N?ps(h,R,Me,It):{u_fill_translate:It};let Et;if(h.renderPass==="translucent"&&w){let[pt]=h.getStencilConfigForOverlapAndUpdateStencilID(l);Et=pt[Ae.overscaledZ]}else Et=h.stencilModeForClipping(Ae);ot.draw(h.context,K,c,Et,d,Ti.backCCW,he,ut,at,i.id,Ue.layoutVertexBuffer,ue,de,i.paint,h.transform.zoom,Ve)}}function hl(h,e,i,l,c,d,v,w){let P=h.context,C=P.gl,L="fill-extrusion-pattern",N=i.paint.get(L),R=N.constantOr(1),K=i.getCrossfadeParameters(),ee=i.paint.get("fill-extrusion-opacity"),he=N.constantOr(null),ue=h.transform;for(let de of l){let me=e.getTile(de),xe=me.getBucket(i);if(!xe)continue;let Se=h.style.map.terrain&&h.style.map.terrain.getTerrainData(de),Pe=xe.programConfigurations.get(i.id),Ae=h.useProgram(R?"fillExtrusionPattern":"fillExtrusion",Pe);R&&(h.context.activeTexture.set(C.TEXTURE0),me.imageAtlasTexture.bind(C.LINEAR,C.CLAMP_TO_EDGE),Pe.updatePaintBuffers(K));let Me=ue.getProjectionData({overscaledTileID:de,applyGlobeMatrix:!w,applyTerrainMatrix:!0});zo(Pe,L,he,me,i);let Ue=a.ax(ue,me,i.paint.get("fill-extrusion-translate"),i.paint.get("fill-extrusion-translate-anchor")),Ve=i.paint.get("fill-extrusion-vertical-gradient"),ot=R?hi(h,Ve,ee,Ue,de,K,me):In(h,Ve,ee,Ue);Ae.draw(P,P.gl.TRIANGLES,c,d,v,Ti.backCCW,ot,Se,Me,i.id,xe.layoutVertexBuffer,xe.indexBuffer,xe.segments,i.paint,h.transform.zoom,Pe,h.style.map.terrain&&xe.centroidVertexBuffer)}}function dl(h,e,i,l,c,d,v,w,P){var C;let L=h.style.projection,N=h.context,R=h.transform,K=N.gl,ee=h.useProgram("hillshade"),he=!h.options.moving;for(let ue of l){let de=e.getTile(ue),me=de.fbo;if(!me)continue;let xe=L.getMeshFromTileID(N,ue.canonical,w,!0,"raster"),Se=(C=h.style.map.terrain)===null||C===void 0?void 0:C.getTerrainData(ue);N.activeTexture.set(K.TEXTURE0),K.bindTexture(K.TEXTURE_2D,me.colorAttachment.get());let Pe=R.getProjectionData({overscaledTileID:ue,aligned:he,applyGlobeMatrix:!P,applyTerrainMatrix:!0});ee.draw(N,K.TRIANGLES,d,c[ue.overscaledZ],v,Ti.backCCW,Jn(h,de,i),Se,Pe,i.id,xe.vertexBuffer,xe.indexBuffer,xe.segments)}}let Ya=[new a.P(0,0),new a.P(a.Z,0),new a.P(a.Z,a.Z),new a.P(0,a.Z)];function Ka(h,e,i,l,c,d,v,w,P=!1,C=!1){let L=l[l.length-1].overscaledZ,N=h.context,R=N.gl,K=h.useProgram("raster"),ee=h.transform,he=h.style.projection,ue=h.colorModeForRenderPass(),de=!h.options.moving;for(let me of l){let xe=h.getDepthModeForSublayer(me.overscaledZ-L,i.paint.get("raster-opacity")===1?ri.ReadWrite:ri.ReadOnly,R.LESS),Se=e.getTile(me);Se.registerFadeDuration(i.paint.get("raster-fade-duration"));let Pe=e.findLoadedParent(me,0),Ae=e.findLoadedSibling(me),Me=oh(Se,Pe||Ae||null,e,i,h.transform,h.style.map.terrain),Ue,Ve,ot=i.paint.get("raster-resampling")==="nearest"?R.NEAREST:R.LINEAR;N.activeTexture.set(R.TEXTURE0),Se.texture.bind(ot,R.CLAMP_TO_EDGE,R.LINEAR_MIPMAP_NEAREST),N.activeTexture.set(R.TEXTURE1),Pe?(Pe.texture.bind(ot,R.CLAMP_TO_EDGE,R.LINEAR_MIPMAP_NEAREST),Ue=Math.pow(2,Pe.tileID.overscaledZ-Se.tileID.overscaledZ),Ve=[Se.tileID.canonical.x*Ue%1,Se.tileID.canonical.y*Ue%1]):Se.texture.bind(ot,R.CLAMP_TO_EDGE,R.LINEAR_MIPMAP_NEAREST),Se.texture.useMipmap&&N.extTextureFilterAnisotropic&&h.transform.pitch>20&&R.texParameterf(R.TEXTURE_2D,N.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,N.extTextureFilterAnisotropicMax);let ut=h.style.map.terrain&&h.style.map.terrain.getTerrainData(me),at=ee.getProjectionData({overscaledTileID:me,aligned:de,applyGlobeMatrix:!C,applyTerrainMatrix:!0}),It=Ha(Ve||[0,0],Ue||1,Me,i,w),Et=he.getMeshFromTileID(N,me.canonical,d,v,"raster");K.draw(N,R.TRIANGLES,xe,c?c[me.overscaledZ]:yi.disabled,ue,P?Ti.frontCCW:Ti.backCCW,It,ut,at,i.id,Et.vertexBuffer,Et.indexBuffer,Et.segments)}}function oh(h,e,i,l,c,d){let v=l.paint.get("raster-fade-duration");if(!d&&v>0){let w=U.now(),P=(w-h.timeAdded)/v,C=e?(w-e.timeAdded)/v:-1,L=i.getSource(),N=Ar(c,{tileSize:L.tileSize,roundZoom:L.roundZoom}),R=!e||Math.abs(e.tileID.overscaledZ-N)>Math.abs(h.tileID.overscaledZ-N),K=R&&h.refreshedUponExpiration?1:a.ae(R?P:1-C,0,1);return h.refreshedUponExpiration&&P>=1&&(h.refreshedUponExpiration=!1),e?{opacity:1,mix:1-K}:{opacity:K,mix:0}}return{opacity:1,mix:0}}let Kc=new a.b7(1,0,0,1),yr=new a.b7(0,1,0,1),Pa=new a.b7(0,0,1,1),Un=new a.b7(1,0,1,1),Jl=new a.b7(0,1,1,1);function pl(h,e,i,l){Ls(h,0,e+i/2,h.transform.width,i,l)}function Ql(h,e,i,l){Ls(h,e-i/2,0,i,h.transform.height,l)}function Ls(h,e,i,l,c,d){let v=h.context,w=v.gl;w.enable(w.SCISSOR_TEST),w.scissor(e*h.pixelRatio,i*h.pixelRatio,l*h.pixelRatio,c*h.pixelRatio),v.clear({color:d}),w.disable(w.SCISSOR_TEST)}function Ro(h,e,i){let l=h.context,c=l.gl,d=h.useProgram("debug"),v=ri.disabled,w=yi.disabled,P=h.colorModeForRenderPass(),C="$debug",L=h.style.map.terrain&&h.style.map.terrain.getTerrainData(i);l.activeTexture.set(c.TEXTURE0);let N=e.getTileByID(i.key).latestRawTileData,R=Math.floor((N&&N.byteLength||0)/1024),K=e.getTile(i).tileSize,ee=512/Math.min(K,512)*(i.overscaledZ/h.transform.zoom)*.5,he=i.canonical.toString();i.overscaledZ!==i.canonical.z&&(he+=` => ${i.overscaledZ}`),function(de,me){de.initDebugOverlayCanvas();let xe=de.debugOverlayCanvas,Se=de.context.gl,Pe=de.debugOverlayCanvas.getContext("2d");
vendor: 11,405 bytes, line 726
726Pe.clearRect(0,0,xe.width,xe.height),Pe.shadowColor="white",Pe.shadowBlur=2,Pe.lineWidth=1.5,Pe.strokeStyle="white",Pe.textBaseline="top",Pe.font="bold 36px Open Sans, sans-serif",Pe.fillText(me,5,5),Pe.strokeText(me,5,5),de.debugOverlayTexture.update(xe),de.debugOverlayTexture.bind(Se.LINEAR,Se.CLAMP_TO_EDGE)}(h,`${he} ${R}kB`);let ue=h.transform.getProjectionData({overscaledTileID:i,applyGlobeMatrix:!0,applyTerrainMatrix:!0});d.draw(l,c.TRIANGLES,v,w,$i.alphaBlended,Ti.disabled,fs(a.b7.transparent,ee),null,ue,C,h.debugBuffer,h.quadTriangleIndexBuffer,h.debugSegments),d.draw(l,c.LINE_STRIP,v,w,P,Ti.disabled,fs(a.b7.red),L,ue,C,h.debugBuffer,h.tileBorderIndexBuffer,h.debugSegments)}function fl(h,e,i,l){let{isRenderingGlobe:c}=l,d=h.context,v=d.gl,w=h.transform,P=h.colorModeForRenderPass(),C=h.getDepthModeFor3D(),L=h.useProgram("terrain");d.bindFramebuffer.set(null),d.viewport.set([0,0,h.width,h.height]);for(let N of i){let R=e.getTerrainMesh(N.tileID),K=h.renderToTexture.getTexture(N),ee=e.getTerrainData(N.tileID);d.activeTexture.set(v.TEXTURE0),v.bindTexture(v.TEXTURE_2D,K.texture);let he=e.getMeshFrameDelta(w.zoom),ue=w.calculateFogMatrix(N.tileID.toUnwrapped()),de=ni(he,ue,h.style.sky,w.pitch,c),me=w.getProjectionData({overscaledTileID:N.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});L.draw(d,v.TRIANGLES,C,yi.disabled,P,Ti.backCCW,de,ee,me,"terrain",R.vertexBuffer,R.indexBuffer,R.segments)}}function ec(h,e){if(!e.mesh){let i=new a.aF;i.emplaceBack(-1,-1),i.emplaceBack(1,-1),i.emplaceBack(1,1),i.emplaceBack(-1,1);let l=new a.aH;l.emplaceBack(0,1,2),l.emplaceBack(0,2,3),e.mesh=new us(h.createVertexBuffer(i,hs.members),h.createIndexBuffer(l),a.aG.simpleSegment(0,0,i.length,l.length))}return e.mesh}class Jc{constructor(e,i){this.context=new sh(e),this.transform=i,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.at(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=J.maxUnderzooming+J.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Va}resize(e,i,l){if(this.width=Math.floor(e*l),this.height=Math.floor(i*l),this.pixelRatio=l,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let c of this.style._order)this.style._layers[c].resize()}setup(){let e=this.context,i=new a.aF;i.emplaceBack(0,0),i.emplaceBack(a.Z,0),i.emplaceBack(0,a.Z),i.emplaceBack(a.Z,a.Z),this.tileExtentBuffer=e.createVertexBuffer(i,hs.members),this.tileExtentSegments=a.aG.simpleSegment(0,0,4,2);let l=new a.aF;l.emplaceBack(0,0),l.emplaceBack(a.Z,0),l.emplaceBack(0,a.Z),l.emplaceBack(a.Z,a.Z),this.debugBuffer=e.createVertexBuffer(l,hs.members),this.debugSegments=a.aG.simpleSegment(0,0,4,5);let c=new a.bW;c.emplaceBack(0,0,0,0),c.emplaceBack(a.Z,0,a.Z,0),c.emplaceBack(0,a.Z,0,a.Z),c.emplaceBack(a.Z,a.Z,a.Z,a.Z),this.rasterBoundsBuffer=e.createVertexBuffer(c,Pt.members),this.rasterBoundsSegments=a.aG.simpleSegment(0,0,4,2);let d=new a.aF;d.emplaceBack(0,0),d.emplaceBack(a.Z,0),d.emplaceBack(0,a.Z),d.emplaceBack(a.Z,a.Z),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(d,hs.members),this.rasterBoundsSegmentsPosOnly=a.aG.simpleSegment(0,0,4,5);let v=new a.aF;v.emplaceBack(0,0),v.emplaceBack(1,0),v.emplaceBack(0,1),v.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(v,hs.members),this.viewportSegments=a.aG.simpleSegment(0,0,4,2);let w=new a.bX;w.emplaceBack(0),w.emplaceBack(1),w.emplaceBack(3),w.emplaceBack(2),w.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(w);let P=new a.aH;P.emplaceBack(1,0,2),P.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(P);let C=this.context.gl;this.stencilClearMode=new yi({func:C.ALWAYS,mask:0},0,255,C.ZERO,C.ZERO,C.ZERO),this.tileExtentMesh=new us(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let e=this.context,i=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let l=a.K();a.bO(l,0,this.width,this.height,0,0,1),a.M(l,l,[i.drawingBufferWidth,i.drawingBufferHeight,0]);let c={mainMatrix:l,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:l};this.useProgram("clippingMask",null,!0).draw(e,i.TRIANGLES,ri.disabled,this.stencilClearMode,$i.disabled,Ti.disabled,null,null,c,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,i,l){if(this.currentStencilSource===e.source||!e.isTileClipped()||!i||!i.length)return;this.currentStencilSource=e.source,this.nextStencilID+i.length>256&&this.clearStencil();let c=this.context;c.setColorMode($i.disabled),c.setDepthMode(ri.disabled);let d={};for(let v of i)d[v.key]=this.nextStencilID++;this._renderTileMasks(d,i,l,!0),this._renderTileMasks(d,i,l,!1),this._tileClippingMaskIDs=d}_renderTileMasks(e,i,l,c){let d=this.context,v=d.gl,w=this.style.projection,P=this.transform,C=this.useProgram("clippingMask");for(let L of i){let N=e[L.key],R=this.style.map.terrain&&this.style.map.terrain.getTerrainData(L),K=w.getMeshFromTileID(this.context,L.canonical,c,!0,"stencil"),ee=P.getProjectionData({overscaledTileID:L,applyGlobeMatrix:!0,applyTerrainMatrix:!0});C.draw(d,v.TRIANGLES,ri.disabled,new yi({func:v.ALWAYS,mask:0},N,255,v.KEEP,v.KEEP,v.REPLACE),$i.disabled,l?Ti.disabled:Ti.backCCW,null,R,ee,"$clipping",K.vertexBuffer,K.indexBuffer,K.segments)}}_renderTilesDepthBuffer(){let e=this.context,i=e.gl,l=this.style.projection,c=this.transform,d=this.useProgram("depth"),v=this.getDepthModeFor3D(),w=Re(c,{tileSize:c.tileSize});for(let P of w){let C=this.style.map.terrain&&this.style.map.terrain.getTerrainData(P),L=l.getMeshFromTileID(this.context,P.canonical,!0,!0,"raster"),N=c.getProjectionData({overscaledTileID:P,applyGlobeMatrix:!0,applyTerrainMatrix:!0});d.draw(e,i.TRIANGLES,v,yi.disabled,$i.disabled,Ti.backCCW,null,C,N,"$clipping",L.vertexBuffer,L.indexBuffer,L.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let e=this.nextStencilID++,i=this.context.gl;return new yi({func:i.NOTEQUAL,mask:255},e,255,i.KEEP,i.KEEP,i.REPLACE)}stencilModeForClipping(e){let i=this.context.gl;return new yi({func:i.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,i.KEEP,i.KEEP,i.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){let i=this.context.gl,l=e.sort((v,w)=>w.overscaledZ-v.overscaledZ),c=l[l.length-1].overscaledZ,d=l[0].overscaledZ-c+1;if(d>1){this.currentStencilSource=void 0,this.nextStencilID+d>256&&this.clearStencil();let v={};for(let w=0;w<d;w++)v[w+c]=new yi({func:i.GEQUAL,mask:255},w+this.nextStencilID,255,i.KEEP,i.KEEP,i.REPLACE);return this.nextStencilID+=d,[v,l]}return[{[c]:yi.disabled},l]}stencilConfigForOverlapTwoPass(e){let i=this.context.gl,l=e.sort((v,w)=>w.overscaledZ-v.overscaledZ),c=l[l.length-1].overscaledZ,d=l[0].overscaledZ-c+1;if(this.clearStencil(),d>1){let v={},w={};for(let P=0;P<d;P++)v[P+c]=new yi({func:i.GREATER,mask:255},d+1+P,255,i.KEEP,i.KEEP,i.REPLACE),w[P+c]=new yi({func:i.GREATER,mask:255},1+P,255,i.KEEP,i.KEEP,i.REPLACE);return this.nextStencilID=2*d+1,[v,w,l]}return this.nextStencilID=3,[{[c]:new yi({func:i.GREATER,mask:255},2,255,i.KEEP,i.KEEP,i.REPLACE)},{[c]:new yi({func:i.GREATER,mask:255},1,255,i.KEEP,i.KEEP,i.REPLACE)},l]}colorModeForRenderPass(){let e=this.context.gl;return this._showOverdrawInspector?new $i([e.CONSTANT_COLOR,e.ONE],new a.b7(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?$i.unblended:$i.alphaBlended}getDepthModeForSublayer(e,i,l){if(!this.opaquePassEnabledForLayer())return ri.disabled;let c=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new ri(l||this.context.gl.LEQUAL,i,[c,c])}getDepthModeFor3D(){return new ri(this.context.gl.LEQUAL,ri.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(e,i){var l,c;this.style=e,this.options=i,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(U.now()),this.imageManager.beginFrame();let d=this.style._order,v=this.style.sourceCaches,w={},P={},C={},L={isRenderingToTexture:!1,isRenderingGlobe:((l=e.projection)===null||l===void 0?void 0:l.transitionState)>0};for(let R in v){let K=v[R];K.used&&K.prepare(this.context),w[R]=K.getVisibleCoordinates(!1),P[R]=w[R].slice().reverse(),C[R]=K.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let R=0;R<d.length;R++)if(this.style._layers[d[R]].is3D()){this.opaquePassCutoff=R;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(let R of d){let K=this.style._layers[R];if(!K.hasOffscreenPass()||K.isHidden(this.transform.zoom))continue;let ee=P[K.source];(K.type==="custom"||ee.length)&&this.renderLayer(this,v[K.source],K,ee,L)}if((c=this.style.projection)===null||c===void 0||c.updateGPUdependent({context:this.context,useProgram:R=>this.useProgram(R)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:i.showOverdrawInspector?a.b7.black:a.b7.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(R,K){let ee=R.context,he=ee.gl,ue=((Ae,Me,Ue)=>{let Ve=Math.cos(Me.rollInRadians),ot=Math.sin(Me.rollInRadians),ut=Ys(Me),at=Me.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:Ae.properties.get("sky-color"),u_horizon_color:Ae.properties.get("horizon-color"),u_horizon:[(Me.width/2-ut*ot)*Ue,(Me.height/2+ut*Ve)*Ue],u_horizon_normal:[-ot,Ve],u_sky_horizon_blend:Ae.properties.get("sky-horizon-blend")*Me.height/2*Ue,u_sky_blend:at}})(K,R.style.map.transform,R.pixelRatio),de=new ri(he.LEQUAL,ri.ReadWrite,[0,1]),me=yi.disabled,xe=R.colorModeForRenderPass(),Se=R.useProgram("sky"),Pe=ec(ee,K);Se.draw(ee,he.TRIANGLES,de,me,xe,Ti.disabled,ue,null,void 0,"sky",Pe.vertexBuffer,Pe.indexBuffer,Pe.segments)}(this,this.style.sky),this._showOverdrawInspector=i.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=d.length-1;this.currentLayer>=0;this.currentLayer--){let R=this.style._layers[d[this.currentLayer]],K=v[R.source],ee=w[R.source];this._renderTileClippingMasks(R,ee,!1),this.renderLayer(this,K,R,ee,L)}this.renderPass="translucent";let N=!1;for(this.currentLayer=0;this.currentLayer<d.length;this.currentLayer++){let R=this.style._layers[d[this.currentLayer]],K=v[R.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(R,L))continue;this.opaquePassEnabledForLayer()||N||(N=!0,L.isRenderingGlobe&&!this.style.map.terrain&&this._renderTilesDepthBuffer());let ee=(R.type==="symbol"?C:P)[R.source];this._renderTileClippingMasks(R,w[R.source],!1),this.renderLayer(this,K,R,ee,L)}if(L.isRenderingGlobe&&function(R,K,ee){let he=R.context,ue=he.gl,de=R.useProgram("atmosphere"),me=new ri(ue.LEQUAL,ri.ReadOnly,[0,1]),xe=R.transform,Se=function(at,It){let Et=at.properties.get("position"),pt=[-Et.x,-Et.y,-Et.z],Nt=a.at(new Float64Array(16));return at.properties.get("anchor")==="map"&&(a.a_(Nt,Nt,It.rollInRadians),a.a$(Nt,Nt,-It.pitchInRadians),a.a_(Nt,Nt,It.bearingInRadians),a.a$(Nt,Nt,It.center.lat*Math.PI/180),a.bm(Nt,Nt,-It.center.lng*Math.PI/180)
726),a.bV(pt,pt,Nt),pt}(ee,R.transform),Pe=xe.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Ae=K.properties.get("atmosphere-blend")*Pe.projectionTransition;if(Ae===0)return;let Me=xa(xe.worldSize,xe.center.lat),Ue=xe.inverseProjectionMatrix,Ve=new Float64Array(4);Ve[3]=1,a.ap(Ve,Ve,xe.modelViewProjectionMatrix),Ve[0]/=Ve[3],Ve[1]/=Ve[3],Ve[2]/=Ve[3],Ve[3]=1,a.ap(Ve,Ve,Ue),Ve[0]/=Ve[3],Ve[1]/=Ve[3],Ve[2]/=Ve[3],Ve[3]=1;let ot=((at,It,Et,pt,Nt)=>({u_sun_pos:at,u_atmosphere_blend:It,u_globe_position:Et,u_globe_radius:pt,u_inv_proj_matrix:Nt}))(Se,Ae,[Ve[0],Ve[1],Ve[2]],Me,Ue),ut=ec(he,K);de.draw(he,ue.TRIANGLES,me,yi.disabled,$i.alphaBlended,Ti.disabled,ot,null,null,"atmosphere",ut.vertexBuffer,ut.indexBuffer,ut.segments)}(this,this.style.sky,this.style.light),this.options.showTileBoundaries){let R=function(K,ee){let he=null,ue=Object.values(K._layers).flatMap(Se=>Se.source&&!Se.isHidden(ee)?[K.sourceCaches[Se.source]]:[]),de=ue.filter(Se=>Se.getSource().type==="vector"),me=ue.filter(Se=>Se.getSource().type!=="vector"),xe=Se=>{(!he||he.getSource().maxzoom<Se.getSource().maxzoom)&&(he=Se)};return de.forEach(Se=>xe(Se)),he||me.forEach(Se=>xe(Se)),he}(this.style,this.transform.zoom);R&&function(K,ee,he){for(let ue=0;ue<he.length;ue++)Ro(K,ee,he[ue])}(this,R,R.getVisibleCoordinates())}this.options.showPadding&&function(R){let K=R.transform.padding;pl(R,R.transform.height-(K.top||0),3,Kc),pl(R,K.bottom||0,3,yr),Ql(R,K.left||0,3,Pa),Ql(R,R.transform.width-(K.right||0),3,Un);let ee=R.transform.centerPoint;(function(he,ue,de,me){Ls(he,ue-1,de-10,2,20,me),Ls(he,ue-10,de-1,20,2,me)})(R,ee.x,R.transform.height-ee.y,Jl)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(e){if(!this.style||!this.style.map||!this.style.map.terrain)return;let i=this.terrainFacilitator.matrix,l=this.transform.modelViewProjectionMatrix,c=this.terrainFacilitator.dirty;c||(c=e?!a.bY(i,l):!a.bZ(i,l)),c||(c=this.style.map.terrain.sourceCache.anyTilesAfterTime(this.terrainFacilitator.renderTime)),c&&(a.b_(i,l),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(d,v){let w=d.context,P=w.gl,C=d.transform,L=$i.unblended,N=new ri(P.LEQUAL,ri.ReadWrite,[0,1]),R=v.sourceCache.getRenderableTiles(),K=d.useProgram("terrainDepth");w.bindFramebuffer.set(v.getFramebuffer("depth").framebuffer),w.viewport.set([0,0,d.width/devicePixelRatio,d.height/devicePixelRatio]),w.clear({color:a.b7.transparent,depth:1});for(let ee of R){let he=v.getTerrainMesh(ee.tileID),ue=v.getTerrainData(ee.tileID),de=C.getProjectionData({overscaledTileID:ee.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),me={u_ele_delta:v.getMeshFrameDelta(C.zoom)};K.draw(w,P.TRIANGLES,N,yi.disabled,L,Ti.backCCW,me,ue,de,"terrain",he.vertexBuffer,he.indexBuffer,he.segments)}w.bindFramebuffer.set(null),w.viewport.set([0,0,d.width,d.height])}(this,this.style.map.terrain),function(d,v){let w=d.context,P=w.gl,C=d.transform,L=$i.unblended,N=new ri(P.LEQUAL,ri.ReadWrite,[0,1]),R=v.getCoordsTexture(),K=v.sourceCache.getRenderableTiles(),ee=d.useProgram("terrainCoords");w.bindFramebuffer.set(v.getFramebuffer("coords").framebuffer),w.viewport.set([0,0,d.width/devicePixelRatio,d.height/devicePixelRatio]),w.clear({color:a.b7.transparent,depth:1}),v.coordsIndex=[];for(let he of K){let ue=v.getTerrainMesh(he.tileID),de=v.getTerrainData(he.tileID);w.activeTexture.set(P.TEXTURE0),P.bindTexture(P.TEXTURE_2D,R.texture);let me={u_terrain_coords_id:(255-v.coordsIndex.length)/255,u_texture:0,u_ele_delta:v.getMeshFrameDelta(C.zoom)},xe=C.getProjectionData({overscaledTileID:he.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ee.draw(w,P.TRIANGLES,N,yi.disabled,L,Ti.backCCW,me,de,xe,"terrain",ue.vertexBuffer,ue.indexBuffer,ue.segments),v.coordsIndex.push(he.tileID.key)}w.bindFramebuffer.set(null),w.viewport.set([0,0,d.width,d.height])}(this,this.style.map.terrain))}renderLayer(e,i,l,c,d){l.isHidden(this.transform.zoom)||(l.type==="background"||l.type==="custom"||(c||[]).length)&&(this.id=l.id,a.b$(l)?function(v,w,P,C,L,N){if(v.renderPass!=="translucent")return;let{isRenderingToTexture:R}=N,K=yi.disabled,ee=v.colorModeForRenderPass();(P._unevaluatedLayout.hasValue("text-variable-anchor")||P._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(he,ue,de,me,xe,Se,Pe,Ae,Me){let Ue=ue.transform,Ve=ue.style.map.terrain,ot=xe==="map",ut=Se==="map";for(let at of he){let It=me.getTile(at),Et=It.getBucket(de);if(!Et||!Et.text||!Et.text.segments.get().length)continue;let pt=a.ag(Et.textSizeData,Ue.zoom),Nt=a.aw(It,1,ue.transform.zoom),ai=je(ot,ue.transform,Nt),Mi=de.layout.get("icon-text-fit")!=="none"&&Et.hasIconData();
726if(pt){let li=Math.pow(2,Ue.zoom-It.tileID.overscaledZ),Bi=Ve?(Hi,Xi)=>Ve.getElevation(at,Hi,Xi):null;Xc(Et,ot,ut,Me,Ue,ai,li,pt,Mi,a.ax(Ue,It,Pe,Ae),at.toUnwrapped(),Bi)}}}(C,v,P,w,P.layout.get("text-rotation-alignment"),P.layout.get("text-pitch-alignment"),P.paint.get("text-translate"),P.paint.get("text-translate-anchor"),L),P.paint.get("icon-opacity").constantOr(1)!==0&&Lo(v,w,P,C,!1,P.paint.get("icon-translate"),P.paint.get("icon-translate-anchor"),P.layout.get("icon-rotation-alignment"),P.layout.get("icon-pitch-alignment"),P.layout.get("icon-keep-upright"),K,ee,R),P.paint.get("text-opacity").constantOr(1)!==0&&Lo(v,w,P,C,!0,P.paint.get("text-translate"),P.paint.get("text-translate-anchor"),P.layout.get("text-rotation-alignment"),P.layout.get("text-pitch-alignment"),P.layout.get("text-keep-upright"),K,ee,R),w.map.showCollisionBoxes&&(ko(v,w,P,C,!0),ko(v,w,P,C,!1))}(e,i,l,c,this.style.placement.variableOffsets,d):a.c0(l)?function(v,w,P,C,L){if(v.renderPass!=="translucent")return;let{isRenderingToTexture:N}=L,R=P.paint.get("circle-opacity"),K=P.paint.get("circle-stroke-width"),ee=P.paint.get("circle-stroke-opacity"),he=!P.layout.get("circle-sort-key").isConstant();if(R.constantOr(1)===0&&(K.constantOr(1)===0||ee.constantOr(1)===0))return;let ue=v.context,de=ue.gl,me=v.transform,xe=v.getDepthModeForSublayer(0,ri.ReadOnly),Se=yi.disabled,Pe=v.colorModeForRenderPass(),Ae=[],Me=me.getCircleRadiusCorrection();for(let Ue=0;Ue<C.length;Ue++){let Ve=C[Ue],ot=w.getTile(Ve),ut=ot.getBucket(P);if(!ut)continue;let at=P.paint.get("circle-translate"),It=P.paint.get("circle-translate-anchor"),Et=a.ax(me,ot,at,It),pt=ut.programConfigurations.get(P.id),Nt=v.useProgram("circle",pt),ai=ut.layoutVertexBuffer,Mi=ut.indexBuffer,li=v.style.map.terrain&&v.style.map.terrain.getTerrainData(Ve),Bi={programConfiguration:pt,program:Nt,layoutVertexBuffer:ai,indexBuffer:Mi,uniformValues:sa(v,ot,P,Et,Me),terrainData:li,projectionData:me.getProjectionData({overscaledTileID:Ve,applyGlobeMatrix:!N,applyTerrainMatrix:!0})};if(he){let Hi=ut.segments.get();for(let Xi of Hi)Ae.push({segments:new a.aG([Xi]),sortKey:Xi.sortKey,state:Bi})}else Ae.push({segments:ut.segments,sortKey:0,state:Bi})}he&&Ae.sort((Ue,Ve)=>Ue.sortKey-Ve.sortKey);for(let Ue of Ae){let{programConfiguration:Ve,program:ot,layoutVertexBuffer:ut,indexBuffer:at,uniformValues:It,terrainData:Et,projectionData:pt}=Ue.state;ot.draw(ue,de.TRIANGLES,xe,Se,Pe,Ti.backCCW,It,Et,pt,P.id,ut,at,Ue.segments,P.paint,v.transform.zoom,Ve)}}(e,i,l,c,d):a.c1(l)?function(v,w,P,C,L){if(P.paint.get("heatmap-opacity")===0)return;let N=v.context,{isRenderingToTexture:R,isRenderingGlobe:K}=L;if(v.style.map.terrain){for(let ee of C){let he=w.getTile(ee);w.hasRenderableParent(ee)||(v.renderPass==="offscreen"?ah(v,he,P,ee,K):v.renderPass==="translucent"&&Yl(v,P,ee,R,K))}N.viewport.set([0,0,v.width,v.height])}else v.renderPass==="offscreen"?function(ee,he,ue,de){let me=ee.context,xe=me.gl,Se=ee.transform,Pe=yi.disabled,Ae=new $i([xe.ONE,xe.ONE],a.b7.transparent,[!0,!0,!0,!0]);(function(Me,Ue,Ve){let ot=Me.gl;Me.activeTexture.set(ot.TEXTURE1),Me.viewport.set([0,0,Ue.width/4,Ue.height/4]);let ut=Ve.heatmapFbos.get(a.bS);ut?(ot.bindTexture(ot.TEXTURE_2D,ut.colorAttachment.get()),Me.bindFramebuffer.set(ut.framebuffer)):(ut=Yc(Me,Ue.width/4,Ue.height/4),Ve.heatmapFbos.set(a.bS,ut))})(me,ee,ue),me.clear({color:a.b7.transparent});for(let Me=0;Me<de.length;Me++){let Ue=de[Me];if(he.hasRenderableParent(Ue))continue;let Ve=he.getTile(Ue),ot=Ve.getBucket(ue);if(!ot)continue;let ut=ot.programConfigurations.get(ue.id),at=ee.useProgram("heatmap",ut),It=Se.getProjectionData({overscaledTileID:Ue,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Et=Se.getCircleRadiusCorrection();at.draw(me,xe.TRIANGLES,ri.disabled,Pe,Ae,Ti.backCCW,vn(Ve,Se.zoom,ue.paint.get("heatmap-intensity"),Et),null,It,ue.id,ot.layoutVertexBuffer,ot.indexBuffer,ot.segments,ue.paint,Se.zoom,ut)}me.viewport.set([0,0,ee.width,ee.height])}(v,w,P,C):v.renderPass==="translucent"&&function(ee,he){let ue=ee.context,de=ue.gl;ue.setColorMode(ee.colorModeForRenderPass());let me=he.heatmapFbos.get(a.bS);me&&(ue.activeTexture.set(de.TEXTURE0),de.bindTexture(de.TEXTURE_2D,me.colorAttachment.get()),ue.activeTexture.set(de.TEXTURE1),Kl(ue,he).bind(de.LINEAR,de.CLAMP_TO_EDGE),ee.useProgram("heatmapTexture").draw(ue,de.TRIANGLES,ri.disabled,yi.disabled,ee.colorModeForRenderPass(),Ti.disabled,Nn(ee,he,0,1),null,null,he.id,ee.viewportBuffer,ee.quadTriangleIndexBuffer,ee.viewportSegments,he.paint,ee.transform.zoom))}(v,P)}(e,i,l,c,d):a.c2(l)?function(v,w,P,C,L){if(v.renderPass!=="translucent")return;let{isRenderingToTexture:N}=L,R=P.paint.get("line-opacity"),K=P.paint.get("line-width");if(R.constantOr(1)===0||K.constantOr(1)===0)return;let ee=v.getDepthModeForSublayer(0,ri.ReadOnly),he=v.colorModeForRenderPass(),ue=P.paint.get("line-dasharray"),de=P.paint.get("line-pattern"),me=de.constantOr(1),xe=P.paint.get("line-gradient"),Se=P.getCrossfadeParameters(),Pe=me?"linePattern":ue?"lineSDF":xe?"lineGradient":"line",Ae=v.context,Me=Ae.gl,Ue=v.transform,Ve=!0;for(let ot of C){let ut=w.getTile(ot);if(me&&!ut.patternsLoaded())continue;let at=ut.getBucket(P);if(!at)continue;let It=at.programConfigurations.get(P.id),Et=v.context.program.get(),pt=v.useProgram(Pe,It),Nt=Ve||pt.program!==Et,ai=v.style.map.terrain&&v.style.map.terrain.getTerrainData(ot),Mi=de.constantOr(null);if(Mi&&ut.imageAtlas){let ki=ut.imageAtlas,Fi=ki.patternPositions[Mi.to.toString()],xr=ki.patternPositions[Mi.from.toString()];Fi&&xr&&It.setConstantPatternPositions(Fi,xr)}let li=Ue.getProjectionData({overscaledTileID:ot,applyGlobeMatrix:!N,applyTerrainMatrix:!0}),Bi=Ue.getPixelScale(),Hi=me?wa(v,ut,P,Bi,Se):ue?Hl(v,ut,P,Bi,ue,Se):xe?jn(v,ut,P,Bi,at.lineClipsArray.length):bn(v,ut,P,Bi);if(me)Ae.activeTexture.set(Me.TEXTURE0),ut.imageAtlasTexture.bind(Me.LINEAR,Me.CLAMP_TO_EDGE),It.updatePaintBuffers(Se);else if(ue&&(Nt||v.lineAtlas.dirty))Ae.activeTexture.set(Me.TEXTURE0),v.lineAtlas.bind(Ae);else if(xe){let ki=at.gradients[P.id],Fi=ki.texture;if(P.gradientVersion!==ki.version){let xr=256;if(P.stepInterpolant){let Rr=w.getSource().maxzoom,Gr=ot.canonical.z===Rr?Math.ceil(1<<v.transform.maxZoom-ot.canonical.z):1;xr=a.ae(a.bT(at.maxLineLength/a.Z*1024*Gr),256,Ae.maxTextureSize)}ki.gradient=a.bU({expression:P.gradientExpression(),evaluationKey:"lineProgress",resolution:xr,image:ki.gradient||void 0,clips:at.lineClipsArray}),ki.texture?ki.texture.update(ki.gradient):ki.texture=new M(Ae,ki.gradient,Me.RGBA),ki.version=P.gradientVersion,Fi=ki.texture}Ae.activeTexture.set(Me.TEXTURE0),Fi.bind(P.stepInterpolant?Me.NEAREST:Me.LINEAR,Me.CLAMP_TO_EDGE)}let Xi;if(N){let[ki]=v.getStencilConfigForOverlapAndUpdateStencilID(C);Xi=ki[ot.overscaledZ]}else Xi=v.stencilModeForClipping(ot);pt.draw(Ae,Me.TRIANGLES,ee,Xi,he,Ti.disabled,Hi,ai,li,P.id,at.layoutVertexBuffer,at.indexBuffer,at.segments,P.paint,v.transform.zoom,It,at.layoutVertexBuffer2),Ve=!1}}(e,i,l,c,d):a.c3(l)?function(v,w,P,C,L){let N=P.paint.get("fill-color"),R=P.paint.get("fill-opacity");if(R.constantOr(1)===0)return;let{isRenderingToTexture:K}=L,ee=v.colorModeForRenderPass(),he=P.paint.get("fill-pattern"),ue=v.opaquePassEnabledForLayer()&&!he.constantOr(1)&&N.constantOr(a.b7.transparent).a===1&&R.constantOr(0)===1?"opaque":"translucent";if(v.renderPass===ue){let de=v.getDepthModeForSublayer(1,v.renderPass==="opaque"?ri.ReadWrite:ri.ReadOnly);ul(v,w,P,C,de,ee,!1,K)}if(v.renderPass==="translucent"&&P.paint.get("fill-antialias")){let de=v.getDepthModeForSublayer(P.getPaintProperty("fill-outline-color")?2:0,ri.ReadOnly);ul(v,w,P,C,de,ee,!0,K)}}(e,i,l,c,d):a.c4(l)?function(v,w,P,C,L){let N=P.paint.get("fill-extrusion-opacity");if(N===0)return;let{isRenderingToTexture:R}=L;
726if(v.renderPass==="translucent"){let K=new ri(v.context.gl.LEQUAL,ri.ReadWrite,v.depthRangeFor3D);if(N!==1||P.paint.get("fill-extrusion-pattern").constantOr(1))hl(v,w,P,C,K,yi.disabled,$i.disabled,R),hl(v,w,P,C,K,v.stencilModeFor3D(),v.colorModeForRenderPass(),R);else{let ee=v.colorModeForRenderPass();hl(v,w,P,C,K,yi.disabled,ee,R)}}}(e,i,l,c,d):a.c5(l)?function(v,w,P,C,L){if(v.renderPass!=="offscreen"&&v.renderPass!=="translucent")return;let{isRenderingToTexture:N}=L,R=v.context,K=v.style.projection.useSubdivision,ee=v.getDepthModeForSublayer(0,ri.ReadOnly),he=v.colorModeForRenderPass();if(v.renderPass==="offscreen")(function(ue,de,me,xe,Se,Pe,Ae){let Me=ue.context,Ue=Me.gl;for(let Ve of me){let ot=de.getTile(Ve),ut=ot.dem;if(!ut||!ut.data||!ot.needsHillshadePrepare)continue;let at=ut.dim,It=ut.stride,Et=ut.getPixels();if(Me.activeTexture.set(Ue.TEXTURE1),Me.pixelStoreUnpackPremultiplyAlpha.set(!1),ot.demTexture=ot.demTexture||ue.getTileTexture(It),ot.demTexture){let Nt=ot.demTexture;Nt.update(Et,{premultiply:!1}),Nt.bind(Ue.NEAREST,Ue.CLAMP_TO_EDGE)}else ot.demTexture=new M(Me,Et,Ue.RGBA,{premultiply:!1}),ot.demTexture.bind(Ue.NEAREST,Ue.CLAMP_TO_EDGE);Me.activeTexture.set(Ue.TEXTURE0);let pt=ot.fbo;if(!pt){let Nt=new M(Me,{width:at,height:at,data:null},Ue.RGBA);Nt.bind(Ue.LINEAR,Ue.CLAMP_TO_EDGE),pt=ot.fbo=Me.createFramebuffer(at,at,!0,!1),pt.colorAttachment.set(Nt.texture)}Me.bindFramebuffer.set(pt.framebuffer),Me.viewport.set([0,0,at,at]),ue.useProgram("hillshadePrepare").draw(Me,Ue.TRIANGLES,Se,Pe,Ae,Ti.disabled,dn(ot.tileID,ut),null,null,xe.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments),ot.needsHillshadePrepare=!1}})(v,w,C,P,ee,yi.disabled,he),R.viewport.set([0,0,v.width,v.height]);else if(v.renderPass==="translucent")if(K){let[ue,de,me]=v.stencilConfigForOverlapTwoPass(C);dl(v,w,P,me,ue,ee,he,!1,N),dl(v,w,P,me,de,ee,he,!0,N)}else{let[ue,de]=v.getStencilConfigForOverlapAndUpdateStencilID(C);dl(v,w,P,de,ue,ee,he,!1,N)}}(e,i,l,c,d):a.c6(l)?function(v,w,P,C,L){if(v.renderPass!=="translucent"||P.paint.get("raster-opacity")===0||!C.length)return;let{isRenderingToTexture:N}=L,R=w.getSource(),K=v.style.projection.useSubdivision;if(R instanceof Sr)Ka(v,w,P,C,null,!1,!1,R.tileCoords,R.flippedWindingOrder,N);else if(K){let[ee,he,ue]=v.stencilConfigForOverlapTwoPass(C);Ka(v,w,P,ue,ee,!1,!0,Ya,!1,N),Ka(v,w,P,ue,he,!0,!0,Ya,!1,N)}else{let[ee,he]=v.getStencilConfigForOverlapAndUpdateStencilID(C);Ka(v,w,P,he,ee,!1,!0,Ya,!1,N)}}(e,i,l,c,d):a.c7(l)?function(v,w,P,C,L){let N=P.paint.get("background-color"),R=P.paint.get("background-opacity");if(R===0)return;let{isRenderingToTexture:K}=L,ee=v.context,he=ee.gl,ue=v.style.projection,de=v.transform,me=de.tileSize,xe=P.paint.get("background-pattern");if(v.isPatternMissing(xe))return;let Se=!xe&&N.a===1&&R===1&&v.opaquePassEnabledForLayer()?"opaque":"translucent";if(v.renderPass!==Se)return;let Pe=yi.disabled,Ae=v.getDepthModeForSublayer(0,Se==="opaque"?ri.ReadWrite:ri.ReadOnly),Me=v.colorModeForRenderPass(),Ue=v.useProgram(xe?"backgroundPattern":"background"),Ve=C||Re(de,{tileSize:me,terrain:v.style.map.terrain});xe&&(ee.activeTexture.set(he.TEXTURE0),v.imageManager.bind(v.context));let ot=P.getCrossfadeParameters();for(let ut of Ve){let at=de.getProjectionData({overscaledTileID:ut,applyGlobeMatrix:!K,applyTerrainMatrix:!0}),It=xe?$n(R,v,xe,{tileID:ut,tileSize:me},ot):Mo(R,N),Et=v.style.map.terrain&&v.style.map.terrain.getTerrainData(ut),pt=ue.getMeshFromTileID(ee,ut.canonical,!1,!0,"raster");Ue.draw(ee,he.TRIANGLES,Ae,Pe,Me,Ti.backCCW,It,Et,at,P.id,pt.vertexBuffer,pt.indexBuffer,pt.segments)}}(e,0,l,c,d):a.c8(l)&&function(v,w,P,C){let{isRenderingGlobe:L}=C,N=v.context,R=P.implementation,K=v.style.projection,ee=v.transform,he=ee.getProjectionDataForCustomLayer(L),ue={farZ:ee.farZ,nearZ:ee.nearZ,fov:ee.fov*Math.PI/180,modelViewProjectionMatrix:ee.modelViewProjectionMatrix,projectionMatrix:ee.projectionMatrix,shaderData:{variantName:K.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; 727uniform mat4 u_projection_matrix; 728${K.shaderPreludeCode.vertexSource}`,define:K.shaderDefine},defaultProjectionData:he},de=R.renderingMode?R.renderingMode:"2d";if(v.renderPass==="offscreen"){let me=R.prerender;me&&(v.setCustomLayerDefaults(),N.setColorMode(v.colorModeForRenderPass()),me.call(R,N.gl,ue),N.setDirty(),v.setBaseState())}else if(v.renderPass==="translucent"){v.setCustomLayerDefaults(),N.setColorMode(v.colorModeForRenderPass()),N.setStencilMode(yi.disabled);let me=de==="3d"?v.getDepthModeFor3D():v.getDepthModeForSublayer(0,ri.ReadOnly);N.setDepthMode(me),R.render(N.gl,ue),N.setDirty(),v.setBaseState(),N.bindFramebuffer.set(null)}}(e,0,l,d))}saveTileTexture(e){let i=this._tileTextures[e.size[0]];i?i.push(e):this._tileTextures[e.size[0]]=[e]}getTileTexture(e){let i=this._tileTextures[e];return i&&i.length>0?i.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;let i=this.imageManager.getPattern(e.from.toString()),l=this.imageManager.getPattern(e.to.toString());return!i||!l}useProgram(e,i,l=!1){this.cache=this.cache||{};let c=!!this.style.map.terrain,d=this.style.projection,v=e+(i?i.c
728acheKey:"")+`/${l?jr:d.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(c?"/terrain":"");return this.cache[v]||(this.cache[v]=new er(this.context,yn[e],i,Vn[e],this._showOverdrawInspector,c,l?yn.projectionMercator:d.shaderPreludeCode,l?Yn:d.shaderDefine)),this.cache[v]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new M(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:e,drawingBufferHeight:i}=this.context.gl;return this.width!==e||this.height!==i}}
728function tc(h,e){let i,l=!1,c=null,d=null,v=()=>{c=null,l&&(h.apply(d,i),c=setTimeout(v,e),l=!1)};return(...w)=>(l=!0,d=this,i=w,c||v(),c)}class ic{constructor(e){this._getCurrentHash=()=>{let i=window.location.hash.replace("#","");if(this._hashName){let l;return i.split("&").map(c=>c.split("=")).forEach(c=>{c[0]===this._hashName&&(l=c)}),(l&&l[1]||"").split("/")}return i.split("/")},this._onHashChange=()=>{let i=this._getCurrentHash();if(!this._isValidHash(i))return!1;let l=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(i[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+i[2],+i[1]],zoom:+i[0],bearing:l,pitch:+(i[4]||0)}),!0},this._updateHashUnthrottled=()=>{let i=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,i)},this._removeHash=()=>{let i=this._getCurrentHash();if(i.length===0)return;let l=i.join("/"),c=l;c.split("&").length>0&&(c=c.split("&")[0]),this._hashName&&(c=`${this._hashName}=${l}`);let d=window.location.hash.replace(c,"");d.startsWith("#&")?d=d.slice(0,1)+d.slice(2):d==="#"&&(d="");let v=window.location.href.replace(/(#.+)?$/,d);v=v.replace("&&","&"),window.history.replaceState(window.history.state,null,v)},this._updateHash=tc(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(e){let i=this._map.getCenter(),l=Math.round(100*this._map.getZoom())/100,c=Math.ceil((l*Math.LN2+Math.log(512/360/.5))/Math.LN10),d=Math.pow(10,c),v=Math.round(i.lng*d)/d,w=Math.round(i.lat*d)/d,P=this._map.getBearing(),C=this._map.getPitch(),L="";if(L+=e?`/${v}/${w}/${l}`:`${l}/${w}/${v}`,(P||C)&&(L+="/"+Math.round(10*P)/10),C&&(L+=`/${Math.round(C)}`),this._hashName){let N=this._hashName,R=!1,K=window.location.hash.slice(1).split("&").map(ee=>{let he=ee.split("=")[0];return he===N?(R=!0,`${he}=${L}`):ee}).filter(ee=>ee);return R||K.push(`${N}=${L}`),`#${K.join("&")}`}return`#${L}`}_isValidHash(e){if(e.length<3||e.some(isNaN))return!1;try{new a.Q(+e[2],+e[1])}catch{return!1}let i=+e[0],l=+(e[3]||0),c=+(e[4]||0);return i>=this._map.getMinZoom()&&i<=this._map.getMaxZoom()&&l>=-180&&l<=180&&c>=this._map.getMinPitch()&&c<=this._map.getMaxPitch()}}let Ja={linearity:.3,easing:a.c9(0,0,.3,1)},Ea=a.e({deceleration:2500,maxSpeed:1400},Ja),Qc=a.e({deceleration:20,maxSpeed:1400},Ja),eu=a.e({deceleration:1e3,maxSpeed:360},Ja),tu=a.e({deceleration:1e3,maxSpeed:90},Ja),iu=a.e({deceleration:1e3,maxSpeed:360},Ja);class ru{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:U.now(),settings:e})}_drainInertiaBuffer(){let e=this._inertiaBuffer,i=U.now();for(;e.length>0&&i-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let i={zoom:0,bearing:0,pitch:0,roll:0,pan:new a.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:d}of this._inertiaBuffer)i.zoom+=d.zoomDelta||0,i.bearing+=d.bearingDelta||0,i.pitch+=d.pitchDelta||0,i.roll+=d.rollDelta||0,d.panDelta&&i.pan._add(d.panDelta),d.around&&(i.around=d.around),d.pinchAround&&(i.pinchAround=d.pinchAround);let l=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,c={};if(i.pan.mag()){let d=eo(i.pan.mag(),l,a.e({},Ea,e||{})),v=i.pan.mult(d.amount/i.pan.mag()),w=this._map.cameraHelper.handlePanInertia(v,this._map.transform);c.center=w.easingCenter,c.offset=w.easingOffset,Qa(c,d)}if(i.zoom){let d=eo(i.zoom,l,Qc);c.zoom=this._map.transform.zoom+d.amount,Qa(c,d)}if(i.bearing){let d=eo(i.bearing,l,eu);c.bearing=this._map.transform.bearing+a.ae(d.amount,-179,179),Qa(c,d)}if(i.pitch){let d=eo(i.pitch,l,tu);c.pitch=this._map.transform.pitch+d.amount,Qa(c,d)}if(i.roll){let d=eo(i.roll,l,iu);
vendor: 16,353 bytes, line 728
728c.roll=this._map.transform.roll+a.ae(d.amount,-179,179),Qa(c,d)}if(c.zoom||c.bearing){let d=i.pinchAround===void 0?i.around:i.pinchAround;c.around=d?this._map.unproject(d):this._map.getCenter()}return this.clear(),a.e(c,{noMoveStart:!0})}}function Qa(h,e){(!h.duration||h.duration<e.duration)&&(h.duration=e.duration,h.easing=e.easing)}function eo(h,e,i){let{maxSpeed:l,linearity:c,deceleration:d}=i,v=a.ae(h*c/(e/1e3),-l,l),w=Math.abs(v)/(d*c);return{easing:i.easing,duration:1e3*w,amount:v*(w/2)}}class nn extends a.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,i,l,c={}){l=l instanceof MouseEvent?l:new MouseEvent(e,l);let d=O.mousePos(i.getCanvas(),l),v=i.unproject(d);super(e,a.e({point:d,lngLat:v,originalEvent:l},c)),this._defaultPrevented=!1,this.target=i}}class to extends a.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,i,l){let c=e==="touchend"?l.changedTouches:l.touches,d=O.touchPos(i.getCanvasContainer(),c),v=d.map(P=>i.unproject(P)),w=d.reduce((P,C,L,N)=>P.add(C.div(N.length)),new a.P(0,0));super(e,{points:d,point:w,lngLats:v,lngLat:i.unproject(w),originalEvent:l}),this._defaultPrevented=!1}}class Gn extends a.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,i,l){super(e,{originalEvent:l}),this._defaultPrevented=!1}}class gs{constructor(e,i){this._map=e,this._clickTolerance=i.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new Gn(e.type,this._map,e))}mousedown(e,i){return this._mousedownPos=i,this._firePreventable(new nn(e.type,this._map,e))}mouseup(e){this._map.fire(new nn(e.type,this._map,e))}click(e,i){this._mousedownPos&&this._mousedownPos.dist(i)>=this._clickTolerance||this._map.fire(new nn(e.type,this._map,e))}dblclick(e){return this._firePreventable(new nn(e.type,this._map,e))}mouseover(e){this._map.fire(new nn(e.type,this._map,e))}mouseout(e){this._map.fire(new nn(e.type,this._map,e))}touchstart(e){return this._firePreventable(new to(e.type,this._map,e))}touchmove(e){this._map.fire(new to(e.type,this._map,e))}touchend(e){this._map.fire(new to(e.type,this._map,e))}touchcancel(e){this._map.fire(new to(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class nu{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new nn(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new nn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new nn(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Sn{constructor(e){this._map=e}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(e){return this.transform.screenPointToLocation(a.P.convert(e),this._map.terrain)}}class Ma{constructor(e,i){this._map=e,this._tr=new Sn(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=i.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,i){this.isEnabled()&&e.shiftKey&&e.button===0&&(O.disableDrag(),this._startPos=this._lastPos=i,this._active=!0)}mousemoveWindow(e,i){if(!this._active)return;let l=i;if(this._lastPos.equals(l)||!this._box&&l.dist(this._startPos)<this._clickTolerance)return;let c=this._startPos;this._lastPos=l,this._box||(this._box=O.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",e));let d=Math.min(c.x,l.x),v=Math.max(c.x,l.x),w=Math.min(c.y,l.y),P=Math.max(c.y,l.y);O.setTransform(this._box,`translate(${d}px,${w}px)`),this._box.style.width=v-d+"px",this._box.style.height=P-w+"px"}mouseupWindow(e,i){if(!this._active||e.button!==0)return;let l=this._startPos,c=i;if(this.reset(),O.suppressClick(),l.x!==c.x||l.y!==c.y)return this._map.fire(new a.l("boxzoomend",{originalEvent:e})),{cameraAnimation:d=>d.fitScreenCoordinates(l,c,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(e){this._active&&e.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(O.remove(this._box),this._box=null),O.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,i){return this._map.fire(new a.l(e,{originalEvent:i}))}}function rc(h,e){if(h.length!==e.length)throw new Error(`The number of touches and points are not equal - touches ${h.length}, points ${e.length}`);let i={};for(let l=0;l<h.length;l++)i[h[l].identifier]=e[l];return i}class lh{constructor(e){this.reset(),this.numTouches=e.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(e,i,l){(this.centroid||l.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=e.timeStamp),l.length===this.numTouches&&(this.centroid=function(c){let d=new a.P(0,0);for(let v of c)d._add(v);return d.div(c.length)}(i),this.touches=rc(l,i)))}touchmove(e,i,l){if(this.aborted||!this.centroid)return;let c=rc(l,i);for(let d in this.touches){let v=c[d];(!v||v.dist(this.touches[d])>30)&&(this.aborted=!0)}}touchend(e,i,l){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),l.length===0){let c=!this.aborted&&this.centroid;if(this.reset(),c)return c}}}class nc{constructor(e){this.singleTap=new lh(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,i,l){this.singleTap.touchstart(e,i,l)}touchmove(e,i,l){this.singleTap.touchmove(e,i,l)}touchend(e,i,l){let c=this.singleTap.touchend(e,i,l);if(c){let d=e.timeStamp-this.lastTime<500,v=!this.lastTap||this.lastTap.dist(c)<30;if(d&&v||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=c,this.count===this.numTaps)return this.reset(),c}}}class ch{constructor(e){this._tr=new Sn(e),this._zoomIn=new nc({numTouches:1,numTaps:2}),this._zoomOut=new nc({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,i,l){this._zoomIn.touchstart(e,i,l),this._zoomOut.touchstart(e,i,l)}touchmove(e,i,l){this._zoomIn.touchmove(e,i,l),this._zoomOut.touchmove(e,i,l)}touchend(e,i,l){let c=this._zoomIn.touchend(e,i,l),d=this._zoomOut.touchend(e,i,l),v=this._tr;return c?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:w=>w.easeTo({duration:300,zoom:v.zoom+1,around:v.unproject(c)},{originalEvent:e})}):d?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:w=>w.easeTo({duration:300,zoom:v.zoom-1,around:v.unproject(d)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class io{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){let i=this._moveFunction(...e);if(i.bearingDelta||i.pitchDelta||i.rollDelta||i.around||i.panDelta)return this._active=!0,i}dragStart(e,i){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(i)?i[0]:i,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,i){if(!this.isEnabled())return;let l=this._lastPoint;if(!l)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);let c=Array.isArray(i)?i[0]:i;return!this._moved&&c.dist(l)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=c,this._move(l,c))}dragEnd(e){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(e)&&(this._moved&&O.suppressClick(),this.reset(e))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}let Bo={0:1,2:2};class Dn{constructor(e){this._correctEvent=e.checkCorrectEvent}startMove(e){let i=O.mouseButton(e);this._eventButton=i}endMove(e){delete this._eventButton}isValidStartEvent(e){return this._correctEvent(e)}isValidMoveEvent(e){return!function(i,l){let c=Bo[l];return i.buttons===void 0||(i.buttons&c)!==c}(e,this._eventButton)}isValidEndEvent(e){return O.mouseButton(e)===this._eventButton}}class zt{constructor(){this._firstTouch=void 0}_isOneFingerTouch(e){return e.targetTouches.length===1}_isSameTouchEvent(e){return e.targetTouches[0].identifier===this._firstTouch}startMove(e){this._firstTouch=e.targetTouches[0].identifier}endMove(e){delete this._firstTouch}isValidStartEvent(e){return this._isOneFingerTouch(e)}isValidMoveEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}isValidEndEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}}class su{constructor(e=new Dn({checkCorrectEvent:()=>!0}),i=new zt){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=i}_executeRelevantHandler(e,i,l){return e instanceof MouseEvent?i(e):typeof TouchEvent<"u"&&e instanceof TouchEvent?l(e):void 0}startMove(e){this._executeRelevantHandler(e,i=>this.mouseMoveStateManager.startMove(i),i=>this.oneFingerTouchMoveStateManager.startMove(i))}endMove(e){this._executeRelevantHandler(e,i=>this.mouseMoveStateManager.endMove(i),i=>this.oneFingerTouchMoveStateManager.endMove(i))}isValidStartEvent(e){return this._executeRelevantHandler(e,i=>this.mouseMoveStateManager.isValidStartEvent(i),i=>this.oneFingerTouchMoveStateManager.isValidStartEvent(i))}isValidMoveEvent(e){return this._executeRelevantHandler(e,i=>this.mouseMoveStateManager.isValidMoveEvent(i),i=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(i))}isValidEndEvent(e){return this._executeRelevantHandler(e,i=>this.mouseMoveStateManager.isValidEndEvent(i),i=>this.oneFingerTouchMoveStateManager.isValidEndEvent(i))}}let ro=h=>{h.mousedown=h.dragStart,h.mousemoveWindow=h.dragMove,h.mouseup=h.dragEnd,h.contextmenu=e=>{e.preventDefault()}};class au{constructor(e,i){this._clickTolerance=e.clickTolerance||1,this._map=i,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new a.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,i,l){return this._calculateTransform(e,i,l)}touchmove(e,i,l){if(this._active){if(!this._shouldBePrevented(l.length))return e.preventDefault(),this._calculateTransform(e,i,l);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,i,l){this._calculateTransform(e,i,l),this._active&&this._shouldBePrevented(l.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,i,l){l.length>0&&(this._active=!0);let c=rc(l,i),d=new a.P(0,0),v=new a.P(0,0),w=0;for(let C in c){let L=c[C],N=this._touches[C];N&&(d._add(L),v._add(L.sub(N)),w++,c[C]=L)}if(this._touches=c,this._shouldBePrevented(w)||!v.mag())return;let P=v.div(w);return this._sum._add(P),this._sum.mag()<this._clickTolerance?void 0:{around:d.div(w),panDelta:P}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ca{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(e,i,l){this._firstTwoTouches||l.length<2||(this._firstTwoTouches=[l[0].identifier,l[1].identifier],this._start([i[0],i[1]]))}touchmove(e,i,l){if(!this._firstTwoTouches)return;e.preventDefault();let[c,d]=this._firstTwoTouches,v=aa(l,i,c),w=aa(l,i,d);if(!v||!w)return;let P=this._aroundCenter?null:v.add(w).div(2);return this._move([v,w],P,e)}touchend(e,i,l){if(!this._firstTwoTouches)return;let[c,d]=this._firstTwoTouches,v=aa(l,i,c),w=aa(l,i,d);v&&w||(this._active&&O.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(e){this._enabled=!0,this._aroundCenter=!!e&&e.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function aa(h,e,i){for(let l=0;l<h.length;l++)if(h[l].identifier===i)return e[l]}function sc(h,e){return Math.log(h/e)/Math.LN2}class mi extends Ca{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(e){this._startDistance=this._distance=e[0].dist(e[1])}_move(e,i){let l=this._distance;if(this._distance=e[0].dist(e[1]),this._active||!(Math.abs(sc(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:sc(this._distance,l),pinchAround:i}}}function ml(h,e){return 180*h.angleWith(e)/Math.PI}class ou extends Ca{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(e){this._startVector=this._vector=e[0].sub(e[1]),this._minDiameter=e[0].dist(e[1])}_move(e,i,l){let c=this._vector;if(this._vector=e[0].sub(e[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:ml(this._vector,c),pinchAround:i}}_isBelowThreshold(e){this._minDiameter=Math.min(this._minDiameter,e.mag());let i=25/(Math.PI*this._minDiameter)*360,l=ml(e,this._startVector);return Math.abs(l)<i}}function Fo(h){return Math.abs(h.y)>Math.abs(h.x)}class lu extends Ca{constructor(e){super(),this._currentTouchCount=0,this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,i,l){super.touchstart(e,i,l),this._currentTouchCount=l.length}_start(e){this._lastPoints=e,Fo(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,i,l){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let c=e[0].sub(this._lastPoints[0]),d=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(c,d,l.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:(c.y+d.y)/2*-.5}):void 0}gestureBeginsVertically(e,i,l){if(this._valid!==void 0)return this._valid;let c=e.mag()>=2,d=i.mag()>=2;if(!c&&!d)return;if(!c||!d)return this._firstMove===void 0&&(this._firstMove=l),l-this._firstMove<100&&void 0;let v=e.y>0==i.y>0;return Fo(e)&&Fo(i)&&v}}let uh={panStep:100,bearingStep:15,pitchStep:10};class ac{constructor(e){this._tr=new Sn(e);let i=uh;this._panStep=i.panStep,this._bearingStep=i.bearingStep,this._pitchStep=i.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let i=0,l=0,c=0,d=0,v=0;switch(e.keyCode){case 61:case 107:case 171:case 187:i=1;break;case 189:case 109:case 173:i=-1;break;case 37:e.shiftKey?l=-1:(e.preventDefault(),d=-1);break;case 39:e.shiftKey?l=1:(e.preventDefault(),d=1);break;case 38:e.shiftKey?c=1:(e.preventDefault(),v=-1);break;case 40:e.shiftKey?c=-1:(e.preventDefault(),v=1);break;default:return}return this._rotationDisabled&&(l=0,c=0),{cameraAnimation:w=>{let P=this._tr;w.easeTo({duration:300,easeId:"keyboardHandler",easing:oc,zoom:i?Math.round(P.zoom)+i*(e.shiftKey?2:1):P.zoom,bearing:P.bearing+l*this._bearingStep,pitch:P.pitch+c*this._pitchStep,offset:[-d*this._panStep,-v*this._panStep],center:P.center},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function oc(h){return h*(2-h)}let lc=4.000244140625;class cu{constructor(e,i){this._onTimeout=l=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(l)}
728,this._map=e,this._tr=new Sn(e),this._triggerRenderFrame=i,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&e.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let i=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,l=U.now(),c=l-(this._lastWheelEventTime||0);this._lastWheelEventTime=l,i!==0&&i%lc==0?this._type="wheel":i!==0&&Math.abs(i)<4?this._type="trackpad":c>400?(this._type=null,this._lastValue=i,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(c*i)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,i+=this._lastValue)),e.shiftKey&&i&&(i/=4),this._type&&(this._lastWheelEvent=e,this._delta-=i,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let i=O.mousePos(this._map.getCanvas(),e),l=this._tr;this._aroundPoint=this._aroundCenter?l.transform.locationToScreenPoint(a.Q.convert(l.center)):i,this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let e=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let w=e.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=w),typeof this._targetZoom=="number"&&(this._targetZoom+=w)}if(this._delta!==0){let w=this._type==="wheel"&&Math.abs(this._delta)>lc?this._wheelZoomRate:this._defaultZoomRate,P=2/(1+Math.exp(-Math.abs(this._delta*w)));this._delta<0&&P!==0&&(P=1/P);let C=typeof this._targetZoom!="number"?e.scale:a.aI(this._targetZoom);this._targetZoom=Math.min(e.maxZoom,Math.max(e.minZoom,a.ab(C*P))),this._type==="wheel"&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let i=typeof this._targetZoom!="number"?e.zoom:this._targetZoom,l=this._startZoom,c=this._easing,d,v=!1;if(this._type==="wheel"&&l&&c){let w=U.now()-this._lastWheelEventTime,P=Math.min((w+5)/200,1),C=c(P);d=a.B.number(l,i,C),P<1?this._frameId||(this._frameId=!0):v=!0}else d=i,v=!0;return this._active=!0,v&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=d,{noInertia:!0,needsRenderFrame:!v,zoomDelta:d-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let i=a.cb;if(this._prevEase){let l=this._prevEase,c=(U.now()-l.start)/l.duration,d=l.easing(c+.01)-l.easing(c),v=.27/Math.sqrt(d*d+1e-4)*.01,w=Math.sqrt(.0729-v*v);i=a.c9(v,w,.25,1)}return this._prevEase={start:U.now(),duration:e,easing:i},i}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class cc{constructor(e,i){this._clickZoom=e,this._tapZoom=i}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class hh{constructor(e){this._tr=new Sn(e),this.reset()}reset(){this._active=!1}dblclick(e,i){return e.preventDefault(),{cameraAnimation:l=>{l.easeTo({duration:300,zoom:this._tr.zoom+(e.shiftKey?-1:1),around:this._tr.unproject(i)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class dh{constructor(){this._tap=new nc({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,i,l){if(!this._swipePoint)if(this._tapTime){let c=i[0],d=e.timeStamp-this._tapTime<500,v=this._tapPoint.dist(c)<30;d&&v?l.length>0&&(this._swipePoint=c,this._swipeTouch=l[0].identifier):this.reset()}else this._tap.touchstart(e,i,l)}touchmove(e,i,l){if(this._tapTime){if(this._swipePoint){if(l[0].identifier!==this._swipeTouch)return;let c=i[0],d=c.y-this._swipePoint.y;return this._swipePoint=c,e.preventDefault(),this._active=!0,{zoomDelta:d/128}}}else this._tap.touchmove(e,i,l)}touchend(e,i,l){if(this._tapTime)this._swipePoint&&l.length===0&&this.reset();else{let c=this._tap.touchend(e,i,l);c&&(this._tapTime=e.timeStamp,this._tapPoint=c)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class zs{constructor(e,i,l){this._el=e,this._mousePan=i,this._touchPan=l}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Wi{constructor(e,i,l,c){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=i,this._mousePitch=l,this._mouseRoll=c}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class Oo{constructor(e,i,l,c){this._el=e,this._touchZoom=i,this._touchRotate=l,this._tapDragZoom=c,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class gl{constructor(e,i){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=e,this._options=i,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=O.create("div","maplibregl-cooperative-gesture-screen",e);let i=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(i=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let l=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),c=document.createElement("div");c.className="maplibregl-desktop-message",c.textContent=i,this._container.appendChild(c);let d=document.createElement("div");d.className="maplibregl-mobile-message",d.textContent=l,this._container.appendChild(d),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(O.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(e){return e[this._bypassKey]}notifyGestureBlocked(e,i){this._enabled&&(this._map.fire(new a.l("cooperativegestureprevented",{gestureType:e,originalEvent:i})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let No=h=>h.zoom||h.drag||h.roll||h.pitch||h.rotate;class uu extends a.l{}function yl(h){return h.panDelta&&h.panDelta.mag()||h.zoomDelta||h.bearingDelta||h.pitchDelta||h.rollDelta}class ph{constructor(e,i){this.handleWindowEvent=c=>{this.handleEvent(c,`${c.type}Window`)},this.handleEvent=(c,d)=>
vendor: 4,758 bytes, line 728
728{if(c.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let v=c.type==="renderFrame"?void 0:c,w={needsRenderFrame:!1},P={},C={};for(let{handlerName:R,handler:K,allowed:ee}of this._handlers){if(!K.isEnabled())continue;let he;if(this._blockedByActive(C,ee,R))K.reset();else if(K[d||c.type]){if(a.cc(c,d||c.type)){let ue=O.mousePos(this._map.getCanvas(),c);he=K[d||c.type](c,ue)}else if(a.cd(c,d||c.type)){let ue=this._getMapTouches(c.touches),de=O.touchPos(this._map.getCanvas(),ue);he=K[d||c.type](c,de,ue)}else a.ce(d||c.type)||(he=K[d||c.type](c));this.mergeHandlerResult(w,P,he,R,v),he&&he.needsRenderFrame&&this._triggerRenderFrame()}(he||K.isActive())&&(C[R]=K)}let L={};for(let R in this._previousActiveHandlers)C[R]||(L[R]=v);this._previousActiveHandlers=C,(Object.keys(L).length||yl(w))&&(this._changes.push([w,P,L]),this._triggerRenderFrame()),(Object.keys(C).length||yl(w))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:N}=w;N&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],N(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ru(e),this._bearingSnap=i.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(i);let l=this._el;this._listeners=[[l,"touchstart",{passive:!0}],[l,"touchmove",{passive:!1}],[l,"touchend",void 0],[l,"touchcancel",void 0],[l,"mousedown",void 0],[l,"mousemove",void 0],[l,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[l,"mouseover",void 0],[l,"mouseout",void 0],[l,"dblclick",void 0],[l,"click",void 0],[l,"keydown",{capture:!1}],[l,"keyup",void 0],[l,"wheel",{passive:!1}],[l,"contextmenu",void 0],[window,"blur",void 0]];for(let[c,d,v]of this._listeners)O.addEventListener(c,d,c===document?this.handleWindowEvent:this.handleEvent,v)}destroy(){for(let[e,i,l]of this._listeners)O.removeEventListener(e,i,e===document?this.handleWindowEvent:this.handleEvent,l)}_addDefaultHandlers(e){let i=this._map,l=i.getCanvasContainer();this._add("mapEvent",new gs(i,e));let c=i.boxZoom=new Ma(i,e);this._add("boxZoom",c),e.interactive&&e.boxZoom&&c.enable();let d=i.cooperativeGestures=new gl(i,e.cooperativeGestures);this._add("cooperativeGestures",d),e.cooperativeGestures&&d.enable();let v=new ch(i),w=new hh(i);i.doubleClickZoom=new cc(w,v),this._add("tapZoom",v),this._add("clickZoom",w),e.interactive&&e.doubleClickZoom&&i.doubleClickZoom.enable();let P=new dh;this._add("tapDragZoom",P);let C=i.touchPitch=new lu(i);this._add("touchPitch",C),e.interactive&&e.touchPitch&&i.touchPitch.enable(e.touchPitch);let L=()=>i.project(i.getCenter()),N=function({enable:Se,clickTolerance:Pe,aroundCenter:Ae=!0,minPixelCenterThreshold:Me=100,rotateDegreesPerPixelMoved:Ue=.8},Ve){let ot=new Dn({checkCorrectEvent:ut=>O.mouseButton(ut)===0&&ut.ctrlKey||O.mouseButton(ut)===2&&!ut.ctrlKey});return new io({clickTolerance:Pe,move:(ut,at)=>{let It=Ve();if(Ae&&Math.abs(It.y-ut.y)>Me)return{bearingDelta:a.ca(new a.P(ut.x,at.y),at,It)};let Et=(at.x-ut.x)*Ue;return Ae&&at.y<It.y&&(Et=-Et),{bearingDelta:Et}},moveStateManager:ot,enable:Se,assignEvents:ro})}(e,L),R=function({enable:Se,clickTolerance:Pe,pitchDegreesPerPixelMoved:Ae=-.5}){let Me=new Dn({checkCorrectEvent:Ue=>O.mouseButton(Ue)===0&&Ue.ctrlKey||O.mouseButton(Ue)===2});return new io({clickTolerance:Pe,move:(Ue,Ve)=>({pitchDelta:(Ve.y-Ue.y)*Ae}),moveStateManager:Me,enable:Se,assignEvents:ro})}(e),K=function({enable:Se,clickTolerance:Pe,rollDegreesPerPixelMoved:Ae=.3},Me){let Ue=new Dn({checkCorrectEvent:Ve=>O.mouseButton(Ve)===2&&Ve.ctrlKey});return new io({clickTolerance:Pe,move:(Ve,ot)=>{let ut=Me(),at=(ot.x-Ve.x)*Ae;return ot.y<ut.y&&(at=-at),{rollDelta:at}},moveStateManager:Ue,enable:Se,assignEvents:ro})}(e,L);i.dragRotate=new Wi(e,N,R,K),this._add("mouseRotate",N,["mousePitch"]),this._add("mousePitch",R,["mouseRotate","mouseRoll"]),this._add("mouseRoll",K,["mousePitch"]),e.interactive&&e.dragRotate&&i.dragRotate.enable();let ee=function({enable:Se,clickTolerance:Pe}){let Ae=new Dn({checkCorrectEvent:Me=>O.mouseButton(Me)===0&&!Me.ctrlKey});return new io({clickTolerance:Pe,move:(Me,Ue)=>({around:Ue,panDelta:Ue.sub(Me)}),activateOnStart:!0,moveStateManager:Ae,enable:Se,assignEvents:ro})}(e),he=new au(e,i);i.dragPan=new zs(l,ee,he),this._add("mousePan",ee),this._add("touchPan",he,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&i.dragPan.enable(e.dragPan);let ue=new ou,de=new mi;i.touchZoomRotate=new Oo(l,de,ue,P),this._add("touchRotate",ue,["touchPan","touchZoom"]),this._add("touchZoom",de,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&i.touchZoomRotate.enable(e.touchZoomRotate);let me=i.scrollZoom=new cu(i,()=>
728this._triggerRenderFrame());this._add("scrollZoom",me,["mousePan"]),e.interactive&&e.scrollZoom&&i.scrollZoom.enable(e.scrollZoom);let xe=i.keyboard=new ac(i);this._add("keyboard",xe),e.interactive&&e.keyboard&&i.keyboard.enable(),this._add("blockableMapEvent",new nu(i))}_add(e,i,l){this._handlers.push({handlerName:e,handler:i,allowed:l}),this._handlersById[e]=i}stop(e){if(!this._updatingCamera){for(let{handler:i}of this._handlers)i.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(let{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!No(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,i,l){for(let c in e)if(c!==l&&(!i||i.indexOf(c)<0))return!0;return!1}_getMapTouches(e){let i=[];for(let l of e)this._el.contains(l.target)&&i.push(l);return i}mergeHandlerResult(e,i,l,c,d){if(!l)return;a.e(e,l);let v={handlerName:c,originalEvent:l.originalEvent||d};l.zoomDelta!==void 0&&(i.zoom=v),l.panDelta!==void 0&&(i.drag=v),l.rollDelta!==void 0&&(i.roll=v),l.pitchDelta!==void 0&&(i.pitch=v),l.bearingDelta!==void 0&&(i.rotate=v)}_applyChanges(){let e={},i={},l={};for(let[c,d,v]of this._changes)c.panDelta&&(e.panDelta=(e.panDelta||new a.P(0,0))._add(c.panDelta)),c.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+c.zoomDelta),c.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+c.bearingDelta),c.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+c.pitchDelta),c.rollDelta&&(e.rollDelta=(e.rollDelta||0)+c.rollDelta),c.around!==void 0&&(e.around=c.around),c.pinchAround!==void 0&&(e.pinchAround=c.pinchAround),c.noInertia&&(e.noInertia=c.noInertia),a.e(i,d),a.e(l,v);this._updateMapTransform(e,i,l),this._changes=[]}_updateMapTransform(e,i,l){let c=this._map,d=c._getTransformForUpdate(),v=c.terrain;if(!(yl(e)||v&&this._terrainMovement))return this._fireEvents(i,l,!0);c._stop(!0);let{panDelta:w,zoomDelta:P,bearingDelta:C,pitchDelta:L,rollDelta:N,around:R,pinchAround:K}=e;K!==void 0&&(R=K),R=R||c.transform.centerPoint,v&&!d.isPointOnMapSurface(R)&&(R=d.centerPoint);let ee={panDelta:w,zoomDelta:P,rollDelta:N,pitchDelta:L,bearingDelta:C,around:R};this._map.cameraHelper.useGlobeControls&&!d.isPointOnMapSurface(R)&&(R=d.centerPoint);let he=R.distSqr(d.centerPoint)<.01?d.center:d.screenPointToLocation(w?R.sub(w):R);v?(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(ee,d),this._terrainMovement||!i.drag&&!i.zoom?i.drag&&this._terrainMovement?d.setCenter(d.screenPointToLocation(d.centerPoint.sub(w))):this._map.cameraHelper.handleMapControlsPan(ee,d,he):(this._terrainMovement=!0,this._map._elevationFreeze=!0,this._map.cameraHelper.handleMapControlsPan(ee,d,he))):(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(ee,d),this._map.cameraHelper.handleMapControlsPan(ee,d,he)),c._applyUpdatedTransform(d),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(i,l,!0)}_fireEvents(e,i,l){let c=No(this._eventsInProgress),d=No(e),v={};for(let N in e){let{originalEvent:R}=e[N];this._eventsInProgress[N]||(v[`${N}start`]=R),this._eventsInProgress[N]=e[N]}!c&&d&&this._fireEvent("movestart",d.originalEvent);for(let N in v)this._fireEvent(N,v[N]);d&&this._fireEvent("move",d.originalEvent);for(let N in e){let{originalEvent:R}=e[N];this._fireEvent(N,R)}let w={},P;for(let N in this._eventsInProgress){let{handlerName:R,originalEvent:K}=this._eventsInProgress[N];this._handlersById[R].isActive()||(delete this._eventsInProgress[N],P=i[R]||K,w[`${N}end`]=P)}for(let N in w)this._fireEvent(N,w[N]);let C=No(this._eventsInProgress),L=(c||d)&&!C;if(L&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let N=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&N.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(N)}if(l&&L){this._updatingCamera=!0;let N=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),R=K=>K!==0&&-this._bearingSnap<K&&K<this._bearingSnap;!N||!N.essential&&U.prefersReducedMotion?(this._map.fire(new a.l("moveend",{originalEvent:P})),R(this._map.getBearing())&&this._map.resetNorth()):(R(N.bearing||this._map.getBearing())&&
728(N.bearing=0),N.freezeElevation=!0,this._map.easeTo(N,{originalEvent:P})),this._updatingCamera=!1}}_fireEvent(e,i){this._map.fire(new a.l(e,i?{originalEvent:i}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(e=>{delete this._frameId,this.handleEvent(new uu("renderFrame",{timeStamp:e})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ys extends a.E{constructor(e,i,l){super(),this._renderFrameCallback=()=>{let c=Math.min((U.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(c)),c<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=l.bearingSnap,this.cameraHelper=i,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(e,i){e.apply(this.transform),this.transform=e,this.cameraHelper=i}getCenter(){return new a.Q(this.transform.center.lng,this.transform.center.lat)}setCenter(e,i){return this.jumpTo({center:e},i)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,i){return this.jumpTo({elevation:e},i),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,i,l){return e=a.P.convert(e).mult(-1),this.panTo(this.transform.center,a.e({offset:e},i),l)}panTo(e,i,l){return this.easeTo(a.e({center:e},i),l)}getZoom(){return this.transform.zoom}setZoom(e,i){return this.jumpTo({zoom:e},i),this}zoomTo(e,i,l){return this.easeTo(a.e({zoom:e},i),l)}zoomIn(e,i){return this.zoomTo(this.getZoom()+1,e,i),this}zoomOut(e,i){return this.zoomTo(this.getZoom()-1,e,i),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,i){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new a.l("movestart",i)).fire(new a.l("move",i)).fire(new a.l("moveend",i))),this}getBearing(){return this.transform.bearing}setBearing(e,i){return this.jumpTo({bearing:e},i),this}getPadding(){return this.transform.padding}setPadding(e,i){return this.jumpTo({padding:e},i),this}rotateTo(e,i,l){return this.easeTo(a.e({bearing:e},i),l)}resetNorth(e,i){return this.rotateTo(0,a.e({duration:1e3},e),i),this}resetNorthPitch(e,i){return this.easeTo(a.e({bearing:0,pitch:0,roll:0,duration:1e3},e),i),this}snapToNorth(e,i){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(e,i):this}getPitch(){return this.transform.pitch}setPitch(e,i){return this.jumpTo({pitch:e},i),this}getRoll(){return this.transform.roll}setRoll(e,i){return this.jumpTo({roll:e},i),this}cameraForBounds(e,i){e=wi.convert(e).adjustAntiMeridian();let l=i&&i.bearing||0;return this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),l,i)}_cameraForBoxAndBearing(e,i,l,c){let d={top:0,bottom:0,right:0,left:0};if(typeof(c=a.e({padding:d,offset:[0,0],maxZoom:this.transform.maxZoom},c)).padding=="number"){let C=c.padding;c.padding={top:C,bottom:C,right:C,left:C}}let v=a.e(d,c.padding);c.padding=v;let w=this.transform,P=new wi(e,i);return this.cameraHelper.cameraForBoxAndBearing(c,v,P,l,w)}fitBounds(e,i,l){return this._fitInternal(this.cameraForBounds(e,i),i,l)}fitScreenCoordinates(e,i,l,c,d){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(a.P.convert(e)),this.transform.screenPointToLocation(a.P.convert(i)),l,c),c,d)}_fitInternal(e,i,l){return e?(delete(i=a.e(e,i)).padding,i.linear?this.easeTo(i,l):this.flyTo(i,l)):this}jumpTo(e,i){this.stop();let l=this._getTransformForUpdate(),c=!1,d=!1,v=!1,w=l.zoom;this.cameraHelper.handleJumpToCenterZoom(l,e);let P=l.zoom!==w;return"elevation"in e&&l.elevation!==+e.elevation&&l.setElevation(+e.elevation),"bearing"in e&&l.bearing!==+e.bearing&&(c=!0,l.setBearing(+e.bearing)),"pitch"in e&&l.pitch!==+e.pitch&&(d=!0,l.setPitch(+e.pitch)),"roll"in e&&l.roll!==+e.roll&&(v=!0,l.setRoll(+e.roll)),e.padding==null||l.isPaddingEqual(e.padding)||l.setPadding(e.padding),this._applyUpdatedTransform(l),this.fire(new a.l("movestart",i)).fire(new a.l("move",i)),P&&this.fire(new a.l("zoomstart",i)).fire(new a.l("zoom",i)).fire(new a.l("zoomend",i)),c&&this.fire(new a.l("rotatestart",i)).fire(new a.l("rotate",i)).fire(new a.l("rotateend",i)),d&&this.fire(new a.l("pitchstart",i)).fire(new a.l("pitch",i)).fire(new a.l("pitchend",
728i)),v&&this.fire(new a.l("rollstart",i)).fire(new a.l("roll",i)).fire(new a.l("rollend",i)),this.fire(new a.l("moveend",i))}calculateCameraOptionsFromTo(e,i,l,c=0){let d=a.$.fromLngLat(e,i),v=a.$.fromLngLat(l,c),w=v.x-d.x,P=v.y-d.y,C=v.z-d.z,L=Math.hypot(w,P,C);if(L===0)throw new Error("Can't calculate camera options with same From and To");let N=Math.hypot(w,P),R=a.ab(this.transform.cameraToCenterDistance/L/this.transform.tileSize),K=180*Math.atan2(w,-P)/Math.PI,ee=180*Math.acos(N/L)/Math.PI;return ee=C<0?90-ee:90+ee,{center:v.toLngLat(),elevation:c,zoom:R,pitch:ee,bearing:K}}calculateCameraOptionsFromCameraLngLatAltRotation(e,i,l,c,d){let v=this.transform.calculateCenterFromCameraLngLatAlt(e,i,l,c);return{center:v.center,elevation:v.elevation,zoom:v.zoom,bearing:l,pitch:c,roll:d}}easeTo(e,i){this._stop(!1,e.easeId),((e=a.e({offset:[0,0],duration:500,easing:a.cb},e)).animate===!1||!e.essential&&U.prefersReducedMotion)&&(e.duration=0);let l=this._getTransformForUpdate(),c=this.getBearing(),d=l.pitch,v=l.roll,w="bearing"in e?this._normalizeBearing(e.bearing,c):c,P="pitch"in e?+e.pitch:d,C="roll"in e?this._normalizeBearing(e.roll,v):v,L="padding"in e?e.padding:l.padding,N=a.P.convert(e.offset),R,K;e.around&&(R=a.Q.convert(e.around),K=l.locationToScreenPoint(R));let ee={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},he=this.cameraHelper.handleEaseTo(l,{bearing:w,pitch:P,roll:C,padding:L,around:R,aroundPoint:K,offsetAsPoint:N,offset:e.offset,zoom:e.zoom,center:e.center});return this._rotating=this._rotating||c!==w,this._pitching=this._pitching||P!==d,this._rolling=this._rolling||C!==v,this._padding=!l.isPaddingEqual(L),this._zooming=this._zooming||he.isZooming,this._easeId=e.easeId,this._prepareEase(i,e.noMoveStart,ee),this.terrain&&this._prepareElevation(he.elevationCenter),this._ease(ue=>{he.easeFunc(ue),this.terrain&&!e.freezeElevation&&this._updateElevation(ue),this._applyUpdatedTransform(l),this._fireMoveEvents(i)},ue=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(i,ue)},e),this}_prepareEase(e,i,l={}){this._moving=!0,i||l.moving||this.fire(new a.l("movestart",e)),this._zooming&&!l.zooming&&this.fire(new a.l("zoomstart",e)),this._rotating&&!l.rotating&&this.fire(new a.l("rotatestart",e)),this._pitching&&!l.pitching&&this.fire(new a.l("pitchstart",e)),this._rolling&&!l.rolling&&this.fire(new a.l("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let i=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&i!==this._elevationTarget){let l=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(l-(i-(l*e+this._elevationStart))/(1-e)),this._elevationTarget=i}this.transform.setElevation(a.B.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};let i=e.getCameraLngLat(),l=e.getCameraAltitude(),c=this.terrain?this.terrain.getElevationForLngLatZoom(i,e.zoom):0;if(l<c){let d=this.calculateCameraOptionsFromTo(i,c,e.center,e.elevation);return{pitch:d.pitch,zoom:d.zoom}}return{}}_applyUpdatedTransform(e){let i=[];if(i.push(c=>this._elevateCameraIfInsideTerrain(c)),this.transformCameraUpdate&&i.push(c=>this.transformCameraUpdate(c)),!i.length)return;let l=e.clone();for(let c of i){let d=l.clone(),{center:v,zoom:w,roll:P,pitch:C,bearing:L,elevation:N}=c(d);v&&d.setCenter(v),N!==void 0&&d.setElevation(N),w!==void 0&&d.setZoom(w),P!==void 0&&d.setRoll(P),C!==void 0&&d.setPitch(C),L!==void 0&&d.setBearing(L),l.apply(d)}this.transform.apply(l)}_fireMoveEvents(e){this.fire(new a.l("move",e)),this._zooming&&this.fire(new a.l("zoom",e)),this._rotating&&this.fire(new a.l("rotate",e)),this._pitching&&this.fire(new a.l("pitch",e)),this._rolling&&this.fire(new a.l("roll",e))}
vendor: 6,208 bytes, line 728
728_afterEase(e,i){if(this._easeId&&i&&this._easeId===i)return;delete this._easeId;let l=this._zooming,c=this._rotating,d=this._pitching,v=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,l&&this.fire(new a.l("zoomend",e)),c&&this.fire(new a.l("rotateend",e)),d&&this.fire(new a.l("pitchend",e)),v&&this.fire(new a.l("rollend",e)),this.fire(new a.l("moveend",e))}flyTo(e,i){if(!e.essential&&U.prefersReducedMotion){let at=a.O(e,["center","zoom","bearing","pitch","roll","elevation"]);return this.jumpTo(at,i)}this.stop(),e=a.e({offset:[0,0],speed:1.2,curve:1.42,easing:a.cb},e);let l=this._getTransformForUpdate(),c=l.bearing,d=l.pitch,v=l.roll,w=l.padding,P="bearing"in e?this._normalizeBearing(e.bearing,c):c,C="pitch"in e?+e.pitch:d,L="roll"in e?this._normalizeBearing(e.roll,v):v,N="padding"in e?e.padding:l.padding,R=a.P.convert(e.offset),K=l.centerPoint.add(R),ee=l.screenPointToLocation(K),he=this.cameraHelper.handleFlyTo(l,{bearing:P,pitch:C,roll:L,padding:N,locationAtOffset:ee,offsetAsPoint:R,center:e.center,minZoom:e.minZoom,zoom:e.zoom}),ue=e.curve,de=Math.max(l.width,l.height),me=de/he.scaleOfZoom,xe=he.pixelPathLength;typeof he.scaleOfMinZoom=="number"&&(ue=Math.sqrt(de/he.scaleOfMinZoom/xe*2));let Se=ue*ue;function Pe(at){let It=(me*me-de*de+(at?-1:1)*Se*Se*xe*xe)/(2*(at?me:de)*Se*xe);return Math.log(Math.sqrt(It*It+1)-It)}function Ae(at){return(Math.exp(at)-Math.exp(-at))/2}function Me(at){return(Math.exp(at)+Math.exp(-at))/2}let Ue=Pe(!1),Ve=function(at){return Me(Ue)/Me(Ue+ue*at)},ot=function(at){return de*((Me(Ue)*(Ae(It=Ue+ue*at)/Me(It))-Ae(Ue))/Se)/xe;var It},ut=(Pe(!0)-Ue)/ue;if(Math.abs(xe)<2e-6||!isFinite(ut)){if(Math.abs(de-me)<1e-6)return this.easeTo(e,i);let at=me<de?-1:1;ut=Math.abs(Math.log(me/de))/ue,ot=()=>0,Ve=It=>Math.exp(at*ue*It)}return e.duration="duration"in e?+e.duration:1e3*ut/("screenSpeed"in e?+e.screenSpeed/ue:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=c!==P,this._pitching=C!==d,this._rolling=L!==v,this._padding=!l.isPaddingEqual(N),this._prepareEase(i,!1),this.terrain&&this._prepareElevation(he.targetCenter),this._ease(at=>{let It=at*ut,Et=1/Ve(It),pt=ot(It);this._rotating&&l.setBearing(a.B.number(c,P,at)),this._pitching&&l.setPitch(a.B.number(d,C,at)),this._rolling&&l.setRoll(a.B.number(v,L,at)),this._padding&&(l.interpolatePadding(w,N,at),K=l.centerPoint.add(R)),he.easeFunc(at,Et,pt,K),this.terrain&&!e.freezeElevation&&this._updateElevation(at),this._applyUpdatedTransform(l),this._fireMoveEvents(i)},()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(i)},e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,i){var l;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let c=this._onEaseEnd;delete this._onEaseEnd,c.call(this,i)}return e||(l=this.handlers)===null||l===void 0||l.stop(!1),this}_ease(e,i,l){l.animate===!1||l.duration===0?(e(1),i()):(this._easeStart=U.now(),this._easeOptions=l,this._onEaseFrame=e,this._onEaseEnd=i,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,i){e=a.aL(e,-180,180);let l=Math.abs(e-i);return Math.abs(e-360-i)<l&&(e-=360),Math.abs(e+360-i)<l&&(e+=360),e}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLatZoom(a.Q.convert(e),this.transform.tileZoom):null}}let jo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class Ut{constructor(e=jo){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=i=>{!i||i.sourceDataType!=="metadata"&&i.sourceDataType!=="visibility"&&i.dataType!=="style"&&i.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=O.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=O.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=O.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){O.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(e,i){let l=this._map._getUIString(`AttributionControl.${i}`);e.title=l,e.setAttribute("aria-label",l)}_updateAttributions(){if(!this._map.style)return;let e=[];
728if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(c=>typeof c!="string"?"":c)):typeof this.options.customAttribution=="string"&&e.push(this.options.customAttribution)),this._map.style.stylesheet){let c=this._map.style.stylesheet;this.styleOwner=c.owner,this.styleId=c.id}let i=this._map.style.sourceCaches;for(let c in i){let d=i[c];if(d.used||d.usedForTerrain){let v=d.getSource();v.attribution&&e.indexOf(v.attribution)<0&&e.push(v.attribution)}}e=e.filter(c=>String(c).trim()),e.sort((c,d)=>c.length-d.length),e=e.filter((c,d)=>{for(let v=d+1;v<e.length;v++)if(e[v].indexOf(c)>=0)return!1;return!0});let l=e.join(" | ");l!==this._attribHTML&&(this._attribHTML=l,e.length?(this._innerContainer.innerHTML=O.sanitize(l),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Wt{constructor(e={}){this._updateCompact=()=>{let i=this._container.children;if(i.length){let l=i[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&l.classList.add("maplibregl-compact"):l.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){this._map=e,this._compact=this.options&&this.options.compact,this._container=O.create("div","maplibregl-ctrl");let i=O.create("a","maplibregl-ctrl-logo");return i.target="_blank",i.rel="noopener nofollow",i.href="https://maplibre.org/",i.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),i.setAttribute("rel","noopener nofollow"),this._container.appendChild(i),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){O.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class _l{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){let i=++this._id;return this._queue.push({callback:e,id:i,cancelled:!1}),i}remove(e){let i=this._currentlyRunning,l=i?this._queue.concat(i):this._queue;for(let c of l)if(c.id===e)return void(c.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let i=this._currentlyRunning=this._queue;this._queue=[];for(let l of i)if(!l.cancelled&&(l.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var uc=a.aD([{name:"a_pos3d",type:"Int16",components:3}]);class hc extends a.E{constructor(e){super(),this._lastTilesetChange=U.now(),this.sourceCache=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(e,i){this.sourceCache.update(e,i),this._renderableTilesKeys=[];let l={};for(let c of Re(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:i,calculateTileZoom:this.sourceCache._source.calculateTileZoom}))l[c.key]=!0,this._renderableTilesKeys.push(c.key),this._tiles[c.key]||(c.terrainRttPosMatrix32f=new Float64Array(16),a.bO(c.terrainRttPosMatrix32f,0,a.Z,a.Z,0,0,1),this._tiles[c.key]=new Ir(c,this.tileSize),this._lastTilesetChange=U.now());for(let c in this._tiles)l[c]||delete this._tiles[c]}freeRtt(e){for(let i in this._tiles){let l=this._tiles[i];(!e||l.tileID.equals(e)||l.tileID.isChildOf(e)||e.isChildOf(l.tileID))&&(l.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,i){return i?this._getTerrainCoordsForTileRanges(e,i):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){let i={};for(let l of this._renderableTilesKeys){let c=this._tiles[l].tileID,d=e.clone(),v=a.b2();if(c.canonical.equals(e.canonical))a.bO(v,0,a.Z,a.Z,0,0,1);else if(c.canonical.isChildOf(e.canonical)){let w=c.canonical.z-e.canonical.z,P=c.canonical.x-(c.canonical.x>>w<<w),C=c.canonical.y-(c.canonical.y>>w<<w),L=a.Z>>w;a.bO(v,0,L,L,0,0,1),a.L(v,v,[-P*L,-C*L,0])}else{if(!e.canonical.isChildOf(c.canonical))continue;{let w=e.canonical.z-c.canonical.z,P=e.canonical.x-(e.canonical.x>>w<<w),C=e.canonical.y-(e.canonical.y>>w<<w),L=a.Z>>w;a.bO(v,0,a.Z,a.Z,0,0,1),a.L(v,v,[P*L,C*L,0]),a.M(v,v,[1/2**w,1/2**w,0])}}d.terrainRttPosMatrix32f=new Float32Array(v),i[l]=d}return i}_getTerrainCoordsForTileRanges(e,i){let l={};for(let c of this._renderableTilesKeys){let d=this._tiles[c].tileID;if(!this._isWithinTileRanges(d,i))continue;let v=e.clone(),w=a.b2();if(d.canonical.z===e.canonical.z){let P=e.canonical.x-d.canonical.x,C=e.canonical.y-d.canonical.y;a.bO(w,0,a.Z,a.Z,0,0,1),a.L(w,w,[P*a.Z,C*a.Z,0])}else if(d.canonical.z>
vendor: 6,955 bytes, line 728
728e.canonical.z){let P=d.canonical.z-e.canonical.z,C=d.canonical.x-(d.canonical.x>>P<<P),L=d.canonical.y-(d.canonical.y>>P<<P),N=e.canonical.x-(d.canonical.x>>P),R=e.canonical.y-(d.canonical.y>>P),K=a.Z>>P;a.bO(w,0,K,K,0,0,1),a.L(w,w,[-C*K+N*a.Z,-L*K+R*a.Z,0])}else{let P=e.canonical.z-d.canonical.z,C=e.canonical.x-(e.canonical.x>>P<<P),L=e.canonical.y-(e.canonical.y>>P<<P),N=(e.canonical.x>>P)-d.canonical.x,R=(e.canonical.y>>P)-d.canonical.y,K=a.Z<<P;a.bO(w,0,K,K,0,0,1),a.L(w,w,[C*a.Z+N*K,L*a.Z+R*K,0])}v.terrainRttPosMatrix32f=new Float32Array(w),l[c]=v}return l}getSourceTile(e,i){let l=this.sourceCache._source,c=e.overscaledZ-this.deltaZoom;if(c>l.maxzoom&&(c=l.maxzoom),c<l.minzoom)return null;this._sourceTileCache[e.key]||(this._sourceTileCache[e.key]=e.scaledTo(c).key);let d=this.sourceCache.getTileByID(this._sourceTileCache[e.key]);if((!d||!d.dem)&&i)for(;c>=l.minzoom&&(!d||!d.dem);)d=this.sourceCache.getTileByID(e.scaledTo(c--).key);return d}anyTilesAfterTime(e=Date.now()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,i){return i[e.canonical.z]&&e.canonical.x>=i[e.canonical.z].minTileX&&e.canonical.x<=i[e.canonical.z].maxTileX&&e.canonical.y>=i[e.canonical.z].minTileY&&e.canonical.y<=i[e.canonical.z].maxTileY}}class Tn{constructor(e,i,l){this._meshCache={},this.painter=e,this.sourceCache=new hc(i),this.options=l,this.exaggeration=typeof l.exaggeration=="number"?l.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(e,i,l,c=a.Z){var d;if(!(i>=0&&i<c&&l>=0&&l<c))return 0;let v=this.getTerrainData(e),w=(d=v.tile)===null||d===void 0?void 0:d.dem;if(!w)return 0;let P=a.cf([],[i/c*a.Z,l/c*a.Z],v.u_terrain_matrix),C=[P[0]*w.dim,P[1]*w.dim],L=Math.floor(C[0]),N=Math.floor(C[1]),R=C[0]-L,K=C[1]-N;return w.get(L,N)*(1-R)*(1-K)+w.get(L+1,N)*R*(1-K)+w.get(L,N+1)*(1-R)*K+w.get(L+1,N+1)*R*K}getElevationForLngLatZoom(e,i){if(!a.cg(i,e.wrap()))return 0;let{tileID:l,mercatorX:c,mercatorY:d}=this._getOverscaledTileIDFromLngLatZoom(e,i);return this.getElevation(l,c%a.Z,d%a.Z,a.Z)}getElevation(e,i,l,c=a.Z){return this.getDEMElevation(e,i,l,c)*this.exaggeration}getTerrainData(e){if(!this._emptyDemTexture){let c=this.painter.context,d=new a.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new M(c,d,c.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new M(c,new a.R({width:1,height:1}),c.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(c.gl.NEAREST,c.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=a.at([])}let i=this.sourceCache.getSourceTile(e,!0);if(i&&i.dem&&(!i.demTexture||i.needsTerrainPrepare)){let c=this.painter.context;i.demTexture=this.painter.getTileTexture(i.dem.stride),i.demTexture?i.demTexture.update(i.dem.getPixels(),{premultiply:!1}):i.demTexture=new M(c,i.dem.getPixels(),c.gl.RGBA,{premultiply:!1}),i.demTexture.bind(c.gl.NEAREST,c.gl.CLAMP_TO_EDGE),i.needsTerrainPrepare=!1}let l=i&&i+i.tileID.key+e.key;if(l&&!this._demMatrixCache[l]){let c=this.sourceCache.sourceCache._source.maxzoom,d=e.canonical.z-i.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=c?d=e.canonical.z-c:a.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let v=e.canonical.x-(e.canonical.x>>d<<d),w=e.canonical.y-(e.canonical.y>>d<<d),P=a.ch(new Float64Array(16),[1/(a.Z<<d),1/(a.Z<<d),0]);a.L(P,P,[v*a.Z,w*a.Z,0]),this._demMatrixCache[e.key]={matrix:P,coord:e}}return{u_depth:2,u_terrain:3,u_terrain_dim:i&&i.dem&&i.dem.dim||1,u_terrain_matrix:l?this._demMatrixCache[e.key].matrix:this._emptyDemMatrix,u_terrain_unpack:i&&i.dem&&i.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(i&&i.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:i}}getFramebuffer(e){let i=this.painter,l=i.width/devicePixelRatio,c=i.height/devicePixelRatio;return!this._fbo||this._fbo.width===l&&this._fbo.height===c||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new M(i.context,{width:l,height:c,data:null},i.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(i.context.gl.NEAREST,i.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new M(i.context,{width:l,height:c,data:null},i.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(i.context.gl.NEAREST,i.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=i.context.createFramebuffer(l,c,!0,!1),this._fbo.depthAttachment.set(i.context.createRenderbuffer(i.context.gl.DEPTH_COMPONENT16,l,c))),this._fbo.colorAttachment.set(e==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){let e=this.painter.context;if(this._coordsTexture)return this._coordsTexture;let i=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let d=0,v=0;d<this._coordsTextureSize;d++)for(let w=0;w<this._coordsTextureSize;w++,v+=4)i[v+0]=255&w,i[v+1]=255&d,i[v+2]=w>>8<<4|d>>8,i[v+3]=0;let l=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(i.buffer)),c=new M(e,l,e.gl.RGBA,{premultiply:!1});return c.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=c,c}pointCoordinate(e){this.painter.maybeDrawDepthAndCoords(!0);let i=new Uint8Array(4),l=this.painter.context,c=l.gl,d=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),v=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),w=Math.round(this.painter.height/devicePixelRatio);l.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),c.readPixels(d,w-v-1,1,1,c.RGBA,c.UNSIGNED_BYTE,i),l.bindFramebuffer.set(null);let P=i[0]+(i[2]>>4<<8),C=i[1]+((15&i[2])<<8),L=this.coordsIndex[255-i[3]],N=L&&this.sourceCache.getTileByID(L);if(!N)return null;let R=this._coordsTextureSize,K=(1<<N.tileID.canonical.z)*R;return new a.$((N.tileID.canonical.x*R+P)/K+N.tileID.wrap,(N.tileID.canonical.y*R+C)/K,this.getElevation(N.tileID,P,C,R))}depthAtPoint(e){let i=new Uint8Array(4),l=this.painter.context,c=l.gl;return l.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),c.readPixels(e.x,this.painter.height/devicePixelRatio-e.y-1,1,1,c.RGBA,c.UNSIGNED_BYTE,i),l.bindFramebuffer.set(null),(i[0]/16777216+i[1]/65536+i[2]/256+i[3])/256}getTerrainMesh(e){var i;let l=((i=this.painter.style.projection)===null||i===void 0?void 0:i.transitionState)>0,c=l&&e.canonical.y===0,d=l&&e.canonical.y===(1<<e.canonical.z)-1,v=`m_${c?"n":""}_${d?"s":""}`;if(this._meshCache[v])return this._meshCache[v];let w=this.painter.context,P=new a.ci,C=new a.aH,L=this.meshSize,N=a.Z/L,R=L*L;for(let Me=0;Me<=L;Me++)for(let Ue=0;Ue<=L;Ue++)P.emplaceBack(Ue*N,Me*N,0);for(let Me=0;Me<R;Me+=L+1)for(let Ue=0;Ue<L;Ue++)C.emplaceBack(Ue+Me,L+Ue+Me+1,L+Ue+Me+2),C.emplaceBack(Ue+Me,L+Ue+Me+2,Ue+Me+1);
728let K=P.length,ee=K+(L+1),he=(L+1)*L,ue=c?a.b9:0,de=c?0:1,me=d?a.ba:a.Z,xe=d?0:1;for(let Me=0;Me<=L;Me++)P.emplaceBack(Me*N,ue,de);for(let Me=0;Me<=L;Me++)P.emplaceBack(Me*N,me,xe);for(let Me=0;Me<L;Me++)C.emplaceBack(he+Me,ee+Me,ee+Me+1),C.emplaceBack(he+Me,ee+Me+1,he+Me+1),C.emplaceBack(0+Me,K+Me+1,K+Me),C.emplaceBack(0+Me,0+Me+1,K+Me+1);let Se=P.length,Pe=Se+2*(L+1);for(let Me of[0,1])for(let Ue=0;Ue<=L;Ue++)for(let Ve of[0,1])P.emplaceBack(Me*a.Z,Ue*N,Ve);for(let Me=0;Me<2*L;Me+=2)C.emplaceBack(Se+Me,Se+Me+1,Se+Me+3),C.emplaceBack(Se+Me,Se+Me+3,Se+Me+2),C.emplaceBack(Pe+Me,Pe+Me+3,Pe+Me+1),C.emplaceBack(Pe+Me,Pe+Me+2,Pe+Me+3);let Ae=new us(w.createVertexBuffer(P,uc.members),w.createIndexBuffer(C),a.aG.simpleSegment(0,0,P.length,C.length));return this._meshCache[v]=Ae,Ae}getMeshFrameDelta(e){return 2*Math.PI*a.br/Math.pow(2,Math.max(e,0))/5}getMinTileElevationForLngLatZoom(e,i){var l;let{tileID:c}=this._getOverscaledTileIDFromLngLatZoom(e,i);return(l=this.getMinMaxElevation(c).minElevation)!==null&&l!==void 0?l:0}getMinMaxElevation(e){let i=this.getTerrainData(e).tile,l={minElevation:null,maxElevation:null};return i&&i.dem&&(l.minElevation=i.dem.min*this.exaggeration,l.maxElevation=i.dem.max*this.exaggeration),l}_getOverscaledTileIDFromLngLatZoom(e,i){let l=a.$.fromLngLat(e.wrap()),c=(1<<i)*a.Z,d=l.x*c,v=l.y*c,w=Math.floor(d/a.Z),P=Math.floor(v/a.Z);return{tileID:new a.Y(i,0,i,w,P),mercatorX:d,mercatorY:v}}}class hu{constructor(e,i,l){this._context=e,this._size=i,this._tileSize=l,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(let e of this._objects)e.texture.destroy(),e.fbo.destroy()}_createObject(e){let i=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),l=new M(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return l.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),this._context.extTextureFilterAnisotropic&&this._context.gl.texParameterf(this._context.gl.TEXTURE_2D,this._context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this._context.extTextureFilterAnisotropicMax),i.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),i.colorAttachment.set(l.texture),{id:e,fbo:i,texture:l,stamp:-1,inUse:!1}}getObjectForId(e){return this._objects[e]}useObject(e){e.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(i=>e.id!==i),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(let i of this._recentlyUsed)if(!this._objects[i].inUse)return this._objects[i];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(let e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(e=>!e.inUse)===!1}}let pn={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class fh{constructor(e,i){this.painter=e,this.terrain=i,this.pool=new hu(e.context,30,i.sourceCache.tileSize*i.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,i){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=e._order.filter(l=>!e._layers[l].isHidden(i)),this._coordsAscending={};for(let l in e.sourceCaches){this._coordsAscending[l]={};let c=e.sourceCaches[l].getVisibleCoordinates(),d=e.sourceCaches[l].getSource(),v=d instanceof Sr?d.terrainTileRanges:null;for(let w of c){let P=this.terrain.sourceCache.getTerrainCoords(w,v);for(let C in P)this._coordsAscending[l][C]||(this._coordsAscending[l][C]=[]),this._coordsAscending[l][C].push(P[C])}}this._coordsAscendingStr={};for(let l of e._order){let c=e._layers[l],d=c.source;if(pn[c.type]&&!this._coordsAscendingStr[d]){this._coordsAscendingStr[d]={};for(let v in this._coordsAscending[d])this._coordsAscendingStr[d][v]=this._coordsAscending[d][v].map(w=>w.key).sort().join()}}for(let l of this._renderableTiles)for(let c in this._coordsAscendingStr){let d=this._coordsAscendingStr[c][l.tileID.key];d&&d!==l.rttCoords[c]&&(l.rtt=[])}}renderLayer(e,i){if(e.isHidden(this.painter.transform.zoom))return!1;let l=Object.assign(Object.assign({},i),{isRenderingToTexture:!0}),c=e.type,d=this.painter,v=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(pn[c]&&(this._prevType&&pn[this._prevType]||this._stacks.push([]),this._prevType=c,this._stacks[this._stacks.length-1].push(e.id),!v))return!0;
vendor: 6,054 bytes, line 728
728if(pn[this._prevType]||pn[c]&&v){this._prevType=c;let w=this._stacks.length-1,P=this._stacks[w]||[];for(let C of this._renderableTiles){if(this.pool.isFull()&&(fl(this.painter,this.terrain,this._rttTiles,l),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(C),C.rtt[w]){let N=this.pool.getObjectForId(C.rtt[w].id);if(N.stamp===C.rtt[w].stamp){this.pool.useObject(N);continue}}let L=this.pool.getOrCreateFreeObject();this.pool.useObject(L),this.pool.stampObject(L),C.rtt[w]={id:L.id,stamp:L.stamp},d.context.bindFramebuffer.set(L.fbo.framebuffer),d.context.clear({color:a.b7.transparent,stencil:0}),d.currentStencilSource=void 0;for(let N=0;N<P.length;N++){let R=d.style._layers[P[N]],K=R.source?this._coordsAscending[R.source][C.tileID.key]:[C.tileID];d.context.viewport.set([0,0,L.fbo.width,L.fbo.height]),d._renderTileClippingMasks(R,K,!0),d.renderLayer(d,d.style.sourceCaches[R.source],R,K,l),R.source&&(C.rttCoords[R.source]=this._coordsAscendingStr[R.source][C.tileID.key])}}return fl(this.painter,this.terrain,this._rttTiles,l),this._rttTiles=[],this.pool.freeAllObjects(),pn[c]}return!1}}let $o={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},cr=z,_r={hash:!1,interactive:!0,bearingSnap:7,attributionControl:jo,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:a.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0},du={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class Vo{constructor(e,i,l=!1){this.mousedown=d=>{this.startMove(d,O.mousePos(this.element,d)),O.addEventListener(window,"mousemove",this.mousemove),O.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=d=>{this.move(d,O.mousePos(this.element,d))},this.mouseup=d=>{this._rotatePitchHanlder.dragEnd(d),this.offTemp()},this.touchstart=d=>{d.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=O.touchPos(this.element,d.targetTouches)[0],this.startMove(d,this._startPos),O.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),O.addEventListener(window,"touchend",this.touchend))},this.touchmove=d=>{d.targetTouches.length!==1?this.reset():(this._lastPos=O.touchPos(this.element,d.targetTouches)[0],this.move(d,this._lastPos))},this.touchend=d=>{d.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this._rotatePitchHanlder.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=i;let c=new su;this._rotatePitchHanlder=new io({clickTolerance:3,move:(d,v)=>{let w=i.getBoundingClientRect(),P=new a.P((w.bottom-w.top)/2,(w.right-w.left)/2);return{bearingDelta:a.ca(new a.P(d.x,v.y),v,P),pitchDelta:l?-.5*(v.y-d.y):void 0}},moveStateManager:c,enable:!0,assignEvents:()=>{}}),this.map=e,O.addEventListener(i,"mousedown",this.mousedown),O.addEventListener(i,"touchstart",this.touchstart,{passive:!1}),O.addEventListener(i,"touchcancel",this.reset)}startMove(e,i){this._rotatePitchHanlder.dragStart(e,i),O.disableDrag()}move(e,i){let l=this.map,{bearingDelta:c,pitchDelta:d}=this._rotatePitchHanlder.dragMove(e,i)||{};c&&l.setBearing(l.getBearing()+c),d&&l.setPitch(l.getPitch()+d)}off(){let e=this.element;O.removeEventListener(e,"mousedown",this.mousedown),O.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),O.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),O.removeEventListener(window,"touchend",this.touchend),O.removeEventListener(e,"touchcancel",this.reset),this.offTemp()}offTemp(){O.enableDrag(),O.removeEventListener(window,"mousemove",this.mousemove),O.removeEventListener(window,"mouseup",this.mouseup),O.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),O.removeEventListener(window,"touchend",this.touchend)}}let _s;function vl(h,e,i){let l=new a.Q(h.lng,h.lat);if(h=new a.Q(h.lng,h.lat),e){let c=new a.Q(h.lng-360,h.lat),d=new a.Q(h.lng+360,h.lat),v=i.locationToScreenPoint(h).distSqr(e);i.locationToScreenPoint(c).distSqr(e)<v?h=c:i.locationToScreenPoint(d).distSqr(e)<v&&(h=d)}for(;Math.abs(h.lng-i.center.lng)>180;){let c=i.locationToScreenPoint(h);if(c.x>=0&&c.y>=0&&c.x<=i.width&&c.y<=i.height)break;h.lng>i.center.lng?h.lng-=360:h.lng+=360}
728return h.lng!==l.lng&&i.isPointOnMapSurface(i.locationToScreenPoint(h))?h:l}let Uo={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 bl(h,e,i){let l=h.classList;for(let c in Uo)l.remove(`maplibregl-${i}-anchor-${c}`);l.add(`maplibregl-${i}-anchor-${e}`)}class Ia extends a.E{constructor(e){if(super(),this._onKeyPress=i=>{let l=i.code,c=i.charCode||i.keyCode;l!=="Space"&&l!=="Enter"&&c!==32&&c!==13||this.togglePopup()},this._onMapClick=i=>{let l=i.originalEvent.target,c=this._element;this._popup&&(l===c||c.contains(l))&&this.togglePopup()},this._update=i=>{var l;if(!this._map)return;let c=this._map.loaded()&&!this._map.isMoving();(i?.type==="terrain"||i?.type==="render"&&!c)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?vl(this._lngLat,this._flatPos,this._map.transform):(l=this._lngLat)===null||l===void 0?void 0:l.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let d="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?d=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(d=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let v="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?v="rotateX(0deg)":this._pitchAlignment==="map"&&(v=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||i&&i.type!=="moveend"||(this._pos=this._pos.round()),O.setTransform(this._element,`${Uo[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${v} ${d}`),U.frameAsync(new AbortController).then(()=>{this._updateOpacity(i&&i.type==="moveend")}).catch(()=>{})},this._onMove=i=>{if(!this._isDragging){let l=this._clickTolerance||this._map._clickTolerance;this._isDragging=i.point.dist(this._pointerdownPos)>=l}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.l("dragstart"))),this.fire(new a.l("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new a.l("dragend")),this._state="inactive"},this._addDragHandler=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))},this._anchor=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._clickTolerance=e&&e.clickTolerance||0,this._subpixelPositioning=e&&e.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&e.pitchAlignment!=="auto"?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e?.opacity,e?.opacityWhenCovered),e&&e.element)this._element=e.element,this._offset=a.P.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=O.create("div");let i=O.createNS("http://www.w3.org/2000/svg","svg"),l=41,c=27;i.setAttributeNS(null,"display","block"),i.setAttributeNS(null,"height",`${l}px`),i.setAttributeNS(null,"width",`${c}px`),i.setAttributeNS(null,"viewBox",`0 0 ${c} ${l}`);let d=O.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"stroke","none"),d.setAttributeNS(null,"stroke-width","1"),d.setAttributeNS(null,"fill","none"),d.setAttributeNS(null,"fill-rule","evenodd");let v=O.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"fill-rule","nonzero");let w=O.createNS("http://www.w3.org/2000/svg","g");w.setAttributeNS(null,"transform","translate(3.0, 29.0)"),w.setAttributeNS(null,"fill","#000000");let P=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let de of P){let me=O.createNS("http://www.w3.org/2000/svg","ellipse");me.setAttributeNS(null,"opacity","0.04"),me.setAttributeNS(null,"cx","10.5"),me.setAttributeNS(null,"cy","5.80029008"),me.setAttributeNS(null,"rx",de.rx),me.setAttributeNS(null,"ry",de.ry),w.appendChild(me)}let C=O.createNS("http://www.w3.org/2000/svg","g");C.setAttributeNS(null,"fill",this._color);let L=O.createNS("http://www.w3.org/2000/svg","path");L.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),C.appendChild(L);let N=O.createNS("http://www.w3.org/2000/svg","g");N.setAttributeNS(null,"opacity","0.25"),N.setAttributeNS(null,"fill","#000000");let R=O.createNS("http://www.w3.org/2000/svg","path");R.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"),N.appendChild(R);let K=O.createNS("http://www.w3.org/2000/svg","g");K.setAttributeNS(null,"transform","translate(6.0, 7.0)"),K.setAttributeNS(null,"fill","#FFFFFF");let ee=O.createNS("http://www.w3.org/2000/svg","g");ee.setAttributeNS(null,"transform","translate(8.0, 8.0)");let he=O.createNS("http://www.w3.org/2000/svg","circle");he.setAttributeNS(null,"fill","#000000"),he.setAttributeNS(null,"opacity","0.25"),he.setAttributeNS(null,"cx","5.5"),he.setAttributeNS(null,"cy","5.5"),he.setAttributeNS(null,"r","5.4999962");let ue=O.createNS("http://www.w3.org/2000/svg","circle");ue.setAttributeNS(null,"fill","#FFFFFF"),ue.setAttributeNS(null,"cx","5.5"),ue.setAttributeNS(null,"cy","5.5"),ue.setAttributeNS(null,"r","5.4999962"),ee.appendChild(he),ee.appendChild(ue),v.appendChild(w),v.appendChild(C),v.appendChild(N),v.appendChild(K),v.appendChild(ee),i.appendChild(v),i.setAttributeNS(null,"height",l*this._scale+"px"),i.setAttributeNS(null,"width",c*this._scale+"px"),this._element.appendChild(i),this._offset=a.P.convert(e&&e.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",i=>{i.preventDefault()}),this._element.addEventListener("mousedown",i=>{i.preventDefault()}),bl(this._element,this._anchor,"marker"),e&&e.className)for(let i of e.className.split(" "))this._element.classList.add(i);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),O.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=a.Q.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){let c=Math.abs(13.5)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[
7280,-38.1],"bottom-left":[c,-1*(38.1-13.5+c)],"bottom-right":[-c,-1*(38.1-13.5+c)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){let e=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:e?(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map)),this):this}_updateOpacity(e=!1){var i,l;if(!(!((i=this._map)===null||i===void 0)&&i.terrain)){let N=this._map.transform.isLocationOccluded(this._lngLat)?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==N&&(this._element.style.opacity=N))}if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let c=this._map,d=c.terrain.depthAtPoint(this._pos),v=c.terrain.getElevationForLngLatZoom(this._lngLat,c.transform.tileZoom);if(c.transform.lngLatToCameraDepth(this._lngLat,v)-d<.006)return void(this._element.style.opacity=this._opacity);let w=-this._offset.y/c.transform.pixelsPerMeter,P=Math.sin(c.getPitch()*Math.PI/180)*w,C=c.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),L=c.transform.lngLatToCameraDepth(this._lngLat,v+P)-C>.006;!((l=this._popup)===null||l===void 0)&&l.isOpen()&&L&&this._popup.remove(),this._element.style.opacity=L?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(e){return this._offset=a.P.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&e!=="auto"?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,i){return(this._opacity===void 0||e===void 0&&i===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),e!==void 0&&(this._opacity=e),i!==void 0&&(this._opacityWhenCovered=i),this._map&&this._updateOpacity(!0),this}}let dc={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},no=0,Aa=!1,pc={maxWidth:100,unit:"metric"};function xl(h,e,i){let l=i&&i.maxWidth||100,c=h._container.clientHeight/2,d=h._container.clientWidth/2,v=h.unproject([d-l/2,c]),w=h.unproject([d+l/2,c]),P=Math.round(h.project(w).x-h.project(v).x),C=Math.min(l,P,h._container.clientWidth),L=v.distanceTo(w);if(i&&i.unit==="imperial"){let N=3.2808*L;N>5280?Da(e,C,N/5280,h._getUIString("ScaleControl.Miles")):Da(e,C,N,h._getUIString("ScaleControl.Feet"))}else i&&i.unit==="nautical"?Da(e,C,L/1852,h._getUIString("ScaleControl.NauticalMiles")):L>=1e3?Da(e,C,L/1e3,h._getUIString("ScaleControl.Kilometers")):Da(e,C,L,h._getUIString("ScaleControl.Meters"))}function Da(h,e,i,l){let c=function(d){let v=Math.pow(10,`${Math.floor(d)}`.length-1),w=d/v;return w=w>=10?10:w>=5?5:w>=3?3:w>=2?2:w>=1?1:function(P){let C=Math.pow(10,Math.ceil(-Math.log(P)/Math.LN10));return Math.round(P*C)/C}(w),v*w}(i);h.style.width=e*(c/i)+"px",h.innerHTML=`${c} ${l}`}let fc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0}
vendor: 5,158 bytes, line 728
728,mc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Go(h){if(h){if(typeof h=="number"){let e=Math.round(Math.abs(h)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,h),"top-left":new a.P(e,e),"top-right":new a.P(-e,e),bottom:new a.P(0,-h),"bottom-left":new a.P(e,-e),"bottom-right":new a.P(-e,-e),left:new a.P(h,0),right:new a.P(-h,0)}}if(h instanceof a.P||Array.isArray(h)){let e=a.P.convert(h);return{center:e,top:e,"top-left":e,"top-right":e,bottom:e,"bottom-left":e,"bottom-right":e,left:e,right:e}}return{center:a.P.convert(h.center||[0,0]),top:a.P.convert(h.top||[0,0]),"top-left":a.P.convert(h["top-left"]||[0,0]),"top-right":a.P.convert(h["top-right"]||[0,0]),bottom:a.P.convert(h.bottom||[0,0]),"bottom-left":a.P.convert(h["bottom-left"]||[0,0]),"bottom-right":a.P.convert(h["bottom-right"]||[0,0]),left:a.P.convert(h.left||[0,0]),right:a.P.convert(h.right||[0,0])}}return Go(new a.P(0,0))}let gc=z;y.AJAXError=a.cm,y.Event=a.l,y.Evented=a.E,y.LngLat=a.Q,y.MercatorCoordinate=a.$,y.Point=a.P,y.addProtocol=a.cn,y.config=a.a,y.removeProtocol=a.co,y.AttributionControl=Ut,y.BoxZoomHandler=Ma,y.CanvasSource=Mn,y.CooperativeGesturesHandler=gl,y.DoubleClickZoomHandler=cc,y.DragPanHandler=zs,y.DragRotateHandler=Wi,y.EdgeInsets=Ri,y.FullscreenControl=class extends a.E{constructor(h={}){super(),this._onFullscreenChange=()=>{var e;let i=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((e=i?.shadowRoot)===null||e===void 0)&&e.fullscreenElement;)i=i.shadowRoot.fullscreenElement;i===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,h&&h.container&&(h.container instanceof HTMLElement?this._container=h.container:a.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(h){return this._map=h,this._container||(this._container=this._map.getContainer()),this._controlContainer=O.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){O.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let h=this._fullscreenButton=O.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);O.create("span","maplibregl-ctrl-icon",h).setAttribute("aria-hidden","true"),h.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let h=this._getTitle();this._fullscreenButton.setAttribute("aria-label",h),this._fullscreenButton.title=h}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new a.l("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new a.l("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},y.GeoJSONSource=sr,y.GeolocateControl=class extends a.E{constructor(h){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new a.l("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_E
728RROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(e),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new a.l("geolocate",e)),this._finish()}},this._updateCamera=e=>{let i=new a.Q(e.coords.longitude,e.coords.latitude),l=e.coords.accuracy,c=this._map.getBearing(),d=a.e({bearing:c},this.options.fitBoundsOptions),v=wi.fromLngLat(i,l);this._map.fitBounds(v,d,{geolocateSource:!0})},this._updateMarker=e=>{if(e){let i=new a.Q(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(i).addTo(this._map),this._userLocationDotMarker.setLngLat(i).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=e=>{if(this._map){if(this.options.trackUserLocation)if(e.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(e.code===3&&Aa)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new a.l("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",e=>e.preventDefault()),this._geolocateButton=O.create("button","maplibregl-ctrl-geolocate",this._container),O.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(e===!1){a.w("Geolocation support is not available so the GeolocateControl will be disabled.");let i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}else{let i=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=O.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Ia({element:this._dotElement}),this._circleElement=O.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ia({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",i=>{i.geolocateSource||this._watchState!=="ACTIVE_LOCK"||i.originalEvent&&i.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new a.l("trackuserlocationend")),this.fire(new a.l("userlocationlostfocus")))})}},this.options=a.e({},dc,h)}onAdd(h){return this._map=h,this._container=O.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return a._(this,arguments,void 0,function*(e=!1){if(_s!==void 0&&!e)return _s;if(window.navigator.permissions===void 0)return _s=!!window.navigator.geolocation,_s;try{_s=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{_s=!!window.navigator.geolocation}return _s})}().then(e=>this._finishSetupUI(e)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),O.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,no=0,Aa=!1}_isOutOfMapMaxBounds(h){let e=this._map.getMaxBounds(),i=h.coords;return e&&(i.longitude<e.getWest()||i.longitude>e.getEast()||i.latitude<e.getSouth()||i.latitude>e.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_E
728RROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let h=this._map.getBounds(),e=h.getSouthEast(),i=h.getNorthEast(),l=e.distanceTo(i),c=Math.ceil(this._accuracy/(l/this._map._container.clientHeight)*2);this._circleElement.style.width=`${c}px`,this._circleElement.style.height=`${c}px`}trigger(){if(!this._setup)return a.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new a.l("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":no--,Aa=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new a.l("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new a.l("trackuserlocationstart")),this.fire(new a.l("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let h;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),no++,no>1?(h={maximumAge:6e5,timeout:0},Aa=!0):(h=this.options.positionOptions,Aa=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,h)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},y.GlobeControl=class{constructor(){this._toggleProjection=()=>{var h;let e=(h=this._map.getProjection())===null||h===void 0?void 0:h.type;this._map.setProjection(e!=="mercator"&&e?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var h;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((h=this._map.getProjection())===null||h===void 0?void 0:h.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(h){return this._map=h,this._container=O.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=O.create("button","maplibregl-ctrl-globe",this._container),O.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._container}onRemove(){O.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},y.Hash=ic,y.ImageSource=Sr,y.KeyboardHandler=ac,y.LngLatBounds=wi,y.LogoControl
728=Wt,y.Map=class extends ys{constructor(h){var e,i;a.cj.mark(a.ck.create);let l=Object.assign(Object.assign(Object.assign({},_r),h),{canvasContextAttributes:Object.assign(Object.assign({},_r.canvasContextAttributes),h.canvasContextAttributes)});if(l.minZoom!=null&&l.maxZoom!=null&&l.minZoom>l.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(l.minPitch!=null&&l.maxPitch!=null&&l.minPitch>l.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(l.minPitch!=null&&l.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(l.maxPitch!=null&&l.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let c=new Gi,d=new Vr;if(l.minZoom!==void 0&&c.setMinZoom(l.minZoom),l.maxZoom!==void 0&&c.setMaxZoom(l.maxZoom),l.minPitch!==void 0&&c.setMinPitch(l.minPitch),l.maxPitch!==void 0&&c.setMaxPitch(l.maxPitch),l.renderWorldCopies!==void 0&&c.setRenderWorldCopies(l.renderWorldCopies),super(c,d,{bearingSnap:l.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new _l,this._controls=[],this._mapId=a.a4(),this._contextLost=w=>{w.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new a.l("webglcontextlost",{originalEvent:w}))},this._contextRestored=w=>{this._setupPainter(),this.resize(),this._update(),this.fire(new a.l("webglcontextrestored",{originalEvent:w}))},this._onMapScroll=w=>{if(w.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=l.interactive,this._maxTileCacheSize=l.maxTileCacheSize,this._maxTileCacheZoomLevels=l.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},l.canvasContextAttributes),this._trackResize=l.trackResize===!0,this._bearingSnap=l.bearingSnap,this._centerClampedToGround=l.centerClampedToGround,this._refreshExpiredTiles=l.refreshExpiredTiles===!0,this._fadeDuration=l.fadeDuration,this._crossSourceCollisions=l.crossSourceCollisions===!0,this._collectResourceTiming=l.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},$o),l.locale),this._clickTolerance=l.clickTolerance,this._overridePixelRatio=l.pixelRatio,this._maxCanvasSize=l.maxCanvasSize,this.transformCameraUpdate=l.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=l.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=ce.addThrottleControl(()=>this.isMoving()),this._requestManager=new le(l.transformRequest),typeof l.container=="string"){if(this._container=document.getElementById(l.container),!this._container)throw new Error(`Container '${l.container}' not found.`)}else{if(!(l.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=l.container}if(l.maxBounds&&this.setMaxBounds(l.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}),this.once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let w=!1,P=tc(C=>{this._trackResize&&!this._removed&&(this.resize(C),this.redraw())},50);this._resizeObserver=new ResizeObserver(C=>{w?P(C):w=!0}),this._resizeObserver.observe(this._container)}this.handlers=new ph(this,l),this._hash=l.hash&&new ic(typeof l.hash=="string"&&l.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:l.center,elevation:l.elevation,zoom:l.zoom,bearing:l.bearing,pitch:l.pitch,roll:l.roll}),l.bounds&&(this.resize(),this.fitBounds(l.bounds,a.e({},l.fitBoundsOptions,{duration:0}))));let v=typeof l.style=="string"||((i=(e=l.style)===null||e===void 0?void 0:e.projection)===null||i===void 0?void 0:i.type)!=="globe";this.resize(null,v),this._localIdeographFontFamily=l.localIdeographFontFamily,this._validateStyle=l.validateStyle,l.style&&this.setStyle(l.style,{localIdeographFontFamily:l.localIdeographFontFamily}),l.attributionControl&&this.addControl(new Ut(typeof l.attributionControl
728=="boolean"?void 0:l.attributionControl)),l.maplibreLogo&&this.addControl(new Wt,l.logoPosition),this.on("style.load",()=>{if(v||this._resizeTransform(),this.transform.unmodified){let w=a.O(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(w)}}),this.on("data",w=>{this._update(w.dataType==="style"),this.fire(new a.l(`${w.dataType}data`,w))}),this.on("dataloading",w=>{this.fire(new a.l(`${w.dataType}dataloading`,w))}),this.on("dataabort",w=>{this.fire(new a.l("sourcedataabort",w))})}_getMapId(){return this._mapId}addControl(h,e){if(e===void 0&&(e=h.getDefaultPosition?h.getDefaultPosition():"top-right"),!h||!h.onAdd)return this.fire(new a.k(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let i=h.onAdd(this);this._controls.push(h);let l=this._controlPositions[e];return e.indexOf("bottom")!==-1?l.insertBefore(i,l.firstChild):l.appendChild(i),this}removeControl(h){if(!h||!h.onRemove)return this.fire(new a.k(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let e=this._controls.indexOf(h);return e>-1&&this._controls.splice(e,1),h.onRemove(this),this}hasControl(h){return this._controls.indexOf(h)>-1}calculateCameraOptionsFromTo(h,e,i,l){return l==null&&this.terrain&&(l=this.terrain.getElevationForLngLatZoom(i,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(h,e,i,l)}resize(h,e=!0){let[i,l]=this._containerDimensions(),c=this._getClampedPixelRatio(i,l);if(this._resizeCanvas(i,l,c),this.painter.resize(i,l,c),this.painter.overLimit()){let v=this.painter.context.gl;this._maxCanvasSize=[v.drawingBufferWidth,v.drawingBufferHeight];let w=this._getClampedPixelRatio(i,l);this._resizeCanvas(i,l,w),this.painter.resize(i,l,w)}this._resizeTransform(e);let d=!this._moving;return d&&(this.stop(),this.fire(new a.l("movestart",h)).fire(new a.l("move",h))),this.fire(new a.l("resize",h)),d&&this.fire(new a.l("moveend",h)),this}_resizeTransform(h=!0){var e;let[i,l]=this._containerDimensions();this.transform.resize(i,l,h),(e=this._requestedCameraState)===null||e===void 0||e.resize(i,l,h)}_getClampedPixelRatio(h,e){let{0:i,1:l}=this._maxCanvasSize,c=this.getPixelRatio(),d=h*c,v=e*c;return Math.min(d>i?i/d:1,v>l?l/v:1)*c}getPixelRatio(){var h;return(h=this._overridePixelRatio)!==null&&h!==void 0?h:devicePixelRatio}setPixelRatio(h){this._overridePixelRatio=h,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(h){return this.transform.setMaxBounds(wi.convert(h)),this._update()}setMinZoom(h){if((h=h??-2)>=-2&&h<=this.transform.maxZoom)return this.transform.setMinZoom(h),this._update(),this.getZoom()<h&&this.setZoom(h),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(h){if((h=h??22)>=this.transform.minZoom)return this.transform.setMaxZoom(h),this._update(),this.getZoom()>h&&this.setZoom(h),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(h){if((h=h??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(h>=0&&h<=this.transform.maxPitch)return this.transform.setMinPitch(h),this._update(),this.getPitch()<h&&this.setPitch(h),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(h){if((h=h??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(h>=this.transform.minPitch)return this.transform.setMaxPitch(h),this._update(),this.getPitch()>h&&this.setPitch(h),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(h){return this.transform.setRenderWorldCopies(h),this._update()}project(h){return this.transform.locationToScreenPoint(a.Q.convert(h),this.style&&this.terrain)}unproject(h){return this.transform.screenPointToLocation(a.P.convert(h),this.terrain)}isMoving(){var h;return this._moving||((h=this.handlers)===null||h===void 0?void 0:h.isMoving())}isZooming(){var h;return this._zooming||((h=this.handlers)===null||h===void 0?void 0:h.isZooming())}isRotating(){var h;return this._rotating||((h=this.handlers)===null||h===void 0?void 0:h.isRotating())}_createDelegatedListener(h,e,i){if(h==="mouseenter"||h==="mouseover"){let l=!1;return{layers:e,listener:i,delegates:{mousemove:d=>{let v=e.filter(P=>this.getLayer(P)),w=v.length!==0?this.queryRenderedFeatures(d.point,{layers:v}):[];w.length?l||(l=!0,i.call(this,new nn(h,this,d.originalEvent,{features:w}))):l=!1},mouseout:()=>{l=!1}}}}if(h==="mouseleave"||h==="mouseout"){let l=!1;return{layers:e,listener:i,delegates:{mousemove:v=>{let w=e.filter(P=>this.getLayer(P));(w.length!==0?this.queryRenderedFeatures(v.point,{layers:w}):[]).length?l=!0:l&&(l=!1,i.call(this,new nn(h,this,v.originalEvent)))},mouseout:v=>{l&&(l=!1,i.call(this,new nn(h,this,v.originalEvent)))}}}}{let l=c=>{let d=e.filter(w=>this.getLayer(w)),v=d.length!==0?this.queryRenderedFeatures(c.point,{layers:d}):[];v.length&&(c.features=v,i.call(this,c),delete c.features)};return{layers:e,listener:i,delegates:{[h]:l}}}}_saveDelegatedListener(h,e){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[h]=this._delegatedListeners[h]||[],this._delegatedListeners[h].push(e)}_removeDelegatedListener(h,e,i){if(!this._delegatedListeners||!this._delegatedListeners[h])return;let l=this._delegatedListeners[h];for(let c=0;c<l.length;c++){let d=l[c];if(d.listener===i&&d.layers.length===e.length&&d.layers.every(v=>e.includes(v))){for(let v in d.delegates)this.off(v,d.delegates[v]);return void l.splice(c,1)}}}on(h,e,i){if(i===void 0)return super.on(h,e);let l=typeof e=="string"?[e]:e,c=this._createDelegatedListener(h,l,i);this._saveDelegatedListener(h,c);for(let d in c.delegates)this.on(d,c.delegates[d]);return{unsubscribe:()=>{this._removeDelegatedListener(h,l,i)}}}once(h,e,i){if(i===void 0)return super.once(h,e);let l=typeof e=="string"?[e]:e,c=this._createDelegatedListener(h,l,i);for(let d in c.delegates){let v=c.delegates[d];c.delegates[d]=(...w)=>
728{this._removeDelegatedListener(h,l,i),v(...w)}}this._saveDelegatedListener(h,c);for(let d in c.delegates)this.once(d,c.delegates[d]);return this}off(h,e,i){return i===void 0?super.off(h,e):(this._removeDelegatedListener(h,typeof e=="string"?[e]:e,i),this)}queryRenderedFeatures(h,e){if(!this.style)return[];let i,l=h instanceof a.P||Array.isArray(h),c=l?h:[[0,0],[this.transform.width,this.transform.height]];if(e=e||(l?{}:h)||{},c instanceof a.P||typeof c[0]=="number")i=[a.P.convert(c)];else{let d=a.P.convert(c[0]),v=a.P.convert(c[1]);i=[d,new a.P(v.x,d.y),v,new a.P(d.x,v.y),d]}return this.style.queryRenderedFeatures(i,e,this.transform)}querySourceFeatures(h,e){return this.style.querySourceFeatures(h,e)}setStyle(h,e){return(e=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},e)).diff!==!1&&e.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&h?(this._diffStyle(h,e),this):(this._localIdeographFontFamily=e.localIdeographFontFamily,this._updateStyle(h,e))}setTransformRequest(h){return this._requestManager.setTransformRequest(h),this}_getUIString(h){let e=this._locale[h];if(e==null)throw new Error(`Missing UI string '${h}'`);return e}_updateStyle(h,e){var i,l;if(e.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(h,e));let c=this.style&&e.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!h)),h?(this.style=new We(this,e||{}),this.style.setEventedParent(this,{style:this.style}),typeof h=="string"?this.style.loadURL(h,e,c):this.style.loadJSON(h,e,c),this):((l=(i=this.style)===null||i===void 0?void 0:i.projection)===null||l===void 0||l.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new We(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(h,e){if(typeof h=="string"){let i=this._requestManager.transformRequest(h,"Style");a.j(i,new AbortController).then(l=>{this._updateDiff(l.data,e)}).catch(l=>{l&&this.fire(new a.k(l))})}else typeof h=="object"&&this._updateDiff(h,e)}_updateDiff(h,e){try{this.style.setState(h,e)&&this._update(!0)}catch(i){a.w(`Unable to perform style diff: ${i.message||i.error||i}. Rebuilding the style from scratch.`),this._updateStyle(h,e)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():a.w("There is no style added to the map.")}addSource(h,e){return this._lazyInitEmptyStyle(),this.style.addSource(h,e),this._update(!0)}isSourceLoaded(h){let e=this.style&&this.style.sourceCaches[h];if(e!==void 0)return e.loaded();this.fire(new a.k(new Error(`There is no source with ID '${h}'`)))}setTerrain(h){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),h){let e=this.style.sourceCaches[h.source];if(!e)throw new Error(`cannot load terrain, because there exists no source with ID: ${h.source}`);this.terrain===null&&e.reload();for(let i in this.style._layers){let l=this.style._layers[i];l.type==="hillshade"&&l.source===h.source&&a.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Tn(this.painter,e,h),this.painter.renderToTexture=new fh(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=i=>{var l;i.dataType==="style"?this.terrain.sourceCache.freeRtt():i.dataType==="source"&&i.tile&&(i.sourceId!==h.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((l=i.source)===null||l===void 0?void 0:l.type)==="image"?this.terrain.sourceCache.freeRtt():this.terrain.sourceCache.freeRtt(i.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGroun
728d&&this.transform.setElevation(0);return this.fire(new a.l("terrain",{terrain:h})),this}getTerrain(){var h,e;return(e=(h=this.terrain)===null||h===void 0?void 0:h.options)!==null&&e!==void 0?e:null}areTilesLoaded(){let h=this.style&&this.style.sourceCaches;for(let e in h){let i=h[e]._tiles;for(let l in i){let c=i[l];if(c.state!=="loaded"&&c.state!=="errored")return!1}}return!0}removeSource(h){return this.style.removeSource(h),this._update(!0)}getSource(h){return this.style.getSource(h)}addImage(h,e,i={}){let{pixelRatio:l=1,sdf:c=!1,stretchX:d,stretchY:v,content:w,textFitWidth:P,textFitHeight:C}=i;if(this._lazyInitEmptyStyle(),!(e instanceof HTMLImageElement||a.b(e))){if(e.width===void 0||e.height===void 0)return this.fire(new a.k(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:L,height:N,data:R}=e,K=e;return this.style.addImage(h,{data:new a.R({width:L,height:N},new Uint8Array(R)),pixelRatio:l,stretchX:d,stretchY:v,content:w,textFitWidth:P,textFitHeight:C,sdf:c,version:0,userImage:K}),K.onAdd&&K.onAdd(this,h),this}}{let{width:L,height:N,data:R}=U.getImageData(e);this.style.addImage(h,{data:new a.R({width:L,height:N},R),pixelRatio:l,stretchX:d,stretchY:v,content:w,textFitWidth:P,textFitHeight:C,sdf:c,version:0})}}updateImage(h,e){let i=this.style.getImage(h);if(!i)return this.fire(new a.k(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let l=e instanceof HTMLImageElement||a.b(e)?U.getImageData(e):e,{width:c,height:d,data:v}=l;if(c===void 0||d===void 0)return this.fire(new a.k(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(c!==i.data.width||d!==i.data.height)return this.fire(new a.k(new Error("The width and height of the updated image must be that same as the previous version of the image")));let w=!(e instanceof HTMLImageElement||a.b(e));return i.data.replace(v,w),this.style.updateImage(h,i),this}getImage(h){return this.style.getImage(h)}hasImage(h){return h?!!this.style.getImage(h):(this.fire(new a.k(new Error("Missing required image id"))),!1)}removeImage(h){this.style.removeImage(h)}loadImage(h){return ce.getImage(this._requestManager.transformRequest(h,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(h,e){return this._lazyInitEmptyStyle(),this.style.addLayer(h,e),this._update(!0)}moveLayer(h,e){return this.style.moveLayer(h,e),this._update(!0)}removeLayer(h){return this.style.removeLayer(h),this._update(!0)}getLayer(h){return this.style.getLayer(h)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(h,e,i){return this.style.setLayerZoomRange(h,e,i),this._update(!0)}setFilter(h,e,i={}){return this.style.setFilter(h,e,i),this._update(!0)}getFilter(h){return this.style.getFilter(h)}setPaintProperty(h,e,i,l={}){return this.style.setPaintProperty(h,e,i,l),this._update(!0)}getPaintProperty(h,e){return this.style.getPaintProperty(h,e)}setLayoutProperty(h,e,i,l={}){return this.style.setLayoutProperty(h,e,i,l),this._update(!0)}getLayoutProperty(h,e){return this.style.getLayoutProperty(h,e)}setGlyphs(h,e={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(h,e),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(h,e,i={}){return this._lazyInitEmptyStyle(),this.style.addSprite(h,e,i,l=>{l||this._update(!0)}),this}removeSprite(h){return this._lazyInitEmptyStyle(),this.style.removeSprite(h),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(h,e={}){return this._lazyInitEmptyStyle(),this.style.setSprite(h,e,i=>{i||this._update(!0)}),this}setLight(h,e={}){return this._lazyInitEmptyStyle(),this.style.setLight(h,e),this._update(!0)}getLight(){return this.style.getLight()}setSky(h,e={}){return this._lazyInitEmptyStyle(),this.style.setSky(h,e),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(h,e){return this.style.setFeatureState(h,e),this._update()}removeFeatureState(h,e){return this.style.removeFeatureState(h,e),this._update()}getFeatureState(h){return this.style.getFeatureState(h)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let h=0,e=0;return this._container&&(h=this._container.clientWidth||400,e=this._container.clientHeight||300),[h,e]}_setupContainer(){let h=this._container;h.classList.add("maplibregl-map");let e=this._canvasContainer=O.create("div","maplibregl-canvas-container",h);this._interactive&&e.classList.add("maplibregl-interactive"),this._canvas=O.create("canvas","maplibregl-canvas",e),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","regi
728on");let i=this._containerDimensions(),l=this._getClampedPixelRatio(i[0],i[1]);this._resizeCanvas(i[0],i[1],l);let c=this._controlContainer=O.create("div","maplibregl-control-container",h),d=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(v=>{d[v]=O.create("div",`maplibregl-ctrl-${v} `,c)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(h,e,i){this._canvas.width=Math.floor(i*h),this._canvas.height=Math.floor(i*e),this._canvas.style.width=`${h}px`,this._canvas.style.height=`${e}px`}_setupPainter(){let h=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),e=null;this._canvas.addEventListener("webglcontextcreationerror",l=>{e={requestedAttributes:h},l&&(e.statusMessage=l.statusMessage,e.type=l.type)},{once:!0});let i=null;if(i=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,h):this._canvas.getContext("webgl2",h)||this._canvas.getContext("webgl",h),!i){let l="Failed to initialize WebGL";throw e?(e.message=l,new Error(JSON.stringify(e))):new Error(l)}this.painter=new Jc(i,this.transform),ne.testSupport(i)}migrateProjection(h,e){super.migrateProjection(h,e),this.painter.transform=h,this.fire(new a.l("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(h){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||h,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(h){return this._update(),this._renderTaskQueue.add(h)}_cancelRenderFrame(h){this._renderTaskQueue.remove(h)}_render(h){var e,i,l,c,d;let v=this._idleTriggered?this._fadeDuration:0,w=((e=this.style.projection)===null||e===void 0?void 0:e.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(h),this._removed)return;let P=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let N=this.transform.zoom,R=U.now();this.style.zoomHistory.update(N,R);let K=new a.C(N,{now:R,fadeDuration:v,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),ee=K.crossFadingFactor();ee===1&&ee===this._crossFadingFactor||(P=!0,this._crossFadingFactor=ee),this.style.update(K)}let C=((i=this.style.projection)===null||i===void 0?void 0:i.transitionState)>0!==w;(l=this.style.projection)===null||l===void 0||l.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((c=this.style.projection)===null||c===void 0?void 0:c.transitionState,(d=this.style.projection)===null||d===void 0?void 0:d.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||C)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=this.style&&this.style._updatePlacement(this.transform,this.showCollisionBoxes,v,this._crossSourceCollisions,C),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:v,showPadding:this.showPadding}),this.fire(new a.l("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,a.cj.mark(a.ck.load),this.fire(new a.l("load"))),this.style&&(this.style.hasTransitions()||P)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let L=this._sourcesDirty||this._styleDirty||this._placementDirty;return L||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.l("idle")),!this._loaded||this._fullyLoaded||L||(this._fullyLoaded=!0,a.cj.mark(a.ck.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var h;this._hash&&this._hash.remove();for(let i of this._controls)i.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),ce.removeThrottleControl(this._imageQueueHandle),(h=this._resizeObserver)===null||h===void 0||h.disconnect();let e=this.painter.context.gl.getExtension("WEBGL_lose_context");e?.loseContext&&e.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),O.remove(this._canvasContainer),O.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),a.cj.clearMetrics(),this._removed=!0,this.fire(new a.l("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,U.frame(this._frameRequest,h=>{a.cj.frame(h),this._frameRequest=null;try{this._render(h)}catch(e){if(!a.cl(e)&&!function(i){return i.message===Zc}(e))throw e}},()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(h){this._showTileBoundaries!==h&&(this._showTileBoundaries=h,this._update())}get showPadding(){return!!this._showPadding}set showPadding(h){this._showPadding!==h&&(this._showPadding=h,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(h){this._showCollisionBoxes!==h&&(this._showCollisionBoxes=h,h?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(h){this._showOverdrawInspector!==h&&(this._showOverdrawInspector=h,this._update())}get repaint(){return!!this._repaint}set repaint(h){this._repaint!==h&&(this._repaint=h,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(h){this._vertices=h,this._update()}get version(){return cr}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(h){return this._lazyInitEmptyStyle(),this.style.setProjection(h),this._update(!0)}},y.MapMouseEvent=nn,y.MapTouchEvent=to,y.MapWheelEvent=Gn,y.Marker=Ia,y.NavigationControl
728=class{constructor(h){this._updateZoomButtons=()=>{let e=this._map.getZoom(),i=e===this._map.getMaxZoom(),l=e===this._map.getMinZoom();this._zoomInButton.disabled=i,this._zoomOutButton.disabled=l,this._zoomInButton.setAttribute("aria-disabled",i.toString()),this._zoomOutButton.setAttribute("aria-disabled",l.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(e,i)=>{let l=this._map._getUIString(`NavigationControl.${i}`);e.title=l,e.setAttribute("aria-label",l)},this.options=a.e({},du,h),this._container=O.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",e=>this._map.zoomIn({},{originalEvent:e})),O.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",e=>this._map.zoomOut({},{originalEvent:e})),O.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})}),this._compassIcon=O.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(h){return this._map=h,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Vo(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){O.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(h,e){let i=O.create("button",h,this._container);return i.type="button",i.addEventListener("click",e),i}},y.Popup=class extends a.E{constructor(h){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:void 0)},this.remove=()=>(this._content&&O.remove(this._content),this._container&&(O.remove(this._container),delete this._container),this._closeButton&&this._closeButton.removeEventListener("click",this._onClose),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new a.l("close"))),this),this._onMouseUp=e=>{this._update(e.point)},this._onMouseMove=e=>{this._update(e.point)},this._onDrag=e=>{this._update(e.point)},this._update=e=>{var i;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=O.create("div","maplibregl-popup",this._map.getContainer()),this._tip=O.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let w of this.options.className.split(" "))this._container.classList.add(w);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?vl(this._lngLat,this._flatPos,this._map.transform):(i=this._lngLat)===null||i===void 0?void 0:i.wrap(),this._trackPointer&&!e)return;let l=this._flatPos=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&e?e:this._map.transform.locationToScreenPoint(this._lngLat));let c=this.options.anchor,d=Go(this.options.offset);if(!c){let w=this._container.offsetWidth,P=this._container.offsetHeight,C;C=l.y+d.bottom.y<P?["top"]:l.y>this._map.transform.height-P?["bottom"]:[],l.x<w/2?C.push("left"):l.x>this._map.transform.width-w/2&&C.push("right"),c=C.length===0?"bottom":C.join("-")}let v=l.add(d[c]);this.options.subpixelPositioning||(v=v.round()),O.setTransform(this._container,`${Uo[c]} translate(${v.x}px,${v.y}px)`),bl(this._container,c,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(fc),h)}addTo(h){return this._map&&this.remove(),this._map=h,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new a.l("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(h){return this._lngLat=a.Q.convert(h),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(h){return this.setDOMContent(document.createTextNode(h))}setHTML(h){let e=document.createDocumentFragment(),i=document.createElement("body"),l;for(i.innerHTML=h;l=i.firstChild,l;)e.appendChild(l);return this.setDOMContent(e)}getMaxWidth(){var h;
728return(h=this._container)===null||h===void 0?void 0:h.style.maxWidth}setMaxWidth(h){return this.options.maxWidth=h,this._update(),this}setDOMContent(h){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=O.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(h),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(h){return this._container&&this._container.classList.add(h),this}removeClassName(h){return this._container&&this._container.classList.remove(h),this}setOffset(h){return this.options.offset=h,this._update(),this}toggleClassName(h){if(this._container)return this._container.classList.toggle(h)}setSubpixelPositioning(h){this.options.subpixelPositioning=h}_createCloseButton(){this.options.closeButton&&(this._closeButton=O.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let h=this._container.querySelector(mc);h&&h.focus()}},y.RasterDEMTileSource=Cr,y.RasterTileSource=Ui,y.ScaleControl=class{constructor(h){this._onMove=()=>{xl(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,xl(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},pc),h)}getDefaultPosition(){return"bottom-left"}onAdd(h){return this._map=h,this._container=O.create("div","maplibregl-ctrl maplibregl-ctrl-scale",h.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){O.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},y.ScrollZoomHandler=cu,y.Style=We,y.TerrainControl=class{constructor(h){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=h}onAdd(h){return this._map=h,this._container=O.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=O.create("button","maplibregl-ctrl-terrain",this._container),O.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){O.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},y.TwoFingersTouchPitchHandler=lu,y.TwoFingersTouchRotateHandler=ou,y.TwoFingersTouchZoomHandler=mi,y.TwoFingersTouchZoomRotateHandler=Oo,y.VectorTileSource=qi,y.VideoSource=Tr,y.addSourceType=(h,e)=>a._(void 0,void 0,void 0,function*(){if(cn(h))throw new Error(`A source type called "${h}" already exists.`);((i,l)=>{pr[i]=l})(h,e)}),y.clearPrewarmedResources=function(){let h=Pi;h&&(h.isPreloaded()&&h.numActive()===1?(h.release(At),Pi=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()"))},y.createTileMesh=ea,y.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},y.getRTLTextPluginStatus=function(){return un().getRTLTextPluginStatus()},y.getVersion=function(){return gc},y.getWorkerCount=function(){return Yt.workerCount},y.getWorkerUrl=function(){return a.a.WORKER_URL},y.importScriptInWorkers=function(h){return yt().broadcast("IS",h)},y.prewarm=function(){ln().acquire(At)},y.setMaxParallelImageRequests=function(h){a.a.MAX_PARALLEL_IMAGE_REQUESTS=h},y.setRTLTextPlugin=function(h,e){return un().setRTLTextPlugin(h,e)},y.setWorkerCount=function(h){Yt.workerCount=h},y.setWorkerUrl=function(h){a.a.WORKER_URL=h}});var b=p;return b})});var Us=Tf(Vm());function Um(){let p=this;this.DOM={previousButtonElement:void 0,nextButtonElement:void 0,rootElement:void 0},this.sliderState={numberOfSlides:void 0,currentSlide:void 0,teaserMode:void 0},this.init=function(s,g){let b=g?"teaser-item":"slide",y=s.getElementsByClassName(b).length;if(y===0)return;if(p.sliderState.numberOfSlides=y,p.sliderState.currentSlide=0,p.sliderState.teaserMode=g,p.sliderState.teaserMode?(p.DOM.previousButton=s.querySelector(".teaser__arrow-left > .teaser__arrow"),p.DOM.nextButton=s.querySelector(".teaser__arrow-right > .teaser__arrow")):(p.DOM.previousButton=s.querySelector(".slider__arrow-left > .slider__arrow"),p.DOM.nextButton=s.querySelector(".slider__arrow-right > .slider__arrow")),!(p.DOM.previousButton||p.DOM.nextButton)){console.log("Slider not initialized correctly.");return}p.DOM.previousButton.onclick=p.previousOnClick,p.DOM.nextButton.onclick=p.nextOnClick,p.DOM.rootElement=s,p.setUIState();let a=s.dataset.changeInterval;a>0&&(p.sliderState.intervalID=window.setInterval(function(){p.next()},a*1e3)),g&&(0,Us.default)(p.DOM.rootElement).find(".teaser__dot").click(function(z){let F=(0,Us.default)(p.DOM.rootElement).find(".teaser__dot").index(z.target);p.sliderState.currentSlide!==F&&(p.sliderState.currentSlide=F,p.slideToCurrentSlide(),p.setUIState())})},this.setUIState=function(){p.sliderState.teaserMode?p.setUIStateTeaser():p.setUIStateSlider()},this.setUIStateSlider=function(){p.DOM.previousButton.classList.remove("slider__arrow--inactive"),p.DOM.nextButton.classList.remove("slider__arrow--inactive")},this.setUIStateTeaser=function(){p.DOM.previousButton.classList.remove("teaser__arrow--inactive"),p.DOM.nextButton.classList.remove("teaser__arrow--inactive");let s=(0,Us.default)(p.DOM.rootElement);s.find(".teaser__description").addClass("teaser__description--invisible"),(0,Us.default)(s.find(".teaser__description")[p.sliderState.currentSlide]).removeClass("teaser__description--invisible"),s.find(".teaser__dot").addClass("teaser__dot--inactive"),(0,Us.default)(s.find(".teaser__dot")[p.sliderState.currentSlide]).removeClass("teaser__dot--inactive")},this.nextOnClick=function(){window.clearInterval(p.sliderState.intervalID),p.next()},this.previousOnClick=function(){window.clearInterval(p.sliderState.intervalID),p.previous()},this.next=function(){return p.sliderState.currentSlide++,p.sliderState.currentSlide%=p.sliderState.numberOfSlides,p.slideToCurrentSlide(),p.setUIState(),!1},this.previous=function(){return p.sliderState.currentSlide--,p.sliderState.currentSlide+=p.sliderState.numberOfSlides,p.sliderState.currentSlide%=p.sliderState.numberOfSlides,p.slideToCurrentSlide(),p.setUIState(),!1},this.slideToCurrentSlide=function(){let s=p.sliderState.currentSlide*100;p.sliderState.teaserMode?p.DOM.rootElement.querySelector(".teaser__items").style="transform: translate3d(-"+s+"%, 0, 0)":p.DOM.rootElement.querySelector(".slider__items").style="transform: translate3d(-"+s+"%, 0, 0)"}}function Ov(){this.init=function(){let p=document.getElementsByClassName("accordion-item__header");for(let s=0;s<p.length;s++)p.item(s).onclick=function(){return this.parentNode.querySelector(".accordion-item__text").classList.toggle("accordion-item__text--collapsed"),this.parentNode.querySelector(".accordion-item__arrow").classList.toggle("accordion-item__arrow--collapsed"),!1}}}function Nv(){this.init=function(){let p=document.getElementsByClassName("extendable-text__continue-reading");for(let s=0;s<p.length;s++)p.item(s).onclick=function(){return this.parentNode.querySelector(".extendable-text__secondary-text").classList.toggle("extendable-text--collapsed"),!1}}}var Gm=()=>{(0,Us.default)(document).ready(function(){(0,Us.default)(".teaser").each(function(p,s){new Um().init(s,!0)}),(0,Us.default)(".slider").each(function(p,s){new Um().init(s,!1)}),(0,Us.default)(".accordion").each(function(p,s){new Ov().init()}),(0,Us.default)(".extendable-text").each(function(p,s){new Nv().init()})})};var Hm=()=>
728{if("serviceWorker"in navigator){let p=Vv();p?navigator.serviceWorker.getRegistrations().then(s=>{s.length===0&&jv(p)}).catch(s=>{console.log("Couldn't get service worker registrations",s)}):$v()}},jv=p=>{navigator.serviceWorker.register(p,{scope:"/"}).then(s=>{console.log("Service worker registered",s)}).catch(s=>console.log("Service worker couldn't be registered!",s))},$v=()=>{navigator.serviceWorker.getRegistrations().then(p=>{console.log("unregistering service worker",p),p.forEach(s=>{s.unregister()})}).catch(p=>{console.log("Service worker couldn't be unregistered!",p)})},Vv=()=>{let p=document.querySelector('link[rel="x-oekokiste-service-worker"]');return p?p.href:null};function qm(){let p="v2.2.0",s="cacheBust";localStorage.getItem(s)!==p&&(localStorage.clear(),localStorage.setItem(s,p),window.location.reload())}var eg=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Gu=eg.join(","),tg=typeof Element>"u",Ko=tg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,pd=!tg&&Element.prototype.getRootNode?function(p){return p.getRootNode()}:function(p){return p.ownerDocument},ig=function(s,g,b){var y=Array.prototype.slice.apply(s.querySelectorAll(Gu));return g&&Ko.call(s,Gu)&&y.unshift(s),y=y.filter(b),y},rg=function p(s,g,b){for(var y=[],a=Array.from(s);a.length;){var z=a.shift();if(z.tagName==="SLOT"){var F=z.assignedElements(),V=F.length?F:z.children,B=p(V,!0,b);b.flatten?y.push.apply(y,B):y.push({scope:z,candidates:B})}else{var U=Ko.call(z,Gu);U&&b.filter(z)&&(g||!s.includes(z))&&y.push(z);var O=z.shadowRoot||typeof b.getShadowRoot=="function"&&b.getShadowRoot(z),ne=!b.shadowRootFilter||b.shadowRootFilter(z);if(O&&ne){var re=p(O===!0?z.children:O.children,!0,b);b.flatten?y.push.apply(y,re):y.push({scope:z,candidates:re})}else a.unshift.apply(a,z.children)}}return y},ng=function(s,g){return s.tabIndex<0&&(g||/^(AUDIO|VIDEO|DETAILS)$/.test(s.tagName)||s.isContentEditable)&&isNaN(parseInt(s.getAttribute("tabindex"),10))?0:s.tabIndex},Uv=function(s,g){return s.tabIndex===g.tabIndex?s.documentOrder-g.documentOrder:s.tabIndex-g.tabIndex},sg=function(s){return s.tagName==="INPUT"},Gv=function(s){return sg(s)&&s.type==="hidden"},Hv=function(s){var g=s.tagName==="DETAILS"&&Array.prototype.slice.apply(s.children).some(function(b){return b.tagName==="SUMMARY"});return g},qv=function(s,g){for(var b=0;b<s.length;b++)if(s[b].checked&&s[b].form===g)return s[b]},Zv=function(s){if(!s.name)return!0;var g=s.form||pd(s),b=function(F){return g.querySelectorAll('input[type="radio"][name="'+F+'"]')},y;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")y=b(window.CSS.escape(s.name));else try{y=b(s.name)}catch(z){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",z.message),!1}var a=qv(y,s.form);return!a||a===s},Wv=function(s){return sg(s)&&s.type==="radio"},Xv=function(s){return Wv(s)&&!Zv(s)},Zm=function(s){var g=s.getBoundingClientRect(),b=g.width,y=g.height;return b===0&&y===0},Yv=function(s,g){var b=g.displayCheck,y=g.getShadowRoot;if(getComputedStyle(s).visibility==="hidden")return!0;var a=Ko.call(s,"details>summary:first-of-type"),z=a?s.parentElement:s;if(Ko.call(z,"details:not([open]) *"))return!0;var F=pd(s).host,V=F?.ownerDocument.contains(F)||s.ownerDocument.contains(s);if(!b||b==="full"){if(typeof y=="function"){for(var B=s;s;){var U=s.parentElement,O=pd(s);if(U&&!U.shadowRoot&&y(U)===!0)return Zm(s);s.assignedSlot?s=s.assignedSlot:!U&&O!==s.ownerDocument?s=O.host:s=U}s=B}if(V)return!s.getClientRects().length}else if(b==="non-zero-area")return Zm(s);return!1},Kv=function(s){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(s.tagName))for(var g=s.parentElement;g;){if(g.tagName==="FIELDSET"&&g.disabled){for(var b=0;b<g.children.length;b++){var y=g.children.item(b);if(y.tagName==="LEGEND")return Ko.call(g,"fieldset[disabled] *")?!0:!y.contains(s)}return!0}g=g.parentElement}return!1},Hu=function(s,g){return!(g.disabled||Gv(g)||Yv(g,s)||Hv(g)||Kv(g))},fd=function(s,g){return!(Xv(g)||ng(g)<0||!Hu(s,g))},Jv=function(s){var g=parseInt(s.getAttribute("tabindex"),10);return!!(isNaN(g)||g>=0)},Qv=function p(s){var g=[],b=[];
vendor: 4,924 bytes, line 728
728return s.forEach(function(y,a){var z=!!y.scope,F=z?y.scope:y,V=ng(F,z),B=z?p(y.candidates):F;V===0?z?g.push.apply(g,B):g.push(F):b.push({documentOrder:a,tabIndex:V,item:y,isScope:z,content:B})}),b.sort(Uv).reduce(function(y,a){return a.isScope?y.push.apply(y,a.content):y.push(a.content),y},[]).concat(g)},e0=function(s,g){g=g||{};var b;return g.getShadowRoot?b=rg([s],g.includeContainer,{filter:fd.bind(null,g),flatten:!1,getShadowRoot:g.getShadowRoot,shadowRootFilter:Jv}):b=ig(s,g.includeContainer,fd.bind(null,g)),Qv(b)},ag=function(s,g){g=g||{};var b;return g.getShadowRoot?b=rg([s],g.includeContainer,{filter:Hu.bind(null,g),flatten:!0,getShadowRoot:g.getShadowRoot}):b=ig(s,g.includeContainer,Hu.bind(null,g)),b},$u=function(s,g){if(g=g||{},!s)throw new Error("No node provided");return Ko.call(s,Gu)===!1?!1:fd(g,s)},t0=eg.concat("iframe").join(","),Uu=function(s,g){if(g=g||{},!s)throw new Error("No node provided");return Ko.call(s,t0)===!1?!1:Hu(g,s)};function Wm(p,s){var g=Object.keys(p);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(p);s&&(b=b.filter(function(y){return Object.getOwnPropertyDescriptor(p,y).enumerable})),g.push.apply(g,b)}return g}function Xm(p){for(var s=1;s<arguments.length;s++){var g=arguments[s]!=null?arguments[s]:{};s%2?Wm(Object(g),!0).forEach(function(b){i0(p,b,g[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(g)):Wm(Object(g)).forEach(function(b){Object.defineProperty(p,b,Object.getOwnPropertyDescriptor(g,b))})}return p}function i0(p,s,g){return s in p?Object.defineProperty(p,s,{value:g,enumerable:!0,configurable:!0,writable:!0}):p[s]=g,p}var Ym=function(){var p=[];return{activateTrap:function(g){if(p.length>0){var b=p[p.length-1];b!==g&&b.pause()}var y=p.indexOf(g);y===-1||p.splice(y,1),p.push(g)},deactivateTrap:function(g){var b=p.indexOf(g);b!==-1&&p.splice(b,1),p.length>0&&p[p.length-1].unpause()}}}(),r0=function(s){return s.tagName&&s.tagName.toLowerCase()==="input"&&typeof s.select=="function"},n0=function(s){return s.key==="Escape"||s.key==="Esc"||s.keyCode===27},s0=function(s){return s.key==="Tab"||s.keyCode===9},Km=function(s){return setTimeout(s,0)},Jm=function(s,g){var b=-1;return s.every(function(y,a){return g(y)?(b=a,!1):!0}),b},$c=function(s){for(var g=arguments.length,b=new Array(g>1?g-1:0),y=1;y<g;y++)b[y-1]=arguments[y];return typeof s=="function"?s.apply(void 0,b):s},Vu=function(s){return s.target.shadowRoot&&typeof s.composedPath=="function"?s.composedPath()[0]:s.target},a0=function(s,g){var b=g?.document||document,y=Xm({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},g),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},z,F=function(M,ze,Oe){return M&&M[ze]!==void 0?M[ze]:y[Oe||ze]},V=function(M){return a.containerGroups.findIndex(function(ze){var Oe=ze.container,qe=ze.tabbableNodes;return Oe.contains(M)||qe.find(function($e){return $e===M})})},B=function(M){var ze=y[M];if(typeof ze=="function"){for(var Oe=arguments.length,qe=new Array(Oe>1?Oe-1:0),$e=1;$e<Oe;$e++)qe[$e-1]=arguments[$e];ze=ze.apply(void 0,qe)}if(ze===!0&&(ze=void 0),!ze){if(ze===void 0||ze===!1)return ze;throw new Error("`".concat(M,"` was specified but was not a node, or did not return a node"))}var Qe=ze;if(typeof ze=="string"&&(Qe=b.querySelector(ze),!Qe))throw new Error("`".concat(M,"` as selector refers to no known node"));return Qe},U=function(){var M=B("initialFocus");if(M===!1)return!1;if(M===void 0)if(V(b.activeElement)>=0)M=b.activeElement;else{var ze=a.tabbableGroups[0],Oe=ze&&ze.firstTabbableNode;M=Oe||B("fallbackFocus")}if(!M)throw new Error("Your focus-trap needs to have at least one focusable element");return M},O=function(){if(a.containerGroups=a.containers.map(function(M){var ze=e0(M,y.tabbableOptions),Oe=ag(M,y.tabbableOptions);return{container:M,tabbableNodes:ze,focusableNodes:Oe,firstTabbableNode:ze.length>0?ze[0]:null,lastTabbableNode:ze.length>0?ze[ze.length-1]:null,nextTabbableNode:function($e){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Ne=Oe.findIndex(function(Je){return Je===$e});if(!(Ne<0))return Qe?Oe.slice(Ne+1).find(function(Je){return $u(Je,y.tabbableOptions)}):Oe.slice(0,Ne).reverse().find(function(Je){return $u(Je,y.tabbableOptions)})}}}),a.tabbableGroups=a.containerGroups.filter(function(M){return M.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!B("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},ne=function Le(M){if(M!==!1&&M!==b.activeElement){if(!M||!M.focus){Le(U());return}M.focus({preventScroll:!!y.preventScroll}),a.mostRecentlyFocusedNode=M,r0(M)&&M.select()}},re=function(M){var ze=B("setReturnFocus",M);return ze||(ze===!1?!1:M)},j=function(M){var ze=Vu(M);if(!(V(ze)>
728=0)){if($c(y.clickOutsideDeactivates,M)){z.deactivate({returnFocus:y.returnFocusOnDeactivate&&!Uu(ze,y.tabbableOptions)});return}$c(y.allowOutsideClick,M)||M.preventDefault()}},H=function(M){var ze=Vu(M),Oe=V(ze)>=0;Oe||ze instanceof Document?Oe&&(a.mostRecentlyFocusedNode=ze):(M.stopImmediatePropagation(),ne(a.mostRecentlyFocusedNode||U()))},ae=function(M){var ze=Vu(M);O();var Oe=null;if(a.tabbableGroups.length>0){var qe=V(ze),$e=qe>=0?a.containerGroups[qe]:void 0;if(qe<0)M.shiftKey?Oe=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:Oe=a.tabbableGroups[0].firstTabbableNode;else if(M.shiftKey){var Qe=Jm(a.tabbableGroups,function(He){var Xe=He.firstTabbableNode;return ze===Xe});if(Qe<0&&($e.container===ze||Uu(ze,y.tabbableOptions)&&!$u(ze,y.tabbableOptions)&&!$e.nextTabbableNode(ze,!1))&&(Qe=qe),Qe>=0){var Ne=Qe===0?a.tabbableGroups.length-1:Qe-1,Je=a.tabbableGroups[Ne];Oe=Je.lastTabbableNode}}else{var Ye=Jm(a.tabbableGroups,function(He){var Xe=He.lastTabbableNode;return ze===Xe});if(Ye<0&&($e.container===ze||Uu(ze,y.tabbableOptions)&&!$u(ze,y.tabbableOptions)&&!$e.nextTabbableNode(ze))&&(Ye=qe),Ye>=0){var bt=Ye===a.tabbableGroups.length-1?0:Ye+1,_t=a.tabbableGroups[bt];Oe=_t.firstTabbableNode}}}else Oe=B("fallbackFocus");Oe&&(M.preventDefault(),ne(Oe))},ge=function(M){if(n0(M)&&$c(y.escapeDeactivates,M)!==!1){M.preventDefault(),z.deactivate();return}if(s0(M)){ae(M);return}},ce=function(M){var ze=Vu(M);V(ze)>=0||$c(y.clickOutsideDeactivates,M)||$c(y.allowOutsideClick,M)||(M.preventDefault(),M.stopImmediatePropagation())},le=function(){if(a.active)return Ym.activateTrap(z),a.delayInitialFocusTimer=y.delayInitialFocus?Km(function(){ne(U())}):ne(U()),b.addEventListener("focusin",H,!0),b.addEventListener("mousedown",j,{capture:!0,passive:!1}),b.addEventListener("touchstart",j,{capture:!0,passive:!1}),b.addEventListener("click",ce,{capture:!0,passive:!1}),b.addEventListener("keydown",ge,{capture:!0,passive:!1}),z},we=function(){if(a.active)return b.removeEventListener("focusin",H,!0),b.removeEventListener("mousedown",j,!0),b.removeEventListener("touchstart",j,!0),b.removeEventListener("click",ce,!0),b.removeEventListener("keydown",ge,!0),z};return z={get active(){return a.active},get paused(){return a.paused},activate:function(M){if(a.active)return this;var ze=F(M,"onActivate"),Oe=F(M,"onPostActivate"),qe=F(M,"checkCanFocusTrap");qe||O(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=b.activeElement,ze&&ze();var $e=function(){qe&&O(),le(),Oe&&Oe()};return qe?(qe(a.containers.concat()).then($e,$e),this):($e(),this)},deactivate:function(M){if(!a.active)return this;var ze=Xm({onDeactivate:y.onDeactivate,onPostDeactivate:y.onPostDeactivate,checkCanReturnFocus:y.checkCanReturnFocus},M);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,we(),a.active=!1,a.paused=!1,Ym.deactivateTrap(z);var Oe=F(ze,"onDeactivate"),qe=F(ze,"onPostDeactivate"),$e=F(ze,"checkCanReturnFocus"),Qe=F(ze,"returnFocus","returnFocusOnDeactivate");Oe&&Oe();var Ne=function(){Km(function(){Qe&&ne(re(a.nodeFocusedBeforeActivation)),qe&&qe()})};return Qe&&$e?($e(re(a.nodeFocusedBeforeActivation)).then(Ne,Ne),this):(Ne(),this)},pause:function(){return a.paused||!a.active?this:(a.paused=!0,we(),this)},unpause:function(){return!a.paused||!a.active?this:(a.paused=!1,O(),le(),this)},updateContainerElements:function(M){var ze=[].concat(M).filter(Boolean);return a.containers=ze.map(function(Oe){return typeof Oe=="string"?b.querySelector(Oe):Oe}),a.active&&O(),this}},z.updateContainerElements(s),z};function o0(p){let s,g;window.addEventListener("focusin",()=>{s=g,g=document.activeElement}),p.magic("focus",b=>{let y=b;return{__noscroll:!1,__wrapAround:!1,within(a){return y=a,this},withoutScrolling(){return this.__noscroll=!0,this},noscroll(){return this.__noscroll=!0,this},withWrapAround(){return this.__wrapAround=!0,this},wrap(){return this.withWrapAround()},focusable(a){return Uu(a)},previouslyFocused(){return s},lastFocused(){return s},focused(){return g},focusables(){return Array.isArray(y)?y:ag(y,{displayCheck:"none"})},all(){return this.focusables()},isFirst(a){let z=this.all();return z[0]&&z[0].isSameNode(a)},isLast(a){let z=this.all();return z.length&&z.slice(-1)[0].isSameNode(a)},getFirst(){return this.all()[0]},getLast(){return this.all().slice(-1)[0]},getNext(){let a=this.all(),z=document.activeElement;if(a.indexOf(z)!==-1)return this.__wrapAround&&a.indexOf(z)===a.length-1?a[0]:a[a.indexOf(z)+1]},getPrevious(){let a=this.all(),z=document.activeElement;if(a.indexOf(z)!==-1)return this.__wrapAround&&a.indexOf(z)===0?a.slice(-1)[0]:a[a.indexOf(z)-1]},first(){this.focus(this.getFirst())},last(){this.focus(this.getLast())},next(){this.focus(this.getNext())},previous(){this.focus(this.getPrevious())},prev(){return this.previous()},focus(a){a&&setTimeout(()=>{a.hasAttribute("tabindex")||a.setAttribute("tabindex","0"),a.focus({preventScroll:this.__noscroll})})}}}),p.directive("trap",p.skipDuringClone((b,{expression:y,modifiers:a},{effect:z,evaluateLater:F,cleanup:V})=>{let B=F(y),U=!1,O={escapeDeactivates:!1,allowOutsideClick:!0,fallbackFocus:()=>b};if(a.includes("noautofocus"))O.initialFocus=!1;else{let ae=b.querySelector("[autofocus]");ae&&(O.initialFocus=ae)}let ne=a0(b,O),re=()=>{},j=()=>{},H=()=>{re(),re=()=>{},j(),j=()=>{},ne.deactivate({returnFocus:!a.includes("noreturn")})};z(()=>B(ae=>{U!==ae&&(ae&&!U&&(a.includes("noscroll")&&(j=l0()),a.includes("inert")&&(re=Qm(b)),setTimeout(()=>{ne.activate()},15)),!ae&&U&&H(),U=!!ae)})),V(H)},(b,{expression:y,modifiers:a},{evaluate:z})=>{a.includes("inert")&&z(y)&&Qm(b)}))}function Qm(p){let s=[];return og(p,g=>{let b=g.hasAttribute("aria-hidden");g.setAttribute("aria-hidden","true"),s.push(()=>b||g.removeAttribute("aria-hidden"))}),()=>{for(;s.length;)s.pop()()}}function og(p,s){p.isSameNode(document.body)||!p.parentNode||Array.from(p.parentNode.children).forEac
728h(g=>{g.isSameNode(p)?og(p.parentNode,s):s(g)})}function l0(){let p=document.documentElement.style.overflow,s=document.documentElement.style.paddingRight,g=window.innerWidth-document.documentElement.clientWidth;return document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=`${g}px`,()=>{document.documentElement.style.overflow=p,document.documentElement.style.paddingRight=s}}var lg=o0;function c0(p){p.directive("intersect",p.skipDuringClone((s,{value:g,expression:b,modifiers:y},{evaluateLater:a,cleanup:z})=>{let F=a(b),V={rootMargin:d0(y),threshold:u0(y)},B=new IntersectionObserver(U=>{U.forEach(O=>{O.isIntersecting!==(g==="leave")&&(F(),y.includes("once")&&B.disconnect())})},V);B.observe(s),z(()=>{B.disconnect()})}))}function u0(p){if(p.includes("full"))return .99;if(p.includes("half"))return .5;if(!p.includes("threshold"))return 0;let s=p[p.indexOf("threshold")+1];return s==="100"?1:s==="0"?0:+`.${s}`}function h0(p){let s=p.match(/^(-?[0-9]+)(px|%)?$/);return s?s[1]+(s[2]||"px"):void 0}function d0(p){let s="margin",g="0px 0px 0px 0px",b=p.indexOf(s);if(b===-1)return g;let y=[];for(let a=1;a<5;a++)y.push(h0(p[b+a]||""));return y=y.filter(a=>a!==void 0),y.length?y.join(" ").trim():g}var cg=c0;function p0(p){let s=()=>{let g,b;try{b=localStorage}catch(y){console.error(y),console.warn("Alpine: $persist is using temporary storage since localStorage is unavailable.");let a=new Map;b={getItem:a.get.bind(a),setItem:a.set.bind(a)}}return p.interceptor((y,a,z,F,V)=>{let B=g||`_x_${F}`,U=ug(B,b)?hg(B,b):y;return z(U),p.effect(()=>{let O=a();dg(B,O,b),z(O)}),U},y=>{y.as=a=>(g=a,y),y.using=a=>(b=a,y)})};Object.defineProperty(p,"$persist",{get:()=>s()}),p.magic("persist",s),p.persist=(g,{get:b,set:y},a=localStorage)=>{let z=ug(g,a)?hg(g,a):b();y(z),p.effect(()=>{let F=b();dg(g,F,a),y(F)})}}function ug(p,s){return s.getItem(p)!==null}function hg(p,s){let g=s.getItem(p,s);if(g!==void 0)return JSON.parse(g)}function dg(p,s,g){g.setItem(p,JSON.stringify(s))}var pg=p0;function f0(p){p.directive("collapse",s),s.inline=(g,{modifiers:b})=>{b.includes("min")&&(g._x_doShow=()=>{},g._x_doHide=()=>{})};function s(g,{modifiers:b}){let y=fg(b,"duration",250)/1e3,a=fg(b,"min",0),z=!b.includes("min");g._x_isShown||(g.style.height=`${a}px`),!g._x_isShown&&z&&(g.hidden=!0),g._x_isShown||(g.style.overflow="hidden");let F=(B,U)=>{let O=p.setStyles(B,U);return U.height?()=>{}:O},V={transitionProperty:"height",transitionDuration:`${y}s`,transitionTimingFunction:"cubic-bezier(0.4, 0.0, 0.2, 1)"};g._x_transition={in(B=()=>{},U=()=>{}){z&&(g.hidden=!1),z&&(g.style.display=null);let O=g.getBoundingClientRect().height;g.style.height="auto";let ne=g.getBoundingClientRect().height;O===ne&&(O=a),p.transition(g,p.setStyles,{during:V,start:{height:O+"px"},end:{height:ne+"px"}},()=>g._x_isShown=!0,()=>{Math.abs(g.getBoundingClientRect().height-ne)<1&&(g.style.overflow=null)})},out(B=()=>{},U=()=>{}){let O=g.getBoundingClientRect().height;p.transition(g,F,{during:V,start:{height:O+"px"},end:{height:a+"px"}},()=>g.style.overflow="hidden",()=>{g._x_isShown=!1,g.style.height==`${a}px`&&z&&(g.style.display="none",g.hidden=!0)})}}}}function fg(p,s,g){if(p.indexOf(s)===-1)return g;let b=p[p.indexOf(s)+1];if(!b)return g;if(s==="duration"){let y=b.match(/([0-9]+)ms/);if(y)return y[1]}if(s==="min"){let y=b.match(/([0-9]+)px/);if(y)return y[1]}return b}var mg=f0;var gg=async p=>await Li(Fm,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({recipeIdentifier:p})}),yg=async p=>await Li(Om,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({recipeIdentifier:p})}),_g=async()=>await Li(Nm,{method:"POST",headers:{"Content-Type":"application/json"}});var vg=()=>({scrollPosition:0,updateCounter:0,timeRemaining:"",intervalId:null,countdownMsg:"",init(){this.updateFavouriteRecipeStore(),this.setAnchorTop(),this.checkTimeRemaining(),this.intervalId=setInterval(()=>{this.checkTimeRemaining()},1e3)},handleWindowScroll(){let p=this.$refs.header,s=p.querySelector(".shop-header__open-changes"),g=p.querySelector(".shop-header__primary"),b=p.querySelector(".shop-header__secondary"),y=p.querySelector(".mini-basket");if(!g)return;let a=document.body,z=a.querySelector(".main-menu__wrapper");if(z?z.classList.contains("main-menu__wrapper--mobile-menu-visible"):!1)return;let V=a.querySelector(".product-list-page__navigation-wrapper.product-list-page__navigation-wrapper--product-list-page"),B=a.querySelector(".product-info__menu-wrapper"),U=a.querySelector(".my-account__sidebar"),O=a.querySelector(".search-bar"),ne=O?O.querySelector("input[type=search]"):null,re=g.clientHeight,j=b?b.clientHeight:0,H=z?z.clientHeight:0,ae=s?s.clientHeight:0;this.isScrollingUp()&&window.scrollY>j?(p.classList.contains("shop-header--sticky")||p.classList.add("shop-header--sticky"),p.style.top=`${-j-ae}px`,z&&(z.style.top=`${re-1}px`),V&&(V.style.top=`${H+re-1}px`),B&&(B.style.top=`${H+re-1}px`),U&&(U.style.top=`${H+re-1}px`)):(window.scrollY>p.clientHeight?(p.style.top=`${-p.clientHeight}px`,O&&ne&&(Nc(!1),ne.blur())):(p.classList.remove("shop-header--sticky"),p.style.top="0",y&&(y.style.top="0")),z&&(z.style.top="0"),V&&(V.style.top=`${H}px`),B&&(B.style.top=`${H}px`),U&&(U.style.top=`${H}px`)),this.updateCounter++,this.updateCounter>
72840&&(this.updateScrollPosition(),this.updateCounter=0)},updateScrollPosition(){this.scrollPosition=window.scrollY},isScrollingUp(){return this.scrollPosition>window.scrollY},async updateFavouriteRecipeStore(){if(!mn().isSignedIn)return;let p=Fa();if(p.favouriteRecipeIdentifiers===null||Date.now()-p.lastTimeUpdatedFromDb>18e5){let s=await _g();if(s.error){console.warn("Error fetching recipe favourites count",s.error);return}p.favouriteRecipeIdentifiers=s.data,p.lastTimeUpdatedFromDb=Date.now()}},closeMenu(p){},setAnchorTop(){let p=document.body,s=p.querySelectorAll(".anchor");if(s.length>0){let b=this.$refs.header.querySelector(".shop-header__primary"),y=p.querySelector(".main-menu__wrapper"),a=b.clientHeight,z=y?y.clientHeight:0;s.forEach(F=>F.style.top=`-${z+a-1}px`)}},checkTimeRemaining(){let p=new Date,s=this.$store.deliveryDates.currentDeliveryTour?.lastOrderChange;if(!s){this.timeRemaining="";return}let g=new Date(s),b=Mf(g,p);if(b<=120&&b>0){let y=Math.floor(b/60),a=b%60;y===0?(this.timeRemaining=a.toString(),this.countdownMsg=Si("Oekokiste.Core:Header:last-order-change-countdown.message.m",{timeRemaining:this.timeRemaining})):(this.timeRemaining=`${y.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`,this.countdownMsg=Si("Oekokiste.Core:Header:last-order-change-countdown.message.h",{timeRemaining:this.timeRemaining}))}},getDisplayText(){if(this.timeRemaining)return this.countdownMsg;let p=this.$store.deliveryDates.currentDeliveryTour?.date;return p?this.$getDateFormatted(p,"short"):""},destroy(){this.intervalId&&clearInterval(this.intervalId)}});var bg=()=>({init(){if(this.$watch("$store.mobileMenuOpen",()=>{this._setMenuHeight()}),window.isPwa){let p=document.querySelector(".pwa-search .search-bar__button--submit");p&&p.addEventListener("click",()=>{xt.store("mobileMenuOpen",!1)})}},toggleMobileMenuThroughEvent(){xt.store("mobileMenuOpen",!xt.store("mobileMenuOpen")),this._setMenuHeight()},_setMenuHeight(){let p=window.innerHeight-this.getHeightForMobileMenu();this.$refs.mainMenu.style.height=xt.store("mobileMenuOpen")?`${p}px`:"0px"},backToLevel1(p){p.preventDefault(),p.target?.closest("ul")?.classList.toggle("main-menu__items--mobile-visible")},openSecondLevel(p){p.preventDefault();let s=p.target;this._openSecondLevelForMenuElement(s)},getHeightForMobileMenu(){let p=document.querySelector("header.shop-header");return p?p.clientHeight:0},_openSecondLevelForMenuElement(p){p.closest("li")?.querySelector("ul")?.classList.toggle("main-menu__items--mobile-visible")},closeMenu(p){p.target&&p.target.classList.contains("main-menu__item")&&xt.store("mobileMenuOpen",!1)}});var xg=(p="",s="",g=!1)=>({visibleGroup:"",activeFilter:[],filtersAndSortingAreVisibleOnMobile:!1,_itemsAsGoogleEcommerceList:[],init(){if(g){let b=null;try{b=JSON.parse(s)}catch(y){console.warn(y)}b?(ld([...b],p),window.addEventListener("DOMContentLoaded",()=>{this._itemsAsGoogleEcommerceList=[...b]})):ld([],p)}this._changeSorting(this.$store.productListPage.sorting),this.$watch("visibleGroup",()=>{this._scrollVisibleGroupIntoView()})},changeSorting(b){let y=b.target,a=y?.selectedOptions[0].dataset,z={value:y?.value,sortby:a.sortby,direction:a.direction};this.$store.productListPage.sorting=z,this._changeSorting(z)},changeFilter(){if(this.$refs.filters===void 0)return;let b=this.$refs.filters.querySelectorAll(".checkbox input");this.activeFilter=Array.from(b).filter(y=>y.checked).map(y=>y.value)},isFilteredOut(b){if(this.showNoProductsFoundHint(),this.activeFilter.length===0)return!1;let y=JSON.parse(b);return!this.activeFilter.every(a=>y[a])},showNoProductsFoundHint(){if(this.$refs.productListPage===void 0)return;let b=this.$refs.productListPage.querySelectorAll(".product-list-page__subgroup");xt.nextTick(()=>{b.forEach(y=>{let a=y.querySelector(".product-list__no-products-found");if(!a)return;y.querySelectorAll(".product-list-tile:not(.product-list-product--hidden)").length===0?a.classList.add("product-list__no-products-found--visible"):a.classList.remove("product-list__no-products-found--visible")})})},getClassForNavigation(){let b=this.$refs.productListPageNavigation,y=b.offsetWidth,a=0;return b.querySelectorAll(".button").forEach(z=>{a+=z.offsetWidth+20}),a<=y?"":"custom-scrollbar"},_scrollVisibleGroupIntoView(){let b=this.$refs.productListPageNavigation;if(!b)return;let y=b.querySelector(".button[data-group='"+this.visibleGroup+"']");if(y!==null){let a=y.offsetLeft,z=y.offsetWidth,F=b.offsetWidth;b.scrollTo({top:0,left:a-F/2+z/2,behavior:"smooth"})}},_changeSorting(b){this.$refs.filters!==void 0&&b?.value!==""&&this.$refs.productListPage!==void 0&&this.$refs.productListPage.querySelectorAll(".product-list").forEach(y=>{this._sortProductsInProductList(y,b)})},_sortProductsInProductList(b,y){let a=V=>JSON.parse(V.dataset.sortingOptions)[y.sortby],z=b.querySelectorAll(".product-list-tile");Array.from(z).sort((V,B)=>{let U=a(V),O=a(B);return typeof U=="string"&&typeof O=="string"?y.direction==="asc"?U.localeCompare(O):O.localeCompare(U):y.direction==="asc"?U-O:O-U}
728).forEach(V=>{b.appendChild(V)})},trackSingleProductClick(b){let y=this._itemsAsGoogleEcommerceList.filter(a=>a.item_id===b);lm(y)}});var wg=(p,s,g,b=!1,y="")=>({async init(){let a=this.$el.querySelector(".add-to-basket--ecobox-variant");if(a&&em(a),b){let z=null;try{z=JSON.parse(y)}catch(F){console.warn(F)}z?cd(parseFloat(g),[z],{id:p,name:s,category:"Regional"}):cd(parseFloat(g),[],{id:p,name:s,category:"Regional"})}}});var Sg=()=>({alternatives:[],allRecipes:[],shownRecipesCount:0,recipes:[],recipesAmountToShow:3,alternativesButtonLabel:Si("Oekokiste.Core:Basket:recommendation-buttons.button.swap-articles.label"),alternativesLoading:!1,alternativesOpen:!1,recipesButtonLabel:Si("Oekokiste.Core:Basket:show-recipes.button"),recipesOpen:!1,recipesLoading:!1,async showAlternativeProducts(p,s){this.alternativesLoading=!0,this.recipesOpen=!1,this.alternatives=[],um(p);let g=Oc().products.map(y=>y.id),b=await Li(Im,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productId:p.id,price:Nl(p),productIdsInBasket:g.filter(y=>y!==p.id)})});if(b.error){this.alternatives=[],this.alternativesLoading=!1,this.alternativesButtonLabel=on(b.error);return}if(b.data===null||b.data.length===0){this.alternatives=[],this.alternativesLoading=!1,this.alternativesButtonLabel=Si("Oekokiste.Core:Basket:alternatives.noneFound");return}this.alternativesLoading=!1,this.alternativesOpen=!0,this.alternatives=b.data,this.alternativesButtonLabel=Si("Oekokiste.Core:Basket:alternatives.showMore"),this.$nextTick(()=>{let F=s.target.closest(".recommendations")?.querySelector(".recommendations__content")?.querySelectorAll("a");F&&F.length>0&&F[0].focus()})},hideRecommendations(p){if(this.alternatives=[],this.alternativesOpen=!1,this.alternativesButtonLabel=Si("Oekokiste.Core:Basket:recommendation-buttons.button.swap-articles.label"),this.recipes=[],this.recipesOpen=!1,this.recipesButtonLabel=Si("Oekokiste.Core:Basket:recipe-suggestions.button.see-recipe"),!p)return;let s=p.target,b=s.closest(".mini-basket__item")?.querySelector(".mini-basket__item-title");this.$nextTick(()=>{s&&b.focus()})},getRecommendationsClass(p,s,g){let b="recommendations__actions--single",y="recommendations__actions--multiple",a="recommendations__actions--none";return this.alternativesOpen||this.recipesOpen?y:g?Bu(p)?s?b:a:s?y:b:s?b:a},swap(p,s){p.amount=0,s=pm(p,s),ud(p,Bl(),mn()),ud(s,Bl(),mn()),jf("swapped article in basket for alternative",{removedArticle:p,newArticle:s}),hm(s),this.hideRecommendations()},async showRecipeSuggestions(p,s){if(this.recipesLoading=!0,this.alternativesOpen=!1,this.recipes=[],dm(p),this.allRecipes.length>0){if(this.shownRecipesCount+this.recipesAmountToShow>this.allRecipes.length){let b=this.allRecipes.length-this.shownRecipesCount,y=this.allRecipes.slice(this.shownRecipesCount),a=this.allRecipes.slice(0,this.recipesAmountToShow-b);this.recipes=[...y,...a],this.shownRecipesCount=this.recipesAmountToShow-b}else this.recipes=this.allRecipes.slice(this.shownRecipesCount,this.shownRecipesCount+this.recipesAmountToShow),this.shownRecipesCount+=this.recipesAmountToShow;this.recipesLoading=!1,this.recipesOpen=!0;return}let g=await Li(Nu+"?productId="+p.id,{headers:{"Content-Type":"application/json"}});if(g.error){this.recipesLoading=!1,this.recipesButtonLabel=on(g.error);return}if(g.data===null||g.data.length===0){this.recipesLoading=!1,this.recipesButtonLabel=Si("Oekokiste.Core:Basket:recipe-suggestions.noneFound");return}this.allRecipes=g.data,this.recipes=this.allRecipes.slice(0,this.recipesAmountToShow),this.shownRecipesCount=this.recipesAmountToShow,this.recipesLoading=!1,this.recipesOpen=!0,this.recipesButtonLabel=Si("Oekokiste.Core:Basket:recipe-suggestions.showMore"),this.$nextTick(()=>{let z=s.target.closest(".recommendations")?.querySelector(".recommendations__content")?.querySelectorAll("a");z&&z.length>0&&z[0].focus()})}});var Tg=(p,s)=>({recipesLoading:!0,noRecipesFoundLabel:"",allRecipes:[],recipes:[],recipesAmountToShow:6,errorMessage:"",async init(){if(s!==null){this.allRecipes=s,s.length===0&&(this.noRecipesFoundLabel=Si("Oekokiste.Core:ProductPage:sections.recipes.noneFound")),this.recipes=this.allRecipes.slice(0,this.recipesAmountToShow),this.recipesLoading=!1;return}let g=await Li(Nu+"?productId="+p,{headers:{"Content-Type":"application/json"}});if(g.error){this.recipesLoading=!1,this.errorMessage=on(g.error);return}if(g.data===null||g.data.length===0){this.recipesLoading=!1,this.noRecipesFoundLabel=Si("Oekokiste.Core:ProductPage:sections.recipes.noneFound");return}this.allRecipes=g.data,this.recipes=this.allRecipes.slice(0,this.recipesAmountToShow),this.recipesLoading=!1,this.errorMessage=""}});var m0=3,g0=/^\d{5}$/,y0=1e3,Pg=p=>({mode:p,_requestSequence:0,_reopenPanelOnInputFocus:!0,isOpen:!1,isLoading:!1,hasError:!1,showNoResultsHint:!1,suggestions:[],autofilledCity:"",async search(s,g=!1){let b=s.target.value.trim();if(b.length<m0){this._reset();return}g||this._requestSequence++;let y=this._requestSequence;this.showNoResultsHint=!1,this.autofilledCity="",this.isLoading=!0;let a=this.mode==="zip"?Dm:km,z=await Li(`${a}?term=${encodeURIComponent(b)}`);if(this._requestSequence===y){if(z.error||z.data===null){if(!g){await new Promise(F=>setTimeout(F,y0)),await this.search(s,!0);return}this.isLoading=!1,this.hasError=!0,this.suggestions=[],this.isOpen=!1;return}if(this.isLoading=!1,this.hasError=!1,this.suggestions=z.data,this.mode==="zip"&&g0.test(b)&&z.data.length===1){let[F]=z.data;this.suggestions=[],this.isOpen=!1,this.autofilledCity=F.city,this.$dispatch("address-picked",{...F,silent:!0});return}if(z.data.length===0){this.showNoResultsHint=this.mode==="zip",this.isOpen=this.mode==="zip";return}this.showNoResultsHint=!1,this.isOpen=!0}},pick(s){this.$dispatch("address-picked",{...s,silent:!1}),this.suggestions=[],this.showNoResultsHint=!1,this.autofilledCity="",this._closeAndReturnFocusToInput()},closePanel(){this.isOpen=!1},handleInputFocus(){!this._reopenPanelOnInputFocus||this.suggestions.length===0||(this.isOpen=!0)},handleInputKeydown(s){if(s.key==="Escape"){s.preventDefault(),this._closeAndReturnFocusToInput();return}if(s.key==="Enter"&&this.isOpen&&this.suggestions.length>0){this._focusFirstSuggestion()&&s.preventDefault();return}if(s.key==="ArrowDown"){if(this.suggestions.length>0&&!this.isOpen){s.preventDefault(),this.isOpen=!0;return}this._focusFirstSuggestion()&&s.preventDefault()}},handleResultsKeydown(s){if(s.key==="Escape"){s.preventDefault(),this._closeAndReturnFocusToInput();return}if(s.key!=="ArrowDown"&&s.key!=="ArrowUp")return;let g=this._visibleSuggestionItems(),b=g.indexOf(document.activeElement);if(b===-1)return;if(s.preventDefault(),s.key==="ArrowUp"&&b===0){this.$refs.addressCompletionInput.focus();return}let y=s.key==="ArrowDown"?Math.min(b+1,g.length-1):b-1;g[y].focus()},handleResultsMouseDown(s){s.preventDefault()},handleFocusOut(){setTimeout(()=>{let s=document.activeElement;(!s||!this.$el.contains(s))&&this.closePanel()},0)},_reset(){this.suggestions=[],this.isOpen=!1,this.isLoading=!1,this.hasError=!1,this.showNoResultsHint=!1,this.autofilledCity="",this._requestSequence++},_closeAndReturnFocusToInput(){this._reopenPanelOnInputFocus=!1,this.closePanel(),this.$refs.addressCompletionInput?.focus(),setTimeout(()=>{this._reopenPanelOnInputFocus=!0},0)},_focusFirstSuggestion(){let[s]=this._visibleSuggestionItems();return s?(s.focus(),!0):!1},_visibleSuggestionItems(){let s=this.$refs.addressCompletionPanel;return s?Array.from(s.querySelectorAll("[data-address-suggestion]")).filter(g=>g.offsetParent!==null):[]}});var Eg=()=>({_searchSequence:0,isLoading:!1,showNoResultsHint:!1,hasError:!1,searchTerm:"",results:{products:[],ecoBoxes:[],recipes:[],neosContent:[],profileFunctions:[]},amountOfSearchResults:0,allResultsAreVisible:{products:!1,ecoBoxes:!1,recipes:!1,neosContent:!1,profileFunctions:!1},_reopenPanelOnInputFocus:!0,init(){this.$watch(`$store.${jc}`,async p=>{p&&window.isPwa&&this._focusSearchInput()}),this.$watch("$store.showSearchResults",p=>{let s=this.$refs.searchBarInput;p&&s.value.length>0&&as().reactivateSearchSession(),!p&&s.value.length>0&&as().endSearchSessionAndSendData()})},_focusSearchInput(){let p=this.$refs.searchBarInput;!p||p.offsetParent===null||p.focus()},async triggerSearch(p,s=!1){if(p.preventDefault(),p.stopPropagation(),this.searchTerm.length===0){this.amountOfSearchResults=0,this._clearSearchResults(),window.location.href.includes("term")||as().endSearchSessionAndSendData();return}s||this._searchSequence++;let g=this._searchSequence;this.showNoResultsHint=!1,this.isLoading=!0;let b={headers:{Locale:$f()}},y=await fetch(Am+`?param=${this.searchTerm}`,b);if(this._searchSequence!==g)return;if(!y.ok){if(!s){await new Promise(V=>setTimeout(V,1e3)),await this.triggerSearch(p,!0);return}this.hasError=!0,this.isLoading=!1,this._clearSearchResults();return}this._clearSearchResults(),as().startNewSearchSession();let a=await y.json();this.amountOfSearchResults=a.productResults.length+a.ecoBoxResults.length+a.recipeResults.length+a.neosDocumentResults.length+a.profileFunctionResults.length;let z=[...a.productResults];window.featureFlags.vectorSearchEnabled!==!0&&(z=z.sort((V,B)=>V.fullTextMatchCount!==B.fullTextMatchCount?(B.fullTextMatchCount??0)-(V.fullTextMatchCount??0):parseInt(V.identifier)-parseInt(B.identifier)));let F=a.neosDocumentResults.map(V=>({...V,url:V.url+"#highlight="+this.searchTerm.replace(" ","+")}));this.results={products:z,ecoBoxes:a.ecoBoxResults,recipes:a.recipeResults,neosContent:F,profileFunctions:a.profileFunctionResults},cm(this.searchTerm,this.results),this.allResultsAreVisible={products:z.length<4,ecoBoxes:a.ecoBoxResults.length<4,recipes:a.recipeResults.length<4,neosContent:F.length<4,profileFunctions:a.profileFunctionResults.length<4},this.isLoading=!1,this.hasError=!1,this.amountOfSearchResults===0&&(this.showNoResultsHint=!0)},toggleAllSearchResultsForCategory(p){this.allResultsAreVisible={...this.allResultsAreVisible,[p]:!this.allResultsAreVisible[p]}},clearSearch(p){p.stopPropagation(),p.preventDefault(),this.searchTerm="",this.amountOfSearchResults=0,this._clearSearchResults(),this.closeSearchResults(),as().endSearchSessionAndSendData()},closeSearchResults(){xt.store("showSearchResults",!1)},_clearSearchResults(){this.results={products:[],ecoBoxes:[],recipes:[],neosContent:[],profileFunctions:[]}},handleClickResult(p,s){p.stopPropagation(),p.preventDefault()},handleSearchInputClick(p){window.isPwa||p.target instanceof HTMLInputElement&&Ff()&&xt.store(jc,!1)},handleSearchInputFocus(){this._reopenPanelOnInputFocus&&Nc(!0)},handleSearchInputKeydown(p){if(p.key==="Escape"){p.preventDefault(),this._closeAndReturnFocusToInput();return}if(p.key!=="ArrowDown")return;if(this.searchTerm.length>0&&!Bf()){p.preventDefault(),Nc(!0);return}let[s]=this._visibleResultItems();s&&(p.preventDefault(),s.focus())},handleResultsKeydown(p){if(p.key==="Escape"){p.preventDefault(),this._closeAndReturnFocusToInput();return}if(p.key!=="ArrowDown"&&p.key!=="ArrowUp")return;let s=this._visibleResultItems(),g=s.indexOf(document.activeElement);if(g===-1)return;if(p.preventDefault(),p.key==="ArrowUp"&&g===0){this.$refs.searchBarInput.focus();return}let b=p.key==="ArrowDown"?Math.min(g+1,s.length-1):g-1;s[b].focus()},handleResultsMouseDown(p){p.target.closest("input, textarea, select")||p.preventDefault()},handleFocusOut(){setTimeout(()=>{document.activeElement?.closest(".search-bar")||this.closeSearchResults()},0)},_closeAndReturnFocusToInput(){this._reopenPanelOnInputFocus=!1,this.closeSearchResults(),this.$refs.searchBarInput.focus(),setTimeout(()=>{this._reopenPanelOnInputFocus=!0},0)},_visibleResultItems(){let p=this.$refs.searchResults;return p?Array.from(p.querySelectorAll("[data-search-result-item]")).filter(s=>s.offsetParent!==null):[]}});var md="button--is-visible",_0="button--is-sticky",Mg=()=>({init(){if(!this.$refs.buttonToTop)return;let s=document.querySelector(".add-to-basket--product, .add-to-basket--ecobox-variant");s&&new ResizeObserver(()=>this.setPositionWhenFooterIsVisible()).observe(s)},handleScrollToTop(){let p=document.querySelector(".button.shop-menu__item--basket");window.scrollTo({top:0,behavior:"smooth"}),this.$nextTick(()=>{p&&p.focus()})},handleWindowScroll(){this.setVisibility(),this.setPositionWhenFooterIsVisible()},handleWindowResize(){this.setVisibility(),this.setPositionWhenFooterIsVisible()},setVisibility(){let p=this.$refs.buttonToTop;p&&(window.scrollY>window.innerHeight?p.classList.contains(md)||p.classList.add(md):p.classList.remove(md))},setPositionWhenFooterIsVisible(){let p=this.$refs.buttonToTop,s=document.querySelector(".footer");if(!p)return;let g=document.querySelector(".bottom-navigation"),b=window.matchMedia("(max-width: 768px)").matches,y=window.matchMedia("(display-mode: standalone)").matches,a=g?g.offsetHeight:0,z=document.querySelector(".add-to-basket--sticky-bottom"),F=b&&z?z.offsetHeight:0,V=!y&&s?Math.max(0,window.innerHeight-s.getBoundingClientRect().top):0;p.classList.toggle(_0,V>0),p.style.bottom=`${Math.max(V,a+F)+10}px`}});var Cg=async p=>await Li(wm,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productId:p})}),Ig=async p=>await Li(Sm,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productId:p})});var Ag=p=>({isToggled:!1,productInformation:p,init(){this.restoreStateFromStore(),this.$watch("$store.wishlist.favourites",()=>this.restoreStateFromStore())},async toggle(s){if(s.preventDefault(),s.stopPropagation(),!mn().isSignedIn){window.location.href=jl()+"?referer="+window.location.pathname+window.location.search;return}this.isToggled=!this.isToggled;let b=s.target.closest(".product-list-product"),y=Fa();this.isToggled?(await Cg(this.productInformation.id),y.favourites.push(this.productInformation),b?.classList.remove("product-list-product--un-favourite")):(await Ig(this.productInformation.id),y.favourites=y.favourites.filter(a=>a.id!==this.productInformation.id),b?.classList.add("product-list-product--un-favourite"))},restoreStateFromStore(){let s=Fa().favourites;if(s===null)return;if(s.length===0){let b=window.localStorage.getItem("wishlist_favourites")??"[]";s=JSON.parse(b)}let g=s.find(b=>b.id===this.productInformation.id);this.isToggled=!!g}});function Dg(p){return p!==null&&typeof p=="object"&&"constructor"in p&&p.constructor===Object}function gd(p,s){p===void 0&&(p={}),s===void 0&&(s={});let g=["__proto__","constructor","prototype"];Object.keys(s).filter(b=>
vendor: 7,413 bytes, line 728
728g.indexOf(b)<0).forEach(b=>{typeof p[b]>"u"?p[b]=s[b]:Dg(s[b])&&Dg(p[b])&&Object.keys(s[b]).length>0&&gd(p[b],s[b])})}var kg={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function tr(){let p=typeof document<"u"?document:{};return gd(p,kg),p}var v0={document:kg,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(p){return typeof setTimeout>"u"?(p(),null):setTimeout(p,0)},cancelAnimationFrame(p){typeof setTimeout>"u"||clearTimeout(p)}};function Oi(){let p=typeof window<"u"?window:{};return gd(p,v0),p}function Oa(p){return p===void 0&&(p=""),p.trim().split(" ").filter(s=>!!s.trim())}function Lg(p){let s=p;Object.keys(s).forEach(g=>{try{s[g]=null}catch{}try{delete s[g]}catch{}})}function Gs(p,s){return s===void 0&&(s=0),setTimeout(p,s)}function Bn(){return Date.now()}function b0(p){let s=Oi(),g;return s.getComputedStyle&&(g=s.getComputedStyle(p,null)),!g&&p.currentStyle&&(g=p.currentStyle),g||(g=p.style),g}function Vc(p,s){s===void 0&&(s="x");let g=Oi(),b,y,a,z=b0(p);return g.WebKitCSSMatrix?(y=z.transform||z.webkitTransform,y.split(",").length>6&&(y=y.split(", ").map(F=>F.replace(",",".")).join(", ")),a=new g.WebKitCSSMatrix(y==="none"?"":y)):(a=z.MozTransform||z.OTransform||z.MsTransform||z.msTransform||z.transform||z.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),b=a.toString().split(",")),s==="x"&&(g.WebKitCSSMatrix?y=a.m41:b.length===16?y=parseFloat(b[12]):y=parseFloat(b[4])),s==="y"&&(g.WebKitCSSMatrix?y=a.m42:b.length===16?y=parseFloat(b[13]):y=parseFloat(b[5])),y||0}function $l(p){return typeof p=="object"&&p!==null&&p.constructor&&Object.prototype.toString.call(p).slice(8,-1)==="Object"}function x0(p){return typeof window<"u"&&typeof window.HTMLElement<"u"?p instanceof HTMLElement:p&&(p.nodeType===1||p.nodeType===11)}function Hn(){let p=Object(arguments.length<=0?void 0:arguments[0]),s=["__proto__","constructor","prototype"];for(let g=1;g<arguments.length;g+=1){let b=g<0||arguments.length<=g?void 0:arguments[g];if(b!=null&&!x0(b)){let y=Object.keys(Object(b)).filter(a=>s.indexOf(a)<0);for(let a=0,z=y.length;a<z;a+=1){let F=y[a],V=Object.getOwnPropertyDescriptor(b,F);V!==void 0&&V.enumerable&&($l(p[F])&&$l(b[F])?b[F].__swiper__?p[F]=b[F]:Hn(p[F],b[F]):!$l(p[F])&&$l(b[F])?(p[F]={},b[F].__swiper__?p[F]=b[F]:Hn(p[F],b[F])):p[F]=b[F])}}}return p}function Jo(p,s,g){p.style.setProperty(s,g)}function yd(p){let{swiper:s,targetPosition:g,side:b}=p,y=Oi(),a=-s.translate,z=null,F,V=s.params.speed;s.wrapperEl.style.scrollSnapType="none",y.cancelAnimationFrame(s.cssModeFrameID);let B=g>a?"next":"prev",U=(ne,re)=>B==="next"&&ne>=re||B==="prev"&&ne<=re,O=()=>{F=new Date().getTime(),z===null&&(z=F);let ne=Math.max(Math.min((F-z)/V,1),0),re=.5-Math.cos(ne*Math.PI)/2,j=a+re*(g-a);if(U(j,g)&&(j=g),s.wrapperEl.scrollTo({[b]:j}),U(j,g)){s.wrapperEl.style.overflow="hidden",s.wrapperEl.style.scrollSnapType="",setTimeout(()=>{s.wrapperEl.style.overflow="",s.wrapperEl.scrollTo({[b]:j})}),y.cancelAnimationFrame(s.cssModeFrameID);return}s.cssModeFrameID=y.requestAnimationFrame(O)};O()}function qn(p){return p.querySelector(".swiper-slide-transform")||p.shadowRoot&&p.shadowRoot.querySelector(".swiper-slide-transform")||p}function vr(p,s){s===void 0&&(s="");let g=Oi(),b=[...p.children];return g.HTMLSlotElement&&p instanceof HTMLSlotElement&&b.push(...p.assignedElements()),s?b.filter(y=>y.matches(s)):b}function w0(p,s){let g=[s];for(;g.length>0;){let b=g.shift();if(p===b)return!0;g.push(...b.children,...b.shadowRoot?b.shadowRoot.children:[],...b.assignedElements?b.assignedElements():[])}}function zg(p,s){let g=Oi(),b=s.contains(p);return!b&&g.HTMLSlotElement&&s instanceof HTMLSlotElement&&(b=[...s.assignedElements()].includes(p),b||(b=w0(p,s))),b}function Uc(p){try{console.warn(p);return}catch{}}function Xr(p,s){s===void 0&&(s=[]);let g=document.createElement(p);return g.classList.add(...Array.isArray(s)?s:Oa(s)),g}function Qo(p){let s=Oi(),g=tr(),b=p.getBoundingClientRect(),y=g.body,a=p.clientTop||y.clientTop||0,z=p.clientLeft||y.clientLeft||0,F=p===s?s.scrollY:p.scrollTop,V=p===s?s.scrollX:p.scrollLeft;return{top:b.top+F-a,left:b.left+V-z}}function Rg(p,s){let g=[];for(;p.previousElementSibling;){let b=p.previousElementSibling;s?b.matches(s)&&g.push(b):g.push(b),p=b}return g}function Bg(p,s){let g=[];for(;p.nextElementSibling;){let b=p.nextElementSibling;s?b.matches(s)&&g.push(b):g.push(b),p=b}return g}function Na(p,s){return Oi().getComputedStyle(p,null).getPropertyValue(s)}function ho(p){let s=p,g;if(s){for(g=0;(s=s.previousSibling)!==null;)s.nodeType===1&&(g+=1);return g}}function Hs(p,s){let g=[],b=p.parentElement;for(;b;)s?b.matches(s)&&g.push(b):g.push(b),b=b.parentElement;return g}function po(p,s){function g(b){b.target===p&&(s.call(p,b),p.removeEventListener("transitionend",g))}s&&p.addEventListener("transitionend",g)}function Gc(p,s,g){let b=Oi();return g?p[s==="width"?"offsetWidth":"offsetHeight"]+parseFloat(b.getComputedStyle(p,null).getPropertyValue(s==="width"?"margin-right":"margin-top"))+parseFloat(b.getComputedStyle(p,null).getPropertyValue(s==="width"?"margin-left":"margin-bottom")):p.offsetWidth}function bi(p){return(Array.isArray(p)?p:[p]).filter(s=>!!s)}function fo(p){return s=>Math.abs(s)>0&&p.browser&&p.browser.need3dFix&&Math.abs(s)%90===0?s+.001:s}var _d;function S0(){let p=Oi(),s=tr();return{smoothScroll:s.documentElement&&s.documentElement.style&&"scrollBehavior"in s.documentElement.style,touch:!!("ontouchstart"in p||p.DocumentTouch&&s instanceof p.DocumentTouch)}}function Vg(){return _d||(_d=S0()),_d}var vd;function T0(p){let{userAgent:s}=p===void 0?{}:p,g=Vg(),b=Oi(),y=b.navigator.platform,a=s||b.navigator.userAgent,z={ios:!1,android:!1},F=b.screen.width,V=b.screen.height,B=a.match(/(Android);?[\s\/]+([\d.]+)?/),U=a.match(/(iPad).*OS\s([\d_]+)/),O=a.match(/(iPod)(.*OS\s([\d_]+))?/),ne=!U&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),re=y==="Win32",j=y==="MacIntel",H=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!U&&j&&g.touch&&H.indexOf(`${F}x${V}`)>=0&&(U=a.match(/(Version)\/([\d.]+)/),U||(U=[0,1,"13_0_0"]),j=!1),B&&!re&&(z.os="android",z.android=!0),(U||ne||O)&&(z.os="ios",z.ios=!0),z}function Ug(p){return p===void 0&&(p={}),vd||(vd=T0(p)),vd}var bd;function P0(){let p=Oi(),s=Ug(),g=!1;function b(){let F=p.navigator.userAgent.toLowerCase();return F.indexOf("safari")>=0&&F.indexOf("chrome")<0&&F.indexOf("android")<0}if(b()){let F=String(p.navigator.userAgent);if(F.includes("Version/")){let[V,B]=F.split("Version/")[1].split(" ")[0].split(".").map(U=>Number(U));g=V<16||V===16&&B<2}}
vendor: 13,296 bytes, line 728
728let y=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(p.navigator.userAgent),a=b(),z=a||y&&s.ios;return{isSafari:g||a,needPerspectiveFix:g,need3dFix:z,isWebView:y}}function Gg(){return bd||(bd=P0()),bd}function E0(p){let{swiper:s,on:g,emit:b}=p,y=Oi(),a=null,z=null,F=()=>{!s||s.destroyed||!s.initialized||(b("beforeResize"),b("resize"))},V=()=>{!s||s.destroyed||!s.initialized||(a=new ResizeObserver(O=>{z=y.requestAnimationFrame(()=>{let{width:ne,height:re}=s,j=ne,H=re;O.forEach(ae=>{let{contentBoxSize:ge,contentRect:ce,target:le}=ae;le&&le!==s.el||(j=ce?ce.width:(ge[0]||ge).inlineSize,H=ce?ce.height:(ge[0]||ge).blockSize)}),(j!==ne||H!==re)&&F()})}),a.observe(s.el))},B=()=>{z&&y.cancelAnimationFrame(z),a&&a.unobserve&&s.el&&(a.unobserve(s.el),a=null)},U=()=>{!s||s.destroyed||!s.initialized||b("orientationchange")};g("init",()=>{if(s.params.resizeObserver&&typeof y.ResizeObserver<"u"){V();return}y.addEventListener("resize",F),y.addEventListener("orientationchange",U)}),g("destroy",()=>{B(),y.removeEventListener("resize",F),y.removeEventListener("orientationchange",U)})}function M0(p){let{swiper:s,extendParams:g,on:b,emit:y}=p,a=[],z=Oi(),F=function(U,O){O===void 0&&(O={});let ne=z.MutationObserver||z.WebkitMutationObserver,re=new ne(j=>{if(s.__preventObserver__)return;if(j.length===1){y("observerUpdate",j[0]);return}let H=function(){y("observerUpdate",j[0])};z.requestAnimationFrame?z.requestAnimationFrame(H):z.setTimeout(H,0)});re.observe(U,{attributes:typeof O.attributes>"u"?!0:O.attributes,childList:s.isElement||(typeof O.childList>"u"?!0:O).childList,characterData:typeof O.characterData>"u"?!0:O.characterData}),a.push(re)},V=()=>{if(s.params.observer){if(s.params.observeParents){let U=Hs(s.hostEl);for(let O=0;O<U.length;O+=1)F(U[O])}F(s.hostEl,{childList:s.params.observeSlideChildren}),F(s.wrapperEl,{attributes:!1})}},B=()=>{a.forEach(U=>{U.disconnect()}),a.splice(0,a.length)};g({observer:!1,observeParents:!1,observeSlideChildren:!1}),b("init",V),b("destroy",B)}var C0={on(p,s,g){let b=this;if(!b.eventsListeners||b.destroyed||typeof s!="function")return b;let y=g?"unshift":"push";return p.split(" ").forEach(a=>{b.eventsListeners[a]||(b.eventsListeners[a]=[]),b.eventsListeners[a][y](s)}),b},once(p,s,g){let b=this;if(!b.eventsListeners||b.destroyed||typeof s!="function")return b;function y(){b.off(p,y),y.__emitterProxy&&delete y.__emitterProxy;for(var a=arguments.length,z=new Array(a),F=0;F<a;F++)z[F]=arguments[F];s.apply(b,z)}return y.__emitterProxy=s,b.on(p,y,g)},onAny(p,s){let g=this;if(!g.eventsListeners||g.destroyed||typeof p!="function")return g;let b=s?"unshift":"push";return g.eventsAnyListeners.indexOf(p)<0&&g.eventsAnyListeners[b](p),g},offAny(p){let s=this;if(!s.eventsListeners||s.destroyed||!s.eventsAnyListeners)return s;let g=s.eventsAnyListeners.indexOf(p);return g>=0&&s.eventsAnyListeners.splice(g,1),s},off(p,s){let g=this;return!g.eventsListeners||g.destroyed||!g.eventsListeners||p.split(" ").forEach(b=>{typeof s>"u"?g.eventsListeners[b]=[]:g.eventsListeners[b]&&g.eventsListeners[b].forEach((y,a)=>{(y===s||y.__emitterProxy&&y.__emitterProxy===s)&&g.eventsListeners[b].splice(a,1)})}),g},emit(){let p=this;if(!p.eventsListeners||p.destroyed||!p.eventsListeners)return p;let s,g,b;for(var y=arguments.length,a=new Array(y),z=0;z<y;z++)a[z]=arguments[z];return typeof a[0]=="string"||Array.isArray(a[0])?(s=a[0],g=a.slice(1,a.length),b=p):(s=a[0].events,g=a[0].data,b=a[0].context||p),g.unshift(b),(Array.isArray(s)?s:s.split(" ")).forEach(V=>{p.eventsAnyListeners&&p.eventsAnyListeners.length&&p.eventsAnyListeners.forEach(B=>{B.apply(b,[V,...g])}),p.eventsListeners&&p.eventsListeners[V]&&p.eventsListeners[V].forEach(B=>{B.apply(b,g)})}),p}};function I0(){let p=this,s,g,b=p.el;typeof p.params.width<"u"&&p.params.width!==null?s=p.params.width:s=b.clientWidth,typeof p.params.height<"u"&&p.params.height!==null?g=p.params.height:g=b.clientHeight,!(s===0&&p.isHorizontal()||g===0&&p.isVertical())&&(s=s-parseInt(Na(b,"padding-left")||0,10)-parseInt(Na(b,"padding-right")||0,10),g=g-parseInt(Na(b,"padding-top")||0,10)-parseInt(Na(b,"padding-bottom")||0,10),Number.isNaN(s)&&(s=0),Number.isNaN(g)&&(g=0),Object.assign(p,{width:s,height:g,size:p.isHorizontal()?s:g}))}function A0(){let p=this;function s($e,Qe){return parseFloat($e.getPropertyValue(p.getDirectionLabel(Qe))||0)}let g=p.params,{wrapperEl:b,slidesEl:y,size:a,rtlTranslate:z,wrongRTL:F}=p,V=p.virtual&&g.virtual.enabled,B=V?p.virtual.slides.length:p.slides.length,U=vr(y,`.${p.params.slideClass}, swiper-slide`),O=V?p.virtual.slides.length:U.length,ne=[],re=[],j=[],H=g.slidesOffsetBefore;typeof H=="function"&&(H=g.slidesOffsetBefore.call(p));let ae=g.slidesOffsetAfter;typeof ae=="function"&&(ae=g.slidesOffsetAfter.call(p));let ge=p.snapGrid.length,ce=p.slidesGrid.length,le=g.spaceBetween,we=-H,Le=0,M=0;if(typeof a>"u")return;typeof le=="string"&&le.indexOf("%")>=0?le=parseFloat(le.replace("%",""))/100*a:typeof le=="string"&&(le=parseFloat(le)),p.virtualSize=-le,U.forEach($e=>{z?$e.style.marginLeft="":$e.style.marginRight="",$e.style.marginBottom="",$e.style.marginTop=""}),g.centeredSlides&&g.cssMode&&(Jo(b,"--swiper-centered-offset-before",""),Jo(b,"--swiper-centered-offset-after",""));let ze=g.grid&&g.grid.rows>1&&p.grid;ze?p.grid.initSlides(U):p.grid&&p.grid.unsetSlides();let Oe,qe=g.slidesPerView==="auto"&&g.breakpoints&&Object.keys(g.breakpoints).filter($e=>typeof g.breakpoints[$e].slidesPerView<"u").length>0;for(let $e=0;$e<O;$e+=1){Oe=0;let Qe;if(U[$e]&&(Qe=U[$e]),ze&&p.grid.updateSlide($e,Qe,U),!(U[$e]&&Na(Qe,"display")==="none")){if(g.slidesPerView==="auto"){qe&&(U[$e].style[p.getDirectionLabel("width")]="");let Ne=getComputedStyle(Qe),Je=Qe.style.transform,Ye=Qe.style.webkitTransform;if(Je&&(Qe.style.transform="none"),Ye&&(Qe.style.webkitTransform="none"),g.roundLengths)Oe=p.isHorizontal()?Gc(Qe,"width",!0):Gc(Qe,"height",!0);else{let bt=s(Ne,"width"),_t=s(Ne,"padding-left"),He=s(Ne,"padding-right"),Xe=s(Ne,"margin-left"),At=s(Ne,"margin-right"),Yt=Ne.getPropertyValue("box-sizing");if(Yt&&Yt==="border-box")Oe=bt+Xe+At;else{let{clientWidth:xi,offsetWidth:Pi}=Qe;Oe=bt+_t+He+Xe+At+(Pi-xi)}}Je&&(Qe.style.transform=Je),Ye&&(Qe.style.webkitTransform=Ye),g.roundLengths&&(Oe=Math.floor(Oe))}else Oe=(a-(g.slidesPerView-1)*le)/g.slidesPerView,g.roundLengths&&(Oe=Math.floor(Oe)),U[$e]&&(U[$e].style[p.getDirectionLabel("width")]=`${Oe}px`);U[$e]&&(U[$e].swiperSlideSize=Oe),j.push(Oe),g.centeredSlides?(we=we+Oe/2+Le/2+le,Le===0&&$e!==0&&(we=we-a/2-le),$e===0&&(we=we-a/2-le),Math.abs(we)<1/1e3&&(we=0),g.roundLengths&&(we=Math.floor(we)),M%g.slidesPerGroup===0&&ne.push(we),re.push(we)):(g.roundLengths&&(we=Math.floor(we)),(M-Math.min(p.params.slidesPerGroupSkip,M))%p.params.slidesPerGroup===0&&ne.push(we),re.push(we),we=we+Oe+le),p.virtualSize+=Oe+le,Le=Oe,M+=1}}if(p.virtualSize=Math.max(p.virtualSize,a)+ae,z&&F&&(g.effect==="slide"||g.effect==="coverflow")&&(b.style.width=`${p.virtualSize+le}px`),g.setWrapperSize&&(b.style[p.getDirectionLabel("width")]=`${p.virtualSize+le}px`),ze&&p.grid.updateWrapperSize(Oe,ne),!g.centeredSlides){let $e=[];for(let Qe=0;Qe<ne.length;Qe+=1){let Ne=ne[Qe];g.roundLengths&&(Ne=Math.floor(Ne)),ne[Qe]<=p.virtualSize-a&&$e.push(Ne)}ne=$e,Math.floor(p.virtualSize-a)-Math.floor(ne[ne.length-1])>1&&ne.push(p.virtualSize-a)}if(V&&g.loop){let $e=j[0]+le;if(g.slidesPerGroup>1){let Qe=Math.ceil((p.virtual.slidesBefore+p.virtual.slidesAfter)/g.slidesPerGroup),Ne=$e*g.slidesPerGroup;for(let Je=0;Je<Qe;Je+=1)ne.push(ne[ne.length-1]+Ne)}for(let Qe=0;Qe<p.virtual.slidesBefore+p.virtual.slidesAfter;Qe+=1)g.slidesPerGroup===1&&ne.push(ne[ne.length-1]+$e),re.push(re[re.length-1]+$e),p.virtualSize+=$e}if(ne.length===0&&(ne=[0]),le!==0){let $e=p.isHorizontal()&&z?"marginLeft":p.getDirectionLabel("marginRight");U.filter((Qe,Ne)=>!g.cssMode||g.loop?!0:Ne!==U.length-1).forEach(Qe=>{Qe.style[$e]=`${le}px`})}if(g.centeredSlides&&g.centeredSlidesBounds){let $e=0;j.forEach(Ne=>{$e+=Ne+(le||0)}),$e-=le;let Qe=$e>a?$e-a:0;ne=ne.map(Ne=>Ne<=0?-H:Ne>Qe?Qe+ae:Ne)}if(g.centerInsufficientSlides){let $e=0;j.forEach(Ne=>{$e+=Ne+(le||0)}),$e-=le;let Qe=(g.slidesOffsetBefore||0)+(g.slidesOffsetAfter||0);if($e+Qe<a){let Ne=(a-$e-Qe)/2;ne.forEach((Je,Ye)=>{ne[Ye]=Je-Ne}),re.forEach((Je,Ye)=>{re[Ye]=Je+Ne})}}if(Object.assign(p,{slides:U,snapGrid:ne,slidesGrid:re,slidesSizesGrid:j}),g.centeredSlides&&g.cssMode&&!g.centeredSlidesBounds){Jo(b,"--swiper-centered-offset-before",`${-ne[0]}px`),Jo(b,"--swiper-centered-offset-after",`${p.size/2-j[j.length-1]/2}px`);let $e=-p.snapGrid[0],Qe=-p.slidesGrid[0];p.snapGrid=p.snapGrid.map(Ne=>Ne+$e),p.slidesGrid=p.slidesGrid.map(Ne=>Ne+Qe)}if(O!==B&&p.emit("slidesLengthChange"),ne.length!==ge&&(p.params.watchOverflow&&p.checkOverflow(),p.emit("snapGridLengthChange")),re.length!==ce&&p.emit("slidesGridLengthChange"),g.watchSlidesProgress&&p.updateSlidesOffset(),p.emit("slidesUpdated"),!V&&!g.cssMode&&(g.effect==="slide"||g.effect==="fade")){let $e=`${g.containerModifierClass}backface-hidden`,Qe=p.el.classList.contains($e);O<=g.maxBackfaceHiddenSlides?Qe||p.el.classList.add($e):Qe&&p.el.classList.remove($e)}}function D0(p){let s=this,g=[],b=s.virtual&&s.params.virtual.enabled,y=0,a;typeof p=="number"?s.setTransition(p):p===!0&&s.setTransition(s.params.speed);let z=F=>b?s.slides[s.getSlideIndexByData(F)]:s.slides[F];if(s.params.slidesPerView!=="auto"&&s.params.slidesPerView>1)if(s.params.centeredSlides)(s.visibleSlides||[]).forEach(F=>{g.push(F)});else for(a=0;a<Math.ceil(s.params.slidesPerView);a+=1){let F=s.activeIndex+a;if(F>s.slides.length&&!b)break;g.push(z(F))}else g.push(z(s.activeIndex));for(a=0;a<g.length;a+=1)if(typeof g[a]<"u"){let F=g[a].offsetHeight;y=F>y?F:y}(y||y===0)&&(s.wrapperEl.style.height=`${y}px`)}function k0(){let p=this,s=p.slides,g=p.isElement?p.isHorizontal()?p.wrapperEl.offsetLeft:p.wrapperEl.offsetTop:0;for(let b=0;b<s.length;b+=1)s[b].swiperSlideOffset=(p.isHorizontal()?s[b].offsetLeft:s[b].offsetTop)-g-p.cssOverflowAdjustment()}var Fg=(p,s,g)=>{s&&!p.classList.contains(g)?p.classList.add(g):!s&&p.classList.contains(g)&&p.classList.remove(g)};function L0(p){p===void 0&&(p=this&&this.translate||0);let s=this,g=s.params,{slides:b,rtlTranslate:y,snapGrid:a}=s;if(b.length===0)return;typeof b[0].swiperSlideOffset>"u"&&s.updateSlidesOffset();let z=-p;y&&(z=p),s.visibleSlidesIndexes=[],s.visibleSlides=[];let F=g.spaceBetween;typeof F=="string"&&F.indexOf("%")>=0?F=parseFloat(F.replace("%",""))/100*s.size:typeof F=="string"&&(F=parseFloat(F));for(let V=0;V<b.length;V+=1){let B=b[V],U=B.swiperSlideOffset;g.cssMode&&g.centeredSlides&&(U-=b[0].swiperSlideOffset);let O=(z+(g.centeredSlides?s.minTranslate():0)-U)/(B.swiperSlideSize+F),ne=(z-a[0]+(g.centeredSlides?s.minTranslate():0)-U)/(B.swiperSlideSize+F),re=-(z-U),j=re+s.slidesSizesGrid[V],H=re>=0&&re<=s.size-s.slidesSizesGrid[V],ae=re>=0&&re<s.size-1||j>1&&j<=s.size||re<=0&&j>=s.size;ae&&(s.visibleSlides.push(B),s.visibleSlidesIndexes.push(V)),Fg(B,ae,g.slideVisibleClass),Fg(B,H,g.slideFullyVisibleClass),B.progress=y?-O:O,B.originalProgress=y?-ne:ne}}function z0(p){let s=this;if(typeof p>"u"){let U=s.rtlTranslate?-1:1;p=s&&s.translate&&s.translate*U||0}let g=s.params,b=s.maxTranslate()-s.minTranslate(),{progress:y,isBeginning:a,isEnd:z,progressLoop:F}=s,V=a,B=z;if(b===0)y=0,a=!0,z=!0;else{y=(p-s.minTranslate())/b;let U=Math.abs(p-s.minTranslate())<1,O=Math.abs(p-s.maxTranslate())<1;a=U||y<=0,z=O||y>=1,U&&(y=0),O&&(y=1)}if(g.loop){let U=s.getSlideIndexByData(0),O=s.getSlideIndexByData(s.slides.length-1),ne=s.slidesGrid[U],re=s.slidesGrid[O],j=s.slidesGrid[s.slidesGrid.length-1],H=Math.abs(p);H>=ne?F=(H-ne)/j:F=(H+j-re)/j,F>1&&(F-=1)}Object.assign(s,{progress:y,progressLoop:F,isBeginning:a,isEnd:z}),(g.watchSlidesProgress||g.centeredSlides&&g.autoHeight)&&s.updateSlidesProgress(p),a&&!V&&s.emit("reachBeginning toEdge"),z&&!B&&s.emit("reachEnd toEdge"),(V&&!a||B&&!z)&&s.emit("fromEdge"),s.emit("progress",y)}var xd=(p,s,g)=>{s&&!p.classList.contains(g)?p.classList.add(g):!s&&p.classList.contains(g)&&p.classList.remove(g)};function R0(){let p=this,{slides:s,params:g,slidesEl:b,activeIndex:y}=p,a=p.virtual&&g.virtual.enabled,z=p.grid&&g.grid&&g.grid.rows>1,F=O=>vr(b,`.${g.slideClass}${O}, swiper-slide${O}`)[0],V,B,U;if(a)if(g.loop){let O=y-p.virtual.slidesBefore;O<0&&(O=p.virtual.slides.length+O),O>=p.virtual.slides.length&&(O-=p.virtual.slides.length),V=F(`[data-swiper-slide-index="${O}"]`)}else V=F(`[data-swiper-slide-index="${y}"]`);else z?(V=s.find(O=>O.column===y),U=s.find(O=>O.column===y+1),B=s.find(O=>O.column===y-1)):V=s[y];V&&(z||(U=Bg(V,`.${g.slideClass}, swiper-slide`)[0],g.loop&&!U&&(U=s[0]),B=Rg(V,`.${g.slideClass}, swiper-slide`)[0],g.loop&&!B===0&&(B=s[s.length-1]))),s.forEach(O=>{xd(O,O===V,g.slideActiveClass),xd(O,O===U,g.slideNextClass),xd(O,O===B,g.slidePrevClass)}),p.emitSlidesClasses()}var qu=(p,s)=>{if(!p||p.destroyed||!p.params)return;let g=()=>p.isElement?"swiper-slide":`.${p.params.slideClass}`,b=s.closest(g());if(b){let y=b.querySelector(`.${p.params.lazyPreloaderClass}`);!y&&p.isElement&&(b.shadowRoot?y=b.shadowRoot.querySelector(`.${p.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{b.shadowRoot&&(y=b.shadowRoot.querySelector(`.${p.params.lazyPreloaderClass}`),y&&y.remove())}
vendor: 2,443 bytes, line 728
728)),y&&y.remove()}},wd=(p,s)=>{if(!p.slides[s])return;let g=p.slides[s].querySelector('[loading="lazy"]');g&&g.removeAttribute("loading")},Pd=p=>{if(!p||p.destroyed||!p.params)return;let s=p.params.lazyPreloadPrevNext,g=p.slides.length;if(!g||!s||s<0)return;s=Math.min(s,g);let b=p.params.slidesPerView==="auto"?p.slidesPerViewDynamic():Math.ceil(p.params.slidesPerView),y=p.activeIndex;if(p.params.grid&&p.params.grid.rows>1){let z=y,F=[z-s];F.push(...Array.from({length:s}).map((V,B)=>z+b+B)),p.slides.forEach((V,B)=>{F.includes(V.column)&&wd(p,B)});return}let a=y+b-1;if(p.params.rewind||p.params.loop)for(let z=y-s;z<=a+s;z+=1){let F=(z%g+g)%g;(F<y||F>a)&&wd(p,F)}else for(let z=Math.max(y-s,0);z<=Math.min(a+s,g-1);z+=1)z!==y&&(z>a||z<y)&&wd(p,z)};function B0(p){let{slidesGrid:s,params:g}=p,b=p.rtlTranslate?p.translate:-p.translate,y;for(let a=0;a<s.length;a+=1)typeof s[a+1]<"u"?b>=s[a]&&b<s[a+1]-(s[a+1]-s[a])/2?y=a:b>=s[a]&&b<s[a+1]&&(y=a+1):b>=s[a]&&(y=a);return g.normalizeSlideIndex&&(y<0||typeof y>"u")&&(y=0),y}function F0(p){let s=this,g=s.rtlTranslate?s.translate:-s.translate,{snapGrid:b,params:y,activeIndex:a,realIndex:z,snapIndex:F}=s,V=p,B,U=re=>{let j=re-s.virtual.slidesBefore;return j<0&&(j=s.virtual.slides.length+j),j>=s.virtual.slides.length&&(j-=s.virtual.slides.length),j};if(typeof V>"u"&&(V=B0(s)),b.indexOf(g)>=0)B=b.indexOf(g);else{let re=Math.min(y.slidesPerGroupSkip,V);B=re+Math.floor((V-re)/y.slidesPerGroup)}if(B>=b.length&&(B=b.length-1),V===a&&!s.params.loop){B!==F&&(s.snapIndex=B,s.emit("snapIndexChange"));return}if(V===a&&s.params.loop&&s.virtual&&s.params.virtual.enabled){s.realIndex=U(V);return}let O=s.grid&&y.grid&&y.grid.rows>1,ne;if(s.virtual&&y.virtual.enabled&&y.loop)ne=U(V);else if(O){let re=s.slides.find(H=>H.column===V),j=parseInt(re.getAttribute("data-swiper-slide-index"),10);Number.isNaN(j)&&(j=Math.max(s.slides.indexOf(re),0)),ne=Math.floor(j/y.grid.rows)}else if(s.slides[V]){let re=s.slides[V].getAttribute("data-swiper-slide-index");re?ne=parseInt(re,10):ne=V}else ne=V;Object.assign(s,{previousSnapIndex:F,snapIndex:B,previousRealIndex:z,realIndex:ne,previousIndex:a,activeIndex:V}),s.initialized&&Pd(s),s.emit("activeIndexChange"),s.emit("snapIndexChange"),(s.initialized||s.params.runCallbacksOnInit)&&(z!==ne&&s.emit("realIndexChange"),s.emit("slideChange"))}function O0(p,s){let g=this,b=g.params,y=p.closest(`.${b.slideClass}, swiper-slide`);!y&&g.isElement&&s&&s.length>
vendor: 11,422 bytes, line 728
7281&&s.includes(p)&&[...s.slice(s.indexOf(p)+1,s.length)].forEach(F=>{!y&&F.matches&&F.matches(`.${b.slideClass}, swiper-slide`)&&(y=F)});let a=!1,z;if(y){for(let F=0;F<g.slides.length;F+=1)if(g.slides[F]===y){a=!0,z=F;break}}if(y&&a)g.clickedSlide=y,g.virtual&&g.params.virtual.enabled?g.clickedIndex=parseInt(y.getAttribute("data-swiper-slide-index"),10):g.clickedIndex=z;else{g.clickedSlide=void 0,g.clickedIndex=void 0;return}b.slideToClickedSlide&&g.clickedIndex!==void 0&&g.clickedIndex!==g.activeIndex&&g.slideToClickedSlide()}var N0={updateSize:I0,updateSlides:A0,updateAutoHeight:D0,updateSlidesOffset:k0,updateSlidesProgress:L0,updateProgress:z0,updateSlidesClasses:R0,updateActiveIndex:F0,updateClickedSlide:O0};function j0(p){p===void 0&&(p=this.isHorizontal()?"x":"y");let s=this,{params:g,rtlTranslate:b,translate:y,wrapperEl:a}=s;if(g.virtualTranslate)return b?-y:y;if(g.cssMode)return y;let z=Vc(a,p);return z+=s.cssOverflowAdjustment(),b&&(z=-z),z||0}function $0(p,s){let g=this,{rtlTranslate:b,params:y,wrapperEl:a,progress:z}=g,F=0,V=0,B=0;g.isHorizontal()?F=b?-p:p:V=p,y.roundLengths&&(F=Math.floor(F),V=Math.floor(V)),g.previousTranslate=g.translate,g.translate=g.isHorizontal()?F:V,y.cssMode?a[g.isHorizontal()?"scrollLeft":"scrollTop"]=g.isHorizontal()?-F:-V:y.virtualTranslate||(g.isHorizontal()?F-=g.cssOverflowAdjustment():V-=g.cssOverflowAdjustment(),a.style.transform=`translate3d(${F}px, ${V}px, ${B}px)`);let U,O=g.maxTranslate()-g.minTranslate();O===0?U=0:U=(p-g.minTranslate())/O,U!==z&&g.updateProgress(p),g.emit("setTranslate",g.translate,s)}function V0(){return-this.snapGrid[0]}function U0(){return-this.snapGrid[this.snapGrid.length-1]}function G0(p,s,g,b,y){p===void 0&&(p=0),s===void 0&&(s=this.params.speed),g===void 0&&(g=!0),b===void 0&&(b=!0);let a=this,{params:z,wrapperEl:F}=a;if(a.animating&&z.preventInteractionOnTransition)return!1;let V=a.minTranslate(),B=a.maxTranslate(),U;if(b&&p>V?U=V:b&&p<B?U=B:U=p,a.updateProgress(U),z.cssMode){let O=a.isHorizontal();if(s===0)F[O?"scrollLeft":"scrollTop"]=-U;else{if(!a.support.smoothScroll)return yd({swiper:a,targetPosition:-U,side:O?"left":"top"}),!0;F.scrollTo({[O?"left":"top"]:-U,behavior:"smooth"})}return!0}return s===0?(a.setTransition(0),a.setTranslate(U),g&&(a.emit("beforeTransitionStart",s,y),a.emit("transitionEnd"))):(a.setTransition(s),a.setTranslate(U),g&&(a.emit("beforeTransitionStart",s,y),a.emit("transitionStart")),a.animating||(a.animating=!0,a.onTranslateToWrapperTransitionEnd||(a.onTranslateToWrapperTransitionEnd=function(ne){!a||a.destroyed||ne.target===this&&(a.wrapperEl.removeEventListener("transitionend",a.onTranslateToWrapperTransitionEnd),a.onTranslateToWrapperTransitionEnd=null,delete a.onTranslateToWrapperTransitionEnd,a.animating=!1,g&&a.emit("transitionEnd"))}),a.wrapperEl.addEventListener("transitionend",a.onTranslateToWrapperTransitionEnd))),!0}var H0={getTranslate:j0,setTranslate:$0,minTranslate:V0,maxTranslate:U0,translateTo:G0};function q0(p,s){let g=this;g.params.cssMode||(g.wrapperEl.style.transitionDuration=`${p}ms`,g.wrapperEl.style.transitionDelay=p===0?"0ms":""),g.emit("setTransition",p,s)}function Hg(p){let{swiper:s,runCallbacks:g,direction:b,step:y}=p,{activeIndex:a,previousIndex:z}=s,F=b;if(F||(a>z?F="next":a<z?F="prev":F="reset"),s.emit(`transition${y}`),g&&a!==z){if(F==="reset"){s.emit(`slideResetTransition${y}`);return}s.emit(`slideChangeTransition${y}`),F==="next"?s.emit(`slideNextTransition${y}`):s.emit(`slidePrevTransition${y}`)}}function Z0(p,s){p===void 0&&(p=!0);let g=this,{params:b}=g;b.cssMode||(b.autoHeight&&g.updateAutoHeight(),Hg({swiper:g,runCallbacks:p,direction:s,step:"Start"}))}function W0(p,s){p===void 0&&(p=!0);let g=this,{params:b}=g;g.animating=!1,!b.cssMode&&(g.setTransition(0),Hg({swiper:g,runCallbacks:p,direction:s,step:"End"}))}var X0={setTransition:q0,transitionStart:Z0,transitionEnd:W0};function Y0(p,s,g,b,y){p===void 0&&(p=0),g===void 0&&(g=!0),typeof p=="string"&&(p=parseInt(p,10));let a=this,z=p;z<0&&(z=0);let{params:F,snapGrid:V,slidesGrid:B,previousIndex:U,activeIndex:O,rtlTranslate:ne,wrapperEl:re,enabled:j}=a;if(!j&&!b&&!y||a.destroyed||a.animating&&F.preventInteractionOnTransition)return!1;typeof s>"u"&&(s=a.params.speed);let H=Math.min(a.params.slidesPerGroupSkip,z),ae=H+Math.floor((z-H)/a.params.slidesPerGroup);ae>=V.length&&(ae=V.length-1);let ge=-V[ae];if(F.normalizeSlideIndex)for(let ze=0;ze<B.length;ze+=1){let Oe=-Math.floor(ge*100),qe=Math.floor(B[ze]*100),$e=Math.floor(B[ze+1]*100);typeof B[ze+1]<"u"?Oe>=qe&&Oe<$e-($e-qe)/2?z=ze:Oe>=qe&&Oe<$e&&(z=ze+1):Oe>=qe&&(z=ze)}if(a.initialized&&z!==O&&(!a.allowSlideNext&&(ne?ge>a.translate&&ge>a.minTranslate():ge<a.translate&&ge<a.minTranslate())||!a.allowSlidePrev&&ge>a.translate&&ge>a.maxTranslate()&&(O||0)!==z))return!1;z!==(U||0)&&g&&a.emit("beforeSlideChangeStart"),a.updateProgress(ge);let ce;z>O?ce="next":z<O?ce="prev":ce="reset";let le=a.virtual&&a.params.virtual.enabled;if(!(le&&y)&&(ne&&-ge===a.translate||!ne&&ge===a.translate))return a.updateActiveIndex(z),F.autoHeight&&a.updateAutoHeight(),a.updateSlidesClasses(),F.effect!=="slide"&&a.setTranslate(ge),ce!=="reset"&&(a.transitionStart(g,ce),a.transitionEnd(g,ce)),!1;if(F.cssMode){let ze=a.isHorizontal(),Oe=ne?ge:-ge;if(s===0)le&&(a.wrapperEl.style.scrollSnapType="none",a._immediateVirtual=!0),le&&!a._cssModeVirtualInitialSet&&a.params.initialSlide>0?(a._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{re[ze?"scrollLeft":"scrollTop"]=Oe})):re[ze?"scrollLeft":"scrollTop"]=Oe,le&&requestAnimationFrame(()=>{a.wrapperEl.style.scrollSnapType="",a._immediateVirtual=!1});else{if(!a.support.smoothScroll)return yd({swiper:a,targetPosition:Oe,side:ze?"left":"top"}),!0;re.scrollTo({[ze?"left":"top"]:Oe,behavior:"smooth"})}return!0}let M=Gg().isSafari;return le&&!y&&M&&a.isElement&&a.virtual.update(!1,!1,z),a.setTransition(s),a.setTranslate(ge),a.updateActiveIndex(z),a.updateSlidesClasses(),a.emit("beforeTransitionStart",s,b),a.transitionStart(g,ce),s===0?a.transitionEnd(g,ce):a.animating||(a.animating=!0,a.onSlideToWrapperTransitionEnd||(a.onSlideToWrapperTransitionEnd=function(Oe){!a||a.destroyed||Oe.target===this&&(a.wrapperEl.removeEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.onSlideToWrapperTransitionEnd=null,delete a.onSlideToWrapperTransitionEnd,a.transitionEnd(g,ce))}),a.wrapperEl.addEventListener("transitionend",a.onSlideToWrapperTransitionEnd)),!0}function K0(p,s,g,b){p===void 0&&(p=0),g===void 0&&(g=!0),typeof p=="string"&&(p=parseInt(p,10));let y=this;if(y.destroyed)return;typeof s>"u"&&(s=y.params.speed);let a=y.grid&&y.params.grid&&y.params.grid.rows>1,z=p;if(y.params.loop)if(y.virtual&&y.params.virtual.enabled)z=z+y.virtual.slidesBefore;else{let F;if(a){let ne=z*y.params.grid.rows;F=y.slides.find(re=>re.getAttribute("data-swiper-slide-index")*1===ne).column}else F=y.getSlideIndexByData(z);let V=a?Math.ceil(y.slides.length/y.params.grid.rows):y.slides.length,{centeredSlides:B}=y.params,U=y.params.slidesPerView;U==="auto"?U=y.slidesPerViewDynamic():(U=Math.ceil(parseFloat(y.params.slidesPerView,10)),B&&U%2===0&&(U=U+1));let O=V-F<U;if(B&&(O=O||F<Math.ceil(U/2)),b&&B&&y.params.slidesPerView!=="auto"&&!a&&(O=!1),O){let ne=B?F<y.activeIndex?"prev":"next":F-y.activeIndex-1<y.params.slidesPerView?"next":"prev";y.loopFix({direction:ne,slideTo:!0,activeSlideIndex:ne==="next"?F+1:F-V+1,slideRealIndex:ne==="next"?y.realIndex:void 0})}if(a){let ne=z*y.params.grid.rows;z=y.slides.find(re=>re.getAttribute("data-swiper-slide-index")*1===ne).column}else z=y.getSlideIndexByData(z)}return requestAnimationFrame(()=>{y.slideTo(z,s,g,b)}),y}function J0(p,s,g){s===void 0&&(s=!0);let b=this,{enabled:y,params:a,animating:z}=b;if(!y||b.destroyed)return b;typeof p>"u"&&(p=b.params.speed);let F=a.slidesPerGroup;a.slidesPerView==="auto"&&a.slidesPerGroup===1&&a.slidesPerGroupAuto&&(F=Math.max(b.slidesPerViewDynamic("current",!0),1));let V=b.activeIndex<a.slidesPerGroupSkip?1:F,B=b.virtual&&a.virtual.enabled;if(a.loop){if(z&&!B&&a.loopPreventsSliding)return!1;if(b.loopFix({direction:"next"}),b._clientLeft=b.wrapperEl.clientLeft,b.activeIndex===b.slides.length-1&&a.cssMode)return requestAnimationFrame(()=>{b.slideTo(b.activeIndex+V,p,s,g)}),!0}return a.rewind&&b.isEnd?b.slideTo(0,p,s,g):b.slideTo(b.activeIndex+V,p,s,g)}function Q0(p,s,g){s===void 0&&(s=!0);let b=this,{params:y,snapGrid:a,slidesGrid:z,rtlTranslate:F,enabled:V,animating:B}=b;if(!V||b.destroyed)return b;typeof p>"u"&&(p=b.params.speed);let U=b.virtual&&y.virtual.enabled;if(y.loop){if(B&&!U&&y.loopPreventsSliding)return!1;b.loopFix({direction:"prev"}),b._clientLeft=b.wrapperEl.clientLeft}let O=F?b.translate:-b.translate;function ne(ce){return ce<0?-Math.floor(Math.abs(ce)):Math.floor(ce)}let re=ne(O),j=a.map(ce=>ne(ce)),H=y.freeMode&&y.freeMode.enabled,ae=a[j.indexOf(re)-1];if(typeof ae>"u"&&(y.cssMode||H)){let ce;a.forEach((le,we)=>{re>=le&&(ce=we)}),typeof ce<"u"&&(ae=H?a[ce]:a[ce>0?ce-1:ce])}let ge=0;if(typeof ae<"u"&&(ge=z.indexOf(ae),ge<0&&(ge=b.activeIndex-1),y.slidesPerView==="auto"&&y.slidesPerGroup===1&&y.slidesPerGroupAuto&&(ge=ge-b.slidesPerViewDynamic("previous",!0)+1,ge=Math.max(ge,0))),y.rewind&&b.isBeginning){let ce=b.params.virtual&&b.params.virtual.enabled&&b.virtual?b.virtual.slides.length-1:b.slides.length-1;return b.slideTo(ce,p,s,g)}else if(y.loop&&b.activeIndex===0&&y.cssMode)return requestAnimationFrame(()=>{b.slideTo(ge,p,s,g)}),!0;return b.slideTo(ge,p,s,g)}function eb(p,s,g){s===void 0&&(s=!0);let b=this;if(!b.destroyed)return typeof p>"u"&&(p=b.params.speed),b.slideTo(b.activeIndex,p,s,g)}function tb(p,s,g,b){s===void 0&&(s=!0),b===void 0&&(b=.5);let y=this;if(y.destroyed)return;typeof p>"u"&&(p=y.params.speed);let a=y.activeIndex,z=Math.min(y.params.slidesPerGroupSkip,a),F=z+Math.floor((a-z)/y.params.slidesPerGroup),V=y.rtlTranslate?y.translate:-y.translate;if(V>=y.snapGrid[F]){let B=y.snapGrid[F],U=y.snapGrid[F+1];V-B>(U-B)*b&&(a+=y.params.slidesPerGroup)}else{let B=y.snapGrid[F-1],U=y.snapGrid[F];V-B<=(U-B)*b&&(a-=y.params.slidesPerGroup)}return a=Math.max(a,0),a=Math.min(a,y.slidesGrid.length-1),y.slideTo(a,p,s,g)}function ib(){let p=this;if(p.destroyed)return;let{params:s,slidesEl:g}=p,b=s.slidesPerView==="auto"?p.slidesPerViewDynamic():s.slidesPerView,y=p.clickedIndex,a,z=p.isElement?"swiper-slide":`.${s.slideClass}`;if(s.loop){if(p.animating)return;a=parseInt(p.clickedSlide.getAttribute("data-swiper-slide-index"),10),s.centeredSlides?y<p.loopedSlides-b/2||y>p.slides.length-p.loopedSlides+b/2?(p.loopFix(),y=p.getSlideIndex(vr(g,`${z}[data-swiper-slide-index="${a}"]`)[0]),Gs(()=>{p.slideTo(y)})):p.slideTo(y):y>p.slides.length-b?(p.loopFix(),y=p.getSlideIndex(vr(g,`${z}[data-swiper-slide-index="${a}"]`)[0]),Gs(()=>{p.slideTo(y)})):p.slideTo(y)}else p.slideTo(y)}var rb={slideTo:Y0,slideToLoop:K0,slideNext:J0,slidePrev:Q0,slideReset:eb,slideToClosest:tb,slideToClickedSlide:ib};function nb(p,s){let g=this,{params:b,slidesEl:y}=g;if(!b.loop||g.virtual&&g.params.virtual.enabled)return;let a=()=>{vr(y,`.${b.slideClass}, swiper-slide`).forEach((ne,re)=>{ne.setAttribute("data-swiper-slide-index",re)})},z=g.grid&&b.grid&&b.grid.rows>1,F=b.slidesPerGroup*(z?b.grid.rows:1),V=g.slides.length%F!==0,B=z&&g.slides.length%b.grid.rows!==0,U=O=>{for(let ne=0;ne<O;ne+=1){let re=g.isElement?Xr("swiper-slide",[b.slideBlankClass]):Xr("div",[b.slideClass,b.slideBlankClass]);g.slidesEl.append(re)}};
vendor: 4,920 bytes, line 728
728if(V){if(b.loopAddBlankSlides){let O=F-g.slides.length%F;U(O),g.recalcSlides(),g.updateSlides()}else Uc("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");a()}else if(B){if(b.loopAddBlankSlides){let O=b.grid.rows-g.slides.length%b.grid.rows;U(O),g.recalcSlides(),g.updateSlides()}else Uc("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");a()}else a();g.loopFix({slideRealIndex:p,direction:b.centeredSlides?void 0:"next",initial:s})}function sb(p){let{slideRealIndex:s,slideTo:g=!0,direction:b,setTranslate:y,activeSlideIndex:a,initial:z,byController:F,byMousewheel:V}=p===void 0?{}:p,B=this;if(!B.params.loop)return;B.emit("beforeLoopFix");let{slides:U,allowSlidePrev:O,allowSlideNext:ne,slidesEl:re,params:j}=B,{centeredSlides:H,initialSlide:ae}=j;if(B.allowSlidePrev=!0,B.allowSlideNext=!0,B.virtual&&j.virtual.enabled){g&&(!j.centeredSlides&&B.snapIndex===0?B.slideTo(B.virtual.slides.length,0,!1,!0):j.centeredSlides&&B.snapIndex<j.slidesPerView?B.slideTo(B.virtual.slides.length+B.snapIndex,0,!1,!0):B.snapIndex===B.snapGrid.length-1&&B.slideTo(B.virtual.slidesBefore,0,!1,!0)),B.allowSlidePrev=O,B.allowSlideNext=ne,B.emit("loopFix");return}let ge=j.slidesPerView;ge==="auto"?ge=B.slidesPerViewDynamic():(ge=Math.ceil(parseFloat(j.slidesPerView,10)),H&&ge%2===0&&(ge=ge+1));let ce=j.slidesPerGroupAuto?ge:j.slidesPerGroup,le=ce;le%ce!==0&&(le+=ce-le%ce),le+=j.loopAdditionalSlides,B.loopedSlides=le;let we=B.grid&&j.grid&&j.grid.rows>1;U.length<ge+le||B.params.effect==="cards"&&U.length<ge+le*2?Uc("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):we&&j.grid.fill==="row"&&Uc("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");let Le=[],M=[],ze=we?Math.ceil(U.length/j.grid.rows):U.length,Oe=z&&ze-ae<ge&&!H,qe=Oe?ae:B.activeIndex;typeof a>"u"?a=B.getSlideIndex(U.find(_t=>_t.classList.contains(j.slideActiveClass))):qe=a;let $e=b==="next"||!b,Qe=b==="prev"||!b,Ne=0,Je=0,bt=(we?U[a].column:a)+(H&&typeof y>"u"?-ge/2+.5:0);if(bt<le){Ne=Math.max(le-bt,ce);for(let _t=0;_t<le-bt;_t+=1){let He=_t-Math.floor(_t/ze)*ze;if(we){let Xe=ze-He-1;for(let At=U.length-1;At>=0;At-=1)U[At].column===Xe&&Le.push(At)}else Le.push(ze-He-1)}}else if(bt+ge>ze-le){Je=Math.max(bt-(ze-le*2),ce),Oe&&(Je=Math.max(Je,ge-ze+ae+1));for(let _t=0;_t<Je;_t+=1){let He=_t-Math.floor(_t/ze)*ze;we?U.forEach((Xe,At)=>{Xe.column===He&&M.push(At)}):M.push(He)}}if(B.__preventObserver__=!0,requestAnimationFrame(()=>{B.__preventObserver__=!1}),B.params.effect==="cards"&&U.length<ge+le*2&&(M.includes(a)&&M.splice(M.indexOf(a),1),Le.includes(a)&&Le.splice(Le.indexOf(a),1)),Qe&&Le.forEach(_t=>{U[_t].swiperLoopMoveDOM=!0,re.prepend(U[_t]),U[_t].swiperLoopMoveDOM=!1}),$e&&M.forEach(_t=>{U[_t].swiperLoopMoveDOM=!0,re.append(U[_t]),U[_t].swiperLoopMoveDOM=!1}),B.recalcSlides(),j.slidesPerView==="auto"?B.updateSlides():we&&(Le.length>0&&Qe||M.length>0&&$e)&&B.slides.forEach((_t,He)=>{B.grid.updateSlide(He,_t,B.slides)}),j.watchSlidesProgress&&B.updateSlidesOffset(),g){if(Le.length>0&&Qe){if(typeof s>"u"){let _t=B.slidesGrid[qe],Xe=B.slidesGrid[qe+Ne]-_t;V?B.setTranslate(B.translate-Xe):(B.slideTo(qe+Math.ceil(Ne),0,!1,!0),y&&(B.touchEventsData.startTranslate=B.touchEventsData.startTranslate-Xe,B.touchEventsData.currentTranslate=B.touchEventsData.currentTranslate-Xe))}else if(y){let _t=we?Le.length/j.grid.rows:Le.length;B.slideTo(B.activeIndex+_t,0,!1,!0),B.touchEventsData.currentTranslate=B.translate}}else if(M.length>0&&$e)if(typeof s>"u"){let _t=B.slidesGrid[qe],Xe=B.slidesGrid[qe-Je]-_t;V?B.setTranslate(B.translate-Xe):(B.slideTo(qe-Je,0,!1,!0),y&&(B.touchEventsData.startTranslate=B.touchEventsData.startTranslate-Xe,B.touchEventsData.currentTranslate=B.touchEventsData.currentTranslate-Xe))}else{let _t=we?M.length/j.grid.rows:M.length;B.slideTo(B.activeIndex-_t,0,!1,!0)}}if(B.allowSlidePrev=O,B.allowSlideNext=ne,B.controller&&B.controller.control&&!F){let _t={slideRealIndex:s,direction:b,setTranslate:y,activeSlideIndex:a,byController:!0};Array.isArray(B.controller.control)?B.controller.control.forEach(He=>{!He.destroyed&&He.params.loop&&He.loopFix({..._t,slideTo:He.params.slidesPerView===j.slidesPerView?g:!1})}):B.controller.control instanceof B.constructor&&B.controller.control.params.loop&&B.controller.control.loopFix({..._t,slideTo:B.controller.control.params.slidesPerView===j.slidesPerView?g:!1})}B.emit("loopFix")}function ab(){let p=this,{params:s,slidesEl:g}=p;if(!s.loop||!g||p.virtual&&p.params.virtual.enabled)return;p.recalcSlides();let b=[];
vendor: 15,194 bytes, line 728
728p.slides.forEach(y=>{let a=typeof y.swiperSlideIndex>"u"?y.getAttribute("data-swiper-slide-index")*1:y.swiperSlideIndex;b[a]=y}),p.slides.forEach(y=>{y.removeAttribute("data-swiper-slide-index")}),b.forEach(y=>{g.append(y)}),p.recalcSlides(),p.slideTo(p.realIndex,0)}var ob={loopCreate:nb,loopFix:sb,loopDestroy:ab};function lb(p){let s=this;if(!s.params.simulateTouch||s.params.watchOverflow&&s.isLocked||s.params.cssMode)return;let g=s.params.touchEventsTarget==="container"?s.el:s.wrapperEl;s.isElement&&(s.__preventObserver__=!0),g.style.cursor="move",g.style.cursor=p?"grabbing":"grab",s.isElement&&requestAnimationFrame(()=>{s.__preventObserver__=!1})}function cb(){let p=this;p.params.watchOverflow&&p.isLocked||p.params.cssMode||(p.isElement&&(p.__preventObserver__=!0),p[p.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",p.isElement&&requestAnimationFrame(()=>{p.__preventObserver__=!1}))}var ub={setGrabCursor:lb,unsetGrabCursor:cb};function hb(p,s){s===void 0&&(s=this);function g(b){if(!b||b===tr()||b===Oi())return null;b.assignedSlot&&(b=b.assignedSlot);let y=b.closest(p);return!y&&!b.getRootNode?null:y||g(b.getRootNode().host)}return g(s)}function Og(p,s,g){let b=Oi(),{params:y}=p,a=y.edgeSwipeDetection,z=y.edgeSwipeThreshold;return a&&(g<=z||g>=b.innerWidth-z)?a==="prevent"?(s.preventDefault(),!0):!1:!0}function db(p){let s=this,g=tr(),b=p;b.originalEvent&&(b=b.originalEvent);let y=s.touchEventsData;if(b.type==="pointerdown"){if(y.pointerId!==null&&y.pointerId!==b.pointerId)return;y.pointerId=b.pointerId}else b.type==="touchstart"&&b.targetTouches.length===1&&(y.touchId=b.targetTouches[0].identifier);if(b.type==="touchstart"){Og(s,b,b.targetTouches[0].pageX);return}let{params:a,touches:z,enabled:F}=s;if(!F||!a.simulateTouch&&b.pointerType==="mouse"||s.animating&&a.preventInteractionOnTransition)return;!s.animating&&a.cssMode&&a.loop&&s.loopFix();let V=b.target;if(a.touchEventsTarget==="wrapper"&&!zg(V,s.wrapperEl)||"which"in b&&b.which===3||"button"in b&&b.button>0||y.isTouched&&y.isMoved)return;let B=!!a.noSwipingClass&&a.noSwipingClass!=="",U=b.composedPath?b.composedPath():b.path;B&&b.target&&b.target.shadowRoot&&U&&(V=U[0]);let O=a.noSwipingSelector?a.noSwipingSelector:`.${a.noSwipingClass}`,ne=!!(b.target&&b.target.shadowRoot);if(a.noSwiping&&(ne?hb(O,V):V.closest(O))){s.allowClick=!0;return}if(a.swipeHandler&&!V.closest(a.swipeHandler))return;z.currentX=b.pageX,z.currentY=b.pageY;let re=z.currentX,j=z.currentY;if(!Og(s,b,re))return;Object.assign(y,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),z.startX=re,z.startY=j,y.touchStartTime=Bn(),s.allowClick=!0,s.updateSize(),s.swipeDirection=void 0,a.threshold>0&&(y.allowThresholdMove=!1);let H=!0;V.matches(y.focusableElements)&&(H=!1,V.nodeName==="SELECT"&&(y.isTouched=!1)),g.activeElement&&g.activeElement.matches(y.focusableElements)&&g.activeElement!==V&&(b.pointerType==="mouse"||b.pointerType!=="mouse"&&!V.matches(y.focusableElements))&&g.activeElement.blur();let ae=H&&s.allowTouchMove&&a.touchStartPreventDefault;(a.touchStartForcePreventDefault||ae)&&!V.isContentEditable&&b.preventDefault(),a.freeMode&&a.freeMode.enabled&&s.freeMode&&s.animating&&!a.cssMode&&s.freeMode.onTouchStart(),s.emit("touchStart",b)}function pb(p){let s=tr(),g=this,b=g.touchEventsData,{params:y,touches:a,rtlTranslate:z,enabled:F}=g;if(!F||!y.simulateTouch&&p.pointerType==="mouse")return;let V=p;if(V.originalEvent&&(V=V.originalEvent),V.type==="pointermove"&&(b.touchId!==null||V.pointerId!==b.pointerId))return;let B;if(V.type==="touchmove"){if(B=[...V.changedTouches].find(M=>M.identifier===b.touchId),!B||B.identifier!==b.touchId)return}else B=V;if(!b.isTouched){b.startMoving&&b.isScrolling&&g.emit("touchMoveOpposite",V);return}let U=B.pageX,O=B.pageY;if(V.preventedByNestedSwiper){a.startX=U,a.startY=O;return}if(!g.allowTouchMove){V.target.matches(b.focusableElements)||(g.allowClick=!1),b.isTouched&&(Object.assign(a,{startX:U,startY:O,currentX:U,currentY:O}),b.touchStartTime=Bn());return}if(y.touchReleaseOnEdges&&!y.loop)if(g.isVertical()){if(O<a.startY&&g.translate<=g.maxTranslate()||O>a.startY&&g.translate>=g.minTranslate()){b.isTouched=!1,b.isMoved=!1;return}}else{if(z&&(U>a.startX&&-g.translate<=g.maxTranslate()||U<a.startX&&-g.translate>=g.minTranslate()))return;if(!z&&(U<a.startX&&g.translate<=g.maxTranslate()||U>a.startX&&g.translate>=g.minTranslate()))return}if(s.activeElement&&s.activeElement.matches(b.focusableElements)&&s.activeElement!==V.target&&V.pointerType!=="mouse"&&s.activeElement.blur(),s.activeElement&&V.target===s.activeElement&&V.target.matches(b.focusableElements)){b.isMoved=!0,g.allowClick=!1;return}b.allowTouchCallbacks&&g.emit("touchMove",V),a.previousX=a.currentX,a.previousY=a.currentY,a.currentX=U,a.currentY=O;let ne=a.currentX-a.startX,re=a.currentY-a.startY;if(g.params.threshold&&Math.sqrt(ne**2+re**2)<g.params.threshold)return;if(typeof b.isScrolling>"u"){let M;g.isHorizontal()&&a.currentY===a.startY||g.isVertical()&&a.currentX===a.startX?b.isScrolling=!1:ne*ne+re*re>=25&&(M=Math.atan2(Math.abs(re),Math.abs(ne))*180/Math.PI,b.isScrolling=g.isHorizontal()?M>y.touchAngle:90-M>y.touchAngle)}if(b.isScrolling&&g.emit("touchMoveOpposite",V),typeof b.startMoving>"u"&&(a.currentX!==a.startX||a.currentY!==a.startY)&&(b.startMoving=!0),b.isScrolling||V.type==="touchmove"&&b.preventTouchMoveFromPointerMove){b.isTouched=!1;return}if(!b.startMoving)return;g.allowClick=!1,!y.cssMode&&V.cancelable&&V.preventDefault(),y.touchMoveStopPropagation&&!y.nested&&V.stopPropagation();let j=g.isHorizontal()?ne:re,H=g.isHorizontal()?a.currentX-a.previousX:a.currentY-a.previousY;y.oneWayMovement&&(j=Math.abs(j)*(z?1:-1),H=Math.abs(H)*(z?1:-1)),a.diff=j,j*=y.touchRatio,z&&(j=-j,H=-H);let ae=g.touchesDirection;g.swipeDirection=j>0?"prev":"next",g.touchesDirection=H>0?"prev":"next";let ge=g.params.loop&&!y.cssMode,ce=g.touchesDirection==="next"&&g.allowSlideNext||g.touchesDirection==="prev"&&g.allowSlidePrev;if(!b.isMoved){if(ge&&ce&&g.loopFix({direction:g.swipeDirection}),b.startTranslate=g.getTranslate(),g.setTransition(0),g.animating){let M=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});g.wrapperEl.dispatchEvent(M)}b.allowMomentumBounce=!1,y.grabCursor&&(g.allowSlideNext===!0||g.allowSlidePrev===!0)&&g.setGrabCursor(!0),g.emit("sliderFirstMove",V)}let le;if(new Date().getTime(),y._loopSwapReset!==!1&&b.isMoved&&b.allowThresholdMove&&ae!==g.touchesDirection&&ge&&ce&&Math.abs(j)>=1){Object.assign(a,{startX:U,startY:O,currentX:U,currentY:O,startTranslate:b.currentTranslate}),b.loopSwapReset=!0,b.startTranslate=b.currentTranslate;return}g.emit("sliderMove",V),b.isMoved=!0,b.currentTranslate=j+b.startTranslate;let we=!0,Le=y.resistanceRatio;if(y.touchReleaseOnEdges&&(Le=0),j>0?(ge&&ce&&!le&&b.allowThresholdMove&&b.currentTranslate>(y.centeredSlides?g.minTranslate()-g.slidesSizesGrid[g.activeIndex+1]-(y.slidesPerView!=="auto"&&g.slides.length-y.slidesPerView>=2?g.slidesSizesGrid[g.activeIndex+1]+g.params.spaceBetween:0)-g.params.spaceBetween:g.minTranslate())&&g.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),b.currentTranslate>g.minTranslate()&&(we=!1,y.resistance&&(b.currentTranslate=g.minTranslate()-1+(-g.minTranslate()+b.startTranslate+j)**Le))):j<0&&(ge&&ce&&!le&&b.allowThresholdMove&&b.currentTranslate<(y.centeredSlides?g.maxTranslate()+g.slidesSizesGrid[g.slidesSizesGrid.length-1]+g.params.spaceBetween+(y.slidesPerView!=="auto"&&g.slides.length-y.slidesPerView>=2?g.slidesSizesGrid[g.slidesSizesGrid.length-1]+g.params.spaceBetween:0):g.maxTranslate())&&g.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:g.slides.length-(y.slidesPerView==="auto"?g.slidesPerViewDynamic():Math.ceil(parseFloat(y.slidesPerView,10)))}),b.currentTranslate<g.maxTranslate()&&(we=!1,y.resistance&&(b.currentTranslate=g.maxTranslate()+1-(g.maxTranslate()-b.startTranslate-j)**Le))),we&&(V.preventedByNestedSwiper=!0),!g.allowSlideNext&&g.swipeDirection==="next"&&b.currentTranslate<b.startTranslate&&(b.currentTranslate=b.startTranslate),!g.allowSlidePrev&&g.swipeDirection==="prev"&&b.currentTranslate>b.startTranslate&&(b.currentTranslate=b.startTranslate),!g.allowSlidePrev&&!g.allowSlideNext&&(b.currentTranslate=b.startTranslate),y.threshold>0)if(Math.abs(j)>y.threshold||b.allowThresholdMove){if(!b.allowThresholdMove){b.allowThresholdMove=!0,a.startX=a.currentX,a.startY=a.currentY,b.currentTranslate=b.startTranslate,a.diff=g.isHorizontal()?a.currentX-a.startX:a.currentY-a.startY;return}}else{b.currentTranslate=b.startTranslate;return}!y.followFinger||y.cssMode||((y.freeMode&&y.freeMode.enabled&&g.freeMode||y.watchSlidesProgress)&&(g.updateActiveIndex(),g.updateSlidesClasses()),y.freeMode&&y.freeMode.enabled&&g.freeMode&&g.freeMode.onTouchMove(),g.updateProgress(b.currentTranslate),g.setTranslate(b.currentTranslate))}function fb(p){let s=this,g=s.touchEventsData,b=p;b.originalEvent&&(b=b.originalEvent);let y;if(b.type==="touchend"||b.type==="touchcancel"){if(y=[...b.changedTouches].find(Le=>Le.identifier===g.touchId),!y||y.identifier!==g.touchId)return}else{if(g.touchId!==null||b.pointerId!==g.pointerId)return;y=b}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(b.type)&&!(["pointercancel","contextmenu"].includes(b.type)&&(s.browser.isSafari||s.browser.isWebView)))return;g.pointerId=null,g.touchId=null;let{params:z,touches:F,rtlTranslate:V,slidesGrid:B,enabled:U}=s;if(!U||!z.simulateTouch&&b.pointerType==="mouse")return;if(g.allowTouchCallbacks&&s.emit("touchEnd",b),g.allowTouchCallbacks=!1,!g.isTouched){g.isMoved&&z.grabCursor&&s.setGrabCursor(!1),g.isMoved=!1,g.startMoving=!1;return}z.grabCursor&&g.isMoved&&g.isTouched&&(s.allowSlideNext===!0||s.allowSlidePrev===!0)&&s.setGrabCursor(!1);let O=Bn(),ne=O-g.touchStartTime;if(s.allowClick){let Le=b.path||b.composedPath&&b.composedPath();s.updateClickedSlide(Le&&Le[0]||b.target,Le),s.emit("tap click",b),ne<300&&O-g.lastClickTime<300&&s.emit("doubleTap doubleClick",b)}if(g.lastClickTime=Bn(),Gs(()=>{s.destroyed||(s.allowClick=!0)}),!g.isTouched||!g.isMoved||!s.swipeDirection||F.diff===0&&!g.loopSwapReset||g.currentTranslate===g.startTranslate&&!g.loopSwapReset){g.isTouched=!1,g.isMoved=!1,g.startMoving=!1;return}g.isTouched=!1,g.isMoved=!1,g.startMoving=!1;let re;if(z.followFinger?re=V?s.translate:-s.translate:re=-g.currentTranslate,z.cssMode)return;if(z.freeMode&&z.freeMode.enabled){s.freeMode.onTouchEnd({currentPos:re});return}let j=re>=-s.maxTranslate()&&!s.params.loop,H=0,ae=s.slidesSizesGrid[0];for(let Le=0;Le<B.length;Le+=Le<z.slidesPerGroupSkip?1:z.slidesPerGroup){let M=Le<z.slidesPerGroupSkip-1?1:z.slidesPerGroup;typeof B[Le+M]<"u"?(j||re>=B[Le]&&re<B[Le+M])&&(H=Le,ae=B[Le+M]-B[Le]):(j||re>=B[Le])&&(H=Le,ae=B[B.length-1]-B[B.length-2])}let ge=null,ce=null;z.rewind&&(s.isBeginning?ce=z.virtual&&z.virtual.enabled&&s.virtual?s.virtual.slides.length-1:s.slides.length-1:s.isEnd&&(ge=0));let le=(re-B[H])/ae,we=H<z.slidesPerGroupSkip-1?1:z.slidesPerGroup;if(ne>z.longSwipesMs){if(!z.longSwipes){s.slideTo(s.activeIndex);return}s.swipeDirection==="next"&&(le>=z.longSwipesRatio?s.slideTo(z.rewind&&s.isEnd?ge:H+we):s.slideTo(H)),s.swipeDirection==="prev"&&(le>1-z.longSwipesRatio?s.slideTo(H+we):ce!==null&&le<0&&Math.abs(le)>z.longSwipesRatio?s.slideTo(ce):s.slideTo(H))}else{if(!z.shortSwipes){s.slideTo(s.activeIndex);return}s.navigation&&(b.target===s.navigation.nextEl||b.target===s.navigation.prevEl)?b.target===s.navigation.nextEl?s.slideTo(H+we):s.slideTo(H):(s.swipeDirection==="next"&&s.slideTo(ge!==null?ge:H+we),s.swipeDirection==="prev"&&s.slideTo(ce!==null?ce:H))}}function Ng(){let p=this,{params:s,el:g}=p;if(g&&g.offsetWidth===0)return;s.breakpoints&&p.setBreakpoint();let{allowSlideNext:b,allowSlidePrev:y,snapGrid:a}=p,z=p.virtual&&p.params.virtual.enabled;p.allowSlideNext=!0,p.allowSlidePrev=!0,p.updateSize(),p.updateSlides(),p.updateSlidesClasses();let F=z&&s.loop;(s.slidesPerView==="auto"||s.slidesPerView>1)&&p.isEnd&&!p.isBeginning&&!p.params.centeredSlides&&!F?p.slideTo(p.slides.length-1,0,!1,!0):p.params.loop&&!z?p.slideToLoop(p.realIndex,0,!1,!0):p.slideTo(p.activeIndex,0,!1,!0),p.autoplay&&p.autoplay.running&&p.autoplay.paused&&(clearTimeout(p.autoplay.resizeTimeout),p.autoplay.resizeTimeout=setTimeout(()=>{p.autoplay&&p.autoplay.running&&p.autoplay.paused&&p.autoplay.resume()},500)),p.allowSlidePrev=y,p.allowSlideNext=b,p.params.watchOverflow&&a!==p.snapGrid&&p.checkOverflow()}function mb(p){let s=this;s.enabled&&(s.allowClick||(s.params.preventClicks&&p.preventDefault(),s.params.preventClicksPropagation&&s.animating&&(p.stopPropagation(),p.stopImmediatePropagation())))}function gb(){let p=this,{wrapperEl:s,rtlTranslate:g,enabled:b}=p;if(!b)return;p.previousTranslate=p.translate,p.isHorizontal()?p.translate=-s.scrollLeft:p.translate=-s.scrollTop,p.translate===0&&(p.translate=0),p.updateActiveIndex(),p.updateSlidesClasses();let y,a=p.maxTranslate()-p.minTranslate();a===0?y=0:y=(p.translate-p.minTranslate())/a,y!==p.progress&&p.updateProgress(g?-p.translate:p.translate),p.emit("setTranslate",p.translate,!1)}function yb(p){let s=this;qu(s,p.target),!(s.params.cssMode||s.params.slidesPerView!=="auto"&&!s.params.autoHeight)&&s.update()}function _b(){let p=this;p.documentTouchHandlerProceeded||(p.documentTouchHandlerProceeded=!0,p.params.touchReleaseOnEdges&&(p.el.style.touchAction="auto"))}var qg=(p,s)=>{let g=tr(),{params:b,el:y,wrapperEl:a,device:z}=p,F=!!b.nested,V=s==="on"?"addEventListener":"removeEventListener",B=s;!y||typeof y=="string"||(g[V]("touchstart",p.onDocumentTouchStart,{passive:!1,capture:F}),y[V]("touchstart",p.onTouchStart,{passive:!1}),y[V]("pointerdown",p.onTouchStart,{passive:!1}),g[V]("touchmove",p.onTouchMove,{passive:!1,capture:F}),g[V]("pointermove",p.onTouchMove,{passive:!1,capture:F}),g[V]("touchend",p.onTouchEnd,{passive:!0}),g[V]("pointerup",p.onTouchEnd,{passive:!0}),g[V]("pointercancel",p.onTouchEnd,{passive:!0}),g[V]("touchcancel",p.onTouchEnd,{passive:!0}),g[V]("pointerout",p.onTouchEnd,{passive:!0}),g[V]("pointerleave",p.onTouchEnd,{passive:!0}),g[V]("contextmenu",p.onTouchEnd,{passive:!0}),(b.preventClicks||b.preventClicksPropagation)&&y[V]("click",p.onClick,!0),b.cssMode&&a[V]("scroll",p.onScroll),b.updateOnWindowResize?p[B](z.ios||z.android?"resize orientationchange observerUpdate":"resize observerUpdate",Ng,!0):p[B]("observerUpdate",Ng,!0),y[V]("load",p.onLoad,{capture:!0}))};function vb(){let p=this,{params:s}=p;p.onTouchStart=db.bind(p),p.onTouchMove=pb.bind(p),p.onTouchEnd=fb.bind(p),p.onDocumentTouchStart=_b.bind(p),s.cssMode&&(p.onScroll=gb.bind(p)),p.onClick=mb.bind(p),p.onLoad=yb.bind(p),qg(p,"on")}function bb(){qg(this,"off")}var xb={attachEvents:vb,detachEvents:bb},jg=(p,s)=>p.grid&&s.grid&&s.grid.rows>1;function wb(){let p=this,{realIndex:s,initialized:g,params:b,el:y}=p,a=b.breakpoints;if(!a||a&&Object.keys(a).length===0)return;let z=tr(),F=b.breakpointsBase==="window"||!b.breakpointsBase?b.breakpointsBase:"container",V=["window","container"].includes(b.breakpointsBase)||!b.breakpointsBase?p.el:z.querySelector(b.breakpointsBase),B=p.getBreakp
vendor: 11,173 bytes, line 728
728oint(a,F,V);if(!B||p.currentBreakpoint===B)return;let O=(B in a?a[B]:void 0)||p.originalParams,ne=jg(p,b),re=jg(p,O),j=p.params.grabCursor,H=O.grabCursor,ae=b.enabled;ne&&!re?(y.classList.remove(`${b.containerModifierClass}grid`,`${b.containerModifierClass}grid-column`),p.emitContainerClasses()):!ne&&re&&(y.classList.add(`${b.containerModifierClass}grid`),(O.grid.fill&&O.grid.fill==="column"||!O.grid.fill&&b.grid.fill==="column")&&y.classList.add(`${b.containerModifierClass}grid-column`),p.emitContainerClasses()),j&&!H?p.unsetGrabCursor():!j&&H&&p.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(M=>{if(typeof O[M]>"u")return;let ze=b[M]&&b[M].enabled,Oe=O[M]&&O[M].enabled;ze&&!Oe&&p[M].disable(),!ze&&Oe&&p[M].enable()});let ge=O.direction&&O.direction!==b.direction,ce=b.loop&&(O.slidesPerView!==b.slidesPerView||ge),le=b.loop;ge&&g&&p.changeDirection(),Hn(p.params,O);let we=p.params.enabled,Le=p.params.loop;Object.assign(p,{allowTouchMove:p.params.allowTouchMove,allowSlideNext:p.params.allowSlideNext,allowSlidePrev:p.params.allowSlidePrev}),ae&&!we?p.disable():!ae&&we&&p.enable(),p.currentBreakpoint=B,p.emit("_beforeBreakpoint",O),g&&(ce?(p.loopDestroy(),p.loopCreate(s),p.updateSlides()):!le&&Le?(p.loopCreate(s),p.updateSlides()):le&&!Le&&p.loopDestroy()),p.emit("breakpoint",O)}function Sb(p,s,g){if(s===void 0&&(s="window"),!p||s==="container"&&!g)return;let b=!1,y=Oi(),a=s==="window"?y.innerHeight:g.clientHeight,z=Object.keys(p).map(F=>{if(typeof F=="string"&&F.indexOf("@")===0){let V=parseFloat(F.substr(1));return{value:a*V,point:F}}return{value:F,point:F}});z.sort((F,V)=>parseInt(F.value,10)-parseInt(V.value,10));for(let F=0;F<z.length;F+=1){let{point:V,value:B}=z[F];s==="window"?y.matchMedia(`(min-width: ${B}px)`).matches&&(b=V):B<=g.clientWidth&&(b=V)}return b||"max"}var Tb={setBreakpoint:wb,getBreakpoint:Sb};function Pb(p,s){let g=[];return p.forEach(b=>{typeof b=="object"?Object.keys(b).forEach(y=>{b[y]&&g.push(s+y)}):typeof b=="string"&&g.push(s+b)}),g}function Eb(){let p=this,{classNames:s,params:g,rtl:b,el:y,device:a}=p,z=Pb(["initialized",g.direction,{"free-mode":p.params.freeMode&&g.freeMode.enabled},{autoheight:g.autoHeight},{rtl:b},{grid:g.grid&&g.grid.rows>1},{"grid-column":g.grid&&g.grid.rows>1&&g.grid.fill==="column"},{android:a.android},{ios:a.ios},{"css-mode":g.cssMode},{centered:g.cssMode&&g.centeredSlides},{"watch-progress":g.watchSlidesProgress}],g.containerModifierClass);s.push(...z),y.classList.add(...s),p.emitContainerClasses()}function Mb(){let p=this,{el:s,classNames:g}=p;!s||typeof s=="string"||(s.classList.remove(...g),p.emitContainerClasses())}var Cb={addClasses:Eb,removeClasses:Mb};function Ib(){let p=this,{isLocked:s,params:g}=p,{slidesOffsetBefore:b}=g;if(b){let y=p.slides.length-1,a=p.slidesGrid[y]+p.slidesSizesGrid[y]+b*2;p.isLocked=p.size>a}else p.isLocked=p.snapGrid.length===1;g.allowSlideNext===!0&&(p.allowSlideNext=!p.isLocked),g.allowSlidePrev===!0&&(p.allowSlidePrev=!p.isLocked),s&&s!==p.isLocked&&(p.isEnd=!1),s!==p.isLocked&&p.emit(p.isLocked?"lock":"unlock")}var Ab={checkOverflow:Ib},$g={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function Db(p,s){return function(b){b===void 0&&(b={});let y=Object.keys(b)[0],a=b[y];if(typeof a!="object"||a===null){Hn(s,b);return}if(p[y]===!0&&(p[y]={enabled:!0}),y==="navigation"&&p[y]&&p[y].enabled&&!p[y].prevEl&&!p[y].nextEl&&(p[y].auto=!0),["pagination","scrollbar"].indexOf(y)>=0&&p[y]&&p[y].enabled&&!p[y].el&&(p[y].auto=!0),!(y in p&&"enabled"in a)){Hn(s,b);return}typeof p[y]=="object"&&!("enabled"in p[y])&&(p[y].enabled=!0),p[y]||(p[y]={enabled:!1}),Hn(s,b)}}var Sd={eventsEmitter:C0,update:N0,translate:H0,transition:X0,slide:rb,loop:ob,grabCursor:ub,events:xb,breakpoints:Tb,checkOverflow:Ab,classes:Cb},Td={},ma=class p{constructor(){let s,g;for(var b=arguments.length,y=new Array(b),a=0;a<b;a++)y[a]=arguments[a];y.length===1&&y[0].constructor&&Object.prototype.toString.call(y[0]).slice(8,-1)==="Object"?g=y[0]:[s,g]=y,g||(g={}),g=Hn({},g),s&&!g.el&&(g.el=s);let z=tr();if(g.el&&typeof g.el=="string"&&z.querySelectorAll(g.el).length>1){let U=[];return z.querySelectorAll(g.el).forEach(O=>{let ne=Hn({},g,{el:O});U.push(new p(ne))}),U}let F=this;F.__swiper__=!0,F.support=Vg(),F.device=Ug({userAgent:g.userAgent}),F.browser=Gg(),F.eventsListeners={},F.eventsAnyListeners=[],F.modules=[...F.__modules__],g.modules&&Array.isArray(g.modules)&&F.modules.push(...g.modules);let V={};F.modules.forEach(U=>{U({params:g,swiper:F,extendParams:Db(g,V),on:F.on.bind(F),once:F.once.bind(F),off:F.off.bind(F),emit:F.emit.bind(F)})});let B=Hn({},$g,V);return F.params=Hn({},B,Td,g),F.originalParams=Hn({},F.params),F.passedParams=Hn({},g),F.params&&F.params.on&&Object.keys(F.params.on).forEach(U=>{F.on(U,F.params.on[U])}),F.params&&F.params.onAny&&F.onAny(F.params.onAny),Object.assign(F,{enabled:F.params.enabled,el:s,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return F.params.direction==="horizontal"},isVertical(){return F.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:F.params.allowSlideNext,allowSlidePrev:F.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:F.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:F.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),F.emit("_swiper"),F.params.init&&F.init(),F}getDirectionLabel(s){return this.isHorizontal()?s:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[s]}getSlideIndex(s){let{slidesEl:g,params:b}=this,y=vr(g,`.${b.slideClass}, swiper-slide`),a=ho(y[0]);return ho(s)-a}getSlideIndexByData(s){return this.getSlideIndex(this.slides.find(g=>g.getAttribute("data-swiper-slide-index")*1===s))}recalcSlides(){let s=this,{slidesEl:g,params:b}=s;s.slides=vr(g,`.${b.slideClass}, swiper-slide`)}enable(){let s=this;s.enabled||(s.enabled=!0,s.params.grabCursor&&s.setGrabCursor(),s.emit("enable"))}disable(){let s=this;s.enabled&&(s.enabled=!1,s.params.grabCursor&&s.unsetGrabCursor(),s.emit("disable"))}setProgress(s,g){let b=this;s=Math.min(Math.max(s,0),1);let y=b.minTranslate(),z=(b.maxTranslate()-y)*s+y;b.translateTo(z,typeof g>"u"?0:g),b.updateActiveIndex(),b.updateSlidesClasses()}emitContainerClasses(){let s=this;if(!s.params._emitClasses||!s.el)return;let g=s.el.className.split(" ").filter(b=>b.indexOf("swiper")===0||b.indexOf(s.params.containerModifierClass)===0);s.emit("_containerClasses",g.join(" "))}getSlideClasses(s){let g=this;return g.destroyed?"":s.className.split(" ").filter(b=>b.indexOf("swiper-slide")===0||b.indexOf(g.params.slideClass)===0).join(" ")}emitSlidesClasses(){let s=this;if(!s.params._emitClasses||!s.el)return;let g=[];s.slides.forEach(b=>{let y=s.getSlideClasses(b);g.push({slideEl:b,classNames:y}),s.emit("_slideClass",b,y)}),s.emit("_slideClasses",g)}slidesPerViewDynamic(s,g){s===void 0&&(s="current"),g===void 0&&(g=!1);let b=this,{params:y,slides:a,slidesGrid:z,slidesSizesGrid:F,size:V,activeIndex:B}=b,U=1;if(typeof y.slidesPerView=="number")return y.slidesPerView;if(y.centeredSlides){let O=a[B]?Math.ceil(a[B].swiperSlideSize):0,ne;for(let re=B+1;re<a.length;re+=1)a[re]&&!ne&&(O+=Math.ceil(a[re].swiperSlideSize),U+=1,O>V&&(ne=!0));for(let re=B-1;re>=0;re-=1)a[re]&&!ne&&(O+=a[re].swiperSlideSize,U+=1,O>V&&(ne=!0))}else if(s==="current")for(let O=B+1;O<a.length;O+=1)(g?z[O]+F[O]-z[B]<V:z[O]-z[B]<V)&&(U+=1);else for(let O=B-1;O>=0;O-=1)z[B]-z[O]<V&&(U+=1);return U}update(){let s=this;if(!s||s.destroyed)return;let{snapGrid:g,params:b}=s;b.breakpoints&&s.setBreakpoint(),[...s.el.querySelectorAll('[loading="lazy"]')].forEach(z=>{z.complete&&qu(s,z)}),s.updateSize(),s.updateSlides(),s.updateProgress(),s.updateSlidesClasses();function y(){let z=s.rtlTranslate?s.translate*-1:s.translate,F=Math.min(Math.max(z,s.maxTranslate()),s.minTranslate());s.setTranslate(F),s.updateActiveIndex(),s.updateSlidesClasses()}let a;if(b.freeMode&&b.freeMode.enabled&&!b.cssMode)y(),b.autoHeight&&s.updateAutoHeight();else{if((b.slidesPerView==="auto"||b.slidesPerView>1)&&s.isEnd&&!b.centeredSlides){let z=s.virtual&&b.virtual.enabled?s.virtual.slides:s.slides;a=s.slideTo(z.length-1,0,!1,!0)}else a=s.slideTo(s.activeIndex,0,!1,!0);a||y()}b.watchOverflow&&g!==s.snapGrid&&s.checkOverflow(),s.emit("update")}changeDirection(s,g){g===void 0&&(g=!0);let b=this,y=b.params.direction;return s||(s=y==="horizontal"?"vertical":"horizontal"),s===y||s!=="horizontal"&&s!=="vertical"||(b.el.classList.remove(`${b.params.containerModifierClass}${y}`),b.el.classList.add(`${b.params.containerModifierClass}${s}`),b.emitContainerClasses(),b.params.direction=s,b.slides.forEac
vendor: 11,899 bytes, line 728
728h(a=>{s==="vertical"?a.style.width="":a.style.height=""}),b.emit("changeDirection"),g&&b.update()),b}changeLanguageDirection(s){let g=this;g.rtl&&s==="rtl"||!g.rtl&&s==="ltr"||(g.rtl=s==="rtl",g.rtlTranslate=g.params.direction==="horizontal"&&g.rtl,g.rtl?(g.el.classList.add(`${g.params.containerModifierClass}rtl`),g.el.dir="rtl"):(g.el.classList.remove(`${g.params.containerModifierClass}rtl`),g.el.dir="ltr"),g.update())}mount(s){let g=this;if(g.mounted)return!0;let b=s||g.params.el;if(typeof b=="string"&&(b=document.querySelector(b)),!b)return!1;b.swiper=g,b.parentNode&&b.parentNode.host&&b.parentNode.host.nodeName===g.params.swiperElementNodeName.toUpperCase()&&(g.isElement=!0);let y=()=>`.${(g.params.wrapperClass||"").trim().split(" ").join(".")}`,z=b&&b.shadowRoot&&b.shadowRoot.querySelector?b.shadowRoot.querySelector(y()):vr(b,y())[0];return!z&&g.params.createElements&&(z=Xr("div",g.params.wrapperClass),b.append(z),vr(b,`.${g.params.slideClass}`).forEach(F=>{z.append(F)})),Object.assign(g,{el:b,wrapperEl:z,slidesEl:g.isElement&&!b.parentNode.host.slideSlots?b.parentNode.host:z,hostEl:g.isElement?b.parentNode.host:b,mounted:!0,rtl:b.dir.toLowerCase()==="rtl"||Na(b,"direction")==="rtl",rtlTranslate:g.params.direction==="horizontal"&&(b.dir.toLowerCase()==="rtl"||Na(b,"direction")==="rtl"),wrongRTL:Na(z,"display")==="-webkit-box"}),!0}init(s){let g=this;if(g.initialized||g.mount(s)===!1)return g;g.emit("beforeInit"),g.params.breakpoints&&g.setBreakpoint(),g.addClasses(),g.updateSize(),g.updateSlides(),g.params.watchOverflow&&g.checkOverflow(),g.params.grabCursor&&g.enabled&&g.setGrabCursor(),g.params.loop&&g.virtual&&g.params.virtual.enabled?g.slideTo(g.params.initialSlide+g.virtual.slidesBefore,0,g.params.runCallbacksOnInit,!1,!0):g.slideTo(g.params.initialSlide,0,g.params.runCallbacksOnInit,!1,!0),g.params.loop&&g.loopCreate(void 0,!0),g.attachEvents();let y=[...g.el.querySelectorAll('[loading="lazy"]')];return g.isElement&&y.push(...g.hostEl.querySelectorAll('[loading="lazy"]')),y.forEach(a=>{a.complete?qu(g,a):a.addEventListener("load",z=>{qu(g,z.target)})}),Pd(g),g.initialized=!0,Pd(g),g.emit("init"),g.emit("afterInit"),g}destroy(s,g){s===void 0&&(s=!0),g===void 0&&(g=!0);let b=this,{params:y,el:a,wrapperEl:z,slides:F}=b;return typeof b.params>"u"||b.destroyed||(b.emit("beforeDestroy"),b.initialized=!1,b.detachEvents(),y.loop&&b.loopDestroy(),g&&(b.removeClasses(),a&&typeof a!="string"&&a.removeAttribute("style"),z&&z.removeAttribute("style"),F&&F.length&&F.forEach(V=>{V.classList.remove(y.slideVisibleClass,y.slideFullyVisibleClass,y.slideActiveClass,y.slideNextClass,y.slidePrevClass),V.removeAttribute("style"),V.removeAttribute("data-swiper-slide-index")})),b.emit("destroy"),Object.keys(b.eventsListeners).forEach(V=>{b.off(V)}),s!==!1&&(b.el&&typeof b.el!="string"&&(b.el.swiper=null),Lg(b)),b.destroyed=!0),null}static extendDefaults(s){Hn(Td,s)}static get extendedDefaults(){return Td}static get defaults(){return $g}static installModule(s){p.prototype.__modules__||(p.prototype.__modules__=[]);let g=p.prototype.__modules__;typeof s=="function"&&g.indexOf(s)<0&&g.push(s)}static use(s){return Array.isArray(s)?(s.forEach(g=>p.installModule(g)),p):(p.installModule(s),p)}};Object.keys(Sd).forEach(p=>{Object.keys(Sd[p]).forEach(s=>{ma.prototype[s]=Sd[p][s]})});ma.use([E0,M0]);function Zg(p){let{swiper:s,extendParams:g,on:b,emit:y}=p;g({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}});let a,z=tr();s.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]};let F=z.createElement("div");function V(j,H){let ae=s.params.virtual;if(ae.cache&&s.virtual.cache[H])return s.virtual.cache[H];let ge;return ae.renderSlide?(ge=ae.renderSlide.call(s,j,H),typeof ge=="string"&&(F.innerHTML=ge,ge=F.children[0])):s.isElement?ge=Xr("swiper-slide"):ge=Xr("div",s.params.slideClass),ge.setAttribute("data-swiper-slide-index",H),ae.renderSlide||(ge.innerHTML=j),ae.cache&&(s.virtual.cache[H]=ge),ge}function B(j,H,ae){let{slidesPerView:ge,slidesPerGroup:ce,centeredSlides:le,loop:we,initialSlide:Le}=s.params;if(H&&!we&&Le>0)return;let{addSlidesBefore:M,addSlidesAfter:ze}=s.params.virtual,{from:Oe,to:qe,slides:$e,slidesGrid:Qe,offset:Ne}=s.virtual;s.params.cssMode||s.updateActiveIndex();let Je=typeof ae>"u"?s.activeIndex||0:ae,Ye;s.rtlTranslate?Ye="right":Ye=s.isHorizontal()?"left":"top";let bt,_t;le?(bt=Math.floor(ge/2)+ce+ze,_t=Math.floor(ge/2)+ce+M):(bt=ge+(ce-1)+ze,_t=(we?ge:ce)+M);let He=Je-_t,Xe=Je+bt;we||(He=Math.max(He,0),Xe=Math.min(Xe,$e.length-1));let At=(s.slidesGrid[He]||0)-(s.slidesGrid[0]||0);we&&Je>=_t?(He-=_t,le||(At+=s.slidesGrid[0])):we&&Je<_t&&(He=-_t,le&&(At+=s.slidesGrid[0])),Object.assign(s.virtual,{from:He,to:Xe,offset:At,slidesGrid:s.slidesGrid,slidesBefore:_t,slidesAfter:bt});function Yt(){s.updateSlides(),s.updateProgress(),s.updateSlidesClasses(),y("virtualUpdate")}if(Oe===He&&qe===Xe&&!j){s.slidesGrid!==Qe&&At!==Ne&&s.slides.forEach(yt=>{yt.style[Ye]=`${At-Math.abs(s.cssOverflowAdjustment())}px`}),s.updateProgress(),y("virtualUpdate");return}if(s.params.virtual.renderExternal){s.params.virtual.renderExternal.call(s,{offset:At,from:He,to:Xe,slides:function(){let Tt=[];for(let oi=He;oi<=Xe;oi+=1)Tt.push($e[oi]);return Tt}()}),s.params.virtual.renderExternalUpdate?Yt():y("virtualUpdate");return}let xi=[],Pi=[],Ai=yt=>{let Tt=yt;return yt<0?Tt=$e.length+yt:Tt>=$e.length&&(Tt=Tt-$e.length),Tt};if(j)s.slides.filter(yt=>yt.matches(`.${s.params.slideClass}, swiper-slide`)).forEach(yt=>{yt.remove()});else for(let yt=Oe;yt<=qe;yt+=1)if(yt<He||yt>Xe){let Tt=Ai(yt);s.slides.filter(oi=>oi.matches(`.${s.params.slideClass}[data-swiper-slide-index="${Tt}"], swiper-slide[data-swiper-slide-index="${Tt}"]`)).forEach(oi=>{oi.remove()})}let ln=we?-$e.length:0,wt=we?$e.length*2:$e.length;for(let yt=ln;yt<wt;yt+=1)if(yt>=He&&yt<=Xe){let Tt=Ai(yt);typeof qe>"u"||j?Pi.push(Tt):(yt>qe&&Pi.push(Tt),yt<Oe&&xi.push(Tt))}if(Pi.forEach(yt=>{s.slidesEl.append(V($e[yt],yt))}),we)for(let yt=xi.length-1;yt>=0;yt-=1){let Tt=xi[yt];s.slidesEl.prepend(V($e[Tt],Tt))}else xi.sort((yt,Tt)=>Tt-yt),xi.forEach(yt=>{s.slidesEl.prepend(V($e[yt],yt))});vr(s.slidesEl,".swiper-slide, swiper-slide").forEach(yt=>{yt.style[Ye]=`${At-Math.abs(s.cssOverflowAdjustment())}px`}),Yt()}function U(j){if(typeof j=="object"&&"length"in j)for(let H=0;H<j.length;H+=1)j[H]&&s.virtual.slides.push(j[H]);else s.virtual.slides.push(j);B(!0)}function O(j){let H=s.activeIndex,ae=H+1,ge=1;if(Array.isArray(j)){for(let ce=0;ce<j.length;ce+=1)j[ce]&&s.virtual.slides.unshift(j[ce]);ae=H+j.length,ge=j.length}else s.virtual.slides.unshift(j);if(s.params.virtual.cache){let ce=s.virtual.cache,le={};Object.keys(ce).forEach(we=>{let Le=ce[we],M=Le.getAttribute("data-swiper-slide-index");M&&Le.setAttribute("data-swiper-slide-index",parseInt(M,10)+ge),le[parseInt(we,10)+ge]=Le}),s.virtual.cache=le}B(!0),s.slideTo(ae,0)}function ne(j){if(typeof j>"u"||j===null)return;let H=s.activeIndex;if(Array.isArray(j))for(let ae=j.length-1;ae>=0;ae-=1)s.params.virtual.cache&&(delete s.virtual.cache[j[ae]],Object.keys(s.virtual.cache).forEach(ge=>{ge>j&&(s.virtual.cache[ge-1]=s.virtual.cache[ge],s.virtual.cache[ge-1].setAttribute("data-swiper-slide-index",ge-1),delete s.virtual.cache[ge])})),s.virtual.slides.splice(j[ae],1),j[ae]<H&&(H-=1),H=Math.max(H,0);else s.params.virtual.cache&&(delete s.virtual.cache[j],Object.keys(s.virtual.cache).forEach(ae=>{ae>j&&(s.virtual.cache[ae-1]=s.virtual.cache[ae],s.virtual.cache[ae-1].setAttribute("data-swiper-slide-index",ae-1),delete s.virtual.cache[ae])})),s.virtual.slides.splice(j,1),j<H&&(H-=1),H=Math.max(H,0);B(!0),s.slideTo(H,0)}function re(){s.virtual.slides=[],s.params.virtual.cache&&(s.virtual.cache={}),B(!0),s.slideTo(0,0)}b("beforeInit",()=>{if(!s.params.virtual.enabled)return;let j;if(typeof s.passedParams.virtual.slides>"u"){let H=[...s.slidesEl.children].filter(ae=>ae.matches(`.${s.params.slideClass}, swiper-slide`));H&&H.length&&(s.virtual.slides=[...H],j=!0,H.forEach((ae,ge)=>{ae.setAttribute("data-swiper-slide-index",ge),s.virtual.cache[ge]=ae,ae.remove()}))}j||(s.virtual.slides=s.params.virtual.slides),s.classNames.push(`${s.params.containerModifierClass}virtual`),s.params.watchSlidesProgress=!0,s.originalParams.watchSlidesProgress=!0,B(!1,!0)}),b("setTranslate",()=>{s.params.virtual.enabled&&(s.params.cssMode&&!s._immediateVirtual?(clearTimeout(a),a=setTimeout(()=>{B()},100)):B())}),b("init update resize",()=>{s.params.virtual.enabled&&s.params.cssMode&&Jo(s.wrapperEl,"--swiper-virtual-size",`${s.virtualSize}px`)}),Object.assign(s.virtual,{appendSlide:U,prependSlide:O,removeSlide:ne,removeAllSlides:re,update:B})}function Wg(p){let{swiper:s,extendParams:g,on:b,emit:y}=p,a=tr(),z=Oi();s.keyboard={enabled:!1},g({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}});function F(U){if(!s.enabled)return;let{rtlTranslate:O}=s,ne=U;ne.originalEvent&&(ne=ne.originalEvent);let re=ne.keyCode||ne.charCode,j=s.params.keyboard.pageUpDown,H=j&&re===33,ae=j&&re===34,ge=re===37,ce=re===39,le=re===38,we=re===40;if(!s.allowSlideNext&&(s.isHorizontal()&&ce||s.isVertical()&&we||ae)||!s.allowSlidePrev&&(s.isHorizontal()&&ge||s.isVertical()&&le||H))return!1;if(!(ne.shiftKey||ne.altKey||ne.ctrlKey||ne.metaKey)&&!(a.activeElement&&a.activeElement.nodeName&&(a.activeElement.nodeName.toLowerCase()==="input"||a.activeElement.nodeName.toLowerCase()==="textarea"))){if(s.params.keyboard.onlyInViewport&&(H||ae||ge||ce||le||we)){let Le=!1;if(Hs(s.el,`.${s.params.slideClass}, swiper-slide`).length>0&&Hs(s.el,`.${s.params.slideActiveClass}`).length===0)return;let M=s.el,ze=M.clientWidth,Oe=M.clientHeight,qe=z.innerWidth,$e=z.innerHeight,Qe=Qo(M);O&&(Qe.left-=M.scrollLeft);let Ne=[[Qe.left,Qe.top],[Qe.left+ze,Qe.top],[Qe.left,Qe.top+Oe],[Qe.left+ze,Qe.top+Oe]];for(let Je=0;Je<Ne.length;Je+=1){let Ye=Ne[Je];if(Ye[0]>=0&&Ye[0]<=qe&&Ye[1]>=0&&Ye[1]<=$e){if(Ye[0]===0&&Ye[1]===0)continue;Le=!0}}if(!Le)return}s.isHorizontal()?((H||ae||ge||ce)&&(ne.preventDefault?ne.preventDefault():ne.returnValue=!1),((ae||ce)&&!O||(H||ge)&&O)&&s.slideNext(),((H||ge)&&!O||(ae||ce)&&O)&&s.slidePrev()):((H||ae||le||we)&&(ne.preventDefault?ne.preventDefault():ne.returnValue=!1),(ae||we)&&s.slideNext(),(H||le)&&s.slidePrev()),y("keyPress",re)}}function V(){s.keyboard.enabled||(a.addEventListener("keydown",F),s.keyboard.enabled=!0)}function B(){s.keyboard.enabled&&(a.removeEventListener("keydown",F),s.keyboard.enabled=!1)}b("init",()=>{s.params.keyboard.enabled&&V()}),b("destroy",()=>{s.keyboard.enabled&&B()}),Object.assign(s.keyboard,{enable:V,disable:B})}function Xg(p){let{swiper:s,extendParams:g,on:b,emit:y}=p,a=Oi();g({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),s.mousewheel={enabled:!1};let z,F=Bn(),V,B=[];function U(le){let ze=0,Oe=0,qe=0,$e=0;return"detail"in le&&(Oe=le.detail),"wheelDelta"in le&&(Oe=-le.wheelDelta/120),"wheelDeltaY"in le&&(Oe=-le.wheelDeltaY/120),"wheelDeltaX"in le&&(ze=-le.wheelDeltaX/120),"axis"in le&&le.axis===le.HORIZONTAL_AXIS&&(ze=Oe,Oe=0),qe=ze*10,$e=Oe*10,"deltaY"in le&&($e=le.deltaY),"deltaX"in le&&(qe=le.deltaX),le.shiftKey&&!qe&&(qe=$e,$e=0),(qe||$e)&&le.deltaMode&&(le.deltaMode===1?(qe*=40,$e*=40):(qe*=800,$e*=800)),qe&&!ze&&(ze=qe<1?-1:1),$e&&!Oe&&(Oe=$e<1?-1:1),{spinX:ze,spinY:Oe,pixelX:qe,pixelY:$e}}function O(){s.enabled&&(s.mouseEntered=!0)}function ne(){s.enabled&&(s.mouseEntered=!1)}function re(le){return s.params.mousewheel.thresholdDelta&&le.delta<s.params.mousewheel.thresholdDelta||s.params.mousewheel.thresholdTime&&Bn()-F<s.params.mousewheel.thresholdTime?!1:le.delta>=6&&Bn()-F<60?!0:(le.direction<0?(!s.isEnd||s.params.loop)&&!s.animating&&(s.slideNext(),y("scroll",le.raw)):(!s.isBeg
vendor: 1,535 bytes, line 728
728inning||s.params.loop)&&!s.animating&&(s.slidePrev(),y("scroll",le.raw)),F=new a.Date().getTime(),!1)}function j(le){let we=s.params.mousewheel;if(le.direction<0){if(s.isEnd&&!s.params.loop&&we.releaseOnEdges)return!0}else if(s.isBeginning&&!s.params.loop&&we.releaseOnEdges)return!0;return!1}function H(le){let we=le,Le=!0;if(!s.enabled||le.target.closest(`.${s.params.mousewheel.noMousewheelClass}`))return;let M=s.params.mousewheel;s.params.cssMode&&we.preventDefault();let ze=s.el;s.params.mousewheel.eventsTarget!=="container"&&(ze=document.querySelector(s.params.mousewheel.eventsTarget));let Oe=ze&&ze.contains(we.target);if(!s.mouseEntered&&!Oe&&!M.releaseOnEdges)return!0;we.originalEvent&&(we=we.originalEvent);let qe=0,$e=s.rtlTranslate?-1:1,Qe=U(we);if(M.forceToAxis)if(s.isHorizontal())if(Math.abs(Qe.pixelX)>Math.abs(Qe.pixelY))qe=-Qe.pixelX*$e;else return!0;else if(Math.abs(Qe.pixelY)>Math.abs(Qe.pixelX))qe=-Qe.pixelY;else return!0;else qe=Math.abs(Qe.pixelX)>Math.abs(Qe.pixelY)?-Qe.pixelX*$e:-Qe.pixelY;if(qe===0)return!0;M.invert&&(qe=-qe);let Ne=s.getTranslate()+qe*M.sensitivity;if(Ne>=s.minTranslate()&&(Ne=s.minTranslate()),Ne<=s.maxTranslate()&&(Ne=s.maxTranslate()),Le=s.params.loop?!0:!(Ne===s.minTranslate()||Ne===s.maxTranslate()),Le&&s.params.nested&&we.stopPropagation(),!s.params.freeMode||!s.params.freeMode.enabled){let Je={time:Bn(),delta:Math.abs(qe),direction:Math.sign(qe),raw:le};B.length>=2&&B.shift();let Ye=B.length?B[B.length-1]:void 0;if(B.push(Je),Ye?(Je.direction!==Ye.direction||Je.delta>
vendor: 3,038 bytes, line 728
728Ye.delta||Je.time>Ye.time+150)&&re(Je):re(Je),j(Je))return!0}else{let Je={time:Bn(),delta:Math.abs(qe),direction:Math.sign(qe)},Ye=V&&Je.time<V.time+500&&Je.delta<=V.delta&&Je.direction===V.direction;if(!Ye){V=void 0;let bt=s.getTranslate()+qe*M.sensitivity,_t=s.isBeginning,He=s.isEnd;if(bt>=s.minTranslate()&&(bt=s.minTranslate()),bt<=s.maxTranslate()&&(bt=s.maxTranslate()),s.setTransition(0),s.setTranslate(bt),s.updateProgress(),s.updateActiveIndex(),s.updateSlidesClasses(),(!_t&&s.isBeginning||!He&&s.isEnd)&&s.updateSlidesClasses(),s.params.loop&&s.loopFix({direction:Je.direction<0?"next":"prev",byMousewheel:!0}),s.params.freeMode.sticky){clearTimeout(z),z=void 0,B.length>=15&&B.shift();let Xe=B.length?B[B.length-1]:void 0,At=B[0];if(B.push(Je),Xe&&(Je.delta>Xe.delta||Je.direction!==Xe.direction))B.splice(0);else if(B.length>=15&&Je.time-At.time<500&&At.delta-Je.delta>=1&&Je.delta<=6){let Yt=qe>0?.8:.2;V=Je,B.splice(0),z=Gs(()=>{s.destroyed||!s.params||s.slideToClosest(s.params.speed,!0,void 0,Yt)},0)}z||(z=Gs(()=>{if(s.destroyed||!s.params)return;let Yt=.5;V=Je,B.splice(0),s.slideToClosest(s.params.speed,!0,void 0,Yt)},500))}if(Ye||y("scroll",we),s.params.autoplay&&s.params.autoplay.disableOnInteraction&&s.autoplay.stop(),M.releaseOnEdges&&(bt===s.minTranslate()||bt===s.maxTranslate()))return!0}}return we.preventDefault?we.preventDefault():we.returnValue=!1,!1}function ae(le){let we=s.el;s.params.mousewheel.eventsTarget!=="container"&&(we=document.querySelector(s.params.mousewheel.eventsTarget)),we[le]("mouseenter",O),we[le]("mouseleave",ne),we[le]("wheel",H)}function ge(){return s.params.cssMode?(s.wrapperEl.removeEventListener("wheel",H),!0):s.mousewheel.enabled?!1:(ae("addEventListener"),s.mousewheel.enabled=!0,!0)}function ce(){return s.params.cssMode?(s.wrapperEl.addEventListener(event,H),!0):s.mousewheel.enabled?(ae("removeEventListener"),s.mousewheel.enabled=!1,!0):!1}b("init",()=>{!s.params.mousewheel.enabled&&s.params.cssMode&&ce(),s.params.mousewheel.enabled&&ge()}),b("destroy",()=>{s.params.cssMode&&ge(),s.mousewheel.enabled&&ce()}),Object.assign(s.mousewheel,{enable:ge,disable:ce})}function Vl(p,s,g,b){return p.params.createElements&&Object.keys(b).forEach(y=>{if(!g[y]&&g.auto===!0){let a=vr(p.el,`.${b[y]}`)[0];a||(a=Xr("div",b[y]),a.className=b[y],p.el.append(a)),g[y]=a,s[y]=a}}),g}function Yg(p){let{swiper:s,extendParams:g,on:b,emit:y}=p;g({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),s.navigation={nextEl:null,prevEl:null};function a(j){let H;return j&&typeof j=="string"&&s.isElement&&(H=s.el.querySelector(j)||s.hostEl.querySelector(j),H)?H:(j&&(typeof j=="string"&&(H=[...document.querySelectorAll(j)]),s.params.uniqueNavElements&&typeof j=="string"&&H&&H.length>1&&s.el.querySelectorAll(j).length===1?H=s.el.querySelector(j):H&&H.length===1&&(H=H[0])),j&&!H?j:H)}function z(j,H){let ae=s.params.navigation;
vendor: 4,625 bytes, line 728
728j=bi(j),j.forEach(ge=>{ge&&(ge.classList[H?"add":"remove"](...ae.disabledClass.split(" ")),ge.tagName==="BUTTON"&&(ge.disabled=H),s.params.watchOverflow&&s.enabled&&ge.classList[s.isLocked?"add":"remove"](ae.lockClass))})}function F(){let{nextEl:j,prevEl:H}=s.navigation;if(s.params.loop){z(H,!1),z(j,!1);return}z(H,s.isBeginning&&!s.params.rewind),z(j,s.isEnd&&!s.params.rewind)}function V(j){j.preventDefault(),!(s.isBeginning&&!s.params.loop&&!s.params.rewind)&&(s.slidePrev(),y("navigationPrev"))}function B(j){j.preventDefault(),!(s.isEnd&&!s.params.loop&&!s.params.rewind)&&(s.slideNext(),y("navigationNext"))}function U(){let j=s.params.navigation;if(s.params.navigation=Vl(s,s.originalParams.navigation,s.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(j.nextEl||j.prevEl))return;let H=a(j.nextEl),ae=a(j.prevEl);Object.assign(s.navigation,{nextEl:H,prevEl:ae}),H=bi(H),ae=bi(ae);let ge=(ce,le)=>{ce&&ce.addEventListener("click",le==="next"?B:V),!s.enabled&&ce&&ce.classList.add(...j.lockClass.split(" "))};H.forEach(ce=>ge(ce,"next")),ae.forEach(ce=>ge(ce,"prev"))}function O(){let{nextEl:j,prevEl:H}=s.navigation;j=bi(j),H=bi(H);let ae=(ge,ce)=>{ge.removeEventListener("click",ce==="next"?B:V),ge.classList.remove(...s.params.navigation.disabledClass.split(" "))};j.forEach(ge=>ae(ge,"next")),H.forEach(ge=>ae(ge,"prev"))}b("init",()=>{s.params.navigation.enabled===!1?re():(U(),F())}),b("toEdge fromEdge lock unlock",()=>{F()}),b("destroy",()=>{O()}),b("enable disable",()=>{let{nextEl:j,prevEl:H}=s.navigation;if(j=bi(j),H=bi(H),s.enabled){F();return}[...j,...H].filter(ae=>!!ae).forEach(ae=>ae.classList.add(s.params.navigation.lockClass))}),b("click",(j,H)=>{let{nextEl:ae,prevEl:ge}=s.navigation;ae=bi(ae),ge=bi(ge);let ce=H.target,le=ge.includes(ce)||ae.includes(ce);if(s.isElement&&!le){let we=H.path||H.composedPath&&H.composedPath();we&&(le=we.find(Le=>ae.includes(Le)||ge.includes(Le)))}if(s.params.navigation.hideOnClick&&!le){if(s.pagination&&s.params.pagination&&s.params.pagination.clickable&&(s.pagination.el===ce||s.pagination.el.contains(ce)))return;let we;ae.length?we=ae[0].classList.contains(s.params.navigation.hiddenClass):ge.length&&(we=ge[0].classList.contains(s.params.navigation.hiddenClass)),y(we===!0?"navigationShow":"navigationHide"),[...ae,...ge].filter(Le=>!!Le).forEach(Le=>Le.classList.toggle(s.params.navigation.hiddenClass))}});let ne=()=>{s.el.classList.remove(...s.params.navigation.navigationDisabledClass.split(" ")),U(),F()},re=()=>{s.el.classList.add(...s.params.navigation.navigationDisabledClass.split(" ")),O()};Object.assign(s.navigation,{enable:ne,disable:re,update:F,init:U,destroy:O})}function xs(p){return p===void 0&&(p=""),`.${p.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function Kg(p){let{swiper:s,extendParams:g,on:b,emit:y}=p,a="swiper-pagination";g({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:ce=>ce,formatFractionTotal:ce=>ce,bulletClass:`${a}-bullet`,bulletActiveClass:`${a}-bullet-active`,modifierClass:`${a}-`,currentClass:`${a}-current`,totalClass:`${a}-total`,hiddenClass:`${a}-hidden`,progressbarFillClass:`${a}-progressbar-fill`,progressbarOppositeClass:`${a}-progressbar-opposite`,clickableClass:`${a}-clickable`,lockClass:`${a}-lock`,horizontalClass:`${a}-horizontal`,verticalClass:`${a}-vertical`,paginationDisabledClass:`${a}-disabled`}}),s.pagination={el:null,bullets:[]};let z,F=0;function V(){return!s.params.pagination.el||!s.pagination.el||Array.isArray(s.pagination.el)&&s.pagination.el.length===0}function B(ce,le){let{bulletActiveClass:we}=s.params.pagination;ce&&(ce=ce[`${le==="prev"?"previous":"next"}ElementSibling`],ce&&(ce.classList.add(`${we}-${le}`),ce=ce[`${le==="prev"?"previous":"next"}ElementSibling`],ce&&ce.classList.add(`${we}-${le}-${le}`)))}function U(ce,le,we){if(ce=ce%we,le=le%we,le===ce+1)return"next";if(le===ce-1)return"previous"}function O(ce){let le=ce.target.closest(xs(s.params.pagination.bulletClass));if(!le)return;ce.preventDefault();let we=ho(le)*s.params.slidesPerGroup;if(s.params.loop){if(s.realIndex===we)return;let Le=U(s.realIndex,we,s.slides.length);Le==="next"?s.slideNext():Le==="previous"?s.slidePrev():s.slideToLoop(we)}else s.slideTo(we)}function ne(){let ce=s.rtl,le=s.params.pagination;if(V())return;let we=s.pagination.el;we=bi(we);let Le,M,ze=s.virtual&&s.params.virtual.enabled?s.virtual.slides.length:s.slides.length,Oe=s.params.loop?Math.
vendor: 5,421 bytes, line 728
728ceil(ze/s.params.slidesPerGroup):s.snapGrid.length;if(s.params.loop?(M=s.previousRealIndex||0,Le=s.params.slidesPerGroup>1?Math.floor(s.realIndex/s.params.slidesPerGroup):s.realIndex):typeof s.snapIndex<"u"?(Le=s.snapIndex,M=s.previousSnapIndex):(M=s.previousIndex||0,Le=s.activeIndex||0),le.type==="bullets"&&s.pagination.bullets&&s.pagination.bullets.length>0){let qe=s.pagination.bullets,$e,Qe,Ne;if(le.dynamicBullets&&(z=Gc(qe[0],s.isHorizontal()?"width":"height",!0),we.forEach(Je=>{Je.style[s.isHorizontal()?"width":"height"]=`${z*(le.dynamicMainBullets+4)}px`}),le.dynamicMainBullets>1&&M!==void 0&&(F+=Le-(M||0),F>le.dynamicMainBullets-1?F=le.dynamicMainBullets-1:F<0&&(F=0)),$e=Math.max(Le-F,0),Qe=$e+(Math.min(qe.length,le.dynamicMainBullets)-1),Ne=(Qe+$e)/2),qe.forEach(Je=>{let Ye=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(bt=>`${le.bulletActiveClass}${bt}`)].map(bt=>typeof bt=="string"&&bt.includes(" ")?bt.split(" "):bt).flat();Je.classList.remove(...Ye)}),we.length>1)qe.forEach(Je=>{let Ye=ho(Je);Ye===Le?Je.classList.add(...le.bulletActiveClass.split(" ")):s.isElement&&Je.setAttribute("part","bullet"),le.dynamicBullets&&(Ye>=$e&&Ye<=Qe&&Je.classList.add(...`${le.bulletActiveClass}-main`.split(" ")),Ye===$e&&B(Je,"prev"),Ye===Qe&&B(Je,"next"))});else{let Je=qe[Le];if(Je&&Je.classList.add(...le.bulletActiveClass.split(" ")),s.isElement&&qe.forEach((Ye,bt)=>{Ye.setAttribute("part",bt===Le?"bullet-active":"bullet")}),le.dynamicBullets){let Ye=qe[$e],bt=qe[Qe];for(let _t=$e;_t<=Qe;_t+=1)qe[_t]&&qe[_t].classList.add(...`${le.bulletActiveClass}-main`.split(" "));B(Ye,"prev"),B(bt,"next")}}if(le.dynamicBullets){let Je=Math.min(qe.length,le.dynamicMainBullets+4),Ye=(z*Je-z)/2-Ne*z,bt=ce?"right":"left";qe.forEach(_t=>{_t.style[s.isHorizontal()?bt:"top"]=`${Ye}px`})}}we.forEach((qe,$e)=>{if(le.type==="fraction"&&(qe.querySelectorAll(xs(le.currentClass)).forEach(Qe=>{Qe.textContent=le.formatFractionCurrent(Le+1)}),qe.querySelectorAll(xs(le.totalClass)).forEach(Qe=>{Qe.textContent=le.formatFractionTotal(Oe)})),le.type==="progressbar"){let Qe;le.progressbarOpposite?Qe=s.isHorizontal()?"vertical":"horizontal":Qe=s.isHorizontal()?"horizontal":"vertical";let Ne=(Le+1)/Oe,Je=1,Ye=1;Qe==="horizontal"?Je=Ne:Ye=Ne,qe.querySelectorAll(xs(le.progressbarFillClass)).forEach(bt=>{bt.style.transform=`translate3d(0,0,0) scaleX(${Je}) scaleY(${Ye})`,bt.style.transitionDuration=`${s.params.speed}ms`})}le.type==="custom"&&le.renderCustom?(qe.innerHTML=le.renderCustom(s,Le+1,Oe),$e===0&&y("paginationRender",qe)):($e===0&&y("paginationRender",qe),y("paginationUpdate",qe)),s.params.watchOverflow&&s.enabled&&qe.classList[s.isLocked?"add":"remove"](le.lockClass)})}function re(){let ce=s.params.pagination;if(V())return;let le=s.virtual&&s.params.virtual.enabled?s.virtual.slides.length:s.grid&&s.params.grid.rows>1?s.slides.length/Math.ceil(s.params.grid.rows):s.slides.length,we=s.pagination.el;we=bi(we);let Le="";if(ce.type==="bullets"){let M=s.params.loop?Math.ceil(le/s.params.slidesPerGroup):s.snapGrid.length;s.params.freeMode&&s.params.freeMode.enabled&&M>le&&(M=le);for(let ze=0;ze<M;ze+=1)ce.renderBullet?Le+=ce.renderBullet.call(s,ze,ce.bulletClass):Le+=`<${ce.bulletElement} ${s.isElement?'part="bullet"':""} class="${ce.bulletClass}"></${ce.bulletElement}>`}ce.type==="fraction"&&(ce.renderFraction?Le=ce.renderFraction.call(s,ce.currentClass,ce.totalClass):Le=`<span class="${ce.currentClass}"></span> / <span class="${ce.totalClass}"></span>`),ce.type==="progressbar"&&(ce.renderProgressbar?Le=ce.renderProgressbar.call(s,ce.progressbarFillClass):Le=`<span class="${ce.progressbarFillClass}"></span>`),s.pagination.bullets=[],we.forEach(M=>{ce.type!=="custom"&&(M.innerHTML=Le||""),ce.type==="bullets"&&s.pagination.bullets.push(...M.querySelectorAll(xs(ce.bulletClass)))}),ce.type!=="custom"&&y("paginationRender",we[0])}function j(){s.params.pagination=Vl(s,s.originalParams.pagination,s.params.pagination,{el:"swiper-pagination"});let ce=s.params.pagination;if(!ce.el)return;let le;typeof ce.el=="string"&&s.isElement&&(le=s.el.querySelector(ce.el)),!le&&typeof ce.el=="string"&&(le=[...document.querySelectorAll(ce.el)]),le||(le=ce.el),!(!le||le.length===0)&&(s.params.uniqueNavElements&&typeof ce.el=="string"&&Array.isArray(le)&&le.length>1&&(le=[...s.el.querySelectorAll(ce.el)],le.length>1&&(le=le.find(we=>Hs(we,".swiper")[0]===s.el))),Array.isArray(le)&&le.length===1&&(le=le[0]),Object.assign(s.pagination,{el:le}),le=bi(le),le.forEach(we=>{ce.type==="bullets"&&ce.clickable&&we.classList.add(...(ce.clickableClass||"").split(" ")),we.classList.add(ce.modifierClass+ce.type),we.classList.add(s.isHorizontal()?ce.horizontalClass:ce.verticalClass),ce.type==="bullets"&&ce.dynamicBullets&&(we.classList.add(`${ce.modifierClass}${ce.type}-dynamic`),F=0,ce.dynamicMainBullets<1&&(ce.dynamicMainBullets=1)),ce.type==="progressbar"&&ce.progressbarOpposite&&we.classList.add(ce.progressbarOppositeClass),ce.clickable&&we.addEventListener("click",O),s.enabled||we.classList.add(ce.lockClass)}))}function H(){let ce=s.params.pagination;if(V())return;let le=s.pagination.el;le&&(le=bi(le),le.forEach(we=>{we.classList.remove(ce.hiddenClass),we.classList.remove(ce.modifierClass+ce.type),we.classList.remove(s.isHorizontal()?ce.horizontalClass:ce.verticalClass),ce.clickable&&(we.classList.remove(...(ce.clickableClass||"").split(" ")),we.removeEventListener("click",O))}
vendor: 24,521 bytes, line 728
728)),s.pagination.bullets&&s.pagination.bullets.forEach(we=>we.classList.remove(...ce.bulletActiveClass.split(" ")))}b("changeDirection",()=>{if(!s.pagination||!s.pagination.el)return;let ce=s.params.pagination,{el:le}=s.pagination;le=bi(le),le.forEach(we=>{we.classList.remove(ce.horizontalClass,ce.verticalClass),we.classList.add(s.isHorizontal()?ce.horizontalClass:ce.verticalClass)})}),b("init",()=>{s.params.pagination.enabled===!1?ge():(j(),re(),ne())}),b("activeIndexChange",()=>{typeof s.snapIndex>"u"&&ne()}),b("snapIndexChange",()=>{ne()}),b("snapGridLengthChange",()=>{re(),ne()}),b("destroy",()=>{H()}),b("enable disable",()=>{let{el:ce}=s.pagination;ce&&(ce=bi(ce),ce.forEach(le=>le.classList[s.enabled?"remove":"add"](s.params.pagination.lockClass)))}),b("lock unlock",()=>{ne()}),b("click",(ce,le)=>{let we=le.target,Le=bi(s.pagination.el);if(s.params.pagination.el&&s.params.pagination.hideOnClick&&Le&&Le.length>0&&!we.classList.contains(s.params.pagination.bulletClass)){if(s.navigation&&(s.navigation.nextEl&&we===s.navigation.nextEl||s.navigation.prevEl&&we===s.navigation.prevEl))return;let M=Le[0].classList.contains(s.params.pagination.hiddenClass);y(M===!0?"paginationShow":"paginationHide"),Le.forEach(ze=>ze.classList.toggle(s.params.pagination.hiddenClass))}});let ae=()=>{s.el.classList.remove(s.params.pagination.paginationDisabledClass);let{el:ce}=s.pagination;ce&&(ce=bi(ce),ce.forEach(le=>le.classList.remove(s.params.pagination.paginationDisabledClass))),j(),re(),ne()},ge=()=>{s.el.classList.add(s.params.pagination.paginationDisabledClass);let{el:ce}=s.pagination;ce&&(ce=bi(ce),ce.forEach(le=>le.classList.add(s.params.pagination.paginationDisabledClass))),H()};Object.assign(s.pagination,{enable:ae,disable:ge,render:re,update:ne,init:j,destroy:H})}function Jg(p){let{swiper:s,extendParams:g,on:b,emit:y}=p,a=tr(),z=!1,F=null,V=null,B,U,O,ne;g({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),s.scrollbar={el:null,dragEl:null};function re(){if(!s.params.scrollbar.el||!s.scrollbar.el)return;let{scrollbar:Ne,rtlTranslate:Je}=s,{dragEl:Ye,el:bt}=Ne,_t=s.params.scrollbar,He=s.params.loop?s.progressLoop:s.progress,Xe=U,At=(O-U)*He;Je?(At=-At,At>0?(Xe=U-At,At=0):-At+U>O&&(Xe=O+At)):At<0?(Xe=U+At,At=0):At+U>O&&(Xe=O-At),s.isHorizontal()?(Ye.style.transform=`translate3d(${At}px, 0, 0)`,Ye.style.width=`${Xe}px`):(Ye.style.transform=`translate3d(0px, ${At}px, 0)`,Ye.style.height=`${Xe}px`),_t.hide&&(clearTimeout(F),bt.style.opacity=1,F=setTimeout(()=>{bt.style.opacity=0,bt.style.transitionDuration="400ms"},1e3))}function j(Ne){!s.params.scrollbar.el||!s.scrollbar.el||(s.scrollbar.dragEl.style.transitionDuration=`${Ne}ms`)}function H(){if(!s.params.scrollbar.el||!s.scrollbar.el)return;let{scrollbar:Ne}=s,{dragEl:Je,el:Ye}=Ne;Je.style.width="",Je.style.height="",O=s.isHorizontal()?Ye.offsetWidth:Ye.offsetHeight,ne=s.size/(s.virtualSize+s.params.slidesOffsetBefore-(s.params.centeredSlides?s.snapGrid[0]:0)),s.params.scrollbar.dragSize==="auto"?U=O*ne:U=parseInt(s.params.scrollbar.dragSize,10),s.isHorizontal()?Je.style.width=`${U}px`:Je.style.height=`${U}px`,ne>=1?Ye.style.display="none":Ye.style.display="",s.params.scrollbar.hide&&(Ye.style.opacity=0),s.params.watchOverflow&&s.enabled&&Ne.el.classList[s.isLocked?"add":"remove"](s.params.scrollbar.lockClass)}function ae(Ne){return s.isHorizontal()?Ne.clientX:Ne.clientY}function ge(Ne){let{scrollbar:Je,rtlTranslate:Ye}=s,{el:bt}=Je,_t;_t=(ae(Ne)-Qo(bt)[s.isHorizontal()?"left":"top"]-(B!==null?B:U/2))/(O-U),_t=Math.max(Math.min(_t,1),0),Ye&&(_t=1-_t);let He=s.minTranslate()+(s.maxTranslate()-s.minTranslate())*_t;s.updateProgress(He),s.setTranslate(He),s.updateActiveIndex(),s.updateSlidesClasses()}function ce(Ne){let Je=s.params.scrollbar,{scrollbar:Ye,wrapperEl:bt}=s,{el:_t,dragEl:He}=Ye;z=!0,B=Ne.target===He?ae(Ne)-Ne.target.getBoundingClientRect()[s.isHorizontal()?"left":"top"]:null,Ne.preventDefault(),Ne.stopPropagation(),bt.style.transitionDuration="100ms",He.style.transitionDuration="100ms",ge(Ne),clearTimeout(V),_t.style.transitionDuration="0ms",Je.hide&&(_t.style.opacity=1),s.params.cssMode&&(s.wrapperEl.style["scroll-snap-type"]="none"),y("scrollbarDragStart",Ne)}function le(Ne){let{scrollbar:Je,wrapperEl:Ye}=s,{el:bt,dragEl:_t}=Je;z&&(Ne.preventDefault&&Ne.cancelable?Ne.preventDefault():Ne.returnValue=!1,ge(Ne),Ye.style.transitionDuration="0ms",bt.style.transitionDuration="0ms",_t.style.transitionDuration="0ms",y("scrollbarDragMove",Ne))}function we(Ne){let Je=s.params.scrollbar,{scrollbar:Ye,wrapperEl:bt}=s,{el:_t}=Ye;z&&(z=!1,s.params.cssMode&&(s.wrapperEl.style["scroll-snap-type"]="",bt.style.transitionDuration=""),Je.hide&&(clearTimeout(V),V=Gs(()=>{_t.style.opacity=0,_t.style.transitionDuration="400ms"},1e3)),y("scrollbarDragEnd",Ne),Je.snapOnRelease&&s.slideToClosest())}function Le(Ne){let{scrollbar:Je,params:Ye}=s,bt=Je.el;if(!bt)return;let _t=bt,He=Ye.passiveListeners?{passive:!1,capture:!1}:!1,Xe=Ye.passiveListeners?{passive:!0,capture:!1}:!1;if(!_t)return;let At=Ne==="on"?"addEventListener":"removeEventListener";_t[At]("pointerdown",ce,He),a[At]("pointermove",le,He),a[At]("pointerup",we,Xe)}function M(){!s.params.scrollbar.el||!s.scrollbar.el||Le("on")}function ze(){!s.params.scrollbar.el||!s.scrollbar.el||Le("off")}function Oe(){let{scrollbar:Ne,el:Je}=s;s.params.scrollbar=Vl(s,s.originalParams.scrollbar,s.params.scrollbar,{el:"swiper-scrollbar"});let Ye=s.params.scrollbar;if(!Ye.el)return;let bt;if(typeof Ye.el=="string"&&s.isElement&&(bt=s.el.querySelector(Ye.el)),!bt&&typeof Ye.el=="string"){if(bt=a.querySelectorAll(Ye.el),!bt.length)return}else bt||(bt=Ye.el);s.params.uniqueNavElements&&typeof Ye.el=="string"&&bt.length>1&&Je.querySelectorAll(Ye.el).length===1&&(bt=Je.querySelector(Ye.el)),bt.length>0&&(bt=bt[0]),bt.classList.add(s.isHorizontal()?Ye.horizontalClass:Ye.verticalClass);let _t;bt&&(_t=bt.querySelector(xs(s.params.scrollbar.dragClass)),_t||(_t=Xr("div",s.params.scrollbar.dragClass),bt.append(_t))),Object.assign(Ne,{el:bt,dragEl:_t}),Ye.draggable&&M(),bt&&bt.classList[s.enabled?"remove":"add"](...Oa(s.params.scrollbar.lockClass))}function qe(){let Ne=s.params.scrollbar,Je=s.scrollbar.el;Je&&Je.classList.remove(...Oa(s.isHorizontal()?Ne.horizontalClass:Ne.verticalClass)),ze()}b("changeDirection",()=>{if(!s.scrollbar||!s.scrollbar.el)return;let Ne=s.params.scrollbar,{el:Je}=s.scrollbar;Je=bi(Je),Je.forEach(Ye=>{Ye.classList.remove(Ne.horizontalClass,Ne.verticalClass),Ye.classList.add(s.isHorizontal()?Ne.horizontalClass:Ne.verticalClass)})}),b("init",()=>{s.params.scrollbar.enabled===!1?Qe():(Oe(),H(),re())}),b("update resize observerUpdate lock unlock changeDirection",()=>{H()}),b("setTranslate",()=>{re()}),b("setTransition",(Ne,Je)=>{j(Je)}),b("enable disable",()=>{let{el:Ne}=s.scrollbar;Ne&&Ne.classList[s.enabled?"remove":"add"](...Oa(s.params.scrollbar.lockClass))}),b("destroy",()=>{qe()});let $e=()=>{s.el.classList.remove(...Oa(s.params.scrollbar.scrollbarDisabledClass)),s.scrollbar.el&&s.scrollbar.el.classList.remove(...Oa(s.params.scrollbar.scrollbarDisabledClass)),Oe(),H(),re()},Qe=()=>{s.el.classList.add(...Oa(s.params.scrollbar.scrollbarDisabledClass)),s.scrollbar.el&&s.scrollbar.el.classList.add(...Oa(s.params.scrollbar.scrollbarDisabledClass)),qe()};Object.assign(s.scrollbar,{enable:$e,disable:Qe,updateSize:H,setTranslate:re,init:Oe,destroy:qe})}function Qg(p){let{swiper:s,extendParams:g,on:b}=p;g({parallax:{enabled:!1}});let y="[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]",a=(V,B)=>{let{rtl:U}=s,O=U?-1:1,ne=V.getAttribute("data-swiper-parallax")||"0",re=V.getAttribute("data-swiper-parallax-x"),j=V.getAttribute("data-swiper-parallax-y"),H=V.getAttribute("data-swiper-parallax-scale"),ae=V.getAttribute("data-swiper-parallax-opacity"),ge=V.getAttribute("data-swiper-parallax-rotate");if(re||j?(re=re||"0",j=j||"0"):s.isHorizontal()?(re=ne,j="0"):(j=ne,re="0"),re.indexOf("%")>=0?re=`${parseInt(re,10)*B*O}%`:re=`${re*B*O}px`,j.indexOf("%")>=0?j=`${parseInt(j,10)*B}%`:j=`${j*B}px`,typeof ae<"u"&&ae!==null){let le=ae-(ae-1)*(1-Math.abs(B));V.style.opacity=le}let ce=`translate3d(${re}, ${j}, 0px)`;if(typeof H<"u"&&H!==null){let le=H-(H-1)*(1-Math.abs(B));ce+=` scale(${le})`}if(ge&&typeof ge<"u"&&ge!==null){let le=ge*B*-1;ce+=` rotate(${le}deg)`}V.style.transform=ce},z=()=>{let{el:V,slides:B,progress:U,snapGrid:O,isElement:ne}=s,re=vr(V,y);s.isElement&&re.push(...vr(s.hostEl,y)),re.forEach(j=>{a(j,U)}),B.forEach((j,H)=>{let ae=j.progress;s.params.slidesPerGroup>1&&s.params.slidesPerView!=="auto"&&(ae+=Math.ceil(H/2)-U*(O.length-1)),ae=Math.min(Math.max(ae,-1),1),j.querySelectorAll(`${y}, [data-swiper-parallax-rotate]`).forEach(ge=>{a(ge,ae)})})},F=function(V){V===void 0&&(V=s.params.speed);let{el:B,hostEl:U}=s,O=[...B.querySelectorAll(y)];s.isElement&&O.push(...U.querySelectorAll(y)),O.forEach(ne=>{let re=parseInt(ne.getAttribute("data-swiper-parallax-duration"),10)||V;V===0&&(re=0),ne.style.transitionDuration=`${re}ms`})};b("beforeInit",()=>{s.params.parallax.enabled&&(s.params.watchSlidesProgress=!0,s.originalParams.watchSlidesProgress=!0)}),b("init",()=>{s.params.parallax.enabled&&z()}),b("setTranslate",()=>{s.params.parallax.enabled&&z()}),b("setTransition",(V,B)=>{s.params.parallax.enabled&&F(B)})}function ey(p){let{swiper:s,extendParams:g,on:b,emit:y}=p,a=Oi();g({zoom:{enabled:!1,limitToOriginalSize:!1,maxRatio:3,minRatio:1,panOnMouseMove:!1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),s.zoom={enabled:!1};let z=1,F=!1,V=!1,B={x:0,y:0},U=-3,O,ne,re=[],j={originX:0,originY:0,slideEl:void 0,slideWidth:void 0,slideHeight:void 0,imageEl:void 0,imageWrapEl:void 0,maxRatio:3},H={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},ae={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0},ge=1;Object.defineProperty(s.zoom,"scale",{get(){return ge},set(wt){if(ge!==wt){let yt=j.imageEl,Tt=j.slideEl;y("zoomChange",wt,yt,Tt)}ge=wt}});function ce(){if(re.length<2)return 1;let wt=re[0].pageX,yt=re[0].pageY,Tt=re[1].pageX,oi=re[1].pageY;return Math.sqrt((Tt-wt)**2+(oi-yt)**2)}function le(){let wt=s.params.zoom,yt=j.imageWrapEl.getAttribute("data-swiper-zoom")||wt.maxRatio;if(wt.limitToOriginalSize&&j.imageEl&&j.imageEl.naturalWidth){let Tt=j.imageEl.naturalWidth/j.imageEl.offsetWidth;return Math.min(Tt,yt)}return yt}function we(){if(re.length<2)return{x:null,y:null};let wt=j.imageEl.getBoundingClientRect();return[(re[0].pageX+(re[1].pageX-re[0].pageX)/2-wt.x-a.scrollX)/z,(re[0].pageY+(re[1].pageY-re[0].pageY)/2-wt.y-a.scrollY)/z]}function Le(){return s.isElement?"swiper-slide":`.${s.params.slideClass}`}function M(wt){let yt=Le();return!!(wt.target.matches(yt)||s.slides.filter(Tt=>Tt.contains(wt.target)).length>0)}function ze(wt){let yt=`.${s.params.zoom.containerClass}`;return!!(wt.target.matches(yt)||[...s.hostEl.querySelectorAll(yt)].filter(Tt=>Tt.contains(wt.target)).length>0)}function Oe(wt){if(wt.pointerType==="mouse"&&re.splice(0,re.length),!M(wt))return;let yt=s.params.zoom;if(O=!1,ne=!1,re.push(wt),!(re.length<2)){if(O=!0,j.scaleStart=ce(),!j.slideEl){j.slideEl=wt.target.closest(`.${s.params.slideClass}, swiper-slide`),j.slideEl||(j.slideEl=s.slides[s.activeIndex]);let Tt=j.slideEl.querySelector(`.${yt.containerClass}`);if(Tt&&(Tt=Tt.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),j.imageEl=Tt,Tt?j.imageWrapEl=Hs(j.imageEl,`.${yt.containerClass}`)[0]:j.imageWrapEl=void 0,!j.imageWrapEl){j.imageEl=void 0;return}j.maxRatio=le()}if(j.imageEl){let[Tt,oi]=we();j.originX=Tt,j.originY=oi,j.imageEl.style.transitionDuration="0ms"}F=!0}}function qe(wt){if(!M(wt))return;let yt=s.params.zoom,Tt=s.zoom,oi=re.findIndex(si=>si.pointerId===wt.pointerId);oi>=0&&(re[oi]=wt),!(re.length<2)&&(ne=!0,j.scaleMove=ce(),j.imageEl&&(Tt.scale=j.scaleMove/j.scaleStart*z,Tt.scale>j.maxRatio&&(Tt.scale=j.maxRatio-1+(Tt.scale-j.maxRatio+1)**.5),Tt.scale<yt.minRatio&&(Tt.scale=yt.minRatio+1-(yt.minRatio-Tt.scale+1)**.5),j.imageEl.style.transform=`translate3d(0,0,0) scale(${Tt.scale})`))}function $e(wt){if(!M(wt)||wt.pointerType==="mouse"&&wt.type==="pointerout")return;let yt=s.params.zoom,Tt=s.zoom,oi=re.findIndex(si=>si.pointerId===wt.pointerId);oi>=0&&re.splice(oi,1),!(!O||!ne)&&(O=!1,ne=!1,j.imageEl&&(Tt.scale=Math.max(Math.min(Tt.scale,j.maxRatio),yt.minRatio),j.imageEl.style.transitionDuration=`${s.params.speed}ms`,j.imageEl.style.transform=`translate3d(0,0,0) scale(${Tt.scale})`,z=Tt.scale,F=!1,Tt.scale>1&&j.slideEl?j.slideEl.classList.add(`${yt.zoomedSlideClass}`):Tt.scale<=1&&j.slideEl&&j.slideEl.classList.remove(`${yt.zoomedSlideClass}`),Tt.scale===1&&(j.originX=0,j.originY=0,j.slideEl=void 0)))}let Qe;function Ne(){s.touchEventsData.preventTouchMoveFromPointerMove=!1}function Je(){clearTimeout(Qe),s.touchEventsData.preventTouchMoveFromPointerMove=!0,Qe=setTimeout(()=>{s.destroyed||Ne()})}function Ye(wt){let yt=s.device;if(!j.imageEl||H.isTouched)return;yt.android&&wt.cancelable&&wt.preventDefault(),H.isTouched=!0;let Tt=re.length>0?re[0]:wt;H.touchesStart.x=Tt.pageX,H.touchesStart.y=Tt.pageY}function bt(wt){let Tt=wt.pointerType==="mouse"&&s.params.zoom.panOnMouseMove;if(!M(wt)||!ze(wt))return;let oi=s.zoom;if(!j.imageEl)return;if(!H.isTouched||!j.slideEl){Tt&&Xe(wt);return}if(Tt){Xe(wt);return}H.isMoved||(H.width=j.imageEl.offsetWidth||j.imageEl.clientWidth,H.height=j.imageEl.offsetHeight||j.imageEl.clientHeight,H.startX=Vc(j.imageWrapEl,"x")||0,H.startY=Vc(j.imageWrapEl,"y")||0,j.slideWidth=j.slideEl.offsetWidth,j.slideHeight=j.slideEl.offsetHeight,j.imageWrapEl.style.transitionDuration="0ms");let si=H.width*oi.scale,Di=H.height*oi.scale;if(H.minX=Math.min(j.slideWidth/2-si/2,0),H.maxX=-H.minX,H.minY=Math.min(j.slideHeight/2-Di/2,0),H.maxY=-H.minY,H.touchesCurrent.x=re.length>0?re[0].pageX:wt.pageX,H.touchesCurrent.y=re.length>0?re[0].pageY:wt.pageY,Math.max(Math.abs(H.touchesCurrent.x-H.touchesStart.x),Math.abs(H.touchesCurrent.y-H.touchesStart.y))>5&&(s.allowClick=!1),!H.isMoved&&!F){if(s.isHorizontal()&&(Math.floor(H.minX)===Math.floor(H.startX)&&H.touchesCurrent.x<H.touchesStart.x||Math.floor(H.maxX)===Math.floor(H.startX)&&H.touchesCurrent.x>H.touchesStart.x)){H.isTouched=!1,Ne();return}if(!s.isHorizontal()&&(Math.floor(H.minY)===Math.floor(H.startY)&&H.touchesCurrent.y<H.touchesStart.y||Math.floor(H.maxY)===Math.floor(H.startY)&&H.touchesCurrent.y>H.touchesStart.y)){H.isTouched=!1,Ne();return}}wt.cancelable&&wt.preventDefault(),wt.stopPropagation(),Je(),H.isMoved=!0;let wi=(oi.scale-z)/(j.maxRatio-s.params.zoom.minRatio),{originX:Mr,originY:qi}=j;H.currentX=H.touchesCurrent.x-H.touchesStart.x+H.startX+wi*(H.width-Mr*2),H.currentY=H.touchesCurrent.y-H.touchesStart.y+H.startY+wi*(H.height-qi*2),H.currentX<H.minX&&(H.currentX=H.minX+1-(H.minX-H.currentX+1)**.8),H.currentX>H.maxX&&(H.currentX=H.maxX-1+(H.currentX-H.maxX+1)**.8),H.currentY<H.minY&&(H.currentY=H.minY+1-(H.minY-H.currentY+1)**.8),H.currentY>H.maxY&&(H.currentY=H.maxY-1+(H.currentY-H.maxY+1)**.8),ae.prevPositionX||(ae.prevPositionX=H.touchesCurrent.x),ae.prevPositionY||(ae.prevPositionY=H.touchesCurrent.y),ae.prevTime||(ae.prevTime=Date.now()),ae.x=(H.touchesCurrent.x-ae.prevPositionX)/(Date.now()-ae.prevTime)/2,ae.y=(H.touchesCurrent.y-ae.prevPositionY)/(Date.now()-ae.prevTime)/2,Math.abs(H.touchesCurrent.x-ae.prevPositionX)<2&&(ae.x=0),Math.abs(H.touchesCurrent.y-ae.prevPositionY)<2&&(ae.y=0),ae.prevPositionX=H.touchesCurrent.x,ae.prevPositionY=H.touchesCurrent.y,ae.prevTime=Date.now(),j.imageWrapEl.style.transform=`translate3d(${H.currentX}px, ${H.currentY}px,0)`}function _t(){let wt=s.zoom;if(re.length=0,!j.imageEl)return;if(!H.isTouched||!H.isMoved){H.isTouched=!1,H.isMoved=!1;return}H.isTouched=!1,H.isMoved=!1;let yt=300,Tt=300,oi=ae.x*yt,si=H.currentX+oi,Di=ae.y*Tt,Ki=H.currentY+Di;ae.x!==0&&(yt=Math.abs((si-H.currentX)/ae.x)),ae.y!==0&&(Tt=Math.abs((Ki-H.currentY)/ae.y));let wi=Math.max(yt,Tt);H.currentX=si,H.currentY=Ki;let Mr=H.width*wt.scale,qi=H.height*wt.scale;H.minX=Math.min(j.slideWidth/2-Mr/2,0),H.maxX=-H.minX,H.minY=Math.min(j.slideHeight/2-qi/2,0),H.maxY=-H.minY,H.currentX=Math.max(Math.min(H.currentX,H.maxX),H.minX),H.currentY=Math.max(Math.min(H.currentY,H.maxY),H.minY),j.imageWrapEl.style.transitionDuration=`${wi}ms`,j.imageWrapEl.style.transform=`translate3d(${H.currentX}px, ${H.currentY}px,0)`}function He(){let wt=s.zoom;j.slideEl&&s.activeIndex!==s.slides.indexOf(j.slideEl)&&(j.imageEl&&(j.imageEl.style.transform="translate3d(0,0,0) scale(1)"),j.imageWrapEl&&(j.imageWrapEl.style.transform="translate3d(0,0,0)"),j.slideEl.classList.remove(`${s.params.zoom.zoomedSlideClass}`),wt.scale=1,z=1,j.slideEl=void 0,j.imageEl=void 0,j.imageWrapEl=void 0,j.originX=0,j.originY=0)}function Xe(wt){if(z<=1||!j.imageWrapEl||!M(wt)||!ze(wt))return;let yt=a.getComputedStyle(j.imageWrapEl).transform,Tt=new a.DOMMatrix(yt);if(!V){V=!0,B.x=wt.clientX,B.y=wt.clientY,H.startX=Tt.e,H.startY=Tt.f,H.width=j.imageEl.offsetWidth||j.imageEl.clientWidth,H.height=j.imageEl.offsetHeight||j.imageEl.clientHeight,j.slideWidth=j.slideEl.offsetWidth,j.slideHeight=j.slideEl.offsetHeight;return}let oi=(wt.clientX-B.x)*U,si=(wt.clientY-B.y)*U,Di=H.width*z,Ki=H.height*z,wi=j.slideWidth,Mr=j.slideHeight,qi=Math.min(wi/2-Di/2,0),Ui=-qi,Cr=Math.min(Mr/2-Ki/2,0),sr=-Cr,Sr=Math.max(Math.min(H.startX+oi,Ui),qi),Tr=Math.max(Math.min(H.startY+si,sr),Cr);j.imageWrapEl.style.transitionDuration="0ms",j.imageWrapEl.style.transform=`translate3d(${Sr}px, ${Tr}px, 0)`,B.x=wt.clientX,B.y=wt.clientY,H.startX=Sr,H.startY=Tr,H.currentX=Sr,H.currentY=Tr}function At(wt){let yt=s.zoom,Tt=s.params.zoom;if(!j.slideEl){wt&&wt.target&&(j.slideEl=wt.target.closest(`.${s.params.slideClass}, swiper-slide`)),j.slideEl||(s.params.virtual&&s.params.virtual.enabled&&s.virtual?j.slideEl=vr(s.slidesEl,`.${s.params.slideActiveClass}`)[0]:j.slideEl=s.slides[s.activeIndex]);let hn=j.slideEl.querySelector(`.${Tt.containerClass}`);hn&&(hn=hn.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),j.imageEl=hn,hn?j.imageWrapEl=Hs(j.imageEl,`.${Tt.containerClass}`)[0]:j.imageWrapEl=void 0}if(!j.imageEl||!j.imageWrapEl)return;s.params.cssMode&&(s.wrapperEl.style.overflow="hidden",s.wrapperEl.style.touchAction="none"),j.slideEl.classList.add(`${Tt.zoomedSlideClass}`);let oi,si,Di,Ki,wi,Mr,qi,Ui,Cr,sr,Sr,Tr,Mn,pr,cn,Yr,jt,Ji;typeof H.touchesStart.x>"u"&&wt?(oi=wt.pageX,si=wt.pageY):(oi=H.touchesStart.x,si=H.touchesStart.y);let un=z,Ir=typeof wt=="number"?wt:null;z===1&&Ir&&(oi=void 0,si=void 0,H.touchesStart.x=void 0,H.touchesStart.y=void 0);let gn=le();yt.scale=Ir||gn,z=Ir||gn,wt&&!(z===1&&Ir)?(jt=j.slideEl.offsetWidth,Ji=j.slideEl.offsetHeight,Di=Qo(j.slideEl).left+a.scrollX,Ki=Qo(j.slideEl).top+a.scrollY,wi=Di+jt/2-oi,Mr=Ki+Ji/2-si,Cr=j.imageEl.offsetWidth||j.imageEl.clientWidth,sr=j.imageEl.offsetHeight||j.imageEl.clientHeight,Sr=Cr*yt.scale,Tr=sr*yt.scale,Mn=Math.min(jt/2-Sr/2,0),pr=Math.min(Ji/2-Tr/2,0),cn=-Mn,Yr=-pr,un>0&&Ir&&typeof H.currentX=="number"&&typeof H.currentY=="number"?(qi=H.currentX*yt.scale/un,Ui=H.currentY*yt.scale/un):(qi=wi*yt.scale,Ui=Mr*yt.scale),qi<Mn&&(qi=Mn),qi>cn&&(qi=cn),Ui<pr&&(Ui=pr),Ui>Yr&&(Ui=Yr)):(qi=0,Ui=0),Ir&&yt.scale===1&&(j.originX=0,j.originY=0),H.currentX=qi,H.currentY=Ui,j.imageWrapEl.style.transitionDuration="300ms",j.imageWrapEl.style.transform=`translate3d(${qi}px, ${Ui}px,0)`,j.imageEl.style.transitionDuration="300ms",j.imageEl.style.transform=`translate3d(0,0,0) scale(${yt.scale})`}function Yt(){let wt=s.zoom,yt=s.params.zoom;if(!j.slideEl){s.params.virtual&&s.params.virtual.enabled&&s.virtual?j.slideEl=vr(s.slidesEl,`.${s.params.slideActiveClass}`)[0]:j.slideEl=s.slides[s.activeIndex];let Tt=j.slideEl.querySelector(`.${yt.containerClass}`);Tt&&(Tt=Tt.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),j.imageEl=Tt,Tt?j.imageWrapEl=Hs(j.imageEl,`.${yt.containerClass}`)[0]:j.imageWrapEl=void 0}!j.imageEl||!j.imageWrapEl||(s.params.cssMode&&(s.wrapperEl.style.overflow="",s.wrapperEl.style.touchAction=""),wt.scale=1,z=1,H.currentX=void 0,H.currentY=void 0,H.touchesStart.x=void 0,H.touchesStart.y=void 0,j.imageWrapEl.style.transitionDuration="300ms",j.imageWrapEl.style.transform="translate3d(0,0,0)",j.imageEl.style.transitionDuration="300ms",j.imageEl.style.transform="translate3d(0,0,0) scale(1)",j.slideEl.classList.remove(`${yt.zoomedSlideClass}`),j.slideEl=void 0,j.originX=0,j.originY=0,s.params.zoom.panOnMouseMove&&(B={x:0,y:0},V&&(V=!1,H.startX=0,H.startY=0)))}function xi(wt){let yt=s.zoom;yt.scale&&yt.scale!==1?Yt():At(wt)}function Pi(){let wt=s.params.passiveListeners?{passive:!0,capture:!1}:!1,yt=s.params.passiveListeners?{passive:!1,capture:!0}:!0;return{passiveListener:wt,activeListenerWithCapture:yt}}function Ai(){let wt=s.zoom;if(wt.enabled)return;wt.enabled=!0;let{passiveListener:yt,activeListenerWithCapture:Tt}=Pi();s.wrapperEl.addEventListener("pointerdown",Oe,yt),s.wrapperEl.addEventListener("pointermove",qe,Tt),["pointerup","pointercancel","pointerout"].forEach(oi=>{s.wrapperEl.addEventListener(oi,$e,yt)}),s.wrapperEl.addEventListener("pointermove",bt,Tt)}function ln(){let wt=s.zoom;if(!wt.enabled)return;wt.enabled=!1;let{passiveListener:yt,activeListenerWithCapture:Tt}=Pi();s.wrapperEl.removeEventListener("pointerdown",Oe,yt),s.wrapperEl.removeEventListener("pointermove",qe,Tt),["pointerup","pointercancel","pointerout"].forEach(oi=>{s.wrapperEl.removeEventListener(oi,$e,yt)}),s.wrapperEl.removeEventListener("pointermove",bt,Tt)}b("init",()=>{s.params.zoom.enabled&&Ai()}),b("destroy",()=>{ln()}),b("touchStart",(wt,yt)=>{s.zoom.enabled&&Ye(yt)}),b("touchEnd",(wt,yt)=>{s.zoom.enabled&&_t()}),b("doubleTap",(wt,yt)=>{!s.animating&&s.params.zoom.enabled&&s.zoom.enabled&&s.params.zoom.toggle&&xi(yt)}),b("transitionEnd",()=>{s.zoom.enabled&&s.params.zoom.enabled&&He()}),b("slideChange",()=>{s.zoom.enabled&&s.params.zoom.enabled&&s.params.cssMode&&He()}),Object.assign(s.zoom,{enable:Ai,disable:ln,in:At,out:Yt,toggle:xi})}function ty(p){let{swiper:s,extendParams:g,on:b}=p;g({controller:{control:void 0,inverse:!1,by:"slide"}}),s.controller={control:void 0};function y(B,U){let O=function(){let H,ae,ge;return(ce,le)=>{for(ae=-1,H=ce.length;H-ae>1;)ge=H+ae>>1,ce[ge]<=le?ae=ge:H=ge;return H}}();this.x=B,this.y=U,this.lastIndex=B.length-1;let ne,re;return this.interpolate=function(H){return H?(re=O(this.x,H),ne=re-1,(H-this.x[ne])*(this.y[re]-this.y[ne])/(this.x[re]-this.x[ne])+this.y[ne]):0},this}function a(B){s.controller.spline=s.params.loop?new y(s.slidesGrid,B.slidesGrid):new y(s.snapGrid,B.snapGrid)}function z(B,U){let O=s.controller.control,ne,re,j=s.constructor;function H(ae){if(ae.destroyed)return;let ge=s.rtlTranslate?-s.translate:s.translate;s.params.controller.by==="slide"&&(a(ae),re=-s.controller.spline.interpolate(-ge)),(!re||s.params.controller.by==="container")&&(ne=(ae.maxTranslate()-ae.minTranslate())/(s.maxTranslate()-s.minTranslate()),(Number.isNaN(ne)||!Number.isFinite(ne))&&(ne=1),re=(ge-s.minTranslate())*ne+ae.minTranslate()),s.params.controller.inverse&&(re=ae.maxTranslate()-re),ae.updateProgress(re),ae.setTranslate(re,s),ae.updateActiveIndex(),ae.updateSlidesClasses()}if(Array.isArray(O))for(let ae=0;ae<O.length;ae+=1)O[ae]!==U&&O[ae]instanceof j&&H(O[ae]);else O instanceof j&&U!==O&&H(O)}function F(B,U){let O=s.constructor,ne=s.controller.control,re;function j(H){H.destroyed||(H.setTransition(B,s),B!==0&&(H.transitionStart(),H.params.autoHeight&&Gs(()=>{H.updateAutoHeight()}),po(H.wrapperEl,()=>{ne&&H.transitionEnd()})))}if(Array.isArray(ne))for(re=0;re<ne.length;re+=1)ne[re]!==U&&ne[re]instanceof O&&j(ne[re]);else ne instanceof O&&U!==ne&&j(ne)}function V(){s.controller.control&&s.controller.spline&&(s.controller.spline=void 0,delete s.controller.spline)}b("beforeInit",()=>{if(typeof window<"u"&&(typeof s.params.controller.control=="string"||s.params.controller.control instanceof HTMLElement)){(typeof s.params.controller.control=="string"?[...document.querySelectorAll(s.params.controller.control)]:[s.params.controller.control]).forEac
vendor: 4,733 bytes, line 728
728h(U=>{if(s.controller.control||(s.controller.control=[]),U&&U.swiper)s.controller.control.push(U.swiper);else if(U){let O=`${s.params.eventsPrefix}init`,ne=re=>{s.controller.control.push(re.detail[0]),s.update(),U.removeEventListener(O,ne)};U.addEventListener(O,ne)}});return}s.controller.control=s.params.controller.control}),b("update",()=>{V()}),b("resize",()=>{V()}),b("observerUpdate",()=>{V()}),b("setTranslate",(B,U,O)=>{!s.controller.control||s.controller.control.destroyed||s.controller.setTranslate(U,O)}),b("setTransition",(B,U,O)=>{!s.controller.control||s.controller.control.destroyed||s.controller.setTransition(U,O)}),Object.assign(s.controller,{setTranslate:z,setTransition:F})}function iy(p){let{swiper:s,extendParams:g,on:b}=p;g({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,containerRole:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null,scrollOnFocus:!0}}),s.a11y={clicked:!1};let y=null,a,z,F=new Date().getTime();function V(He){let Xe=y;Xe.length!==0&&(Xe.innerHTML="",Xe.innerHTML=He)}function B(He){He===void 0&&(He=16);let Xe=()=>Math.round(16*Math.random()).toString(16);return"x".repeat(He).replace(/x/g,Xe)}function U(He){He=bi(He),He.forEach(Xe=>{Xe.setAttribute("tabIndex","0")})}function O(He){He=bi(He),He.forEach(Xe=>{Xe.setAttribute("tabIndex","-1")})}function ne(He,Xe){He=bi(He),He.forEach(At=>{At.setAttribute("role",Xe)})}function re(He,Xe){He=bi(He),He.forEach(At=>{At.setAttribute("aria-roledescription",Xe)})}function j(He,Xe){He=bi(He),He.forEach(At=>{At.setAttribute("aria-controls",Xe)})}function H(He,Xe){He=bi(He),He.forEach(At=>{At.setAttribute("aria-label",Xe)})}function ae(He,Xe){He=bi(He),He.forEach(At=>{At.setAttribute("id",Xe)})}function ge(He,Xe){He=bi(He),He.forEach(At=>{At.setAttribute("aria-live",Xe)})}function ce(He){He=bi(He),He.forEach(Xe=>{Xe.setAttribute("aria-disabled",!0)})}function le(He){He=bi(He),He.forEach(Xe=>{Xe.setAttribute("aria-disabled",!1)})}function we(He){if(He.keyCode!==13&&He.keyCode!==32)return;let Xe=s.params.a11y,At=He.target;if(!(s.pagination&&s.pagination.el&&(At===s.pagination.el||s.pagination.el.contains(He.target))&&!He.target.matches(xs(s.params.pagination.bulletClass)))){if(s.navigation&&s.navigation.prevEl&&s.navigation.nextEl){let Yt=bi(s.navigation.prevEl);bi(s.navigation.nextEl).includes(At)&&(s.isEnd&&!s.params.loop||s.slideNext(),s.isEnd?V(Xe.lastSlideMessage):V(Xe.nextSlideMessage)),Yt.includes(At)&&(s.isBeginning&&!s.params.loop||s.slidePrev(),s.isBeginning?V(Xe.firstSlideMessage):V(Xe.prevSlideMessage))}s.pagination&&At.matches(xs(s.params.pagination.bulletClass))&&At.click()}}function Le(){if(s.params.loop||s.params.rewind||!s.navigation)return;let{nextEl:He,prevEl:Xe}=s.navigation;Xe&&(s.isBeginning?(ce(Xe),O(Xe)):(le(Xe),U(Xe))),He&&(s.isEnd?(ce(He),O(He)):(le(He),U(He)))}function M(){return s.pagination&&s.pagination.bullets&&s.pagination.bullets.length}function ze(){return M()&&s.params.pagination.clickable}function Oe(){let He=s.params.a11y;M()&&s.pagination.bullets.forEach(Xe=>{s.params.pagination.clickable&&(U(Xe),s.params.pagination.renderBullet||(ne(Xe,"button"),H(Xe,He.paginationBulletMessage.replace(/\{\{index\}\}/,ho(Xe)+1)))),Xe.matches(xs(s.params.pagination.bulletActiveClass))?Xe.setAttribute("aria-current","true"):Xe.removeAttribute("aria-current")})}let qe=(He,Xe,At)=>{U(He),He.tagName!=="BUTTON"&&(ne(He,"button"),He.addEventListener("keydown",we)),H(He,At),j(He,Xe)},$e=He=>{z&&z!==He.target&&!z.contains(He.target)&&(a=!0),s.a11y.clicked=!0},Qe=()=>{a=!1,requestAnimationFrame(()=>{requestAnimationFrame(()=>{s.destroyed||(s.a11y.clicked=!1)})})},Ne=He=>{F=new Date().getTime()},Je=He=>{if(s.a11y.clicked||!s.params.a11y.scrollOnFocus||new Date().getTime()-F<100)return;let Xe=He.target.closest(`.${s.params.slideClass}, swiper-slide`);if(!Xe||!s.slides.includes(Xe))return;z=Xe;let At=s.slides.indexOf(Xe)===s.activeIndex,Yt=s.params.watchSlidesProgress&&s.visibleSlides&&s.visibleSlides.includes(Xe);At||Yt||He.sourceCapabilities&&He.sourceCapabilities.firesTouchEvents||(s.isHorizontal()?s.el.scrollLeft=0:s.el.scrollTop=0,requestAnimationFrame(()=>{a||(s.params.loop?s.slideToLoop(parseInt(Xe.getAttribute("data-swiper-slide-index")),0):s.slideTo(s.slides.indexOf(Xe),0),a=!1)}))},Ye=()=>{let He=s.params.a11y;He.itemRoleDescriptionMessage&&re(s.slides,He.itemRoleDescriptionMessage),He.slideRole&&ne(s.slides,He.slideRole);let Xe=s.slides.length;
vendor: 30,127 bytes, line 728
728He.slideLabelMessage&&s.slides.forEach((At,Yt)=>{let xi=s.params.loop?parseInt(At.getAttribute("data-swiper-slide-index"),10):Yt,Pi=He.slideLabelMessage.replace(/\{\{index\}\}/,xi+1).replace(/\{\{slidesLength\}\}/,Xe);H(At,Pi)})},bt=()=>{let He=s.params.a11y;s.el.append(y);let Xe=s.el;He.containerRoleDescriptionMessage&&re(Xe,He.containerRoleDescriptionMessage),He.containerMessage&&H(Xe,He.containerMessage),He.containerRole&&ne(Xe,He.containerRole);let At=s.wrapperEl,Yt=He.id||At.getAttribute("id")||`swiper-wrapper-${B(16)}`,xi=s.params.autoplay&&s.params.autoplay.enabled?"off":"polite";ae(At,Yt),ge(At,xi),Ye();let{nextEl:Pi,prevEl:Ai}=s.navigation?s.navigation:{};Pi=bi(Pi),Ai=bi(Ai),Pi&&Pi.forEach(wt=>qe(wt,Yt,He.nextSlideMessage)),Ai&&Ai.forEach(wt=>qe(wt,Yt,He.prevSlideMessage)),ze()&&bi(s.pagination.el).forEach(yt=>{yt.addEventListener("keydown",we)}),tr().addEventListener("visibilitychange",Ne),s.el.addEventListener("focus",Je,!0),s.el.addEventListener("focus",Je,!0),s.el.addEventListener("pointerdown",$e,!0),s.el.addEventListener("pointerup",Qe,!0)};function _t(){y&&y.remove();let{nextEl:He,prevEl:Xe}=s.navigation?s.navigation:{};He=bi(He),Xe=bi(Xe),He&&He.forEach(Yt=>Yt.removeEventListener("keydown",we)),Xe&&Xe.forEach(Yt=>Yt.removeEventListener("keydown",we)),ze()&&bi(s.pagination.el).forEach(xi=>{xi.removeEventListener("keydown",we)}),tr().removeEventListener("visibilitychange",Ne),s.el&&typeof s.el!="string"&&(s.el.removeEventListener("focus",Je,!0),s.el.removeEventListener("pointerdown",$e,!0),s.el.removeEventListener("pointerup",Qe,!0))}b("beforeInit",()=>{y=Xr("span",s.params.a11y.notificationClass),y.setAttribute("aria-live","assertive"),y.setAttribute("aria-atomic","true")}),b("afterInit",()=>{s.params.a11y.enabled&&bt()}),b("slidesLengthChange snapGridLengthChange slidesGridLengthChange",()=>{s.params.a11y.enabled&&Ye()}),b("fromEdge toEdge afterInit lock unlock",()=>{s.params.a11y.enabled&&Le()}),b("paginationUpdate",()=>{s.params.a11y.enabled&&Oe()}),b("destroy",()=>{s.params.a11y.enabled&&_t()})}function ry(p){let{swiper:s,extendParams:g,on:b}=p;g({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let y=!1,a={},z=re=>re.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),F=re=>{let j=Oi(),H;re?H=new URL(re):H=j.location;let ae=H.pathname.slice(1).split("/").filter(we=>we!==""),ge=ae.length,ce=ae[ge-2],le=ae[ge-1];return{key:ce,value:le}},V=(re,j)=>{let H=Oi();if(!y||!s.params.history.enabled)return;let ae;s.params.url?ae=new URL(s.params.url):ae=H.location;let ge=s.virtual&&s.params.virtual.enabled?s.slidesEl.querySelector(`[data-swiper-slide-index="${j}"]`):s.slides[j],ce=z(ge.getAttribute("data-history"));if(s.params.history.root.length>0){let we=s.params.history.root;we[we.length-1]==="/"&&(we=we.slice(0,we.length-1)),ce=`${we}/${re?`${re}/`:""}${ce}`}else ae.pathname.includes(re)||(ce=`${re?`${re}/`:""}${ce}`);s.params.history.keepQuery&&(ce+=ae.search);let le=H.history.state;le&&le.value===ce||(s.params.history.replaceState?H.history.replaceState({value:ce},null,ce):H.history.pushState({value:ce},null,ce))},B=(re,j,H)=>{if(j)for(let ae=0,ge=s.slides.length;ae<ge;ae+=1){let ce=s.slides[ae];if(z(ce.getAttribute("data-history"))===j){let we=s.getSlideIndex(ce);s.slideTo(we,re,H)}}else s.slideTo(0,re,H)},U=()=>{a=F(s.params.url),B(s.params.speed,a.value,!1)},O=()=>{let re=Oi();if(s.params.history){if(!re.history||!re.history.pushState){s.params.history.enabled=!1,s.params.hashNavigation.enabled=!0;return}if(y=!0,a=F(s.params.url),!a.key&&!a.value){s.params.history.replaceState||re.addEventListener("popstate",U);return}B(0,a.value,s.params.runCallbacksOnInit),s.params.history.replaceState||re.addEventListener("popstate",U)}},ne=()=>{let re=Oi();s.params.history.replaceState||re.removeEventListener("popstate",U)};b("init",()=>{s.params.history.enabled&&O()}),b("destroy",()=>{s.params.history.enabled&&ne()}),b("transitionEnd _freeModeNoMomentumRelease",()=>{y&&V(s.params.history.key,s.activeIndex)}),b("slideChange",()=>{y&&s.params.cssMode&&V(s.params.history.key,s.activeIndex)})}function ny(p){let{swiper:s,extendParams:g,emit:b,on:y}=p,a=!1,z=tr(),F=Oi();g({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(ne,re){if(s.virtual&&s.params.virtual.enabled){let j=s.slides.find(ae=>ae.getAttribute("data-hash")===re);return j?parseInt(j.getAttribute("data-swiper-slide-index"),10):0}return s.getSlideIndex(vr(s.slidesEl,`.${s.params.slideClass}[data-hash="${re}"], swiper-slide[data-hash="${re}"]`)[0])}}});let V=()=>{b("hashChange");let ne=z.location.hash.replace("#",""),re=s.virtual&&s.params.virtual.enabled?s.slidesEl.querySelector(`[data-swiper-slide-index="${s.activeIndex}"]`):s.slides[s.activeIndex],j=re?re.getAttribute("data-hash"):"";if(ne!==j){let H=s.params.hashNavigation.getSlideIndex(s,ne);if(typeof H>"u"||Number.isNaN(H))return;s.slideTo(H)}},B=()=>{if(!a||!s.params.hashNavigation.enabled)return;let ne=s.virtual&&s.params.virtual.enabled?s.slidesEl.querySelector(`[data-swiper-slide-index="${s.activeIndex}"]`):s.slides[s.activeIndex],re=ne?ne.getAttribute("data-hash")||ne.getAttribute("data-history"):"";s.params.hashNavigation.replaceState&&F.history&&F.history.replaceState?(F.history.replaceState(null,null,`#${re}`||""),b("hashSet")):(z.location.hash=re||"",b("hashSet"))},U=()=>{if(!s.params.hashNavigation.enabled||s.params.history&&s.params.history.enabled)return;a=!0;let ne=z.location.hash.replace("#","");if(ne){let j=s.params.hashNavigation.getSlideIndex(s,ne);s.slideTo(j||0,0,s.params.runCallbacksOnInit,!0)}s.params.hashNavigation.watchState&&F.addEventListener("hashchange",V)},O=()=>{s.params.hashNavigation.watchState&&F.removeEventListener("hashchange",V)};y("init",()=>{s.params.hashNavigation.enabled&&U()}),y("destroy",()=>{s.params.hashNavigation.enabled&&O()}),y("transitionEnd _freeModeNoMomentumRelease",()=>{a&&B()}),y("slideChange",()=>{a&&s.params.cssMode&&B()})}function sy(p){let{swiper:s,extendParams:g,on:b,emit:y,params:a}=p;s.autoplay={running:!1,paused:!1,timeLeft:0},g({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let z,F,V=a&&a.autoplay?a.autoplay.delay:3e3,B=a&&a.autoplay?a.autoplay.delay:3e3,U,O=new Date().getTime(),ne,re,j,H,ae,ge,ce;function le(Xe){!s||s.destroyed||!s.wrapperEl||Xe.target===s.wrapperEl&&(s.wrapperEl.removeEventListener("transitionend",le),!(ce||Xe.detail&&Xe.detail.bySwiperTouchMove)&&$e())}let we=()=>{if(s.destroyed||!s.autoplay.running)return;s.autoplay.paused?ne=!0:ne&&(B=U,ne=!1);let Xe=s.autoplay.paused?U:O+B-new Date().getTime();s.autoplay.timeLeft=Xe,y("autoplayTimeLeft",Xe,Xe/V),F=requestAnimationFrame(()=>{we()})},Le=()=>{let Xe;return s.virtual&&s.params.virtual.enabled?Xe=s.slides.find(Yt=>Yt.classList.contains("swiper-slide-active")):Xe=s.slides[s.activeIndex],Xe?parseInt(Xe.getAttribute("data-swiper-autoplay"),10):void 0},M=Xe=>{if(s.destroyed||!s.autoplay.running)return;cancelAnimationFrame(F),we();let At=typeof Xe>"u"?s.params.autoplay.delay:Xe;V=s.params.autoplay.delay,B=s.params.autoplay.delay;let Yt=Le();!Number.isNaN(Yt)&&Yt>0&&typeof Xe>"u"&&(At=Yt,V=Yt,B=Yt),U=At;let xi=s.params.speed,Pi=()=>{!s||s.destroyed||(s.params.autoplay.reverseDirection?!s.isBeginning||s.params.loop||s.params.rewind?(s.slidePrev(xi,!0,!0),y("autoplay")):s.params.autoplay.stopOnLastSlide||(s.slideTo(s.slides.length-1,xi,!0,!0),y("autoplay")):!s.isEnd||s.params.loop||s.params.rewind?(s.slideNext(xi,!0,!0),y("autoplay")):s.params.autoplay.stopOnLastSlide||(s.slideTo(0,xi,!0,!0),y("autoplay")),s.params.cssMode&&(O=new Date().getTime(),requestAnimationFrame(()=>{M()})))};return At>0?(clearTimeout(z),z=setTimeout(()=>{Pi()},At)):requestAnimationFrame(()=>{Pi()}),At},ze=()=>{O=new Date().getTime(),s.autoplay.running=!0,M(),y("autoplayStart")},Oe=()=>{s.autoplay.running=!1,clearTimeout(z),cancelAnimationFrame(F),y("autoplayStop")},qe=(Xe,At)=>{if(s.destroyed||!s.autoplay.running)return;clearTimeout(z),Xe||(ge=!0);let Yt=()=>{y("autoplayPause"),s.params.autoplay.waitForTransition?s.wrapperEl.addEventListener("transitionend",le):$e()};if(s.autoplay.paused=!0,At){ae&&(U=s.params.autoplay.delay),ae=!1,Yt();return}U=(U||s.params.autoplay.delay)-(new Date().getTime()-O),!(s.isEnd&&U<0&&!s.params.loop)&&(U<0&&(U=0),Yt())},$e=()=>{s.isEnd&&U<0&&!s.params.loop||s.destroyed||!s.autoplay.running||(O=new Date().getTime(),ge?(ge=!1,M(U)):M(),s.autoplay.paused=!1,y("autoplayResume"))},Qe=()=>{if(s.destroyed||!s.autoplay.running)return;let Xe=tr();Xe.visibilityState==="hidden"&&(ge=!0,qe(!0)),Xe.visibilityState==="visible"&&$e()},Ne=Xe=>{Xe.pointerType==="mouse"&&(ge=!0,ce=!0,!(s.animating||s.autoplay.paused)&&qe(!0))},Je=Xe=>{Xe.pointerType==="mouse"&&(ce=!1,s.autoplay.paused&&$e())},Ye=()=>{s.params.autoplay.pauseOnMouseEnter&&(s.el.addEventListener("pointerenter",Ne),s.el.addEventListener("pointerleave",Je))},bt=()=>{s.el&&typeof s.el!="string"&&(s.el.removeEventListener("pointerenter",Ne),s.el.removeEventListener("pointerleave",Je))},_t=()=>{tr().addEventListener("visibilitychange",Qe)},He=()=>{tr().removeEventListener("visibilitychange",Qe)};b("init",()=>{s.params.autoplay.enabled&&(Ye(),_t(),ze())}),b("destroy",()=>{bt(),He(),s.autoplay.running&&Oe()}),b("_freeModeStaticRelease",()=>{(j||ge)&&$e()}),b("_freeModeNoMomentumRelease",()=>{s.params.autoplay.disableOnInteraction?Oe():qe(!0,!0)}),b("beforeTransitionStart",(Xe,At,Yt)=>{s.destroyed||!s.autoplay.running||(Yt||!s.params.autoplay.disableOnInteraction?qe(!0,!0):Oe())}),b("sliderFirstMove",()=>{if(!(s.destroyed||!s.autoplay.running)){if(s.params.autoplay.disableOnInteraction){Oe();return}re=!0,j=!1,ge=!1,H=setTimeout(()=>{ge=!0,j=!0,qe(!0)},200)}}),b("touchEnd",()=>{if(!(s.destroyed||!s.autoplay.running||!re)){if(clearTimeout(H),clearTimeout(z),s.params.autoplay.disableOnInteraction){j=!1,re=!1;return}j&&s.params.cssMode&&$e(),j=!1,re=!1}}),b("slideChange",()=>{s.destroyed||!s.autoplay.running||(ae=!0)}),Object.assign(s.autoplay,{start:ze,stop:Oe,pause:qe,resume:$e})}function ay(p){let{swiper:s,extendParams:g,on:b}=p;g({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let y=!1,a=!1;s.thumbs={swiper:null};function z(){let B=s.thumbs.swiper;if(!B||B.destroyed)return;let U=B.clickedIndex,O=B.clickedSlide;if(O&&O.classList.contains(s.params.thumbs.slideThumbActiveClass)||typeof U>"u"||U===null)return;let ne;B.params.loop?ne=parseInt(B.clickedSlide.getAttribute("data-swiper-slide-index"),10):ne=U,s.params.loop?s.slideToLoop(ne):s.slideTo(ne)}function F(){let{thumbs:B}=s.params;if(y)return!1;y=!0;let U=s.constructor;if(B.swiper instanceof U){if(B.swiper.destroyed)return y=!1,!1;s.thumbs.swiper=B.swiper,Object.assign(s.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(s.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),s.thumbs.swiper.update()}else if($l(B.swiper)){let O=Object.assign({},B.swiper);Object.assign(O,{watchSlidesProgress:!0,slideToClickedSlide:!1}),s.thumbs.swiper=new U(O),a=!0}return s.thumbs.swiper.el.classList.add(s.params.thumbs.thumbsContainerClass),s.thumbs.swiper.on("tap",z),!0}function V(B){let U=s.thumbs.swiper;if(!U||U.destroyed)return;let O=U.params.slidesPerView==="auto"?U.slidesPerViewDynamic():U.params.slidesPerView,ne=1,re=s.params.thumbs.slideThumbActiveClass;if(s.params.slidesPerView>1&&!s.params.centeredSlides&&(ne=s.params.slidesPerView),s.params.thumbs.multipleActiveThumbs||(ne=1),ne=Math.floor(ne),U.slides.forEach(ae=>ae.classList.remove(re)),U.params.loop||U.params.virtual&&U.params.virtual.enabled)for(let ae=0;ae<ne;ae+=1)vr(U.slidesEl,`[data-swiper-slide-index="${s.realIndex+ae}"]`).forEach(ge=>{ge.classList.add(re)});else for(let ae=0;ae<ne;ae+=1)U.slides[s.realIndex+ae]&&U.slides[s.realIndex+ae].classList.add(re);let j=s.params.thumbs.autoScrollOffset,H=j&&!U.params.loop;if(s.realIndex!==U.realIndex||H){let ae=U.activeIndex,ge,ce;if(U.params.loop){let le=U.slides.find(we=>we.getAttribute("data-swiper-slide-index")===`${s.realIndex}`);ge=U.slides.indexOf(le),ce=s.activeIndex>s.previousIndex?"next":"prev"}else ge=s.realIndex,ce=ge>s.previousIndex?"next":"prev";H&&(ge+=ce==="next"?j:-1*j),U.visibleSlidesIndexes&&U.visibleSlidesIndexes.indexOf(ge)<0&&(U.params.centeredSlides?ge>ae?ge=ge-Math.floor(O/2)+1:ge=ge+Math.floor(O/2)-1:ge>ae&&U.params.slidesPerGroup,U.slideTo(ge,B?0:void 0))}}b("beforeInit",()=>{let{thumbs:B}=s.params;if(!(!B||!B.swiper))if(typeof B.swiper=="string"||B.swiper instanceof HTMLElement){let U=tr(),O=()=>{let re=typeof B.swiper=="string"?U.querySelector(B.swiper):B.swiper;if(re&&re.swiper)B.swiper=re.swiper,F(),V(!0);else if(re){let j=`${s.params.eventsPrefix}init`,H=ae=>{B.swiper=ae.detail[0],re.removeEventListener(j,H),F(),V(!0),B.swiper.update(),s.update()};re.addEventListener(j,H)}return re},ne=()=>{if(s.destroyed)return;O()||requestAnimationFrame(ne)};requestAnimationFrame(ne)}else F(),V(!0)}),b("slideChange update resize observerUpdate",()=>{V()}),b("setTransition",(B,U)=>{let O=s.thumbs.swiper;!O||O.destroyed||O.setTransition(U)}),b("beforeDestroy",()=>{let B=s.thumbs.swiper;!B||B.destroyed||a&&B.destroy()}),Object.assign(s.thumbs,{init:F,update:V})}function oy(p){let{swiper:s,extendParams:g,emit:b,once:y}=p;g({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}});function a(){if(s.params.cssMode)return;let V=s.getTranslate();s.setTranslate(V),s.setTransition(0),s.touchEventsData.velocities.length=0,s.freeMode.onTouchEnd({currentPos:s.rtl?s.translate:-s.translate})}function z(){if(s.params.cssMode)return;let{touchEventsData:V,touches:B}=s;V.velocities.length===0&&V.velocities.push({position:B[s.isHorizontal()?"startX":"startY"],time:V.touchStartTime}),V.velocities.push({position:B[s.isHorizontal()?"currentX":"currentY"],time:Bn()})}function F(V){let{currentPos:B}=V;if(s.params.cssMode)return;let{params:U,wrapperEl:O,rtlTranslate:ne,snapGrid:re,touchEventsData:j}=s,ae=Bn()-j.touchStartTime;if(B<-s.minTranslate()){s.slideTo(s.activeIndex);return}if(B>-s.maxTranslate()){s.slides.length<re.length?s.slideTo(re.length-1):s.slideTo(s.slides.length-1);return}if(U.freeMode.momentum){if(j.velocities.length>1){let Oe=j.velocities.pop(),qe=j.velocities.pop(),$e=Oe.position-qe.position,Qe=Oe.time-qe.time;s.velocity=$e/Qe,s.velocity/=2,Math.abs(s.velocity)<U.freeMode.minimumVelocity&&(s.velocity=0),(Qe>150||Bn()-Oe.time>300)&&(s.velocity=0)}else s.velocity=0;s.velocity*=U.freeMode.momentumVelocityRatio,j.velocities.length=0;let ge=1e3*U.freeMode.momentumRatio,ce=s.velocity*ge,le=s.translate+ce;ne&&(le=-le);let we=!1,Le,M=Math.abs(s.velocity)*20*U.freeMode.momentumBounceRatio,ze;if(le<s.maxTranslate())U.freeMode.momentumBounce?(le+s.maxTranslate()<-M&&(le=s.maxTranslate()-M),Le=s.maxTranslate(),we=!0,j.allowMomentumBounce=!0):le=s.maxTranslate(),U.loop&&U.centeredSlides&&(ze=!0);else if(le>s.minTranslate())U.freeMode.momentumBounce?(le-s.minTranslate()>M&&(le=s.minTranslate()+M),Le=s.minTranslate(),we=!0,j.allowMomentumBounce=!0):le=s.minTranslate(),U.loop&&U.centeredSlides&&(ze=!0);else if(U.freeMode.sticky){let Oe;for(let qe=0;qe<re.length;qe+=1)if(re[qe]>-le){Oe=qe;break}Math.abs(re[Oe]-le)<Math.abs(re[Oe-1]-le)||s.swipeDirection==="next"?le=re[Oe]:le=re[Oe-1],le=-le}if(ze&&y("transitionEnd",()=>{s.loopFix()}),s.velocity!==0){if(ne?ge=Math.abs((-le-s.translate)/s.velocity):ge=Math.abs((le-s.translate)/s.velocity),U.freeMode.sticky){let Oe=Math.abs((ne?-le:le)-s.translate),qe=s.slidesSizesGrid[s.activeIndex];Oe<qe?ge=U.speed:Oe<2*qe?ge=U.speed*1.5:ge=U.speed*2.5}}else if(U.freeMode.sticky){s.slideToClosest();return}U.freeMode.momentumBounce&&we?(s.updateProgress(Le),s.setTransition(ge),s.setTranslate(le),s.transitionStart(!0,s.swipeDirection),s.animating=!0,po(O,()=>{!s||s.destroyed||!j.allowMomentumBounce||(b("momentumBounce"),s.setTransition(U.speed),setTimeout(()=>{s.setTranslate(Le),po(O,()=>{!s||s.destroyed||s.transitionEnd()})},0))})):s.velocity?(b("_freeModeNoMomentumRelease"),s.updateProgress(le),s.setTransition(ge),s.setTranslate(le),s.transitionStart(!0,s.swipeDirection),s.animating||(s.animating=!0,po(O,()=>{!s||s.destroyed||s.transitionEnd()}))):s.updateProgress(le),s.updateActiveIndex(),s.updateSlidesClasses()}else if(U.freeMode.sticky){s.slideToClosest();return}else U.freeMode&&b("_freeModeNoMomentumRelease");(!U.freeMode.momentum||ae>=U.longSwipesMs)&&(b("_freeModeStaticRelease"),s.updateProgress(),s.updateActiveIndex(),s.updateSlidesClasses())}Object.assign(s,{freeMode:{onTouchStart:a,onTouchMove:z,onTouchEnd:F}})}function ly(p){let{swiper:s,extendParams:g,on:b}=p;g({grid:{rows:1,fill:"column"}});let y,a,z,F,V=()=>{let H=s.params.spaceBetween;return typeof H=="string"&&H.indexOf("%")>=0?H=parseFloat(H.replace("%",""))/100*s.size:typeof H=="string"&&(H=parseFloat(H)),H},B=H=>{let{slidesPerView:ae}=s.params,{rows:ge,fill:ce}=s.params.grid,le=s.virtual&&s.params.virtual.enabled?s.virtual.slides.length:H.length;z=Math.floor(le/ge),Math.floor(le/ge)===le/ge?y=le:y=Math.ceil(le/ge)*ge,ae!=="auto"&&ce==="row"&&(y=Math.max(y,ae*ge)),a=y/ge},U=()=>{s.slides&&s.slides.forEach(H=>{H.swiperSlideGridSet&&(H.style.height="",H.style[s.getDirectionLabel("margin-top")]="")})},O=(H,ae,ge)=>{let{slidesPerGroup:ce}=s.params,le=V(),{rows:we,fill:Le}=s.params.grid,M=s.virtual&&s.params.virtual.enabled?s.virtual.slides.length:ge.length,ze,Oe,qe;if(Le==="row"&&ce>1){let $e=Math.floor(H/(ce*we)),Qe=H-we*ce*$e,Ne=$e===0?ce:Math.min(Math.ceil((M-$e*we*ce)/we),ce);qe=Math.floor(Qe/Ne),Oe=Qe-qe*Ne+$e*ce,ze=Oe+qe*y/we,ae.style.order=ze}else Le==="column"?(Oe=Math.floor(H/we),qe=H-Oe*we,(Oe>z||Oe===z&&qe===we-1)&&(qe+=1,qe>=we&&(qe=0,Oe+=1))):(qe=Math.floor(H/a),Oe=H-qe*a);ae.row=qe,ae.column=Oe,ae.style.height=`calc((100% - ${(we-1)*le}px) / ${we})`,ae.style[s.getDirectionLabel("margin-top")]=qe!==0?le&&`${le}px`:"",ae.swiperSlideGridSet=!0},ne=(H,ae)=>{let{centeredSlides:ge,roundLengths:ce}=s.params,le=V(),{rows:we}=s.params.grid;if(s.virtualSize=(H+le)*y,s.virtualSize=Math.ceil(s.virtualSize/we)-le,s.params.cssMode||(s.wrapperEl.style[s.getDirectionLabel("width")]=`${s.virtualSize+le}px`),ge){let Le=[];for(let M=0;M<ae.length;M+=1){let ze=ae[M];ce&&(ze=Math.floor(ze)),ae[M]<s.virtualSize+ae[0]&&Le.push(ze)}ae.splice(0,ae.length),ae.push(...Le)}},re=()=>{F=s.params.grid&&s.params.grid.rows>1},j=()=>{let{params:H,el:ae}=s,ge=H.grid&&H.grid.rows>1;F&&!ge?(ae.classList.remove(`${H.containerModifierClass}grid`,`${H.containerModifierClass}grid-column`),z=1,s.emitContainerClasses()):!F&&ge&&(ae.classList.add(`${H.containerModifierClass}grid`),H.grid.fill==="column"&&ae.classList.add(`${H.containerModifierClass}grid-column`),s.emitContainerClasses()),F=ge};b("init",re),b("update",j),s.grid={initSlides:B,unsetSlides:U,updateSlide:O,updateWrapperSize:ne}}function kb(p){let s=this,{params:g,slidesEl:b}=s;g.loop&&s.loopDestroy();let y=a=>{if(typeof a=="string"){let z=document.createElement("div");z.innerHTML=a,b.append(z.children[0]),z.innerHTML=""}else b.append(a)};if(typeof p=="object"&&"length"in p)for(let a=0;a<p.length;a+=1)p[a]&&y(p[a]);else y(p);s.recalcSlides(),g.loop&&s.loopCreate(),(!g.observer||s.isElement)&&s.update()}function Lb(p){let s=this,{params:g,activeIndex:b,slidesEl:y}=s;g.loop&&s.loopDestroy();let a=b+1,z=F=>{if(typeof F=="string"){let V=document.createElement("div");V.innerHTML=F,y.prepend(V.children[0]),V.innerHTML=""}else y.prepend(F)};if(typeof p=="object"&&"length"in p){for(let F=0;F<p.length;F+=1)p[F]&&z(p[F]);a=b+p.length}else z(p);s.recalcSlides(),g.loop&&s.loopCreate(),(!g.observer||s.isElement)&&s.update(),s.slideTo(a,0,!1)}function zb(p,s){let g=this,{params:b,activeIndex:y,slidesEl:a}=g,z=y;b.loop&&(z-=g.loopedSlides,g.loopDestroy(),g.recalcSlides());let F=g.slides.length;if(p<=0){g.prependSlide(s);return}if(p>=F){g.appendSlide(s);return}let V=z>p?z+1:z,B=[];for(let U=F-1;U>=p;U-=1){let O=g.slides[U];O.remove(),B.unshift(O)}if(typeof s=="object"&&"length"in s){for(let U=0;U<s.length;U+=1)s[U]&&a.append(s[U]);V=z>p?z+s.length:z}else a.append(s);for(let U=0;U<B.length;U+=1)a.append(B[U]);g.recalcSlides(),b.loop&&g.loopCreate(),(!b.observer||g.isElement)&&g.update(),b.loop?g.slideTo(V+g.loopedSlides,0,!1):g.slideTo(V,0,!1)}function Rb(p){let s=this,{params:g,activeIndex:b}=s,y=b;g.loop&&(y-=s.loopedSlides,s.loopDestroy());let a=y,z;if(typeof p=="object"&&"length"in p){for(let F=0;F<p.length;F+=1)z=p[F],s.slides[z]&&s.slides[z].remove(),z<a&&(a-=1);a=Math.max(a,0)}else z=p,s.slides[z]&&s.slides[z].remove(),z<a&&(a-=1),a=Math.max(a,0);s.recalcSlides(),g.loop&&s.loopCreate(),(!g.observer||s.isElement)&&s.update(),g.loop?s.slideTo(a+s.loopedSlides,0,!1):s.slideTo(a,0,!1)}function Bb(){let p=this,s=[];for(let g=0;g<p.slides.length;g+=1)s.push(g);p.removeSlide(s)}function cy(p){let{swiper:s}=p;Object.assign(s,{appendSlide:kb.bind(s),prependSlide:Lb.bind(s),addSlide:zb.bind(s),removeSlide:Rb.bind(s),removeAllSlides:Bb.bind(s)})}function ws(p){let{effect:s,swiper:g,on:b,setTranslate:y,setTransition:a,overwriteParams:z,perspective:F,recreateShadows:V,getEffectParams:B}=p;b("beforeInit",()=>{if(g.params.effect!==s)return;g.classNames.push(`${g.params.containerModifierClass}${s}`),F&&F()&&g.classNames.push(`${g.params.containerModifierClass}3d`);let O=z?z():{};Object.assign(g.params,O),Object.assign(g.originalParams,O)}),b("setTranslate",()=>{g.params.effect===s&&y()}),b("setTransition",(O,ne)=>{g.params.effect===s&&a(ne)}),b("transitionEnd",()=>{if(g.params.effect===s&&V){if(!B||!B().slideShadows)return;g.slides.forEach(O=>{O.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(ne=>ne.remove())}),V()}});let U;b("virtualUpdate",()=>{g.params.effect===s&&(g.slides.length||(U=!0),requestAnimationFrame(()=>{U&&g.slides&&g.slides.length&&(y(),U=!1)}))})}function ga(p,s){let g=qn(s);return g!==s&&(g.style.backfaceVisibility="hidden",g.style["-webkit-backface-visibility"]="hidden"),g}function mo(p){let{swiper:s,duration:g,transformElements:b,allSlides:y}=p,{activeIndex:a}=s,z=F=>F.parentElement?F.parentElement:s.slides.find(B=>B.shadowRoot&&B.shadowRoot===F.parentNode);if(s.params.virtualTranslate&&g!==0){let F=!1,V;y?V=b:V=b.filter(B=>{let U=B.classList.contains("swiper-slide-transform")?z(B):B;return s.getSlideIndex(U)===a}),V.forEach(B=>{po(B,()=>{if(F||!s||s.destroyed)return;F=!0,s.animating=!1;let U=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});s.wrapperEl.dispatchEvent(U)})})}}function uy(p){let{swiper:s,extendParams:g,on:b}=p;g({fadeEffect:{crossFade:!1}}),ws({effect:"fade",swiper:s,on:b,setTranslate:()=>{let{slides:z}=s,F=s.params.fadeEffect;for(let V=0;V<z.length;V+=1){let B=s.slides[V],O=-B.swiperSlideOffset;s.params.virtualTranslate||(O-=s.translate);let ne=0;s.isHorizontal()||(ne=O,O=0);let re=s.params.fadeEffect.crossFade?Math.max(1-Math.abs(B.progress),0):1+Math.min(Math.max(B.progress,-1),0),j=ga(F,B);j.style.opacity=re,j.style.transform=`translate3d(${O}px, ${ne}px, 0px)`}},setTransition:z=>{let F=s.slides.map(V=>qn(V));F.forEach(V=>{V.style.transitionDuration=`${z}ms`}),mo({swiper:s,duration:z,transformElements:F,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!s.params.cssMode})})}function hy(p){let{swiper:s,extendParams:g,on:b}=p;g({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});let y=(V,B,U)=>{let O=U?V.querySelector(".swiper-slide-shadow-left"):V.querySelector(".swiper-slide-shadow-top"),ne=U?V.querySelector(".swiper-slide-shadow-right"):V.querySelector(".swiper-slide-shadow-bottom");O||(O=Xr("div",`swiper-slide-shadow-cube swiper-slide-shadow-${U?"left":"top"}`.split(" ")),V.append(O)),ne||(ne=Xr("div",`swiper-slide-shadow-cube swiper-slide-shadow-${U?"right":"bottom"}`.split(" ")),V.append(ne)),O&&(O.style.opacity=Math.max(-B,0)),ne&&(ne.style.opacity=Math.max(B,0))};ws({effect:"cube",swiper:s,on:b,setTranslate:()=>{let{el:V,wrapperEl:B,slides:U,width:O,height:ne,rtlTranslate:re,size:j,browser:H}=s,ae=fo(s),ge=s.params.cubeEffect,ce=s.isHorizontal(),le=s.virtual&&s.params.virtual.enabled,we=0,Le;ge.shadow&&(ce?(Le=s.wrapperEl.querySelector(".swiper-cube-shadow"),Le||(Le=Xr("div","swiper-cube-shadow"),s.wrapperEl.append(Le)),Le.style.height=`${O}px`):(Le=V.querySelector(".swiper-cube-shadow"),Le||(Le=Xr("div","swiper-cube-shadow"),V.append(Le))));for(let ze=0;ze<U.length;ze+=1){let Oe=U[ze],qe=ze;le&&(qe=parseInt(Oe.getAttribute("data-swiper-slide-index"),10));let $e=qe*90,Qe=Math.floor($e/360);re&&($e=-$e,Qe=Math.floor(-$e/360));let Ne=Math.max(Math.min(Oe.progress,1),-1),Je=0,Ye=0,bt=0;qe%4===0?(Je=-Qe*4*j,bt=0):(qe-1)%4===0?(Je=0,bt=-Qe*4*j):(qe-2)%4===0?(Je=j+Qe*4*j,bt=j):(qe-3)%4===0&&(Je=-j,bt=3*j+j*4*Qe),re&&(Je=-Je),ce||(Ye=Je,Je=0);let _t=`rotateX(${ae(ce?0:-$e)}deg) rotateY(${ae(ce?$e:0)}deg) translate3d(${Je}px, ${Ye}px, ${bt}px)`;Ne<=1&&Ne>-1&&(we=qe*90+Ne*90,re&&(we=-qe*90-Ne*90)),Oe.style.transform=_t,ge.slideShadows&&y(Oe,Ne,ce)}if(B.style.transformOrigin=`50% 50% -${j/2}px`,B.style["-webkit-transform-origin"]=`50% 50% -${j/2}px`,ge.shadow)if(ce)Le.style.transform=`translate3d(0px, ${O/2+ge.shadowOffset}px, ${-O/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${ge.shadowScale})`;else{let ze=Math.abs(we)-Math.floor(Math.abs(we)/90)*90,Oe=1.5-(Math.sin(ze*2*Math.PI/360)/2+Math.cos(ze*2*Math.PI/360)/2),qe=ge.shadowScale,$e=ge.shadowScale/Oe,Qe=ge.shadowOffset;Le.style.transform=`scale3d(${qe}, 1, ${$e}) translate3d(0px, ${ne/2+Qe}px, ${-ne/2/$e}px) rotateX(-89.99deg)`}let M=(H.isSafari||H.isWebView)&&H.needPerspectiveFix?-j/2:0;B.style.transform=`translate3d(0px,0,${M}px) rotateX(${ae(s.isHorizontal()?0:we)}deg) rotateY(${ae(s.isHorizontal()?-we:0)}deg)`,B.style.setProperty("--swiper-cube-translate-z",`${M}px`)},setTransition:V=>{let{el:B,slides:U}=s;if(U.forEach(O=>{O.style.transitionDuration=`${V}ms`,O.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(ne=>{ne.style.transitionDuration=`${V}ms`})}),s.params.cubeEffect.shadow&&!s.isHorizontal()){let O=B.querySelector(".swiper-cube-shadow");O&&(O.style.transitionDuration=`${V}ms`)}},recreateShadows:()=>{let V=s.isHorizontal();s.slides.forEach(B=>{let U=Math.max(Math.min(B.progress,1),-1);y(B,U,V)})},getEffectParams:()=>s.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})}function ya(p,s,g){let b=`swiper-slide-shadow${g?`-${g}`:""}${p?` swiper-slide-shadow-${p}`:""}`,y=qn(s),a=y.querySelector(`.${b.split(" ").join(".")}`);return a||(a=Xr("div",b.split(" ")),y.append(a)),a}function dy(p){let{swiper:s,extendParams:g,on:b}=p;g({flipEffect:{slideShadows:!0,limitRotation:!0}});let y=(V,B)=>{let U=s.isHorizontal()?V.querySelector(".swiper-slide-shadow-left"):V.querySelector(".swiper-slide-shadow-top"),O=s.isHorizontal()?V.querySelector(".swiper-slide-shadow-right"):V.querySelector(".swiper-slide-shadow-bottom");U||(U=ya("flip",V,s.isHorizontal()?"left":"top")),O||(O=ya("flip",V,s.isHorizontal()?"right":"bottom")),U&&(U.style.opacity=Math.max(-B,0)),O&&(O.style.opacity=Math.max(B,0))};ws({effect:"flip",swiper:s,on:b,setTranslate:()=>{let{slides:V,rtlTranslate:B}=s,U=s.params.flipEffect,O=fo(s);for(let ne=0;ne<V.length;ne+=1){let re=V[ne],j=re.progress;s.params.flipEffect.limitRotation&&(j=Math.max(Math.min(re.progress,1),-1));let H=re.swiperSlideOffset,ge=-180*j,ce=0,le=s.params.cssMode?-H-s.translate:-H,we=0;s.isHorizontal()?B&&(ge=-ge):(we=le,le=0,ce=-ge,ge=0),re.style.zIndex=-Math.abs(Math.round(j))+V.length,U.slideShadows&&y(re,j);let Le=`translate3d(${le}px, ${we}px, 0px) rotateX(${O(ce)}deg) rotateY(${O(ge)}deg)`,M=ga(U,re);M.style.transform=Le}},setTransition:V=>{let B=s.slides.map(U=>qn(U));B.forEach(U=>{U.style.transitionDuration=`${V}ms`,U.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(O=>{O.style.transitionDuration=`${V}ms`})}),mo({swiper:s,duration:V,transformElements:B})},recreateShadows:()=>{s.params.flipEffect,s.slides.forEach(V=>{let B=V.progress;s.params.flipEffect.limitRotation&&(B=Math.max(Math.min(V.progress,1),-1)),y(V,B)})},getEffectParams:()=>s.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!s.params.cssMode})})}function py(p){let{swiper:s,extendParams:g,on:b}=p;g({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),ws({effect:"coverflow",swiper:s,on:b,setTranslate:()=>{let{width:z,height:F,slides:V,slidesSizesGrid:B}=s,U=s.params.coverflowEffect,O=s.isHorizontal(),ne=s.translate,re=O?-ne+z/2:-ne+F/2,j=O?U.rotate:-U.rotate,H=U.depth,ae=fo(s);for(let ge=0,ce=V.length;ge<ce;ge+=1){let le=V[ge],we=B[ge],Le=le.swiperSlideOffset,M=(re-Le-we/2)/we,ze=typeof U.modifier=="function"?U.modifier(M):M*U.modifier,Oe=O?j*ze:0,qe=O?0:j*ze,$e=-H*Math.abs(ze),Qe=U.stretch;typeof Qe=="string"&&Qe.indexOf("%")!==-1&&(Qe=parseFloat(U.stretch)/100*we);let Ne=O?0:Qe*ze,Je=O?Qe*ze:0,Ye=1-(1-U.scale)*Math.abs(ze);Math.abs(Je)<.001&&(Je=0),Math.abs(Ne)<.001&&(Ne=0),Math.abs($e)<.001&&($e=0),Math.abs(Oe)<.001&&(Oe=0),Math.abs(qe)<.001&&(qe=0),Math.abs(Ye)<.001&&(Ye=0);let bt=`translate3d(${Je}px,${Ne}px,${$e}px) rotateX(${ae(qe)}deg) rotateY(${ae(Oe)}deg) scale(${Ye})`,_t=ga(U,le);if(_t.style.transform=bt,le.style.zIndex=-Math.abs(Math.round(ze))+1,U.slideShadows){let He=O?le.querySelector(".swiper-slide-shadow-left"):le.querySelector(".swiper-slide-shadow-top"),Xe=O?le.querySelector(".swiper-slide-shadow-right"):le.querySelector(".swiper-slide-shadow-bottom");
vendor: 4,890 bytes, lines 728-732
728He||(He=ya("coverflow",le,O?"left":"top")),Xe||(Xe=ya("coverflow",le,O?"right":"bottom")),He&&(He.style.opacity=ze>0?ze:0),Xe&&(Xe.style.opacity=-ze>0?-ze:0)}}},setTransition:z=>{s.slides.map(V=>qn(V)).forEach(V=>{V.style.transitionDuration=`${z}ms`,V.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(B=>{B.style.transitionDuration=`${z}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}function fy(p){let{swiper:s,extendParams:g,on:b}=p;g({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});let y=F=>typeof F=="string"?F:`${F}px`;ws({effect:"creative",swiper:s,on:b,setTranslate:()=>{let{slides:F,wrapperEl:V,slidesSizesGrid:B}=s,U=s.params.creativeEffect,{progressMultiplier:O}=U,ne=s.params.centeredSlides,re=fo(s);if(ne){let j=B[0]/2-s.params.slidesOffsetBefore||0;V.style.transform=`translateX(calc(50% - ${j}px))`}for(let j=0;j<F.length;j+=1){let H=F[j],ae=H.progress,ge=Math.min(Math.max(H.progress,-U.limitProgress),U.limitProgress),ce=ge;ne||(ce=Math.min(Math.max(H.originalProgress,-U.limitProgress),U.limitProgress));let le=H.swiperSlideOffset,we=[s.params.cssMode?-le-s.translate:-le,0,0],Le=[0,0,0],M=!1;s.isHorizontal()||(we[1]=we[0],we[0]=0);let ze={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};ge<0?(ze=U.next,M=!0):ge>0&&(ze=U.prev,M=!0),we.forEach((Ye,bt)=>{we[bt]=`calc(${Ye}px + (${y(ze.translate[bt])} * ${Math.abs(ge*O)}))`}),Le.forEach((Ye,bt)=>{let _t=ze.rotate[bt]*Math.abs(ge*O);Le[bt]=_t}),H.style.zIndex=-Math.abs(Math.round(ae))+F.length;let Oe=we.join(", "),qe=`rotateX(${re(Le[0])}deg) rotateY(${re(Le[1])}deg) rotateZ(${re(Le[2])}deg)`,$e=ce<0?`scale(${1+(1-ze.scale)*ce*O})`:`scale(${1-(1-ze.scale)*ce*O})`,Qe=ce<0?1+(1-ze.opacity)*ce*O:1-(1-ze.opacity)*ce*O,Ne=`translate3d(${Oe}) ${qe} ${$e}`;if(M&&ze.shadow||!M){let Ye=H.querySelector(".swiper-slide-shadow");if(!Ye&&ze.shadow&&(Ye=ya("creative",H)),Ye){let bt=U.shadowPerProgress?ge*(1/U.limitProgress):ge;Ye.style.opacity=Math.min(Math.max(Math.abs(bt),0),1)}}let Je=ga(U,H);Je.style.transform=Ne,Je.style.opacity=Qe,ze.origin&&(Je.style.transformOrigin=ze.origin)}},setTransition:F=>{let V=s.slides.map(B=>qn(B));V.forEach(B=>{B.style.transitionDuration=`${F}ms`,B.querySelectorAll(".swiper-slide-shadow").forEach(U=>{U.style.transitionDuration=`${F}ms`})}),mo({swiper:s,duration:F,transformElements:V,allSlides:!0})},perspective:()=>s.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!s.params.cssMode})})}function my(p){let{swiper:s,extendParams:g,on:b}=p;g({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),ws({effect:"cards",swiper:s,on:b,setTranslate:()=>{let{slides:z,activeIndex:F,rtlTranslate:V}=s,B=s.params.cardsEffect,{startTranslate:U,isTouched:O}=s.touchEventsData,ne=V?-s.translate:s.translate;for(let re=0;re<z.length;re+=1){let j=z[re],H=j.progress,ae=Math.min(Math.max(H,-4),4),ge=j.swiperSlideOffset;s.params.centeredSlides&&!s.params.cssMode&&(s.wrapperEl.style.transform=`translateX(${s.minTranslate()}px)`),s.params.centeredSlides&&s.params.cssMode&&(ge-=z[0].swiperSlideOffset);let ce=s.params.cssMode?-ge-s.translate:-ge,le=0,we=-100*Math.abs(ae),Le=1,M=-B.perSlideRotate*ae,ze=B.perSlideOffset-Math.abs(ae)*.75,Oe=s.virtual&&s.params.virtual.enabled?s.virtual.from+re:re,qe=(Oe===F||Oe===F-1)&&ae>0&&ae<1&&(O||s.params.cssMode)&&ne<U,$e=(Oe===F||Oe===F+1)&&ae<0&&ae>-1&&(O||s.params.cssMode)&&ne>U;if(qe||$e){let Ye=(1-Math.abs((Math.abs(ae)-.5)/.5))**.5;M+=-28*ae*Ye,Le+=-.5*Ye,ze+=96*Ye,le=`${-25*Ye*Math.abs(ae)}%`}if(ae<0?ce=`calc(${ce}px ${V?"-":"+"} (${ze*Math.abs(ae)}%))`:ae>0?ce=`calc(${ce}px ${V?"-":"+"} (-${ze*Math.abs(ae)}%))`:ce=`${ce}px`,!s.isHorizontal()){let Ye=le;le=ce,ce=Ye}let Qe=ae<0?`${1+(1-Le)*ae}`:`${1-(1-Le)*ae}`,Ne=` 729 translate3d(${ce}, ${le}, ${we}px) 730 rotateZ(${B.rotate?V?-M:M:0}deg) 731 scale(${Qe}) 732 `;if(B.slideShadows){let Ye=j.querySelector(".swiper-slide-shadow");Ye||(Ye=ya("cards",j)),Ye&&(Ye.style.opacity=Math.min(Math.max((Math.abs(ae)-.5)/.5,0),1))}j.style.zIndex=-Math.abs(Math.round(H))+z.length;let Je=ga(B,j);Je.style.transform=Ne}},setTransition:z=>{let F=s.slides.map(V=>qn(V));F.forEach(V=>{V.style.transitionDuration=`${z}ms`,V.querySelectorAll(".swiper-slide-shadow").forEach(B=>{B.style.transitionDuration=`${z}ms`})}),mo({swiper:s,duration:z,transformElements:F})},perspective:()=>!0,overwriteParams:()=>({_loopSwapReset:!1,watchSlidesProgress:!0,loopAdditionalSlides:s.params.cardsEffect.rotate?3:2,centeredSlides:!0,virtualTranslate:!s.params.cssMode})})}var Fb=[Zg,Wg,Xg,Yg,Kg,Jg,Qg,ey,ty,iy,ry,ny,sy,ay,oy,ly,cy,uy,hy,dy,py,fy,my];ma.use(Fb);
732var Ob="swiper-slide",gy={default:4.3,medium:3,small:1},Nb=function(p="default",s=void 0){return{tickerType:p,size:s,_swiper:null,init(){this._initSlider()},_initSlider(){let g=this.$refs.slider;if((g?.querySelectorAll(`.${Ob}`).length||0)===0)return;let y=gy[this.tickerType]||gy.default;this.size&&(y=this.size);let a={spaceBetween:20,loop:!0,loopAddBlankSlides:!0,direction:"horizontal",slidesPerView:1.5,breakpoints:{320:{slidesPerView:2.25},576:{slidesPerView:2.25},768:{slidesPerView:y-2>=1?y-2:1},996:{slidesPerView:y-1>=1?y-1:1},1200:{slidesPerView:y}},autoplay:{delay:3e3,pauseOnMouseEnter:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},a11y:{prevSlideMessage:Si("Oekokiste.Core:Main:slider.previous-slide"),nextSlideMessage:Si("Oekokiste.Core:Main:slider.next-slide")}};this._swiper=new ma(g,a)}}},yy=Nb;var _y=(p,s=300)=>({showTickerArrows:p,scrollByAmount:s,scrollPosition:0,init(){this.updateScrollButtons(),"recipesLoading"in this&&this.$watch("recipesLoading",b=>{b||this.$nextTick(()=>requestAnimationFrame(()=>this.updateScrollButtons()))});let g=this.$refs.tilesTickerCollection;g.addEventListener("scroll",()=>{this.scrollPosition=g.scrollLeft}),this.$watch("scrollPosition",()=>this.updateScrollButtons())},scrollLeft(){this.$refs.tilesTickerCollection.scrollBy({left:-this.scrollByAmount,behavior:"smooth"})},scrollRight(){this.$refs.tilesTickerCollection.scrollBy({left:this.scrollByAmount,behavior:"smooth"})},updateScrollButtons(){if(!p)return;let g=this.$refs.tilesTickerCollection,b=this.$refs.tilesTickerButtonLeft.querySelector(".tiles__arrow"),y=this.$refs.tilesTickerButtonRight.querySelector(".tiles__arrow");b?.classList.toggle("tiles__arrow--inactive",g.scrollLeft<=0),y?.classList.toggle("tiles__arrow--inactive",g.scrollLeft+g.clientWidth>=g.scrollWidth-1)}});var Ed="swiper-slide",jb="swiper",$b=function(p){return{_swiper:null,inBackend:p,init(){if(this._initSlider(),this.inBackend){let s=this;document.addEventListener("Neos.NodeCreated",function(g){s.nodeCreated(g)},!1),document.addEventListener("Neos.NodeSelected",function(g){s.nodeSelected(g)},!1),document.addEventListener("Neos.NodeRemoved",function(g){s.nodeRemoved(g)},!1)}},_initSlider(){let s=this.$refs.slider;if((s?.querySelectorAll(`.${Ed}`).length||0)===0)return;let b={spaceBetween:20,loop:!0,direction:"horizontal",slidesPerView:1,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{el:".swiper-pagination",type:"bullets"},a11y:{prevSlideMessage:Si("Oekokiste.Core:Main:slider.previous-slide"),nextSlideMessage:Si("Oekokiste.Core:Main:slider.next-slide")}},y={};this.inBackend||(y={autoplay:{delay:3e3,pauseOnMouseEnter:!0}});let a={...b,...y};this._swiper=new ma(s,a)},getSlideIndex(s){return Array.from(this.$refs.slider.querySelectorAll(`.${Ed}`)).indexOf(s)},isSlide(s){return s.classList.contains(Ed)},isOwnSlide(s){return this.isSlide(s)?s.closest(`.${jb}`)===this.$refs.slider:!1},nodeSelected(s){if(this._swiper&&this.isOwnSlide(s.detail.element)){let g=this.getSlideIndex(s.detail.element);g>=0&&(this._swiper.update(),this._swiper.slideTo(g))}},nodeRemoved(s){this._swiper&&this.isSlide(s.detail.element)&&this._swiper.update()},nodeCreated(s){this._swiper&&this.isOwnSlide(s.detail.element)&&this._swiper.update()}}},vy=$b;var by=(p,s)=>({validateIban:p,ibanErrorMessage:"",updateEmailIsLoading:!1,updateEmailErrorMessage:"",updateEmailSuccessMessage:"",updatePasswordIsLoading:!1,updatePasswordErrorMessage:"",updatePasswordSuccessMessage:"",updatePersonalDataIsLoading:!1,updatePersonalDataErrorMessage:"",updatePersonalDataSuccessMessage:"",updateDeliveryDataIsLoading:!1,updateDeliveryDataErrorMessage:"",updateDeliveryDataSuccessMessage:"",updatePaymentDataIsLoading:!1,updatePaymentDataErrorMessage:"",updatePaymentDataSuccessMessage:"",updateSettingsIsLoading:!1,updateSettingsErrorMessage:"",updateSettingsSuccessMessage:"",deleteAccountIsLoading:!1,deleteAccountErrorMessage:"",currentUserData:null,personalData:{title:"",firstName:"",lastName:"",company:"",vatId:"",postalCode:"",city:"",street:"",phone:"",birthday:""},deliveryData:{atHome:!1,ifNotAtHome:0,placeNote:""},paymentData:{paymentProvider:0,iban:"",useDifferentInvoiceAddress:!1,invoiceName:"",invoiceCompany:"",invoiceCompany2:"",invoicePostalCode:"",invoiceCity:"",invoiceStreet:""},settings:null,serverPushEndpoints:JSON.parse(s),updatePushIsLoading:!1,updatePushErrorMessage:"",updatePushSuccessMessage:"",pushIsBlocked:!1,pushCanBeActivated:!1,pushCanBeDisabled:!1,init(){let g=mn().details;this.currentUserData=JSON.parse(JSON.stringify(g)),this.settings=JSON.parse(JSON.stringify(g?.settings)),this.personalData.title=this.currentUserData?.opener??"",this.personalData.firstName=this.currentUserData?.f
732irstname??"",this.personalData.lastName=this.currentUserData?.lastname??"",this.personalData.vatId=this.currentUserData?.vatId??"",this.personalData.phone=this.currentUserData?.phone??"",this.personalData.birthday=this.currentUserData?.birthday??"",this.currentUserData&&this.currentUserData.deliveryStreet!==""?(this.personalData.company=this.currentUserData.deliveryCompany,this.personalData.postalCode=this.currentUserData.deliveryZip,this.personalData.city=this.currentUserData.deliveryCity,this.personalData.street=this.currentUserData.deliveryStreet,this.paymentData.useDifferentInvoiceAddress=!0,this.paymentData.invoiceName=this.currentUserData.deliveryName,this.paymentData.invoiceCompany=this.currentUserData.company,this.paymentData.invoiceCompany2=this.currentUserData.department,this.paymentData.invoicePostalCode=this.currentUserData.zip,this.paymentData.invoiceCity=this.currentUserData.city,this.paymentData.invoiceStreet=this.currentUserData.street):(this.personalData.company=this.currentUserData?.company??"",this.personalData.postalCode=this.currentUserData?.zip??"",this.personalData.city=this.currentUserData?.city??"",this.personalData.street=this.currentUserData?.street??""),this.deliveryData.atHome=this.currentUserData?.placeCode===1||this.currentUserData?.placeCode===3||this.currentUserData?.placeCode===5,this.deliveryData.atHome?this.deliveryData.ifNotAtHome=this.currentUserData?this.currentUserData.placeCode-1:0:this.deliveryData.ifNotAtHome=this.currentUserData?.placeCode??0,this.deliveryData.placeNote=this.currentUserData?.placeNote??"",this.paymentData.paymentProvider=this.currentUserData?.payCode??0,this.paymentData.iban=this.currentUserData?.accountNumber??"",this.updatePushSettings()},async updateEmail(g){g.preventDefault(),g.stopPropagation(),this.updateEmailErrorMessage="",this.updateEmailSuccessMessage="";let b=new FormData(g.target),y=b.get("email"),a=b.get("emailRepeat");if(y!==a){this.updateEmailErrorMessage=Si("Oekokiste.Core:MyAccount:accordion.field.logindata.form.email.error.emailsNotMatching");return}this.updateEmailIsLoading=!0;let z=await nm(y);if(z.error){this.updateEmailIsLoading=!1,this.updateEmailErrorMessage=on(z.error);return}let F={email:y},V=await this._updateUserSettings(F,"updateUserEmail");if(this.updateEmailIsLoading=!1,V.error){this.updateEmailErrorMessage=on(V.error);return}this.updateEmailSuccessMessage=V.successMessage,this.$dispatch("update-user-details")},async updatePassword(g){g.preventDefault(),g.stopPropagation(),this.updatePasswordErrorMessage="",this.updatePasswordSuccessMessage="";let b=new FormData(g.target),y=b.get("password"),a=b.get("passwordRepeat");if(y!==a){this.updatePasswordErrorMessage=Si("Oekokiste.Core:Signup:contactDetails.errorMessage.passwordsNotMatching");return}this.updatePasswordIsLoading=!0;let z={password:y},F=await this._updateUserSettings(z,"updateUserPassword");if(this.updatePasswordIsLoading=!1,F.error){this.updatePasswordErrorMessage=on(F.error);return}this.updatePasswordSuccessMessage=F.successMessage,this.$dispatch("update-user-details")},async updatePersonalData(g){g.preventDefault(),g.stopPropagation(),this.updatePersonalDataErrorMessage="",this.updatePersonalDataSuccessMessage="",this.updatePersonalDataIsLoading=!0;let b={email:this.currentUserData?.email??"",title:this.personalData.title,firstName:this.personalData.firstName,lastName:this.personalData.lastName,company:this.personalData.company,vatId:this.personalData.vatId,postalCode:this.personalData.postalCode,city:this.personalData.city,street:this.personalData.street,phone:this.personalData.phone,birthday:this.personalData.birthday},y=await this._updateUserSettings(b,"updateUserPersonalData");if(this.updatePersonalDataIsLoading=!1,y.error){this.updatePersonalDataErrorMessage=on(y.error);return}this.updatePersonalDataSuccessMessage=y.successMessage,this.$dispatch("update-user-details")},async updateDeliveryData(g){g.preventDefault(),g.stopPropagation(),this.updateDeliveryDataErrorMessage="",this.updateDeliveryDataSuccessMessage="",this.updateDeliveryDataIsLoading=!0;let b={placeCode:this.deliveryData.atHome?this.deliveryData.ifNotAtHome+1:this.deliveryData.ifNotAtHome,placeNote:this.deliveryData.placeNote},y=await this._updateUserSettings(b,"updateUserDeliveryData");if(this.updateDeliveryDataIsLoading=!1,y.error){this.updateDeliveryDataErrorMessage=on(y.error);return}this.updateDeliveryDataSuccessMessage=y.successMessage,this.$dispatch("update-user-details")},async updatePaymentData(g){g.preventDefault(),g.stopPropagation(),this.updatePaymentDataErrorMessage="",this.updatePaymentDataSuccessMessage="",this.updatePaymentDataIsLoading=!0,this.ibanErrorMessage="";let b=od(this.paymentData.iban??void 0)===null?this.paymentData.iban:od(this.paymentData.iban??void 0);if(this.validateIban&&this.paymentData.iban!==this.currentUserData?.accountNumber&&!im(b??void 0).valid){this.ibanErrorMessage=Si("Oekokiste.Core:Signup:payment.errorMessage.ibanInvalid");return}let a={paymentProvider:this.paymentData.paymentProvider,iban:this.paymentData.iban===this.currentUserData?.accountNumber?"":this.paymentData.iban,useDifferentInvoiceAddress:this.paymentData.useDifferentInvoiceAddress,invoiceName:this.paymentData.invoiceName,invoiceCompany:this.paymentData.invoiceCompany,invoiceCompany2:this.paymentData.invoiceCompany2,invoicePostalCode:this.paymentData.invoicePostalCode,invoiceCity:this.paymentData.invoiceCity,invoiceStreet:this.paymentData.invoiceStreet},z=await this._updateUserSettings(a,"updateUserPaymentData");if(this.updatePaymentDataIsLoading=!1,z.error){this.updatePaymentDataErrorMessage=on(z.error);return}this.updatePaymentDataSuccessMessage=z.successMessage,this.$dispatch("update-user-details")},async updateSettings(g){g.preventDefault(),g.stopPropagation(),this.updateSettingsErrorMessage="",this.updateSettingsSuccessMessage="",this.updateSettingsIsLoading=!0;let b=await hd(),y={orderConfirmationSetting:this.settings.orderConfirmationSetting,basketForgottenSett
732ing:this.settings.basketForgottenSetting,deliveryInformationSetting:this.settings.deliveryInformationSetting,orderChangesSetting:this.settings.orderChangesSetting,orderReminderSetting:this.settings.orderReminderSetting,profileChangesSetting:this.settings.profileChangesSetting,newsletterSetting:this.settings.newsletterSetting,marketingSetting:this.settings.marketingSetting??{email:!1,sms:!1,push:!1},favouritesAvailableSetting:this.settings.favouritesAvailableSetting??{email:!1,sms:!1,push:!1},pushEndpoint:b?.endpoint??null},a=await this._updateAllUserSettings(y,"updateUserSettings");if(this.updateSettingsIsLoading=!1,a.error){this.updateSettingsErrorMessage=on(a.error);return}this.updateSettingsSuccessMessage=a.successMessage,this.$dispatch("update-user-details")},confirmAccountDeletion(g){g.preventDefault(),g.stopPropagation(),confirm(Si("Oekokiste.Core:MyAccount:accordion.field.deleteAccount.confirm"))&&this.deleteAccount()},async deleteAccount(){this.deleteAccountErrorMessage="",this.deleteAccountIsLoading=!0;let g=await Li(xm,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deleteAccount:!0})});if(this.deleteAccountIsLoading=!1,g.error){this.deleteAccountErrorMessage=on(g.error);return}bm(!0)},async updatePushSettings(){let g=await hd();if(this.updatePushIsLoading=!1,Notification.permission==="denied"){this.pushIsBlocked=!0,this.pushCanBeActivated=!1,this.pushCanBeDisabled=!1,console.warn("Push notifications are blocked!");return}let y=g?.endpoint;if(y===void 0){this.pushIsBlocked=!1,this.pushCanBeActivated=!0,this.pushCanBeDisabled=!1;return}let a=new TextEncoder().encode(y),z=await crypto.subtle.digest("SHA-1",a),B=Array.from(new Uint8Array(z)).map(O=>O.toString(16).padStart(2,"0")).join("").toLowerCase(),U=Object.keys(this.serverPushEndpoints).includes(B);U&&this.settings&&(this.settings.deliveryInformationSetting.push=this.serverPushEndpoints[B].deliveryInformation,this.settings.orderReminderSetting.push=this.serverPushEndpoints[B].orderReminders,this.settings.orderChangesSetting.push=this.serverPushEndpoints[B].systemOrderChange,this.settings.marketingSetting.push=this.serverPushEndpoints[B].marketing,this.settings.favouritesAvailableSetting.push=this.serverPushEndpoints[B].favouritesAvailable,this.settings.basketForgottenSetting.push=this.serverPushEndpoints[B].basketForgotten),this.pushIsBlocked=!1,this.pushCanBeActivated=!U,this.pushCanBeDisabled=U},async enablePushNotifications(){this.setPushLoading();let{error:g,successMessage:b}=await ym();if(this.updatePushIsLoading=!1,g){this.updatePushErrorMessage=g.message??"",this.pushIsBlocked=g.pushBlocked??this.pushIsBlocked,this.pushCanBeActivated=g.pushCanBeActivated??this.pushCanBeActivated,this.pushCanBeDisabled=g.pushCanBeDisabled??this.pushCanBeDisabled;return}this.updatePushSuccessMessage=b??"",this.pushIsBlocked=!1,this.pushCanBeActivated=!1,this.pushCanBeDisabled=!0;for(let y in this.settings)this.settings[y].push=!0},async disablePushNotifications(){this.setPushLoading();let g=await _m();if(g){if(this.updatePushIsLoading=!1,g.error){this.updatePushErrorMessage=g.error.humanReadableError;return}this.updatePushSuccessMessage=g.data.successMessage,this.pushIsBlocked=!1,this.pushCanBeActivated=!0,this.pushCanBeDisabled=!1}},async setPushLoading(){this.updatePushIsLoading=!0,this.updatePushErrorMessage="",this.updatePushSuccessMessage=""},async _updateUserSettings(g,b){return await Li(dd+"/"+b,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userData:g})})},async _updateAllUserSettings(g,b){return await Li(dd+"/"+b,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userData:g})})}});var xy=()=>({init(){this.setActiveLinkClass()},setActiveLinkClass(){let p=window.location.pathname,s=this.$refs.myAccountNavigation;Array.from(s.querySelectorAll("a")).map(b=>{b.href.includes(p)&&b.classList.add("active")})},getClassForNavigation(){let p=this.$refs.myAccountNavigation,s=p.offsetWidth,g=0;return p.querySelectorAll("a").forEach(b=>{g+=b.offsetWidth+20}),g<=s?"":"custom-scrollbar"}});var wy=()=>({subscriptions:[],deselectedItems:{elements:[]},deselectedGroups:{elements:[]},newDeselectedItem:"",changeSubscriptionFor:void 0,changedSubscriptionPeriod:void 0,changedSubscriptionAmount:void 0,changeTourFor:void 0,deleteConfirmationFor:void 0,subscriptionToDelete:void 0,updateSubscriptionIsLoading:!1,updateSubscriptionErrorMessage:"",updateSubscriptionSuccessMessage:"",deleteSubscriptionIsLoading:!1,deleteSubscriptionErrorMessage:"",addNewDeselectedItemLo
732ading:!1,addNewDeselectedItemErrorMessage:"",addNewDeselectedItemSuccessMessage:"",addNewDeselectedItemWrongInputMessage:"",async init(){this.subscriptions=Vs().subscriptions,this.deselectedItems=Vs().deselectedItems??{elements:[]},this.deselectedGroups=Vs().deselectedGroups??{elements:[]},this.$watch(`$store.${uo}.subscriptions`,p=>{this.subscriptions=p}),this.$watch(`$store.${uo}.deselectedItems`,p=>{this.deselectedItems=p}),this.$watch(`$store.${uo}.deselectedGroups`,p=>{this.deselectedGroups=p}),Ou().then()},shouldShowAmountConfiguration(p){return p.product.information.productType!==nd.ECOBOX_VARIANT},showDeleteConfirmation(p){this.subscriptionToDelete=this.subscriptions.find(s=>s.id===p),this.$refs.subscriptionDeletionModal.showModal()},closeDeleteConfirmation(){this.$refs.subscriptionDeletionModal.close(),this._resetDialogs()},showChangeAboFor(p){let s=this.changeSubscriptionFor;this._resetDialogs(),p.id!==s&&(this.changeSubscriptionFor=p.id,this.changedSubscriptionPeriod=p.period,this.changedSubscriptionAmount=p.amount)},showChangeTourFor(p){this._resetDialogs(),this.changeTourFor=p},_resetDialogs(){this.changeSubscriptionFor=void 0,this.changeTourFor=void 0,this.deleteConfirmationFor=void 0,this.subscriptionToDelete=void 0,this.updateSubscriptionErrorMessage="",this.updateSubscriptionSuccessMessage="",this.deleteSubscriptionErrorMessage="",this.addNewDeselectedItemErrorMessage="",this.addNewDeselectedItemSuccessMessage="",this.addNewDeselectedItemWrongInputMessage=""},decreaseAmount(p){let s=Wf(this.changedSubscriptionAmount??0,p.product.itemType,p.product.amountConfiguration),g=p.product.amountConfiguration;s<=0||s<g.min||(this.changedSubscriptionAmount=s)},increaseAmount(p){let s=Zf(this.changedSubscriptionAmount??0,p.product.itemType,p.product.amountConfiguration),g=p.product.amountConfiguration;g.max>0&&s>g.max||(this.changedSubscriptionAmount=s)},async updateSubscription(p){let s={...p,amount:this.changedSubscriptionAmount,period:parseInt(String(this.changedSubscriptionPeriod))};this.updateSubscriptionErrorMessage="",this.updateSubscriptionSuccessMessage="",this.updateSubscriptionIsLoading=!0;let g=await Li(Tm,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(this.updateSubscriptionIsLoading=!1,g.error){await Ru("Could not update subscription",{subscriptionId:p.id}),this.updateSubscriptionErrorMessage=Si("Oekokiste.Core:MySubscriptions:update-subscription-error"),this.subscriptions=[...this.subscriptions,p];return}else this.updateSubscriptionSuccessMessage=Si("Oekokiste.Core:MySubscriptions:update-subscription-success")},async deleteSubscription(p){if(this.$refs.subscriptionDeletionModal.close(),this.deleteSubscriptionErrorMessage="",!p)return;this.deleteSubscriptionIsLoading=!0,this.subscriptions=this.subscriptions.filter(b=>b.id!==p.id);let s=p.id;p.product.information.productType===nd.ECOBOX_VARIANT&&(s=s*-1);let g=await Li(Pm+`?subscriptionId=${s}`,{method:"POST"});if(this.deleteSubscriptionIsLoading=!1,g.error){await Ru("Could not delete subscription",{subscriptionId:s}),this.deleteSubscriptionErrorMessage=Si("Oekokiste.Core:MySubscriptions:delete-subscription-error"),this.subscriptions=[...this.subscriptions,p];return}this._resetDialogs()},async addDeselectedItems(p){if(this.addNewDeselectedItemErrorMessage="",this.addNewDeselectedItemSuccessMessage="",this.addNewDeselectedItemWrongInputMessage="",!p||p.trim()===""){this.addNewDeselectedItemWrongInputMessage=Si("Oekokiste.Core:MySubscriptions:deselected-article-wrong-input-message");return}this.addNewDeselectedItemLoading=!0;let s=p.trim(),g=await Li(Em+`?deselectedItem=${s}`,{method:"POST"});if(this.addNewDeselectedItemLoading=!1,!g||g.error){await Ru(Si("Oekokiste.Core:MySubscriptions:deselected-article-error-message"),{newDeselectedItem:p}),this.addNewDeselectedItemErrorMessage=Si("Oekokiste.Core:MySubscriptions:deselected-article-error-message");return}else this.addNewDeselectedItemSuccessMessage=Si("Oekokiste.Core:MySubscriptions:deselected-article-success-message"),this.newDeselectedItem=""}});var Sy=()=>({selectableDeliveryEvents:[],init(){this._updateSelectableDeliveryDates(),this.$watch(`$store.${uo}.allDates`,async()=>{this._updateSelectableDeliveryDates()})},isSelected(p,s){return s?Md(p,s):Zu(p)},_updateSelectableDeliveryDates(){if(!mn().isSignedIn)return;let p=Vs().pauses,s=Vs().allDates,b=mm(s,p).reduce((y,a)=>
732(a.tours.forEach(z=>{if(z.isSelectable&&Cf(new Date(z.lastOrderChange))){let F=!1;if(z.orders.length>0)for(let V of z.orders)V.state!=="Cancelled"&&V.isChangeable&&(y.push({tour:z,order:V}),F=!0);F||y.push({tour:z,order:null})}}),y),[]);b.sort((y,a)=>{let z=y.tour,F=a.tour,V=new Date(z.date),B=new Date(F.date);if(V===B){let U=new Date(z.lastOrderChange),O=new Date(F.lastOrderChange);return U<O?-1:1}else return V<B?-1:1}),this.selectableDeliveryEvents=b.slice(0,7)}}),Zu=p=>{let s=Vs();return!s.currentDeliveryTour||!p?!1:s.currentDeliveryTour.date===p.date&&s.currentDeliveryTour.id===p.id},Md=(p,s)=>{let g=Vs();return g.currentOrder?s.id===-1&&g.currentOrder.id===-1?Zu(p):g.currentOrder.id===s.id:!1};var Ty=()=>({activeFilter:[],filtersAndSortingAreVisibleOnMobile:!1,init(){this.noResultsForTheseFilters(),as().enhanceRecipeURLWithIndexForSearchPage()},getClassForNavigation(){let p=this.$refs.searchPageNavigation,s=p.offsetWidth,g=0;return p.querySelectorAll(".button").forEach(b=>{g+=b.offsetWidth+20}),g<=s?"":"custom-scrollbar"},isFilteredOut(p){if(this.noResultsForTheseFilters(),this.activeFilter.length===0)return!1;let s=JSON.parse(p);return!this.activeFilter.every(g=>s[g])},changeFilter(){if(this.$refs.filters===void 0)return;let p=this.$refs.filters.querySelectorAll(".checkbox input");this.activeFilter=Array.from(p).filter(s=>s.checked).map(s=>s.value),as().increaseNumberOfFiltersApplied()},changeSorting(p){let s=p.target,g=s?.selectedOptions[0].dataset,b={value:s?.value,sortby:g.sortby,direction:g.direction};this.$store.searchPage.sorting=b,this._changeSorting(b),as().increaseNumberOfSortingsApplied()},_changeSorting(p){this.$refs.filters!==void 0&&p?.value!==""&&this.$refs.searchPage!==void 0&&this.$refs.searchPage.querySelectorAll(".result-list").forEach(s=>{this._sortProductsInSearchPage(s,p)})},_sortProductsInSearchPage(p,s){let g=a=>JSON.parse(a.dataset.sortingOptions)[s.sortby],b=p.querySelectorAll(".product-list-tile");Array.from(b).sort((a,z)=>{let F=g(a),V=g(z);return typeof F=="string"&&typeof V=="string"?s.direction==="asc"?F.localeCompare(V):V.localeCompare(F):s.direction==="asc"?F-V:V-F}).forEach(a=>{p.appendChild(a)})},noResultsForTheseFilters(){let p=this.$refs.searchPage,s=p.querySelectorAll(".product-list-tile:not(.product-list-product--hidden)"),g=p.querySelector(".search-page__no-results-found");g&&(s.length===0?g.classList.add("search-page__no-results-found--visible"):g.classList.remove("search-page__no-results-found--visible"))},increaseCategoryFilterForTracking(){as().increaseNumberOfCategoryFiltersApplied()}});var Py=p=>({bonusCampaign:p,applyBonusCampaignErrorMessage:"",async init(){this.$watch("$store.bonusPoints",s=>{let g=s.filter(b=>b.id===p.id)[0];g!==null&&(this.bonusCampaign=g)})},async apply(){let s=await Li(Rm,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({bonusCampaignId:this.bonusCampaign.id})});if(s.error){this.applyBonusCampaignErrorMessage=on(s.error);return}this.bonusCampaign.customerIsParticipating=!0,s.data&&xt.store(Ol,s.data),this.$dispatch("update-user-details")}});var Ey=(p,s)=>({claimBonusRewardErrorMessage:"",claimBonusRewardSuccessMessage:"",hasBeenClaimed:!1,bonusReward:null,async init(){let g=Nf().filter(b=>b.id===p)[0];g!==null&&g.rewards&&(this.bonusReward=g.rewards.filter(b=>b.id===s)[0]),this.bonusReward?.hasBeenRedeemed&&(this.claimBonusRewardSuccessMessage=Si("Oekokiste.Loyalty:BonusCampaigns:rewards.claim.success")),this.$watch("$store.bonusPoints",b=>{let y=b.filter(a=>a.id===p)[0];y!==null&&y.rewards&&(this.bonusReward=y.rewards.filter(a=>a.id===s)[0])})},openClaimConfirmation(){this.$refs.claimConfirmationModal.showModal()},closeClaimConfirmation(){this.$refs.claimConfirmationModal.close()},async claim(){this.$refs.claimConfirmationModal?.close(),this.claimBonusRewardErrorMessage="",this.claimBonusRewardSuccessMessage="";let g=await Li(Bm+`?bonusCampaignId=${p}&bonusRewardId=${s}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(g.error){this.claimBonusRewardErrorMessage=on(g.error);return}this.hasBeenClaimed=!0,this.claimBonusRewardSuccessMessage=Si("Oekokiste.Loyalty:BonusCampaigns:rewards.claim.success"),g.data&&xt.store(Ol,g.data),this.$dispatch("update-user-details");let b=this.$refs.claimButton,y=b?b.getBoundingClientRect():{left:window.innerWidth/2,top:window.innerHeight/2,width:0,height:0};Jf({particleCount:60,spread:80,origin:{x:(y.left+y.width/2)/window.innerWidth,y:(y.top+y.height/2)/window.innerHeight},gravity:1.2,scalar:.8,ticks:150,disableForReducedMotion:!0,colors:Qf()})}});var My=p=>
732({currentRegioPointsInBasket:0,bonusCampaigns:p??[],async init(){this.currentRegioPointsInBasket=this.getCurrentRegioPointsInBasket(),this.$watch("$store.basket.products",()=>{this.currentRegioPointsInBasket=this.getCurrentRegioPointsInBasket()})},getCurrentRegioPointsInBasket(){return Bl().products.reduce((g,b)=>b.information.isRegional?g+1:g,0)},getPointsInCurrentBasket(s){return Vb(s,Bl().products)},getFirstAvailableCampaign(){return this.bonusCampaigns.find(s=>!s.customerIsParticipating)}});function Vb(p,s){let g=p.regionalOnly?s.filter(y=>y.information.isRegional===!0):s;if(p.perPosition)return g.length;let b=g.reduce((y,a)=>y+Nl(a),0);return b<p.minOrderValue?0:Math.floor(b/p.pricePerPoint)}var Cy=p=>({isFavourite:!1,recipeFavouritesCount:0,async init(){this.restoreStateFromStore(),this.$watch("$store.wishlist.favouriteRecipeIdentifiers",()=>this.restoreStateFromStore())},getAmountOfFavourites(){let s=Fa(),g=s.favourites,b=s.favouriteRecipeIdentifiers,y=0;return g&&g?.length>0&&(y+=g.length),b&&b?.length>0&&(y+=b.length),y},async toggleFavourites(){if(!mn().isSignedIn){window.location.href=jl()+"?referer="+window.location.pathname+window.location.search;return}let s=Fa();if(this.isFavourite){this.isFavourite=!1;let g=s.favouriteRecipeIdentifiers?.indexOf(p);g!==void 0&&g>-1&&s.favouriteRecipeIdentifiers?.splice(g,1);let b=await yg(p);s.favouriteRecipeIdentifiers=b.data,s.lastTimeUpdatedFromDb=Date.now()}else{this.isFavourite=!0,s.favouriteRecipeIdentifiers?.push(p);let g=await gg(p);s.favouriteRecipeIdentifiers=g.data,s.lastTimeUpdatedFromDb=Date.now()}},restoreStateFromStore(){Fa().favouriteRecipeIdentifiers?.includes(p)===!0&&(this.isFavourite=!0)}});var Iy=p=>({inBackend:p,installPrompt:null,isInStandaloneMode:!1,activeInstallInstructions:null,init(){this.isInStandaloneMode=window.isPwa},handleAppInstall(){let s=/iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase())||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,g=/firefox/.test(navigator.userAgent.toLowerCase()),b=/gsa|googlequicksearchbox/.test(navigator.userAgent.toLowerCase()),y=!/android|iphone|ipad|ipod|mobile/.test(navigator.userAgent.toLowerCase());this.inBackend||(y&&!this.isInStandaloneMode?this.showInstallInstructions("desktop"):b&&!this.isInStandaloneMode?this.showInstallInstructions("google"):s&&!this.isInStandaloneMode?this.showInstallInstructions("ios"):g&&!this.isInStandaloneMode?this.showInstallInstructions("firefox"):this.installApp())},handleBeforeinstallprompt(s){s.preventDefault(),this.installPrompt=s},async installApp(){if(!this.installPrompt||this.inBackend)return;(await this.installPrompt.prompt()).outcome==="accepted"&&this.handleAppInstalled()},handleAppInstalled(){this.isInStandaloneMode=!0},showInstallInstructions(s){this.activeInstallInstructions=s,this.$refs.installInstructionsDialog.show()},closeInstallInstructionsDialog(){this.$refs.installInstructionsDialog.close(),this.activeInstallInstructions=null}});var Ay=()=>({init(){if(!window.isPwa)return;let p=Array.from(document.querySelectorAll("a")),s=Array.from(document.querySelectorAll("button[type=submit]"));p.forEach(g=>{g.addEventListener("click",()=>{g.getAttribute("href")?.startsWith("#")||this.startProgressBar()})}),s.forEach(g=>{g.addEventListener("click",()=>{this.startProgressBar()})})},startProgressBar(){let p=this.$refs.headerProgressbar;p.setAttribute("style","animation: progress 2s ease-in"),setTimeout(()=>{p.removeAttribute("style")},2e3)}});var Dy=()=>({init(){document.addEventListener("DOMContentLoaded",async()=>{let s=await this.$refs.basketStickyPricing.querySelector(".basket__checkout-sum-and-actions"),g=await document.querySelector(".basket"),b=await document.querySelector(".basket__ticker");b?(g.style.marginBottom="0",b.style.marginBottom=s?.clientHeight?`${s?.clientHeight-40}px`:b.style.marginBottom):g.style.marginBottom=s?.clientHeight?`${s?.clientHeight-40}px`:g.style.marginBottom})}});var ky=()=>({isLoading:!1,orders:[],products:[],selectedOrder:void 0,userDetails:null,init(){let p=mn();this.userDetails=p.details;let s=Vs();if(this._setDoneOrders(s.allDates),this.orders.length===0)return;this.selectedOrder=this.orders[0];let g=this.orders.find(b=>b.order.id===this.orders[0].order.id);g&&this._setProducts(g)},handleSelectedOrderChange(p){let s=p.target,g=parseInt(s.value),b=this.orders.find(y=>y.order.id===g);if(!b){console.warn(`Could not find delivery date for order with i
732d '${g}'`);return}this.selectedOrder=b,this._setProducts(b)},handleFileUploadChange(p){let s=p.target;if(!s)return;let g=s.closest(".claim-form__file-upload-container"),b=g?.querySelector(".claim-form__file-upload__preview-container"),y=g?.querySelector("img"),a=s.files?URL.createObjectURL(s.files[0]):"";b&&y&&(y.src=a,b.hidden=!1)},removePreviewImage(p){let s=p.target;if(!s)return;let g=s.closest(".claim-form__file-upload-container"),b=g?.querySelector(".claim-form__file-upload__input"),y=g?.querySelector(".claim-form__file-upload__preview-container"),a=g?.querySelector("img");y&&a&&b&&(a.src="",y.hidden=!0,b.value="")},async _setProducts(p){this.isLoading=!0;let s=await om(p.order,p.tour);s.data?.products&&(this.products=s.data.products),this.isLoading=!1},_setDoneOrders(p){let s=[];for(let g of p)for(let b of g.tours)for(let y of b.orders){let a=y.id===-1,z=y.state===sd.DONE,F=y.state===sd.PREPARATION&&(Lu(new Date(b.date))||Ef(new Date(b.date),Date.now()));a||!z&&!F||s.push({order:y,tour:b})}this.orders=s.reverse()}});var Ly=async()=>await Li(Lm,{method:"POST",headers:{"Content-Type":"application/json"}}),zy=async()=>await Li(zm,{method:"GET",headers:{"Content-Type":"application/json"}});var Fy=Tf(By());var Oy=(p=!1)=>
732({isLoading:!0,map:null,showMap:!1,maplibregl:null,marker:null,init(){window.isPwa&&mn().isSignedIn&&this._initDeliveryState()},async _initDeliveryState(){let s=Fl(),g=new Date,b=s.lastChecked?new Date(s.lastChecked):null;if(!p&&b&&g.getTime()-b.getTime()<6e5){this.isLoading=!1;return}let y=await Ly();if(s.lastChecked=new Date().toISOString(),y.data?.deliveredTime){s.deliveryState=3,s.deliveryDate=y.data?.deliveredTime,this.isLoading=!1;return}if(!y.data?.deliveryEstimate&&!y.data?.stopsAheadOfDelivery){s.deliveryState=0,this.isLoading=!1;return}s.estimateDeliveryPosition=y.data.stopsAheadOfDelivery,s.estimatedDeliveryDate=y.data.deliveryEstimate,s.deliveryState=2,this.showMap=!1;let a=await zy();a.error?this.showMap=!1:(s.location=a.data,this.loadMap()),this.isLoading=!1},async loadMap(){let s=Fl();if(s.deliveryState!==1&&s.deliveryState!==2)return;let g=this.$refs.deliveryStatusMap,b=this;import("/_maptiles/frontend/v2.0/map-main.js").then(async({maplibregl:y,createMap:a})=>{let z=Fl(),F=await a(window.location.protocol+"//"+window.location.host+"/_maptiles",{container:g,center:[z.location?.lng,z.location?.lat],zoom:15,cooperativeGestures:window.innerWidth>ad});window.innerWidth<=ad&&(F.touchZoomRotate._tapDragZoom._enabled=!1,F.scrollZoom.disable(),F.dragPan.disable()),b.map=F,b.maplibregl=y,b.addOrUpdateMarker()})},addOrUpdateMarker(){let s=Fl().location?.lat,g=Fl().location?.lng;!s||!g||!this.map||!this.maplibregl||(this.marker||this.addMarker(s,g),this.updateMarker(s,g))},addMarker(s,g){let b=document.createElement("i");b.className="marker delivery-status__map-marker",this.maplibregl&&(this.marker=new this.maplibregl.Marker({element:b}).setLngLat([g,s]).setPopup(new Fy.Popup({offset:25,closeButton:!1}).setText("Deine Kiste")).addTo(this.map))},updateMarker(s,g){this.marker?.setLngLat([g,s])}});var Ny=async(p,s,g,b)=>await Li(Mm,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({total:p,vat:s,shipping:g,amountOfProducts:b})}),jy=async(p,s,g)=>await Li(Cm,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ppresult:p,token:s,payerId:g})});var $y=()=>({paypalIsLoading:!1,paypalStatus:null,paypalError:null,paypalIsDisabled:!1,init(){this._initPayPal()},_initPayPal(){this.paypalIsLoading=!0,typeof window.paypal<"u"?this._renderPayPalButtons():setTimeout(()=>{this._initPayPal()},500)},_basketContainsReturningItems(){return Oc().products.some(s=>s.repeatXWeeks)},_disableEnablePaypalButtons(p){this.paypalIsDisabled=this._basketContainsReturningItems(),this.paypalIsDisabled?p.disable():p.enable()},_renderPayPalButtons(){this.paypalIsLoading=!1;let p=window.paypal,s=Oc(),g=this,b={style:{shape:"pill"},onInit:function(y,a){a.disable(),g._disableEnablePaypalButtons(a),g.$watch(`$store.${zu}.products`,()=>{g._disableEnablePaypalButtons(a)})},createOrder:async function(){g.paypalStatus=null,g.paypalError=null;let y=await Ny(s.sum,s.vat,s.deliveryCosts,s.productCount);if(y.error){g.paypalStatus="error",g.paypalError=y.error.humanReadableError;return}return y.data},onApprove:async function(y){let a=await jy("confirmed",y.orderID,y.payerID);if(a.error){g.paypalStatus="error",g.paypalError=a.error.humanReadableError;return}Fu()},onCancel:function(){g.paypalStatus="canceled"},onError:function(){g.paypalStatus="error"}};p.Buttons===void 0?p.Button(b).render("#paypalButtonTarget"):p.Buttons(b).render("#paypalButtonTarget")}});var Vy=async()=>{if(qm(),window.Alpine=xt,xt.plugin(lg),xt.plugin(cg),xt.plugin(pg),xt.plugin(mg),xt.data("header",vg),xt.data("mainMenu",bg),xt.data("productListPage",xg),xt.data("searchPage",Ty),xt.data("product",tm),xt.data("ecoBoxVariant",wg),xt.data("addToBasket",Kf),xt.data("miniBasket",sm),xt.data("paypal",$y),xt.data("recommendations",Sg),xt.data("recipeSuggestionsTicker",Tg),xt.data("authentication",vm),xt.data("searchBar",Eg),xt.data("addressCompletion",Pg),xt.data("deliveryDates",fm),xt.data("deliveryStatus",Oy),window.isFullCalendar){console.log("Importing Delivery Calendar Resources");let{default:y}=await import("./DeliveryCalendar-4WLDPUJH.js");xt.data("deliveryCalendar",y)}xt.data("buttonToTop",Mg),xt.data("favouritesToggle",Ag),xt.data("ordersOverview",am),xt.data("ticker",yy),xt.data("tilesTicker",_y),xt.data("heroSlider",vy),xt.data("deliveryPauses",Yf),xt.data("signUp",rm),xt.data("myAccount",by),xt.data("myAccountMenu",xy),xt.data("notification",Vf),xt.data("subscriptionsManagement",wy),xt.data("deliveryDatesSelector",Sy),xt.data("currentScoreDisplay",My),xt.data("bonusCampaign",Py),xt.data("bonusReward",Ey),xt.data("rezeptFavourite",Cy),xt.data("installPwaButton",Iy),xt.data("headerProgressbar",Ay),xt.data("basketStickyPricing",Dy),xt.data("claimForm",ky),window.isRecipe&&(console.log("Importing Recipe Resources"),(await import("./main-USZ4F56H.js")).default()),window.isPwa=window.matchMedia("(display-mode: standalone)").matches||document.cookie.split(";").some(y=>y.trim().startsWith("PWA_TEST_MODE=true")),window.isPwa&&document.body.classList.add("is-pwa-mode");let p=[],s=[],g=localStorage.getItem(If),b=localStorage.getItem(Af);window.basketData?.currentBasket?(p.push(...window.basketData.currentBasket),s.push(...window.basketData.vouchers)):(g&&p.push(...JSON.parse(g)),b&&s.push(...JSON.parse(b))),xt.store(zu,{products:p,minOrderValue:window.basketData?.minOrderValue??void 0,sum:0,sumWithoutVouchers:0,deliveryCosts:0,vat:0,vouchers:s,isSubmitting:!1,submitErrorMessage:null,isCancelling:!1,cancelErrorMessage:null,deliveryAddressId:null,lastOrderChangeIsInPast:!1,orderNote:xt.$persist("").as("order_note"),productC
732ount:0,hasOpenChanges:!1,submitOrder:Fu}),xt.store(Df,{isSignedIn:xt.$persist(!1).as("user_signed_in"),details:xt.$persist(null).as("user_details"),lastAuthCheck:xt.$persist(null).as("user_details_last_check"),sessionExpired:xt.$persist(!1).as("user_session_expired"),onClickOnProfileLink:jl()}),xt.store(kf,{sorting:xt.$persist({value:""}).as("productListPage_sorting")}),xt.store(Lf,{sorting:xt.$persist({value:""}).as("searchPage_sorting")}),xt.store(uo,{allDates:xt.$persist([]).as("delivery_dates"),currentDeliveryTour:xt.$persist(null).as("current_delivery_tour"),currentOrder:window.basketData?.order??null,currentOrderProducts:window.basketData?.orderedBasket??[],clickedTour:null,pauses:xt.$persist([]).as("pauses"),conflictResolutionMethod:xt.$persist(null).as("conflictResolutionMethod"),subscriptions:xt.$persist([]),holidays:xt.$persist([]),orderWasCanceled:!1}),xt.store(zf,{favourites:xt.$persist([]).as("wishlist_favourites"),favouriteRecipeIdentifiers:xt.$persist(null).as("wishlist_recipes_favourites"),lastTimeUpdatedFromDb:xt.$persist(0).as("last_time_recipe_favourites_updated_from_db")}),xt.store(jm,{recipeIdentifiers:xt.$persist([]).as("recipes_added_to_basket")}),xt.store(Of,{deliveryState:xt.$persist(null).as("delivery_status"),estimatedDeliveryDate:xt.$persist(null).as("delivery_estimated_date"),estimateDeliveryPosition:xt.$persist(null).as("delivery_estimated_position"),deliveryDate:xt.$persist(null).as("delivery_date"),lastChecked:xt.$persist(null).as("delivery_last_checked")}),xt.store(jc,!1),xt.store(Rf,!1),xt.store(Ol,window.bonusPointsData),xt.magic("updateDeliveryDates",async()=>{await Ou()}),xt.magic("getPriceFormatted",()=>y=>Uf(y)),xt.magic("getPrice",()=>y=>Nl(y)),xt.magic("getNumberFormatted",()=>y=>Gf(y)),xt.magic("getDateFormatted",()=>(y,a)=>Hf(y,a)),xt.magic("getDateTimeFormatted",()=>(y,a)=>qf(y,a)),xt.magic("missingToNextBulk",()=>(y,a,z,F)=>Xf(y,a,z,F)),xt.magic("getLabelForSubscriptionValue",()=>Ub),xt.magic("isSelectedTour",()=>y=>Zu(y)),xt.magic("isSelectedOrder",()=>(y,a)=>Md(y,a)),xt.magic("deliveryDateWasMoved",()=>y=>y?y.isReplacementFor!==null:!1),xt.magic("translate",()=>(y,a)=>Si(y,a)),xt.magic("isPartOfRecipeBox",()=>y=>Bu(y)),as().init(),xt.start(),await gm()},Ub=(p,s)=>{if(p===null||p===0)return s[0].label;let g=s.find(b=>parseInt(b.value)===p);return g===void 0?""+p:g.label};function yo(p){if(p<0)throw new Error("Bytes cannot be negative");if(p===0)return"0 B";let s=1024,g=["B","KB","MB","GB"],b=Math.floor(Math.log(p)/Math.log(s));return parseFloat((p/Math.pow(s,b)).toFixed(b>1?2:0))+" "+g[b]}function Uy(p,s=8){let g=1+p/1024/2419.56*(s-1);return Math.min(s,Math.max(1,g))}function Gb(p){let s=document.querySelectorAll(` 733 img[src], 734 img[srcset], 735 script[src], 736 link[href], 737 iframe[src], 738 embed[src], 739 object[data], 740 source[src], 741 source[srcset], 742 track[src], 743 audio[src], 744 video[src], 745 video[poster], 746 input[src], 747 frame[src], 748 [style] 749 `),g=[];return s.forEach(b=>{let y=p.pathname+p.search+p.hash,a=b.attributes;for(let z=0;z<a.length;z++){let F=a[z].value.toLowerCase(),V=y.toLowerCase();if(F.includes(V)){g.push(b);break}}}),g}var Hc=class{};Hc.cssClass={resourceHint:"footprint-sentinel-hint",resourceHintSmall:"footprint-sentinel-hint--small",resourceHintContent:"footprint-sentinel-hint__content",resourceHintText:"footprint-sentinel-hint__text",resourceHintTextBig:"footprint-sentinel-hint__text--big",sentinel:"footprint-sentinel",sentinelStats:"footprint-sentinel__stats",sentinelStatsHide:"footprint-sentinel__stats--hide",sentinelRow:"footprint-sentinel__row",sentinelRating:"footprint-sentinel__rating",sentinelSize:"footprint-sentinel__size",sentinelLabel:"footprint-sentinel__label"},Hc.ratingColors={"A+":"#00febc",A:"#1aff93",B:"#49ff42",C:"#70ff01",D:"#f9ff00",E:"#fea900",F:"#fd0100"},Hc.cssVar={ratingColor:"--footprint-sentinel-rating-color"},Hc.dataAttr={resourceUrl:"data-resource-url",hasSentinelHint:"data-has-sentinel-hint"};var Ni=Hc,go=Ni.cssClass,Hb=` 750 <style> 751 :root { 752 ${Ni.cssVar.ratingColor}: #ccc; 753 } 754 .${go.resourceHint} { 755 box-sizing: border-box; 756 display: flex; 757 justify-content: center; 758 align-items: center; 759 font-size: 14px; 760 pointer-events: none; 761 } 762 763 .${go.resourceHintSmall}{ 764 font-size: 10px; 765 } 766 767 .${go.resourceHintContent} { 768 padding: 5px; 769 width: 50%; 770 height: 50%; 771 display: flex; 772 flex-direction: column; 773 align-items: center; 774 justify-content: center; 775 background: #fd0100; 776 color: white; 777 } 778 779 .${go.sentinel} { 780 display: flex; 781 flex-direction: column; 782 align-items: end; 783 position: fixed; 784 bottom: 0; 785 right: 0; 786 font-size: 18px; 787 } 788 789 .${go.sentinelStats} { 790 display: flex; 791 flex-direction: row; 792 justify-content: space-between; 793 background: var(${Ni.cssVar.ratingColor}); 794 transition-duration: 5000ms; 795 transition-property: all; 796 padding: 5px 10px; 797 max-width: 100%; 798 box-shadow: 0 0 10px rgba(0,0,0,0.2); 799 } 800 801 .${go.sentinelStatsHide} { 802 display: none; 803 } 804 805 .${go.sentinelRow} { 806 display: flex; 807 flex-direction: row; 808 } 809 810 .${go.sentinelLabel} { 811 display: flex; 812 align-items: center; 813 font-size: 14px; 814 line-height: 1.2; 815 } 816 </style> 817`,Ad={isActivated:!0,showSentinel:!0,showResourceHints:!0,maxBytesPer100x100Threshold:10*1024,maxBytesPerResourceThreshold:200*1024,ignoreResourcesBelowBytesThreshold:40*1024,sentinelZIndex:1e4,ski
vendor: 4,373 bytes, line 817
817pResource:()=>!1},Ku="top",Dd="bottom",kd="right",Ju="left",qb="start",Ld="end",Zb="beforeRead",Wb="read",Xb="afterRead",Yb="beforeMain",Kb="main",Jb="afterMain",Qb="beforeWrite",ex="write",tx="afterWrite",ix=[Zb,Wb,Xb,Yb,Kb,Jb,Qb,ex,tx];function ja(p){return p?(p.nodeName||"").toLowerCase():null}function Ss(p){if(p==null)return window;if(p.toString()!=="[object Window]"){var s=p.ownerDocument;return s&&s.defaultView||window}return p}function Bd(p){var s=Ss(p).Element;return p instanceof s||p instanceof Element}function qs(p){var s=Ss(p).HTMLElement;return p instanceof s||p instanceof HTMLElement}function Xy(p){if(typeof ShadowRoot>"u")return!1;var s=Ss(p).ShadowRoot;return p instanceof s||p instanceof ShadowRoot}function rx(p){var s=p.state;Object.keys(s.elements).forEach(function(g){var b=s.styles[g]||{},y=s.attributes[g]||{},a=s.elements[g];!qs(a)||!ja(a)||(Object.assign(a.style,b),Object.keys(y).forEach(function(z){var F=y[z];F===!1?a.removeAttribute(z):a.setAttribute(z,F===!0?"":F)}))})}function nx(p){var s=p.state,g={popper:{position:s.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(s.elements.popper.style,g.popper),s.styles=g,s.elements.arrow&&Object.assign(s.elements.arrow.style,g.arrow),function(){Object.keys(s.elements).forEach(function(b){var y=s.elements[b],a=s.attributes[b]||{},z=Object.keys(s.styles.hasOwnProperty(b)?s.styles[b]:g[b]),F=z.reduce(function(V,B){return V[B]="",V},{});!qs(y)||!ja(y)||(Object.assign(y.style,F),Object.keys(a).forEach(function(V){y.removeAttribute(V)}))})}}var sx={name:"applyStyles",enabled:!0,phase:"write",fn:rx,effect:nx,requires:["computeStyles"]};function Yy(p){return p.split("-")[0]}var Ul=Math.round;function zd(){var p=navigator.userAgentData;return p!=null&&p.brands&&Array.isArray(p.brands)?p.brands.map(function(s){return s.brand+"/"+s.version}).join(" "):navigator.userAgent}function ax(){return!/^((?!chrome|android).)*safari/i.test(zd())}function eh(p,s,g){s===void 0&&(s=!1),g===void 0&&(g=!1);var b=p.getBoundingClientRect(),y=1,a=1;s&&qs(p)&&(y=p.offsetWidth>0&&Ul(b.width)/p.offsetWidth||1,a=p.offsetHeight>0&&Ul(b.height)/p.offsetHeight||1);var z=Bd(p)?Ss(p):window,F=z.visualViewport,V=!ax()&&g,B=(b.left+(V&&F?F.offsetLeft:0))/y,U=(b.top+(V&&F?F.offsetTop:0))/a,O=b.width/y,ne=b.height/a;return{width:O,height:ne,top:U,right:B+O,bottom:U+ne,left:B,x:B,y:U}}function ox(p){var s=eh(p),g=p.offsetWidth,b=p.offsetHeight;return Math.abs(s.width-g)<=1&&(g=s.width),Math.abs(s.height-b)<=1&&(b=s.height),{x:p.offsetLeft,y:p.offsetTop,width:g,height:b}}function el(p){return Ss(p).getComputedStyle(p)}function lx(p){return["table","td","th"].indexOf(ja(p))>=0}function rh(p){return((Bd(p)?p.ownerDocument:p.document)||window.document).documentElement}function Fd(p){return ja(p)==="html"?p:p.assignedSlot||p.parentNode||(Xy(p)?p.host:null)||rh(p)}function Gy(p){return!qs(p)||el(p).position==="fixed"?null:p.offsetParent}function cx(p){var s=/firefox/i.test(zd()),g=/Trident/i.test(zd());if(g&&qs(p)){var b=el(p);if(b.position==="fixed")return null}var y=Fd(p);for(Xy(y)&&(y=y.host);qs(y)&&["html","body"].indexOf(ja(y))<0;){var a=el(y);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||s&&a.willChange==="filter"||s&&a.filter&&a.filter!=="none")return y;y=y.parentNode}return null}function Ky(p){for(var s=Ss(p),g=Gy(p);g&&lx(g)&&el(g).position==="static";)g=Gy(g);return g&&(ja(g)==="html"||ja(g)==="body"&&el(g).position==="static")?s:g||cx(p)||s}function ux(p){return["top","bottom"].indexOf(p)>=0?"x":"y"}function Jy(p){return p.split("-")[1]}var hx={top:"auto",right:"auto",bottom:"auto",left:"auto"};function dx(p,s){var g=p.x,b=p.y,y=s.devicePixelRatio||1;return{x:Ul(g*y)/y||0,y:Ul(b*y)/y||0}}function Hy(p){var s,g=p.popper,b=p.popperRect,y=p.placement,a=p.variation,z=p.offsets,F=p.position,V=p.gpuAcceleration,B=p.adaptive,U=p.roundOffsets,O=p.isFixed,ne=z.x,re=ne===void 0?0:ne,j=z.y,H=j===void 0?0:j,ae=typeof U=="function"?U({x:re,y:H}):{x:re,y:H};re=ae.x,H=ae.y;var ge=z.hasOwnProperty("x"),ce=z.hasOwnProperty("y"),le=Ju,we=Ku,Le=window;if(B){var M=Ky(g),ze="clientHeight",Oe="clientWidth";if(M===Ss(g)&&(M=rh(g),el(M).position!=="static"&&F==="absolute"&&(ze="scrollHeight",Oe="scrollWidth")),M=M,y===Ku||(y===Ju||y===kd)&&a===Ld){we=Dd;
vendor: 5,565 bytes, line 817
817var qe=O&&M===Le&&Le.visualViewport?Le.visualViewport.height:M[ze];H-=qe-b.height,H*=V?1:-1}if(y===Ju||(y===Ku||y===Dd)&&a===Ld){le=kd;var $e=O&&M===Le&&Le.visualViewport?Le.visualViewport.width:M[Oe];re-=$e-b.width,re*=V?1:-1}}var Qe=Object.assign({position:F},B&&hx),Ne=U===!0?dx({x:re,y:H},Ss(g)):{x:re,y:H};if(re=Ne.x,H=Ne.y,V){var Je;return Object.assign({},Qe,(Je={},Je[we]=ce?"0":"",Je[le]=ge?"0":"",Je.transform=(Le.devicePixelRatio||1)<=1?"translate("+re+"px, "+H+"px)":"translate3d("+re+"px, "+H+"px, 0)",Je))}return Object.assign({},Qe,(s={},s[we]=ce?H+"px":"",s[le]=ge?re+"px":"",s.transform="",s))}function px(p){var s=p.state,g=p.options,b=g.gpuAcceleration,y=b===void 0?!0:b,a=g.adaptive,z=a===void 0?!0:a,F=g.roundOffsets,V=F===void 0?!0:F,B={placement:Yy(s.placement),variation:Jy(s.placement),popper:s.elements.popper,popperRect:s.rects.popper,gpuAcceleration:y,isFixed:s.options.strategy==="fixed"};s.modifiersData.popperOffsets!=null&&(s.styles.popper=Object.assign({},s.styles.popper,Hy(Object.assign({},B,{offsets:s.modifiersData.popperOffsets,position:s.options.strategy,adaptive:z,roundOffsets:V})))),s.modifiersData.arrow!=null&&(s.styles.arrow=Object.assign({},s.styles.arrow,Hy(Object.assign({},B,{offsets:s.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:V})))),s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-placement":s.placement})}var fx={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:px,data:{}},Wu={passive:!0};function mx(p){var s=p.state,g=p.instance,b=p.options,y=b.scroll,a=y===void 0?!0:y,z=b.resize,F=z===void 0?!0:z,V=Ss(s.elements.popper),B=[].concat(s.scrollParents.reference,s.scrollParents.popper);return a&&B.forEach(function(U){U.addEventListener("scroll",g.update,Wu)}),F&&V.addEventListener("resize",g.update,Wu),function(){a&&B.forEach(function(U){U.removeEventListener("scroll",g.update,Wu)}),F&&V.removeEventListener("resize",g.update,Wu)}}var gx={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:mx,data:{}};function Qy(p){var s=Ss(p),g=s.pageXOffset,b=s.pageYOffset;return{scrollLeft:g,scrollTop:b}}function yx(p){return eh(rh(p)).left+Qy(p).scrollLeft}function Od(p){var s=el(p),g=s.overflow,b=s.overflowX,y=s.overflowY;return/auto|scroll|overlay|hidden/.test(g+y+b)}function e_(p){return["html","body","#document"].indexOf(ja(p))>=0?p.ownerDocument.body:qs(p)&&Od(p)?p:e_(Fd(p))}function Qu(p,s){var g;s===void 0&&(s=[]);var b=e_(p),y=b===((g=p.ownerDocument)==null?void 0:g.body),a=Ss(b),z=y?[a].concat(a.visualViewport||[],Od(b)?b:[]):b,F=s.concat(z);return y?F:F.concat(Qu(Fd(z)))}function _x(p){var s=p.reference,g=p.element,b=p.placement,y=b?Yy(b):null,a=b?Jy(b):null,z=s.x+s.width/2-g.width/2,F=s.y+s.height/2-g.height/2,V;switch(y){case Ku:V={x:z,y:s.y-g.height};break;case Dd:V={x:z,y:s.y+s.height};break;case kd:V={x:s.x+s.width,y:F};break;case Ju:V={x:s.x-g.width,y:F};break;default:V={x:s.x,y:s.y}}var B=y?ux(y):null;if(B!=null){var U=B==="y"?"height":"width";switch(a){case qb:V[B]=V[B]-(s[U]/2-g[U]/2);break;case Ld:V[B]=V[B]+(s[U]/2-g[U]/2);break}}return V}function vx(p){var s=p.state,g=p.name;s.modifiersData[g]=_x({reference:s.rects.reference,element:s.rects.popper,placement:s.placement})}var bx={name:"popperOffsets",enabled:!0,phase:"read",fn:vx,data:{}};function xx(p){return{scrollLeft:p.scrollLeft,scrollTop:p.scrollTop}}function wx(p){return p===Ss(p)||!qs(p)?Qy(p):xx(p)}function Sx(p){var s=p.getBoundingClientRect(),g=Ul(s.width)/p.offsetWidth||1,b=Ul(s.height)/p.offsetHeight||1;return g!==1||b!==1}function Tx(p,s,g){g===void 0&&(g=!1);var b=qs(s),y=qs(s)&&Sx(s),a=rh(s),z=eh(p,y,g),F={scrollLeft:0,scrollTop:0},V={x:0,y:0};return(b||!b&&!g)&&((ja(s)!=="body"||Od(a))&&(F=wx(s)),qs(s)?(V=eh(s,!0),V.x+=s.clientLeft,V.y+=s.clientTop):a&&(V.x=yx(a))),{x:z.left+F.scrollLeft-V.x,y:z.top+F.scrollTop-V.y,width:z.width,height:z.height}}function Px(p){var s=new Map,g=new Set,b=[];p.forEach(function(a){s.set(a.name,a)});function y(a){g.add(a.name);var z=[].concat(a.requires||[],a.requiresIfExists||[]);z.forEach(function(F){if(!g.has(F)){var V=s.get(F);V&&y(V)}}),b.push(a)}return p.forEach(function(a){g.has(a.name)||y(a)}),b}function Ex(p){var s=Px(p);return ix.reduce(function(g,b){return g.concat(s.filter(function(y){return y.phase===b}))},[])}function Mx(p){var s;return function(){return s||(s=new Promise(function(g){Promise.resolve().then(function(){s=void 0,g(p())})})),s}}function Cx(p){var s=p.reduce(function(g,b){var y=g[b.name];return g[b.name]=y?Object.assign({},y,b,{options:Object.assign({},y.options,b.options),data:Object.assign({},y.data,b.data)}):b,g},{});return Object.keys(s).map(function(g){return s[g]})}var qy={placement:"bottom",modifiers:[],strategy:"absolute"};function Zy(){for(var p=arguments.length,s=new Array(p),g=0;g<p;g++)s[g]=arguments[g];return!s.some(function(b){return!(b&&typeof b.getBoundingClientRect=="function")})}function Ix(p){p===void 0&&(p={});var s=p,g=s.defaultModifiers,b=g===void 0?[]:g,y=s.defaultOptions,a=y===void 0?qy:y;return function(z,F,V){V===void 0&&(V=a);var B={placement:"bottom",orderedModifiers:[],options:Object.assign({},qy,a),modifiersData:{},elements:{reference:z,popper:F},attributes:{},styles:{}},U=[],O=!1,ne={state:B,setOptions:function(H){var ae=typeof H=="function"?H(B.options):H;j(),B.options=Object.assign({},a,B.options,ae),B.scrollParents={reference:Bd(z)?Qu(z):z.contextElement?Qu(z.contextElement):[],popper:Qu(F)};var ge=Ex(Cx([].concat(b,B.options.modifiers)));return B.orderedModifiers=ge.filter(function(ce){return ce.enabled}
817),re(),ne.update()},forceUpdate:function(){if(!O){var H=B.elements,ae=H.reference,ge=H.popper;if(Zy(ae,ge)){B.rects={reference:Tx(ae,Ky(ge),B.options.strategy==="fixed"),popper:ox(ge)},B.reset=!1,B.placement=B.options.placement,B.orderedModifiers.forEach(function(Oe){return B.modifiersData[Oe.name]=Object.assign({},Oe.data)});for(var ce=0;ce<B.orderedModifiers.length;ce++){if(B.reset===!0){B.reset=!1,ce=-1;continue}var le=B.orderedModifiers[ce],we=le.fn,Le=le.options,M=Le===void 0?{}:Le,ze=le.name;typeof we=="function"&&(B=we({state:B,options:M,name:ze,instance:ne})||B)}}}},update:Mx(function(){return new Promise(function(H){ne.forceUpdate(),H(B)})}),destroy:function(){j(),O=!0}};if(!Zy(z,F))return ne;ne.setOptions(V).then(function(H){!O&&V.onFirstUpdate&&V.onFirstUpdate(H)});function re(){B.orderedModifiers.forEach(function(H){var ae=H.name,ge=H.options,ce=ge===void 0?{}:ge,le=H.effect;if(typeof le=="function"){var we=le({state:B,name:ae,instance:ne,options:ce}),Le=function(){};U.push(we||Le)}})}function j(){U.forEach(function(H){return H()}),U=[]}return ne}}var Ax=[gx,bx,fx,sx],Dx=Ix({defaultModifiers:Ax}),Rd=class{constructor(s,g){this.url=s.name,this.size=Wy(s),this.options=g}updateIfNeeded(s){if(s.name!==this.url)throw`Resource URL mismatch: expected ${this.url}, got ${s.name}`;let g=Wy(s);return this.size!==g?(this.size=g,!0):!1}renderHint(s){if(this.size<this.options.ignoreResourcesBelowBytesThreshold)return;let g=s.parentElement;if(!g||!(s instanceof HTMLElement))return;let b=s;switch(!0){case g instanceof HTMLPictureElement:case g instanceof HTMLVideoElement:b=g;break}let y=b.getBoundingClientRect(),a=window.devicePixelRatio||1,z=y.width*y.height*a*a/(100*100)*this.options.maxBytesPer100x100Threshold;if(z<=0)return;let F=Math.min(z,this.options.maxBytesPerResourceThreshold);if(this.size>F&&!b.hasAttribute(Ni.dataAttr.hasSentinelHint)){b.setAttribute(Ni.dataAttr.hasSentinelHint,"true");let V=document.createElement("div");V.classList.add(Ni.cssClass.resourceHint),V.setAttribute(Ni.dataAttr.resourceUrl,this.url),(y.height<200||y.width<200)&&V.classList.add(Ni.cssClass.resourceHintSmall),V.innerHTML=` 818 <div class="${Ni.cssClass.resourceHintContent}"> 819 <strong style="font-size: 1.2em">${yo(this.size)}</strong> 820 <span>max ${yo(F)}</span> 821 </div> 822 `,b.insertAdjacentElement("afterend",V),Dx(b,V,{placement:"right-start",modifiers:[{name:"samePositionAndSize",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:B})=>{B.styles.popper.width=`${B.rects.reference.width}px`,B.styles.popper.height=`${B.rects.reference.height}px`,B.styles.popper.left=`-${B.rects.reference.width}px`,B.styles.popper.zIndex="1"}}]})}}};function Wy(p){return p.transferSize||p.encodedBodySize||0}var kx=200,Lx=1e3,zx=2e3,th=class p{constructor(s){this.resources={},this.initialBytes=null,this.onInitialFootprint=()=>{},this.onResourceUpdated=()=>{},this._updateTimeout=null,this._currentUpdateInterval=kx,this._documentLoadedTimestampMs=null,this.options=s.options,this.onResourceUpdated=s.onResourceUpdated,this.onInitialFootprint=s.onInitialFootprint}static later(){return new p({options:Ad,onResourceUpdated:()=>null,onInitialFootprint:()=>null})}watch(){window.addEventListener("DOMContentLoaded",()=>{this._documentLoadedTimestampMs=Date.now(),this.scheduleNextUpdate(!0)}),window.addEventListener("scroll",()=>{this.scheduleNextUpdate(!0)}),window.addEventListener("resize",()=>{this.scheduleNextUpdate(!0)})}addResource(s){return this.resources[s.name]?this.resources[s.name].updateIfNeeded(s)&&this.onResourceUpdated(this.resources[s.name]):(this.resources[s.name]=new Rd(s,this.options),this.onResourceUpdated(this.resources[s.name])),this}totalBytes(){return Object.values(this.resources).reduce((s,g)=>s+g.size,0)}_tryToSetInitialLoadBytesIfNull(){if(this.initialBytes)return;let s=Date.now();this._documentLoadedTimestampMs&&s>=this._documentLoadedTimestampMs+Lx&&(this.initialBytes=this.totalBytes(),this._currentUpdateInterval=zx,this.onInitialFootprint())}scheduleNextUpdate(s=!1){this._updateWithCurrentPerformanceEntries(),this._tryToSetInitialLoadBytesIfNull(),s?(this._updateTimeout&&clearTimeout(this._updateTimeout),this.scheduleNextUpdate()):this._updateTimeout=setTimeout(()=>{this.scheduleNextUpdate()},this._currentUpdateInterval)}_updateWithCurrentPerformanceEntries(){return[...performance.getEntriesByType("resource"),performance.getEntriesByType("navigation")[0]].forEac
822h(s=>{s instanceof PerformanceResourceTiming&&!this.options.skipResource(s.name)&&this.addResource(s)}),this}};function Xu(p){let s=p/1024;return s<272.51?"A+":s<531.15?"A":s<975.85?"B":s<1410.39?"C":s<1875.01?"D":s<2419.56?"E":"F"}function Yu(p){switch(p){case"A+":return Ni.ratingColors["A+"];case"A":return Ni.ratingColors.A;case"B":return Ni.ratingColors.B;case"C":return Ni.ratingColors.C;case"D":return Ni.ratingColors.D;case"E":return Ni.ratingColors.E;case"F":return Ni.ratingColors.F;default:throw new Error(`Unknown rating: ${p}`)}}var ih=class p extends EventTarget{constructor(s){if(super(),this.footprintElement=null,this.options=Ad,this.resources=th.later(),this.lastTotalBytes=0,this.lastTotalBytesDebounceTimeout=null,p.instance)return p.instance;this.options={...Ad,...s},this.options.isActivated&&(this.resources=new th({options:this.options,onResourceUpdated:this.handleResourceUpdated.bind(this),onInitialFootprint:this._handleInitialFootprint.bind(this)}),this.options.showSentinel&&(this.footprintElement=this.addSentinelElement()),(this.options.showSentinel||this.options.showResourceHints)&&document.body.insertAdjacentHTML("beforeend",Hb),this.resources.watch()),p.instance=this}get footprint(){let s=this.resources.totalBytes(),g=s-this.lastTotalBytes,b=Xu(s),y=Yu(b);return{total:{bytes:s,bytesFormatted:yo(s),rating:b,color:y},lastDelta:{bytes:g,bytesFormatted:yo(g)}}}handleResourceUpdated(s){this.lastTotalBytesDebounceTimeout&&clearTimeout(this.lastTotalBytesDebounceTimeout);let g=this.options.onFootprintChange;g&&(this.lastTotalBytesDebounceTimeout=window.setTimeout(()=>{let b=this.resources.totalBytes();if(b>this.lastTotalBytes+100*1024){let y=b-this.lastTotalBytes,a=Xu(b);g({total:{bytes:b,bytesFormatted:yo(b),rating:a,color:Yu(a)},lastDelta:{bytes:y,bytesFormatted:yo(y)}}),this.lastTotalBytes=b}},500)),this._updateFootprint(),this._updateResourceHint(s)}_handleInitialFootprint(){this.options.onInitialFootprint&&this.options.onInitialFootprint(this.footprint)}_updateFootprint(){if(!this.options?.showSentinel||!this.footprintElement)return;let s=this.resources.totalBytes(),g=this.resources.initialBytes||0,b=g&&g!==s,y=yo(s),a=Uy(s),z=Xu(s),F=`z-index: 1; width: ${100+40*a}px; font-size: ${.95+.05*a}em; ${Ni.cssVar.ratingColor}: ${Yu(z)};)`,V="Total",B=yo(g),U=Uy(g),O=Xu(g),ne=`width: ${100+40*U}px; font-size: ${.85+.05*U}em; ${Ni.cssVar.ratingColor}: ${Yu(O)};`,re="Initial";this.footprintElement.innerHTML=` 823 824 <div class="${Ni.cssClass.sentinelStats}" data-rating="${z}" style="${F}"> 825 <div class="${Ni.cssClass.sentinelRow}"> 826 <span class="${Ni.cssClass.sentinelRating}">${z}</span> 827 <span style="width: 10px;"></span> 828 <span class="${Ni.cssClass.sentinelSize}"><strong>${y}</strong></span> 829 </div> 830 <div class="${Ni.cssClass.sentinelLabel}"> 831 ${b?V:re} 832 </div> 833 </div> 834 835 <div class="${Ni.cssClass.sentinelStats} ${b?"":Ni.cssClass.sentinelStatsHide}" data-rating="${O}" style="${ne}"> 836 <div class="${Ni.cssClass.sentinelRow}"> 837 <span class="${Ni.cssClass.sentinelRating}">${O}</span> 838 <span style="width: 10px;"></span> 839 <span class="${Ni.cssClass.sentinelSize}">${B}</span> 840 </div> 841 <div class="${Ni.cssClass.sentinelLabel}"> 842 ${re} 843 </div> 844 </div> 845 `}_updateResourceHint(s){this.options?.showResourceHints&&(s.size<this.options.ignoreResourcesBelowBytesThreshold||Gb(new URL(s.url)).forEach(g=>{s.renderHint(g)}))}addSentinelElement(){if(document.querySelector(Ni.cssClass.sentinel))return console.warn("FootprintGuard element already exists, skipping initialization."),null;let s=document.createElement("div");return s.className=Ni.cssClass.sentinel,s.style.zIndex=this.options.sentinelZIndex.toString(),document.body.appendChild(s),s}};function Nd(){let p=localStorage.getItem("FS_isActivated")==="true",s=parseInt(localStorage.getItem("FS_ignoreResourcesBelowBytesThreshold")||"0"),g=parseInt(localStorage.getItem("FS_maxBytesPerResourceThreshold")||"0"),b=parseInt(localStorage.getItem("FS_maxBytesPer100x100Threshold")||"0");new ih({isActivated:p,ignoreResourcesBelowBytesThreshold:s||40*1024,maxBytesPerResourceThreshold:g||200*1024,maxBytesPer100x100Threshold:b||10*1024})}Vy();var Rx=new Date;document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&Lu(Pf(Rx,90))&&window.location.reload()});setInterval(()=>{window.location.reload()},90*60*60*1e3);Gm();Hm();Nd();window.location.hash.includes("highlight=")&&import("./searchHighlight-TLUHW5Y6.js"); 846/*! Bundled license information: 847 848jquery/dist/jquery.js: 849 (*! 850 * jQuery JavaScript Library v3.7.1 851 * https://jquery.com/ 852 * 853 * Copyright OpenJS Foundation and other contributors 854 * Released under the MIT license 855 * https://jquery.org/license 856 * 857 * Date: 2023-08-28T13:37Z 858 *) 859 860maplibre-gl/dist/maplibre-gl.js: 861 (** 862 * MapLibre GL JS 863 * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.3.0/LICENSE.txt 864 *) 865 866@alpinejs/focus/dist/module.esm.js: 867 (*! Bundled license information: 868 869 tabbable/dist/index.esm.js: 870 (*! 871 * tabbable 5.3.3 872 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE 873 *) 874 875 focus-trap/dist/focus-trap.esm.js: 876 (*! 877 * focus-trap 6.9.4 878 * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE 879 *) 880 *) 881*/
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.